Algorithm Search⌘K

Problemcore

Time-optimal control

Also called minimum-time control.

Bring the state to a target in the least time with a bounded input.

The time-optimal control problem asks for a bounded input that brings the state of a system from a given start to a target, usually the origin, in the shortest possible time. It is the optimal control problem with a free final time and the running cost L=1L = 1. For linear systems with a box of inputs, the answer takes only the extreme values of the box and switches between them at a few times (bang-bang principle). The double integrator, with its parabolic switching curve, is the standard example.

In plain words

You must move a cart to a stop at a marked spot as fast as you can, and the motor can push with at most a fixed force either way. Common sense says: push fully toward the spot, then at the right moment push fully the other way to brake, and arrive with zero speed exactly at the spot. That is the answer. The only question is when to switch, and the answer depends on where the cart is and how fast it moves. For many systems the best plan always uses full force, and the art is to find the switching times. Some systems cannot reach the target at all with limited force, and then there is no answer.

Definition

Input. A system x˙=f(x,u)\dot x = f(x, u) with x∈Rnx \in \mathbb{R}^n, ff continuous and C1C^1 in xx; a compact input set U⊂RmU \subset \mathbb{R}^m; an initial state x0x_0; and a closed target set SS, often S={0}S = \{0\}. In the linear case, x˙=Ax+Bu\dot x = A x + B u with U=[−1,1]mU = [-1, 1]^m, so each input component satisfies ∣ui(t)∣≤1|u_i(t)| \le 1.

Question. Among the measurable inputs u:[0,tf]→Uu : [0, t_f] \to U whose trajectory from x0x_0 reaches SS at the time tft_f, find one with the smallest tft_f. The answer is the minimum time T∗(x0)T^*(x_0) and an input that attains it. If no admissible input reaches SS, T∗(x0)=+∞T^*(x_0) = +\infty.

What is known for the linear case (S={0}S = \{0\}, U=[−1,1]mU = [-1, 1]^m):

  • Reachability. The set of states that can be steered to 0 is all of Rn\mathbb{R}^n if and only if (A,B)(A, B) is controllable and no eigenvalue of AA has a positive real part (Evans, Chapter 2). With a bounded input, an exponentially growing mode can only be cancelled from a bounded region.
  • Existence. If x0x_0 can be steered to 0 in some time, then a time-optimal input exists. The reason is that the set of states reachable at time tt is convex and compact and depends continuously on tt (Liberzon, Section 4.5; Hermes and LaSalle, Part II).
  • Structure. Under normality, meaning that (A,bi)(A, b_i) is controllable for each column bib_i of BB, the time-optimal input is unique, bang-bang, and has finitely many switches. With all eigenvalues of AA real and m=1m = 1, it has at most n−1n - 1 switches (bang-bang principle).

Variants

  • A general target. A target set SS instead of a point, for example a ball around 0. The transversality conditions then apply at the end point.
  • Nonlinear systems. Time-optimal controls may contain singular arcs, where the input takes values inside UU, and they may chatter.
  • Discrete time. For xk+1=Axk+Bukx_{k+1} = A x_k + B u_k with ∣uk,i∣≤1|u_{k,i}| \le 1, find the smallest number of steps NN that brings x0x_0 to 0. For each NN this is a linear feasibility problem.
  • Minimum time with a penalty. Costs tf+∫(fuel) dtt_f + \int (\text{fuel})\, dt mix time with fuel use. A pure minimum-fuel problem gives inputs with values −1-1, 00 and 11.
  • Minimum-time feedback. The synthesis problem asks for the optimal input as a function of the state, u=κ(x)u = \kappa(x), valid for all starts. For the double integrator it is a switching curve.

Examples

The double integrator. Let x˙1=x2\dot x_1 = x_2, x˙2=u\dot x_2 = u, ∣u∣≤1|u| \le 1, target 00. This is a mass with a bounded force, with position x1x_1 and velocity x2x_2. With u=+1u = +1 the quantity x1−x22/2x_1 - x_2^2/2 is constant, and with u=−1u = -1 the quantity x1+x22/2x_1 + x_2^2/2 is constant, so the trajectories are parabolas. The only trajectories that reach 0 without a switch are the two half parabolas that end at 0, which together form the switching curve

x1=−x2∣x2∣2.x_1 = -\frac{x_2 |x_2|}{2}.

The optimal feedback is u=−1u = -1 above the curve (where x1+x2∣x2∣/2>0x_1 + x_2|x_2|/2 > 0), u=+1u = +1 below it, and u=−sgn⁡(x2)u = -\operatorname{sgn}(x_2) on it. Each optimal input has at most one switch, which agrees with the bound n−1=1n - 1 = 1, since both eigenvalues of A=[0100]A = \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix} are 0.

From x0=(1,0)x_0 = (1, 0): use u=−1u = -1. Then x2=−tx_2 = -t and x1=1−t2/2x_1 = 1 - t^2/2, which reaches the curve at t=1t = 1 in the state (1/2,−1)(1/2, -1). Switch to u=+1u = +1 for 1 more second: x2=−1+sx_2 = -1 + s and x1=1/2−s+s2/2x_1 = 1/2 - s + s^2/2, which is (0,0)(0, 0) at s=1s = 1. The minimum time is 2. In general, above the curve,

T∗(x)=x2+2x1+x22/2,T^*(x) = x_2 + 2\sqrt{x_1 + x_2^2/2},

and below it T∗(x)=−x2+2−x1+x22/2T^*(x) = -x_2 + 2\sqrt{-x_1 + x_2^2/2}. For (0,1)(0, 1) this gives 1+2≈2.41421 + \sqrt 2 \approx 2.4142. The function T∗T^* is continuous but not differentiable on the switching curve, which is why the HJB equation needs viscosity solutions here.

The harmonic oscillator. Let x˙1=x2\dot x_1 = x_2, x˙2=−x1+u\dot x_2 = -x_1 + u, ∣u∣≤1|u| \le 1. The eigenvalues ±i\pm i are not real. The switching function is λ2(t)\lambda_2(t), and the costate equation makes it a sine wave ρsin⁡(t+ϕ)\rho \sin(t + \phi), so the optimal input switches every π\pi seconds. From far away, many half periods are needed, so the number of switches grows without bound with the distance of x0x_0 from 0. The bound n−1n - 1 needs real eigenvalues.

An unreachable state. For x˙=x+u\dot x = x + u, ∣u∣≤1|u| \le 1, the state can reach 0 only from ∣x0∣<1|x_0| < 1: at x0=1x_0 = 1 the best input u=−1u = -1 gives x˙=0\dot x = 0. So T∗(x0)=+∞T^*(x_0) = +\infty for ∣x0∣≥1|x_0| \ge 1, even though the system is controllable. For ∣x0∣<1|x_0| < 1, the input u=−sgn⁡(x0)u = -\operatorname{sgn}(x_0) gives T∗(x0)=−ln⁡(1−∣x0∣)T^*(x_0) = -\ln(1 - |x_0|).

Known algorithms

  • The maximum principle with a switching function. For the linear case, H=λ0+λT(Ax+Bu)H = \lambda_0 + \lambda^T (A x + B u), the costate is λ(t)=e−ATtλ(0)\lambda(t) = e^{-A^T t} \lambda(0), and ui(t)=−sgn⁡(biTλ(t))u_i(t) = -\operatorname{sgn}(b_i^T \lambda(t)). The unknowns are the nn components of λ(0)\lambda(0) (up to scaling) and tft_f, found by shooting (indirect method).
  • Switching-time optimization. Fix the number and order of the switches and optimize over the switching times with a nonlinear equation solver or a gradient method. For the double integrator two unknowns (the switch time and tft_f) are enough.
  • Reachable sets. For linear systems, x0x_0 can be steered to 0 at time tt if and only if −x0-x_0 lies in the convex compact set R(t)={∫0te−AsBu(s) ds}\mathcal{R}(t) = \{\int_0^t e^{-A s} B u(s)\, ds\}, whose support function is ht(η)=∫0t∥BTe−ATsη∥1 dsh_t(\eta) = \int_0^t \|B^T e^{-A^T s} \eta\|_1\, ds. So T∗(x0)T^*(x_0) is the smallest tt with −ηTx0≤ht(η)-\eta^T x_0 \le h_t(\eta) for all η\eta, and iterative methods search over η\eta and tt. See reachable set computation.
  • Linear programming in discrete time. For a given NN, steering x0x_0 to 0 in NN steps is a feasibility problem with NmN m variables, nn equality constraints and 2Nm2 N m bounds. Bisection over NN, or one LP per NN, gives the minimum number of steps.
  • Dynamic programming. The minimum time solves a stationary HJB equation, which can be solved on a grid in low dimension.

Bounds

  • For a single-input linear system with all eigenvalues real, at most n−1n - 1 switches (Feldbaum 1953; see the bang-bang principle for the proof). With complex eigenvalues there is no bound independent of x0x_0.
  • The minimum time T∗(x)T^*(x) of a controllable linear system with eigenvalues in the closed left half plane is finite on Rn\mathbb{R}^n (Evans, Chapter 2), and because 0 is an interior point of UU it is also continuous. It is not differentiable in general.
  • The discrete-time test for a given NN is a linear program with NmN m variables. With rational data it can be solved in time polynomial in the bit size of the data by interior point methods; no strongly polynomial algorithm for linear programming is known. The minimum number of steps N∗N^* costs O(log⁡N∗)O(\log N^*) such programs by doubling and bisection.

Reductions

  • To the general problem. The cost tft_f is the Lagrange cost ∫0tf1 dt\int_0^{t_f} 1\, dt or the Mayer cost K=tfK = t_f. With a free final time, the transversality condition gives H≡0H \equiv 0, that is, λ0+λTf(x∗,u∗)=0\lambda_0 + \lambda^T f(x^*, u^*) = 0 along the extremal.
  • To a fixed final time. Time scaling t=tfst = t_f s with s∈[0,1]s \in [0, 1] makes tft_f a parameter of the dynamics, dx/ds=tff(x,u)dx/ds = t_f f(x, u).
  • Minimum time and reachability are dual. The minimum time to the target is the first time at which x0x_0 enters the backward reachable set of the target. Algorithms for one solve the other.
  • To minimum energy. Without input bounds, the minimum time is zero for a controllable linear system, and the natural question becomes the least energy for a fixed time (minimum-energy control).

Applications

  • Positioning servos, such as the head of a disk drive or a gantry crane, where bang-bang motion with a braking switch is the time-optimal move.
  • Attitude slews of spacecraft with bounded torque.
  • Minimum-time trajectories of robot arms along a given path.
  • Early analog controllers for the double integrator and for relay systems, where Bushaw (1952) and Feldbaum (1953) studied switching rules.

References

  1. Daniel Liberzon, Calculus of Variations and Optimal Control Theory, A Concise Introduction, Princeton University Press, 2012, Section 4.4 (time-optimal control problems, with 4.4.1 on the double integrator and 4.4.2 on the bang-bang principle for linear systems) and Section 4.5 (existence of optimal controls)
  2. Lawrence C. Evans, An Introduction to Mathematical Optimal Control Theory, lecture notes, University of California, Berkeley, Chapter 2 (controllability and the bang-bang principle) and Chapter 3 (linear time-optimal control)
  3. Henry Hermes and Joseph P. LaSalle, Functional Analysis and Time Optimal Control, Academic Press, 1969, Part II (linear time optimal control)
  4. Donald E. Kirk, Optimal Control Theory, An Introduction, Prentice-Hall, 1970 (Dover reprint, 2004), Section 5.4 (minimum-time problems)
  5. Donald W. Bushaw, Differential equations with a discontinuous forcing term, PhD thesis, Princeton University, 1952; published as Experimental Towing Tank Report 469, Stevens Institute of Technology, 1953

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a known algorithm
  • a contract.yaml