0% found this document useful (0 votes)
27 views6 pages

Autonomous Lane Keeping With Model Predictive Control

Uploaded by

chen4567
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views6 pages

Autonomous Lane Keeping With Model Predictive Control

Uploaded by

chen4567
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Autonomous Lane Keeping with Model Predictive Control

Aaron Winter Venkat Narayanan Balachandran Zachary Nill


Dept. of Mechanical Engineering Dept. of Mechanical Engineering Dept. of Mechanical Engineering
Clemson University Clemson University Clemson University

Abstract the results of the bicycle model and the two other models
contained negligible differences. The conclusion of the
This study aims to establish a feasible lane keeping Polack, et al publication proved that the bicycle model is
controller for a simulated autonomous vehicle by a viable candidate for accurately expressing the dynamics
employing model predictive control (MPC) of an autonomous vehicle, while minimizing
methodologies. The lane keeping controller will operate computational cost.
by tracking a reference trajectory, when given a reference
longitudinal velocity. The model used for this experiment Research by Dixit et al. was conducted into the use of
is a combination of a lane keeping model and an adaptive MPC for planning an overtake (passing maneuver) by an
cruise control model, resulting in a system capable of autonomous vehicle [2]. This overtake consists of an
controlling both the longitudinal acceleration and the autonomous vehicle recognizing obstacles (other
steering angle of the ego vehicle. The vehicle dynamics vehicles) and performing a lane change action to pass in
were created using the kinematic bicycle model. The front the aforementioned obstacles. This study first
model and simulation were performed in MATLAB considered the implementation of a path planning system
2019b using Simulink, the Automated Driving toolbox, which utilized rapidly exploring random tree (RRT)
and the Model Predictive Control toolbox. The resulting algorithms. The findings of the study identified this
MPC controller was proven to feasibly provide lane technique to be slow for use in a time sensitive and live
keeping capability to the simulated ego vehicle, when setting such as autonomous vehicles. This conclusion
driving upon a road way containing arbitrary waypoints. was primarily attributed to the inability of the algorithm
to quickly handle data and multiple variables. The paper
Keywords – Model Predictive Control (MPC), subsequently explored MPC which utilized a reference
Autonomous Lane Keeping, Adaptive Cruise Control, table containing current state values of the vehicle. By
Lane Keeping Assist, Reference Trajectory Tracking. using the MPC controller to avoid a collision with another
driver. The results of this experiment proved the MPC to
Introduction be capable of handling complex situations and
constraints. For this reason, this lane keeping study will
Autonomous vehicles are continuing to emerge as viable leverage MPC principles.
options for the commercial world. A cornerstone feature
of these vehicles is their ability to maintain proper Active steering using MPC has been researched by
positioning in road lanes. This lane keeping feature can Borrelli et al. Their work established a systematic control
be made possible via the implementation of a model method for steering and stabilization of a vehicle along a
predictive controller acting upon the appropriate path [3]. Their research displayed how effective MPC can
vehicular dynamic model. be in this application and how different factors have an
effect on this result.
Performing a review of current literature emphasized the
importance of choosing a feasible and accurate model Similar to the goal of this present study of lane keeping,
when using MPC for a vehicle or any physical object. Bujarburuah et al. have conducted research on the use of
Modelling a vehicle can be an extremely difficult and an adaptive robust MPC for lane keeping that is effective
computationally demanding task, particularly for detailed for sharp turns. This control strategy works to minimize
systems. For this application of autonomous vehicle lane the distance between the car and the center of the road [4].
keeping, a bicycle model was chosen as a balance This research takes an approach that accounts for sensory
between simplicity and accuracy of model dynamics. This information in conjunction with vehicle dynamics to
decision was supported by research conducted by Polack understand the state of the vehicle. If the vehicle behaves
et al. into the feasibility of a bicycle model for use in differently than the dynamics predict, the vehicle will
trajectory planning and autonomous vehicles [1]. This adapt and bring itself back onto the intended course.
research compared the results of the bicycle model with
two other models containing higher complexity and A study conducted by Wang et al. investigated the use of
accuracy. The conclusions of this research identified that fuzzy adaptive weight control as an improvement upon
standard MPC in the application of autonomous vehicles. The input for the system is the steering angle and the
This study proved that this control algorithm can lead to outputs are lateral velocity and the yaw angle rate.
a smoother control, with a generally more comfortable
experience for end users. The new method gradually The second system expressed adaptive cruise control [10]
modifies a weight applied to the cost function to correct and considers the following system:
disturbances [5].
d Vẋ −1/τ 0 Vẋ 1/𝜏 [ ̇ ]
[ ]=[ ][ ] + [ ] Vx
Cheng et al. released a study on the use of adaptive MPC dt Vx 1 0 Vx 0
for longitudinal collision avoidance including lateral
stability to account for lateral disturbances caused by an In the second model the following variables are
emergency brake. This model used two levels of control: implemented:
a higher-level controller that is responsible for
determining desired deceleration and yaw adjustment, Vẋ – longitudinal acceleration of the vehicle
and a lower-level controller that accounts for forces acting Vx - longitudinal velocity of the vehicle
on each tire [6]. τ - acceleration time constant.

The aforementioned preliminary research into the current As previously mentioned, this model was necessary in
state of vehicle dynamic models and MPC for order to express the longitudinal motion of the vehicle. In
autonomous driving applications has shaped the particular, the input is longitudinal acceleration and the
dynamical model choice and controller strategy used in output is longitudinal velocity.
this present study.
To combine both the lane keeping and adaptive cruise
Modelling control models together, an augmented matrix was
generated using the following form:
The model selected for this study was formed by
combining two state space models. The two state space Ẋ A 0 X1 B 0 U1
models are the lane keeping model [9] and the adaptive [ 1] = [ 1 ][ ]+ [ 1 ][ ]
X2 ̇ 0 A2 X 2 0 B2 U2
cruise control model [10]. The lane keeping model
expresses the lateral motion of the ego vehicle system, Carrying out the augmentation matrix method resulted in
while the adaptive cruise control model expresses the the following total dynamical model:
longitudinal motion of the ego vehicle system. By
combining the two models into one, both lateral and −1/𝜏 0 0 0 1/τ 0
Vẋ 1 0 0 0 Vẋ 0 0
longitudinal motion can be expressed. d Vx 2(Cf + Cr ) 2(Cf Lf − Cr Lr ) Vx 2Cf V̇
= 0 0 − −Vx − + 0 [ x]
dt Vy mVx mVx Vy m δ
2(Cf Lf − Cr Lr ) 2(Cf L2f + Cr L2r ) [ ψ̇ ] 2Cf Lf
The first state space model describes the lateral dynamics [ψ] ̇
0 0 − − 0
[ Iz Vx Iz Vx ] [ Iz ]
of the vehicle according to the bicycle model [7,9]. This
model considers the vehicle to be a bicycle model by
combining the two front and rear wheels into a single The combined model provides dynamical relationships
front and rear wheel model [8,9]. This system is for the following states:
expressed as the following:
• longitudinal acceleration (m/s2)
2(Cf + Cr ) 2(Cf Lf − Cr Lr ) 2Cf • longitudinal velocity (m/s)
− −Vx −
d Vy
[ ]=
mVx mVx Vy m
[ ] + 2C L [δ]
• lateral velocity (m/s)
dt ψ̇ 2(Cf Lf − Cr Lr ) 2(Cf L2f + Cr L2r ) ψ̇ f f
• yaw angle rate (radians/s)
− − [ Iz ]
[ Iz Vx Iz Vx ]

Here, The combined model also provides dynamical


relationships for the following control inputs:
Vy - lateral velocity of the vehicle
ψ̇ – yaw angle rate • longitudinal acceleration (m/s2)
Lf - distance from vehicle center to front tire center • steering angle (radians)
Lr - distance from vehicle center to rear tire center
m - mass of the vehicle
Vx - longitudinal velocity of the vehicle.
𝛿 – steering angle
Iz - yaw moment of inertia
Cf - front tire’s cornering stiffness
Cr - rear tire’s cornering stiffness.
Shown below are the parameters used to populate the MPC Formulation
combined model.
The model predictive controller (MPC) for this study was
Parameters Values created by leveraging the MPC Toolbox feature from
Distance from Vehicle Center to Front Tires Lf = 1.2 m MATLAB 2019b. The controller was predicated on
Distance from Vehicle Center to Rear Tires Lr = 1.6 m minimizing the following cost function:
Mass m = 1,575 kg
N
Initial Longitudinal Velocity Vx = 0.1 m/s 1
J= ∑[(yk − rk )T Q(yk − rk ) + (uk − uk−1 )T R(uk − uk−1 )]
Yaw Moment of Inertia Iz = 2,875 mNs2 2
k=1
Front Tires’ Cornering Stiffness Cf = 19,000 N/rad
Rear Tire’s Cornering Stiffness Cr = 33,000 N/rad where yk, and rk are the vehicle model outputs and
Acceleration Time Constant τ = 0.5 reference values and Q and R are the weighting matrices
for the state and control inputs, respectively. It should be
System Model noted that it was a deliberate decision to not penalize the
control input directly. Rather, this study aimed to
After the combined dynamical model was determined, penalize the change in control input by finding the
the entire ego vehicle system was entered into a difference between the current control (uk) and the
Simulink block diagram. This block diagram is previous control (uk-1).
displayed below in Figure [1].
The weighting matrix for the states, Q, is shown in the
following:
0 0 0 0
0 1 0 0
Q= [ ]
0 0 1 0
0 0 0 0

Q puts an equal amount of weight on the longitudinal


velocity tracking and the lateral deviation error.

The weighting matrix for the control inputs, R, is shown


in the following:

Figure [1] Block diagram of System Model 0.1 0


R= [ ]
0 0.1
In the above diagram, u1 and u2 are the inputs of the
longitudinal acceleration and steering angle to the “ego R puts an equal weight of 0.1 on the change in the
vehicle model” block. The outputs y1, y2, and y3 are the longitudinal acceleration and the change in the steering
longitudinal velocity, lateral velocity, and the yaw angle angle.
rate respectively. The error dynamics are referenced in the
variables e1 and e2. These variables indicate the lateral Upper and lower bound control input constraints were
deviation and the relative yaw angle respectively and are also incorporated for the steering angle and the
calculated by using the following first-order differential longitudinal acceleration into the MPC controller. The
equations: constraints are as follows:
ė 1 = Vx e2 + Vy
−0.5 radians ≤ δ ≤ 0.5 radians
ė 2 = ψ̇ − Vx ρ m m
−3 s2 ≤ 𝑉𝑥̇ ≤ 3 s2
In the above equation for 𝑒2̇ , ρ is the curvature of the
detected lanes in the reference trajectory. The ego vehicle model has zero initial conditions for all
the states, but the longitudinal velocity has 0.1 m/s as the
Data used in the “Lane Curvature from sensor data” block initial condition. A reference longitudinal velocity of 30
was obtained from the sensor data gathered from a m/s is used for the ego vehicle to track.
simulated driving event in the MATLAB Driving
Scenario Designer. This data was provided as a reference A prediction horizon of 10 and a control horizon of 3 was
trajectory to the MPC and was also used to calculate the utilized by the MPC controller. Furthermore, the
error dynamics. sampling time used by the controller was chosen to be 0.1
seconds. The prediction horizon, control horizon, and
sampling time values were based upon heuristic
principles. All of the above-mentioned values are given to
the MPC control toolbox in MATLAB to minimize the
cost function by satisfying the given constraints.

Simulation Results

The Simulation results included the following values:

Error dynamics of the Ego Vehicle


• lateral deviation (m)
• relative yaw angle (rad)

Model Predictive Control Outputs


• longitudinal acceleration (m/s2)
• steering angle (rad)

Ego vehicle outputs Figure [2] The reference road trajectory with
• longitudinal velocity (m/s) waypoints
• lateral velocity (m/s)
• yaw angle rate (rad/s)

By utilizing the Driving Scenario Designer, in the


MATLAB Automated Driving Toolbox, a road trajectory
with arbitrary waypoints (a reference path) was created
for the ego vehicle to travel upon. Figure [2] shows the
reference road trajectory created for this study.

The designing tool also allows for the addition of sensors,


such as camera and radar, onto the ego vehicle. The
addition of these sensors allows the ego vehicle position
and time data to be obtained when simulating a driving
event.

In the driving scenario used for this study, three cameras


have been placed upon the ego vehicle. The cameras were
located at the front, left and right side to detect the lanes
on the created road and are shown in Figure [3]. Once the
ego vehicle completed the simulation of the driving event
in the driving scenario designer, it is possible to access the
sensor data with all the information about the detected
lane boundaries. This sensor data is manifested as Figure [3] Ego vehicle with cameras mounted
curvature values of the detected lane, per time. The
sensor data is subsequently exported from the Driving By applying the curvature values into the Simulink block
Scenario Designer and imported into the MPC and error diagram of the system model the following error
dynamics block as a reference trajectory. dynamics and MPC outputs were measured for the ego
vehicle:
Figure [6] Ego vehicle outputs from MPC inputs

From figure [6] it can be observed that the Ego vehicle


Figure [4] Error dynamics of the Ego vehicle tracks the reference longitudinal velocity of 30 m/s in
minimum time, and that the lateral velocity and the yaw
From Figure [4] it can be observed that the lateral angle rate converge to zero in approximately 5 seconds.
deviation and the relative yaw angle converge to zero. This clearly indicates that the ego vehicle tracks the
This observation clearly indicates that the ego vehicle reference lane trajectory using the longitudinal
tracks the reference lane trajectory effectively. acceleration and steering angle inputs from the MPC.

Conclusion

This study aimed to establish a feasible lane keeping


controller for a simulated autonomous vehicle by
employing model predictive control (MPC)
methodologies. The study employed a combined vehicle
dynamic model, capable of expressing the desired
longitudinal velocity, lateral velocity, and the yaw angle
rate for an ego vehicle. The simulation results clearly
show that the ego vehicle tracks a custom reference road
trajectory with an MPC controller. The MPC controller
utilized inputs from the error dynamics of the ego vehicle
and the reference trajectory to control longitudinal
Figure [5] Model Predictive Control outputs acceleration and steering angle, when provided with a
reference longitudinal velocity of 30 m/s and imposed
Figure [5] shows the response of the MPC with respect to weights upon the vehicle states and change in control
the error dynamics of the Ego vehicle and the reference inputs.
lane trajectory. It can be observed from the longitudinal
acceleration that the vehicle is initially at full throttle in From the results of this study, several recommendations
order to reach the reference longitudinal velocity in are proposed for future investigations surrounding
minimum time. Once it reaches the reference velocity, the autonomous vehicles and MPC controllers. The first area
longitudinal acceleration converges back to zero. It can of opportunity is to investigate systems containing
also be seen that the steering angle and longitudinal varying longitudinal velocities using adaptive MPC
acceleration remains within the prescribed constraints of models. Another opportunity for study may involve
prioritizing the minimization of a vehicle’s response time
± 0.5 radians and ± 3 m/s2.
to non-zero differences between its current position and
reference waypoints. In this paper’s study, the vehicle’s
response time is approximately 5 seconds to correct itself
the maximum lateral deviations from the reference line.
Finally, it should be noted that other driving scenarios can
be further investigated using MPC. These other scenarios
could include traffic light interaction with vehicles,
collision avoidance with other vehicles on roadways, and
overtaking maneuvers on diverse road types (e.g two-lane
roads, roundabouts, or crosswalks).

References

[1] P. Polack, F. Altche, B. DAndrea-Novel, and A.


De La Fortelle, “The kinematic bicycle model: A
consistent model for planning feasible trajectories
for autonomous vehicles?,” IEEE Intell. Veh.
Symp. Proc., no. Iv, pp. 812–818, 2017, doi:
10.1109/IVS.2017.7995816.
[2] S. Dixit et al., “Trajectory Planning for
Autonomous High-Speed Overtaking using MPC
with Terminal Set Constraints,” IEEE Conf. Intell.
Transp. Syst. Proceedings, ITSC, vol. 2018-
Novem, pp. 1061–1068, 2018, doi:
10.1109/ITSC.2018.8569529.
[3] F. Borrelli, P. Falcone, T. Keviczky, J. Asgari, and
D. Hrovat, “MPC-based approach to active
steering for autonomous vehicle systems,” Int. J.
Veh. Auton. Syst., vol. 3, no. 2–4, pp. 265–291,
2005, doi: 10.1504/IJVAS.2005.008237.
[4] M. Bujarbaruah, X. Zhang, F. Borrelli, and H. Eric
Tseng, “Adaptive MPC for autonomous lane
keeping,” arXiv, 2018.
[5] H. Wang, B. Liu, X. Ping, and Q. An, “Path
Tracking Control for Autonomous Vehicles Based
on an Improved MPC,” IEEE Access, vol. 7, pp.
161064–161073, 2019, doi:
10.1109/ACCESS.2019.2944894.
[6] S. Cheng, L. Li, H. Q. Guo, Z. G. Chen, and P.
Song, “Longitudinal Collision Avoidance and
Lateral Stability Adaptive Control System Based
on MPC of Autonomous Vehicles,” IEEE Trans.
Intell. Transp. Syst., vol. 21, no. 6, pp. 2376–2385,
2020, doi: 10.1109/TITS.2019.2918176.
[7] D. D. Thomas Gillespie, Fundamentals of Vehicle
Dynamics. Warrendale, PA: Society of
Automative Engineers, Inc., 1992.
[8] Bicycle Model, The MathWorks, Inc., 2018.
Accessed on: Dec. 11, 2020. [Online]. Available:
https://www.mathworks.com/help/driving/ref/bicy
clemodel.html.
[9] Lane Keeping Assist System, The MathWorks,
Inc., 2018. Accessed on: Dec. 11, 2020. [Online].
Available:
https://www.mathworks.com/help/mpc/ref/laneke
epingassistsystem.html
[10] Adaptive cruise control system using MPC, The
MathWorks, Inc., 2018. Accessed on: Dec. 11,
2020. [Online]. Available:
https://www.mathworks.com/help/mpc/ug/adaptiv
e-cruise-control-using-model-predictive-
controller.html

You might also like