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, 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. AWGN Channel 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

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.
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)
Sequence Parameters
(prime)
1
3
0
Channel (AWGN Noise)
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.
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. Sequence Length (N): Choose a prime number. Larger N gives more cyclic shifts and higher processing gain, but computation is heavier.
  2. 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).
  3. 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.
  4. 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.
  5. 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.
  6. 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. The color gradient shifts with the Cyclic Shift slider, and the thick arm moves to show the new start position.
  • 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.
  • 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.