MET 1113 - EE - Lab Simulation 1 - Thouseef
MET 1113 - EE - Lab Simulation 1 - Thouseef
ENVIRONMENT
LABORATORY EXPERIMENT 1
1
EXPERIMENT 1 (CLO 2, PLO 1, PLO 2, PLO 6, P7):
STUDY OF ADAPTIVE NOISE CANCELLATION USING RLS ADAPTIVE
FILTERING
1.0 Objectives
1. To use an recursive least square (RLS) filter to extract useful information from a noisy
signal.
2. To show the output waveform using the MATLAB software.
2.0 Equipment
Software: MATLAB
3.0 Theory
The information bearing signal is a sine wave that is corrupted by additive white gaussian
noise. The adaptive noise cancellation system assumes the use of two microphones. A primary
microphone picks up the noisy input signal, while a secondary microphone receives noise that is
uncorrelated to the information bearing signal but is correlated to the noise picked up by the
primary microphone.
The model illustrates in Figure 1 shows the ability of the Adaptive RLS filter to extract
useful information from a noisy signal.
>> plot(0:199,signal(1:200));
>> grid; axis([0 200 -2 2]);
>> title('The information bearing signal')
3
3. The noise picked up by the secondary microphone is the input for the RLS adaptive filter. The
noise that corrupts the sine wave is a lowpass filtered version of (correlated to) this noise. The sum
of the filtered noise and the information bearing signal is the desired signal for the adaptive filter.
>> plot(0:999,noise);
>> title('Noise picked up by the secondary microphone');
>> grid; axis([0 1000 -4 4]);
Fig.3 – Noise.
4
5. The noise corrupting the information bearing signal is a filtered version of 'noise'. Initialize the
filter that operates on the noise.
6. Run the code program below:
lp = dsp.FIRFilter('Numerator',fir1(31,0.5));% Low pass FIR filter
8. Running the RLS adaptive filter for 1000 iterations. As the adaptive filter converges, the filtered
noise should be completely subtracted from the "signal + noise". Also the error, 'e', should contain
only the original signal.
9. Run the code program below:
>> scope = timescope('TimeSpan',1000,'YLimits',[-2,2], ...
'TimeSpanOverrunAction','Scroll');
for k =1:10
n = noiseSource(); % Noise
s = signalSource();
d = lp(n) + s;
[y,e] = rlsfilt(n,d);
scope([s,e]);end
>> release(scope);
>> H = abs(freqz(rlsfilt.Coefficients,1,64));
>> H1 = abs(freqz(lp.Numerator,1,64));
>> wf = linspace(0,1,64);
>> plot(wf,H,wf,H1);
>> xlabel('Normalized Frequency (\times\pi rad/sample)');
>> ylabel('Magnitude');
>> legend('Adaptive Filter Response','Required Filter Response');
>> grid;
>> axis([0 1 0 2]);
6.0 Conclusion
Recursive Least Square (RLS) filter to extract useful information from a noisy signal is
demonstrated by writing a program code in Matlab r2023b and the output waveforms are
demonstrated.
6
COURSE: Advanced Digital Signal Processing (MET 1113)
LAB EXPERIMENT 1 (CLO 2, PLO 1, PLO 2, PLO 6, P7 ): STUDY OF ADAPTIVE
NOISE CANCELLATION USING RLS ADAPTIVE FILTERING