# Low-Complexity Recursive Least-Squares Adaptive Algorithm Based on Tensorial Forms
## 3 Tensor-Based RLS Algorithms
### Tensor-Based Recursive Least Squares Algorithm (RLS-T)  
Starting with the desired (11) and error (13) signals, we can apply the least-squares error criterion [14] for the tensor-based decomposition. The RLS algorithm can be applied by following the minimization of the cost function:  
\[J[\widehat{\mathbf{g}}(n)]=\sum_{k=1}^{n}\lambda^{n-k}\Big{[}d(k)-\widehat{ \mathbf{g}}^{T}(n)\mathbf{x}(k)\Big{]}^{2}, \tag{16}\]  
with the forgetting factor of the algorithm, \(0<\lambda\leq 1\). First, let us consider the estimated impulse responses of the channels, \(\widehat{\mathbf{h}}_{i}(n)\). Therefore, we may define the corresponding a-priori error signals:\[e_{\widehat{\mathbf{h}}_{i}}(n) =d(n)-y_{\widehat{\mathbf{h}}_{i}}(n) \tag{17}\] \[=d(n)-\widehat{\mathbf{h}}_{i}^{T}(n-1)\mathbf{x}_{\widehat{ \mathbf{h}}_{i}}(n), \tag{18}\]  
where \(y_{\widehat{\mathbf{h}}_{i}}(n)\) are the outputs of the individual channels, and we used the form \(\mathbf{x}(n)\) defined in (7) to express  
\[\mathbf{x}_{\widehat{\mathbf{h}}_{i}}(n)=\Big{[}\widehat{\mathbf{h}}_{N}(n-1) \otimes\widehat{\mathbf{h}}_{N-1}(n-1)\otimes\cdots\otimes\widehat{\mathbf{h }}_{i+1}(n-1)\otimes\mathbf{I}_{L_{i}}\otimes\widehat{\mathbf{h}}_{i-1}(n-1) \otimes\cdots\otimes\widehat{\mathbf{h}}_{2}(n-1)\otimes\widehat{\mathbf{h}}_ {1}(n-1)\Big{]}^{T}\mathbf{x}(n), \tag{19}\]  
with \(\mathbf{I}_{L_{i}}\) denoting the identity matrices of sizes \(L_{i}\times L_{i}\). It can be verified that \(e_{\widehat{\mathbf{h}}_{1}}(n)=e_{\widehat{\mathbf{h}}_{2}}(n)=\cdots=e_{ \widehat{\mathbf{h}}_{N}}(n)\). Considering (19), the cost function in (16) can be reworked in \(N\) alternative ways by performing the optimization procedure of the individual impulse responses, i.e.,  
\[\int_{\widehat{\mathbf{h}}_{N},\widehat{\mathbf{h}}_{N-1},\ldots,\widehat{ \mathbf{h}}_{i+1},\widehat{\mathbf{h}}_{i-1},\ldots,\widehat{\mathbf{h}}_{2}, \widehat{\mathbf{h}}_{1}}\Big{[}\widehat{\mathbf{h}}_{i}(n)\Big{]}=\sum_{k=1} ^{n}\lambda_{i}^{n-k}\Big{[}d(k)-\widehat{\mathbf{h}}_{i}^{T}(n)\mathbf{x}_{ \widehat{\mathbf{h}}_{i}}(k)\Big{]}^{2}, \tag{20}\]  
where the \(\lambda_{i}\)'s are the individual forgetting factors. These impulse responses can be processed by following a multilinear optimization strategy [25], considering the fact that \(N-1\) components are fixed, and the optimization method is applied to the remaining one. Therefore, the focus is the minimization of (20) with respect to \(\widehat{\mathbf{h}}_{i}(n)\), which leads to a set of normal equations:  
\[\mathbf{R}_{i}(n)\widehat{\mathbf{h}}_{i}(n)=\mathbf{p}_{i}(n), \tag{21}\]  
where  
\[\mathbf{R}_{i}(n) =\sum_{k=1}^{n}\lambda_{i}^{n-k}\mathbf{x}_{\widehat{\mathbf{h}} _{i}}(k)\mathbf{x}_{\widehat{\mathbf{h}}_{i}}^{T}(k) \tag{22}\] \[=\lambda_{i}\mathbf{R}_{i}(n-1)+\mathbf{x}_{\widehat{\mathbf{h}} _{i}}(n)\mathbf{x}_{\widehat{\mathbf{h}}_{i}}^{T}(n),\] (23) \[\mathbf{p}_{i}(n) =\sum_{k=1}^{n}\lambda_{i}^{n-k}\mathbf{x}_{\widehat{\mathbf{h}} _{i}}(k)d(k)\] (24) \[=\lambda_{i}\mathbf{p}_{i}(n-1)+\mathbf{x}_{\widehat{\mathbf{h}} _{i}}(n)d(n). \tag{25}\]  
We can achieve \(N\) update relations linked to the individual filters by solving Equation (21). The obvious requirement for its corresponding solutions is the computation of the inverse matrices \(\mathbf{R}_{i}(n)\). The straightforward approach is considered too costly for real-time practical applications. A well-known and accepted compromise, which is often used as a reference, is the method provided by the matrix inversion lemma (also known as Woodbury's matrix identity) [14]. We can express the inverse matrices as  
\[e_{\widehat{\mathbf{h}}_{i}}(n) =d(n)-y_{\widehat{\mathbf{h}}_{i}}(n) \tag{17}\]0  
where  
\[e_{\widehat{\mathbf{h}}_{i}}(n) =d(n)-y_{\widehat{\mathbf{h}}_{i}}(n) \tag{17}\]1  
denotes the Kalman gain vectors.