Generalized coordinates
Template:Short description Template:Classical mechanics
In analytical mechanics, generalized coordinates are a set of parameters used to represent the state of a system in a configuration space. These parameters must uniquely define the configuration of the system relative to a reference state.<ref name=Ginsberg>Template:Harvnb, p. 397, §7.2.1 Selection of generalized coordinates</ref> The generalized velocities are the time derivatives of the generalized coordinates of the system. The adjective "generalized" distinguishes these parameters from the traditional use of the term "coordinate" to refer to Cartesian coordinates.
An example of a generalized coordinate would be to describe the position of a pendulum using the angle of the pendulum relative to vertical, rather than by the x and y position of the pendulum.
Although there may be many possible choices for generalized coordinates for a physical system, they are generally selected to simplify calculations, such as the solution of the equations of motion for the system. If the coordinates are independent of one another, the number of independent generalized coordinates is defined by the number of degrees of freedom of the system.<ref name=Amirouche>Template:Cite book</ref><ref name= Scheck>Template:Cite book</ref>
Generalized coordinates are paired with generalized momenta to provide canonical coordinates on phase space.
Constraints and degrees of freedomEdit
Template:Multiple image Template:Multiple image
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 constraintsEdit
For a system of Template:Mvar particles in 3D real coordinate space, the position vector of each particle can be written as a 3-tuple in Cartesian coordinates:
- <math>\begin{align}
& \mathbf{r}_1 = (x_1,y_1,z_1), \\ & \mathbf{r}_2 = (x_2,y_2,z_2), \\ & \qquad \qquad \vdots \\ & \mathbf{r}_N = (x_N,y_N,z_N) \end{align}</math>
Any of the position vectors can be denoted Template:Math where Template:Math labels the particles. A holonomic constraint is a constraint equation of the form for particle Template:Mvar<ref>Template:Harvnb</ref>Template:Efn
- <math>f(\mathbf{r}_k, t) = 0</math>
which connects all the 3 spatial coordinates of that particle together, so they are not independent. The constraint may change with time, so time Template:Mvar will appear explicitly in the constraint equations. At any instant of time, any one coordinate will be determined from the other coordinates, e.g. if Template:Mvar and Template:Mvar are given, then so is Template:Mvar. One constraint equation counts as one constraint. If there are Template:Mvar constraints, each has an equation, so there will be Template:Mvar constraint equations. There is not necessarily one constraint equation for each particle, and if there are no constraints on the system then there are no constraint equations.
So far, the configuration of the system is defined by Template:Math quantities, but Template:Mvar coordinates can be eliminated, one coordinate from each constraint equation. The number of independent coordinates is Template:Math. (In Template:Mvar dimensions, the original configuration would need Template:Mvar coordinates, and the reduction by constraints means Template:Math). It is ideal to use the minimum number of coordinates needed to define the configuration of the entire system, while taking advantage of the constraints on the system. These quantities are known as generalized coordinates in this context, denoted Template:Math. It is convenient to collect them into an Template:Mvar-tuple
- <math>\mathbf{q}(t) = (q_1(t),\ q_2(t),\ \ldots,\ q_n(t)) </math>
which is a point in the configuration space of the system. They are all independent of one other, and each is a function of time. Geometrically they can be lengths along straight lines, or arc lengths along curves, or angles; not necessarily Cartesian coordinates or other standard orthogonal coordinates. There is one for each degree of freedom, so the number of generalized coordinates equals the number of degrees of freedom, Template:Mvar. A degree of freedom corresponds to one quantity that changes the configuration of the system, for example the angle of a pendulum, or the arc length traversed by a bead along a wire.
If it is possible to find from the constraints as many independent variables as there are degrees of freedom, these can be used as generalized coordinates.<ref name="Kibble 2004 page=232">Template:Harvnb</ref> The position vector Template:Math of particle Template:Mvar is a function of all the Template:Mvar generalized coordinates (and, through them, of time),<ref>Template:Harvnb</ref><ref>Template:Harvnb</ref><ref name="Hand 1998 page=15">Template:Harvnb</ref><ref name="Kibble 2004 page=232"/><ref group = nb>Some authors e.g. Hand & Finch take the form of the position vector for particle Template:Mvar, as shown here, as the condition for the constraint on that particle to be holonomic.</ref>
- <math>\mathbf{r}_k = \mathbf{r}_k(\mathbf{q}(t)) \,, </math>
and the generalized coordinates can be thought of as parameters associated with the constraint.
The corresponding time derivatives of Template:Math are the generalized velocities,
- <math>\dot{\mathbf{q}} = \frac{d\mathbf{q}}{dt} = (\dot{q}_1(t),\ \dot{q}_2(t),\ \ldots,\ \dot{q}_n(t)) </math>
(each dot over a quantity indicates one time derivative). The velocity vector Template:Math is the total derivative of Template:Math with respect to time
- <math>\mathbf{v}_k = \dot{\mathbf{r}}_k = \frac{d\mathbf{r}_k}{dt} = \sum_{j=1}^n \frac{\partial \mathbf{r}_k}{\partial q_j}\dot{q}_j \,.</math>
and so generally depends on the generalized velocities and coordinates. Since we are free to specify the initial values of the generalized coordinates and velocities separately, the generalized coordinates Template:Mvar and velocities Template:Math can be treated as independent variables.
Non-holonomic constraintsEdit
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
- <math>g(\mathbf{q}, \dot{\mathbf{q}}, t) = 0\,,</math>
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.
Physical quantities in generalized coordinatesEdit
Kinetic energyEdit
The total kinetic energy of the system is the energy of the system's motion, defined as<ref name="Torby 1984 page=269">Template:Harvnb</ref>
- <math>T = \frac {1}{2} \sum_{k=1}^N m_k \dot{\mathbf{r}}_k \cdot \dot{\mathbf{r}}_k\,,</math>
in which · is the dot product. The kinetic energy is a function only of the velocities Template:Math, not the coordinates Template:Math themselves. By contrast an important observation is<ref>Template:Harvnb</ref>
- <math>\dot{\mathbf{r}}_k \cdot \dot{\mathbf{r}}_k = \sum_{i,j=1}^n \left(\frac{\partial \mathbf{r}_k}{\partial q_i}\cdot\frac{\partial \mathbf{r}_k}{\partial q_j}\right)\dot{q}_i\dot{q}_j , </math>
which illustrates the kinetic energy is in general a function of the generalized velocities, coordinates, and time if the constraints also vary with time, so Template:Math.
In the case the constraints on the particles are time-independent, then all partial derivatives with respect to time are zero, and the kinetic energy is a homogeneous function of degree 2 in the generalized velocities.
Still for the time-independent case, this expression is equivalent to taking the line element squared of the trajectory for particle Template:Mvar,
- <math>ds_k^2 = d\mathbf{r}_k\cdot d\mathbf{r}_k = \sum_{i,j=1}^n \left(\frac{\partial \mathbf{r}_k}{\partial q_i}\cdot\frac{\partial \mathbf{r}_k}{\partial q_j}\right) dq_i dq_j \,,</math>
and dividing by the square differential in time, Template:Math, to obtain the velocity squared of particle Template:Mvar. Thus for time-independent constraints it is sufficient to know the line element to quickly obtain the kinetic energy of particles and hence the Lagrangian.<ref>Template:Harvnb</ref>
It is instructive to see the various cases of polar coordinates in 2D and 3D, owing to their frequent appearance. In 2D polar coordinates Template:Math,
- <math>\left(\frac{ds}{dt}\right)^2 = \dot{r}^2 + r^2\dot{\theta}^2 \,,</math>
in 3D cylindrical coordinates Template:Math,
- <math>\left(\frac{ds}{dt}\right)^2 = \dot{r}^2 + r^2\dot{\theta}^2 + \dot{z}^2 \,,</math>
in 3D spherical coordinates Template:Math,
- <math>\left(\frac{ds}{dt}\right)^2 = \dot{r}^2+r^2\dot{\theta}^2 +r^2\sin^2\theta \, \dot{\varphi}^2 \,.</math>
Generalized momentumEdit
The generalized momentum "canonically conjugate to" the coordinate Template:Mvar is defined by
- <math>p_i =\frac{\partial L}{\partial\dot q_i}.</math>
If the Lagrangian Template:Mvar does not depend on some coordinate Template:Mvar, then it follows from the Euler–Lagrange equations that the corresponding generalized momentum will be a conserved quantity, because the time derivative is zero implying the momentum is a constant of the motion;
- <math> \frac{\partial L}{\partial q_i} =\frac{d}{dt}\frac{\partial L}{\partial\dot q_i} =\dot{p}_i =0\,.</math>
ExamplesEdit
Bead on a wireEdit
For a bead sliding on a frictionless wire subject only to gravity in 2d space, the constraint on the bead can be stated in the form Template:Math, where the position of the bead can be written Template:Math, in which Template:Mvar is a parameter, the arc length Template:Mvar along the curve from some point on the wire. This is a suitable choice of generalized coordinate for the system. Only one coordinate is needed instead of two, because the position of the bead can be parameterized by one number, Template:Mvar, and the constraint equation connects the two coordinates Template:Mvar and Template:Mvar; either one is determined from the other. The constraint force is the reaction force the wire exerts on the bead to keep it on the wire, and the non-constraint applied force is gravity acting on the bead.
Suppose the wire changes its shape with time, by flexing. Then the constraint equation and position of the particle are respectively
- <math>f(\mathbf{r}, t) = 0 \,,\quad \mathbf{r} = (x(s, t), y(s, t))</math>
which now both depend on time Template:Mvar due to the changing coordinates as the wire changes its shape. Notice time appears implicitly via the coordinates and explicitly in the constraint equations.
Simple pendulumEdit
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.<ref>Template:Cite book</ref><ref>Richard Fitzpatrick, Newtonian Dynamics.</ref>
A simple pendulum consists of a mass Template:Mvar hanging from a pivot point so that it is constrained to move on a circle of radius Template:Mvar. The position of the mass is defined by the coordinate vector Template:Math measured in the plane of the circle such that Template:Mvar is in the vertical direction. The coordinates Template:Mvar and Template:Mvar are related by the equation of the circle
- <math>f(x, y) = x^2+y^2 - L^2=0,</math>
that constrains the movement of Template:Mvar. This equation also provides a constraint on the velocity components,
- <math> \dot{f}(x, y)=2x\dot{x} + 2y\dot{y} = 0.</math>
Now introduce the parameter Template:Mvar, that defines the angular position of Template:Mvar from the vertical direction. It can be used to define the coordinates Template:Mvar and Template:Mvar, such that
- <math> \mathbf{r}=(x, y) = (L\sin\theta, -L\cos\theta).</math>
The use of Template:Mvar to define the configuration of this system avoids the constraint provided by the equation of the circle.
Notice that the force of gravity acting on the mass Template:Mvar is formulated in the usual Cartesian coordinates,
- <math> \mathbf{F}=(0,-mg),</math>
where Template:Mvar is the acceleration due to gravity.
The virtual work of gravity on the mass Template:Mvar as it follows the trajectory Template:Math is given by
- <math> \delta W = \mathbf{F}\cdot\delta \mathbf{r}.</math>
The variation Template:Math can be computed in terms of the coordinates Template:Mvar and Template:Mvar, or in terms of the parameter Template:Mvar,
- <math> \delta \mathbf{r} =(\delta x, \delta y) = (L\cos\theta, L\sin\theta)\delta\theta.</math>
Thus, the virtual work is given by
- <math>\delta W = -mg\delta y = -mgL\sin(\theta)\delta\theta.</math>
Notice that the coefficient of Template:Math is the Template:Mvar-component of the applied force. In the same way, the coefficient of Template:Math is known as the generalized force along generalized coordinate Template:Mvar, given by
- <math> F_{\theta} = -mgL\sin\theta.</math>
To complete the analysis consider the kinetic energy Template:Mvar of the mass, using the velocity,
- <math> \mathbf{v}=(\dot{x}, \dot{y}) = (L\cos\theta, L\sin\theta)\dot{\theta},</math>
so,
- <math> T= \frac{1}{2} m\mathbf{v}\cdot\mathbf{v} = \frac{1}{2} m (\dot{x}^2+\dot{y}^2) = \frac{1}{2} m L^2\dot{\theta}^2.</math>
D'Alembert's form of the principle of virtual work for the pendulum in terms of the coordinates Template:Mvar and Template:Mvar are given by,
- <math> \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}. </math>
This yields the three equations
- <math>m\ddot{x} = \lambda(2x),\quad m\ddot{y} = -mg + \lambda(2y),\quad x^2+y^2 - L^2=0,</math>
in the three unknowns, Template:Mvar, Template:Mvar and Template:Mvar.
Using the parameter Template:Mvar, those equations take the form
- <math>\frac{d}{dt}\frac{\partial T}{\partial \dot{\theta}} - \frac{\partial T}{\partial \theta} = F_{\theta},</math>
which becomes,
- <math> mL^2\ddot{\theta} = -mgL\sin\theta,</math>
or
- <math> \ddot{\theta} + \frac{g}{L}\sin\theta=0.</math>
This formulation yields one equation because there is a single parameter and no constraint equation.
This shows that the parameter Template:Mvar is a generalized coordinate that can be used in the same way as the Cartesian coordinates Template:Mvar and Template:Mvar to analyze the pendulum.
Double pendulumEdit
The benefits of generalized coordinates become apparent with the analysis of a double pendulum. For the two masses Template:Math, let Template:Math define their two trajectories. These vectors satisfy the two constraint equations,
- <math>f_1 (x_1, y_1, x_2, y_2) = \mathbf{r}_1\cdot \mathbf{r}_1 - L_1^2 = 0</math>
and
- <math>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.</math>
The formulation of Lagrange's equations for this system yields six equations in the four Cartesian coordinates Template:Math and the two Lagrange multipliers Template:Math that arise from the two constraint equations.
Now introduce the generalized coordinates Template:Math that define the angular position of each mass of the double pendulum from the vertical direction. In this case, we have
- <math>\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).</math>
The force of gravity acting on the masses is given by,
- <math>\mathbf{F}_1=(0,-m_1 g),\quad \mathbf{F}_2=(0,-m_2 g)</math>
where Template:Mvar is the acceleration due to gravity. Therefore, the virtual work of gravity on the two masses as they follow the trajectories Template:Math is given by
- <math> \delta W = \mathbf{F}_1\cdot\delta \mathbf{r}_1 + \mathbf{F}_2\cdot\delta \mathbf{r}_2.</math>
The variations Template:Math can be computed to be
- <math> \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</math>
Thus, the virtual work is given by
- <math>\delta W = -(m_1+m_2)gL_1\sin\theta_1\delta\theta_1 - m_2gL_2\sin\theta_2\delta\theta_2,</math>
and the generalized forces are
- <math>F_{\theta_1} = -(m_1+m_2)gL_1\sin\theta_1,\quad F_{\theta_2} = -m_2gL_2\sin\theta_2.</math>
Compute the kinetic energy of this system to be
- <math> 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_2L_2^2\dot{\theta}_2^2 + m_2L_1L_2 \cos(\theta_2-\theta_1)\dot{\theta}_1\dot{\theta}_2.</math>
Euler–Lagrange equation yield two equations in the unknown generalized coordinates Template:Math given by<ref>Eric W. Weisstein, Double Pendulum, scienceworld.wolfram.com. 2007</ref>
- <math>(m_1+m_2)L_1^2\ddot{\theta}_1+m_2L_1L_2\ddot{\theta}_2\cos(\theta_2-\theta_1) + m_2L_1L_2\dot{\theta_2}^2\sin(\theta_1-\theta_2) = -(m_1+m_2)gL_1\sin\theta_1,</math>
and
- <math>m_2L_2^2\ddot{\theta}_2+m_2L_1L_2\ddot{\theta}_1\cos(\theta_2-\theta_1) + m_2L_1L_2\dot{\theta_1}^2\sin(\theta_2-\theta_1)=-m_2gL_2\sin\theta_2.</math>
The use of the generalized coordinates Template:Math provides an alternative to the Cartesian formulation of the dynamics of the double pendulum.
Spherical pendulumEdit
For a 3D example, a spherical pendulum with constant length Template:Mvar free to swing in any angular direction subject to gravity, the constraint on the pendulum bob can be stated in the form
- <math>f(\mathbf{r}) = x^2 + y^2 + z^2 - l^2 = 0 \,, </math>
where the position of the pendulum bob can be written
- <math>\mathbf{r} = (x(\theta,\phi),y(\theta,\phi),z(\theta,\phi)) \,, </math>
in which Template:Math are the spherical polar angles because the bob moves in the surface of a sphere. The position Template:Math is measured along the suspension point to the bob, here treated as a point particle. A logical choice of generalized coordinates to describe the motion are the angles Template:Math. Only two coordinates are needed instead of three, because the position of the bob can be parameterized by two numbers, and the constraint equation connects the three coordinates Template:Math so any one of them is determined from the other two.
Generalized coordinates and virtual workEdit
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, Template:Math for any variation Template:Math.<ref name="Torby1984">Template:Harvnb</ref> 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 Template:Math.
Let the forces on the system be Template:Math be applied to points with Cartesian coordinates Template:Math, then the virtual work generated by a virtual displacement from the equilibrium position is given by
- <math>\delta W = \sum_{j=1}^m \mathbf{F}_j\cdot \delta\mathbf{r}_j.</math>
where Template:Math denote the virtual displacements of each point in the body.
Now assume that each Template:Math depends on the generalized coordinates Template:Math then
- <math> \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,</math>
and
- <math> \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. </math>
The Template:Mvar terms
- <math> F_i = \sum_{j=1}^m \mathbf{F}_j\cdot \frac{\partial \mathbf{r}_j}{\partial q_i},\quad i=1,\ldots, n,</math>
are the generalized forces acting on the system. Kane<ref>T. R. Kane and D. A. Levinson, Dynamics: theory and applications, McGraw-Hill, New York, 1985</ref> shows that these generalized forces can also be formulated in terms of the ratio of time derivatives,
- <math> F_i = \sum_{j=1}^m \mathbf{F}_j\cdot \frac{\partial \mathbf{v}_j}{\partial \dot{q}_i},\quad i=1,\ldots, n,</math>
where Template:Math is the velocity of the point of application of the force Template:Math.
In order for the virtual work to be zero for an arbitrary virtual displacement, each of the generalized forces must be zero, that is
- <math> \delta W = 0 \quad \Rightarrow \quad F_i =0, i=1,\ldots, n.</math>
See alsoEdit
- Canonical coordinates
- Hamiltonian mechanics
- Virtual work
- Orthogonal coordinates
- Curvilinear coordinates
- Mass matrix
- Stiffness matrix
- Generalized forces
NotesEdit
Template:Reflist Template:Notelist
ReferencesEdit
<references/>