Digital Signal Processing L03 Fourier
Digital Signal Processing L03 Fourier
Digital Signal Processing L03 Fourier
k1
1
k = 0; ak = (1) 2 k = 1,3,5,...
k
0 o.w.
2 1 2 1 2
i.e. x(t) = cos t cos 3t + cos 5t ...
1
T 3 T 5 T
0.5
0.5
1
1.5 1 0.5 0 0.5 1 1.5
parameters:
1 2 3 4 5 6 7 k
k1
1
ak = (1) 2 k = 1,3,5... k
k Negative ak is
equivalent to phase of 1 2 3 4 5 6 7 k
M 2k
j t
Complex form: x (t) ck e T
k=M
1
1 k1 = k 2
cos(k1t ) cos(k 2t ) dt =
0 k1 k 2
1
=
2
cos(k 1 + k 2 )t + cos(k 1 k 2 )t dt
1 sin(k1 + k 2 )t sin(k1 k 2 )t
= +
2 k1 + k 2 k1 k 2
= sinc (k1 + k 2 ) + sinc (k1 k 2 )
Dan Ellis 2003-09-16 6
sinc
sin x
sincx =
x
sin(x)/x
1.0
4 3 2 2 3 4 x
sin(x)
y=x
= 1 when x = 0
= 0 when x = r, r 0, r = 1, 2, 3,...
Dan Ellis 2003-09-16 7
Fourier Analysis
2 k
1 T /2 j
t
Thus, ck = x(t)e T
dt
2 T / 2 2 k
j t
because real & imag sinusoids in e T
x(t) = X()e jt
d Inverse Fourier
Transform (IFT)
-40
0.02
x(t)
-60
-80
0.01 0 2000 4000 6000 8000
freq / Hz
0
arg{X( )}
-0.01
0 0.002 0.004 0.006 0.008 /2
time / sec
0
/2
2 ambiguity 0 2000 4000 6000 8000
freq / Hz
n=0 n=1
1
= j S cS = c = 1 0
1 e
1
3
|X(ej )|
arg{X(ej )}
S=
2
2 3 4 5
1 c
1
0 2 3 4 5
= x[n]e jn
e j 2 n
= X(e ) j
|X(ej )| arg{X(ej )}
3
2
2 3 4 5
1
0 2 3 4 5
2
e j (nl )
d =
2 j (n l )
1 e j (nl )
e j (nl )
=
2 j (n l )
1 2 j sin (n l)
= = sinc (n l)
2 j (n l )
Same as cos imag jsin part cancels
n=
j 0
=e =1 (for all )
-3 -2 -1 1 2 3 n -
e j 1 e j + e j
= 1+ j
=
1 e 1 e j
1
= x[n] = n[n]
1 e j
Dan Ellis 2003-09-16 23
DTFT symmetry
If x[n] X(ej) then...
x[-n] X(e-j) from summation
(e -j)* = ej
x*[n] X*(e-j)
1
Re{x[n]} XCS(e )
j =
2
[ X (e j
) + X *
(e j
)]
conjugate symmetry cancels Im parts on IDTFT
1
jIm{x[n]} XCA = [ X (e ) X (e )]
(ej)j * j
2
xcs[n] Re{X(ej)}
xca[n] jIm{X(ej)}
Dan Ellis 2003-09-16 24
DTFT of real x[n]
When x[n] is pure real, X(ej) = X*(e-j)
xcs[n] xev[n] = xev[-n] XR(ej) = XR(e-j)
xca[n] xod[n] = -xod[-n] XI(ej) = -XI(e-j)
Imag
xim[n]
= n (
k g[k]h[n k] e jn
)
= k g[k]e jk
n h[n k]e j (nk )
j j
= G(e ) H (e )
Convolution
g[n] h[n] G(e j )H (e j ) becomes
multiplication
Dan Ellis 2003-09-16 26
DTFT modulation
Modulation: x[n] = g[n] h[n]
Could solve if g[n] was just sinusoids...
1
X(e ) = n
j
G(e j
)e jn
d h[n]e jn
2
1
=
2
G(e ) n h[n]e
j
[ j ( )n
] d
1
g[n] h[n]
2
G(e j
)H (e j ( )
)d
Dual of convolution in time
Dan Ellis 2003-09-16 27
Parsevals relation
Energy in time and frequency domains
are equal:
1
g[n]h *
[n] =
2
G(e j
)H *
(e j
)d
n
1 2
By Parseval g =
2
G(e j
) d
1 e j
h[n] = [n] - [n-1]
H (e j ) = 1 (e j 1 ) 1
N n=0
N 1
DFT: X[k] = x[n]WN
kn
n=0
2
j
where WN = e N i.e. 1/Nth of a revolution
N l=0 k=0
= 0 if l n; = N if l = n
im
= x[n]
WN2
WN re
Periodic sinusoid:
2rn 1 rn
x[n] = cos (r I) = (WN + WNrn )
N 2
X[k] = 2 (WNrn + WNrn )WNkn
N 1
1
n=0
N /2 k = r,k = N r
=
0 o.w.
Dan Ellis 2003-09-16 36
DFT: Matrix form
N 1
X[k] = n=0 x[n] W N
kn
as a matrix multiply:
X[0] 1 1 1 L 1 x[0]
X[1] 1 WN1 WN 2
L WN (N 1)
x[1]
X[2] = 1 W 2 WN 4
L WN2(N 1)
x[2]
N
M M M M O M M
(N 1) 2
X[N 1] 1 WN
(N 1)
WN
2(N 1)
L WN x[N 1]
i.e. X = DN x
Dan Ellis 2003-09-16 37
Matrix IDFT
If X = DN x
1
then x = DN X
i.e. inverse DFT is also just a matrix,
1 1 1 L 1
1 WN1 WN2 L WN(N 1)
1
1
D N = 1 WN2 WN4 L WN2(N 1)
N M M M O M
(N 1) 2(N 1) (N 1) 2
1 W N WN L WN
= /NDN
1 *
n=0 N k=0
N 1 N 1
1 j ( 2 k ) n
= X[k] e N periodic
N k=0 n=0
sinc
k = 2Nk
N 1 k
1 sin N 2 j ( N21) k
= X[k] k
e
interpolation N k=0 sin 2
Dan Ellis 2003-09-16 41
Periodic sinc
N 1 jN k
1 e
e j k n
=
1 e j k
n=0
jN k / 2 jN k / 2 jN k / 2
e e e
= j k n / 2 j k / 2 j k / 2
e e e
k
j 2 k sin N 2
( N 1)
=e k
sin 2
= N when k = 0; = (-)N when k/2 =
= 0 when k/2 = r/N, r = 1, 2, ...
other values in-between...
Dan Ellis 2003-09-16 42
Periodic sinc N
sinNx/
sinx
sin Nx sinNx
0
2 x
sin x sinx
-N
sin N k/2
X[k] = X(ej2k/N) X(ej 0) = X[k]
N sin k/2
1.5
Periodic 1 X[3]
sin N 3/2
sinc N sin 3/2
interpolation 0.5
X[k]X(ej) 0
freq
-0.5
-1 0 k=1 k=3 k=4
= 2/N 0 = 6/N = 8/N
x[n+N]
(r = -1) -5 -4 -3 -2 -1 1 2 3 4 5 n
x[n]
1 2 3 n
1 2 3 4
n 1 2 3 4
n
5-pt sequence
x [ n N ]
Time-reversed
periodic sequence n
-7 -6 -5 -4 -3 -2 -1 1 2 3 4 5 6 7 8 9 10 11
Written as g[n]
N h[n]
g[m ]h[ n m N ] 1 2 3 n 1 2 3 n
m=0
g[n] 4 h[n]={4 7 5 4}
h[<n - 0>4]
1 2 3
n 1
h[<n - 1>4]
1 2 3
n 2
1 2 3 n
h[<n - 2>4]
1 2 3
n 0
h[<n - 3>4] check: g[n] * h[n]
1 2 3
n 1 ={2 6 5 4 2 1 0}
Dan Ellis 2003-09-16 53
Duality
DFT and IDFT are very similar
both map an N-pt vector to an N-pt vector
Duality:
Circular
if g[n] G [k ] time reversal
then G [n] N g[ k N ]
i.e. if you treat DFT sequence as a time
sequence, result is almost symmetric
N 1 N 1
Parseval
n=0 x[n] k=0 X [k ]
2 2
= 1
N
n n
g0[n] h[n] g0[n]
n n
g1[n] h[n] g1[n]
n n
g2[n] h[n] g2[n]
n n
N 2N 3N valid OLA sum
h[n] g[n]
n
N 2N 3N
Dan Ellis 2003-09-16 59