Beruflich Dokumente
Kultur Dokumente
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
ck e
j t
Complex form: x˜ (t) T
k=M
ck =
1
T
( () T
x t cos 2kt
dt j ( ) T dt
x t sin 2 kt
) 0
even·odd
=
1
T
( T
cos 2lt
cos 2kt
T dt j T
cos 2lt
sin 2 kt
T dt )
Dan Ellis 2006-09-19 6
Fourier analysis
Works if k, l are positive integers,
1 1 k =l
cos(kt ) cos(lt ) dt =
(say 2 0 k l
1
T=2π)
=
4
cos(k + l)t + cos(k l)t dt
1 sin(k + l)t sin(k l)t
= +
4 k + l k l
1
= (sinc (k + l) + sinc (k l))
2
Dan Ellis 2006-09-19 7
sinc
sin x
sincx=∆
x
= 1 when x = 0
= 0 when x = r·, r ≠ 0, r = ±1, ±2, ±3,...
Dan Ellis 2006-09-19 8
Fourier Analysis
T /2 2k
1 j t
Thus, ck =
T T / 2
x(t)e T
dt
2 k
j t
because real & imag sinusoids in e T
2π ambiguity
Dan Ellis 2006-09-19 11
Fourier Transform of a sine
Assume x(t) = e j 0 t
Now, since x(t) = X()e jt
d
...we know X() = ( 0 )
...where (x) is the Dirac delta function
(x-x0)
(continuous time) i.e.
( x x0 ) f ( x) dx = f ( x0 ) x0
f(x)
x
x(t) = Ae X() = A ( 0 )
j 0 t
Dan Ellis 2006-09-19 12
Fourier Transforms
Time Frequency
Fourier Series Continuous Discrete
(FS) periodic ~x(t) infinite ck
Fourier Continuous Continuous
Transform (FT) infinite x(t) infinite X()
Discrete-Time Discrete Continuous
FT (DTFT) infinite x[n] periodic X(ej)
Discrete FT Discrete Discrete
(DFT) finite/pdc ~x[n] finite/pdc X[k]
= n=0 (e )
S = c cS = c
j n n n
n =0 n =1
1
= j
S cS = c = 1 0
1 e
1
S =
1c
e
j (nl )
d =
2 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
Dan Ellis 2006-09-19 19
DTFTs of simple sequences
x[n] = [n] X(e ) = j
x[n]e jn
n=
j 0
=e =1 (for all )
-3 -2 -1 1 2 3 n -
= [ X (e ) X (e )]
1 j j
jIm{x[n]} XCA (ej)
*
2
xcs[n] Re{X(ej)}
xca[n] jIm{X(ej)}
Dan Ellis 2006-09-19 25
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)
1 e j
h[n] = [n] - [n-1]
H (e ) = 1 (e ) 1
j j 1
2
=
2
1
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 2006-09-19 30
Parseval’s relation
“Energy” in time and frequency domains
are equal:
1
g[n]h *
[n] =
2
G(e j
)H *
(e j
)d
n
1
G(e
2
By Parseval g = j
) d
2
Define Energy Density Spectrum (EDS)
j j 2
Sgg (e ) = G(e )
DTFT { gg }
r [l] = G(e j
)G(e j
)
If g[n] is real, G(e-j) = G*(ej), so
DTFT {rgg [l]} = G(e ) = Sgg (e ) no phase
j 2 j
info.
N n=0
N 1 2/N
DFT: X[k] = x[n]WN
kn
1
n=0 WN
2
j
where WN = e N i.e. 1/Nth of a revolution
N l=0 = 0 if l ≠ n; = N if l = n
k=0 im
= x[n] W re
N or finite
WN2 geometric series
0≤n<N = (1-WNlN)/(1-WNl)
n=0
Periodic sinusoid:
2rn 1 rn
x[n] = cos (r I) = (WN + WNrn )
N 2
n=0 ( N N ) N
N 1 rn
X[k] = 1
2 W + W rn
W kn
(0 ≤ k < N)
N /2 k = r,k = N r
=
0 o.w.
Dan Ellis 2006-09-19 37
DFT: Matrix form
X[k] = n=0 x[n] W
N 1
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
X[N 1] 1 WN
(N 1)
WN
2(N 1)
L WN(N 1) 2
x[N 1]
i.e. X = DN x
Dan Ellis 2006-09-19 38
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 *
1 W N WN L WN
= /NDN
Dan Ellis 2006-09-19 39
DFT and DTFT
DTFT
j
X(e ) = x[n]e jn • continuous freq
• infinite x[n], -<n<
n=
N 1
• discrete freq k=N/2
DFT X[k] = x[n]W N
kn
• finite x[n], 0≤n<N
n=0
n=0 N k=0
j ( 2 k ) n
N 1 N 1
1
= 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 2006-09-19 42
Periodic sinc jN
N 1
1e k
e j k n
=
1e j k
n =0
jN k / 2 jN k / 2 jN k / 2
e e e
= j k / 2 j k / 2 j k / 2
e e e
k
j 2 k sin N 2
( N 1)
pure real
=e k
pure phase 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 2006-09-19 43
Periodic sinc
sin Nx
sin x
(N = 8)
DFT DTFT
= interpolation
by periodic
sinc
X[k]X(ej)
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
r=
y l [n + rN] (0 ≤ n < N)
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 2006-09-19 54
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
Duality
G [n] N g[ k ]
N
Parseval
n=0 x[n] k=0 X [k ]
N 1 2 N 1 2
= 1
N
n n
g0[n] g0[n] * h[n]
n n
g1[n] g1[n] * h[n]
n n
g2[n] g2[n] * h[n]
n n
N 2N 3N valid OLA sum
h[n] * g[n]
n
N 2N 3N
Dan Ellis 2006-09-19 60