Homework 2, ECE438, Fall 2015, Prof. Boutin
Hard copy due in class, Wednesday September 9, 2015.
The goal of this homework is to understand the relationship between a signal and a sampling of that signal, viewed in the frequency domain. For simplicity we are focusing on pure frequencies for now. You should be able to do all this entire homework by repeating what was done in class.
1) Pick a signal of the form x(t)=sin(something) representing a note of the middle scale of the piano (but not the middle C we did in class) and obtain its CTFT $ X(f) $. Then pick a sampling period $ T_1 $ for which no aliasing occurs and obtain the DTFT of the sampling $ x_1[n]=x(n T_1) $. More precisely, write a mathematical expression for $ X_1(\omega) $ and sketch its graph. Finally, pick a sampling frequency $ T_2 $ for which aliasing occurs and obtain the DTFT of the sampling $ x_2[n]=x(n T_2) $ (i.e., write a mathematical expression for $ X_2(\omega) $ and sketch its graph.) Note the difference and similarities between $ X(f) $ and $ X_1(\omega) $. Note the differences and similarities between $ X_1(\omega) $ and $ X_2(\omega) $.
2) Write MATLAB code to play the two DT signals from part a) for 2 seconds. Briefly comment on how each signal "sounds like".
Hand in a hard copy of your solutions. Pay attention to rigor!
Presentation Guidelines
- Write only on one side of the paper.
- Use a "clean" sheet of paper (e.g., not torn out of a spiral book).
- Staple the pages together.
- Include a cover page.
- Do not let your dog play with your homework.
Discussion
You may discuss the homework below.
- write comment/question here
- answer will go here
- For problem 2, are we supposed to pass the original "sampling rate" (e.g. 1000Hz for the example done in class) directly to the sound function, or are we supposed to interpolate/upsample the discrete signal to a sampling rate that is more reasonable for actual sound hardware (e.g. the default, 8192 Hz, or 16kHz, or 48kHz, etc.)?