# Active noise cancellation using kalman filter

I am doing signal processing on audio data sampled at 8Ksps in matlab but it is corrupted with random noise. Therefore, I decided to use LMS and RLS ANC algorithms to remove overlapped frequency noises and I have found RLS performance was better than LMS and NLMS. But now I want to use kalman filter so that I can achieve better result. I know kalman filter and have used in many basic applications but don't know how to use it for ANC. I would be grateful if anyone give me some idea 💡.

The EKF is perhaps a bit more straight forward to get started with. You use the EKF for parameter adaptation by modeling unknown parameters as Wiener processes. Consider the linear system \begin{align*} \dot{x} &= A(\theta) x + B(\theta) u + w \\ y &= C(\theta) x + v \end{align*} with unknown parameters $\theta \in \mathcal{R}^{p}$. By augmenting the state vector to include the unknown parameters, $\chi^{\text{T}} = [x^{\text{T}}, \theta^{\text{T}}]$, we obtain the non-linear system $\dot{\chi} = f(\chi,u) + w$, $y = h(\chi) + v$, where \begin{align*} f(\chi,u) &= \left[ \begin{array}{c} A(\theta) x + B(\theta) u \\ 0 \end{array} \right] \\ h(\chi) &= C(\theta) x . \end{align*} The Jacobians $F$ and $H$ for this system are found as \begin{align*} F &= \left[ \begin{array}{cc} A(\theta) & \frac{\partial}{\partial \theta}[A(\theta) x + B(\theta) u] \\ 0 & 0 \end{array} \right]_{\hat{x}, \hat{\theta}} , \\ H &= \left[ \begin{array}{cc} C(\theta) & \frac{\partial}{\partial \theta}[C(\theta) x] \end{array} \right]_{\hat{x}, \hat{\theta}} . \end{align*}
The general implementation of the EKF and UKF, as well as for parameter adaption, can be found in several publication. I personally like "Optimal State Estimation: Kalman, H$_{\infty}$, and Nonlinear Approaches" by Dan Simon, 2006 (ISBN: 978-0-471-70858-2).