## 4 The Data Filtering Based Iterative Least Squares Algorithm  
Suppose that the data length \(L\gg n_{0}+n_{c}\). Based on the identification models in Equations (6) and (13), we define two quadratic criterion functions  
\[J_{1}(\mathbf{\vartheta}) := \sum_{t=1}^{L}[y_{t}(t)-\mathbf{\phi}_{\mathrm{f}}^{\tau}(t)\mathbf{ \vartheta}]^{2},\] \[J_{2}(\mathbf{c}) := \sum_{t=1}^{L}[w(t)-\mathbf{\psi}^{\tau}(t)\mathbf{c}]^{2}.\]  
Minimizing the above two quadratic criterion functions, we can obtain the estimation algorithm of computing \(\hat{\mathbf{\vartheta}}(t)\) and \(\hat{\mathbf{c}}(t)\):  
\[\hat{\mathbf{\vartheta}}(t) = \left[\sum_{t=1}^{L}\mathbf{\phi}_{\mathrm{f}}(t)\mathbf{\phi}_{\mathrm{f }}^{\tau}(t)\right]^{-1}\sum_{t=1}^{L}\mathbf{\phi}_{\mathrm{f}}(t)y_{t}(t), \tag{41}\] \[\hat{\mathbf{c}}(t) = \left[\sum_{t=1}^{L}\mathbf{\psi}(t)\mathbf{\psi}^{\tau}(t)\right]^{-1} \sum_{t=1}^{L}\mathbf{\psi}(t)w(t). \tag{42}\]  
Because the vectors \(\mathbf{\phi}_{\mathrm{f}}(t)\) and \(\mathbf{\psi}(t)\) are unknown, the parameter estimates \(\hat{\mathbf{\vartheta}}(t)\) and \(\hat{\mathbf{c}}(t)\) cannot be computed directly. Here, we adopt the iterative estimation theory. Let \(k=1,2,3,\cdots\) be an iterative variable, \(\hat{\mathbf{\vartheta}}_{k}\) and \(\hat{\mathbf{c}}_{k}\) denote the iterative estimates of \(\mathbf{\vartheta}\) and \(\mathbf{c}\) at iteration \(k\). Let \(\hat{x}_{j,k}(t)\) and \(\hat{w}_{k}(t)\) be the estimates of \(x_{j}(t)\) and \(w(t)\) at iteration \(k\). Replacing \(\mathbf{\phi}_{j}(t)\) and \(\mathbf{\vartheta}_{j}\) in Equation (5) with their estimates \(\hat{\mathbf{\phi}}_{j,k}(t)\) and \(\hat{\mathbf{\vartheta}}_{j,k}\) at iteration \(k\), \(\mathbf{\phi}(t)\) and \(\mathbf{\vartheta}\) in Equation (6) with their estimates \(\hat{\mathbf{\phi}}_{k}(t)\) at iteration \(k\) and the \(\hat{\mathbf{\vartheta}}_{k-1}\) at iteration \(k-1\), the estimate \(\hat{x}_{j,k}(t)\) and \(\hat{w}_{k}(t)\) can be calculated by  
\[\hat{x}_{j,k}(t) = \hat{\mathbf{\phi}}_{j,k}^{\tau}(t)\hat{\mathbf{\vartheta}}_{j,k}, \tag{43}\] \[\hat{w}_{k}(t) = y(t)-\hat{\mathbf{\phi}}_{k}^{\tau}(t)\hat{\mathbf{\vartheta}}_{k-1}. \tag{44}\]  
Replacing \(x_{j}(t-i)\) in \(\mathbf{\phi}_{j}(t)\) with \(\hat{x}_{j,k-1}(t-i)\), \(w(t-i)\) in \(\mathbf{\psi}(t)\) with \(\hat{w}_{k-1}(t-i)\), the estimates \(\hat{\mathbf{\phi}}_{k}(t)\), \(\hat{\mathbf{\phi}}_{j,k}(t)\) and \(\hat{\mathbf{\psi}}_{k}(t)\) can be obtained by  
\[\hat{\mathbf{\phi}}_{k}(t) = [\hat{\mathbf{\phi}}_{1,k}^{\tau}(t),\hat{\mathbf{\phi}}_{2,k}^{\tau}(t), \cdots,\hat{\mathbf{\phi}}_{r,k}^{\tau}(t)]^{\tau}, \tag{45}\] \[\hat{\mathbf{\phi}}_{j,k}(t) = [-\hat{x}_{j,k-1}(t-1),\cdots,-\hat{x}_{j,k-1}(t-n_{j}),u_{j}(t-1),\cdots,u_{j}(t-n_{j})]^{\tau},\] (46) \[\hat{\mathbf{\psi}}_{k}(t) = [-\hat{w}_{k-1}(t-1),-\hat{w}_{k-1}(t-2),\cdots,-\hat{w}_{k-1}(t- n_{c})]^{\tau}. \tag{47}\]  
\[\hat{\mathbf{\vartheta}}_{j,k} = [\hat{a}_{j1,k},\hat{a}_{j2,k},\cdots,\hat{a}_{jn_{j},k},\hat{b}_{j1, k},\hat{b}_{j2,k},\cdots,\hat{b}_{jn_{j},k}]^{\mathrm{ T}}, \tag{68}\] \[J_{2}(\mathbf{c}) := \sum_{t=1}^{L}[w(t)-\mathbf{\psi}^{\tau}(t)\mathbf{c}]^{2}.\]0  
We list the steps for computing the estimates \(\hat{\mathbf{\vartheta}}_{k}\) and \(\hat{\mathbf{c}}_{k}\) as iteration \(k\) increases:  
1. To initialize, let \(k=1\), \(\hat{x}_{j\ell,0}(t)=1/p_{0}\), \(\hat{u}_{j\ell,0}(t)=1/p_{0}\), \(\hat{y}_{\ell,0}(t)=1/p_{0}\), \(\hat{x}_{j,0}(t)=1/p_{0}\), \(\hat{w}_{0}(t)=1/p_{0}\), \(p_{0}=10^{6}\). 2. Collect the input-output data \(\{u_{1}(t),u_{2}(t),\cdots,u_{r}(t),y(t)\colon t=1,2,\cdots,L\}\). 3. Form \(\hat{\mathbf{\vartheta}}_{j,k}(t)\) by Equation (64), \(\hat{\mathbf{\phi}}_{k}(t)\) by Equation (63), and \(\hat{\mathbf{\psi}}_{k}(t)\) by Equation (62). 4. Compute \(\hat{w}_{k}(t)\) by Equation (66), update the parameter estimate \(\hat{\mathbf{c}}_{k}\) by Equation (61). 5. Read \(\hat{\mathbf{c}}_{k}\) by Equation (69), compute \(\hat{u}_{j\ell,k}(t)\) and \(\hat{y}_{\ell,k}(t)\) by Equations (58) and (59). 6.