1 Radu Serban and Edward J. Haug Department of Mechanical Engineering The University of Iowa Iowa City, Iowa 52242–1000, USA ANALYTICAL DERIVATIVES FOR MULTIBODY SYSTEM ANALYSES ABSTRACT Analytical formulas for kinematic and kinetic derivatives needed in multibody system analyses are derived. A broad spectrum of problems, including implicit numerical integration, dynamic sensitivity analysis, and kinematic workspace analysis, require evaluation of first derivatives of generalized inertia and force expressions and at least three derivatives of algebraic constraint functions. In the setting of a formulation based on Cartesian generalized coordinates with Euler parameters for orientation, basic identities are developed that enable practical and efficient computation of all derivatives required for a large number of multibody mechanical system analyses. The formulation is verified through application to to a spatial slider crank mechanism and a 14 body vehicle model. Efficiency of computation using the expressions derived is compared with results obtained employing finite differences, showing significant computational advantage using the analytically derived expressions. 1 INTRODUCTION Three different areas of multibody system analysis are considered. The common requirement for numerical methods used in these types of analysis is the availability of higher order derivatives of both the differential equations of motion and of the algebraic constraint equations. The three types of analysis under consideration are as follows: (1) numerical implicit integration of the differential–algebraic equations (DAE) of motion for simulation of stiff mechanical systems; (2) dynamic sensitivity analysis for design optimization, parameter estimation, and model correlation; (3) kinematic workspace analysis of mechanisms. Next, each of these problems is shortly described and required derivatives for numerical solution are identified.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1
Radu Serban and Edward J. HaugDepartment of Mechanical EngineeringThe University of IowaIowa City, Iowa 52242–1000, USA
ANALYTICAL DERIVATIVES
FOR MULTIBODY SYSTEM ANALYSES
ABSTRACT
Analytical formulas for kinematic and kinetic derivatives needed in multibody system analyses are derived. A broad
spectrum of problems, including implicit numerical integration, dynamic sensitivity analysis, and kinematic workspace
analysis, require evaluation of first derivatives of generalized inertia and force expressions and at least three derivatives of
algebraic constraint functions. In the setting of a formulation based on Cartesian generalized coordinates with Euler
parameters for orientation, basic identities are developed that enable practical and efficient computation of all derivatives
required for a large number of multibody mechanical system analyses. The formulation is verified through application to to a
spatial slider crank mechanism and a 14 body vehicle model. Efficiency of computation using the expressions derived is
compared with results obtained employing finite differences, showing significant computational advantage using the
analytically derived expressions.
1 INTRODUCTION
Three different areas of multibody system analysis are considered. The common requirement for numerical methods used
in these types of analysis is the availability of higher order derivatives of both the differential equations of motion and of the
algebraic constraint equations. The three types of analysis under consideration are as follows:
(1) numerical implicit integration of the differential–algebraic equations (DAE) of motion for simulation of stiff
mechanical systems;
(2) dynamic sensitivity analysis for design optimization, parameter estimation, and model correlation;
(3) kinematic workspace analysis of mechanisms.
Next, each of these problems is shortly described and required derivatives for numerical solution are identified.
2
1.1 Kinematic and Dynamic Analysis
Two forms of equations that characterize the dynamics of a multibody system may be generated, (1) the state–space
representation and (2) the descriptor form. The minimal dimension state–space ordinary differential equation (ODE) form of
the equations of motion occurs when the multibody system is tree–configured and relative coordinates are used. The presence
of kinematic closed–loops results in a DAE form of the equations of motion, called the descriptor form. The focus here is on
the descriptor form, using Cartesian generalized coordinates (Haug, 1989).
For a system described by n generalized coordinates q and m constraint equations, the equations of motion can be written
in the descriptor form
M^
q..��
^ T
q� � Q^ (1)
associated with the algebraic constraint equations
�^
(q, t) � 0 (2)
where q, q. , and q.. are n� 1 vectors representing generalized positions, velocities, and accelerations; M
^(q) is the n� n
symmetric generalized inertia, or mass matrix; Q^
(q, q., t) is the n� 1 generalized force vector; � is the m� 1 vector of
Lagrange multipliers; and �^ q(q, t) � ���^ i(q, t)�qj� is the m� n constraint Jacobian matrix. It is assumed in this derivation that
the kinematic constraint Jacobian matrix has full row rank. Equations 1 and 2 thus represent an index–3 DAE (Brenan et al.,
1989).
The position constraints of Eq. 2 can be differentiated with respect to time to yield the kinematic velocity and acceleration
constraint equations,
�^
qq.��
^t � 0 (3)
�^
qq..� ��^ qq
. �qq.� 2�
^tqq
.��
^tt � 0 (4)
where subscript t denotes partial derivative with respect to time.
There are many methods for integrating the DAE of Eqs. 1 through 4. Discussions of such methods are presented by
Brenan et al. (1989), Hairer and Wanner (1996), and Potra (1994). Numerically stiff systems, which often arise due to
bushings and stiff compliant elements, require the use of implicit integration methods. Only these implicit methods exhibit the
required stability to deal with such systems (Haug et al., 1997a, 1997b). Regardless of which implicit integrator is used,
3
derivatives of all terms in Eqs. 1 through 4 with respect to both generalized coordinates and velocities are required. The
derivatives to be evaluated are as follows: �M^q..�
q, ��^ T
q��q
, Q^
q, Q^
q. , ��^ qq
. �q, ��^ qq
..�q, ���^ qq
. �qq. �
q
, ���^ qq. �
qq. �
q.
.
1.2 Dynamic Sensitivity Analysis
Numerous problems in multibody mechanical system analysis can be formulated as optimization problems with respect
to dynamic behavior of the system. A nonlinear programming problem must then be solved. Optimization algorithms are most
efficient if accurate derivative information is provided. Dynamic design sensitivity analysis of multibody systems thus
represents the link between optimization tools and modelling and simulation tools.
Two methods are commonly used to generate sensitivity information. The most straightforward approach is the direct
differentiation method, which differentiates the differential–algebraic equations of motion with respect to parameters
(Krishnaswami et. al., 1983; Chang and Nikravesh, 1985; Haug, 1987). The second method is the adjoint variable method, in
which sensitivities are obtained as solutions of differential–algebraic equations that are adjoint to the equations of motion. The
adjoint variable method has been extensively applied in both optimal control and optimal design (Haug and Ehle, 1982; Haug,
1987; Bestle and Eberhard, 1992; Bestle and Seybold, 1992). Both methods require derivatives of terms in the DAE of motion
with respect to parameters. Use of the chain rule of differentiation in both methods reduces this problem to finding derivatives
of these terms with respect to generalized states and velocities. Therefore, all derivatives noted above for implicit integration
of the equations of motion are needed to generate the sensitivity equations.
1.3 Workspace analysis
The problem of defining achievable sets in the output space of a mechanism is known as kinematic workspace analysis.
Domains of operation (accessible output, operational envelope), domains of interference, and domains of mobility can be
treated in a unified fashion (Haug et al., 1996). Most research has focused on describing mechanism workspaces by defining
their boundaries. Analytical conditions for workspace boundaries in special mechanisms have been used by a number of
authors (Tsai and Soni, 1981; Yang and Lee, 1983; Freudstein and Primerose, 1984). For general mechanisms, Litvin (1980)
used the implicit function theorem to obtain criteria for workspaces, relating them to singular configurations of mechanisms.
Analytical criteria and numerical methods for mapping boundaries of workspaces, using Jacobian matrix row rank deficiency
conditions, have been developed by Jo and Haug (1989), Wang and Wu (1993), Haug et al. (1996), and Adkins (1996). The
4
following quantities related to the kinematics of the underlying mechanism must be evaluated: ��^ T
q��q
, ���^ T
q��q
���
,
���^ T
q��q
��q
, ��^ q��q, where �, �, and � are vectors of appropriate dimension.
1.4 Choice of Generalized Coordinates
A common point of departure for many of the intended capabilities of a general multibody analysis tool is the ability to
obtain derivatives of both the differential equations of motion and the algebraic constraint equations. In modelling a multibody
system, the first important choice to be made is that of generalized coordinates to describe its position and motion. The
Cartesian coordinate formulation with Euler parameters for orientation is particularly attractive, from the point of view of
systematic analysis, because of the simple structure of the resulting equations. The form of the orientation matrix in terms of
Euler parameters yields bilinear forms in the Euler parameter vector p for constraint derivatives. Theoretically, this implies
that as many derivatives as desired can be taken. Advantages of Cartesian coordinates can be summarized as follows: (1) the
formulation yields simple forms of the coefficient matrices in the equations of motion, so constraint equations can be
generated in a consistent way; (2) the matrices involved are sparse; (3) position, velocity, and acceleration information for each
body is directly obtained; and (4) the constraints are established at a local level, in the sense that constraint equations for a
given joint involve only the coordinates of the two bodies that are connected by the joint. Therefore, the constraint equations
are independent of the complexity of the system.
1.5 Equations of Motion of Multibody Dynamics with Cartesian Coordinates
In Cartesian coordinates with Euler parameters for orientation, the equations of motion of Eqs. 1 and 2 are (Haug, 1989)
�M0 04GTJ�G��r
..
p..�� ��T
r
�Tp
0�
PTp�� � � FA
2GTn�A � 8G. T
J�G.p� (5)
�(r , p, t) � 0 (6)
�P(p) � 0 (7)
where M � diag{ miI 3} is a block–diagonal matrix containing the masses of the nb bodies, J� � diag{ J� i} is the block–diagonal
inertia matrix of the system, r � { r i} is the vector of body positions, p � { pi} is the vector of Euler parameters, FA is the vector
of applied forces, n�A is the vector of applied torques, G is a 3�4 matrix defined as G(p) � [� e,� e~ � e0I ] , and �P is the
vector of Euler parameter normalization constraints. Here, e~ is the 3�3 skew–symmetric matrix defined by
5
e~ ���
0e3
� e2
� e3
0e1
e2
� e1
0 �
(8)
As shown in this paper, a relatively small number of basic identities enables computation of all required derivatives of both
kinematic and kinetic terms arising in each of the analyses discussed above. Explicit forms for derivatives of basic quantities
are obtained. Therefore, this approach is expected to be more efficient than using automatic differentiation methods (Bischof et
al., 1996). When evaluating higher order derivatives, automatic differentiation codes differentiate a lower order derivative and
thus cannot take advantage of simplifying identities that may exist, such as Euler parameter normalization constraints.
2 BASIC IDENTITIES
Derivatives of expressions used as basic building blocks in generating required kinematic and kinetic derivatives are
obtained in this section. The identities derived are subsequently applied to obtain higher order derivatives of the constraint
equations and of common force elements. When using Cartesian coordinates with Euler parameters to model a multibody
system, the generalized inertia matrix has a simple block–diagonal form. Obtaining derivatives of terms involving this matrix
is therefore straightforward.
In the Cartesian coordinate formulation, dependencies on states, velocities, and parameters that appear in the coefficients
of the DAE of motion are well defined. The most complicated terms are those involving the Jacobian of the constraint
equations. Derivatives with respect to Euler parameters are the principal focus, since dependency on position vectors is
straightforward.
A quantity that arises in many terms of interest is representation of a body–fixed vector relative to the global reference
frame. Let a be a constant body–fixed vector, represented in the body reference frame, and let p � �e0; eT�T be the vector of
Euler parameters that defines the orientation of the body reference frame relative to a global reference frame. Then, the
orientation transformation matrix is (Haug, 1989)
A(p) � (2e20 � 1)I � 2(eeT � e0e
~) (9)
and the global representation of the body–fixed vector a is
a � A(p)a � (2e20 � 1)a � 2(eeTa � e0e
~a) (10)
The derivative of this quantity with respect to the vector of Euler parameters is given by the following sequence of operations:
As a direct consequence of these commutativity properties, the following result is obtained:
��pi
B(pi, a�)pj� � �
�pi
B(pj, a�)pi� � B(pj, a�) (19)
Calculation of the derivative of BT(p, a�)� with respect to p is also required. Note, from Eq. 14, that
B^ T
(p, a�)� � � a�T(e0I � e~)�
a�eT�� a�
~(e0I � e~)�
� (20)
The derivative of this expression with respect to the Euler parameter e0 is
��e0B^ T
(p, a�)�� � �a�T�
a�~�� (21)
7
while the derivative with respect to the Euler parameter subvector e is
��e�B^ T
(p, a )�� � � a T�~
a �T � a ~�~� (22)
Collecting terms from Eqs. 21 and 22,
��p�B^ T
(p, a )�� � �a T�
a ~�
a T�~
a �T � a ~�~� (23)
Using the result of Eq. 23, together with the definition of Eq. 15,
��p
�BT(p, a )�� � 2 ��p�pa T
�� � ��p�B^ T
(p, a )�� � D(a , �) (24)
where the matrix D(a , �) is defined as
D(a , �) � 2�2a T�
a ~�
a T�~
a T�I � a �T � a
~�~� � 2�2a T
�
a ~�
a T�~
a ~�~ � �
~a ~� 2a T
�I� (25)
The final form of Eq. 25 shows that D is symmetric, since �a T�~�T � �
~Ta � � �
~a � a ~�.
3 KINEMATIC CONSTRAINT FORMULATION
Consider the pair of bodies shown in Fig. 1, denoted bodies i and j. Let the generalized coordinate vector corresponding to
the pair of bodies be qij � �r Ti , pT
i , r Tj , pT
j�T � �
14, where r i and r j are 3�1 vectors that locate the origins of the body reference
frames relative to the origin of the global reference frame and pi and pj are 4�1 vectors of Euler parameters that define body
reference frame orientations. Let si be a vector fixed in body i, so si � A(pi)si is its representation in the global frame. Define
sj and sj in a similar fashion. Finally, let dij � r j � A jsj � r i � A isi define the vector between points Pi and Pj on bodies i and
j, respectively, expressed in the global frame.
Four basic conditions on vectors in and between pairs of bodies can be defined, to serve as building blocks for a library of
kinematic constraints between bodies (Haug, 1989). These four conditions are as follows:
(1) orthogonality of a pair of body–fixed vectors si and sj on bodies i and j (DOT–1 constraint),
�d1 � sT
i sj � sTj si � 0 (26)
(2) orthogonality of a body–fixed vector ai on body i and a vector dij between bodies i and j (DOT–2 constraint),
�d2 � aT
i dij � dTijai � 0 (27)
8
(3) fixed distance between points Pi on body i and Pj on body j (Distance constraint),
�ss� dT
ijdij � C2 � dTjidji � C2 � 0 (28)
(4) coincidence of points Pi on body i and Pj on body j (Spherical constraint),
�s � r j � sj � r i � si � 0 (29)
Most kinematic constraints that are encountered in applications can be described in terms of one or more of the above
conditions.
A ball and socket joint (or spherical joint) is defined by the condition that the centers of the ball and of the socket coincide
and is thus equivalent to a basic spherical constraint. The revolute joint of Fig. 2 allows one rotational degree of freedom about
a common axis fixed in bodies i and j and no relative translation along this axis. The five constraint equations that describe this
joint can be written in terms of basic constraints as
�s(Pi, Pj) � 0
�d1(f i, hj) � 0
�d1(gi, hj) � 0
30
The universal joint of Fig. 3 permits relative rotations about two orthogonal axes fixed in the bodies connected. It is describedby the conditions that points Pi on body i and Pj on body j coincide and that the vectors hi and hj are perpendicular. This can bewritten as the following four constraint equations:
�s(Pi, Pj) � 0
�d1(hi, hj) � 0
31
The translational joint of Fig. 4 has one relative translational degree of freedom along a common axis fixed in the bodiesconnected. It is defined by five constraint equations. In terms of basic constraint these are
�d1(gi, hj) � 0
�d1(f i, f j) � 0
�d1(f i, hj) � 0
�d2(gi, dij) � 0
�d2(f i, dij) � 0
32
In a similar way other commonly used physical joints, e.g., cylindrical, screw, or composite joints, can be described in
terms of the four previously defined basic constraints.
In addition to joint kinematic constraints, the Euler parameter normalization constraint,
�Pi � pT
i pi � 1 � 0 (33)
must be enforced for each body in the system.
9
4 DERIVATIVES OF KINEMATIC CONSTRAINT EXPRESSIONS
With the formulas derived in Section 2, basic constraint equations and their derivatives can be evaluated. A detailed
derivation of derivatives for the spherical constraint is presented here. Derivatives of the other three basic constraints, using the
same approach, are presented in Appendix A.
4.1 Spherical Constraint
Derivatives of �s in Eq. 29 with respect to components of qij are obtained, using Eq. 16, as
��r i
�s � � I
��r j
�s � I
��pi
�s � � B(pi, si)
��pj
�s � B(pj, sj)
(34)
With the above relations, the derivative of �s with respect to qij , with the superscripts i and j suppressed for notational
convenience, becomes
�sq � �� I ,� B(pi, si), I , B(pj, sj)� (35)
Consider next the product
�sq� � � �
1 � B(pi, si)�2 � �3 � B(pj, sj)�4 (36)
where � is a 14�1 vector, partitioned as �T � ��1T,�2T
,�3T,�4T�.
Using the identity of Eq. 18, note that
�sq� � � �
1 � B(�2, si)pi � �3 � B(�4, sj)pj (37)
In this form, the derivative ��sq�q is
��sq�q � �0,� B(�2, si), 0, B(�4, sj)� (38)
With �T � ��1T, �2T
, �3T, �4T� � �
14, the product ��sq�q� is
��sq�q� � � B(�2, si)�2 � B(�4, sj)�4 (39)
Since this quantity does not depend on q, its derivative with respect to q is zero; i.e,
���sq�q�q
� 0 (40)
10
For � � � � q. , consider the quantity
��sqq
. �qq.� � B(p
.i, si)p
.i � B(p
.j, sj)p
.j (41)
Its derivative with respect to q. is
���sqq
. �qq. �
q.� �0,� 2B(p
.i, si), 0, 2B(p
.j, sj)� (42)
Let � � �3. Then,
��sq�
T� ��
�
� �
� BT(pi, si)��
BT(pj, sj)�
�(43)
Using Eq. 24,
���sq�
T��
q��
�
0000
0� D(si, �)
00
0000
000
D(sj, �)
�(44)
4.2 Euler Parameter Normalization Constraint
The components of the Euler parameter vector pi used to define the orientation of body i are not independent. They are
constrained by the relation
�Pi � pT
i pi � 1 � 0 (45)
The derivative of this expression with respect to qi � �r Ti , pT
i�T is simply
��Pi�qi� �0; 2pT
i� (46)
Consider next the product �Pi �, with � � ��1T
,�2T�T
� �3�4. The derivative of this quantity with respect to qi is
��Pi ��qi� �0, 2�2T� (47)
The derivative of the product �PTi � with respect to qi is
��PTi ��
qi� ��00 0
2I 4� (48)
Derivatives of the right side of the Euler parameter acceleration constraint are computed as
11
����Pi�qiq.
i�
qi
q.
i�qi
� 0 (49)
and
����Pi�qiq.
i�
qi
q.
i�q.
i
� �0, 4p. T
i� 50
5 DERIVATIVES OF GENERALIZED INERTIA MATRIX
As Eq. 5 shows, dependency of the generalized inertia matrix on Euler parameters occurs only through the matrix G(p).
For body i, the derivative of GT(pi)J iG(pi)p..
i with respect to pi must be evaluated. This quantity can be written as
GTi J iG ip
..i � � � eT
i
e~ i � ei0I� � J i[� ei,� e~ i � ei0I ]�e
..i0
e..
i� (51)
Direct calculation shows that
G(pi)pj � � G(pj)pi (52)
for any 4�1 vectors pi and pj. As a direct consequence,
�G(pi)pj�
pi� � G(pj) (53)
For any 3�1 vector x, the derivative of the product GT(pi)x with respect to pi is obtained as
(GT(pi)x)pi� x� (54)
where the matrix x� is defined as (Nikravesh, 1988)
x� � �0x � xT
� x~ � (55)
Using Eqs. 53 and 54, the derivative �GT(pi)J iG(pi)p..
i�pi is obtained as
�GT(pi)J iG(pi)p..
i�pi� � GT(pi)J iG(p
..i) � �J iG(pi)p
..i�� (56)
6 DERIVATIVES OF GENERALIZED FORCES
Dynamic and sensitivity analyses require derivatives of generalized force with respect to generalized coordinates and their
time derivatives. For the generalized force vector Q(q, q.), the quantities Qq and Qq
. are calculated in this section.
12
6.1 Derivatives of Coriolis Terms
Consider the term GT(p.
i)J� iG(p.
i)pi in Eq. 5. Its derivative with respect to pi is
�GT(p.
i)J� iG(p.
i)pi�pi� GT(p
.i)J� iG(p
.i) (57)
while its derivative with respect to p.
i is obtained, similar to Eq. 56, as
�GT(p.
i)J� iG(p.
i)pi�p.
i� GT(p
.i)J� iG(pi) � �J� iG(p
.i)pi
�� (58)
6.2 TSDA Generalized Force
Derivatives of the generalized force corresponding to a translational spring–damper–actuator (TSDA) are derived here.
Results for a rotational spring–damper–actuator (RSDA) are given in Appendix B. The TSDA force element of Fig. 5
consists of a spring (k), a damper (c), and a force actuator (F). It exerts forces on the bodies that are directed along the vector
between points Pi and Pj.
The virtual work of the TSDA force is
�w � � f�l (59)
where the TSDA force, tension taken as positive, is
f � k(l � l 0) � cl.� F (60)
The length l >0 of the TSDA is given by
l 2 � dTijdij (61)
where dij � r j � sj � r i � si is the vector from Pi to Pj. The variation of l is then given by
�l �dT
ij
l��r j � B(pj, s� j)�pj � �r i � B(pi, s� i)�pi
� (62)
where Eq. 16 has been used. Substituting this expression into Eq. 59 and identifying the coefficients of virtual displacements
and variations in Euler parameters, the TSDA generalized forces acting on bodies i and j are
Q i �fl� dij
BT(pi, s� i)dij�
Q j � �fl� dij
BT(pj, s� j)dij�
(63)
13
The focus here is on derivatives of Q i. Derivatives of Q j are obtained in a similar fashion. The generalized force Q i acting
on body i is rewritten as Q i � �QF
QN�, where QF � (f�l)dij is the linear TSDA generalized force and QN � (f�l)BT(pi, si)dij is the
angular TSDA generalized force.
6.2.1 Derivatives of TSDA Generalized Force with Respect to Generalized Coordinates
Derivatives of the components of Q i of Eq. 60 with respect to q are
QFq � dij�fl�
q
�fl�dij
�q
(64)
QNq � BT(pi, s i)dij�fl�
q
�fl�BT(pi, s i)dij
�q
(65)
Since
�BT(pi, s i)dij�
q� BT(pi, s i)�dij
�q� �0 ; D(s i, dij) ; 0 ; 0� 66
Eq. 65 can be rewritten as
QNq � BT(pi, s i)QF
q ��fl��0 ; D(s i, dij) ; 0 ; 0� (67)
The derivative of f�l with respect to q is
�fl�
q
� 1l 2��k� f
l�ll q � cll
.
q� (68)
where ll q � dTij�dij�q, ll
.
q � dTijvq ��vT � l
.
ldT
ij��dij�q, v � d
.
ij, �dij�
q� �� I ,� B(pi, s i), I , B(pj, s j)�, and
vq � �� 0,� B(p.
i, s i), 0, B(p.
j, s j)�.
With the notation
N1 � �k� fl� c l
.
l�dijdT
ij
l 2 � cdijvT
l 2 �flI (69)
N2 � cdijdT
ij
l 2 (70)
the derivatives of QF � (f�l)dij and QN � (f�l)BT(pi, si)dij with respect to q can be expressed in compact form as