Name: SOLUTION Section:
Laboratory Exercise 7
DIGITAL FILTER DESIGN
7.1 DESIGN OF IIR FILTERS Estimation of IIR Filter Order
Project 7.1 Answers:
From the problem statement of Q7.1, we have FT = 40 kHz, Fp = 4 kHz, Fs = 8 kHz,
R p = 0.5 dB, and Rs = 40 dB.
Q7.1 The normalized passband edge angular frequency Wp is –
ωp =
2πFp FT
40 ×10 ω 0.2π Wp = p = = 0.2 π π
3
=
2π ( 4 ×103 )
=
π = 0.2π. 5
The normalized stopband edge angular frequency Ws is –
3 2πFs 2π ( 8 × 10 ) 2π ωs = = = = 0.
1
Name
: SOLUTION
Section
:
Laboratory Exercise 7
DIGITAL FILTER DESIGN
7.1 DESIGN OF IIR FILTERSProject 7.1 Estimation of IIR Filter OrderAnswers:
From the problem statement of Q7.1, we have 40 kHz,
T
F
=
4 kHz,
p
F
=
8 kHz,
s
F
=
0.5 dB,
p
R
=
and 40 dB.
s
R
=
Q7.1
The normalized passband edge angular frequency
Wp
is
–
( )
33
241020.2.40105
p pT
F F
π ×ππω = = = = π×
0.20.2
p
ω π π π
= = =
Wp
The normalized stopband edge angular frequency
Ws
is
–
( )
33
2810220.4.40105
ssT
F F
π ×ππω = = = = π×
0.40.4
s
ω π π π
= = =
Ws
The desired passband ripple
Rp
is
 0.5 dB
The desired stopband ripple
Rs
is
– 40 dB
(1) Using these values and
buttord
we get the lowest order for a Butterworth lowpass filterto be
– the correct call is
[N, Wn] = buttord(0.2,0.4,0.5,40)
. This givesN=8.
The corresponding normalized passband edge frequency
Wn
is

0.2469,
or
0.2469.
n
ω π
=
(2) Using these values and
cheb1ord
we get the lowest order for a Type 1 Chebyshevlowpass filter to be
 the correct call is
[N, Wn] = cheb1ord(0.2,0.4,0.5,40)
. This gives N=5.
The corresponding normalized passband edge frequency
Wn
is

0.2000,
or
0.2000.
n
ω π
=
2
(3) Using these values and
cheb2ord
we get the lowest order for a Type 2 Chebyshevlowpass filter to be
 the correct call is
[N, Wn] = cheb2ord(0.2,0.4,0.5,40)
. This gives N=5.
The corresponding normalized passband edge frequency
Wn
is

0.4000,
or
0.4000.
n
ω π
=
(4) Using these values and
ellipord
we get the lowest order for an elliptic lowpass filter tobe
 the correct call is
[N, Wn] = ellipord(0.2,0.4,0.5,40)
. This givesN=4 and
Wn = 0.2000
or 0.2000
n
ω = π
.
From the above results we observe that the
Elliptic
filter has the lowest order meeting thespecifications.
Q7.2
The normalized passband edge angular frequency
Wp
is
–
( )
33
21.05010230.6.3.5105
p pT
F F
π ×ππω = = = = π×
0.60.6
p
ω π π π
= = =
Wp
The normalized stopband edge angular frequency
Ws
is
–
( )
33
20.61020.3429.3.510
ssT
F F
π ×πω = = = π×
0.34290.3429
s
ω π π π
= = =
Ws
The desired passband ripple
Rp
is
– 1.0 dB.
The desired stopband ripple
Rs
is
– 50 dB.
(1) Using these values and
buttord
we get the lowest order for a Butterworth highpass filterto be
– the correct call is
[N, Wn] = buttord(Wp,Ws,Rp,Rs).
This gives
N=8.
The corresponding normalized passband edge frequency
Wn
is
–
Wn = 0.5646
, or0.5646.
n
ω π
=
(2) Using these values and
cheb1ord
we get the lowest order for a Type 1 Chebyshevhighpass filter to be
– the correct call is
[N,Wn] = cheb1ord(Wp,Ws,Rp,Rs)
.This gives
N=5.
3
The corresponding normalized passband edge frequency
Wn
is
–
Wn = 0.6000
, or0.6000.
n
ω π
=
(3) Using these values and
cheb2ord
we get the lowest order for a Type 2 Chebyshevhighpass filter to be
– the correct call is
[N,Wn] = cheb2ord(Wp,Ws,Rp,Rs)
.This gives
N=5
.
The corresponding normalized passband edge frequency
Wn
is
–
Wn = 0.3429
, or0.3429.
n
ω π
=
(4) Using these values and
ellipord
we get the lowest order for an elliptic highpass filter tobe
– the correct call is
[N,Wn] = ellipord(Wp,Ws,Rp,Rs)
. This gives
N=4
.The corresponding normalized passband edge frequency
Wn
is –
Wn = 0.6000
, or0.6000.
n
ω π
=
From the above results we observe that the
Elliptic
filter has the lowest order meeting thespecifications.
Q7.3
The normalized passband edge angular frequency
Wp
is
–
( )
3,1,13
21.40010220.4.7105
T
p p
F F
π ×ππω = = = = π×
,1
0.40.4
p
ω π π π
= = =
Wp1
( )
33
,2,2
222.1001030.6.7105
T
p p
F F
ππ ×πω = = = = π×
,2
0.60.6
p
ω π π π
= = =
Wp2
Wp = [Wp1 Wp2] = [0.4000 0.6000]
The normalized stopband edge angular frequency
Ws
is
–
( )
3,1,13
21.05010230.3.71010
T
ss
F F
π ×ππω = = = = π×
,1
0.30.3
s
ω π π π
= = =
Ws1
( )
33
,2,2
22.45010270.7.71010
T
ss
F F
π ×ππω = = = = π×
4
,2
0.70.7
s
ω π π π
= = =
Ws2
Ws = [Ws1 Ws2] = [0.3000 0.7000]
The desired passband ripple
Rp
is
–
0.4 dB.
The desired stopband ripple
Rs
is
– 50 dB.
(1) Using these values and
buttord
we get the lowest order for a Butterworth bandpassfilter to be
– the correct call is
[N,Wn] = buttord(Wp,Ws,Rp,Rs) =buttord([0.4000 0.6000],[0.3000 0.7000],0.4,50)
, which givesOrder =
2N = 18.
The corresponding normalized passband edge frequency
Wn
is
–
Wn = [0.3835 0.6165]
, or
,1
0.3835
n
ω π
=
and
,2
0.6165.
n
ω π
=
(2) Using these values and
cheb1ord
we get the lowest order for a Type 1 Chebyshevbandpass filter to be
– the correct call is
[N,Wn] = cheb1ord(Wp,Ws,Rp,Rs) =cheb1ord([0.40000 0.6000],[0.3000 0.7000],0.4,50)
, which givesOrder
= 2N = 12.
The corresponding normalized passband edge frequency
Wn
is
–
Wn = [0.4000 0.6000]
, or
,1
0.4000
n
ω π
=
and
,2
0.6000.
n
ω π
=
(3) Using these values and
cheb2ord
we get the lowest order for a Type 2 Chebyshevbandpass filter to be
– the correct call is
[N,Wn] = cheb2ord(Wp,Ws,Rp,Rs) =cheb2ord([0.4000 0.6000],[0.3000 0.7000],0.4,50)
, which givesOrder
= 2N = 12.
The corresponding normalized passband edge frequency
Wn
is
–
Wn = [0.3000 0.7000]
, or
,1
0.3000
n
ω π
=
and
,2
0.7000.
n
ω π
=