Constrained Lagrangian Mechanics

Euler-Lagrange equations are used to formulate the dynamics of mechanical systems, which often consist of a kinematic chain of rigid links connected by joints. Kinematic connections are often represented by constraints which reduce the number of the system’s DOFs.
There are two main limitations of these equations in their standard formulation:

  • They require a minimal number of generalized coordinates, equal to the number of the system’s DOF. This may complicate formulation of the system’s kinematics and dynamics, especially for mechanisms composed of closed kinematic chains.
  • Secondly, the equations contain no information about reaction forces which are required for enforcing the kinematic constraints. This is because Euler-Lagrange’s equations are derived from energy balance whereas typical reaction forces generate zero mechanical work (enforcing zero relative velocities at joints, or act in a direction perpendicular to relative motion in frictionless contacts).

In some cases, it is important to formulate expressions for constraint forces, whether for mechanical design purposes (preventing failure of the links) or in cases where the kinematic constraints represent unilateral contacts that add inequalities on contact forces (e.g. only compressive or only tensile forces are possible). Another more complicated case is non-holonomic constraints which limit the subspace of permissible directions of velocities depending on the system’s instantaneous configuration. In such cases, the system’s number of DOF is not reduced.

Systems with Holonomic Constraints

Example:

How many DOFs does the following 4-bar mechanism have?

Figure 2.1: A grounded 4-bar mechanism.

Solution:
Each free bar has DOFs - two of them for position and one for orientation. Therefore the whole system essentially, if not constrained, has DOFs (the fourth bar, the ground, isn’t free).

Each connection between two links, removes degrees of freedom - they constrain the position of the end of each bar to another. Since there are four such connections, we are left with DOF.

We have many different choices which general coordinate to use to describe this DOF:

Figure 2.2: Some different choices of general coordinates.

Some of these choices may be poor choices in the context of analysis.

Additionally, sometimes we’d actually prefer to use more coordinates than the number of DOFs to avoid singularities and simplify the analysis.

Each rigid connection between two particles or rigid bodies by a joint which imposes limitations on relative motion can be written as a holonomic constraint. We choose coordinates which represent the motion without accounting for the constraints. The constraints are represented by equalities of the form where or in vector form as:

When all constraints are independent, the system’s effective number of DOFs is , and the system motion can, in principle, be described by a smaller set of coordinates.

Often, such formulation may be very complicated, and a -to- mapping to the entire space of a system’s configurations is not always possible, so the set of coordinates covers only a local sub-region of configurations. When the system’s motion is described using the unconstrained coordinates , one should also add constraint forces which enforce the kinematic constraints . Thus, the constrained equations of motion in vector form are:

Where are the kinetic and potential energy of a general motion without constraints, is the vector of generalized forces due to non-conservative forces, and is the vector of generalized constraint forces. In order to ensure that the constraint forces do zero mechanical work, they are given as:

Where are time-varying scalar magnitudes also called Lagrange’s multipliers, and the direction is a gradient vector of the -th scalar constraint with respect to . Thus, the instantaneous power of the -th term of in (2.3) is zero:

Since .

In matrix form, the equation of motion with vector of constraint force magnitudes is:

Notice the last term is a matrix multiplied by a vector:

Equivalent writing as scalar equations:

We require solving equation (2.3) together with the constraints and find the vector .

Let us define

so that and differentiate twice with respect to time to obtain:

Equations (2.3) and (2.5) can be rearranged as a system of differential-algebraic equations:

Equation (2.6) is a linear system suitable for numerical integration under state vector .
They form a system of linear equations in the unknowns , which can be numerically solved as a function of instantaneous configuration and velocities (). If the inertia matrix is non-singular (no massless links or rotating bodies with zero moment of inertia), an explicit expression for the accelerations can be extracted from (2.3) as:

And then substituted into (2.5) and obtain:

Which can rearranged as:

Inverting the left-hand side matrix in (2.8), the vector constraint forces magnitudes can be found as:

Finally, substituting (2.9) into (2.3) gives a second-order ODE in , which can be transformed into a first-order state equation for .

Example: 2D pendulum

Given a 2D pendulum:

Figure 2.3: Simple 2D pendulum.

We describe the motion with two () polar general coordinates , and with one holonomic constraint:

The kinematics:

The energies:

The power:

The matrix:

Now applying (2.4):

  • for :

\begin{aligned}
& \dfrac{\mathrm{d}}{\mathrm{d}t}\left( \dfrac{ \partial T }{ \partial \dot{r} } \right)=m\ddot{r} \[1ex]
& \dfrac{ \partial T }{ \partial r } =mr\dot{\theta}^{2} \[1ex]
& \dfrac{ \partial V }{ \partial r } =-mg\cos\theta \[1ex]
& {F}{r}=\dfrac{ \partial {P}{\text{nc}} }{ \partial r } ={f}{x}\sin\theta \[1ex]
& {F}
{c,r}={\lambda}{1} \dfrac{ \partial h }{ \partial r }={\lambda}{1}
\end{aligned}

m\ddot{r}-mr\dot{\theta}^{2}-mg\cos\theta={f}{x}\sin \theta+{\lambda}{1}

\begin{aligned}
& \dfrac{\mathrm{d}}{\mathrm{d}t}\left( \dfrac{ \partial T }{ \partial \dot{\theta} } \right)=mr^{2}\ddot{\theta}+2mr \dot{r}\dot{\theta} \[1ex]
& \dfrac{ \partial T }{ \partial \theta } =0 \[1ex]
& \dfrac{ \partial V }{ \partial \theta } =mgr\sin\theta \[1ex]
& {F}{\theta}= \dfrac{ \partial {P}{\text{nc}} }{ \partial \dot{\theta} } ={f}{x}r\cos\theta \[1ex]
& {F}
{c\theta}= {\lambda}_{1} \dfrac{ \partial h }{ \partial \theta } =0
\end{aligned}

mr^{2}\ddot{\theta}+2mr \dot{r}\dot{\theta}+mgr\sin\theta={f}_{x}r\cos\theta

\underbrace{ \begin{pmatrix}
m & 0 \
0 & mr^{2}
\end{pmatrix} }{ \mathbf{M}(\mathbf{q}) }\underbrace{ \begin{pmatrix}
\ddot{r} \
\ddot{\theta}
\end{pmatrix} }
{ \ddot{\mathbf{q}} }+\underbrace{ \begin{pmatrix}
-mr\dot{\theta}^{2} \
2mr \dot{r}\dot{\theta}
\end{pmatrix} }{ \mathbf{B}(\dot{\mathbf{q}},\mathbf{q}) }+\underbrace{ \begin{pmatrix}
-mg\cos\theta \
mgr\sin\theta
\end{pmatrix} }
{ \mathbf{G}(\mathbf{q}) }=\underbrace{ \begin{pmatrix}
{f}{x}\sin\theta \
{f}
{x}r\cos\theta
\end{pmatrix} }{ \mathbf{F}{q} }+\underbrace{ \begin{pmatrix}
{\lambda}{1} \
0
\end{pmatrix} }
{ \mathbf{F}_{c}=\mathbf{W}(\mathbf{q})^{T}\boldsymbol{\lambda} }

Example: Slider-crank mechanism

Given the following slider-crank mechanism:

Figure 2.4: Simple slider-crank mechanism.

We describe the motion with three () general coordinates , and with two holonomic constraints:

Therefore the system’s effective number of DOF is . We write:

The energies and power of non-conservative forces:

The holonomic equations:

The matrix:

Therefore:

To solve (2.6) we need to now:

Systems with Non-Holonomic Constraints

A nonholonomic constraint imposes equalities involving of the system’s instantaneous velocities . General form . In this class we consider only constraints of the form (called Pfaffian constrains):

The meaning of (2.10) is that at each instantaneous configuration of the system, the direction of the vector of generalized quantities is constrained to lie within a subspace of dimensions , and has directions of “forbidden” motion. In matrix form, (2.10), can be written as:

Just as in case holonomic constraints, the generalized forces enforcing constraints of the form (2.11) are where where is a vector of Lagrange’s multipliers, magnitude of constraint forces. The work rate (power) done by constraint forces is again zero . Hence, the constrained equations of motion take the form:

Example: Chaplygin's Sleigh

Figure 2.5: A rigid body with a blade edge represented by a point that cannot slip sideways in body-fixed direction.
We use the rotating system:

The position of the center of mass:

The position and velocity of :

The kinetic energy:

And the potential energy is simply .

The non-holonomic skid condition:

Meaning point cannot move in the direction - the sleigh cannot skid.
We want to write this constraint in the form of (2.11). Substituting and :

The mass matrix:

The matrix:

The equations of motion:

After substitutions we get:

Note that differentiation of any holonomic constraints with respect to time will give . That is, a holonomic constraint can also be written as a velocity constraint as in (2.11). For example, point particle in 2D has and . The scalar velocity constraint comes from differentiation of the holonomic constraint , which represent motion along a circular arc, i.e., pendulum in 2D. The fundamental difference is that if (2.11) comes from differentiating a holonomic constraint, then the actual number of system’s DOFs is reduced and the system’s motion can effectively be described by coordinates. In such case, the velocity constraints are said to be integrable and not “truly” nonholonomic. For “true” nonholonomic constraints, the system can reach all -dimensional space of configurations in spite of the constraints on velocities (only the trajectories are limited). A mathematical condition to check whether a system of constraints as in (2.11) is integrable or truly nonholonomic is beyond the scope of this course.

Under-Actuated Robots with Nonholonomic Constraints

In under-actuated robots, only part of the degrees-of-freedom are directly actuated, whereas the rest of them are passive. Therefore, the generalized coordinates can be decomposed into passive and actuated coordinates as

where , A particular case is “locomotion systems” where one distinguishes between body coordinates and shape coordinates, but this is not always aligned with the partition into actuated and passive DOFs. For instance, some shape variables might be passive.

Nonholonomic constrains on velocities of the form can be decomposed into sub-blocks as , where :

If the number of constrains is “sufficiently large” such that , then the system is called “kinematic”. If one assumes that the actuated coordinates can be directly prescribed/controlled, the motion is governed by a first-order differential system:

That is, the motion of can be dictated indirectly. Note that one has to verify that is invertible.

In case where , the system is not kinematic, and one has to consider the dynamic equations of motion (2.6) or (2.12). The matrix-form equations of motion (2.3) and (2.5) can be decomposed into blocks (matrix form):

Can also be written as:

Now assuming that the shape variables are directly prescribed, (2.15) can be rearranged such that the unknowns are body accelerations , actuation torques , and constraint forces :

Note that the right side of (2.16) contains known values of shape variables and their time-derivatives, as well as body positions and velocities, . Thus, (2.16) is a second-order differential-algebraic system which gives a state equation for the body motion in case that is the prescribed control input. Riding toys examples:

Elimination of Nonholonomic Constraints and Constraint Forces

Given nonholonomic constraints on velocities in the form , one can define generalized velocity directions that satisfy the constraints , for and magnitudes , so that the permissible velocity is given by:

Where and the columns of are , which span the nullspace , so that . Differentiating (2.17) in time gives . Substituting this into (2.12) and pre-multiplying by gives:

Note that the constraint forces have been eliminated in (2.18) due to the relation . The combined equations (2.17) and (2.18) form state equations for the state vector . That is, the system’s order is reduced from in (2.6) to , while the unknowns of instantaneous accelerations are instead of instantaneous unknowns in (2.6). The choice of in (2.17) is not unique, but one has to verify that has full rank. That is, the vectors are linearly independent for all .

In cases where the system satisfies additional symmetries, equation (2.18) does not depend on , and can be analyzed independently of (2.17) as state equations are in only.

Revising the Chaplygin’s Sleigh, since the number of DOF is , and we have constraint, there are directions of allowed velocities . The natural choice is:

  1. Pure translation along axis at speed , so that
  2. Pure rotation about the blade at angular velocity, so that ,

We can write:

Therefore:

Additionally:

Where the columns of are which span the nullspace of , so that . Due to this relation, we get

Substituting this relation into the EOM, and pre-multiplying by gives:

The equations of motion are:

It’s easy to see that the equilibrium points rest on the line . The Jacobian:

There under equilibrium:

We conclude that:

That is, the forward motion of the Sleigh is stable, while the reverse is unstable.
Note that the kinetic energy of the system is conserved, so expressing in terms of we have:

This implies that the solution trajectories move along ellipse arcs in plane. Each ellipse corresponds to the initial (conserved) energy level.

bookhue

Figure 2.6: Phase plane of Chaplygin’s Sleigh. Stable equilibria in solid red, unstable in dashed red.

Note the remarkable difference from pendulum dynamics: similar phase plane of elliptic trajectories, but here energy conservation does NOT imply marginal stability and periodic solution, a unique feature of nonholonomic system!

Physically - the sleigh converges to pure translation along the blade’s direction, such that the blade is behind the center of mass.