I'm writing a program that controls space ship. I needed to determine total travel time for the following scenario:

  • ship has some initial velocity V0
  • ship needed to travel distance D with maximum possible velocity, but have zero V at the end of the travel
  • so, ship accelerates up to Vmax and then decelerates to zero V
  • ship accelerates with acceleration Aa = 0, with constant jerk Ja up to Aamax, up to Vmax
  • then it immediately starts to decelerate using other group of thrusters
  • thrusters used for acceleration cut off instantly
  • ship starts to decelerate with Ad = 0, with constant jerk Jd up to Admax, down to zero velocity
  • as for accel thrusters, decel thrusters cut off instantly too

Control program needed to calculate total travel time or Vmax.

Thanks in advance

Edit: clarification

  • Ship needed to travel distance D with minimum time possible - it accelerates up to some speed Vmax (which is unknown) then it decelerates. At the end of the travel speed must be zero
  • Given: distance D, initial velocity V0 (can be zero), max acceleration Aamax, acceleration jerk Ja, max deceleration Admax, deceleration jerk Jd
  • There is no connection between Vmax and maximum acceleration
  • Both acceleration and deceleration work in the same manner: firstly, it accelerates under jerk for Tj = Amax / J with A = Jt, then it accelerates for Ta with constant A = Amax
  • Total time traveled: T = T1j + T1a + T2j + T2a, T1j = Aamax / Ja, T1a > 0, T2j = Admax / Jd, T2a > 0

Sorry for inconvenience

  • $\begingroup$ Clarification: the ship doesn't stay at $V_{\mathrm{max}}$ for any period of time? It has to have either a positive or negative jerk for all time? $\endgroup$ – BeaumontTaz Sep 23 '14 at 15:33
  • $\begingroup$ @BeaumontTaz Vmax: no it doesn't. Accelerate, then immediately decelerate. Jerk: no it hasn't. See last two formulas in the first answer. $\endgroup$ – simps Sep 23 '14 at 19:38

We have the following 2 equations $$ V_{max}-V_0=\int_0^{T_1} a_1(t)dt \\ V_{max}=\int_0^{T_2} a_2(t)dt $$ where $a_1(t)=\min(J_at,a_{a,max})$, $a_2(t)=\min(J_d t,a_{d,max})$ So the time of achieving maximum acceleration is $a_{max}/J_a$ and we have $$ V_{max}-V_0=\int_0^{a_{a,max}/J_a}J_a tdt +\int_{a_{a,max}/J_a}^{T_1} a_{a,max}dt $$ Thus $$ V_{max}-V_0=1/2 a_{a,max}^2/J_a +a_{a,max}(T_1-a_{a,max}/J_a)=a_{a,max} T_1-1/2 a_{a,max}^2/J_a $$ and finally $$ T_1=(V_{max}-V_0)/a_{a,max}+1/2 a_{a,max}/J_a $$ Similarly $$ V_{max}=\int_0^{a_{d,max}/J_d}J_d tdt +\int_{a_{d,max}/J_d}^{T_2} a_{d,max}dt $$ and $$ T_2=V_{max}/a_{d,max}+1/2 a_{d,max}/J_d $$ The final $T=T_1+T_2$

However, some condition must hold for the above integrals to be true: $$ V_{max}-V_0\ge 1/2 a_{a,max}^2/J_a \\ V_{max}\ge 1/2 a_{d,max}^2/J_d $$

Otherwsie the ship will achieve maximum velocity (or stopped) before it will get maximum acceleration.

EDIT. After clarification I have to proceed the solution. $V_{max}$ is unknown but The full distance $D$ is known so $$ D=D_1+D_2\\ D_1=\int_0^{T_1}V_1(t)dt \\ D_2=\int_0^{T_2} V_2(t)dt $$ where $$ V_1(t)=V_0+\int_0^t a_1(t) dt, ~~ V_1(T_1)=V_{max} \\ V_2(t)=V_{max}-\int_0^t a_2(t) dt, ~~V_2(T_2)=0; $$ So $$ V_1(t)=V_0 +J_a t^2/2 [t< a_{a,max}/J_a]+a_{a,max}(t-a_{a,max}/J_a)(t \ge a_{a,max}/J_a)\\ V_2(t)=V_{max}-J_d t^2/2[t<a_{d,max}/J_d]-a_{d,max}(t-a_{d,max}/J_d)(t \ge a_{d,max}/J_d)\\ $$ So $$ D_1=V_0T_1+a_{a,max}^3/6/J_a^2-a_{a,max}^3/2/J_a^2+a_{a_max}T_1^2/2\\ D_2=V_{max}T_2-a_{d,max}^3/6/J_d^2+a_{d,max}^3/2/J_d^2-a_{d_max}T_2^2/2\\ $$ Since $T_1=(V_{max}-V_0)/a_{a,max}+1/2 a_{a,max}/J_a$ and $T_2=V_{max}/a_{d,max}+1/2 a_{d,max}/J_d$ we can plug this in the above expressions. Finally you will get equation for $V_{max}$ and from there you can get $T_1$ and $T_2$.I hope you can finish this unless you can find an easier solution.

  • $\begingroup$ Looks good, but Vmax is unknown too. $\endgroup$ – simps Sep 24 '14 at 13:12
  • $\begingroup$ May be you then clarify what is given and what is not. And you have to set additional conditions, otherwise the problem is not well defined. Does it achieve the maximal velocity at the same time as maximum acceleration? $\endgroup$ – Alexander Vigodner Sep 24 '14 at 14:47
  • $\begingroup$ Clarified in the first post $\endgroup$ – simps Sep 24 '14 at 15:42
  • $\begingroup$ I extended my answer but I don't have time to finish this today. May be you can do this yourself. $\endgroup$ – Alexander Vigodner Sep 24 '14 at 16:41
  • $\begingroup$ Yes, it looks like that I need. Many thanks! $\endgroup$ – simps Sep 25 '14 at 19:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.