|
|
|||||||||||
|
This interactive tutorial visualizes Gold sequences, a family of deterministic binary pseudo-random sequences made by XORing two maximum-length sequences. Gold sequences are widely used in spread spectrum and cellular systems because they provide many code choices with bounded, predictable correlation behavior. Mathematical Foundation1. Maximum-Length SequencesA Gold sequence starts from two binary LFSR sequences, usually called a(n) and b(n). If the register length is m, each maximum-length sequence has period: N = 2m − 1
The simulator uses example LFSR tap sets for m = 5, 7, and 10. The exact bit pattern depends on the feedback taps and seed, but the key idea is the same: a deterministic shift register produces a random-looking periodic sequence. 2. Gold Sequence ConstructionA Gold code is generated by XORing one m-sequence with a cyclically shifted version of the other: gs(n) = a(n) ⊕ b((n + s) mod N)
Different values of s generate different members of the Gold family. Including the two original m-sequences, the family size is: Family size = 2m + 1
3. Correlation MeasurementCorrelation is usually evaluated with bipolar symbols, where bit 1 maps to +1 and bit 0 maps to −1: Rx,y(k) = ∑n=0N−1 X(n) Y((n + k) mod N)
A perfect match produces a large peak. Different Gold codes do not give zero correlation, but their cross-correlation is bounded compared with the match peak. 4. Timing Offset and CFO ImpairmentsIn the simulator, Gold bits can be mapped to either BPSK chips or a QPSK-like constellation. For BPSK, bit 1 maps to +1 and bit 0 maps to −1. For the QPSK-like option, adjacent Gold bits are mapped to I and Q: s(n) = [(2c(n) - 1) + j(2c(n+1) - 1)] / √2
A timing offset shifts the received sequence in samples: r(n) = X(n + τ)
This should move the correlation peak to a different cyclic-shift bin. CFO is modeled as a progressive phase rotation of the selected received constellation symbols: Δf = CFOppm × 10−6 × Fc
r(n) = X(n) exp(j 2π Δf n / Fs)
The receiver still correlates against a CFO-free reference, so the phase ramp reduces coherent correlation peak energy. 5. Strengths and Weaknesses
SimulationThe interactive simulator is below. Use the preset dropdown to jump between important properties and practical limitations. Bit Sequences
Periodic Correlation
Reference Constellation
Received Constellation
Gold: gs(n) = a(n) ⊕ b((n + s) mod N)
|
Correlation: R(k) = |∑ X(n) Y*((n + k) mod N)|
Preset Scenario
Sequence Parameters
5
5
0
Impairment and View
0
0.0 ppm (0 Hz, 0.000 cyc/N)
3500 MHz
7.68 MHz
0%
96
Period N
—
Family Size
—
Ones Ratio
—
Peak
—
Max Floor
—
Generated Gold A Bits
Usage
Visualizations
Key Insights
Limitations
|
|||||||||||