Recursive least squares filter

From HandWiki
Short description: Adaptive filter algorithm for digital signal processing

Recursive least squares (RLS) is an adaptive filter algorithm that recursively finds the coefficients that minimize a weighted linear least squares cost function relating to the input signals. This approach is in contrast to other algorithms such as the least mean squares (LMS) that aim to reduce the mean square error. In the derivation of the RLS, the input signals are considered deterministic, while for the LMS and similar algorithms they are considered stochastic. Compared to most of its competitors, the RLS exhibits extremely fast convergence. However, this benefit comes at the cost of high computational complexity.

Motivation

RLS was discovered by Gauss but lay unused or ignored until 1950 when Plackett rediscovered the original work of Gauss from 1821. In general, the RLS can be used to solve any problem that can be solved by adaptive filters. For example, suppose that a signal [math]\displaystyle{ d(n) }[/math] is transmitted over an echoey, noisy channel that causes it to be received as

[math]\displaystyle{ x(n)=\sum_{k=0}^q b_n(k) d(n-k)+v(n) }[/math]

where [math]\displaystyle{ v(n) }[/math] represents additive noise. The intent of the RLS filter is to recover the desired signal [math]\displaystyle{ d(n) }[/math] by use of a [math]\displaystyle{ p+1 }[/math]-tap FIR filter, [math]\displaystyle{ \mathbf{w} }[/math]:

[math]\displaystyle{ d(n) \approx \sum_{k=0}^{p} w(k)x(n-k)=\mathbf{w}^\mathit{T} \mathbf{x}_n }[/math]

where [math]\displaystyle{ \mathbf{x}_n = [x(n)\quad x(n-1)\quad\ldots\quad x(n-p)]^T }[/math] is the column vector containing the [math]\displaystyle{ p+1 }[/math] most recent samples of [math]\displaystyle{ x(n) }[/math]. The estimate of the recovered desired signal is

[math]\displaystyle{ \hat{d}(n) = \sum_{k=0}^{p} w_n(k)x(n-k)=\mathbf{w}_n^\mathit{T} \mathbf{x}_n }[/math]

The goal is to estimate the parameters of the filter [math]\displaystyle{ \mathbf{w} }[/math], and at each time [math]\displaystyle{ n }[/math] we refer to the current estimate as [math]\displaystyle{ \mathbf{w}_n }[/math] and the adapted least-squares estimate by [math]\displaystyle{ \mathbf{w}_{n+1} }[/math]. [math]\displaystyle{ \mathbf{w}_n }[/math] is also a column vector, as shown below, and the transpose, [math]\displaystyle{ \mathbf{w}_n^\mathit{T} }[/math], is a row vector. The matrix product [math]\displaystyle{ \mathbf{w}_n^\mathit{T} \mathbf{x}_n }[/math] (which is the dot product of [math]\displaystyle{ \mathbf{w}_n }[/math] and [math]\displaystyle{ \mathbf{x}_n }[/math]) is [math]\displaystyle{ \hat{d}(n) }[/math], a scalar. The estimate is "good" if [math]\displaystyle{ \hat{d}(n)-d(n) }[/math] is small in magnitude in some least squares sense.

As time evolves, it is desired to avoid completely redoing the least squares algorithm to find the new estimate for [math]\displaystyle{ \mathbf{w}_{n+1} }[/math], in terms of [math]\displaystyle{ \mathbf{w}_n }[/math].

The benefit of the RLS algorithm is that there is no need to invert matrices, thereby saving computational cost. Another advantage is that it provides intuition behind such results as the Kalman filter.

Discussion

The idea behind RLS filters is to minimize a cost function [math]\displaystyle{ C }[/math] by appropriately selecting the filter coefficients [math]\displaystyle{ \mathbf{w}_n }[/math], updating the filter as new data arrives. The error signal [math]\displaystyle{ e(n) }[/math] and desired signal [math]\displaystyle{ d(n) }[/math] are defined in the negative feedback diagram below:

AdaptiveFilter C.png

The error implicitly depends on the filter coefficients through the estimate [math]\displaystyle{ \hat{d}(n) }[/math]:

[math]\displaystyle{ e(n)=d(n)-\hat{d}(n) }[/math]

The weighted least squares error function [math]\displaystyle{ C }[/math]—the cost function we desire to minimize—being a function of [math]\displaystyle{ e(n) }[/math] is therefore also dependent on the filter coefficients:

[math]\displaystyle{ C(\mathbf{w}_n)=\sum_{i=0}^n\lambda^{n-i}e^2(i) }[/math]

where [math]\displaystyle{ 0\lt \lambda\le 1 }[/math] is the "forgetting factor" which gives exponentially less weight to older error samples.

The cost function is minimized by taking the partial derivatives for all entries [math]\displaystyle{ k }[/math] of the coefficient vector [math]\displaystyle{ \mathbf{w}_{n} }[/math] and setting the results to zero

[math]\displaystyle{ \frac{\partial C(\mathbf{w}_n)}{\partial w_n(k)}=\sum_{i=0}^n 2\lambda^{n-i}e(i)\cdot \frac{\partial e(i)}{\partial w_n(k)}=-\sum_{i=0}^n 2\lambda^{n-i}e(i)\,x(i-k)=0 \qquad k=0,1,\ldots,p }[/math]

Next, replace [math]\displaystyle{ e(n) }[/math] with the definition of the error signal

[math]\displaystyle{ \sum_{i=0}^n\lambda^{n-i}\left[d(i)-\sum_{\ell=0}^p w_n(\ell)x(i-\ell)\right]x(i-k)= 0\qquad k=0,1,\ldots,p }[/math]

Rearranging the equation yields

[math]\displaystyle{ \sum_{\ell=0}^p w_n(\ell)\left[\sum_{i=0}^n \lambda^{n-i}\,x(i-l)x(i-k)\right]= \sum_{i=0}^n \lambda^{n-i}d(i)x(i-k) \qquad k=0,1,\ldots,p }[/math]

This form can be expressed in terms of matrices

[math]\displaystyle{ \mathbf{R}_{x}(n)\,\mathbf{w}_{n}=\mathbf{r}_{dx}(n) }[/math]

where [math]\displaystyle{ \mathbf{R}_{x}(n) }[/math] is the weighted sample covariance matrix for [math]\displaystyle{ x(n) }[/math], and [math]\displaystyle{ \mathbf{r}_{dx}(n) }[/math] is the equivalent estimate for the cross-covariance between [math]\displaystyle{ d(n) }[/math] and [math]\displaystyle{ x(n) }[/math]. Based on this expression we find the coefficients which minimize the cost function as

[math]\displaystyle{ \mathbf{w}_{n}=\mathbf{R}_{x}^{-1}(n)\,\mathbf{r}_{dx}(n) }[/math]

This is the main result of the discussion.

Choosing λ

The smaller [math]\displaystyle{ \lambda }[/math] is, the smaller is the contribution of previous samples to the covariance matrix. This makes the filter more sensitive to recent samples, which means more fluctuations in the filter co-efficients. The [math]\displaystyle{ \lambda=1 }[/math] case is referred to as the growing window RLS algorithm. In practice, [math]\displaystyle{ \lambda }[/math] is usually chosen between 0.98 and 1.[1] By using type-II maximum likelihood estimation the optimal [math]\displaystyle{ \lambda }[/math] can be estimated from a set of data.[2]

Recursive algorithm

The discussion resulted in a single equation to determine a coefficient vector which minimizes the cost function. In this section we want to derive a recursive solution of the form

[math]\displaystyle{ \mathbf{w}_{n}=\mathbf{w}_{n-1}+\Delta\mathbf{w}_{n-1} }[/math]

where [math]\displaystyle{ \Delta\mathbf{w}_{n-1} }[/math] is a correction factor at time [math]\displaystyle{ {n-1} }[/math]. We start the derivation of the recursive algorithm by expressing the cross covariance [math]\displaystyle{ \mathbf{r}_{dx}(n) }[/math] in terms of [math]\displaystyle{ \mathbf{r}_{dx}(n-1) }[/math]

[math]\displaystyle{ \mathbf{r}_{dx}(n) }[/math] [math]\displaystyle{ =\sum_{i=0}^{n}\lambda^{n-i}d(i)\mathbf{x}(i) }[/math]
[math]\displaystyle{ =\sum_{i=0}^{n-1}\lambda^{n-i}d(i)\mathbf{x}(i)+\lambda^{0}d(n)\mathbf{x}(n) }[/math]
[math]\displaystyle{ =\lambda\mathbf{r}_{dx}(n-1)+d(n)\mathbf{x}(n) }[/math]

where [math]\displaystyle{ \mathbf{x}(i) }[/math] is the [math]\displaystyle{ {p+1} }[/math] dimensional data vector

[math]\displaystyle{ \mathbf{x}(i)=[x(i), x(i-1), \dots , x(i-p) ]^{T} }[/math]

Similarly we express [math]\displaystyle{ \mathbf{R}_{x}(n) }[/math] in terms of [math]\displaystyle{ \mathbf{R}_{x}(n-1) }[/math] by

[math]\displaystyle{ \mathbf{R}_{x}(n) }[/math] [math]\displaystyle{ =\sum_{i=0}^{n}\lambda^{n-i}\mathbf{x}(i)\mathbf{x}^{T}(i) }[/math]
[math]\displaystyle{ =\lambda\mathbf{R}_{x}(n-1)+\mathbf{x}(n)\mathbf{x}^{T}(n) }[/math]

In order to generate the coefficient vector we are interested in the inverse of the deterministic auto-covariance matrix. For that task the Woodbury matrix identity comes in handy. With

[math]\displaystyle{ A }[/math] [math]\displaystyle{ =\lambda\mathbf{R}_{x}(n-1) }[/math] is [math]\displaystyle{ (p+1) }[/math]-by-[math]\displaystyle{ (p+1) }[/math]
[math]\displaystyle{ U }[/math] [math]\displaystyle{ =\mathbf{x}(n) }[/math] is [math]\displaystyle{ (p+1) }[/math]-by-1 (column vector)
[math]\displaystyle{ V }[/math] [math]\displaystyle{ =\mathbf{x}^{T}(n) }[/math] is 1-by-[math]\displaystyle{ (p+1) }[/math] (row vector)
[math]\displaystyle{ C }[/math] [math]\displaystyle{ =\mathbf{I}_1 }[/math] is the 1-by-1 identity matrix

The Woodbury matrix identity follows

[math]\displaystyle{ \mathbf{R}_{x}^{-1}(n) }[/math] [math]\displaystyle{ = }[/math] [math]\displaystyle{ \left[\lambda\mathbf{R}_{x}(n-1)+\mathbf{x}(n)\mathbf{x}^{T}(n)\right]^{-1} }[/math]
[math]\displaystyle{ = }[/math] [math]\displaystyle{ \dfrac{1}{\lambda}\left\lbrace\mathbf{R}_{x}^{-1}(n-1)-\dfrac{\mathbf{R}_{x}^{-1}(n-1)\mathbf{x}(n)\mathbf{x}^{T}(n)\mathbf{R}_{x}^{-1}(n-1)}{\lambda+\mathbf{x}^{T}(n)\mathbf{R}_{x}^{-1}(n-1)\mathbf{x}(n)}\right\rbrace }[/math]
[math]\displaystyle{ }[/math]

To come in line with the standard literature, we define

[math]\displaystyle{ \mathbf{P}(n) }[/math] [math]\displaystyle{ =\mathbf{R}_{x}^{-1}(n) }[/math]
[math]\displaystyle{ =\lambda^{-1}\mathbf{P}(n-1)-\mathbf{g}(n)\mathbf{x}^{T}(n)\lambda^{-1}\mathbf{P}(n-1) }[/math]

where the gain vector [math]\displaystyle{ g(n) }[/math] is

[math]\displaystyle{ \mathbf{g}(n) }[/math] [math]\displaystyle{ =\lambda^{-1}\mathbf{P}(n-1)\mathbf{x}(n)\left\{1+\mathbf{x}^{T}(n)\lambda^{-1}\mathbf{P}(n-1)\mathbf{x}(n)\right\}^{-1} }[/math]
[math]\displaystyle{ =\mathbf{P}(n-1)\mathbf{x}(n)\left\{\lambda+\mathbf{x}^{T}(n)\mathbf{P}(n-1)\mathbf{x}(n)\right\}^{-1} }[/math]

Before we move on, it is necessary to bring [math]\displaystyle{ \mathbf{g}(n) }[/math] into another form

[math]\displaystyle{ \mathbf{g}(n)\left\{1+\mathbf{x}^{T}(n)\lambda^{-1}\mathbf{P}(n-1)\mathbf{x}(n)\right\} }[/math] [math]\displaystyle{ =\lambda^{-1}\mathbf{P}(n-1)\mathbf{x}(n) }[/math]
[math]\displaystyle{ \mathbf{g}(n)+\mathbf{g}(n)\mathbf{x}^{T}(n)\lambda^{-1}\mathbf{P}(n-1)\mathbf{x}(n) }[/math] [math]\displaystyle{ =\lambda^{-1}\mathbf{P}(n-1)\mathbf{x}(n) }[/math]

Subtracting the second term on the left side yields

[math]\displaystyle{ \mathbf{g}(n) }[/math] [math]\displaystyle{ =\lambda^{-1}\mathbf{P}(n-1)\mathbf{x}(n)-\mathbf{g}(n)\mathbf{x}^{T}(n)\lambda^{-1}\mathbf{P}(n-1)\mathbf{x}(n) }[/math]
[math]\displaystyle{ =\lambda^{-1}\left[\mathbf{P}(n-1)-\mathbf{g}(n)\mathbf{x}^{T}(n)\mathbf{P}(n-1)\right]\mathbf{x}(n) }[/math]

With the recursive definition of [math]\displaystyle{ \mathbf{P}(n) }[/math] the desired form follows

[math]\displaystyle{ \mathbf{g}(n)=\mathbf{P}(n)\mathbf{x}(n) }[/math]

Now we are ready to complete the recursion. As discussed

[math]\displaystyle{ \mathbf{w}_{n} }[/math] [math]\displaystyle{ =\mathbf{P}(n)\,\mathbf{r}_{dx}(n) }[/math]
[math]\displaystyle{ =\lambda\mathbf{P}(n)\,\mathbf{r}_{dx}(n-1)+d(n)\mathbf{P}(n)\,\mathbf{x}(n) }[/math]

The second step follows from the recursive definition of [math]\displaystyle{ \mathbf{r}_{dx}(n ) }[/math]. Next we incorporate the recursive definition of [math]\displaystyle{ \mathbf{P}(n) }[/math] together with the alternate form of [math]\displaystyle{ \mathbf{g}(n) }[/math] and get

[math]\displaystyle{ \mathbf{w}_{n} }[/math] [math]\displaystyle{ =\lambda\left[\lambda^{-1}\mathbf{P}(n-1)-\mathbf{g}(n)\mathbf{x}^{T}(n)\lambda^{-1}\mathbf{P}(n-1)\right]\mathbf{r}_{dx}(n-1)+d(n)\mathbf{g}(n) }[/math]
[math]\displaystyle{ =\mathbf{P}(n-1)\mathbf{r}_{dx}(n-1)-\mathbf{g}(n)\mathbf{x}^{T}(n)\mathbf{P}(n-1)\mathbf{r}_{dx}(n-1)+d(n)\mathbf{g}(n) }[/math]
[math]\displaystyle{ =\mathbf{P}(n-1)\mathbf{r}_{dx}(n-1)+\mathbf{g}(n)\left[d(n)-\mathbf{x}^{T}(n)\mathbf{P}(n-1)\mathbf{r}_{dx}(n-1)\right] }[/math]

With [math]\displaystyle{ \mathbf{w}_{n-1}=\mathbf{P}(n-1)\mathbf{r}_{dx}(n-1) }[/math] we arrive at the update equation

[math]\displaystyle{ \mathbf{w}_{n} }[/math] [math]\displaystyle{ =\mathbf{w}_{n-1}+\mathbf{g}(n)\left[d(n)-\mathbf{x}^{T}(n)\mathbf{w}_{n-1}\right] }[/math]
[math]\displaystyle{ =\mathbf{w}_{n-1}+\mathbf{g}(n)\alpha(n) }[/math]

where [math]\displaystyle{ \alpha(n)=d(n)-\mathbf{x}^{T}(n)\mathbf{w}_{n-1} }[/math] is the a priori error. Compare this with the a posteriori error; the error calculated after the filter is updated:

[math]\displaystyle{ e(n)=d(n)-\mathbf{x}^{T}(n)\mathbf{w}_n }[/math]

That means we found the correction factor

[math]\displaystyle{ \Delta\mathbf{w}_{n-1}=\mathbf{g}(n)\alpha(n) }[/math]

This intuitively satisfying result indicates that the correction factor is directly proportional to both the error and the gain vector, which controls how much sensitivity is desired, through the weighting factor, [math]\displaystyle{ \lambda }[/math].

RLS algorithm summary

The RLS algorithm for a p-th order RLS filter can be summarized as

Parameters: [math]\displaystyle{ p= }[/math] filter order
[math]\displaystyle{ \lambda= }[/math] forgetting factor
[math]\displaystyle{ \delta= }[/math] value to initialize [math]\displaystyle{ \mathbf{P}(0) }[/math]
Initialization: [math]\displaystyle{ \mathbf{w}(0)=0 }[/math],
[math]\displaystyle{ x(k)=0, k=-p,\dots,-1 }[/math],
[math]\displaystyle{ d(k)=0, k=-p,\dots,-1 }[/math]
[math]\displaystyle{ \mathbf{P}(0)=\delta I }[/math] where [math]\displaystyle{ I }[/math] is the identity matrix of rank [math]\displaystyle{ p+1 }[/math]
Computation: For [math]\displaystyle{ n=1,2,\dots }[/math]

[math]\displaystyle{ \mathbf{x}(n) = \left[ \begin{matrix} x(n)\\ x(n-1)\\ \vdots\\ x(n-p) \end{matrix} \right] }[/math]

[math]\displaystyle{ \alpha(n) = d(n)-\mathbf{x}^T(n)\mathbf{w}(n-1) }[/math]
[math]\displaystyle{ \mathbf{g}(n)=\mathbf{P}(n-1)\mathbf{x}(n)\left\{\lambda+\mathbf{x}^{T}(n)\mathbf{P}(n-1)\mathbf{x}(n)\right\}^{-1} }[/math]
[math]\displaystyle{ \mathbf{P}(n)=\lambda^{-1}\mathbf{P}(n-1)-\mathbf{g}(n)\mathbf{x}^{T}(n)\lambda^{-1}\mathbf{P}(n-1) }[/math]
[math]\displaystyle{ \mathbf{w}(n) = \mathbf{w}(n-1)+\,\alpha(n)\mathbf{g}(n) }[/math].

The recursion for [math]\displaystyle{ P }[/math] follows an algebraic Riccati equation and thus draws parallels to the Kalman filter.[3]

Lattice recursive least squares filter (LRLS)

The lattice recursive least squares adaptive filter is related to the standard RLS except that it requires fewer arithmetic operations (order N).[4] It offers additional advantages over conventional LMS algorithms such as faster convergence rates, modular structure, and insensitivity to variations in eigenvalue spread of the input correlation matrix. The LRLS algorithm described is based on a posteriori errors and includes the normalized form. The derivation is similar to the standard RLS algorithm and is based on the definition of [math]\displaystyle{ d(k)\,\! }[/math]. In the forward prediction case, we have [math]\displaystyle{ d(k) = x(k)\,\! }[/math] with the input signal [math]\displaystyle{ x(k-1)\,\! }[/math] as the most up to date sample. The backward prediction case is [math]\displaystyle{ d(k) = x(k-i-1)\,\! }[/math], where i is the index of the sample in the past we want to predict, and the input signal [math]\displaystyle{ x(k)\,\! }[/math] is the most recent sample.[5]

Parameter summary

[math]\displaystyle{ \kappa_f(k,i)\,\! }[/math] is the forward reflection coefficient
[math]\displaystyle{ \kappa_b(k,i)\,\! }[/math] is the backward reflection coefficient
[math]\displaystyle{ e_f(k,i)\,\! }[/math] represents the instantaneous a posteriori forward prediction error
[math]\displaystyle{ e_b(k,i)\,\! }[/math] represents the instantaneous a posteriori backward prediction error
[math]\displaystyle{ \xi^d_{b_{\min}}(k,i)\,\! }[/math] is the minimum least-squares backward prediction error
[math]\displaystyle{ \xi^d_{f_{\min}}(k,i)\,\! }[/math] is the minimum least-squares forward prediction error
[math]\displaystyle{ \gamma(k,i)\,\! }[/math] is a conversion factor between a priori and a posteriori errors
[math]\displaystyle{ v_i(k)\,\! }[/math] are the feedforward multiplier coefficients.
[math]\displaystyle{ \varepsilon\,\! }[/math] is a small positive constant that can be 0.01

LRLS algorithm summary

The algorithm for a LRLS filter can be summarized as

Initialization:
For [math]\displaystyle{ i = 0,1,\ldots,N }[/math]
 [math]\displaystyle{ \delta(-1,i) = \delta_D(-1,i) = 0\,\! }[/math] (if [math]\displaystyle{ x(k) = 0 }[/math] for [math]\displaystyle{ k \lt 0 }[/math])
 [math]\displaystyle{ \xi^d_{b_{\min}}(-1,i) = \xi^d_{f_{\min}}(-1,i) = \varepsilon }[/math]
 [math]\displaystyle{ \gamma(-1,i) = 1\,\! }[/math]
 [math]\displaystyle{ e_b(-1,i) = 0\,\! }[/math]
End
Computation:
For [math]\displaystyle{ k \ge 0 }[/math]
 [math]\displaystyle{ \gamma(k,0) = 1\,\! }[/math]
 [math]\displaystyle{ e_b(k,0) = e_f(k,0) = x(k)\,\! }[/math]
 [math]\displaystyle{ \xi^d_{b_{\min}}(k,0) = \xi^d_{f_{\min}}(k,0) = x^2(k) + \lambda\xi^d_{f_{\min}}(k-1,0)\,\! }[/math]
 [math]\displaystyle{ e(k,0) = d(k)\,\! }[/math]
 For [math]\displaystyle{ i = 0,1,\ldots,N }[/math]
 [math]\displaystyle{ \delta(k,i) = \lambda\delta(k-1,i) + \frac{e_b(k-1,i)e_f(k,i)}{\gamma(k-1,i)} }[/math]
 [math]\displaystyle{ \gamma(k,i+1) = \gamma(k,i) - \frac{e_b^2(k,i)}{\xi^d_{b_{\min}}(k,i)} }[/math]
 [math]\displaystyle{ \kappa_b(k,i) = \frac{\delta(k,i)}{\xi^d_{f_{\min}}(k,i)} }[/math]
 [math]\displaystyle{ \kappa_f(k,i) = \frac{\delta(k,i)}{\xi^d_{b_{\min}}(k-1,i)} }[/math]
 [math]\displaystyle{ e_b(k,i+1) = e_b(k-1,i) - \kappa_b(k,i)e_f(k,i)\,\! }[/math]
 [math]\displaystyle{ e_f(k,i+1) = e_f(k,i) - \kappa_f(k,i)e_b(k-1,i)\,\! }[/math]
 [math]\displaystyle{ \xi^d_{b_{\min}}(k,i+1) = \xi^d_{b_{\min}}(k-1,i) - \delta(k,i)\kappa_b(k,i) }[/math]
 [math]\displaystyle{ \xi^d_{f_{\min}}(k,i+1) = \xi^d_{f_{\min}}(k,i) - \delta(k,i)\kappa_f(k,i) }[/math]
 Feedforward filtering
 [math]\displaystyle{ \delta_D(k,i) = \lambda\delta_D(k-1,i) + \frac{e(k,i)e_b(k,i)}{\gamma(k,i)} }[/math]
 [math]\displaystyle{ v_i(k) = \frac{\delta_D(k,i)}{\xi^d_{b_{\min}}(k,i)} }[/math]
 [math]\displaystyle{ e(k,i+1) = e(k,i) - v_i(k)e_b(k,i)\,\! }[/math]
 End
End

Normalized lattice recursive least squares filter (NLRLS)

The normalized form of the LRLS has fewer recursions and variables. It can be calculated by applying a normalization to the internal variables of the algorithm which will keep their magnitude bounded by one. This is generally not used in real-time applications because of the number of division and square-root operations which comes with a high computational load.

NLRLS algorithm summary

The algorithm for a NLRLS filter can be summarized as

Initialization:
For [math]\displaystyle{ i = 0,1,\ldots,N. }[/math]
 [math]\displaystyle{ \overline{\delta}(-1,i) = 0\,\! }[/math] (if [math]\displaystyle{ x(k) = d(k) = 0 }[/math] for [math]\displaystyle{ k \lt 0 }[/math])
 [math]\displaystyle{ \overline{\delta}_D(-1,i) = 0\,\! }[/math]
 [math]\displaystyle{ \overline{e}_b(-1,i) = 0\,\! }[/math]
End
 [math]\displaystyle{ \sigma_x^2(-1) = \lambda\sigma_d^2(-1) = \varepsilon\,\! }[/math]
Computation:
For [math]\displaystyle{ k \ge 0 }[/math]
 [math]\displaystyle{ \sigma_x^2(k) = \lambda\sigma_x^2(k-1) + x^2(k)\,\! }[/math] (Input signal energy)
 [math]\displaystyle{ \sigma_d^2(k) = \lambda\sigma_d^2(k-1) + d^2(k)\,\! }[/math] (Reference signal energy)
 [math]\displaystyle{ \overline{e}_b(k,0) = \overline{e}_f(k,0) = \frac{x(k)}{\sigma_x(k)}\,\! }[/math]
 [math]\displaystyle{ \overline{e}(k,0) = \frac{d(k)}{\sigma_d(k)}\,\! }[/math]
 For [math]\displaystyle{ i = 0,1,\ldots,N }[/math]
 [math]\displaystyle{ \overline{\delta}(k,i) = \delta(k-1,i)\sqrt{(1 - \overline{e}_b^2(k-1,i))(1 - \overline{e}_f^2(k,i))} + \overline{e}_b(k-1,i)\overline{e}_f(k,i) }[/math]
 [math]\displaystyle{ \overline{e}_b(k,i+1) = \frac{\overline{e}_b(k-1,i) - \overline{\delta}(k,i)\overline{e}_f(k,i)}{\sqrt{(1 - \overline{\delta}^2(k,i))(1 - \overline{e}_f^2(k,i))}} }[/math]
 [math]\displaystyle{ \overline{e}_f(k,i+1) = \frac{\overline{e}_f(k,i) - \overline{\delta}(k,i)\overline{e}_b(k-1,i)}{\sqrt{(1 - \overline{\delta}^2(k,i))(1 - \overline{e}_b^2(k-1,i))}} }[/math]
 Feedforward filter
 [math]\displaystyle{ \overline{\delta}_D(k,i) = \overline{\delta}_D(k-1,i)\sqrt{(1 - \overline{e}_b^2(k,i))(1 - \overline{e}^2(k,i))} + \overline{e}(k,i)\overline{e}_b(k,i) }[/math]
 [math]\displaystyle{ \overline{e}(k,i+1) = \frac{1}{\sqrt{(1 - \overline{e}_b^2(k,i))(1 - \overline{\delta}_D^2(k,i))}}[\overline{e}(k,i) - \overline{\delta}_D(k,i)\overline{e}_b(k,i)] }[/math]
 End
End

See also

References

  • Hayes, Monson H. (1996). "9.4: Recursive Least Squares". Statistical Digital Signal Processing and Modeling. Wiley. p. 541. ISBN 0-471-59431-8. 
  • Simon Haykin, Adaptive Filter Theory, Prentice Hall, 2002, ISBN:0-13-048434-2
  • M.H.A Davis, R.B. Vinter, Stochastic Modelling and Control, Springer, 1985, ISBN:0-412-16200-8
  • Weifeng Liu, Jose Principe and Simon Haykin, Kernel Adaptive Filtering: A Comprehensive Introduction, John Wiley, 2010, ISBN:0-470-44753-2
  • R.L.Plackett, Some Theorems in Least Squares, Biometrika, 1950, 37, 149–157, ISSN 0006-3444
  • C.F.Gauss, Theoria combinationis observationum erroribus minimis obnoxiae, 1821, Werke, 4. Gottinge

Notes

  1. Emannual C. Ifeacor, Barrie W. Jervis. Digital signal processing: a practical approach, second edition. Indianapolis: Pearson Education Limited, 2002, p. 718
  2. Steven Van Vaerenbergh, Ignacio Santamaría, Miguel Lázaro-Gredilla "Estimation of the forgetting factor in kernel recursive least squares", 2012 IEEE International Workshop on Machine Learning for Signal Processing, 2012, accessed June 23, 2016.
  3. Welch, Greg and Bishop, Gary "An Introduction to the Kalman Filter", Department of Computer Science, University of North Carolina at Chapel Hill, September 17, 1997, accessed July 19, 2011.
  4. Diniz, Paulo S.R., "Adaptive Filtering: Algorithms and Practical Implementation", Springer Nature Switzerland AG 2020, Chapter 7: Adaptive Lattice-Based RLS Algorithms. https://doi.org/10.1007/978-3-030-29057-3_7
  5. Albu, Kadlec, Softley, Matousek, Hermanek, Coleman, Fagan "Implementation of (Normalised) RLS Lattice on Virtex", Digital Signal Processing, 2001, accessed December 24, 2011.