Algorithm Search⌘K

Theoremcore

Bang-bang principle

Also called bang-bang control.

For linear systems with box-bounded inputs, inputs at the bounds reach every reachable state. Time-optimal inputs are bang-bang if normal, with at most n - 1 switches if all eigenvalues are real.

The bang-bang principle says that for a linear system x˙=Ax+Bu\dot x = A x + B u whose inputs lie in a box, nothing is lost by using only the corners of the box: every state that can be reached at time tt can also be reached at time tt with each input component at +1+1 or −1-1 at almost every moment. A second part says that the time-optimal input is itself of this form, and is unique with finitely many switches, when the system is normal. When all eigenvalues of AA are real and the input is scalar, the number of switches is at most n−1n - 1. The name "bang-bang" comes from the sound of a relay that hits its stops.

Statement

Setting. x˙=Ax+Bu\dot x = A x + B u with A∈Rn×nA \in \mathbb{R}^{n \times n}, B=[b1,…,bm]∈Rn×mB = [b_1, \dots, b_m] \in \mathbb{R}^{n \times m}, and inputs in the box U=[−1,1]mU = [-1, 1]^m. An input is admissible on [0,t][0, t] if it is measurable with values in UU. It is bang-bang if ∣ui(s)∣=1|u_i(s)| = 1 for almost every ss and every ii. The system is normal if (A,bi)(A, b_i) is controllable for each i=1,…,mi = 1, \dots, m.

Theorem.

  1. Bang-bang principle (LaSalle 1960). For every x0x_0 and t>0t > 0, the set of states reachable at time tt from x0x_0 with admissible inputs equals the set reachable at time tt with bang-bang inputs.
  2. Time-optimal inputs. Suppose x0x_0 can be steered to 0 by some admissible input. Then a time-optimal input exists. If the system is normal, the time-optimal input u∗u^* on [0,t∗][0, t^*] is unique, and there is η≠0\eta \ne 0 with
ui∗(s)=sgn⁡(biTe−ATsη)for almost every s,i=1,…,m,u_i^*(s) = \operatorname{sgn}\left( b_i^T e^{-A^T s} \eta \right) \quad \text{for almost every } s, \quad i = 1, \dots, m,

and each switching function biTe−ATsηb_i^T e^{-A^T s} \eta has finitely many zeros on [0,t∗][0, t^*]. So u∗u^* is bang-bang with finitely many switches.

In the minimum form of the maximum principle, η=−λ(0)\eta = -\lambda(0), and biTe−ATsη=−biTλ(s)b_i^T e^{-A^T s} \eta = -b_i^T \lambda(s) is the negative of the iith component of the switching function of the Hamiltonian H=λ0+λT(Ax+Bu)H = \lambda_0 + \lambda^T (A x + B u).

In plain words

Suppose you can push a linear system with a limited force in each direction. Part one says that any place you can reach at a given time with gentle, varying pushes, you can also reach at that time with pushes that are always full, only changing direction. Part two says that if you want to arrive as fast as possible, full pushes are not only allowed but required, as long as each input on its own can move the whole state. The direction of each push is set by the sign of a simple function of time, so it changes only a limited number of times. For systems without oscillation, that number is at most one less than the number of state variables.

Proof

Write M(s)=e−AsBM(s) = e^{-A s} B. By the variation of constants formula, the state at time tt is

x(t)=eAt(x0+∫0tM(s)u(s) ds),x(t) = e^{A t} \left( x_0 + \int_0^t M(s) u(s)\, ds \right),

so a state zz is reachable at time tt exactly when ∫0tM(s)u(s) ds=w\int_0^t M(s) u(s)\, ds = w, with w=e−Atz−x0w = e^{-A t} z - x_0.

Part 1. Fix a reachable zz and let

K={u∈L∞([0,t];Rm):u(s)∈U a.e., ∫0tM(s)u(s) ds=w}.\mathcal{K} = \left\{ u \in L^\infty([0, t]; \mathbb{R}^m) : u(s) \in U \text{ a.e.},\ \int_0^t M(s) u(s)\, ds = w \right\}.

K\mathcal{K} is not empty, and it is convex. The box condition defines a weak-star closed subset of a ball of L∞=(L1)∗L^\infty = (L^1)^*, and the map u↦∫0tMu dsu \mapsto \int_0^t M u\, ds is weak-star continuous because the entries of MM are in L1L^1. So K\mathcal{K} is weak-star compact by the Banach-Alaoglu theorem, and by the Krein-Milman theorem it has an extreme point u∘u^\circ.

Suppose u∘u^\circ is not bang-bang. Then there are an index ii, a number ε>0\varepsilon > 0 and a set E⊆[0,t]E \subseteq [0, t] of positive measure with ∣ui∘(s)∣≤1−ε|u_i^\circ(s)| \le 1 - \varepsilon on EE. The linear map β↦∫EM(s)eiβ(s) ds\beta \mapsto \int_E M(s) e_i \beta(s)\, ds goes from the infinite-dimensional space L∞(E)L^\infty(E) to Rn\mathbb{R}^n, so it has a nonzero element β\beta in its kernel; scale it so that ∣β∣≤1|\beta| \le 1, and extend it by 0 outside EE. Then u∘+εβeiu^\circ + \varepsilon \beta e_i and u∘−εβeiu^\circ - \varepsilon \beta e_i both lie in K\mathcal{K}, and u∘u^\circ is their midpoint. This contradicts the choice of u∘u^\circ as an extreme point. So u∘u^\circ is a bang-bang input that reaches zz at time tt.

Part 2. Let R(t)={∫0tMu ds:u admissible}\mathcal{R}(t) = \{ \int_0^t M u\, ds : u \text{ admissible} \}. The state x0x_0 can be steered to 0 at time tt exactly when −x0∈R(t)-x_0 \in \mathcal{R}(t). Each R(t)\mathcal{R}(t) is convex and compact (the image of the weak-star compact convex set of inputs under the continuous linear map above), and R(t)\mathcal{R}(t) grows continuously with tt in the Hausdorff distance, since ∣∫tt′Mu ds∣≤C∣t′−t∣|\int_t^{t'} M u\, ds| \le C |t' - t|. Hence the set of tt with −x0∈R(t)-x_0 \in \mathcal{R}(t) is closed, and its smallest element t∗t^* exists: this is the existence of a time-optimal input.

The point −x0-x_0 lies on the boundary of R(t∗)\mathcal{R}(t^*). If it were in the interior, a ball around it would lie in R(t∗)\mathcal{R}(t^*), and by the continuity in tt, −x0∈R(t)-x_0 \in \mathcal{R}(t) for some t<t∗t < t^*. So there is a supporting hyperplane: a vector η≠0\eta \ne 0 with ηT(−x0)≥ηTr\eta^T (-x_0) \ge \eta^T r for all r∈R(t∗)r \in \mathcal{R}(t^*). Let u∗u^* be any time-optimal input. Then

∫0t∗ηTM(s)u∗(s) ds=max⁡u admissible∫0t∗∑i=1mφi(s)ui(s) ds=∫0t∗∑i=1m∣φi(s)∣ ds,\int_0^{t^*} \eta^T M(s) u^*(s)\, ds = \max_{u \text{ admissible}} \int_0^{t^*} \sum_{i=1}^m \varphi_i(s) u_i(s)\, ds = \int_0^{t^*} \sum_{i=1}^m |\varphi_i(s)|\, ds,

with φi(s)=ηTe−Asbi=biTe−ATsη\varphi_i(s) = \eta^T e^{-A s} b_i = b_i^T e^{-A^T s} \eta. The middle maximum is attained exactly by inputs with ui(s)=sgn⁡φi(s)u_i(s) = \operatorname{sgn} \varphi_i(s) wherever φi(s)≠0\varphi_i(s) \ne 0, so u∗u^* has this form almost everywhere outside the zero sets of the φi\varphi_i.

Now use normality. φi\varphi_i is real analytic. If it had infinitely many zeros on [0,t∗][0, t^*], it would vanish identically, and then all its derivatives at 0, (−1)kbiT(AT)kη(-1)^k b_i^T (A^T)^k \eta, would be zero. So η\eta would be orthogonal to bi,Abi,…,An−1bib_i, A b_i, \dots, A^{n-1} b_i, which span Rn\mathbb{R}^n by the Kalman rank condition, and η=0\eta = 0, a contradiction. So each φi\varphi_i has finitely many zeros, u∗u^* is determined almost everywhere by η\eta, and it is bang-bang with finitely many switches. Fix one such η\eta. Every time-optimal input reaches −x0-x_0 in R(t∗)\mathcal{R}(t^*), so it attains the maximum above for this η\eta and equals sgn⁡φi\operatorname{sgn} \varphi_i almost everywhere. So all time-optimal inputs agree almost everywhere: the time-optimal input is unique. ■\blacksquare

Consequences

At most n−1n - 1 switches with real eigenvalues (Feldbaum 1953). Let m=1m = 1, the system be normal, and all eigenvalues of AA be real. Then the time-optimal input has at most n−1n - 1 switches.

Proof. With real eigenvalues μ1,…,μk\mu_1, \dots, \mu_k of algebraic multiplicities d1,…,dkd_1, \dots, d_k, d1+⋯+dk=nd_1 + \dots + d_k = n, every entry of e−ATse^{-A^T s}, and so φ(s)=bTe−ATsη\varphi(s) = b^T e^{-A^T s} \eta, has the form ∑j=1kpj(s)e−μjs\sum_{j=1}^k p_j(s) e^{-\mu_j s} with polynomials pjp_j of degree at most dj−1d_j - 1. Claim: such a function, if it is not identically zero, has at most d1+⋯+dk−1d_1 + \dots + d_k - 1 real zeros. For k=1k = 1 it is e−μ1se^{-\mu_1 s} times a nonzero polynomial of degree at most d1−1d_1 - 1. For k>1k > 1, multiply by eμ1se^{\mu_1 s}, which keeps the zeros, and differentiate d1d_1 times. This removes the term p1p_1 and leaves ψ(s)=∑j≥2qj(s)e(μ1−μj)s\psi(s) = \sum_{j \ge 2} q_j(s) e^{(\mu_1 - \mu_j) s} with deg⁡qj=deg⁡pj\deg q_j = \deg p_j, because μj≠μ1\mu_j \ne \mu_1. By Rolle's theorem, each derivative has at least one zero fewer than the function before it, so the number of zeros of φ\varphi is at most the number of zeros of ψ\psi plus d1d_1. If ψ≡0\psi \equiv 0, then eμ1sφe^{\mu_1 s} \varphi is a polynomial of degree at most d1−1d_1 - 1, with at most d1−1d_1 - 1 zeros. Otherwise, by induction, ψ\psi has at most d2+⋯+dk−1d_2 + \dots + d_k - 1 zeros. Either way φ\varphi has at most n−1n - 1 zeros, so u∗=sgn⁡φu^* = \operatorname{sgn} \varphi changes sign at most n−1n - 1 times. ■\blacksquare

  • The double integrator. n=2n = 2 with the double eigenvalue 0, so at most one switch. From (1,0)(1, 0) the time-optimal input is −1-1 for 1 s and then +1+1 for 1 s (time-optimal control).
  • A hand check of Part 1. For x˙=u\dot x = u, ∣u∣≤1|u| \le 1, x(0)=0x(0) = 0, the state 1/21/2 at t=1t = 1 is reached by u=1/2u = 1/2, and also by the bang-bang input u=+1u = +1 on [0,3/4][0, 3/4] and u=−1u = -1 on (3/4,1](3/4, 1], since 3/4−1/4=1/23/4 - 1/4 = 1/2.
  • The reachable set. By Part 1, the reachable set at time tt is the reachable set of the bang-bang inputs, and it is convex and compact. Its support function is ∫0t∥BTe−ATsη∥1 ds\int_0^t \|B^T e^{-A^T s} \eta\|_1\, ds, which reachable set computation uses.

Tightness

Complex eigenvalues. For the harmonic oscillator x˙1=x2\dot x_1 = x_2, x˙2=−x1+u\dot x_2 = -x_1 + u, the switching function is ρsin⁡(s+ϕ)\rho \sin(s + \phi), so the time-optimal input switches every π\pi seconds, and the number of switches grows without bound as x0x_0 moves away from 0. The bound n−1=1n - 1 = 1 fails, and only the real-eigenvalue hypothesis excludes this.

Without normality. Take x˙=u\dot x = u in R2\mathbb{R}^2 with B=IB = I and U=[−1,1]2U = [-1, 1]^2, from x0=(1,1/2)x_0 = (1, 1/2). The minimum time is 1, because x1x_1 needs it. The input u1=−1u_1 = -1, u2=−1/2u_2 = -1/2 is time-optimal and is not bang-bang, and so is every u2u_2 with values in [−1,1][-1, 1] and integral −1/2-1/2. Here (A,bi)=(0,ei)(A, b_i) = (0, e_i) is not controllable in R2\mathbb{R}^2, so the system is not normal. Part 1 still holds: the bang-bang input u2=−1u_2 = -1 on [0,3/4][0, 3/4] and +1+1 after it also works.

Nonlinear systems. Part 1 needs dynamics that are linear in uu. For x˙=u2\dot x = u^2 with ∣u∣≤1|u| \le 1 and x(0)=0x(0) = 0, the reachable set at t=1t = 1 is [0,1][0, 1], but bang-bang inputs reach only the point 1. For nonlinear control-affine systems, the time-optimal input can also have singular arcs or chatter.

Singular problems. If some switching function vanishes on an interval, the sign rule does not fix the input there. Normality excludes this for linear time-optimal problems, but not for other costs, such as ∫x2 dt\int x^2\, dt (singular arc).

History

Bushaw (1952) solved the time-optimal problem of second-order systems with a relay input in his Princeton thesis, and Feldbaum (1953) stated the bound of n−1n - 1 switches for systems with real eigenvalues. LaSalle (1960) proved the bang-bang principle for linear systems in general, and Gamkrelidze and Pontryagin's group obtained the time-optimal results as a case of the maximum principle. Hermes and LaSalle (1969) give the functional-analytic proof with the Krein-Milman theorem, and Evans's notes follow it.

References

  1. J. P. LaSalle, The time optimal control problem, in Contributions to the Theory of Nonlinear Oscillations, Volume V, Annals of Mathematics Studies 45, Princeton University Press, 1960
  2. Lawrence C. Evans, An Introduction to Mathematical Optimal Control Theory, lecture notes, University of California, Berkeley, Chapter 2 (the bang-bang principle, proved with the Krein-Milman theorem) 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. Daniel Liberzon, Calculus of Variations and Optimal Control Theory, A Concise Introduction, Princeton University Press, 2012, Section 4.4.2 (the bang-bang principle for linear systems)
  5. A. A. Feldbaum, Optimal processes in automatic control systems, Avtomatika i Telemekhanika 14(6), 712-728, 1953 (in Russian)

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)
WritingW4 complete
  • a review of the text: no review record reviews/M9NRR6/text.yaml