MPC-based Path Tracking With PID Speed Control For
MPC-based Path Tracking With PID Speed Control For
MPC-based Path Tracking With PID Speed Control For
Abstract. In this paper, a new coupled lateral and longitudinal controller based on model
predictive control (MPC) framework was proposed for an autonomous vehicle to track the
desired trajectory and speed. Considering the constraints of control input limit and state output
admissible, we used a spatial-based 8 degrees of freedom (DOF) vehicle model as the
prediction model and used a high-fidelity model, i.e., a 14-DOF vehicle model as the plant
model in the formulation of MPC algorithm. For the lateral control, the MPC controller
generates the optimal road-wheel steering angle; for the longitudinal control, the PID controller
embedded in the optimization solution generates the total driving or braking wheel torque. All
these control inputs were passed to the plant simultaneously. The developed vehicle models
were simulated with step steering input and compared with the simulation result of CarSim
vehicle model for validation. We implemented the proposed controller for path tracking and
speed control with MATLAB considering an 8-shaped curved trajectory as the reference. The
simulation results showed that the path tracking and speed tracking performance were good
using the combined lateral and longitudinal control strategy.
1. Introduction
With the advancement in computer and sensor technology, autonomous vehicles which ensure reliable
and safe navigation without driver control and continuous monitoring, have received worldwide
attention and rapid development during last decades, not only in the research field, but also in the
industrial, academic and military fields. Several competitions such as the DARPA (Defense Advanced
Research Projects Agency) Challenges in the USA; the Korean Autonomous Vehicle Competitions
(AVC) in Korea; the Intelligent Vehicle Future Challenge of China and many other contests have been
held to advance the development of autonomous vehicles [1,2].
Driving control including lateral control and longitudinal control is one of the core issues in the
research of autonomous vehicles. The lateral control aims to track the desired trajectory and heading
angle, while the longitudinal control aims to track the desired speed. To this end, various controllers
have been developed via classical control theory, modern control theory and robust control theory, etc.
such as PID control [3,4], optimal control [5,6], robust backstepping and sliding mode control [7,8],
etc. However, these control methods did not consider the actuator saturation and physical limit. Model
predictive control, which combines prediction model, receding horizon optimization and feedback
correction, has advantages to handle these issues due to its consideration of input constraints and state
admissible [9]. Recent research shows that MPC algorithm is useful to control the dynamics of
multiple vehicles considering safety constraints and the stability of these algorithms is also well
studied [10]. An MPC-based path tracking controller considering the handling stability and
Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution
of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
Published under licence by IOP Publishing Ltd 1
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
environmental constraints was proposed in [2] to address the complicated nonlinear constraints of
sideslip and rollover in motion planning and path following for high-speed autonomous vehicles; A
path following control scheme considering yaw and lateral stabilization for obstacle avoidance was
proposed in [11] using combined steering and braking, in which a full tenth-order vehicle model and a
simplified bicycle model were used respectively for nonlinear model predictive control (NMPC)
formulation; An NMPC controller was introduced in [12] for path tracking with consideration of input
limit and state output constraints by controlling the wheel steering, driving and braking and the NMPC
algorithm was transformed to a linear model predictive control (LMPC) based on online linearization
in order to reduce the computational burden. However, in the above studies, the lateral and
longitudinal control were studied in a decoupled way. It is assumed that the longitudinal velocity was
constant in the path tracking controller design. On the other hand, the coupling with the lateral
dynamics was not taken into account when dealing with the longitudinal control [13]. The automotive
vehicle can be treated as nonlinear system with varied parameters and strong couplings between the
lateral and longitudinal dynamics. Actually, the vehicle speed is usually varied along the path
according to the road information. For example, when the vehicle is entering a curve with small radius,
it needs to reduce the speed to avoid large lateral acceleration to ensure safety; When the vehicle
drives out of a curve and runs on a straight road, it needs to increase the speed to go through the road
as fast as possible. Hence, a time varied speed should be considered in path tracking and a
combination of the lateral and longitudinal control is quite necessary to improve the tracking
performance due to the difficulty of handling the complicated traffic environment with separate
controller [14].
We aim at designing a coupled lateral and longitudinal controller, it is therefore essential for us to
identify the different coupling effects. The lateral and longitudinal dynamics coupling effects fall into
three levels: kinetic coupling, tire force coupling and weight shift coupling. An example of kinetic
coupling effect is that the lateral cornering force of front wheel has a component in the longitudinal
direction; Tire force coupling effect can be described that given a coefficient of friction, the magnitude
of the resultant of lateral and longitudinal forces on each tire is limited by a function of the direction of
the resultant; Weight shift coupling effect can be shown that longitudinal acceleration affects the
lateral dynamics by redistributing the tire normal forces, while lateral acceleration changes the weight
distribution between the left and right tires [15,16]. In the literature, some approaches have been
proposed to address the problem of controlling the lateral and longitudinal vehicle dynamics in a
coupled way: for instance, a combined lateral and longitudinal controller based on sliding mode
control theory was proposed in [17] to deal with these coupling effects; A flatness-based nonlinear
controller was introduced in [18] for path tracking using combined lateral and longitudinal vehicle
control; An integrated controller based on backstepping approach was presented in [19] for lane
change and collision avoidance. In [20], a coupled longitudinal and lateral controller based on
nonlinear backstepping theory and adaptive sliding mode control technique was proposed for
automated driving control in emergency obstacle avoidance. In [21], an integrated control method
including a spatial-based predictive control and geometric corridor planning was proposed for adaptive
cruise control coupled with obstacle avoidance. Another integrated control scheme of adaptive cruise
control with auto-steering was presented in [22] to design safe interaction between lateral and
longitudinal controllers based on a proper logic-based control strategy. In [23], two coupled
controllers were presented to tackle the challenge of lateral and longitudinal coupling effects: one was
developed using Lyapunov control theory while the other one was based on Immersion and Invariance
with sliding mode control. The model used in the controller design was four-wheel vehicle model
using multi-body formalism based on Euler-Lagrange algorithm.
In this paper, in order to realize the coupled longitudinal and lateral control, we propose a novel
MPC-based path tracking strategy with PID speed control for autonomous vehicles considering the
constraints of input limit and output state admissible. The varied longitudinal velocity will be
considered in the formulation of model predictive control algorithm. For the lateral control, we use
MPC approach to generate the optimal road-wheel steering angle; for the longitudinal control, we use
2
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
PID controller embedded in the solution to generate the total acceleration or braking wheel torque. All
the control inputs are passed to the plant simultaneously to track the reference path and desired speed.
We use a double-track spatial-based 8-DOF vehicle model considering roll dynamics as the prediction
model and a higher fidelity model, i.e., a 14-DOF vehicle model as the plant, since an accurate vehicle
model is essential for the development of automotive control system. Moreover, to investigate the
performance of the proposed controller in curved road situation, we consider an 8-shaped curved path
as the reference.
The remainder of this paper is organized as follows: In Section 2, we described the tire model, an
8-DOF vehicle model, a 14-DOF vehicle model and a spatial-dependent vehicle model; In Section 3,
we specified the MPC algorithm for path tracking and the PID controller for speed tracking; In Section
4, we first compared the simulation results of step steer response between the developed vehicle
models and the CarSim vehicle model for validation; Then, we implemented the proposed controller
for combined path tracking and speed control considering the references path to be an 8-shaped curve
trajectory; In Section 5, we summarized the paper and outlined the future work.
2 2
3
4
where,
3
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
. 5
In these equations, the longitudinal force at the tire contact patch was denoted by , the lateral
force at the tire contact patch was denoted by , and the subscript ‘ij’ denotes left front (lf), right
front (rf), left rear (lr), and right rear (rr), respectively. The total mass of the vehicle is denoted by ,
the distance of vehicle center of mass (C.M.) from front axle by , the distance of the vehicle C.M.
from rear axle by , the forward velocity, lateral velocity, and the vertical velocity of the vehicle C.M.
by , and w, the roll angle by , the roll inertial by , the yaw inertial by , the product of roll and
yaw inertial by , the front and rear roll center distance below sprung mass C.M. by and ,
the front/rear unsprung mass by and , the front/rear track width by and . The front and
rear suspensions are represented simply by their respective equivalent roll stiffness ( / ) and roll
damping coefficients ( / ). We should notice that the roll DOF equation, i.e., Eq.(4), is given by
considering moments about the vehicle roll center , rather than the sprung mass C.M.
4
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
denoted by , , . The roll angular velocity, pitch angular velocity and yaw angular velocity are
denoted by , and . The moments transmitted to the sprung mass along the , and
directions are denoted by , and and the subscript ‘ij’ denotes left front (lf), right front
(rf), left rear (lr), and right rear (rr), respectively [25].
According to Newton’s laws, the equation of motion for the 6-DOF sprung mass of the 14-DOF
model can now be written as [25],
∑ (6)
∑ (7)
∑ (8)
∑ (9)
2
∑ (10)
∑
, (11)
2
where is the sprung mass and the cardan angles , , can be obtained by integrating the
following equations [25],
(12)
(13)
. (14)
More details about the development on 14-DOF vehicle model is specified in [25].
5
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
the spatial vehicle model are defined as , , , , , in which and are the errors of
heading angle and lateral position respectively.
6
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
Lateral control
Model Predictive Control Framework
Dynamic
Optimizer Optimal steering
angle sequence
Reference Braking/Driving
Speed PID speed wheel torque
controller
Longitudinal control
Figure 4. Schematic of the MPC-based path tracking with PID speed control.
3.1.1. Linearization of the vehicle model. Given the control input and the state variable
, , , , , , the general form of vehicle dynamics equations can be written as:
, , (19)
The equations around the operating point is given as:
, . (20)
Using the Taylor series expansion at the operating point and ignoring higher order terms, we can
obtain [9]
, ,
, (21)
In order to apply this model to the MPC controller, we describe the equation in the form of
discretized state-space representation [9]:
1 , (23)
where , , , and is the
sampling time.
3.1.2. State prediction. Defining new state variable , the output state variable
1
and the control input increment 1 , we can obtain a new form of the discrete
state-space controller model [9]
1
(24)
,
where , , , 0 (m is the dimension
0 0
of control input, n is the dimension of state variable, and p is the dimension of output).
The predicted state output over the prediction horizon in a compact matrix form is given as
, (25)
where
7
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
… …
1 …
… … 1
1 … 1
0 ⋯ 0
⋯ 0
⋮ ⋮ ⋯ 0
⋯
⋮ ⋮ ⋯ ⋮
⋯
0 0 ⋯ 0
0 ⋯ 0
⋯ 0 .
⋮ ⋮ ⋮ ⋯ ⋮
⋯
3.1.3. Cost function definition. The ability of the cost function is to make the autonomous vehicle
track the desired path rapidly and smoothly. Therefore, the system status deviation and the
optimization of the control output should be combined into the controller.
Considering the soft constraints concept [27], the objective function of the path tracking controller
can be given as [9]:
∥ | | ∥ ∥ | ∥ . (26)
. (27)
To solve the following optimization problem, the objective function is converted into a standard
quadratic form [9].
, 1 , , , , , (28)
0
where , 2 0 , and is the
0
tracking error in the predictive horizon .
3.1.4. Constraint analysis. In a real physical system, the control input and state output are bounded
with actuator saturation and physical limitations. The constrains imposed on the control sequence and
the state outputs can be described as follows [9]:
1. The constraints imposed on control input are given as
, 0,1, ⋯ , 1 (29)
2. The constraints imposed on control increments are given as
, 0,1, ⋯ , 1 (30)
3. The constraints imposed on the output are given as
, 0,1, ⋯ , 1 (31)
Since the variables to be solved are control increments in the control horizon, the constraints should
be written in the form of control increment or the form of control increment multiplied by the
transformation matrix. Thus, the constraints listed above should be converted to obtain the
transformation matrix, which is described as [9]:
8
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
1 , (32)
assuming that
1 ⊗ 1 (33)
1 0 ⋯ ⋯ 0
1 1 0 ⋯ 0
1 1 1 ⋱ 0 ⊗ (34)
⋮ ⋮ ⋱ ⋱ 0
1 1 ⋯ 1 1
where 1 is the column vector of ones, is the identity matrix with a dimension of m, ⊗ is
Kronecker product, and 1 is the previous control input [9].
Combining Eq.(32) through (34) can be converted into [9]
, (35)
where and are the lower and upper bound of the control input, respectively.
Combining Eq.(25) and Eq.(31), the output constraints can be given as:
, (36)
After obtaining the solution of optimization for cost function, the control increments sequence in
the control horizon can be given as [9]
∗ ∗
, ∗ ,…, ∗ . (37)
The first element of the sequences is taken as the actual control input increment, thus the control
input signal is given as:
∗
1 . (38)
, (43)
where refers to the desired speed, refers to the speed of the plant; refers to the desired
longitudinal acceleration, refers to the longitudinal acceleration of the plant. is the sample time
and when using the arc length dependent model, / .
In the PID controller, when the speed of the plant vehicle is smaller than the desired speed, then
, 0; when the speed of the plant is greater than the desired speed,
9
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
then , 0; when the speed of the plant equals to the desired speed, then
0, 0.
4. Simulation results
In this part, we firstly validated the developed vehicle models by comparing the output responses with
CarSim vehicle model using step steering input. Then, we implement the proposed controller for
combined lateral and longitudinal control considering the references path to be an 8-shaped curve
trajectory.
(a). Comparison of vehicle roll angle (b). Comparison of vehicle yaw rate.
10
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
(2) Comparison of step steer simulation between 14-DOF vehicle model and CarSim model
(a). Comparison of vehicle roll angle (b). Comparison of vehicle yaw rate.
11
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
12
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
(2) Compared with the reference trajectory and speed profile, the path tracking performance and
the speed tracking performance of the proposed coupled controller for lateral and longitudinal control
are illustrated in Figure 9:
(a). Front wheel steering angle input (b). Driving/braking wheel torque input
Figure 10. Control input signals for the path tracking and speed control.
Table 1. Path tracking and speed tracking errors with 8-shaped curved trajectory.
13
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
controller shows good tracking performance of following the desired path and the desired speed by the
use of combined lateral and longitudinal control. Considering the 8-shaped trajectory with a radius of
30m, the tracking errors between the plant and the objectives for the heading angle ‘ ’, yaw rate ‘ ’,
lateral position ‘ ’, longitudinal position ‘ ’ and the vehicle speed ‘ ’ are relatively small, which are
shown in Figure 8, Figure 9 and Table 1.
References
[1] G. Tagne, R. Talj, A. Charara 2016 Design and Comparison of Robust Nonlinear Controllers for
the Lateral Dynamics of Intelligent Vehicles IEEE Transactions on Intelligent
Transportation Systems 17(3) 796-809
[2] K. Liu, J. Gong, S. Chen, et al. 2018 Dynamic Modeling Analysis of Optimal Motion Planning
and Control for High-speed Self-driving Vehicles Journal of Mechanical Engineering 54(14)
141-151
[3] X. Zhao, H. Chen 2011 A study on lateral control method for the path tracking of intelligent
vehicles Automotive Engineering 33(5) 382-387
[4] R. Marino, S. Scalzi, M. Netto 2011 Nested PID steering control for lane keeping in
autonomous vehicles Control Engineering Practice 19(12) 1459 -1467
[5] Y. Ma, K. Li, F. Gao, et al. 2006 Design of an improved optimal preview lateral controller
Automotive Engineering 28(5) 433-438
[6] C. Hu, R. Wang, F. Yan, et al. 2016 Output Constraint Control on Path Following of Four-
Wheel Independently Actuated Autonomous Ground Vehicles IEEE Transactions on
Vehicular Technology 65(6) 4033-4043
[7] A. Norouzi, M. Masoumi, A. Barari, et al. 2019 Lateral control of an autonomous vehicle using
integrated backstepping and sliding mode controller Proceedings of the Institution of
Mechanical Engineers, Part K: Journal of Multi-body Dynamics 233(1) 141-151
[8] J. Wang, W. Chen, T. Wang, et al. 2012 Vision guided intelligent vehicle lateral control based
14
IWMSME 2020 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 892 (2020) 012034 doi:10.1088/1757-899X/892/1/012034
15