Singular Arcs: Identification and Current Limitations¶
Current limitation: Pockit does not currently provide a reliable, validated workflow for optimal-control problems containing a true singular arc. An NLP solver reporting convergence does not certify that a computed singular control is correct. Do not use such a result without an independent optimality analysis and convergence study.
What is a singular arc?¶
Consider a scalar bounded control that enters the dynamics and running cost affinely:
With costate \(\boldsymbol\lambda\), define the Hamiltonian and switching function
Under the minimum-principle convention used here, minimizing \(H\) gives
A bang-bang switch occurs when \(\phi\) crosses zero at an isolated time. A singular arc is an interval of nonzero duration on which
The first-order minimum condition then does not determine \(u\). If the control first appears in the \(2r\)-th time derivative,
the formal singular candidate is \(u_s=-a/b\). It must still satisfy the control bounds, all state and path constraints, junction conditions, and an appropriate generalized Legendre-Clebsch condition. Satisfying only the discretized dynamics is not enough to establish optimality.
Singular arcs are also distinct from boundary arcs caused by an active state or path constraint. The latter require their own multiplier and tangency conditions.
Why direct collocation is difficult here¶
On a true singular interval, first-order optimality is locally insensitive to the affine control. A direct transcription can therefore contain nearly flat control directions. Different meshes or initial guesses may produce visibly different controls with similar objective values and small collocation residuals.
This creates several practical failure modes:
- the control oscillates inside its bounds while the state looks smooth;
- mesh refinement follows numerical oscillations instead of a physical switch;
- the nonlinear program converges to a mesh-dependent regularized solution;
- a bang-bang detector misclassifies the interior singular control;
- solver success is mistaken for satisfaction of continuous-time necessary conditions.
System.check_discontinuous() and System.refine_discontinuous() test marked
bang-bang expressions against their lower and upper bounds. That assumption
does not hold on an interior singular arc, so these methods cannot identify or
validate one.
Cautious options¶
There is no automatic Pockit setting that turns a singular problem into a reliably solved one. Depending on the application, the following approaches may support a separate analysis:
- Derive the singular control analytically. Compute the switching function, differentiate it until the control appears, and check bounds, junction conditions, and higher-order necessary conditions.
- Split known arc structures explicitly. If bang, singular, and boundary arcs and their order are known independently, represent them as separate phases and impose the derived singular and junction equations. The assumed structure must still be tested against alternatives.
- Regularize only as a diagnostic. For example, \(J_\varepsilon=J+\varepsilon\int u^2\,\mathrm dt\) can select a smooth control. Solve a sequence with \(\varepsilon\downarrow0\) and multiple meshes. Each \(\varepsilon>0\) defines a different problem, so apparent convergence is evidence, not proof of the unregularized optimum.
- Validate outside the transcription. Reconstruct the trajectory densely, integrate the dynamics independently, evaluate constraints, and check the switching function and transversality conditions using an independently computed costate when available.
- Use a method designed for singular control when the arc structure is unknown or the result is safety-critical.
What to report¶
A defensible study should state the assumed arc structure, regularization (if any), mesh sequence, initial guesses, continuous-time residuals, switching function history, constraint margins, and sensitivity of the result to all of those choices. Without these checks, report the result only as a candidate trajectory.
Pockit's ordinary continuous-error and bang-bang refinement tools remain useful for nonsingular problems. See Error Checking and Mesh Refinement for their supported use.