Exercises
Global and local time transformations
The physical time interval is
and the global transformed coordinate is
The transformed domain is divided into mesh intervals,
For interval , introduce a local coordinate
that maps to
(a) Derive the global affine transformations and .
(b) Derive the local affine transformations and .
(c) Derive the combined map .
(d) Show that
(e) Derive
(f) For fixed mesh points, verify that these two derivatives sum to one.
Local multiple-interval LGR transcription
On interval , let
be the left-LGR collocation points, and let
be the noncollocated terminal state point.
Consider
(a) Write the local state interpolation polynomial.
(b) Construct the local differentiation matrix
(c) Derive the local collocation equations
(d) State where the control variables are defined.
(e) Explain why the right endpoint of interval has a state value but no control value belonging to interval .
(f) Derive the state-continuity condition between intervals and .
(g) Compare explicit continuity constraints with the shared-interface-state formulation.
Counting variables and points on a nonuniform mesh
Consider
(a) Compute the total number of collocation points.
(b) Compute the total number of unique state points when shared interface variables are used.
(c) Compute the total number of control points.
(d) For states and controls, derive the number of scalar state and control decision variables.
(e) Add static parameters and free , and derive the complete decision-vector dimension.
(f) Determine the number of scalar defect equations.
(g) If separate interface-state variables are retained, determine the number of additional state variables and continuity equations.
(h) Verify that the two interface formulations have the same number of degrees of freedom.
Global assembly of the multiple-interval differentiation matrix
Consider two mesh intervals with polynomial degrees and .
(a) Write the two local matrices
(b) Assemble the global differentiation matrix using a shared state at the interface.
(c) Show that its dimensions are
(d) Identify the column shared by the two local blocks.
(e) Generalize the construction to intervals.
(f) Show that, with
the global matrix satisfies
(g) Explain why the matrix remains sparse as the number of intervals increases.
(h) Derive the global collocation equations in compact matrix form.
Composite quadrature and endpoint-time derivatives
Consider the Bolza objective
For interval , let be the LGR quadrature weights.
(a) Derive the composite quadrature approximation
(b) Show that each local quadrature contribution is scaled by the physical duration of its mesh interval.
(c) Derive the nodal physical-time vector.
(d) Derive the derivatives of every nodal time with respect to and .
(e) Derive when depends explicitly on time.
(f) Derive .
(g) Identify the terms arising from the scale factor, the Mayer term, and the explicit time dependence of .
Global NLP structure and Jacobian sparsity
Consider a multiple-interval LGR transcription with total collocation points, states, controls, and endpoint equality constraints.
(a) Define a complete global decision vector.
(b) Write the global defect vector.
(c) Add the endpoint constraints.
(d) Add a path-constraint vector imposed at all collocation points.
(e) Derive the number of scalar defect equations.
(f) Describe which state and control blocks can appear in one local defect row.
(g) Explain why defects from nonadjacent mesh intervals have zero direct derivatives with respect to one another’s local variables.
(h) Sketch the block sparsity pattern of the equality-constraint Jacobian.
(i) Explain how free , free , and static parameters create globally coupled columns without destroying the predominantly sparse structure.
Interpolation-and-integration error estimator
On mesh interval , the original LGR approximation uses collocation points. Construct an enriched LGR grid with
collocation points.
(a) Construct the state interpolation matrix .
(b) Derive the interpolation-based enriched state estimate
(c) Explain why the state reconstruction is unique but the control reconstruction is not.
(d) Define a piecewise-linear reconstruction of the control on the enriched grid.
(e) Evaluate the dynamics on the enriched grid.
(f) Using the enriched integration matrix , derive the dynamics-based estimate
(g) Define a pointwise absolute error.
(h) Define an interval-wise relative error indicator .
(i) State the mesh-acceptance condition for a prescribed tolerance .
Choosing between - and -refinement
Let
denote the pointwise error samples on interval , and let be the maximum interval error.
(a) Define a localized-error metric based on the fraction of total error concentrated near the largest-error point.
(b) Explain why localized error suggests a switch, boundary layer, discontinuity, or sharp transition.
(c) Explain why distributed error on a smooth interval suggests increasing polynomial degree.
(d) Formulate a decision rule that selects -refinement for localized error and -refinement for distributed error.
(e) Modify the rule to enforce a maximum polynomial degree .
(f) State safeguards that prevent creation of excessively short mesh intervals.
(g) Explain why pure -refinement may perform poorly near a bang–bang switching point.
(h) Explain why pure -refinement may be unnecessarily expensive in a smooth region.
Warm starting after mesh refinement
Suppose interval is refined in one of the following ways:
or
(a) Derive how the old state polynomial is evaluated at the new state nodes for -refinement.
(b) Derive how it is evaluated on both child intervals for -refinement.
(c) Describe how to initialize new control values.
(d) Show how shared interface-state values should be assigned after an interval split.
(e) Explain how static parameters and endpoint times are transferred.
(f) State why warm starting normally reduces the number of NLP iterations.
(g) Identify circumstances in which interpolation of the previous solution may provide a poor warm start.
Complete adaptive -refinement algorithm
Formulate a complete adaptive solution procedure for a multiple-interval LGR transcription.
Your algorithm must include:
(a) construction of an initial mesh and polynomial-degree vector;
(b) solution of the NLP;
(c) reconstruction of state and control trajectories;
(d) construction of enriched grids;
(e) computation of interval error indicators;
(f) acceptance of intervals satisfying
(g) selection of - or -refinement for rejected intervals;
(h) enforcement of , minimum interval length, and maximum refinement iterations;
(i) warm starting of the refined NLP;
(j) stopping criteria based on error, feasibility, and stagnation;
(k) a refinement-history table containing iteration number, number of intervals, total collocation points, maximum error, objective value, and NLP status;
(l) verification by independent re-simulation and dense-grid checking of path constraints.
Finally, explain why over-refinement can increase computational cost and conditioning difficulty without materially improving the engineering conclusion.