Sie sind auf Seite 1von 2

EE6058 ASSIGNMENT NO.

4
DATE ASSIGNED: DATE DUE: READING: REMINDER: Wednesday, May 5, 1998 Wednesday, May 12, 1998 Chapters 7 and 9. The TA Ofce Hours are in Room W224 Van Leer, not W244. His ofce hours are 10:00am 11:30am on Mondays, and 11:00am 12:30pm on Thursdays.

PROBLEM 4.1. This homework assignment and the class project require the use of a microphone. (a) (b) (c) (d) I (do do not) have my own microphone. If you do, your team for the project may consist of one (i.e., you may work alone), two, or three persons. Which do you choose? If you do not have your own microphone, you must form a team of three persons. Bring this questionnaire to the TA, and he will lend you a microphone. The other members of my team for the class project will be:

PROBLEM 4.2. You can generate a sound in MATLAB using the command sound(x), where x is a vector of samples. The Sun workstations will interpolate the samples in x using an ideal sinc function and a sample rate of Rsample = 8192 Hz. (An HP workstation or a PC might use a different sample rate.) For example, the following commands will produce a sinusoidal tone on a Sun with a frequency of f0 = 440 Hz and a duration of one second:
f0 = 440; Rsample = 8192; t = 0:(1/Rsample):1; x = cos(2*pi*f0*t); sound(x);
psd(x,256,Rsample);

(a)

Write the expression for the interpolated waveform x(t) as a function of the components x1, x2, , xN of x. Because of this equivalence between x and x(t), we will sometimes refer to x as a waveform, and by this we are really referring to x(t). What is the sample rate Rsample of the machine you are using? Can you change it? Find the maximum frequency fmax that can be faithfully emitted from the speaker. Is it 880 Hz? 1000 Hz? 2000Hz? 4000 Hz? 20 kHz? Try changing f0 to 1700 and also to 17000. Why does the tone with f0 = 17000 Hz actually sound lower than the tone with f0 = 1700 Hz? Does sound(x/100) produce a softer sound? Does sound(100*x) produce a louder sound? Explain. Is there any way to increase the volume of the transmitted sound?

(b) (c) (d) (e)

PROBLEM 4.3. Go to the class website, and read about how to record a sound using your computer. (a) (b) Record yourself speaking; load the result into MATLAB; play it back using the sound command; and examine the PSD of the result using the psd command. Using the commands from Problem 4.2, generate a pure sinusoidal tone, and then record this same tone; load the result into MATLAB; play it back using the sound command; and examine the PSD of the result using the psd command. Compare the PSD of the tone before transmission to that of the recorded sound.

PROBLEM 4.4. The recorded waveform will differ from the transmitted waveform in two ways: there will be additive noise, and there will be distortion. The distortion is due to three main factors: the frequency response of the speaker will not be at; the acoustic channel will introduce echoes from multipath propagation; and the frequency response of the microphone will not be at. And the cheaper the speaker and microphone, the worse the distortion. Nevertheless, the distortion should be largely linear, so that the recorded waveform will be related to the transmitted waveform by a linear transfer function H(f ). (A word of warning: an inexpensive microphone will introduce nonlinear distortion if the sound is too loud, so be careful not to place the microphone too close to the speaker.) Experimentally measure the magnitude response |H(f )| of this transfer function. Present a plot of |H(f )|2 in dB (i.e., 10 log10|H(f )|2) versus f. There are at least three strategies for measuring the channel magnitude response: One strategy is to transmit a random process with a white PSD; the PSD of the recorded waveform will then be proportional to |H(f )|2. Another strategy is to transmit a pure sinusoidal tone, and measure the I & Q components of the received tone; they will be equal to the real and imaginary parts of H(f ), respectively. By sweeping the frequency of the tone you can measure H(f ) at all frequencies. This is how some network analyzers work. A third strategy is to simply transmit an impulse; the recorded sequence is then approximately the impulse response. If there were no noise, this third strategy would be ne; unfortunately, the noise will reduce the precision of the measurement. But you can reduce the effects of noise by repeatedly transmitting impulses periodically, and taking a time average of the resulting measured impulse responses. The more pulses that are averaged, the less noise there will be. In addition to presenting the plot of |H(f )|2 versus f, also specify: (i) the type of computer you used; (ii) the type of microphone; (iii) the sample rate of the D A convertor that drives the speaker; and (iv) the sample rate of the A D convertor that was used for recording.

Das könnte Ihnen auch gefallen