# What are singularities in a six-axis robot arm?

If you intend to use a six-axis robot arm, such as Mecademic's Meca500, the example featured in this tutorial, you will probably need to do more than just position and orient the robot *end-effector* in various poses. You will likely also need the end-effector to follow prescribed paths as in gluing, or when inserting a pin. If this is the case, then you must learn about *robot singularities*, because these special configurations will often impede the Cartesian movements of your robot end-effector. You must therefore know how to keep away from robot singularities by properly designing your robot cell.

An industrial robot can be controlled in two spaces: *joint space* and *Cartesian space*. Hence, there are two sets of position-mode motion commands that make an industrial robot move. For joint-space motion commands (sometimes incorrectly called point-to-point commands), you simply specify — directly or indirectly — a desired set of joint positions, and the robot moves by translating or rotating each joint to the desired joint position, simultaneously and in a linear fashion. For Cartesian-space motion commands, you specify a desired pose for the end-effector AND a desired Cartesian path (linear or circular). To find the necessary joint positions along the desired Cartesian path, the robot controller must calculate the inverse position and velocity kinematics of the robot. Singularities arise when this calculation fails (for example, when you have division by zero) and must therefore be avoided.

Try jogging a six-axis robot arm in joint space, and the only time the robot will stop is when a joint hits a limit or when there is a mechanical interference. In contrast, try jogging the same robot in Cartesian space and the robot will frequently stop and refuse to go in certain directions, although it seems to be far from what you think is the workspace boundary. A robot singularity is a configuration in which the robot end-effector becomes blocked in certain directions.

A robot singularity is a configuration in which the robot end-effector becomes blocked in certain directions.

Any six-axis robot arm (also known as a serial robot, or serial manipulator) has singularities. (Actually, the correct term is *six-degree-of-freedom*, but let’s stick to the popular, unscientific term *six-axis*). Some robot arms have singularities that are extremely easy to identify. Other robotic arms have singularities that are impossible to describe without the use of lengthy and complex formulas. The complexity and types of singularity in a robot arm will depend on the number of joints, their types (linear or rotary), and their geometric arrangement.

Because singularities significantly deteriorate the performance of an industrial robot arm, you must learn how to identify them and never move close to them, when using Cartesian-space motion commands.

#### Robot singularities as degeneracies in velocity mapping

Consider the following most trivial example, that of the six-axis positioning stage shown below, composed of a stack of three orthogonal linear guides as well as three rotation stages, the axes of which intersect at one point. Let the tool center point (TCP) be at that intersection point, and let the end-effector be represented by the tool reference frame shown in the figure. This Cartesian robot can bring its TCP anywhere within the yellow cuboid and orient its end-effector in any orientation. It can also continuously displace its end-effector along any 6D path within this workspace . . . except when the axes of the two extreme revolute joints coincide, as in the configuration on the right. The latter condition corresponds to the only singularity that this six-axis robot arm has (it also includes the case that arises when the position of joint 5 is offset 180°).

In a singularity, a robot cannot displace its end-effector along certain directions. In this particular example, the robot in the configuration on the right cannot rotate its end-effector about any axis that is normal to the axes of the three revolute joints (which become coplanar in a singularity). This specific singularity is also known as a *gimbal lock*.

At a singularity, a robotic arm loses one or more degrees of freedom.

At a singularity, a robotic arm loses one or more degrees of freedom. A robot singularity is a physical blockage, not some kind of abstract mathematical problem, although we have a simple mathematical explanation for it. Singularities of six-axis robot arms can be explained with the following inverse velocity kinematic equation:

**q̇** = **J**^{−1}**v**,

where

**v** = [*ẋ*, *ẏ*, *ż*, *ω _{x}*,

*ω*,

_{y}*ω*]

_{z}^{T}

is the *Cartesian velocity vector* of the end-effector, **q̇** is the vector of *joint velocities* and **J** is a 6×6 matrix called the *Jacobian matrix*. The Jacobian matrix is function of the joint positions (**q**) and the robot geometry. When this matrix becomes singular (at certain joint positions), the above equation is not defined and finding joint velocities for certain Cartesian velocity vectors becomes impossible. In other words, the robot becomes blocked in certain directions, and we say that it is in a singularity.

The problem with singularities is not only the impossibility of crossing them, but also the high joint velocities resulting from passing close to them.

The problem with singularities is not only the impossibility of crossing them, but also the high joint velocities resulting from passing close to them. A robot is said to be close to singularity when the determinant of its Jacobian matrix is close to zero, which yields the effect of division by a very small number. Such high joint velocities may be unexpected and can pose safety risks in the case of big, fast industrial robots. Furthermore, when following a specific Cartesian path and passing close to a singularity, the feasible end-effector velocities are significantly reduced. Finally, due to control problems, the path accuracy of a robot controlled in Cartesian space deteriorates significantly in the vicinity of singularities.

#### Robot singularities as internal workspace boundaries

Robot singularities are not only configurations in which the inverse velocity kinematics fail: in a singularity, the inverse position kinematic equations of a robot degenerate too. For a desired end-effector pose, six-axis robots like the Meca500 can generally have up to eight different solutions for the joint positions, corresponding to the same end-effector pose, as shown below. (Even more solutions are possible, if we take into account that joint 6 is often unlimited, but let’s keep it limited to one complete rotation for the sake of discussing singularities). These eight different solutions correspond to eight different *configuration types*. Changing a configuration type requires passing through a singularity (see the top image in this tutorial). Thus, as we discuss in our tutorial on workspace, the Cartesian workspace of the typical six-axis robot arm is composed of eight 6D entities. The boundaries between these entities correspond to singularities. The remaining boundaries correspond to joint limits (and other mechanical interferences).

#### The three types of singularity in a wrist-partitioned, vertically-articulated robot arm

The vast majority of six-axis industrial robots consist of six revolute joints arranged as in the Meca500. Namely, the axes of joints 2 and 3 are parallel, the axes of joints 1 and 4 are normal to the axes of joints 2 and 3, the axis of joint 5 is normal to the axes of joints 4 and 6, and these last three axes intersect at one point. This architecture is often referred to as a *vertically-articulated robot arm*. It was first adopted in the PUMA robot developed by Unimation in 1978. Furthermore, robot arms in which the axes of the last three joints intersect at one point are referred to as *wrist‑partitioned* or as having *inline wrists*. One of the main advantages of this popular architecture is that the mathematical equations describing its kinematics are fairly simple. Only paint robots do not have inline wrists, because the offsets between the axes allow the robot to have greater orientation capabilities. Many so-called collaborative robots, too, do not have inline wrists, but we will consider these special robots later.

**Wrist singularity**

The most frequently-encountered singularity in vertically-articulated robot arms with inline wrists is the *wrist singularity*. It occurs when the axes of joints 4 and 6 become coincident. In most robots, this condition corresponds to *θ*_{5} = 0°. In the figure below, the middle configuration corresponds to a wrist singularity whereas the other two correspond to two different sets of configuration types. In the left configuration, we have the so-called *no-flip* condition (*θ*_{5} > 0°) whereas, in the right configuration, we have the *flip* condition (*θ*_{5} < 0°).

In a wrist singularity, the robot cannot move in the direction of the axis of joint 5. Consider the top-most figure in this tutorial where a robot is shown crossing a wrist singularity. In order for the TCP to follow a line through the singularity, joints 4 and 6 must simultaneously rotate 90° in opposite directions, at the singularity. Thus, crossing a wrist singularity while following a line is physically possible but, at the singularity, the end-effector remains motionless while joints 4 and 6 rotate. In other words, it is impossible for the end-effector to cross the singularity without stopping. That said, due to numerical problems, it is impossible to do this crossing while jogging in Cartesian space, even if you do not mind that the end-effector has to stop.

In a wrist singularity, there are infinite solutions to the inverse position kinematics of the robot. If {*θ*_{1}, *θ*_{2}, *θ*_{3}, *θ*_{4}, *θ*_{5}, *θ*_{6}} is a solution, then {*θ*_{1}, *θ*_{2}, *θ*_{3}, *θ*_{4} − *β*, *θ*_{5}, *θ*_{6} + *β*} is a solution too, where *β* is an arbitrary angle.

**Elbow singularity**

The second type of singularity in vertically articulated robot arms with inline wrists is the *elbow singularity*. It occurs when the *wrist center* (the point where the axes of joints 4, 5 and 6 intersect) lies on the plane passing through the axes of joints 2 and 3. We can say that, in an elbow singularity, the arm is fully stretched. (Due to mechanical interferences, most robot arms cannot be fully folded, which would be the other elbow singularity.) An elbow singularity is determined only by the position of joint 3. For example, in the Meca500, the elbow singularity occurs when *θ*_{3} = −arctan(60/19) ≈ −72.43°.

In the above figure, the middle configuration corresponds to an elbow singularity whereas the other two correspond to two different sets of configuration types. In the left configuration, we have the so-called *elbow-up* condition (*θ*_{3} > −arctan(60/19)) whereas, in the right configuration, we have the *elbow-down* condition (*θ*_{3} < −arctan(60/19)).

In an elbow singularity, two sets of inverse position kinematic solutions degenerate into one. This singularity is the least unexpected and is easy to avoid.

**Shoulder singularity**

The third and last type of singularity in vertically-articulated robot arms with inline wrists is the *shoulder singularity*. It occurs when the center of the robot wrist lies in the plane passing through the axes of joints 1 and 2 (or through the axis of joint 1 and parallel to the axis of joint 2). In the Meca500, the center of the robot wrist lies directly on the axis of joint 1 in a shoulder singularity. This singularity is the most complex as it does not depend on a single joint position, as do the other two.

In the above figure, the middle configuration corresponds to a shoulder singularity whereas the two others correspond to two different sets of configuration types. In the left configuration, we have the *front* condition whereas, in the right configuration, we have the *back* condition. Of course, a mathematical formula determines these two conditions, but it is a bit complex and will not be presented here.

In a shoulder singularity, the robot cannot move in the direction of the axis of joint 2. Consider the above figure where a robot is shown crossing a shoulder singularity. In order for the TCP to follow a line through the singularity, joints 1 and 4 must simultaneously rotate 90° in opposite directions (other joints need to rotate too), while the end-effector remains stationary. Thus, it is physically possible to cross a shoulder singularity while following a line but, at the singularity, the end-effector remains motionless while some of the joints rotate. In other words, it is impossible to cross a shoulder singularity without having the end-effector stop. That said, due to numerical problems, it is impossible to do this crossing while jogging in Cartesian space.

In a shoulder singularity, there are infinite solutions to the inverse position kinematics of the robot. Unfortunately, there is no simple formula to express these solutions.

**Configurations and recap**

Note that you can have singularity configurations that belong to any two of the three types of singularity, or even to all three.

Also, note that a configuration type is defined by the set of three configuration conditions described above, namely {flip/no-flip, elbow-up/elbow-down, front/back}. Passing from one configuration type to another requires crossing a singularity. It is therefore imperative that when using Cartesian-space commands, you specify the desired configuration type, not merely the desired end-effector pose.

Finally, the three types of singularity present in vertically-articulated robot arms with inline wrists are illustrated in the video below. Note that in the sequence where the robot passes near a wrist singularity, the minimum value for *θ*_{5} is 0.2° — that is extremely close to a wrist singularity. Also, in the sequence illustrating the elbow singularity, the value of *θ*_{3} is quickly oscillating ±12° around the singular value of *θ*_{3} ≈ −72.43°, but the end-effector is almost stationary.

#### Types of singularity in a typical six-axis collaborative robot (cobot)

As already mentioned, most so-called *collaborative robots* do not have a PUMA-type architecture. Indeed, the vast majority of six-axis *cobots* on the market have the same arrangement of six revolute joints as the UR3 by Universal Robots, taken here as an example. Namely, the axes of joints 2, 3, and 4 are parallel, the axis of joint 1 intersects and is normal to the axis of joint 2, and the axis of joint 5 intersects and is normal to the axes of joints 4 and 6.

These cobots, too, have a simple inverse position kinematic problem allowing up to eight different solutions. However, the singularities of these cobots are a bit different. The wrist singularity (left figure above) occurs when the axes of joints 4 and 6 become parallel. In the UR3, this corresponds to *θ*_{5} = 0°, *θ*_{5} = ±180° or *θ*_{5} = ±360°. Furthermore, in a wrist singularity, the mechanism consisting of joints 2, 3, 4, and 5, can move while the end-effector remains stationary. The elbow singularity occurs when the axes of joints 2, 3 and 4 are coplanar, as shown in the middle figure above. In the UR3, this corresponds to *θ*_{3} = 0°. Finally, the shoulder singularity occurs when the intersection point of the axes of joints 5 and 6 lies in the plane passing through the axes of joints 1 and 2, as shown in the figure above right. In a shoulder singularity, the two possible solutions for *θ*_{1} coalesce. Unlike the typical six-axis robot arm, there is no joint motion that results in a stationary end-effector.

The three types of robot singularity are illustrated in this video prepared by the research team of one of our cofounders.

#### How to avoid robot singularities?

Now that you know which robot configurations are singular, the question is how to avoid them. Unfortunately, robot singularities can only be avoided by properly designing your robotic cell (and that includes the design of the adaptor plate for your end-effector). If you have poorly assigned your pick location so that it corresponds to a wrist singularity, for example, there’s very little you can do to solve your problem. Essentially, you can only hope that the desired pose can also be attained with another configuration that is non-singular, as illustrated in the figure below.

In conclusion, keep robot singularities in mind while designing your robot cell. Pay particular attention to the design of the adaptor plate for your end-effector. If you do not need six degrees of freedom to position and orient your end-effector (e.g. if laser cutting or inserting round pins), take advantage of your *redundant degree of freedom* to swing away from singularities. Finally, consider the use of an offline programming and simulation software such as RoboDK, which can be of great assistance in checking for robot singularities.

© Mecademic Reproducing this tutorial, in whole or in part, is strictly prohibitted.