1. Introduction
Autonomous vehicles are the focus of attention in the world today. Many car manufacturers and even some Internet companies have invested a lot of energy in the research and development of autonomous vehicles. As early as 2008, Urmson C believed that intelligent systems could be applied to the automotive industry. He introduced the advantages of autonomous vehicles and the challenges faced by cities in the direction of autonomous driving [
1]. Then, Lee J analyzed the needs of autonomous vehicles, designed an agent that can simulate autonomous vehicles, and developed a prototype for it [
2]. Obinata G believed that it is necessary to solve the problems of machine control, road safety and automation technology reliability of autonomous vehicles, and explained the current situation and challenges of unmanned operation technology [
3]. More and more researchers are advancing the development of autonomous cars from different angles and within different fields. From the perspective of data storage, Yeshodara NS proposed a new idea to reduce the data storage problems of autonomous vehicles, only relying on cloud infrastructure to drive cars [
4]. From the perspective of obstacle recognition, Hane C proposed a method of extracting static obstacles from depth maps calculated from multiple consecutive images [
5]. Kumar GA proposed a method to estimate the distance between autonomous vehicles and other vehicles, objects and signs using precise fusion methods [
6]. From the perspective of computer vision perception, Dongpu Cao used a direct perception method to train a deep neural network in terms of increasing learning ability in relation to autonomous driving [
7]. From the perspective of path planning, Li CC proposed a model-based dynamic environment path planning algorithm [
8], and Jinkai Y proposed a hybrid path planning algorithm based on a simulated annealing algorithm and a particle swarm algorithm [
9]. Different research angles have brought hope to the real realization of autonomous cars to some extent; however, they must be implemented with consideration of the control of the vehicle, so path tracking control will eventually grow in importance.
In the control of autonomous cars, Jain AK installed a Raspberry Pi and cameras on the top of the car. An image was sent to the convolutional neural network for manipulation prediction, and then the prediction signal was sent to the controller to make the vehicle move in the intended direction without human intervention [
10]. Chen H proposed a new path-following control method and designed a three-step controller with output feedback to realize the coordinated control of the lateral and longitudinal directions without measuring the lateral speed [
11]. Li L proposed a high-performance automatic steering control strategy, using the system state equation of direction angle and lateral offset deviation to describe the tracking accuracy, and the control method adopted the sliding mode variable structure control method [
12]. Zhang H proposed the use of the Takagi–Sugeno model to deal with the time-varying characteristics of vehicle speed, as well as the use of Lyapunov stability parameters to improve the transient stability of the vehicle system [
13]. Celentano L proposed a simple and robust smooth path tracking control method that allows unmanned electric vehicles to track a smooth reference signal [
14]. Hain H proposed the use of a fuzzy controller to collect driver data while controlling an off-road vehicle. The data were used to develop the membership function of the input and output of the fuzzy controller, thereby improving the autonomous vehicle’s path tracking ability [
15]. Taking into account the conflict between tracking accuracy and stability under extreme conditions, Liang YX proposed a new path tracking controller based on yaw rate tracking [
16]. Hang P proposed a control algorithm to establish a linear parameter change system model to achieve different longitudinal speeds and different road friction coefficients, and combined the use of feedforward control with linear quadratic regulators to increase tracking stability [
17]. There are various vehicle motion control methods, but they are all aimed at improving control accuracy and stability. Among these control methods, model predictive control takes place earlier, and it uses non-minimized description models to improve the robustness of the system. It uses a rolling optimization strategy to make up for the uncertainty and has better dynamic performance [
18], and the algorithm has the ability to deal with constraints systematically, so it is widely used to solve the path tracking problems of autonomous vehicles.
Falcone P first proposed a new automatic steering system method [
19]. The designed model predictive controller emphasizes the trade-off between vehicle speed and required road preview to stabilize the vehicle. Then, Falcone P performed continuous online linearization of the complex nonlinear vehicle dynamics model [
20], and also proposed a low-complexity linear time-varying model, which considers the state of the vehicle and input constraints to improve vehicle stability on slippery roads and at high speeds, and used a variety of optimization algorithms to extend the range of conditions for real-time MPC implementation. According to the literature [
19,
20], Falcone proposed a predictive model for the joint control of braking and steering of autonomous vehicles. On high-speed snow-covered roads, the vehicle can be better controlled to change lanes on two lanes [
21]. For the problem of model mismatch caused by different road conditions and small angles of vehicle models, Guo HY adopted the form of measurable disturbance, and used differential evolution algorithm for the optimization problem of path tracker [
22]. Yin GD designed a decentralized MPC controller, which considers the rear-end collision avoidance of the control area and the collision avoidance at intersections to improve traffic efficiency and safety [
23]. He ZW proposed a two-layer controller for accurate and robust lateral path tracking control of highly automated vehicles. The upper controller is realized by assuming linear time-varying MPC at the small angle, and the slip angle is limited to ensure stability. The lower controller is a radial basis function neural network PID controller [
24]. Peng HN proposed a robust model predictive control method with a finite time domain to realize the path tracking and direct yaw moment control of an electric vehicle independently driven by an autonomous four-wheel motor [
25]. Based on the analysis of the sideslip angle, Tang LQ proposed a vehicle sideslip angle compensator that can correct the motion model prediction, which significantly improves the path tracking performance and the control ability at high speed [
26]. Xu SB proposed the preview steering control algorithm and the concept of its closed-loop system analysis, and compared the model method with the MPC model based on the bicycle model [
27]. Yao proposed an MPC model with longitudinal velocity compensation in the prediction range, and analyzed the longitudinal velocity change mechanism and the stability within the prediction range [
28]. Sara M introduced a Tube-based MPC to consider the dynamic difference between the real vehicle and this constant nominal model, not only considering the lateral error, but also the directional error [
29]. Michael J extended constraint removal to Tube-based MPC, detecting inactive constraints in advance, deleting invalid constraints, and reducing calculation time [
30]. Shilp D used a combination of potential fields such as vehicle functions and reachability sets to identify safe zones on the road, and provided them to the Tube-based MPC, which can be free from non-convex collision avoidance constraints and ensure the feasibility of lateral movement during acceleration and deceleration [
31]. Among the above MPC controller design processes, most chose the bicycle model to simplify the calculation of the algorithm, and used the small angle assumption to represent the tire force in the vehicle model. When the tire force enters the nonlinear region, errors will inevitably occur, which will affect the performance of the controller. Therefore, an MPC algorithm based on a nonlinear tire model is proposed: Replace the conventional tire force linearly expressed by cornering stiffness with the tire force expressed by the magic formula composite function, so that even if the tire force enters the nonlinear region, the tire force calculated by the magic formula is close to the tire force under real conditions. Avoid unnecessary errors caused by tire force in path tracking.
The main arrangement of this work is as follows. First, in the first section, a bicycle model and a non-linear magic formula tire model are established. In the second section, the complex partial derivative processing and matrix transformation related to the nonlinear tire model, as well as the prediction model, objective function and constraint conditions of the controller are introduced in detail. In the third section, a variety of constant working conditions and variable working conditions are selected, and the effectiveness of the controller is verified based on Carsim/Simulink simulation. In the fourth section, an active steering test platform based on LabVIEW-RT is established, and hardware-in-the-loop testing is carried out to verify the actual control effect of the controller. The fifth section describes the conclusion.
Only the replacement of the linearly expressed tire force with the tire force expressed by a composite function is considered to verify the performance of the controller, so as to promote the improvement and research of the controller on this basis in the future.
2. Vehicle Dynamics Model
2.1. Bicycle Model
Establishing a suitable vehicle model is the prerequisite and basis for realizing model predictive control. Since the main research goal is to make the car follow the desired path quickly and stably, the vehicle model needs to be simplified to a certain extent, and the bicycle model is used to transfer left and right without load, assuming that the vehicle has a good anti-lock braking system.
The plane motion of the vehicle is mainly considered as lateral, longitudinal and yaw motion. The vehicle is set as front-wheel drive and front-wheel steering, and the vehicle model is selected as a three-degree-of-freedom bicycle model [
32]. In the plane rectangular coordinate system, the vehicle model is shown in
Figure 1.
According to Newton’s second law, the force balance equations along the x-axis, y-axis and z-axis can be obtained.
Around the
z axis:
where
is the curb weight of the vehicle,
and
are the longitudinal and lateral speeds,
and
are the forces in the
x and
y directions received by the front tires,
and
are the forces in the
x and
y directions received by the rear tires,
is the yaw rate,
is the moment of inertia of the vehicle around the
z-axis, and
and
are the distances from the center of mass to the front and rear axles.
The force received by the front and rear tires in the
x and
y directions is related to the longitudinal force and lateral force received by the front and rear tires. The relationship is as follows [
32]:
In the formula, and are the longitudinal forces received by the front and rear wheels, and are the lateral forces received by the front and rear wheels, and are the front and rear steering angles. Since the selected vehicle model is front-wheel steering, .
The longitudinal force and lateral force of the tire can be expressed as a complex function of the tire side slip angle
, tire slip rate
, vertical load
and other parameters:
Among them, the side slip angle of the tire is related to the longitudinal speed and the lateral speed, as shown in Equation (6) [
32]:
In the formula, and are the front wheel slip angle and the rear wheel slip angle, and are the longitudinal speeds of the front and rear wheels, and and are the lateral speeds of the front and rear wheels.
The longitudinal and lateral speed of each tire can be represented by the speed in the
x direction, the speed in the
y direction, and the front and rear steering angles [
33]:
In the formula, and are the speeds of the front and rear wheels in the x direction, and and are the speeds of the front and rear wheels in the y direction.
The speed of the tires in the
x and
y directions is generally difficult to obtain, and can be calculated from the vehicle speed [
33]:
Therefore, the front and rear wheel slip angles can be obtained from Equations (7) and (8).
Assuming that the vehicle has a good anti-lock braking system, the adhesion coefficient reaches the maximum when the tire slip rate is 15–20%. In order to achieve the best braking effect, the slip rate needs to be controlled at 15–20% Therefore, the slip rate is a constant value of 20%.
Since the load transfer of the vehicle is not considered, assuming that the vehicle speed changes slowly and there is no load transfer of the front and rear axles, the vertical loads
and
of the front and rear wheels can be expressed as [
33]:
The above formulas are derived from the body coordinate system, and the relationship conversion between the body coordinate system and the inertial coordinate system needs to be considered [
33]:
In the formula, is the yaw angle, is the longitudinal position in the inertial coordinate system, and is the horizontal position in the inertial coordinate system.
2.2. Magic Formula Tire Model
In order to reduce the amount of calculation in most of the current path tracking algorithm models, the small angle assumption is used in Equation (5) to approximate the longitudinal force and lateral force of the tire. When the tire slip angle and longitudinal slip rate are small, the tire force can be linearly approximated as:
In the formula, is the tire longitudinal stiffness, and is the tire cornering stiffness.
The use of Equation (11) has a certain limit range, and only when the lateral acceleration
is less than 0.4 g can it have a higher fitting accuracy for conventional tires. If you consider that at a high speed or when the road adhesion coefficient is low, when the lateral acceleration of the vehicle is greater than 0.4 g at a certain moment, the tire longitudinal force and lateral force at that moment are substituted into the control algorithm model, and there will be a certain error in the calculation result. Because the increase in tire force at this time becomes slower with the increase in slip rate and cornering angle, the tire force calculated with the small-angle linear assumption is obviously greater than the tire force under real conditions. In order to make the model more accurate, the path tracking algorithm model is based on the magic formula tire model [
34], replacing the small angle hypothesis of Equation (11) with the magic formula.
When the vehicle is running, the camber angle is generally small. The influence of the camber angle on the tire longitudinal force can be ignored, and the empirical parameters related to the camber in the magic formula can be ignored. Ignore the parameters related to zero-point drift, ignore the empirical parameters that cause asymmetry in the formula, and ignore the higher-order terms more than 3 times; thus, the simplified magic formula is as follows:
In the purely longitudinal case, the longitudinal force is [
34]:
In the case of pure sideslip, the lateral force is [
34]:
In the mixed case of longitudinal sideslip [
34]:
The longitudinal force is:
Combining Equations (12)–(17) with the parameters in
Table 1, the longitudinal force and lateral force of the front and rear wheels can be calculated. Equation (5) can be expressed as follows:
It can be seen from Equation (18) that the longitudinal force and lateral force of front and rear tires are only related to their respective slip angles. By substituting the above equation into Equation (4), the forces received by the front and rear tires in the
x direction and the
y direction are:
Substituting Equation (19) into Equations (1)–(3), and combining Equation (10), we can obtain the vehicle dynamics nonlinear model based on the magic formula tire model:
The selected tire type is 175/70 R13 (asymmetric). The specific parameters of the tire based on the magic formula are as follows:
Table 1.
175/70 R13 (asymmetric) tire parameters.
Table 1.
175/70 R13 (asymmetric) tire parameters.
Parameter Name | Parameter Value | Parameter Name | Parameter Value |
---|
| 1.62 | | 1.29 |
| 1.035 | | −0.9 |
| −0.0487 | | 0.18 |
| 0.5 | | −4.5 |
| −0.122 | | −1.07 |
| −0.0063 | | 0.68 |
| 19.4 | | −12.95 |
| −0.13 | | 1.72 |
| 0.171 | | 0.0035 |
| −0.0005 | | −0.003 |
| 8.42 × 10−5 | | 0.0045 |
| 0 | | −0.03 |
| 0 | | 4100 |
| 1.125 | | 1.1 |
| 0.078 | | 0.23 |
| −0.16 | | 0.41 |
| −0.03 | | 6.38 |
| 9 | | 7.95 |
| −8.75 | | −0.06 |
| 0.0007 | | 10 |
| 0.024 | | 1.95 |
| 0 | | −50 |
| 0 | | |
3. Model Predictive Controller Design
3.1. Prediction Model
Convert Equation (20) in vehicle dynamics model into state space form [
33]. Select lateral velocity
, longitudinal velocity
, yaw angle
, yaw rate
, lateral offset
, and longitudinal position
as the state variable
. In Equation (20),
are related to
, and
are related to the front steering angle
from Equations (6)–(8). Therefore, in the control system, the control variable is selected as
. The general form of the state equation is as follows:
The general vehicle path tracking control will give a reference path to realize the control tracking of the actual vehicle. The state variable and control variable of the reference vehicle at each time satisfy the above equation, and
represents the reference variable, so the form becomes:
In the formula: .
Perform a Taylor expansion of Equation (21) at any reference trajectory point, ignoring higher-order terms, and obtain [
33]:
Subtract Equations (22) and (23) to obtain:
In the formula, the matrix is the first order partial derivative matrix of to , and the matrix is the first order partial derivative matrix of to . , .
Equation (24) is the state equation, but the state equation is continuous. The model predictive controller is a discrete-time control method, so Equation (24) needs to be discretized [
33]:
In the formula, is the sampling time, and is the unit matrix.
The new discretized state space model is [
33]:
In the formula:
among them:
In the above formula, the partial derivatives of the side slip angle of the front and rear wheels with respect to the longitudinal speed , lateral speed , yaw rate and front wheel rotation angle can be obtained by calculating the partial derivatives of Equations (6)–(8).
Since the control variable is the front steering angle, in order to ensure the normal running of the vehicle and prevent sudden changes in the front steering angle, it is necessary to limit the front steering angle increment, so the control variable in Equation (26) is converted into a control increment [
33]:
In the formula: .
The target path tracking needs to select the output of the state equation. The selected output is the yaw angle and the lateral offset. The former can be used to track and detect the forward direction of the vehicle, and the latter can be used to track and detect the forward position of the vehicle, and the output equation of the prediction model [
33] is as follows [
33]:
In the formula: .
Combining Equations (27) and (28) as a complete prediction model, Equation (29):
3.2. Output in the Forecast Time Domain
It is assumed that the prediction time domain is
, the control time domain is
, and the prediction time domain is greater than the control time domain. Based on Equation (29), it is predicted that
control increments in the control time domain will act on the system. When time
is in the control time domain between the time domain and the prediction time domain, the input control amount of the system remains unchanged, and the control increment is 0. After derivation, the system’s predicted output expression can be obtained [
33]:
3.3. Objective Function Design
The objective function is the performance standard of the system. To ensure that the unmanned vehicle can quickly and smoothly follow the target path and reflect its tracking ability, it is also necessary to optimize the deviation and control of the system state variable. It is necessary to ensure that the control increment in each sampling period is constrained to avoid sudden changes. Therefore, referring to the soft constraint method used in the literature [
35], the selected objective function form is as follows:
In the formula, is the weight coefficient, is the relaxation factor, and are the output weighting matrix and the control weighting matrix, respectively. The first item represents the accumulation of deviations between the output variable and the reference value of the output variable, which reflects the ability to follow the reference trajectory, and the second item is the accumulation of deviations of the control variable, which reflects the requirement for the steady change of the control variable. The third item ensures that there is a feasible optimal solution when changing in real time. is the predicted value of the output at time in the future at time , is the reference value of the output at time in the future at time , and is the future control variable sequence.
The output weighting matrix: .
The control weight matrix: .
In order to simplify the calculation, the control increment matrix A is taken as a single design variable, so the objective function [
36] after matrix transformation is as follows:
3.4. Design of Constraints
The constraint conditions of model predictive control generally include control variable constraint, control increment constraint and output variable constraint. In real vehicle driving scenarios, the front steering angle has a certain range limit, so the actual situation should be considered when designing the controller, and the control variable front steering angle should be restricted. At the same time, in order to consider the stability of the vehicle, the constraint on the control increment is also indispensable, and the change range of the control increment cannot be too large. In addition, in order to avoid excessive deviation from the target path, it is necessary to refer to the target path to constrain the output yaw angle and lateral offset [
36].
Impose constraints on the control amount:
In the formula, is the minimum value of the control variable, and is the maximum value of the control variable.
Impose constraints on the control increment:
In the formula, is the minimum value of the control increment, and is the maximum value of the control increment.
Impose constraints on the output:
In the formula, is the minimum value of the output and is the maximum value of the output.
5. Hardware in the Loop Experiment
The simulation analysis in the third section preliminarily verifies the performance effect of controller A under constant speed and variable speed conditions. In order to verify the actual effect of the controller, a hardware-in-the-loop test platform based on Labview-RT is established in this section. In the hardware-in-the-loop test, although commercial simulation software is used to replace the real vehicle, the steering actuator and control system are complete physical objects. Therefore, hardware-in-the-loop testing is used by many automobile manufacturers to verify the logic of vehicle path tracking control and vehicle stability control. The test plan is shown in
Figure 10 [
39,
40,
41]. The simulation software Carsim is embedded in the automation platform PXI real-time system, and the vehicle status and road information are transmitted to the dSPACE controller through the PXI CAN card. The designed control scheme is stored in dSPACE, and the active steering angle is calculated in real time based on the vehicle status and road information transmitted by PXI. The steering signal is transmitted to the underlying controller, and the underlying controller drives the steering motor and the resistance loading system to execute the angle signal. The steering wheel is controlled to complete the angle change. The angle sensor attached to the steering wheel mechanism collects the actual steering steering angle, and then transmits the angle signal back to Carsim through the PXI CAN card. The computer collects the motor current graph and the vehicle dynamic response graph in Carsim. Through the above steps, the hardware-in-the-loop test is completed.
The hardware-in-the-loop test condition is selected as the constant speed condition (
) under a high adhesion coefficient, and the tracking path is still double lance change. The basic parameter settings of the controller are the same as the simulation condition. The test results are shown in
Figure 11a–g; the results verify the effectiveness of the designed controller.
Comparing
Figure 5a and
Figure 11a, the path tracking effects of the two controllers in simulation and experiment are similar. Controller A is closer to the reference path at 60 m, while controller B is slightly better at 60–80 m, but controller A can keep up with the reference path more quickly and effectively after 80 m. The amplitudes and shapes of the experimental graphs 11b–d and simulation graphs 5b–d are also similar. The peak value of controller A is smaller than that of controller B. It can be seen from
Figure 11e that the lateral acceleration of controller A is still within 0.4 g, while the upper and lower peaks of controller B exceed 0.4 g. Furthermore, it can be seen from
Figure 11f that the tire lateral force reaches its saturation value within 2–3 s. After the tire force enters the nonlinear region, the tire force calculated by controller B has errors in terms of the real tire force, and the accumulation of errors affects the later tracking accuracy and vehicle stability.
Figure 11g is the collected motor current graph. It can be clearly seen that the current of controller B has reached ±30 A, while the current of controller A is only within ±20 A. After 8 s, the motor current of controller B is still fluctuating, while the motor current of controller A tends to be stable. The overall noise fluctuation of controller A is small, the current is more stable, and the response speed is faster. In summary, considering the path tracking accuracy and vehicle stability, the effect of controller A is better.
6. Conclusions
In this paper, a model predictive algorithm controller, based on a nonlinear tire model, is designed. It is used to reduce the calculation error of the tire force of the vehicle in the case of poor road conditions, high speed, etc., to avoid the deterioration of the path tracking effect due to excessive error. In the controller, the tire forces are characterized with nonlinear composite functions of the magic formula instead of a simple linear relation model. In the design of the controller, Taylor expansion is used for linearization, the first-order difference quotient method is used for discretization, and the partial derivative of the composite function is used for matrix transformation. Constant velocity and variable velocity conditions are selected to compare the designed controller with the conventional linear tire force controller in Carsim/Simulink. The results show that when the tire force does not fall into the nonlinear region, the stability of the two controllers is similar. The tracking accuracy of the controller designed in this paper is slightly better. However, after the tire force enters the nonlinear region, the effect of the controller, when using linear tire force, becomes worse, the tracking accuracy is far worse than the controller when using the magic formula tire design, and the vehicle stability is also degraded. In addition, a semi-physical test platform based on the LabVIEW-RT system was established, and hardware-in-the-loop test experiments were carried out. The test results verified the effectiveness of the designed controller. In order to further improve the tracking performance and stability of unmanned vehicles, the MPC model, based on nonlinear tires, that is proposed in this study will continue to be expanded in the future, so that autonomous vehicles can effectively operate in more complex and realistic traffic scenarios.