Phases of a Trajectory#
Dymos uses the concept of phases to support intermediate boundary constraints and path constraints on variables in the system. Each phase represents the trajectory of a dynamical system, and may be subject to different equations of motion, force models, and constraints. Multiple phases may be assembled to form one or more trajectories by enforcing compatibility constraints between them.
For implicit and explicit phases, the equations-of-motion or process equations are defined via an ordinary differential equation.
An ODE is of the form
where \(\textbf x\) is the vector of state variables (the variable being integrated), \(t\) is time (or time-like), \(\textbf u\) is the vector of parameters (an input to the ODE), and \(\textbf f\) is the ODE function.
Dymos can treat the parameters \(\textbf u\) as either static parameters or dynamic controls. In addition, Dymos automatically calculates the first and second time-derivatives of the controls. These derivatives can then be utilized as via constraints or as additional parameters to the ODE. Subsequently, the optimal control problem as solved by Dymos can be expressed as:
The ability to utilize control derivatives in the equations of motion provides some unique capabilities, namely the ability to easily solve problems using differential inclusion, which will be demonstrated in the examples.
The solution techniques used by the Phase classes in Dymos generally fall into three categories: implicit, explicit, and analytic. They differ in underlying details but mostly allow for the same general form of the optimal control problem.
Implicit solution techniques (using the Radau Pseudospectral Method or Gauss-Lobatto Collocation solve the ODE “all at once” and iteratively change the values of the state variables until the rates of change from the dynamics agree with the rates of change obtained by fitting polynomials to the states over time. Typically, some parameters and control variables affect the path of the state variables.
Explicit solution techniques are typical shooting techniques that propagate the dynamics forward in time from some given initial condition. Like the implicit techniques, using an explicit numerical integration allows for some set of parameters or controls to affect the dynamics of the system.
With an analytic solution, there is no numeric integration occuring because the solution is known analytically. These phases are a fast way to propagate simple dynamics when an analytic solution is avaiable. The downside to analytic solutions is that they don’t allow for the input of a general time-varying control. Such systems are only controlled static parameters of the phase.