Sale!

# EEL 3135– Lab #08 solution

\$30.00

Full Name:
EEL 3135– Lab #08
Question #1: (Z-transform, Filtering, and Magnitude Response)
with the corresponding descriptions. This is designed to show you how to visualize the IIR filters
in the z-domain in MATLAB.
comments. You will use elements of this MATLAB code for the rest of the lab assignment.
Question #2: (Design Nulling Filters in Z-Domain)

Category:

## Description

5/5 - (1 vote)

Full Name:
EEL 3135– Lab #08
Question #1: (Z-transform, Filtering, and Magnitude Response)
with the corresponding descriptions. This is designed to show you how to visualize the IIR filters
in the z-domain in MATLAB.
comments. You will use elements of this MATLAB code for the rest of the lab assignment.
Question #2: (Design Nulling Filters in Z-Domain)
In Lab 6, you used the nulling filters to remove noise. In this question, you will study how to design
the nulling filters in z-domain. For the following transfer functions, plot the magnitude repsonses
and pole-zero plots for ω0 = 0, π/4, and π/2.
(a) Ha(z) = (1 − e
jω0 z
−1
)(1 − e
−jω0 z
−1
)
(b) Hb(z) = 1
(1−(2/3)e
jω0 z−1)(1−(2/3)e−jω0 z−1)
Question #3: (More Z-transform, Filtering, and Magnitude Response)
(a) What kind of filters are Ha(z) and Hb(z)? Are they a low-pass filter, high-pass filter, bandpass filter, band-stop (or notch) filter, all-pass filter, or none-of-the-above?
(b) State whether each filter is an FIR filter or an IIR filter.
(c) How does changing ω0 affect the poles and zeros?
Question #4: (IIR Filters in Z-Domain)
H(z) = H0(z)H1(z)· · · HM−1(z)
or equivalently in time
x[n] = x0[n] ∗ x1[n] ∗ . . . ∗ xM−1[n]
is a powerful tool because each simple filter dictates the location of each pole and zero. In this
problem, we will use this concept to design complex IIR filters. Consider the signal defined by
1
N = 100; n = 0:(N-1);
x = cos( (pi/8)*n ) + cos( (3*pi/8)*n ) + cos( (pi/4)*n ) + …
cos( (5*pi/8)*n ) + cos( (pi/2)*n ) + cos( (3*pi/4)*n );
(a) Use filter Ha(z) from Question #2 to remove the π/2 frequency from x[n]. Plot the magnitude
of the DTFT of x[n] before and after applying the nulling filter.
(b) Cascade the filter from (a) with two Hb(z) filters from Question #2: one with ω0 = 3π/8
and one with ω0 = 5π/8. Cascade the three filters and apply to x[n]. Use Question #1 as a
guide. Plot the magnitude of the DTFT of x[n] before and after applying the nulling filter.
(a)? Why / how?
(d) Now use cascading to remove all but one frequency from x[n]. That is, keep ωb = π/2. Plot
the magnitude of the DTFT of x[n] before and after applying the new filter.
N = 1000; n = 0:N-1;
x = [cos( (pi/8)*n ) cos( (3*pi/8)*n ) cos( (pi/4)*n ) …
cos( (5*pi/8)*n ) cos( (pi/2)*n ) cos( (3*pi/4)*n )];
With your filter from (d), use soundsc to play x[n] and y[n] with a sampling rate of
fs = 2000. Turn in a .wav file of this audio output along with your PDF.
Question #5: (Designing a better Nulling Filter)
Consider the following transfer function:
H(z) = (1 − e
jωb0 z
−1)(1 − e
−jωb0 z
−1)
(1 − αejωb0 z−1)(1 − αe−jωb0 z−1),
This filter is called a notch filter, where ωb0 represents the normalized radian frequency of the
notch and α to be a positive real number that determines the ”sharpness” of the filter.
(a) Answer in your comments: State the range for α for which the filter above is stable.
(b) Plot two pole-zero plots for the H(z). Choose ωb0 to be the frequency that you determined
in Lab 6, question 4. For the first plot, choose a value of α that makes the filter stable, and
for the second, choose a value of α that makes the filter unstable.