Professional Documents
Culture Documents
Recursive Filters:
constant coefficients.
very selective filters with a few parameters;
a) in general nonlinear phase,
b) can be unstable.
digital
s-plane
z-plane
H a ( s)
( z)
y (nT ) y (nT T )
y (nT )
T
take the z-Transform of both sides:
approximation of s
Y ( z ) z 1Y ( z ) 1 z 1
Z y (nT )
Y ( z)
T
T
1 z 1
s
T
Example:
take the analog filter with transfer function
with a sampling frequency Fs 5Hz
H a ( s)
2
s 1
and discretize it
By Eulers approximation
Hd ( z )
2
0.333 z
z 0.833
1 z 1
0.2
digital
s-plane
z-plane
s-plane
z-plane
since
1
1
1 1
z
2 1 sT 2 2
1
s
T
1
s
T
1
1
z
2
2
if Re[s]<0.
1
T
1
T
T
y (nT ) y (nT T )
y (t ) dt y (nT ) y (nT T )
nT T
2
nT
area ABCD
C
Take the z-Transform of both sides:
T
Y ( z ) z Y ( z ) Y1 ( z ) z 1Y1 ( z )
2
1
2 1 z 1
s
T 1 z 1
2
s
T
z
2
s
T
nT-T
D
nT
s-plane
z-plane
since:
2
T
2
s
T
s
| z|
2
T
2
T
2
T
2
j
T
| e j |
Phase:
T
phase
( ) 2
2
j
T
1 T
where
tg
2
j
T
2tg
2
1
2
T
2
T
2
T
2
tg
T 2
T
2tg
2
1
2
tg
T
2
Example: we want to design a digital low pass filter with a bandwith Fo 8kHz
and a sampling frequency
Solution:
Step 1: specs in the digital freq. domain
c
c 2 Fs tg
or equivalently
Fc 13.23kHz
Step 3: design an analog low pass filter (more later) with a bandwith Fc 13.23kHz ;
Step 4: apply Bilinear Transformation to obtain desired digital filter.
Specifications:
1
1
1
2
2 2
p
pass
band
transition
stop
band
| H ()|
2
1
1
2N
| H ( s )|
2
2 s
1
p
2N
2 2
1
2
1
p
2N
from stopband:
1 2 2
log 2 2
2
s
2 log
p
| H ()| H ( s) H ( s) s j
2
H ( s) H ( s)
1
1
2N
s j c e
k 2
2N
ce e
j ( 2 k 1)
2N
s
j
1
s
1
2
c
2
, k 0,...,2 N 1
N=2
poles
s-plane
Example: design a low pass filter, Butterworth, with 3dB bandwith of 500Hz and 40dB
attenuation at 1000Hz.
c 1000 ; s 2000 ,
Solution:
1
s
1
2N
1
2
2 N 0.01
1 2
| H ()|dB
log(104 1)
N
6.64 N 7
2 log(2)
poles at
Chebychev Filters.
Based on Chebychev Polynomials:
TN ( x ) cos( Nt ) x cos( t )
T0 ( x ) cos(0) 1,
T3 ( x )
T1 ( x ) cos(t ) x cos( t ) x ,
T2 ( x ) cos(2t ) 2 cos2 (t ) 1 x cos( t ) 2 x 2 1,
TN 1 ( x ) 2 xTN ( x ) TN 1 ( x )
P ( x ) 4 x 3 ax 2 bx c
T3 ( x ) 4 x 3 3x
P( x ) 4 x 3 ax 2 bx c
P T3 1
T3 ( x )
P T3 1
P ( x ) T3 ( x )
P( x )
T3 ( x )
P T3 1
P T3 1
root
But: P ( x ) T3 ( x ) 4 x ax bx c 4 x 3x
3
root
root
has degree 2
So: you cannot find a P(x) which does better (in terms of deviation from 0) then the
Chebychev polynomial.
Chebychev Filter:
| H ()|
1 TN
p
2
1
1
1
1
1 1
1
N
2 1
r1,2
2
k (2 k 1)
, k 0,..., N 1
2
2N
s-plane
Example: design a Chebychev low pass filter with the following specs:
passband Fp 500 Hz ,
Fs 1000 Hz ,
stopband
Step 1: determine
For 1dB ripple,
1
20 log
2
1
1
2
, p
10 log(1 2 ) 1dB
| H ()|
log
1 2 2 1 2 2 (1
log ( s / p ) ( s / p ) 2 1
0.5088
Frequency Transformations
We can design high pass, bandpass, bandstop filters from transformations of low pass filters.
Low Pass to High Pass:
| H ()|
c2
s
c2
H
same value at
c 2
c
H
H
H ( j c )
j
j c
The tranformation
maps
s2 l u
s c
s( u l )
s j l
l 2 l u
c
j c
j l ( u l )
s j u
u 2 l u
c
j c
j u ( u l )
s( u l )
s c 2
s cl
K ( s z1 )( s z2 )...( s zm )
H ( s)
, mn
( s p1 )( s p2 )...( s pn )
then with s F ( s)
we obtain
H T ( s) H F ( s)
K F ( s) z1 ... F ( s) zm
F ( s) p ... F ( s) p
1
F ( s) zk , k 1,..., m
F ( s) p j , j 1,..., n
CHEB1AP
CHEB2AP
BUTTER
CHEBY1
CHEBY2
BUTTORD
CHEBY1ORD
CHEBY2ORD
Example. We want to design an IIR Digital Filter with the following specifications:
Pass Band
Stop Band
In our case:
[N, fc]=butterord(4/20, 8/20, 1, 40),
4
p 2
rad
40 5
8 2
s 2
rad
40 5
p 2(40 10 ) tan
26 103 rad / sec
10
3
58 103 rad / sec
5
H ( )
1
p
2N
with
and
1
20 log10
2
1
1
2
1 0.5
10 log10
1
s
1 0.5
p
2
with
s 58
p 26
yields
N=7
2N
40
H ( c )
Which yields
26 103
2
1 0.5
14
28.7
c 2atan
0.6889 radians
2 40
Step 6: the desired Filter is obtained by the function
[num, den] = butter( 7 , 0.6889/)