$29.99
ECE-210-B HW6
Before we get started, a few quick reminders about homework format:
• I didn’t emphasize this much before, but place a header at the top of
each file. This is just good general coding practice. Some points may be
taken off if this is missing in future assignments. E.g., something like the
following is fine:
% ECE210B HW6
% John Doe
clc ; clear ; close all ;
%% ... start rest of code here
For function files, a comment describing the function in the file is also a
good idea.
• You may have to produce a lot of plots, which may become a little repetitive. However, don’t get lazy and forget to label axes and title each plot!
Labels don’t have to be too long, but they should be enough to give an
idea of each plot. This is an important skill for any technical report, so
it’s good to get in the practice now.
• Make sure your code runs without errors before submitting it. E.g., clear
your workspace and run all the sections in a row from the top as a last
check before submitting it.
(The real HW begins on the next page.)
1
This homework deals with digital filters in a low-level sense. You are expected
to know a bit about the z-transform, but if you are not in ECE211 Signals and
Systems, please contact me separately for some additional information on this
homework if you need it. Also consult the extra materials posted in the Teams.
1. For this question, you will work with the discrete-time system described
by the following transfer function:
H(z) =
1
2 +
2
3
z +
3
7
z
2
3 + 1
3
z +
1
2
z
3
(a) Store the transfer function in coefficient vectors b and a for the numerator and denominator, respectively.
Be very careful setting this up. See help zplane to see the format
that zplane expects the polynomial functions to be in. (Hint: you
may need to left-pad one of a or b with zero(s).)
(b) Plot the poles and zeros of this system using a MATLAB function
and the transfer function coefficients.
(For those taking ECE211.) List the ROCs (regions of convergence)
and for each state if it is causal and/or stable.
(c) Compute the poles and zeros of this system using a MATLAB function. (Make sure to choose the one for discrete systems, not for
continuous-time systems.) Do these poles and zeros match what you
saw in the previous question?
(Optional.) Calculate the poles and zeros by hand and verify once
again that these are correct.
(d) Compute the first 32 samples of the impulse response of this transfer
function using a MATLAB function and save this to a variable h.
(e) Generate a 64-length vector x[n] =
−
5
6
n
, 0 ≤ n < 64. This is an
arbitrary discrete-time signal. Show the result of applying the filter
with transfer function H(z) to this signal by:
i. Using filter.
ii. Convolution in the time-domain with the impulse response.
iii. (Optional.) Multiplication in the z-domain. Show your work.
(Note that you can use impz to take inverse Z-transform of a
rational function.)
Do your output signals match? (Note that conv will produce a vector of different length than x – this is inconsequential and you can
truncate it to the correct length.)