Configuration Space and Degrees of Freedom

In Chapter 1, we learned that the State Space consists of both the position coordinates ( ) and the velocity coordinates ( ). But how many position…

Configuration Space and Degrees of Freedom

Degrees of Freedom (DOF)

In Chapter 1, we learned that the State Space consists of both the position coordinates (\(q\)) and the velocity coordinates (\(\dot{q}\)). But how many position coordinates \(q\) does our system actually have? And why?

Consider a single speck of dust floating completely unconstrained in a room. To perfectly define where it is, you need \(x, y, z\). If it is a rigid block of steel floating in the room, knowing \(x, y, z\) only fixes its center of mass. It could be spun around, pitched entirely backward, or rolled on its side. It therefore has three additional angles (roll, pitch, yaw) defining its rotation.

This rigid block has exactly 6 Degrees of Freedom (DOF). It requires a minimum of 6 independent parameters (or coordinates) to fully define its posture in 3D Euclidean space.

Picture it this way: if you wanted to give a friend precise instructions to place a brick exactly where you want it, you would need to specify six numbers—three for position (where in the room) and three for orientation (which way it faces). Fewer than six numbers leaves ambiguity. More than six is redundant. Six is the magic number for a rigid object floating free in space, and this counting argument is the entire concept of degrees of freedom.

Note

The Degrees of Freedom of a system represents the absolute minimum number of independent coordinates required to perfectly and unambiguously define the position of every single particle in that system.

If you connect two floating, rigid steel blocks together with a perfectly rigid bar (welded so they cannot move relative to each other), you do not have 12 DOF. Since the distance and orientation between them are perfectly locked by the weld, you still only have 6 DOF for the combined assembly. The weld acts as a geometric constraint.

TipConstraints Subtract DOF — A Few Worked Counts

Each rigid body in free 3D space begins with 6 DOF. Constraints reduce this count:

  • A rigid body confined to a plane (three independent planar contacts) has \(6 - 3 = 3\) DOF (two translations + one rotation).
  • A planar 4-bar linkage has four bodies (nominally \(4 \times 3 = 12\) planar DOF) connected by four revolute joints (each removing 2 planar DOF), leaving \(12 - 8 = 4\) DOF, minus 3 for grounding one link: \(\mathbf{1}\) net DOF.
  • A human arm modelled as shoulder (3) + elbow (1) + wrist (3) = 7 DOF, or more depending on which scapular and shoulder-complex sub-joints are resolved.

Formally this is the Grübler–Kutzbach count: for \(N\) bodies in a 3D mechanism with \(g\) joints of allowed freedom \(f_i\) each, \(\mathrm{DOF} = 6(N - 1) - \sum_i (6 - f_i)\).

The Configuration Space \(\configspace\)

The collection of all valid configurations a system can possibly achieve—accounting for all of its physical constraints, linkages, pins, and bearings—is called its Configuration Space, denoted by the symbol \(\configspace\).

Like state space, configuration space is an abstract, multi-dimensional geometric surface. It is, strictly speaking, a mathematical manifold (which we explore deeply in Volume I). The number of dimensions of this space is exactly equal to the Degrees of Freedom.

Note

A system with \(n\) Degrees of Freedom has a Configuration Space \(\configspace\) of dimension \(n\), defined completely by the vector \(\bm{q} = [q_1, q_2, ..., q_n]^T\).

The corresponding State Space \(\statespace\) (from Chapter 1) is the configuration space multiplied by the velocity of those coordinates, meaning state space always has \(2n\) dimensions.

\[ \text{State} \ \state = [\bm{q}, \dot{\bm{q}}]^T \in \statespace = \configspace \times \Reals^n \]

Generalized Coordinates

When we model a complex physical system (such as the 15-DOF human golfer in Volume II), we do not track the 3D \((x,y,z)\) position of the golfer’s wrist, elbow, and shoulder separately, and then painstakingly write algebraic constraints ensuring their bones don’t stretch or compress.

Instead, we use Generalized Coordinates. Since an elbow is a pin joint allowing only 1 DOF of rotation, we abandon \((x,y,z)\) mapping entirely and instead just track the single angle \(\theta_\text{elbow}\). If we define the angle of the shoulder \(\theta_\text{shoulder}\), and the length of the humerus bone \(L_1\), the position of the elbow is instantly known.

Generalized coordinates are the set of independent variables \(q_1, q_2, ... q_n\) that perfectly span the Configuration Space. They are the most efficient map of the mechanism’s geometry. In robotics, \(q\) usually refers to the joint angles of the motors. Formally we also assume the constraints that carve out \(\configspace\) are holonomic—each is an algebraic equation in \(\bm{q}\) alone (and possibly time), not an inequality or a velocity constraint. Non-holonomic systems (rolling wheels, ice skates) require an enlarged treatment that we defer to Volume I.

Forward Kinematics

The mathematical function that translates our abstract Generalized Coordinates \(\bm{q}\) (the angles in our configuration space) back into the physical 3D Euclidean space of the real world is called Forward Kinematics.

If \(\bm{p}_{end} = [x, y, z]^T\) is the Cartesian position of the end of our robotic arm (or a golf clubhead), Forward Kinematics is the nonlinear function \(\bm{f}_{kin}: \configspace \to \Reals^3\) (or \(\configspace \to \SE\) if the full end-effector pose, not just position, is of interest):

\[\begin{equation} \bm{p}_{end} = \bm{f}_{kin}(\bm{q}) \end{equation}\]

By using trigonometry, we stack the lengths of the links and the angles of the joints \(q\) to find exactly where the end-effector sits in physical space. For a simple 2-link robotic arm rotating on a flat 2D plane (with link lengths \(L_1, L_2\) and joint angles \(q_1, q_2\)):

\[\begin{align} x &= L_1 \cos(q_1) + L_2 \cos(q_1 + q_2) \\ y &= L_1 \sin(q_1) + L_2 \sin(q_1 + q_2) \end{align}\]

Notice that to know where the physical end of the arm is, we only needed the configuration vector \(\bm{q} \in \configspace\).

Summary

When controlling physical motion, you are fundamentally commanding a point to traverse through Configuration Space \(\configspace\).

However, mapping \(\configspace\) is vastly more complex than simple \((x,y)\) geometry. Consider a simple drone spinning freely. In physical space, it can rotate horizontally 360 degrees, and keep rotating 720 degrees, and 1080 degrees, looping back over itself physically but extending its generalized coordinate to infinity. This infinite looping implies that \(\configspace\) is NOT a simple flat plane. Formally, the configuration space of full 3D orientation is the Lie group \(\SO\): it is compact, non-abelian (rotations don’t commute), and 3-dimensional. Topologically it is diffeomorphic to \(\mathbb{RP}^3\) (real projective 3-space), and this is why the unit-quaternion 3-sphere \(S^3\) covers \(\SO\) exactly twice (\(q\) and \(-q\) represent the same rotation).

To govern angular movement and rotations formally—and escape the mathematical nightmares of “Gimbal Lock”—we must upgrade from Euler angles to higher matrices. We must transition to the Special Orthogonal Group \(\SO\).

But do not let the fancy name intimidate you. \(\SO(3)\) is simply the collection of all possible ways to orient an object in space. Every rotation you have ever performed—turning a doorknob, spinning a basketball, tilting your head—is an element of \(\SO(3)\). The mathematics just gives us a rigorous way to combine and compare these rotations without losing track of them. We will see in the next chapter that this “collection of all rotations” has a beautiful geometric structure: it is a smooth, curved surface (a manifold) on which we can do calculus, define tangent spaces, and ultimately build control systems that respect the geometry of rotation rather than fighting it.