# Robot Singularities: What Are They and How to Beat Them Robot singularities can cause havoc when you are programming a robot.

But, what is a singularity? How can you stop singularities from spoiling your otherwise perfect robot program?

It can be hard to find a clear, simple definition of robot singularities. A lot of the best information on the topic is hidden deep in the pages of textbooks or academically-written articles. To understand the theory, you have to dig through pages of equations and esoteric words like “Jacobian,” “normal to,” “coincident,” “orthogonal,” “rank,” and various other terms.

Maybe those words are very familiar to you and you’ve got a strong understanding of geometry and algebra. Even so, you’ll likely have to spend a lot of time to fully get your head around what a singularity actually is unless you’re already an expert (and if you are, you probably don’t need this article).

## The Definition of a Robot Singularity

A singularity is a particular point in a robot’s workspace that causes the robot to lose one or more degrees of freedom (DoF). When a robot’s tool center point (TCP) moves into or near a singularity, the robot will stop moving or move in an unexpected manner.

Remember that a robot’s DoF is the number of independently controllable joints it has. So, a 6 DoF robot — as most industrial robots are — has 6 independently movable joints. When a 6 DoF robot enters a singularity, one or more of its joints will effectively become useless, turning it into a 4 or 5 DoF robot.

I’ve just given you a practical definition of a robot singularity…

However, there are various definitions of singularities. How useful each definition is, depends on how deeply you need to go into the topic and how well you understand the kinematic theory.

### Some More Technical Definitions

Here are a few more definitions you might encounter (which include some terms I explain later in this article):

• Kinematic singularities of robot manipulators are configurations in which there is a change in the expected or typical number of instantaneous degrees of freedom.
• Singularities exist for a particular robot configuration if the determinant of the Jacobian matrix is zero.

All of these definitions say more or less the same thing. But, each requires you to have different levels of background understanding.

## How Does a Robot Move and Why Do Singularities Occur?

But, here’s a simple way to think of them…

• Robots are physical devices with physical limitations. For example, each of the robot’s motors has a maximum speed.
• Robot movements are controlled by algorithms and mathematics, which have no physical limitations. For example, mathematically, it’s valid to have a joint speed of “infinity.”

The conflict between these two facts can cause a wealth of problems when you are programming a robot. If you’re not careful, the control algorithm can instruct the robot’s motors to perform a physically impossible motion.

This is essentially what happens when a robot encounters a singularity.

The robot tries to do something impossible, such as move at an infinite speed.

## The Simple Way to Spot a Robot Singularity

How can you quickly identify when your robot has entered a singularity?

In general, singularities are easy to spot. Your robot is moving at a constant, smooth speed along a trajectory… and then it does something “weird.” Its movement changes unexpectedly and it’s not clear why.

Here are a few markers that suggest your robot might have entered or passed near a singularity:

• It makes a jerky movement or stops suddenly.
• Its tool center point (TCP) slows down or stops. At the same time, some of its joints simultaneously accelerate to their maximum speed.
• It appears to get stuck when moving through empty space.

If any of these happen, it’s worth investigating if the robot has moved through a singularity.

## 3 Basic Types of Singularity in Industrial Robotics

You will often see robot singularities categorized into 3 types: wrist, elbow, and shoulder singularities.

This categorization is slightly simplistic. But, it’s helpful because these are the 3 types of singularity that you will most often encounter in industrial robotics when you are using most standard 6 DoF manipulators.

Here is a brief introduction to each of them:

### 1. Wrist Singularities

A wrist singularity occurs when the axes of the robot’s Joint 4 and Joint 6 become either “coincident” or parallel, depending on the robot. Coincident lines are those that are both parallel with each other and they share a point… which basically means that two separate lines become the same line.

In other words, the axes of two joints line up exactly with each other.

Most industrial 6 DoF robots have 3 joints in their wrist (Joints 4-6). For many robots, the axes of these 3 joints all converge at a common point. In this case, the wrist singularity occurs when Joints 4 and 6 become coincident.

In other robots, such as the one in this animation, the 3 wrist joint axes don’t converge at a single point so they can’t become coincident. Here, the singularity occurs when the axes of Joints 4 and 6 become parallel.

When a robot reaches a wrist singularity, its end effector stays motionless while Joints 4 and 6 rotate at top speed in opposite directions. The robot then continues along its path.

Note that, in this animation, the wrist joints are moving infinitely fast in the middle of the line. If this was a physical robot, this movement would be impossible to achieve while preserving the constant velocity of the end effector.

### 2. Elbow Singularities

You can usually recognize an elbow singularity because it looks like the robot has “stretched too far.” In many robots, it occurs when the elbow joint (Joint 3) is at 0°, though this depends on how the home position of the robot is defined.

Technically, elbow singularities happen when the center of the robot’s wrist (i.e. the point at which all 3 wrist axes converge) lies on the same plane as Joints 2 and 3. There are theoretically two elbow singularities in a 6 DoF manipulator — one when the arm is fully-stretched and one when it’s folded back on itself — but only the first is physically possible.

You can also think of the elbow singularity as being the transition between the robot’s “elbow up” and “elbow down” configurations. In RoboDK, you can choose which configuration you want your robot to use to reach a particular end effector pose. When the robot has entered an elbow singularity, these two configurations will both look the same.

### 3. Shoulder Singularities

The third type you might encounter is the shoulder singularity. This occurs when the center of the robot’s wrist aligns with the axis of Joint 1, or when the axis of Joint 6 becomes coincident with the axis of Joint 1.

As the robot approaches a shoulder singularity, the motors in Joints 1 and 4 try to spin 180° at infinite speed.

NOTE: Some of these animations are actually a “lie!” In RoboDK, where these simulations were created, the software won’t let you create a program that passes the robot through a singularity.

This is what would really happen if you tried to program this movement in RoboDK…

## Workspace Interior vs Boundary Singularities

Another way to categorize robot singularities is to arrange them into two groups:

### Workspace Interior Singularities

This type of singularity occurs when the robot’s tool center point (TCP) falls within the boundary of the robot’s workspace. They are caused when two or more of the robot’s joint axes line up with each other.

Both wrist and shoulder singularities are examples of workspace interior singularities.

Those are often the hardest to avoid because it’s not immediately obvious where they are located within the robot’s workspace.

### Workspace Boundary Singularities

The other type of singularity occurs at the boundary of the robot’s workspace. Whenever the robot’s TCP gets close to a boundary, there is a risk it could enter a singularity.

Elbow singularities are an example of a workspace boundary singularity.

It’s relatively easy to avoid workspace boundary singularities. Just activate the workspace visualization for your particular robot (which is easy to do in RoboDK). Then, ensure that your task falls well within the robot’s workspace and away from any boundaries.

## What’s Basically Happening at a Robot Singularity? The Singularity of a Function

Now that you understand what a singularity looks like, let’s take a step back and look at what’s going on when a robot enters a singularity…

It all starts with a particular matrix that is fundamental to robot control… the Jacobian.

We say that “when the determinant of the Jacobian is zero, the robot has a singularity.”

So, what does this actually mean?

### What is the Jacobian?

Let’s say that you open up RoboDK and load a robot model.

In the software, you can enter the coordinates for a point and the robot will move there at a defined speed. In this situation, you are controlling the robot in “Cartesian space” (i.e. you can enter the end effector’s X, Y, and Z coordinates and an orientation).

The problem is that robots need to be controlled in “joint space.” The robot needs to know the desired angles of all its joints and at what speed the joints should move.

The robot’s control algorithms have to turn your Cartesian instructions into joint instructions. There’s a lot of math going on under the surface to let you move the robot in Cartesian space!

The Jacobian matrix can be used in a few different calculations:

• It can be used to convert between the angular velocities of the robot’s joints and the velocity of the robot’s end effector.
• It can be used to determine if the robot has singularities and where those singularities are in the robot’s workspace.

I’m not going to go into all the details of how to calculate the Jacobian because this is just an introductory article. However, if you want to learn more about how to calculate the Jacobian for a particular robot, look at the tutorial resources listed in the Advanced section below.

### What Happens to the Jacobian at a Singularity

One important thing to know about the Jacobian is that it changes depending on the configuration of the robot. Every movement that the robot makes will affect its Jacobian. When the robot enters a singularity, the Jacobian at its current configuration has a particular property — its determinant becomes zero.

What is the determinant of a matrix? It is a single value that is calculated by summing all the elements of the matrix in a particular way.

What does the determinant of a matrix show us? For one thing, it helps to calculate the inverse of the matrix. This is important because we need the “inverse Jacobian” to convert a desired end effector velocity into a set of joint velocities.

What does it mean when the determinant is zero? It shows us that there is no solution to the linear equations that are represented by the matrix. This means that a Jacobian with a determinant of zero has no solutions.

In other words, the robot gets stuck because the math “breaks” at the singularity.

## The Easy Solution to Robot Singularity Avoidance

There are many research papers and academic textbooks available that offer solutions to avoiding robot singularities. But, you probably don’t need to read them unless you are a robotics researcher or you need to learn singularity theory for another reason.

There is a much easier solution to avoiding singularities in your robot programming…

With RoboDK, you can easily avoid singularities with no extra knowledge of the underlying theory. The software automatically detects when your particular robot would enter a singularity and notifies you of this problem.

What should you do if RoboDK tells you that your robot would cross a singularity?

There are a few solutions, including:

• Move the task to another area of the robot’s workspace. Singularities fall in very specific areas of the workspace so often this can help.
• Try a Joint Move instead of a Linear Move. If the robot will move through free space, you might be able to use a Joint Move. This is less controlled than a Linear Move but it gives the robot more options on how to reach the target point.

## Advanced: Some Useful Resources to Go Deeper with Robot Singularities

The 3 types of robot singularity listed above are all you usually need to know to work with an industrial manipulator. You don’t need to “go deep” to understand all the underlying theories of singularities, just as you don’t need a PhD in automotive engineering to drive a car.

However, if you are a robotics researcher or you are working with robots at a more complex level, you will likely need to get stuck in the underlying mathematics.

This is not easy. But, there are some good resources to get you started.

### Going Deeper With Serial Robot Singularities

If you are building your own robot or you are a researcher, you may need to get a better grasp of the Jacobian and related theories.

Here are some good resources for robot singularity theory:

• Here’s another tutorial that goes slightly deeper into the math but also has some handy visualizations of a robot entering singular configurations.

### How Parallel Robot Singularities are Categorized

Are you working with parallel robots? This is where robotic singularities get really complex!

So far, we have only been talking about serial robots — i.e. those where each of the robot’s joints is positioned on the end of the previous link. Parallel robots are a whole different ballgame as singularities can make them collapse completely.

Kinematics researchers sometimes group parallel singularities into the following 4 categories:

• Type 1 — Serial Singularities — As explained above, these occur when the Jacobian matrix that includes the joint speeds has a determinant of zero. Practically, this means that the robot loses its ability to move in one particular direction.
• Type 2 — Parallel Singularities — These occur when the Jacobian that includes the end effector speeds has a determinant of zero. Practically, this means that one or more of the robot’s degrees of freedom become uncontrollable.
• Type 3 — Serial + Parallel Singularities — These are a combination of the above two singularities. The robot loses the ability to move in a particular direction and one or more DoF become uncontrollable.

If you want to get started understanding parallel robotic singularities, I’d recommend starting with this research paper that explains the 3 main types clearly, then going to this seminal paper that first introduced them.

## The Quickest Way to Avoid Singularities in Your Application

Do you just need to avoid singularities in your application?

Do you want to avoid all the complex math?

The quickest, easiest way to do this is to use RoboDK. You can download a free trial copy on our download page. It includes automatic singularity detection, which you can also adjust based on your needs.

What questions do you have about robot singularities? Tell us in the comments below or join the discussion on LinkedIn, Twitter, Facebook, Instagram, or in the RoboDK Forum. Also, check out our extensive video collection and subscribe to the RoboDK Youtube Channel. 