Beruflich Dokumente
Kultur Dokumente
x(t ) IFT X ( F )
j 2 Ft
x
(
t
)
e
dt
j 2 Ft
X
(
F
)
e
dF
T sinc FT
F F
FT e
FT rect
t
T0
j 2 F0 t
FT cos 2 F0t 12 e j F F0 12 e j F F0
j 2 fn
x
[
n
]
e
x[n] IDTFT X ( f ) 1 X ( f )e j 2 fn df
1
2
( f f
DTFT e j 2 f0 n
(t k ) e
j 2 nt
k)
Property of DTFT
1
2
1
2
1
2
1
2
x(t ) e
x[n] x(nTs ) e
j 2 F0 t
j 2
F0
n
Fs
Fs 1 / Ts
1. No Aliasing
Fs
F0
2
X (F )
Fs
2
X(f )
F0
Fs
2
f0
1
2
digital frequency f 0
f
F0
Fs
x(t ) e
x[n] x(nTs ) e
j 2 F0 t
j 2
F0
n
Fs
Fs 1 / Ts
2. Aliasing
Fs
F0
2
X(f )
X (F )
F
s
2
Fs
2
F0
f0
digital frequency
f0
1
2
F
F0
round 0
Fs
Fs
x[n] x(nTs ) e j 2 f0 n
x(t ) e j 2 F0t
Fs 1 / Ts
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
DTFT:
f0
F0
Fs
round
X DTFT ( f ) f 13
F0
Fs
for | f |
1
3
1
2
round 13
1
3
Example
x(t ) e j 2 2000t
Fs 3kHz
Then:
analog frequency
F0 2000 Hz
FT: X FT ( F ) ( F 2000)
digital frequency
DTFT:
f0
F0
Fs
round
X DTFT ( f ) f 13
for
F0
Fs
2
3
| f |
round 23 13
1
2
Example
x(t ) cos(8000 t 0.1 ) 12 e j 0.1 e j 8000 t 12 e j 0.1 e j 8000 t
Fs 3kHz
Then:
analog frequencies
FT:
digital frequencies
f 0 43 round 43 43 1
1
3
f1 43 round 43 43 ( 1) 13
DTFT
| f |
1
2
x[n]
h[n]
y[n]
h[m]x[n m]
If the impulse response has a finite duration, the system is called FIR
(Finite Impulse Response):
Z-Transform
X ( z ) Z x[n]
n
x
[
n
]
z
Facts:
x[n]
H (z )
y[n]
Y ( z) H ( z) X ( z)
Frequency Response of a filter:
H ( f ) H ( z ) z e j 2f
Digital Filters
x[n]
Ideal Low Pass Filter
constant magnitude
in passband
H (z )
y[n]
H( f )
12
A
fP
1
2
H( f )
fP
and linear phase
12
1
2
passband
hideal [n] 1 H ( f )e
j 2 fn
df
fP
fP
Ae j 2 fn df
fp=0.1
0.2
0.15
0.1
0.05
-0.05
-50
-40
-30
-20
-10
0
n
10
20
30
40
50
This has Infinite Impulse Response, non recursive and it is noncausal. Therefore it cannot be realized.
h[n]
h[n]
2L
ripple
| H( f )|
1 1
1 1
f P f STOP
stop
pass
stop
transition region
fP
1 1
10 1 1
dB
1 or RP 20 log
stopband frequency f STOP
stopband attenuation 2 or RS 20 log10 2 dB
passband ripple
attenuation
Best Design tool for FIR Filters: the Equiripple algorithm (or Remez). It
minimizes the maximum error between the frequency responses of the
ideal and actual filter.
| H( f )|
1 1
ripple
1 1
f1
attenuation
1
2
f2
h firpm N , 0, f1 , f 2 , f 3 / f 3 , 1,1, 0, 0 , w1 , w2
impulse response
h h[0],..., h[ N ]
/ w1
/ w2
f1
f2
f3
1
2
Linear Interpolation
| H( f )|
Example:
we want
f1 f 2
Passband: 3kHz
f f 2 f1
Stopband: 3.5kHz
f ~
Attenuation: 60dB
20 log10 ( 2 )
22
3.5 3.0
15.0
301
N~
60
22
30 82
1
N
Frequency response
magnitude
20
-20
dB
N=82
-40
-60
-80
-100
magnitude
20
0.1
0.2
0.3
digital frequency
0
-20
N=98
dB
-40
-60
-80
-100
-120
0.1
0.2
0.3
digital frequency
0.4
0.5
0.4
0.5
20
| H( f ) |
0
-20
Almost 40dB!!!
dB
-40
-60
-80
-100
-120
0.1
0.2
0.3
digital frequency
0.4
0.5
10
| H( f ) |
0
-10
dB
-20
OK!!!
-30
-40
-50
-60
-70
-80
0.1
0.2
0.3
digital frequency
0.4
0.5
H [ H 0 , H1 ,..., H M ]
Weights for Error:
H3
0
f1 f 2
f3
w( M 1) / 2
HM
H M 1
f M 1 f M
w [ w1 , w2 ,..., w( M 1) / 2 ]
Then apply:
h firpm N , f / f M , H , w
and always check frequency response if it is what you expect!
1
2
Example:
H ( f ) 1/ sinc( f )
for
H( f ) 0
0 f 0.2
0.25 f 0.5
A 40dB
0
0.2 0.25
0.5
fp=0:0.01:0.2;
fs=[0.25,0.5];
% stopband frequencies
M=[1./sinc(fp), 0, 0];
% desired magnitudes
Df=0.25-0.2;
% transition region
N=ceil(A/(22*Df));
% first guess of order
h=firpm(N, [ fp, fs]/0.5,M);
% impulse response
magnitude
1.4
1.2
1
0.8
0.6
0.4
0.2
0
0.1
0.2
0.3
digital frequency
0.4
0.5
10
0
dB
-10
-20
-30
N 37
-40
-50
-60
-70
-80
-90
0.1
0.2
0.3
0.4
0.5
To improve it:
1. Increase order
2. Add weights
A 40dB
0
w 1
0.2 0.25
w 0.2
0.5
magnitude
1.4
1.2
1
0.8
0.6
0.4
0.2
0
0.1
0.2
0.3
digital frequency
0.4
0.5
20
0
N 100
dB
-20
-40
-60
-80
-100
-120
-140
-160
0.1
0.2
0.3
0.4
0.5