Obstacle Avoidance With Safety Guarantees: Feasibility of MPC-based Steering Algorithms
Obstacle Avoidance With Safety Guarantees: Feasibility of MPC-based Steering Algorithms
Obstacle Avoidance With Safety Guarantees: Feasibility of MPC-based Steering Algorithms
Stephan Heinrich
Stephan Heinrich
Examiner:
Paolo Falcone, Department of Signals and Systems
Mathias Lidberg, Department of Applied Mechanics
Typeset in LATEX
Gothenburg, Sweden 2015
iv
Obstacle Avoidance with Safety Guarantees
Feasibility of MPC-based Steering Algorithms
Stephan Heinrich
Department of Signals and Systems
Department of Applied Mechanics
Chalmers University of Technology
Abstract
Enabled by the increasing computational power available in embedded microcon-
trollers, model predictive control (MPC) for automotive applications has been ex-
tensively studied in the past ten years and has attracted industry, among others, for
autonomous driving applications.
Implementing an MPC control algorithm to determine an optimal steering action
in a lane change maneuver involves iteratively solving a Finite Time Constrained
Optimal Control Problem (FTCOCP). Hence, in a situation where the environment
is restricted by lane boundaries and obstacles, the FTCOCP might be unfeasible
because collision avoidance constraints represent strict boundaries that cannot be
violated if passenger safety shall be guaranteed. Intuitively, in such problems in-
feasibility is more likely to occur as the vehicle velocity increases. Furthermore,
because of the problem structure, classical results from MPC theory for guarantee-
ing feasibility cannot be efficiently applied.
This thesis investigates methods to predict an upper bound on the vehicle’s velocity
leading to feasibility guarantees for an MPC-based lane change algorithm. By ex-
ploiting invariant set theory and reachability analysis tools, we focus on the problem
of (offline) characterizing the set of states for which a solution to the lane change
MPC problem exists for a given speed.
An MPC controller is implemented in a vehicle and test data from lane change ma-
neuvers ranging from 50-100 km/h is collected at the AstaZero proving grounds. The
applicability of the proposed method is evaluated by comparison with experimental
data.
v
Acknowledgements
During the past year working on this thesis I had the pleasure to work with a number
of amazing people that dedicated their time and effort to support me in this process.
First of all I would like to thank my examiners Paolo Falcone and Mathias Lidberg
for making this thesis possible and supporting me throughout this period. I don’t
think I could have asked for a better team of advisers in this field. Your support in
both vehicle dynamics as well as control theory let me consider and challenge ideas
and concepts that I was not even aware of at the time when I started this project.
Working along side you really shaped my approach work, to keep challenging existing
thoughts and think outside of the box.
Next I would like to thank Chris Gerdes and the DDL at Stanford. Joining their
lab during the summer was an incredible time. I would not have wanted to miss
the late nights coding and the sizzling hot track days together with Team Marty for
anything. The DDL is full of exceptional people and being part of that for some
time was a very humbling experience.
I would also like to thank my friends and colleagues in the Mechatronics group as
well as the Vehicle Dynamics group at Chalmers. Working together with you has
been an exceptionally welcoming and supportive experience.
I would also like to thank my parents and my brother for supporting me through
all this time. Cheering me up when things got challenging, and always having my
back while I was far away from home let me get through the ups and downs of this
process and makes me feel confident for future challenges to come.
This work would not have been possible without the help and support of all these
exceptional people.
vii
Contents
List of Figures x
1 Introduction 1
1.1 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Structure of the Thesis . . . . . . . . . . . . . . . . . . . . . . . . . . 4
ix
Contents
5 Feasibility by Construction 31
5.1 Analytical Approach Using Hyperrectangle Constraints . . . . . . . . 33
5.2 Numerical Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.2.1 Reachability Calculations with MPT-Toolbox . . . . . . . . . 37
5.2.2 Inner Approximation of Polytopes . . . . . . . . . . . . . . . . 39
5.2.3 Numerical Control Invariant Sets . . . . . . . . . . . . . . . . 41
5.2.4 Numerical N-step Controllable Sets . . . . . . . . . . . . . . . 42
6 Controller Design 45
6.1 Controller Formulation . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.1.1 Motion Prediction . . . . . . . . . . . . . . . . . . . . . . . . 46
6.1.2 System Constraints . . . . . . . . . . . . . . . . . . . . . . . . 47
6.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.2.1 Horizon length . . . . . . . . . . . . . . . . . . . . . . . . . . 49
6.2.2 Simulation environment . . . . . . . . . . . . . . . . . . . . . 50
7 Experimental Testing 53
7.1 Test Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.2 Test Vehicle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.2.1 Testing Equipment . . . . . . . . . . . . . . . . . . . . . . . . 54
7.2.2 Vehicle Parameters . . . . . . . . . . . . . . . . . . . . . . . . 55
7.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
8 Discussion 61
9 Conclusion 65
Bibliography 65
A Analytical Projection I
A.1 Fourier Motzkin Projection Algorithm . . . . . . . . . . . . . . . . . I
A.2 Pre(X ) of the AFI-Model using Hypercube Constraints . . . . . . . . II
A.3 One-Step Controllable Set for the AFI-Model with Hyperrectangle
Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . III
C Experimental Testing IX
C.1 CVXgen Optimization Problem Statement . . . . . . . . . . . . . . . IX
C.2 Controller Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . XI
x
List of Figures
xi
List of Figures
xii
List of Tables
xiii
List of Tables
xiv
1
Introduction
With car manufacturers and tech companies running an arms race towards making
the autonomous vehicle a reality, the field of vehicle motion control attempts to
solve the sub-problem of using steering, braking and throttle to control the motion
of the vehicle within its environment.
This thesis is focused on vehicle motion control in autonomous lane change scenarios
as shown in figure 1.1. As a vehicle approaches slower traffic on a multilane road,
the control algorithm steering the car needs to find a way to avoid the obstacle in
its path. Model predictive control (MPC) has proven to be an efficient approach for
these types of control problems [8]. The MPC controller studied in this thesis finds
the sequence of optimal steering commands to avoid the slower vehicle and change
the lane as the solution of a finite time optimal control problem.
1
1. Introduction
With model predictive control becoming more and more popular for vehicle motion
control, and extensive body of work on this subject has been developed in recent
years.
2
1. Introduction
using an efficient QP-solver algorithm. While the computation time of this approach
can be manually bounded by limiting the number of solver iterations, the approach
cannot guarantee convergence either.
In an alternative approach Hsu and Gerdes [24] as well as following work by Beal,
Erlien and Funke [1], [2], [9], [10], [17] demonstrated a steering controller that com-
bines vehicle stability boundaries and environmental boundaries in one hierarchy
level to be able to avoid obstacles without a separate path replanning step. By in-
troducing environmental constraints in the low level steering controller, it becomes
capable of reacting directly to unexpected obstacles that suddenly appear. They
showed experimental results at controller update rates up to 100 Hz. To achieve
this frequency they linearize the problem around the current vehicle velocity and
utilize efficient problem specific solvers for convex optimization in combination with
powerful computing hardware.
While there has been extensive work and great results from different model pre-
dictive control approaches for vehicle motion control, the overall trade-offs between
generality and accuracy of the solution on the one side and computation time on
the other side still remain a challenge and the optimal approach to this problem is
yet an open field of research.
Trajectory planning algorithms that utilize parametrized maneuvers or nonlinear
optimization can yield pre-calculated trajectories and desired velocity profiles but
typically suffer a trade-off between computational complexity and a need for sim-
plifications that neglect some aspects of the vehicle dynamics.
Approaches that utilize convex QP-solvers have shown to be effective in line fol-
lowing, vehicle stabilization and obstacle avoidance but the problem statements are
linearized and parametrized by velocity. While this is not problematic for simple
path tracking controllers, where the current vehicle speed provides a good approxi-
mation over a relatively short prediction horizon, this property becomes more critical
for controllers that consider longer horizons. These extended horizons are typically
needed if road boundaries and obstacles are to be considered. For problem formu-
lations of that type the velocity may not be assumed as given and the choice of the
desired velocity along the horizon will determine the existence of the solution of the
optimization problem.
3
1. Introduction
boundaries and the location where the ego vehicle must have translated to the other
lane can be described. Therefore this problem can be treated equally to an obstacle
avoidance maneuver with a stationary object.
4
1. Introduction
Figure 1.3: Discrete visualization of location from where feasibility of the maneuver
can be guaranteed. Blue = high speed, green = medium speed, red = low speed.
5
1. Introduction
6
2
Invariant Set Theory and
Reachability Analysis
Invariant set theory and reachability analysis are a powerful tools to mathematically
describe and evaluate possible trajectories of dynamic systems within their state-
space. This chapter provides an introduction to the methods from these fields that
are used to evaluate the feasibility of the highway lane change maneuver.
For a detailed background on the computational geometry involved, the reader is
referred to G. Ziegler’s Lectures on Polytopes [30]. A background on the applications
of these general concepts in the field of constrained optimization and control is
presented in Constrained Optimal Control for Linear and Hybrid Systems by F.
Borrelli [5]. The following definitions provide a condensed excerpt from [5] and [30]
of the most important concepts used in this work. For a further background a survey
of applications of invariant set theory in control can be found in [3].
7
2. Invariant Set Theory and Reachability Analysis
8
2. Invariant Set Theory and Reachability Analysis
V = {Vi }N V
i=1 = vert(P). (2.5)
2.2.3 Projection
By projecting a polytope P ∈ Rn+m ,
n o
P = [x0 y 0 ]0 ∈ Rn+m | P x x + P y y ≤ P c ⊂ Rn+m (2.6)
onto a lower dimensional subspace Rn , a new lower dimensional polytope
9
2. Invariant Set Theory and Reachability Analysis
P ⊕ Q := {p + q ∈ Rn | p ∈ P, q ∈ Q} (2.8)
10
2. Invariant Set Theory and Reachability Analysis
2.3.2 V-Representation
An alternative notation to describe a bounded polyhedron is the vertex represen-
tation. By describing the location its extremal points a polytope can be uniquely
identified. A V-polytope is generated by the convex hull of a finite set of points
V = {Vi }N v
i=1 , where the convex hull is the smallest convex set containing all the
points.
P = conv(V ) (2.10)
11
2. Invariant Set Theory and Reachability Analysis
X , {x | Hx ≤ h}
(2.14)
U , {u | Hu u ≤ hu } .
The system is assumed to be n-dimensional in state and subject to m-inputs.
2.4.1 Reach()-Set
The one step reachable set for the system (2.12) describes the set of states that can
be reached by the function f () under some input u ∈ U. It is defined for a set of
initial states S and described by:
2.4.2 Pre()-Set
As the dual of the one step reachable set, Pre() sets describe the set of the system
(2.12) that can evolve to a target set S in one step under some input u ∈ U.
12
2. Invariant Set Theory and Reachability Analysis
Pre(S) is calculated by a linear mapping of the state constraints through the system
dynamics.
Data: State Update Function f (x, u), Set of State Constraints X , Set of
Input Constraints U
Result: C∞
k=0;
Ω0 = X ;
Ωk+1 = Pre(Ωk + 1) ∩ Ωk ;
while Ωk+1 6= Ωk do
k =k+1 ;
Ωk+1 = Pre(Ωk ) ∩ Ωk ;
end
C∞ = Ωk+1 ;
Algorithm 1: Calculation of the Maximal Control Invariant Set
13
2. Invariant Set Theory and Reachability Analysis
14
2. Invariant Set Theory and Reachability Analysis
Figure 2.7: Evolution of the n-step controllable set for the discrete integrator
15
2. Invariant Set Theory and Reachability Analysis
16
3
Vehicle System Modelling
In this chapter we introduce the dynamic models of the vehicle used in this work.
We describe the motion in the vehicle reference frame in terms of longitudinal and
lateral velocities u and v and the yaw rate r.
In this thesis we describe the vehicle’s the position on a straight multilane road. The
coordinate s describes the position along the road, e denotes the the lateral offset
from the center of a desired lane and ψ measures the heading error relative to the
road orientation as illustrated in figure 3.1.
Assuming small angles for the vehicle heading angle ψ and u v we can describe
the motion of the vehicle in this coordinate system by
ψ̇ =r
ė = sin(ψ) u + cos(ψ)v ≈ ψ u + v (3.1)
ṡ = cos(ψ)u − sin(ψ)v ≈ u − ψ v ≈ u.
For each position along the road s we define lane boundaries
17
3. Vehicle System Modelling
m (u̇ − rv) = cos δ (Fx1 + Fx2 ) − sin δ (Fy1 + Fy2 ) + Fx3 + Fx4
m (v̇ + ru) = cos δ (Fy1 + Fy2 ) + sin δ (Fx1 + Fx2 ) + Fy3 + Fy4
(3.3)
Iz ṙ =a (cos δ (Fy1 + Fy2 ) + sin δ (Fx1 + Fx2 )) − b (Fy3 + Fy4 )
+ d (sin δ (Fy1 − Fy2 ) + cos δ (Fx2 − Fx1 ) − Fx3 + Fx4 ) .
The equations (3.3) are highly nonlinear due to the trigonometric functions and
the multiplicative coupling between the states. While this model is well suited for
simulation applications, simpler models are better suited for control design.
18
3. Vehicle System Modelling
sin δ =δ
. (3.5)
cos δ =1
Combining equations (3.3) and using the assumptions (3.4) and (3.5) we can derive
the equations of motion for the planar rigid one track model, commonly called the
bicycle model
We can describe the side slip angle β of the vehicle at its center of gravity and its
small angle approximation by
v v
−1
β = tan ≈ . (3.7)
u u
For the bicycle model in figure 3.3 we can denote the front and rear tire slip angles
by
v + ar a
αf =arctan −δ ≈β+ r−δ
u ! u
v − br b (3.8)
αr =arctan ≈ β − r.
u u
19
3. Vehicle System Modelling
Fy = −Cα α. (3.9)
The lateral force is saturated at its peak value for slip angles where the entire contact
patch is sliding [23]. This value can be stated analytically and results in
3µFz
αsl = arctan . (3.11)
Cα
20
3. Vehicle System Modelling
While more advanced tire models can capture additional phenomena, such as re-
duced friction for high tire slip angles or the coupling of longitudinal and lateral tire
forces, the models used in this thesis disregards these effects. Since the controller in
this thesis attempts to control the vehicle only in the region up to the peak friction
value, accounting for these effect is not necessary in this context.
An example tire curve from the brush tire model in comparison with the linear
model and a more complex Magic Tire Formula is shown in figure 3.4. The Magic
Tire Formula and the brush tire model have matching peak friction values. All three
models are parametrized with the same cornering stiffness. The figure shows how,
in addition to the saturation effect, the Magic Tire Formula also accounts for the
decrease in lateral force past when the tire starts sliding.
·104
Linear tire model
1
Brush tire model
Lateral Force [N]
−1
u=u
δ=0
(3.12)
v=0
r = 0.
By linearizing the equations of motion of the bicycle model (3.6) for small deviation
around the constant velocity u and conditions for straight line motion (3.12) we can
derive the linear bicycle model
Fyf + Fyr
v̇ = − ru
m (3.13)
aFyf − bFyr
ṙ = .
Iz
21
3. Vehicle System Modelling
Using the approximation of the vehicle side slip from equation (3.7), (3.6) can be
stated in terms of sidslip and yaw rate as
Fyf + Fyr
β̇ = −r
mu (3.14)
aFyf − bFyr
ṙ = .
Iz
Since the effects from the front tire enter the dynamics of the bicycle model simply
as a lateral force input, the non-linearity of the front tire can be captured outside
the dynamic equations. This is not possible for the rear tire as the rear tire forces
are directly coupled with the vehicle states.
In state space formulation the equations of motion of the linear force input model
(3.16) can be stated as
− Cαr bCαr
" # " #" # " #
1
β̇ mu22
−1 β
= bCmu b Cαr + mu
a Fyf . (3.17)
ṙ αr
Izz
− Izz u r Izz
22
3. Vehicle System Modelling
By replacing the rear tire model (3.15) with (3.18) in the linear bicycle model (3.14)
the model (3.17) can be modified to become
(F yr +Ceαr αr )
" #
− Ceαr bC
" # " #
1
β̇ mu
eαr
mu2
− 1 β mu
= + Fyf + −b(F yrmueαr αr ) . (3.19)
b2 C a
ṙ bC
eαr
− Izzeαr r Izz
+C
Izz u Izz
Using this technique, the model is able to account for the saturation effects in-
corporated in the brush tire model. This approach can be used for control design
when the current rear sideslip can be measured from high precision sensors to in-
crease model accuracy over a short prediction horizon. Therefore the time varying
model (3.19) yields better accuracy in dynamic maneuvers than the linear force in-
put model in equation (3.17) and still fulfils the requirements imposed to be used
in efficient optimization algorithms. The model was used by Beal and Gerdes [1]
for model predictive control applications at the limits of handling. However it can
only be used when a good estimate for the rear side slip angle is available. For the
feasibility predictions derived in this work this model cannot be used since we don’t
have any knowledge about the future vehicle motion and therefore are forced to
used the LTV model with the rear tire linearization around the origin as presented
in equation (3.17)
Using the description for the rear slip angle αr = β − ub r, a natural limit for the side
slip arises. By using equation (3.11) and limiting the sideslip to the value where the
rear tire reaches its maximum force αr ≤ αrsl the side slip bound becomes
b b
r − αrsl ≤ β ≤ r + αrsl . (3.21)
u u
Both bounds on this safe handling envelope scale naturally with the longitudinal
velocity u which makes them applicable over a large range of velocities. In their work
Beal and Gerdes showed that for any point on the safe handling envelope a controller
is capable of keeping the vehicle within these boundaries. These constraints describe
23
3. Vehicle System Modelling
40
50 km/h
80 km/h
−20
−40
−10 0 10
Side slip β [deg]
Figure 3.5: Scaling of the Safe Handling Envelope for different velocities
an invariant set for yaw rate and side slip that will be used in further control design
and reachability studies in this work.
24
4
Model Predictive Control
This chapter introduces the basic concepts of model predictive control to illustrate
some challenges for utilizing MPC as a real time control method for vehicle motion
control. This chapter uses notations and derivation from [5].
Model predictive control is an optimal control approach typically aimed at solving
control problems in the presence of constraints. These can be actuator constraints
such as limited steering angles or steering rates in a car or constraints that describe
requirements on the system state. This type of constraint can for example be a
limit on a maximum allowed velocity in some direction or a formulation of road
boundaries that shall not be crossed.
By minimizing or maximizing a cost function the optimal inputs to the system can
be determined by solving an optimization problem. Depending on the size of the
problem the solution of such optimization problem is a computationally expensive
process.
The approach became popular in the process industry in the 1980s. Model predic-
tive control provided the possibility to solve complex multi-variable control problems
that were earlier difficult to handle. As these system typically involved very slow
dynamics, it was sufficient to adjust input over the period of minutes and model pre-
dictive control schemes could be applied with the limited computing power available
[26].
25
4. Model Predictive Control
x∈X
(4.2)
u∈U
in the form of a nonlinear programming problem [5].
Given a discrete time horizon length N and the vector of future inputs
h i
U0→N , u00 , ....u0N −1 (4.3)
that consists of stage costs q (xk , uk ) for each time step of the prediction horizon
and a terminal cost p(xN ).
We can formulate a general finite time optimal control problem for a current state
x(0) and the desired set of terminal set Xf as
∗
J0→N = min: J0→N (x(0), U0→N )
U0→N
26
4. Model Predictive Control
guaranteed for an arbitrary nonlinear program as shown in (4.5). While there have
been applications of general purpose nonlinear solver algorithms in automotive ap-
plications in recent years, they cannot provide convergence guarantees and have
so far been limited to relatively large sampling times due to high computational
complexity [18].
The majority of model predictive control approaches for vehicle motion control in
the past years has made use of efficient solver algorithms for convex optimization
problems [1], [2], [7], [9], [10].
These algorithms have the advantage of efficiently solving large scale optimization
problems. On the downside they require the user to simplify the general problem
(4.5) and approximate it such that the problem formulation can be represented by
a linear system with a convex cost function and affine constraints.
To fulfil these requirements the nonlinear system in (4.1) must be linearized such
that it can be represented in the form
X = {x | Hx ≤ h}
(4.7)
U = {u | Hu u ≤ hu } .
For the vehicle models introduced in chapter 3 we showed how the nonlinear model
(3.6) can be linearized as shown in (3.17) to fit these requirements.
The general objective function (4.4) can replaced by a quadratic version
N −1
x0N P xN x0k Qxk + u0k Ruk
X
J0 (x0 , U0→N ) , + (4.8)
k=0
to ensure that the cost function is convex. The terms Q and R are positive semidef-
inite matrices that assign cost to individual states and inputs over the prediction
horizon. The positive semidefinite matrix P assigns the terminal cost to the final
state.
This allows to describe the optimal control problem as a quadratic program
27
4. Model Predictive Control
that there exist no solutions to the problem without violating either input or state
constraints.
Considering the simple discrete integrator example introduced in section 2.5, it is
easy to find an initial state x0 such that there does not exist any feasible trajectory
for a controller to keep the system states within X for a finite length horizon. For
the initial state x0 = [1 1]0 there exist no allowed control action u ∈ U such that
the state x remains in X in the next time step.
If an MPC controller is faced with this situation the outcome resulting behavior is
dependent on the actual implementation of the solver used. Since no valid result can
be calculated it becomes unclear what control action should be taken. Considering
a car heading for an obstacle at highway speed this certainly presents a situation
that should be avoided.
A common way of avoiding infeasibility is to formulate state constraints as soft con-
straints [6]. Additional slack variables λi are introduced in the constraint inequalities
that are penalized extensively in the cost function if they becomes non-zero. While
input constraints in real systems are usually limited by physical constraints, state
constraints often reflect desired behavior. Therefore is may be acceptable in many
situations that it is acceptable that the state constraints can be slightly violated to
allow the existence of a valid solution.
Using soft constraints the optimization problem (4.9) can be formulated as
28
4. Model Predictive Control
the velocity profile for linearization should be chosen such that infeasibility does not
occur.
4.3 CVXgen
To solve convex optimization problem as illustrated in equation (4.9) CVXgen is used
in this work. CVXgen is a code generator that can generate fast custom C-code for
solving convex optimization problems [27]. It provides an online interface to specify
the optimization problem and generates C-code that can be implemented into any
embedded system that is capable of compiling C-code. The code is optimized for fast
calculations and is almost branch free to allow consistent and predictable execution
times.
The simple QP-problem in equation (4.9) can be described in CVXgen as the fol-
lowing.
minimize
quad(x[N], P) + sum[k=1..N-1](quad(x[k], Q) + quad(u[k-1], R))
subject to
x[k+1] == A*x[k] + B*u[k], k=0..N-1 # dynamics constraints.
H[k]*x[k] <= h[k], k=1..N # state constraints
H_u[k]*u[k] <= h_u[k], k=0..N-1 # input constraints
x[0] == x0
end
29
4. Model Predictive Control
30
5
Feasibility by Construction
Designing a steering control algorithm (5.1) where the path is restricted by solid
obstacles and lane boundaries poses a control problem where infeasibility may occur.
As shown in section 2.5 there may not exist a solution to the problem for some
initial conditions. The existence of the solution is also dependent on the velocity
used to parametrize the vehicle dynamics (3.19). The problem (5.1) is time varying
and standard results to guarantee feasibility from literature do not apply.
Therefore this chapter aims at using tools introduced in chapter 2 to guarantee
persistent feasibility for the problem (5.1). Given a certain distance to an obstacle,
fixed lane boundaries and vehicle capabilities and the state of the vehicle, there
exists an upper bound on the velocity for which feasibility of the problem (5.1) can
be ensured.
In [14] Falcone et al. proposed an algorithm for model based threat assessment by
using methods from reachability analysis and set invariance theory. By targeting
31
5. Feasibility by Construction
a set of safe states within their lane, they predicted threats for lane crossing and
vehicle instability over a finite time horizon. Using a similar approach the feasibility
of the constrained model optimal control problem (5.1) can be studied.
By calculating a control invariant set C (algorithm 1 in section 2.4.3) for the vehicle
model (3.17) subject to the same constraints as in (5.1) we predict the vehicle states
that ensure persistent feasibility and safe driving conditions for future states within
one lane of the road.
If an obstacle is blocking one lane of the road we use this control invariant set within
a single lane C as a target set located in the open lane as illustrated in figure 5.1.
Using algorithm 2 (section 2.4.4) n-step controllable sets K1,... (C) are determined
that guarantee that for all states contained in these sets there exists a sequence of
inputs such that the state can be driven to the the target set C in the safe lane.
With the linear vehicle model (3.17) and road coordinates (3.1), the vehicle motion
can be predicted in the state space X = [β , r, ψ, e]0 by the discrete, parametrized
motion model for discrete steps in s in the form
Figure 5.1: Projection of feasible states for a car approaching a static obstacle
Since the vehicle model is parametrized by the velocity we aim to solve the cal-
culation of KN (C, u) analytically in section 5.1 to obtain an upper bound on the
32
5. Feasibility by Construction
Cαr ts
ts bC
ts
v(k + 1) 1− αr
−u 0 0 v(k)
mu mu m
r(k + 1) bCαr ts 2
r(k) ats
1 − b ICzzαruts
= Izz u
0 0
Izz
+ Fyf (k). (5.3)
ψ(k + 1) 0 ψ(k) 0
0 ts 1
e(k + 1) ts 0 ts u 1 e(k) 0
33
5. Feasibility by Construction
1 1
0.5 0.5
Derivative
Derivative
0 0
−0.5 −0.5
−1 −1
−1 −0.5 0 0.5 1 −1 −0.5 0 0.5 1
State State
(a)Control invariant set C and hyperrect-(b) 1-step controllable set K1 (X ) of the
angle shaped approximation X hyperrectangle shaped inner approxima-
tion X
0.5
Control invariant set C
Derivative
Hyperrectangle approximation X
0
1-step controllable set K1 (X )
1-step approximation
−0.5
−1
−1 −0.5 0 0.5 1
State
(c) Inner approximation of 1-step controllable set K1 (X )
34
5. Feasibility by Construction
We can formulate the state constraints shown in equation (5.4) as a target set X .
Considering a straight road we can assume the constraints on lateral velocity, yaw
rate and heading to be symmetric.
1 0 0 0 vmax
−1 0 0 0 vmax
0 1 0 0 v(k)
rmax
0 −1 0 0 r(k)
r
max
X , ≤ (5.4)
0 0 1 0 ψ(k)
ψmax
0
0 −1 0
e(k)
ψ
max
X
0 0 0 1 emax
0 0 0 −1 −eXmin
v(k − 1)
" # " #
ts 0 ts u 1 r(k − 1)
eX
max
≤ . (5.5)
ts 0 ts u −1 ψ(k − 1) −eX
min
e(k − 1)
Rewriting this equation in terms of the lateral position of the one-step controllable
set e(t − 1) these hyperplanes can be stated as
e(k − 1) ≤ eX
max − ts v(k − 1) − ts u ψ(k − 1)
(5.6)
e(k − 1) ≥ eX
min + ts v(k − 1) + ts u ψ(k − 1).
These two equations simply represent the linear mapping of the boundaries on the
lateral position e for one discrete time step of the motion model (5.3). Since the
model does not have any direct input term on the lateral position, this mapping is
only dependent on the lateral velocity and the lateral motion due to the heading
direction.
Assuming ts > 0 and u > 0, which is true for regular driving situations, we can
again assign a new hyperrectangle approximation into these constraints. With the
35
5. Feasibility by Construction
target set 5.4 being symmetric in all dimensions we can assume the same for the
approximation of the one-step controllable set.
The boundaries on the approximation of the one-step controllable set are defined by
e(k − 1) ≤ eX
max − ts vmax (k − 1) − ts u ψmax (k − 1) (5.8a)
e(k − 1) ≤ eX
max + ts vmax (k − 1) − ts u ψmax (k − 1) (5.8b)
e(k − 1) ≤ eX
max − ts vmax (k − 1) + ts u ψmax (k − 1) (5.8c)
e(k − 1) ≤ eX
max + ts vmax (k − 1) + ts u ψmax (k − 1) (5.8d)
e(k − 1) ≥ eX
min − ts vmax (k − 1) − ts u ψmax (k − 1) (5.8e)
e(k − 1) ≥ eX
min + ts vmax (k − 1) − ts u ψmax (k − 1) (5.8f)
e(k − 1) ≥ eX
min − ts vmax (k − 1) + ts u ψmax (k − 1) (5.8g)
e(k − 1) ≥ eX
min + ts vmax (k − 1) + ts u ψmax (k − 1) (5.8h)
With eX X
min = −emax and all other variables on the right hand side being positive
it is clear that the inequalities (5.8a) and (5.8h) represent the tightest bounds on
e(k − 1). Therefore we can neglect the other inequalities as they will hold true if
these two are fulfilled. The relevant bounds on the lateral position of the one-step
controllable set are described by
eX X
min +ts vmax(k−1)+ts u ψmax(k−1) ≤ e(k−1) ≤ emax −tsvmax(k−1)−ts u ψmax(k−1).
(5.9)
For vmax (k − 1) > 0 and ψmax (k − 1) > 0 we can conclude that emax (k − 1) < eX max
and emin (k − 1) > eXmin . The lateral bounds of the hyperrectangle approximation
of the one-step controllable set are shrinking in each iteration step if we attempt to
assign a hyperrectangle with a nonzero range in the derivative states v and ψ.
Considering an obstacle maneuver in which the safe target set is to the side of
the obstacle while a vehicle is heading straight towards the obstacle renders this
approach impractical. For the lane change maneuver the target set of the N-step
36
5. Feasibility by Construction
controllable set calculation is located in the an open lane this set needs to expand
for each iteration to eventually enclose the vehicle state.
This analytical result can also be confirmed in the simple case of a discrete integrator
as shown in figure 5.2. From the figure it is clear that an approximation of the one-
step controllable set in the shape of a rectangle is always smaller that the target set
X if the target set has the shape of a rectangle.
Therefore a simple approximation of the n-step controllable set using hyperrectangle
constraints cannot be used to efficiently calculate iterations of n-step controllable
sets through a lane change maneuver.
37
5. Feasibility by Construction
Attempting to calculate the invariant set results of the four dimensional vehicle
model using the Fourier-elimination based algorithms lead to a Matlab crash after
only ten iterations. The vertex based algorithm crashed with a Matlab error after
only three iterations. While the exact cause of these errors could not be determined,
it is evident that the implementations of these algorithms are not robust for four
dimensional system with the complexity of the model 5.3. The MPLP-algorithm is
the only algorithm provided in the toolbox that is capable of reliably performing
higher dimensional projections with large numbers of halfspaces.
Figure 5.3 illustrates the performance of the different projection algorithms provided
in the MPT-toolbox and how the complexity and the n-step controllable set increases
if no means for simplification are taken.
103
103
Number of halfspaces
Calculation time[s]
102 102
MPLP
Fourier 101
iFourier
101 Vrep
100
5 10 15 5 10 15
Iteration Iteration
(a) Complexity of the N-step control- (b) Calculation time per iteration
lable set
As shown by the example of the discrete integrator in section 2.5, calculating n-step
controllable sets of systems containing integrators yield in skewed shaped polytopes.
Therefore the accuracy of this calculation is directly correlated with the number of
halfspaces used in the approximation. When calculating such sets the number of
halfspaces increases with each iteration step. While this does increases the accuracy
of the representation it also makes the calculation of the next step more computa-
tionally expensive.
Figure 5.3 shows that this increase in calculation time is exponential almost expo-
nential in the number of halfspaces bounding resulting polytopes. Starting from
eight initial constraints the calculation results in more than 500 hyperplanes in less
than 20 iterations. The calculation time increases from 1.5 seconds for the first
iteration to five minutes. These calculations were performed with Matlab 2011a and
the MPT toolbox 3.2 on a quad core Intel i7 CPU with 2.5 Ghz. From the results it
is clear that this trend makes the calculation of long trajectories with regular com-
puting hardware impossible without suitable approximations algorithms that bound
the calculation time.
38
5. Feasibility by Construction
39
5. Feasibility by Construction
40
5. Feasibility by Construction
While this algorithm has no claim for optimality, it does provide a reliable method for
inner approximation such the sets calculated in algorithm 1 for the control invariant
set, as well as algorithm 2 for the N-step controllable sets, can be calculated with
bounded numbers of hyperplanes.
0.5 0.5
0 0
−0.5 −0.5
0.20 0.20
−0.2 0.2 0 −0.2 −0.2 0 −0.2
Yaw Rate Yaw Rate
[rad/s] Heading Angle Heading Angle
[rad/s]
[rad] [rad]
(a) Slice at β = 0 rad (b) Slice at β = 0.10 rad
The shape of the set reveals some properties that are intuitively understandable. In
the lateral position on the road it is bounded by the physical bounds described by
the width of the road and the width of the vehicle. Along the lateral boundaries
is is clear that a positive heading angle at the negative lateral road boundary is no
problem because it brings the vehicle back towards the center of the track in the
next step. In the same position negative heading is not allowed in the slice at zero
41
5. Feasibility by Construction
sideslip because the vehicle would violate the road boundary in the next step. For a
sideslip of 0.1 rad some amount of negative heading is possible since the lateral the
lateral motion due to the heading angle can be compensated by the sideslip.
Figure 5.7: Projections onto the lateral position and slices at β = 0, r = 0 and
ψ = 0 of n-step controllable sets for a lane change maneuver with 70 km/h
The evolution of the N-step controllable set is shown in figure 5.8. Slices at β = 0
are provided for different iteration steps. The different slices illustrate the expan-
sion of the set over the backwards trajectory. Since significant lateral motion and
therefore a significant expansion of the set in the lateral direction is mainly caused
by driving at significant heading angles, we can see that the set initially gets more
skewed. Large negative lateral positions become possible rather quickly for signifi-
cant positive heading angles.
42
5. Feasibility by Construction
(a) N =0 (b) N = 25
(c) N = 50 (d) N = 75
Figure 5.8: Slices at β = 0 of different N -step controllable set for the lane change
maneuver at 70 km/h
43
5. Feasibility by Construction
When the set spans the entire lateral width of the road as depicted in figure 5.8c,
it continues to expand further to also include states with smaller heading angles
for negative lateral position and larger heading angles for positive lateral positions.
Eventually the set expands to a size such that it contains the target set C laterally
located at the center of each of the lanes
44
6
Controller Design
To gather experimental data to compare a real vehicle’s capabilities with the predic-
tions derived in the previous chapter, an MPC-controller based on similar assump-
tions (5.1) is implemented.
The general concept of the controller implementation follows the work from Erlien,
Funke and Gerdes [9]. In their paper they formulate a shared vehicle control for a
steer-by-wire vehicle that tracks a driver’s steering intent while allowing interven-
tions if the driver input would lead to unsafe situations. In [17] Funke applies the the
concept to fully autonomous vehicles for path tracking with obstacle avoidance. In
this work we assume the reference trajectory to be a straight line within a highway
lane that the controller attempts to track. If an obstacle is detected in in that lane,
the controller has to intervene and calculate an optimal steering trajectory to avoid
the obstacle and return to the original lane.
These possibly conflicting goals are managed by assigning different weighted cost
terms σx to the objectives formulated in equation (6.1).
Forcing the vehicle to stay inside the road boundaries and avoiding obstacles (3.2)
is enforced by soft constraints with the slack variable Senv . Second highest priority
is the avoidance of possibly dangerous driving situations by violating the vehicle’s
45
6. Controller Design
handling capabilities. To ensure the vehicle stability the safe handling envelope
(3.20), (3.21) is enforced with soft constraints using the slack variable Ssh . These
two cost terms (6.1a) with σenv σsh are enforcing safety for the maneuver. Both
terms are significantly larger than all other cost terms in (6.1).
The lane tracking objective σe (6.1b) penalizes the lateral deviation from the desired
path. To avoid severe steering maneuvers when the vehicle is required to travel in a
different lane due to an obstacle, this objective is enforced by a linear term.
To influence the trajectory taken while the vehicle is changing the lane to avoid an
obstacle, additional terms are introduced. A small cost σψ on the vehicle heading ψ
helps avoid oscillations and provides damping to the system. Additional cost terms
on the input force (6.1c) as well as the rate of the input (6.1d) allow reducing the
severity of the steering action when the vehicle has to navigate around an obstacle
and return to its original path.
The prediction horizon is split into a near horizon (6.2a) and a far horizon (6.2c) and
a correction step (6.2b). A small discretization time is chosen for the near horizon
and a significantly longer step size is chosen for the far horizon. For the near horizon
k = [0, ..., nnear ] the controller uses the linear time varying vehicle model (3.19)
which is a bicycle model linearized at the current velocity u = u0 and current rear
tire slip angle αr0 . This allows to account for the rear tire saturation effects. For
the prediction horizon k = [nnear + 1, ..., nf ar ] controller uses the linear force input
model (3.17) which is also linearized at the current vehicle velocity but assumes a
rear tire linearization at αr = 0. This is necessary because for the prediction horizon
further ahead, an estimation of the future rear tire slip angle is becomes inaccurate
since the future motion of the vehicle is yet unknown.
In their paper Erlien, Funke and Gerdes [9] use a 10-step horizon with a sampling
time of 10 ms to capture the vehicle dynamics in the near future and a 30-step far
horizon with a sampling time of 200 ms to cover a longer distance farther ahead of
the vehicle for path planning and obstacle avoidance. The combination of the two
horizons adds up to a total prediction time horizon of 6.1 s.
46
6. Controller Design
The motion model also implements a correction time step (6.2b) between the near
and the far horizon with variable length as proposed in [10]. Since lateral bound-
aries can only be assigned at the discretization points, any obstacle detected in the
prediction horizon has to be extended in the direction of travel to span between
discretization points.
By shortening the first step time of the far horizon dynamically, the spatial location
of all other time steps in the far horizon can remain spatially fixed while the car
is cruising towards the obstacle. This allows the optimization to account for the
fact that the ego vehicle is approaching the obstacle in each sampling interval as
illustrated in figure 6.1. Without the correction step, the optimization would not
account for the fact that it is getting closer until the obstacle would be captured
by the next far horizon discretization point. Since this involves multiple sampling
intervals of the controller it would lead to non-smooth control actions.
Figure 6.1: Visualization of the influence of the correction step on obstacle repre-
senation in the horizon
47
6. Controller Design
soft constraint (6.3a) and enforced over the far horizon as illustrated in figure 6.2.
The safe handling envelope introduced in (3.20) and (3.21) is enforced by constraint
. To make sure that the optimization results can actually be achieved by the vehicle,
the input to the system has to be bounded according to physical limits. Equation
(6.3c) assigns a limit on the maximum lateral front force and the constraint (6.3d)
assigns limits on the maximum rate of change in the input. The total limit of
the lateral force is limited by the lateral force that the front tires can physically
transmit. The rate of change is limited by the steering rate of the robot as well as
the tire properties. The constraint for the rate of change of the input force is only
enforced over the near horizon since it would not have any effect for sampling rates
in the order of 200 ms in the far horizon. The steering actuator is fast enough to
achieve any commanded force input which renders the constraint in the far horizon
unnecessary.
6.2 Implementation
The controller specified in sections 6.1 to 6.1.2 is implemented using a custom solver
generated by CVXgen as presented in chapter 4.3. The detailed formulation to
generate the custom solver used in experimental testing is shown in appendix C.1.
CVXgen provides an online interface to generate and download the C-code for the
solver together with a Matlab-MEX interface for the embedded solver and an imple-
mentation of the specified problem statement using the general purpose CVX-solver
that is not optimized for embedded execution. This enables the possibility to com-
pare the custom solver with a more general solver to make sure it performs according
to specification. To ensure that simulation results are consistent with the implemen-
tation in the vehicle, the custom solver C-code is also used for simulations in this
work.
48
6. Controller Design
The C-code is integrated into a Simulink model using an S-Function Builder Block.
This block offers a simple interface in which inputs and outputs to the S-function are
specified and a wrapper function is used to feed the solver code with the numerical
data of the optimization problem. The interface of the block is shown in figure 6.3.
Figure 6.3: S-Function Builder block that implements the CVXgen code
49
6. Controller Design
Lateral Displacement 6
30 km/h - 5/20 step horizon
4 30 km/h - 10/30 step horizon
50 km/h - 5/20 step horizon
2 50 km/h - 10/30 step horizon
70 km/h - 5/20 step horizon
0 70 km/h - 10/30 step horizon
Road boundaries
−2
60 80 100 120 140 160
Position along the track
Figure 6.4: Simulation results of the double lane change with different prediction-
horizon lengths
The CarMaker Simulink extension provides access to the simulated vehicle motion
data similar to what a high precision GPS system can provide in a real vehicle.
For the purpose of simulating the steering controller the VehicleControl subsystem
50
6. Controller Design
shown in figure 6.5 is modified. By replacing the steering command from the driver
simulation with a steering command calculated by the controller, the vehicle motion
can be simulated in closed loop.
51
6. Controller Design
52
7
Experimental Testing
Controller tests are performed at constant velocity in the range from 50 to 100 km/h.
During the tests the obstacle, visualized in red, becomes recognized by the controller
only after the vehicle comes closer than a specified distance to the obstacle. This
53
7. Experimental Testing
distance is adjusted according to the longitudinal velocity of the test vehicle and
used to adjust the difficulty of the maneuver.
By varying the reference path in the starting lane, the difficulty of the double lane
change maneuver is varied. Tests are performed with the reference trajectory along
the center of the starting lane as well as with the reference path located at ±0.5 m
lateral offset from the center of the starting lane.
54
7. Experimental Testing
55
7. Experimental Testing
·104
1
Front tire samples
Tire lateral force [N] Rear tire samples
0.5 Front tire model
Rear tire model
0
−0.5
−1
−0.2 −0.15 −0.1 −5 · 10−2 0 5 · 10−2 0.1 0.15 0.2
Tire slip angle [rad]
7.3 Results
Experimental tests were performed at the AstaZero proving grounds.
The controller described in section 6.1 was used to gather experimental data to
determine the test vehicles capabilities in performing a double lane change maneuver
and avoiding an static obstacle while maintaining vehicle stability as described in
section 7.1. The controller parameters that were used during experimental testing
are shown in appendix C.2.
Table 7.3 shows an overview of the results from the tests performed. It illustrates
which maneuvers were performed without violating the safe handling envelope and
which maneuvers were only possible with driving past these limits.
Test results for the velocities below 70 km/h lead to fast and violent steering maneu-
vers but they did not violate the save handling envelope during testing. The vehicle
tends to understeer which makes it hard to avoid the obstacle but does not pose a
threat to vehicle stability. For higher velocities the vehicle is much more likely to
violate the stability boundaries.
Figures 7.5 to 7.7 present experimental test results from the double lane change
maneuver at 50, 70 and 100 km/h. The first plot for each velocity shows a bird’s eye
56
7. Experimental Testing
view on the situation with the cones and outer lane boundaries physically delimiting
the track. Dashed inner boundaries represent the area that the center of gravity of
the car has to stay within. The dotted black line indicates the center line of the
starting lane that is obstructed by the obstacle.
For each velocity three results are presented where the reference line is either on the
center of the starting lane or parallel with a lateral offset of ±0.5 m.
Table 7.3: Safe handling envelope violation during double lane change maneuvers
While results from experimental testing of a similar controller in [9] show a significant
build-up of side slip when performing similar maneuvers on low friction (µ ≈ 0.55)
surfaces when approaching the handling limits. This behavior was not observed
during the testing for this work. On the high friction asphalt (µ ≈ 0.88) in this
work the vehicle builds up significant yaw rate before building up side slip.
This observation is consistent with expectations that can be derived from the com-
parison between high- and low-friction tire curves presented in literature [28]. Tire
curves measured on low friction surfaces tend to have lower cornering stiffness and
a less pronounced peaking behavior as opposed to tires on high friction surfaces.
Therefore the rear tire can build up more side slip while still remaining in the con-
trollable area. With stiffer tires on a high friction surface the yaw rate may build up
quicker without significant rear tire slip. Only when the rear tires passes the peak
friction level, the side slip will increase significantly.
Overall it can be concluded that the controller is able to stabilize the vehicle and
allows the operation of the vehicle close to its handling limits. As illustrated in
figure 7.6c and ??c the controller even manages to control the vehicle when the of
the yaw rate limit of the safe handling envelope is slightly violated.
These results provide a good measure to evaluate the applicability of the feasibility
predictions derived in the previous chapter.
57
7. Experimental Testing
6
Desired trajectory
Lateral position [m]
Track boundaries
4 Driving boundaries
Cone positions
2 Obstacle Recognition
Vehicle path - 0m
0 Vehicle path +0.5m
Vehicle path -0.5m
−2
−40 −20 0 20 40 60
Longitudinal position [m]
(a) Vehicle trajectory during double lane change
Road wheel angle [◦ ]
5
Yaw rate r [◦ /s]
20
0 0
−20
−5
−40 −20 0 20 40 60 −10 0 10
Longitudinal position [m] Side slip β [◦ ]
(b) Steering input (c) Safe handling envelope
Figure 7.5: Experimental results from the double lane change maneuver with 50
km/h with 25 m pop-up obstacle
58
7. Experimental Testing
6
Desired trajectory
Lateral position [m]
Track boundaries
4 Driving boundaries
Cone positions
2 Obstacle Recognition
Vehicle path - 0m
0 Vehicle path +0.5m
Vehicle path -0.5m
−2
−40 −20 0 20 40 60
Longitudinal position [m]
(a) Vehicle trajectory during double lane change
Road wheel angle [◦ ]
5 20
0 0
−5 −20
Figure 7.6: Experimental results from the double lane change maneuver with 70
km/h with 30 m pop-up obstacle
59
7. Experimental Testing
6
Desired trajectory
Lateral position [m]
Track boundaries
4 Driving boundaries
Cone positions
2 Obstacle Recognition
Vehicle path - 0m
0 Vehicle path +0.5m
Vehicle path -0.5m
−2
−40 −20 0 20 40 60
Longitudinal position [m]
(a) Vehicle trajectory during double lane change
Road wheel angle [◦ ]
5 20
Yaw rate r [◦ /s]
0 0
−5 −20
−40 −20 0 20 40 60 −10 0 10
◦
Longitudinal position [m] Side slip β [ ]
(b) Steering input (c) Safe handling envelope
Figure 7.7: Experimental results from the double lane change maneuver with 100
km/h with 45 m pop-up obstacle
60
8
Discussion
Using the data collected from experimental results shown in section 7.3 we can
evaluate the applicability of the numerical offline calculations. Figure 8.1 shows the
experimental results of vehicle performing the lane change maneuver at 70 km/h in
comparison with the numerical predictions calculated in chapter 5.
Dotted gray lines indicate the spatial locations of projections of the offline precal-
culated N-step controllable sets on the lateral position. Stars on the trajectories
indicate points that are contained in the predictions at a given location and circles
along the trajectory indicate measurements which are not contained in the corre-
sponding N-step controllable set.
At these instances the feasibility of the controller as well as the safety for the future
trajectory in the lane change maneuver cannot be guaranteed.
The measurements which are not contained in their respective N-step controllable
sets correspond to the time instances where the yaw rate in the experimental tests
was already outside of the the safe handling envelope as indicated by the red circles
in the figures 8.1a to 8.1c. Clearly from such point a feasible trajectory that satisfies
the handling constraints is unlikely to exist as it would require the system to bring
the vehicle states back into the safe handling envelope within a single time step.
For other points along the observed trajectories, even before the constraint violation
in the magenta trajectory, the numerical offline calculations predict the existence of
feasible solutions for the maneuver.
Therefore we can conclude that the predictions are rather overoptimistic with respect
to what the controller can actually achieve. The N-step controllable set calculation
from section 5.2.4 promises the existence of a feasible trajectory without constraint
violation for all three initial locations but the controller in closed loop does not man-
age to keep the vehicle along such trajectory and within the safe handling envelope
for the increased lateral offset in the lane change maneuver.
By considering the steering input data shown in figure 7.6 and the yaw rate data in
figure 8.1b, it seems likely that with a smoother control action it would be possible
to pass the obstacle while remaining within the handling envelope. If the controller
would be able to maintain a more constant yaw rate it should be possible to pass
the obstacle for all three starting positions without violating stability boundaries.
This lack of optimality of the observed control action can be attributed to a model
mismatch between the controller prediction model and the real vehicle dynamics.
Model mismatches between the prediction model used in the controller and the real
vehicle are inevitable since every prediction model can only be an approximation of
reality.
The bicycle model used in the controller is based on a number of simplifications (3.4)
61
8. Discussion
Desired trajectory
Lateral position [m]
4 Track boundaries
Driving boundaries
Cone positions
2 Obstacle Recognition
Reachability projections
0 Vehicle Path - 0m
Vehicle Path +0.5m
Vehicle Path -0.5m
−2
−35 −30 −25 −20 −15 −10 −5 0 5
Longitudinal position [m]
(a) Spatial projections of feasibility predictions
20
Yaw Rate [deg/s]
20
Yaw rate r [◦ /s]
0 0
−20 −20
−35 −30 −25 −20 −15 −10 −5 0 5 −10 0 10
◦
Longitudinal position [m] Side slip β [ ]
(b) Yaw rate envelope violations (c) Handling envelope
62
8. Discussion
and (3.5). This mismatch may lead to situations where control actions that were
predicted and calculated to keep the vehicle within the stability bounds actually
lead to a violation of the these limits.
Modeling assumptions (3.4) and (3.5) as well as the linear rear tire model (3.9) used
in the reachability calculations 5.2 also lead to mismatches between the feasibility
calculation and actual capabilities of the vehicle.
Although these assumptions typically yield accurate results only up to half of the
vehicle’s handling limits [28], the experimental results from the lane change at the
limits of handling still shows close resemblance to the numerical predictions.
While the experimental results showed that the controller implemented is able to
stabilize the vehicle up and even slightly beyond its handling limits, this will typically
not be necessary for the highway lane change maneuver considered in this work.
Significantly reduced limits on yaw rate and side slip will be enforced for a fully
automated vehicle driving on a highway. To ensure the comfort and the perception of
safety of a passenger in such vehicle the motion will have to very smooth. Therefore
for the application in a fully automated lane change we can expect a better match
between experimental performance and feasibility prediction.
A further approach for improving the concept presented in this work resulting in
better prediction accuracy could be attempted by explicitly accounting for model
mismatches in the sense of disturbances. Both suboptimal control action in the ve-
hicle as well as the errors introduced due to model mismatch between the prediction
model for the offline calculations and the real vehicle’s handling capabilities could
be described by disturbances. If quantified properly they could be used to yield
more conservative robust control invariant sets as well as robust N-step controllable
sets which would improve prediction accuracy.
63
8. Discussion
64
9
Conclusion
The work presented in this thesis provides an analysis of possibilities for using reach-
ability analysis and invariant set theory to predict feasibility for a MPC controller
performing an lane change maneuver.
To study the possibility of an online implementable algorithm the analytical solution
of one iteration step of the N-step controllable set algorithm using hyperrectangles
for inner approximation was determined.
We were able to prove that iteratively performing inner approximations of interme-
diate sets for control invariant set calculations or N-step controllable set calculations
for systems containing integrators using such simple geometrical shapes leads to an
inevitable collapse of the sets considered.
Although computationally very expensive, it was shown that with a heuristic ap-
proximation algorithm it is possible to numerically calculate the control invariant
set as well as N-step controllable sets for a vehicle in a lane change maneuver.
To compare these offline precalculated predictions with experimental data an MPC
controller was implemented that proved to be able to stabilize and control the vehicle
during a lane change maneuver up and even slightly beyond the handling limits.
The predictions are slightly overestimating the ability of the controller to find a
solution to pass an obstacle without violating vehicle stability boundaries.
We can attribute this result to modelling assumptions necessary to enable both the
calculation of the feasibility prediction as well as the real-time controller imple-
mentation which loose accuracy in the high dynamic maneuvers performed in this
work.
Future work can account for these inaccuracies by modelling them as disturbances
which would lead to more conservative and precise results. Furthermore an applica-
tion in a real autonomous vehicle will lead to an increased accuracy of the predictions
since the modelling assumptions used are more accurate in typical driving situations
compared to the severe lane change maneuver used for evaluation in this work.
From these results we can conclude that the feasibility of an MPC controller in a
lane change maneuver can be evaluated using the techniques illustrated in this work.
For an implementation in a vehicle it is possible to determine the upper bound for
a feasible velocity of a maneuver by offline precalculating the maneuver for a range
of velocities and using this data online to determine the feasibility of the maneuver
for a given vehicle state in relation to an obstacle or a preceding car in its lane.
65
9. Conclusion
66
Bibliography
67
Bibliography
[12] Falcone, P., Borrelli, F., Asgari, J., Tseng, H. E., & Hrovat, D. (2007). A model
predictive control approach for combined braking and steering in autonomous
vehicles. 2007 Mediterranean Conference on Control Automation, 1–6.
[13] Falcone, P., Borrelli, F., Tseng, H. E., Asgari, J., & Hrovat, D. (2008). A hier-
archical Model Predictive Control framework for autonomous ground vehicles.
2008 American Control Conference, 3719–3724.
[14] Falcone, P., Ali, M., & Sjöberg, J. (2011). Predictive threat assessment via
reachability analysis and set invariance theory. IEEE Transactions on Intelligent
Transportation Systems, 12(4), 1352–1361.
[15] Fiala, E. (1954) Lateral forces on rolling pneumatic tires, Zeitschrift V.D.I.,
vol. 96/29, 973–979.
[16] Funke, J., & Gerdes, J. (2013). Simple Clothoid Paths for Autonomous Vehicle
Lane Changes at the Limits of Handling. Asme 2013, 1–10.
[17] Funke, J., (2016) Collision Avoidance Up to the Handling Limits for Au-
tonomous Vehicles, Doctoral dissertation, Stanford University, USA
[18] Gao, Y., Gray, A., Frasch, J. V, Lin, T., Tseng, E., Hedrick, J. K., & Borrelli, F.
(2012). Spatial Predictive Control for Agile Semi-Autonomous Ground Vehicles.
Proceedings of the 11th International Symposium on Advanced Vehicle Control,
VD11(2), 1–6.
[19] Goubault, E., Mullier, O., Putot, S., & Kieffer, M. (2014). Inner Approximated
Reachability Analysis. In Proceedings of the 17th International Conference on
Hybrid Systems: Computation and Control (pp. 163–172). New York, NY,
USA: ACM.
[20] Gray, A., Gao, Y., Lin, T., Hedrick, J. K., Tseng, H. E., & Borrelli, F. (2012).
Predictive control for agile semi-autonomous ground vehicles using motion
primitives. American Control Conference (ACC), 2012, 4239–4244.
[22] Herceg, M., Kvasnica, M., Jones, C., & Morari, M. (2013). Multi-Parametric
Toolbox 3.0. In Proceedings of the European Control Conference (pp. 502–510).
[24] Hsu, Y. H. J., & Gerdes, J. C. (2009). Envelope Control: Keeping the Vehi-
cle Within its Handling Limits Using Front Steering. Proceedings of the 21st
International Symposium on Dynamics of Vehicles on Roads and Tracks.
[25] ISO 3888-1:1999 Passenger cars — Test track for a severe lane-change manoeu-
vre — Part 1: Double lane-change, ISO, Geneva, Switzerland
68
Bibliography
[27] Mattingley, J., & Boyd, S. (2012). CVXGEN: A code generator for embedded
convex optimization. Optimization and Engineering, 13(1), 1–27.
[28] Pacejka, H.B (2005) Tire and Vehicle Dynamics. Society of Automotive Engi-
neers, Warrendale, PA USA, 2nd edition
[29] Schrijver, A. (1998). Theory of Linear and Integer Programming. John Wiley
& sons. pp. 155–156. ISBN 0-471-98232-6.
[30] Ziegler, G. M., (1995) Lectures on Polytopes, Springer New York, updated
Seventh Printing of the First Edition
69
Bibliography
70
A
Analytical Projection
The rows of the matrix A are sorted according to the value of the elements ai,j in
the row j to be eliminated. Indices of Zero entries are stored in Z while indices of
positive and negative entries are stored in P and N . The set R is used to represent
the intersection of all indices of Z as well as tuples created by N × P . Iterating
through the elements of R the new set of inequalities is built. If an inequality had a
zero entry for the variable to be eliminated it remains unchanged. For all the tuples
in R the inequalities are combined in such way that the entry for the inequality to
be eliminated becomes zero. The new set of inequalities contains only zero entries
in the jth column and therefore becomes independent of that dimension.
I
A. Analytical Projection
II
A. Analytical Projection
III
A. Analytical Projection
IV
B
Inner Approximation of
Symmetric Polytopes
V
B. Inner Approximation of Symmetric Polytopes
VI
B. Inner Approximation of Symmetric Polytopes
end
else
disp('Corrupt facet detected..')
end
% Keep the smaller distance to the origin to remain symmetric
dList(i) = min([dPos dNeg]);
end
%% Find Halfspaces with similar normal vectors and combine them to an inner
% approximation
% Initially determine angles between hyperplanes
AngleMatrix = zeros(size(SlopeList,1),size(SlopeList,1));
for i = 1:size(SlopeList,1)
AngleMatrix(:,i) = SlopeList*SlopeList(i,:)'./ ...
(sqrt(sum(SlopeList.*SlopeList,2))*sqrt(SlopeList(i,:)*SlopeList(i,:)'));
end
% Ignore diagonals
AngleMatrix(eye(size(AngleMatrix))== true) = 0;
% Determine the angle between hyperplanes
[max_val,idx]=max(abs(AngleMatrix(:)));
% Iteratively combine halfspaces until conditions are met
while max_val > cos(tolAngle*pi/180) && ...
size(SlopeList, 1) > nSymmetricConstraints
% Determine which hyperplanes will be combined
[row,col]=ind2sub(size(AngleMatrix),idx);
%Check if they are in the same direction and combine
if sign( AngleMatrix(row, col)) == 1
NewSlope = (SlopeList(row,:)+SlopeList(col,:))./2;
PosVertexList = [VertexArrayPos{row};VertexArrayPos{col}];
NegVertexList = [VertexArrayPos{row};VertexArrayPos{col}];
else
NewSlope = (SlopeList(row,:)-SlopeList(col,:))./2;
PosVertexList = [VertexArrayPos{row};VertexArrayNeg{col}];
NegVertexList = [VertexArrayNeg{row};VertexArrayPos{col}];
end
% Determine new distance to the origin
New_d = min([abs(NewSlope*PosVertexList'), abs(NewSlope*NegVertexList')]);
% Change the starting matrices to enable iteration
VertexArrayPos(max([row col])) = [];
VertexArrayPos(min([row col])) = [];
VertexArrayNeg(max([row col])) = [];
VertexArrayNeg(min([row col])) = [];
VertexArrayPos{end+1} = PosVertexList;
VertexArrayNeg{end+1} = NegVertexList;
SlopeList(max([row col]),:) = [];
SlopeList(min([row col]),:) = [];
SlopeList(end+1,:) = NewSlope;
dList(max([row col])) = [];
dList(min([row col])) = [];
dList(end+1) = New_d;
% Recalculate the angles between remaining hyperplanes
AngleMatrix = zeros(size(SlopeList,1),size(SlopeList,1));
for i = 1:size(SlopeList,1)
AngleMatrix(:,i) = SlopeList*SlopeList(i,:)'./ ...
(sqrt(sum(SlopeList.*SlopeList,2))...
*sqrt(SlopeList(i,:)*SlopeList(i,:)'));
VII
B. Inner Approximation of Symmetric Polytopes
end
% Ignore diagonals
AngleMatrix(eye(size(AngleMatrix))== true) = 0;
%calculate the vectors that should be combined
[max_val,idx]=max(abs(AngleMatrix(:)));
end
%% Rebuild the approximated polytope
P_out = Polyhedron([SlopeList; SlopeList.*(-1); H_SingleHyperplanes],...
[dList; dList; h_SingleHyperplanes]);
end
VIII
C
Experimental Testing
# Input limits
Fyf_max nonnegative # Input limit.
dFyf_max nonnegative # Input slew rate limit.
IX
C. Experimental Testing
# Environmental envelope
H_env *x[t] <= G_env[t] + s_env[t] , t=T_short+1..T_long
X
C. Experimental Testing
σenv 1000
σsh 60
σe 10
σψ 5
σunear 2 × 10−6
σuf ar 2 × 10−5
σdunear 5 × 10−10
σduf ar 5 × 10−9
XI