Open week: the whole portal is free until 11 December.
Subscribe

Home › Analytical mechanics › Constraints and generalized coordinates

Constraints and generalized coordinates

Constraints and their classification, the number of degrees of freedom, generalized coordinates, possible and virtual displacements, ideal constraints.

Contents
  1. Why analytical mechanics
  2. Constraints
  3. Degrees of freedom and generalized coordinates
  4. Virtual displacements
  5. Example: trolley with a load
  6. Practice problems

List of symbols and units →

Example used throughout: a crane trolley with a load hanging on a rope (the same in every chapter of Analytical mechanics).
trolley mass M = 200 kg; load mass m = 1000 kg; rope length l = 4 m;
the trolley runs along a horizontal girder without friction; the rope is inextensible and massless.

1. Why analytical mechanics

Newton's approach requires every body to be freed from its constraints and equations to be written with all forces, including the unknown reactions. For systems of many bodies this is lengthy, and the reactions are often not even needed. Analytical mechanics (Lagrange, 1788; Hamilton, 1834) starts from energies and from the geometry of the constraints. It gives exactly as many equations as the system has degrees of freedom, without the reactions of ideal constraints. Vibration theory, robotics, celestial mechanics and quantum mechanics are built on it.

2. Constraints

Constraints are restrictions on the positions and velocities of the points of a system. They are written as equations:

$$f(\vec r_1, \dots, \vec r_N, t) = 0$$

3. Degrees of freedom and generalized coordinates

A system of N points in space with k holonomic constraints has

$$n = 3N - k$$

degrees of freedom. Its position is completely defined by n independent quantities q1, …, qn, the generalized coordinates. They may be lengths, angles or any other quantities suitable for the problem. The choice is not unique, and a good choice simplifies the equations considerably.

4. Virtual displacements

A virtual displacement δr is an imagined, infinitesimal displacement permitted by the constraints at a fixed instant (time does not change, δt = 0). Unlike the actual displacement dr, it need not correspond to the actual motion. A constraint is ideal if the total work of its reactions in every virtual displacement is zero:

$$\sum \vec R_i\cdot\delta\vec r_i = 0$$

Smooth surfaces, frictionless pins, inextensible ropes and rolling without slip are ideal constraints. Sliding friction is not an ideal constraint, so the friction force is treated as an active force.

5. Example: trolley with a load

Mθmlxmggeneralized coordinates:q₁ = x, q₂ = θ2 degrees of freedom
A trolley of mass M runs along the girder, and a load of mass m hangs on a rope of length l. The system has two degrees of freedom; the natural generalized coordinates are the trolley position x and the rope angle θ. The rail reactions and the rope force do not appear in Lagrange's equations.
Example. Two "points" (trolley and load) in the plane have 2·2 = 4 coordinates. Constraints: the trolley stays on the girder (y1 = 0) and the rope length is constant ((x2 − x1)² + y2² = l²). The number of degrees of freedom is 4 − 2 = 2.
Generalized coordinates: q1 = x (trolley position), q2 = θ (rope angle). The position of the load is then x2 = x + l sin θ, y2 = −l cos θ.
Both constraints are holonomic, scleronomic and ideal, so the rope force and the girder reaction will not appear in the equations of motion.

Practice problems

Problem 1. ●○○ easy A winch on the trolley changes the rope length by a prescribed law l(t) (reeling in 0.5 m/s). How many degrees of freedom does the trolley-load system have in the plane, and what type are the constraints?

y = 0M = 200 kgm = 1000 kgθl(t)xn = ?

What is happening: The constraint is still an equation between coordinates (holonomic), but it now contains time explicitly – hence rheonomic. A prescribed length is not a new coordinate.

Show answer and solution

Solution idea: Count coordinates and constraints; check whether the constraint contains t.

Given: \(N = 2\ \text{points}\), \(l = l(t)\), \(\dot l = -0.5\ \text{m/s}\)

Find: \(n = ?\)

Symbols:

  • \(N\) – number of particles
  • \(l\) – rope length, m
  • \(t\) – time, s
  • \(\dot l\) – rope reeling speed, m/s
  • \(n\) – degrees of freedom
  • \(x_1\) – trolley x-coordinate, m
  • \(y_1\) – trolley y-coordinate, m
  • \(x_2\) – load x-coordinate, m
  • \(y_2\) – load y-coordinate, m
  • \(k\) – number of constraints
  • \(q_1\) – first generalized coordinate
  • \(x\) – trolley position (generalized coordinate), m
  • \(q_2\) – second generalized coordinate
  • \(\theta\) – rope angle from vertical (generalized coordinate), °, rad
  1. Coordinates and constraints:$$4\ \text{coordinates}:\ x_1, y_1, x_2, y_2;$$$$y_1 = 0$$$$(x_2 - x_1)^2 + y_2^2 = l(t)^2$$
  2. Degrees of freedom:$$\begin{aligned}n &= 2N - k \\ &= 4 - 2 \\ &= 2\end{aligned}$$$$\begin{aligned}(q_1 &= x,\ q_2 \\ &= \theta)\end{aligned}$$

Answer: n = 2 (x, θ); the rope constraint is holonomic and rheonomic

Sanity check: If the winch were free (no brake or motor), l would be a third coordinate and n = 3. A rheonomic constraint does work, so the load's total energy changes – the winch supplies it.

Problem 2. ●●○ medium The trolley moves at ẋ = 1 m/s, and the rope (l = 4 m) is at θ = 10° turning at θ̇ = 0.2 rad/s. What is the load speed?

y = 0M = 200 kgm = 1000 kgθ = 10°, θ̇ = 0.2 rad/sl = 4 mx, ẋ = 1 m/sv2  = ?

What is happening: Once positions are expressed in generalized coordinates, velocities follow just by differentiating – the constraints are already built in.

Show answer and solution

Solution idea: x2, y2 via x and θ, then derivatives.

Given: \(\dot x = 1\ \text{m/s}\), \(l = 4\ \text{m}\), \(\theta = 10^\circ\), \(\dot\theta = 0.2\ \text{rad/s}\)

Find: \(v_2 = ?\)

Symbols:

  • \(\dot x\) – trolley speed, m/s
  • \(x\) – trolley position (generalized coordinate), m
  • \(l\) – rope length, m
  • \(\theta\) – rope angle from vertical (generalized coordinate), °, rad
  • \(\dot\theta\) – rope angular velocity, rad/s
  • \(v_2\) – load speed, m/s
  • \(x_2\) – load x-coordinate, m
  • \(y_2\) – load y-coordinate, m
  • \(\dot x_2\) – horizontal load velocity, m/s
  • \(\dot y_2\) – vertical load velocity, m/s
  1. Load position in generalized coordinates, then the derivative:$$\begin{aligned}x_2 &= x + l\sin\theta,\ \ y_2 \\ &= -l\cos\theta\end{aligned}$$$$\begin{aligned}\Rightarrow\ \dot x_2 &= \dot x + l\dot\theta\cos\theta,\ \ \dot y_2 \\ &= l\dot\theta\sin\theta\end{aligned}$$
  2. Numbers:$$\begin{aligned}\dot x_2 &= 1 + 0.788 \\ &= 1.788\end{aligned}$$$$\dot y_2 = 0.139$$$$\begin{aligned}v_2 &= \sqrt{\dot x_2^2 + \dot y_2^2} \\ &= 1.79\ \text{m/s}\end{aligned}$$

Answer: v2 ≈ 1.79 m/s

Sanity check: The load moves 79 % faster than the trolley because it swings forward. The square of this speed is the basis of the kinetic energy in the Lagrangian.

Problem 3. ●○○ easy Overhead crane: the bridge travels along the hall (x), the trolley along the bridge (y), and the load hangs on a fixed-length rope and can swing in any direction. How many degrees of freedom?

xyzxyθ, ψn = ?

What is happening: A load on a fixed-length rope is a spherical pendulum: a point on a sphere, so it has two angles. Bridge and trolley run on rails, so each has one coordinate.

Show answer and solution

Solution idea: Add the parts' degrees of freedom, subtract constraints.

Given: \(\text{bridge: 1}\), \(\text{trolley: 1}\), \(\text{load: 3 coordinates}\), \(k = 1\)

Find: \(n = ?\)

Symbols:

  • \(k\) – number of constraints
  • \(n\) – degrees of freedom
  • \(q\) – vector of generalized coordinates
  • \(x\) – trolley position (generalized coordinate), m
  • \(y\) – trolley position along the bridge, m
  • \(\theta\) – rope angle from vertical (generalized coordinate), °, rad
  • \(\psi\) – second swing angle (swing plane), rad
  1. Bridge and trolley have one coordinate each; the load in space has three, with one constraint (rope length):$$\begin{aligned}n &= 1 + 1 + (3 - 1) \\ &= 4\end{aligned}$$
  2. Generalized coordinates:$$q = (x,\ y,\ \theta,\ \psi)$$

Answer: n = 4 (x, y, θ, ψ)

Sanity check: The crane controller must damp two swing angles with two drives (bridge and trolley) – the system is controllable, but only with both drives working together.

✎ Report an error on this page