Generalized Coordinates and Degrees of Freedom
In deriving the equations of motion for a system, one must start with selecting a set of coordinates for the problem. The set of coordinates or parameters, which uniquely describes the geometric position and/or orientation of body, or system of bodies, are called the generalized coordinates of the system. The minimum number of independent generalized necessary to completely describe the geometry is known as the number of degrees of freedom. For system there can be many valid choices for a set of coordinates and any set that can uniquely describe the geometry of the system is a suitable. This doesn’t mean, however, that any set of coordinates should be used. As you can guess, based on the geometry and type of information being examined, some sets of coordinates will allow for an easier solution with more physical insight than others. For example (Figure 1), one may solve the simple planar motion of swinging pendulum using Cartesian coordinates in x and y but the coordinate system that provides the clearest view of the motion is obviously polar coordinates. Therefore, even though we may appropriately select x and y as the set of generalized coordinates, the most convenient set is the angle θ.

Figure 1
Below in (Figure 2), a bar lies in the x-y plane. The bar is
unconstrained and can be placed in any position or orientation. Given the two end points A and B, four
generalized coordinates, and
are sufficient to completely describe the
geometry of the bar. However, if we
know the position at one end of the bar and its rotation angle, θ,
then we can completely describe the geometry. Therefore, the actual number of
degrees of freedom for the bar is only three. As previously stated, it is the minimum number of generalized coordinates
that determines the number of degrees of freedom and each coordinate must be
independent. Here, the four coordinates,
and
,
are not independent. By specifying any 3, the 4th coordinate can
determined.

Figure 2
For systems which there are many possible sets of
coordinates, it will always be possible to map one set of to another. In the
above case, the mapping of the 4 generalized coordinates to coordinates in
is the accomplished by the following
relationship
and
Now, let’s pin one end of the bar at point A.

Figure 3
By pinning the end of the bar (Figure 3) such that and
are constrained, the number of degrees of
freedom is reduced by two. Now, the only coordinate necessary to describe the
geometry of the system is the rotation angle θ.
If we continued by pinned the other end of the bar at point B (Figure 4) then the system would be completely constrained thus having zero remaining degrees of freedom. Note, instead of pinning the bar at point B, we could have just as easily fixed the angle θ to completely constrain the bar.

Figure 4
Generally, the constraint of a pin reduces the number of
degrees of freedom by two. In this instance, however, pinning the bar at B only
reduced the system by one for two reasons. First, you obviously cannot
reduce the number of degree of freedom by more than it has. And second, the
dependent relationship between the rotation angle and coordinates at B (given
that there is already a pin at A) means that endpoint B really only represents
a single degree of freedom, namely θ. Thus constraining B only reduced
the number of degrees of freedom by one.
Now let’s take a final look at a multi-body system. Below in Figure 5, two masses are connected by rods. The first mass, m1, is suspended by a rod which is also connected to a ball and socket joint at P. The second mass, m2, is connected to the first mass suspended by an extensible rod and a ball and socket joint at m1. Before selecting the generalized coordinates, let’s first determine the number of degrees of freedom.

Figure 5
For the first mass, m1 is connected to an inextensible rod which is free to rotate in 3 directions. It can swing through a nutation angle and precession angle and but can also rotate about the long axis of the rod. The x,y,z position of m1 is constrained by the rod and the ball and socket joint such that m1 will always be a distance L from P. Since its position is constrained but it has the freedom to rotate in 3 directions, m1 contributes 3 degrees of freedom to the complete system.
The situation for the second mass, m2, is almost identical to that of m1. The second mass is attached to the first with a rod and socket joint, but in this case the rod is extensible. The extensibility of the rod adds an additional degree of freedom. M2’s position is still constrained by the length of the rod, l, but l is now allowed to change. The extensible rod and the ball and socket joint give m2 a total of 4 degrees of freedom. Summing these with those of m1 we now have a total of 7 degrees of freedom for the entire system.
Now that we have a clear understanding of the number of
degrees of freedom for this system and their origin, selecting the generalized
coordinates becomes a much easier task. It would only make sense to select 3
rotation angles for m1, 3 rotation angles for m2, and one
additional coordinate for the extensibility of the second rod, l. Therefore we select for the system the
generalized coordinates .