You are on page 1of 4

Lecture 3B.

Time, Motion, and Trajectories


Until now, we've been discussing how to control a quadrotor given a specified
trajectory. We can now turn our attention to generating that trajectory.
Given a three-dimensional environment, we want to specify points and have the
quadrotor plan obstacle-free trajectories in that environment. Accordingly, we'll
consider a very simple sub-problem.
Imagine you have a rigid body or a quadrotor that needs to go from a start position to
a goal position. Of course, we're also interested in orientations, and in this problem,
we may have intermediate positions that we want the rigid body or quadrotor to go
through.

This is a very general problem, it arises in all contexts in robotics, and it's particularly
important for motion planning for quadrotors. The general set up of this problem is as
follows.
We're given start and goal positions, and, optionally, orientations. We might want the
quadrotor to visit intermediate positions or waypoints which can also include
orientations. In general, we require the trajectories that the quadrotors follow to be
smooth because the quadrotor is a dynamical system and cannot follow arbitrary
trajectories. This generally translates to minimizing the rate of change of input.
We're particularly interested in the order of the dynamical system. If we have a robot
with a kinematic model, in other words one in which we can arbitrarily specify
velocities, that's a first order system. If we have a robot with second-order dynamics,
that means that we can arbitrarily specify accelerations. For third-order systems, we
should be able to control or specify or command the third-order derivative which is
called jerk. And likewise, a fourth-order system involves specifying or commanding
the fourth derivative, which is called snap. The order of the system determines the
input. If it's an nth order system, i.e. we're specifying or the nth derivative of position,
we generally have boundary conditions on the first-order, second-order, third-order,
, all the way up to the (n-1)th derivative.

To solve this problem, we use tools from calculus of variations. Calculus of variations
refers to a body of literature in mathematics that deals with a very simple problem. In
this equation, we're trying to minimize an integral:
T

x (t ) arg min L( x, x, t ) dt

x (t )

We're trying to find the best function x(t), that minimizes a functional. The functional
is the integral of L, which depends on the function x(t), x (t ) , and of course, time. The
goal in calculus of variations is to find the best function, x*(t).
This problem arises in several settings.

If we want to find the shortest distance path, we would use a functional which is the
integral of x 2 , or the square of velocity. If we're trying to find the shortest-time path,
a problem that arises in optics, we let L be the simple functional 1. In mechanics, we
usually refer to a functional that's obtained from the kinetic energy T and the potential
energy V.
In our case, were interested in connecting two given points, x, specified at time = 0,
and x specified at time = T.

We're looking for the best trajectory, and we restrict ourselves to differentiable
curves. There are, of course, many such differentiable curves, and we are looking for
something that minimizes a suitable functional.
Independent of the functional, the optimal curve, must satisfy what are called Euler
Lagrange equations.
d L L
0

dt x x
These are necessary conditions that must be satisfied by this optimal function. The
Euler Lagrange equations involve partial derivatives and full derivatives. We take the
partial derivative of L with respect to x and the partial derivative of L with respect to
x. We also need the derivative with respect to time.
Let's look at the Euler Lagrange equations for the simplest setting.

We specified x at time, t = 0, and also at time t =T. Let's make the functional the
integral of x (t ) 2 . In other words, in this case, the input is simply the velocity. We're
going to try to minimize the square of this input, or the square of the velocity
integrated over the entire trajectory.
If we take the Euler Lagrange equations and let the functional L be equal to x (t ) 2 , we
quickly find that this equation reduces to a very simple differential equation:
L( x , x, t )dt x 2

x 0

which we can then solve. The resulting equation is simply that a straight line:
x c1t c0
Going back to the specified boundary conditions, i.e. the fact that we want the straight
line to start at x0 at time t = 0, and end at xT at time t = T, we can get the straight line
equation.
This is the case when we have a first-order system where the input is the velocity, and
it works for robots that have a kinematic model (one where we can specify the
velocity).

In general, our system might be characterised by higher-order dynamics. So for an nth


order system, we might not be able to specify, or command, the velocity. The system
has inertia, and we can't arbitrarily specify velocities. For an nth order system, the
input is the nth derivative of position. In this setting, the Euler Lagrange equation
looks a little more complicated. But once again, it involves partial and full derivatives
of L:

If we take n=1, as we've seen, we get the shortest distance curve, the straight line.
N=2 corresponds to minimizing a functional that involves the square of the
acceleration. N=3 involves minimizing the square of the jerk. N=4 involves
minimizing the snap.

Accordingly, we get the minimum velocity trajectory, the minimum acceleration


trajectory, the minimum jerk trajectory, and the minimum snap trajectory.
One thing we might ask is: why is the minimum velocity curve also the shortest
distance curve? n=1 really corresponds to the minimum velocity trajectory, and yet it
yields the shortest distance trajectory.
Why is that?

You might also like