## 2 Theoretical Considerations of the Digital Filter
### Theoretical Considerations of the EKF Algorithm  
In a nonlinear system, however, KF can be enhanced using a Taylor series to expand the state Equation (23) and output Equation (24) around a nominal state, known as a linearized KF. A summary of the linearized KF algorithm is  
\[x_{k+1}=f\left(x_{k},u_{k}\right)+w_{k} \tag{23}\]  
\[y_{k}=h\left(x_{k}\right)+v_{k} \tag{24}\]  
where \(x_{k+1}\) is the state of the system, denoted for the next time series of the original datasets \(x_{k}\); \(k\) is the time index; \(u_{k}\) is the driving function that may call a signal control or distribution function; \(w_{k}\) is a noise, independent and identically distributed (_i.i.d._) \(N\)(0,\(Q\)), where \(Q\) is the covariance (matrix) of the state; \(v_{k}\) and is another noise, _i.i.d._ \(N\)(0,\(R\)), where \(R\) is the covariance (matrix) of the measurement of noise; \(y_{k}\) is the measured output; and \(f(. )\) and \(h(. )\) are the state equation and output equation, respectively. The state and output functions in the case are nonlinear functions. Thus, Equations (27) and (28) are nominal states that are known (predicted) ahead of time, which are represented by  
\[\overline{x}_{k+1}=f\left(\overline{x},u_{k}\right) \tag{25}\]  
\[\overline{y}=h\left(\overline{x}_{k}\right) \tag{26}\]  
where \(\overline{x}_{k+1}\) is the nominal state of the system and \(\overline{y}\) is the nominal measured output state. During each step, we compute the partial derivative matrices of \(A_{k}\) and \(C_{k}\) with respect to \(x_{k}\), and we obtain in the following equations  
\[A_{k}=f^{\prime}\left(\overline{x}_{k},u_{k}\right) \tag{27}\]  
\[C_{k}=h^{\prime}\left(\overline{x}_{k}\right) \tag{28}\]  
where \(A\) and \(C\) are matrices. Next, we define \(\Delta y_{k}\) as the difference between the actual measurement \(y_{k}\) and the nominal measurement \(\overline{y}_{k}\), which is given by \[\Delta y_{k}=y_{k}-\overline{y}_{k}=y_{k}-h(\overline{x}_{k}) \tag{29}\]  
In this state, the following linearized KF equations can be executed as follows:  
\[K_{k}=P_{k}C_{k}^{T}(C_{k}P_{k}C_{k}^{T}+R)^{-1} \tag{30}\]  
\[\Delta\hat{\mathfrak{x}}_{k+1}=A_{k}\Delta\hat{\mathfrak{x}}_{k}+K_{k}(\Delta y _{k}-C_{k}\Delta\hat{\mathfrak{x}}_{k}) \tag{31}\]  
\[P_{k+1}=A_{k}(I-K_{k}C_{k})P_{k}A_{k}^{T}+Q \tag{32}\]  
\[y_{k}=h\left(x_{k}\right)+v_{k} \tag{24}\]0  
where \(K_{k}\) is the Kalman gain, \(P_{k}\) is the covariance of the error of the estimation and \(I\) is the identity matrix. In the linearized KF, there is a limitation that the nominal state \(\,\overline{x}\,\) must be set prior the execution. EKF then assumes that \(\,\overline{x}\,\) equals \(\,\hat{x}\,\) in the bootstrapping approach to the state equation. Thus, Equations (27) and (28) are subsequently changed to  
\[y_{k}=h\left(x_{k}\right)+v_{k} \tag{24}\]1  
\[y_{k}=h\left(x_{k}\right)+v_{k} \tag{24}\]2  
In Equation (31), where \(\,\overline{x}\,\) equals \(\,\hat{x}\,\), Equation (31) can be rearranged to produce  
\[y_{k}=h\left(x_{k}\right)+v_{k} \tag{24}\]3  
substitute Equations (34) and (35) into Equation (36), we obtain Equation (37). As a result, EKF equation can be represented by applying Equations (31), (32) and (37) which is given by  
\[y_{k}=h\left(x_{k}\right)+v_{k} \tag{24}\]4  
In the initial state where \(k=0,\,\overline{x}\,\) is predetermined using its means and \(Q_{k}\) and \(R_{k}\) are relevant to \(\,\overline{x}\,\). In the execution mode, the measurement update (output state) adjusts the projected estimate based on an actual measurement at that time. It should be noted that EKF applies Equations (30), (31) and (37) to update the prediction mode after the state is changed periodically and the Kalman gain \(K_{k}\) determines how the observer responds to the difference between its estimated output and the noisy measurement. To simplify this, we can present EKF as the system block diagram shown in \[y_{k}=h\left(x_{k}\right)+v_{k} \tag{24}\]5