Gimbal lock
Encyclopedia
Gimbal lock is the loss of one degree of freedom in a three-dimensional space that occurs when the axes of two of the three gimbal
Gimbal
A gimbal is a pivoted support that allows the rotation of an object about a single axis. A set of two gimbals, one mounted on the other with pivot axes orthogonal, may be used to allow an object mounted on the innermost gimbal to remain immobile regardless of the motion of its support...

s are driven into a parallel configuration, "locking" the system into rotation
Rotation
A rotation is a circular movement of an object around a center of rotation. A three-dimensional object rotates always around an imaginary line called a rotation axis. If the axis is within the body, and passes through its center of mass the body is said to rotate upon itself, or spin. A rotation...

 in a degenerate two-dimensional space.

The word lock is misleading: no gimbal is restrained. All three gimbals can still rotate freely about their respective axes of suspension. Nevertheless, because of the parallel orientation of two of the gimbals axes there is no gimbal available to accommodate rotation along one axis.

Gimbals

A gimbal is a ring that is suspended so it can rotate about an axis. Gimbals are typically nested one within another to accommodate rotation about multiple axes.

They appear in gyroscope
Gyroscope
A gyroscope is a device for measuring or maintaining orientation, based on the principles of angular momentum. In essence, a mechanical gyroscope is a spinning wheel or disk whose axle is free to take any orientation...

s and in inertial measurement unit
Inertial measurement unit
An inertial measurement unit, or IMU, is an electronic device that measures and reports on a craft's velocity, orientation, and gravitational forces, using a combination of accelerometers and gyroscopes. IMUs are typically used to maneuver aircraft, including UAVs, among many others, and...

s to allow the inner gimbal's orientation to remain fixed while the outer gimbal suspension assumes any orientation. In compasses, flywheel energy storage
Flywheel energy storage
Flywheel energy storage works by accelerating a rotor to a very high speed and maintaining the energy in the system as rotational energy...

 mechanisms, or more commonly drink holders, they allow objects to remain upright. They are used to orient thrusters
Rocket engine
A rocket engine, or simply "rocket", is a jet engineRocket Propulsion Elements; 7th edition- chapter 1 that uses only propellant mass for forming its high speed propulsive jet. Rocket engines are reaction engines and obtain thrust in accordance with Newton's third law...

 on rockets.

Some coordinate system
Coordinate system
In geometry, a coordinate system is a system which uses one or more numbers, or coordinates, to uniquely determine the position of a point or other geometric element. The order of the coordinates is significant and they are sometimes identified by their position in an ordered tuple and sometimes by...

s in mathematics behave as if there were real gimbals used to measure the angles, notably Euler angles
Euler angles
The Euler angles are three angles introduced by Leonhard Euler to describe the orientation of a rigid body. To describe such an orientation in 3-dimensional Euclidean space three parameters are required...

.

For cases of three or fewer nested gimbals, gimbal lock inevitably occurs at some point in the system, due to properties of covering spaces (described below).

Gimbal lock in two dimensions

Gimbal lock can occur in gimbal systems with two degrees of freedom such as a theodolite
Theodolite
A theodolite is a precision instrument for measuring angles in the horizontal and vertical planes. Theodolites are mainly used for surveying applications, and have been adapted for specialized purposes in fields like metrology and rocket launch technology...

 with rotations about an azimuth and elevation in two dimensions. These systems can gimbal lock at zenith
Zenith
The zenith is an imaginary point directly "above" a particular location, on the imaginary celestial sphere. "Above" means in the vertical direction opposite to the apparent gravitational force at that location. The opposite direction, i.e...

 and nadir
Nadir
The nadir is the direction pointing directly below a particular location; that is, it is one of two vertical directions at a specified location, orthogonal to a horizontal flat surface there. Since the concept of being below is itself somewhat vague, scientists define the nadir in more rigorous...

, because at those points azimuth is not well-defined, and rotation in the azimuth direction does not change the direction the theodolite is pointing.

Consider tracking a helicopter flying towards the theodolite from the horizon. The theodolite is a telescope mounted on a tripod so that it can move in azimuth and elevation to track the helicopter. The helicopter flies towards the theodolite and is tracked by the telescope in elevation and azimuth. The helicopter flies immediately above the tripod (i.e. it is at zenith) when it changes direction and flies at 90 degrees to its previous course. The telescope cannot track this maneuver without a discontinuous jump in one or both of the gimbal orientations. There is no continuous motion that allows it to follow the target. It is in gimbal lock. So there is an infinity of directions around zenith that the telescope cannot continuously track all movements of a target. Note that even if the helicopter does not pass through zenith, but only near zenith, so that gimbal lock does not occur, the system must still move exceptionally rapidly to track it, as it rapidly passes from one bearing to the other. The closer to zenith the nearest point is, the faster this must be done, and if it actually goes through zenith, the limit of these "increasingly rapid" movements becomes infinitely fast, namely discontinuous.

To recover from gimbal lock the user has to go around the zenith – explicitly: reduce the elevation, change the azimuth to match the azimuth of the target, then change the elevation to match the target.

Mathematically, this corresponds to the fact that spherical coordinates do not define a coordinate chart on the sphere at zenith and nadir. Alternatively, that the corresponding map T2S2 from the torus
Torus
In geometry, a torus is a surface of revolution generated by revolving a circle in three dimensional space about an axis coplanar with the circle...

 T2 to the sphere S2 (given by the point with given azimuth and elevation) is not a covering map
Covering map
In mathematics, more specifically algebraic topology, a covering map is a continuous surjective function p from a topological space, C, to a topological space, X, such that each point in X has a neighbourhood evenly covered by p...

 at these points.

Gimbal lock in three dimensions

Consider a case of a level sensing platform on an aircraft flying due North with its three gimbal axes mutually perpendicular (i.e., roll, pitch and yaw angles each zero). If the aircraft pitches up 90 degrees, the aircraft and platform's Yaw axis gimbal becomes parallel to the Roll axis gimbal, and changes about yaw can no longer be compensated for.

The word lock is misleading: no gimbal is restrained, all three gimbals can still rotate freely about their respective axis of suspension. Nevertheless, because of the parallel orientation of both the yaw and roll gimbal axes, there is no axis available to accommodate yaw rotation.

Solutions

This problem may be overcome by use of a fourth gimbal, intelligently driven by a motor so as to maintain a large angle between roll and yaw gimbal axes. Another solution is to rotate one or more of the gimbals to an arbitrary position when gimbal lock is detected and thus reset the device.

Modern practice is to avoid the use of gimbals entirely. In the context of inertial navigation system
Inertial navigation system
An inertial navigation system is a navigation aid that uses a computer, motion sensors and rotation sensors to continuously calculate via dead reckoning the position, orientation, and velocity of a moving object without the need for external references...

s, that can be done by mounting the inertial sensors directly to the body of the vehicle (this is called a strapdown
Strapdown
The strapdown is an alternative to the gimbal used in inertial navigation system . It is mechanically simpler, but has drawbacks as a result.-External links:*...

 system) and integrating sensed rotation and acceleration digitally using quaternion
Quaternion
In mathematics, the quaternions are a number system that extends the complex numbers. They were first described by Irish mathematician Sir William Rowan Hamilton in 1843 and applied to mechanics in three-dimensional space...

 methods to derive vehicle orientation and velocity. Another way to replace gimbals is to use fluid bearings or a flotation chamber.

Gimbal lock on Apollo 11

A well-known gimbal lock incident happened in the Apollo 11
Apollo 11
In early 1969, Bill Anders accepted a job with the National Space Council effective in August 1969 and announced his retirement as an astronaut. At that point Ken Mattingly was moved from the support crew into parallel training with Anders as backup Command Module Pilot in case Apollo 11 was...

 Moon mission. On this spacecraft, a set of gimbals was used on an inertial measurement unit
Inertial measurement unit
An inertial measurement unit, or IMU, is an electronic device that measures and reports on a craft's velocity, orientation, and gravitational forces, using a combination of accelerometers and gyroscopes. IMUs are typically used to maneuver aircraft, including UAVs, among many others, and...

 (IMU). The engineers were aware of the gimbal lock problem but had declined to use a fourth gimbal. Some of the reasoning behind this decision is apparent from the following quote:
They preferred an alternate solution using an indicator that would be triggered when near to 85 degrees pitch.
Rather than try to drive the gimbals faster than they could go, the system simply gave up and froze the platform. From this point, the spacecraft would have to be manually moved away from the gimbal lock position, and the platform would have to be manually realigned using the stars as a reference.

After the Lunar Module had landed, Mike Collins
Michael Collins (astronaut)
Michael Collins is a former American astronaut and test pilot. Selected as part of the third group of fourteen astronauts in 1963, he flew in space twice. His first spaceflight was Gemini 10, in which he and command pilot John Young performed two rendezvous with different spacecraft and Collins...

 aboard the Command Module joked "How about sending me a fourth gimbal for Christmas?"

Robotics

In robotics, gimbal lock is commonly referred to as "wrist flip", due to the use of a "triple-roll wrist" in robotic arm
Robotic arm
A mechanical arm is a robotic, usually programmable, with similar functions to a human arm. The links of such a manipulator are connected by joints allowing either rotational motion or translational displacement. The links of the manipulator can be considered to form a kinematic chain...

s, where three axes of the wrist, controlling yaw, pitch, and roll, all pass through a common point.

An example of a wrist flip, also called a wrist singularity, is when the path through which the robot is traveling causes the first and third axes of the robot's wrist to line up. The second wrist axis then attempts to spin 180° in zero time to maintain the orientation of the end effector. The result of a singularity can be quite dramatic and can have adverse effects on the robot arm, the end effector, and the process.

The importance of non-singularities in robotics has led the American National Standard for Industrial Robots and Robot Systems — Safety Requirements to define it as "a condition caused by the collinear alignment of two or more robot axes resulting in unpredictable robot motion and velocities".

Gimbal lock in applied mathematics

The problem of the gimbal lock appears when one uses the Euler angles
Euler angles
The Euler angles are three angles introduced by Leonhard Euler to describe the orientation of a rigid body. To describe such an orientation in 3-dimensional Euclidean space three parameters are required...

 in an application of mathematics, for example in a computer program
Computer program
A computer program is a sequence of instructions written to perform a specified task with a computer. A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute...

 (3D modeling
3D modeling
In 3D computer graphics, 3D modeling is the process of developing a mathematical representation of any three-dimensional surface of object via specialized software. The product is called a 3D model...

, embedded navigation systems, 3D video games, metaverse
Metaverse
The Metaverse is our collective online shared space, created by the convergence of virtually enhanced physical reality and physically persistent virtual space, including the sum of all virtual worlds, augmented reality, and the internet...

s, ...).

In formal language, gimbal lock occurs because the map from Euler angles to rotations (topologically, from the 3-torus T3 to the real projective space
Real projective space
In mathematics, real projective space, or RPn, is the topological space of lines through 0 in Rn+1. It is a compact, smooth manifold of dimension n, and a special case of a Grassmannian.-Construction:...

 RP3) is not a covering map
Covering map
In mathematics, more specifically algebraic topology, a covering map is a continuous surjective function p from a topological space, C, to a topological space, X, such that each point in X has a neighbourhood evenly covered by p...

 – it is not a local homeomorphism
Local homeomorphism
In mathematics, more specifically topology, a local homeomorphism is intuitively a function, f, between topological spaces that preserves local structure. Equivalently, one can cover the domain of this function by open sets, such that f restricted to each such open set is a homeomorphism onto its...

 at every point, and thus at some points the rank (degrees of freedom) must drop below 3, at which point gimbal lock occurs. Euler angles provide a means for giving a numerical description of any rotation
Rotation
A rotation is a circular movement of an object around a center of rotation. A three-dimensional object rotates always around an imaginary line called a rotation axis. If the axis is within the body, and passes through its center of mass the body is said to rotate upon itself, or spin. A rotation...

 in three dimensional space using three numbers, but not only is this description not unique, but there are some points where not every change in the target space (rotations) can be realized by a change in the source space (Euler angles). This is a topological constraint – there is no covering map from the 3-torus to the 3-dimensional real projective space; the only (non-trivial) covering map is from the 3-sphere, as in the use of quaternions.

To make a comparison, all the translations
Translation (geometry)
In Euclidean geometry, a translation moves every point a constant distance in a specified direction. A translation can be described as a rigid motion, other rigid motions include rotations and reflections. A translation can also be interpreted as the addition of a constant vector to every point, or...

 can be described using three numbers , , and , as the succession of three consecutive linear movements along three perpendicular axes , and axes. That's the same for rotations, all the rotations can be described using three numbers , , and , as the succession of three rotational movements around three axes that are perpendicular one to the next. This similarity between linear coordinates and angular coordinates makes Euler angles very intuitive
Intuition (knowledge)
Intuition is the ability to acquire knowledge without inference or the use of reason. "The word 'intuition' comes from the Latin word 'intueri', which is often roughly translated as meaning 'to look inside'’ or 'to contemplate'." Intuition provides us with beliefs that we cannot necessarily justify...

, but unfortunately they suffer from the gimbal lock problem.

Loss of a degree of freedom with Euler angles

A rotation in 3D space can be represented numerically with matrices
Matrix (mathematics)
In mathematics, a matrix is a rectangular array of numbers, symbols, or expressions. The individual items in a matrix are called its elements or entries. An example of a matrix with six elements isMatrices of the same size can be added or subtracted element by element...

 in several ways. One of these representations is:
with and constrained in the interval , and constrained in the interval .

Let's examine for example what happens when . Knowing that and , the above expression becomes equal to:

The second matrix is the identity matrix
Identity matrix
In linear algebra, the identity matrix or unit matrix of size n is the n×n square matrix with ones on the main diagonal and zeros elsewhere. It is denoted by In, or simply by I if the size is immaterial or can be trivially determined by the context...

 and has no effect on the product. Carrying out matrix multiplication
Matrix multiplication
In mathematics, matrix multiplication is a binary operation that takes a pair of matrices, and produces another matrix. If A is an n-by-m matrix and B is an m-by-p matrix, the result AB of their multiplication is an n-by-p matrix defined only if the number of columns m of the left matrix A is the...

 of first and third matrices:

And finally using the trigonometry formulas:

Changing 's and 's values in the above matrix has the same effects: the rotation's angle changes, but the rotation's axis remains in the direction. The last column and the last line in the matrix won't change: one degree of freedom has been lost.

The only solution for and to recover different roles is to get away from the value.

A similar problem appears when .

One can choose another convention for representing a rotation with a matrix using Euler angles than the Z-X-Z convention above, and also choose other variation intervals for the angles, but at the end there is always at least one value for which a degree of freedom is lost.

Note that the gimbal lock problem does not make Euler angles "wrong" (they always play at least their role of a well-defined coordinates system), but it makes them unsuited for some practical applications.

The quaternion solution

Another representation for rotations in 3D space is the quaternion
Quaternion
In mathematics, the quaternions are a number system that extends the complex numbers. They were first described by Irish mathematician Sir William Rowan Hamilton in 1843 and applied to mechanics in three-dimensional space...

s.

A quaternion is a tuple
Tuple
In mathematics and computer science, a tuple is an ordered list of elements. In set theory, an n-tuple is a sequence of n elements, where n is a positive integer. There is also one 0-tuple, an empty sequence. An n-tuple is defined inductively using the construction of an ordered pair...

 made of 4 numbers that represents a geometrical similarity
Similarity (geometry)
Two geometrical objects are called similar if they both have the same shape. More precisely, either one is congruent to the result of a uniform scaling of the other...

 in the general case. If the relation is verified, then the quaternion can be used to represent a rotation.

From a practical point of view, a rotation of an angle around an axis directed by a normalized vector  is represented by the quaternion

There is no problem similar to the gimbal lock with quaternions. This can be explained intuitively by the fact that a quaternion describes a rotation in one single move ("please turn radians around the axis driven by vector "), while the Euler angles are made of three successive rotations.

Besides that, quaternions also have other advantages
Quaternions and spatial rotation
Unit quaternions provide a convenient mathematical notation for representing orientations and rotations of objects in three dimensions. Compared to Euler angles they are simpler to compose and avoid the problem of gimbal lock. Compared to rotation matrices they are more numerically stable and may...

 over Euler angles.

See also

  • Flight dynamics
    Flight dynamics
    Flight dynamics is the science of air vehicle orientation and control in three dimensions. The three critical flight dynamics parameters are the angles of rotation in three dimensions about the vehicle's center of mass, known as pitch, roll and yaw .Aerospace engineers develop control systems for...

  • Inertial navigation system
    Inertial navigation system
    An inertial navigation system is a navigation aid that uses a computer, motion sensors and rotation sensors to continuously calculate via dead reckoning the position, orientation, and velocity of a moving object without the need for external references...

  • Motion planning
    Motion planning
    Motion planning is a term used in robotics for the process of detailing a task into discrete motions....

  • Quaternions and spatial rotation
    Quaternions and spatial rotation
    Unit quaternions provide a convenient mathematical notation for representing orientations and rotations of objects in three dimensions. Compared to Euler angles they are simpler to compose and avoid the problem of gimbal lock. Compared to rotation matrices they are more numerically stable and may...

  • Charts on SO(3)
    Charts on SO(3)
    In mathematics, the special orthogonal group in three dimensions, otherwise known as the rotation group SO, is a naturally occurring example of a manifold. The various charts on SO set up rival coordinate systems: in this case there cannot be said to be a preferred set of parameters describing a...


External links

  • Euler angles and gimbal lock (video) Part 1, Part 2
  • Gimble Lock - Explained at YouTube
    YouTube
    YouTube is a video-sharing website, created by three former PayPal employees in February 2005, on which users can upload, view and share videos....

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK