Web Simulation 

 

 

 

 

Zadoff-Chu Sequence Visualizer 

This interactive tutorial visualizes the Zadoff-Chu (ZC) sequence, a Constant Amplitude Zero Auto-Correlation (CAZAC) waveform that is fundamental to LTE and 5G NR physical-layer design. You can explore how the root index, cyclic shift, carrier frequency offset (CFO), and noise affect the constellation pattern and correlation properties.

Mathematical Foundation

1. Zadoff-Chu Sequence Definition

For a prime length N and root index u (1 ≤ u < N), the Zadoff-Chu sequence is defined as:

xu(n) = exp(−j π u n(n+1) / N)   for n = 0, 1, …, N−1

Each sample is a complex number on the unit circle: the amplitude |xu(n)| = 1 for all n. The quadratic phase progression gives the sequence its unique correlation properties.

2. Key Properties (CAZAC)

Constant Amplitude

|xu(n)| = 1 for all n. All points lie on the unit circle in the complex plane.

Zero Auto-Correlation

The cyclic auto-correlation is a perfect delta: R(k) = N δ(k). The correlation peak at k=0 equals N; all other shifts yield zero.

Low Cross-Correlation

For two roots u1u2 (with N prime), the cross-correlation magnitude is constant at √N for all shifts.

DFT Property

The DFT of a ZC sequence is another ZC sequence (with a different root). This self-similarity makes it efficient for both time and frequency domain processing.

3. Cyclic Correlation Formula

The cyclic correlation of sequence xa with xb at shift k is:

Ra,b(k) = ∑n=0N−1 xa(n) · xb*((n+k) mod N)

where * denotes complex conjugation. When a = b (auto-correlation), the result is a delta function of height N at k = 0.

4. Channel Impairment Simulation

In a real wireless channel, the received signal is corrupted by Additive White Gaussian Noise (AWGN):

r(n) = x(n) + w(n),   w(n) ~ CN(0, σ²)

where σ = 10−SNRdB/20. Even when the signal-to-noise ratio is very low (SNR < 0 dB) and the constellation looks like random noise, the correlation peak still emerges because correlation integrates over all N samples, providing a processing gain of:

Processing Gain = 10 log10(N) dB

A carrier frequency offset is modeled as a progressive phase rotation across the received sequence. The UI expresses oscillator error in ppm and converts it into Hz from the carrier frequency:

Δf = CFOppm × 10−6 × Fc
r(n) = x(n) exp(j 2π Δf n / Fs) + w(n)

CFO does not scatter samples randomly; it bends the phase trajectory and reduces coherent correlation, lowering the peak and raising apparent sidelobes. The same ppm value has a stronger baseband effect at higher carrier frequency or lower sample rate.

This is why ZC sequences are used for the PRACH (Physical Random Access Channel) in LTE/5G — they can detect a user's preamble buried deep in noise.

5. Use in LTE / 5G NR
  • PRACH Preamble: Each cell selects a root index u. Different users within the cell use different cyclic shifts of the same root. The base station detects which shift was sent by finding the correlation peak position.
  • Timing Estimation: The position of the correlation peak reveals the round-trip delay between the UE and the base station.
  • Cell ID Detection: Different cells use different root indices. Because cross-correlation is flat and low (√N / N relative to peak), signals from neighboring cells do not cause false peaks.

Simulation

The interactive simulator is below. Use the controls to explore the concepts described above.

Constellation (Complex Plane)
Correlation Magnitude — Auto-Correlation
ZC Formula:xu(n) = exp(−jπ u n(n+1) / N)   |   Correlation:R(k) = ∑ xa(n) · xb*((n+k) mod N)
Preset Scenario
Custom: Adjust the sliders directly. Use the presets to jump to common ZC strengths and impairment-sensitive cases.
Sequence Parameters
(prime)
1
3
0
Channel (CFO + AWGN Noise)
0.0 ppm (0 Hz, 0.000 cyc/N)
3500 MHz
30.72 MHz
20 dB
Peak |R|
Peak Shift
Avg Floor
Peak/Floor
Proc. Gain
Detection:

How to read this: The left canvas shows the ZC sequence(s) on the complex plane. u₁ (inner ring, blue→red gradient) is the reference; u₂ (outer ring, green→red gradient) is the received signal. The thick long arm marks each sequence’s start element (index 0). When you apply a cyclic shift, the outer ring’s color pattern and start marker rotate.

Auto-Correlation (u₁ = u₂): Expect a perfect delta peak at k = cyclic shift value, with all other shifts at zero. This is the “CAZAC” property.
Cross-Correlation (u₁ ≠ u₂): The correlation is flat at √N, meaning no shift stands out — different roots don’t interfere.
CFO: Move CFO away from zero and watch the received sequence acquire a progressive phase rotation. The peak usually drops because the receiver is correlating with a reference that has no CFO.
Noise Robustness: Lower SNR and watch the constellation scatter into a cloud while the correlation peak remains detectable. This is the processing gain (= 10 log10(N) dB) that makes ZC ideal for random access in 5G.

 

Usage

Use the controls to explore the properties of Zadoff-Chu sequences:

  1. Preset Scenario: Select a prepared case to demonstrate a ZC strength such as auto-correlation, timing detection, cross-correlation, or noise robustness, or a weakness such as CFO sensitivity or short-sequence processing gain.
  2. Sequence Length (N): Choose a prime number. Larger N gives more cyclic shifts and higher processing gain, but computation is heavier.
  3. Root u₁ and u₂: Two root indices for the ZC sequences. When u₁ = u₂, the correlation view shows auto-correlation (a sharp delta peak). When u₁ ≠ u₂, it shows cross-correlation (a flat noise floor at √N).
  4. Cyclic Shift: Cyclically shifts sequence u₂ by k positions. In auto-correlation mode, the peak moves to position k — this is how a base station estimates timing.
  5. CFO: Applies oscillator error in ppm. The simulator converts ppm to frequency offset using the carrier frequency, then converts that offset into phase rotation per sample using the sample rate.
  6. Carrier Fc and Sample Fs: Define the ppm-to-baseband conversion. For example, 1 ppm at 3500 MHz is 3.5 kHz CFO; the phase increment per sample depends on Fs.
  7. SNR (dB): Controls the noise power when AWGN is enabled. At high SNR (+20 dB), the constellation is clean. At low SNR (−10 dB), the signal is buried in noise.
  8. Noise: ON/OFF: Toggles additive Gaussian noise on the received sequence (ON by default). When ON, the constellation “cloud” becomes visible and each “Re-sample Noise” click draws a new realization.
  9. Sync u₂ = u₁: Sets u₂ equal to u₁ and resets shift to 0 so you can see the perfect auto-correlation delta.

Visualizations

  • Inner ring (blue→red gradient): Sequence u₁ — the fixed reference stored at the base station. Color gradient runs from blue (index 0) to red (index N−1). The thick long arm marks the start element.
  • Outer ring (green→red gradient): Sequence u₂ — the received signal after cyclic shift and CFO. The color gradient shifts with the Cyclic Shift slider, and CFO progressively rotates later samples around the circle.
  • Noisy cloud: When noise is ON, faint colored dots show the received (noisy) samples scattered around the unit circle, using the same shift-aware gradient.
  • Correlation bar chart: The magnitude |R(k)| for each cyclic shift k. A tall single bar = detection. A flat distribution = no match.

Summary Panel

  • Peak |R|: The maximum correlation magnitude (ideally N for auto-correlation).
  • Peak Shift: The k value where the peak occurs (should match the cyclic shift setting in auto-correlation mode).
  • Avg Floor: The average correlation magnitude excluding the peak. Near 0 for auto-correlation, near √N for cross-correlation.
  • Peak/Floor: The ratio of peak to floor — a measure of detectability.
  • Proc. Gain: Processing gain = 10 log10(N) dB. Only shown when noise is active.

Key Insights

  • The “Magic” of the Unit Circle: Every ZC sample has magnitude 1, so all points must lie exactly on the circle. If they scatter inward without noise, the math is wrong.
  • Noise Robustness: Lower SNR to −5 dB. The constellation becomes an unrecognizable cloud, but the correlation peak still stands out. This is the processing gain at work.
  • CFO Sensitivity: Increase CFO with noise off and u₂ synced to u₁. The points remain on the unit circle, but coherent correlation degrades because each sample has a different phase error. A large ppm range is provided so the effect is visible on short teaching sequences.
  • Cross-Correlation Floor: When u₁ ≠ u₂, the correlation bars are all about the same height (√N). No shift stands out — the sequences are “orthogonal enough” for multiple users.
  • Timing from Shift: In auto-correlation mode, moving the cyclic shift slider moves the peak. In 5G PRACH, the base station detects which shift the phone used to determine round-trip delay.

Limitations

  • Ideal CAZAC properties assume prime N. Perfect zero auto-correlation and the flat √N cross-correlation hold for prime sequence length; for non-prime N (and the length restrictions of real LTE/NR allocations) the properties degrade and are not fully modeled.
  • Simplified channel. The channel adds white Gaussian noise and a ppm-derived CFO phase ramp. Multipath fading, Doppler spread, timing-offset search, sample clock offset, and power-delay profiles — all of which affect real PRACH detection — are not simulated.
  • Correlation-only receiver. Detection is by ideal cyclic correlation against a known root; real receivers must search over roots, cyclic shifts, and timing hypotheses with thresholds and false-alarm trade-offs.
  • Baseband, single sequence. One sequence (or a pair for cross-correlation) is shown at baseband; pulse shaping, RF up/down-conversion, multi-user superposition, and guard intervals are out of scope.
  • Idealized arithmetic. Samples are full-precision complex numbers with no quantization or hardware effects; the constellation always sits exactly on the unit circle absent noise.
  • Teaching tool. Built to make the CAZAC properties, processing gain, and PRACH timing/cell-ID role of Zadoff-Chu sequences tangible — not a PRACH receiver or link-level model.