# Sensor Fusion and State Estimation of IoT Enabled Wind Energy Conversion System
## 4 Proposed Sensor Fusion Technique  
We now present our state estimation with sensor fusion based on a Kalman filter algorithm [38; 39]. We illustrate the proposed scheme in the following four steps:  
**Step 1--Prediction:** Let \(\widehat{\mathbf{X}}^{-}(t)\) and \(\widehat{\mathbf{P}}^{-}(t)\) be the predicted state and co-variance matrix, respectively. According to the Kalman filter algorithm, we calculate \(\widehat{\mathbf{X}}^{-}(t)\) and \(\widehat{\mathbf{Y}}^{-}(t)\) by  
\[\widehat{\mathbf{X}}_{i}^{-}(t) =A_{d}\widehat{\mathbf{X}}_{i}(t-1)+\mathbf{B}_{d}\mathbf{U}(t-1)\] \[\mathbf{Y}_{i}^{-}(t) =\mathbf{A}_{d}\mathbf{Y}_{i}(t-1)\mathbf{A}_{d}^{T}+\mathbf{Q}\]  
We denote \(\mathbf{Y}_{i}(t)\) as the \(i^{th}\) local estimator's updated co-variance matrix at time step \(t\). Initially we set \(\mathbf{Y}_{i}(0)\) to a predefined value \(\mathbf{Y}_{0}\).  
**Step 2--Modification:** We find the summed syndrome value of each component of \(\widehat{\mathbf{\mathcal{O}}}_{i}(t)\). We remove the erroneous component from \(\widehat{\mathbf{\mathcal{O}}}_{i}(t)\) and modify \(\mathbf{C}_{i}\) and \(\mathbf{R}_{i}\) accordingly. Let \(\overline{\mathbf{\mathcal{O}}}_{i}(t)\), \(\overline{\mathbf{C}}_{i}(t)\), and \(\overline{\mathbf{R}}_{i}(t)\) be the modified version of \(\widehat{\mathbf{\mathcal{O}}}_{i}(t)\), \(\mathbf{C}_{i}\) and \(\mathbf{R}_{i}\), respectively.  
**Step 3--Update:** Let \(\mathbf{e}_{i}(t)\) and \(\mathbf{\mathcal{G}}_{i}(t)\) be the measurement pre-fit residual and Kalman gain, respectively. We calculate \(\mathbf{e}_{i}(t)\) and \(\mathbf{\mathcal{G}}_{i}(t)\) by  
\[\mathbf{e}_{i}(t)=\overline{\mathbf{\mathcal{O}}}_{i}(t)-\overline{\mathbf{ C}}_{i}(t)\widehat{\mathbf{X}}_{i}^{-}(t)\] \[\mathbf{\mathcal{G}}_{i}(t)=\frac{\mathbf{Y}_{i}^{-}(t)\overline{\mathbf{C} }_{i}(t)^{T}}{\overline{\mathbf{C}}_{i}(t)\mathbf{Y}_{i}^{-}(t)\overline{\mathbf{C}}_{i}(t )^{T}+\mathbf{Q}}\]  
At time step \(k\), co-variance matrix estimate and the updated state estimate are calculated by,  
\[\mathbf{Y}(t)=\mathbf{Y}^{-}(t)-\mathbf{\mathcal{G}}(t)\overline{\mathbf{C}}_{i}(t )\mathbf{Y}_{i}^{-}(t)\] \[\widehat{\mathbf{X}}_{i}(t)=\widehat{\mathbf{X}}_{i}^{-}(t)+\mathbf{\mathcal{ G}}_{i}(t)\overline{\mathbf{R}}_{i}(t)\]  
**Step 4--Fusion:** Let \(\mathbf{\Phi}_{pq}(t)\), \(p,q\in\{1,2,\ldots,N\}\) be the error cross co-variance between the \(p^{th}\) and the \(q^{th}\) sensors. \(\mathbf{\Phi}_{pq}(t)\) is given by  
\[\mathbf{\Phi}_{pq}(t|t)=\begin{cases}\mathbf{Y}_{0}&\text{if }t=0\\ \mathbf{Y}_{p}(t)&\text{if }m=n\\ \left[\mathbf{I}_{\lambda}-\mathbf{\mathcal{G}}_{p}(t)\overline{\mathbf{C}}_{p}(t)\right] \times&\text{Otherwise}\\ \left[\mathbf{A}_{d}\mathbf{\Phi}_{pq}(t-1|t-1)\mathbf{A}_{d}^{T}+\mathbf{\Gamma}\mathbf{Q}\mathbf{T} ^{T}\right]\times\\ \left[\mathbf{I}_{\lambda}-\mathbf{\mathcal{G}}_{q}(t)\overline{\mathbf{C}}_{q}(t)\right] \end{cases} \tag{7}\]  
where \(\mathbf{I}_{\lambda}\) is the identity matrix of size \(\lambda\times\lambda\) and \(\lambda\) is the number of components in \(\mathbf{X}\). Following [18; 40], optimal fusion based on the linear minimum variance can be written as  
\[\widehat{\mathbf{X}}_{g}(t)=\mathbf{W}_{1}(t)\widehat{\mathbf{X}}_{1}(t)+\mathbf{W}_{2}(t) \widehat{\mathbf{X}}_{2}(t)+\cdots+\mathbf{W}_{N}(t)\widehat{\mathbf{X}}_{N}(t) \tag{8}\]  
where the matrix weight \(\overline{\mathbf{W}}(t)\) is given by  
\[\overline{\mathbf{W}}(t)=\mathbf{\Xi}(t)^{-1}\mathbf{\mathcal{I}}\left(\mathbf{ \mathcal{I}}^{T}\mathbf{\Xi}(t)\mathbf{\mathcal{I}}\right)^{-1} \tag{9}\]  
where \(\overline{\mathbf{W}}(t)=[\mathbf{W}_{1}(t),\mathbf{W}_{2}(t),\ldots,\mathbf{W}_{N}(t)]^{T}\) is an \(\lambda N\times\lambda\) matrix, \(\mathbf{\Xi}(t)=(\mathbf{\Phi}_{pq}(t))\), \(p,q=1,2,\ldots,N\) is an \(\lambda N\times\lambda N\) symmetric positive definite matrix, and \(\mathbf{\mathcal{I}}=[\mathbf{I}_{\lambda},\ldots,\mathbf{I}_{\lambda}]^{T}\) is an \(\lambda N\times\lambda\) matrix. The overall fusion process is shown in Figure 4.