Laboratory Exercise 4: Linear, Time Invariant Discrete Time Systems: Frequency Domain Representations
Laboratory Exercise 4: Linear, Time Invariant Discrete Time Systems: Frequency Domain Representations
Name:
Section:
Laboratory Exercise 4
LINEAR, TIMEINVARIANT DISCRETETIME SYSTEMS:
FREQUENCYDOMAIN REPRESENTATIONS
Answers:
Q4.1 The modified Program P3_1 to compute and plot the magnitude and phase spectra
of a moving average filter of Eq. (2.13) for 0 2 is shown below:
< Insert program code here. Copy from m-file(s) and paste. >
This program was run for the following three different values of M and the plots of
the corresponding frequency responses are shown below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
The types of symmetries exhibited by the magnitude and phase spectra are due to
Q4.2 The plot of the frequency response of the causal LTI discrete-time system of
Question Q4.2 obtained using the modified program is given below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
Q4.3 The plot of the frequency response of the causal LTI discrete-time system of
Question Q4.3 obtained using the modified program is given below :
1
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
The difference between the two filters of Questions 4.2 and 4.3 is
I shall choose the filter of Question Q4.___ for the following reason
Q4.4 The group delay of the filter specified in Question Q4.4 and obtained using the
function grpdelay is shown below:
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
Q4.5 The plots of the first 100 samples of the impulse responses of the two filters of
Questions 4.2 and 4.3 obtained using the program developed in Question Q3.50
are shown below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
Q4.6 The pole-zero plots of the two filters of Questions 4.2 and 4.3 developed using
zplane are shown below:
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
< Insert program code here. Copy from m-file(s) and paste. >
Answers:
Q4.7 The plot of the impulse response of the approximation to the ideal lowpass filter
obtained using Program P4_1 is shown below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
2
The length of the FIR lowpass filter is
Q4.8 The required modifications to Program P4_1 to compute and plot the impulse
response of the FIR lowpass filter of Project 4.2 with a length of 20 and a cutoff
frequency of c = 0.45 are as indicated below :
< Insert program code here. Copy from m-file(s) and paste. >
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
Q4.9 The required modifications to Program P4_1 to compute and plot the impulse
response of the FIR lowpass filter of Project 4.2 with a length of 15 and a cutoff
frequency of c = 0.65 are as indicated below :
< Insert program code here. Copy from m-file(s) and paste. >
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
Q4.10 The MATLAB program to compute and plot the amplitude response of the FIR low-
pass filter of Project 4.2 is given below :
< Insert program code here. Copy from m-file(s) and paste. >
Plots of the amplitude response of the lowpass filter for several values of N are
shown below:
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
< Insert program code here. Copy from m-file(s) and paste. >
Answers:
Q4.11 A plot of the gain response of a length-2 moving average filter obtained using
Program P4_2 is shown below :
3
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From the plot it can be seen that the 3-dB cutoff frequency is at
Q4.12 The required modifications to Program P4_2 to compute and plot the gain response
of a cascade of K length-2 moving average filters are given below :
< Insert program code here. Copy from m-file(s) and paste. >
The plot of the gain response for a cascade of 3 sections obtained using the
modified program is shown below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From the plot it can be seen that the 3-dB cutoff frequency of the cascade is at
Q4.13 The required modifications to Program P4_2 to compute and plot the gain response
of the highpass filter of Eq. (4.42) are given below :
< Insert program code here. Copy from m-file(s) and paste. >
The plot of the gain response for M = 5 obtained using the modified program is
shown below:
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From the plot we can see that the 3-dB cutoff frequency is at
Q4.14 From Eq. (4.16) for a 3-dB cutoff frequency c at 0.45 we obtain =
Substituting this value of in Eqs. (4.15) and (4.17) we arrive at the transfer
function of the first-order IIR lowpass and highpass filters, respectively, given by
HLP(z) =
HHP(z) =
The plots of their gain responses obtained using MATLAB are shown below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From these plots we observe that the designed filters _______ meet the
specifications .
4
A plot of the magnitude response of the sum HLP(z) + HHP(z) obtained using
MATLAB is given below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From this plot we observe that the two filters are
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From this plot we observe that the two filters are
Using this value of in Eq. (4.22) we arrive at the transfer function of the cascade
of 10 IIR lowpass filters as
1 – 1 z 1 10
H LP,10 (z)
2 1 – z 1
Using this value of in Eq. (4.15) we arrive at the transfer function of a first-order
IIR lowpass filter
1 – 1 z 1
H LP,1(z)
2 1 – z 1
The gain responses of H LP,10 (z) and H LP,1(z) plotted using MATLAB are shown
below:
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
5
Substituting 3dB = 0.15 in Eq. (4.20) we get (1 2 )cos(0.15) 2 0,
whose solution yields = and = .
Substituting the value of and the first value of in Eq. (4.18) we arrive at the
transfer function of the IIR bandpass transfer function
HBP,1(z) =
Substituting the value of and the second value of in Eq. (4.18) we arrive at the
transfer function of the IIR bandpass transfer function
HBP,2(z) =
Next using the zplane command we find the pole locations of HBP,1(z) and
HBP,2(z) from which we conclude that the stable transfer function HBP(z) is given
by
The plot of the gain response of the stable transfer function HBP(z) obtained
using MATLAB is shown below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
Using the same value of and in Eq. (4.21) we next obtain the transfer function
of a stable IIR bandstop filter as
HBS(z) =
The plot of the gain response of the transfer function HBS(z) obtained using
MATLAB is shown below:
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From these plots we observe that the designed filters do/do not meet the
specifications .
A plot of the magnitude response of the sum HBP(z) + HBS(z) obtained using
MATLAB is given below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
6
A plot of the sum of the square-magnitude responses of HBP(z) and HBS(z)
obtained using MATLAB is given below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From this plot we observe that the two filters are
Q4.17 The transfer function of a comb filter derived from the prototype FIR lowpass filter
of Eq. (4.38) is given by
G(z) = H0(zL) =
Plots of the magnitude response of the above comb filter for the following values
of L are shown below:
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From these plots we observe that the comb filter has _____ notches at k = _______
= _______and _____ peaks at k = _______ = _______, where k = 0, 1, . . ., _____.
Q4.18 The transfer function of a comb filter derived from the prototype FIR highpass filter
of Eq. (4.41) with M = 2 is given by
G(z) = H1(zL) =
Plots of the magnitude response of the above comb filter for the following values
of L are shown below
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From these plots we observe that the comb filter has _____ notches at k =
_______
< Insert program code here. Copy from m-file(s) and paste. >
The plots of the impulse responses of the four FIR filters generated by running
Program P4_3 are given below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
7
From the plots we make the following observations :
From the zeros of these filters generated by Program P4_3 we observe that :
Plots of the phase response of each of these filters obtained using MATLAB are
shown below:
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From these plots we conclude that each of these filters have __________ phase .
Q4.20 The plots of the impulse responses of the four FIR filters generated by running
Program P4_3 are given below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
8
From the plots we make the following observations :
From the zeros of these filters generated by Program P4_3 we observe that :
Plots of the phase response of each of these filters obtained using MATLAB are
shown below:
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From these plots we conclude that each of these filters have __________ phase .
Answers:
Q4.21 A plot of the magnitude response of H1(z) obtained using MATLAB is shown below :
9
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From this plot we observe that the magnitude response has a maximum at =
with a value =
Since the maximum value of the magnitude response of H1(z) is = , we scale
H1(z) by _____ and arrive at a bounded-real transfer function
H2(z) =
Q4.22 A plot of the magnitude response of G1(z) obtained using MATLAB is shown below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
From this plot we observe that the magnitude response has a maximum at =
with a value =
Since the maximum value of the magnitude response of G1(z) is = , we scale
G1(z) by _____ and arrive at a bounded-real transfer function
G2(z) =
< Insert program code here. Copy from m-file(s) and paste. >
Answers:
Q4.23 The pole-zero plots of H1(z) and H2(z) obtained using zplane are shown below :
< Insert MATLAB figure(s) here. Copy from figure window(s) and
paste. >
10
From the above pole-zero plots we observe that
Q4.24 Using Program P4_4 we tested the stability of H 1(z) and arrive at the following
stability test parameters {ki}:
Using Program P4_4 we tested the stability of H 2(z) and arrive at the following
stability test parameters {ki}:
Q4.25 Using Program P4_4 we tested the root locations of D(z) and arrive at the following
stability test parameters {ki}:
From these parameters we conclude that all roots of D(z) are ________ the unit
circle.
Q4.26 Using Program P4_4 we tested the root locations of D(z) and arrive at the following
stability test parameters {ki}:
From these parameters we conclude that all roots of D(z) are ________ the unit
circle.
Date: Signature:
11