Next: Lab 3
Up: EEE 407/591 - Digital Previous: Part 2: Discrete Time
The objective of this lab is to provide
hands-on experiences on z-domain representations of Signals and LTI systems and
to expose students to relationships of pole/zero locations with the frequency
response. Once the relationship between the pole-zero plot and magnitude
response is understood, a filter with a desired magnitude response can be
designed by appropriately placing its poles and zeros in the Z-plane.
Finally, a system in which the effects of the poles and zeros cancel each other
will be examined.
For each problem you should save the
required graphs in gif format. Make a note of the filter coefficients that you
use in each problem so you can answer the questions in the Lab Quiz on Canvas. It
may be a good idea to look at the quiz for this lab before getting started to
know what is required.
For this lab, use the J-DSP HTML5 program. To become familiar with it, we recommend that you
first work through the Introduction on J-DSP
(Introduction on J-DSP HTML5).
The z-transform of the impulse response of
a LTI system can be written in the following form:
This is also known as the transfer
function of the system. The am's and the bl's are called
the filter coefficients of the system with a0 always being equal to
one. To create an LTI system with J-DSP, first, determine the z-transform of
the system's impulse response h[n] and then determine the filter
coefficients from this z-domain function and enter them into a coefficient
block in J-DSP. If the input to a filter block is x[n], then
the output will be
where * denotes convolution. If the input
to the filter block is an impulse, the output will be the inverse
z-transform of the transfer function, i.e., h[n]. Besides the filter
block, other J-DSP blocks that will be useful in this lab include the Signal
Generator Block, the coeff. block, the plot block , the FFT
block, the PZ placement block, and the Freq-Resp block. For all
frequency responses in this lab, you can either apply a Fast Fourier Transform of
size 256 on the time domain impulse response of the filter followed by a plot
block to visualize the magnitude and phase responses in the frequency domain or you can directly use
Freq-Resp block in conjunction with the coefficients block.
You can get information for each block from
the help dialog box provided in each block interface. Here we are providing the
descriptions of three blocks that are found in "Filter Blocks"
menu in the "EXISTING FUNCTIONS" list of J-DSP editor.
The PZ Placement. This block can
be used to create a pole-zero plot. The PZ Placement block can be
connected to either the bottom of a filter block or to a Freq-Resp
block. Connecting the PZ Placement block to the bottom of a filter
block will automatically set the filter coefficients of that filter
block so that its poles and zeros are at the locations specified in the PZ
Placement block. Connecting the PZ Placement block to a Freq-Resp
block will display, in the Freq-Resp window, the frequency response of the
filter having poles and zeros as specified in the PZ Placement
block.
Using PZ-Placement block for J-DSP HTML5
Poles and zeros can be placed on the plot
by using either the mouse or the keyboard. To place press the "Add
Pole" or "Add Zero" and then click on the plot in the
desired location of the pole or zero repectively. To place poles and zeros using the
keyboard, press the "Add Pole" or "Add Zero". You can select either X-Y or Polar coordinates.
Enter the location on the right edge of the window using the keyboard and then press the add button. To delete pole(s) or zero(s), select the
pole(s) or zero(s) to be deleted on the plot by clicking on it and then press
the delete button at the bottom of the window. To move a pole or zero, click on
the pole(s) or zero(s) in the plot and while holding the mouse button drag
it to a new location. The reset button will erase all the poles and zeros from
the plot.
Using PZ-Placement block for J-DSP
Poles and zeros can be placed on the plot
by using either the mouse or the keyboard. To place them using the mouse,
select "graphical" from the pop-down menu, press the "Add
Pole" or "Add Zero" button and then click on the plot in the
desired location of the zero or pole. To place poles and zeros using the
keyboard, select one of the manual options from the pop-down menu, choose
either the pole or zero radio button, enter the location using the keyboard and
press the enter button on the right edge of the window. Please note that
because of the graphical interface the positions of poles and zeros are on a
grid and hence the entered values may change according to the grid values If
you want to avoid changes in manually entered roots, then avoid switching from
manual to graphical and vice versa. To delete pole(s) or zero(s), select the
pole(s) or zero(s) to be deleted on the plot by clicking on it and then press
the delete button at the bottom of the window. To move a pole or zero, click on
the pole(s) or zero(s) in the plot and while holding the mouse button drag
it to a new location. The reset button will erase all the poles and zeros from
the plot.
The Freq-Resp block. The Freq-Resp
block can be connected to the top of a filter block, to a PZ Placement
block as explained above, or to a filter design block such as IIR
Fltr, FIR Fltr or Kaiser. The Freq-Resp block will show the
frequency response of the filter to which it is connected or if connected to
the PZ Placement block, the frequency response of a filter having
poles and zeros specified in the PZ Placement block.
The PZ-Plot block. Connect
the PZ-Plot block to the top of a filter block to see a
plot of the poles and zeros of that filter or to any of the filter design
blocks to see a plot of their poles and zeros. The filter design blocks
include FIR Design, IIR Design, Kaiser Design, Parks-McClellan, Freq. Sampling,
LMS.
For this lab, use the J-DSP HTML5 program.Click
the link below
Problem
1: Exponential Sequences
·
(a)
Design and simulate a digital filter that has the impulse response
Save
the block diagram of your system as graph1
Obtain graphs of the following using JDSP:
- The impulse response (Save the impulse response as graph2)
- The magnitude of the frequency response on a linear scale. Use the
Fast Fourier Transform (FFT) of size 256. (Save the magnitude response as graph3)
·
(b)
Redo (a) for
(Save
impulse response as graph4)
(Save magnitude response plotted on a linear scale as graph5)
Problem 2:
Digital Oscillator
Design and simulate a digital oscillator
where the impulse response has the form
with
Obtain a graph of the frequency response
using a linear scale. Use the FFT block of size 256. (Save the graph as graph6)
Problem
3:
Consider a system whose impulse response
is:
The input signal to the system is
Do the following which will include 3
graphs.
·
(i)
Simulate y[n] = x[n]*h[n] when . To
generate x[n], open the signal generator block. Set the signal to a
sinusoid with frequency 0.25, pulsewidth 256 and gain 1. Save the plot of y[n]
as graph7
·
(ii)
Simulate y[n] = x[n]*h[n] when . To
generate x[n], set the frequency to 0.5 and the pulsewidth to 256. Save the
plot of y[n] as graph8
·
(iii)
Plot the frequency response using a linear scale. Use the FFT block with size 256 and save the plot of
the frequency response as graph9
·
(iv) Comment on the behavior of this system.
Problem
4: Pole-Zero Plots
The figure below shows the pole-zero
configuration of two causal linear time-invariant systems.
Do the following:
·
(i)
Determine Ha(z), the system function for the pole-zero plot in
figure a.
·
(ii)
Obtain the impulse response of system (a) by simulation. (Save impulse resp. as
graph10)
·
(iii)
Determine the response of system (a) to a triangular input signal with amplitude
1 and length 12 samples. (Save the output as graph11)
·
(iv)
Determine Hb(z), the system function for the pole-zero plot in
figure b.
·
(v)
Obtain the impulse response of system (b) by simulation. (Save the impulse
resp. as graph12)
·
(vi)
Determine the response of system (b) to a triangular input signal with
amplitude 1 and length 12 samples. (Save the output as graph13)
Problem 5: Cascaded
and Parallel Configurations of Systems
(a) Consider the following sequence, y[n],
which is the convolution of two causal sequences.
·
(i)
Create a system using two filter blocks such that the impulse response
of the system is y[n] given above. Use a=0.5 and b=0.25. Plot the impulse
response of the system.(Save impulse response as graph14) Save the
block diagram of the system as graph15.
·
(ii) Now
create a system using only one filter block such that the impulse
response is also y[n]. Again use a=0.5 and b=0.25. Verify that the impulse
response of this system is the same as the impulse response of the system in
the previous part.
(b) Consider a system that has the
following impulse response:
·
(i)
Implement the system using two filter blocks and one add block.
Plot the impulse response (Save the impulse response as graph16) and
the block diagram of the system as graph17.
·
(ii)
Implement the same system using only one filter block. Verify that the
impulse response is the same as that of the system in the previous part.
Problem
6: Pole-Zero Plots
Find the poles and zeros of the following
transfer functions. Use the PZ Placement block in J-DSP to place
the poles and zeros, and the Freq-Resp block to view the system's
frequency response. Plot the frequency response of each one using the linear
scale.
·
(a)
Plot the frequency response of this system and save the plot as graph18
·
(b)
Plot the frequency response of this system and save the plot as graph19
Problem
7: Varying the magnitude of poles and zeros.
Consider a system which has poles at
and a zero at
where:
·
(i) r
= 0.96
·
(ii) r
= 0.71
·
(iii)
r = 0.14
·
(a)
Derive analytically the impulse response of the system and show its dependence
on r. Sketch the impulse response for r=0.96 using J-DSP. Save the plot of the
impulse response as graph20.gif
·
(b)
Plot the frequency and phase response for case (i) Use the linear scale and the Freq-Resp block.
Save the plot as graph21
·
(c)
Plot the frequency and phase response for case (ii) Use the linear scale and the Freq-Resp block. Save
the plot as graph22
·
(d)
Plot the frequency and phase response for case (iii) Use the linear scale and the Freq-Resp block. Save the plot as graph23
·
(e)
Observe the differences in the the three plots.
Problem
8: Lowpass Filter/ Highpass Filter Design by Pole-Zero Placement
For this problem, you will design filters
by pole and zero placement using J-DSP's PZ Placement block. You
may want to use the following set-up to do the design.
Double click on the PZ Placement
and then Freq-Resp block so you can see each block's respective
window at the same time. Place the poles and zeros on the pole-zero plot at the
desired locations. When all poles and zeros have been placed, move the poles and
zeros around by clicking them and dragging them to new locations. As you move
the poles and zeros, the frequency response will be immediately updated. Adjust
the location of the poles and zeros until the desired response is obtained.
For this problem, plot the magnitude
responses in decibels.
·
(a)
Design a lowpass filter using pole-zero placement with approximate cutoff
frequency at 3 dB point. Use three sets of
zeros and two sets of poles. Plot of the frequency response using a decibel
scale and save the plot as graph24.
·
(b)
Design a highpass filter using pole-zero placement with an approximate cutoff
frequency of at 3 dB point. Use two sets of zeros
and five sets of poles. Plot the frequency response using a decibel scale
and save the plot as graph25.
Problem
9: An interesting frequency response
Consider the following system:
·
(a)
Find the poles and zeros of the transfer function.
·
(b)
Plot the frequency and phase response of the system on a linear scale using the Freq-Resp block.
Save the plot as graph26.
·
(c)
Examine the frequency and phase response.
Next: Lab 3 Up: EEE 407/591 - Digital Previous: Part 2: Discrete Time
Copyright 2008 Andreas
Spanias, MIDL,