-
sdr.zadoff_chu_sequence(length: int, root: int, shift: int =
0
) NDArray[complex128] Generates the root-\(u\) Zadoff-Chu sequence of length \(N\).
- Parameters:¶
- length: int¶
The length \(N\) of the Zadoff-Chu sequence.
- root: int¶
The root \(0 < u < N\) of the Zadoff-Chu sequence. The root must be relatively prime to the length, i.e., \(\gcd(u, N) = 1\).
- shift: int =
0
¶ The shift \(q \in \mathbb{Z}\) of the Zadoff-Chu sequence. When \(q \ne 0\), the returned sequence is a cyclic shift of the root-\(u\) Zadoff-Chu sequence.
- Returns:¶
The root-\(u\) Zadoff-Chu sequence of length \(N\).
Notes
The root-\(u\) Zadoff-Chu sequence with length \(N\) and shift \(q\) is defined as
\[x_u[n] = \exp \left( -j \frac{\pi u n (n + c_{f} + 2q)}{N} \right) ,\]where \(c_{f} = N \mod 2\).
References
Examples
Create a root-3 Zadoff-Chu sequence \(x_3[n]\) with length 139.
In [1]: N = 139 In [2]: x3 = sdr.zadoff_chu_sequence(N, 3) In [3]: plt.figure(); \ ...: sdr.plot.constellation(x3, linestyle="-", linewidth=0.5); \ ...: plt.title(f"Root-3 Zadoff-Chu sequence of length {N}"); ...:
The periodic auto-correlation of a Zadoff-Chu sequence has sidelobes with magnitude 0.
In [4]: plt.figure(); \ ...: sdr.plot.correlation(x3, x3, mode="circular"); \ ...: plt.ylim(0, N); ...:
Create a root-5 Zadoff-Chu sequence \(x_5[n]\) with length 139.
In [5]: x5 = sdr.zadoff_chu_sequence(N, 5) In [6]: plt.figure(); \ ...: sdr.plot.constellation(x5, linestyle="-", linewidth=0.5); \ ...: plt.title(f"Root-5 Zadoff-Chu sequence of length {N}"); ...:
The periodic cross-correlation of two prime-length Zadoff-Chu sequences with different roots has sidelobes with magnitude \(1 / \sqrt{N}\).
In [7]: plt.figure(); \ ...: sdr.plot.correlation(x3, x5, mode="circular"); \ ...: plt.ylim(0, N); ...: