Spread Spectrum, PN Sequences & Walsh Codes
Direct-sequence spread spectrum multiplies data by a faster chip sequence and recovers it by aligned correlation. This entry derives processing gain, works desired and interfering codes chip by chip, explains PN and OVSF correlation, and connects acquisition, multipath, RAKE combining, and near–far power control.
Direct-sequence spread spectrum (DSSS) multiplies each data symbol by a faster sequence of chips. The transmitter spends bandwidth so an aligned receiver can add the desired chips coherently while noise and some mismatched signals add less coherently. The useful quantity is not that the waveform “looks random”; it is the set of autocorrelation and cross-correlation values at the delays and frequency offsets the receiver will actually encounter.
Spreading is not channel coding. It does not by itself create redundant parity equations that correct an arbitrary error pattern. Nor is a PN sequence cryptographic secrecy: a public deterministic sequence can be predicted. Spreading can provide processing gain, code separation, ranging structure, spectral shaping, or resistance to certain interference, but only under a complete acquisition and power-control design.
Direct-sequence mechanism #
Represent one data symbol by and a length- chip code by . The transmitted chips are
An aligned correlator multiplies by the same code and sums:
For ,
because . The desired amplitude grows as , while independent chip-noise variance grows as ; output SNR therefore grows by relative to one chip. In decibels, the ideal processing gain is
where is chip rate and symbol rate. This does not create energy: one data symbol already occupies chips, and comparisons must keep symbol energy, occupied bandwidth, and interference model consistent.
Worked despreading and interference #
Choose
The transmitted and received noiseless chips are . Multiplying by produces , so and the symbol is recovered.
Now choose an orthogonal code . Its zero-lag contribution at the same correlator is
so this particular pair is not orthogonal. A correct orthogonal choice is , for which
This small calculation is worth doing explicitly: code names and equal lengths do not imply orthogonality.
Correlation is the design currency #
For a periodic length- sequence, define cyclic autocorrelation
A useful acquisition sequence has a large, narrow peak at and controlled sidelobes elsewhere. Cross-correlation
measures how much one code leaks into another receiver at each relative delay. Code selection must therefore inspect the whole relevant correlation function, not only .
Maximal-length sequences (m-sequences) come from a length- linear-feedback shift register using a primitive polynomial. Their period is for any nonzero initial state; the all-zero state is absorbing and must be excluded. In bipolar form, a full-period m-sequence has two-level periodic autocorrelation: at zero shift and at every nonzero cyclic shift. That makes the correct phase prominent, though the sequence family is not automatically a good multi-user code set.
Gold and related sequence families trade the perfect two-level autocorrelation of one m-sequence for a larger set with bounded cross-correlation. The right family depends on whether the system needs ranging, identification, asynchronous access, or many simultaneous channels.
Walsh codes and OVSF trees #
Rows of a Hadamard matrix satisfy
They are attractive when a common transmitter aligns all code channels. Orthogonal variable spreading factor (OVSF) codes organize Walsh-like codes into a tree. Starting from , its children are
Longer codes provide larger spreading factor and lower data rate at the same chip rate. But an allocated code blocks every ancestor and descendant: those sequences share structure and are not mutually orthogonal. Capacity is therefore not “the number of unused leaves”; it depends on which branches are occupied.
3GPP/ETSI TS 25.213 defines concrete OVSF generation and allocation rules for UTRA spreading. It also separates channelization codes, which maintain orthogonality among synchronized channels, from scrambling codes, which identify or separate cells/users and change correlation properties. Interchanging those roles breaks the receiver even if both sequences contain only chips.
Acquisition searches delay and frequency cells #
Before despreading gain exists, the receiver does not know code phase. It searches hypotheses over delay, and often Doppler/frequency:
Coherent integration is powerful but sensitive to frequency error: phase rotation across the dwell prevents chips from adding in the same direction. Noncoherent accumulation combines magnitudes from shorter coherent dwells, tolerating uncertainty at some sensitivity cost.
The search threshold is a system-level decision. If one cell has false-alarm probability and approximately independent cells are tested,
A threshold that looks safe on one correlation trace can fail continuously over a million delay-frequency cells. Practical acquisition uses candidate ranking, confirmation dwells, known secondary structure, and a lock detector that compares peak dominance and persistence—not only absolute magnitude.
After coarse acquisition, an early-minus-late discriminator tracks fractional-chip phase around the correlation peak. Its loop must follow code Doppler and oscillator drift without chasing noise or multipath sidelobes.
Multipath creates useful replicas and self-interference #
With resolvable paths,
A RAKE receiver assigns a correlator finger to selected delays and combines their symbol estimates. Maximum-ratio combining uses weights proportional to the conjugate path estimates, , so stronger reliable paths contribute more.
Paths closer than roughly a chip may not be separately resolvable and instead distort the correlation peak. Paths from other symbols or codes contribute multiple-access and self-interference. “More fingers” is not automatically better: a weak finger with a poor channel estimate can add more noise than signal, and each finger needs delay and phase tracking.
Near–far limits code separation #
Suppose an unwanted user has received power times the desired user's power and its normalized cross-correlation magnitude at the active delay is . Its post-correlator interference power scales roughly as . A code with provides only 20 dB rejection in power; an interferer 30 dB stronger still emerges about 10 dB above the desired signal contribution before other processing.
This is the near–far problem. Uplink CDMA therefore needs tight power control, interference-aware scheduling, or multi-user detection. Downlink orthogonality is also damaged by multipath because delayed copies no longer share the same alignment.
Separate the four transformations #
| Transformation | Purpose | Receiver operation | Failure when misordered |
|---|---|---|---|
| channel coding | correct statistically likely errors/erasures | soft or hard decoder | burst structure and LLR meaning no longer match code assumptions |
| interleaving | spread bursts across codewords | deinterleave | decoder sees concentrated errors or wrong symbol order |
| spreading/channelization | create processing gain or aligned code channels | code correlation | no gain until exact phase/rate is known |
| scrambling/randomization | whiten spectrum or distinguish streams | inverse sequence operation | wrong state/code can look like noise despite correct timing |
The on-air order and receiver inverse order are protocol facts. CCSDS, for example, specifies attached sync markers, coding, and randomization with precise boundaries and sequence resets; 3GPP specifies separate spreading and scrambling stages. A correlator peak alone does not prove the subsequent inverse transformations are aligned.
Verification checklist #
- Generate the exact first chips from the specified polynomial, initial state, output tap, shift direction, bipolar mapping, and reset rule; compare them bit for bit.
- Plot normalized autocorrelation and all relevant cross-correlations over the full delay region, not only at zero lag.
- Sweep carrier offset and fractional-chip delay to measure coherent loss and acquisition-cell spacing.
- Record best peak, second-best peak, threshold, dwell count, code phase, frequency cell, and lock persistence.
- Test a strong asynchronous interferer and multipath delays on both sides of one-chip resolution.
- For OVSF allocation, reject ancestor/descendant conflicts programmatically and test dynamic reallocations.
- Verify the complete inversion order with one known frame before running random BER tests.
A spread-spectrum link is working only when it can acquire from the declared delay-frequency uncertainty, keep code phase through the declared dynamics, and meet error performance under the declared correlation and near–far conditions. A clean PN generator and a tall correlation peak are necessary evidence, not the whole proof.
Sources
- bookSystems for Transmission of Digital Informationpdfnotes
- docsUniversal Mobile Telecommunications System (UMTS): Spreading and Modulation (FDD), 3GPP TS 25.213 version 11.4.0
- docsTM Synchronization and Channel Coding, CCSDS 131.0-B-5pdfnotes
- docsMIT 6.441 Lecture 17: AWGN, Spreading and DS-CDMA