ECE-600
Phil Schniter
January 31, 2011
The Discrete Fourier Transform (DFT): • The DFT is a computational tool used to analyze the frequency content of finite-length discrete-time signals. • Our DFT discussion will include: 1. definitions of the DFT and IDFT, 2. interpretations of the DFT: (a) sampled DTFT, (b) discrete Fourier series, 3. properties of the DFT, including circular convolution, 4. use of DFT for spectral analysis, 5. fast computation of the DFT via the FFT, 6. matrix/vector formulations.
1
ECE-600
Phil Schniter
January 31, 2011
DFT definitions: −1 • For an N -length signal {x[n]}N n=0 , the N -point DFT is
X[k] =
N −1 X
x[n]e
kn −j 2π N
,
k = 0 . . . N −1
n=0
and the corresponding IDFT is N −1 1 X j 2π X[k]e N kn , x[n] = N k=0
n = 0 . . . N −1.
• Note: – the signal has finite duration N , – there are only N DFT coefficients.
2
ECE-600
Phil Schniter
January 31, 2011
DFT Interpretation # 1 — sampled DTFT: Say signal x[n] has duration N . Then ∞ X
X(ejω ) =
x[n]e−jωn =
n=−∞
N −1 X
x[n]e−jωn .
n=0
Meanwhile, X[k] =
N −1 X
x[n]e
kn −j 2π N
= X(e ) ω= 2π k jω
N
n=0
for k = 0 . . . N −1.
Thus, the DFT returns
2π -spaced N
samples of the DTFT.
x[n]
Example for N = 8: 2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 0
2
n
4
8 7 6 5 4 3 2 1 0 0
6
X(ejω ) X[k]
2
4
ω
3
6
ECE-600
Phil Schniter
January 31, 2011
The DFT and zero-padding: Again, say x[n] has duration N . The M -length “zero-padded” signal x[n] n = 0 . . . N −1 x˜[n] , 0 n = N . . . M −1 has the M -point DFT ˜ X[k] =
M −1 X
x˜[n]e
kn −j 2π M
=
N −1 X
x[n]e
−j 2π kn M
n=0
n=0
= X(ejω )|ω= 2π k . M
Thus, zero-padding increases the rate at which the DFT samples the DTFT! 8
|X(ejω )|
x[n]
2 1 0
0
1
2
3
n
4
5
6
2 0
1
2
3
4
5
6
4
5
6
ω 8
˜ jω )| |X(e
x˜[n]
4 0
7
2 1 0
6
0
5
10
15
n
20
25
6 4 2 0
30
0
1
2
3
ω
4
ECE-600
Phil Schniter
January 31, 2011
DTFT sampling and time-domain aliasing: • Previously we saw that, when the time-domain sampling rate (in samp/sec) is too small with respect to the signal bandwidth (in Hz), frequency-domain aliasing results. Wide bandwidth ⇔ quick time variations. • Now we will see that, when the frequency-domain sampling rate (in samp/Hz) is too slow with respect to the signal duration (in sec), time-domain aliasing results. Long duration ⇔ quick frequency variations. • Say we’re given Y [k] , X(ejω )|ω= 2π k for k = 0 . . . N −1, N
DTFT
where X(ejω ) ←→ x[n] for some x[n] of generic length. 1. If x[n] was length-N , then Y [k] = X[k] since the DFT
2π -samples N
the DTFT.
In this case, we can recover {x[n]} from {Y [k]} via N −1 −1 −1 {x[n]}N n=0 = FN -DFT {Y [k]}k=0 .
2. If x[n] was not length-N , then can we still recover N −1 −1 {x[n]}n=0 from the N DTFT samples {Y [k]}N n=0 ?
5
ECE-600
Phil Schniter
January 31, 2011
−1 An IDFT of {Y [k]}N n=0 yields N −1 2π 1 X Y [k]ej N kn , y[n] , N k=0
n = 0 . . . N −1
N −1 2π 2π 1 X = X(ej N k )ej N kn N k=0 N −1 X ∞ X 2π 2π 1 = x[m]e−j N km ej N kn N k=0 m=−∞
N −1 1 X −j 2π k(m−n) e N = x[m] N k=0 m=−∞ | {z } n 1 if n−m = . . . 0, N, 2N . . . δ[hn−miN ] = 0 else ∞ X
=
∞ X
x[n − qN ],
n = 0 . . . N −1.
q=−∞
..
.
x[n − N ] n
y[n]
x[n]
··· n
0
N −1
x[n + N ] ..
(N = 3)
n . 6
··· n
ECE-600
Phil Schniter
January 31, 2011
DFT Interpretation #2 — discrete-time FS: Say x˜(t) is periodic with P -second period, and x(t) contains only the first period of x˜(t). Then, from Fourier series, ∞
1 X j 2π P Xk e P kt , t ∈ [0, P ) x(t) = P k=−∞ Z P kt −j 2π P Xk = x(t)e P dt = Xc (jΩ) Ω= 2π k P
0
Say x˜[n] is periodic with N -sample period, and x[n] contains only the first period of x˜[n]. Then, from the DFT, N −1 2π 1 X x[n] = X[k]ej N kn , N k=0
X[k] =
N −1 X
x[n]e
kn −j 2π N
n = 0 . . . N −1
= X(e ) ω= 2π k jω
N
n=0
−1 Thus, one could interpret the DFT coefficients {X[k]}N k=0 as the coefficients of a “discrete-time Fourier series.”
x[n]
n x˜[n] ...
...
n 7
ECE-600
Phil Schniter
January 31, 2011
DFT of sampled periodic signals: Now say that x[n] is sampled from x(t) on the previous page P ). Then using N samples per period, i.e., x[n] = x(n N x[n] =
P ) x(n N
=
∞ X
Xk e
P kn N j 2π P
(from FS expansion)
k=−∞ ∞ 2π 1 X N Xk ej N kn = N k=−∞
1 = N
N −1 X m=0
∞ X
N Xm+lN
l=−∞
!
e
j 2π mn N
via k = m + lN for m = 0 . . . N −1 and l ∈ Z. This implies that the DFT coefficients are related to the CT-FS coefficients as follows: X[m] = N
∞ X
Xm+lN ,
for m = 0 . . . N −1.
l=−∞
Under what conditions do the CT-FS coefficients lead to aliasing? When Xk 6= 0 for k ≥ N (i.e., bandwidth too large).
8
ECE-600
Phil Schniter
January 31, 2011
Circular Convolution: What results from multiplying two N -point DFTs? N −1 X
X[k]W [k] =
x[m]e
mk −j 2π N
m=0
N −1 X
=
N −1 X
w[l]e
lk −j 2π N
l=0
x[m]
m=0
N −1 X
w[l]e
−j 2π (m+l)k N
.
l=0
Using the substitution l = hn − miN = n − m + qN for some q ∈ Z we get X[k]W [k]
=
N −1 X m=0
= N -DFT
n=0
N −1 N −1 X X n=0
←→
x[m]
N −1 X
N −1 X
w[hn − miN ] |e
(m+n−m+qN )k −j 2π N
e
x[m]w[hn − miN ] e
m=0
{z
−j 2π nk N
−j 2π nk N
x[m]w[hn − miN ] , x[n] ○ N w[n]
m=0
known as “N -circular convolution.”
9
}
ECE-600
Phil Schniter
January 31, 2011
Circular Convolution (cont.): Linear convolution:
∞ X
y[n] =
x[m]w[n − m]:
m=−∞
flip and slide (linearly). . . =
∗
N -circular convolution:
y[n] =
N −1 X
x[m]w[hn − miN ]:
m=0
flip and slide (cyclically). . . 0
○ N
N −1
N −1 0
=
or cyclically extend, flip, and slide (linearly). . . =
y[n] =
∞ X
x[hmiN ]w[n − m]
m=−∞
(Assume finite-length {w[m]} is zero-extended in last equation.) 10
ECE-600
Phil Schniter
January 31, 2011
Circular Convolution — Examples: 1. Consider [1, 2, 3] ○ N [2, −1, 1] for N = 3: 1 2 3 1 2 3 1 2 3 out: 1 −1 2 1 6 1 −1 2 1 −1 2 5 1 −1 2 1 1 −1 2 6 1 −1 2 5 .. .. . .
2. Now consider [1, 2, 3] ○ N [2, −1, 1] for N = 5, or, equivalently, [1, 2, 3, 0, 0] ○ N [2, −1, 1, 0, 0] for N = 5: 1 2 3 0 0 1 2 3 0 0 out: 0 0 1 −1 2 2 0 0 1 −1 2 3 5 0 0 1 −1 2 −1 0 0 1 −1 2 0 0 1 −1 2 3 .. .. . .
11
ECE-600
Phil Schniter
January 31, 2011
The DFT — important properties: N -DFT
N -DFT
Here, x[n] ←→ X[k], w[n] ←→ W [k], and n, k = 0 . . . N −1. 1. Linearity: N -DFT
αx[n] + βw[n] ←→ αX[k] + βW [k] 2. Conjugate symmetry: x∗ [n] = x[h−niN ] ⇔ X[k] ∈ R x[n] ∈ R ⇔ X ∗ [k] = X[h−kiN ] 3. Shift/modulation: N -DFT
2π
x[hn − diN ] ←→ e−j N kd X[k], d ∈ Z e 4. Reversal:
j 2π nd N
N -DFT
x[n] ←→ X[hk − diN ], d ∈ Z N -DFT
x[h−niN ] ←→ X[h−kiN ]
5. Multiplication/convolution:
N −1 1 X X[l]W [hk − liN ] x[n]w[n] ←→ N l=0 N -DFT
N −1 X
N -DFT
x[m]w[hn − miN ] ←→ X[k]W [k]
m=0
6. Energy conservation (“Parseval’s theorem”): N −1 N −1 X X 1 |X[k]|2 |x[n]|2 = N k=0 n=0 12
ECE-600
Phil Schniter
January 31, 2011
Working with modulo indices: • Many DFT properties involve modulo-N indices! • Main idea: hmiN = m + qN for integer q (in fact m q = −⌊ N ⌋, but the exact value will not matter). Recall circular convolution example (p. ??). Here’s another. . . N -DFT
• Proof of x[h−niN ] ←→ X[h−kiN ]: N -DFT
x[h−niN ] ←→
=
N −1 X
−j 2π nk N
x[ h−niN ]e | {z } n=0 −n + qN , m N −1 X 2π x[m]e−j N (qN −m)k
for integer q
same sum!
m=0
=
N −1 X
x[m]e
m(−k) −j 2π N
m=0
Can’t write “X[−k]” because DFT is only defined for k = 0 . . . N −1! Instead, h−kiN = −k + rN for r ∈ Z: N −1 X −j 2π = x[m]e N m(h−kiN −rN ) for integer r m=0
= X[h−kiN ] • Example: n : −5 x[n] : x[−n] : x[h−ni5 ] :
−4 −3 −2 −1 0 0 0 0 0 0 e d c b a e d c b
13
0 a a a
1 b 0 e
2 c 0 d
3 d 0 c
4 e 0 b
5 0 0 a
ECE-600
Phil Schniter
January 31, 2011
Spectral Analysis: x[n]
1 -Hz 2T
x(t)
LPF
Goal: Method: Questions:
t = nT
M -length window {w[n]}
y[n]
N -length DFT
Y [k]
Determine frequency components in x(t). Sample, buffer, window, transform to freq. How to choose M , {w[n]}, and N ? How to interpret DFT outputs {Y [k]}?
Recall key relationships: X(ejω ) = Y (ejω ) =
ω 1 X (j ), c T T Z π
1 2π
ω ∈ [−π, π)
(no aliasing)
X(ejξ )W (ej(ω−ξ) )dξ
(y[n] = x[n]w[n])
−π
Y [k] = Y (e
j 2π k N
)
(if N ≥ M ) complex sinusoid at ω =0.32, M=16, N=32
Example:
dB magnitude
0
25 20 15 10 5 0 −5 −10 −15 −20 −25
DTFT DFT
−3
−2
−1
14
0
ω
1
2
3
ECE-600
Phil Schniter
January 31, 2011
Spectral Analysis (cont.): Suppose our signal is a sum of L complex sinusoids: L X al ejΩl t for |Ωl | < Tπ . x(t) = l=1
Then, using the relationships from the previous page, L X Xc (jΩ) = 2π al δ(Ω − Ωl ) l=1 L
2π X jω al δ( Tω − Ωl ) for ω ∈ [−π, π) X(e ) = T l=1 Z πX L 1 Y (ejω ) = al δ( Tξ − Ωl )W (ej(ω−ξ) )dξ T −π l=1 Z π/T L X = δ(θ − Ωl )W (ej(ω−θT ) )dθ via θ = al l=1
=
L X
−π/T
ξ T
al W (ej(ω−Ωl T ) )
l=1
. . . a sum of scaled and shifted window-DTFTs! Finally, L X j( 2π Y [k] = al W (e N k−Ωl T ) ) l=1
So we expect a DFT peak near k = 15
Ωl T N 2π
for each l = 1...L.
ECE-600
Phil Schniter
January 31, 2011
Effects of finite data-length: When L > 1, the DFT peaks may not be where we expect! There are two main reasons for this: 1. Leakage: The energy at ωl = Ωl T gets spread over all ω ∈ [−π, π] through the window’s sidelobes. complex sinusoid: ω1=2, a1 = 1, M=16
dB
20 0
dB
Weak sinusoids get buried!
dB
−20 −3
−2 −1 0 1 2 complex sinusoid: ω2=−2, a2 = 0.05, M=16
3
−3
−2
−1 0 1 summed signal, M=16
2
3
−3
−2
−1
2
3
0 −20 −40
20 0 −20 0
ω
1
2. Limited Resolution: The energy at ωl = Ωl T gets spread broadly over the window’s main-lobe.
dB dB
Closely spaced sinusoids become indistinguishable!
dB
complex sinusoid: ω1=−0.23, M=16 20 10 0 −10
20 10 0 −10
20 10 0 −10
−3
−2
−1 0 1 complex sinusoid: ω2=0.23, M=16
2
3
−3
−2
−1 0 1 summed signal, M=16
2
3
−3
−2
−1
2
3
0
ω
1
Can trade between leakage & resolution via choice of window. 16
ECE-600
Phil Schniter
January 31, 2011
Rectangular window: Recall that, for an M -length rectangular window, we saw sin(ωM/2) −jω(M −1)/2 W (e ) = e . sin(ω/2) jω
So, in time- and frequency-domain, this window looks like: rectangular window, M=32 1 0.8 0.6 0.4 0.2 0
0
5
10
15
20
25
30
DTFT magnitude
peak sidelobes @ −13dB
0 peak sidelobe=−13dB
−6dB width=1.2x2π/M
−20
dB
−40 −60 −80 −100 −3
−2
−1
0
ω
1
2
3
resolution ≈ 1.2 × 2π M
where “resolution” means “−6 dB bandwidth” and approximates the minimum spacing between recognizable sinusoids (of equal amplitude).
17
ECE-600
Phil Schniter
January 31, 2011
Bartlett window: Bartlett window, M=32 1 0.8 0.6 0.4 0.2 0
0
5
10
15
20
25
30
DTFT magnitude
peak sidelobes @ −26dB
0 −6dB width=1.8x2π/M −20
peak sidelobe=−26dB
dB
−40 −60 −80 −100 −3
−2
−1
0
1
ω
2
3
resolution ≈ 1.8 × 2π M
Triangular window: triangular window, M=32 1
improved: edge points are not zero-valued!
0.8 0.6 0.4 0.2 0
0
5
10
15
20
25
30
DTFT magnitude
peak sidelobes @ −27dB
0 −6dB width=1.8x2π/M −20
peak sidelobe=−27dB
dB
−40 −60 −80 −100 −3
−2
−1
0
ω
1
2
18
3
resolution ≈ 1.8 × 2π M
ECE-600
Phil Schniter
January 31, 2011
Hann window: Hann window, M=32 1 0.8
w[n] = 1 2π 1 2 − 2 cos( M n)
0.6 0.4 0.2 0
0
5
10
15
20
25
30
DTFT magnitude
peak sidelobes @ −31dB
0 −6dB width=2.1x2π/M −20
peak sidelobe=−31dB
dB
−40 −60 −80 −100 −3
−2
−1
0
1
ω
2
3
resolution ≈ 2.1 × 2π M
Hamming window: Hamming window, M=32 1 0.8
w[n] = 0.538 − 0.462 cos( 2π M n)
0.6 0.4 0.2 0
0
5
10
15
20
25
30
DTFT magnitude
peak sidelobes @ −42dB
0 −6dB width=1.9x2π/M −20
dB
−40
peak sidelobe=−42dB
−60 −80 −100 −3
−2
−1
0
ω
1
2
19
3
resolution ≈ 1.9 × 2π M
ECE-600
Phil Schniter
January 31, 2011
Blackman window: Blackman window, M=32 1
w[n] = 0.42 − 1 2π 2 cos( M n) + 0.08 cos( 4π M n)
0.8 0.6 0.4 0.2 0
0
5
10
15
20
25
30
DTFT magnitude
peak sidelobes @ −58dB
0 −6dB width=2.4x2π/M −20
dB
−40 peak sidelobe=−58dB −60 −80 −100 −3
−2
−1
0
1
ω
2
3
resolution ≈ 2.4 × 2π M
Blackman-harris window: Blackman−harris window, M=32 1 0.8 0.6
optimized 4-term
0.4 0.2 0
0
5
10
15
20
25
30
DTFT magnitude
peak sidelobes @ −92dB
0 −6dB width=2.7x2π/M −20
dB
−40 −60 −80
peak sidelobe=−92dB
−100 −3
−2
−1
0
ω
1
2
20
3
resolution ≈ 2.7 × 2π M
ECE-600
Phil Schniter
January 31, 2011
Kaiser window: Has adjustable parameter β. For peak sidelobe level −SdB , 0 β = 0.76609(SdB − 13.26)0.4 + 0.09834(SdB − 13.26) 0.12438(SdB + 6.3)
SdB ≤ 13.26 13.26 < SdB ≤ 60 60 < SdB ≤ 120
For example, SdB = 57 gives β = 8.03 and, when M = 32, Kaiser window, beta=8.03, M=32 1 0.8
based on modified Bessel function
0.6 0.4 0.2 0
0
5
10
15
20
25
30
DTFT magnitude
peak sidelobes @ −58dB
0 −6dB width=2.3x2π/M −20
dB
−40 peak sidelobe=−58dB −60 −80 −100 −3
−2
−1
0
ω
1
2
3
resolution ≈ 2.3 × 2π M
which is very similar (and slightly better) than Blackman. The approximate tradeoff between peak sidelobe level −SdB and −6dB mainlobe width ∆ω (in rad/sample) is given by 2 2π )M . ∆ω ≈ 0.029(29 − SdB − 0.003 SdB
21
ECE-600
Phil Schniter
January 31, 2011
Spectral analysis example: • Real sines at 30 Hz & 32 Hz,
1 T
= 120 Hz. (∆ω =
2×2π ) 120
• Recall: M -length data, N -length DFT. • Rectangular window: resolution
1.2×2π M
DFT magnitude
M=80, N=80
M=80, N=160
1
1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0 0
1
ω
2
0 0
3
M=80, N=2048 1
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2 1
ω
2
1
ω
2
3
M=70, N=2048
1
0 0
(⇒ M > 72).
0 0
3
1
ω
2
• In general: Need DFT length N ≥ 2M , but prefer N ≫ 2M . 22
3
ECE-600
Phil Schniter
January 31, 2011
The fast Fourier transform (FFT): • A family of algorithms to quickly compute the DFT. • Recall that the N -DFT X[k] =
N −1 X
x[n]e
kn −j 2π N
n=0
consumes N (complex-valued) multiplications per output, and thus N 2 multiplications total. • We will describe the so-called “radix-2 decimate-in-time” FFT, which works when N is power-of-two, and consumes approximately N2 log2 N multiplications. 5
x 10 10
number of multiplies
9
DFT FFT
8 7 6 5 4 3 2 1 0 0
200
400
600
800
1000
N
When N is large, this is much cheaper than the DFT!
23
ECE-600
Phil Schniter
January 31, 2011
The radix-2 FFT: Notice that X[k] =
N −1 X
2π
x[n]WNkn
for WNkn , e−j N kn
n=0
=
X
x[n]WNkn
X
x[2m]WNk2m
n even
X
+
n odd
N/2−1
=
x[n]WNkn
N/2−1
+
m=0
X
k(2m+1)
x[2m + 1]WN
m=0
q and WNq+p = WNq WNp , we can write Because WN2q = WN/2 N/2−1
X[k] =
X
|m=0
N/2−1 km x[2m]WN/2
{z , G[k]
+WNk
}
X
|m=0
km x[2m + 1]WN/2
{z , H[k]
}
Note: G[k] is an N2 -DFT of the even samples, and H[k] is an N -DFT of the odd samples. 2
24
ECE-600
Phil Schniter
January 31, 2011
The radix-2 FFT (cont.): • The final processing stage can be simplified from N mults to N2 mults because the following are equivalent:
• Let’s examine the complexity of this split-in-half method: – direct N -DFT: N 2 mults, – split-in-half: ( N2 )2 + ( N2 )2 +
N 2
= 21 (N 2 + N ) mults,
Since 21 (N 2 + N ) < N 2 for any N ≥ 1, it pays to split! • Thus, we split each N2 -DFT into two N4 -DFTs (combining their outputs using twiddle factors), repeat with each N -DFT, and so on, finally obtaining 4
In total, (log2 N ) stages ×
N mults 2 stage
25
=
N 2
log2 N mults.
ECE-600
Phil Schniter
January 31, 2011
Fast convolution: The FFT gives us a very fast way to do linear convolution. • Say that we want to linearly convolve an M -length signal x[n] with an L-length signal h[n], i.e., L−1 X h[l]x[n − l], y[n] = l=0
requiring ≈ L mults per output, or M L mults in total.
• If we zero-pad both sequences to length N ≥ M + L − 1, then N -circular convolution yields the same outputs as linear convolution. • Furthermore, N -circular convolution can be implemented as multiplication in the N -DFT domain: n o −1 x[n] ○ N h[n] = FN -DFT FN -DFT {x[n]} · FN -DFT {h[n]} and, if we use FFT/IFFT to implement the DFT/IDFT, this requires only 3 × N2 log2 N + N total mults. fast convolution, N=1024 16
complexity savings
14
Much cheaper unless M or L very small!
12 10 8 6 4 2 0
200
400 600 L = N+1−M
800
1000
26
ECE-600
Phil Schniter
January 31, 2011
Overlap-save: • Say that we want to filter M -length signal x[n] with L-length filter impulse response h[n], where M ≫ L. • Say that we have access to an N -length FFT algorithm, where L < N < M . Rather than zero-padding x[n], we break it up into overlapping segments of length N , and perform fast convolution on each one. • Key quantities: M +L−1 = N −L+1 = +L−1 ⌉= ⌈M N −L+1
# linear-convolution outputs to compute # useful outputs per N -circular convolution # N -circular convolutions needed in total
Example with L = 8, N = 32, M = 72: N
L
L−1
L−1
N
L−1
N
N
• Total multiplies required for overlap-save: N 2
N +L−1 N log2 N +⌈ M ⌉( log N log2 N ) + N + 2 N −L+1 2 2 | {z } | {z } |{z} | {z } H=fft(h)
X=fft(x)
Y=X*H
y=ifft(Y)
Compare to M L multiplies for standard linear conv. 27
ECE-600
Phil Schniter
January 31, 2011
Matrix/vector formulations: Many of the properties we’ve seen so far can be efficiently described using matrices and vectors. PN −1 2π • The N -DFT X[k] = n=0 x[n]e−j N nk can be written in matrix/vector form as 2π −j 2π e N ·0·0 e−j N ·0·1 X[0] ·1·0 −j 2π ·1·1 −j 2π X[1] N N e e = .. .. .. . . . 2π −j 2π ·(N −1)·0 −j ·(N X[N −1] N e N −1)·1 {z } |e | {z X W
2π
x[0] x[1] . .. . 2π · · · e−j N ·(N −1)·(N −1) | x[N{z−1] } } x
··· ··· .. .
e−j N ·0·(N −1) 2π e−j N ·1·(N −1) .. .
2π
The k th row & nth column of DFT matrix W is e−j N kn .
• The IDFT matrix is W −1 = N1 W H , where (·)H denotes the “Hermitian,” i.e., conjugate transpose. H 1 W W N
since 1
N
WW
H
n,m
=I=
H 1 W W , N
N −1 1 X −j 2π nk j 2π km e N e N = N k=0
N −1 1 X −j 2π k(n−m) e N = N k=0
=
1 0
28
n=m n 6= m
= I n,m .
ECE-600
Phil Schniter
January 31, 2011
Matrix/vector formulations (cont.): P∞
• Linear convolution y[n] = written as, for example, h[0] y[0] y[1] h[1] y[2] h[2] y[3] = h[3] y[4] 0 y[5] 0 0 y[6]
l=−∞
0 h[0] h[1] h[2] h[3] 0 0
0 0 h[0] h[1] h[2] h[3] 0
x[l]h[n − l] can be
0 0 x[0] 0 x[1] h[0] , x[2] h[1] x[3] h[2] h[3]
while N -circular convolution y[n] = can be written as
y[0] h[0] y[1] h[1] y[2] = h[2] y[3] h[3]
h[3] h[0] h[1] h[2]
h[2] h[3] h[0] h[1]
PN −1 l=0
x[l]h[hn − liN ]
h[1] x[0] h[2] x[1] , h[3] x[2] h[0] x[3]
where the matrix has a “circulant” structure. • Circulant H with first column h has eigendecomposition H=
H 1 W DW N
where D = diag(W h).
Thus, circular convolution y = Hx can be written as y=
H 1 W DWx N
which can be recognized as DFT-domain multiplication! 29