Exercises
Direct shooting with a polynomial control parameterization
Consider
with fixed final time , terminal constraint
and performance index
Approximate the control by
(a) Identify the finite-dimensional decision vector.
(b) Write the state obtained by integrating the dynamics for a given coefficient vector.
(c) Express the terminal constraint as a nonlinear algebraic constraint on .
(d) Introduce an accumulated-cost state and write the complete direct-shooting nonlinear program.
Forward and backward Euler stability
Apply forward Euler and backward Euler to
(a) Derive the update equation and amplification factor for each method.
(b) Derive the forward-Euler stability restriction on .
(c) Show that backward Euler is stable for every .
(d) For a uniform mesh, derive explicit expressions for and .
(e) Compare both discrete solutions with
Generalized -method
Consider the convention
(a) Identify the values of corresponding to forward Euler, backward Euler, and the trapezoidal method.
(b) Determine which value of produces an explicit method for a general nonlinear vector field.
(c) For the test equation
derive the stability function
(d) Recover the stability functions of the three special cases.
(e) Compare the limits of the backward-Euler and trapezoidal stability functions as .
Runge–Kutta integration of controlled dynamics
Consider one mesh interval for
where the control is constant on the interval:
(a) Write the four classical RK4 stage equations.
(b) Derive the RK4 update for .
(c) State the number of vector-field evaluations required per interval.
(d) Explain why RK4 is a one-step method despite using four stages.
(e) State its expected global order of accuracy.
Euler direct-collocation transcription
Transcribe
subject to
using forward-Euler collocation on uniform intervals.
(a) Define the mesh and step size.
(b) Define the complete NLP decision vector.
(c) Derive all Euler defect constraints.
(d) Derive the left-rectangle discrete objective.
(e) Write the two endpoint constraints.
(f) Determine the number of decision variables, equality constraints, and remaining degrees of freedom.
Global residual equations and their Jacobian
For the scalar nonlinear initial-value problem
on a mesh with intervals:
(a) Write all forward-Euler equations as one simultaneous algebraic residual system.
(b) Derive the nonzero Jacobian entries of a generic forward-Euler residual.
(c) Repeat parts (a) and (b) for backward Euler.
(d) Explain mathematically why the backward-Euler residual is implicit.
(e) State how Newton’s method would be applied to the global backward-Euler residual system.
Sparse Jacobian structure
For the scalar Euler-collocation problem in Exercise 5, use
(a) Derive the three nonzero partial derivatives in one defect row.
(b) Show that the complete equality-constraint Jacobian has dimensions
(c) Show that it has nonzero entries.
(d) Derive its exact density.
(e) Compute the density for .
(f) Prove that the density is asymptotically
(g) Extend the variable count, constraint count, and maximum local nonzero count to states and controls.
Time normalization and free final time
Map
to
(a) Derive the forward and inverse affine transformations.
(b) Derive .
(c) Transform
(d) Transform the Bolza objective
(e) On a normalized mesh, derive the forward-Euler defect constraints.
(f) When is free, identify every part of the NLP in which it appears.
(g) Explain why the column is globally coupled while the remaining defect Jacobian is still sparse.
Piecewise-constant shooting with an unknown switching time
Consider
and parameterize the control as
where , , and are decision variables.
(a) Integrate the dynamics analytically on both intervals.
(b) Derive the continuity condition at .
(c) Express the terminal constraint as an algebraic equation in .
(d) For
derive the finite-dimensional objective.
(e) Write the resulting direct-shooting NLP, including bounds
Analytical mesh-refinement study
Apply forward Euler to
on using uniform intervals.
(a) Show that
(b) Show that
(c) Use a logarithmic expansion to obtain the leading-order terminal error.
(d) Show that the terminal error is first order in .
(e) Derive the error ratio expected when the mesh size is doubled.
(f) State how this result can be used to verify a direct-collocation implementation.