# Correcting Accelerometer Readings when Offset from Center of Mass: How?

A follow-up to an earlier question.

So I've accepted that I need to correct my accelerometer readings for the accelerometer offset from the center of mass.

The offset means that whenever the rocket rotates, the accelerometer will read an acceleration, even though the center of mass is not accelerating---and it's the center-of-mass acceleration that I need from my accelerometer.

I can calculate the rotation terms and subtract them from my acceleration readings to estimate the acceleration of the center of mass, which means I have to calculate also the location of the center of mass as it shifts down due to fuel consumption.

But I wonder how the correction is done in practice. I'm looking for technical detail, an algorithm even, if it's public... but at least a solid technical description of the algorithm. I want to say this is buried in the many space shuttle and saturn v and apollo papers now in the public domain... but I haven't had the good luck of running into it just yet.

Any pointers on where I might find this info? Huge thanks if you can help!

• Not really in my wheelhouse, but I did notice that in the LEM Guidance Equations document ibiblio.org/apollo/Documents/j2-80-R-567-SEC5-REV11_text.pdf there's a change record called "P66 IMU/c.g. Offset Compensation". Happy hunting! May 25 at 13:50
• Oh, nice! Thank you for the pointer!
– user39728
May 25 at 17:41
• At a minimum, you'll have to handle the $\vec{\omega}\times(\vec r \times \vec{\omega})$ term, and possibly the $\dot{\vec{\omega}} \times \vec r$ term. If you have to deal with a vehicle that tosses about 90% of its mass in seven to ten minutes (e.g., a launch vehicle), you'll also have to deal with the fact that the simple $\vec F=m\vec a$ for is no longer quite correct regarding center of mass motion. May 25 at 19:45
• Someone? Echoes, choes, hoes, oes, es, s. Hello, ello, llo, lo, o.
– user39728
May 26 at 22:37
• Ise got points if youse got algo references.
– user39728
May 28 at 3:50

This answer on the Physics sit seems to sum up the maths pretty well:

With the accelerometer A and the center of mass C we have $$\vec{c} > = \vec{r}_C - \vec{r}_A$$.

$$\vec{a}_C = \vec{a}_A + \dot{\vec{\omega}} \times \vec{c} + > \vec{\omega} \times \vec{\omega} \times \vec{c}$$

one can you the 3×3 cross product operator to transform the above into

$$\vec{a}_C = \vec{a}_A + \begin{vmatrix} 0 & -\dot{\omega}_z & > \dot{\omega}_y \\ \dot{\omega}_z & 0 & -\dot{\omega}_x \\ > -\dot{\omega}_y & \dot{\omega}_x & 0 \end{vmatrix} \vec{c} + \begin{vmatrix} 0 & -\omega_z & \omega_y \\ \omega_z & 0 & -\omega_x > \\ -\omega_y & \omega_x & 0 \end{vmatrix} \begin{vmatrix} 0 & > -\omega_z & \omega_y \\ \omega_z & 0 & -\omega_x \\ -\omega_y & \omega_x & 0 \end{vmatrix} \vec{c}$$

or in the form seen the linked post

$$\vec{a}_C = \vec{a}_A + \begin{vmatrix} > -\omega_y^2-\omega_z^2 & \omega_x \omega_y - \dot{\omega}_z & \omega_x \omega_z + \dot{\omega}_y \\ \omega_x \omega_y + \dot{\omega}_z & > -\omega_x^2-\omega_z^2 & \omega_y \omega_z - \dot{\omega}_x \\ \omega_x \omega_z - \dot{\omega}_y & \omega_y \omega_z + > \dot{\omega}_x & -\omega_x^2 - \omega_y^2 \end{vmatrix} \vec{c}$$

The linked post in question also has this useful diagram: This paper here has a much better summary of the maths used for estimating Center of Gravity using accelerometers: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4208239/

This has the exact equation seen in the quoted section listed as equation (14), with the following line on how to efficiently solve it:

Equation (14) can be solved using a QR-Decomposition based Weighted Recursive Least Squares (QR-D based WRLS) with Forgetting Factor (FF) and covariance matrix resetting threshold (TH).

It then follows through this process in quite some detail, so I suggest reading through their summary.

• Thank you but I’m looking for an algorithm used in an actual rocket like the Saturn v or the space shuttle, with a reference to a paper with that algorithm. I know the expression for acceleration and I know you can subtract the rotation terms from the accelerometer’s reading. What I’m looking for is... how is this done in practice? What do the actual algos look like?
– user39728
May 28 at 14:38
• I've added a figure from a document detailing the guidance system on the Saturn V. Is that more appropriate? May 28 at 15:16
• Can you highlight on that figure where the accelerometer corrections are done for those of us who aren't as familiar with it? i.e, show the relevance of that figure to the question. May 28 at 15:34
• I've found a much more up to date and relevant source that doesn't require going through an extremely lengthy notation table for an algorithm that worked 60 years ago! May 28 at 15:47
• Here, have 500 points :D
– user39728
Jun 4 at 4:50

So I've accepted that I need to correct my accelerometer readings for the accelerometer offset from the center of mass.

The premise is wrong. There is no need to correct accelerometer readings.

• Rockets rotate slowly, if at all. After takeoff, it takes several minutes to pitch over from vertical to horizontal and the acceleration that results from this slow spin is completely negligible compared to aerodynamic and other random forces flight control has to deal with.

• During an engine firing in space, spacecraft generally maintain a fixed attitude (or constant spin with thrust along the spin axis) because everything else is a giant waste of propellant. The burn is timed either with a stopwatch, with a fuel meter, or with an integrating accelerometer. Since the vehicle is in a fixed attitude with zero rotation, accelerometer readings are always correct.

• While there is a need to align the thrust vector with the center of gravity, this is generally done with rate gyros in closed loop control. The engine gimbals are continuously adjusted to keep the vehicle in a fixed attitude, as measured by the gyros. The controller must take into consideration changing mass and center of gravity, but a rough estimate or even a fixed schedule is good enough. For authoritative information about the Saturn V, see How does rocket guidance deal with changing mass?

• While acceleration data is neccessary for inertial navigation systems, there is no need to do any corrections. In fact, such corrections would be harmful, because acceleration data should be sampled as close to the gyro as possible, with both sensors mounted on a rigid platform that is decoupled from the vehicle's vibrations and bending. If one wants to determine the exact velocity vector of a spin-stabilized spacecraft for trajectory purposes, it is sufficient to average the velocity output of the INS over a full revolution while no thrusters are firing.

The answer to the title question "How to correct accelerometer readings?" is: Accelerometers are not even used for primary flight control, only gyros are, and where they are used there is no need for correction, and where there is a need for correction the solution is to maintain a fixed or slowly changing attitude, using gyros and closed loop control.

• Some spinning spacecraft will continue to spin while performing an engine burn New Horizons Mission Design YANPING GUO and ROBERT W. FARQUHAR Jun 1 at 19:00
• This is 100% wrong. The space shuttle manual explicitly states (a) that acceleration is used in attitude control and (b) that the acceleration has to be corrected for because the accelerometer will generally not be at the center of mass. Which is why I asked this question in the first place. I’m using the space shuttle algorithms to simulate a launch and those algorithms depend on accelerometer readings that have to be corrected for due to CoM offsets. So in at least one launch vehicle, this is a thing.
– user39728
Jun 1 at 22:52
• The acceleration term in the shuttle controller is basically a load-relief term used to minimize the transverse Y and Z accelerations that would result from drag at nonzero angle of attack/sideslip and from winds which can be significant at the higher altitudes. Not sure how other rockets do load relief, and @OrganicMarble can correct me if I’m wrong, but my space shuttle papers show very clearly that those algorithms take in accelerometer readings and correct them for CoM offsets for load relief at speeds between 547 ft/s and Mach 2.2.
– user39728
Jun 1 at 23:01