






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 (please print)
STUDENT (SID) NUMBER
College of Engineering Electrical Engineering and Computer Sciences Berkeley
Total of top 4 Lab Grades Total of top 2 Question Sections Lab Participation Mid-Term # Mid-Term # Final Exam Total Course Grade
_______________ (400 max) _______________ (50 max) _______________ (100 max) _______________ (100 max) _______________ (100 max) _______________ (200 max) _______________ (950 max)
Answer the questions on the following pages completely, but as concisely as possible. The exam is to be taken closed book. Use the reverse side of the exam sheets if you need more space. Calculators are OK. In answering the problems, you are not limited to the particular equipment you used in the laboratory exercises.
Partial credit can only be given if you show your work.
FINAL EXAM GRADE :
1 __________ (40 max) 2 __________ (40 max)
3 __________ (70 max) 4 __________ (50 max)
TOTAL __________ (200 max)
Initials
PROBLEM 1 (total 40 points):
1a. (10 points) When periodically sampling an arbitrary waveform, under what conditions does aliasing occur?
1b. (15 points) Explain aliasing using the Fourier frequency convolution theorem.
1 c. (15 points) Give two approaches for reducing aliasing and explain how they work.
Initials PROBLEM 3 (total 70 points): Imagine that many years ago, a spacecraft was sent to measure the magnetic fields in the great void between the sun and the nearest star. Every 100 seconds the measurements are digitized and then phase and amplitude encoded (like the 56 kbaud modem that connects your computer to the internet) to produce a one-second long analog-like signal with a frequency content between 1 Hz and 3,000 Hz. Because the spacecraft is far from earth and has limited battery power, the data signal is weaker than the background noise from the rest of the universe. To be able to detect the weak data signal, you use three techniques: (i) the signal is band-pass filtered before transmission (ii) the spacecraft sends the same one-second-long signal 100 times with a period of exactly one second. (iii) you use your knowledge of the FFT of a periodic signal to further separate the background noise from the data signal To do this, you perform the following steps to the signal received at the earth: 1 low-pass filter the signal (weak data signal plus background noise) 2 sample the filtered signal for exactly 100 s at 10,486 Hz (2^20 = 1,048,576 samples) (assume that the time it takes for the signal to reach the earth is known at all times so that sampling always begins at the exact start of the first one-second long signal. 3 take the FFT 4 subtract as much of the background noise as possible 5 recover one cycle of the data signal 6 demodulate to transform the one-second modulated analog signal into the original digital signal (assume that you have a modem that does this) Note: If a(t) = b(t) + c(t), then FFT(a) = FFT(b) + FFT(c)
time (s)
0 1 2 3 4
Data signal
Background noise
time (s)
0 1 2 3 4
data signal repeats every second
Initials
3a. (15 points) Describe (or sketch) the Fourier magnitudes Fn from the FFT in step 3 as a func- tion of the frequency index n.
3b. (5 points) To what frequency does the Fourier magnitude Fn correspond?
3 c. (20 points) Design a Butterworth low-pass anti-aliasing filter that has a gain > 0.99 for frequencies below 3,000 Hz and a gain < 0.001 for all frequencies that could alias below 3,000 Hz.
3d. (10 points) Explain whether a Hanning window would improve the recovered waveform.
Initials PROBLEM 4 (50 points) Every year people are injured by bullets fired into the air at random by gun-owners "celebrating" the Fourth of July. Design a system that 1 Senses gunshot sounds at various locations using microphones, analog amplification, and a comparator set to detect signals that are sufficiently loud. 2 Uses a 1 kHz, 16-bit dedicated digital timer at each location that is read when a gunshot is detected. (The speed of sound in air is approximately one ft per ms.) 3 Uses "data available" and "ready for output data" handshaking for data transmission to a central computer. 4 Uses a central computer that first resets the remote timers, waits for digital timing data from the sensing station computers, reads them whenever they have data, and computes the location of the gun using time differences (assume that you have a program function that does this). 5 Transmits the gun location to waiting police cars with on-board map displays. [Note: similar systems have been used in major cities for several years.] Assume the following:
Initials
4.b (25 points) List the steps (hardware and software) involved in (i) system startup, (ii) detecting and processing the first gunshot, and (iii) making the system ready for the next gunshot. (Do not worry about the details involved in computing map coordinates from time differences and in transmitting coordinates to the police cars.)
145M Final Exam Solutions page 2 May 19, 2000 S. Derenzo
(3) The effect of the low pass filter, which decreases all Fourier amplitudes sharply from 2,000 Hz (the maximum frequency of interest) to 5 kHz (the Nyquist limit). [4 points off if omitted]
Fourier frequency index n Frequency fn
Background noise
(^0) 524k (^) 1049k 0 Hz 5.24 kHz
Data signal harmonics every 1 Hz (∆n = 100) (exact amplitudes depend on signal)
Effect of low-pass filter
3 kHz
10.49 kHz
3b The first Fourier magnitude Fn corresponds to fn = n/100 s = n (0.01 Hz).
3c Design requirements: Gain > G 1 = 0.99 for f < f 1 = 3,000 Hz; Gain < G 2 = 0.001 for all frequencies that could alias to 3,000 Hz. Choose n = 8; from table f1/fc = 0.784; fc = 3,000 Hz/0.784 = 3,827 Hz; f2/fc = 2.371; f2 = 9,074 Hz; since f2 aliases to fs – f2 = f1, then fs > f1 + f2 = 12,074 Hz, which exceeds our sampling frequency of 10,486 Hz. Choose n = 10; from table f1/fc = 0.823; fc = 3 kHz/0.823 = 3.645 kHz; f2/fc = 1.995; f2 = 7.272 kHz; since f2 aliases to fs – f2 = f1, then fs > f1 + f2 = 10.272 kHz, which is just a bit below our sampling frequency of 10,486 Hz. [Both n = 10 and n =12 were accepted]
3d There is no spectral leakage for the data signal, since exactly 100 periods are present. Spectral leakage does not affect the random background noise since there is no structure to its frequency spectrum. Therefore a Hanning window would not help.
3e Program steps:
1 Sample for 100 s at 10,486 Hz (1,048,600 values). 2 take the FFT to compute the complex Fourier amplitudes Fk 3 estimate the background noise frequency amplitude B as the average of amplitudes whose Fourier frequency indices are not a multiple of 100. 4 compute 10,486 new Fourier amplitudes Pk = F100k – B 5 take the inverse FFT of Pk to recover one cycle of the analog data signal 6 demodulate to recover the digital signal [5 points off if background is subtracted from 2^20 Fourier coefficients and only one second of the inverse FFT is used] Note: this problem works out better if the signal were repeated for a number of seconds that is a power of two (e.g. 128 seconds).
145M Final Exam Solutions page 3 May 19, 2000 S. Derenzo
4a
Microphone (^) Amp Comparator
Threshold
Latch
Set
Reset
Clock
Stop
"data available 1"
Reset 16
Tri-state driver
"ready for data 1" 16 Data bus
Common reset
Microphone (^) Amp Comparator
Threshold
Latch
Set
Reset
Clock
Stop
"data available N"
Reset 16
Tri-state driver
"ready for data N" 16 Data bus
Common reset
Microcomputer
Parallel input port (N+16 bits)
Parallel output port (N+1 bits)
16 Data bus
"data available N"
"data available 1"
"ready for data 1" "ready for data N"
Common reset
4b Hardware and software steps:
1 The central computer resets all timers, set/reset latches, and “ready for data” lines. This starts all timers simultaneously and resets all “data available” lines. 2 The central computer listens for any “data available” signal from the remote sensing stations 3 When a microphone at a remote sensing station detects a sound that exceeds a preset comparator threshold, the corresponding set/reset latch is set to stop the counter and signal “data available” 4 When a “data available” signal is detected, the central computer enables the corresponding tri-state driver by asserting “ready for data” to put the counter data on the bus