← Back to Gallery

Pontryagin Bang-Bang Control

Time-optimal control of a double integrator

u = +1
ẋ₁ = x₂ (position → velocity)
ẋ₂ = u (acceleration)
|u| ≤ 1 (bounded control)
3.0
2.0
1.0x
0.00
Position x₁
0.00
Velocity x₂
0.00
Time
u = +1
u = -1
Switching Curve

Optimal Switching Curve

The switching curve is: x₁ = -½ sgn(x₂) x₂²

Bang-bang principle: For time-optimal control, the control only takes extreme values (+1 or -1), never intermediate values.

The trajectory follows parabolas in phase space, switching exactly once when crossing the optimal switching curve.

Click to Set Initial State

Click anywhere on the phase plane to start a trajectory from that point. Watch how the optimal controller drives the system to the origin.