DOC PREVIEW
CMU 18396 Signals and Systems - Lab 3: Echoes and De-Echoes

This preview shows page 1 out of 4 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&S S&SSignals and Systems (18-396)Spring Semester, 2009Department of Electrical and Computer Engineering Lab 3: Echoes and De-Echoes Lab session dates: February 16, 17, and 18 • As in the case of the previous labs, all grades will be given on a per-person basis, not per group. • If the pre-lab involves calculations, please include your intermediate calculations, as well as the final result. The same applies to the lab quizzes. • The files that you produce in this lab will be used in later labs. Store them onto a memory stick, back them up to your personal AFS space, or email them to yourself. Files stored on the local machines in the lab are likely to be deleted by other users or by the lab staff. INTRODUCTION Given a sound signal, how do you modify it to sound like an echo? This lab will explore techniques to achieve this. You will get hands-on experience with convolution, impulse response, block diagrams, things you just learned in class. GRADING Each lab is divided into two sections: Pre-Lab (which is 40 percent of the grade) and In-Lab (60 percent of the grade). For the Pre-Lab, 1/3 of the credit will be based on the answers in the hand-in answer sheet (which must be turned in at the beginning of the lab), and 2/3 of the credit will be based on the answers to the quiz at the beginning of the lab section. For the In-Lab, in addition to showing your results to the TA, you also need to be ready to explain your answers to the TA, and be prepared to answer questions. Section 1: Pre-Lab Please read and follow the instructions. They will help you get started for the lab. Problem LP3.1: Consider the following MATLAB code:18-396 Lab 3 Page 2 Spring 2009 a = 0:(1/8000):3; % vector of time samples b = 100*a; % instantaneous frequency x = sin(2*pi*b.*a); subplot(2,1,1),plot(a,b) subplot(2,1,2),plot(a,x) sound(x,8000); Make sure you understand each line of code, and answer the following questions. You should use MATLAB to verify your results. (a) How many samples are in vector a, b, and x, respectively? (b) Consider vector a as representing the samples in time, vector b as representing the instantaneous frequency, and signal x as being sampled at a rate of 8000 Hz. Listen to the generated sound, and explain why it sounds in the way that it does. Problem LP3.2: Let € n0 be a positive integer. Show that when € a < 1 and € N → ∞, the convolution of € h[n] =δ[n] + aδ[n − n0] and € x[n] = (−a)kδ(n − kn0)k= 0N∑ is equal to € δ[n]. Do this by hand, not with MATLAB. (The best approach is to sketch the two functions carefully, flip and shift one of them, and evaluate the result of the convolution graphically.) Problem LP3.3: This problem is a modified version of the echo function that you wrote in Lab 1. The sampling frequency is fixed as 8000 Hz throughout the problem. Recall that we model the echo generation process as that of adding an attenuated and delayed version of a signal to the original signal. Here the attenuation is represented by the parameter € a, which has a value between zero and one. The delay, which is nominally T seconds, will be converted to a discrete-time value that depends on the sample rate.18-396 Lab 3 Page 3 Spring 2009 (a) Given a discrete-time signal, write a MATLAB function to generate a vector that includes the original signal plus an echo occurring d seconds after the start of the original signal and having amplitude that is a times as large as that of the original one. Do not use any for or while loops. Name the function “my_echo2.m”. Test it by convolving the impulse response with the input signal away.wav which is available on the course Web site. (b) Start with a very small value of the delay time parameter T and then gradually increase it. After what point do you observe an echo? Let a =0.65. (c) € s[n] is the original (input) signal, and € r[n] is the perceived output signal. Can you describe the model by an impulse response € h[n]? Then what is the relation between € r[n], € s[n], and € h[n]? Plot the impulse response. Use the values of a and d you used in part (2) above. Problem LP3.4: (Note: This problem is optional, but fun.) If you have the resources to do so, record one clap in a long hallway, in a large apartment without a carpet, in your bathroom, or in a cathedral. The more obvious the echo, the better. If you have a choice, used a sample rate of 8 kHz. Store your waveform as a.wav file using the MATLAB command wavwrite. This waveform will be used in your In-Lab exercises below, but we will provide you with a sound file if you cannot obtain your own one. Section 2: In-Lab We expect every student be able to answer questions after the lab. That means, the TA will ask questions on a per-person basis, not per group. If during the lab your partner puts in more effort, be sure to understand everything before proceeding to the next problem. Problem L3.1: (a) Continuing your work in Pre-lab Problem LP3.3, part (c), convolve the impulse response you developed with the original input signal away.wav. (b) In a room where sound reflects from several walls, we have multiple echoes. Extend the echo model by introducing three attenuation constants € a1, € a2, and € a3 and three time delay constants € d1, € d2, and € d3. Find appropriate values for these constants to make the sound appear as it would be in a highly reverberant space such as a cathedral . Plot the impulse response. Test the function thoroughly. Multiple echoes produce the effect we call reverberation. You can visit the Website http://hyperphysics.phy-astr.gsu.edu/hbase/acoustic/reverb.html for more information on reverberation.18-396 Lab 3 Page 4 Spring 2009 . Reverberation is a desirable property of auditoriums to the extent that it helps to overcome the inverse square law dropoff of sound intensity in the enclosure. The reverberant sound in an auditorium dies away with time as the sound energy is absorbed by multiple interactions with the surfaces of the room. In a more reflective room, it will take longer for the sound to die away and the room is said to be “live”. In a very absorbent room, the sound will die away


View Full Document

CMU 18396 Signals and Systems - Lab 3: Echoes and De-Echoes

Documents in this Course
Load more
Download Lab 3: Echoes and De-Echoes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 3: Echoes and De-Echoes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 3: Echoes and De-Echoes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?