Post · 12 min read· pp. 196–205

Orbit Independent Solution: The Universal Anomaly

You may have noticed that the equations for the ellipse and the hyperbola are quite similar. In many cases, they differ only by a negative sign or a change from circular to hyperbolic trigonometric functions. This is largely due to the fact that all of the orbits are conic sections, so they share a similar mathematical genealogy.

The equations for an ellipse and a hyperbola are summarized in Table 2.

Table 2:The equations representing the ellipse and hyperbola trajectories

EquationEllipse (e<1e < 1)Hyperbola (e>1e > 1)
Orbit equation (true anomaly)r=h2μ11+ecos⁡νr = \frac{h^2}{\mu} \frac{1}{1 + e\cos\nu}r=h2μ11+ecos⁡νr = \frac{h^2}{\mu} \frac{1}{1 + e\cos\nu}
Cartesian Coordinatesx2a2+y2b2=1\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1x2a2−y2b2=1\frac{x^2}{a^2} - \frac{y^2}{b^2} = 1
Semimajor axisa=h2μ11−e2a = \frac{h^2}{\mu}\frac{1}{1 - e^2}a=h2μ1e2−1a = \frac{h^2}{\mu}\frac{1}{e^2 - 1}
Semiminor Axisb=a1−e2b = a\sqrt{1 - e^2}b=ae2−1b = a\sqrt{e^2 - 1}
Energy Equationv22−μr=−μ2a\frac{v^2}{2} - \frac{\mu}{r} = -\frac{\mu}{2a}v22−μr=μ2a\frac{v^2}{2} - \frac{\mu}{r} = \frac{\mu}{2a}
Mean anomalyMe=μ2h3(1−e2)3/2tM_e = \frac{\mu^2}{h^3}\left(1 - e^2\right)^{3/2}tMh=μ2h3(e2−1)3/2tM_h = \frac{\mu^2}{h^3}\left(e^2 - 1\right)^{3/2}t
Kepler’s EquationMe=E−esin⁡EM_e = E - e \sin EMh=esinh⁡F−FM_h = e\sinh F - F
Orbit equation (eccentric anomaly)r=a(1−ecos⁡E)r = a\left(1 - e\cos E\right)r=a(ecosh⁡F−1)r = a\left(e\cosh F - 1\right)

The Universal Variable

Since these equations are so similar, we will try to find a way to unify them, such that we can solve a single equation regardless of the type of orbit. Given the initial position and velocity of the orbiting mass, we can determine the semimajor axis of the orbit from the energy equation:

a=(2r0−v02μ)−1a = \left(\frac{2}{r_0} - \frac{v_0^2}{\mu}\right)^{-1}

(269)

Notice that for a hyperbolic orbit, aa will be negative from this equation, in contrast to our previous definition where aa was positive. This gives an easy way of determining the type of orbit before finding the eccentricity.

Then, we will define the universal variable, or universal anomaly χ\chi, which is by definition zero at t0t_0 (the time when \vectorr0\vector{r}_0 and \vectorv0\vector{v}_0 are known). This is analogous to the true anomaly, which is zero on the apse line, and we previously defined t0t_0 to occur at the apse line.

Using the universal anomaly, we can find the position and velocity of the orbiting mass at any future time via:

\vectorr=[1−χ2r0C(αχ2)]\vectorr0+[(t−t0)−χ3μS(αχ2)]\vectorv0\vectorv=χμrr0[αχ2S(αχ2)−1]\vectorr0+[1−χ2rC(αχ2)]\vectorv0\begin{aligned}\vector{r} &= \left[1 - \frac{\chi^2}{r_0}C\left(\alpha\chi^2\right)\right]\vector{r}_0 + \left[\left(t - t_0\right) - \frac{\chi^3}{\sqrt{\mu}}S\left(\alpha\chi^2\right)\right]\vector{v}_0\\\vector{v} &= \frac{\chi\sqrt{\mu}}{r r_0}\left[\alpha\chi^2S\left(\alpha\chi^2\right) - 1\right]\vector{r}_0 + \left[1 - \frac{\chi^2}{r}C\left(\alpha\chi^2\right)\right]\vector{v}_0\end{aligned}

(270)

where α=1/a\alpha = 1/a and we will define C(z)C(z) and S(z)S(z) shortly. Note that α<0\alpha < 0 for hyperbolas, α=0\alpha = 0 for parabolas (a→∞a\rightarrow\infty) and α>0\alpha > 0 for ellipses. This gives χ\chi dimensions of square root of length, such that αχ2\alpha\chi^2 is dimensionless.

In a previous section, we identified the coefficients of \vectorr0\vector{r}_0 and \vectorv0\vector{v}_0 in equations similar to Eq. 270 as the Lagrange coefficients, in that case, in terms of the change of true anomaly. The equations in Eq. 270 give the Lagrange coefficients in terms of the universal anomaly.

Now, we need a way to solve for χ\chi, the universal anomaly. We can write Kepler’s equation in terms of the universal anomaly as:

μ(t−t0)=r0vr,0μχ2C(αχ2)+(1−αr0)χ3S(αχ2)+r0χ\sqrt{\mu}\left(t - t_0\right) = \frac{r_0 v_{r,0}}{\sqrt{\mu}}\chi^2 C\left(\alpha\chi^2\right) + \left(1 - \alpha r_0\right) \chi^3S\left(\alpha\chi^2\right) + r_0 \chi

(271)

Like Kepler’s equation in the ellipse and hyperbola specific forms, this equation is transcendental in χ\chi. If χ\chi is known, the equation can be solved for the change in time interval, t−t0t - t_0. If the time interval is known instead, we must use numerical techniques to solve the equation.

Next, we need to define the functions C(z)C(z) and S(z)S(z).

Stumpff Functions

The functions C(z)C(z) and S(z)S(z) are Stumpff functions. They can be defined by infinite series of the form:

ck(z)=1k!−z(k+2)!+z2(k+4)!−⋯=∑i=0∞(−1)izi(k+2i)!c_k(z) = \frac{1}{k!} - \frac{z}{\left(k + 2\right)!} + \frac{z^2}{\left(k + 4\right)!} - \cdots = \sum_{i=0}^{\infty}\frac{\left(-1\right)^{i} z^i}{\left(k + 2i\right)!}

(272)

where kk is an integer that indicates the type of Stumpff function.

To solve Eq. 271, we don’t want to work with the infinite series forms of the Stumpff equations. Instead, we will convert the Stumpff functions to trigonometric functions using the Taylor series expansions of the circular and hyperbolic trigonometric functions. The third and fourth Stumpff functions, k=2k=2 and k=3k=3 respectively, define our C(z)C(z) and S(z)S(z) functions from above.

C(z)={1−cos⁡zz(z>0)cosh⁡−z−1−z(z<0)12(z=0)C(z) =\begin{cases}\displaystyle \frac{1 - \cos\sqrt{z}}{z} & \left(z > 0\right)\\ \displaystyle\frac{\cosh\sqrt{-z} - 1}{-z} & \left(z < 0\right) \\ \displaystyle\frac{1}{2} & \left(z = 0\right)\end{cases}

(273)

and

S(z)={z−sin⁡z(z)3(z>0)sinh⁡−z−−z(−z)3(z<0)16(z=0)S(z) =\begin{cases}\displaystyle \frac{\sqrt{z} - \sin\sqrt{z}}{\left(\sqrt{z}\right)^3} & \left(z > 0\right)\\ \displaystyle \frac{\sinh\sqrt{-z} - \sqrt{-z}}{\left(\sqrt{-z}\right)^3} & \left(z < 0\right) \\ \displaystyle \frac{1}{6} & \left(z = 0\right)\end{cases}

(274)

The two Stumpff functions are plotted in Fig. 66. Notice that both C(z)C(z) and S(z)S(z) tend toward infinity as zz approaches −∞-\infty, and they approach zero as zz approaches +∞+\infty.

python
from matplotlib.ticker import AutoMinorLocator
import matplotlib.pyplot as plt
import numpy as np

def stumpff_2(z):
    x = np.full_like(z, np.nan)
    x[z > 0] = (1 - np.cos(np.sqrt(z[z > 0]))) / z[z > 0]
    x[z < 0] = (np.cosh(np.sqrt(-z[z < 0])) - 1) / (-z[z < 0])
    x[np.isnan(x)] = 1/2
    return x


def stumpff_3(z):
    x = np.full_like(z, np.nan)
    z_gt_0 = z[z > 0]
    z_lt_0 = z[z < 0]
    x[z > 0] = (np.sqrt(z_gt_0) - np.sin(np.sqrt(z_gt_0))) / np.sqrt(z_gt_0)**3
    x[z < 0] = (np.sinh(np.sqrt(-z_lt_0)) - np.sqrt(-z_lt_0)) / np.sqrt(-z_lt_0)**3
    x[np.isnan(x)] = 1/6
    return x

x_1 = np.linspace(-50, 0, 100)
x_2 = np.linspace(0, 30, 100)
x_3 = np.linspace(30, 500, 300)

y0_1 = stumpff_2(x_1)
y1_1 = stumpff_3(x_1)
y0_2 = stumpff_2(x_2)
y1_2 = stumpff_3(x_2)
y0_3 = stumpff_2(x_3)
y1_3 = stumpff_3(x_3)
fig, (ax_1, ax_2, ax_3) = plt.subplots(figsize=(4, 6), dpi=200, nrows=3)
ax_1.plot(x_1, y0_1, label="$C(z)$")
ax_1.plot(x_1, y1_1, label="$S(z)$")
ax_1.grid(which="both")
ax_1.xaxis.set_minor_locator(AutoMinorLocator(2))
ax_1.yaxis.set_minor_locator(AutoMinorLocator(2))
ax_1.legend()

ax_2.plot(x_2, y0_2, label="$C(z)$")
ax_2.plot(x_2, y1_2, label="$S(z)$")
ax_2.grid(which="both")
ax_2.xaxis.set_minor_locator(AutoMinorLocator(2))
ax_2.yaxis.set_minor_locator(AutoMinorLocator(2))
ax_2.legend()

ax_3.plot(x_3, y0_3, label="$C(z)$")
ax_3.plot(x_3, y1_3, label="$S(z)$")
ax_3.grid(which="both")
ax_3.xaxis.set_minor_locator(AutoMinorLocator(2))
ax_3.yaxis.set_minor_locator(AutoMinorLocator(2))
ax_3.legend();

<Figure size 800x1200 with 3 Axes>

python
fig

<Figure size 800x1200 with 3 Axes>

<Figure size 800x1200 with 3 Axes>

Figure 66:The Stumpff functions defined by Eq. 273 and Eq. 274. Note the varying xx axes on the plots.

Relation of χ\chi to Other Anomalies

We now seek to relate χ\chi back to the anomalies for elliptical, parabolic, and hyperbolic orbits. For demonstration, we will choose the following initial conditions:

t0=0r0=rpvr,0=0t_0 = 0\quad r_0 = r_p \quad v_{r,0} = 0

(275)

which is to say, the same initial conditions that we defined for the equations in terms of the true and eccentric anomalies. For the case of the parabola, α=0\alpha = 0 and we can show that:

Mp=16(χμh)3+12(μhχ)M_p = \frac{1}{6}\left(\frac{\chi\sqrt{\mu}}{h}\right)^3 + \frac{1}{2}\left(\frac{\sqrt{\mu}}{h}\chi\right)

(276)

In the case of the ellipse, we know that α>0\alpha > 0, and we can show that:

Me=χa−esin⁡(χa)M_e = \frac{\chi}{\sqrt{a}} - e \sin\left(\frac{\chi}{\sqrt{a}}\right)

(277)

Finally, for the hyperbola, α<0\alpha < 0 and a<0a < 0, and we can show that:

Mh=esinh⁡(χ−a)−χ−aM_h = e\sinh\left(\frac{\chi}{\sqrt{-a}}\right) - \frac{\chi}{\sqrt{-a}}

(278)

Summarizing these results, the universal anomaly χ\chi is related to our previously defined anomalies as follows:

χ={hμtan⁡ν2parabolaaEellipse−aFhyperbola\chi =\begin{cases}\displaystyle\frac{h}{\sqrt{\mu}}\tan\frac{\nu}{2} & \text{parabola} \\\displaystyle\sqrt{a}E & \text{ellipse} \\\displaystyle \sqrt{-a}F & \text{hyperbola}\end{cases}

(279)

Generalizing from this to the case where t0≠0t_0\neq 0, and does not occur at periapsis, we find:

χ={hμ(tan⁡ν2−tan⁡ν02)parabolaa(E−E0)ellipse−a(F−F0)hyperbola\chi =\begin{cases}\displaystyle\frac{h}{\sqrt{\mu}}\left(\tan\frac{\nu}{2} - \tan\frac{\nu_0}{2}\right) & \text{parabola} \\\displaystyle\sqrt{a}\left(E - E_0\right) & \text{ellipse} \\\displaystyle \sqrt{-a}\left(F - F_0\right) & \text{hyperbola}\end{cases}

(280)

where ν0\nu_0, E0E_0, and F0F_0 are the true anomaly and eccentric anomalies at the time t0t_0.

Numerical Solution of Kepler’s Equation in the Universal Anomaly

To formulate the numerical solution of Kepler’s equation in terms of the universal anomaly, we move everything over to one side of the equation, and seek the roots of:

f(χ)=0=r0vr,0μχ2C(αχ2)+(1−αr0)χ3S(αχ2)+r0χ−μ(t−t0)f(\chi) = 0 = \frac{r_0 v_{r,0}}{\sqrt{\mu}}\chi^2 C\left(\alpha\chi^2\right) + \left(1 - \alpha r_0\right) \chi^3S\left(\alpha\chi^2\right) + r_0 \chi - \sqrt{\mu}\left(t - t_0\right)

(281)

The derivative of this function is also useful:

df(χ)dχ=2r0vr,0μχC(z)+r0vr,0μχ2dC(z)dzdzdχ+3(1−αr0)χ2S(z)+(1−αr0)χ3dS(z)dzdzdχ+r0\begin{aligned} \frac{d f(\chi)}{d\chi} = & 2\frac{r_0 v_{r,0}}{\sqrt{\mu}}\chi C(z) + \frac{r_0 v_{r,0}}{\sqrt{\mu}}\chi^2 \frac{d C(z)}{dz} \frac{dz}{d\chi} \\ &+ 3\left(1 - \alpha r_0\right)\chi^2 S(z) + \left(1 - \alpha r_0\right)\chi^3 \frac{d S(z)}{dz}\frac{dz}{d\chi} + r_0 \end{aligned}

(282)

where z=αχ2z = \alpha\chi^2, such that:

dzdχ=2αχ\frac{dz}{d\chi} = 2\alpha\chi

(283)

and

dS(z)dz=12z[C(z)−3S(z)]dC(z)dz=12z[1−zS(z)−2C(z)]\begin{aligned}\frac{d S(z)}{dz} &= \frac{1}{2z}\left[C(z) - 3S(z)\right] \\\frac{d C(z)}{dz} &= \frac{1}{2z}\left[1 - z S(z) - 2C(z)\right]\end{aligned}

(284)

Substituting these results back into Eq. 282 gives:

df(χ)dχ=r0vr,0μχ[1−αχ2S(z)]+(1−αr0)χ2C(z)+r0\frac{d f(\chi)}{d\chi} = \frac{r_0 v_{r,0}}{\sqrt{\mu}}\chi\left[1 - \alpha\chi^2 S(z)\right] + \left(1 - \alpha r_0\right)\chi^2 C(z) + r_0

(285)

The last thing we need for a solution using Newton’s algorithm is an initial guess. There are several methods suggested for this. In Curtis (2020), they suggest using:

χi=0=μ∣α∣Δt\chi_{i = 0} = \sqrt{\mu} \left\lvert\alpha\right\rvert \Delta t

(286)

In Prussing & Conway (2013), they suggest a couple of different options. First, Prussing & Conway (2013) show that the solution lies in the interval:

χ+=μΔtr−χ−=μΔtr+\begin{aligned}\chi^{+} &= \frac{\sqrt{\mu}\Delta t}{r^{-}}\\\chi^{-} &= \frac{\sqrt{\mu}\Delta t}{r^{+}}\end{aligned}

(287)

where r+r^{+} and r−r^{-} are the largest and smallest values of the radius. The most conservative choice of r−r^{-} is the radius at periapsis for all the orbits:

r−=rpr^{-} = r_p

(288)

For elliptical orbits, the most conservative choice of r+r^{+} is the radius at apoapse:

rellipse+=rar^{+}_{\text{ellipse}} = r_a

(289)

For parabolas and hyperbolas, the most conservative choice is r+=∞r^{+} = \infty, such that:

χparabola/hyperbola−=0\chi^{-}_{\text{parabola/hyperbola}} = 0

(290)

With values of χ+\chi^{+} and χ−\chi^{-} computed, the initial guess is simply the average of the two:

χi=0=χ++χ−2\chi_{i = 0} = \frac{\chi^{+} + \chi^{-}}{2}

(291)

Alternatively, a more refined estimate can be determined using a secant estimate of the root of Kepler’s equation:

χi=0=μΔt2rp[f(χ+)+μΔt]\chi_{i = 0} = \frac{\mu\Delta t^2}{r_p \left[f(\chi^{+}) + \sqrt{\mu}\Delta t\right]}

(292)

where f(χ+)f(\chi^{+}) is the solution of Kepler’s equation with the χ+\chi^{+} value.

Note

Prussing & Conway (2013), citing Conway (1986), suggest that faster convergence in the solution of Kepler’s equation can be achieved by using the Laguerre algorithm, rather than Newton’s algorithm. Another advantage of the Laguerre algorithm is that it is relatively insensitive to the value of the initial guess.

The Laguerre algorithm can be implemented as:

χi+1=χi−nf(χi)f′(χi)±(n−1)2[f′(χi)]2−n(n−1)f(χi)f′′(χi)\chi_{i + 1} = \chi_{i} - \frac{n f(\chi_i)}{f'(\chi_i) \pm \sqrt{\left(n - 1\right)^2 \left[f'(\chi_i)\right]^2 - n\left(n - 1\right) f(\chi_i)f''(\chi_i)}}

(293)

The sign ambiguity in the denominator is determined by taking the sign of the numerical value of f′(χi)f'(\chi_i). In addition, the solution is relatively insensitive to the choice of the value of nn, which is an integer constant. It seems as though n=5n = 5 is a reasonable value. Choosing n=1n = 1 gives the standard Newton’s algorithm.

Derivation of f′′(χi)f''(\chi_i) is left up to the reader.

Although the Laguerre algorithm was originally intended for finding the roots of polynomial equations, it seems to work well in this application.

References

  1. Curtis, H. D. (2020). Orbital Mechanics for Engineering Students (fourth). Elsevier.
  2. Prussing, J. E., & Conway, B. A. (2013). Orbital Mechanics (Second). Oxford University Press.
  3. Conway, B. A. (1986). An Improved Algorithm Due to Laguerre for the Solution of Kepler’s Equation. Celestial Mechanics, 39(2), 199–211. 10.1007/BF01230852