Professional Documents
Culture Documents
University of Arkansas
Dr. Jingxian Wu
wuj@uark.edu
2
OUTLINE
• FIR and IIR Filters
• Filter Structures
• Analog Filters
N M
Y ( z ) ak Y ( z ) z k
bk X ( z ) z k
k 1 k 0
Y ( z) k
b z k
H ( z) k 0
N
1 ak z k
X ( z)
k 1
4
FIR V.S. IIR
• Finite impulse response (FIR)
– difference equation in the time domain
M
y (n) bk x(n k )
k 0
Y ( z) M
H ( z) bk z k
X ( z ) k 0
– Impulse response
h(n) [b0 , b1 , , bM ]
Y ( z) k
b z k
H ( z) k 0
N
1 ak z k
X ( z)
k 1
• Filter Structures
• Analog Filters
H ( z ) H1 ( z ) H 2 ( z ) H K ( z )
• Where
H k ( z ) bk 0 bk1 z 1 bk 2 z 2
12
FILTER STRUCTURE: FIR
• Example
– Draw the direct-form and cascade-form structures of the following filter
H ( z ) (1 2 z 1 3z 2 )( 2 5z 2 )
13
FILTER STRUCTURE: IIR
• An IIR filter can be implemented in various structures
– Direct-form I
– Direct-form II
– Transposed structure
– Cascade-form structure
– Parallel-form structure
– Lattice structure
– ……
14
FILTER STRUCTURE: IIR
• IIR: Direct-form I M
k
b z k
H ( z) k 0
N
H1 ( z ) H 2 ( z )
1 ak z k
k 1
M
1
H1 ( z ) bk z k
H 2 ( z) N
k 0
1 ak z k
k 1
15
FILTER STRUCTURE: IIR
• IIR: Direct-form I
M
H1 ( z ) bk z k
k 0
1
H 2 ( z) N
1 ak z k
k 1
16
FILTER STRUCTURE: IIR
• IIR: Direct-form II
– Put H 2 ( z ) before H1 ( z )
H ( z ) H 2 ( z ) H1 ( z )
1
• Difference equation of H 2 ( z) N
1 ak z k
k 1
N
w(n) ak w(n k ) x(n)
k 1
M
• Difference equation of H1 ( z ) bk z k
k 0
M
y (n) bk w(n k )
k 0
• Both involve the delay of w(n)
17
FILTER STRUCTURE: IIR
• IIR: Direct-form II
18
FILTER STRUCTURE: IIR
• IIR: Transposed structure
– Transposition theorem: For a given filter structure, if we apply the
following transposition: (1) reverse the direction of all signal flows; (2)
replace all the adders with intersections, and vice versa; and (3)
interchange the input and output, then the transposed system is the same
as the original system.
19
FILTER STRUCTURE: IIR
• IIR: transposed structure of direct-form II
20
FILTER STRUCTURE
• Example
– Draw the direct-form I, direct-form II, and transposed direct-form II of the
filter
1 1
y ( n ) y ( n 2) x ( n ) x ( n 1)
4 3
21
FILTER STRUCTURE
• Example
– Find the difference equation and transfer function of the filter
– Represent the filter in direct-form II
22
OUTLINE
• FIR and IIR Filters
• Filter Structures
• Analog Filters
1 1 H ( ) 1 1 , p
H ( ) 2 , s
25
ANALOG FILTERS
• Butterworth filter
1
H ( )
2
1 2N
26
ANALOG FILTERS
• The Chebyshev Filter
1
H ( )
2
1 2C N ( )
cos( N cos 1 ), | | 1
C N ( )
cosh( N cosh ), | | 1
1
27
OUTLINE
• FIR and IIR Filters
• Filter Structures
• Analog Filters
• Where A is a constant
• The phase: A , is a linear function of
– Example
• Is the following filter a linear phase filter?
y (n) x(n n0 )
29
FIR FILTER DESIGN
• Linear phase filter (Cont’d)
H () | H () | e jA
– A linear phase filter introduces the same amount of delay, A, to all the
frequencies (the same group delay)
• If the phase is not linear, then frequency components at different
frequencies will experience different delays phase distortion
– A subset of FIR filters can have linear phase
• IIR filters do not have linear phase IIR filter will introduce phase
distortion
• Not all FIR filters have linear phase
30
FIR FILTER DESIGN
• Linear phase filter
– If a length-N FIR filter is symmetric with the middle of the filter, i.e.
h( n) h( N 1 n)
• Then the filter has linear phase
– Example
h(n) = [1 2 3 3 2 1], h(n) = [1 2 3 4 3 2 1], h(n) = [2, 0, 0, 2]
– Proof
31
FIR FILTER DESIGN
• FIR filter design with window
– 1. Find the desired frequency response (DTFT) H d ()
– 2. Perform Inverse DTFT, find the impulse response hd (n)
• The impulse response usually has infinite length
– 3. truncate hd (n) to finite length by multiplying it with a window function w(n)
• E.g. rectangular window 1, 0 n N 1
w(n)
0, otherwise
h(n) hd n ( N 1) / 2w(n)
% cut-off frequency
Omega_c = 0.2*pi;
n = [-(N-1)/2:(N-1)/2];
% impulse response
hdn = Omega_c/pi*sinc(Omega_c/pi*n);
hn = hdn.*wd;
34
OUTLINE
• FIR and IIR Filters
• Filter Structures
• Analog Filters
• Then the impulse response and DTFT of the IIR filter are
h(n) ha (nT )
1 2n
H () H a
T n T T
z exp(Ts )
1
s log z
T
37
IIR FILTER DESIGN
• Method 2: Bilinear transformation
– Use bilinear transformation to overcome aliasing
2 1 z 1 1 (T / 2) s
s z
T 1 z 1 1 (T / 2) s
2
tan
T 2
– Procedure:
• 1. From the digital filter specifications, find the corresponding analog
filter specifications by using the bilinear transformation
2
tan
T 2
% transfer function
[num,den] = zp2tf(z,p,k); % poles & zeros to transfer
function
freqz(numd, dend)