Modeling a Vehicle Dynamics System

This example shows nonlinear grey-box modeling of vehicle dynamics. Many new vehicle features (like Electronic Stability Programs (ESP), indirect Tire Pressure Monitoring Systems (TPMS), road-tire friction monitoring systems, and so forth) rely on models of the underlying vehicle dynamics. The so-called bicycle vehicle model is a rather simple model structure that is frequently being used in the vehicle dynamics literature. In this example we will start-off with this model structure and try to estimate the longitudinal and the lateral stiffness of a tire. The actual modeling work was originally carried out by Erik Narby in his MSc work at NIRA Dynamics AB, Sweden.

Vehicle Dynamics Modeling

The following figure illustrates the vehicle modeling situation to be considered.

Figure 1: Schematic view of a vehicle dynamics system.

By the use of Newton's law of motion and some basic geometric relationships, the longitudinal velocity v_x(t), the lateral velocity v_y(t) and the yaw rate r(t) measured around the Center Of Gravity (COG) of the vehicle can be described by the following three differential equations:

where subscript x is used to denote that a force F acts in the longitudinal direction and y that it acts in the lateral direction. The abbreviations FL, FR, RL and RR label the tires: Front Left, Front Right, Rear Left and Rear Right, respectively. The first equation describing the longitudinal acceleration also contains an air resistance term that is assumed to be a quadratic function of the longitudinal vehicle velocity v_x(t). In addition, delta(t) (an input) is the steering angle, J a moment of inertia, and a and b the distances from the center of gravity to the front and rear axles, respectively.

Let us assume that the tire forces can be modeled through the following linear approximations:

where C_x and C_y are the longitudinal and lateral tire stiffness, respectively. Here we have assumed that these stiffness parameters are the same for all 4 tires. s_i(t) is the so-called (longitudinal) slip of tire i and alpha_i(t) a tire slip angle. For a front-wheel driven vehicle (as considered here), the slips s_FL(t) and s_FR(t) are derived from the individual wheel speeds (measured) by assuming that the rear wheels do not show any slip (i.e., s_RL(t) = s_RR(t) = 0). Hence the slips are inputs to our model structure. For the front wheels, the tire slip angles alpha_Fj(t) can be approximated by (when v_x(t) > 0)

IDNLGREY Vehicle Model

As a basis for our vehicle identification experiments we first need to create an IDNLGREY model file describing these vehicle equations. Here we rely on C-MEX modeling and create a vehicle_c.c model file, in which NY is set to 3. The state and output update functions of vehicle_c.c, compute_dx and compute_y, are somewhat involved and includes several standard C-defined mathematical functions, like cos(.) and sin(.) as well as pow(.) for computing the power of its argument.

The state update function compute_dx returns dx (argument 1) and uses 3 input arguments: the state vector x, the input vector u, and the six scalar parameters encoded in p (t and auxvar of the template C-MEX model file have been removed here):

The output update function compute_y returns y (argument 1) and uses 3 input arguments: the state vector x, the input vector u, and five of the six parameters (the air resistance CA is not needed) encoded in p:

Having a proper model structure file, the next step is to create an IDNLGREY object reflecting the modeling situation. For ease of bookkeeping, we also specify the names and units of the inputs and outputs.

The names and the units of the (initial) states and the model parameters are specified via SETINIT. We also use this command to specify that the first initial state (the longitudinal velocity) ought to be strictly positive for the model to be valid and to specify that all model parameters should be strictly positive. These constraints will subsequently be honored when performing initial state and/or model parameter estimation.

A. System Identification Using Simulated High Tire Stiffness Data

In our first vehicle identification experiment we consider simulated high tire stiffness data. A copy of the model structure nlgr and an IDDATA object z1 reflecting this particular modeling situation is first created. The 5 input signals are stored in u1 and the 3 output signals in y1. The slip inputs (generated from the wheel speed signals) for the front wheels were chosen to be sinusoidal with a constant offset; the yaw rate was also sinusoidal but with a different amplitude and frequency. In reality, this is a somewhat artificial situation, because one rarely excites the vehicle so much in the lateral direction.

The next step is to investigate the performance of the initial model and for this we perform a simulation. Notice that the initial state has been fixed to a non-zero value as the first state (the longitudinal vehicle velocity) is used as denominator in the model structure. A comparison between the true and the simulated outputs (with the initial model) is shown in a plot window.

Next we investigate the performance of the initial model (which has the same parameters as the initial high tire stiffness model). A comparison between the true and the simulated outputs (with the initial model) is shown in a plot window.

Figure 8: Comparison between true outputs and the simulated outputs of the initial vehicle model with low tire stiffness.

The two stiffness parameters are next estimated.

nlgr2 = nlgreyest(z2, nlgr2);

A comparison between the true and the simulated outputs (with the estimated model) is shown in a plot window.

compare(z2, nlgr2, [], compareOptions('InitialCondition', 'model'));

Figure 9: Comparison between true outputs and the simulated outputs of the estimated vehicle model with low tire stiffness.

The simulation performance of the estimated model is again really good. Even with the same parameter starting point as was used in the high tire stiffness case, the estimated stiffness parameters are also here close to the ones used in Simulink to generate the true output data:

C. System Identification Using Measured Volvo V70 Data

In the final experiment we consider data collected in a Volvo V70. As above, we make a copy of the generic vehicle model object nlgr and create a new IDDATA object containing the measured data. Here we have also increased the air resistance coefficient from 0.50 to 0.70 to better reflect the Volvo V70 situation.

Next we investigate the performance of the initial model with the initial states being estimated. A comparison between the true and the simulated outputs (with the initial model) is shown in a plot window.

The tire stiffness parameters Cx and Cy are next estimated, in this case using the Levenberg-Marquardt search method, whereupon a new simulation with the estimated model is performed. In addition, we here estimate the initial value of the longitudinal velocity, whereas the initial values of the lateral velocity and the yaw rate are kept fixed.

Further information about the estimated Volvo V70 vehicle model is obtained through PRESENT. It is here interesting to note that the uncertainty related to the estimated lateral tire stiffness is quite high (and significantly higher than for the longitudinal tire stiffness). This uncertainty originates partly from that the lateral acceleration is varied so little during the test drive.

Concluding Remarks

Estimating the tire stiffness parameters is in practice a rather intricate problem. First, the approximations introduced in the model structure above are valid for a rather narrow operation region, and data during high accelerations, braking, etc., cannot be used. The stiffness also varies with the environmental condition, e.g., the surrounding temperature, the temperature in the tires and the road surface conditions, which are not accounted for in the used model structure. Secondly, the estimation of the stiffness parameters relies heavily on the driving style. When mostly going straight ahead as in the third identification experiment, it becomes hard to estimate the stiffness parameters (especially the lateral one), or put another way, the parameter uncertainties become rather high.

Open Example

A modified version of this example exists on your system. Do you want to open this version instead?

This website uses cookies to improve your user experience, personalize content and ads, and analyze website traffic. By continuing to use this website, you consent to our use of cookies. Please see our Privacy Policy to learn more about cookies and how to change your settings.