ENEL 593 -- Digital Filters
Laboratory #5 Digital Filters in a Simple Digital Communication Systems
c L.T. Bruton. All rights reserved.
Objectives
In this laboratory, we will again make use of the many useful tools available in MATLABs Signal Processing Toolbox for analyzing signals and designing digital lters. Here, you will pursue an application in a simple communication system. You will explore using digital lters to suitably combine two dierent speech signals (the same two as used in Lab #4) over a single communication channel, and then separate them. There are two main components of the system. The Transmitter: two speech signals are combined to send over a communication channel. They are combined in such a way that they can be easily separated at the receiver. The Receiver: the two speech signals are recovered.
1.1
The Audio Files
For this experiment, you will be operating on the set of pre-recorded digital audio les which contain the uncontaminated speech signals rst tested in Lab #4. As before, these le are found in the Linux directory:
ENEL 593 Lab #5 (FDM Filtering Application) Fall, 2012
/local/courses/ENEL/593 or on Windows systems on the N: drive. The two les of interest there are talk1.mat and talk2.mat. Each audio clip is approximately 5 seconds long, recorded at a sample rate of 8012 Hz, corresponding roughly to a total of 40,000 samples. For this experiment, its also important to observe that they are not exactly the same size. As before, use MATLABs load command to read these les; for example:
load /local/courses/ENEL/593/talk1
MATLAB will load a column vector named talk1 from the talk1.mat le. Similarly it will load a column vector named talk2 from the talk2.mat le.
1.2
Listening to the Speech Clips
You will need to listen to these speech clips before transmission and after recovery through the channel to judge how well your system is working. Follow the tips given in the instructions to Lab #4 for listening to the sound clips using MATLABs sound command.
2
2.1
Frequency Division Multiplexing (FDM)
Speech Compression
Our goal here is to design a system that is capable of transmitting two speech signals (each having a sample frequency of 8012 Hz) simultaneously over a single channel at the same 8012 Hz sample frequency, and with a minimal loss of delity. This corresponds to a 2:1 compression ratio of each speech signal. A simple block diagram of the system is shown in Fig. 1.
talk1.mat Combiner talk2.mat lossless channel Separator
talk1out.mat talk2out.mat
Fig. 1. Compression of two speech signals over a lossless channel
ENEL 593 Lab #5 (FDM Filtering Application) Fall, 2012
2.2
FDM - Quick Review
For this experiment, we will employ FDM such that the two signal spectra share the available 4006 Hz channel bandwidth. You may recall from your earlier undergraduate courses that such a system can be implemented using a simple amplitude modulation (AM) scheme to shift the signal spectra around in the frequency domain. AM makes direct use of the very important convolution property given by x[n]y [n] X [k ] Y [k ] (1) for the Discrete Fourier Transform, where the left-hand side is multiplication in the time domain, and the right-hand side is convolution in the frequency domain. Also recall that a pure cosine function in the time domain is represented in the frequency domain precisely by a pair of impulse functions at positions on the frequency axis corresponding to the frequency f1 of the cosine function. The principle idea of AM is then to multiply a signal by a pure cosine function in the time domain. As a consequence, the signals spectrum is convolved with the impulse functions in the frequency domain. This convolution is very simple; the result is to simply shift identical copies of the signals frequency spectrum from the origin to positions centered about f1 , as illustrated in Fig. 2. (Note also the reduction in amplitude by one-half.)
Baseband signal
|X(f)| M
Amplitude Modulation
|X(f)| M/2
Modulated signal
f -f
Fig. 2. Shifting frequency spectra using AM
f f
The goal of FDM therefore is to exploit this property by shifting the spectra of the signals to dierent regions of the available frequency band, and to do our best to avoid any overlap of the signal spectra. Each signal must therefore have a unique carrier frequency (e.g., f1 ), and will need to be suitably bandlimited to avoid spectral overlap. The combined time-domain signal will simply be the sum of the suitably bandlimited modulated signals. This is the signal you transmit.
ENEL 593 Lab #5 (FDM Filtering Application) Fall, 2012
3
3.1
Building and Testing the System
The Transmitter
Begin with the transmitter stage. Decide rst how to divide the channel bandwidth between the two signals and what range of frequencies you wish to employ for each. You have to cram them both into a total of just 4006 Hz, so clearly you should expect some loss of delity. HINTS: There are many ways to do this; feel free to experiment, and anything goes! For example, you may choose to leave one signal at baseband, and also perhaps experiment with single-sideband (SSB) AM. See if you can eke out the best audio delity you can given the tight bandwidth constraints. Proceed as follows: 1. First, you will need to make the speech clips the same length since you will ultimately be adding them together after modulating. You may choose to truncate the larger one, or pad the shorter one with zeros. 2. Examine the frequency spectra of the two signals using MATLABs fft command, and decide on appropriate bandlimiting lters for each. As in Lab #4, you may use anything available in the Signal Processing Toolbox. You may wish to experiment with the various lter types and parameters in this and later steps to ultimately maximize the delity of the recovered signals. 3. Now implement your AM scheme to shift the frequency spectra to their designated spots in the available 4006 Hz range. Conrm this part of it by plotting the signal spectra using MATLABs fft command. Then, add the two signals in the time domain, and again conrm that the signal spectra are where they should be, and with minimal overlap.
3.2
The Receiver
In this stage, it is required to separate the two signals by ltering and demodulating to restore all of the signals to baseband. You may do the steps in any order you wish, and once again with anything available in the Signal Processing Toolbox. 1. Listen to the two recovered signals, and comment on your results. Plot their spectra and compare them with the spectra of the signals prior to combining them in the transmitter stage (but after bandlimiting). 2. To test your overall system design, measure and comment on the magnitude frequency response from each of the two inputs to each of the two outputs. You may use any method to do this, but perhaps the easiest is to proceed as follows.
ENEL 593 Lab #5 (FDM Filtering Application) Fall, 2012
(a) Give a unit impulse function in place of the original talk1 signal, with a zero sequence in place of the talk2 signal. Plot the magnitude spectrum at both receiver outputs. The talk1 output will be the in-channel frequency response, and the talk2 output will be the cross-channel frequency response. (b) Repeat step (a) by giving in a unit impulse function in place of the talk2 signal, and use a zero sequence in place of the talk1 signal. Here, the talk2 output will be the in-channel frequency response, and the talk1 output will be the cross-channel frequency response.
Modied by Norm, November 18, 2012.