Re-indexing the DFT (n and k) • We can investigate the various implementations of the DFT by looking at ways to re-index values of n and k. • Idea: • Using properties of addition and multiplication we can rewrite the equation. 𝑂−1 𝑦 𝑜 𝑓 −𝑘2𝜌𝑙𝑜/𝑂 = σ 𝑜=0 𝑂−1 𝑦 𝑜 𝑋 𝑙𝑜 𝑌 𝑙 = σ 𝑜=0 𝑂 • Notice that the sum of n from 0 to N-1 can take on any sequence as long as all the integer terms exist are included only once. • Furthermore, these terms can include kn+mN = W N multiples of N as W N kn . kn is replace with: • For these cases, W N kn mod N W N
Bluestein Chirp-z Transform • Rewrite the term kn as nk = n 2 /2 + k 2 /2 – (k-n) 2 /2 • Check = n 2 /2 + k 2 /2 – n 2 /2 - k 2 /2 + nk = nk • The term we are interested in is k-n. • Rewrite the term kn as 𝑂−1 𝑦 𝑜 𝑓 −𝑘2𝜌𝑙𝑜/𝑂 𝑌 𝑙 = σ 𝑜=0 𝑜 2 +𝑙 2 − 𝑙−𝑜 2 𝑂−1 𝑦 𝑜 𝑋 𝑌 𝑙 = σ 𝑜=0 2𝑂 𝑙 2 σ 𝑜=0 𝑜 2 𝑋 − 𝑙−𝑜 2 𝑂−1 𝑦 𝑜 𝑋 𝑌 𝑙 = 𝑋 2𝑂 2𝑂 2𝑂
Bluestein Chirp-z Transform • The interpretation of this equation. 𝑂−1 𝑙 2 𝑜 2 𝑋 − 𝑙−𝑜 2 𝑌 𝑙 = 𝑋 𝑦 𝑜 𝑋 2𝑂 2𝑂 2𝑂 𝑜=0 Pre-multiply by a chirp Convolution (FIR filter) k:[0:N-1], n:[0:N-1] FIR filter length [-(N-1):N-1]=2N-1 Post-Multiply by a chirp
Bluestein Chirp-z Transform 𝑂−1 𝑙 2 𝑜 2 𝑋 − 𝑙−𝑜 2 𝑌 𝑙 = 𝑋 𝑦 𝑜 𝑋 2𝑂 2𝑂 2𝑂 𝑜=0 Counter Counter CORDIC z -N freq phase 2N-1 Tap FIR 2 complex multipliers 8 Multipliers 4 adders 2N-1 tap complex filter. (2N-1)*4 Multipliers (2N-1)*2 Adders Take advantage of a symmetrical filter N*4 Multipliers (N-1) + N Adders ~= 2N Adders Latency 2*N
N-Point Complex DFT (even) ??? 0 : (from ROM) W N X[0] n-counter Data In Memory rst z -1 1 W N X[1] rst z -1 Data Out Memory ... N-1 W N In Parallel X[N-1] Adders: N*4. Multipliers: N*4. rst z -1 Registers: N. ena Latency: N. ???
Chirp-z Length 8 • Matlab Implementation
Chirp-z Length 16 sim
Chirp-z Length 16 sim
Chirp-z Length 16 sim
Chirp-z Length 128 sim
Chirp-z Length 128 sim
Prime Number Index Generator • For a prime number (p), we can use a generator (another prime g) to create a integer sequence that will contain each value in 1 to (p-1). • a = g α mod p (for α =0:N-2) • Example: p=7, g=3 • 3 0 mod 7 = 1 • 3 1 mod 7 = 3 • 3 2 mod 7 = 2 • 3 3 mod 7 = 6 • 3 4 mod 7 = 4 • 3 5 mod 7 = 5 • Let’s us complete a sum over an index with a substitution of variables that includes a exponent.
Rader Transform 𝑂−1 𝑦 𝑜 𝑓 −𝑘2𝜌𝑙𝑜/𝑂 𝑌 𝑙 = 𝑜=0 • Re-index n using the index generator 𝑙 𝑜 mod 𝑂 + 𝑦 0 𝑂−2 𝑦 𝑜 mod 𝑂 𝑋 𝑌 𝑙 = 𝑂 𝑜=0 • Mod N is essentially multiplying by 1. 𝑂−2 𝑙 𝑜 + 𝑦 0 𝑦 𝑜 mod 𝑂 𝑋 𝑌 𝑙 = 𝑂 𝑜=0
Rader Transform 𝑂−1 𝑦 𝑜 𝑓 −𝑘2𝜌𝑙𝑜/𝑂 𝑌 𝑙 = 𝑜=0 • Re-index k using the index generator 𝑂−2 𝑙 𝑜 + 𝑦 0 𝑦 𝑜 mod 𝑂 𝑋 𝑌 𝑙 = 𝑂 𝑜=0 𝑙 mod 𝑂 𝑜 𝑂−2 𝑌 𝑙 mod 𝑂 = 𝑦 𝑜 mod 𝑂 𝑋 + 𝑦 0 𝑂 𝑜=0 *Note: X[0] needs to be calculated directly. 𝑂−2 𝑙 𝑜 𝑛𝑝𝑒 𝑂 + 𝑦 0 𝑌 𝑙 mod 𝑂 = 𝑦 𝑜 mod 𝑂 𝑋 𝑂 𝑜=0 𝑂−2 𝑙+𝑜 𝑛𝑝𝑒 𝑂 + 𝑦 0 𝑌 𝑙 mod 𝑂 = 𝑦 𝑜 mod 𝑂 𝑋 𝑂 𝑜=0
Rader Transform: Interpretation 𝑂−2 𝑙+𝑜 + 𝑦 0 𝑌 𝑙 mod 𝑂 = 𝑦 𝑜 mod 𝑂 𝑋 𝑂 𝑜=0 • The k+n term can be seen as a correlation, which can be accomplished with an FIR filter. • Process: 1. Reorder x[n] using index generator. 2. Preform correlation with an FIR filter. 3. Directly add x[0]. 4. Put the order back. 5. X[0] is determined independently as sum(x[n]).
Matlab Simulation
simulation
simulation
More points: N=59, g=2
More points: N=59, g=2
Resources Utilization • Goertzel, Chirp-Z, and Rader. • All use similar resources and latencies. • Can be used in a serial or parallel architecture. • Perform the convolution in a point-by- point fashion. • Similar trades in resource vs latency.
DSN03 • Hints • Implement the routine in Matlab to generate intermediate values. • May not be exactly the same due to rounding errors. • Make matlab simulation as similar as possible. • Start small. • Get a single point working for a value of N=4. • Get all points working for small N. • Make use of simulation waveforms. • Set up the waveforms in a way that you can easily compare with expected results (matlab). • Save your simulation configuration so you don’t have to set up radix and analog ... Every time.
Recommend
More recommend