Lecture 2 of IRC, LIAM, Fields-CQAM MfPH Training Series
2020-03-16
@York University
where codomain dimensions of dynamic process \(x\), control \(u\), performance index \(\psi\), ODE constraints rhs \(f\), path constraints \(c\), and point constraints \(r\) are \(n^x,n^u,n^x,n^c,n^r\) respectively. Time horizon \(\mathcal{T}\) is \([t_0,t_f]\) and grid points are \(t_i, 0\le i \le m\).
\(u \in \mathcal{U}\), set of all measurable functions;
\(x \in \mathcal{X}\), set of all state trajectories;
\(f\) is piecewise LIPSCHITZ continuous;
\(c\) may contain mixed path and control constraints, restrict \(x(t_0)\) and boundary conditions for state trajectories.
\(r\) imposes constraints on states at grid points, such as initial, terminal, or periodicity constraints, which is coupled.
BOLZA type is the sum of an integral contribution(the LAGRANGE) and an end-point contribution(the MAYER),
Least-square type is about the deviation of state trajectory from the desired path and terminal state,
coupled or decoupled?
The state \(x(t)\) is approximated; the control \(u(t)\) is specified. For example,
then model (1.1) has a straightforward transcription of every component: the objective function or the performance measure \(\psi(\cdot)\), the ODE, the path constraints, and the point constraints. Especially the path constraint is only respected on grids \(t_i, i=0,\cdots,m\).
transcripted as:
which is solved as a Nonlinear Optimization problem.
nonlinear solvers need to evaluate \(f,g,h\), as well as their derivatives.
higher order approx functions;
piecewise approx functions on intervals;
enforce the path constraint at more points, like midpoint or quadrature;
more.
similar level of accuracy for both the state and control;
can deal with cases where control is less known, like torque to joints of a walking robot.
the state is complicated and needs much higher accuracy than enforcement at grids only;
the control is simple, for example, the vaccination level as a step function.
Only the control is specified. For example, \(\mathbb{q}=[q_0,\cdots,q_m], u(t)=q_i, \forall t \in [t_i, t_{i+1}], i=0,\cdots,m\) as vaccination levels.
\(x(\cdot;\mathbb{q})\) is evaluated as an initial value problem(IVP) for any iterate \(\mathbb{q}\) during the nonlinear optimization process. The gradients of \(\psi(\cdot), c(\cdot), r(\cdot)\) with respect to \(\mathbb{q}\) are numerically approximated, to be detailed in the multiple shooting method.
For each \(i=0,\cdots,m\), the \(x_i(t;\mathbb{q_i}), t \in [t_i,t_{i+1}]\) is evaluated as an independent IVP for any iterate \(\mathbb{q_i}\) in the optimization process. Apprantly we can achieve higher accuracy on smaller intervals. To match these pieces, we create aux variables \(s_0,\cdots,s_m\) as the initial state on each interval and add matching constraints:
Since \(s_i\) are decision variables, they are initialized, which enables first IVP evaluations; they are updated at each iteration, which enables subsequent IVP evaluations.
The matching constraints are implemented as penalty terms in the objective function.
Here \(\mathbb{q_i}\) are parameters of a control function on the \(i\) th interval, and \(x_i(\cdot;\mathbb{q_i})\) is the corresponding dynamic process. Apparantly one can specify different parameterized control functions.
and derivatives of \(x(t_f;q)\) w.r.t. \(q, s\) are sensitivities of this IVP. We need to apply this analysis to all IVP problems of multi shooting intervals, so the nonlinear solver can get derivatives to make progress.
where \(\eta(\cdot)\) is the numerical result, etc., Runge-Kutta, \(x_d(\cdot)\) is the directional derivative w.r.t. \(d=[d^x,d^q]\). END is not accurate since the two \(\eta(\cdot)\) evaluations may internally used different grids, different pivoting, and even different adaptive schemes.
We define a new IVP for computing the directional derivative:
where \(\dot{x}_d(t)\) is an artificially constructed dynamic process, which shall be evaluated simutaneously with the \(x(t)\). Second order derivatives could be calculated from this new IVP and automatic differentiation.
manually derived analytical expression
inefficient
numerical error, especially for higher orders
inefficient
apply the chain rule in the actual computation
works for both first and higher orders
efficient vectorized computation
In case you have a good guess of state variables you may incorporate them in multiple shooting;
single shooting faces a longer time horizon and demands a very good initialization; o.w. IVP may not even have a solution, which chokes;
numerical integration over longer horizon are error-prone;
single shooting is easier and may work well.
Mixed-Integer Optimal Control, Convexification and Relaxation.
KIRCHES, CHRISTIAN. Fast Numerical Methods for Mixed-Integer Nonlinear Model-Predictive Control, 2010, PhD dissertation.
MATTHEW KELLY. An Introduction to Trajectory Optimization: How to Do Your Own Direct Collocation. SIAM Review, Vol. 59, No. 4, pp. 849-904, 2017.
ZBIKOWSKI, RAFAL, and SUBCHAN SUBCHAN. Computational Optimal Control: Tools and Practice, John Wiley & Sons, Incorporated, 2009.
T.H. TSANG, D. M. HIMMELBLAU and T. F. EDGAR. Optimal control via collocation and non-linear programming, INT.J. CONTROL, 1975, VOL. 21, NO.5, 763-768.