Vehicle Yaw Rate Estimation Using a Virtual Sensor

Road vehicle yaw stability control systems like electronic stability program (ESP) are important active safety systems used for maintaining lateral stability of the vehicle. Vehicle yaw rate is the key parameter that needs to be known by a yaw stability control system. In this paper, yaw rate is estimated using a virtual sensor which contains kinematic relations and a velocity-scheduled Kalman filter. Kinematic estimation is carried out using wheel speeds, dynamic tire radius, and front wheel steering angle. In addition, a velocity-scheduled Kalman filter utilizing the linearized single-track model of the road vehicle is used in the dynamic estimation part of the virtual sensor. The designed virtual sensor is successfully tested offline using a validated, high degrees of freedom, and high fidelity vehicle model and using hardware-in-the-loop simulations. Moreover, actual road testing is carried out and the estimated yaw rate from the virtual sensor is compared with the actual yaw rate obtained from the commercial yaw rate sensor to demonstrate the effectiveness of the virtual yaw rate sensor in practical use.


Introduction
Lateral stability of a road vehicle is very important for the safety of the driver and passengers during extreme lateral maneuvers or during lateral maneuvers under adverse environmental conditions like driving on snow or ice, sudden tire pressure loss, or sudden side wind.Vehicle stability control systems called ESP, vehicle dynamics control (VDC), yaw stability control (YSC), and so forth are used to improve the lateral stability of vehicles under such adverse conditions.Yaw stability control systems will become mandatory for new vehicles in Europe after 2011 (see [1]).
Yaw rate is the most vital vehicle variable that needs to be known by a road vehicle stability system.The current stateof-the-art is that yaw rate is measured by yaw rate sensors in the form of microelectromechanical Sensor (MEMS) units.These sensors are commercially available, and they are used in vehicle stability systems, but like every other component inside a road vehicle, their price is a concern for manufacturers who try to lower costs [2,3].Some hard and expensive to measure vehicle variables like yaw rate can be estimated using other on-vehicle sensors such as lateral accelerometers and wheel speed sensors.There have been several attempts to estimate yaw rate using lateral accelerometers [2][3][4][5][6].In [2], the vehicle yaw rate estimation was performed using two lateral accelerometers that are placed at the right and left sides of the vehicle.Yaw rate is estimated using the signals obtained from these accelerometers.Following that, a Kalman filter-based estimation was utilized based on the initial yaw rate estimation and lateral acceleration measurements in order to reduce the effects of noise on the estimation.In [3], two lateral accelerometers were installed on the longitudinal centerline of the vehicle as front and rear accelerometers to overcome the effects of tilting on the yaw rate estimation, and a state observer which uses lateral acceleration and steering angle measurements International Journal of Vehicular Technology was designed.In [4], yaw rate estimation depends on wheel speed and lateral acceleration measurements, separately.These initial yaw rate calculations were combined according to their confidence levels, and the preliminary estimation of yaw rate was used in the nonlinear observer which generates the final yaw rate estimation.In [5], a Kalman filter-based soft sensor method was introduced which uses lateral acceleration and steering angle measurements.In [5], the Kalman filter was designed based on a two degrees of freedom vehicle model and no vehicle kinematics-based estimation was used.In [6], a direct yaw rate estimation method was proposed based on a set-membership framework without the need of vehicle model using experimentally obtained lateral acceleration, longitudinal velocity, and steering angle measurements.In this paper, in contrast to the commonly used lateral accelerometers in the previous work, the antilock braking system (ABS) wheel speed sensors, which are available in almost every vehicle, are used along with the steering wheel position sensor to estimate the yaw rate.This alternative approach is cheaper than using lateral accelerometers.
Theoretically, the yaw rate can be estimated using wheel speeds, front wheel steering angle, and some vehicle parameters using kinematic relations between these variables.This approach is called kinematic estimation.Unfortunately, ABS wheel speed signals may sometimes be too noisy to obtain satisfactory yaw rate estimates [7,8].For this reason, dynamic estimation is used in addition to kinematic estimation for filtering this sensor noise.In the dynamic estimation part, different types of observers can be used.Observers including Kalman filters for filtering sensor noise have been used in estimation of vehicle parameters [2][3][4][5][6][8][9][10][11][12][13][14][15] before, and this approach is also used in this paper.
The contributions of this work are the introduction of a novel wheel speed-based kinematic estimation algorithm, its combined use with a Kalman filter-based dynamic estimation approach to take care of wheel speed sensor noise, the use of a hardware-in-the-loop setup to develop the estimation algorithms in a lab environment, and road test results to demonstrate the effectiveness of the proposed method in the real world.This paper concentrates on yaw rate estimation using a virtual sensor based on kinematic and dynamic estimation.In the kinematic estimation part of the virtual sensor design, kinematic relations between yaw rate and wheels speeds are considered.The double-track (four wheels) geometry of the vehicle chassis is used in the kinematic computations for yaw rate.Then, kinematic yaw rate estimation is improved by an algorithm which considers wheel longitudinal slips during braking and sudden accelerating (skidding).In the dynamic estimation part, used here for attenuating possible wheel speed sensor noise, a speedscheduled Kalman filter is introduced and used.The gain matrix of the Kalman filter is scheduled with longitudinal vehicle velocity.The designed virtual sensor for yaw rate is tested first in offline computer simulations, then in hardwarein-the-loop simulations, finally in actual road tests.In actual road tests, the virtual sensor runs in parallel with the commercial yaw rate sensor such that their outputs could be compared directly.The virtual yaw rate sensor is connected to the ESP electronic control unit instead of the commercial  sensor in the tests.It should be noted that instead of replacing the actual sensor, the virtual yaw rate sensor algorithm can also be used for diagnostic purposes to detect faulty operation of the commercial sensor.
The organization of the rest of the paper is as follows.In Section 2 and its subsections, the kinematic and dynamic virtual sensor design is explained.Simulation results obtained using the virtual sensor are given in Section 3. The hardwarein-the-loop (HiL) simulator used is introduced in Section 4 where real-time simulation results obtained using that HiL simulator are also presented.The actual road test results are given in Section 5, and the paper ends with conclusions.

Virtual Sensor Design
Virtual sensor design is realized by combining the kinematic estimation method with the dynamic estimation method.Figure 1 shows the main structure of the virtual sensor.Firstly, vehicle yaw rate is estimated kinematically using wheel angular speeds, front wheel steering angle, and some vehicle parameters shown in Figure 2.After that, this kinematically estimated yaw rate is used in the dynamic estimation part based on a Kalman filter for attenuating possible wheel speed sensor noise.Note that a double-track (four wheels) dynamic vehicle model is not used or needed in the work presented in this paper as the virtual sensor that uses the geometry in Figure 2 is kinematic in nature and does not require a dynamic model.

Kinematic Estimation.
Basically, yaw rate is estimated for the vehicle geometry seen in Figure 2 from rear wheel angular speeds by using (1) and from the front wheel angular speeds by using (2) [10][11][12].Consider the following: where  FL ,  FR ,  RL , and  RR are the angular speeds of the front left, the front right, the rear left and the rear right wheels, respectively.Here,  kinematic denotes the kinematically estimated yaw rate.Previous studies show that the longitudinal slip of the wheels affects the yaw rate estimation [7].When considering a front wheel drive vehicle, at sudden acceleration and braking conditions of front wheels and at braking conditions of rear wheels, longitudinal slip () occurs at the relevant wheels and this affects the yaw rate estimation adversely.Kinematic estimation in ( 1) and (2) should therefore be modified to take this slip into account.
Slip ratio is defined as during braking and as during driving [16].
ref is the reference vehicle speed which is obtained from the vehicle controller area network (CAN) bus so that the longitudinal speeds of the wheels can be calculated as The vehicle speed  ref can be read from the CAN bus in ABS equipped vehicles without any difficulties.The vehicle speed reading from the wheel speed sensors is slightly smaller than the true speed of the vehicle as determined by a GPS sensor.This slight difference did not create any problems in the yaw rate estimation.This paper does not deal with vehicle state estimation.It is assumed that the reference vehicle speed (the speed at vehicle center of gravity) can be obtained directly.
Vehicle yaw rate can be calculated kinematically based on rear wheels in the case of braking using the slip definition given by ( 3) and the longitudinal speeds of the rear wheels given by ( 7) and ( 8) as follows: Yaw rate can also be calculated kinematically based on front wheels in the case of braking using the slip definition given by ( 3) and the longitudinal speeds of the front wheels given by ( 5) and ( 6) as follows: and lastly it can be calculated kinematically based on front wheels in the case of vehicle acceleration using the slip definition given by ( 4) and the longitudinal speeds of the front wheels ( 5) and ( 6) as follows: where  is the current value of time, Δ is the calculation time interval, and the subscript of  shows the th wheel of the vehicle.The derivation details of ( 9)-( 11) are given in the appendix.Slip ratio of each wheel is computed utilizing slip ratio definitions ((3) and ( 4)) and longitudinal speeds of wheels (( 5)-( 8)).These slip ratio formulae are given in the following.
When braking occurs at the rear wheels, When braking occurs at the front wheels When acceleration occurs at the front wheels, The basic kinematical equations ((1) and ( 2)) are utilized together with improved kinematical estimation equations (( 9)-( 11)) in forming a general kinematic estimation algorithm in the Matlab environment.This general kinematic algorithm is embedded into the kinematic estimation part of the virtual yaw rate sensor.
Figure 3 shows the flowchart of the rear wheel kinematic estimation algorithm, and Figure 4 shows the flowchart of the front wheel kinematic estimation algorithm.In these flowcharts,  represents the kinematically estimated yaw rate.
It should be noted that the front wheel and rear wheel angular speed-based calculations lead to similar results with small differences.Since we are using a front wheel drive vehicle, rear wheel angular speed-based estimation is usually better than front wheel angular speed based estimation.Our overall kinematic estimation algorithm combines information from both rear and front wheels to estimate yaw rate in order to make use of both of these available data.This combination was realized with the addition of the two estimations (from rear and front) with the proportion of 2/3 times the estimated yaw rate from the rear wheels plus 1/3 times the estimated yaw rate from the front wheels.This ratio was chosen heuristically based on an extensive trial and error procedure applied to simulation and experimental results.

Dynamic Estimation.
The Kalman filter is an optimal observer that estimates the system states which are hard to measure while filtering the measurement noise [17].Note that the Kalman filter-based dynamic virtual sensor is used to filter wheel speed sensor noise here.The Kalman filter used here is a standard implementation and requires knowledge of the system state space model, system output, system input, measurement noise covariance, and process noise covariance.The measurement noise covariance   and the process noise covariance   are assumed to be zero mean Gaussian white noise here.
The system model used in the Kalman filter is the singletrack vehicle model which is the simplest vehicle model that accurately captures lateral dynamics up to 0.3-0.4g of lateral acceleration.In the single-track vehicle model, two tires on the same axle are lumped together, and this results in one front and one rear tire set. Figure 5  basic parameters of the single-track model.In designing the dynamic part of the virtual sensor based on the Kalman filter, the linear single-track vehicle model is used.

International Journal of Vehicular Technology
The linearized model of the single-track vehicle is given by where = [ ]  ,  is the yaw rate,  is the side slip angle, V is the vehicle speed, and  is the tire-road friction coefficient [18].All variables in the above and following equations are explained in Table 1, and the numerical values used in simulations are given in parentheses.
System state space equations and the Kalman filter equations including prediction and correction equations are where the system matrices , , and  are the linear singletrack vehicle model given in (18),  is the process noise,  is the measurement noise,  is the Kalman filter gain matrix, x is the estimated state vector, and  is the solution of the Riccati equation.(V) and (V) are system and input coupling matrices, varying with the vehicle speed.Therefore, the Kalman gain matrix varies with vehicle speed, making the estimation applicable in a real vehicle implementation where the measurable vehicle speed is not constant.Before designing a speed-scheduled Kalman Filter, the observability of the system is checked and is determined to be state observable for all possible vehicle speed values.The determination of the   and   covariances are the most important and intuitive part of the Kalman filter design.We already know that there is a trade-off between good estimation and good noise attenuation in accordance with the selection of covariance matrices.From this perspective, the measurement (or sensor) noise covariance matrix is obtained after determining the sensor noise variance using the available experimental data.After obtaining the measurement noise covariance, the process noise covariance is tuned to get a satisfactory state prediction.

Simulation Results
The virtual yaw rate sensor is tested using CarMaker software before performing actual road tests.The CarMaker vehicle model is a highly realistic one that incorporates engine dynamics, tire dynamics, steering dynamics, suspension dynamics, vehicle sprung body dynamics, longitudinal and lateral dynamics, a driver model, and road and environment models [19].The CarMaker user interface is shown in Figure 6.
The proposed virtual yaw rate sensor algorithm is tested using standard maneuvers such as lane change maneuver, eight test maneuver, and the slalom maneuver.In the simulations, the medium sedan vehicle parameters given in Table 1 are used.
Figure 7 shows the results of the lane change test maneuver.Figure 8 shows the results of the eight test maneuver, and Figure 9 shows the results of the slalom test maneuver.These simulation results demonstrate the successful performance of the proposed virtual yaw rate sensor algorithm in offline simulations with different handling maneuvers as the estimated (virtual sensor output) and actual (simulated output) yaw rates are very close to each other.The estimation error, that is, the absolute value of the difference between the estimated and simulated or between the estimated and experimental yaw rate, is part of every simulation or experimental result presented in this paper.The low estimation errors in these plots demonstrate the effectiveness of the virtual yaw rate sensor proposed in this paper.
In the slalom maneuver in Figure 9, the noise rejection capability of the Kalman filter is tested by injecting Gaussian white noise to the wheel speed data before the kinematic estimation.Figure 9 also displays the output of the kinematic virtual yaw rate sensor  kinematic which illustrates the importance of additional dynamic filtering in the presence of a large amount of wheel speed sensor noise.In Figure 10, the effect of model uncertainty on virtual sensor performance is tested by using a 0.7 Hz frequency, 90 degree amplitude sinusoidal steering wheel angle input.The yaw rate estimation error is also displayed in the same plot.The robustness of the virtual yaw rate sensor to model uncertainty is tested with two different vehicle masses and tire road friction coefficient uncertainty combinations, the top plot corresponding to the case of no uncertainty.The results show that the virtual yaw rate sensor is quite robust for the model uncertainty considered.
In the simulation yaw rate comparison figures, the green signal shows the simulated yaw rate (model yaw rate output) from CarMaker.The red (dashed) signal shows the estimated yaw rate using the virtual yaw rate sensor.

Hardware-in-the-Loop Vehicle Simulator
The use of a hardware-in-the-loop (HiL) simulator is a safe and more capable alternative to real road testing and can be used to detect and correct fatal, expensive errors and vital mistakes before the real road test phase.The developed vehicle models and the virtual sensor are simulated by using the dSPACE DS 1005 and DS 2210 systems.DS 1005 is the main processor, and DS 2210 is an I/O board with CAN communication feature.The vehicle models and the virtual sensor model are developed in the Simulink environment.Figure 11 shows the virtual sensor block diagram and CarMaker software Simulink blocks.Then, the models are installed on the DS 1005 board by using the Math-Works Real-Time Workshop and the dSPACE Real-Time Interface (RTI).CarMaker HiL software is used to run the CarMaker vehicle model in real time.Figure 12 shows the HiL simulator used.This vehicle simulator has a steering wheel, brake, and traction pedal system.The important vehicle parameters were observed on the large animation screens in real-time.While the vehicle model was simulated on the dSPACE DS 1005 board, the virtual sensor algorithm was executed in real-time on a dSPACE MicroAutoBox general purpose electronic control unit.The communication between the soft vehicle in the simulator and the virtual sensor in the dSPACE MicroAutoBox was provided via the CAN serial interface.Thus, a realistic simulation with actual hardware was performed by using the vehicle simulator before a real vehicle road test.
In Figure 13 The HiL simulator was used with an actual driver who is one of the authors.An eight maneuver was carried out by the human driver in the simulations.Before the kinematic estimation part of the virtual sensor, white noise was added to the wheel speed data as sensor noise.The results shown in Figure 14 indicate that the virtual sensor presented here also works successfully on the HiL simulator of the vehicle.

Actual Road Test Results
The designed virtual sensor was connected to the experimental vehicle via the dSPACE MicroAutoBox using CAN communication.The actual yaw rate sensor and the virtual sensor worked together, and real-time data was collected for both sensors to compare the results.The kinematic virtual sensor presented here used a switch based on the presence of braking.This braking condition was determined by either using the braking pedal information (available by the brake switch information on the CAN bus) or by using longitudinal acceleration information (available on the CAN bus for vehicles with ESP).We applied the first approach of using the braking pedal information to realize the kinematic estimation algorithm.
Three exemplary road test results are shown in Figures 15, 16, and 17.The maneuver in Figure 15 is a short slalom maneuver.The driver tried a J-turn-like maneuver in the second test shown in Figure 16.The driver tried a slalom-like maneuver in Figure 17 where the rear left tire pressure was reduced from 2.1 bar to 1.2 bar (almost half of its nominal value).In this way, an unusual driving situation was tested with a deflated tire.The tests were carried out on dry asphalt road ( = 1).Extensive road testing results not presented here were similar in that the estimated (output of virtual yaw rate sensor algorithm) and actual (measured using the commercial yaw rate sensor) were very close to each other.Lateral acceleration values were much larger than the validity range of 0.3-0.4g of the simple linear single-track model characterizing noncritical driving.

Conclusions
In this paper, vehicle yaw rate was estimated by using a virtual sensor that is a combination of kinematic estimation and dynamic estimation methods.In the kinematic estimation part, the kinematic relations between the yaw rate and wheel speeds were utilized.Some improvements were realized for kinematic estimation by considering the adverse effects of longitudinal slip of the wheels.Consequently, a general kinematic estimation algorithm was formed.In the dynamic estimation part of the virtual sensor, a speed-scheduled-Kalman filter was used.In this way, large changes in vehicle speed can be handled.Finally, the designed virtual sensor was tested with offline simulations, HiL simulations, and actual road tests, and the results were found to be quite satisfactory.Current virtual sensors for yaw rate estimation are used in the electronic stability control (ESC) system for diagnostic   for use in the estimation algorithm. FR and  FL in (A.15) can be calculated utilizing ( 15) and ( 16) in the paper.Lastly, the kinematic estimation algorithm development using the front wheels under sudden acceleration condition will be derived in the following.
Under sudden acceleration condition, slip ratio of the wheels is defined as   for use in the kinematic estimation algorithm. FR and  FL in (A.20) can be obtained by utilizing ( 16) and ( 17) [11].

Figure 3 :
Figure 3: The flowchart of the rear wheel kinematic estimation algorithm.

Figure 4 :
Figure 4: The flowchart of the front wheel kinematic estimation algorithm.

Figure 5 :
Figure 5: Illustration of single-track vehicle model geometry and variables.
Figure12shows the HiL simulator used.This vehicle simulator has a steering wheel, brake, and traction pedal system.The important vehicle parameters were observed on the large animation screens in real-time.While the vehicle model was simulated on the dSPACE DS 1005 board, the virtual sensor algorithm was executed in real-time on a dSPACE MicroAutoBox general purpose electronic control unit.The communication between the soft vehicle in the simulator and the virtual sensor in the dSPACE MicroAutoBox was provided via the CAN serial interface.Thus, a realistic simulation with actual hardware was performed by using the vehicle simulator before a real vehicle road test.In Figure13, the working principle of the HiL vehicle simulator is illustrated.The vehicle model, road model, environment model, and virtual sensor were first coded in Simulink and converted into real-time C code using the Matlab Real-Time Workshop.The Real-Time Interface (RTI) of dSPACE was used to link and download the generated code into the dSPACE DS 1005 board and the MicroAutoBox.The virtual sensor computations were carried out in the MicroAutoBox which communicates with the DS 1005 board using CAN communication through the DS 2210 board.DS 1005 ran the vehicle simulation and provided wheel speeds and other relevant information to the MicroAutoBox over the CAN bus through the DS 2210 board.Driver inputs were added to the simulation via the dSPACE 2210 I/O board

3 TimeFigure 10 :
Figure 10: Sinusoidal steering input maneuver results with uncertain parameters (yaw rate estimation errors shown in the right three plots).

Figure 11 :
Figure 11: CarMaker vehicle model and virtual sensor Simulink blocks.

Table 1 :
Linear single track vehicle model parameters.