Lecture 3B.2
Time, Motion, and Trajectories (continued) Now to look at a concrete setting, let's discuss the problem of designing a minimum minimum jerk trajectory, which makes sense when we have a third-order system. And let's assume that we've specified the starting position and the end position. Our functional in this case is simply the integral of the suare of the jerk and we want to find the best !"t# that minimi$es this functional%
&e write down the uler (agrange euations, and we see that many terms will simply % disappear because they don't e!plicitly depend on x
&hat remains can be simplified into a si!th-order differential euation which can then be solved analytically. )he result is this fifth-order polynomial in time% x c/t / ct c-t - c,t , c+t c* &hat remains is the sub-problem of solving for the coefficients in this fifth-order polynomial. )here are si! such coefficients. 0n order to solve for these, we1ll need to specify additional boundary conditions. &e've assumed that we know the position at the start and end times, now let's also assume that we know the velocities. 0n this case, we'll assume that these velocities are $ero. 2urthermore, let's assume we know the accelerations at times t3* and t3), again assuming these accelerations to be $ero. 4osition
5elocity
Acceleration
t3 *
A
*
*
t3 )
b
*
*
)he main object of this e!ercise is to ensure that we have as many boundary conditions as the number of constants we're trying to solve for. ach of these boundary conditions gives us an euation, euation, and we can write down si! euations in terms of the unknown constants and the known boundary conditions.
* * * a * b T / T T - T , * * * * * T - -T , ,T * /T * * * * , * ,*T - +,T , 6T ,
*
+ c/
* c- * c, * c+ * c*
T + c + + * *
7olving for these constants is now a linear problem. )his is what the minimum jerk solution looks like%
0n this case, ! varies from $ero to one, over a total of fifty time-units. )he velocity profile is bell shaped starting with $ero-velocity, and ending with $ero-velocity. 0t's uni-modal, reaching a peak velocity in the middle, i.e. at / time-units. )he acceleration looks sinusoidal, starting with $ero-acceleration, accelerating to a peak acceleration value, and then decelerating to a peak deceleration value before ending up at $ero.
)his basic idea can be e!tended to multiple dimensions. 0f we're trying to generate trajectories in the !-y plane, then we end up with two uler (agrange euations% one for the !-direction and one for the y-direction%
8ere's how we might think about the minimum jerk trajectory in three dimensions%
8ere we're looking at a trajectory in the !, y, and space. &e're assuming that we're given a starting ! and y position, a starting orientation, , and that we're given a final !, y, and . &e're trying to find a trajectory that minimi$es the functional given by , . 0f we use the version of the uler (agrange euations for multiple, y, x dimensions, we end up with a very straightforward solution. &e essentially get three fifth-order polynomials, one in the !-direction, one in the ydirection, and one in the direction. 9y plugging in the boundary conditions, we get the on the right. &e have the starting position and orientation, the end position and
orientation, and a smooth transition from start to finish. )he velocity profile is again bell shaped. 0t turns out that this problem is also relevant to modelling human-manipulation tasks where%
Noise in the neural control-signal increases with the si$e of the control-signal. :ate-of-change of muscle fibre lengths is critical in rela!ed, voluntary motions.
)his goes back to a +; doctoral dissertation by )amar 2lash. And can be e!tended to multiple dimensions when two-handed manipulation tasks are considered. 0n robotics, it's rarely sufficient to specify just the initial and final positions and orientations. 0n order to ensure that the trajectory is safe we often want to specify intermediate waypoints. 0nstead of thinking simply about trajectories with known start and end configurations, we want to think about trajectories that pass through intermediate waypoints.
(et's consider the problem. &e1re given a set of intermediate time points and positions that we reuire the trajectory to pass through. )he time points are t*, t+, etc., and the corresponding positions are !*, !+, etc. 0n this case, we assume "m=+# time points, and "m=+# corresponding positions positions A simple way to approach this is to define piecewise continuous-trajectories with one for each time-segment.
)he obvious way of doing it is to simply connect the waypoints. 9ut this is not very practical.
)he result is continuous, but not differentiable. &hat if the system is a second-order system with inertia> Once we get started on the first segment, it's impossible for the second-order system to make the sharp turn at the kink. 0n order to make the trajectory more amenable to higher-order systems, we want to insist that the trajectory is smooth and not have these kinks at the intermediate points. )o see how to solve this problem, let's consider a minimum acceleration curve for second-order systems. &e look to solve for this function in !"t#%
t t , #dt ... " x, #dt min " x x " t # t t +
m
*
m+
)he function now, consists of many terms, each corresponding to a particular segment of the trajectory. 2rom the uler (agrange euations, if we solve this, we find that we get cubics for each segment%
)he resulting function or curve is called a cubic spline. &e now know the functional form of each segment, however, we don't have the constants. )here are m constants for this cubic spline, each corresponding to a degree of freedom. )o determine these constants, we have to specify m different boundaryconditions or intermediate conditions.
?oing back to our schematic, we're looking for a smooth curve%
&e know where the intermediate points are, and that gives us m boundaryconditions. 2urther, we insist that the curve is smooth, more specifically, that it is differentiable up to two times at each of the intermediate points. )hat gives us an additional "m @ +# boundary-conditions. 2inally, we insist that the curve starts and ends with specified velocities. 0n this case, both velocities are taken to be $ero. )hat gives us an further two boundary conditions. 0n total, this gives us m constraints, allowing us to specify the m degrees-of-freedom associated with the undetermined constants. )his basic idea can be generalised to nth-order systems. &e have to specify appropriate boundary-conditions at the beginning and end. And we have to specify intermediate boundary-conditions. )hese intermediate boundary-conditions, specify continuity up to the "n @ +#-order derivitor. )his leads us to minimum-snap trajectories where n 3 . &e're now ready to solve the motion planning problem for uadrotors using minimum snap trajectories.