Reference no: EM132887987
ENG740S1 Advanced DSP Techniques - University of Portsmouth
Exercise - Autocorrelation, Cross-Correlation and Wiener Filters
Task 1: Generate a 0.5 seconds sine burst signal s(t) with frequency of 10 Hz. Delay this signal appropriately to generate two signals in Matlab: s1 (t ) = a . s (t - Δ1 ) and s2 (t ) = a . s (t - Δ2 ) . Those signals should be 4 s long. Now, combine/add those two signals to make the signal x(t) as shown on figure attached below.
Task 2: Calculate the autocorrelation of received signal x. Set the maximum lag of the autocorrelation function to 2.5 s (i.e. autocorrelation should be calculated for the interval -2.5 s ÷ 2.5 s). Plot the signal x and its autocorrelation sequence and notice the peak values in the sequence. Where do they occur?
Hint: You can use Matlab function "xcorr" to calculate autocorrelation of sequence x. Type help xcorr in the command window to learn more about this function.
Task 3: Generate additive noise using the following Matlab line:
noise=a*std(s)*randn(size(x))
and add it to received signal x. Run the same simulation for this "noisy" case, i.e. calculate autocorrelation using noisy signal x. Plot the signal x and obtained autocorrelation again.
Comment on these issues:
1. What is noisier - your signals or new autocorrelation sequence?
2. Can you still detect the peaks and corresponding delays in the autocorrelation sequence obtained from the noisy signals?
3. How do you explain this?
Use of cross-correlation in radar system
This example demonstrates the basic concept of using cross-correlation operation in a simple radar-like system. Radar systems in general estimate the distance to the target by emitting a pulse type signal and measuring the time elapsed between the signal transmission and reception.
In this example we will use a "chirp" type signal, commonly used in radar and sonar type systems instead of simple pulse and show how cross-correlation improves the signal-to-noise ration and enables easy measurement of signal delay. A chirp signal is a sinusoid with a frequency that changes continuously over a certain frequency band over a certain period of time.
For emitted signal x(t), received signal y(t) can be expressed as:
y (t ) = ax (t - Δ) + n (t )
where n(t) represents the uncorrelated broadband noise and a is the relative amplitude of the reflected waveform. Main problem in delay estimation for radar systems is that the amplitude of the reflected signal may be very small compared to the original signal
and the amount of noise present in the signal. The SNR of the received signal y(t) is therefore usually very low.
To maximise the detectability a special filter called "matched filter" can be used in this kind of situations. The matched filter is proven to be optimal detector while maximising the SNR of a signal that is buried in noise. If the length of the emitted signal is T seconds, the impulse response of the matched filter is defined with:
h (t ) = x (T - t )
the signal x(t) is time-reversed (x(-t)) and time-shifted (x(T-t)) to obtain the impulse response of matched filter. Matched filtering is symbolically shown on figure below for both analogue and discrete-time domains.
Task 4: Prove that the output of matched filter actually represents the cross-correlation between emitted signal x(t) and received signal y(t), i.e. prove this mathematical relation
Task 5: Also prove that the cross-correlation function Rxy(?) in this situation equals scaled and time-shifted autocorrelation function of the emitted signal, i.e. prove the, relation:
(You can assume zero-mean values for all signals in the system.)
Since (according to above equation) cross-correlation function gives total time delay Δ between the transmitter and the receiver in the system, the distance to the target can now be easily estimated by multiplying the half of the time delay, Δ/2 with the speed of the wave.
Task 6: Write a Matlab code to simulate signal in described system. Your code should generate both emitted and received signals and obtain the cross-correlation in two different ways - directly (using "xcorr" function in Matlab) and indirectly, by designing the matched filter and then filtering the received signal through this filter.
The system to simulate should have the following parameters:
• sampling rate, fs = 200 Hz
• reflected waveform delay - Δ=2 s
• relative amplitude of the reflected waveform: a=0.1
• duration of the received signal - 6 s
Task 7: Plot all important waveforms in this example:
a) Transmitted chirp signal - x(t)
b) Matched filter impulse response - h(t)
c) Received signal (deeply buried in the noise) - y(t)
d) Cross-correlation sequence (directly obtained) - Rxy(t)
e) Output of the matched filter - ym(t)
Notice how cross-correlation operation maximises the SNR of the signal deeply buried in the noise and enables easy determination of the system delay. Estimate this delay from the plots for Rxy(t) and ym(t).
Task 8: Prove this by writing a Matlab script that will do the following:
1. Design a band pass IIR type filter using the following set of instructions:
Fs = 8000; % sampling frequency
fcl = 300; % lower cut-off frequency fch = 500; % higher cut-off frequency norder = 2; % filter order
[b,a] = butter(norder,[fcl/(Fs/2) fch/(Fs/2)]);
2. Obtain impulse response of this filter and plot it.
3. Generate a white noise sequence x(n).
4. Pass this sequence through the designed filter ("unknown" system) to obtain y(n).
5. Obtain cross-correlation between the filter output and input - Rxy(m).
6. Use calculated cross-correlation to estimate the impulse response of the filter according to the above relation.
Note that since the input is white noise, i.e. random, the experiment will not be valid for single run of the script, the filtering should therefore be carried for a number of times and the final result obtained as the average of all runs.
Task 9: Complete Task 8 above but now use the optimal, i.e. Wiener filter to estimate the unknown system instead of the adaptive filter. The Wiener-Hopf equation is given with:
w(n) = R-1 . R
Where Rxx represents the autocorrelation matrix of the input signal x(n) and Rdx represents the cross-correlation vector between the desired signal d(n) and the input signal x(n).
Hint: You can use Matlab's operator "\" to solve Wiener-Hopf equation. To set up the autocorrelation matrix you can use "xcorr" function to calculate autocorrelation sequence and "toeplitz" function to generate matrix Rxx. Alternatively you can use the "corrmtx" function to obtain the correlation matrix directly from the signal vector x.
Inverse system estimation using Wiener filter
Task 10: The purpose of channel equalisation is to compensate for a signal distortion in a communication channel. Communication systems transmit a signal from one point to another across a communication channel (electrical wire, fibre-optic cable or a wireless radio link). During the transmission process, the signal that contains information might become distorted. To compensate for this distortion, we can use the Wiener filter designed to represent the inverse of the communication channel and "undo" its distorting influence, i.e. given a channel of unknown impulse response, the purpose of a Wiener equalizer is to operate on the channel output such that the cascade connection of the channel and the equalizer provides an approximation to an ideal transmission medium.
Attachment:- Advanced DSP Techniques.rar