# Help with Vector format N-body state transition matrix

[Update] This is for an on-board autonomous navigation system (3-dimensions, interplanetary) using a Kalman Filter. There is no target trajectory. I have the position and velocity measurement models with noise working correctly and process noise from an onboard clock. At this time, I'm only considering constant velocity during a long cruise segment such as New Horizons.

I will try matlab code from page 41 for the 2D case.

Questions:
1) Are integrators such as Runge-kutta integrating acceleration and velocity without gravitational contributions?
2) Would it be appropriate to use Cowell's method for interplanetary orbit propagation?
3) If this were performed in real-time implementation, would past JPL ephemerides of the bodies be used?
4) What is the most common (practical) orbit propagator for interplanetary case?

Original Post:

Folks, I've reached my limit with understanding n-body problem for orbit propagation, in particular the state transition matrix (STM). If I can't solve this, I believe I will not graduate this June and will quit my engineering PhD effort. I've researched for weeks and only found examples for 2-body and 3-body problems around earth, but mine is interplanetary.

Assuming the state vector is [Rx Ry Rz Vx Vy Vz]T, I cannot analytically determine the state transition matrix for n-bodies (Sun, Earth, Moon, Mercury, Venus, Mars, Jupiter, Saturn, Neptune, Uranus, Pluto). Considering that the STM is 6x6, the upper left and lower right quadrant are zeros, whereas the upper right quadrant is a diagonal one, but I cannot determine the lower left quadrant of gravitational forces (pertubations not necessary).

It appears the guide should be between pages 7-9 of this pdf, but there is no example. https://pdfs.semanticscholar.org/3341/f68082eb45509dcbacc5b4146d5b96acc89d.pdf

Please, I am begging as a Mechanical Engineering PhD candidate. My professor is the type that expects me to solve this on my own, but I think this is the end for me.

• There is example MATLAB code at the end of the document. On page 41 is the routine that computes the matrix G you're looking for. Have you tried that? – Ludo Jan 16 at 8:07
• We need more information to be able to help you. If your professor is expecting you to analytically derive the STM in a general n-body problem he's asking something impossible. From your question it seems you need the STM for interplanetary trajectory design (probably some kind of shooting method). If this is the case you should NOT treat it as an n-body problem. You use patched conics or preferably patched 3-body and you get the locations of the planets from something like JPL ephemerides. Propagating the planets as well (n-body) is a terrible approach and your results will be abominable. – Alexander Vandenberghe Jan 16 at 10:03
• This isn't a homework site. Why don't you talk with fellow MechE students and see what they think? – Carl Witthoft Jan 16 at 14:06
• @CarlWitthoft it is not good to just "make up" site policy. Instead, see the answers to Does this site have anything like a homework policy? It is also bad form to tell users what to do. – uhoh Jan 16 at 14:48
• @user165514 you might also consider asking a different question in Academia SE. There is a lot of really good, level headed advice there on how to think about and/or deal with the many challenges that can be faced in graduate school. – uhoh Jan 16 at 21:42

1) Are integrators such as Runge-kutta integrating acceleration and velocity without gravitational contributions?

Numerical integration is a science by itself, and there is no such thing as the Runge-Kutta integrator. RK are a family of integrators and parameters are optimised for specific applications. RK45 is a fairly generic one that works well in a lot of cases, but is easily outperformed in specific applications by specialised integrators. For example, see this paper for an (old) example of a numerical integrator specifically designed for second-order differential equations without a first derivative ($$\ddot{x} = f(x)$$).$${}^1$$

2) Would it be appropriate to use Cowell's method for interplanetary orbit propagation?

Cowell's method is best used when all forces are approximately of the same order of magnitude. For a tiny spacecraft perturbed by a number of much larger bodies, there are more efficient and accurate methods. See for example this paper on the application of Encke's method in the Orion spacecraft.

3) If this were performed in real-time implementation, would past JPL ephemerides of the bodies be used?

I don't know for certain, but I'd assumed they'd embed the relevant portion of the ephemerides file on board. Maybe someone with actual experience can assert this.

4) What is the most common (practical) orbit propagator for interplanetary case?

I doubt there is the "most common". Encke's method appears to have been used since the Apollo era (according to the aforementioned paper).

$${}^1$$ If you try to implement this yourself: there is a typo in the equations at the end of page 2. A Runge-Kutta Nystrom algorithm (paywalled and open access)