Re-indexing the DFT (n and k) We can investigate the various - - PowerPoint PPT Presentation

β–Ά
re indexing the dft n and k
SMART_READER_LITE
LIVE PREVIEW

Re-indexing the DFT (n and k) We can investigate the various - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

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. π‘Œ 𝑙 = Οƒπ‘œ=0

π‘‚βˆ’1 𝑦 π‘œ π‘“βˆ’π‘˜2πœŒπ‘™π‘œ/𝑂 = Οƒπ‘œ=0 π‘‚βˆ’1 𝑦 π‘œ 𝑋 𝑂 π‘™π‘œ

  • 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

multiples of N as WN

kn+mN = WN kn.

  • For these cases, WN

kn is replace with:

WN

kn mod N

slide-2
SLIDE 2

Bluestein Chirp-z Transform

  • Rewrite the term kn as

nk = n2/2 + k2/2 – (k-n)2/2

  • Check

= n2/2 + k2/2 – n2/2 - k2/2 + nk = nk

  • The term we are interested in is k-n.
  • Rewrite the term kn as

π‘Œ 𝑙 = Οƒπ‘œ=0

π‘‚βˆ’1 𝑦 π‘œ π‘“βˆ’π‘˜2πœŒπ‘™π‘œ/𝑂

π‘Œ 𝑙 = Οƒπ‘œ=0

π‘‚βˆ’1 𝑦 π‘œ 𝑋 2𝑂 π‘œ2+𝑙2βˆ’ π‘™βˆ’π‘œ 2

π‘Œ 𝑙 = 𝑋

2𝑂 𝑙2 Οƒπ‘œ=0 π‘‚βˆ’1 𝑦 π‘œ 𝑋 2𝑂 π‘œ2 𝑋 2𝑂 βˆ’ π‘™βˆ’π‘œ 2

slide-3
SLIDE 3

Bluestein Chirp-z Transform

  • The interpretation of this equation.

π‘Œ 𝑙 = 𝑋

2𝑂 𝑙2 ෍ π‘œ=0 π‘‚βˆ’1

𝑦 π‘œ 𝑋

2𝑂 π‘œ2 𝑋 2𝑂 βˆ’ π‘™βˆ’π‘œ 2

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

slide-4
SLIDE 4

Bluestein Chirp-z Transform

π‘Œ 𝑙 = 𝑋

2𝑂 𝑙2 ෍ π‘œ=0 π‘‚βˆ’1

𝑦 π‘œ 𝑋

2𝑂 π‘œ2 𝑋 2𝑂 βˆ’ π‘™βˆ’π‘œ 2

CORDIC z-N 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

Counter phase Counter freq

slide-5
SLIDE 5

N-Point Complex DFT (even)

z-1

WN

0: (from ROM)

X[0] In Parallel Adders: N*4. Multipliers: N*4. Registers: N. Latency: N.

z-1

WN

1

X[1]

z-1

WN

N-1

X[N-1] ...

n-counter

rst rst rst

Data In Memory Data Out Memory

??? ena ???

slide-6
SLIDE 6

Chirp-z Length 8

  • Matlab Implementation
slide-7
SLIDE 7

Chirp-z Length 16 sim

slide-8
SLIDE 8

Chirp-z Length 16 sim

slide-9
SLIDE 9

Chirp-z Length 16 sim

slide-10
SLIDE 10

Chirp-z Length 128 sim

slide-11
SLIDE 11

Chirp-z Length 128 sim

slide-12
SLIDE 12

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
  • 30 mod 7 = 1
  • 31 mod 7 = 3
  • 32 mod 7 = 2
  • 33 mod 7 = 6
  • 34 mod 7 = 4
  • 35 mod 7 = 5
  • Let’s us complete a sum over an index

with a substitution of variables that includes a exponent.

slide-13
SLIDE 13

Rader Transform

π‘Œ 𝑙 = ෍

π‘œ=0 π‘‚βˆ’1

𝑦 π‘œ π‘“βˆ’π‘˜2πœŒπ‘™π‘œ/𝑂

  • Re-index n using the index generator

π‘Œ 𝑙 = ෍

π‘œ=0 π‘‚βˆ’2

𝑦 π‘•π‘œ mod 𝑂 𝑋

𝑂 𝑙 π‘•π‘œ mod 𝑂 + 𝑦 0

  • Mod N is essentially multiplying by 1.

π‘Œ 𝑙 = ෍

π‘œ=0 π‘‚βˆ’2

𝑦 π‘•π‘œ mod 𝑂 𝑋

𝑂 π‘™π‘•π‘œ + 𝑦 0

slide-14
SLIDE 14

Rader Transform

π‘Œ 𝑙 = ෍

π‘œ=0 π‘‚βˆ’1

𝑦 π‘œ π‘“βˆ’π‘˜2πœŒπ‘™π‘œ/𝑂

  • Re-index k using the index generator

π‘Œ 𝑙 = ෍

π‘œ=0 π‘‚βˆ’2

𝑦 π‘•π‘œ mod 𝑂 𝑋

𝑂 π‘™π‘•π‘œ + 𝑦 0

π‘Œ 𝑕𝑙 mod 𝑂 = ෍

π‘œ=0 π‘‚βˆ’2

𝑦 π‘•π‘œ mod 𝑂 𝑋

𝑂 𝑕𝑙 mod 𝑂 π‘•π‘œ

+ 𝑦 0 *Note: X[0] needs to be calculated directly. π‘Œ 𝑕𝑙 mod 𝑂 = ෍

π‘œ=0 π‘‚βˆ’2

𝑦 π‘•π‘œ mod 𝑂 𝑋

𝑂 π‘•π‘™π‘•π‘œ 𝑛𝑝𝑒 𝑂 + 𝑦 0

π‘Œ 𝑕𝑙 mod 𝑂 = ෍

π‘œ=0 π‘‚βˆ’2

𝑦 π‘•π‘œ mod 𝑂 𝑋

𝑂 𝑕𝑙+π‘œ 𝑛𝑝𝑒 𝑂 + 𝑦 0

slide-15
SLIDE 15

Rader Transform: Interpretation

π‘Œ 𝑕𝑙 mod 𝑂 = ෍

π‘œ=0 π‘‚βˆ’2

𝑦 π‘•π‘œ 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]).
slide-16
SLIDE 16

Matlab Simulation

slide-17
SLIDE 17

simulation

slide-18
SLIDE 18

simulation

slide-19
SLIDE 19

More points: N=59, g=2

slide-20
SLIDE 20

More points: N=59, g=2

slide-21
SLIDE 21

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.
slide-22
SLIDE 22

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.