This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Implementation of the Feedforward Multichannel Virtual Sensing Active Noise Control (MVANC) by Using MATLAB

Boxiang Wang [email protected]
Abstract

The multichannel virtual sensing active noise control (MVANC) methodology is an advanced approach that may provide a wide area of silence at specific virtual positions that are distant from the physical error microphones. Currently, there is a scarcity of open-source programs available for the MVANC algorithm. This work presents a MATLAB code for the MVANC approach, utilizing the multichannel filtered-x least mean square (MCFxLMS) algorithm. The code is designed to be applicable to systems with any number of channels. The code can be found on GitHub.

\criartitulo

1 Introduction

Active noise control, often known as ANC, is a cutting-edge method that eliminates unwanted noise by providing regulated anti-noise that effectively cancels out the noise that is present in the environment. In the field of wave physics, this phenomenon, which is referred to as destructive interference, is an advanced application of the theory of superposition [1, 2]. With the help of the adaptive algorithms [3, 4, 5, 6, 7, 8], the use of active noise cancellation (ANC) is widespread in a variety of applications that are sensitive to noise problems. Some instances of these applications are windows [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22], vehicles, and headphones [23, 24, 25, 26, 27, 28, 29, 30]. ANC is also efficient at minimizing low-frequency noise [31, 32]. However, it is essential to note that the "quiet zone" is only localized to the monitoring "error sensor" in the majority of ANC applications. This is because the monitoring "error sensor" supplies a posteriori information to the adaptive algorithm. Therefore, the typical approach to active noise control (ANC), in which the quiet zone is dependent on the positioning of the physical error sensor, appears to be unworkable in situations where physical placement is inconvenient, such as at the eardrums [33, 34, 35, 36, 37] or domestic living areas [12]. Currently, numerous forms of virtual sensing ANC approaches have been presented in order to ease the restriction on error sensor placement. This problem cannot be solved without these techniques [38]. The silent zone can be efficiently generated in these ways at the desired ’virtual’ locations, which are located away from the actual error sensors [39]. Specifically, we focus on a virtual sensing ANC algorithm that uses an auxiliary filter to achieve optimal control on the virtual position which overcomes the spatial correlation and causality constraint between error microphones [40]. This technique requires a preliminary training stage to produce an auxiliary filter that indirectly records the relationship between the physical sensor and the required virtual location. This stage is necessary to obtain the filter. As a consequence, the pre-trained filter assists the ANC system in obtaining sufficient management of the disturbance at the position of the virtual error sensor. To obtain a larger quiet zone at the desired location, this study realizes the feedforward multichannel virtual sensing ANC (MVANC) technique employing the widely-used simulation tool, MATLAB, and makes its code accessible to the public.

A comprehensive explanation of a MATLAB program that simulates a feedforward multichannel virtual sensing active noise control (MVANC) system by utilizing the multichannel filtered-x least mean square (MCFxLMS) [41, 42, 43, 44] method is provided in this paper.

2 Theoretical Introduction on Feedforward Multichannel Virtual Sensing ANC Technique

Figure 1 depicts the implementation of a generic multichannel ANC system, which includes reference microphones with a value of JJ, secondary sources with a value of KK, and physical error microphones with a value of MM. A further point to consider is that there are NpN_{p} independent primary sources that are positioned ahead of the reference microphones. When applied to this multichannel system, the MVANC approach is utilized to cancel out the disturbances that occur at the NvN_{v} virtual microphone positions in the distant field. It is assumed that the number of reference microphones is more than the number of primary sources (Np<JN_{p}<J). This assumption is made for the sake of brevity and to avoid losing generality.

The MVANC technique is comprised of two stages: the first stage is the tuning stage, and the second stage is the control stage. During the tuning stage, the output signal vector is determined by the following equation, as depicted to the right in Figure 2:

𝒚(n)=𝒘𝑻(n)𝒙(n),{\bm{y}}(n)={{\bm{w}}^{\bm{T}}}(n){\bm{x}}(n), (1)

where

𝒚(n)=[y1(n),y2(n),,yk(n),,yK(n)]T.{\bm{y}}(n)={[{y_{1}}(n),{y_{2}}(n),...,{y_{k}}(n),...,{y_{K}}(n)]^{T}}.

The expression yk(n){y_{k}}(n) represents the kth output signal at a time sample of nn, while the expression ()T{(\cdot)^{T}} represents the matrix transpose operator. The stacked reference vector is stated to be

𝒙(n)=[𝒙1T(n),𝒙2T(n),,𝒙jT(n),,𝒙JT(n)]T,{\bm{x}}(n)={[{\bm{x}}_{1}^{T}(n),{\bm{x}}_{2}^{T}(n),...,{\bm{x}}_{j}^{T}(n),...,{\bm{x}}_{J}^{T}(n)]^{T}}, (2)

in which 𝒙j(n){{\bm{x}}_{j}}(n) denotes the jjth reference vector, which owns Nx{N_{x}} elements and is expressed as

𝒙j(n)=[xj(n),xj(n1),,xj(nNx+1)]T.\bm{x}_{j}(n)=\left[x_{j}(n),x_{j}(n-1),\ldots,x_{j}(n-N_{x}+1)\right]^{\text{T}}. (3)

The control filter matrix 𝒘(n){\bm{w}}(n) in Eq. (1) is given by

𝒘(n)=[𝒘11(n)𝒘21(n)𝒘K1(n)𝒘12(n)𝒘22(n)𝒘K2(n)𝒘1J(n)𝒘2J(n)𝒘KJ(n)],\bm{w}(n)=\begin{bmatrix}\bm{w}_{11}(n)&\bm{w}_{21}(n)&\cdots&\bm{w}_{K1}(n)\\ \bm{w}_{12}(n)&\bm{w}_{22}(n)&\cdots&\bm{w}_{K2}(n)\\ \vdots&\vdots&\ddots&\vdots\\ \bm{w}_{1J}(n)&\bm{w}_{2J}(n)&\cdots&\bm{w}_{KJ}(n)\end{bmatrix}, (4)

where the variable 𝒘kj(n){{\bm{w}}_{kj}}(n) denotes the weight vector of the control filter, which determines the influence of the jjth input reference signal on the kkth output control signal:

𝒘kj(n)=[wkj,0(n),wkj,1(n),,wkj,Nx1(n)]T.\bm{w}_{kj}(n)=\left[w_{kj,0}(n),w_{kj,1}(n),\ldots,w_{kj,N_{x}-1}(n)\right]^{\text{T}}. (5)

According to the traditional MCFxLMS technique, the new control filter that extends from the jjth input to the kkth output is obtained from

𝒘kj(n+1)=𝒘kj(n)μ1i=1Nv𝒙v,jki(n)ev,i(n),{{\bm{w}}_{kj}}(n+1)={{\bm{w}}_{kj}}(n)-{\mu_{1}}\sum\limits_{i=1}^{{N_{v}}}{{{{\bm{x^{\prime}}}}_{v,jki}}(n){e_{v,i}}(n)}, (6)

where the symbol μ1\mu_{1} is used to indicate the stepsize of the MCFxLMS algorithm, while the symbol ev,i(n){{e_{v,i}}(n)} is used to represent the error signal at the iith virtual microphone. The filtered reference xv,jki(n){{{x^{\prime}}_{v,jki}}(n)} is a convolution that is performed between the jjth reference signal xj(n){x_{j}}(n) and the virtual secondary path estimate g^v,ik(n){{\hat{g}}_{v,ik}}(n), which includes the path from the kkth secondary source to the iith virtual microphone. In the tuning step, it is possible to observe that the final control filter converges to the same optimal control filter that was achieved using the standard MCFxLMS. This knowledge may be derived from the equation (6).

Following this procedure, the optimal control filters can be obtained once the training converges. Then, the auxiliary filters are trained using the least mean square (LMS) algorithm as shown in Fig. 3. The mmth auxiliary filter vector can be obtained from

𝒉m(n+1)=𝒉m(n)+μ2eh,m(n)𝒙¯(n),\bm{h}_{m}(n+1)=\bm{h}_{m}(n)+\mu_{2}e_{h,m}(n)\bm{{\bar{x}}}(n), (7)
Refer to caption
Figure 1: Simplified schematic of the MVANC algorithm.
Refer to caption
Figure 2: Training the control filter during the tuning phase of the MVANC process.

where μ2\mu_{2} denotes the stepsize of the LMS algorithm, and

𝒉m(n)=[𝒉m1T(n),𝒉m2T(n),,𝒉mjT(n),,𝒉mJT(n)]T.\bm{h}_{m}(n)=\left[\bm{h}_{m1}^{T}(n),\,\bm{h}_{m2}^{T}(n),\,\ldots,\,\bm{h}_{mj}^{T}(n),\,\ldots,\,\bm{h}_{mJ}^{T}(n)\right]^{T}. (8)

The expression 𝒉mj(n)\bm{h}_{mj}(n) denotes the auxiliary filter from the jjth reference microphone to the mmth physical microphone with a length of Nh{N_{h}} taps. Therefore,

𝒉mj(n)=[hmj,0(n),hmj,1(n),,hmj,Nh1(n)]T.\bm{h}_{mj}(n)=\left[h_{mj,0}(n),\,h_{mj,1}(n),\,\ldots,\,h_{mj,N_{h}-1}(n)\right]^{\text{T}}. (9)

The stacked reference vector is given by

𝒙¯(n)=[𝒙¯1T(n),𝒙¯2T(n),,𝒙¯JT(n)]T,\bar{\bm{x}}(n)=\left[\bar{\bm{x}}_{1}^{\text{T}}(n),\,\bar{\bm{x}}_{2}^{\text{T}}(n),\,\ldots,\,\bar{\bm{x}}_{J}^{\text{T}}(n)\right]^{\text{T}}, (10)

where 𝒙¯j(n)\bar{\bm{x}}_{j}(n) represents the jjth reference vector with Nh{N_{h}} elements and is expressed as

𝒙¯j(n)=[xj(n),xj(n1),,xj(nNh+1)]T.\bar{\bm{x}}_{j}(n)=\left[x_{j}(n),\,x_{j}(n-1),\,\ldots,\,x_{j}(n-N_{h}+1)\right]^{\text{T}}. (11)

The error signal eh,m(n){e_{h,m}}(n) is stated to be

eh,m(n)=ep,m(n)𝒉mT(n)𝒙¯(n),e_{h,m}(n)=e_{p,m}(n)-\bm{h}_{m}^{\text{T}}(n)\bar{\bm{x}}(n), (12)
Refer to caption
Figure 3: Training the auxiliary filter during the tuning phase of the MVANC technique.
Refer to caption
Figure 4: Training the control filter during the control phase of the MVANC technique.

where ep,m(n)e_{p,m}(n) denotes the error signal at the mmth physical microphone.

During the control step, the physical microphones are retained while the virtual microphones are eliminated. As depicted in Figure 4, the new control filters are obtained by utilizing the MCxLMS algorithm.

𝒘kj(n+1)=𝒘kj(n)μ3m=1M𝒙p,jkm(n)eh,m(n),{{\bm{w}}_{kj}}(n+1)={{\bm{w}}_{kj}}(n)-{\mu_{3}}\sum\limits_{m=1}^{M}{{{{\bm{x^{\prime}}}}_{p,jkm}}(n){e_{h,m}}(n)}, (13)

where the symbol μ3\mu_{3} represents the stepsize of the MCFxLMS algorithm. The variable xp,jkm(n){{x^{\prime}}_{p,jkm}}(n) represents the product of the convolution between the secondary path estimate g^mk(n){{\hat{g}}_{mk}}(n), which is derived from the kkth secondary source to the mmth physical microphone, and the jjth reference signal represented by xj(n){x_{j}}(n). The error signal eh,me_{h,m} is given by

eh,m(n)=ep,m(n)𝒉0,mT𝒙¯(n),e_{h,m}(n)=e_{p,m}(n)-\bm{h}_{0,m}^{T}\bar{\bm{x}}(n), (14)

where 𝒉o,m\bm{h}_{o,m} represents the mmth optimal auxiliary filter obtained from Eq. (7).

Following the tuning stage and control stage described earlier, the feedforward MVANC system that has been proposed is capable of achieving noise cancellation at NN virtual places inside the system.

3 Code Explanation

The section provides the explanation of the program of a feedforward MVANC in Matlab. This program includes the following five MATLAB files: CreatReferenceSignal.mCreatReferenceSignal.m generates the filtered reference signals and disturbances, MultichannelFxLMS.mMultichannelFxLMS.m, AuxiliaryLMS.mAuxiliaryLMS.m and ContrFxLMS.mContrFxLMS.m are the programs of the MVANC technique, while VirtualSensing_test.mVirtualSensing\_test.m is the main program used to evaluate the programs of the MVANC system.

3.1 Function: CreatReferenceSignal

The MVANC technique utilizes the FxLMS algorithm to adaptively update the control filter coefficients. Therefore, CreatReferenceSignal.mCreatReferenceSignal.m generates the reference signals filtered by the physical secondary path and the virtual secondary path respectively. In addition, it produces disturbances at the location of the physical microphone and virtual microphone respectively. These signals will later be used in other functions.

1function [Dv,Dp,Fx_v,Fx_p] = CreatReferenceSignal(Pv,Pp,Sv,Sp,PriNoise,N,L,K,M,J)
2%% -----------------------------------------------------------
3% Inputs:
4% Pv is the virtual primary path.
5% Pp is the physical primary path.
6% Sv is the virtual secondary path.
7% Sp is the physical secondary path.
8% PriNoise is the primary noise.
9% N is the number of simulation cycles.
10% L is the length of control filter.
11% K is the number of secondary sources.
12% M is the number of virtual microphones.
13% J is the number of physical microphones.
14% Outputs:
15% Dv is the disturbance at virtual microphone.
16% Dp is the disturbance at physical microphone.
17% Fx_v is the reference signal filtered by virtual secondary path.
18% Fx_p is the reference signal filtered by physical secondary path.
19%% -----------------------------------------------------------
20Dp = zeros(N,J);
21for i=1:J
22 Dp(:,i) = filter(Pp(:,i),1,PriNoise);
23end
24Dv = zeros(N,M);
25for i=1:M
26 Dv(:,i) = filter(Pv(:,i),1,PriNoise);
27end
28Fx_p = zeros(N+L-1,J,K);
29for i = 1:K
30 for j = 1:J
31 Fx_p(:,j,i) = [zeros(L-1,1);filter(Sp(:,j,i),1,PriNoise)];
32 end
33end
34Fx_v = zeros(N+L-1,M,K);
35for i = 1:K
36 for j = 1:M
37 Fx_v(:,j,i) = [zeros(L-1,1);filter(Sv(:,j,i),1,PriNoise)];
38 end
39end
40end

In this code snippet, DvDv is used to store the disturbances at virtual microphones and has a dimension of NN by MM, while DpDp is used to store the disturbances at physical microphones and has a dimension of NN by JJ. In addition, Fx_vFx\_v is used to store the reference signals filtered by virtual secondary paths and has a dimension of NN by MM by KK, while Fx_pFx\_p is used to store the reference signals filtered by virtual secondary paths and has a dimension of NN by JJ by KK. NN, MM, JJ and KK denote the simulation cycle number, the number of virtual error microphones, the number of physical error microphones and the number of secondary sources respectively.

3.2 Function: MultichannelFxLMS

In the tuning stage of the MVANC technique, the optimal control filters are first trained by MultichannelFxLMS.mMultichannelFxLMS.m using the FxLMS algorithm.

1function [W,Er]= MultichannelFxLMS(L,K,M,N,Fx_v,Dv,StepSize)
2%% -----------------------------------------------------------
3% Inputs:
4% L is the length of control filter.
5% K is the number of secondary sources.
6% M is the number of virtual microphones.
7% N is the number of simulation cycles.
8% Fx_v is the reference signal filtered by virtual secondary path.
9% Dv is the disturbance at virtual microphone.
10% StepSize is the stepsize of FxLMS algorithm.
11% Outputs:
12% W is the control filter matrix.
13% Er is the error signal at virtual microphone.
14%% -----------------------------------------------------------
15W = zeros(K*L,1);
16FX = zeros(M,K*L);
17Er = zeros(M,N);
18for i = 1:N
19 for j = 1:M
20 for kk= 1:K
21 FX(j,(kk-1)*L+1:kk*L) = Fx_v(i+L-1:-1:i,j,kk)’;
22␣␣␣␣␣␣␣␣end
23␣␣␣␣end
24␣␣␣␣Ev=Dv(i,:)’-FX*W;
25␣␣␣␣SX=StepSize*Ev’*FX;
26␣␣␣␣W␣␣=W+SX’;
27␣␣␣␣Er(:,i)=Ev;
28end
29end

In this code snippet, WW is used to store the optimal control filters trained using the FxLMS algorithm and has a dimension of KK by LL, where LL denotes the length of the control filter. ErEr is used to store the error signals at virtual microphones and has a dimension of MM by NN.

3.3 Function: AuxiliaryLMS

After the control filter converges, the optimal control filters are then used by AuxiliaryLMS.mAuxiliaryLMS.m to train the auxiliary filters using the LMS algorithm.

1function [H,Er]=AuxiliaryLMS(L,K,J,N,Fx_p,Dp,PriNoise,W,StepSize)
2%% -----------------------------------------------------------
3% Inputs:
4% L is the length of control filter.
5% K is the number of secondary source.
6% J is the number of physical microphones.
7% N is the number of simulation cycle.
8% Fx_p is the reference signal filtered by physical secondary path.
9% Dp is the disturbance at physical microphone.
10% W is the optimal control filter matrix.
11% StepSize is the stepsize of LMS algorithm.
12% Outputs:
13% H is the auxiliary filter matrix.
14% Er is the error signal of LMS algorithm.
15%% -----------------------------------------------------------
16H = zeros(J*L,1);
17SH = zeros(J*L,1);
18FX = zeros(J,K*L);
19YH = zeros(J,1); % The output signal of the auxiliary fitler.
20Er = zeros(J,N) ;
21X = [zeros(L-1,1); PriNoise];
22for i = 1:N
23 for j = 1:J
24 for kk = 1:K
25 FX(j,(kk-1)*L+1:kk*L) = Fx_p(i+L-1:-1:i,j,kk)’;
26␣␣␣␣␣␣␣␣end
27␣␣␣␣␣␣␣␣YH(j)=␣␣X(i+L-1:-1:i)’*H((j-1)*L+1:j*L);
28␣␣␣␣end
29␣␣␣␣Ep=Dp(i,:)’-FX*W;%Theerrorsignalatphysicalmicrophone.
30␣␣␣␣Eh=Ep-YH;
31␣␣␣␣forj=1:J
32␣␣␣␣␣␣␣␣SH((j-1)*L+1:j*L)=StepSize*Eh(j)*X(i+L-1:-1:i);
33␣␣␣␣end
34␣␣␣␣H=H+SH;
35␣␣␣␣Er(:,i)=Eh;
36end
37end

In this code snippet, HH is used to store the optimal auxiliary filters trained using the LMS algorithm and has a dimension of JJ by LL. ErEr is used to store the error signals and has a dimension of JJ by NN.

3.4 Function: ContrFxLMS

In the control stage of the MVANC technique, the optimal auxiliary filers are used by ContrFxLMS.mContrFxLMS.m to train the new control filters using the FxLMS algorithm.

1function [WC,ErPhysic,ErVirt] = ContrFxLMS(L,K,M,J,N,Fx_p,Fx_v,Dp,Dv,PriNoise,H,StepSize)
2%% ------------------------------------------------------------------------
3% Inputs:
4% L is the length of control filter.
5% K is the number of secondary source.
6% M is the number of virtual microphones.
7% J is the number of physical microphones.
8% N is the number of simulation cycle.
9% Fx_p is the reference signal filtered by physical secondary path.
10% Fx_v is the reference signal filtered by virtual secondary path.
11% Dp is the disturbance at physical microphone.
12% Dv is the disturbance at virtual microphone.
13% H is the optimal auxiliary filter matrix.
14% StepSize is the stepsize of FxLMS algorithm.
15% Outputs:
16% WC is the new control filter matrix.
17% ErPhysic is the error signal at physical microphone.
18% ErVirt is the error signal at virtual microphone.
19%% ------------------------------------------------------------------------
20FX = zeros(J,K*L);
21FV = zeros(M,K*L);
22WC = zeros(K*L,1);
23ErPhysic = zeros(J,N);
24ErVirt = zeros(M,N);
25XH = zeros(N,J);
26for i = 1:J
27 XH(:,i) = filter(H((i-1)*L+1:i*L),1,PriNoise);
28end
29for i=1:N
30 for j = 1:J
31 for kk = 1:K
32 FX(j,(kk-1)*L+1:kk*L) = Fx_p(i+L-1:-1:i,j,kk)’;
33␣␣␣␣␣␣␣␣end
34␣␣␣␣end
35␣␣␣␣forj=1:M
36␣␣␣␣␣␣␣␣forkk=1:K
37␣␣␣␣␣␣␣␣␣␣␣␣FV(j,(kk-1)*L+1:kk*L)=Fx_v(i+L-1:-1:i,j,kk)’;
38␣␣␣␣␣␣␣␣end
39␣␣␣␣end
40␣␣␣␣Ep␣␣␣␣␣␣=Dp(i,:)’-FX*WC;
41␣␣␣␣ErVirt(:,i)=Dv(i,:)’-FV*WC;
42␣␣␣␣Eh␣␣␣␣␣␣=Ep-XH(i,:)’;
43␣␣␣␣WC␣␣␣␣␣␣=WC+(StepSize*Eh’*FX)’;
44␣␣␣␣ErPhysic(:,i)=Ep;
45end
46end

In this code snippet, WCWC is used to store the new control filters trained using the FxLMS algorithm and has a dimension of KK by LL. ErPhysicErPhysic is used to store the error signals at physical microphones which have a dimension of JJ by NN, while ErVirtErVirt is used to store the error signals at virtual microphones which have a dimension of MM by NN.

4 Testing Code: Four Channel Virtual Sensing Active Nose Control System

The VirtualSensing_test.mVirtualSensing\_test.m carries out a simulation on a 1x4x4 MVANC system, where there is 11 reference microphone, 44 secondary sources, 44 physical microphones and 44 virtual microphones. In the simulation, CreatReferenceSignal.mCreatReferenceSignal.m, MultichannelFxLMS.mMultichannelFxLMS.m, AuxiliaryLMS.mAuxiliaryLMS.m and ContrFxLMS.mContrFxLMS.m are used to achieve noise control at desired virtual locations.

4.1 System Configuration

The following commands define basic system configuration parameters. Specifically, the sampling frequency of the system is set to 16 kHz and the length of control filters is set to 512 taps.

1Fs = 16000 ; % System sampling freqnecy (Hz).
2T = 50 ; % The duration of the simutation (Second).
3t = 0:1/Fs:T ; % The cycle of simulation.
4N = length(t) ; % The number of cycle of simulation.
5L = 512 ; % The lenght of the control filter.
6K = 4 ; % The number of the seconeary sources.
7J = 4 ; % The number of the physical microphones.
8M = 4 ; % The number of the virtual microphones.

4.2 Create Primary Noise for Tuning and Control

The following commands generate a broadband noise of 800-2500 Hz as reference signals in the tuning stage and a broadband noise of 800-1800 Hz as reference signals in the control stage by filtering white noise through different bandpass filters.

1% Creating primary noise for tuning.
2Fs1_tuning = 800;
3Fs2_tuning = 2500;
4ws1_tuning = 2*(Fs1_tuning/Fs);
5ws2_tuning = 2*(Fs2_tuning/Fs);
6BPF_tuning = fir1(512,[ws1_tuning,ws2_tuning]);
7PriNoise_tuning = filter(BPF_tuning,1,2*randn(N,1));
8% Creating primary noise for control.
9Fs1_control = 800;
10Fs2_control = 1800;
11ws1_control = 2*(Fs1_control/Fs);
12ws2_control = 2*(Fs2_control/Fs);
13BPF_control = fir1(512,[ws1_control,ws2_control]);
14PriNoise_control = filter(BPF_control,1,2*randn(N,1));

4.3 Loading Primary and Secondary Paths

The primary path is the path that the noise takes from the noise source to the error microphone, and the secondary path is the path that the anti-noise takes from the secondary source to the error microphone. Both of these paths are essential to the detection of errors. As a result, physical paths are distinct from virtual paths due to the fact that the physical microphones and virtual microphones are situated in distinct locations. In this context, the primary paths and the secondary paths are loaded from files.The length of the primary paths is 128 and the length of the secondary paths is 32.

1% Load physical primary and secondary path.
2Pp = load(’PrimaryPath_P_4.mat’).Pp;
3Sp=load(’PhysicalPath16.mat’).Sp;
4%Loadvirtualprimaryandsecondarypath.
5Pv=load(’PrimaryPath_V_4.mat’).Pv;
6Sv=load(’VirtualPath16.mat’).Sv;

4.4 Create Disturbance and Filtered Reference Signals

The following commands generate disturbance signals by filtering the reference signal through the primary path and filtered reference signals by filtering the reference signal through the secondary path. Specifically, different disturbance and filtered reference signals are generated with primary noises in the tuning and control stages, respectively.

1% Creating disturbances and filtered reference signals for tuning noise.
2[Dv_tuning,Dp_tuning,Fx_v_tuning,Fx_p_tuning] = CreatReferenceSignal(Pv,Pp,Sv,Sp,PriNoise_tuning,N,L,K,M,J);
3% Creating disturbances and filtered reference signals for control noise.
4[Dv_control,Dp_control,Fx_v_control,Fx_p_control] = CreatReferenceSignal(Pv,Pp,Sv,Sp,PriNoise_control,N,L,K,M,J);

4.5 Tuning Stage 1: Training the Optimal Control Filters

The following commands train the optimal control filters using the FxLMS algorithm with a stepsize of 0.000001.

1u1 = 0.000001; % Stepsize of the FxLMS algorithm.
2[W,Er] = MultichannelFxLMS(L,K,M,N,Fx_v_tuning,Dv_tuning,u1);

4.6 Tuning Stage 2: Training the Auxiliary Filters

The following commands train the auxiliary filters using the LMS algorithm with a stepsize of 0.001.

1u2 = 0.001; % Stepsize of the LMS algorithm.
2[H,Er] = AuxiliaryLMS(L,K,J,N,Fx_p_tuning,Dp_tuning,PriNoise_tuning,W,u2);

4.7 Control Stage: Training the New Control Filters

The following commands train the new control filters using the FxLMS algorithm with a stepsize of 0.00001.

1u3 = 0.00001; % Stepsize of the FxLMS algorithm.
2[WC,Er,Ev] = ContrFxLMS(L,K,M,J,N,Fx_p_control,Fx_v_control,Dp_control,Dv_control,PriNoise_control,H,u3);

4.8 Drawing the Figure of Error Signals

Drawing the error signals of the four virtual microphones.

1set(groot,’defaultAxesTickLabelInterpreter’,’latex’);
2figure
3plot(10*log10(smooth(Ev(1,:).^2,2048,’moving’)))
4holdon
5plot(10*log10(smooth(Ev(2,:).^2,2048,’moving’)))
6holdon
7plot(10*log10(smooth(Ev(3,:).^2,2048,’moving’)))
8holdon
9plot(10*log10(smooth(Ev(4,:).^2,2048,’moving’)))
10xlim([0800001])
11ylim([-450])
12xlabel(’Iterations’,’Interpreter’,’latex’)
13ylabel(’SquareError(dB)’,’Interpreter’,’latex’)
14title(’Timehistoryoferrorsignalatvirtualmicrophones’,’Interpreter’,’latex’)
15legend(’Errorsignalatvirtualmicrophone1’,’Errorsignalatvirtualmicrophone2’,’Errorsignalatvirtualmicrophone3’,’Errorsignalatvirtualmicrophone4’,’Interpreter’,’latex’)
16gridon
Refer to caption
Figure 5: Simulated error signals at four virtual microphones of the MVANC system.

It can be seen from Fig. 5 that the MVANC system can achieve noise control at the virtual locations and the noise reduction performance is around 40 dB.

4.9 Drawing the Figure of Control Filter Coefficients

Drawing the control filter 1 coefficients in both tuning and control stages. The remaining three control filters are very similar to control filter 1.

1figure
2subplot(1,2,1)
3plot(1:L,W(1:L),1:L,WC(1:L))
4grid on
5xlabel(’Taps’,’Interpreter’,’latex’)
6ylabel(’${{\bf{w}}_{11}}$’,’Interpreter’,’latex’)
7legend(’Controlfilter1inthetuningstage’,’Controlfilter1inthecontrolstage’,’Interpreter’,’latex’)
8xlim([0,512])
9subplot(1,2,2)
10[H,F]=freqz(W(1:L),1,1024,Fs);
11plot(F,abs(H));
12holdon
13[H,F]=freqz(WC(1:L),1,1024,Fs);
14plot(F,abs(H));
15gridon
16xlim([0,3000])
17xlabel(’Frequency(Hz)’,’Interpreter’,’latex’)
18ylabel(’$|{W_{11}}(f)|$’,’Interpreter’,’latex’)
Refer to caption
Figure 6: Simulated control filter 1 coefficients of the MVANC system.

It can be seen from Fig. 6 that the control filter 1 derived from the tuning stage exhibits a passband within the 800 to 2500 Hz frequency range. Conversely, control filter 1 from the control stage demonstrates a passband within the narrower 800 to 1800 Hz range. This result is consistent with the different primary noises used in the tuning and control stages.

5 Conclusion

The purpose of this article is to provide a comprehensive explanation of a MATLAB program that simulates the feedforward multichannel virtual sensing active noise control (MVANC) technique by employing the multichannel filtered-x least mean square (MCFxLMS) technique.

References

  • [1] Dongyuan Shi et al. “Active noise control in the new century: The role and prospect of signal processing” In INTER-NOISE and NOISE-CON Congress and Conference Proceedings 268.3, 2023, pp. 5141–5151 Institute of Noise Control Engineering
  • [2] Bhan Lam et al. “Ten questions concerning active noise control in the built environment” In Building and Environment 200 Pergamon, 2021, pp. 107928
  • [3] Yu Guo et al. “A survey on adaptive active noise control algorithms overcoming the output saturation effect” In Signal Processing Elsevier, 2024, pp. 109525
  • [4] Junwei Ji et al. “A Computation-efficient Online Secondary Path Modeling Technique for Modified FXLMS Algorithm” In arXiv preprint arXiv:2306.11408, 2023
  • [5] Chung Kwan Lai, Dongyuan Shi, Bhan Lam and Woon-Seng Gan “MOV-Modified-FxLMS algorithm with Variable Penalty Factor in a Practical Power Output Constrained Active Control System” In IEEE Signal Processing Letters IEEE, 2023
  • [6] Junwei Ji et al. “A practical distributed active noise control algorithm overcoming communication restrictions” In ICASSP 2023-2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2023, pp. 1–5 IEEE
  • [7] Dongyuan Shi et al. “Optimal output-constrained active noise control based on inverse adaptive modeling leak factor estimate” In IEEE/ACM Transactions on Audio, Speech, and Language Processing 29 IEEE, 2021, pp. 1256–1269
  • [8] Dongyuan Shi, Woon-Seng Gan, Bhan Lam and Xiaoyi Shen “Comb-partitioned frequency-domain constraint adaptive algorithm for active noise control” In Signal Processing 188 Elsevier, 2021, pp. 108222
  • [9] Bhan Lam et al. “Anti-noise window: Subjective perception of active noise reduction and effect of informational masking” In Sustainable Cities and Society 97 Elsevier, 2023, pp. 104763
  • [10] Dongyuan Shi, Woon-Seng Gan, Jianjun He and Bhan Lam “Practical implementation of multichannel filtered-x least mean square algorithm based on the multiple-parallel-branch with folding architecture for large-scale active noise control” In IEEE Transactions on Very Large Scale Integration (VLSI) Systems 28.4 IEEE, 2019, pp. 940–953
  • [11] Bhan Lam et al. “Active control of broadband sound through the open aperture of a full-sized domestic window” In Scientific reports 10.1 Nature Publishing Group, 2020, pp. 1–7
  • [12] Rina Hasegawa, Dongyuan Shi, Yoshinobu Kajikawa and Woon-Seng Gan “Window active noise control system with virtual sensing technique” In INTER-NOISE and NOISE-CON Congress and Conference Proceedings 258.1, 2018, pp. 6004–6012 Institute of Noise Control Engineering
  • [13] Bhan Lam, Chuang Shi, Dongyuan Shi and Woon-Seng Gan “Active control of sound through full-sized open windows” In Building and Environment 141 Elsevier, 2018, pp. 16–27
  • [14] Dongyuan Shi et al. “Computation-efficient solution for fully-connected active noise control window: Analysis and implementation of multichannel adjoint least mean square algorithm” In Mechanical Systems and Signal Processing 199 Academic Press, 2023, pp. 110444
  • [15] Chung Kwan Lai, Jing Sheng Tey, Dongyuan Shi and Woon-Seng Gan “Robust estimation of open aperture active control systems using virtual sensing” In INTER-NOISE and NOISE-CON Congress and Conference Proceedings 265.4, 2023, pp. 3397–3407 Institute of Noise Control Engineering
  • [16] Chuang Shi et al. “Open loop active control of noise through open windows” In Proceedings of Meetings on Acoustics 29.1, 2016 AIP Publishing
  • [17] Dongyuan Shi, Bhan Lam, Woon-Seng Gan and Shulin Wen “Block coordinate descent based algorithm for computational complexity reduction in multichannel active noise control system” In Mechanical Systems and Signal Processing 151.0888-3270 Academic Press, 2021, pp. 107346
  • [18] Bhan Lam et al. “Active control of low-frequency noise through a single top-hung window in a full-sized room” In Applied Sciences 10.19 MDPI, 2020, pp. 6817
  • [19] Chuang Shi et al. “On algorithms and implementations of a 4-channel active noise canceling window” In 2017 International Symposium on Intelligent Signal Processing and Communication Systems (ISPACS), 2017, pp. 217–221 IEEE
  • [20] Chuang Shi et al. “Understanding multiple-input multiple-output active noise control from a perspective of sampling and reconstruction” In 2017 Asia-Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC), 2017, pp. 124–129 IEEE
  • [21] Zhengding Luo et al. “Real-time implementation and explainable AI analysis of delayless CNN-based selective fixed-filter active noise control” In Mechanical Systems and Signal Processing 214 Elsevier, 2024, pp. 111364
  • [22] Xiaoyi Shen et al. “The principle underlying the wireless reference microphone enhancing noise reduction performance in multi-channel active noise control windows” In Mechanical Systems and Signal Processing 212 Elsevier, 2024, pp. 111284
  • [23] Xiaoyi Shen, Dongyuan Shi and Woon-Seng Gan “A hybrid approach to combine wireless and earcup microphones for ANC headphones with error separation module” In ICASSP 2022-2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2022, pp. 8702–8706 IEEE
  • [24] Xiaoyi Shen, Dongyuan Shi, Santi Peksi and Woon-Seng Gan “A multi-channel wireless active noise control headphone with coherence-based weight determination algorithm” In Journal of Signal Processing Systems 94.8 Springer US New York, 2022, pp. 811–819
  • [25] Dongyuan Shi et al. “Selective fixed-filter active noise control based on convolutional neural network” In Signal Processing 190 Elsevier, 2022, pp. 108317
  • [26] Xiaoyi Shen, Woon-Seng Gan and Dongyuan Shi “Alternative switching hybrid ANC” In Applied Acoustics 173 Elsevier, 2021, pp. 107712
  • [27] Xiaoyi Shen, Dongyuan Shi, Santi Peksi and Woon-Seng Gan “Implementations of wireless active noise control in the headrest” In INTER-NOISE and NOISE-CON Congress and Conference Proceedings 265.4, 2023, pp. 3445–3455 Institute of Noise Control Engineering
  • [28] Xiaoyi Shen, Dongyuan Shi and Woon-Seng Gan “A wireless reference active noise control headphone using coherence based selection technique” In ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2021, pp. 7983–7987 IEEE
  • [29] Xiaoyi Shen, Dongyuan Shi, Woon-Seng Gan and Santi Peksi “Adaptive-gain algorithm on the fixed filters applied for active noise control headphone” In Mechanical Systems and Signal Processing 169 Academic Press, 2022, pp. 108641
  • [30] Dongyuan Shi et al. “Transferable latent of cnn-based selective fixed-filter active noise control” In IEEE/ACM Transactions on Audio, Speech, and Language Processing IEEE, 2023
  • [31] DongYuan Shi, Woon-Seng Gan, Bhan Lam and Chuang Shi “Two-gradient direction FXLMS: An adaptive active noise control algorithm with output constraint” In Mechanical Systems and Signal Processing 116 Elsevier, 2019, pp. 651–667
  • [32] Woon-Seng Gan, Dongyuan Shi and Xiaoyi Shen “Practical Active Noise Control: Restriction of Maximum Output Power” In 2023 Asia Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC), 2023, pp. 1245–1249 IEEE
  • [33] Nobuhiro Miyazaki and Yoshinobu Kajikawa “Head-mounted active noise control system with virtual sensing technique” In Journal of Sound and Vibration 339 Elsevier, 2015, pp. 65–83
  • [34] Marek Pawelczyk “Analog active control of acoustic noise at a virtual location” In IEEE Transactions on Control Systems Technology 17.2 IEEE, 2008, pp. 465–472
  • [35] Marek Pawelczyk “Noise control in the active headrest based on estimated residual signals at virtual microphones” In Proceedings of the 10th International Congress on Sound and Vibration, 2003, pp. 251–258
  • [36] B Rafaely, SJ Elliott and J Garcia-Bonito “Broadband performance of an active headrest” In The journal of the Acoustical Society of America 106.2 Acoustical Society of America, 1999, pp. 787–793
  • [37] He-Siang Deng, Cheng-Yuan Chang and Sen M Kuo “Active noise control with virtual sensing technology for headrest” In 2018 Asia-Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC), 2018, pp. 1272–1275 Ieee
  • [38] MRF Kidner, C Petersen, AC Zander and CH Hansen “Feasibility study of localised active noise control using an audio spotlight and virtual sensors” In Proceedings of ACOUSTICS, 2006, pp. 55–61
  • [39] Xiaojun Qiu “A review of near field acoustic error sensing strategies for active sound radiation control” In 25th International Congress on Sound and Vibration 2018, ICSV 2018: Hiroshima Calling, 2018
  • [40] Dongyuan Shi, Woon-Seng Gan, Bhan Lam and Shulin Wen “Feedforward selective fixed-filter active noise control: Algorithm and implementation” In IEEE/ACM Transactions on Audio, Speech, and Language Processing 28 IEEE, 2020, pp. 1479–1492
  • [41] Zhengding Luo, Dongyuan Shi, Junwei Ji and Woon-seng Gan “Implementation of multi-channel active noise control based on back-propagation mechanism” In arXiv preprint arXiv:2208.08086, 2022
  • [42] Dongyuan Shi, Bhan Lam, Xiaoyi Shen and Woon-Seng Gan “Multichannel two-gradient direction filtered reference least mean square algorithm for output-constrained multichannel active noise control” In Signal Processing 207 Elsevier, 2023, pp. 108938
  • [43] Dongyuan Shi et al. “Active Noise Control based on the Momentum Multichannel Normalized Filtered-x Least Mean Square Algorithm” In In Inter-Noise 2020. The International Institute of Noise Control Engineering., 2020
  • [44] Dongyuan Shi et al. “What is behind the meta-learning initialization of adaptive filter?—A naive method for accelerating convergence of adaptive multichannel active noise control” In Neural Networks Elsevier, 2024, pp. 106145