ELEC 320, Fall 1998
Prof. Rich Kozick

Laboratory 4
Convolution, Matched Filters, and Noise in Digital Communication

We will investigate matched filters, which play an important role in applications such as digital communication, radar, sonar, ultrasound imaging, and many others. We will consider the digital communication application, in which the objective is to transmit binary data (0's and 1's) from one location to another. Matched filters are defined by their impulse response, so the filter output is computed by a convolution operation. (Note that this is different from the low-pass, high-pass, and band-pass filters that we studied in Lab 1, which are best represented by their frequency response rather than their impulse response.) We will see how the system performance is affected by two types of degradation that occur in every real communication system: passage of the data stream through a low-pass filter channel, and additive noise. The lab will conclude with a design project in which you will diagnose the shortcomings of a given digital communication system, and then improve the performance by designing proper matched filters. Simulink, which is a graphical programming environment that runs inside Matlab, will be used extensively to simulate the digital communication systems.

An overview of the lab activities follows. First, you will use Simulink to investigate how fast rectangular pulses can be transmitted over an RC circuit channel. Then you will see how noise affects the system performance. This will lead you to the matched filter, and you will see the improved performance that is achieved by incorporating matched filters. Finally, you will design proper matched filters for communication over a noisy low-pass filter channel.

1. Communication without Matched Filters

Download the following three Simulink files to your account on the Sun computers:


Then start matlab and type digcom_init at the Matlab prompt to initialize some variables that are used in the Simulink simulations. The variables are T, which is the width of each pulse; dt, which is the spacing between samples in the simulation (because the simulation must approximate the analog signals by sampled signals); and h, which is used later to implement the matched filter. You can enter the command type digcom_init.m at the Matlab prompt to view the contents of this file. You can change the pulse width T at any time by typing, for example, T=0.2 at the Matlab prompt before starting the Simulink simulation.

1.1. Communication without noise

Next, type digcom1 at the Matlab prompt to load the first Simulink simulation. The simulation passes rectangular pulses of width T seconds through a first-order low-pass filter (like an RC circuit). Verify that the circuit time constant is initially set to 0.1 seconds. The impulse response of this circuit for a time constant a is h(t) = (1/a) exp(-t/a) u(t). Noise is added to the output of the RC circuit. Verify that the noise variance is 1e-14, which means that the noise is negligible for now. (The noise has a Gaussian distribution with an average value of zero. The variance is, by definition, the average of the squared noise values.)

Take a few minutes to understand the three displays that are produced by the simulation: the graph, the eye diagram, and the error meter. These three displays are important tools in digital communication, and they will be your main tools for this lab. Please take time to digest the information they are providing, and discuss them the instructor.

If T is made smaller, then the pulses are shorter, so more bits are transmitted per second. This is usually a good thing -- it means we can build a faster modem. However, if the bits are no longer communicated correctly to the receiver, then the faster modem is useless. How small can you make T before significant errors occur?

In order to change T, edit the file digcom_init.m, change the value of T, then run digcom_init in Matlab. Then start the digcom1 Simulink simulation.

What is different about the eye diagram in cases such as T=0.4, T=0.1, and T = 0.05 ? How would you expect noise to affect the performance in these cases?

Throughout this lab, please think about and answer all questions of this type in your lab notebook. In addition, please discuss your answers with the instructor before proceeding. Your answers will be needed for the lab report. In addition, plots from the simulation can be printed -- instructions will be provided in lab.

1.2. Communication with noise

Now let us investigate how noise affects the ability to communicate the bits reliably. Noise arises from many sources, including thermal noise of the electrons in the circuits, as well as interference from other electrical devices. The noise is typically modeled by adding random numbers to the output signal from the RC circuit. Let us temporarily focus on the noise only, and eliminate the "pulse smearing" that occurs when we make T too small relative to the circuit time constant.

Perform the following steps to do this:

  1. Close digcom1
  2. Modify the file digcom_init.m as follows: dt = 0.01, T = 0.1. Then run digcom_init in Matlab.
  3. Run digcom1 and change the RC circuit time constant to 0.01 in the "RC circuit" block. (This means that the circuit is fast enough to easily follow the pulses of width T=0.1 seconds.)

Increase the noise variance and observe the performance. At what variance do you begin to see significant errors? What happens to the eye diagram as the noise gets stronger? Try to think of a way to process the received signal that will improve your ability to correctly recover the transmitted 0's and 1's. Is there any way to incorporate averaging of some sort to help get rid of the noise?

2. Improved Performance with Matched Filters

In order to detect a pulse with shape p(t) and duration T that arrives at the receiver, a "matched filter" is defined to have impulse response h(t) = p(T-t). Here, p(t) is the shape of the pulse after it passes through the channel. Make a sketch of p(t) for the case in which the pulse duration T is much larger than the RC circuit time constant. What would the matched filter impulse response h(t) = p(T - t) be for this case? Perform the convolution y(t) = p(t) * h(t) for this case. The result y(t) is the signal that appears at the output of the matched filter. How should y(t) be processed in order to decide if a transmitted bit is a 0 or a 1?

Consider the following questions.

  1. Why would the matched filter improve the performance in noise?
  2. In what sense is the matched filter performing an averaging operation?
  3. How would you implement the matched filter processing if you have discrete-time samples instead of the noisy analog signals? Think about how the matched filter can be approximated for this case. You might consider having 10 samples in every T seconds. (As you might expect, many modern communication systems are implemented in this way with digital processing.)

In order to load a Simulink simulation that includes matched filters, first modify the file digcom_init.m so that T = 0.1. (You might want to close digcom1 and type close all at the Matlab prompt to close the open windows.) Then type digcom_init at the Matlab prompt, followed by digcom2. The simulation digcom2 includes matched filtering, as well as the method investigated in Section 1 with no matched filtering. Set the initial parameter values to T=0.1 and the RC circuit time constant to 0.01 (so pulse smearing is negligible). Again try different values for the noise variance, and check how large the noise variance can become before the matched filter method incurs significant errors. How does this compare with not doing the matched filtering? Can you see from the eye diagram that the matched filter suppresses much of the noise? Explain why the matched filter suppresses noise. Please ask me to explain how the matched filter is implemented in digcom2. Be sure to have a plan for how to implement the matched filter with discrete-time samples before we discuss the matched filter implementation in the simulation.

3. Design Project

So far, we considered separately the effects of the noise and the pulse smearing due to the RC circuit channel. Let us now consider the more realistic situation in which both effects occur at the same time. Please do the following:

  1. Close digcom2
  2. Modify the file digcom_init.m as follows: dt = 0.01, T = 0.2. Then run digcom_init in Matlab.
  3. Run digcom2 and change the RC circuit time constant back to 0.1, and the noise variance to 1e-1.

Which system performs better in this case: with filtering, or without filtering? Let the simulation run for a while before answering.

Your job is to explain why the filter is not effective in this case, and then to design a new filter that lowers the error rate. Verify the improved performance of your design by simulation.

Hint: What is the shape of the pulse that appears at the receiver, after passing through the RC circuit channel? What should the impulse response of the matched filter be?