Web Simulation 

 

 

 

 

Spread Spectrum (CDMA) Visualizer 

This interactive tutorial visualizes a CDMA (Code Division Multiple Access) spread spectrum system: a narrow, low-rate data signal is transformed into a wide, noise-like signal by spreading with a Walsh-Hadamard code and Short PN scrambling, then reconstructed at the receiver by despreading, de-scrambling, and integrate-and-dump.

Signal chain

1. Data & modulation — A binary sequence (e.g. 101010) is mapped to baseband: 0 → −1, 1 → +1. BPSK uses one bit per symbol on the I-axis; QPSK uses bit pairs as I/Q symbols (same Walsh on both branches).

2. Spreading — Each symbol is multiplied by a 64-chip Walsh-Hadamard code (3GPP2/IS-95, SF=64) and then by a Short PN sequence. In QPSK, the I-branch uses the I-channel PN (15-bit LFSR) and the Q-branch uses the Q-channel PN (different polynomial per IS-95/CDMA2000), keeping the two channels decorrelated.

3. Pulse shaping (optional) — A Root-Raised Cosine (RRC) filter (roll-off α configurable) smooths chip edges into a band-limited waveform.

4. RF modulation — Baseband (or RRC-filtered) is up-converted: BPSK as x(t) cos(2π fc t); QPSK as I·cos − Q·sin.

5. ChannelAWGN is added (slider); optional Other Users add multi-user interference with different Walsh codes.

6. Receiver — Demodulation (I/Q for QPSK), matched filter (RRC), de-scrambling (× same I and Q PN), despreading (× same Walsh), then integrate & dump per symbol. Processing gain, BER, and Sync (Cell ID match) are displayed. Plots include Tx/Rx constellation, eye diagram (matched-filtered descrambled), and correlation peak for timing sync.

64-ary Walsh (3GPP2 C.S0002): User ID 0–63 selects the Walsh row. Cell ID and Receiver Cell ID set the Short PN offset (64 chips per ID). I- and Q-channel PN use different LFSR polynomials so the spectrum is flat and I/Q are independent.

 

Usage

Use the controls and scope panes to explore CDMA spreading, dual-PN scrambling, and reception:

  1. Data (0/1): Binary sequence (e.g. 101010). Non-binary characters are stripped. For QPSK, bits are taken in pairs as I/Q symbols.
  2. Modulation: BPSK (one bit per symbol on I) or QPSK (I and Q with separate PN scrambling per IS-95).
  3. User ID (Walsh 0–63): Walsh row for spreading. Receiver must use the same User ID and Cell ID.
  4. Cell ID / Receiver Cell ID: Short PN offset (64 chips per ID). Sync is OK when both match.
  5. Noise: Slider 0–1. Higher values add more AWGN; processing gain keeps the recovered bits reliable.
  6. Other Users: Number of interferers (different Walsh codes, same PN offset). Stresses multi-user performance.
  7. RRC filter / RRC α: Root-Raised Cosine pulse shaping. When on, spread chips are RRC-filtered; receiver applies matched filter (RRC) before descrambling.
  8. PN spread / Walsh: Toggle scrambling and spreading for comparison (e.g. “no spread” preset).
  9. Plots 1–14: Baseband data, PN spread, Walsh, spread signal, RF+noise, Tx constellation, RF spectrum (Tx/Rx), Rx constellation, descrambled signal, despread signal, integrator ramp, eye diagram (matched-filtered descrambled), correlation peak (sync).
  10. Stats: Processing gain (dB), BER, Sync (OK / No Sync). Clear Data and Preset (e.g. High Noise, Multi-User, Wrong Cell) quick-set scenarios.

Tip: In QPSK, raise noise to see the four clusters in the Rx constellation; use “Wrong Cell” to see loss of sync when Receiver Cell ID ≠ Cell ID.

Parameters

  • Data: Binary string. Default 101010. Mapped to ±1; QPSK uses bit pairs as I/Q.
  • Modulation: BPSK or QPSK. QPSK uses dual Short PN (I and Q polynomials) per IS-95/CDMA2000.
  • Noise level: AWGN scale. 0 = none; 1 = strong.
  • Other Users: 0–10 interferers with random I/Q symbols and different Walsh codes.
  • RRC filter: Root-Raised Cosine pulse shaping. α (roll-off) configurable (e.g. 0.35).
  • User ID: Walsh index 0–63 (SF=64). Cell ID / Receiver Cell ID: PN offset index (0–511, 64 chips per step).