EE 141 { Project
Spring 2018
Due on June 8th by 5pm (homework dropbox)
In this project we will design a controller for a self-driving car with the purpose of maintaining
the car in its lane. This functionality is also called lane keeping and is already available in
modern (non self-driving) vehicles.
Figure 1: Graphical representation of the bicycle model for a car.
We assume the car to be traveling on a road with constant longitudinal velocity v and we will
use the bicycle model depicted in Figure 1. The position of the car is denoted by (x;y) 2 R2
and its orientation with respect to an inertial frame. is given by 2 [0;2 [. The front
wheels’ angle is denoted by u while denotes the angle between the car’s velocity v and car’s
longitudinal axis. The distance between the front and rear axles and the center of mass is
given by ‘f and ‘r, respectively. The (kinematic) equations of motion are given by:
and the control input is the steering angle u. We will use the following values for the length
parameters:
‘f = 1:1m; ‘r = 1:7m:
1. Show that for any desired in [0;2 [ there exists a u in [0;2 [ so that (4) holds. We
can thus treat as the input since for any computed by a controller we can compute
the steering angle u via the relation (4) and apply this command to the motor steering
the wheels. This will greatly simplify the equations you have to work with.
2. Linearize the equations of motion along a reference trajectory (xr(t);yr(t); r(t)). This
reference trajectory is a solution of (1)-(4) for the input r(t).
3. Your objective is to design a controller so that the car tracks the reference trajectory.
However, the linearized equations are time-varying. In order to eliminate this time
dependence we will consider reference trajectories of the form.:
xr(t) = a+bt; yr(t) = c+dt; a;b;c;d2R:
Show that there exist curves r(t), (t), and a constant velocityv so that (xr(t);yr(t); r(t))
is a solution to (1)-(4) for the input (t) and the velocity v. Show that the linearized
equations of motion become time-invariant for these reference trajectories.
4. Design a controller making the car track the reference trajectory (for your choice of
values a;b;c; and d).
5. Simulate the closed-loop system on simulink using the nonlinear equations (1)-(4). Com-
ment on what you observe.
6. Vary the initial conditions until your controller no longer results in the desired behavior.
Comment on what you observe.
7. Repeat the previous question by xing the initial condition but attempting to track more
challenging reference trajectories, i.e., trajectories that are di erent from the reference
trajectory. For example, a sinusoidal trajectory where you can vary the amplitude and
frequency or a polynomial trajectory where you can vary the monomial’s coe cients.
Comment on what you observe.8. Repeat problem 6 by redesigning your controller so as to place the poles on di erent
locations. Comment on the change in performance and in the control input.