15-06-2012, 01:03 PM
Signal Processing and MATLAB
Signal Processing and MATLAB.pdf (Size: 325.8 KB / Downloads: 276)
Introduction
MATLAB is a very useful tool in order to understand the basic properties of discrete
signals and digital filters. In MATLAB it is easy to make calculations, listen to signals
and plot them in both the time and frequency domain.
This laboratory exercise will give you an introduction of how to use MATLAB in signal
processing applications. It is, however, not explicitly an introduction to MATLAB itself.
If you haven’t been using MATLAB for some time, we therefore recommend you to
spend some time recapitulating the basics. Hopefully, the quick reference at the end of
this manual can be of some help. There is also a manual on the course home page, copied
from the home page of the course book (www.mhheengcs/electrical/
mitra/).
Basic signals and filters
The first task is to construct a signal and listen to it. The signal should have a length of
exactly one second and be the sum of two sinusoidal signals: one with the frequency 697
Hz and one with 1209 Hz. We will be using the sampling frequency Fs= 48000 Hz.
Transform your own voice
In this exercise we will look at some basic ways to alter a sound signal. You should start
by recording some seconds of speech. The (free-ware) program Audacity is installed on
the computers. This can, among other things, be used to record sound. At the computer
there should also be a microphone and loudspeakers.
Start the program. To alter the sampling rate choose Edit!Preferences, then
choose Quality and set the sample rate to 44100Hz. To record, you press the record
button (the red circle) and start talking. After that you can mark the area you want to
save. Then, save by choosing File!Export As WAV, or Export Selection
As WAV. Save it somewhere in your working directory. It is then saved in the sound
format WAV (Windows Audio-Video). You can load this into MATLAB with the command
wavread.
Aliasing
Again we will work with a signal that is the sum of two sinusoidal signals (697 Hz and
1209 Hz), but now we will try different sampling frequencies. The DFT is a symmetric
and periodic function with period equal to the sampling frequency. This is due to the
definition of the transform.