Here we consider the optimization of an ideal rocket moving straight up against the pull of gravity, but with no atmosphere.
With only gravity to consider the solution should be obvious based on the derivation of the rocket equation. Because we want to maximize burnout velocity we would want to minimize burn time. However doing a formal optimization problem with this simple setup is a good place to start in learning how to optimize trajectories.
To get rid of all the really hard math we make a number of simplifying assumptions in our setup.
- The Earth is flat
- Gravity points down at 1 g (g0) everywhere
- There is no atmosphere (conservative forces only)
- The rocket is constrained to only move vertically
- The rocket is an ideal rocket, with thrust straight down and with a fixed propellant velocity (Isp)
And then we add one interesting part:
- The engine is throttleable
Because the engine is throttleable we have something to optimize. We want to know what throttle setting as a function of time makes our rocket go the highest, thus we have set up an optimization problem where we are going to find and optimal function for some minimization (or maximization) of a solution to the equations of motion.
Lets start with a diagram:
- x is height above ground
- rocket is a mass m
- gravity is g0 down everywhere
- rocket has a velocity v
The rocket moves my exchanging momentum,
- loosing mass m dot
- at a constant velocity ve
So the equations of motion would be:
- x is height above ground
- v is velocity
- ve is the effective velocity of the rocket propellant
- m is the mass of the rocket
- g is gravity
The thing we want to change is m dot, which we will introduce as a parameter u. This is what we are going to throttle.
Which makes the acceleration
Now we build a set of constraint equations using what we know about the system. We put them in the form of
But we also want to introduce one more constraint: that there is a maximum throttle setting on the rocket. So we say that u can be between 0 and umax
There is a problem though, we need this in the fi form and not as an inequality. So we create a dummy parameter α and cleverly make it only exist when u is in the range we want. We can do this by picking a function that is only real in a certain range.
Think about this for a moment, you see how α can only be a real number when u is between 0 and umax. This yields one more constraint equation
We now have 4 constraint equations and 5 dependent variables, plus time.
We have 3 differential equations (velocity, acceleration, and mass) so we would expect 8 boundary conditions (2n + 2 — two for each thing differentiated with time, plus two for time). Lets list the ones we know:
- t0 = 0
- x0 = 0, the ground
- v0 = 0, start from rest
- m0, lift off mass of rocket
- vf = 0, at apogee the rocket must be at rest
- mf, burn out mass of rocket
And we are missing two:
- tf we don't know when the rocket will finish its flight
- xf the final height is what we would like to maximize
We have set up the problem as a calculus of variations problem. The idea is to find the time history of all the functions (e.g., u(t)) which are consistent with all the boundary conditions and constraint equations and at the same time minimizes some function J.
Lets let J be
Because minimizing -x is the same as maximizing x (maximizing the altitude of the rocket).
First lets make an augmented function F by combining all the constraints with undetermined Lagrangian multipliers (p).
Adding f1 through f4 gives us
When there is an extrema we can be guaranteed that the so called Euler-Lagrange conditions are true. The Euler-Lagrange conditions are
For each of our dependent variables (yi). Finding each condition:
We now know a little bit of information about what the solution must look like. But we also have to deal with the missing boundary condition tf. So we use the transversality condition.
The transversality condition states that for the missing boundary must lie along some curve which we can compute. This looks like
where φ is the variable we are maximizing, in this case x.
- Abbot A. S. & Blackford A. L. Guidance, Flight Mechanics and Trajectory Optimization. Volume XV - Application of Optimization Techniques. NASA Contractor Report. NASA CR-1014. April 1968.