Date post: | 02-Jun-2018 |
Category: |
Documents |
Upload: | hasanalbannabhuiyan |
View: | 214 times |
Download: | 0 times |
of 32
8/10/2019 ECR305_L11
1/32
1
Digital Signal Processing
Objectives
To learn and understanddesign procedure of IIR filter.the frequency response, and its
properties of IIR filter.
Lecture
11
IIR FilterDesign
ECR 305_L11
8/10/2019 ECR305_L11
2/32
2
IIR filter design technique
IIR filters have infinite-duration impulse responses, hence theycan be matched to analog filters , all of which generally haveinfinitely long impulse responses.
Therefore, the basic technique of IIR filter design is to transformanalog filters into digital filters using complex-valued mappings,which is called the analog-to-digital (A/D) filter transformation.
We need to apply frequency-band transformations to lowpassfilters in order to design other frequency-selective filters(highpass, bandpass, bandstop, etc.).
ECR 305_L11
8/10/2019 ECR305_L11
3/32
3
IIR filter design technique contd..)
Two approaches of basic IIR filter design technique :
The main problem with these approaches is that we have no controlover the phase characteristics of the IIR filter. Hence IIR filter designswill be treated as magnitude-only designs.
ECR 305_L11
8/10/2019 ECR305_L11
4/32
4
IIR filter design technique contd..)
IIR filter design technique we will follow the following steps:
Design analog lowpass filters.Study and apply filter transformations to obtain digitallowpass filters.Study and apply frequency-band transformations to obtain
other digital filters from digital lowpass filters.
There are three widely used prototype analog fi l ters :Butterworth filters
Chebyshev filtersChebyshev type-IChebychev type-II
Elliptic filters.
ECR 305_L11
8/10/2019 ECR305_L11
5/32
8/10/2019 ECR305_L11
6/32
6
Magnitude squared-response contd..)
The specifications are shown in Fig. below, from which we
observe that | H a( j )|2 must satisfy
sa
pa
A j H
j H
at,1
at
1
1
2
2
2
2
ECR 305_L11
8/10/2019 ECR305_L11
7/32
7
Magnitude squared-response contd..)
The parameters and A are related to parameter R p and A s as
The ripples 1 and 2 are related to and A by
1101
1log10 10/210 p
R p R
20210 10
110 /log s A s A
A
A
1
12
1
1
1
2
1
1
1
1
2
1
1
2 111
A
A
ECR 305_L11
8/10/2019 ECR305_L11
8/32
8
Butterworth lowpass filter
The magnitude-squared response for an N -th order Butterworth
lowpass filter is given by
where c is the cutoff frequency in rad/sec. The plot of themagnitude-squared response is shown below:
N
c
a j H 22
1
1
ECR 305_L11
8/10/2019 ECR305_L11
9/32
9
Butterworth lowpass filter contd..)
From this plot we can observe the following properties:
At = 0, | H a( j0)|2 = 1 for all N .At = c, | H a( j )|2 = for all N , which implies a 3 dB attenuation at c.
| H a( j )|2 is a monotonically decreasing function of .
| H a( j )|2 approaches an ideal lowpass filter as N .
| H a( j )|2 is maximally flat at = 0 since the derivative of all order existand are equal to zero.
ECR 305_L11
8/10/2019 ECR305_L11
10/32
10
Butterworth lowpass filter contd..)
The main properties of | H a( j )|2 is
To determine the system function
Finally,
with for odd N
for even N
j s
aaa j H s H s H /
2
N c N N
c N
c
j saaa j s
j
j s
j H s H s H 22
2
2/
2
1
1
k N c
a p s s H
po lesLHP
12,....,1,0,/ N k e p N jk ck
12,....,1,0,2
N k e p N k
N j
ck
ECR 305_L11
8/10/2019 ECR305_L11
11/32
11
Example-1
Given that . Determine the analog filter
system function H a( s).
Solution: Given
Hence N = 3, c = 0.5.
since N is odd
62
6411
j H a
32326
2
5.01
1211
6411
j H a
ECR 305_L11
12,....,1,0,/ N k e p N jk ck
5050 300 .. / je p 433.025.05.0 3/11 je p j
433.025.05.0 3/22 je p j 5.05.0 3/33 je p
433.025.05.0 3/44 je p j 433.025.05.0 3/55 je p j
8/10/2019 ECR305_L11
12/32
12
Example-1 contd..)
25050501250
43302505043302501250
50
2
432
3
....
.....
.
.
polesLHP
s s s
j s s j s
p s p s p s p s s H k
N c
a
ECR 305_L11
Poles in the left-hand plane are:
The analog filter system functions:
-0.25 + j 0.433
-0.25 j 0.433-0.50
8/10/2019 ECR305_L11
13/32
13
Design equations
The analog lowpass filteris specified by the parameters p, RP , s,and As.
Therefore the essence ofthe design in the case of
Butterworth filter is toobtain the order N and thecutoff frequency c.
p N
c
p
pa p
R
R j H
210
2
10
1
1log10or
log10,at
s N
c
s
sa s
A
A j H
210
2
10
1
1log10or
log10,at
ECR 305_L11
8/10/2019 ECR305_L11
14/32
14
Design equations contd..)
Solving for N , c and s , we have
To satisfy the specifications exactly at p,
or To satisfy the specifications exactly at s,
s p
A R s p
N /log2
110/110log
10
10/10/10
N R p
c p2 10/ 110
N A s
c s2 10/ 110
ECR 305_L11
Assignment-9(due on next class)
8/10/2019 ECR305_L11
15/32
15
Example-2
Design a lowpass Butterworth filter to satisfy:
p = 0.2 s = 0.3 R p = 7 dB A s = 16 dBSolution:
Filter order
To satisfy the specifications exactly at p,
397.23.0/2.0log2
110/110log
10
10/1610/710
N
4985.0
110
2.0
110 6 10/72 10/
N R
pc
p
ECR 305_L11
8/10/2019 ECR305_L11
16/32
16
Example-2
To satisfy the specifications exactly at s,
We can choose any c between the above two numbers. Let us
choose c = 0.5.
Therefore, we have to design a Butterworth filter with N = 3 andc = 0.5, which we did in example-1.
Hence 25.05.05.0125.0
2 s s s s H a
ECR 305_L11
5122.0
1103.0
110 6 10/162 10/
N A
sc
s
8/10/2019 ECR305_L11
17/32
17
Chebyshev lowpass filter
There are two types of Chebyshev filters:Chebyshev-I: These filters have equiripple response in the passband .
Chebyshev-II: These filters have equiripple response in the stopband.
Butterworth filters have monotonic response in both bands.
We noted that by choosing a filter that has an equiripple ratherthan a monotonic behavior, we can obtain a lower-order filter.
Therefore, Chebyshev filters provide lower order thanButterworth filters for the same specifications.
ECR 305_L11
8/10/2019 ECR305_L11
18/32
18
Chebyshev lowpass filter contd..)
The magnitude-squared response of a Chebyshev-I filter is
where N is the order of the filter, E is the passband ripple factor,which is related to R p , and T N ( x) is the N th-order Chebyshev
polynomial given by
c N
a
T
j H 22
2
1
1
c N x
x
x
x N
x N xT where
1
10
,coshcosh
,coscos1
1
ECR 305_L11
8/10/2019 ECR305_L11
19/32
19
Chebyshev lowpass filter contd..) ECR 305_L11
8/10/2019 ECR305_L11
20/32
20
MATLAB implementation
MATLABExamples
ECR 305_L11
8/10/2019 ECR305_L11
21/32
21
MATLAB implementation
MATLAB provides a function called [z, p, k] =buttap (N) todesign a normalized (i.e. c = 1) Butterworth analog prototypefilter of order N, which returns zeros in z array, poles in p array,and the gain value k .
However, we need an unnormalized Butterworth filter witharbitrary c. But we have to scale the array p of the normalizedfilter by c, and the gain k by c N.
In the following function, called U_buttap (N, Omegac) , wedesign the unnormalized Butterworth analog prototype filter.
ECR 305_L11
8/10/2019 ECR305_L11
22/32
22
u_buttap function
function [b,a] = u_buttap(N, Omegac);
% Unnormalized Butterworth lowpass filter prototype% --------------------------------------------------
% b = numerator polynomial coefficients of Ha(s)% a = denominator polynomial coefficients of Ha(s)% N = Butterworth filter order% Omegac = cutoff frequency in radian per sec
[z,p,k] = buttap(N); p = p*Omegac;k = k*Omegac^N;B = real(poly(z));
b0 = k; b = k*B;a = real(poly(p));
ECR 305_L11
8/10/2019 ECR305_L11
23/32
23
Example 8.1
Given that . Determine the analog filter
system function H a( s).
Solution: Given
Hence N = 3, c = 0.5.
62
6411
j H a
32326
2
5.01
1211
6411
j H a
% File name ex8p1.m% Definition
N = 3;Omegac = 0.5;
% Calculation[z,p,k] = buttap(N);
p = p*Omegack = k*Omegac^N
p =
-0.2500 + 0.4330i-0.2500 - 0.4330i
-0.5000
k =
0.1250
ECR 305_L11
8/10/2019 ECR305_L11
24/32
24
Example 8.1 contd..)
25.05.05.0125.0
433.025.05.0433.025.0125.0
5.0
2
432
3
po lesLHP
s s s
j s s j s
p s p s p s
p s s H
k
N c
a
ECR 305_L11
l
8/10/2019 ECR305_L11
25/32
25
Example 8.3
Design a lowpass Butterworth filter to satisfy:
p = 0.2 s = 0.3 R p = 7 dB A s = 16 dBSolution: Filter order
To satisfy the specifications exactly at p,
To satisfy the specifications exactly at s,
397.2
3.0/2.0log2110/110log
10
10/1610/710
N
4985.0
110
2.0
110 6 10/72 10/
N R
pc
p
5122.0
110
3.0
110 6 10/162 10/
N A
sc
s
ECR 305_L11
8/10/2019 ECR305_L11
26/32
fd b f i
8/10/2019 ECR305_L11
27/32
27
afd_butt function
% File name: afd_butt.m
function [b,a] = afd_butt(Wp,Ws,Rp,As);
% Analog Lowpass Filter Design: Butterworth
% ------------------------------------------------% b = numerator coefficients of Ha(s)% a = denominator coefficients of Ha(s)% Wp = Passband edge frequency in rad/sec; Wp>0
% Ws = Stopband edge frequency in rad/sec; Ws>Wp>0% Rp = Passband ripple in +dB; Rp>0% As = Stopband ettenuation in +dB; As>0% ------------------------------------------------
ECR 305_L11
fd b f i d )
8/10/2019 ECR305_L11
28/32
28
afd_butt function contd..)
if Wp
8/10/2019 ECR305_L11
29/32
29
Example 8.3 contd..)
% File name: ex8p3.m% DefinitionWp = 0.2*pi; Ws = 0.3*pi; Rp = 7; As = 16;
% Analog filter design[b,a] = afd_butt(Wp,Ws,Rp,As)
% Frequency responsewmax = 0.5*pi; w = [0:500]*wmax/500;H = freqs(b,a,w);mag = abs(H); pha = angle(H);db = 20*log10((mag+eps)/max(mag));
% Plotting plot(w/pi,db); gridxlabel('Frequency in pi units','fontsize',15);ylabel('Decibel','fontsize',15);
ECR 305_L11
E l 8 3 td ) ECR 305 L11
8/10/2019 ECR305_L11
30/32
30
Example 8.3 contd..)
N = 3
b = 0.1238
a = 1.0000 0.9969 0.4969 0.1238
ECR 305_L11
R f ECR 305 L11
8/10/2019 ECR305_L11
31/32
31
References
1. Vinay K. Ingle, and John G. Proakis, Di gital SignalProcessing using M ATL AB , Thomson LearningBookware Companion Series, 2007. (pp. 313 385)
ECR 305_L11
N t l ECR 305 L11
8/10/2019 ECR305_L11
32/32
32
Next class..
Filter Bank
ECR 305_L11