An Explicit Formulation of Singularity-Free Dynamic Equations of Mechanical Systems in Lagrangian Form Part Two : Multibody Systems

This paper presents the explicit dynamic equations of multibody mechanical systems. This is the second paper on this topic. In the rst paper the dynamics of a single rigid body from the Boltzmann Hamel equations were derived. In this paper these results are extended to also include multibody systems. We show that when quasi-velocities are used, the part of the dynamic equations that appear from the partial derivatives of the system kinematics are identical to the single rigid body case, but in addition we get terms that come from the partial derivatives of the inertia matrix, which are not present in the single rigid body case. We present for the rst time the complete and correct derivation of multibody systems based on the Boltzmann Hamel formulation of the dynamics in Lagrangian form where local position and velocity variables are used in the derivation to obtain the singularity-free dynamic equations. The nal equations are written in global variables for both position and velocity.


Introduction
Multibody dynamics is a research field with many and diverse applications.The most common example of a multibody dynamical system is a robotic manipulator which consists of several links connected through joints and an admissible set of motions associated with each joint.The geometry of the links and the admissible motions of the joints characterize the motion of the robotic end effector.In this paper the dynamic equations of multibody systems based on a Lie theoretical approach will be derived and the main differences between multibody systems and single rigid bodies are pointed out.
Multibody systems are quite different from single rigid bodies.First of all the kinematics is more involved as the positions of the joints appear in the mapping from the joint velocities to the velocities of the links and end-effector.Kinematically the link positions and velocities are therefore coupled.This is different from single rigid bodies where the velocity space is not configuration dependent.It is important to note, however, that the joint positions and velocities are not coupled, i.e., the joint velocities are independent of the positions of the joint.Furthermore, on a kinematic level the joint velocity is also independent of all of all the other joint positions and velocities in the mechanism.This is always the case when using generalized coordinates or other similar sets of variables.We will use this property frequently when deriving the multibody dynamics.
Another difference-and an important one in dy-ISSN 1890-1328 c 2012 Norwegian Society of Automatic Control namic modeling-is the configuration-dependent inertia matrix.In other words, the kinetic energy does not only depend on the velocity state of the system, but also the positions of the bodies relative to each other.
A direct results of this is that the partial derivatives of the inertia matrix with respect to the joint variables do not disappear from the dynamics, which they did for single rigid body dynamics.In multibody dynamics several terms that do not arise in single body dynamics therefore appear in the dynamic equations.
Lie groups have been applied to represent the configuration space of mechanical systems by several researchers, for example Selig (2000); Park et al. (1995); Bullo and Lewis (2000); Arnold (1989); Bullo and Murray (1999); Murray et al. (1994).However, most formulations focus on single rigid bodies, and the extension to multibody systems is often dealt with using an abstract formulation of the dynamics without explicitly referring to what the specific equations look like, which is not always a straight forward derivation.In this paper we derive the dynamics of multibody systems with Lie group topologies, which needs to be treated somewhat differently from the single rigid body formulations.
This the the second paper on this topic.The first paper From (2012) derived the dynamic equations for single rigid bodies using the Boltzman-Hamel equations.In this paper this work is extended to multibody systems.The formulation is based on From (2012) where the single rigid body dynamics was derived and the explicit equations for several different configuration spaces were shown.In this paper we will show that when the dynamics is derived in terms of quasivelocities in this way we can simply pick the appropriate transformation from the dynamics of single rigid bodies that we found in From (2012) and stack these into one big block-diagonal matrix to obtain the multibody dynamics.The dynamic coupling will then arise naturally from the derivation.
In this paper we derive for the first time the correct explicit equations of multibody systems using the approach first presented in Duindam and Stramigioli (2007), and also used in Duindam and Stramigioli (2008), From et al. (2010a), From et al. (2010b), andFrom et al. (2011).In the next section we will see how to derive the dynamics of multibody systems and we point out the main differences from the single rigid body case.We will also show what the equations look like explicitly.

Multibody Dynamics
In this section the dynamics of multibody mechanical systems in terms of a general configuration vector x and velocity vector v are derived.Serial chains of rigid bodies only, for example robotic manipulators, are considered.We will see that the approach follows more or less the same reasoning as From (2012) but we also need to take into account the configuration-dependent inertia matrix and the kinematic and dynamic coupling between the rigid bodies in the system.We will therefore point out where these multibody terms arise in the equations.
We will write In this case we thus have n rigid bodies, or links, and N is the total dimension of the system, i.e., N = n i=1 dim v i .The kinetic energy of each link is given by where V S 0i is the velocity of link i in the spatial frame and Ad g is the adjoint transformation that transforms the spatial velocity to the body frame, denoted V B 0i .For a robotic manipulator with Euclidean joints we get the standard formulation of the kinetic energy of each link given by and thus for each link.J i (x) ẋ gives the velocity of link i in the spatial frame, denoted V S 0i , and J i (x) is the geometric Jacobian of link i.
The total kinetic energy of the multibody system is given by the sum of the kinetic energies of the mechanism links, that is, with M (x) the inertia matrix of the total system.We note that the inertia matrix depends on the configuration x of the multibody system, which is different from the single rigid body case presented in From (2012).
The mapping between the time derivative of the position variable ẋ and the velocity variable v is given by S(x) as (From, 2012) v = S(x) ẋ.
(5) This is the velocity transformation matrix, and is therefore singularity prone whenever the Euler angles appear in the transformation.For transformations with a Lie group topology we can also write the state space in terms of local variables, in which case the transformation is given by where and is the adjoint matrix defining the Lie bracket.We refer to Duindam and Stramigioli (2008) and From (2012) for more detail on local velocity and position variables.

Quasi-velocities
In this section we will use the relation in ( 5) to eliminate ẋ from the equations.The Lagrangian of the vehicle-manipulator system written in terms of this general configuration space is given by We will find the partial derivatives of the Lagrangian following the same train of thought as in From ( 2012), but applied to multibody systems.The derivatives of the Lagrangian in ( 9) for a configuration-dependent matrix M (x) are found with respect to v and x as We note that this is different from the single rigid body case presented in From (2012).
Using the relation v = S(x) ẋ we write the Lagrangian as a function of generalized coordinates and velocities as The dynamics is then found by Lagrange's equations as d dt for some B(x).To find the explicit equations we need the time derivatives of the Lagrangian L which are different from the single rigid body.We find the partial derivatives as This is an important result that we will use frequently so we write it as a proposition: Proposition 2.1.The partial derivative of a Lagrangian in the form can be expressed in terms of the Lagrangian Proof.The proof follows directly from Equations ( 15)-( 17).
We can thus conclude with the following proposition: Proposition 2.2.The partial derivatives of the Lagrangian L(x, ẋ) in ( 13) for multibody systems can be written in terms of the Lagrangian L(x, v) in ( 9) in the same way as for single rigid bodies.
Proof.We see this by comparing the expressions in (20-21) with the corresponding expressions in From ( 2012), which are identical.
This is a very strong result because it tells us that the dynamic equations of multibody systems have the same overall structure and form as for single rigid bodies.
The Euler-Lagrange equations are found by the partial derivatives of the Lagrangian L(x, ẋ) as The torques T are defined in the usual way so that they are collocated with To find the corresponding external forces that are collocated with ẋ we write and we have B(x) = S T (x) as expected.S(x) will be of the form for the general case with non-Euclidean transformations, and simply given by the identity matrix S(x) = I for Euclidean transformations.We note that we can simply stack the transformations of each joint in a block diagonal matrix representing the whole system.The reason that the velocity transformation matrix becomes block diagonal in this way is that the velocity transformation between two consecutive rigid bodies in a serial chain is kinematically independent of the positions and velocities of the other transformations.The best example of this is a serial robotic manipulator.For a robotic manipulator the matrices S i define coordinate transformations of the velocity variables of each joint in the chain, and should not be confused with the velocities of the links represented by the Jacobian J i which would not result in a block-diagonal matrix in this form, but rather a lower triangular matrix.We finally pre-multiply ( 22) with S −T (x) to get the required dynamic equations.The dynamic equations of a multibody system is then given by If we substitute the expressions in (10-12) into ( 25), the dynamics becomes where we recognize from From (2012).Note the terms that arise due to the configuration-dependent inertia matrix M (x) which were not present for single rigid bodies with a constant inertia matrix.
We would like to write the equations in terms of x and v = S(x) ẋ, but not with ẋ explicitly present in the equations.We can follow the same train of thought as we did for single rigid body systems, but we notice that two new terms arise in (26).These are terms that arise due to the dynamic coupling between the rigid bodies in the system.From the derivation of γ k we see, however, that this will not change the expression in ( 27) in any way, and we can use the expression for γ k that we found in From (2012) also for multibody systems.Thus, the terms with the partial derivatives of the velocity transformation matrix S(x) are identical to the single rigid body case.
It now only remains to look at the part of the Coriolis matrix that arises as a result of a configurationdependent inertia matrix.If we use that ẋl = k S −1 lk v k we first note that Ṁ (x) can be written as Further, we write the matrices S −T (x) and ∂ T M (x)v ∂x as and we obtain the required expression as We have found the dynamics of multibody systems without ẋ explicit in the equations and we can conclude with the following important result: Theorem 2.1.The dynamic equations of a multibody system with generalized coordinates x and quasivelocity coordinates v = S(x) ẋ can be written as where the inertia matrix is given by the Coriolis matrix is given by where and the potential forces are given by Proof.first multiply ( 27) with the inertia matrix: where we have used the expression for γ k that we found in From ( 2012), given by which we have already seen is the same for multibody systems.We rewrite ( 26) by substituting the multibody terms found in ( 28) and ( 32) and the kinematic terms in (39) into the dynamic equations in ( 26) and the expressions in ( 41) arise (see next page), which defines the matrices in the theorem.

Exponential Coordinates
In this section we will derive the dynamics of multibody systems in terms of the well-defined state variables Q i for position and v i for velocity.The velocity state is first written in terms of exponential coordinates ϕ and we take the partial derivative with respect to the local coordinates, evaluate at ϕ = 0 and the current configuration is found by the exponential map as Q = Φ( Q, ϕ) (From, 2012).The definition of the state variables adopted in this section is more general than in the previous sections because we do not force the state variables into a vector form.For position we write the state space in terms of the global configuration states Q = {Q 1 , Q 2 , . . ., Q n } where Q i denotes the configuration of rigid body i i.e., a matrix representation of SE(3) or one of its subgroups.For 1-DoF Euclidean links we can stack the joint positions in a vector q in the normal way, i.e., We can also write the velocity part of the state space as v = {v 1 , v 2 , . . ., v n } where v i is the velocity variable of rigid body i.For the velocity state we can choose the time derivative of the joint positions q as the velocity variable if the transformations are Euclidean, or else we will choose the velocity twist.
The Lagrangian is given in terms of the velocity variable v and the configuration-dependent inertia matrix M (Q) as In the previous section we found the dynamics of a general multibody system with state variables x and v.We also eliminated the time derivative of the position variable ẋ from the equations.We did this by introducing the velocity transformation matrix S(x).However, these kinds of transformations are not well-defined if we use the Euler angles to describe the orientation of one or more of the transformations described by x.In this section we use local state variables to eliminate these singularities.
We will now use local coordinates to find a singularity-free formulation of the dynamics.Locally the position variables can be written in terms of the exponential map as Φ(Q, ϕ) where ϕ is the local position variables in the vicinity of Q.
We can re-write the Lagrangian using the new variables ϕ and v as The partial derivatives of the Lagrangian then become which follows from Equations (10-12).We consider ϕ and φ as variables and would like to differentiate with respect to these, so we need the partial derivatives of the Lagrangian Lϕ (ϕ, φ) expressed in terms of the local coordinates ϕ and φ.Lϕ (ϕ, φ) can be written as From Proposition 2.1 we find the partial derivatives with respect to ϕ and φ as Substituting this into Lagrange's equations gives us the equations of motion in terms of local position and velocity variables ϕ and φ.To obtain the dynamics we first use the relation v = S(Q, ϕ) φ to eliminate the local velocity variables.We then eliminate the local position variables ϕ by representing the position as Φ( Q, ϕ) which, after differentiating and evaluating at ϕ = 0, takes us back to Q through the relation Q = Φ( Q, 0) (From, 2012).We then treat Q as a parameter during the derivation, but get the final equations in terms of the desired variables Q and v which gives us the following important result: Theorem 2.2.Consider a general multibody system with local position and velocity coordinates ϕ and φ and global position and velocity coordinates Q and v. Write the kinetic energy as K(v) = 1 2 v T M (Q)v with the inertia matrix M (Q).The dynamics of this system then satisfies where M is found in the normal way, with τ the vector of external and control wrenches (collocated with v), the matrix describing the Coriolis and centrifugal forces given by and the potential forces are given by To compute the matrix C(Q, v) for a single rigid body with configuration space SE(3) or one of its subgroups, we can use ( 8) to simplify C(Q, v) slightly to Proof.Recall that the velocity transformation matrix can be written as where ad X is the adjoint map for a general Lie algebra X of dimension m.Because the expressions are to be evaluated at ϕ = 0 this expression is non-zero only for the diagonal elements of S ij , i.e., i = j.We will start by writing the first part of the Coriolis matrix in (35) as The second part of the Coriolis matrix in (35) can be written as If we add the α and β terms in (35) we get the required expression for the Coriolis matrix of a general multibody mechanism as The final expressions are then given by (58-59).
We recognize the expressions in (55) as the Christoffel symbols.However, it is important to note that the formulation in (55) is more general than the standard formulation of the Christoffel symbols.The Christoffel symbols require the state space in generalized coordinates and corresponding generalized velocities (i.e., in vector form).The formulation in (55) is therefore more general because the dynamics can be derived in terms of the local coordinates and then substituted into global variables in a more general form.We therefore avoid many of the artifacts that normally arise in multibody dynamics when forcing the state space into a vector form in this way.
We can further reduce the number of summation indexes by one by following the mathematics in From (2012) and keeping in mind that the inertia matrix is not constant, which gives

Conclusion
In this paper we presented the singularity-free dynamic equations of a multibody system.The dynamics were derived from the Boltzmann-Hamel equations in local position and velocity coordinates to avoid singularities in the representation.Then, the global state variables were obtained from the differential properties of the Lie algebras.We have presented, for the first time the complete and correct derivation of the multibody dynamic equations in this form.We have also shown that the dynamics of a multibody system can be obtained by stacking the transformations of single rigid bodies in the appropriate way and that the dynamic coupling arises naturally through the derivation.