Professional Documents
Culture Documents
(Mechanical Engineering Series) Richard A. Layton (Auth.) - Principles of Analytical System Dynamics-Springer-Verlag New York (1998) PDF
(Mechanical Engineering Series) Richard A. Layton (Auth.) - Principles of Analytical System Dynamics-Springer-Verlag New York (1998) PDF
Frederick F. Ling
Series Editor
Principles of Analytical
System Dynamics
With 94 Figures
" Springer
Richard A. Layton
Department of Mechanical Engineering
North Carolina A&T State University
Greensboro, NC 27411, USA
Series Editor
Frederick F. Ling
Ernest F. Gloyna Regents Chair in Engineering
Department of Mechanical Engineering
The University of Texas at Austin
Austin, TX 78712-1063, USA
and
William Howard Hart Professor Emeritus
Department of Mechanical Engineering,
Aeronautical Engineering and Mechanics
Rensselaer Polytechnic Institute
Troy, NY 12180-3590, USA
987654321
ISBN 978-1-4612-6832-1
To David P. Marx, former member of
the crew of planet Earth, engineer,
artist, colleague, and friend true and rare.
Mechanical Engineering Series
Frederick F. Ling
Series Editor
Advisory Board
vii
Preface
Preface ix
1. Introduction 1
1.1. A Perspective on Physical Systems 1
1.2. What This Book Is About 2
1.3. Background . . . . . . . 3
1.4. Overview of Topics . . . 5
1.5. Comments on Notation 6
2.4. Constraints . . . . . . . . . . . . 38
2.4.1. Displacement Constraints 38
2.4.2. Flow Constraints .. 39
2.4.3. Degrees of Freedom 43
2.4.4. Effort Constraints . 43
2.4.5. Dynamic Constraints. 46
2.5. Variational Concepts . . . . . 47
2.5.1. Classification of Displacements 47
2.5.2. Virtual Work . . . . . . 50
2.5.3. Lagrange's Principle .. 52
2.5.4. Classification of Efforts 55
2.6. Geometry of Constraint . . . . 61
2.6.1. Holonomic and ~ onholonomic Constraints . 61
2.6.2. Effort. Constraints and Dynamic Constraints 63
2.6.3. Virtual ;vlomentum . . . . . . . . . . . . . . . 63
Afterword 143
References 147
Index 151
1
Introduction
force on
brake pedal
DC hydralllic brake
motor pump cylinder rotor
pre,sure
sensor
1.3. Background
Methods of mathematically modeling engineering systems comprising me-
chanical, electrical, fluid, and thermal elements are known as unified meth-
ods. The unified methods developed in this book are based on a synthe-
sis of three areas of study: analytical dynamics, system dynamics, and
differential-algebraic equations.
Analytical dynamics or classical mechanics is a mature discipline hav-
ing its origins in the eighteenth and nineteenth-century work of Lagrange,
Hamilton, and Jacobi. Pars' [PI] excellent treatise gives a detailed exposi-
tion. (Goldstein's book [Go] is easier to find.) This field of study focuses
largely on mechanical systems and in particular the motion of rigid bod-
ies, although applications in electromechanical systems, fluids, and elastic-
ity are well known. The variational principles underlying the basic theory
are given by Lanczos [LI]. R.M. Rosenberg gives a cogent explanation of
d'Alembert's principle in [R2] and a thorough development of constraints
and the geometry of motion in [R3]. Haug [Ha] examines modern methods
of modeling and simulation. Williams [W 4] gives a comprehensive presenta-
tion of Lagrange's equation for mechanical and electromechanical systems
based on Hamilton's principle. From this field of study are taken the con-
cept of a variational operator, the classification of constraints, the use of
undetermined multipliers, and the concept of virtual work. Work, energy,
and constraint are the unifying concepts in generalizing the principles of
analytical dynamics to encompass multidisciplinary systems.
System dynamics is the study of unified methods of analyzing and mod-
eling multidisciplinary engineering systems. Such methods have been in
development for at least 50 years. Olson [0] examines the well-known dy-
namic analogies between equations of motion for systems of different disci-
plines. For electromechanical systems, White and Woodson [WW] use an
4 1. Introduction
where f and yare vector valued and the state variables (Yl (t), ... , )In(t))
are independent. Models of this type have gained prominence in engineering
partly because of the existence of robust solution techniques specialized for
this form. Another more general form is the implicit ODE, given by
F(Y,)I, t) = o. (1.2)
F(±, X,)I, t) = 0,
G(x,)I, t) = O. (1.3)
not ODEs" [P4]' and numerical methods for ODEs are not appropriate for
DAEs. Gear [Ge] and Brayton et al. [BGH] present practical methods of
solving certain classes of DAEs using backward differentiation formulas.
Numerical codes such as DASSL [P3], LSODI [Hi], and Idae [FLl] [FL2]
are currently available; experience in their use continues to accrue. Brenan
et al. [BCP] present an excellent discussion of the topic, with an extensive
bibliography. From this field of study is taken the concept of retaining alge-
braic constraints and dependent variables in a model, thereby eliminating
the manipulations aimed at reducing the model to minimum dimension.
While certain classes of DAEs cannot today be reliably solved, numerical
solution of initial-value problems in DAEs is a current research topic.
For the reader interested in exploring these topics further, we suggest
[Ll] for variational principles, [R3] for analytical dynamics, [KMR] and
[RW] for system dynamics, and [BCP] for differential-algebraic equations.
There are other good references on these subjects but these are the ones
we refer to most often and which have contributed most significantly to our
own studies.
Unified methods of modeling physical systems are based on the idea that
the storage, transmission, and transformation of power and energy among
system components and between a system and its surroundings are the
fundamental processes underlying a system's dynamic behavior. Well stead
[W3] states the idea succinctly:
The first pair of variables in the unified set are effort and flow. Effort e(t)
and flow f(t) represent physical quantities satisfying the power postulate
[B2].
Energy E(t) is the time integral of power and is given in terms of effort
J J
and flow by
E(t):= P(t) dt = e(t)f(t) dt. (2.2)
The second pair of variables in the unified set are momentum and dis-
placement, known also as energy variables because kinetic energy has a
functional dependence on momentum and potential energy has a functional
dependence on displacement. Momentum p(t) and displacement q(t) are de-
fined:
or in differential form,
P = e, (2.5)
q=f. (2.6)
EXAMPLE 2.2. Discipline-specific examples of (2.6) are that the time rate
of change of position :i: is velocity v, the time rate of change of charge q is
current i, the time rate of change of volume V is volume flow rate Q, and
so forth. 0
(2.7)
where p is the fluid density and Q is flow rate [SMR] [RW]. Flow rate and
velocity v are related by Q = Av and dynamic pressure in this case is given
by Pd = ~ pv 2 . Substituting these expressions into (2.7) yields
2l pv 2 2l
Pp = plv = -- = -Pd, (2.8)
V 2 v
demonstrating that Pp is a function of Pd. <>
Energy sources, stores, and dissipators are typical I-ports; power trans-
formers and power transducers are representative 2-ports.
System components are distinguished further by their individual consti-
tutive laws, which specify the dynamic behavior of a component in terms of
the unified set of variables. The form of the constitutive law indicates the
2.2. Classification of Discrete Elements 11
The constitutive laws in this example are linear or ideal. An ideal kinetic
store is characterized by a constant generalized inductance I. Common
ideal kinetic stores and their inductance properties are listed in Table 2.3
with SI units in parentheses.
A nonideal kinetic store is characterized by a nonlinear constitutive law.
The functions shown in Figure 2.1 illustrate the general difference between
linear and nonlinear constitutive laws of kinetic stores.
aYalid for: rotation about the center of mass; rotation about a fixed
point; or all forces acting through the center of mass.
12 2. Fundamentals of System Dynamics
j",(p) nOnlilWar
E= Jfdp. (2.10)
When the integrand is the flow f(p) of a kinetic store, energy is a function
of p. This energy, stored in an inductor by virtue of its momentum p, is
called kinetic energy T(p) defined by
where the integrand f(p) is the constitutive law fa (p). Because this form of
energy depends functionally on momentum, momentum is called an energy
variable.
T(p) = J v(p)dp= J m
P
dp= 2m'
p2
(2.12)
(P
+ Lin
n
T(p) = To fj(p) dp. (2.14)
j=1 po
The jth partial derivative of this expression yields the differential form
(2.15)
J
defined
T*(f):= p(f) df, (2.16)
where the integrand p(f) is the constitutive law Pa (f) = [fa (p) r 1.
The jth partial derivative of this expression yields the differential form
oT*
ofj = Pj, (2.20)
Details of the transformation are given in [WW] and [MR] and are sum-
marized in Sec. 4.1. For a single element, this relationship can be given the
area representation shown in Fig. 2.2, where fCL(p) is the constitutive law
of a kinetic store.
The area representation of Fig. 2.2 illustrates three characteristics of
kinetic energy and coenergy. First, energy and co energy are scalar quanti-
ties. Second, energy and coenergy are path-independent functions or state
functions since they are independent of the time histories or trajectories
of system momentum and flow. They depend only on the endpoints of the
path, that is, the state of system momentum and flow at initial and final
times. Third, kinetic energy and co energy are distinct representations of
the energy of a kinetic store and are not necessarily equal numerically even
though they are based on the same constitutive law. Energy and coenergy
differ in the choice of independent variable--energy varies with momentum;
coenergy varies with flow.
The distinction between kinetic energy and coenergy is important in
analytical dynamics. Kinetic coenergy T* (f) is the proper form to use in
the classical Lagrangian C(f, q) := T*(f) - V(q) but kinetic energy T(p) is
the proper form to use in the classical Hamiltonian H(p, q) := T(p) + V(q).
For a system in an inertial reference frame with only linear inductors,
the kinetic energy and coenergy of the system are given by the quadratic
2.2. Classification of Discrete Elements 15
p2 H2 )..2 p~
Energy T(p)
2m 21 2L 2If
expressions
Expressions of these functions for common ideal kinetic stores are given
in Table 2.4. All functions have units of Joules (J). In this case the two
representations produce the same numerical value. For example, for a mass
m in nonrelativistic translation, p = mv and
p2 (m v ) 2 1 2 *(
T ()
p = - = - - = "2mv = Tv). (2.23)
2m 2m
This equivalence of energy and co energy holds only for elements with linear
constitutive laws.
E = J edq. (2.24)
___ "r;;~ __
~~vkV-
-F(x)
where the integrand e(q) is the negative of the constitutive law ea(q). Be-
cause this form of energy depends functionally on displacement, displace-
ment is called an energy variable.
V(q) = Va - Ll n
q
ej(q) dq. (2.27)
j=1 qo
°
The origin of the reference frame is often selected to be a convenient datum
or equilibrium position such that qa = and Va = 0.
The jth partial derivative of (2.27) yields the differential form
OV
- - =ej, (2.28)
oqj
where ej = -( ea k This differential equation relates the constitutive be-
havior of an individual potential store to the total potential energy of a
system. Efforts satisfying this relationship are called potential efforts e V •
These definitions are consistent with the classical definitions of potential
function, potential effort, and potential energy, adapted here from [R3]:
18 2. Fundamentals of System Dynamics
J
is defined
V*(e) := ~ q(e) de, (2.29)
V*(F) = ~ J x(F)dF = ~ J F
~-dF = - .
k
F2
2k
(2.30)
V*(e) = Va* ~ L
n r qj(e) de.
Je
e
(2.32)
j=1 eo
The jth partial derivative of this expression yields the differential form
~
av'
-;::;-- = qj, (2.33)
Uej
For a single element, this relationship can be given the area representation
shown in Fig. 2.5, where ea(q) is the constitutive law of a potential store.
This figure illustrates that energy and coenergy are scalar quantities, state
functions, and, though based on a single constitutive relationship, distinct
representations of the energy of a given potential store. Potential energy
and coenergy differ in the choice of independent variabl~nergy varies
with displacement; coenergy varies with effort.
For a system in an inertial reference frame with only linear capacitors,
the potential energy and coenergy of the system are given by the quadratic
expressions
V(q) = ~~ q;
2 L.- C
j=l J
and V*(f) =~ t
j=l
Cje;' (2.35)
Expressions of these functions for common ideal potential stores are given
in Table 2.6. All functions have units of Joules (J). In this case the two
representations produce the same numerical value. For example, for a linear
electrical capacitor, q = Ce and
This equivalence of energy and co energy holds only for elements with linear
constitutive laws.
q2 V2
Energy V(q) ~kX2 ~ke(}2
2C 2C,
F2 T2
Co energy V*(e) ~Ce2 ~C,P2
2k 2ke
20 2. Fundamentals of System Dynamics
where the integrand e(f) is the negative of the constitutive law ec,(f).
Content is a multidisciplinary form of Rayleigh's dissipation function and
has units of power, not energy.
D(i) = - Je(i)di = - J
-Ridi = ~Ri2. 0 (2.39)
j=l 10
f (2.40)
J
defined
G(e) := - f(e) de, (2.42)
22 2. Fundamentals of System Dynamics
where the integrand J(e) is the negative of the constitutive law Ja(e)
[ea(f)rl.
G(e) = Go - Ll
n
e
Ji(e) de. (2.45)
j=l eo
The jth partial derivative of this expression yields the differential form
(2.46)
For a single element, this relationship can be given the area representation
shown in Fig. 2.7, where ea(f) is the constitutive law of an ideal dissipator.
This figure illustrates that content and co-content are scalar quantities,
state functions, and, though based on a single constitutive relationship,
distinct representations of the energy of an ideal dissipator. Content and
co-content differ in the choice of independent variable-content varies with
flow; co-content varies with effort.
For a system in an inertial reference frame with only linear resistors, the
content and co-content of the system are given by the quadratic expressions
1 n e2
and G(e) = -2~R
" --1... (2.48)
j=l J
2.2. Classification of Discrete Elements 23
Cli)
2 2
D(i) = ~Ri2 = ~R = ;R = G(e). (2.49)
This equivalence of energy and co energy holds only for elements with linear
constitutive laws.
Paynter's Diagram
Paynter's diagram, shown in Fig. 2.8, is a convenient mnemonic device
for displaying the relationships among the unified set of variables. The
vertices of the figure are labeled with the unified set of variables (e, f, p, q).
The line segment between p and e represents the dynamic requirement.
The line segment between q and f represents the kinematic requirement.
The line segment between p and f represents the constitutive law of a
kinetic store feAP) which underlies the kinetic-store energy functions T(p)
and T* (J). The line segment between q and e represents the constitutive
law of a potential store eel (q) which underlies the potential-store energy
functions V (q) and V' (e). The line segment between f and e represents the
constitutive law of an ideal dissipator eel(J) which underlies the dissipation
state functions D(J) and G(e).
P D(J),G(e) q
T(P),T'(f) q = Jfdt
f
FIGURE 2.8. Paynter's diagram, illustrating the relationships among the gener-
alized variables. (Adapted from [P2J.)
2.2.4. Sources
Sources of power or energy are I-ports having constitutive laws that can
be thought of as imposing certain boundary conditions on a system [P2j.
Sources are often deterministic, although some source constitutive laws
are not known a priori. The optimal control problem is typical of this
class of problems, where control inputs to a system can be thought of
as undetermined sources. For the purposes of this book however source
constitutive laws are assumed to be known.
Sources are generally of two types, sources of effort eS(t) or sources of
flow f"(t). Since either the effort or flow of a given source is prescribed,
the other power variable is free to increase as large as the system demands.
This implies that a pure source can supply an indefinitely large amount
of power, which of course is not true of real devices. Such limits on the
performance of real devices are modeled separately from the prescribed
effort or flow characteristic of the pure source.
Examples of real devices that approximate pure sources are shown in
Table 2.9, adapted from [SMRj.
P=Fv=-p,Nv. (2.50)
Ed = J J
Pdt= Fvdt=- J p,Nvdt. (2.51 )
E d =_ 1 t
to
ds
p,N-dt=-
dt c
1
p,Nds. (2.52)
n
lever
electrical
transformer
C electro-
magnetic
motor,
generator o
rotation0 gear
paIr
fluid
transformer
Transformers
Transformers are power-conserving 2-ports that couple subsystems of the
same energy domain. Transformers are characterized by a constitutive-law
pair. One law has the form of a displacement constraint or possibly a flow
constraint and the other law has the form of an effort constraint.
(2.54)
Transformer laws having the form ¢(q) are modeled as displacement con-
straints (Sec. 2.4.1). Transformer laws having the form "((e), because they
involve constraint efforts e<P that do no virtual work (Sec. 2.5.3), are ne-
glected in formulating equations of motion (Sec. 3.2.1).
Common transformers, their moduli, and their constitutive laws are sum-
marized in Fig. 2.10. Some laws are formulated as flow constraints 1jJ(j)
instead of displacement constraints ¢(q).
28 2. Fundamentals of System Dynamics
~ X
Xl L_~ll==::E::=7F'==1~2==--=(2 J
(a) (b)
(c) (<I)
FIGURE 2.10. Ideal power transformers. Moduli f3 and constitutive laws cP, 1jJ,
and I are given. (a) Lever; (b) gear pair; (c) electrical transformer; and (d) fluid
differential transformer. (Adapted from [RW].)
2.2. Classification of Discrete Elements 29
Transforming Transducers
Transducers are power-conserving 2-ports that couple subsystems of differ-
ent energy domains. Transforming transducers are characterized by a pair
of constitutive laws similar to those of transformers. One law has the form
of a displacement constraint or possibly a flow constraint and the other law
has the form of an effort constraint.
where the modulus (3 is the pinion radius r. The derivative of this constraint
yields i: = (38, which is substituted in the power-conservation equation to
obtain
,(T, F) := T + (3F = 0. <> (2.56)
Transducer laws having the form ¢(q) are modeled as displacement con-
straints (Sec. 2.4.1). Transducer laws having the form ,(e), because they
involve constraint efforts e¢ that do no virtual work (Sec. 2.5.3), are ne-
glected in formulating equations of motion (Sec. 3.2.1).
Common transforming transducers, their moduli, and their constitutive
laws are summarized in Fig. 2.11. Some laws are formulated as flow con-
straints 7jJ(j) instead of displacement constraints ¢( q).
Gyrators
Gyrating transducers, or gyrators, are characterized by a pair of constitu-
tive laws where both laws have the form of effort constraints in which effort
at one port is related to flow at the other port.
T.O
----
Po P
~-F L-...
v
ep(O,x):= ,60 - x = 0 ?)J(V, Q) := 6v - Q = 0
reT, F) := T+ (3F = 0 reF, P) := F + (3(P - Po) = 0
(3 := pinion radius r (3 := piston area A
(a) (b)
P
-Q
reservoir
?)J(w, Q) := (3w - Q = 0
reT, P) := T+ (3P = 0
(3 := pump displacement V
(c)
FIGURE 2.11. Ideal power transducers of the transforming type. Moduli (3 and
constitutive laws ep, ?)J, and r are given. (a) Rack and pinion; (b) ram-cylinder;
and (c) positive-displacement pump. (Adapted from [RW].)
2.2. Classification of Discrete Elements 31
!
(a) (b)
'Yl(e,v) := e - {3v = 0
- e + F,v
'Y2(F, i) := F - {3i = 0
magnet ~,~Oi~ {3 := current constant Ka
(c)
FIGURE 2.12. Ideal power transducers of the gyrating type. Moduli {3 and con-
stitutive laws '1' are given. (a) DC motor; (b) mechanical gyrator; and (c) voice
coil. (Adapted from [KMRJ.)
Gyrator constitutive laws are modeled as effort constraints I'(e) and ef-
forts exerted by gyrators are implicit efforts e"l (Sec. 2.4.4) that contribute
to the vector of applied efforts Q (Sec. 2.5.4). Common gyrators, their
moduli, and their constitutive laws are summarized in Fig. 2.12.
Signal Transducers
Signal transducers are 2-ports for which power transfer is assumed to be
inefficient, that is, the transducer draws very little energy from the systems
to which it is connected. Unless the dynamic behavior of the transducer
itself is of interest, signal transducers are typically represented by a single
constitutive relationship.
Transactors
A transactor is a two-port element that contains a controlled source (effort
or flow) at the output port, while the controlling variable (effort or flow)
operates at the input port. At the input port, either effort or flow is zero [S].
The complete set of transactors for electrical systems is shown in Fig. 2.14.
Transactor laws having the form 1jJ(f) are modeled as flow constraints
(Sec. 2.4.2). Transactor laws having the form ,(e) involve implicit efforts
e"l (Sec. 2.4.4) that contribute to the vector of applied efforts Q (Sec. 2.5.4).
it =0
12 = /Jej
(a)
ej = 0
e2 = /lit
(d)
e e
e~ = _ av ~ av
p=e aq p=e e =--
aq
p d aD d aD
e =- af q p e =--
aq
q
pT =
aT*
7fT q=f r= aT
ap
f f
(a) (b)
FIGURE 2.15. Paynter's diagram and variable-pair selection. (a) Lagrangian for-
mulation; and (b) Hamiltonian formulation.
(2.60)
(2.61 )
(a) (b)
The symbols (Ui, it i , ei, l?i) denote components of these vectors that act in
a particular coordinate direction. Flow component it i , for example, is the
the time derivative of Ui, effort component ei acts in the direction of Ui,
and so forth.
such that
--,~------- U2
Ul
When reduced-order coordinates (ql, ' .. , qn) are used to describe the con-
figuration of a system, all system variables are represented in n-dimensional
form, that is,
The symbols (qj, Ij, ej, PJ) denote components of these vectors that act in
a particular coordinate direction. Flow component }j, for example, is the
the time derivative of qj and effort component ej acts in the direction of qj'
This reduced-order, n-dimensional representation of the unified set of
variables is used henceforth in developing the definitions, principles, and
equations of motion of Lagrangian and Hamiltonian system dynamics. A
parallel development can be made using N-dimensional configuration co-
ordinates, but the differences between the two developments are mainly
38 2. Fundamentals of System Dynamics
2.4. Constraints
Physically, constraints are limitations on system dynamic behavior typi-
cally due to constitutive behavior, component interconnections, and bound-
ary conditions. In terms of a mathematical model, constraints are condi-
tions that the state variables must satisfy in addition to the differential
equations of motion.
¢(q, t) = 0, (2.71)
where q = (ql, ... , qn). Holonomic conditions in standard form (2.71) are
designated displacement constraints ¢. Holonomic conditions not in stan-
dard form are typically expressed as flow constraints (Sec. 2.4.2).
= o. (2.73)
'---"
x
(2.74)
(2.75)
EXAMPLE 2.24. The currents at node a in the circuit shown in Fig. 2.20
satisfy the flow constraint given by
(2.77)
(2.78)
Neither the inductor nor the resistor in this example acquire a charge q,
but both elements undergo a displacement q since by definition q = i dt. J
A displacement of this type can be called an intangible displacement since
it represents a quantity (in this case, charge) physically intangible in the
component it describes. In contrast, the charge of the capacitor is a tangible
displacement. Conditions like (2.77) that constrain tangible displacements
must be integrated to correctly represent the constraining condition.
40 2. Fundamentals of System Dynamics
EXAMPLE 2.25. In the simple fluid system shown in Fig. 2.21, the inlet
rate QI, the volume rate Q2, and the outlet rate Q3 are related by the flow
constraint given by
(2.79)
Letting V20 represent the initial volume of the tank, this expression can be
integrated to obtain
(2.80)
Of
'--_ _ _ _ _ _ - Q 3
Nonholonomic constraints considered in this work are those that are re-
ducible to Pfaffian form, given for the kth constraint by
n
"'[:)kj(q, t) dqj + bk(q, t) dt = 0, (2.81)
j=1
or in vector form,
Bdq + bdt = 0, (2.82)
where
(tan e) dx - dy = 0, (2.85)
which is in Pfaffian form with the coefficients of de and dt equal to zero. This
constraint can be shown to be nonintegrable and therefore nonholonomic.
Integrability conditions are given in [R3]. <)
42 2. Fundamentals of System Dynamics
This equation has the same form as the integrable fiow constraint (2.75)
with bkj = a(/lk / aqj and bk = a(/Jk / at. This form, which is linear in flow and
can be used to represent both holonomic and nonholonomic constraints is
designated a flow constraint 1jJ.
A set of flow constraints is denoted by the vector IJ1 given by
=0. (2.87)
(2.88)
+ v
v= -1 In ( -:-
i + 1) . (2.93)
a ~s
This expression could be used in the equations of motion but the implicit
form (2.92) is more tractable numerically than the explicit form (2.93).
Hence the implicit form of the effort constraint is retained and the implicit
effort e'Y contributes to the vector of applied efforts Q (Sec. 2.5.4). The
implicit efforts are additional unknowns for which a solution is sought in
solving the equations of motion.
Implicit efforts (T, e) are unknowns that contribute to the vector applied
efforts. 0
where Fx and Fy are known components of force acting on the mass, and
ei and e~ are unknown components of friction force.
In the absence of friction, two differential equations would be sufficient for
solving for (x, y). \Vith friction, however, two additional unknowns (ei, e~)
are present in the equations of motion. The necessary additional equations
are effort constraints.
YL
2.4. Constraints 45
instantaneous
x velocity of
particle
......... ---
As illustrated in Fig. 2.25, the first effort constraint relates the implicit
efforts to the total magnitude J.Lmg of the friction force. This constraint is
given by
(2.96)
The friction force opposes the instantaneous motion of the mass. Thus
the components of the friction force are in the same proportion as the
components of velocity, that is, e~/el = yj±, which is rearranged to obtain
the second effort constraint,
'Yk(e7,s,j,q,t) = o. (2.98)
'Yl(e"f,s,j,q,t) 1= o.
r(e"f,s,J,q,t):= [ : (2.99)
'Ym3 (e"f, s, j, q, t)
46 2. Fundamentals of System Dynamics
(2.100)
s= q - qr, (2.101)
e'Y = Ks. (2.102)
ie - 1) - CtJIes(elicvc - 1) + Ce'li e ,
= Ies(e liev ,
ic = -Ies(e licvc - 1) + CtNIes(elicvc - 1) + Ceve, (2.103)
"/'l := SI - Ve = 0,
1'2 := S2 - Ve = 0, (2.105)
where Ve and Ve are implicit efforts. 0
where A is defined
A(e'Y,s,j,q,t):= [
Al(e\s,j,q,t)
:
1
. (2.108)
Am, (e\ s, j, q, t)
and (2.111)
5(x + y) = 5x + 5y,
5(x,y) = (5x,y) + (5y,x), (2.112)
(2.113)
EXAMPLE 2.32. A bead is free to slide along a rod which rotates in the xy
plane with a constant angular velocity woo At time to the bead has position
(xo, Yo) and a velocity Vo given by (xo, Yo). In Fig. 2.27(a), the state of the
system is shown at time to.
Actual displacements (6.x,6.y) resulting from the actual motion of the
bead along trajectory C on the finite time interval [to, t + 6.t] are indicated
in (b). Possible displacements (dx, dy) associated with the infinitesimal time
interval dt are shown in (c). These displacements are consistent with the
2.5. Variational Concepts 49
/
/
/
Y Y
\w
,'~ actual position at
,,' time to + l!.t
. .,,/
r.1.-
/ 'L --____
-r-/
I ---
l!.y I
/ " ,,
/
/ ,,
/
C
,
~trajectory
cI
/
l!.x
xo x x
(a) (b)
y ,, Y
/'./.
I '
I /
,, ,?-.../
Id
, I
,
_-
I
/ ..........
'" Y
,
/
/
I8y
,,
/
X X
(c) (d)
FIGURE 2.27. Classification of displacements. (a) State of the system at time to;
(b) actual displacement; (c) possible displacement; and (d) virtual displacement.
(Adapted from [DGJ.)
constraints but do not necessarily follow the trajectory C. The virtual dis-
placements (ox,oy) of the bead in (d) lie along the line of the rod since
virtual displacements may not violate the constraints at the instant the
variation is considered.
The coordinates (x, y) of the bead and the angle 0 of the rod must satisfy
tanB = (y - c)/x. Substituting wot for 0, this displacement constraint is
given by
¢(x, y, t) := xtanwot - y + c = o. (2.114)
Possible displacements (dx, dy) satisfy the Pfaffian form of this constraint,
(tanwot) ox - oy = O. 0 (2.116)
6W := (e,6q). (2.118)
The symbol 6W represents the work of efforts acting through virtual dis-
placements in the same way that itW represents the work of efforts act-
ing through possible displacements. Both expressions capture the path-
dependent nature of work. The term 6W does not represent a variation of
work in the same way that 6q represents a variation of configuration.
Equivalent forms of virtual work among the engineering disciplines are
given in Table 2.10 with SI units in parentheses.
Flow-Momentum Form
A second form of the work differential is given as follows:
itW = (e, dq) = (p, f dt) = (f, dp), (2.119)
6W = (f,6p). (2.120)
Equating the two forms of virtual work (2.118) and (2.120), virtual mo-
menta are defined as the infinitesimal quantities bpj that satisfy
The kinetic energy of the system is given by T(p) = p2/2m. The variation
of T is given by
aT
bT = -bp = -bp.
p
(2.123)
op m
m -F
A key assertion in this example is the equivalence of virtual work and the
variation of energy. This variational work-energy relationship is developed
in more detail in Sec. 3.1.
EXA:-'1PLE 2.34. As shown in Fig. 2.29, mass m moves with velocity i; down
an incline subject to applied force F(t), gravity force rng, normal force N,
and friction force J.1N. The mass stays in contact with the surface without
penetrating the surface.
Id' Alembert's principle states that the totality of constraint forces does not contribute
to the motion of a system of particles. Consequently constraint forces constitute a set
of forces in equilibrium [R2].
2Bernoulli's virtual work principle states that static equilibrium may be characterized
through requiring that the work done by forces in equilibrium. during a small displace-
ment from equilibrium. should vanish [T].
2.5. Variational Concepts 53
mg
N
()
from which it follows that the virtual displacements (tSql' tSq2) satisfy
(2.130)
(2.131)
The minus sign appears because the voltage e opposes the assigned positive
direction of current i. Solving (2.128) for el and substituting into the virtual
work equation yields
(2.132)
From (2.130), the parenthetical term -{3tSql +tSq2 vanishes. It follows that
tSw vanishes, hence
(2.133)
The voltages (el' e2) are constraint efforts e<P since in their totality they do
no virtual work. 0
III I-----~~
~
( I
\ ) ) ) [
i
--.J _ _ _ _ _
Fa
____
(2.135)
are called constraint efforts. All other efforts are called given efforts e9 .
The primary virtue of this basic classification is that because the virtual
work of constraint efforts vanishes, the constraint efforts can be neglected
in the analysis of a system. An analogous situation exists in the mechanics
of Newton. (This analogy is adapted from [R3].)
A distinguishing characteristic of Newtonian mechanics is the basic clas-
sification of forces as either internal forces or external forces. Newton's
third law of motion is the postulate that allows the class of internal forces
to be neglected in the analysis of dynamic systems.
A similar classification exists in analytical dynamics. A distinguishing
characteristic of analytical dynamics is the basic classification of efforts as
either constraint efforts or given efforts. Lagrange's principle is the postu-
late that allows the class of constraint efforts to be neglected in the analysis
of multidisciplinary systems. (See Sec. 3.2.1.) That the virtual work of con-
straint efforts vanishes is the justification for using virtual displacements
in system dynamics.
This basic classification also underlies the fundamental distinction be-
tween kinematic constraints and all other constraints. Kinematic constraints
¢( q, t) and 1f;(j, q, t) give rise to constraint efforts e¢ that in their totality
do no virtual work. All other constraints give rise to given efforts that in
their totality do virtual work, that is,
(2.136)
Given Efforts
Given efforts are classified as either potential efforts e V or nonpotential
efforts en such that e 9 = e V + en. Potential efforts satisfy the definition of
potential energy V, that is,
v oV (2.137)
eJ = - oqj·
All given efforts that are not potential efforts are called nonpotential efforts.
56 2. Fundamentals of System Dynamics
Nonpotential Efforts
Nonpotential efforts are classified as kinetic efforts eT ' (or e T ), dissipation
efforts ed, source efforts e S , and implicit efforts e"Y, such that en = e T ' +
ed + e S + e"Y. Kinetic efforts are defined in the next section. Source efforts
are exerted by effort sources and dissipation efforts satisfy the definition of
the dissipation function D, that is,
d aD (2.1:38)
eJ = -~.
fJ
All non potential efforts that are not kinetic efforts, dissipation efforts, or
source efforts are implicit efforts, which in general give rise to effort con-
straints f.
Kinetic Efforts
In configuration coordinates, kinetic coenergy due to the kth component of
flow is expressed T* (Uk). In some cases, T* is also a function of a displace-
ment Ui not Uk, expressed T*(Uk' u,), where i i= k. Time t also can appear
explicitly in this function. Therefore the kinetic coenergy of a system has
the general form T*(u,u,t).
In physical systems in which the co energy function of the system T* is
a function of a coordinate Ui, a kinetic effort e:( exists that satisfies
aT*
e( = -a
Ui
. (2.139)
T*(q,:i;,x) = J m:i;d:i; + J
L(x)qdq
m Dig:;".:·.·
iroll corp ~ I
I
I
I
I
x
Xc
(a) (h)
FIGURE 2.32. A simple model of a solenoid. (a) Solenoid; and (b) inductance
function. (Adapted from [CKKPBj.)
Kinetic efforts are also artifacts of the coordinate selection scheme used
to represent the motion of a system. Such efforts may not have a one-to-one
correspondence with actual physical efforts as in the previous example, but
are present in a model to represent physical efforts in terms of the selected
coordinates.
From (2.67), the function Uk(q,q,t) expresses the kth flow variable in
terms of the reduced-order coordinates. Consequently, kinetic co energy
T* (Uk) is expressed T* (q, q, t). Since this is true for all k, the kinetic co-
energy of a system using reduced-order coordinates has the general form
T*(q,q,t).
EXAMPLE 2.38. A two-link robot arm is shown in Fig. 2.33. The mass of
the robot is lumped in two locations ml and m2 and the links are rigid
and massless. The robot moves in the xy plane, and external forces act as
shown.
Using configuration coordinates (Xl, Yl, X2, Y2), the kinetic coenergy func-
tion is given by
(2.143)
Angular coordinates (0 1 , O2 ) are a set of reduced-order coordinates (in this
case, Lagrange coordinates) for this system. Displacement transformation
equations relating (Xl, Yl, X2, Y2) and (0 1 , O2 ) are given by
Xl = II COSOl,
Yl = h sin 01 , (2.144)
X2 = II cos 0 1+ 12 COS02,
Y2 = II sin 01 + 12 sin O2 .
58 2. Fundamentals of System Dynamics
Xl = -11th sine 1 ,
VI = 118 1 cose), (2.145)
X2 = -I) 8) sin e1 - 12 82 sin e2 ,
V2 = 1r8) cos e1 + 12 82 cos e2 .
Kinetic co energy is given by
* .
T (e, e) = 2m111 e1 + 2m2 I) e1 + 12 e2
1 2 ·2 1 [ 2 ·2 2 ·2
/2x
EXAMPLE 2.39. Momentum coordinates (p1,P2) for the two-link robot arm
are shown in Fig. 2.34. By definition, these coordinates satisfy Pi = 8T* j8i ,
that is,
(2.147)
L
j=1
~ - Ij )
n (aT
p]
8pj + Ln(aT*
j=1]
)
ai - Pj 8Ij + Ln
j=1
(aT
~
q]
aT* )
+~
q]
8qj = O.
(2.151)
By definition, the first two parenthetic terms vanish, yielding
(2.152)
The term aT' / aqj is the kinetic effort ej'. The term aT / aqj is a second
form of kinetic effort, designated ej. When kinetic energy T is a function
of a coordinate qj, a kinetic effort ej is defined that satisfies
T aT
ej = aqj' (2.153)
Applied Efforts
The virtual work of effort sources and implicit efforts is given in terms of
configuration coordinates by
en
N
8W =L (ef + 8u;. (2.154)
;=1
= L ~8qj.
n aUi
8Ui (2.155)
j=1 q]
=~
~
(~ ~ aUi )
~ e, a . + ~ e, a .
s aUi 'Y
j=1 i=1 q] i=1 q]
"'--v--" ~
e]S e'Y
]
n
= L(ej + ej) 8qj. (2.156)
j=1 ------
Qj
The sum of efforts ej + ej is designated an applied effort Qj, representing
the resolution of all effort sources and implicit efforts into components
acting in the directions of the reduced-order coordinates qj. (In mechanics,
applied efforts are usually called generalized forces.)
2.6. Geometry of Constraint 61
EXAMPLE 2.40. The virtual work of the force sources acting on the two-
link robot arm system shown in Fig. 2.33 is given by
(2.157)
The applied efforts Qi in this case are the given components of force.
The variation of the displacement transformation equations yields
°
is orthogonal to 5q, implying that e¢ is instantaneously normal to the
constraint surface cp(q,t) = for all t. Constraint gradients V¢k are also
normal to the constraint surface, and if the constraints are independent,
the gradients form a basis for the normal space. Since e¢ lies in the normal
space, it can be expressed as a linear combination of these basis vectors.
For a holonornic system this linear combination is given by
(2.161)
or,
(2.162)
(2.163)
or,
(2.164)
where", = ("'1, ... , "'ml) arid Ji = (Ji1, ... , Jim2) are Lagrange multipliers.
----"'.,~\
\A.
q(t)
(2.165) yields
(2.166)
which is true if and only if ,sqA = 0. Thus 'PA = (eex,O) and,sA = (O,,sPA).
Both vector:s are shown at point A in Fig. 2.37.
At point B, (q, p, f, e) are nonzero and nonextreme. The relationship
(2.167)
Thus the vector ,sB = (,sqB, ,sPB) lies on a line tangent to the trajectory of
motion as shown in Fig. 2.37 and 'PB = (eB, - fB) is orthogonal to ,sB.
At point C momentum P is at an extreme (Pex) and effort e = dp/dt is in-
stantaneously zero; displacement q is zero and flow f = elq/ elt is necessarily
at an extreme (JeT)' Substituting into (2.165) yields
'PA I q(t)
"
FIGURE 2.37. A phase-space interpretation of virtual momentum.
2.6. Geometry of Constraint 65
which is true if and only if bpe = O. Thus 'Pc = (0, - fex) and be = (bqe, 0).
Both vectors are shown at point C in Fig. 2.37.
It is concluded from Fig. 2.37 that the variation vector 15 = (bq,bp)
always lies on a line tangent to the phase-space trajectory of motion and
that the forcing function 'P = (e, - f) lies on a line normal to the trajectory
of motion. 0
dE = dW +dQ, (3.1 )
The total virtual work in a system is the work of all efforts acting at an
instant over the set of virtual displacements,
n
iSw(total) =L (e + eJ + e':J + eJd + eJ + e1')
'"" J 4) T' S
J
iSqJ" (3.5)
J=1
By Lagrange's principle, the virtual work of the constraint efforts e<P van-
ishes and it is shown below that the virtual work of kinetic efforts e T ' and
potential efforts e': are consequences of (3.4). Thus virtual work in (3.3) is
due to dissipative efforts cd, source efforts e S , and implicit efforts c1' acting
3.2. Lagrange's Equation 69
(3.7)
(3.8)
A term like EJT I EJt Ot does not appear since time t is not varied. Similarly,
the variation of V(q, t) is given by
(3.9)
(3.10)
Lfjopj = Lejoqj
j=1 j=1
n
(3.12)
70 3. Lagrangian DAEs of Motion
(3.13)
Substituting (3.12) and (3.13) into (:3.10) and collecting terms yields
(3.14)
Note that the left-hand side of this equation contains the terms
and (3.15)
By (2.142) the first term is the negative of the virt ual work of all kinetic
efforts ej' ,
naT' n.
-L ~ 6qj = - L ej 6qJ, ( 3.16)
j=1 h J=1
and by (2.28) the second term is the negative of the virtual work of all
potential efforts ej,
(3.17)
justifying the exclusion of kinetic efforts eT ' and potential efforts ej from
6w(n) (3.6). The virtual work of kinetic efforts appears in (3.3) as a con-
sequence of the variation of kinetic energy 6T and the virtual work of the
potential efforts appears as a consequence of the variation of potential en-
ergy 6V.
Lastly, the substitutions e1 = -aDjaqj (2.41) and ej + e} = Qj (2.156)
are made in (3.14) and the terms are rearranged to obtain
L (ddt YaT'qJ - ~
n
j=l
aT'
q]
av aD
+~q]
+~
q]
) _
- Qj oqj = 0, (3.18)
or in vector form,
EXAMPLE 3.l. To model the two-link robot arm shown in Fig. 2.33 using
the Lagrangian ODE, energy functions and virtual work are expressed in
terms of the Lagrange coordinates (B1' B2)' For this simple model V = D =
o and kinetic co energy is given by (2.146):
T * = 2m111B1
1 2 '2
+ 2m2
1
llBl + 12B2
[ 2 '2 2 '2
+ 2hl2B1B2cos(Bl
. .
- B2)] .
°
From (2.111), displacement and flow constraints impose on virtual dis-
placements the conditions <I>q 8q = and Wq 8q = 0. Under such conditions
the virtual displacements 8qj are not independent and the coefficients in
(3.18) do not vanish. Using Lagrange's method of undetermined multipliers,
the constraint conditions on oq are appended to the virtual work form of
Lagrange's equation such that the coefficients do vanish.
The method of undetermined multipliers is presented in numerous texts,
for example, [Ha] or [WI]. The relevant result of the theory, called the
multiplier rule, is applied as follows. Let the effort [j represent the paren-
thetical expression in (3.18), that is,
(3.24)
or in vector form, 8qT[ = 0, where 8q = (8q1,"" oqn) and [ = ([1, ... , En)·
8qT [(q, q, t) = 0,
(3.26)
(3.31)
(3.33)
This equation plus the algebraic constraints is known as Lagrange '8 equa-
tion of the first kind.
For systematic formulation and solution of the Lagrangian DAE, it is
convenient to reformulate this set of n second-order ODEs as two sets of
n first-order ODEs. To this end, introduce flow f = q as a state variable
and replace all occurrences of q with f in the equations of motion. The
resulting DAEs are called the descriptor form of Lagrange's equation:
q = f,
. T T
Mf + <I>q II; + iItj J.1 = Y,
<I> = 0, (3.34)
iIt = 0,
r = 0,
s = A.
This form is used henceforth for systematic formulation of Lagrangian equa-
tions of motion for multidisciplinary systems. For convenience, nomencla-
ture is summarized as follows:
q(t) is an n vector of displacement coordinates.
f{t) is an n vector of flow coordinates.
lI;(t) is an ml vector of Lagrange multipliers.
J.1(t) is an m2 vector of Lagrange multipliers.
e"Y(t) is an m3 vector of implicit efforts.
s(t) is an m4 vector of dynamic variables.
<I>(q, t) is an ml vector of displacement constraints.
3.3. Lagrangian DAEs 75
y(t) = (ql (t), ... , qn (t), II (t), ... , f n(t), "'1 (t), ... , "'m, (t),
J.Ll(t), ... ,J.Lrn2(t),ei(t), ... ,e~3(t),Sl(t), ... ,8m4(t)). (3.35)
EXAMPLE 3.2. To model the two-link robot arm shown in Fig. 2.33 using
the Lagrangian DAE, energy functions and virtual work are expressed in
terms of reduced-order coordinates (ql, q2, q3, q4) = (Xl, Yl, X2, Y2). For this
simple model V = D = 0 and kinetic coenergy is given by (2.143):
(3.36)
(3.37)
76 3. Lagrangian DAEs of Motion
(3.38)
qi + q~ - li
[(q3 - ql? ]- 0
+ (q4 - q2? -l~ - ,
where q = (ql, ... , q4), f = (fl, ... , f4)' and,"" = (,",,1, ,",,2).0
T* -- 1Lf2
2 l'
2
V=~ (3.39)
2C'
D = ~R2!l.
The node at a imposes the holonomic flow constraint fr = h + is. Since the
charge of the capacitor q2 is a tangible displacement, this constraint must
be integrated to correctly represent the constraining condition, yielding
¢ := ql - q2 - q3 + q20 = 0, (3.40)
q = f,
[L 0
o
1 [-~l
j+
-1
1),= [~q~/~l'
-R2h
ql - q2 - q3 + q20 = 0,
e"l - k[JI[JI = 0,
°
are assigned as shown in Fig. 3.2.
The energy functions are given by V = and
T* 1 f2 1 (30 f2
= 2m 1 + 2 ((31 + ql) 2,
D = ~Rf1- (3.44)
F'(t)
1/J1 := 12 - 13 = o. (3.45)
(3.46)
q = i,
0 FS _ /3o/i
++ l~
+ q1l 2
2(/31
/30
/3oiIh
r':' /31 + q1
0 -1
(/31 + qI)2
eS -R13
12 -13 = 0, (3.47)
(3.50)
3.4. Underlying ODEs 79
(3.51)
(3.52)
(3.53)
(3.54)
q = f,
j = M- I [Y - cf!i All (cf!qM-Iy + Zl) l, (3.55)
where
AI(j,q,t):= cf!qI'vrlcf!i,
M(j, q, t) := \l/T*, (3.56)
Y(j, q, t) := Q - (\lfT*)q f - (\lJT*)t + 'VqT* - 'Vq V - \lJ D,
Zl(j,q, t) := (cf!qf)qf + (cf!qf)t + cf!tqf + cf!tt.
With dynamic constraints, the underlying ODE is given by (:3.55) plus
s = A. Matrix Al is identical to the matrix CM-ICT in [FL3] and is
similar in function to the "constraint matrix" AM- I / 2 in [UK1].
(3.57)
80 3. Lagrangian DAEs of Motion
(3.60)
(3.61)
(3.64)
where AI, A 2 , A 3 , A4 are defined in (3.66) and the matrix inverse is assumed
to exist. Substituting for Ii and J-i in (3.58) yields an explicit expression for j
that together with q = f constitutes the underlying ODE for nonholonomic
systems:
where
A1(J,q,t):= if>qM-1if>[,
A 2(J, q, t) := if>qM-1wJ,
A 3 (J, q, t) := WfM-1if>[,
A 4 (J, q, t) := Wf1\,rlWJ, (3.66)
1'v1(J, q, t) := v/r,
Y(J, q, t) := Q - (VfT*)q J- (VfT*)t + \!qT* - \!q V - Vf D,
Zl(J, q, t) := (if>qf)qJ+ (if>qn + if>tqJ + if>tt,
Z2(J, q, t) := WqJ + wt .
With dynamic constraints, the underlying ODE is given by (3.65) plus
Ii = A.
3.4.3. Discussion
The underlying ODE comprises a set of 2n, explicit, nonlinear, first-order
ODEs. Such equations are, in general, readily solved using a Runge-Kutta
method or other standard numerical technique. The main advantage of this
formulation is that numerical difficulties associated with DAEs (a topic of
Chapter 6) do not occur with ODEs.
This numerical tractability is exploited by Udwadia and Kalaba [UK2] in
developing an underlying ODE that accommodates dependent or redundant
constraints. In other respects, their development is conceptually similar to
the development given above.
A disadvantage of the underlying ODE is that the matrix inverses in
(3.55) and (3.65) must exist and be well conditioned. This criterion is not
met if the matrix of inertial coefficients !vI is singular or zero, as is often
the case for constrained, multidisciplinary systems.
A second disadvantage of the underlying ODE is that its solution satisfies
the differentiated constraints cI> = 0 and ir = 0 but not necessarily the
undifferentiated constraints if> = 0 and W = 0, since it is the differentiated
constraints that are embedded in the equations of motion to eliminate the
multipliers. In some cases, this results in a numerical solution that drifts
from the true solution. Drift is particularly noticeable for systems having
closed kinematic chains, such as a four-bar mechanism or a slider-crank
mechanism. Many authors recommend numerical stabilization schemes to
ensure a solution's compliance with the undifferentiated constraints [FL3].
Finally, the stability properties of a system with differentiated constraints
can be different from the stability properties of the original system with
undifferentiated constraints. Thus, as noted in [BCP], differentiating con-
straints, eliminating multipliers, and numerically solving the resulting un-
derlying ODEs is a strategy to be used cautiously.
82 3. Lagrangian DAEs of Motion
(3.67)
(3.68)
(3.69)
This equation is consistent with (2.164) in which constraint efforts are in-
terpreted geometrically as linear combinations of constraint gradients with
Lagrange multipliers as the undetermined coefficients of the linear combi-
nation.
Thus the terms inside the parentheses on the right-hand side of (3.67)
represent all the efforts in a system and (3.67) overall represents the equiv-
alence of virtual work and the variation of energy. This is not a surprising
result given that the underlying principle is the first law of thermodynam-
ics. Conceptually this work-energy equivalence is stated
Depending on coordinate selection, these terms either give the actual ef-
forts (forces, voltages, pressures, and so forth) in a system or represent
combinations of actual efforts acting in the directions of the assigned coor-
dinates. This interpretation has been exploited in the bond-graph literature
to develop graphical representations of Lagrange's equation [K] [Rl].
From Sec. 2.5.4, efforts are classified as either constraint efforts e rP or
given efforts e9 such that e = e rP + e9 . Substituting for e in (3.70) and
rearranging yields
n n
(3.71)
j=1 j=1
85
kinetic displacements
flows and time
~~
1 1 1 1
1 1 1 1
T=T(Pl,···,Pt, ql,···,qn,t).
'-v-' '-v---'
transformed untransformed
variables variables
ay(O)
~j:= ox) , j = 1, ... ,f. (4.1)
c
yCC) := yCO) - L~jXj, (4.2)
j=l
is the £th Legendre transform of y(O). The useful results of the transform
are that for the transformed variables,
j = £ + 1, ... , m. (4.4)
aT*
~j := -;:;-:- = Pj, j = 1, ... , £. (4.5)
uqj
4.2. Hamiltonian DAEs 87
This is a set of n equations in £+n state variables (PI, ... ,Pe, ql, ... ,qn)' An
additional set of £ differential equations is given by (4.8). Together with the
constraints, unchanged from the Lagrangian DAE, these equations consti-
tute the differential-algebraic form of Hamilton's equation, or Hamiltonian
DAE, given in component form by
¢k(q, t) = 0, k=l,,,.,ml,
1i'k(q, q, t) = 0, k=1, ... ,ln2, ( 4.13)
Ik(e~,s,q,q,t) = 0, k = L ... ,'m3,
!'k - )..k(e~, S, q, q, t) = 0, k = 1, ... ,m4,
or in vector form,
qT = 'YpT,
P+ 'VqTT + Vq- V + Y4TD + cf>;,'" + \IJ~fl = QT,
Vq,T + Vq,V + Y4,D + cf>{r", + \IJf,.fl = Qr, ( 4.14)
cf> = 0,
\IJ = 0,
r = 0,
s - 1\ = 0.
ur - if>:J,.K, - iJifrl~
VpT-r
0= if> (4.15)
w
r
For convenience, nomenclature is summarized as follows:
y(t) = (q1(t), ... , qn(t), !l(t), ... , fn(t),pdt), ... ,pc(t), K:1(t), ... ,K: m, (t),
/11 (t), ... , /1m2 (t), e"{ (t), ... , e'/n 3 (t), Sl (t), ... , Sm4 (t)) . (4.16)
EXA:v!PLE 4.1. A two-link robot arm is shown in Fig. 4.2 with displacement
coordinates q and momentum coordinates p assigned for a Hamiltonian
formulation of the equations of motion.
The energy functions are given by V = 0, D = 0, and
2 2 2 2
T = PI + P2 + P3 + P4 . (4.17)
2m1 2m2
(PI := qi + q~ - Ii = 0,
¢2 := (q3 - q1)2 + (q4 - qd -l~ = O. (4.18)
( 4.19)
I,
Ii = I,
Fl - 2qlh;1+ 2(q3 - ql)h;2
p= r F2 - 2q2h;1 + 2(q4 - q2)h;2
F3 + 2(ql - q3)h;2
F4 + 2(q4 - q2)h;2
h -pdml ( 4.20)
h - P2/ m l
h - P3/ m 2
0=
14 - P4/ m 2
qr + q~ -li
(q3 - ql)2 + (q4 - q2)2 -l~
(4.21 )
F"(t)
FIGURE 4.3. Electromagnetic suspension, Hamiltonian formulation.
92 4. Hamiltonian DAEs of Motion
g= j,
p = [FS - p~/(2;5o) 1
-It J
eS - Rh + Jt ( 4.22)
iI - pdm
0=
12 - P2(;5l + qd/fJo
12-h
where q = (q],q2,q3), j = (iI,h,h), p = (P],P2), and JL = (Jtd. 0
g = 'q,T,
P+ <I>i'" = u, ( 4.23)
<I> = 0,
(4.26)
(4.27)
(4.28)
(4.29)
q = 'YpT,
P= U - <I>qT A5 1 (<I>q WU + Z3), (4.30)
where
l]I(g, q, t) := B(q, t)g + b(q, t) = O. It follows from (4.14) that the Hamilto-
nian DAE is given by
g = \lpT,
P+ <P;; K + BT fl = U, (4.32)
<P = 0,
Bg + b = O.
Premultiplying p by <Pq W yields
Premultiplying p by BW yields
A6]-1 [<PqWU+Z3]
[:] = [~~ As BWU+Z 4 '
(4.38)
g = 'VpT,
where
q = VpT,
P = Q - VqT - 'VqV - \i;jD. (4.41)
q = Vp'H.,
P = -Vq'H., (4.42)
4.3.4. Discussion
The Hamiltonian underlying ODEs comprises a set of 2n, implicit, nonlin-
ear, first-order ODEs. As in the case of the Lagrangian underlying ODE,
96 4. Hamiltonian DAEs of Motion
contain a singular inertial matrix. It happens too for this system that the
nonlinearities in the Hamiltonian model have a simpler form than the non-
linearities in the Lagrangian model. 0
99
5.1. Fundamentals
5.1.1. Representation of Motion
In the same way that vector '/1 represents a set of displacement components
and it represents a set of flow components, vector (! = ((!1, ... , (2 N) is a set of
momentum components and Q = (Ql, ... , QN) is a set of effort components.
Thus a complementary configuration of a system is given by
(5.1 )
The symbols ((2i, Qi, Ii, q;) represent components of momentum, effort, flow,
and displacement acting in the directions of the N-coordinates of the com-
plementary configuration space, that is,
The time derivative of this expression yields the effort transformation equa-
tions given by
The coefficients O(};/ OPj are functions of P, hence the effort transformation
equations are functions of both jJ and P, that is,
5.1.2. Constraints
A momentum constraint is an algebraic condition expressed as a function
of momentum and possibly time having the form
(5.9)
'ik(j"f,s,c,p,t) = o. (5.12)
Sk - ).k(f'Y, s, e, p, t) = o. (5.13)
and (5.14)
These requirements can be satisfied only for systems in which momentum
and effort constraints are independent of displacements. Systems for which
this requirement does not hold cannot be modeled using the complementary
DAEs.
and (5.16)
Source flows are produced by flow sources. All nonpotential flows that are
not kinetic, dissipative, or sources are called implicit flows, which in general
give rise to flow constraints ::yo
The sum of flows If + I] is designated an applied flow Fj representing
the resolution of all flow sources and implicit flows into components acting
in the directions of the reduced-order coordinates Pj'
where the efforts are potential efforts eV • Applying the variational operator
to both sides of this equation and collecting terms yields
(5.19)
which is a virtual work equation of the form (/, .5p) = 0, implying that the
partial derivatives represent components of flow. These flows are designated
potential flows f'" and f"'* as given by (5.15).
(5.21)
(5.22)
(5.23)
104 5. Complementary DAEs of Motion
L - ~ + a- + ~ -
n (d BV* BV* BT BC )
dt Y Fj bpj = 0, (5.24)
j=l PJ PJ PJ PJ
(5.26)
d * * -T -T
dt V'pV - V'pV + 'q,T + V'pC + <!>p '" + \]Ip J.L = F,
<!> = 0,
\]I = 0, (5.27)
r = 0,
s- A = 0.
5.2. Complementary Lagrangian DAEs 105
p= C,
. -T -T -
Ce+<I>p ",+we f-L = 1,
<I> = 0, (5.28)
W = 0,
r = 0,
s = A,
where C(e,p, t) = v,?V* is an n x n matrix of compliance coefficients and
T(f'r, e, P, t) = F - (Ve V*)p e - (Ve V*)t + Vp V* - VpT - VeG is an n vector
of flows.
The co-Lagrangian DAE in descriptor form is characterized by n explicit
first-order ODEs in p, n implicit first-order ODEs linear in e, ml +m2+m3
algebraic constraints, and m4 explicit first-order ODEs in s describing the
dynamic constraints. The state variables are p(t) and e(t) and the solution
vector y(t) is given by
y(t) = (Pl(t), ... ,Pn(t), el(t), ... , en(t), "'l(t), ... , "'mj (t),
J.LI(t), ... ,f-Lm2(t),!i(t), ... ,!J,3(t),SI(t), ... ,Sm4(t)). (5.29)
EXAMPLE 5.1. The circuit shown in Fig. 5.1 is comprised of linear ele-
ments and two current sources If (t) and Ii (t). Independent flux-linkage
coordinates (PI, P2, P3) are assigned as shown. Efforts ej = Pj represent
node voltages.
Analysis yields
(5.30)
Since the coordinates are independent, there are neither constraints nor
multipliers. The co-Lagrangian equations of motion are given by
p= e,
(5.31)
V* = eV2k,
T = p5!2m, (5.32)
G = ei/2b,
cPl := Pl - P3 + P30 = 0,
cP2 := P2 - P3 + P30 = 0,
oW(n) = f'(t) 0Pl.
Pl P2 P3
=-1J1---~VVk m
j"(t) b
P= e,
[0 l/k
o
]e+[ ~ 0]1 '" = [1"-P3/m
-1 -1
-0 eI/b] (5.33)
[ P1-P3+P30] =0.
P2 - P3 + P30
where P = (P1,P2, P3), e = (e1' e2, e3), and", = ("'1,11:2), 0
In this example, an explicit solution for the multipliers is readily ob-
tained, yielding
and (5.34)
P3 = PI = P2· (5.35)
Letting P = P3 represent the momentum of the mass and eliminating the
multipliers from the DAE yields a single second-order ODE given by
(5.36)
The physical interpretation of this equation is that the velocity of the mass
p/m is the resultant of the velocity of the source less the velocities of the
spring and damper.
This example illustrates that co-Lagrangian equations of motion are flow
equations and are therefore duals to the effort equations that constitute
Lagrangian equations of motion.
EXAMPLE 5.3. The fluid system shown in Fig. 5.3 is composed of fluid
capacitors C 1 and C 2 , fluid inertance I, and resistance R. All elements have
linear constitutive laws and the fluid is incompressible. The pump provides
1"
a prescri bed flow rate (t). State variables are (PI, ... ,P4, e 1, ... , e4) where
the ej = Pj represent pressures.
The energy functions are given by
V * ="21C1e1+Z
2 1C2 e 22'
T = pV2I, (5.37)
G = e~/2R.
Pressures are constrained such that e3 = e1 - e2. Since P3 represents a
tangible coordinate (the pressure momentum of a kinetic store), this effort
constraint is expressed in integrated form,
¢ := PI - P2 - P3 = o. (5.38)
108 5. Complementary DAEs of .\!Iotion
reservoir
FIGURE 5.3. A fluid system with coordinates assigned for a co-Lagrangian for-
mulation. (Adapted from [W3].)
(5.:19)
(5.40)
(5.41)
8V' 8V
j = 1, ... ,no
8pj 8pj'
(5.43)
potential momenta
efforts and time
....--"---. ~
1 1 1 1
1 1 1 1
1 1 1 1
V = V(ql, ... , qc, PI,·'· ,Pn, t).
'--v---' "-v--'
transformed untransformed
variables variables
(5.44)
This is a set of n equations in £ + n state variables (ql, ... ,qe, PI, ... ,Pn)'
An additional set of £ differential equations is given by pV = -VqV (,5.42).
Together with the constraints, unchanged from the co-Lagrangian DAE,
these equations constitute the co-Hamiltonian DAB
pV = -VqV,
0= <I> (5.46)
W
r
where q is an £ vector of displacements of potential stores and U is Jin n
vector of flows. Flows acting in the directions of P" are designated U" =
5.3. Complementary Hamiltonian DAEs 111
y( t) = (PI (t), ... , Pn (t), el (t), ... ,en (t), ql (t), ... , qe(t), ""1 (t), ... , ""m, (t),
J.Ll (t), .. . , J.Lm2 (t), Ii (t), . .. ,1;'3 (t), SI (t), ... ,sm4 (t)). (5.47)
The structure of the semiexplicit form allows a model to be obtained from
work, energy, and constraint expressions in a systematic manner.
V = ~kq~,
T =
pV2m,
G = ei/2b, ( 5.48)
¢1 := PI - P3 + P3" = 0,
¢2 := P2 - P3 + P30 = 0,
bw(n) = !,(t) bpI.
_~:/me~:;:~21
0= kq2 + e2 , (5.49)
PI - P3 + P30
P2 - P3 + P30
where P = (Pl,P2,P3) and e = (el,e2,e3). <>
Pl P3
r=:-1Jf-----"~
f'(t) ~ b k
p=-VqV,
q = - F + V'p V + VpT + V'pG. (5.50)
p = -VqH,
q = VpH, (5.51 )
6.1. Analysis
6.1.1. Schematic
A schematic of a physical system must be of sufficient detail to identify the
necessary state variables and to illustrate the connections among system
elements. No formal schematic-building algorithm is proposed. The central
modeling problem of course is to keep the model as simple as possible yet
include enough detail to capture significant dynamics.
An example of a system schematic is shown in Fig. 6.1. In this electrome-
chanical system, a power supply provides AC electrical power through a
rectifier to a DC motor driving a slider-crank mechanism. To simplify this
115
Q2.h
power AC/DC DC slider
supply COllverter ulOtor crank
example, the rectifier is modeled in primitive form and speed control for the
crank is omitted. This example is used throughout this section to illustrate
the method of analysis.
6.1.3. Energy
Energy functions are expressed in terms of the assigned coordinates and the
forms of energy functions depend on the formulation selected. For example,
6.1. Analysis 11 7
the forms required for the Lagrangian DAE are T*, V, and D and the forms
required for the co-Hamiltonian DAE are T, V, and G.
The sample problem has three kinetic parameters: the inductance L of
the DC motor, the moment of inertia J of the crank, and the slider mass
m. Kinetic co energy of the system is given by
T* -- 1Lf2
2 5 + 1J1,2
2 6 + 1mf2
2 7· (6.1)
6.1.4. Constraints
Constraints are expressed in terms of the assigned coordinates and in a
form consistent with the formulation.
Flow constraints involving tangible displacements are expressed in in-
tegrated form to ensure that the trajectory of tangible displacements are
accurately predicted. Similarly, in the complementary formulations, effort
constraints involving tangible momenta are expressed in integrated form to
ensure that the trajectory of tangible momenta are accurately predicted.
In the DAE formulations given in this book, displacement and flow con-
straints are assumed to be independent. Redundant, or dependent, con-
straints are not accommodated. However, redundant constraints can be
accommodated at the cost of some additional mathematical manipulation.
In [Hal, for example, redundant constraints are accommodated by using ad-
ditional, arbitrary Lagrange multipliers. In [UK2], redundant constraints
are accommodated by using a Moore-Penrose inverse.
For the electromechanical example, the geometry of the slider-crank re-
quires that
(6.4)
Kirchhoff's current law requires that
II +12 = h +f4,
f4 =15. (6.5)
Q= ° (6.10)
-e~
eJ
°
6.2. Formulating a Model 119
r = [h
h - i8(eae~ -
- is(eae~ -1)
1)]
(6.16)
ej - Kf6 .
eI - Kfs
s- = 0 is the vector of dynamic constraints,
A
A = 0. (6.17)
T := Q - (\ljT*)q f - (\ljT*)t + 'VqT* - 'Vq V - \ljD is a vector of efforts,
ef(t) - ei
e~(t) - e;
-q3/ C
T= -R!4 (6.18)
-ej
eI
-bh
120 6. Modeling and Simulation
q? - 2rq7 cos q6 + r2 - l2 ]
[
q1 + q2 - q3 - q4 + q30
= 0,
[f4 - f5] = 0,
where q = (q1, . .. , q7), f = (fl, ... , h), I'\, = (1'\,1,1'\,2), and /-L = (/-L1)'
6.2.2. Parameters
Parameters are numerical constants or time-dependent functions describ-
ing known system quantities. Parameters include constitutive constants or
functions such as mass, moment of inertia, capacitance, and other coeffi-
cients as well as prescribed functions such as sources. Parameters can be
nonlinear, time-dependent, and state-dependent. Table 6.1 lists one possi-
ble set of parameters for the electromechanical example.
resulting set of nonlinear algebraic equations at each time step using New-
ton's method. Commonly used algorithms are Euler's method, backward
differentiation formula (BDF) methods, and implicit Runge-Kutta (IRK)
methods. These algorithms differ primarily in the type of difference approx-
imation used, in their step-size selection procedures, and in their error-
control schemes. A detailed exposition of numerical methods for DAEs,
with an extensive bibliography, is given in [BCP). In this section, Euler's
method is used to illustrate some basic concepts.
Defining the solution vector Y = (q,l,fi,f.L,e'Y,s), Lagrangian DAEs in
descriptor form can be written as
q-l
M j + ip[ fi + IJIJ f.L - y
ip
F(t, y, if) =
IJI
= o. (6.22)
f
s-A
. Yn+1 - Yn
Yn+1::::O h (6.23)
n+1
where Yn := y(t n ) and step size hn+1 := tn+! - tn. In Euler's method, h
is fixed. Substituting these finite-differences for each derivative in (6.22)
yields an expression for
Yn+1-Yn) 0
F (h n+1,Yn, h = , (6.24)
n+1
given by
qn+1 - qn f
- n+1
h
n+1
M n+1 1,,+1 - In lhTI ,T,TI Y
h + 'J'q n+1 fin+1 +"'f n+1 f.Ln+1 - n+1
n+1
ipn+1 = O. (6.25)
IJI n+1
fn+1
Sn+1 - s" A
h - n+1
n+1
Using Newton's method, this set of nonlinear algebraic equations is solved
for (Qn+1, In+1, Kn+1, f.Ln+1, e;'+l' Sn+1) at each time step t1 < t2 < ... < t f
starting with consistent initial conditions at time to and concluding at final
6.3. Numerical Solution of DAEs 123
time tf. The Jacobian of/OYn+1, required for Newton's method, can be
evaluated numerically at each time step using finite-differences.
BDF and IRK methods enhance this basic procedure through the use
of variable step sizes and higher-order approximations of the derivatives.
These methods also include error-control routines that provide information
about the numerical behavior of the algorithm.
F(x, x, Y, t) = 0,
G(x, Y, t) = 0, ( 6.26)
the minimum number of times that some or all of these equations would
have to be differentiated with respect to time to determine x and if as a
continuous function of (x, y, t) is the differential index of the DAE [BCPj.
For example, the Lagrangian formulation would require expressions for q,
j, k, jI, (;"1, and s.
If no time-derivatives would be required to obtain these expressions,
then the set of DAEs is said to be index o. Index-O DAEs are ODEs. If one
time-derivative would be required, then the set of DAEs is index 1, if two
time-derivatives would be required, then the set of DAEs is index 2, and so
forth. In general the higher the index the more difficult it is to numerically
solve DAEs. Lagrangian DAEs and Hamiltonian DAEs are (apparently) at
most index 3. Demonstrating this assertion is a current research topic.
EXAMPLE 6.1. For a planar pendulum shown in Fig. 6.2, the Lagrangian
DAE is given as follows (see Example 6.2):
q1 = fl,
q2 =12,
mj1 + 2q1/'i;1 = 0, (6.27)
mj2 + 2q2/'i;1 = -mg,
qi + q~ - l2 = O.
Differentiating the displacement constraint with respect to time yields
(6.28)
(6.30)
til = Jr,
ti2 =12,
mjI = -2qIKr, (6.31)
mj2 = -2q2K1 - mg,
. . 2 I
midI + mhh - l K;I = 2mgh,
which is an implicit ODE in (q1, q2, Jr, 12, K1). Since three differentiations
were required to obtain this ODE, the original DAE is index 3. 0
q-f
Mj + <pi K, + iII! J.L - T
<Pqj + (<pqf)qf + (<pqf)t + <ptqf + <Ptt
F(t,y,y) = =0. (6.32)
iIld + iIlqf + iIlt
r
s- A
6.5. Examples
In this section, examples of direct integration of DAEs are given using
the experimental software inLdael for Lagrangian DAEs and int_daeh
for Hamiltonian DAEs. These solvers implement the Euler method direct
integration scheme outlined in Sec. 6.3.1.
The purpose of these examples is to illustrate the modular programming
approach that is made possible by the consistent structure of the descriptor
form. (For demonstration purposes, inLdaeh solves Hamiltonian DAEs in
descriptor form. No attempt is made to exploit the numerical properties
of the semiexplicit form.) The program modules have a simple structure,
clearly document the problem, and for ease of student use are written in
MATLAB® script. Unfortunately, they are also computationally inefficient
and sure to be accurate only for index-l DAEs. Nevertheless, the programs
have been used successfully in an undergraduate modeling and simulation
course and are suitable for well-conditioned classroom exercises.
To implement Euler's method using the inLdael solver, the analyst
produces a driver file with initial conditions, numerical parameters, and a
subroutine call to a solver. The user also produces a function file containing
problem-specific components of the descriptor formulation such as system
parameters and expressions for 1"vl, W, wq , and so forth. The quantities
6.5. Examples 127
1
effort constraints -rde\ s,f, q, t)
dynamic constraints Ak(e'Y, s, f, q. t)
virtual work 6W(e'Y,f,q,t)
initial conditions [qo, fo, "0, /Lo, eJ, so]
time interval [toot,]
{
Symbolic software constraint vectors ip(q, t), w(f, q, t), A(e'Y, s, f, q, t)
creates file with constraint Jacobians ipq(q, t), W,(q, t)
elements of the DAE effort constraint vector r(e\ s, f, q, t)
1
vector of efforts T(e'Y,f,q.t)
DAE solver
1 displacements
flows
[ql (t), ... , qn(t)]
[ft (t), . .. , fn(t)[
Results are written { mnltipliers ["1 (t), . .. , "7n1 (t), III (t), ... , Ilm, (t)]
to an output file implicit efforts [ej'(t), ... , e;h, (t)]
dynamic variables [SI (t), ... , Sm, (t)]
<l>(q, t) ]
C(f,q,t):= [ w(j,q,t) , (6.33)
A(t).-
._ [Ii:(t)]
p(t) . (6.35)
EXAMPLE 6.2. A simple pendulum is shown in Fig. 6.2. The rod of fixed
length 1 imposes a single displacement constraint. The force due to gravity
is an effort source. Configuration coordinates are (ql, q2)' Analysis yields
V = D = 0 and
T* = !m (J? + 11) ,
¢ := qi + q~ - 12 = 0, (6.36)
oW = -mgoq2'
q = 1,
q; + q~ - 12 = 0,
where q = (ql, q2), 1 = (iI, h), and A = (AI)' Consistent initial conditions
are given by
(6.38)
Initial conditions for multipliers are not listed because the solver assigns
A(to) = O. System parameters are 1 = 2.34 m, m = 1.13 kg, and 9 = 9.81
m/s2.
6.5. Examples 129
The driver file for this system is shown in Fig. 6.4. In this file the initial
conditions are stated, a fixed time step and the time domain of the simula-
tion are denoted, the number of coordinates and the number of independent
constraints are stated, and the solver is invoked.
In the driver file, the first argument passed in the call to the solver is
the name of the function file containing expressions for M, C, Cn, T, and
system parameters. The function file pend_func for this example is shown
in Fig. 6.5. This file clearly documents the descriptor-form components of
the equations of motion (6.37).
Simulation results are shown in Fig. 6.6. Subplot (a) indicates that the
pendulum indeed moves in a circular arc. Subplot (b) shows the expected
periodic behavior of the magnitude of velocity II I = J if + /1 as the
pendulum oscillates. Subplot (c) shows that the constraint error € := qr +
q~ - l2 is negligible. 0
o
(6.40)
130 6. Modeling and Simulation
FIGURE 6.4. A driver file for the pendulum example using solver int_dae1.
FIGURE 6.5. The function-evaluation file for the pendulum example. This file
is used by solver int_dae1 to evaluate system parameters and elements of the
descriptor form at each time step.
6.5. Examples 131
-2.0 r--------~--_,
0.8
-2.2
€;
-2.4
-
-2.6 '--_~ _ _ ~ _ _ ~_ ___l
-0.2 o 0.2 2 3 4
ql (m) Time (s)
(a) (b)
X 10- 8
15
-5~---~----~--~---~
o 2 3 4
Time (s)
(c)
slider
(6.41 )
EXAMPLE 6.4. An electrical lead-filter is shown in Fig. 6.9 with input volt-
age eS(t). The variable of interest is output voltage eO(t). Configuration
coordinates are (q1, Q2, q3). Analysis yields T* = 0 and
q~
v 2C'
D ~Rd? + ~Rdd, ( 6.42)
¢ := q1 + q2 - q3 - q20 = 0,
q = j,
o
0] [1]
o o j+ 1 A= [-Rd1]
-q2/C , (6.43)
o o -1 eS(t) - R2h
6.5. Examples 133
3
0.5
S 0 I2
N
0< '"
0<
-0.5
-1
0
-1 0 0 2 3 4
q1 (m) Time (s)
(a) (b)
x 10- 7 3 X 10- 7
3
2 2
I1
S
~1
:;; N
'"
0 0
-1 -1
0 2 3 4 0 2 3 4
Time (s) Time (s)
(c) (d)
c ·---------0
(6.44)
(6.45)
In Fig. 6.10, subplot (a) shows that the output voltage eO(t) is phase-
shifted and reduced in amplitude compared to the input voltage eS(t).
These results can be verified by comparing them to the time response of
4 xlO- 9
0.5 2
~ a
-0.5 -2
-4 L-__________________ ~
0.5 a 0.5
Time (8) Time (8)
(a) (b)
(6.46)
EXAMPLE 6.5. A nonlinear fluid system is shown in Fig. 6.11. The pump
provides a time-dependent pressure profile to the system, a storage tank
acts as a fluid capacitor, and energy is dissipated in the two valves. Flow
coordinates (il, 12, h) are assigned to the valves and tank as shown in
Fig. 6.11.
The fluid is incompressible. The tank has fluid capacitance C f given by
C f = At! pg, where At is the tank cross-sectional area, p is the fluid density,
and g is the acceleration due to gravity. The two valves have constitutive
laws given by
(6.47)
where eel is the pressure drop across the valve, C r is a resistance coefficient,
and f is the flow through the valve. The pressure source is given byeS (t) =
1Q6 log (t + 1). Analysis yields T* = D = 0 and
2
V=~
2Cf'
(h := ql + q2 - q3 - q2 0 ' (6.48)
8W = eS(t) 8q3 - Cr,il \lW8ql - C r2 h \li'hT8q3'
e S (t)
l'
q = t,
[ o~ ~ ~l j + [ ~l
0 0 -1
A= [
eS
-C~I~/1f:
- r2
I
C h Iv131
(6.49)
(6.50)
EXAMPLE 6.6. The pendulum of mass m shown in Fig. 6.13 pivots about
point 0 at the end of a spring constrained to move in the vertical direction
only. The spring has stiffness k, the vertical rod is subject to damping b, and
the rods are rigid and massless. The force due to gravity is an effort source.
The representational variables are inertial coordinates (Qr, Q2", PI, P2) and a
6.5. Examples 137
5 1
4 0.5
f\(
/j;--
'"S3
en h
If
;;;-- 0
N
a
'" -0.5
2
1 -1
0 20 40 60 0 20 40 60
Time (8) Time (8)
(a) (b)
x 10- 15
15
10
'"S5
20 40 60
Time (8)
(cl
FIGURE 6.12. Simulation results for a nonlinear fluid system modeled using a
Lagrangian DAE in descriptor form. (a) Tank volume; (b) flow rates; and (c) error
in constraint 4J.
138 6. Modeling and Simulation
m
rQj,Pl
q;, P2
FIGURE 6.13. A pendulum and spring.
j
P2 mg - 2(q2 - q'3)A
FIGURE 6.14. A driver file for the pendulum and spring example using solver
int-daeh.
the simulation are denoted, the number of coordinates and the number of
independent constraints are stated, and the solver is invoked. In this file
the inertial variables (qT,r) are designated (x,y) such that:i; = y and the
noninertial variables (qT, F) are designated (w, z) such that w = z.
In the driver file, the first argument passed in the call to the solver is
the name of the function file containing expressions for UT, UT, 'VpT, the
adjoined kinematic constraint vector C (6.33), the constraint Jacobians
and (6.55)
and system parameters. The function file Hpend_func for this example is
shown in Fig. 6.15. This file clearly documents the components of the
semiexplicit equations of motion (6.53).
140 6. Modeling and Simulation
FIGURE 6.15. The function-evaluation file for the pendulum and spring example.
This file is used by solver int_daeh to evaluate system parameters and elements
of the semiexplicit form at each time step.
25 ,--------------------,
-4
20
~ -5
E
-7 5
-8
-2 o 2 5 10
q[ (m) Time (8)
(a) (b)
10 xlO- 10
8
6
E
~4
'"
2
0 - - '-- -
-2
0 5 10
Time (8)
(e)
FIGURE 6.16. Simulation results for a pendulum and spring modeled using a
Hamiltonian DAE in semi explicit form. (a) Displacement trajectory of mass m;
(b) magnitude of momentum; and (c) error in constraint cP·
6.5. Examples 141
Simulation results are shown in Fig. 6.16. Subplot (a) shows that the
pendulum describes an arc that also has a vertical component due to the
spring. Subplot (b) shows the expected periodic behavior of the magnitude
of momentum Ipi = \/Pi + P§ as the pendulum oscillates. Because of the
motion due to the spring, the mass does not return to a state of zero mo-
mentum on the time interval shown. Subplot (c) shows that the constraint
error € := (q2 - qD2 + (q[)2 _12 is negligible. 0
The energy methods and structured models presented in this work consti-
tute a basic framework for the systematic treatment of physical systems.
In this afterword we outline issues in dynamics and control that might be
addressed using these methods and models. Among the important prob-
lems that might prove tractable are inequality constraints and the stability
of constrained systems.
Inequality constraints are common in physical systems. For example,
both dry friction and stiction 1 are nonlinear, discontinuous functions that
can be represented in part using inequalities. Systematically accommodat-
ing such constraints in a structured model would make possible the mod-
eling and simulation of a broader class of multidisciplinary systems than is
possible using equality constraints only.
The possibility of making inequality constraints tractable rests on demon-
strable relationships among energy functions, multiplier theory, and opti-
mization theory. For example, it is known from the calculus of variations
that satisfying Lagrange's equation (for holonomic systems only) is a nec-
essary, though not sufficient, stationarity condition of a particular integral.
In this optimization problem, the method of undetermined multipliers is
used to incorporate both equality and inequality constraints.
The problem to be overcome in relating the optimization problem to the
general multidisciplinary dynamics problem is that for nonholonomic sys-
IThe difference between static friction and moving friction when the static friction is
higher.
143
144 Afterword
that numerically solving PDEs can lead to DAEs [BCP]. This connection
might be exploited in developing a systematic and structured approach to
modeling distributed-parameter systems using Lagrangian or Hamiltonian
DAEs.
Another topic of secondary interest is the specialization of Lagrangian
and Hamiltonian DAEs for multibody mechanical systems. The practical
utility of Lagrange's equation and Hamilton's equation for mechanical sys-
tems is sometimes disputed but the systematic manner in which DAEs
of motion are obtained (particularly if the function manipulations are au-
tomated) and the prospect, not yet realized, of robust numerical solvers
for index-3, structured DAEs support the proposition that these classical
methods should be given renewed consideration in analytical mechanics.
Another method of analysis in multibody dynamics is Kane's method
[KL]. As shown in [vFR], Kane's equation and Lagrange's equation are func-
tionally related. That Lagrange's equation can be expressed as a structured
DAE suggests that Kane's equation also can be expressed as a structured
DAE and, moreover, that a complementary form of Kane's equation might
be formulated. And since Kane's method is energy-based, it may be pos-
sible to generalize the method to encompass constrained, multidisciplinary
systems. If so, software that implements Kane's method (AUTOLEV, for
example) could be used to model multidisciplinary systems in addition to
purely mechanical systems.
Another extension of this work is the systematic incorporation of com-
mon control structures in the DAE formulations. Feedback and control
laws that can be expressed as sets of differential and algebraic equations
are readily accommodated through the use of dynamic constraints and ef-
fort constraints. A library of common control laws expressed in terms of
work, energy, and constraint could prove to be a useful extension of the
concepts presented in this book.
Lastly, the methods of [Ha] or [UK2] could be adapted for use with
structured DAEs to systematically accommodate redundant constraints in
multidisciplinary systems. For complex systems this would be a particularly
useful extension of the work presented in this monograph.
These topics of future work, as well as the modeling and simulation meth-
ods developed in previous chapters, illustrate the extent to which work,
energy, and constraint are unifying concepts in system dynamics. To study
Lagrangian and Hamiltonian formulations is to study these unifying con-
cepts; to study these unifying concepts is to focus on the underpinnings
of dynamics. This focus has enhanced my understanding-and perhaps,
gentle reader, yours--of mathematical models and of the physical systems
they represent.
References
Fracture Mechanics
D.P. Miannay