Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

1 Introduction

Measurements systems are always subject to noise signals. Statistical analysis provides a way
to analyze and quantify the impact of these noise signals on the desirable signals. This lab
introduces students to this powerful signal analysis tool. Matlab is used to generate a sine
wave, square wave, sine wave with superimposed noise and a square wave with superimposed
noise. The impact of noise is then analyzed through determining their Means, Standard
Deviations, Power Spectral Density, Power Density Functions, Cross-Correlations and Auto-
Correlations using Matlab built-in functions.

This report presents the results found. Appendix A presents the Matlab code implemented.

2 Signals Generation

1.1 Pure Sine and Square waves


The sinusoidal and square waves were created using the sin() and square() Matlab built-in
functions respectively at 1Hz within a 3s time range. Figures 1(a) and (b) shows the sin and
square waves generated by the code in listings 1 and 2 respectively.

Figure 1: generated (a) sin and (b)square waves

1.2 Sine and Square waves with Noise


Figure 2: generated random signal (noise)

The noise signals were then superimposed on both the sine and square waves by addition in
Matlab. Figures 3(a) and (b) shows the sin and square waves with superimposed noise signals.
Listings 4 and 5 presents the code used to generate these signals.

Figure 3: generated noise superimposed (a) sin and (b) square waves

3 Signals Analysis
The signals are statistically analyzed using the techniques described in the following
subsections. Matlab statistical functions were used to determine the quantities of each
technique.

1.3 Means
The mean refers to the average value of the signal.

Table 1: Signals Means


Signal Mean Value
Sine wave 1.0079  10 16
Square wave 0.0066
Sine wave with Noise -0.0017
Square wave with Noise 0.0050
1.4 Standard Deviations

Table 2: Signals Standard Deviations


Signal Standard Deviation
Sine wave 1.4142
Square wave 2.0033
Sine wave with Noise 1.4174
Square wave with Noise 2.0042

1.5 Power Spectral Density (PSD)

Figure 4: Power Spectral Density of (a)square wave, (b) square wave with noise, (c) sine wave and (d)
sine wave with noise
1.6 Power Density Functions (PDFs)

Figure 5: Power Density Functions Density of (a) square wave, (b) square wave with noise, (c) sine
wave and (d) sine wave with noise

1.7 Cross-Correlation
Figure 6: Cross-correlation of (Left) sine wave and sine wave with noise and (Right) square wave and
square wave with noise

1.8 Auto-Correlation

Figure 7: Auto-correlation of (Left) sine wave with noise and (Right) square wave with noise

4 Conclusion
Sine wave, square wave, sine wave with superimposed noise and a square wave with
superimposed noise were generated using Matlab. Statistical analysis was applied to these
signals by determining their Means, Standard Deviations, Power Spectral Density, Power
Density Functions, Cross-Correlations and Auto-Correlations.

You might also like