STEM 隨筆︰古典力學︰運動學【三‧V 】

承上篇,如是當知廣義座標

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.[1] This is done assuming that this can be done with a single chart. 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 which are convenient are usually selected 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, the number of independent generalized coordinates is defined by the number of degrees of freedom of the system.[2][3]

……

Constraints and degrees of freedom

Open straight path
Open curved path F(x, y) = 0
Closed curved path C(x, y) = 0
One generalized coordinate (one degree of freedom) on paths in 2D. Only one generalized coordinate is needed to uniquely specify positions on the curve. In these examples, that variable is either arc length s or angle θ. Having both of the Cartesian coordinates (x, y) are unnecessary since either x or y is related to the other by the equations of the curves. They can also be parameterized by s or θ.
Open curved path F(x, y) = 0. Multiple intersections of radius with path.
Closed curved path C(x, y) = 0. Self-intersection of path.
The arc length s along the curve is a legitimate generalized coordinate since the position is uniquely determined, but the angle θ is not since there are multiple positions for a single value of θ.

Generalized coordinates are usually selected to provide the minimum number of independent coordinates that define the configuration of a system, which simplifies the formulation ofLagrange’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 moreconstraint equations.

Holonomic constraints

Open curved surface F(x, y, z) = 0
Closed curved surface S(x, y, z) = 0
Two generalized coordinates, two degrees of freedom, on curved surfaces in 3d. Only two numbers (u, v) are needed to specify the points on the curve, one possibility is shown for each case. The full threeCartesian coordinates (x, y, z) are not necessary because any two determines the third according to the equations of the curves.

For a system of N particles in 3D real coordinate space, the position vector of each particle can be written as a 3-tuple in Cartesian coordinates:

\displaystyle \mathbf {r} _{1}=(x_{1},y_{1},z_{1})\,,\quad \mathbf {r} _{2}=(x_{2},y_{2},z_{2})\,,\ldots \,,\mathbf {r} _{N}=(x_{N},y_{N},z_{N})\,.

Any of the position vectors can be denoted rk where k = 1, 2, …, N labels the particles. A holonomic constraint is a constraint equation of the form for particle k[4][nb 1]
\displaystyle f(\mathbf {r} _{k},t)=0
which connects all the 3 spatial coordinates of that particle together, so they are not independent. The constraint may change with time, so time t will appear explicitly in the constraint equations. At any instant of time, when t is a constant, any one coordinate will be determined from the other coordinates, e.g. if xk and zk are given, then so is yk. One constraint equation counts as one constraint. If there are C constraints, each has an equation, so there will be C 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 3N quantities, but C coordinates can be eliminated, one coordinate from each constraint equation. The number of independent coordinates is n = 3NC. (InD dimensions, the original configuration would need ND coordinates, and the reduction by constraints means n = NDC). 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 qj(t). It is convenient to collect them into an ntuple

\displaystyle \mathbf {q} (t)=(q_{1}(t),q_{2}(t),\ldots ,q_{n}(t))

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, n. 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[5] The position vector rk of particle k is a function of all the n generalized coordinates and time,[6][7][8][5][nb 2]

\displaystyle \mathbf {r} _{k}=\mathbf {r} _{k}(\mathbf {q} (t),t)\,,

and the generalized coordinates can be thought of as parameters associated with the constraint.

The corresponding time derivatives of q are the generalized velocities,

\displaystyle {\dot {\mathbf {q} }}={\frac {d\mathbf {q} }{dt}}=({\dot {q}}_{1}(t),{\dot {q}}_{2}(t),\ldots ,{\dot {q}}_{n}(t))

(each dot over a quantity indicates one time derivative). The velocity vector vk is the total derivative of rk with respect to time
\displaystyle \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}+{\frac {\partial \mathbf {r} _{k}}{\partial t}}\,.
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 qj and velocities dqj/dt can be treated as independent variables.

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

\displaystyle g(\mathbf {q} ,{\dot {\mathbf {q} }},t)=0\,,

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.

 

在理論以及實務裡的好處也。

固然簡單範例

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,

\displaystyle 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.

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

\displaystyle \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,
\displaystyle \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
\displaystyle \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
\displaystyle \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}
Thus, the virtual work is given by
\displaystyle \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
\displaystyle F_{\theta _{1}}=-(m_{1}+m_{2})gL_{1}\sin \theta _{1},\quad F_{\theta _{2}}=-m_{2}gL_{2}\sin \theta _{2}.
Compute the kinetic energy of this system to be
\displaystyle 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}.
Euler–Lagrange equation yield two equations in the unknown generalized coordinates θi i=1, 2, given by[14]
\displaystyle (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
\displaystyle 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.

 

可以方便『紙筆計算』!猶恐複雜推導,易犯無心之錯呦?

已然得手應心者,何不開始學習 SymPy

Lagrange’s Method in Physics/Mechanics

mechanics provides functionality for deriving equations of motion using Lagrange’s method. This document will describe Lagrange’s method as used in this module, but not how the equations are actually derived.

………

 

的『符號運算』法,將之『自動化』耶??

特假借

Nonminimal Coordinates Pendulum

In this example we demonstrate the use of the functionality provided in mechanics for deriving the equations of motion (EOM) for a pendulum with a nonminimal set of coordinates. As the pendulum is a one degree of freedom system, it can be described using one coordinate and one speed (the pendulum angle, and the angular velocity respectively). Choosing instead to describe the system using the xx and yy coordinates of the mass results in a need for constraints. The system is shown below:

../../../../_images/pendulum_nonmin.svg

The system will be modeled using both Kane’s and Lagrange’s methods, and the resulting EOM linearized. While this is a simple problem, it should illustrate the use of the linearization methods in the presence of constraints.

 

※ 練習

 

以示之!!