




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Name (Last, First) Student ID number
College of Engineering Electrical Engineering and Computer Sciences Department
EECS 145M: Microcomputer Interfacing Laboratory
Spring Midterm #2 (Closed book- equation sheet provided- calculators OK) Monday, April 21, 2003
PROBLEM 1 (12 points)
1a (6 points) Write the general equation for the finite impulse response (FIR) digital filter
1b (6 points) Write the general equation for the infinite impulse response (IIR) digital filter
Name (Last, First)
EECS145M 2003 Midterm #2 Page 2 Derenzo
PROBLEM 2 (18 points) State the following theorems
2a (6 points) The Fourier convolution theorem
2b (6 points) The Fourier frequency convolution theorem
2c (6 points) The Nyquist sampling theorem
Name (Last, First)
EECS145M 2003 Midterm #2 Page 4 Derenzo
3c. (10 points) If a 500 Hz sinewave is sampled at 1024 Hz for 0.5 second, what does the FFT look like? Sketch the approximate relative magnitude of the FFT coefficients in the space below, and label the horizontal axis with both FFT coefficient index and frequency (Hz).
3d. (10 points) If a 524 Hz sinewave is sampled at 1024 Hz for 0.5 second, what does the FFT look like? Sketch the approximate relative magnitude of the FFT coefficients in the space below, and label the horizontal axis with both FFT coefficient index and frequency (Hz).
3e. (10 points) For each of the four FFT plots above, describe whether they were affected by aliasing or spectral leakage and if so, how they were affected and what you would do to fix the problem.
Name (Last, First)
EECS145M 2003 Midterm #2 Page 5 Derenzo
Problem 4 (20 points) A colleague wants to measure the voltage gain of an analog filter at frequencies f = 0 Hz, f 0 , 2 f 0 ,.. ., f max = N f 0. The filter gain is zero above f max. Your colleague connects a sinewave generator to the input of the filter, manually sets the frequency to each value, and uses an oscilloscope to record the input and output peak-to- peak voltages at each frequency. Observing this, you say that there is a much faster, automated way to do this using a pulse generator, periodic sampling, and Fourier analysis.
What procedure would you suggest? (Be sure to list all the steps required)
April 21, 2003 page 2 S. Derenzo
3 c
F k
F 250 at 500 Hz F^262
k (^0 )
f 0 Hz 512 Hz 2 Hz
250 cycles are sampled in 0.5 sec- no spectral leakage H 250 and H512-250 (H 250 and H 262 ) are non-zero No aliasing because 500 Hz is below the Nyquist frequency of 1024 Hz/2 = 512 Hz No spectral leakage because exactly 250 cycles are sampled
3 d
F k
F 250 at 500 Hz F^262
k (^0 )
f 0 Hz 512 Hz 2 Hz
262 cycles are sampled in 0.5 sec- no spectral leakage H 262 and H512-262 (H 250 and H 262 ) are non-zero No spectral leakage because exactly 262 cycles are sampled Aliasing occurs because 524 Hz is above the Nyquist frequency of 1024 Hz/2 = 512 Hz Fourier magnitudes for 524 Hz look exactly like Fourier magnitudes for 500 Hz
3 e a: exactly 5 cycles of sinewave sampled- no aliasing, no spectral leakage
b: 5.5 cycles of sinewave sampled- no aliasing, but spectral leakage that can be fixed by using a raised cosine window or by increasing the sampling time to 1 sec c: 500 Hz sinewave sampled at 1024 Hz- no spectral leakage, no aliasing d: 524 Hz sinewave sampled at 1024 Hz- no spectral leakage, but aliasing because 524 Hz signal frequency is above 1/2 the sampling frequency. The samples of the 524 Hz sinewave look exactly like the samples of the 500 Hz sinewave. Fixed by sampling faster than 2 x 524 Hz. [1 point off if the only fix is to use an anti-aliasing filter, which would eliminate the signal]
April 21, 2003 page 3 S. Derenzo
1 Set width T 0 of pulses to 1/(2 f max) or less 2 Set the repetition frequency of the pulse generator to f 0 3 Connect the output of the pulse generator to the input of the analog filter The Fourier transform of this input signal is the sinc function (given on the equation sheets)
H f AT
T f n T f
n n
sin( ) = 0 0 0
p p
f (^) n = n f 0
4 Sample the output for one repetition period (1/ f 0 ) at a sampling frequency 2 f max or above 5 Take the FFT 6 Each Fourier coefficient F n is the amplitude of the output waveform at frequency n f 0 7 The amplitude gain of the analog filter is the output amplitude divided by the input amplitude
H f
n n
out in
[2 points off for not specifying the pulse width in terms of f max] [2 points off for not specifying the sampling frequency in terms of f max] [2 points off for not specifying the sampling window or pulse frequency in terms of f 0 ] [3 points off if analog filter to be measured is not used in the procedure] [3 points off if no formula is given for calculating voltage gain or if the formula is incorrect- one common error was to divide the FFT of the sampled filter output by the input voltage amplitude]
Midterm #2 class statistics:
Problem max average rms 1 12 9.1 4. 2 18 17.6 1. 3 50 44.4 7. 4 20 13.9 3. total 100 84.8 12.
Grade distribution:
Range number approximate letter grade 40-49 1 F 50-59 0 F 60-69 0 D 70-79 3 C 80-89 6 B 90-99 6 A 100 1 A+