ECE 498DJ Spring 2011 Course Webpage
Texts | Schedule | Homework | Labs | Exams and GradingInstructor: |
Fellows: |
Mark Hasegawa-Johnson, 2011 Beckman, jhasegaw at illinois Lectures: Monday, Friday, 10-11, 106B6 EH; Tuesdays 1:30-2:30, Beckman 3369 |
Cliston Cole,
ECE, clcole2 at illinois; MW 7-8pm Ariel Moctezuma, ECE, amoctez2 at illinois Brantly Sturgeon, ECE, sturgen2 at illinois Corinne Nakashima, ECE, nakashi2 at illinois Ryan Frasca, Aero, rfrasca2 at illinois Iris Hsu, MechSE, mhsu7 at illinois Manoj Kumar, MechSE, mkumar9 at illinois Matt Petrucci, MechSE, mpetrucc at illinois Olivia Cangellaris, BioE, ocangel2 at illinois Richard Kesler, BioE, rkesler2 at illinois |
Texts
Digital Signal Processing: Principles, Algorithms, and Applications. John G. Proakis and Dimitris G. Manolakis, Prentice Hall, ISBN 0-13-373762-4. Best for discrete-time/digital and signal processing material in the course (i.e., the final 11-12 weeks)UIUC ECE 410 Course Notes, A.C. Singer and D.C. Munson (2007).
An online module about DFT-based spectral analysis and the Matlab scripts that generated some of the figures on this page, windows.m and zeropad.m.
Recommended Reading (on reserve at Grainger Engineering Library)
Linear Systems and Signals. B.P. Lathi. Berkeley-Cambridge Press. Particularly good on review of complex numbers and signals and matrices and vectors (Chapter B), analog Fourier series (Ch 6) and Fourier transforms (Ch 7), sampling (Ch 8), DTFT (Ch 9), DFT (Ch 8), and z-transform (Ch 5).DIGITAL SIGNAL PROCESSING by Thomas J. Cavicchi. Particularly good conceptual explanations and figures describing all concepts, but not many examples how to do the computations.
ANALOG AND DIGITAL SIGNAL PROCESSING by Ashok Ambardar. Good overview of signals (Ch 2), Fourier series (Ch 5), Fourier Transform (Ch 6,7), DFT and spectral analysis (Ch 12), z-transform (Ch 13), pole/zeros (Ch 13), filter design (Ch 14).
DIGITAL SIGNAL PROCESSING: A COMPUTER SCIENCE PERSPECTIVE by Jonathan Y Stein. Particularly good on signals, Fourier series and Fourier transform, STFT, and z-transform.
Supplemental Information
An online text about digital signal processingAn online chapter about complex numbers and their arithmetic, and their use in calculating amplitudes and phases of sinusoids
An online chapter with a very basic discussion of Fourier series, with nice visuals
Syllabus and Schedule
Week | Date | Topics | Text |
---|---|---|---|
1 | Aug 22-26 | Overview; Period and frequency; Fourier Series | Lathi, Ch 6.1; Munson/Singer Notes 1.1-1.5 |
2 | Aug 29 - Sep 2 | Review of complex numbers; Exponential Fourier Series; Fourier Transform | Lathi, Ch B.1, B.2, 6.2, 6.3; Munson/Singer Notes 1.5-1.14 |
3 | Sep 5-9 | Fourier Transform and properties; impulse function | Lathi, Ch 7.1-7.4; Munson/Singer Notes 7.25-7.28 |
4 | Sep 12-16 | Fourier Transform properties; time-domain sampling and quantization overview | Lathi, Ch 7.1-7.4; Munson/Singer Notes 7.25-7.28 |
5 | Sep 19-23 | Discrete-Time Fourier Transform (DTFT) and properties | Proakis, Ch 4.1-4.3, 4.5; Munson/Singer Notes 2.1-2.18 |
6 | Sep 26-30 | Discrete Fourier Transform, properties, and spectrum analysis | Proakis, Ch 5,1-5.2, 5.4; Munson/Singer Notes 2.18-2.25, 3.1-3.10; An online module about DFT-based spectral analysis |
7 | Oct 3-7 | Spectrum analysis, Sampling theory (A/D and D/A, time and frequency analysis) | Proakis, 1.4 and 5.4; Munson/Singer Notes 3.1-3.10, 4.1-4.8 An online module about DFT-based spectral analysis |
8 | Oct 10-14 | Equivalent analog frequency response of a digital system. Discrete-time system theory: linearity, causality, shift-invariance, BIBO stability; convolution | Proakis, Ch 2.2.3-4, 2.3.2-6; Munson/Singer Notes Chapters 8.15-26, Ch 5. |
9 | Oct 17-21 | Difference equations. FIR and IIR impulse (filter) responses. Z-transform and properties (linearity, shift, convolution). Transfer function of general recursive difference equations. Poles and zeros. Frequency response from transfer function. | Proakis Ch 2.4, 3.1-3.3, 3.6.1, 3.6.3, 3.6.4, 4.2.6; Munson/Singer Notes Ch 6, 7.1-8 |
10 | Oct 24-28 | Notch filter design. Ideal filters. Standard IIR filter types. Generalized linear phase. | Proakis Ch 8.1, 8.3.5, 8.2.1; Munson/Singer Notes Chapter 8.1-15, Ch 10 |
11 | Oct 31-Nov 4 | Physiology and psychology of hearing (Prof. Robert Wickesberg) | |
12 | Nov 7-11 | Generalized linear phase. Window design of FIR filters. Parks-McClellan (minimax) FIR filters. | Proakis, Ch 8.2.1-2, 8.2.4 (overview); Munson/Singer Notes Ch 11 |
13 | Nov 14-18 | NO CLASS | |
Nov 21-25 | THANKSGIVING BREAK | ||
14 | Nov 28-Dec 2 | Image processing: 2-D signals. 2-D Fourier transforms and filtering. Edge detection. Projection-slice theorem. CT tomography, MRI. Wavelet transform. | Munson/Singer Notes, Chapter 15.1-7. |
15 | Dec 5-9 | Review |
Homework
- Homework 1: Assigned Friday 8/26, due Friday 9/2
- Homework 2: Assigned Friday 9/9, due Friday 9/16
- Homework 3: Assigned Friday 9/23, due Friday 9/30
- Homework 4: Assigned Friday 10/7, due Friday 10/14
- Homework 5: Assigned Monday 10/23, due Friday 11/11
Previous Semesters' Homework Assignments
Spring 2011
- Homework 1 after Wednesday, 27 Jan 2010 lecture due Wednesday, 3 Feb at the beginning of the lecture.
- Homework 2 assigned on Wednesday, 10 Feb 2010 is due Wednesday, 17 Feb at the beginning of the lecture.
- Homework 3 assigned on Thursday, 4 March 2010 is due Wednesday, 10 March at the beginning of the lecture.
- Homework 4 assigned on Thursday, 8 April 2010 is due Wednesday, 14 April at the beginning of the lecture.
- Homework 5 assigned on Monday, 3 May 2010 is due ???.
Software Laboratory Assignments
- Week 1: Fourier Series demonstration and introduction to Matlab. Experiment with partial Fourier series synthesis of periodic waveforms using the Matlab script FourierSeriesDemo.m
- Week 2: Additive music synthesis and Matlab functions.
Download the script
Maketune.m
and the function
SumHarmonics.m.
Run the script MakeTune (it uses the function SumHarmonics), listen to the
short tune it generates, look at the plot of the signal, and study the
script to see how it makes the signal.
Your assignment is to extend this code to make more interesting music. First, change the timbre of the sound by altering the Fourier series coefficients used to generate the underlying periodic signals. For example, you can make a sawtooth wave (similar to that of a violin) with the appropriate Fourier series coefficients. The current code only implements an exponential decay envelope; you are to make a more sophisticated envelope including a linear ramp-up "attack", a constant-level "sustain", then followed by the exponential decay. Make the duration of each part adjustable as in the current code, so that you can create interesting tunes. Finally, use your improved code to synthesize a different tune of at least five notes.
The short Frequency and Music online course will explain the relationships of frequency and harmonics to music and how to match musical pitches and intervals to frequencies.
- Week 5: Basic spectrum analysis exercise.
Download the data file signal.dat from the ECE 410 course website.
(You can click on the hyperlink, then Save the page source.)
Using Matlab or a similar software package such as FreeMat, load this
file load signal.dat; the data will be loaded into a vector called signal.
- Plot the magnitude and phase of the DFT (or FFT) of this signal on separate stem or sample plots. For the rest of this assignment, plot all magnitudes twice, once on a linear scale (abs(signalDFT)) and on another plot in decibels ( 20*log10(abs(signalDFT))).
- Plot the magnitude and phase corresponding to the non-negative frequencies of this signal zero-padded to 1024 samples. (Since zero-padding interpolates the continuous spectrum, this time use a normal line plot.) Scale the horizontal axis to display the proper DTFT frequencies. (Hint: create a vector freqvals of the same number of samples as the zero-padded DFT points you intend to display, and use plot(freqvals,dftmags).)
- The signal consists of five sinusoids of various frequencies and amplitudes. Using various (length-64!) windows and zero-padding to visualize the magnitude of the spectrum, determine the frequencies and magnitudes of all five of these sinusoids to the best of your ability. The online module http://cnx.org/content/m12032/latest/ about spectral analysis using windows and the DFT may be a helpful guide for this exercise. The Matlab scripts windows.m and zeropad.m, which generated many of the figures in that module, can be modified to solve this exercise.
- Week 7: Real-data spectral analysis and quick-and-dirty FFT-based filtering.
The signal file chorus.dat contains five seconds of a frog chorus digitally recorded with a sampling rate of 20 kHz at the Cibolo Nature Center in Boerne, Texas on the evening of March 21, 2007. The calls of at least two different species of frogs, Bufo valliceps (Gulf Coast Toad) and Acris crepitans (Cricket Frog), can be heard, along with louder (real) wind noise; a (synthetic) sinusoidal interference has also been added to make the assignment a bit more challenging. In this assignment, your task is to perform spectral (frequency) analysis of this real signal to determine the primary frequency bands of the calls of each frog, and then to recover the calls of each species via frequency-based digital filtering.- Load the signal into Matlab, plot it, and listen to it using the soundsc(chorus,fs) command, where fs is the sampling frequency. (Just for fun, you might enjoy playing it back at different frequencies!)
- Examine the spectrum of the signal by computing and plotting the magnitude of the FFT of the chorus data. You may want to plot it on both absolute and dB scales.
- Determine the analog frequency of the loud, annoying sinusoidal interference.
- Try to filter out that annoying sinusoid by zeroing out the frequency samples near its positive and negative frequencies. That is, compute the (complex-valued) FFT of the data. Modify those samples using commands such as chorusFFT(k_low:k_high) = zeros(k_high-k_low+1,1); (you'll want to do this for both the positive and negative (omega from pi to 2*pi) frequencies). Then compute the inverse FFT to get the filtered signal. Plot and listen to it. Experiment with different filtering ranges to get the best results.
- Plot the spectrum again of this filtered signal. This time, just plot the non-negative frequencies from 0 Hz to the Nyquist frequency, and plot the x-axis in terms of the corresponding analog frequencies. Look for ranges of frequencies that seem to be "bumps" that might correspond to the main frequencies of the calls of different species. Bandpass filter the data by zeroing out all frequencies other than the band you identify by a strategy similar to above, and plot and listen to the filtered data. Determine the low and high frequencies of each band that you think work best, plot and print the filtered signals as your solution, and report the corresponding analog frequency range of the calls of these two species of anurans.
- Week 10: Spectrograms/the Short-Time Fourier Transform
Professor Hasegawa-Johnson will be out of town on Friday October 28. Please create a PDF or Word or other electronic version of your lab report, including figures, and e-mail it to him.
Download and save the files bat.dat and speech.dat. bat.dat is 400 samples of a digitized bat echolocation call, sampled with a period of 7 microseconds. We acknowledge and thank Curtis Condon, Ken White, and Al Feng of the Beckman Institute at the University of Illinois for the bat data and for permission to use it. speech.dat is a file of 28800 samples of speech data, sampled at a rate of 12800 Hz.- Using the program stft.m or some other spectrogram, compute and display the spectrogram (squared magnitude of the short-time Fourier transform) of the bat data, with a time-step of one sample between windows. Use the showlevel.m command with a floor level of -45 dB relative to the largest value. Try different window lengths to find the best one. Print the figure and circle the portions corresponding to aliasing of the signal.
- Alter the "showlevel" program to try different COLORMAPS. (Type HELP COLORMAP in Matlab to find out how to do so.) Try different built-in maps such as JET, HOT, PINK, COOL, BONE, COPPER, and GRAY, and decide which one you like best.
- Now try a "mesh" instead of an "image" plot.
- Using your favorite colormap, compute and show in different figure windows spectrograms of the speech.dat signal using Hamming windows of length 64 and 256, with a step between windows of 16 samples and zero-padding to 1024 samples. Show only the positive frequencies. Plot the speech signal in a separate figure.
- Zoom in on one of the larger-amplitude sections of the speech signal, and note the quasi-periodic nature of the voiced speech segments, each period corresponding to one glottal pulse of air. Note the vertical stripes in the short-window speech spectrogram corresponding to those pulses/peaks in each period of the voiced segments of the signal. Note the horizontal stripes in the long-window speech spectrogram corresponding to the harmonics of the periodic voiced speech signal. Note the noisy, usually higher-frequency unvoiced components.
- Adjust the level (dynamic range) of the speech spectrogram display to better visualize the structure at different frequencies.
- Use the soundsc command to listen to the speech signal. Print one of your spectrograms and label the corresponding speech over the visual spectrogram representation.
- Week 12: Notch Filter and Bandpass Filters (Due by e-mail 11/18/2011)
Part 1:The signal file chorus.dat, which you've worked with earlier, contains a five seconds of a frog chorus digitally recorded with a sampling rate of 20 kHz at the Cibolo Nature Center in Boerne, Texas on the evening of March 21, 2007. The recorded signal has been corrupted by a (synthetic) sinusoidal interference. Your goal is to remove this interference using a notch filter so that you can hear the natural sounds. Download the data and the Matlab script frogStart.m and the Matlab function notchStart.m; these scripts need only a few changes and additions to complete the assignment, so you may want to start with them. Using your understanding of spectral analysis, determine the appropriate frequency for the notch to remove the interference. Use a pole magnitude of 0.98. Alter the notchStart.m function to compute the coefficients of your notch filter and to implement it via the appropriate difference equation. Places where you may need to edit the code are marked with XXX.
After the script runs, you can use the commands soundsc(chorus,20000) and soundsc(y,20000) to hear the results. (Note the short transient response from the filter at the beginning of the output; you may enjoy experimenting with different pole magnitudes to study the tradeoffs and to find the best value.) Print and turn in your figures with your results.
Part 2: The signal file spikeburst.dat, contains two seconds of raw data from a single-channel neural recording (with a sampling rate of 40 kHz) from the trigeminal nucleus in a rat's brain as it responds to whisker stimulation. This data is provided courtesy of Dr. Aniket Kaloti and Professor Mitra Hartmann from Northwestern University, and they should be acknowledged in any use of the data. Load and plot the data; you will observe huge low-frequency fluctuations in the signal around the stimulation time. (Those big bumps aren't spikes, but unwanted electrical signals or artifacts!) Apply a first-order IIR notch filter to the data (notch at DC = zero frequency) to filter out the low-frquency fluctuations to leave the spike bursts. Experiment with different pole magnitudes to make the best visual tradeoff in terms of reducing the low-frequency baseline fluctuations while preserving the spike burst. You may find it easiest to modify your code from Part 1 (I recommend saving both for future use!) Print and turn in your before-and-after plots.
The Matlab script filterStart.m loads the neural spike data, generates several IIR filters, and filters the data. Run the script, and plot the outputs. Comment on differences between bandpass filters and notch filters. - Week 14: Image Processing (Due 12/5/2011)
The Matlab script imaging.m processes image data with various techniques and filters. The function histeq.m performs histogram equalization. We will process the images Flour_Amy.jpg and 72hrs_Amy.jpg (thanks, Amy!) and Time100.tif (thanks, Johana!)
Matlab Codes for In-Class Demonstrations
- Matlab script showBeats.m showing that summing two non-harmonic sinusoids can create amplitude variations in a sinusoid
Grading
Midterm Exam | 25% |
Final Exam: 8:00-11:00, ENG 106B6, Thursday 12/15 | 35% |
Homework | 20% |
Matlab-based lab exercises | 20% |