# Apollo 11 gimbal lock flip

I've been studying gimbal lock and am puzzled by something in regards to the Apollo 11 mission mentioned on Wikipedia.

They preferred an alternate solution using an indicator that would be triggered when near to 85 degrees pitch.

"Near that point, in a closed stabilization loop, the torque motors could theoretically be commanded to flip the gimbal 180 degrees instantaneously. Instead, in the LM, the computer flashed a 'gimbal lock' warning at 70 degrees and froze the IMU at 85 degrees"

— Paul Fjeld, Apollo Lunar Surface Journal

What I don't understand is this instantaneous flip of a gimbal by 180 degrees to prevent a gimbal lock. Which gimbal? And how would that change anything? I'm struggling to conceptualize how it would prevent the lock.

The confusion arises in terminology. What instrumentation engineers call a gyroscope is actually an integrating gyroscope or rate gyro, and what they call a gimbal in gimbal lock isn't the gimbal used to mount the gyroscope itself - the gimbals are used to keep a platform housing three gyroscopes level.

A standard gyroscope will point in the same direction at all times, while a rate gyroscope is used for measuring angular velocity:

The rate gyro will deflect the springs in proportion to how fast the frame is spinning - the faster the spin, the larger the springs deflect, which via strain gauge or similar measurements engineering, can be turned into an electrical signal. Measure the change in rate to derive the angular acceleration. Have a computer integrate the rate over time to derive current angular position.

Note the pivoting gimbals for this device though - they are in the exact configuration of a gimbal lock. A rate gyro's housing can only measure changes in a single axis. If the frame housing the gimbal moves away from the axis, then the device wouldn't measure properly. So, three rate gyroscopes are required to measure angular movement in all three angles. These are mounted on a platform that maintains a fixed orientation in space, so the rate gyroscopes can function properly.

When the rate gyroscope feeds a porportional signal to the instrumentation panel, it also feeds this signal to three motors. These motors are the torque motors in the quote. They turn the platform in response to the signal, keeping the platform level. When these gimbals keeping the platform level lock, then there is the problem, and the goal is trying to keep the feedback loop away from turning the gimbals until they lock.

The plan to turn the pitch gimbal 180 degrees would essentially turn the platform upside down, which would revese two of the three accelerometers - and all of the rate gyros. Specifically, the pitch gyro would now be spinning in opposite orientation after the platform was upside down (counterclockwise instead of clockwise). This would mean that it reads a 0.05 rpm counterclockwise turn as instead a 0.05 rpm clockwise turn - and the feedback loop to the motors would similarly be reversed, pulling the platform out of gimbal lock. This could be compared to jumping over the discontinuity at 90 degrees for the tangent function and continuing to perform the integration - in theory. In practice, the system never worked.

• The fact that I understood this post is a testament either to its brilliance as an explanation or the astounding simplicity of the tech used in Apollo. Bravo! May 15 '20 at 17:18

An older style guidance systems had a gyroscope that would point in one location in space (for example, it might point at the North Star). Then, the rest of the vehicle would rotate around. This gyro was connected to the vehicle using gimbals that allowed rotations around each axis. See some of the figures on the wiki page for examples. The computer could then "figure out" which way the spacecraft is pointing by using angle sensor on each of the gimbals. Gimbal lock can occur when two of these gimbals are both aligned along the same axis. I believe that the Apollo IMU had a mechanical gyro with two gimbals on it (they can be though of as pitch and roll in a typical attitude). But, if the axis of each gimbal is lined up with the axis of the gyro, then there are multiple solutions to a rotation from that point. Mechanically, certain gimbals can end up stuck at that point, and the math can end up with essentially a solution that has a divide by zero.
More modern systems use strap down gyros (bolt the gyro to the vehicle and measure the applied torques) or "laser gyros" (no physical gyro just changes in light going in a circle) but those were not feasible in the mid-1960s.

What they are talking about is the difference of mathematics and reality. The mathematics can somewhat easily solve each position, but cannot interpolate between these positions very well.

So in this case there is a limit to what positions the mechanism can reach turning one way. The mathematics has no problem in solving what the position should be. It's just that for the physical structure cannot move to that position with a small move. So the speed of the mechanism would need to be very very fast which it obviously isn't.

Also in the gimbal lock your movement directions are severely limited so you might need to unwind the entire mechanism from one end to the other which is not what you want to do. It's all fine if you have infinitely fast gimbals like your mathematical solution needs.

It's a bit like a early GPS system would tell you to turn left onto the road that is on the bridge above you. Sure the roads cross here but your car can not fly/teleport to the bridge - you should have taken a exit hundreds or thousands of meters ago that allowed you to eventually reach that road. So the system simply does not know the move is illegal.

• "so the system simply does not know the move is illegal" LOL, one more reason we know that the moon landing couldn't have happened ;-) Jun 22 '16 at 18:58
• @WilliamHird not if you have a warning and never move your thrusters into gimbal lock region. Theres really no need to be able to move the trusters in all directions of the spherical direction. Just like car wheels do not turn 360 degrees. the system is basically saying dont turn your wheels 180 degrees so that your steering wont flip. Jun 22 '16 at 19:08