Advanced maths

Minimum time bounded control calculator for a double integrator

Compute a minimum-time bang-bang transfer for a scalar double integrator with a symmetric acceleration bound.

Your numbers

Two entries: position and velocity.
Two entries: position and velocity.
Enter finite values within the stated bounds; coordinate rows may use commas.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Compute a minimum-time bang-bang transfer for a scalar double integrator with a symmetric acceleration bound.

THE FORMULAx′=v, v′=u,|u|≤a; wswitch²=(v0²+vf²)/2+σa(xf−x0).

A worked example

From(0,0)to(1,0)with acceleration magnitude 1, accelerate for 1 time unit and brake for 1; total minimum time 2.

Good to know

Finite position/velocity pairs and positive acceleration≤1e6; no speed, position or jerk constraints. Analytic zero/one-switch candidates with nonnegative durations and endpoint checks; coincident states return zero time.

Time is the objective

The double integrator has position derivative equal to velocity and velocity derivative equal to control acceleration. With a symmetric acceleration bound and no velocity limit, the minimum-time transfer uses maximum-magnitude acceleration except at an instantaneous switch. This is the classic bang-bang solution.

It differs from minimizing control energy over a fixed horizon. A smooth low-energy path can take longer, while a time-optimal path uses the acceleration bound aggressively. This calculator keeps the free-final-time objective explicit instead of treating every optimal-control problem as the same trajectory request.

Rest-to-rest triangular velocityv switch = 1t switch = 1Minimum time = 2
Scroll across to see the full diagram.
Unit acceleration over unit distance gives switch time 1 and total time 2.

Compare this with the Finite horizon linear quadratic control calculator with terminal cost. Find switching times and a bang-bang trajectory minimizing transfer time with bounded acceleration; fixed-horizon quadratic control minimizes a different objective.

States and acceleration units

Enter an initial position and velocity, a target position and velocity, and one positive acceleration magnitude. All quantities must use compatible length and time units. The model allows negative positions and velocities, and the target velocity need not be zero.

No position barriers, maximum speed, jerk limit or travel-direction restriction are imposed. If any such constraint matters physically, the computed path may be infeasible for the actual system even when its mathematical endpoint residual is tiny. Those constraints change the optimal-control problem rather than adding a small correction afterward.

The unit rest-to-rest example

The default starts at position zero with zero velocity and ends at position one with zero velocity. With unit acceleration, the first half accelerates positively for one time unit, reaching position one-half and velocity one. The second half applies negative acceleration for one more unit.

The final position is one and the final velocity is zero, giving total time two. The familiar triangular velocity profile and piecewise-quadratic position profile follow directly. They are not produced by interpolating the endpoints with an arbitrary curve shape.

Solving the switching candidates

For each possible sign of the first acceleration, eliminating time from the two constant-acceleration phases gives a quadratic relation for the switching velocity. Both real square-root signs are examined, because arbitrary initial and terminal velocities can select a branch that intuition from rest-to-rest motion would miss.

The durations follow from velocity changes divided by the signed acceleration. Candidates with negative durations are discarded. The remaining candidates are evaluated by direct propagation of position and velocity, and the smallest valid total duration is selected under the stated unconstrained double-integrator theorem.

Zero-switch and zero-time cases

One phase can have zero duration, representing a transfer achieved with constant acceleration and no effective switch. This is a valid boundary of the same candidate construction. It should not be rejected merely because a drawing was expected to show two visibly separate arcs.

When both initial state components already equal the target, the minimum time is zero. The page returns that case explicitly. A nonzero initial velocity at the target position is different: the system must still change velocity and generally move away before returning, so equal positions alone do not imply zero transfer time.

Reading the trajectory certificate

The sampled trajectory shows position and velocity along the selected two-phase motion. The switch time, switching velocity and first acceleration sign identify the underlying exact piecewise formula. The endpoint residual compares the propagated final state with the supplied target.

A tiny residual checks arithmetic consistency, not physical actuator fidelity. Finite switching bandwidth, delays and friction can change the realized motion. The displayed samples are illustrative evaluations of the analytic trajectory and do not discretize the optimization itself into a grid search.

Before using the trajectory in a machine

Check acceleration units and whether the model's unlimited intermediate speed is acceptable. The switching speed can exceed both endpoint speeds substantially, particularly when covering a large distance. Adding a speed ceiling introduces possible coasting phases and needs another time-optimal construction.

Use this output to study the bounded-acceleration mathematical problem or verify a simpler controller example. It does not generate jerk-limited commands, certify collision avoidance or model a specific actuator. Preserve those exclusions when comparing its minimum time with a real process cycle.

A few questions, answered

Does the path obey a speed limit?

No. Only acceleration magnitude is bounded; an additional speed ceiling changes the optimal trajectory.

Can target velocity be nonzero?

Yes. Both endpoint positions and velocities are supplied explicitly.

Why might motion initially go away from the target?

An initial velocity can require braking and reversal before the target state can be reached optimally.

Is the displayed path numerically optimized over samples?

No. The samples evaluate analytic zero/one-switch candidate trajectories after the minimum-time branch is selected.

Find your calculator

Start typing to explore the library.