<<

ECE363, Experiment 02, 2021 Communications Lab, University of Toronto

Experiment 02:

Bruno Korst - [email protected]

Abstract This experiment will introduce you to some of the characteristics of noise, as it is observed in communication systems. You will simulate the generation and manipulation of noise with the use of Simulink. In particular, you will explore different types of noise and their spectral characteristics. Keywords Random Process — Autocorrelation — Power Spectral Density — Filtering — — Coloured Noise

Contents

Introduction 1 1 Suggested Reading 2 2 Equipment and Software Tools 2 3 Experiment 2 3.1 Autocorrelation and Power Spectral Density...... 2 Autocorrelation• Power Spectral Density 3.2 Narrow Band Noise...... 3 3.3 Quantization Noise...... 3 3.4 Signal to Noise Ratio (SNR)...... 4 4 Conclusion 4 Acknowledgments 5 References 5

Introduction Noise is defined as any unwanted signal energy that is present within the passband of a communication system. If your system is designed to use a 200KHz band centered at some frequency to transmit music, whatever other signal present within this band that is not your music can be considered noise. Typically, noise can be seen as correlated or uncorrelated. The former means that the noise results from the signal itself (i.e., there is some relation between the two), whereas the latter will be present even when the signal is not. Noise can be generated externally to the system, for example by an electrostatic discharge in the atmosphere, or internally to the system, by among other things the random motion of electrons within a conductor. This latter example, named thermal noise has a flat spectrum across all frequencies. Such characteristic makes this type of noise to be referred to as white noise, as an analogy with white light that has all frequencies of the visible spectrum. It is relevant to look at noise from the statistical perspective, since modelling noise is crucial for the simulation and design of communication systems. Thermal noise, for instance, follows a Gaussian distribution and has a flat spectrum across all frequencies, making it white and . If you submit a white Gausian noise source through a bandlimited linear system (say, a filter), the noise observed at the output of this filter will no longer be white (it is now bandlimited), but it still follows its Gaussian distribution. In addition, since we do have noise being added to the signal in any communication system, it becomes necessary to understand the concept of signal to noise ratio, or SNR for short. Experiment 02: Noise — 2/5

1. Suggested Reading You should prepare for this first experiment by reviewing probability and noise from the course notes or [1] and [2]. You must be familiar with time domain / frequency domain representation of signals. If you are not, you can review [3] or [4], for instance. For this practical session, you will be presented with very simple input-output block diagrams in Simulink and will be required to display the outputs of your simulation meaningfully using simulation scopes in both domains. Except for the last part of the experiment, which uses a DSP platform, all other parts will be done in simulation. The lab preparation is required and will be marked for this lab. You should have it ready prior to the beginning of the experiment.

2. Equipment and Software Tools The following list of equipment and software tools will be utilized in all experiments.

Hardware:

• One Signal Generator;

• One Two-Channel Oscilloscope;

• One TI LCDK DSP development platform attached to a PC workstation.

• Coaxial cables BNC-to-BNC and a T connector.

Software:

• Matlab - Release 2016A;

• Simulink with Communication Toolbox;

• Code Composer Studio (CCS), v.6.0.

3. Experiment 3.1 Autocorrelation and Power Spectral Density It should be known to you now that the autocorrelation of a signal is the correlation of such signal with itself. When one performs a correlation between two signals, the intention is to find an estimate of how much of one signal is present on the other. In other words, how much similarity there is between the two signals as a function of the time between two observations. The resulting sequence from the autocorrelation calculation will According to the Wiener-Khintchine theorem, the Fourier transform of the autocorrelation function of an energy signal is the Power Spectral Density (PSD) of this signal. An energy signal is one for which the total energy measured in frequency is finite. This can be, for example, a truncated sinusoidal signal. Also, if the energy signal is real-valued, the PSD is symmetric. You will explore these characteristics with the models presented below.

3.1.1 Autocorrelation Build and run the system as shown in Figure1.

(a) Unfiltered Gaussian Noise (b) Filtered Gaussian 1. Autocorrelation Experiment 02: Noise — 3/5

For all models in this experiment, you will use the sample time of 1/48000. This is to be compatible with future experiments using the DSP platform, where you will necessarily use 48KHz as your sampling frequency. The objective of this section is to compare the autocorrelation of unfiltered and filtered Gaussian noise. In particular, you should observe the effect of the bandwidth limitation on the output of the autocorrelation operation. It will likely make your life easier to have both systems (i.e., 1(a) and 1(b)) running to make a visual comparison. The Digital Filter Design block should be set to have order 100, and for this portion you will work with a lowpass filter only. This will accomplish a filter with very sharp cutoff, or small transition band. Your task will be to modify the cutoff frequency of the filter and observe the consequences. Do not forget to press the Design button on the GUI after you make the changes. After you make your system run, answer some questions on the answer sheet.

3.1.2 Power Spectral Density For this section, your task is to build the models shown in Figure2 below. The objective of this section is to observe the effects of filtering on the power spectral density (PSD) of the signal as well. We start by looking at the PSD display for white Gaussian noise. Build the models as shown below, and explore with the options for the frequency domain display, particularly for the subsystem you build for the model in Figure 2(b).

(a) With Existing Analyzer (b) Build Your Own Analyzer Figure 2. Gaussian Noise Spectrum

For Figure 2(b), your buffer should be 1024 samples long, and that should also be the length of your FFT. The Magnitude FFT block should be set also to magnitude squared, and the Vector Scope should be set to display frequency. After you do all this and run your models, answer some questions in the answer sheet.

3.2 Narrow Band Noise In order to probe narrow band noise, you will generate white noise and restrict its spectrum to a frequency interval, by adding a bandpass filter to the path. In order to do this, you will bring into the previous model the Digital Filter Design block, found under the DSP System Toolbox -- Filter Implementations. When you finish connecting this new block, double-click on it and select Bandpass, and use 100 as the order for the filter. Leave the other numbers as default for now. When you click on the Design button, you will see that this will give you a filter with very sharp edges. The model should look like the one found in Figure3. Run your model now and answer some questions in the answer sheet.

Figure 3. Simulating Narrow Band Noise

3.3 Quantization Noise In systems that transform analog signals into digital signals, two operations are performed to accomplish this transformation. They are: sampling and quantization. Whereas the process of sampling must follow certain limits in terms of how often the signal is to be sampled to allow for its recovery, the quantization process is limited by the number of bits used to represent each sample. This is to say that there will be some degree of quantization noise – albeit very small – as a result of the finite number Experiment 02: Noise — 4/5 of bits used in the representation of the sample. For a CD quality audio system, for instance, 16 bits are typically used per sample, and samples are taken once every 44.1 thousands of a second. More on sampling and quantization later in the course. Below you will explore quantization noise and its spectrum. Build a model like the one on Figure4.

Figure 4. Model for Quantization Noise

The main blocks you will use are DSP Sine, Quantizer, Mux, Add, Scope and Power Spectral Density. The latter block is found in the Simulink Extras library, under Additional Sinks. The purpose for this exercise is for you to determine how noise – in this case quantization noise – is reduced for every extra bit used in the quantization process. Run your model now and answer some questions in the answer sheet.

3.4 Signal to Noise Ratio (SNR) For this part you will build a slightly more complex model. This is because you will add white noise to a single tone and will measure SNR with the system running. Your system should look like the one provided in Figure5. The main components are a DSP Sine, representing the signal and the Gaussian Noise Generator representing the noise. You will add a Slider Gain to the signal, varying from 0 to 5. The SNR will be calculated in terms of the RMS values of both signal and noise. Therefore, you will need an RMS block found in the DSP System Toolbox, attached to a Display block. The calculation itself is done by implementing the equation SNRdB = 20 ∗ log(VRMS Signal/VRMS Noise).

Figure 5. Calculating Signal to Noise Ratio

4. Conclusion In this experiment you explored some of the characteristics and types of noise. In particular, you have seen white and coloured noise via simulation, you have explored wideband and narrowband noise, you have looked at the role of the autocorrelation function, power spectral density and filtering. Experiment 02: Noise — 5/5

Acknowledgments Thanks to all the students who have provided input on the previous versions of this experiment.

References [1] S. Haykin and M. Moher. Introduction to Analog and Digital Communications, 2nd. Ed. Wiley, 2007. [2] B.P. Lathi. Modern Digital and Analog Communication Systems, 3rd Ed. Oxford University Press, 1998. [3] Schafer R. W. Yoder M.A. McClellan, J.H. Signal Processing First. Pearson, 2003. [4] Schafer R. W. Oppenheim A. V. Discrete-Time Signal Processing, 3rd. Ed. Prentice-Hall, 2009.