EE432 Fall 2009: In-Class
Activities
09/16/2009:
Using MATLAB's conv function,
multiply the following terms together to determine the polynomial:
(1) (x + 3)(x + 2) =
__________________________
(2) (x + 1)(x2
+ x - 6) = _________________________
(3) (x+1.33)3
= _____________________________
(4) (x3
+ 2x -4)(x5 - 0.8) = __________________________
Using MATLAB's roots function,
find the poles and zeros of:
(1) (z4 -z3
+2z -0.5) / (z5 -10z4 + 2z2 +1)
A transfer function has zeros at z =
0.1+0.5j, z = 0.1 - 0.5j, and z = 2. Its poles are at z = ejp/8,
z = e-jp/8,
z = 0.6 + 0.3j and z = 0.6 - 0.3j.
Write
the transfer function as a numerator polynomial divided by a denominator
polynomial.
For
answers, click here
10/05/2009:
1. Using fdatool, design a
Generalized Equiripple Bandpass filter with the following specifications:
-FIR filter
-Generalized Equiripple
-Sample frequency will be 44.1 kHz
-Bandpass: fstop1 = 1000
Hz, fpass1 = 1400 Hz, fpass2 = 2000 Hz, fstop2
= 2400 Hz
-Minimum order
-Passband ripple ("Apass") = 1dB
-Stop band attenuations = 80 dB
2. Export the filter coefficients to
the workspace (File®Export). How many
coefficients are in the filter? In fdatool, look at the pole-zero plot.
3. Using the MATLAB filter
function and your filter, filter a music clip (>> y=filter(num,
denom, x)) and listen to the result. Does it make sense?
Now try changing the filter passband
so that everything is the same except:
fstop1 = 500 Hz, fpass1
= 700 Hz, fpass2 = 1000 Hz, fstop2 = 1200 Hz
Export this filter, and filter your
music clip with this one...does the sound make sense when compared with the
first filter?
10/16/2009:
- Start the fdatool. Note
that anytime you want to start over again after editing filters, choose
File->New Session.
- Create the magnitude plot
of the frequency response for the default filter--this should be a 50th
order Direct-form FIR low pass filter. There are 50 poles at the origin, and
50 zeros at various locations on the z-plane.
- Along the lower left side
of the window, select the "Pole/Zero Editor". You are free now to drag zeros
wherever you wish. As you drag a zero, note the change in frequency
response. Note that if you drag a zero, the complex-conjugate zero moves in
a mirror fashion also. This is because in order to have real-valued filter
coefficients in the time domain, the zeros/poles must be real valued or
appear in complex conjugate pairs. Can you drag poles? Note that if the
poles move away from z=0, you no longer have an FIR filter.
- If you uncheck the
"Conjugate" box, you can move a single pole or zero, and you will see that
the frequency response is no longer conjugate symmetric when you compare the
response from [-fs/2,0] and from [0,fs/2].
- In the pole/zero plot
window, select the buttons to add poles or the button to add zeros, or erase
them and see the effect on the frequency response.
- Drag a zero around the
unit circle and note how the corresponding frequency disappears from the
frequency response in the magnitude plot.
- Try the same steps with an
IIR filter...now there are poles that are not at the origin.
10/30/2009:
- Download the
daq_minidemo.m program.
- Test the daq_minidemo
program in MATLAB using a microphone attached (the Logitech webcams have a
good microphone). Change your axes for your plots as needed for your
microphone and sound card.
- Rename the daq_minidemo.m
program daq_minidemo_fft.m, and modify it so the lower window displays the
magnitude of the FFT in dB (XdB) = 20 log10(X). Change
the axes on the lower display to show frequencies from 0 Hz to fs/2 Hz on
the x-axis, and the magnitude of the FFT in dB from -30 dB to +50 dB on the
y-axis. Change your axes for your plots as needed for your microphone and
sound card.
- Demonstrate how your
modified program works to the professor.
11/13/2009: