Demo — Spread-Spectrum Playground#
Spread spectrum is how a link survives a jammer that is far stronger than the signal. Spreading the bits across a wide band and despreading at the receiver gathers the wanted signal into a spike while smearing the jammer thin. This demo lets you set the processing gain and the jamming, then watch the despread do its work.
Processing gain#
After despreading, the effective jam-to-signal ratio is reduced by \(G_p\): the link closes when \(\text{J/S} - G_p\) falls below what the modulation can tolerate.
Interactive demo#
Walkthrough#
Start narrowband. With little processing gain, raise J/S above 0 dB and the link dies — a conventional link has no defense against a stronger jammer.
Add chips. Increase the DSSS chips per bit and watch \(G_p\) climb in dB. The post-despread J/S drops below the threshold and the link recovers.
Read the two spectra. Before despread, the jammer towers over the spread signal; after despread, the signal collapses to a tall baseband spike while the jammer is spread into a low floor.
Toggle FHSS. Switch to frequency hopping and vary the hop count — the same \(10\log_{10}\) gain law, achieved by dodging in time rather than spreading in code.
Key observations#
Processing gain is the whole game. Survival is a contest between \(G_p\) and the J/S deficit.
Encryption is not jam resistance. Encryption hides the content; only spreading defeats the power.
L15’s frequency agility was the radar-side preview of the same idea — spread or hop to deny the jammer a fixed target.
Source#
MATLAB · code/L16_DSSSProcessingGain.m↓
The in-class script spreads a bit stream, adds a jammer at a chosen J/S, despreads, and shows the spectrum before and after along with the resulting bit-error performance.