Professional Documents
Culture Documents
Cancellation Using
FxLMS
Name-Soumya Anand
Roll no.- MTAC2107
Table of Content
1. Introduction
2. Active Noise Cancellation
3. Problem statement
4. ANC using FxLMS
5. FxLMS Algorithm derivation
6. Implementation in MATLAB
7. Results
8. Conclusion
9. Future Scope
10. References
Introduction
• Acoustic Noise are unwanted disturbances generated from industrial equipment.
• Passive noise control techniques fail to suppress low frequency sound.
• Active noise control are electromechanical system that cancels the primary noise based on the
principle of superposition.
Fig1. A signal gets erased by its anti-signal & the result is null
Active Noise Cancellation
Active Noise Control system using LMS algorithm was first developed by Bernard Widrow and his PhD
student, Ted Hoff in 1975.
Feedforward Broadband
ANC
Narrowband
Feedbackward
Fig2. Active noise control system classification
Primary noise
Noise source Error microphone
Reference Cancelling
microphone Loudspeaker
y(n)
x(n)
ANC
S^ (z)
x’(n)
LMS
where, s
where ,
Implementation in MATLAB
1. clc; clear all; close all;
2. N=1000; % samples
3. % P(z) and S(z) dummy paths
4. Pw=[0.01 0.25 0.5 1 0.5 0.25 0.01];
5. Sw=Pw*0.25;
6. % estimate S(z)
7. x_est=randn(1,N);
8. % measuring it at the sensor position
9. y_est=filter(Sw, 1, x_est);
10.% Initialize
11.Shx=zeros(1,16); % the state of Sh(z)
12.Shw=zeros(1,16); % the weight of Sh(z)
13.e_est=zeros(1,N); % error
14.% least mean square algorithm
15.mu=0.1; % step size
Continued…
16.for k=1:N % discrete time k
17. Shx=[x_est(k) Shx(1:15)]; % updating the state
18. Shy=sum(Shx.*Shw); % calculating o/p of Sh(z)
19. e_est(k)=y_est(k)-Shy; % calculating error
20. Shw=Shw+mu*e_est(k)*Shx; % update equation
21.end
22.% active noise control
23.X=randn(1,N); % generating the noise
24.% noise at the sensor position
25.Yd=filter(Pw, 1, X);
26.% Initiate the system
27.Cx=zeros(1,16); % the state of C(z)
28.Cw=zeros(1,16); % the weight of C(z)
29.Sx=zeros(size(Sw)); % initializing secondary path
30.e_cont=zeros(1,N); % control error
31.Xhx=zeros(1,16); % the state of the filtered x(k)
Continued…
32.% FxLMS algorithm
33.mu=0.1; % step size
34.for k=1:N % discrete time k
35. Cx=[X(k) Cx(1:15)]; % updating the controller state
36. Cy=sum(Cx.*Cw); % calculating the controller output
37. Sx=[Cy Sx(1:length(Sx)-1)]; % propagating to secondary path
38. e_cont(k)=Yd(k)-sum(Sx.*Sw); % measuring the residue error
39. Shx=[X(k) Shx(1:15)]; % updating the state of Sh(z)
40. Xhx=[sum(Shx.*Shw) Xhx(1:15)]; % calculating the filtered x(k)
41. Cw=Cw+mu*e_cont(k)*Xhx; % adjusting the controller weight
42.end
43.subplot(2,1,1)
44.plot([1:N], e_cont)
45.ylabel('Amplitude');
46.xlabel('Discrete time k');
47.title('Noise residue');
Result