# Estimation of Intelligent Commercial Vehicle Sideslip Angle Based on Steering Torque
## 3 Design of EKF State Observer  
The Kalman filter algorithm has a good effect on the state estimation of linear systems, but the actual system often has different degrees of nonlinearity, so it cannot achieve the optimal estimation effect when dealing with problems in nonlinear scenarios. For the state estimation problem of a nonlinear system, the EKF algorithm is generally used. The nonlinear system is expanded by Taylor at the best estimation point, only the first-order system part is retained for linearization, and then the recursive operation is realized by using the classical KF formula. In this section, a sideslip angle estimation method is proposed, which is based on steering torque instead of steering angle. The 2-DOF model and EHPS model are used for observer design, and the nonlinear state space equation is expressed as follows:  
\[\left\{ \begin{array}{l}\dot{x}(t)=f(x(t),u(t))+\omega(t)\\ y(t)=h(x(t))+v(t)\end{array} \right. \tag{24}\]  
where \(x\) is the state vector, \(x=\left[ \begin{array}{cc}\theta_{s}&\theta_{s}&\dot{\delta}&\delta&\gamma& \beta\end{array} \right]^{T}\); \(u\) is the control vector, \(u=\delta\); \(y\) is the measurement output, \(y=\left[ \begin{array}{cc}\dot{\theta}_{s}&\dot{\delta}&\delta&a_{y}&\gamma \end{array} \right]^{T}\); \(\omega\) and \(v\) are the Gaussian white noise; \(Q\) and \(R\) are defined as the system noise \(\omega\) covariance matrix and the measurement noise \(v\) covariance matrix, respectively. According to Equations (1)-(12) of the EHPS model and 2-DOF model, the state equations and measurement equations can be expressed as follows. Figure 5: The resolved Bode diagrams of two methods: (**a**) The Bode diagram of steering wheel angle and sideslip angle; (**b**) The Bode diagram of steering wheel torque and sideslip angle. State equations:  
\[\left\{ \begin{array}{l}\ddot{\theta}_{s}=\frac{1}{f_{s}}T_{i}-\frac{B_{s}}{f_{s} }\dot{\theta}_{s}-\frac{K_{t}}{f_{s}}\theta_{s}+\frac{K_{r}\cdot x_{p}}{f_{s} \cdot r}\\ \dot{\theta}_{s}=\dot{\theta}_{s}\\ \ddot{\delta}=\left[\frac{A_{p}p_{f}(q)+R_{r}}{M_{n}}\theta_{s}-\frac{B_{n}}{M _{n}}\dot{\delta}-\frac{\left[K_{r}+K_{r}R_{r}\left(A_{p}p_{f}(q)+R_{r}\right) \right]r}{M_{n}}\delta\\ \dot{\delta}=\dot{\delta}\\ \dot{\gamma}=\frac{I_{r}f_{r}-I_{r}F_{yr}}{I_{r}}\\ \dot{\beta}=\frac{F_{yr}+F_{yr}}{m}-\gamma\end{array} \right. \tag{25}\]  
Measurement equations:  
\[\left\{ \begin{array}{l}\dot{\theta}_{s}=\dot{\theta}_{s}\\ \theta_{s}=\theta_{s}\\ \dot{\delta}=\dot{\delta}\\ a_{y}=\frac{F_{yr}+F_{yr}}{m}-\gamma\\ \gamma=\gamma\end{array} \right. \tag{26}\]  
where \(F_{yr}\) and \(F_{yr}\) can be obtained from the magic formula model, which can be expressed as follows:  
\[\left\{ \begin{array}{l}F_{yr}=D_{f}\sin\Bigl{(}C_{f}\arctan\Bigl{(}B_{f} \alpha_{f}-E_{f}\Bigl{(}B_{f}\alpha_{f}-\arctan\Bigl{(}B_{f}\alpha_{f}\Bigr{)} \Bigr{)}\Bigr{)}\Bigr{)}\\ F_{yr}=D_{r}\sin\Bigl{(}C_{r}\arctan\bigl{(}B_{r}\alpha_{r}-E_{r}\bigl{(}B_{ r}\alpha_{r}-\arctan\bigl{(}B_{r}\alpha_{r}\bigr{)}\bigr{)}\Bigr{)}\Bigr{)}\end{array} \right. \tag{27}\]  
where \(B_{f}\)\(\sim\)\(E_{f}\) are the front wheel side force coefficient, and \(B_{r}\)\(\sim\)\(E_{r}\) are the rear wheel side force coefficient, which can be obtained in Table 2.  
By obtaining the Jacobian matrix from the state equations and the measurement equations and linearizing the model, the following expressions can be obtained. \[F(t)=\left[ \begin{array}{cccccc}-\frac{B_{t}}{f_{s}}&-\frac{B_{t}}{f_{s}} \ddot{\theta}_{s}&0&0&0&0\\ 1&\ddot{\theta}_{s}&0&0&0&0\\ 0&\frac{\left[A_{p}p_{f}(q)+R_{r}\right]K_{t}}{M_{n}}\frac{B_{r}}{M_{n}}\frac{ B_{r}}{M_{n}}\ddot{\delta}+\frac{\left[K_{r}+K_{r}R_{r}\left(A_{p}p_{f}(q)+R_{r} \right)\right]r}{M_{n}}&0&0\\ 0&0&1&\ddot{\delta}&0&0\\ 0&0&0&0&0&0\\ 0&0&0&0&-1&0\end{array} \right] \tag{28}\]  
\[H(t)=\left[ \begin{array}{cccccc}1&\ddot{\theta}_{s}&0&0&0&0\\ 0&1&0&0&0&0\\ 0&0&1&\ddot{\delta}&0&0\\ 0&0&0&1&0&0\\ 0&0&0&0&-1&0\\ 0&0&0&0&1&0\end{array}