HOME

TheInfoList



OR:

Gimbal lock is the loss of one
degree of freedom Degrees of freedom (often abbreviated df or DOF) refers to the number of independent variables or parameters of a thermodynamic system. In various scientific fields, the word "freedom" is used to describe the limits to which physical movement or ...
in a three-dimensional, three-
gimbal A gimbal is a pivoted support that permits rotation of an object about an axis. A set of three gimbals, one mounted on the other with orthogonal pivot axes, may be used to allow an object mounted on the innermost gimbal to remain independent of ...
mechanism that occurs when the axes of two of the three gimbals are driven into a parallel configuration, "locking" the system into
rotation Rotation, or spin, is the circular movement of an object around a '' central axis''. A two-dimensional rotating object has only one possible central axis and can rotate in either a clockwise or counterclockwise direction. A three-dimensional ...
in a degenerate two-dimensional space. The term gimbal-''lock'' can be misleading in the sense that none of the individual gimbals are actually 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 about one axis, leaving the suspended object effectively locked (i.e. unable to rotate) around that 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 A gyroscope (from Ancient Greek γῦρος ''gŷros'', "round" and σκοπέω ''skopéō'', "to look") is a device used for measuring or maintaining orientation and angular velocity. It is a spinning wheel or disc in which the axis of rot ...
s and in
inertial measurement unit An inertial measurement unit (IMU) is an electronic device that measures and reports a body's specific force, angular rate, and sometimes the orientation of the body, using a combination of accelerometers, gyroscopes, and sometimes magnetomet ...
s to allow the inner gimbal's orientation to remain fixed while the outer gimbal suspension assumes any orientation. In compasses and
flywheel energy storage Flywheel energy storage (FES) works by accelerating a rotor (flywheel) to a very high speed and maintaining the energy in the system as rotational energy. When energy is extracted from the system, the flywheel's rotational speed is reduced as a c ...
mechanisms they allow objects to remain upright. They are used to orient thrusters on rockets. Some
coordinate system In geometry, a coordinate system is a system that uses one or more numbers, or coordinates, to uniquely determine the position of the points or other geometric elements on a manifold such as Euclidean space. The order of the coordinates is sig ...
s in mathematics behave as if there were real gimbals used to measure the angles, notably
Euler angles The Euler angles are three angles introduced by Leonhard Euler to describe the orientation of a rigid body with respect to a fixed coordinate system.Novi Commentarii academiae scientiarum Petropolitanae 20, 1776, pp. 189–207 (E478PDF/ref> Th ...
. For cases of three or fewer nested gimbals, gimbal lock inevitably occurs at some point in the system due to properties of
covering space A covering of a topological space X is a continuous map \pi : E \rightarrow X with special properties. Definition Let X be a topological space. A covering of X is a continuous map : \pi : E \rightarrow X such that there exists a discrete spa ...
s (described below).


In engineering

While only two specific orientations produce exact gimbal lock, practical mechanical gimbals encounter difficulties near those orientations. When a set of gimbals is close to the locked configuration, small rotations of the gimbal platform require large motions of the surrounding gimbals. Although the ratio is infinite only at the point of gimbal lock, the practical speed and acceleration limits of the gimbals—due to inertia (resulting from the mass of each gimbal ring), bearing friction, the flow resistance of air or other fluid surrounding the gimbals (if they are not in a vacuum), and other physical and engineering factors—limit the motion of the platform close to that point.


In two dimensions

Gimbal lock can occur in gimbal systems with two degrees of freedom such as a
theodolite A theodolite () is a precision optical instrument for measuring angles between designated visible points in the horizontal and vertical planes. The traditional use has been for land surveying, but it is also used extensively for building and ...
with rotations about an
azimuth An azimuth (; from ar, اَلسُّمُوت, as-sumūt, the directions) is an angular measurement in a spherical coordinate system. More specifically, it is the horizontal angle from a cardinal direction, most commonly north. Mathematical ...
and elevation in two dimensions. These systems can gimbal lock at
zenith The zenith (, ) is an imaginary point directly "above" a particular location, on the celestial sphere. "Above" means in the vertical direction ( plumb line) opposite to the gravity direction at that location ( nadir). The zenith is the "high ...
and
nadir The nadir (, ; ar, نظير, naẓīr, counterpart) 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. The direc ...
, 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 for which 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 In mathematics, a spherical coordinate system is a coordinate system for three-dimensional space where the position of a point is specified by three numbers: the ''radial distance'' of that point from a fixed origin, its ''polar angle'' meas ...
do not define a coordinate chart on the sphere at zenith and nadir. Alternatively, the corresponding map ''T''2→''S''2 from the
torus In geometry, a torus (plural tori, colloquially donut or doughnut) is a surface of revolution generated by revolving a circle in three-dimensional space about an axis that is coplanar with the circle. If the axis of revolution does n ...
''T''2 to the sphere ''S''2 (given by the point with given azimuth and elevation) is not a covering map at these points.


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.


Solutions

This problem may be overcome by use of a fourth gimbal, actively 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 An inertial navigation system (INS) is a navigation device that uses motion sensors ( accelerometers), rotation sensors ( gyroscopes) and a computer to continuously calculate by dead reckoning the position, the orientation, and the velocity ...
s, that can be done by mounting the inertial sensors directly to the body of the vehicle (this is called a strapdown system) and integrating sensed rotation and acceleration digitally using
quaternion In mathematics, the quaternion number system extends the complex numbers. Quaternions were first described by the Irish mathematician William Rowan Hamilton in 1843 and applied to mechanics in three-dimensional space. Hamilton defined a quater ...
methods to derive vehicle orientation and velocity. Another way to replace gimbals is to use fluid bearings or a flotation chamber.


On Apollo 11

A well-known gimbal lock incident happened in the
Apollo 11 Apollo 11 (July 16–24, 1969) was the American spaceflight that first landed humans on the Moon. Commander Neil Armstrong and lunar module pilot Buzz Aldrin landed the Apollo Lunar Module ''Eagle'' on July 20, 1969, at 20:17 UTC, ...
Moon mission. On this spacecraft, a set of gimbals was used on an
inertial measurement unit An inertial measurement unit (IMU) is an electronic device that measures and reports a body's specific force, angular rate, and sometimes the orientation of the body, using a combination of accelerometers, gyroscopes, and sometimes magnetomet ...
(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 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 A robotic arm is a type of mechanical arm, usually programmable, with similar functions to a human arm; the arm may be the sum total of the mechanism or may be part of a more complex robot. The links of such a manipulator are connected by join ...
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 avoiding 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".ANSI/RIA R15.06-1999


In applied mathematics

The problem of gimbal lock appears when one uses
Euler angles The Euler angles are three angles introduced by Leonhard Euler to describe the orientation of a rigid body with respect to a fixed coordinate system.Novi Commentarii academiae scientiarum Petropolitanae 20, 1776, pp. 189–207 (E478PDF/ref> Th ...
in applied mathematics; developers of 3D
computer program A computer program is a sequence or set of instructions in a programming language for a computer to Execution (computing), execute. Computer programs are one component of software, which also includes software documentation, documentation and oth ...
s, such as
3D modeling In 3D computer graphics, 3D modeling is the process of developing a mathematical coordinate-based representation of any surface of an object (inanimate or living) in three dimensions via specialized software by manipulating edges, vertices, a ...
, embedded navigation systems, and
video game Video games, also known as computer games, are electronic games that involves interaction with a user interface or input device such as a joystick, controller, keyboard, or motion sensing device to generate visual feedback. This feedba ...
s must take care to avoid it. 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 In mathematics, real projective space, denoted or is the topological space of lines passing through the origin 0 in It is a compact, smooth manifold of dimension , and is a special case of a Grassmannian space. Basic properties Construction A ...
RP3 which is the same as the space of 3d rotations SO3) is not a
local homeomorphism In mathematics, more specifically topology, a local homeomorphism is a function between topological spaces that, intuitively, preserves local (though not necessarily global) structure. If f : X \to Y is a local homeomorphism, X is said to be an � ...
at every point, and thus at some points the
rank Rank is the relative position, value, worth, complexity, power, importance, authority, level, etc. of a person or object within a ranking, such as: Level or position in a hierarchical organization * Academic rank * Diplomatic rank * Hierarchy * ...
(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, or spin, is the circular movement of an object around a '' central axis''. A two-dimensional rotating object has only one possible central axis and can rotate in either a clockwise or counterclockwise direction. A three-dimensional ...
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 In mathematics, the quaternion number system extends the complex numbers. Quaternions were first described by the Irish mathematician William Rowan Hamilton in 1843 and applied to mechanics in three-dimensional space. Hamilton defined a quater ...
. To make a comparison, all the
translations Translation is the communication of the meaning of a source-language text by means of an equivalent target-language text. The English language draws a terminological distinction (which does not exist in every language) between ''transl ...
can be described using three numbers x, y, and z, as the succession of three consecutive linear movements along three perpendicular axes X, Y and Z axes. The same holds true for rotations: all the rotations can be described using three numbers \alpha, \beta, and \gamma, 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, 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 most commonly refers to: * ''The Matrix'' (franchise), an American media franchise ** ''The Matrix'', a 1999 science-fiction action film ** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchis ...
in several ways. One of these representations is: :\begin R &= \begin 1 & 0 & 0 \\ 0 & \cos \alpha & -\sin \alpha \\ 0 & \sin \alpha & \cos \alpha \end \begin \cos \beta & 0 & \sin \beta \\ 0 & 1 & 0 \\ -\sin \beta & 0 & \cos \beta \end \begin \cos \gamma & -\sin \gamma & 0 \\ \sin \gamma & \cos \gamma & 0 \\ 0 & 0 & 1 \end \end An example worth examining happens when \beta = \tfrac. Knowing that \cos \tfrac = 0 and \sin \tfrac = 1, the above expression becomes equal to: :\begin R &= \begin 1 & 0 & 0 \\ 0 & \cos \alpha & -\sin \alpha \\ 0 & \sin \alpha & \cos \alpha \end \begin 0 & 0 & 1 \\ 0 & 1 & 0 \\ -1 & 0 & 0 \end \begin \cos \gamma & -\sin \gamma & 0 \\ \sin \gamma & \cos \gamma & 0 \\ 0 & 0 & 1 \end \end Carrying out
matrix multiplication In mathematics, particularly in linear algebra, matrix multiplication is a binary operation that produces a matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the s ...
: :\begin R &= \begin 0 & 0 & 1 \\ \sin \alpha & \cos \alpha & 0 \\ -\cos \alpha & \sin \alpha & 0 \end \begin \cos \gamma & -\sin \gamma & 0 \\ \sin \gamma & \cos \gamma & 0 \\ 0 & 0 & 1 \end &= \begin 0 & 0 & 1 \\ \sin \alpha \cos \gamma + \cos \alpha \sin \gamma & -\sin \alpha \sin \gamma + \cos \alpha \cos \gamma & 0 \\ -\cos \alpha \cos \gamma + \sin \alpha \sin \gamma & \cos \alpha \sin \gamma + \sin \alpha \cos \gamma & 0 \end \end And finally using the trigonometry formulas: :\begin R &= \begin 0 & 0 & 1 \\ \sin ( \alpha + \gamma ) & \cos (\alpha + \gamma) & 0 \\ -\cos ( \alpha + \gamma ) & \sin (\alpha + \gamma) & 0 \end \end Changing the values of \alpha and \gamma in the above matrix has the same effects: the rotation angle \alpha + \gamma changes, but the rotation axis remains in the Z direction: the last column and the first row in the matrix won't change. The only solution for \alpha and \gamma to recover different roles is to change \beta. It is possible to imagine an airplane rotated by the above-mentioned Euler angles using the X-Y-Z convention. In this case, the first angle - \alpha is the pitch. Yaw is then set to \tfrac and the final rotation - by \gamma - is again the airplane's pitch. Because of gimbal lock, it has lost one of the degrees of freedom - in this case the ability to roll. It is also possible to choose another convention for representing a rotation with a matrix using Euler angles than the X-Y-Z convention above, and also choose other variation intervals for the angles, but in the end there is always at least one value for which a degree of freedom is lost. The gimbal lock problem does not make Euler angles "invalid" (they always serve as a well-defined coordinate system), but it makes them unsuited for some practical applications.


Alternate orientation representation

The cause of gimbal lock is the representation of orientation in calculations as three axial rotations based on
Euler angles The Euler angles are three angles introduced by Leonhard Euler to describe the orientation of a rigid body with respect to a fixed coordinate system.Novi Commentarii academiae scientiarum Petropolitanae 20, 1776, pp. 189–207 (E478PDF/ref> Th ...
. A potential solution therefore is to represent the orientation in some other way. This could be as a
rotation matrix In linear algebra, a rotation matrix is a transformation matrix that is used to perform a rotation in Euclidean space. For example, using the convention below, the matrix :R = \begin \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \ ...
, a quaternion (see
quaternions and spatial rotation Unit quaternions, known as ''versors'', provide a convenient mathematical notation for representing spatial orientations and rotations of elements in three dimensional space. Specifically, they encode information about an axis-angle rotation abou ...
), or a similar orientation representation that treats the orientation as a value rather than three separate and related values. Given such a representation, the user stores the orientation as a value. To quantify angular changes produced by a transformation, the orientation change is expressed as a delta angle/axis rotation. The resulting orientation must be re-normalized to prevent the accumulation of floating-point error in successive transformations. For matrices, re-normalizing the result requires converting the matrix into its nearest orthonormal representation. For quaternions, re-normalization requires performing quaternion normalization.


See also

* * * (equivalent navigational problem on polar expeditions) * * *


References


External links


Gimbal Lock - Explained
at
YouTube YouTube is a global online video sharing and social media platform headquartered in San Bruno, California. It was launched on February 14, 2005, by Steve Chen, Chad Hurley, and Jawed Karim. It is owned by Google, and is the second mo ...

Gimbal Lock in 30 Seconds
at
YouTube YouTube is a global online video sharing and social media platform headquartered in San Bruno, California. It was launched on February 14, 2005, by Steve Chen, Chad Hurley, and Jawed Karim. It is owned by Google, and is the second mo ...
{{DEFAULTSORT:Gimbal Lock Rotation in three dimensions Angle Gyroscopes Spaceflight concepts 3D computer graphics