Professional Documents
Culture Documents
EENG 5610: Digital Signal Processing: Class 10: Design of Digital Filters
EENG 5610: Digital Signal Processing: Class 10: Design of Digital Filters
EENG 5610: Digital Signal Processing: Class 10: Design of Digital Filters
Outline
General Considerations
Design of FIR Filters
Design of IIR Filters from Analog Filters
Dr. Xinrong Li
General Considerations
The objective of this class:
To provide the background necessary to select the filter that best
including Matlab.
M 1
k 1
k 0
y ( n) ak y ( n k ) bk x(n k ),
H ( w)
b e
k 0
N
1 ak e jwk
k 1
Dr. Xinrong Li
jwk
Dr. Xinrong Li
y ( n) bk x( n k ),
k 0
M 1
y (n) h( k ) x(n k ),
k 0
Dr. Xinrong Li
M 1
H ( z ) h( k ) z k
k 0
H d ( w) hd (n)e jwn ,
n 0
hd (n)
1
2
H d ( w)e jwn dw
1
n M 1; hd(n) with Marectangular
1, ifto0multiplying
sin( wM / 2)
equivalent
window
jwn
jw ( M 1) / 2function:
W ( w) w(n)e
0
,
otherwise.
n0
hd (n), if 0 n M 1;
h(n) hd (n) w(n)
0, otherwise.
1
H ( w)
H d ( w)W ( w v)dv
2
w(n)
sin( w / 2)
increased, W(w) becomes narrower, and the smoothing effect is then reduced.
The large sidelobes of W(w) results in some undesirable ringing effects in the FIR
filter frequency response H(w) and also in relatively larger sidelobes in H(w).
These issues with the rectangular window function can be alleviated by the
provide more smoothing and thus the transition region in the FIR filter is wider.
To reduce the width of the transition region, the length of the window M can be
simply increased, which results in a larger filter.
Sampling Method
In the frequency-sampling method, we specify the desired frequency
2
(k ),
M
0 k ( M 1) / 2 for M odd
,
M
/
2
1
for
M
even
1
and 0 or ,
2
H ( w) h(n)e jwn
n 0
M 1
2
j 2 ( k ) n / M
, 0 k M 1
H (k ) H ( M (k )) h( n)e
n 0
M 1
h(n) 1
H (k )e j 2 ( k ) n / M , 0 n M 1
M k 0
for Li
M odd and M/2 points for M even.
Dr. Xinrong
The major advantage of this method lies in the efficient frequency sampling
the lack of precise control of the critical frequencies, e.g. wp and ws.
The new method is based on Chebyshev approximation problem.
The weighted approximation error between the desired and the actual
H ( w) H r ( w)e j ( w)
1 1 H r ( w) 1 1 ,
2 H r ( w) 2 ,
|w| w p
|w| ws
Dr. Xinrong Li
this method is optimum in the sense that for a given set of specifications,
the maximum sidelobe level is minimized.
In this method, we need to specify M, wp, ws, and the ratio 2/1.
However, it is more natural to specify wp, ws, 1 and 2. and then
B( s) M
d k y (t ) M
d k x(t )
k
k
st
H a ( s)
k s k s , H a ( s ) h(t )e dt , k
k
k
A( s ) k 0
dt
dt k
k 0
k 0
k 0
An analog LTI system H(s) is stable if all its poles lie in the left half of
the s-plane. Thus, the conversion of analog filters to digital filters must
possess the following properties:
The j axis in the s-plane should map into the unit circle in the z-plane.
The left-half plane (LHP) of the s-plane should map into the inside of the
H(z) = z-NH(z-1), which means the filter would have a mirror-image pole
outside the unit circle for every pole inside the unit circle. Hence the filter
would be unstable.
Dr. Xinrong Li
k
k
dt
dt
k 0
k 0
N
dy (t )
y (n) y (n 1)
dt t nT
T
H(z) = (1 z-1)/T.
In frequency domain, s = (1 z1)/T and similarly, sk = [(1 z1)/T]k.
Thus, the system function of digital IIR filter obtained as a result of the
M
Nis:
approximation of the derivatives by B
finite
( s ) differences
k
H ( z ) H a ( s ) s (1 z ) / T ,
H a (s)
k s k s k
A( s ) k 0
k 0
1
z 1 /(1 sT )
A stable analog filter is transformed into a stable digital filter.
But, the possible location of the poles of the digital filter are confined to
relatively small frequencies as shown in the figure.
Thus, the mapping method is restricted to the design of lowpass and
bandpass filters having relatively small resonant frequencies; it is not
possible to transform a highpass analog filter to a corresponding highpass
digital filter using this method.
Dr. Xinrong Li
H [( f k ) F ],
H ( w) Fs
H [(w 2k ) F ],
1
2k
H ( T ) H a (
)
T k
T
numerical integration
2 1 z 1
,
s
1
T 1 z
H a ( s ) H ( z ),
s j
The LHP (RHP) in s-domain maps into the inside (outside) of the unit
circle in z-domain.
When
2r=
sin1,wthen 2 = 0wand
T 1 cos w
T
tan , w 2 tan 1 (
)
T
2
2
Frequency Transformations
In general, lowpass analog IIR filters are designed first. Then,
lowpass analog filter should be converted to digital lowpass filter and then
frequency transformation is performed in digital domain because these two
methods are not suitable for designing highpass and many bandpass filters due to
the aliasing problem.
For the bilinear transformation method, where aliasing is not an issue, frequency
transformation can be in either analog or digital domain.