Estimation algorithm for vehicle state estimation using ant lion optimization algorithm

In order to solve the problem of vehicle state estimation, an unscented Kalman filter state parameter estimator based on the Ant lion algorithm is proposed. Aiming at the uncertainty of the noise covariance matrix in the unscented Kalman filter (UKF) process, the Ant lion optimization algorithm (ALO) is used to optimize it. Based on the purpose, a 3-DOF nonlinear vehicle estimation model with Magic formula tire model was established firstly. Then the slalom road operating condition was simulated. The simulation results show that the estimated values of the key state variables are in better agreement with the virtual test values indicating the proposed algorithm having a good estimation performance. And also, compared with the estimation results of the UKF algorithm, the maximum error and the root mean square error of the estimation algorithm proposed in this paper are both smaller than the estimated value of the UKF algorithm. The results of a real-vehicle experiment demonstrate that the proposed method can be used effectively and accurately for solving the vehicle-state estimation problem. The study can provide precise status information for vehicle stability control under extreme conditions.


Introduction
With the continuous development of electronic control systems for vehicle chassis stability, the measurement and acquisition of vehicle driving status information is particularly important. The active safety performance of the vehicle can be improved by recognizing the dynamic state and parameters during the movement process and to adjust the corresponding control strategy.
Nowadays, the development of electronic technology and control technology makes more and more electronic control devices applied to automobiles, which greatly improves the active safety of automobiles. State estimation during vehicle driving is one of the key technologies of the active chassis control system and the on-board fault diagnosis system. Some important parameters of the vehicle are difficult to directly measure or the sensors used for measurement are costly, such as longitudinal speed, yaw rate, and side slip angle of the center of mass. The vehicle operating state required in the vehicle stability control cannot be directly measured by sensors. So, how to use the measured vehicle state to infer the difficult-to-measure vehicle states or road states is a research hot issue in vehicle stability control in recent years.
In order to minimize the incidence of automobile accidents and reduce the damage caused by them, major manufacturers and related scientific research institutions have conducted in-depth research on automobile active safety control for a long time, and have developed control systems covering various technologies. Among them, automobile yaw stability control is a control technology developed on the basis of ABS, which can realize automobile automatic safety control and effectively improve driving stability and safety under dynamic conditions such as automobile driving, braking, and steering. These systems use the real-time state of the vehicle during driving, braking, and steering (such as vehicle yaw rate, center of mass slip angle, etc.) and the road surface information of the vehicle (such as road adhesion coefficient) as a reference, and perform ECU calculation and processing. The latter information is interconnected with the engine and drive train through the CAN bus to achieve the purpose of active safety control. For automotive control systems, although state estimation is required to ensure the reliability of the control system and the parameters being detailed and accurate but not all vehicle control systems require all estimated parameters. For automobiles, the parameters that can be obtained by vehicle motion state estimation strongly depend on three aspects. That is, these aspects include the requirements of automobile-related control systems for automobile motion and road information parameters, the on-board sensors, and the state estimation algorithms.
The problem of vehicle state estimation has been widely studied. A brief review is presented in what follows.
Li et al. 1 introduced a reliable fusion method for estimating vehicle sideslip angle. In order to improve handling stability performance and active safety of a ground vehicle, Jin et al. 2 presented a survey in different aspects of estimation strategies and methodologies. Wang et al. 3 proposed a novel fuzzy adaptive robust cubature Kalman filter to estimate sideslip angle and tire cornering stiffness with only in-vehicle sensors. Boada et al. 4 provided a state-parameter observer using measurements from sensors by establishing a vertical complete model based on the dual Kalman filter. Imsland et al. 5 studied the unknown input observers which could be used to inspire the design of an observer for estimation of vehicle lateral velocity for nonlinear systems. Rezaeian et al. 6 developed an estimation structure which could effectively handle the additive biases to estimate vehicle velocities in longitudinal and lateral directions. Ahmed and Tahir 7 presented a novel and low-cost MEMS inertial measurement unit (IMU) sensor, comprising a tri-axial gyroscope and a tri-axial accelerometer Kalman filter for estimation of a vehicle's attitude. Cheng et al. 8 proposed a novel adaptive square-root cubature Kalman filter for solving the state estimation problem of vehicle side-slip angle but measuring it directly. Xie et al. 9 proposed a novel prediction method by combining physics-based and maneuver-based approaches for solving vehicle trajectory prediction problem. Cui et al. 10 proposed a novel Sigma-points update method to enhance the robustness of cubature Kalman filter (CKF). Huang et al. 11 according to different error models, given an optimal estimation method which was used to improve the accuracy of navigation information calculated by sensors. Hashemi et al. 12 presented a novel corner-based estimator which did not require knowledge of the road friction and was robust to model uncertainties for tire force and velocity estimation individually. In order to estimate lateral vehicle state and tire model, Naets et al. 13 proposed a two-stage approach which could provide reliable results in variable driving conditions for the problem of vehicle state estimation. In order to save limited communication resource, Zhang et al. 14 proposed a new intelligent event-triggering mechanism, in which the event triggering threshold was optimized by a Q-learning algorithm. Chen et al. 15 proposed a fusion method which could estimate longitudinal force, lateral vehicle speed, and yaw rate accurately for the 4WID-EVs. In order to study the DoS attack and Deception attack, Ye et al. 16 proposed a novel asynchronous advantage actor-critic (A3C) learning-based event-triggering approach based on a stochastic switched Takagi-Sugeno (T-S) fuzzy system model.
Therefore, aiming at the problems of noise and measurement noise in the traditional unscented Kalman filtering process, in order to improve the estimation accuracy of state parameters, an ALO algorithm is proposed to identify the noise information. And the singular value decomposition method is used to replace the Cholesky decomposition in the UT transform, which effectively avoids the negative determinacy of covariance matrix of the system state. The algorithm takes the steering angle of the front wheel and the lateral acceleration signal as the input to estimate the yaw rate, the slip angle, the longitudinal and lateral vehicle speed, and the longitudinal and lateral acceleration effectively. Finally, the estimation algorithm proposed in the paper is verified based on MATLAB and ADAMS simulation platform.

3-DOF vehicle model
The vehicle state estimation model is established based on a 3-DOF vehicle model. The 3-DOF vehicle model is shown in Figure 1. x'o'y' is the vehicle coordinate system, and the origin of the vehicle coordinate system coincides with the center of mass of the vehicle.
The dynamic equation of the 3-DOF vehicle model is as follows 17 : where, u and v are the longitudinal and the lateral speed; v r is the yaw rate, a x and a y are the longitudinal and lateral acceleration; I z is the moment of inertia around the z axis of the vehicle; a and b are the distances of front and rear axles from the center of gravity; m is the vehicle mass; d is the front steering angle; k 1 and k 2 are the synthesized stiffness of front and rear tire. The side slip angle of the center of mass is: Tire model The ''Magic formula'' tire model can more accurately fit the non-linear characteristics of the tire. The ''Magic formula'' tire model is selected here to describe the dynamic characteristics of the tire. The general expression of the ''Magic formula'' is 18 where w c i is the side slip angle of the tire; y is the tire force or torque. The parameters B, C, D, E, S are related to the tire load, wheel camber angle, and adhesion conditions of road surface. Different tire load, wheel camber angle, and road surface adhesion conditions correspond to different coefficients.

Nonlinear vehicle system containing noise
The state vector of the nonlinear vehicle system is set as x = ½u, v , a x , a y , v r , b T ; the system input is set as u = ½d, a x T , and the observation vector is set as y = ½v r , a y , u T .
The standard form of the state and measurement equation of the above vehicle dynamics model is: where f Á Á Á ð Þ and h Á Á Á ð Þ are nonlinear functions, x k =x k + K k (y k Àŷ k ) and P k = P k À K k P y k, yk K T k contain the process and measurement noise of the state equation.

UKF algorithm
The UKF algorithm flow is as follows 19 : (1) Initialization of the state vector: The mean valuex and the variance P 0 are initialized by determining the process noise covariance matrix Q and the measurement noise covariance matrix R.
(2) Calculation of the Sigma point The Sigma point is calculated to obtain n 3 (2n + 1) Sigma point matrix.
where n is the dimension of the state vector; l = a 2 (n + k) À n is the proportionality coefficient; a which is less than 1 is a positive number that determines the spread of Sigma points near the state mean value; k is a non-negative scale coefficient; k takes a positive integer.
(3) Time updating process: Sigma point transfer is realized according to the state equation of the discretized system. And the predicted mean value and covariance of the state vector according to the transfer result are obtained namely.
where B is the input matrix.
where w c i and w m i are the covariance weight and state vector mean weight respectively.
(4) Measurement updating process: The further prediction of the state vector and its covariance matrix by the state vector prediction average, Kalman gain and covariance matrix iteration obtained from the system measurement values iŝ The iterative output of the state vector can be obtained by repeating the Sigma point calculation, time updating, and measurement updating phases.

ALO-UKF estimation of vehicle states
In the estimation process of the UKF algorithm, process noise covariance matrix Q and the measurement noise covariance matrix R of the system have an important influence on the performance of the estimator. In previous studies, the process noise covariance matrix Q and the measurement noise covariance matrix R are usually set to a constant value or Gaussian white noise with a mean value of 0. And it is assumed that the noise covariance matrix has nothing to do with the state of the nonlinear system. However, in the actual vehicle driving process, due to the complexity of the driving environment and the uncertainty of road information, the process noise covariance matrix and the measurement noise covariance matrix is unknown and constantly changing noise. The measurement noise covariance matrix is related to the measurement accuracy of the sensors. It can be obtained through long-term probability statistics on the sensor measurement data. The process noise covariance matrix is usually difficult to obtain and can be obtained through repeated comparison experiments. However, acquisition method of the mentioned noise is difficult, time-consuming, and is difficult to obtain an optimal noise value. Therefore, the paper proposes an ant lion optimization algorithm to optimize the process noise covariance matrix and the measurement noise covariance matrix in the process of UKF estimation improving the accuracy of vehicle state parameter estimation.
The ALO algorithm was first proposed by Mirjalili in 2015. 20 The ant lion is an insect that preys on ants. The ALO algorithm mainly solves the optimization problem by simulating the predation behavior of the ant lion. 21,22 The specific steps of ALO algorithm are as follows: Firstly, the random position of the ant is chosen as: where A cumsum is the summation operation; T is the maximum iteration number of the optimization process; t is the steps number of the ant walking randomly; r(t) is a random function which is defined as: where A rand is used to generate random numbers in the interval [0 and 1] with uniform distribution. The ant updates its position at each step in the optimization process through equation (19). In order to ensure that the ant randomly walks within the search space in each iteration, the random position of the ant should be normalized as: where X t i is the random walking position of the ith ant; R t i is the random walking position of the ith ant after normalization; a i and b i represent the minimum and maximum values of random walking position of the ith ant respectively; c t i and d t i represent the minimum and maximum values of the walking position of the ith ant in the tth iteration respectively.
At the same time, the random position of the ants is also affected by the traps set by the ant lion, and the relationship of this mutual influence can be described as: where c t and d t represent the minimum and maximum values of the walking positions of all ants at the tth iteration respectively; H t j represents the position of the jth ant lion at the tth iteration.
Then the roulette strategy is used to select ant lion. According to equation (22), it can be seen that the ants will randomly walk around the hyper sphere centered on the selected ant lion.
When an ant falls into a trap set by an ant lion, in order to prevent the ant from escaping, the ant lion will continuously throw sand toward the trap, so that the ant will slide toward the ant lion. In order to simulate this behavior, the hyper sphere where the ant walks randomly will decrease gradually, expressed by the following formula: where I = 10 v (t=T ) is the ratio; v is a constant, which can be determined by the number of current iterations. When the ant slides to the bottom of the trap, it will be captured by the ant lion. In order to simulate the process, it is set that if an ant has a higher fitness than an ant lion the ant is caught by the ant lion. Subsequently, the ant lion updates its current position to the position preying the ant last time to increase the probability of its next predation success.
where L t i is the position of the ith ant at the tth iteration; f 1 (Á) is the fitness function.
The ant lion in the optimal position during each iteration is called an elite ant lion. In the iterative process, each ant will randomly walk around the selected ant lions and elite ant lions. This process can be described as: where R t A is the ant lion selected according to roulette in the tth iteration,; R t E is the random position around the elite ant lion in the tth iteration.
Then process noise covariance matrix Q and the measurement noise covariance matrix R are defined as diagonal positive definite matrices: In order to facilitate the optimization solution, the matrix Q and R are combined into one vector to be optimized: In the optimization process, the vector y represents the position of the ant lion, and each ant lion has its own fitness function. Based on the 3-DOF vehicle state parameter estimation model, the sum of the mean square error between the actual and the estimated measured output value is set as the objective function of the optimization process, namely the fitness function f 1 . The purpose of the objective function is to reduce the estimation error of the state parameter and improve the estimation accuracy: where N is the length of sampling time; Z = (Z 1 , Z 2 ) = (a y , g), Z e, h is the real measured variable at h time;Ẑ e, h is the measured variable outputted by the estimated model at h time. The maximum number of iterations of the optimization process is set as 400. When the fitness value of the elite ant lion does not change for 10 consecutive iterations, the iteration is terminated.

Numerical simulation
To verify the effectiveness of the proposed method and its superiority relative to other methods, we performed simulations using MATLAB. In order to verify the estimation performance of the estimation algorithm, the paper adopts the closed-loop control function in the virtual prototype software ADAMS/Car, and drives the virtual prototype to travel on the slalom test road through the prototype controller. Using the data of the virtual test as the reference value has a very important advantage compared with the real vehicle test, that is, many states that are difficult to measure can be obtained, which can more effectively examine the estimation accuracy of the designed estimator.
Since a car is an extremely complex mechanical system, it is very difficult and laborious to model it according to the real structure of the vehicle. Therefore, according to the research purpose, the structure of the vehicle can be properly abstracted and simplified in the vehicle modeling. For the convenience of analyzing problem, the vehicle body is regarded as a rigid body. Because the structure of the shock absorber is too complicated, the Spring-damper force element provided by ADAMS is used to simulate the action of the shock absorber and the spring.
Firstly, the virtual prototype model of the whole vehicle is divided into subsystems such as front suspension, rear suspension, body, steering system, braking system, front and rear wheels, etc. And the corresponding subsystem models are established respectively. Then the input and output signal device ''Communicator'' for exchanging information between the subsystems and the test bench provided by ADAMS/Car is established.
The slalom test is an important test for evaluating the handling stability of a vehicle. It can evaluate the handling performance of the vehicle under conditions close to sideslip or rollover, comprehensively evaluating the driving stability and riding comfort of the vehicle. It can also be used as a comparison of the handling stability of several vehicles. According to the method of the slalom test, the driver control file (*.dcf) and the driver control data file (*.dcd) are set. The main contents are as follows: In the driver control file (*.dcf)), the machine control mode (Machine_Control) is selected and the driver model is used to automatically control the operation of the vehicle. From the *.dcf file, the steering wheel is used to control the vehicle, so the vehicle trajectory curve is given in the form of x, y coordinates in the driver control data file (*.dcd).
The virtual prototype test model of the whole vehicle was assembled according to the system shown in Figure 2.
According to the built ADAMS/Car vehicle model, the *.dcf file is used to control the movement of the vehicle along the road travel trajectory, and carry out the simulation analysis. The simulation parameters are shown in Table 1.
In order to simulate the vehicle handling response under extreme conditions, the slalom road which is shown in Figure 3 is used. The entire operation lasts 10 s, the sampling time is 0.01 s. And the vehicle traverses the slalom test road with speed of 120 km/h. The proposed algorithm is run on MATLAB 2018a.
where s 0 = L = 2u; s = 3u, u is the longitudinal speed. B is the rotary distance, B = 2.46 m. L is the distance between the stakes.
Observational measurements with noise interference are shown in Figure 4. Figure 5 shows the comparison results of the estimated values between the state variables and the virtual test value for a vehicle passing a slalom road.
From Figure 5, it can be seen that the estimated values of the key state variables are in better agreement with the virtual test values indicating the designed ALO-UKF algorithm having a good estimation performance. Figure 6 shows the comparing result of the estimation effects of the two algorithms (ALO-UKF and UKF) under the condition of tracking a slalom road.
It can be seen from Figure 6 that under the tracking the slalom road condition, the lateral acceleration of the vehicle has reached about 0.78g. At this time, the vehicle has entered a strong nonlinear region, and the ALO-UKF algorithm still maintains a high estimation accuracy level. In addition, the tracking ability of ALO-UKF algorithm is also higher than that of UKF algorithm.     In order to compare the estimation accuracy of the two algorithms quantitatively, the average absolute error (MAE) and root mean square error (RMSE) of the estimation value relative to the virtual test value are given.
From the two error analysis indicators in Table 2, it can be seen more intuitively that the estimation accuracy of the ALO-UKF algorithm proposed in the paper is significantly higher than the UKF algorithm.

Experimental verification
Test purpose. A ground test is carried out to obtain related test data such as the longitudinal speed, the yaw rate, the lateral acceleration, and the side slip angle to verify the feasibility of the simulated results with the purpose of verifying the effectiveness of the proposed ALO-UKF algorithm according to ISO/TR3888-2004.
Test equipment. A gyroscope (Figure 7(a)) is used to collect the yaw rate and lateral acceleration of the vehicle. A GPSSD-20 speed instrument (Figure 7(b)) is used to measure the longitudinal speed of the vehicle. A steering torque/angle tester (Figure 7(c)) is used to measure the steering wheel.  Experimental verification. Figure 8 is the comparison result of the ALO-UKF method estimated value and the actual vehicle test value. From Figure 8, it can be seen that due to the driver's nervousness, the experimental value of the longitudinal speed is larger than the simulation value. When the vehicle is driving in a serpentine turning position of the slalom road condition, with the sudden increase of the steering wheel angle, the lateral acceleration increases significantly and the vehicle is in a non-linear state. From the figure it is also can be seen that the lateral acceleration of the vehicle reaches about 0.92g. At this time, the vehicle has entered a strong nonlinear region. And under the condition, there is a risk of losing stability. However, the proposed algorithm still maintains high estimation accuracy. Due to the errors of the vehicle dynamics model and tire model (The 3-DOF vehicle model ignores the movement of the vehicle in the roll, pitch, and vertical directions, and only considers the movement in the longitudinal, lateral, and yaw directions. And it is assumed that the mechanical characteristics of each tire are the same) as well as the sensor measurement, the estimation error of the yaw rate increases relatively. But the overall estimation effect is better, keeping a good agreement with the actual measured value indicating the better estimation accuracy and robustness of the algorithm proposed in the paper.

Conclusions
We proposed a vehicle state parameter estimator. Firstly, based on a 3-DOF vehicle model and the Magic formula tire model, in view of the unknown and time-  varying characteristics of the system process noise and measurement noise matrix in the traditional estimation algorithm, the ALO algorithm and the UKF algorithm were established. The state parameter estimation model was developed. Then, based on the MATLAB simulation platform, the effectiveness of the proposed estimation algorithm was verified under the slalom condition, and compared with the traditional estimation algorithm. The simulation results indicated that the maximum error and the root mean square error of the estimation algorithm proposed in this paper were both smaller than the estimated value of the UKF algorithm. When the vehicle is in a strong nonlinear state, it can still track the reference value well, which provides a guarantee for vehicle stability control under extreme conditions. The test results show that the estimated values can maintain good consistency with the actual measured values indicating good estimation accuracy. This article only estimates the longitudinal and lateral velocity, longitudinal and lateral acceleration, side slip angle, and yaw rate of the center of mass. And there are many factors that affect the stability of the vehicle, such as tire lateral force and longitudinal force. At the same time, due to experimental conditions, only the accuracy of the longitudinal velocity and lateral acceleration as well as yaw rate estimation can be verified. Therefore, the estimation of tire lateral force, longitudinal force, and other state variables and actual vehicle test will be the key research content in the future.