# A Recursive Least-Squares Algorithm for the Identification of Trilinear Forms
## 3 RLS Algorithm for Trilinear Forms
Consequently, the estimated impulse response can also be decomposed as:  
\[\widehat{\mathbf{h}}(n)=\widehat{\mathbf{h}}_{3}(n)\otimes\widehat{\mathbf{h }}_{2}(n)\otimes\widehat{\mathbf{h}}_{1}(n), \tag{22}\]  
where \(\widehat{\mathbf{h}}_{i}(n),\ i=1,2,3\) are three adaptive filters (with \(L_{1}\), \(L_{2}\), and \(L_{3}\) coefficients, respectively), which aim to model the individual impulse responses \(\mathbf{h}_{i},\ i=1,2,3\). Nevertheless, we should notice that there is no unique solution related to the decomposition in (22). It is obvious that, for any constants \(\eta_{1},\ \eta_{2}\), and \(\eta_{3}\), with \(\eta_{1}\eta_{2}\eta_{3}=1\), we have:  
\[\mathbf{h} =\mathbf{h}_{3}\otimes\mathbf{h}_{2}\otimes\mathbf{h}_{1}\] \[=\eta_{3}\mathbf{h}_{3}\otimes\eta_{2}\mathbf{h}_{2}\otimes\eta_ {1}\mathbf{h}_{1}. \tag{23}\]  
Hence, \(\eta_{i}\mathbf{h}_{i},\ i=1,2,3\) also represent a set of solutions. However, the global impulse response \(\mathbf{h}\) is identified with no scaling ambiguity. Following the decomposition from (22), we can easily verify that:  
\[\mathbf{x}(n) \triangleq\text{vec}\left[\mathbf{\mathcal{X}}(n)\right], \tag{18}\]0 \[\mathbf{x}(n) \triangleq\text{vec}\left[\mathbf{\mathcal{X}}(n)\right], \tag{18}\]1 (25) \[\mathbf{x}(n) \triangleq\text{vec}\left[\mathbf{\mathcal{X}}(n)\right], \tag{18}\]2  
where:  
\[\mathbf{x}(n) \triangleq\text{vec}\left[\mathbf{\mathcal{X}}(n)\right], \tag{18}\]3 \[\mathbf{x}(n) \triangleq\text{vec}\left[\mathbf{\mathcal{X}}(n)\right], \tag{18}\]4 (28) \[\mathbf{x}(n) \triangleq\text{vec}\left[\mathbf{\mathcal{X}}(n)\right], \tag{18}\]5  
and \(\mathbf{I}_{L_{i}},\ i=1,2,3\) are the identity matrices of sizes \(L_{1}\times L_{1}\), \(L_{2}\times L_{2}\), and \(L_{3}\times L_{3}\), respectively. Moreover, introducing the notation:  
\[\mathbf{x}(n) \triangleq\text{vec}\left[\mathbf{\mathcal{X}}(n)\right], \tag{18}\]6 \[\mathbf{x}(n) \triangleq\text{vec}\left[\mathbf{\mathcal{X}}(n)\right], \tag{18}\]7 (31) \[\mathbf{x}(n) \triangleq\text{vec}\left[\mathbf{\mathcal{X}}(n)\right], \tag{18}\]8  
the error signal from (21) can be expressed in three equivalent ways as:  
\[\mathbf{x}(n) \triangleq\text{vec}\left[\mathbf{\mathcal{X}}(n)\right], \tag{18}\]9 \[y(n)=\mathbf{h}^{T}\mathbf{x}(n). \tag{19}\]0 (34) \[y(n)=\mathbf{h}^{T}\mathbf{x}(n). \tag{19}\]1  
Based on the least-squares error criterion [18] applied in the context of (20) and (21), the conventional RLS algorithm is derived from:  
\[y(n)=\mathbf{h}^{T}\mathbf{x}(n). \tag{19}\]2  
where \(\lambda\leq 1\) is a positive constant known as the forgetting factor. On the other hand, based on (24)-(26), the cost function from (36) can be expressed in three different ways, targeting the optimization of the individual components, i.e.,  
\[y(n)=\mathbf{h}^{T}\mathbf{x}(n). \tag{19}\]3 \[y(n)=\mathbf{h}^{T}\mathbf{x}(n). \tag{19}\]4 (38) \[y(n)=\mathbf{h}^{T}\mathbf{x}(n). \tag{19}\]5  
where \(\lambda_{1}\), \(\lambda_{2}\), and \(\lambda_{3}\) are the individual forgetting factors. The previous cost functions suggest a \"trilinear\" optimization strategy [25], where we assume that two components are fixed during the  
update the inverse of the matrices \(\mathbf{R}_{32}(n)\), \(\mathbf{R}_{31}(n)\), and \(\mathbf{R}_{21}(n)\) efficiently. The solution relies on the matrix inversion lemma [18], which leads to the following updates:  
\[y(n)=\mathbf{h}^{T}\mathbf{x}(n). \tag{19}\]6 \[y(n)=\mathbf{h}^{T}\mathbf{x}(n). \tag{19}\]7 (47) \[y(n)=\mathbf{h}^{T}\mathbf{x}(n). \tag{19}\]8  
Therefore, the Kalman gain vectors are evaluated as:  
\[y(n)=\mathbf{h}^{T}\mathbf{x}(n). \tag{19}\]9 \[d(n) =y(n)+w(n)\]0 (50) \[d(n) =y(n)+w(n)\]1  
For initialization, we can choose:  
\[\widehat{\mathbf{h}}_{1}(0) =\left[ \begin{array}{c}1\\ \mathbf{0}_{L_{1}-1}\end{array}