[Physics] Utilizing maximum acceleration $a$ for displacement $d$ with initial velocity $v_0$ and final velocity $v_1$

accelerationkinematicsoptimizationvectors

Problem

My goal is to move an object from point a to b (displacement $d$) as fast as possible utilizing the maximum available acceleration $a_{max}$, taking into account the initial velocity $v_0$ and final velocity $v_1$.

Elaboration

I'm working on spaceship physics which means there is no friction or drag. The direction of the object is not necessarily parallel to the direction of it's velocity, neither are the initial and final velocities necessarily parallel.


Solving for one dimension

I started off by solving this in one dimension using the formulas for constant acceleration, specifically:
$$
d = \frac{v_1^2-v_0^2}{2a}
$$
As my intuition tells me there should be a displacement $d_0$ where constant acceleration $a_{max}$ is performed (where the object reaches its maximum velocity $v_{max}$) followed by a displacement $d_1$ where constant deceleration $-a_{max}$ is performed. From the above equation, and from:

$$
d = d_0 + d_1
$$

We find that:

$$
d = \frac{v_{max}^2-v_0^2}{2a_{max}} + \frac{v_1^2-v_{max}^2}{-2a_{max}}
$$

Solving for $v_{max}$ gives:

$$
v_{max}^2 = \frac{2a_{max}d+v_1^2+v_0^2}2
$$

Using this information I can accelerate the object until $v_{max}$ is reached and then decelerate it.


Solving for 3 dimensions

Doing this in 3-dimensions is a bit more difficult. I'm assuming that $||\vec{a}||$ should be constant and equal the maximum available acceleration $a_{max}$.
My first attempt here was to calculate $v_{max}$ (like above) for each axis seperately. The problem though is to find a proper acceleration distribution along each axis when the displacement changes (having a moving target), so that the object for example does not go into orbit.

In another attempt I did the following spring/damper like calculation to find $\vec{a}$:
$$
\vec{s} = \vec{v_1}-\vec{v_0}+\vec{d}
$$
$$
\vec{a} = \frac{\vec{s}}{||\vec{s}||} * a_{max}
$$
This works fine when accelerating but deceleration starts off too early.

I have been trying to search the web for this information but to no avail, any suggestions?

Best Answer

I ended up using a solution by Christer Swahn from his blog: http://mmoarch.blogspot.se/2012/05/computing-space-travel.html

The trajectory is approximated and then optimised using the bisection method. A near perfect result is usually reached after 10 iterations. See full solution (Java implementation) at: http://mmoarch.blogspot.se/2012/05/computing-space-travel-implementation.html