*Proceeding Paper* **Real-Time Vehicle Lateral Dynamics Estimation Using State Observer and Adaptive Filter †**

**Malik Kamal Mazhar \*, Muhammad Jawad Khan, Karam Dad Kallu and Yasar Ayaz**

School of Mechanical & Manufacturing Engineering (SMME), National University of Sciences & Technology, Islamabad 44000, Pakistan; jawad.khan@smme.nust.edu.pk (M.J.K.);

karamdad.kallu@smme.nust.edu.pk (K.D.K.); yasar@smme.nust.edu.pk (Y.A.)

**\*** Correspondence: kamalmazhar.pg@smme.edu.pk

† Presented at the Third International Conference on Advances in Mechanical Engineering 2023 (ICAME-23), Islamabad, Pakistan, 24 August 2023.

**Abstract:** Accurate state estimation of a vehicle is essential for ensuring the effective operation of stability control systems, particularly in dynamic road conditions. The side-slip angle serves as a crucial parameter for vehicle handling and safety control. However, the commercially available sensors for measuring side-slip angle are often expensive, prompting the utilization of estimation methods that rely on vehicle dynamics and the available sensor measurements. This paper introduces a novel observer for side-slip angles that employs a bicycle model and directly incorporates the lateral accelerometer signal through roll angle estimation. Roll angle estimates are obtained using novel complementary filters (NCF). Complementary filter tuning parameters are adjusted automatically using the recursive least square estimation technique. The estimation performance of the mentioned algorithms is verified using standard maneuvers through CarSim®.

**Keywords:** attitude estimation; non-linear complementary filter; sensor fusion; lateral acceleration compensation; roll angle; side-slip angle

## **1. Introduction**

Accurate estimation of sideslip angles is crucial for effective control of the vehicle's steering stability [1,2]. The measurement of the side-slip angle can be accomplished through direct or indirect means, such as utilizing GPS or optical sensors. Nevertheless, the measurements obtained through these methods exhibit high sensitivity to changes in the surrounding environment and weather conditions. As a consequence, the reliability of such measurements is considerably diminished. Moreover, this reliance on indirect measurement techniques introduces additional costs to the overall system.

In order to address this challenge, several research endeavors have been undertaken to explore feasible strategies for indirect estimation of the side-slip angle [3–7].

Fukada [4] approached entails limitations regarding vehicle dynamics due to the non-linear region characteristics of tires in maneuvers like J-turns. Farrelly and P. Wellstead developed an observer utilizing the kinematic model, but they did not account for the influence of accelerometer errors and road disturbances on the roll and pitch angles [8]. H. Lee proposed a simple bicycle-model-based lateral velocity observer but it neglected uncertainties related to accelerometers [9].

The paper comprises the following components. In Section 2, mathematical modeling is discussed. In Section 3, a roll angle estimation method is introduced, which dynamically determines the gain parameters, eliminating the necessity for manual tuning of the filter and a novel side-slip angle observer is proposed using an altered bicycle model. The simulation results under various conditions and steer inputs are discussed in Section 4. Section 5 of the paper provides a summary that serves as the concluding section.

**Citation:** Kamal Mazhar, M.; Khan, M.J.; Kallu, K.D.; Ayaz, Y. Real-Time Vehicle Lateral Dynamics Estimation Using State Observer and Adaptive Filter. *Eng. Proc.* **2023**, *45*, 27. https://doi.org/10.3390/ engproc2023045027

Academic Editors: Mohammad Javed Hyder, Muhammad Mahabat Khan, Muhammad Irfan and Manzar Masud

Published: 12 September 2023

#### **2. Mathematical Modeling**

The bicycle model shown in Figure 1 is commonly used to describe the lateral motion of a vehicle [10]. It is a simplified linearized model that assumes a constant longitudinal velocity *vx* and symmetrical lateral tire cornering stiffness of *Cf* and *Cr*. *lf* and *lr* are the distances from the wheel center to the front and rear. *m* is the mass. *Iz* is the yaw moment of inertia. *u* = *δ<sup>f</sup>* is the steer angle input.*ay* is the lateral acceleration and *r* is the yaw rate.

**Figure 1.** Bicycle model for vehicles.

The system can be represented by the state space matrix formulation as follows:

$$A = \begin{bmatrix} -\frac{2\left(\mathcal{C}\_f + \mathcal{C}\_r\right)}{m\upsilon\_x} & \frac{2\left(\mathcal{C}\_r l\_r - \mathcal{C}\_f l\_f\right)}{m\upsilon\_x^2} - 1\\ \frac{2\left(\mathcal{C}\_r l\_r - \mathcal{C}\_f l\_f\right)}{I\_z} & -\frac{2\left(\mathcal{C}\_f l\_f^2 + \mathcal{C}\_r l\_r^2\right)}{I\_z\upsilon\_x} \end{bmatrix} \tag{1}$$

$$\mathbf{B} = \begin{bmatrix} \frac{2C\_f}{\text{m} \mathbf{v}\_x} \\ \frac{2C\_f I\_f}{I\_x} \end{bmatrix} \tag{2}$$

$$\mathbf{C} = \begin{bmatrix} 0 & 1 \\ -\frac{2\left(\mathbf{C}\_f + \mathbf{C}\_r\right)}{m} & -\frac{2\left(\mathbf{C}\_f \mathbf{I}\_f - \mathbf{C}\_r \mathbf{I}\_r\right)}{m v\_x} \end{bmatrix} \tag{3}$$

$$D = \begin{bmatrix} 0 \\ \frac{2\mathbf{C}\_f}{m} \end{bmatrix}$$

$$u = \delta\_f \\ au \, dy = \begin{bmatrix} r \\ a\_y \end{bmatrix} \tag{4}$$

## **3. Roll Angle and Side-Slip Angle Estimation**

*3.1. Adaptive Complementary Filter for Roll Angle of Ground Vehicle*

The process of obtaining the roll angle estimate involves blending two initial estimates, each applicable within different operational ranges. During this blending procedure, the weights are chosen to consistently prioritize the more accurate estimate. Figure 2 depicts the block diagram of a second-order complementary filter for real-time implementation. It is important to ensure that the combined output of both filters results in a unity gain. As a result, the low-pass filter can be represented by the following equation of *G*2(*s*):

$$G\_2(\mathbf{s}) = \frac{\mathbf{s}^2}{\mathbf{s}^2 + a\mathbf{s} + b} \tag{5}$$

Similarly, the equation for high pass filter is written as

$$1 - G\_2(s) = \frac{as + b}{s^2 + as + b} \tag{6}$$

Variables *a* and *b* are deciding factors for this estimate, which rely on operating conditions for different maneuvers.

**Figure 2.** Adaptive complementary filter estimation block diagram.

### *3.2. Side-Slip Angle Estimation*

The state estimate equation can be written as

$$
\hat{\mathfrak{X}} = A\hat{\mathfrak{x}} + Bu + L(y - \mathcal{C}\hat{\mathfrak{x}}) \tag{7}
$$

where *A*, *B* and *C* matrices are state space model parameters. The estimation error, *e*, can be expressed as Equation (8).

$$
\mathbf{e} = \mathbf{x} - \hat{\mathbf{x}},
\
\dot{\mathbf{e}} = (A - LC)\mathbf{e} = \hat{A}\mathbf{e} \tag{8}
$$

The observer gain matrix *L*, which can be determined using the pole placement method, plays a crucial role in achieving this convergence.

#### **4. Experiment and Results**

The validation process involved conducting multiple standardized tests, including step steer and double lane change maneuvers, and comparing the results obtained from our analytical model with those generated by CarSim®.

Figure 3a shows the estimation of roll angles using NCF for the step input. RMSE for roll angles for the step input is 0.0030 deg. Similarly, Figure 3b shows the results of the DLC maneuver and the RMSE error for the roll angle is observed as 0.0022 deg. Once the roll angle is estimated, we used the lateral acceleration equation to obtain the side-slip angle estimate using the Luenberger observer. The step steer input was fed to estimate the side-slip angle in Figure 4a and the RMSE for step input estimate is 6.7881 × <sup>10</sup><sup>−</sup>5. We further investigated the algorithm efficacy by using the DLC input as seen in Figure 4b, where an RMSE error of 5.2537 × <sup>10</sup>−<sup>5</sup> deg can be observed.

**Figure 3.** Roll angle estimate for step steer (**a**) and DLC (**b**).

**Figure 4.** Side-slip angle estimate for step steer (**a**) and DLC (**b**).

#### **5. Conclusions**

This research paper presents an innovative method for directly utilizing the lateral accelerometer signal to estimate the side-slip angle. In order to mitigate the influence of gravity-induced bias on the lateral accelerometer signal, we propose a vehicle roll angle estimator. This method offers a valuable contribution to the field and demonstrates promising potential for application. Observer performance is verified through CarSim® using different tests conducted under diverse road conditions and steering inputs. Incorporation of a lateral acceleration compensator improved the estimation results for the side-slip angle.

**Author Contributions:** Conceptualization, M.K.M. and M.J.K.; supervision, Y.A.; review and editing, M.K.M. and K.D.K. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Not applicable.

**Conflicts of Interest:** The authors affirm that the study was conducted without any commercial or financial affiliations that could be interpreted as a potential conflict of interest.

#### **References**

