Generalized coordinates

In analytical mechanics, specifically the study of the rigid body dynamics of multibody systems, the term generalized coordinates refers to the parameters that describe the configuration of the system relative to some reference configuration. These parameters must uniquely define the configuration of the system relative to the reference configuration. The generalized velocities are the time derivatives of the generalized coordinates of the system.

An example of a generalized coordinate is the angle that locates a point moving on a circle. The adjective "generalized" distinguishes these parameters from the traditional use of the term coordinate to refer to Cartesian coordinates: for example, describing the location of the point on the circle using x and y coordinates.

Although there may be many choices for generalized coordinates for a physical system, parameters are usually selected which are convenient for the specification of the configuration of the system and which make the solution of its equations of motion easier. If these parameters are independent of one another, then number of independent generalized coordinates is defined by the number of degrees of freedom of the system. 

Constraint equations

{{#invoke:Multiple image|render}}

{{#invoke:Multiple image|render}}

Generalized coordinates are usually selected to provide the minimum number of independent coordinates that define the configuration of a system, which simplifies the formulation of Lagrange's equations of motion. However, it can also occur that a useful set of generalized coordinates may be dependent, which means that they are related by one or more constraint equations.

Holonomic constraints

If the constraints introduce relations between the generalized coordinates qi, i=1,..., n and time, of the form,

$f_{j}(q_{1},...,q_{n},t)=0,j=1,...,k,$ they are called holonomic. These constraint equations define a manifold in the space of generalized coordinates qi, i=1,...,n, known as the configuration manifold of the system. The degree of freedom of the system is d=n-k, which is the number of generalized coordinates minus the number of constraints.:260

It can be advantageous to choose independent generalized coordinates, as is done in Lagrangian mechanics, because this eliminates the need for constraint equations. However, in some situations, it is not possible to identify an unconstrained set. For example, when dealing with nonholonomic constraints or when trying to find the force due to any constraint, holonomic or not, dependent generalized coordinates must be employed. Sometimes independent generalized coordinates are called internal coordinates because they are mutually independent, otherwise unconstrained, and together give the position of the system. Top: one degree of freedom, bottom: two degrees of freedom, left: an open curve F (parameterized by t) and surface F, right: a closed curve C and closed surface S. The equations shown are the constraint equations. Generalized coordinates are chosen and defined with respect to these curves (one per degree of freedom), and simplify the analysis since even complicated curves are described by the minimum number of coordinates required.

Non-holonomic constraints

A mechanical system can involve constraints on both the generalized coordinates and their derivatives. Constraints of this type are known as non-holonomic. First-order non-holonomic constraints have the form

$g_{j}(q_{1},...,q_{n},{\dot {q}}_{1},...,{\dot {q}}_{n},t)=0,j=1,....,k.$ An example of such a constraint is a rolling wheel or knife-edge that constrains the direction of the velocity vector. Non-holonomic constraints can also involve next-order derivatives such as generalized accelerations.

Example: Simple pendulum

The relationship between the use of generalized coordinates and Cartesian coordinates to characterize the movement of a mechanical system can be illustrated by considering the constrained dynamics of a simple pendulum.

Coordinates

A simple pendulum consists of a mass M hanging from a pivot point so that it is constrained to move on a circle of radius L. The position of the mass is defined by the coordinate vector r=(x, y) measured in the plane of the circle such that y is in the vertical direction. The coordinates x and y are related by the equation of the circle

$f(x,y)=x^{2}+y^{2}-L^{2}=0,$ that constrains the movement of M. This equation also provides a constraint on the velocity components,

${\dot {f}}(x,y)=2x{\dot {x}}+2y{\dot {y}}=0.$ Now introduce the parameter θ, that defines the angular position of M from the vertical direction. It can be used to define the coordinates x and y, such that

${\mathbf {r} }=(x,y)=(L\sin \theta ,-L\cos \theta ).$ The use of θ to define the configuration of this system avoids the constraint provided by the equation of the circle.

Virtual work

Notice that the force of gravity acting on the mass m is formulated in the usual Cartesian coordinates,

${\mathbf {F} }=(0,-mg),$ where g is the acceleration of gravity.

The virtual work of gravity on the mass m as it follows the trajectory r is given by

$\delta W={\mathbf {F} }\cdot \delta {\mathbf {r} }.$ The variation δr can be computed in terms of the coordinates x and y, or in terms of the parameter θ,

$\delta {\mathbf {r} }=(\delta x,\delta y)=(L\cos \theta ,L\sin \theta )\delta \theta .$ Thus, the virtual work is given by

$\delta W=-mg\delta y=-mgL\sin \theta \delta \theta .$ Notice that the coefficient of δy is the y-component of the applied force. In the same way, the coefficient of δθ is known as the generalized force along generalized coordinate θ, given by

$F_{\theta }=-mgL\sin \theta .$ Kinetic energy

To complete the analysis consider the kinetic energy T of the mass, using the velocity,

${\mathbf {v} }=({\dot {x}},{\dot {y}})=(L\cos \theta ,L\sin \theta ){\dot {\theta }},$ so,

$T={\frac {1}{2}}m{\mathbf {v} }\cdot {\mathbf {v} }={\frac {1}{2}}m({\dot {x}}^{2}+{\dot {y}}^{2})={\frac {1}{2}}mL^{2}{\dot {\theta }}^{2}.$ Lagrange's equations

Lagrange's equations for the pendulum in terms of the coordinates x and y are given by,

${\frac {d}{dt}}{\frac {\partial T}{\partial {\dot {x}}}}-{\frac {\partial T}{\partial x}}=F_{x}+\lambda {\frac {\partial f}{\partial x}},\quad {\frac {d}{dt}}{\frac {\partial T}{\partial {\dot {y}}}}-{\frac {\partial T}{\partial y}}=F_{y}+\lambda {\frac {\partial f}{\partial y}}.$ This yields the three equations

$m{\ddot {x}}=\lambda (2x),\quad m{\ddot {y}}=-mg+\lambda (2y),\quad x^{2}+y^{2}-L^{2}=0,$ in the three unknowns, x, y and λ.

Using the parameter θ, Lagrange's equations take the form

${\frac {d}{dt}}{\frac {\partial T}{\partial {\dot {\theta }}}}-{\frac {\partial T}{\partial \theta }}=F_{\theta },$ which becomes,

$mL^{2}{\ddot {\theta }}=-mgL\sin \theta ,$ or

${\ddot {\theta }}+{\frac {g}{L}}\sin \theta =0.$ This formulation yields one equation because there is a single parameter and no constraint equation.

This shows that the parameter θ is a generalized coordinate that can be used in the same way as the Cartesian coordinates x and y to analyze the pendulum.

Example: Double pendulum

The benefits of generalized coordinates become apparent with the analysis of a double pendulum. For the two masses mi, i=1, 2, let ri=(xi, yi), i=1, 2 define their two trajectories. These vectors satisfy the two constraint equations,

$f_{1}(x_{1},y_{1},x_{2},y_{2})={\mathbf {r} }_{1}\cdot {\mathbf {r} }_{1}-L_{1}^{2}=0,\quad f_{2}(x_{1},y_{1},x_{2},y_{2})=({\mathbf {r} }_{2}-{\mathbf {r} }_{1})\cdot ({\mathbf {r} }_{2}-{\mathbf {r} }_{1})-L_{2}^{2}=0.$ The formulation of Lagrange's equations for this system yields six equations in the four Cartesian coordinates xi, yi i=1, 2 and the two Lagrange multipliers λi, i=1, 2 that arise from the two constraint equations.

Coordinates

Now introduce the generalized coordinates θi i=1,2 that define the angular position of each mass of the double pendulum from the vertical direction. In this case, we have

${\mathbf {r} }_{1}=(L_{1}\sin \theta _{1},-L_{1}\cos \theta _{1}),\quad {\mathbf {r} }_{2}=(L_{1}\sin \theta _{1},-L_{1}\cos \theta _{1})+(L_{2}\sin \theta _{2},-L_{2}\cos \theta _{2}).$ The force of gravity acting on the masses is given by,

${\mathbf {F} }_{1}=(0,-m_{1}g),\quad {\mathbf {F} }_{2}=(0,-m_{2}g)$ where g is the acceleration of gravity. Therefore, the virtual work of gravity on the two masses as they follow the trajectories ri, i=1,2 is given by

$\delta W={\mathbf {F} }_{1}\cdot \delta {\mathbf {r} }_{1}+{\mathbf {F} }_{2}\cdot \delta {\mathbf {r} }_{2}.$ The variations δri i=1, 2 can be computed to be

$\delta {\mathbf {r} }_{1}=(L_{1}\cos \theta _{1},L_{1}\sin \theta _{1})\delta \theta _{1},\quad \delta {\mathbf {r} }_{2}=(L_{1}\cos \theta _{1},L_{1}\sin \theta _{1})\delta \theta _{1}+(L_{2}\cos \theta _{2},L_{2}\sin \theta _{2})\delta \theta _{2}$ Virtual work

Thus, the virtual work is given by

$\delta W=-(m_{1}+m_{2})gL_{1}\sin \theta _{1}\delta \theta _{1}-m_{2}gL_{2}\sin \theta _{2}\delta \theta _{2},$ and the generalized forces are

$F_{\theta _{1}}=-(m_{1}+m_{2})gL_{1}\sin \theta _{1},\quad F_{\theta _{2}}=-m_{2}gL_{2}\sin \theta _{2}.$ Kinetic energy

Compute the kinetic energy of this system to be

$T={\frac {1}{2}}m_{1}{\mathbf {v} }_{1}\cdot {\mathbf {v} }_{1}+{\frac {1}{2}}m_{2}{\mathbf {v} }_{2}\cdot {\mathbf {v} }_{2}={\frac {1}{2}}(m_{1}+m_{2})L_{1}^{2}{\dot {\theta }}_{1}^{2}+{\frac {1}{2}}m_{2}L_{2}^{2}{\dot {\theta }}_{2}^{2}+m_{2}L_{1}L_{2}\cos(\theta _{2}-\theta _{1}){\dot {\theta }}_{1}{\dot {\theta }}_{2}.$ Lagrange's equations

Lagrange's equations yield two equations in the unknown generalized coordinates θi i=1, 2, given by

$(m_{1}+m_{2})L_{1}^{2}{\ddot {\theta }}_{1}+m_{2}L_{1}L_{2}{\ddot {\theta }}_{2}\cos(\theta _{2}-\theta _{1})+m_{2}L_{1}L_{2}{\ddot {\theta _{2}}}^{2}\sin(\theta _{1}-\theta _{2})=-(m_{1}+m_{2})gL_{1}\sin \theta _{1},$ and

$m_{2}L_{2}^{2}{\ddot {\theta }}_{2}+m_{2}L_{1}L_{2}{\ddot {\theta }}_{1}\cos(\theta _{2}-\theta _{1})+m_{2}L_{1}L_{2}{\ddot {\theta _{1}}}^{2}\sin(\theta _{2}-\theta _{1})=-m_{2}gL_{2}\sin \theta _{2}.$ The use of the generalized coordinates θi i=1, 2 provides an alternative to the Cartesian formulation of the dynamics of the double pendulum.

Generalized coordinates and virtual work

The principle of virtual work states that if a system is in static equilibrium, the virtual work of the applied forces is zero for all virtual movements of the system from this state, that is, δW=0 for any variation δr. When formulated in terms of generalized coordinates, this is equivalent to the requirement that the generalized forces for any virtual displacement are zero, that is Fi=0.

Let the forces on the system be Fj, j=1, ..., m be applied to points with Cartesian coordinates rj, j=1,..., m, then the virtual work generated by a virtual displacement from the equilibrium position is given by

$\delta W=\sum _{j=1}^{m}{\mathbf {F} }_{j}\cdot \delta {\mathbf {r} }_{j}.$ where δrj, j=1, ..., m denote the virtual displacements of each point in the body.

Now assume that each δrj depends on the generalized coordinates qi, i=1, ..., n, then

$\delta {\mathbf {r} }_{j}={\frac {\partial {\mathbf {r} }_{j}}{\partial q_{1}}}\delta {q}_{1}+\ldots +{\frac {\partial {\mathbf {r} }_{j}}{\partial q_{n}}}\delta {q}_{n},$ and

$\delta W=\left(\sum _{j=1}^{m}{\mathbf {F} }_{j}\cdot {\frac {\partial {\mathbf {r} }_{j}}{\partial q_{1}}}\right)\delta {q}_{1}+\ldots +\left(\sum _{j=1}^{m}{\mathbf {F} }_{j}\cdot {\frac {\partial {\mathbf {r} }_{j}}{\partial q_{n}}}\right)\delta {q}_{n}.$ The n terms

$F_{i}=\sum _{j=1}^{m}{\mathbf {F} }_{j}\cdot {\frac {\partial {\mathbf {r} }_{j}}{\partial q_{i}}},\quad i=1,\ldots ,n,$ are the generalized forces acting on the system. Kane shows that these generalized forces can also be formulated in terms of the ratio of time derivatives,

$F_{i}=\sum _{j=1}^{m}{\mathbf {F} }_{j}\cdot {\frac {\partial {\mathbf {v} }_{j}}{\partial {\dot {q}}_{i}}},\quad i=1,\ldots ,n,$ where vj is the velocity of the point of application of the force Fj.

In order for the virtual work to be zero for an arbitrary virtual displacement, each of the generalized forces must be zero, that is

$\delta W=0\quad \Rightarrow \quad F_{i}=0,i=1,\ldots ,n.$ 