Professional Documents
Culture Documents
X ( F ) FT x(t ) x (t ) e j 2 Ft
dt
x(t ) IFT X ( F ) X ( F ) e j 2 Ft
dF
FT e F F
j 2 F0 t
0
FT cos 2 F0t 12 e j F F0 12 e j F F0
Discrete Time Fourier Transform of sampled signals
X ( f ) DTFT x[n] x[ n ]e j 2 fn
n
x[n] IDTFT X ( f ) 1 X ( f )e j 2 fn df
1
2
2
Example:
DTFT e j 2 f0n ( f f 0 k)
k
(t k ) e
k n
j 2 nt
Property of DTFT
1
1 f
1
2
1
2
f
1 1
2 2
Sampled Complex Exponential: no aliasing
F0
j 2 n
j 2 F0 t x[n] x(nTs ) e Fs
x(t ) e
Fs 1 / Ts
Fs
1. No Aliasing F0
2
X (F ) X(f )
Fs F0 Fs
F f
1 f0 1
2 2 2 2
F0
digital frequency f 0
Fs
Sampled Complex Exponential: aliasing
F0
j 2 n
j 2 F0 t x[n] x(nTs ) e Fs
x(t ) e
Fs 1 / Ts
Fs
2. Aliasing F0
2
X (F ) X(f )
F
F
s
Fs F0 1 f0 1
f
2 2
2 2
F0 F
digital frequency f0 round 0
Fs Fs
Mapping between Analog and Digital Frequency
F0 F0
f0 round
Fs Fs
Example
x(t ) e j 2 1000t
Fs 3kHz
Then:
• analog frequency F0 1000 Hz
• FT: X FT ( F ) ( F 1000)
• digital frequency f0 F0
Fs round
F0
Fs
1
3 round 13 1
3
x(t ) e j 2 2000t
Fs 3kHz
Then:
• analog frequency F0 2000 Hz
• FT: X FT ( F ) ( F 2000)
• digital frequency
f0 F0
Fs round
F0
Fs
2
3 round 23 13
Then:
• analog frequencies F0 4000 Hz , F1 4000 Hz
• digital frequencies
f 0 43 round 43 43 1 1
3
f1 43 round 43 43 (1) 13
x[n] y[n]
h[n]
If the impulse response has a finite duration, the system is called FIR
(Finite Impulse Response):
n
Facts:
x[n] y[n]
H (z )
Y ( z) H ( z) X ( z)
Frequency Response of a filter:
H ( f ) H ( z ) z e j 2f
Digital Filters
x[n] y[n]
H (z )
H( f )
fP
12 1 f
2
… and linear phase
passband
Impulse Response of Ideal LPF
Assume zero phase shift,
1 fP
hideal [n] 1 H ( f )e j 2 fn
df Ae j 2 fn df
2
2 fP
h[n ] 0.2
0.15
f P 0.1
A 1
0.1
0.05
-0.05
-50 -40 -30 -20 -10 0 10 20 30 40 50
n
n
This has Infinite Impulse Response, non recursive and it is non-
causal. Therefore it cannot be realized.
Non Ideal Ideal LPF
h[n]
n
L L
h[n]
n
L 2L
Frequency Response of the Non Ideal LPF
1 1 | H( f )|
ripple
1 1
2 attenuation
f P f STOP f
transition region
h firpm N , 0, f1 , f 2 , f 3 / f 3 , 1,1, 0, 0 , w1 , w2
impulse response / w1
h h[0],..., h[ N ] 1 / w2
0 f1 f2 f3 1
2
Linear Interpolation
The total impulse response length N+1 depends on:
• transition region
• attenuation in the stopband
| H( f )|
Example:
2
we want f1 f 2
Passband: 3kHz
f f 2 f1
Stopband: 3.5kHz
Attenuation: 60dB f ~ 20 log10 ( 2 )
22
1
N
Sampling Freq: 15 kHz
Then: from the specs f 301
3.5 3.0
15.0
-20
N=82 -40
dB
-60
-80
-100
0 0.1 0.2 0.3 0.4 0.5
digital frequency
magnitude
20
-20
-40
N=98
dB
-60
-80
-100
-120
0 0.1 0.2 0.3 0.4 0.5
digital frequency
Example: Low Pass Filter
Passband f = 0.2
Stopband f = 0.25 with attenuation 40dB
Choose order N=40/(22*(0.25-0.20))=37
magnitude
20
| H( f ) | 0
-20
Almost 40dB!!!
-40
dB
-60
-80
-100
-120
0 0.1 0.2 0.3 0.4 0.5
digital frequency f
Example: Low Pass Filter
Passband f = 0.2
Stopband f = 0.25 with attenuation 40dB
Choose order N=40 > 37
magnitude
10
| H( f ) | 0
-10
-20
-30
OK!!!
dB
-40
-50
-60
-70
-80
0 0.1 0.2 0.3 0.4 0.5
digital frequency
f
General FIR Filter of arbitrary Frequency Response
w1
f [0, f1 , f 2 ,..., f M ] H0 H1 H w2 w( M 1) / 2
2
HM
H [ H 0 , H1 ,..., H M ] H3 H M 1
0 f1 f 2 f3 f M 1 f M 1
2
Weights for Error:
w [ w1 , w2 ,..., w( M 1) / 2 ]
Then apply:
h firpm N , f / f M , H , w
A 40dB
0 0.2 0.25 0.5 f
0.8
0.6
0.4
0.2
0
0 0.1 0.2 0.3 0.4 0.5 10
digital frequency
0
-10
dB -20
-30
N 37
-40
-50
-60
-70
-80
-90
0 0.1 0.2 0.3 0.4 0.5
To improve it:
1. Increase order
2. Add weights
A 40dB
0 0.2 0.25 0.5 f
w 1 w 0.2
1.2
0.8
0.6
0.4
0.2
0
0 0.1 0.2 0.3 0.4 0.5
digital frequency
20
dB -20
N 100 -40
-60
-80
-100
-120
-140
-160
0 0.1 0.2 0.3 0.4 0.5