ELEC 320, Fall 2006

Profs. Wismer & Kozick

Profs. Wismer & Kozick

Matlab Tutorial, Convolution Computations,

and Convolution Applications

The objectives in lab this week are to learn more about Matlab and to the convolution integral. You will have a chance to practice performing the convolution operation as well as see how it is applied to LTI system analysis. Please work in pairs on these lab exercises.

- You may find it helpful to refer to the MATLAB tutorial developed by
Professor Jim Maneval at

`http://www.facstaff.bucknell.edu/maneval/help211/helpmain.html`We recommend that you write a Matlab program to solve item 4 on Homework 7, but it is not required that you use Matlab for that assignment.

- Find the impulse response h(t) of an ideal integrator, i.e. a system whose output y(t) is the integral of the input x(t), as in .
- Convolve a unit step function with itself: y(t) = u(t) * u(t), and sketch y(t).
- Consider the signals s
_{1}(t), s_{2}(t) and filters with impulse response h_{1}(t), h_{2}(t) as shown below. Compute the output of each filter due to each input. That is, compute the four convolutions y_{11}(t) = s_{1}(t) * h_{1}(t), y_{12}(t) = s_{1}(t) * h_{2}(t), y_{21}(t) = s_{2}(t) * h_{1}(t), y_{22}(t) = s_{2}(t) * h_{2}(t).These signals and filters are commonly used in digital communication systems that transmit bits (0s and 1s) from one place to another.

- An application of convolution:
The MATLAB script

`mus.m`passes digitized music through discrete-time systems with various impulse responses and then plays the resulting music. Simulations of this type are used to understand how an audio speaker or a listening room with a certain impulse response will affect the music that is heard in the room. The impulse response can be measured easily in practice in order to obtain a model for a listening room.Run the Matlab script

`mus.m`. You will also need to download the file slove.au and save it in the same directory as`mus.m`. The original music will be played, followed by the music convolved with g(t) = (2 pi 300) exp(-2 pi 300 t), and then the music convolved with a different function h(t). The impulse responses g(t) and h(t) will be plotted on your screen. The program takes a while to run, so be patient!You can listen to the results here, without running the MATLAB program:

Please write brief answers to the following questions. You don't have to submit any plots.

- What effect does convolution with g(t) have on the music, i.e. what is different about the music after the processing? Can you explain this effect from the shape of g(t)? (Hint: Does g(t) resemble the impulse response of an RC circuit? What type of filter does g(t) describe, and what is the cutoff frequency?)
- What effect does convolution with h(t) have on the music? Can you relate this effect to the shape of h(t)? What physical mechanism might give rise to an effect like this in a concert hall?

All reports are due at the beginning of your next lab meeting on October 9 or 11.

Thank you, and have fun!