I took a break from Stack Exchange, jumped in my spacecar and flew the following squiggle:

$$a_x = \cos(10 \ t)$$ $$a_y = \sin(5 \ t)$$ $$a_z = \cos(2 \ t)$$

starting at xyz = [-0.01, 0, -0.05] and v_xyz = [0, -0.2, 0] with a total flight time of $2 \pi$.

When I got home I was told "Oh that was a lovely lissajous squiggle, but how much delta-v did you put on the car?"

I said "Oh, not much" and made a beeline to my computer to get back on Stack Exchange.

Question: How much delta-v DID I use?

  1. If I have an acceleration vector (same as thrust vector; lets assume mass doesn't change) as a function of time $\mathbf{F}(t)$ what is the general integral expression for total delta-v should I use?
  2. If someone looked up my trip in Horizons and got my state vectors $\mathbf{x}(t)$ and $\mathbf{v}(t)$ and had a numerical integrator and interpolator, what is the general integral expression for total delta-v should they use?

"bonus points" for including a Python script in your answer

squiggle trajectory squiggle trajectory

3D plot of position (returns to origin) and plots of velocity components

import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from scipy.integrate import odeint as ODEint

def deriv(X, t):
    x, v = X.reshape(2, -1)
    ax = np.cos(10*t)
    ay = np.sin(5*t)
    az = np.cos(2* t)
    return np.hstack((v, [ax, ay, az])) 

times = np.linspace(0, 2*np.pi, 1001)

X0 = np.hstack(([-0.01, 0, -0.05], [0, -0.2, 0]))

answer, info = ODEint(deriv, X0, times, full_output=True)

xyz, vxyz = answer.T.reshape(2, 3, -1)

fig = plt.figure()
ax  = fig.add_subplot(1, 1, 1, projection='3d', proj_type = 'ortho')
x, y, z = xyz
ax.plot(x, y, z)
ax.plot(x[:1], y[:1], z[:1], 'ok')
ax.plot(x[-1:], y[-1:], z[-1:], 'or')

for thing in vxyz:
  • 1
    $\begingroup$ This feels more like code golf than a genuine space question... at best it's a math question about basic calculus. Either way, I don't think it's a good fit here. This is written like a homework assignment. This is Q&A, not Mechanical Turk. $\endgroup$ – J... Oct 19 '20 at 14:30
  • $\begingroup$ @J... as far as I know the concept of "delta-v" is specific to spaceflight. If you can show otherwise I would be happy to find out. $\endgroup$ – uhoh Oct 19 '20 at 14:35
  • $\begingroup$ That's not the point. $\endgroup$ – J... Oct 19 '20 at 14:40
  • $\begingroup$ That's exactly the point. "is written like a homework assignment" just means that it is stylized. After writing over 2001 questions here you have to mix it up a bit to stay fresh :-) $\endgroup$ – uhoh Oct 19 '20 at 14:43
  • 2
    $\begingroup$ @J... When a question is too big or complicatged to fit into one SE question post, we break it up into smaller answerable pieces. I'm currently still uncomfortable with this hand-waving answer using an unexplained and unsourced equation, so I first asked this question so that the equation could have a foundation. Next I made this plot In order to start thinking about extracting post-launch delta-v for deep space spacecraft using its state vectors. $\endgroup$ – uhoh Oct 19 '20 at 14:52

As $\Delta v$ is just change in velocity, we can just integrate the norm of the acceleration function over time:

$$\Delta v = \int|\mathbf{a}(t)| dt$$

You're out of luck getting a closed form of that integral though.

As far as analytical solutions goes, we can note that at $t = \frac{\pi}{2}$, all of $a_x$, $a_y$ and $a_z$ are maxed out, and hence $\Delta v < 2\pi\sqrt{3}$.

Similarly, the acceleration at all times is going to be greater than or equal to one of the components, and since they are trigonometric functions, their integrals are trivial.

$$4 < \Delta v < 2\pi\sqrt{3}$$

I can't see that there's much more to it from here than just putting the acceleration function into a numerical integrator. It's a smooth curve, so they are good at this.

Integral(sqrt(cos(10*x)^2 + sin(5*x)^2 + cos(2*x)^2),0,2*pi)
-> 7.5279

Or, by the definition of acceleration, if what you have is velocity data:

$$\Delta v = \int\left|\frac{d\mathbf{v}}{dt}\right| dt$$

Which if you have tabular data and don't bother with interpolation, is simply:

$$\Delta v =\sum |d\mathbf{v}|$$

Which is just summing up all the velocity differences between the discrete data points.

  • $\begingroup$ Great answer. The analytic solution of the line integral seems to be an elliptic integral, is that right? $\endgroup$ – 0xDBFB7 Oct 24 '20 at 14:37

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.