Discrete Fourier Transform Amplitude Modulation

Discrete Fourier Transform
ENE 208 Electrical Engineering Mathematics (2/2008)
Class 4, January 26, 2009
[email protected]
1
Amplitude Modulation (AM)
Frequency shifting,
ℑ{f(t)ej2πf0t} = ∫f(t)ej2πf0 te–j2πftdt = ∫f(t)e–j2π(f–f0)tdt
ℑ
F(f–f0)
f(t)ej2πf0 t
ℑ–1
AM, ℑ{ f(t) cos(2πf0t) } = ½ ℑ{ f(t) ej2πf0 t }
+ ½ ℑ{ f(t) e–j2πf0 t }
= ½ F(f–f0) + ½ F(f+f0)
ℑ{AM}
–f0
0
f0
f
2
1
Convolution
f(t)∗g(t) = ∫τ=–∞→∞ f(τ) g(t–τ) dτ
= ∫τ=–∞→∞ g(τ) f(t–τ) dτ
= g(t)∗f(t)
3
Convolution (Cont’d)
f(t)
0
t
g(t)
0
t
g(t– τ)
f(t)
…
0
…
τ
4
t
2
Unit Step Function
u(t)
1
0
t
u(t) = 0 , t<0
= 1 , t>0
Unit step function is discontinuous at t=0.
5
Unit Impulse Function
(Dirac Delta Function)
δ(t) = du(t)/dt
u(t) = ∫τ=–∞→t δ(τ) dτ
or
To derivative u(t) at t=0,
uε(t)
1
θ
0 ε t
δε(t) = duε(t)/dt
= slope
= tanθ
= 1/ε
δε(t)
Area = 1
1/ε
0 ε
t
6
3
Unit Impulse Function (Cont’d)
δ(t)
0
t
δ(t) = limε→0 δε(t)
Therefore the area under the curve is infinite.
• δ(t) = 0
when t≠0
• δ(t) is not defined at t=0 (∞)
• ∫t=–∞→∞ δ(t) dt = 1
• f(t) δ(t–t0) = f(t0) δ(t–t0)
• δ(t) = δ(–t) even function
• ℑ{δ(t)} = ∫t=–∞→∞ δ(t)e–j2πft dt = ∫t=–∞→∞ δ(t) dt = 1
7
Sampling
Convolution of unit impulse function,
∫t=a→b f(t) δ(t–tk) dt = ∫t=a→b f(tk) δ(t–tk) dt
= f(tk) ∫t=a→b δ(t–tk) dt
= f(tk) ∫t=a→b δ(t–tk) d(t–tk)
= f(tk)
f(t)
δ(t–t0) δ(t–t1)
…
0
f(t)∗δ(t) = f(t)
f(tk) discrete, if tk discrete
…
t0
t1
t
8
4
Sampling (Cont’d)
Nyquist rate: What’s the least number of points we
need to tell that a wave is oscillating once?
1 oscillation → 2 points
2 oscillation → 4 points
…
N/2 oscillation → N points
fsampling ≥ 2fmax
9
Impulse Response
Input
System
Output
x(t)
g(t)
y(t) = x(t)∗g(t)
δ(t)
Impulse
?
g(t)
Impulse Response
10
5
Discrete-time Fourier Transform
f(t) = f(kτ) where discrete-time k is integer
0
τ
2τ
3τ
…
…
…
…
F(f) = ∫t=–∞→∞ f(t) e–j2πft dt
= Σk=–∞→∞ τ f(kτ) e–j2πfkτ
= τ Σk=–∞→∞ f(kτ) e–j2πτfk
= Σk=–∞→∞ f(k) e–j2πfk
Maximum frequency, fmax = 1/Tmin = 1/τ
t
11
Discrete-time Fourier Transform (Cont’d)
ejθ = cosθ + j sinθ
= cos(θ+2π) + j sin(θ+2π)
= ej(θ+2π)
F(f) = Σk=–∞→∞ f(k) e–j2πfk
F(ω) = Σk=–∞→∞ f(k) e–jωk
F(ω+2πn) = Σk=–∞→∞ f(k) e–j(ω+2πn)k , n=0,1,2,…
= Σk=–∞→∞ f(k) e–jωk e–j2πnk
= Σk=–∞→∞ f(k) e–jωk
= F(ω)
“Periodic spectrum”
Note: e–j2πnk = cos(2πnk) – j sin(2πnk) = 1
12
6
Discrete-time Fourier Transform (Cont’d)
Inverse transform,
∫f=–∞→∞F(f)ej2πτfkdf = ∫f=–∞→∞ [τΣk=–∞→∞f(kτ)e–j2πτfk] ej2πτfkdf
= τ Σk=–∞→∞ f(kτ) ∫f=–∞→∞e–j2πτfkej2πτfkdf
= τ Σk=–∞→∞ f(kτ) ∫f=–∞→∞df
= Σk=–∞→∞ f(kτ)
= Σk=–∞→∞ f(t)δ(t–kτ)
δ(t–τ) δ(t–2τ)
f(t)
…
0
…
τ
2τ
t
13
Discrete Fourier Transform
f(t)
2τ
3τ
0 τ
…
…
(N–2)τ
(N–1)τ
N points
t
Fundamental frequency, fmin = 1/Tmax = 1/Nτ
where n=0,1,2,…,N-1
f = n fmin = n / Nτ
14
7
Discrete Fourier Transform (Cont’d)
F(f) = τ Σk=–∞→∞ f(kτ) e–j2πτfk
F(n/Nτ) = τ Σk=0→N-1 f(kτ) e–j2πτ(n/Nτ)k
F(n) = τ Σk=0→N-1 f(k) e–j2πnk/N
= Σk=0→N-1 f(k) e–j2πnk/N
, if τ=1
15
Discrete Fourier Transform (Cont’d)
Discrete Fourier transform
F(n) = Σk=0→N-1 f(k) e–j2πnk/N
, n=0,1,2,…,N-1
Inverse Discrete Fourier Transform
f(k) = 1/N Σn=0→N-1 F(n) e–j2πnk/N , k=0,1,2,…,N-1
16
8
Implementation
F(n) = Σk=0→N–1 f(k) e–j2πnk/N
= Σk=0→N–1 ωnk f(k)
where ω = e–j2π/N = cos(2π/N) – j sin(2π/N)
DFT,
F(n) = 1
1
1
1
.
.
.
1 1
ω ω2
ω2 ω4
ω3 ω6
1
ω3
ω6
ω9
.
.
.
.
.
.
.
.
.
… 1
… ωN–1
… ω2(N–1)
… ω3(N–1)
f(0)
f(1)
f(2)
f(3)
.
.
.
.
.
.
1 ωN–1 ω2(N–1) ω3(N–1) … ω(N–1)(N–1) f(N–1)
(N–1)×(N–1)
(N–1)×1
= Ғ(ω)(N–1)×(N–1) f(t)(N–1)×1
17
Implementation (Cont’d)
Inverse DFT,
f(k) = 1/N Ғ(ω)(N–1)×(N–1) F(n)(N–1)×1
where ω = 1/ω = ej2π/N
18
9
Harmonics
An integer multiple of the fundamental
frequency (fmin)
e.g. Signal with N points
0
1
2
…
3
N–1
Time
Tmax
We get N frequencies
0
fmin 2fmin 3fmin
DC Tmax Tmax Tmax
2
3
…
…
(N–1)fmin
Tmax
N–1
Frequency
Period
19
Dealing with Nyquist Rate
fsampling ≥ 2fmax
1/τ ≥ 2/Tmin
Tmin ≥ 2τ
fFundamental = fmin = 1/Tmax = 1/Nτ
Harmonics, nfmin = n/Nτ , n=0,1,2,3,…
e.g. Signal with N points (even)
f(t) = f(kτ) , k=0,1,...,N-1
1
2
3
0
τ
Tmin = 2τ
Tmax = Nτ
…
N-1
fmax = nmaxfmin
nmax = fmax/fmin
= Tmax/Tmin
t
= Nτ/2τ
= N/2
20
10
Properties
Imaginary
• Conjugate Symmetry
F(f) = F∗(-f)
|F(f)| = |F∗(-f)|
F = R+jI = |F|ejφ
|F|
φ
0 -φ
Real
|F∗|
φ = ωt = 2πft
F∗ = R–jI = |F|e–jφ
• Periodicity
f(k) = f(k+N)
F(n+N) = Σk=0→N-1 f(k) e–j2π(n+N)k/N
= Σk=0→N-1 f(k) e–j2πnk/N e–j2πk
= F(n)
Note: e–j2πk = cos(2πk) – j sin(2πk) = 1
21
Shifting of DFT
By multiplying f(k) by (-1)k before the transform
f(k)ej2π(N/2)k = f(k)(ejπN)k = f(k)(–1)k
N–1
0
-N/2
N/2–1
N/2
F(0) is DC Coefficient = Σf(k)
F(1) is Fundamental Frequency Coefficient
|F(f)|
N
f
N
f
1 Period (N Samples)
0
N-1
–N/2
N/2–1
N/2
|F(f)|
22
11
Displaying Transform
• For f(k) → F(n), |F(0)| is usually very much
larger than all other values.
• Take stretching out the values by
|F(n)|new = log( 1 + |F(n)|old )
|F(n)|new
-1
0
|F(n)|old
1
23
Discrete Time & Discrete Frequency
Time
Frequency
Discrete-time
Fourier Transform
• Discrete
• Continuous
• Non-periodic • Periodic
Discrete
Fourier Transform
• Discrete
• Periodic
• Discrete
• Periodic
24
12
Filtering
F(f)
f(t)
DFT
0
F(f)H(f)
0
t
f
H(f)
Lowpass Filter
1
0
f0
Filtering
0
f
f
f(t)
Filter
h(t)
f(t)∗h(t)
F(f)
Filter
H(f)
F(f)H(f)
25
Filtering (Cont’d)
G(f) = 1 – H(f)
1
0
Highpass Filter
f0
f
Bp(f)
Bandpass Filter
1
0
f1
f2 f
Br(f)
Bandreject Filter
1
0
f1
f2 f
26
13
Happy Chinese New Year 2009 ^_^
“Learn without thinking begets
ignorance.
Think without learning is
dangerous.”
27
14