Escolar Documentos
Profissional Documentos
Cultura Documentos
Introduction
The purpose of this lab exercise is to implement and
investigate the properties of some selected
Adaptive Signal Processing configurations used in adaptive filtering applications.
(EASP) The tasks are performed in MATLAB, using the
MATLAB functions, implemented individually by
students, which simulate the systems employing the
Adaptive cancellation of noises and LMS algorithm.
interferences The results should be documented in a report.
Laboratory 3
3 4
5 6
1
2. Theoretical fundamentals 3. Computer experiments
2.2. ANC without an external reference signal 3.1. Supply network interferences cancellation in ECG
The effectiveness of this method of noise cancelation Implement the system for cancelation of interferences of supply
is lower than in the case when the ideal reference is network in ECG. In order to eliminate the influence of an initial
obtainable. phase, two filers of order 1 and two input signals are employed.
The extent to which this system is effective depends principally The first input is the sinusoid signal and the second the copy of
on how well the assumption of zero signal correlation between this signal delayed by π/2. Both signals are added and next
primary and reference signals holds up. subtracted from the primary signal (received from electrodes).
Assume the following prototype of MATLAB function
>> [e,y,ff] = lmsekg(x1,x2,d,alpha);
where x1 and x2 are the reference sinusoidal signals (one
delayed by π/2), d is an ECG signal registered by electrodes.
7 8
2
3. Computer experiments 3. Computer experiments
3.1. Supply network interferences cancellation in ECG 3.2. Analysis of behaviour of the single input LMS filter
Simulate the adaptive noise cancellation system for different Modify the function lms1.m in order to realize a single input
values of α = 0.001, 0.01, 0.1, 1 and m = 0.1, 0.2, 0.3. LMS filter using d(n) = x(n) and delaying the input x(n). Use the
>> [e,y,ff] = lmsekg(x1,x2,d,alpha); following prototype of this function
>> plot((1:N)/1000,e); xlabel('Time [s]'); >> [e,y,ff] = lms1_d(d,L,alpha,delta);
ylabel('ECG – after ANC'); grid; where delta is an integer delay ∆.
Observe runs of filter coefficients estimates. Generate N = 1000 samples of Gaussian white noise with
>> plot((1:N)/1000,ff'); xlabel('Time [s]'); zero mean and unit variance
ylabel('Filter coefficients'); grid; >> d = randn(1,N);
Investigate the dependence of the relative error δ on the Assume the following parameters of the filter: ∆ = 0, L = 32 and
modulation coefficient m and the adaptation constant α. α = 0.01 and simulate the single input LMS filter. Plot the error
Comment on the obtained results. signal and confirm that it decays to zero as n increases.
>> delta = sum((e(N/2+1:N)- Investigate the influence of the varying delay ∆. Does the
s(N/2+1:N)).^2,2)/sum(s(N/2+1:N).^2,2) system continue to operate satisfactorily for non-zero delays?
13 14
3
3. Computer experiments
3.3. Analysis of behaviour of ANC LMS system 4. References
Verify the following stability limit for the system operation
4 P. M. Clarkson, Optimal and adaptive signal
0<α < .
LA2 processing, CRC Press, 1993, chapters 4.2, 5.1.
What is the form of the filter coefficient fn(i) for n = 4999? Why?
K. Jędrzejewski, Adaptive Signal Processing (EASP)
>> plot(ff(:,5000));
lectures: EASP L8-L9.pdf and EASP L10.pdf.
Are the transfer function, stability limit, or filter coefficients
influenced by the choice of delay and sinusoidal phase?
Repeat the experiment using d(n) formed as the sum of two
sinusoids with frequencies ω0 = 2π500, ω1 = 2π1000. Confirm that
the LMS behaviour is equivalent to a notched filter notching two
reference frequencies.
>> d = cos(2*pi*0.05*(0:N-1)) +
cos(2*pi*0.1*(0:N-1));