You are on page 1of 30

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/311941348

An Index 0 Differential-Algebraic Equation Formulation for Multibody


Dynamics: Nonholonomic Constraints

Article  in  Mechanics Based Design of Structures and Machines · December 2016


DOI: 10.1080/15397734.2016.1273783

CITATION READS

1 166

1 author:

Edward Haug

272 PUBLICATIONS   8,050 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Computational Methods in Mechanical System Dynamics View project

All content following this page was uploaded by Edward Haug on 06 October 2017.

The user has requested enhancement of the downloaded file.


Mechanics Based Design of Structures and Machines
An International Journal

ISSN: 1539-7734 (Print) 1539-7742 (Online) Journal homepage: http://www.tandfonline.com/loi/lmbd20

An index 0 differential-algebraic equation


formulation for multibody dynamics:
Nonholonomic constraints

Edward J. Haug

To cite this article: Edward J. Haug (2016): An index 0 differential-algebraic equation


formulation for multibody dynamics: Nonholonomic constraints, Mechanics Based Design of
Structures and Machines, DOI: 10.1080/15397734.2016.1273783

To link to this article: http://dx.doi.org/10.1080/15397734.2016.1273783

Accepted author version posted online: 27


Dec 2016.
Published online: 27 Dec 2016.

Submit your article to this journal

Article views: 23

View related articles

View Crossmark data

Full Terms & Conditions of access and use can be found at


http://www.tandfonline.com/action/journalInformation?journalCode=lmbd20

Download by: [Edward Haug] Date: 01 February 2017, At: 14:07


MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES
http://dx.doi.org/10.1080/15397734.2016.1273783

An index 0 differential-algebraic equation formulation for


multibody dynamics: Nonholonomic constraints
Edward J. Haug
Department of Mechanical Engineering, The University of Iowa, Iowa City, IA, USA

ABSTRACT ARTICLE HISTORY


A method is presented for formulating and numerically integrating index 0 Received 28 October 2016
differential-algebraic equations of motion for multibody systems with holo- Revised 12 December 2016
nomic and nonholonomic constraints. Tangent space coordinates are defined Accepted 14 December 2016
in configuration and velocity spaces as independent generalized coordinates KEYWORDS
that serve as state variables in the formulation. Orthogonal dependent coor- Dynamics of machines;
dinates and velocities are used to enforce position, velocity, and acceleration multirigid body dynamics;
constraints to within specified error tolerances. Explicit and implicit numerical numerical methods in
integration algorithms are presented and used in solution of three examples: dynamics
one planar and two spatial. Numerical results verify that accurate results are
obtained, satisfying all three forms of kinematic constraint to within error
tolerances embedded in the formulation.

1. Introduction
An index 0 differential-algebraic equation (DAE) formulation is presented for multibody dynamic
 T
systems that are modeled using a set of n generalized coordinates q = q1 q2 · · · qn , subject to nh < n
holonomic constraints,
    T
8 q, t = 81 q, t , 82 q, t , . . . , 8nh q, t =0 (1)
and nd nonholonomic constraints; i.e., differential constraints, with n − nh > nd ≥ 1,
E1 (q, t)
 

E(q, t)q̇ = 
 .. 
 q̇ = e(q, t) (2)
 . 
End (q, t)
where Ei (q, t) are 1 × n vector functions. Functions making up the constraints of Eqs. (1) and (2) are
assumed to have
h i two continuous derivatives. The nh × n holonomic constraint Jacobian matrix
at least
8q (q, t) ≡ ∂8i /∂qj and the nd × n matrix E(q, t) are required to have full row rank. Furthermore,
their rows must be mutually independent; i.e., the matrix
" #
8q (q, t)
C(q, t) ≡ (3)
E(q, t)
must have full row rank for all (q, t) that satisfy Eqs. (1) and (2).

CONTACT Edward J. Haug, Carver Distinguished Professor Emeritus echaug@gmail.com Carver Distinguished Professor
Emeritus, Department of Mechanical Engineering, The University of Iowa, Iowa City, IA, USA.
Communicated by Bahram Ravani.
© 2017 Taylor & Francis
2 E. J. HAUG

Velocity and acceleration equations associated with the holonomic constraints of Eq. (1) are
8q (q, t)q̇ = −8t (q, t) ≡ ν h (q, t)
  (4)
8q (q, t)q̈ = − 8q (q, t)q̇ˆ q̇ − 28tq (q, t)q̇ − 8tt (q, t) ≡ −γ h (q, q̇, t)
q

and the acceleration equation associated with Eq. (2) is


 
E(q, t)q̈ = eq (q, t)q̇ + et (q, t) − E(q, t)q̇ˆ q̇ − Et (q, t)q̇ ≡ −γ nh (q, q̇, t) (5)
q

Combined, the first of Eqs. (4) and (2) comprise system velocity constraints,
" #
ν h (q, t)
C(q, t)q̇ = ≡ ν(q, t) (6)
e(q, t)
and the second of Eqs. (4) and (5) comprise system acceleration constraints,
" #
−γ h (q, q̇, t)
C(q, t)q̈ = = −γ (q, q̇, t) (7)
−γ nh (q, q̇, t)
where
   
8q (q, t)q̇ˆ q̇ + 28tq (q, t)q̇ + 8tt (q, t)
q
γ ≡  (8)
  
ˆ

E(q, t)q̇ q̇ + Et (q, t)q̇ − eq (q, t)q̇ − et (q, t)
q

As in Haug (2016, 2017), a configuration tangent space formulation is defined that uses vectors in the
null space of the holonomic constraint Jacobian 8q (q0 , t0 ) at the initial time to span the tangent space
of the configuration constraint manifold defined by Eq. (1). These vectors and columns of 8Tq (q0 , t0 )
span the configuration space Rn . Coefficients of the spanning vectors are configuration generalized
coordinates that are required to satisfy Eq. (1). In contrast with the holonomic case, in the nonholonomic
case treated here with differential constraints of Eq. (2), the parameterization of configuration space
cannot represent system velocities. To overcome this difficulty, a velocity tangent space formulation is
defined that uses vectors in the null space of the matrix C(q0 , t0 ) of Eq. (3) at the initial time that span
the tangent space of the velocity constraint manifold defined by Eq. (6) and columns of CT (q0 , t0 ) to
span velocity space Rn . Coefficients of the spanning vectors are velocity generalized coordinates that are
required to satisfy Eq. (6), and their derivatives are required to satisfy Eq. (7).
As in a prior development for holonomic systems (Haug, 2016), the index 3 Lagrange multiplier
formulation of constrained equations of motion is transformed to a system of index 0 DAE in tangent
space generalized coordinates that satisfy Eqs. (1), (6), and (7) to within specified tolerances. Unlike the
case of holonomic constraints that lead to second order ordinary differential equations (ODE) (Haug,
2017), two coupled sets of first order equations are obtained; (i) kinematic equations satisfying Eq. (1)
and (ii) kinetic equations satisfying Eqs. (6) and (7) and the equations of motion.
Literature relevant to computational methods for holonomic and some nonholonomic systems is
cited in (Haug, 2016, 2017). The very sparse literature specifically focused on computational methods
for nonholonomic systems is summarized in this section. Saha and Angeles (1991) use orthogonal
complements of the matrix C of Eq. (3) to span the velocity tangent space and introduce local
coordinates based on time varying orthogonal complement matrices. Second order differential equations
are obtained by multiplying the Lagrange multiplier form of the equations of motion by an orthogonal
complement matrix. These equations are integrated, without a mechanism to assure that configuration
and acceleration constraints are satisfied. Further, the time dependent orthogonal complement matrix
and its first derivative must be evaluated at each time step, a compute intense calculation. Betsch
(2004) uses ODE integration formulas to discretize the Lagrange multiplier form of the equations of
motion for nonholonomic systems and multiplies by an orthogonal complement matrix to annihilate
MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES 3

Lagrange multipliers. The resulting algebraic equations are then solved numerically, without provision
for satisfying constraint equations.
The most extensive contribution to theoretical and computational methods for nonholonomic
systems is by Rabier and Rheinboldt (2000, 2002). Existence theory for the equations of motion for
nonholonomic systems and an outline of manifold based computational methods for their solution is
presented in the 2000 monograph. A more comprehensive theory and computational approaches for a
range of DAE, including nonholonomic systems, is presented in the extensive 2002 article. A broadly
applicable local parameterization approach that enables application of established ODE numerical
solution methods for solution of DAE is outlined. This local parameterization concept is the foundation
for the development presented herein.
Schiehlen and Eismann (1994) present a concise formulation for dynamics of nonholonomic systems,
assuming that configuration and velocity coordinates can be explicitly written in terms of independent
generalized coordinates. The result is a coupled system of first-order kinematic and kinetic differential
equations that govern dynamics of systems considered. The development presented in Haug (2017)
arrives at comparable systems of first order kinematic and kinetic differential equations, without
assuming existence of explicit parameterizations of configuration and velocity coordinates in terms of
independent generalized coordinates.
The ODE formulation presented in Haug (2017) is well suited for explicit numerical integration
methods, but contains intricate expressions that make implementation of implicit numerical integration
algorithms difficult. The index 0 DAE formulation presented herein enables practical implementation
of both explicit and implicit numerical integration algorithms.
The paper is organized as follows. Tangent space parameterizations of configuration and velocity
spaces are presented in Section 2, satisfying both holonomic and nonholonomic constraints. A system
of index 0 DAE is derived in Section 3 that includes (i) first-order kinematic equations in configu-
ration generalized coordinates and (ii) first-order kinetic equations of motion in velocity generalized
coordinates. A numerical algorithm is presented in Section 4 for integrating the equations of motion
using explicit numerical integration algorithms. Derivatives required for implicit numerical integration
of the index 0 DAE are presented in Section 5. Trapezoidal and singly diagonal Runge–Kutta (SDIRK)
implicit algorithms for numerical solution are presented in Section 6. Three examples are presented in
Sections 7–9, a planar two chassis articulated vehicle with wheels that roll without slip and two spatial
systems, including roll without slip of a disk on a horizontal surface and a three-wheel motorcycle whose
wheels roll without slip. Conclusions are presented in Section 10. Euler parameter identities used in the
paper are summarized in Appendix B of the companion paper (Haug, 2016).

2. Tangent space generalized coordinates


2.1. Configuration tangent space parameterization
Parameterization of the configuration space is identical to that presented in (Haug, 2016, 2017) and is
only summarized here. The tangent space for holonomic constraints of Eq. (1) is the null space of the
constraint Jacobian 8q (q0 , t0 ) at a point (q0 , t0 ) that satisfies Eq. (1). A basis for the null space is provided
by the orthogonal columns of a matrix V that defines the null space of 8q (q0 , t0 ); i.e.,
8q (q0 , t0 )V = 0
(9)
VT V = I
Such a matrix can be obtained using singular value decomposition of 8Tq (q0 , t0 ) (Atkinson, 1989). Since
the constraint Jacobian 8q (q0 , t0 ) must have full rank for independent constraint equations, the columns
of V and columns of the matrix
U ≡ 8Tq (q0 , t0 ) (10)
4 E. J. HAUG

span configuration space Rn ; i.e., every generalized coordinate vector can be uniquely represented as
q = q0 + Vv − Uu (11)
Further, from Eqs. (9) and (10), UT V = 0. The vectors v and u are local generalized coordinates that
are equivalent to q in a neighborhood of (q0 , t0 ) (Haug, 2016, 2017). Multiplying Eq. (11) by V and U,
−1
v = VT (q − q0 ) and u = − UT U q − q0 . Thus,


v0 = 0
(12)
u0 = 0
Since 8q (q0 , t0 )8Tq (q0 , t0 ) is nonsingular and 8q (q, t) is continuous, 8q (q, t)8Tq (q0 , t0 ) = 8q (q, t)U is
nonsingular in a neighborhood of (q0 , t0 ). It is thus meaningful to define
−1
B(q, t) ≡ 8q (q, t)U (13)
To be kinematically admissible, the vector q of Eq. (11) must satisfy Eq. (1); i.e.,
8(q0 + Vv − Uu, t) = 0 (14)
The Jacobian of the expression on the left with respect to u is −8q U = −B−1 ,
so it is nonsingular
and the implicit function theorem (Corwin and Szczarba, 1982) guarantees that Eq. (14) has a unique
solution
u = h(v, t) (15)
in a neighborhood of (v0 , t0 ). To calculate the derivative of u; i.e., h(v, t), with respect to v, the derivative
of Eq. (14) with respect to v is 8q (V − Uuv ) = 0. Using Eq. (13),
uv = B8q V = hv (v, t) (16)
Since Eq. (14) is nonlinear, a closed form solution for u, hence h(v, t), is generally not possible.
However, h(v, t) can be accurately evaluated by numerical solution of Eq. (14) for u, using Newton–
Raphson iteration; i.e., −8q U1ui = −B−1 1ui = −8(q0 + Vv − Uui , t). Using Eq. (13), this reduces
to
1ui = B8(q0 + Vv − Uui , t)
(17)
ui+1 = ui + 1ui , i = 1, 2, . . . until k8k ≤ utol
This is an efficient calculation, requiring only multiplication by B at each iteration.
Substituting the solution of Eq. (17) as u = h(v, t) into Eq. (11),
q = q0 + Vv − Uh(v, t) (18)
By construction, q of Eq. (18) satisfies the configuration constraints of Eq. (1), for any generalized
coordinate vector v in a neighborhood of v0 .
Since B is a function of q and t, it can be determined iteratively by solving an equation equivalent to
Eq. (13),
8q (q, t)UB − I = 0 (19)
i i
  
using Newton–Raphson iteration; i.e., 8q (q, t)U 1B = − 8q (q, t)UB − I . Since 8q (q, t)U ≈
−1
Bi and Newton–Raphson iteration does not require an exact Jacobian,
1Bi = −Bi 8q (q, t)UBi + Bi
(20)
Bi+1 = Bi + 1Bi ,

i = 1, 2, . . . until 8q (q, t)UB − I ≤ Btol
This is an efficient calculation, requiring only multiplication by Bi at each iteration.
MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES 5

Since V and U are constant,


q̇ = Vv̇ − Uu̇ (21)
and using the fact that V is orthogonal and VT U = 0,
v̇ = VT q̇ (22)

2.2. Velocity tangent space parameterization


The tangent space for the velocity constraint of Eq. (6) at (q0 , t0 ) is spanned by the orthonormal columns
of a matrix W that defines the null space of C0 ≡ C(q0 , t0 ); i.e.,
C(q0 , t0 )W = 0
(23)
WT W = I
Expanding Eq. (23), using the definition of Eq. (3), 80q W = 0 and E0 W = 0. Thus, the columns of W
are a subset of the space spanned by the columns of V; i.e., W = VZ, where Z is an n − nh × n − nh − nd
orthogonal matrix. Thus, E0 VZ = 0 and Z may be determined using singular value decomposition of
T
E0 V , which is more efficient than a singular value decomposition of C0T . To confirm that W obtained
in this way is orthogonal, note that WT W = ZT VT VZ = ZT Z = I.
Since the columns of W are orthogonal to the linearly independent columns of C0T , the columns of
W and C0T span Rn . Defining
X ≡ C0T (24)
by Eq. (23), XT W = 0 and every vector q̇ in Rn may be uniquely written in the form
q̇ = q̇0 + Ww − Xx (25)
where w and x are local velocity generalized coordinates. Multiplying Eq. (25) by WT and XT , Eq. (23)
−1
yields w = WT q̇ − q̇0 and x = − XT X X q̇ − q̇0 , so
 

w0 = 0
(26)
x0 = 0
Since C0 has full rank, C0 C0T is nonsingular and C(q, t) is continuous, so C(q, t)C0T = C(q, t)X is
nonsingular in a neighborhood of (q0 , t0 ). Thus, define
−1
H(q, t) ≡ C(q, t)X (27)
in a neighborhood of (q0 , t0 ). As in the case of matrix B of Eq. (13), H satisfies
C(q, t)XH(q, t) − I = 0 (28)
and can be evaluated using the iterative process of Eq. (20); i.e.,
1Hi = −Hi C(q, t)XHi + Hi
(29)
Hi+1 = Hi + 1Hi , i = 1, 2, . . . until C(q, t)C0T H(q, t) − I ≤ Htol

This is an efficient calculation, requiring only multiplication by Hi at each iteration.


Substituting Eq. (25) into Eq. (6), Cq̇0 + CWw − CXx = ν. Using Eq. (27), this yields x = HCWw +
HCq̇0 − Hν. Substituting this result into Eq. (25),
q̇ = Dw + (I − XHC) q̇0 + XHν (30)
where
D ≡ (I − XHC) W (31)
6 E. J. HAUG

The vector q̇ of Eq. (30) satisfies the system velocity constraints of Eq. (6), for any velocity generalized
coordinate vector w.
Differentiating Eq. (25) with respect to time, recalling that W and X are constant,
q̈ = Wẇ − Xẋ (32)
Substituting this into Eq. (7), CWẇ − CXẋ = −γ . Using Eq. (27), ẋ = HCWẇ + Hγ . Substituting this
result into Eq. (32),
q̈ = Wẇ − X (HCWẇ + Hγ ) = Dẇ − XHγ (33)
The vector q̈ of Eq. (33) satisfies the system acceleration constraints of Eq. (7), for any acceleration
generalized coordinate vector ẇ.
Equation (22), taken with Eq. (30) and substituting q of Eq. (18) in arguments of functions involved,
is a kinematic differential equation that couples configuration and velocity spaces; i.e.,
v̇ = VT D(v, t)w + VT (I − XH(v, t)C(v, t))q̇0 + VT XH(v, t)ν(v, t) (34)

3. Index 0 DAE in tangent space generalized coordinates


The index 3 (Ascher and Petzold, 1998) Lagrange multiplier form of equations of motion for a multibody
system is (Neimark and Fufaev, 1972; Haug, 1989)
M(q)q̈ + CT (q)λ = S(q, q̇) + QA (q, q̇, t)
8(q, t) = 0 (35)
E(q, t)q̇ = e(q, t)
Substituting from Eqs. (18), (30), and (33), this is
M(v, t)D(v, t)ẇ + CT (v, t)λ = M(v, t)XH(v, t)γ (v, w, t) + S(v, w, t) + QA (v, w, t) (36)
With arguments shown and defining λ = µ̇, Eqs. (34) and (36) comprise a system of first order ODE,
equivalently an index 0 DAE (Ascher and Petzold, 1998). Since µ̇ will be treated as an algebraic variable
in what follows, retaining the notation λ does not change the solutions of the equations. Thus, Eqs. (34)
and (36) will be referred to as an index 0 DAE. Suppressing arguments of functions in Eqs. (34) and (36),
for notational convenience, the index 0 DAE is
v̇ = VT Dw + VT (I − XHC)q̇0 + VT XHν
(37)
MDẇ + CT λ = MXHγ + S + QA
Writing Eq. (37) in matrix form,
 
" # v̇ " #
I 0 0   VT Dw + VT (I − XHC)q̇0 + VT XHν
 ẇ  = (38)
0 MD CT   MXHγ + S + QA
λ
it is clear that for existence of a unique solution, the coefficient matrix on the left must be nonsingular.
At a parameterization point (q0 , t0 ) that satisfies Eqs. (1), (23) and (31) show that D0 = W. To show that
the coefficient matrix on the left of Eq. (38) at (q0 , t0 ), with D0 = W and C0T = X, is nonsingular, set
 
" # α
I 0 0  
β  = 0 (39)
0 MW X  
δ
MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES 7

If this equation holds only for α = 0, β = 0, and δ = 0, then the coefficient matrix at (q0 , t0 ) is
nonsingular. The first row of Eq. (39) is simply α = 0 and the second row is MWβ +Xδ = 0. Multiplying
on the left by WT , WT MWβ + WT Xδ = WT MWβ = 0. Since M is positive definite on the null space
of C (Haug, 1989), the matrix WT MW is positive definite and β = 0. Equation (39) thus reduces to
Xδ = 0 and, since X has full column rank, δ = 0. This shows that the coefficient matrix on the left of
Eq. (38) is nonsingular at (q0 , t0 ) and, since functions in the matrix are continuous in q and t, the matrix
is nonsingular in a neighborhood of (q0 , t0 ). This result is the basis for applying ODE integrators for
numerical solution of the index 0 DAE of Eq. (37).
The next task is to obtain an explicit ODE that is equivalent to the second of Eqs. (37), as the basis
for application of implicit ODE integrators to solve Eqs. (37). Multiplying the second of Eqs. (37) by XT
and defining
Q ≡ MXHγ + S + QA (40)
−1
yields XT MDẇ + XT CT λ = XT Q. The transpose of Eq. (27) is HT = (CX)−1T = XT CT , so λ =


−HT XT MDẇ+HT XT Q. Multiplying the second of Eq. (37) by WT yields WT MDẇ+WT CT λ = WT Q.


Substituting for λ and manipulating yields
DT MDẇ = −WT CT HT XT Q + WT Q = DT Q (41)
Since DT MD =WT MW at t0 , it is nonsingular at t0 . By continuity, it is nonsingular in a neighborhood
of t0 . Thus, in this neighborhood, Eq. (41) may be written as the ODE
−1 T
ẇ = DT MD D Q (42)
This neighborhood defines the domain of a chart in a covering of the configuration constraint manifold
(Haug, 2016, 2017) and enables continuation of the integration process until a singularity or the desired
final time is reached (Coddington and Levinson, 1955).
The foregoing manipulation shows that if w(t) satisfies the second of Eqs. (37), then it satisfies
Eq. (42). To show that the converse is true, it must be shown that a solution y(t) of Eq. (42); i.e., ẏ =
−1 T
DT MD D Q, satisfies the second of Eq. (37). Multiplying on the left by DT MD, DT MDẏ = DT Q.
Using the definition of D in Eq. (31) to expand the term DT yields
WT MDẏ − WT CT HT XT MDẏ = −WT CT HT XQ + WT Q (43)
Defining
η ≡ HT XQ − HT XT MDẏ (44)
and multiplying both sides on the left by WT CT ,
WT CT η = WT CT HT XQ − WT CT HT XT MDẏ (45)
Equation (43) may thus be written as
WT MDẏ + WT CT η = WT Q (46)
Multiplying both sides of Eq. (44) on the left by XT CT yields
XT CT η = XT CT HT XQ − XT CT HT XT MDẏ (47)
Writing Eq. (27) in the form HCX = I and taking its transpose, XT CT HT = I. Thus, Eq. (47) reduces to
XT MDẏ + XT CT η = XT Q (48)
T T

Combining Eqs. (46) and (48), [W X] MDẏ + C η − Q = 0. Since the columns of W and X span
Rn , the matrix [W X]T is nonsingular. This and Eq. (40) yield
MDẏ + CT η = MXHγ + S + QA (49)
8 E. J. HAUG

which is the second of Eq. (37). This shows that the second of Eq. (37) is equivalent to Eq. (42) and
establishes the equivalence of the DAE of Eq. (37) and the system of ODE
v̇ = VT Dw + VT (I − XHC)q̇0 + VT XHν
−1 T (50)
ẇ = DT MD D Q
T
Define y = vT wT and


VT Dw + VT (I − XHC)q̇0 + VT XHν
" # " #
f1 (t, y)
f(t, y) = = −1 T (51)
DT MD D MXHγ + S + QA

f2 (t, y)
where Eqs. (18) and (30) define q and q̇ as functions of v and w, hence y. Initial conditions of Eqs. (12)
T
and (26) are y0 = v0T w0T = 0. The initial value problem of Eqs. (50), (12), and (26) and is thus


ẏ = f(t, y)
(52)
y0 = 0

4. Explicit numerical integration of the equations of motion


With initial conditions q0 and q̇0 at t0 that satisfy Eqs. (1) and (6), singular value decomposition is used
to determine V and W that satisfy Eqs. (9) and (23). Matrices B and H of Eqs. (13) and (27) are evaluated
at t0 and Eqs. (10) and (24) define U and X. Beginning at t0 , with initial conditions of Eq. (52), Eq. (38)
is solved for ẇ, v̇, and λ and ẇ and v̇ are integrated using an explicit Runge–Kutta numerical integrator
such as the four stage RK4 algorithm (Hairer et al., 1993).
After each successful time step, Eqs. (17), (18), (30), and (33) are used to evaluate q, q̇, and q̈. For each
value of v used in the solution process, B is evaluated using Eq. (20) and H is evaluated using Eq. (29).
Bounds on the norms of v and w, the number of iterations in evaluating u, B, and H, and the condition
number of the coefficient matrix of Eq. (38) are used to determine whether a reparameterization is
required. If not, the integration process is continued. If so, the current value of time and q are used
as t̄0 and q̄0 to redefine V̄, Ū, W̄, X̄, B̄, and H̄. The process is restarted with initial conditions v̄0 = 0 and
w̄0 = 0.
A key aspect of this algorithm is control of error in satisfying constraints of Eqs. (1), (6), and (7). These
errors are controlled by tolerances utol, Btol, and Htol in iterative solution for u, B, and H. Numerical
verification of this error control process is demonstrated in examples treated in Sections 7–9.

5. Derivatives for implicit integration of index 0 DAE


If Eq. (37) are to be solved numerically with an implicit numerical integration method, a convenient
form is the residual equation
" # " #
R1 v̇ − VT Dw − VT (I − XHC)q̇0 − VT XHν
R≡ = =0 (53)
R2 MDẇ + CT λ − MXHγ − S − QA
This form of the equations of motion in terms of v̇, ẇ, λ, q, and q̇ may be used to iteratively solve
discretized equations that are based on implicit numerical integration formulas. To implement this
approach, expressions for derivatives of terms in Eq. (53) with respect to v̇, ẇ, v, and w must be derived.
Since all terms appearing in Eq. (53) may be expressed as functions of q and q̇, which by Eqs. (18) and (30)
are functions of v and w, derivatives of q and q̇ with respect to v and w may be computed. For use in the
chain rule of differentiation, Eq. (18) shows that q depends on v, but not w. Equation (30) shows that q̇
depends on v and w.
MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES 9

Differentiating Eq. (14) with respect to v, 8q (V − Uuv ) = 0. Using Eqs. (11) and (16),

qv = V − Uuv = V − UB8q V = I − UB8q V ≡ F̄ (54)
Since q of Eq. (18) does not depend on w,
qw = 0 (55)
Differentiating Eq. (30) with respect to v and using Eq. (54),
     
q̇v = Dŵ q − X HĈq̇ˆ 0 − XH Cq̇ˆ 0 + X Hν̂ q + XHν q F̄ ≡ P̄
 
(56)
q q

Differentiating Eq. (30) with respect to w, since D, H, C, and ν do not depend on w,


q̇w = D (57)
 
Terms Cq̇ˆ 0 and ν q depend on kinematic equations and are included in problem-dependent
q 
libraries. Multiplying Eq. (28) by a constant vector ĉ and differentiating yields CXHĉ − ĉ q =
  
CX Hĉ q + CX̂Ĥĉ = 0. Using Eq. (27), this is
q
  
Hĉ q = −H CX̂Ĥĉ (58)
q

Multiplying Eq. (31) on the right by ĉ, differentiating, and using Eq. (58),
        
Dĉ q = −XH CŴĉ − X HĈŴĉ = −XH CŴĉ + XH CX̂ĤĈŴĉ (59)
q q q q

Derivatives of terms in Eq. (53) lead to partial derivatives



M2(q, x) ≡ M(q)x̂ q (60)
 
where x has the dimension of q̈ and CT λ̂ , ν q , Sq , Sq̇ , QA A
q , and Qq̇ are problem dependent and are
q
coded in a library of subroutines. Similarly, but somewhat more intricate, are expressions for γ of Eq. (8)
and associated derivatives,
      
" # 8q q̇ q̇ˆ + 2 8tq q̇ˆ + 8ttq
ˆ
γ hq  q q q 
γq = =         (61)
γ nhq 
Eq̇ˆ q̇ˆ + Et q̇ˆ − eq q̇ˆ − etq

q q q q

    
8q q̇ + 8q q̇ q̇ˆˆ + 28tq
 
" # ˆ ˆ
γ hq̇  q q q̇ˆ

γ q̇ = =     (62)
Eq̇ˆ + E(q, t)q̇ˆ q̇ˆˆ + Et − eq
γ nhq̇   
q q q̇ˆ
 
It is helpful to express the term CT λ̂ in terms of 8q (q, t) and E(q, t). Partitioning the Lagrange
q
T
multiplier as λ = ξ T ζ T ,


" #T " # " #


8 q ξ ξ
CT λ = = 8Tq ET = 8Tq ξ + ET ζ
 
(63)
E ζ ζ
10 E. J. HAUG

 
Thus, derivative calculation can be focused on the terms 8Tq ξ and ET ζ q ; i.e.,

q
 
CT λ = 8Tq ξ + ET ζ q
 
q
(64)
q

With x as a variable with the same dimension as q, define



P2(q, x) ≡ 8q (q, t)x̂ q (65)
 
This may be evaluated to provide terms such as P2(q, q̇) = 8q q̇ˆ in Eq. (62) and others that will arise.
q
Using matrix product expansion,
!
  X X
8q (q, t)q̇ˆ = 8qi (q, t)q̇ˆ i = 8qqi (q, t)q̇i
q
i q i
  
the jth column of 8q (q, t)q̇ˆ q̇ˆˆ in Eq. (62) is
q q̇ˆ
! !
8qq (q, t)q̇ˆ i q̇ˆˆ 8q (q, t)q̇ˆˆ = 8q (q, t)q̇ˆˆ
X X   
i
= q̇ˆ i
qi qj
i q̇ˆ j i q̇ˆ j

Thus,
  
8q (q, t)q̇ˆ q̇ˆˆ = 8q (q, t)q̇ˆˆ = P2(q, q̇)
 
(66)
q q̇ˆ q

The triple derivative with respect to q in the first of Eq. (61) is defined as
    
ˆ
P3(q, q̇) ≡ 8q (q, t)q̇ q̇ˆ = P2(q, q̇)ˆ q̇ˆ (67)
q q q

Similarly, with x as a variable with the same dimension as q, define



E2(q, x) ≡ E(q, t)x̂ q (68)
 
This may be evaluated to provide terms such as E2(q, q̇) = Eq̇ˆ in Eq. (62) and others that will arise.
   q
ˆ
The jth column of Eq̇ˆ q̇ˆ in Eq. (62) is
q q̇ˆ
   ! !
ˆ X ˆ ˆ = Ejq q̇ˆˆ = Ej q̇ˆˆ
 X    
Eq̇ˆ q̇ˆ = Ei q̇ˆ i q̇ˆ = Eiq q̇ˆ i q̇ˆ
q q̇ˆ j q q
i q̇ˆ j i q̇ˆ j

Thus,
  
Eq̇ˆ q̇ˆˆ = Eq̇ˆˆ = E2(q, q̇)
 
(69)
q q̇ˆ q

Finally, define
    
E3(q, q̇) ≡ Eq̇ˆ q̇ˆ ˆ q̇ˆ
= E2(q, q̇) (70)
q q q
MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES 11

With these results, Eqs. (8), (61), and (62) may be written as
" #
P2(q, q̇)q̇ + 28tq q̇ + 8tt
γ =
E2(q, q̇)q̇ + Et q̇ − eq q̇ − et
   
P3(q, q̇) + 2 8tq q̇ˆ + 8ttq
γq = 
   q  
(71)
E3(q, q̇) + Et q̇ˆ − eq q̇ˆ − etq

q q
" #
2P2(q, q̇) + 28tq
γ q̇ =
2E2(q, q̇) + Et − eq
In preparation for taking derivatives of the residual of Eq. (53), the foregoing relations are consoli-
dated. From Eqs. (3), (65), and (68),
"  # " #
 8q x̂ q P2(q, x)
C(q, t)x̂ q =  = ≡ C2(q, x) (72)
Ex̂ q E2(q, x)
Note that for any vectors x and y and any scalar α,
  
C2(q, x + y) = C(q, t)(x̂ + ŷ) q = C(q, t)x̂ q + C(q, t)ŷ q = C2(q, x) + C2(q, y)
  (73)
C2(q, αx) = C(q, t)α x̂ q = α C(q, t)x̂ q = αC2(q, x)
so C2(q, x) is linear in its second argument. Equations (58) and (59) thus simplify as

Hĉ q = −HC2(q, XHc)
 (74)
Dĉ q = −XHC2(q, Dc)

Likewise, the expression for P̄ in Eq. (56) is simplified as


P̄ = −XH C2 q, Dw + (I − XHC) q̇0 + XHν − ν q F̄
  
(75)
The manipulation of Eq. (73) may be carried out with M2(q, a), P2(q, a), and E2(q, a), showing that they
too are linear in their second arguments.
Using Eqs. (54), (55), (56), (57), (71), and (72), derivatives of residual terms in Eq. (53) with respect
to ẇ, v̇, w, and v are
R1ẇ = 0
R1v̇ = I
R1w = −VT D (76)
VT XH C2(q, Dw + (I − XHC) q̇0 + XHν) − ν q F̄ = −VT P̄
 
R1v =
R1λ = 0
and
R2ẇ = MD
R2v̇ = 0
 
R2w = − MXHγ q̇ + Sq̇ + QAq̇ D
 
M2(q, Dẇ − XHγ ) + MXHC2(q, −Dẇ + XHγ ) (77)
R2v =     F̄
+ CT λ̂ − MXHγ q − Sq − QA q
 q 
− MXHγ q̇ + Sq̇ + QAq̇ P̄
R2λ = CT
12 E. J. HAUG

6. Implicit integration algorithms for index 0 DAE of multibody dynamics


Implicit numerical integration algorithms for solution of first order ODE are adapted for solution of
the index 0 DAE of Section 3. Since trapezoidal integration formulas are stated in terms of generalized
coordinates, their application is rather simple, as presented in Section 6.1. Implicit Runge–Kutta
integration formulas, in contrast, are stated in terms of stage values that are not generalized coordinates
(Hairer and Wanner, 1996). They are applied to the underlying ODE that was shown to be equivalent to
the index 0 DAE in Section 3 and transformed to the index 0 DAE setting in Section 6.2.

6.1. Trapezoidal integration


Implicit trapezoidal formulas for integration of v̇ and ẇ are (Atkinson, 1989)
vn = vn−1 + (h/2) (v̇n−1 + v̇n )
(78)
wn = wn−1 + (h/2) (ẇn−1 + ẇn )
These equations are used with Eqs. (18) and (30) to evaluate q and q̇ in Eq. (53),
" #
v̇n − VT D (wn−1 + (h/2) (ẇn−1 + ẇn )) − VT (I − XHC)q̇0 − VT XHν
R(v̇n , ẇn ) = = 0 (79)
MDẇn + CT λ − MXHγ − S − QA
where Eqs. (18) and (30) are used to write arguments of all functions appearing in Eq. (79) as functions
of v and w. Equations (78) allow these arguments to be written as functions of v̇n and ẇn . Using the
chain rule of differentiation with relations derived in Section 5, the Jacobian of the residual of Eq. (79)
T
with respect to z ≡ v̇nT ẇnT λTn is

" # " #
I 0 0 R1v R1w 0
Jac = + (h/2) ≡ J1 + (h/2)J2 (80)
0 MD CT R2v R2w 0

At t0 , with h small, the first matrix dominates. As shown in Section 3, it is nonsingular, so the Jacobian
T
is nonsingular in a neighborhood of q0 , for h sufficiently small. With zi = v̇niT ẇniT λTn , Newton–


Raphson iteration for solution of Eq. (79) is


Jac1zi = −Ri
(81)
zi+1 = zi + 1zi , i = 0, 1, . . . until Ri < intol

T
At t0 , with initial conditions of Eq. (52), Eq. (38) is solved to obtain an estimate z0 = v̇10T ẇ10T λ0T

1
to start the numerical integration process. At subsequent time steps, good estimates for z0 are available
from prior time steps.
Bounds on the norms of v and w, the number of iterations in evaluating u, B, and H, and the condition
number of the coefficient matrix of Eq. (81) are used to determine whether a reparameterization is
required. If not, the integration process is continued. If so, the current time is set as t̄0 and the current
value of q is used as q̄0 to redefine V̄, Ū, W̄, X̄, B̄, and H̄. The process is restarted with initial conditions
v̄0 = 0 and w̄0 = 0 and their time derivatives v̇¯ 0 = V̄T q̇¯ 0 and ẇ ¯ 0 = W̄T q̈¯ 0 . With the value λ̄0 at t̄0 ,
h iT
˙ 0T λ̄0T is used with Eqs. (76) and (77) to evaluate the Jacobian of Eq. (80) and restart the
z̄0 = v̄˙ 0T w̄
numerical integration process.

6.2. Singly diagonal implicit Runge–Kutta (SDIRK) integration


Runge–Kutta, abbreviated RK, numerical integration methods (Hairer et al., 1993; Hairer and Wanner,
1996) have been developed for the solution of first-order ODE of the form

ẏ = f t, y (82)
MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES 13

where y is an n-vector variable. They are one step methods that use no data prior to time step tn to
approximate the solution at time step tn+1 , using formulas based on Taylor series approximation at tn . A
variety of RK integrators can be written in the form
 
Xi
ki = f tn + ci h, yn + h aij kj  , i = 1, . . . , s (83)
j=1

s
X
yn+1 = yn + h bi ki (84)
i=1
Pi
where tn is the current time step; yn is the approximate solution at tn ; aij , bi , and ci = j=1 aij are
Ps
constants; i=1 bi = 1; s is the number of stages in integrating from tn to tn+1 ; ki are stage variables;
and h is the step-size.
If diagonal terms of the matrix A = [aij ] are aii = α 6= 0, i = 1, 2, . . . , s, the method is called
Singly Diagonal, or SDIRK. The formula selected for integrating potentially stiff differential equations
should be L-stable (Hairer and Wanner, 1996) and of average order. The L-stability attribute ensures good
stability properties and order-preservation, even for extremely stiff problems. The formula commonly
chosen is of order p = 4, with s = 5 stages. This order is high enough to ensure good efficiency
for tolerances typically used in engineering applications. The stiffly accurate, L-stable, 5 stage, order
4 SDIRK54 formula for first order ODE is defined in Table 1 (Hairer and Wanner, 1996, p. 100), called a
Butcher tableau (Appendix A Haug, 2016).
T
To integrate Eq. (50) using a RK method, stage variables are ki = kvTi kwTi

and arguments of
functions in the stage equations are q(v) and q̇(v, v̇) of Eqs. (18) and (30), evaluated as functions of stage
variables,
 
X i
qi = q vn + h aij kvj 
j=1
  (85)
i
X i
X
q̇i = q̇ vn + h aij kvj , wn + h aij kwj 
j=1 j=1

Denoting a general function g(t, v, w) evaluated as a function of stage variables as


 
i i
` X X
g i = g tn + ci h, vn + h aij kvj , wn + h aij kwj  (86)
j=1 j=1

stage equations for Eq. (50) are


 
i
` X ` ` ` `
R̄1 ≡ kvi − VT Di (wn + h aij kwj ) + (I − XHi Ci )q̇0 + XHi ν i  =0 (87)
j=1

Table 1. SDIRK54 tableau.


ci aij
1/4 1/4
3/4 1/2 1/4
11/20 17/50 −1/25 1/4
1/2 371/1360 −137/2720 15/544 1/4
1 25/24 −49/48 125/16 −85/12 1/4
bi 25/24 −49/48 125/16 −85/12 1/4
14 E. J. HAUG

!−1
T `T `
¯ ≡ kw − D
R̄2
` ` `
Di Qi = 0 (88)
i i Mi Di

!
`T ` `
Multiplying Eq. (88) by Di Mi Di yields
!
`T ` ` `T `
Di Mi Di kwi − Di Qi = 0 (89)

`T
Using the definition of D in Eq. (31) to expand the term Di , Eq. (89) becomes
` ` `T ` T ` ` ` `T ` T `
WT Mi Di kwi − WT Ci Hi XT Mi Di kwi = WT Qi − WT Ci Hi XQi (90)
Defining
`T ` `T ` `
λi ≡ Hi XQi − Hi XT Mi Di kwi (91)
`T
and multiplying both sides on the left by WT Ci ,
`T `T ` T ` `T ` T ` `
WT Ci λi = WT Ci Hi XQi − WT Ci Hi XT Mi Di kwi (92)
Equation (90) may thus be written as
` ` T `
WT Mi Di kwi + WT C λi = WT Qi (93)
i

`T
Multiplying both sides of Eq. (91) on the left by XT Ci yields
`T `T ` T ` `T ` T ` `
XT Ci λi = XT Ci Hi XQi − XT Ci Hi XT Mi Di kwi (94)
Writing Eq. (27) in the form HCX = I and taking its transpose, XT CT HT = I. Thus, Eq. (94) reduces to
` ` `T `
XT Mi Di kwi + XT Ci λi = XT Qi (95)
!
` ` `T `
Combining Eqs. (93) and (95), [W X]T Mi Di kwi + Ci λi − Qi = 0. Since the columns of W and X

span Rn the matrix [W X]T is nonsingular. Combining this result and the definition of Q in Eq. (40)
yields
` ` `T ` ` ` ` `A
R̄2 ≡ Mi Di kwi + Ci λi − Mi XHi γ i − S i − Qi = 0 (96)
Equations (87) and (96) comprise the residual form of Runge–Kutta discretization of the index 0 DAE
of Eq. (37). Using derivatives of residual terms in Eqs. (76) and (77) and the chain rule of differentiation
with Eq. (86), the Jacobian of Eqs. (87) and (96) for an SDIRK integrator with aii = α, in variables
T
zi = kvTi kwTi λTi , is


 
I 0 0 "
R1v R1w 0
#
Jac =  ` ` `T  + hα ≡ J1 + hαJ2 (97)
0 Mi Di Ci R2 v R2 w 0
MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES 15

Figure 1. Planar articulated vehicle.

The SDIRK54 algorithm of Table 1 will be used with this Jacobian in applications.
The Newton–Raphson algorithm of Eq. (81) is used with the same approach outlined for the trape-
zoidal method to obtain initial estimates to start the iterative process and to redefine the parameterization
and restart integration, as required.

7. Planar articulated vehicle with wheels that roll, but do not slip
A two chassis articulated vehicle modeled in the x-y plane is shown in Fig. 1. The front axle of chassis
one is steerable, with angle θ (t). Since no-slip conditions for both front wheels would be redundant, a
single wheel model is placed at the center of the front axle at point P1 and the no-slip condition is applied
to this wheel model. The chasses are coupled by a rotational joint at point P3 that is orthogonal to their
common plane of motion, 3 m from the origins of body-fixed frames.
T T
Six generalized coordinates for the system are q = rT1 φ1 rT2 φ 2
 
= x1 y1 φ1 x2 y2 φ2 . The
rotational joint between the chasses is characterized by the holonomic constraint
8(q) = (r1 − 3A(φ1 ) i′1 ) − (r2 + 3A(φ2 ) i′2 ) = 0 (98)
whose Jacobian is
8q (q) = I2 −3PA(φ1 )i′1 −I2 −3PA(φ2 )i′2
 
(99)
h i
cos φi − sin φi
where A(φi ) = sin φi cos φi is the rotation transformation matrix from the x′i -y′i frame to the x-y
frame and i′i are unit vectors along the x′i axes.
Vectors from origins of body-fixed reference frames to centers of axles are rP1 1 = r1 + 3A (φ1 ) i′1 ,
P3
r1 = r1 − 3A (φ1 ) i′1 , and rP2 2 = r2 − 3A (φ2 ) i′2 . The velocities of these points are
ṙP1 1 = ṙ1 + 3φ̇1 PA (φ1 ) i′1
ṙP1 3 = ṙ1 − 3φ̇1 PA (φ1 ) i′1 (100)
= ṙP2 2 ṙ2 − 3φ̇2 PA (φ2 ) i′2
 0 −1 
where P = A(π/2) = 1 0 , A(φ)φ = PA(φ), and AT (φ)φ = −A(φ)P.
The velocities of Eq. (100) must be orthogonal to unit vectors u1 , u3 , and u2 , respectively, as conditions
that the wheels do not slip laterally; i.e., uT1 ṙP1 1 = [− sin θ cos θ ] A (φ1 )T ṙ1 + 3φ̇1 Pi′ = 0, uT3 ṙP1 3 =


j′T T T P2 ′T T T
1 A (φ1 ) ṙ1 − 3φ̇1 = 0, and u2 ṙ2 = j2 A (φ2 ) ṙ2 − 3φ̇2 = 0, where A PA = P has been used.
16 E. J. HAUG

Differential constraints acting on the system are thus


[− sin(θ ) cos(θ )] A(φ1 )T 3 [− sin(θ ) cos(θ )] j′1
 
0 0
E(q, t)q̇ =  j′T
1 A(φ1 )
T −3 0 0  q̇ = 0 (101)
0 0 j′T
2 A(φ 2 ) T −3

so e(q, t) = 0. The composite of constraint coefficient matrices of Eqs. (99) and (101) is
" #
8q (q)
C(q, t) = (102)
E(q, t)
Derivative terms needed for numerical integration of the equations of motion, with x =
T
xrT1 xφ1 xrT2 xφ2 , are 8t = −ν = 0, 8tq = 8ttq = 0, and


P2(q, x) = 8q x̂ q = 0 3xφ1 A(φ1 )i′1 0 3xφ2 A(φ2 )i′2


  

 
ˆ q̇ˆ = 0 3φ̇ 2 PA(φ1 )i′ 0 3φ̇ 2 PA(φ2 )i′
 
P3(q, q̇) = P2(q, q̇) 1 1 2 2
q
" #
[cos θ sin θ ]A(φ1 )T 3[cos θ sin θ ]j′1 0 0
Et = −θ̇
02×6

0 [cos θ sin θ ]A(φ1 )T Pṙ1 0 0


   
ˆ
Et q̇ = θ̇
q 02×6

0 −[− sin(θ ) cos(θ )]A(φ1 )T Pxr1 0


 
0
−j′T T

E2(q, x) = Ex̂ q =  0 1 A(φ1 ) Pxr1 0 0 
0 0 0 −j′T
2 A(φ 2 ) T Px
r2
T
 
  0 −φ̇1 [− sin(θ ) cos(θ )] A(φ1 ) ṙ1 0 0
ˆ q̇ˆ =  0
E3(q, q̇) = E2(q, q̇) −φ̇1 j′T T 0
1 A(φ1 ) ṙ1 0 
q ′T T
0 0 0 −φ̇2 j2 A(φ2 ) ṙ2
h i
CT λ q = 06×2 CTφ1 λ 06×2 CTφ2 λ


3A(φ1 )i′1
 
0 00
 − [− sin(θ ) cos(θ )] AT (φ1 )P 0 0 0
Cφ1 =
−j′T

A T (φ )P 0 0 0

1 1
0 0 00

3A(φ2 )i′2
 
00 0
0 0 0 0
 
Cφ2 =


0 0 0 0 
′T T
0 0 −j2 A (φ2 )P 0
With these results, γ , γ q , γ q̇ , and C2(q, x) of Eqs. (71) and (72) may be evaluated. In the planar equations
of motion for this system, M = mI6×6 , S = 0, and QA = 0.
With two holonomic and three differential constraints on six generalized coordinates and velocities,
this system has four kinematic degrees of freedom and one kinetic degree of freedom. Accordingly, there
are four first order kinematic equations for v and one first order kinetic equation for w in Eq. (37).
As a numerical example, each of the two chasses has a mass of 1,500 kg and the same polar moment of
inertia. Acceleration due to gravity is 9.6 m/s2 . The x′ -axes of the chasses are initially coincident with the
global x-axis, with the centroid of the rear chassis at the origin of the x-y frame, so q0 = [6, 0, 0, 0, 0, 0]T .
The initial velocity of both chasses, consistent with kinematic and differential constraints, is 15 m/s
MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES 17

Figure 2. Lane change maneuver.

Table 2. Maximum constraint error for planar articulated vehicle.


Tol Position err. Velocity err. Acceleration err.
E-6 E-11 E-7 E-7
E-9 E-13 E-11 E-11
E-12 E-13 E-13 E-13

(35 mph) along the global x-axis, so q̇0 = [15, 0, 0, 15, 0, 0]T . A steer angle θ = 0.017 sin (t) rad, for
0 ≤ t ≤ 2π, and θ = 0 thereafter is imposed to simulate a lane change maneuver to the left. Simulations
are carried out using explicit RK4 and implicit trapezoidal and SDIRK54 algorithms, with essentially
identical results. A somewhat smaller step size is required when using the trapezoidal algorithm to
achieve accuracy comparable to the other two algorithms, as expected since it is of lower order. Results
shown in Fig. 2 for tf = 10 s, h = 0.001 s, utol = Btol = Htol = 10−10 , and intol = 0.0001 confirm the
lane change trajectory for the first chassis in the left plot and the slight delay shown in the right plot of
the orientation of the second chassis relative to the first during the maneuver, subsequently trailing with
both chasses aligned. For the 10,000 time steps, each algorithm required 22 reparameterizations (455
time steps per reparameterization), all due to a limit of 10 imposed on the norm of v. Kinetic energy for
all three simulations was constant to five significant figures for this conservative system.
As a check on constraint error control, Tol = utol = Btol = Htol in Eqs. (17), (20), and (29) was
varied with the SDIRK54 integrator. Results presented in Table 2 show that maximum position, velocity,
and acceleration constraint errors over the simulation interval are driven toward zero to computer
precision as tolerances are tightened, with little increase in compute time for the tighter tolerances.

8. Disk rolling without slip on x-y plane


The disk with unit radius shown in Fig. 3 rolls on the x-y plane without slip. The plane of the disk is
defined by body fixed y′ − z′ axes and the body fixed x′ axis is normal to the plane of the disk. Unit
vector a′ in the x′ − y′ − z′ frame from the center of the disk to contact point C on the periphery with
the x-y plane is
 
0    
′ 0 0
a =  a1  = = a ≡ a′a a (103)
 
a I
a2
and the vector a satisfies the condition
aT a − 1 /2 = 0

(104)
18 E. J. HAUG

Figure 3. Disk rolling without slip on the x-y plane.

The normal to the disk periphery at contact point C in the plane of the disk is the vector a′ , so the tangent
to the disk periphery at point C in the plane of the disk is
 
0 " # " #

0 0
b =  −a2  = = a ≡ b′a a (105)
 
Pa P
a1
Euler parameters used as generalized coordinates for orientation are defined in Appendix B of (Haug,
2016), with identities that enable systematic computation of derivatives needed (Serban and Haug,1998)
for implicit integration. Contact conditions are that point C is in the x-y plane, uTz r + A(p)a′a a = 0,
and that the vector b = A(p)b′ is in the x-y plane, uTz A(p)b′a a = 0. Combining these conditions,
Eq. (104), and the Euler parameter normalization condition yields the holonomic constraints
uz r + A(p)a′a a
 T 

 uTz A(p)b′a a 
 
8(q) =  =0 (106)
 (pT p − 1)/2 
(aT a − 1)/2
T
where generalized coordinates are q = rT pT aT ∈ R9 . Since 8 does not depend explicitly on t,


8t = −ν h = 0, 8tt = 0, and 8qt = 0. The holonomic constraint Jacobian is


uz uz B̄(p, a′a a) uTz A(p)a′a
 T T 

 0 uTz B̄(p, b′a a) uTz A(p)b′a 


 
8q =   (107)
 0
 pT 0 

0 0 aT
where B̄(p, a′a a) and identities used are defined in Appendix B of (Haug, 2016).
The velocity of point C on the periphery of the disk is (Haug, 1989, 2016)
vC = ṙ + A(p)ω̃′ a′a a = ṙ + A(p)AT (p)Ȧ(p)a′a a
= ṙ + Ȧ(p)a′a a = ṙ + A(p)a′a â p ṗ = ṙ + B̄(p, a′a a)ṗ

(108)
MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES 19

Conditions that no slip occurs between the disk and the x-y plane are that the horizontal components of
vC are zero; i.e. uTx vc = 0 and uTy vc = 0. With Eq. (108), this is
" #
uTx uTx B̄(p, a′a a) 0
E(q)q̇ ≡ q̇ ≡ e(q, t) = 0 (109)
uTy uTy B̄(p, a′a a) 0
Since E does not depend explicitly on t and e = 0, Et = 0, eq = 0, and et = 0. With four holonomic
and two differential constraints on nine generalized coordinates, the system has five kinematic and three
kinetic degrees of freedom.
Kinetic and force terms in the equations of motion are (Haug, 1989)
 
mI 0 0
M(q) =  0 4ḠT (p)J′ Ḡ(p) 0 
 

 0 0 0
0
S(q, q̇) =  8ḠT (q̇)J′ Ḡ(q̇)p  (110)
 

0
−mguz
QA =  0 
 

0
h iT
Derivatives of terms required for integration of the equations of motion, with x = xrT xpT xaT and
derivative identities from Appendix B of (Haug, 2016), are
0 uTz B̄(xp , a′a a) + uTz B̄(p, a′a xa ) uTz M̄(p, xp )a′a
 
 0 uT B̄(x , b′ a) + uT B̄(p, b′ x ) uT M̄(p, x )b′ 
 z p a z a a z p a
P2(q, x) = 8q (q)x̂ q = 

xpT

0 0 
0 0 xaT
    
P3 q, q̇ = P2 q, q̇ˆ q̇ˆ
q

0 uTz B̄(ṗ, a′a ȧ) + uTz Z̄(ṗ, a′a ȧ) uTz M̄(ṗ, ṗ)a′a
 
 0 uT B̄(ṗ, b′ ȧ) + uT Z̄(ṗ, b′ ȧ) uT M̄(ṗ, ṗ)b′ 
z a z a z a
=


0 0 0 
0 0 0
where Z̄(a, b) = −2Ē ḠT (a)b = M̄(p, a)b p ,
 

0 uTx B̄(xp , a′a a) uTx M̄(p, xp )a′a


" #

E2(q, x) = E(q)x̂ q =
0 uTy B̄(xp , a′a a) uTy M̄(p, xp )a′a

0 uTx Z̄(ṗ, a′a ȧ) uTx M̄(ṗ, ṗ)a′a


" #
 
ˆ q̇ˆ =
E3(q, q̇) = E2(q, q̇)
q 0 uTy Z̄(ṗ, a′a ȧ) uTy M̄(ṗ, ṗ)a′a
 
0 0 0
 
CT (q)λ̂ =  0 α1 α2 
 
q
0 λ1 a′T ′T
a C̄(p, uz ) + λ2 ba C̄(p, uz ) λ4 I2
20 E. J. HAUG

α 1 = λ1 K̄(a′a a, uz ) + λ2 K̄(b′a a, uz ) + λ3 I4 + λ5 K̄(a′a a, ux ) + λ6 K̄(a′a a, uy )

α 2 = λ1 C̄T (p, uz )a′a + λ2 C̄T (p, uz )b′a + λ5 C̄T (p, ux )a′a + λ6 C̄T (p, uy )a′a
 
0 0 0
′ T ′

M2(q, x) = M(q)x̂ q =  0 4 T(J Ḡ(p)xp ) − Ḡ (p)J Ḡ(xp ) 0 
  
0 0 0
 
0 0 0
Sq =  0 8ḠT (ṗ)J′ Ḡ(ṗ) 0 
 

0 0 0
 
0 0 0
Sq̇ =  0 8T(J′ Ḡ(ṗ)p) − 8ḠT (ṗ)J′ Ḡ(p) 0  (111)
 

0 0 0
and QA A
q = Qq̇ = 0.
For a disk with thickness 0.01 m, radius 1 m, mass m = 10 kg, and g = 9.6 m/s2 , the density is
1000/π kg/m3 , so Jx′ x′ = m/2 = 5 and Jy′ y′ = Jz′ z′ = m(3 + 10−4 )/12 = 2.5001. The disk
is initially in the y-z plane with x′ and x and y′ and y axes parallel, so the initial configuration is
r0 = uz , p0 = [1 0 0 0]T , a0 = [0 −1]T . The disk initially rolls along the y axis, with a small
rotation perturbation about the y axis, so the initial angular velocity-Euler parameter derivative relation
T
is −omegax0 0.01 0 = 2G(p0 )ṗ0 . Appending this relation to Eq. (6) yields 9 equations in 9 unknowns


that are solved for q̇0 .


Plots of centroid ry-rx trajectory and rz-coordinate vs. time for initial condition omegax0 = −1 rad/s
are shown in Fig. 4. The nearly straight segments of the ry-rx trajectory on the left are with rz ≈ 1 and
define the direction of roll, which changes after each loop and associated dip of the centroid shown in the
right plot of Fig. 4. Numerical integration was carried out using utol = Btol = Htol = intol = 10−7 and
h = 0.001 s with the RK4 and SDIRK54 algorithms and h = 0.0001 s with the trapezoidal algorithm,
each yielding essentially identical results. The smaller step size for the trapezoidal algorithm was required
to achieve comparable accuracy, due to its lower order. In 40,000 time steps with the RK4 and SDIRK54
algorithms, 127 reparameterizations were required (315 time steps per reparameterization), all due to a

Figure 4. Disk centroid trajectory and z-coordinate vs. time.


MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES 21

Table 3. Maximum constraint error for rolling disk.


Tol Position err. Velocity err. Acceleration err.
E-6 E-7 E-6 E-5
E-9 E-10 E-14 E-12
E-12 E-15 E-13 E-12

Figure 5. Geometry of three wheel motorcycle model.

limit of 0.7 on the norm of v. Kinetic energy in each simulation was constant to seven significant figures
for this conservative system.
As a check on constraint error control, Tol = utol = Btol = Htol in Eqs. (17), (20), and (29) was
varied in simulations carried out with the SDIRK54 algorithm. Data in Table 3 show that maximum
position, velocity, and acceleration constraint errors over the simulation interval are driven toward
zero, to computer precision, as the tolerances are tightened. There was little increase in compute time
associated with the tighter tolerances.

9. Three wheel motorcycle


Numerous applications of three wheel vehicles exist, including three wheel motorcycles. The model used
here to represent kinematics and dynamics of such vehicles is based on a roll without slip wheel model.
The vehicle model shown in Fig. 5 includes wheels with radius 0.3 m, an inclined steering fork, and
front wheel suspension travel. The wheels are modeled as rigid disks that maintain contact with the road
surface. Their inertias are lumped with the chassis of the vehicle. The rear axle is 0.6 m to the rear of the
centroid O′ of the chassis and is orthogonal to the y′ and z′ axes. The rear axle is 1 m long, so vectors
from O′ to the center of the axle and wheel spindles are d′P0 = [0 −0.6 0]T , d′P1 = [0.5 −0.6 0]T , and
d′P2 = [−0.5 −0.6 0]T . The vector from the centroid to the top of the fork is b′ = [0 0.6 0.6]T .
The centerline of the fork lies in the y′ − z′ plane and is pitched back from the z′ axis by a counter-
clockwise rotation φ about the x′ axis, to form the x′′ −y′′ −z′′ frame. Steering is accomplished with a
counterclockwise rotation θ (t) of the handlebars about the z′′ axis of the x′′ − y′′ − z′′ frame, to form
the x′′′ − y′′′ − z′′′ frame. Using Euler parameters, these rotations are implemented with (Haug, 1989)
T T
p1 = cos(φ/2) uTx′ sin(φ/2) and p2 (t) = cos(θ (t)/2) uTz′′ sin(θ (t)/2) which define orthogonal
 

transformation matrices A1 ≡ A(p1 ) and A2 ≡ A(p2 (t)) from the x′′ -y′′ -z′′ frame to the x′ -y′ -z′ frame
and from the x′′′ -y′′′ -z′′′ frame to the x′′ -y′′ -z′′ frame, respectively. Front suspension travel in the fork
22 E. J. HAUG

is defined by the dashed vector c′′ = −suz′′ along the negative z′′ axis, as shown in Fig. 5, where s is
suspension travel that activates the suspension spring and shock absorber.
To define the contact point C between the periphery of the front wheel and the x-y plane, the vector
ar′′′ in the plane of the front wheel shown in Fig. 5 is defined as
T  T  T
ar′′′ = 0 a1 a2 = 0 aT = 02×1 I2 a ≡ B1 a

(112)
where a = [a1 a2 ]T is a generalized coordinate that defines rotation of the front wheel. Since the wheel
has radius 0.3 m,
ar′′′T ar′′′ − 0.09 /2 = a21 + a22 − 0.09 /2 = aT a − 0.09 /2 = 0
  
(113)
Since ar′′′ is orthogonal to the periphery of the wheel, the vector
T  T  T
at′′′ = 0 −a2 a1 = 0 (Pa)T = 02×1 PT a ≡ B2 a

(114)
is in the plane of the wheel and tangent to its periphery. Represented in the x-y-z frame,
at = A(p)A1 A2 B2 a (115)
where A(p) is the transformation matrix from the x′ − y′ − z′ frame to the x-y-z frame, as a function of
Euler parameter vector p.
Using the foregoing, vectors locating points in the model in the x-y-z frame are
rP0 = r + A(p)d′P0
rP1 = r + A(p)d′P1
(116)
rP2 = r + A(p)d′P2
rC = r + A(p)b′ − sA(p)A1 uz” + A(p)A1 A2 B1 a
Holonomic constraints on the system are that the z coordinates of points P1 and P2 are 0.3 m, the z
coordinate of point C on the front wheel is zero, the front wheel tangent vector at is in the x-y plane,
T
and p and a satisfy normalization constraints. With q = rT pT aT s ∈ R10 , these conditions define


holonomic constraints
 T
8(q, t) = uTz rP1 − 0.3, uTz rP2 − 0.3, uTz rC , uTz at , pT p − 1 /2, aT a − 0.09 /2 = 0 (117)
 

The no-slip conditions on the wheels are that the velocity of point P0 at the center of the rear
axle is orthogonal to the vector A(p)ux′ that is parallel to the axle and the velocity of point C on the
front wheel is orthogonal to the vector ũz at that is orthogonal to the tangent vector at and in the
T
x-y plane. Since the steering angle θ depends on time, ṗ2 = (θ̇ /2) − sin(θ/2) uTz′′ cos(θ/2) and

T T
p̈2 = (θ̈ /2) − sin(θ/2) uTz′′ cos(θ/2) − (θ̇ /2)2 cos(θ/2) uTz′′ sin(θ/2) . Total time derivatives of
 

the first and fourth of Eq. (116) are ṙP0 = rPq0 q̇ and ṙC = rC C
q q̇ +rt . The no-slip conditions are thus

uTx’ AT (p)ṙP0 = uTx’ AT (p)rPq0 q̇ = 0 and atT ũz ṙC = atT ũz rC
q q̇ + rt
C = 0. In terms of partial derivatives

with respect to generalized coordinates and time, these are the differential constraints
uTx′ AT (p)rPq0
" # " #
0
E(q)q̇ ≡ q̇ = ≡ e(q, t) (118)
atT ũz rC
q −atT ũz rCt

With six holonomic and two differential constraints on ten generalized coordinates, the system has four
kinematic and two kinetic degrees of freedom.
Derivatives of holonomic constraints of Eq. (117) are
h i
8q = (uTz rPq1 )T (uTz rPq2 )T (uTz rC T T t T T T T
q ) (uz aq ) (p pq ) (a aq )
T
MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES 23

where pq = [0 I4 0 0] and aq = [0 0 I2 0],


         T
P P
P2(q, x) = (uTz rq1 x̂ )T (uTz rq2 x̂ )T (uTz rC
q x̂ ) T (uT at x̂ )T (xT p )T (xT a )T
z q p q a q
q q q q

where xT pTq = xpT and xT aTq = xaT have been used,


       T
P3(q, q̇) = 0 0 (uT
z rq
ˆ
C q̇ ˆ
q̇ ) T (uT
z a q
ˆ
t q̇ ˆ
q̇ ) T 00
q q q q
   
since rPq1 q̇ˆ , rPq2 q̇ˆ , ṗT pq , and ȧT aq do not depend on q, and
q q
 

0
 
0
 
0
 
0
 0
 0   0   0   0 

 0 

           
 uz rtq q̇ˆ 
T C
 T C  T C  T C  T C    
 uz rt   uz rtt   uz rtq   uz rttq  
        ˆ
8t =  T t  ; 8tt =  T t  ; 8tq =  T t  ; 8ttq =  T t  ; 8tq q̇ =   q 
 uz at   uz att   uz atq   uz attq  q  uTz attq q̇ˆ 

         q
 0   0   0   0 
0
 
 
0 0 0 0 0
since rP1 , rP2 , pT p, and aT a are not explicit functions of time.
Similarly, for the differential constraints of Eq. (118),
   
uTx′ C̄(p, rPq0 x)pq + uTx′ AT rPq0 x̂
q
E2(q, x) = 
  
atT ũz rC T rCT ũ at

q x̂ − x q z q
q
       
u T C̄(ṗ, rP0 q̇) + C̄(p, rP0 q̇
ˆ q̇) p + uT N̄(p, ṗ) rP0 q̇
ˆ
x ′ q q q x ′ q
   q q
 
E3(q, q̇) = 
 T  C ˆ T     
−q̇ rq q̇ ũz aq + a ũz rq q̇ˆ q̇ˆ + q̇ aq ũz rq q̇ˆ − q̇ rq ũz atq q̇ˆ
t tT C T tT C T CT 
q q q q q
" #
0
Et =
atT C
t ũz rq + atT ũz rC
tq
 
  0
Et q̇ˆ =   



 
q −q̇T rCT t tT
q ũz atq + at ũz rq q̇ − q̇T rCT t tT
tq ũz aq + a ũz rtq q̇
q q
" #
0
et =
−atT C
t ũz rt − atT ũz rC
tt
" #
0
eq =
rCT t tT C
t ũz aq − a ũz rtq
" #
01×10
etq =
rCT t CT t tT C tT C
tt ũz aq + rt ũz atq − at ũz rtq − a ũz rttq
 
  01×10
eq q̇ˆ =    
ˆ
 
q −q̇T atT
q ũz rC + rCT ũ at q̇
tq t z q + q̇T rCT ũ at − atT ũ rC q̇
tq z q z tq
q q
24 E. J. HAUG

T h iT
The right side of Eq. (6) and its derivative are ν = −8Tt eT and ν q = −8Ttq eTq . Finally, the term

  T
CTq λ̂ must be accounted for. Defining λ = ξ T ς T , where ξ ∈ R6 and ς ∈ R2 , CT λ = 8Tq ξ + ET ς

q
and
   
CT λ̂ = 8Tq ξ̂ + ET ς̂ q

q q
         
8Tq ξ̂ = λ1 rPq1 T uz + λ2 rPq2 T uz + λ3 rCT
q uz + λ 4 a tT
q zu + λ5 pTq pq + λ6 aTq aq
q q q q q
   
ET ς̂ = λ7 rPq0 T A(p)ux′ − λ8 rCT t

q q ũz a
q q

Derivatives of vectors in Eqs. (115) and (116) that are required in the preceding expressions are as
follows:
rPq0 = I3 B̄ p, d′P0 0 0
  

 
rPq0 x̂ = 0 B̄(xp , d′P0 ) 0 0
 
q
  
rPq0 q̇ˆ q̇ = 0
q q

rPt 0 =0
 
03×3 B̄(p, ux′ ) 03×2 03×1
0 K̄(d′P0 , A(p)ux′ ) + B̄T (p, d′P0 )B̄(p, ux′ ) 04×2 04×1 
   
rPq0 T A(p)ux′ =  4×3 
q  02×10 
01×10

rPq1 = I B̄(p, d′P1 ) 0 0


 

 
rPq1 x̂ = 0 B̄(xp , d′P1 ) 0 0
 
q

rPt 1 = 0
 
03×10
 04×3 K̄(d′P1 , uz ) 04×3 
 
PT
rq1 uz =  
q
 02×10 
01×10

rPq2 = I B̄(p, d′P2 ) 0 0


 

 
rPq2 x̂ = 0 B̄(xp , d′P2 ) 0 0
 
q

rPt 2 =0
 
03×10
 04×3 K̄(d′P2 , uz ) 04×3 
 
PT
rq2 uz =  
q
 02×10 
01×10

atq = 0 B̄(p, A1 A2 B2 a) AA1 A2 B2 0


 
MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES 25

 
atq x̂ = 0 α 1 M̄(p, xp )A1 A2 B2 0
 
q
  
atq q̇ˆ q̇ˆ = 0 α 2 M̄(ṗ, ṗ)A1 A2 B2 0
 
q q

att = AA1 B̄(p2 , B2 a)ṗ2


attq = 0 B̄(p, A1 B̄(p2 , B2 a)ṗ2 ) AA1 M̄(p2 , ṗ2 )B2 0
 

attt = AA1 B̄(ṗ2 , B2 a)ṗ2 + B̄(p2 , B2 a)p̈2




atttq = 0 α 3 AA1 M̄(ṗ2 , ṗ2 ) + M̄(p2 , p̈2 ) B2 0


  

 
attq q̇ˆ = 0 α 4 M̄(p, ṗ)A1 M̄(p2 , ṗ2 )B2 0
 
q
 
03×10
   04×3 K̄(A1 A2 B2 a, uz ) C̄T (p, uz )A1 A2 B2 04×1 
atT
q uz = T 2T 1T

q  02×3 B2 A A C̄(p, uz ) 02×2 02×1 
01×10

where
α 1 = B̄(xp , A1 A2 B2 a) + B̄(p, A1 A2 B2 xa )

α 2 = B̄(ṗ, A1 A2 B2 ȧ) + Z̄(ṗ, A1 A2 B2 ȧ)


α 3 = B̄ p, A1 B̄(ṗ2 , B2 a)ṗ2 + B̄(p2 , B2 a)p̈2


α 4 = B̄(ṗ, A1 B̄(p2 , B2 a)ṗ2 ) + B̄(p, A1 M̄(p2 , ṗ2 )B2 ȧ)


rC ′ 1 1 2 1 2 1
 
q = I3 B̄(p, b − sA uz′′ + A A B1 a) AA A B1 −AA uz′′
 
rC = 0 β 1 M̄(p, xp )A1 A2 B1 −M̄(p, xp )A1 uz′′
 
q x̂
q
  
rC ˆ q̇ˆ = 0 β 2 M̄(ṗ, ṗ)A1 A2 B1 −M̄(ṗ, ṗ)A1 uz′′
 
q q̇
q q

rC 1 2
 2
t = AA B̄ p , B1 a ṗ

rC 1 2 2 2 2

tt = AA B̄(p , B1 a)p̈ + B̄(ṗ , B1 a)ṗ

rC 1 2 2 1 2 2
 
tq = 0 B̄(p, A B̄(p , B1 a)ṗ ) AA M̄(p , ṗ )B1 0
 
rC ˆ = 0 β 3 M̄(p, ṗ)A1 M̄(p2 , ṗ2 )B1 0
 
tq q̇
q

rC 1 2 2 2 2
  
ttq = 0 β 4 AA M̄(p , p̈ ) + M̄(ṗ , ṗ ) B1 0
 
03×10
   04×3 β5 C̄T (p, uz )A1 A2 B1 −C̄T (p, uz )A1 uz′′ 
rCT
q uz = T 2T 1T
 02×3 B1 A A C̄(p, uz )

q 02×2 02×1 
01×3 −uTz′′ A1T C̄(p, uz ) 01×2 0
26 E. J. HAUG

03×10
 
   04×3 β6 C̄T (p, ũz at )A1 A2 B1 −C̄T (p, ũz at )A1 uz′′ 
rCT
q ũz a
t
=
 
T
 02×3 B1 A A C̄(p, ũz at )
2T 1T 02×2 02×1

q 
01×3 −uTz′′ A1T C̄(p, ũz at ) 01×2 0
 
I3
β7
 
t
 
+  T 2T 1T T 

 ũz aq
 B1 A A A (p) 
−uTz′′ A1T AT (p)

where
β 1 = B̄ xp , b′ − sA1 uz′′ + A1 A2 B1 a + B̄ p, A1 A2 B1 xa − xs A1 uz′′
 

β 2 = B̄(ṗ, A1 A2 B1 ȧ − ṡA1 uz′′ ) + Z̄(ṗ, (A1 A2 B1 ȧ − ṡA1 uz′′ ))


β 3 = B̄(ṗ, A1 B̄(p2 , B1 a)ṗ2 ) + B̄(p, A1 M̄(p2 , ṗ2 )B1 ȧ)
β 4 = B̄ p, A1 B̄(p2 , B1 a)p̈2 + B̄(ṗ2 , B1 a)ṗ2


β 5 = K̄(b′ − sA1 uz′′ + A1 A2 B1 a, uz )


β 6 = K̄(b′ − sA1 uz′′ + A1 A2 B1 a, ũz at )
β 7 = B̄T (p, b′ − sA1 uz′′ + A1 A2 B1 a)
The suspension force acting in the front suspension strut, with a positive force tending to lengthen
the strut, is Fs = −k(s − sf ) − cṡ, where k and c are spring and damping coefficients. A free spring
length that causes the chassis to be near horizontal in equilibrium is sf = 0.6 + mg/2k / cos(φ). The
virtual work of the suspension force is δWs = δsFs = −δs (k(s − sf ) − cṡ). With a force Fd acting on
the chassis in the y′ direction, due to a clockwise torque T = 0.3Fd on the rear wheels about the x′ axis,
and a reaction torque on the chassis in the opposite sense, the generalized applied force on the chassis is
−mguz + Fd A(p)uy′
 

 2 0.3Fd Ḡ(p)T ux′ 


  
QA =  
02×1
 
 
−k(s − sf ) − cṡ
The equation of motion of the chassis is the same as the first of Eq. (35), with mass and Coriolis terms
of Eq. (110). Derivatives of inertial terms are as in Eq. (111) and derivatives of generalized force are
0 Fd B̄(p, uy′ ) 0 0
 

 0 0.6Fd T̄(ux′ ) 0 0 
 
QAq =  
 01×10 
0 0 0 −k
" #
09×9 09×1
QAq̇ =
01×9 −c
Two fork configurations are studied, one with a conventional angle of inclination of φ =
0.2 rad(11.46◦ ) and a second with φ = π/4 rad(45◦ ), the latter referred to as a “chopper” in motorcycle
parlance. The mass and principal moments of inertia of the chassis are m = 200 kg, Jx′ x′ = 30, Jy′ y′ = 15,
MECHANICS BASED DESIGN OF STRUCTURES AND MACHINES 27

Figure 6. Lane change maneuvers.

Table 4. Maximum constraint error for standard vehicle lane change.


Tolerance Position err. Velocity err. Acceleration err.
E-6 E-10 E-8 E-7
E-9 E-13 E-13 E-13
E-12 E-15 E-14 E-14

and Jz′ z′ = 30 kg · m2 and the acceleration due to gravity is 9.6 m/s2 . The suspension spring and
damping coefficients are k = 15,000 N/m  and c = 1,500 N·s/m. For initial conditions, with the suspension
spring free length sf = 0.6 + mg/2k / cos(φ), simulations are run with zero initial velocity and no
external forces other than gravity to permit the vehicle to settle to an equilibrium configuration, which
for φ = 0.2 rad is q0 = [0, 0, 0, 304, 1, 0, 0, 0, −0.062, −0.294, 0.621]T and for φ = π/4 rad it is
q0 = [0, 0, 0.314, 1, 0, 0, 0, −0.217, −0.207, 0.91]T .
A lane change maneuver to the left is simulated with a sinusoidal steer angle θ = −amp ·
sin (ωt) rad, for 0 ≤ ωt ≤ 2π, and θ = 0 thereafter. With an initial velocity of 15 m/s (≈35 min/h),
amp = 0.004 rad, and ω = om = 1 rad/s, the conventional configuration with φ = 0.2 rad executes the
approximately 4 m lane change shown at the left of Fig. 6. The chopper configuration with φ = π/4 rad,
the same initial velocity, amp = 0.0078 rad, and ω = om = 1 rad/s executes approximately the same
lane change shown at the right of Fig. 6. Thus, the standard configuration is substantially more sensitive
to steer input than the longer chopper, which might have been expected. Both simulations were carried
out with h = 0.001 s, intol = 10−6 , and utol = Btol = Htol = 10−7 . Total energy was constant to six places
for this essentially conservative system.
In the standard configuration lane change simulation with constant step size h = 0.001, i.e., 10,000
steps, all three methods required 8 reparameterizations (1250 time steps per reparameterization), all due
to a limit of 20 on the norm of v. Computing cost for reparameterization was negligible.
As a check on constraint error control, Tol = utol = Btol = Htol in Eqs. (17), (20), and (29) was varied
for the lane change maneuver with the standard configuration. Data in Table 4 show that maximum
position, velocity, and acceleration constraint errors over the simulation interval are driven toward zero,
to computer precision, as tolerances are tightened, with little increase in computing times for the tighter
tolerances.

10. Conclusions
The first-order index 0 DAE that govern motion of mechanical systems with holonomic and nonholo-
nomic constraints are shown to be well suited for integration with explicit and implicit numerical inte-
grators. Numerical results presented demonstrate that both holonomic and nonholonomic constraints,
28 E. J. HAUG

at configuration, velocity, and acceleration levels, are satisfied as accurately as desired using error control
mechanisms that are embedded in the formulation.
Since the method presented uses local tangent space configuration and velocity generalized coordi-
nates, the solution must be continued by redefining tangent spaces when criteria such as magnitude of
norm of independent coordinates, condition of the reduced mass matrix, and the number of iterations
required in numerical solution are exceeded. The redefinition of tangent space parameterizations and
restart of integration using both explicit and implicit integration methods is transparent to the user.
Timing of compute effort shows that the cost of redefining the local tangent space parameterization is a
negligible fraction of total compute time.
The formulation has been implemented using MATLAB, without any attempt to take advantage
of sparsity of matrices involved. A conservative strategy is used in frequently evaluating dependent
coordinates and matrices B and H that control constraint error and factoring reduced mass matrices
while solving equations arising in numerical integration. This leads to accurate results, but attendant
significant compute times.

References
Ascher, U. M., Petzold, L. R. (1998). Computer Methods for Ordinary Differential Equations and Differential-Algebraic
Equations. Philadelphia: SIAM.
Atkinson, K. E. (1989). An Introduction to Numerical Analysis, 2nd ed. New York: Wiley.
Betsch, P. (2004). A unified approach to the energy-consistent numerical integration of nonholonomic mechanical systems
and flexible multibody dynamics. GAMM-Mitteilungen 27(1):66–87. doi: 10.1002/gamm.201490003
Coddington, E. A., Levinson, N. (1955). Theory of Ordinary Differential Equations. New York: McGraw-Hill.
Corwin, L. J., Szczarba, R. H. (1982). Multivariable Calculus. New York: Marcel Dekker.
Hairer, E., Norsett, S. P. Wanner, G. (1993). Solving Ordinary Differential Equations I: Nonstiff Problems, 2nd ed. Berlin:
Springer-Verlag.
Hairer, E., Wanner, G. (1996). Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems, 2nd ed.
Berlin: Springer-Verlag.
Haug, E. J. (1989). Computer-Aided Kinematics and Dynamics of Mechanical Systems. Boston: Allyn and Bacon.
Haug, E. J. (2016). An index 0 differential-algebraic equation formulation for multibody dynamics: Holonomic
constraints. Mechanics Based Design of Structures and Machines, doi: 10.1115/1.4034425
Haug, E. J. (2017). An ordinary differential equation formulation for multibody dynamics: Nonholonomic constraints.
ASME Journal of Computing and Information Science in Engineering, this issue. doi: 10.1080/15397734.2016.1246370
Neimark, J. I., Fufaev, N. A. (1972). Dynamics of Nonholonomic Systems. Providence, RI: American Mathematical Society.
Rabier, P. J., Rheinboldt, W. C. (2000). Nonholonomic Motion of Rigid Mechanical Systems from a DAE Viewpoint.
Philadelphia: SIAM.
Rabier, P. J., Rheinboldt, W. C. (2002). Theoretical and numerical analysis of differential-algebraic equations. In Ciarlet,
P. G., Lions, J. L., eds. Handbook of Numerical Analysis, vol. VIII, Amsterdam: Elsevier Science B.V. 183–540.
Saha, S. K., Angeles, J. (1991). Dynamics of nonholonomic mechanical systems using a natural orthogonal complement.
ASME Journal of Applied Mechanics 58:238–243. doi: 10.1115/1.2897157
Schiehlen, W., and Eismann, W. (1994). Reduction of nonholonomic systems. In Kounadis, A. N., ed. Collection of Papers
Dedicated to Professor P. S. Theocaris, Athens, Greece: National Technical University of Athens, pp. 207–220.
Serban, R., Haug E. J. (1998). Kinematic and kinetic derivatives in multibody system analysis. Mechanics of Structures and
Machines 26(2):145–173. doi: 10.1080/08905459808945425

View publication stats

You might also like