A LabView sketch was used to simulate the stochastic signals and evaluate the functionality of the **autocorrelation **and** cross-correlation** function. Also the **spectral power density **was calculated.

Contents

## Test Bench with LabView

In the next Figure 1 can be seen the used schematic:

The white noise is constant over the frequency, and is generated by the frequencies. The source of the white noise in Labview, is the virtual instrument “Gaussian White noise” part of the Digital Processing library of LabView.

A sinus wave and a Gaussian white noise signal are added. The white noise source alone is autocorrelated and shown in Figure 2. When a signal have a delta Dirac for τ= 0, it can be recognized that a white noise component is there.

The front panel of the block diagram can be seen in Figure 3

## Autocorrelation

Autocorrelation is the correlation of a function with a shifted version of itself. It indicates how the power is distributed within the signal.

To calculate the autocorrelation function, the virtual instrument “AutoCorrelation” was employed. Three signals with different amplitude were compared, 1, 5 and 20 respectively. The 10Hz sinus wave is mixed with a Gaussian noise source with a standard deviation of 1.

**10Hz with standard deviation 1. Amplitude is 1**

The autocorrelation function was plotted in Figure 5, Figure 7 and Figure 9. As it can be seen the autocorrelation functions (ACF) is always even, in this case they have symmetry about τ = 1023. For this central value corresponds to the mean energy of the sinus signal. As it can be seen on the autocorrelations figures, the greater the amplitude is, bigger is the mean energy of the signal.

**10Hz with standard deviation 1. Amplitude is 5**

**10Hz with standard deviation 1. Amplitude is 20**

The bigger the amplitude, less interferes the white noise to the signal. This is due the noise is the same for all the signals

When the signal **amplitude** is greater the noise affects less to the signal. The greater the amplitude is, the signal to noise ratio is, bigger. This can be seen on the previous Figure 10, Figure 11 and Figure 12. When the noise increment, also the SNR decreases after the FFT. This is to be seen in the following Figure 13 and Figure 14.

Amplitude 1. SD 1. 10 Hz

## Crosscorrelation

The crosscorrelation is the correlation function applied to two signals, getting a third one. This obtained signal shows the static dependence of both input signals as a function of the displacement of one relative to the other. For this simulation, the crosscorrelated signals are the previous threated sinus signal and another Gaussian noise source. This both noise sources are supposed to be independent.

From the previous signals, the Gaussian noise source has some **dependencies which each other**, but they shouldn’t if they were totally independent sources.

Also, it can be seen that the changes on the amplitude does not modify the crosscorrelation, since the sinus wave pure signal has no dependency with the Gaussian noise. The result doesn’t go to zero, because of the finite number of samples.

## Spectral power density

The spectral power density is obtained making the Fourier transform of the crosscorrelation function.

The sensor in the system has, sometimes, the same.

### Application: Detection of the sound source position

By using the crosscorrelation function, it can be determined how much delay between the two signals. This delay is proportional to the distance of the two sound sources.

To simulate this, a zeros array number is added. Adding a delay the number is delayed.

This is used to identify where a noise source is coming from. **Three microphones will be needed** to estimate exactly the position of the sound source. This method is also used in ultrasonic sensors to measure distances.

## Leave a Reply