Active Noise Cancellation with Multiple Auxiliary Sensors

In our last post, we went over active noise cancellation using the Wiener filter (you can find that here). It focused on using a single auxiliary sensor for active noise cancellation and while powerful there are cases when having multiple auxiliary sensors provides better noise reduction. Today’s example considers a car equipped with a hands-free phone call system. Such systems typically work by connecting the car’s microphone and speakers to a cell phone using Bluetooth. In many cases, it is assumed that the driver is the speaker and so the primary microphone is placed on the driver’s side dashboard, though sometimes it is placed inside the rearview mirror. While this location allows the sensor to pick up the speaker’s voice the microphone is likely to pick up unwanted noise generated by the car’s engine, outside wind, and the vibration of the tires going over the road. Such interference can make speech difficult to understand for listeners on the other end of the phone call.

Active noise cancellation would sure be nice in this situation but where should we put the auxiliary sensor? We learned from the previous post that it must be located somewhere where it can pick up the interference but not the desired signal, the desired signal being speech in this example. Placing the auxiliary sensor in the car cabin will probably fail as it’s almost guaranteed that it will pick up the speaker’s voice. A better option is to put the auxiliary microphone inside the driver’s door. This way the microphone is able to pick up noise from the driver’s wheel well, engine noise, and wind noise. But noise is also coming from the passenger’s side and so we place an additional microphone inside the passenger’s door. Example placement is shown in Figure 1 where the red square indicates the potential location of the primary sensor and green indicates the potential locations of the auxiliary sensors.

Figure 1: Red indicates the potential location of the primary sensor. Green indicates the potential locations of auxiliary sensors.

While the microphones are trying to pick up noise generated by different sources (the different wheel wells and possibly wind blowing from one side or the other), they will also pick up interference generated by the same process (the engine noise). Because the two auxiliary sensors are correlated through the shared interference, independently using the active noise cancellation using a single sensor and iteratively estimating the signal is suboptimal. Instead, the correct approach is to derive the optimal weights to filter the auxiliary signals such that when the filtered auxiliary signals are jointly subtracted from the primary sensor only the desired signal remains.

Figure 2 shows a block diagram of a generic active noise cancellation system using multiple auxiliary sensors. v represents the interference signal while the independent channel effects are modeled as filters. Channel effects are things such as propogation delays and distortion as the interference travels to each of the sensors. The optimal Wiener filters are represented as W_m. Notice that the weights used to filter v_1 are different than the weights used to filter v_m. Though the weights are unique they are solved for simultaneously.

Figure 2: Block diagram of an active noise cancellation system using multiple auxiliary sensors.

Post Notations

Before going on to the derivation, let’s define some notation so that we’re all on the same page. Let E\{\cdot\}, \hat{d} and r_d(k) represent the expectation operator, the estimate of d, and the autocorrelation function of d respectively. The expectation operator returns the expected value or mean of a random variable. The estimate of  \hat{v}_0 is found by combining the filtered auxiliary signals y_q where 0<q< N. y_q is found by filtering v_q with our Wiener filter as follows

y_q(n) = \sum_{\ell=0}^{p-1}w_q(\ell)v_q (n-\ell)

where p is the number of filter coefficients.

The autocorrelation function for a wide sense stationary (WSS) signal is defined as

r_v_m(k) = E\{v_m(n)v_m^*(n-k)\}

The cross-correlation function for jointly WSS signals is defined as

r_{v_1 v_2} = E\{v_1(n)v_2^*(n-k)\}

Let the error be defined as the difference between the desired signal and the estimate of the desired signal

e(n) = x(n) - \hat{v}_1(n)

and the mean squared error (MSE) be defined as 

\zeta = E\{e(n)^2\}.

Finally, let \cdot^* represent the complex conjugate operator. 

Deriving the Active Noise-Canceling Wiener Filters

Using Figure 2 we now derive the active noise-canceling Wiener filters for multiple auxiliary signals. For this derivation, it is assumed that the signal of interest and the interference are jointly wide sense stationary. A signal is wide sense stationary if the signal has constant mean, the autocorrelation depends only on the lag, and the variance is finite. As defined in the above diagram the error is the corrupted signal minus the estimate of the interference. 

Because we want to minimize the mean squared error we take the derivative of \zeta with respect to w_q(k) and set it equal to zero.

    \begin{align*}\zeta &= E\{e^2\}\\&= E\{ee^*\}\\0&= E\{e \frac{\partial}{\partial w_q(k)}e^*\}\\0&= E\{e \frac{\partial}{\partial w_q(k)}(x^*(n)-\hat{v}_0^*(n)\}\\0&= E\{e \frac{\partial}{\partial w_q(k)}(x^*(n)-y_1^*(n)-y_2^*(n)-\dots-y_N^*(n)\}\\ \end{align*}

Because the derivative of y_q(n) = \sum_{\ell=0}^{p-1}w_q(\ell)v_q (n-\ell) with respect to w_q(k) equals v_q(n-k) the above equation simplifies to

    \begin{align*}0= E\{e v_q^*(n-k)\}\\0= E\{[x(n)-\hat{v}_0(n)] v_q^*(n-k)\}\\0= E\{x(n)v_q^*(n-k)-\hat{v}_0(n) v_q^*(n-k)\}\\0= E\{x(n)v_q^*(n-k)\}-E\{\hat{v}_0(n) v_q^*(n-k)\}\\E\{[y_1(n)+\dots+y_N(n)]v_q^*(n-k)\} = r_{xv_q}(k)\\E\{\sum_{\ell=0}^{p-1}w_1(\ell)v_1 (n-\ell)v_q^*(n-k) +\dots+\sum_{\ell=0}^{p-1}w_N(\ell)v_N (n-\ell) v_q^*(n-k)\} = r_{xv_q}(k)\\\sum_{\ell=0}^{p-1}w_1(\ell)E\{v_1 (n-\ell)v_q^*(n-k)\} +\dots+\sum_{\ell=0}^{p-1}w_N(\ell)E\{v_N (n-\ell) v_q^*(n-k)\} = r_{xv_q}(k)\\\sum_{\ell=0}^{p-1}w_1(\ell)r_{v_1 v_q} +\dots+\sum_{\ell=0}^{p-1}w_N(\ell)r_{v_N v_q} = r_{xv_q}(k)\\ \end{align*}

We can write this in matrix-vector notation as

    \begin{align*}\mathbf{R}_{v_1 v_q} \mathbf{w}_1 + \dots \mathbf{R}_{v_N 1 v_q} \mathbf{w}_N = \mathbf{r}_{x v_q}\\ \end{align*}

Or more genenerally as 

    \begin{align*}\mathbf{R}\mathbf{w}= \mathbf{r}_{xv}\\ \end{align*}

Where 

    \begin{align*}\mathbf{R} = \begin{bmatrix}\mathbf{R}_{v_1 v_1} & \mathbf{R}_{v_2 v_1} & \dots &\mathbf{R}_{v_N v_1}\\\mathbf{R}_{v_1 v_2} & \mathbf{R}_{v_2 v_2} & \dots &\mathbf{R}_{v_N v_2}\\\vdots & \vdots & \vdots& \vdots\\\mathbf{R}_{v_1 v_N} & \mathbf{R}_{v_2 v_N} & \dots &\mathbf{R}_{v_N v_N}\\\end{bmatrix},\\\mathbf{w} = \begin{bmatrix}\mathbf{w}_1\\\mathbf{w}_2\\\vdots\\\mathbf{w}_N\end{bmatrix},\\ \text{and}\\\mathbf{r}_{x v}\begin{bmatrix}\mathbf{r}_{x v_1}\\\mathbf{r}_{x v_2}\\\vdots\mathbf{r}_{x v_N}\\\end{bmatrix}\end{align*}

Multi Auxiliary Noise Cancellation Example

To hit home the power of using multiple auxiliary sensors I created a small audio example. The desired signal is corrupted by two noise sources, white noise, and a tone. To create the observed signal the white noise and tone are filtered by a first-order autoregressive filter before being added to the desired signal. The first auxiliary signal is created by filtering the white noise and tone by a different first-order autoregressive filter with the tone attenuated by 40 dB. The second auxiliary signal is created by filtering the white noise and tone by yet another first-order autoregressive filter but this time the white noise is attenuated by 40 dB.

Using the equations derived above, I computed the optimal noise-canceling Wiener filters and estimated the observed noise. Figure 3 plots the noise observed by the primary sensor, the noise observed by the auxiliary sensors and the estimate of the noise. The plot shows that each auxiliary sensor captures a different aspect of the interference. v_1 captures the filtered noise whereas v_2 does a better job of capturing the filtered tone. From the figure, it can be a little hard to tell but v0\_hat lies nearly ontop of v_0 indicating a good estimate. 

Figure 3: Plot of the observed noise signal in green, the noise signal as observed from each auxiliary sensor in blue and red, and the estimate of the noise in black.

Figure 4 plots the desired signal and its estimate. It also plots the absolute difference between the desired signal and estimated signal. Once again, the estimate and desired signals lie nearly on top of each other and the difference between the two are minimal.

Figure 4: Desired signal, the estimate of the desired signal, and the absolute difference between the two.

Using both auxiliary sensors is nice but how much better is it than just using one sensor? I decided to use just v_1 and just v_2 and come up with an estimate so that we could compare the performances. Figure 5 shows the results. When using just v_1 to form an estimate we get about 12 dB of improvement vs 5 dB of improvement when using v_2. But when using both auxiliary sensors we get more than 45 dB of improvement! Before getting too excited, how much improvement you’ll see using multi-sensor noise-cancellation is dependent on many factors and will not always be so significant. For instance, if both v_1 and v_2 are essentially the same or contain highly redundant information then improvement will be limited. 

Figure 5: The black dashed line in each subplot is the desired signal while the blue line is the estimates of the desired signals. The top plot is the observed signal. The second plot uses v1 only to estimate the desired signal. The third plot uses v2 only. The bottom plot uses both v1 and v2 to form the estimate.

Now that you’ve seen the difference see if you can hear the difference in the following audio clips. The first audio clip is the observed signal, the second is using single-sensor noise-cancellation using v_1, followed by using v_2 only. The last audio clip uses the multi-sensor noise-cancellation system that we derived earlier. Notice that when canceling using v_1 only the tone is still very present in the audio clip. This makes sense as the tone was highly attenuated in v_1. v_2, on the other hand, does a great job cleaning up the tone but the white noise is still present for the same reason. 

Audio 1: Observed signal before any noise cancellation.
Audio 2: Post noise cancellation using the v1 auxiliary sensor.
Audio 3: Post noise cancellation using the v2 auxiliary sensor.
Audio 4: Post noise cancellation using multiple auxiliary sensors.

What happens if the desired signal is present on all sensors?

We’ve stated before that for active noise-cancellation to work the auxiliary sensors must be placed somewhere where it can pick up the noise signals but not the desired signals. But in some cases, it is not physically possible to make that happen. For instance, you might have a cochlear implant and wish background noise to be attenuated. Or you might be an astronomer picking up signals from space but interference from a nearby airplane is corrupting your data. These cases make it virtually impossible to have an auxiliary sensor dedicated to receiving the noise only signal. Lucky for us, we have one more trick up our sleeve that can still help us out. It’s called beamforming. We won’t go over it now but it’s a powerful tool that expands on our multi-sensor active noise-canceling system. Sign up for our newsletter to find out when we come out with our beamforming tutorial, it’s not something you’re going to want to miss out on.

JOIN OUR NEWSLETTER
I agree to receive email updates when new content is posted and receive promotional emails when new courses are available
Enjoying the article? Receive free updates when new content is published and courses are available.
We hate spam. Your email address will not be sold or shared with anyone else.
Christopher Hogstrom
christopher.hogstrom@grittyengineer.com

6 thoughts on “Active Noise Cancellation with Multiple Auxiliary Sensors”

    1. Thanks, Nelieru! Is there anything that was unclear in the most or that could be improved? Aside from beamforming, which will be the next post I create, what other DSP topics would you be interested in learning about?

      1. Honestly, no. It’s already pretty detailed and well explained. I had a bit of a hard time following the math buts that’s mostly due to my light math education lol. About the fields, I don’t really have an overview or general idea or what fields DSP are used in. So I guess all kind of topics were DSP are used in everyday life?

Leave a Reply

Your email address will not be published. Required fields are marked *