## Abstract

We present the new, general, explicit form of the equations of motion for constrained mechanical systems applicable to systems with singular mass matrices. The systems may have holonomic and/or non-holonomic constraints, which may or may not satisfy D'Alembert's principle at each instant of time. The equation provides new insights into the behaviour of constrained motion and opens up new ways of modelling complex multi-body systems. Examples are provided and applications of the equation to such systems are illustrated.

## 1. Introduction

One of the central problems in analytical dynamics is the determination of equations of motion for constrained mechanical systems. This problem was formulated more than 200 years ago and has been actively and continuously worked on since by many engineers, mathematicians and scientists. The initial description of constrained motion was established by Lagrange (1787). He invented the method of Lagrange multipliers specifically to handle constrained motion. Gauss (1829) introduced a general, new principle of mechanics for handling constrained motion, which is commonly called today as Gauss's Principle. Gibbs (1879) and Appell (1899) independently discovered the so-called Gibbs–Appell equations of motion using the concept of quasi-coordinates. Dirac (1964) developed, using Poisson brackets, a recursive scheme for determining the Lagrange multipliers for singular, Hamiltonian systems. Udwadia & Kalaba (1992) discovered a simple, explicit set of equations of motion for general constrained mechanical systems. Their equations can deal with holonomic and/or non-holonomic constraints that are not necessarily independent. All these investigators have used D'Alembert's principle as their starting point. The principle states that the total work done by the forces of constraints under virtual displacements is always zero. This assumption seems to work well in many situations and can be presumed as being at the core of classical analytical dynamics. Udwadia & Kalaba (2001, 2002) generalized their equations to constrained mechanical systems that may or may not satisfy D'Alembert's principle.

Though one may perhaps consider these equations to be the most general, explicit equations obtained to date that describe the motion of constrained mechanical systems, they are limited by the fact that, unlike Dirac's formulation, they cannot deal with singular mass matrices. Systems with singular mass matrices are not common in classical dynamics when dealing with unconstrained motion. As known (Pars 1979), when the minimum number of coordinates is employed for describing the (unconstrained) motion of mechanical systems, the corresponding set of Lagrange equations usually yield mass matrices that are non-singular; in fact they are symmetric, and positive definite (Pars 1979). However, singular mass matrices can, and do, arise in the modelling of complex, multi-body mechanical systems. Such occurrences are most frequent when describing mechanical systems with more than the minimum number of required generalized coordinates, so that the coordinates are then not in fact independent of one another, and are subjected to constraints. Often, such descriptions of mechanical systems that use more than the minimum number of required coordinates are helpful in setting up the equations of motion of complex systems in a less labour-intensive fashion (see Udwadia & Kalaba 1996 for several examples). At other times, one may be interested in decomposing a complex multi-body system into its constituent parts for each of which the equations of motion are known; one then wants to use these equations for each of the constituents to obtain the equations of motion of the composite system. Singular mass matrices can arise in such situations too. Thus, in general, singular mass matrices can arise when one wants greater flexibility in modelling complex mechanical systems.

In this paper, we develop general and explicit equations of motion to handle systems whether or not their mass matrices are singular. The equations are applicable to systems with holonomic constraints, non-holonomic constraints, or a combination of the two types, as well as systems where the constraint forces may or may not be ideal. We show that, in general, the motion of such systems with singular mass matrices may not always be uniquely defined. Further, we present the necessary and sufficient conditions for the equations of motions to uniquely determine the accelerations of the system. We then show that these general equations are identical to the familiar, explicit equations previously obtained by Udwadia & Kalaba (2001) when the mass matrices are restricted to being positive definite. We provide examples to show how systems with singular mass matrices can arise in the modelling of mechanical systems in classical mechanics and demonstrate how to use our equations for describing such systems. The new equations open up new ways of modelling complex multi-body systems. For, they permit one to decompose such systems into sub-systems each of whose equations of motion are known, and then combine these sub-system equations to obtain the equations of motion of the composite system in a straightforward and simple manner.

## 2. Explicit equations of motion for general constrained mechanical systems applicable to systems with singular mass matrices

Consider an unconstrained mechanical system. The motion of the system at any time *t* can be described, using Lagrange's equation, by(2.1)with the initial conditions(2.2)where *q* is the generalized coordinate *n*-vector; *Q* is an *n*-vector which is a known function of *q*, and *t*; and *n* is the number of generalized coordinates. In this paper we shall assume, contrary to common practice, that the matrix *M* that describes the unconstrained motion of the system is a symmetric *n* by *n* matrix, which is, in general, *semi-positive* definite. By ‘unconstrained’ we mean here that the *n* coordinates, *q*, are independent of one another, or are to be treated as being independent of each other.

Suppose further that the unconstrained system is now subjected to the *m* constraints(2.3)where *k*≤*m* equations in the equation set (2.3) are functionally independent. We shall assume that the initial conditions (2.2) satisfy these *m* constraints. The constraints described by (2.3) include all the usual varieties of holonomic and non-holonomic constraints, and combinations thereof.

Our aim is to obtain explicit expressions for the acceleration, , of the dynamical system at the time *t*, given: (i) its unconstrained equation of motion, as given by equation (2.1); (ii) the constraints, as given by the equation set (2.3); and (iii) the state of the system, and *q*(*t*), at time *t*.

Assuming that the set of constraints (2.3) are smooth enough, we can differentiate them with respect to *t* to obtain the relation(2.4)where *A* is an *m* by *n* matrix whose rank is *k*, and, *b* is an *m*-vector.

When the unconstrained system gets constrained, additional forces—constraint forces, *Q*^{c}—will arise to ensure that the constraints are satisfied. Therefore, the equation of motion for the constrained system becomes(2.5)We note, again, that the matrix *M* in equation (2.5) can, in general, be singular.

As stated by Udwadia & Kalaba (2001), the work done by the forces of constraints under virtual displacements at any instant of time *t* can be expressed as(2.6)where is an *n*-vector describing the nature of the non-ideal constraints, which is determined by the mechanician and could be obtained by experimentation and/or observation (see Udwadia & Kalaba 2001 for details). The virtual displacement vector, *w*(*t*), is any non-zero *n*-vector that satisfies (Udwadia & Kalaba 1996; Udwadia *et al*. 1997)(2.7)Solving equation (2.7), the *n*-vector *w* can be written as (we suppress the arguments for clarity)(2.8)where *γ* is *any* arbitrary *n*-vector, and *A*^{+} is the Moore–Penrose inverse of the matrix *A*.

Substituting equation (2.8) in equation (2.6), we obtain(2.9)Since each component of the vector *γ* can be independently chosen, equation (2.9) yields(2.10)Premultiplying equation (2.5) by *I*−*A*^{+}*A* and using equation (2.10), we get(2.11)Equations (2.11) and (2.4) can now be written together as(2.12)Defining(2.13)we can solve equation (2.12) to get(2.14)where *η* is an *arbitrary* *n*-vector.

Equation (2.14) is the general, explicit equation of motion for constrained mechanical systems with non-ideal constraints. Here, we do *not* have any restriction regarding the positive definiteness of the symmetric mass matrix *M*. It is allowed to be *singular*. We state this as our first result.

*Result 1*. The general equation of motion of a constrained mechanical system described by relations (2.1)–(2.3), *whether or not* the matrix *M* that arises in the description of the unconstrained motion of the system is singular, is given bywhere is given by relation (2.13), and *η*(*t*) is an arbitrary *n*-vector.

We note that, in general, because of the second member on the right-hand side of equation (2.14), the acceleration of a system with a singular mass matrix is not necessarily unique. However, when the (*m*+*n*) by *n* matrix has full rank (rank=*n*), this second member in equation (2.14) vanishes for then so that ; and so the equation of motion becomes unique. Hence, we have the following important result.

*Result 2*. When the matrix has full rank, the equation of motion of the constrained system is unique and is given by the equation(2.15)Next, we provide a necessary and sufficient condition for the matrix to have full rank.

## 3. The necessary and sufficient condition for to have full rank

When has full rank, the equation of motion of the constrained system is unique and is given by relation (2.15). We present the necessary and sufficient condition for to have full rank in lemma 3.1.

*The matrix**has full rank if and only if the matrix**has full rank. That is*, *has full rank*⇔ *has full rank*.

(a) We first prove that if does not have full rank, then does not have full rank. Ifdoes not have full rank, there exists an *n*-vector *w*≠0 such that(3.1)Thus, there exists a *w*≠0 such that(3.2)This implies that if does not have full rank, then does not have full rank.

(b) We next show that if does not have full rank, then does not have full rank. If the matrix does not have full rank, there exists an *n*-vector *w*≠0 such that(3.3)which can also be written as the two relations(3.4)and(3.5)Solving equation (3.5), we have(3.6)where *δ* is any arbitrary *n*-vector.

Substituting equation (3.6) in equation (3.4), we obtain(3.7)from which it follows that(3.8)Since relation (3.8) can be rewritten as(3.9)we must then have, by equation (3.6),(3.10)so that(3.11)Hence, by equations (3.11) and (3.5) there exists an *n*-vector *w*≠0 such that *M**w*=0 and *Aw*=0, so that . We have thus shown what we set out to: does not have full rank⇒ does not have full rank.

Combining the results proved in parts (a) and (b) above, we have thus deduced that does not have full rank if and only if does not have full rank. And hence, the matrix has full rank if and only if has full rank. ▪

Lemma 3.1 gives us the following important result.

*Result 3*. The equation of motion of the constrained mechanical system described by relations (2.1)–(2.3) is unique if and only if the matrixhas full rank, *n*. Equation (2.15) gives the uniquely determined acceleration of the constrained system when has full rank.

*A simple corollary of the above result is that when the matrix M is non-singular, the equation of motion of the constrained system is unique and is given by equation* *(2.15)**. This follows from the fact that the matrix* *is then of full rank.*

*Remarks on Result 3*

In general, when the mass matrix is singular, the acceleration vector of the constrained system may not be unique. The acceleration of the constrained system is unique if and only if the matrix has full rank. Since for most practical systems in classical mechanics a unique acceleration vector is experimentally observed, and therefore expected from our theoretical models, the rank of may be used as a check to assess the reasonableness of a given method of modelling, or a model that is obtained, for a complex multi-body system.

Even when has full rank, the presence of semi-definite, symmetric (singular) mass matrices in the description of the unconstrained motion of systems causes conceptual differences from the situation when the mass matrices are invertible. When the mass matrix is invertible, once

*Q*^{c}is determined (see equation (2.5)), the acceleration of the constrained system can be explicitly found from equation (2.5), since*M*is invertible. Not so, when the mass matrix is singular. Even if*Q*^{c}is known, the acceleration of the constrained system cannot be directly determined from equation (2.5). The determination of the acceleration of the constrained system requires*both*equations (2.4) and (2.5) to be used, as in (2.12).

## 4. Equivalence with previous results for symmetric, positive definite mass matrices

In this section, we will show that when the mass matrix *M* is symmetric and positive definite (and hence, non-singular), the equation of motion given by relation (2.15) reduces to that given in Udwadia & Kalaba (2001).

Since *M* is symmetric and positive definite, has full rank and the second member on the right in equation (2.14) disappears since . Also, since *M*^{−1/2} is well defined, we have(4.1)so that(4.2)where(4.3)and(4.4)When *M* is non-singular, the ranks of *B* and *V* are *k* and *n*−*k*, respectively. Hence, because of equation (4.2),has full rank.

*Provided BV*=0 *and**has full rank, then*(4.5)*where B*^{+} *is the Moore–Penrose inverse of the matrix B*.

Sincehas full rank,(4.6)has an inverse.

Therefore, we have(4.7)Let us define(4.8)so that(4.9)Postmultiplying equation (4.9) by *B*^{+}, we have(4.10)Since *BV*=0,(4.11)And we know that . Thus, equation (4.10) yields(4.12) ▪

*M*

^{1/2}and

*J*

^{−1}are both invertible. Thus, equation (4.13) yields(4.17)Substituting equation (4.17) in equation (2.15), we get(4.18)Expanding equation (4.18) gives the relation(4.19)which can be also rewritten as(4.20)By equations (4.4) and (4.3), we obtain(4.21)Using relation (4.9) in the first member on the right in equation (4.21), we then have(4.22)which, upon noting from lemma 4.1 that

*B*

^{+}=

*JB*

^{T}, becomes(4.23)Denoting the acceleration of the unconstrained system by

*a*=

*M*

^{−1}

*Q*, we get(4.24)which is the same as the result obtained in Udwadia & Kalaba (2001). We note that when the matrix

*M*is singular,

*M*

^{−1/2}does not exist, and the explicit equation of motion obtained earlier (Udwadia & Kalaba 2001), and given by equation (4.24), becomes inapplicable.

## 5. Examples

In this section, three examples shall be provided to show how systems with singular mass matrices can occur in the formulation of problems in classical mechanics and how they can be handled by equation (2.14).

### (a) Example 1

Consider a wheel of mass *m* and radius *R* rolling on an inclined surface without slipping, as shown in figure 1, with the gravitational acceleration *g* downwards. The angle of the inclined surface is *α*, where .

The system clearly has just one degree of freedom. Its kinetic energy is(5.1)where *I*_{c} is the moment of inertia around the centre of the wheel.

If *y* is the vertical displacement of the centre of the wheel as it rolls down the inclined plane, the wheel's potential energy can be simply expressed as(5.2)Were we to take *θ* and *y* as the independent generalized coordinates and use the Lagrangianto obtain Lagrange's equations of motion for the unconstrained system (since we are assuming the coordinates are independent), we would get the relations(5.3)and(5.4)which can be written in matrix form as(5.5)Comparing with equation (2.1), here we have(5.6)and the impressed force vector(5.7)Note that the mass matrix *M* describing the unconstrained motion is singular now. This singularity is a consequence of the fact that in reality the system has only one degree of freedom and we are using more than the minimum number of generalized coordinates to describe the system, and pretending that these coordinates are independent. The advantage of doing this is that the unconstrained equations of motion, (5.5), can be trivially written down. However, the two coordinates *y* and *θ* are in reality not independent of one another, since the wheel rolls down without slipping. They are related through the equation of constraint(5.8)that must be added to the formulation in order to model the dynamics of the physical situation properly. Differentiating equation (5.8) twice, we obtain(5.9)so that(5.10)and(5.11)Since in this problem the system is ideal and the constraint forces do no work under virtual displacements,(5.12)By equation (5.10) we have(5.13)so that(5.14)and(5.15)Since the rank ofis 2, has full rank, and the equation of motion of the constrained system is unique and is given by relation (2.15), so that we have(5.16)(5.17)which is the correct equation of motion for the constrained system.

Example 1 illustrates the following general, practical principle related to the modelling of many complex, multi-body engineering systems.

It may be appropriate to model a mechanical system—in this case, for illustration, a single degree of freedom system—in terms of *more* than the minimum number of coordinates required to describe its configuration—in this case, in terms of the two coordinates (*y*, *θ*). We proceed by pretending that these coordinates are independent, because doing this will generally lead to a simpler procedure for writing out Lagrange's equations when we are dealing with complex, mechanical systems. However, to represent the physical situation properly (the fact that coordinates are indeed not independent), we must add to the model the constraints between the redundant coordinates—in this case, relation (5.8)—, thereby treating it as a problem of constrained motion. The system's explicit equation of motion is then obtained through the use of equation (2.15). Whether the modelling procedure is appropriate or not—that is, whether the choice of the additional coordinates used in the formulation of the problem beyond the minimum number required to describe the configuration of the system, and the requisite constraints used, are suitable to describe the dynamics correctly—, is dictated by whether the matrix has full rank (see Remarks on Result 3). When it does, the unique equation of motion for the system is correctly obtained.

For the choice that has been made in this example of the coordinates (*y*, *θ*), and of the constraint (5.8), this is so, and we obtain the correct equations of motion, as shown in (5.17).

It should be noted that the process of obtaining a Lagrangian could be the most difficult, tricky task in having the correct equation of motion of a constrained (especially complicated) system. By employing more than the minimum number of required coordinates properly, one can significantly simplify the process of deriving the Lagrangian and the equation of motion for the unconstrained system. Then, one can put the information of the unconstrained system and constraints in equation (2.14) and let a computer do the rest for us, determining the equation of motion for the constrained system.

### (b) Example 2

Were we to add a zero mass particle (a virtual particle) moving in the *x*-direction to the system given in example 1, we would have(5.18)(5.19)(5.20)and the equation of motion for the unconstrained system now becomes(5.21)The last equation simply says that there can be no force exerted in classical mechanics on a particle whose mass is zero.

We note now that the matrix no longer has full rank. The equation of motion is therefore now given by relation (2.14); it is no longer unique. We next determine(5.22)and the vectors *b* and *C*, which are given, as before, by equations (5.11) and (5.12), respectively.

Using equation (2.14) we then obtain the constrained equation of motion of the system to be(5.23)where *η* is arbitrary. Equation (5.23) is essentially the same as the equation of motion (5.17) for the system without the virtual particle. The last equation in the set (5.23) simply states that the acceleration of a particle of mass zero (to which only a zero force can be applied) is indeterminate.

### (c) Example 3

A system of two masses, *m*_{1} and *m*_{2}, connected with springs, *k*_{1} and *k*_{2}, is shown in figure 2. We shall model this system by decomposing it into two separate sub-systems—that is, we consider it as a multi-body system—as shown in figure 3. The two sub-systems are then connected together by the ‘connection constraint’, *q*_{1}=*x*_{1}+*d*, where *d* is the length of mass *m*_{1}. We use the coordinates *x*_{1}, *q*_{1} and *q*_{2} to describe the configuration of the two sub-systems, and first treat these coordinates as being independent in order to get the unconstrained equations of motion. We then ‘connect’ the two sub-systems by imposing the constraint *q*_{1}=*x*_{1}+*d* to obtain the equation of motion of the composite system shown in figure 2.

Consider figure 3. For sub-system 1, the kinetic energy and the potential energy are given byandwhere *l*_{10} is the unstretched length of the spring *k*_{1}.

For sub-system 2, the kinetic energy and the potential energy are given byandwhere *l*_{20} is the unstretched length of the spring *k*_{2}.

Thus, for the two sub-systems, the total kinetic energy becomes(5.24)and the total potential energy is(5.25)Defining , and , by equations (5.24) and (5.25) we get(5.26)and(5.27)

Using Lagrange's equation with the Lagrangian , the equations of motion for the unconstrained system can be written as(5.28)(5.29)and(5.30)which can be put in the form(5.31)Note that these equations for the unconstrained system are almost trivial to obtain. To model the system shown in figure 2 using these two separate sub-systems, we connect the two sub-systems by using the constraint . Differentiating this constraint twice we get(5.32)By equations (5.31) and (5.32), we thus have(5.33)(5.34)(5.35)and(5.36)Note that in choosing more than the minimum number of coordinates to describe the configuration of the system, and treating them as being independent, we obtain a mass matrix, *M*, that is singular.

We assume that the constraint is ideal so that *C*=0.

Since(5.37)we have(5.38)

We next obtain the equations of motion for the constrained systems for three different cases.

*m*_{1}, *m*_{2}>0

Note that although the matrix *M* is singular, the matrix has full rank. Therefore, the equation of motion of the composite system is unique and is explicitly given by equation (2.15). Our modelling of the two degree of freedom system shown in figure 2 in terms of the three chosen coordinates is appropriate.

We now obtain the equation of motion for the constrained system as(5.39)which is the same as the one obtained by other methods (without decomposition).

*m*_{1}=0, *m*_{2}>0

Since in this case *m*_{1}=0, given by equation (5.38) does not have full rank. However, as noted from the physical system, the equation of motion must be unique. In order to get a unique equation of motion, our attention is drawn to the need for an additional constraint, so that the resulting matrix has full rank. Considering the location where *m*_{1}=0, we obtain the following constraint relation(5.40)Differentiating equation (5.40) twice with respect to time *t* and then putting it together with equation (5.32), we get(5.41)From equation (5.41) we have(5.42)and(5.43)Since *A* has full rank,(5.44)we have(5.45)which now has full rank. This may be easier to see from the matrix(5.46)which now has full rank.

Hence, the equation of motion for the system can be expressed as(5.47)Since in this case *m*_{1}=0, one can imagine that the system is now composed of only the mass *m*_{2}, and the springs *k*_{1} and *k*_{2} connected to it in series. To see that equation (5.47) is correct, it may be easier to see the equation of motion in terms of *x*_{2}. By equation (5.47), the acceleration of the mass *m*_{2} is given by(5.48)which is, as anticipated, the correct equation, where is the total extension of both the springs *k*_{1} and *k*_{2}. The first equation in the set (5.47) simply states that , as is obvious from equation (5.40).

*m*_{1}>0, *m*_{2}=0

Since *m*_{2}=0, given by equation (5.38) does not have full rank. But for the equation of motion to be unique, as shown before, the matrices and must have full rank, and so one constraint is additionally required. It is given by(5.49)because when the mass *m*_{2} is zero, there can be no force in the spring with stiffness *k*_{2}. Differentiating equation (5.49) twice with respect to time *t* and writing it together with equation (5.32) in matrix form, we obtain(5.50)so that we have(5.51)and(5.52)Since(5.53)we obtain as(5.54)and as(5.55)We note that now has full rank, as does .

Therefore, the equation of motion of the composite system with *m*_{2}=0 becomes(5.56)which, as expected, is the correct equation of motion.

## 6. Conclusions

The main contributions of this paper are as follows.

The explicit equations of motion that are available (Udwadia & Kalaba 2001, 2002) to date are

*not*applicable to mechanical systems whose unconstrained equations of motion have singular mass matrices. In this paper, we present a new, general and explicit form of the equations of motion for constrained mechanical systems applicable to such systems with singular mass matrices. These equations explicitly provide the acceleration of the constrained system and apply to systems with holonomic and/or non-holonomic constraints, as well as constraints that may or may not be ideal. It may be noted that our entire development does not require, nor use, the notion of Lagrange multipliers.We show that, in general, when the mass matrix is singular, the acceleration vector of the constrained system may not be unique. As shown in one of the examples, this can occur with the addition of a zero mass particle to a mechanical system.

When the mass matrix is singular, a unique equation of motion is obtained if and only if has full rank. Since involves the determination of generalized inverses, we show that this condition is equivalent to the matrixhaving full rank. Hence, for a system whose unconstrained equation of motion has a singular mass matrix to have a unique equation of motion we require that it be suitably constrained so that the columns of are linearly independent.

As shown in the examples, mass matrices could be singular when (i) the number of generalized coordinates used is more than the minimum number necessary to describe the configuration of the system, and when (ii) we include particles with zero mass. Both conditions can be handled by using the new, explicit equations of motion. As illustrated in an example, the former situation may arise when a complex multi-body mechanical system is sub-structured into its component sub-systems. It is because of this that the new equation of motion developed here has immediate applicability to engineering systems.

The equation obtained herein leads to the following principle that is of considerable practical value in the modelling of complex multi-body systems met with in civil, mechanical and aerospace engineering where zero-mass particles generally do not occur, and in which we expect the equation of motion to be unique.

It *may be* appropriate to model a given complex mechanical system by using more than the minimum number of coordinates required to describe its configuration, pretending that these coordinates are independent, and therefore that the system is unconstrained. Doing this for complex systems will generally lead to a much simpler procedure for writing out Lagrange's equations for the unconstrained system. To model the given physical system properly, one must then add to these equations the requisite constraints between the redundant coordinates and treat the problem as one of constrained motion. The explicit equation describing the motion of the system is then given by (2.15). Whether the modelling procedure is appropriate or not—that is, whether the choice of coordinates and the corresponding constraints that are used in the mathematical formulation are suitable for correctly describing the dynamics—, is shown to be dictated by whether the matrix has full rank (see Remarks on Result 3). If has full rank, the correct, unique equations of motion will result, and the mathematical model will correctly describe the motion of the given multi-body system.

The methodology proposed herein allows complicated mechanical systems to be decomposed into smaller sub-systems that are suitably connected together through appropriate constraints to yield the composite system. The new equation can deal with all these constituent sub-systems, whether or not their mass matrices are singular, to obtain the explicit equation for the acceleration, , of the composite system in a simple, systematic and straightforward manner that is readily suitable for computer implementation. Hence, new ways of modelling complex mechanical systems, hereto not available, are opened up.

The general, explicit equation of motion obtained in this paper that is applicable to systems with singular mass matrices with general, holonomic and non-holonomic constraints that may or may not be ideal, appears to be first of a kind in classical mechanics. It is shown to reduce to the known and familiar explicit equations of motion (Udwadia & Kalaba 2001, 2002) when the mass matrices are restricted to being symmetric and positive definite.

## Footnotes

- Received February 10, 2005.
- Accepted January 6, 2006.

- © 2006 The Royal Society