Engineering Dynamics 2.0 - Fundamentals and Numerical Solutions, 2019
Engineering Dynamics 2.0 - Fundamentals and Numerical Solutions, 2019
Lester W. Schmerr
Engineering
Dynamics
2.0
Fundamentals and Numerical Solutions
Solid Mechanics and Its Applications
Volume 254
Series editors
J. R. Barber, Ann Arbor, USA
Anders Klarbring, Linköping, Sweden
Founding editor
G. M. L. Gladwell, Waterloo, ON, Canada
Aims and Scope of the Series
The fundamental questions arising in mechanics are: Why?, How?, and How much?
The aim of this series is to provide lucid accounts written by authoritative researchers
giving vision and insight in answering these questions on the subject of mechanics as
it relates to solids.
The scope of the series covers the entire spectrum of solid mechanics. Thus it
includes the foundation of mechanics; variational formulations; computational
mechanics; statics, kinematics and dynamics of rigid and elastic bodies; vibrations
of solids and structures; dynamical systems and chaos; the theories of elasticity,
plasticity and viscoelasticity; composite materials; rods, beams, shells and mem-
branes; structural control and stability; soils, rocks and geomechanics; fracture;
tribology; experimental mechanics; biomechanics and machine design.
The median level of presentation is the first year graduate student. Some texts are
monographs defining the current state of the field; others are accessible to final year
undergraduates; but essentially the emphasis is on readability and clarity.
This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
Preface
One of the striking features of current introductory engineering dynamics texts is that
although they are about dynamics, nothing moves! By that I mean that calculations
for motion parameters and forces are typically done at fixed instances of time. The
reason, of course, is that current texts are derived from an era when personal
computers (or even calculators) were nonexistent so that fixed time calculations
were the only ones feasible to do by hand or slide rule. The content and approach of
most engineering dynamics texts has changed little from the 1960s when the use of
vectors first became commonplace. Most of the recent attention on the teaching of
dynamics has concentrated on using modern learning techniques to effectively
deliver the material found in current dynamics courses. As valuable as these
improved learning efforts have been, they have had the unintended effect to take
the focus away from course content issues. The objective of this book is to provide a
new approach to dynamics that significantly changes the content and structure found
in most dynamics texts to better align the teaching of this subject to current
engineering tools and engineering practice.
This book is written as a second level course in dynamics for engineers. The
reason for structuring the book in this way is that there is a tremendous inertia (pun
intended) to making changes in entry level engineering texts so that the most
effective route is to give students a chance to see a different and more modern
approach at a junior/senior or a graduate level where instructors have much more
flexibility in choosing content. However, one could also use portions of this book to
enhance an existing first course in dynamics. I have called the book Engineering
Dynamics 2.0 (or, more succinctly, Dynamics 2.0) rather than “Intermediate Dynam-
ics” or “Advanced Dynamics” since most existing intermediate and advanced
dynamics books have the same characteristics as introductory texts in that they
rarely focus on obtaining explicit, time-dependent solutions to dynamics problems.
Dynamics 2.0 has three main distinguishing features. First, it emphasizes how to
obtain the differential equations of motion for dynamic systems and then how to
solve those equations numerically. As part of that approach, understanding con-
straints and constraint forces is shown to play an integral role. MATLAB® is used to
v
vi Preface
obtain the solutions, primarily through the numerical ordinary differential equation
solver ode45. Some higher level dynamics texts have instead used MATLAB®
Simulink models to do the numerical calculations. While Simulink is a powerful
software tool for performing simulations of complex dynamical systems, that power
is not needed for describing the fairly simple problems discussed in most dynamics
texts. Also, if students want to use software packages other than MATLAB® to solve
the problems discussed in this book, they can replace solvers such as ode45 with
similar functions from those packages. Using any “black box” numerical solvers, of
course, can lead to numerical inaccuracies if attention is not paid to the propagation
and sources of errors. This, however, is really no different than making sure that one
keeps sufficient significant figures when doing calculations by hand, a point that was
stressed in the past in dynamics courses. In the use of the MATLAB® numerical
solvers, I include discussions of the error tolerances one can set with those solvers
and show where numerical errors can be important. To understand the behavior of
the numerical solutions, animations can also be helpful so that I have demonstrated
how to generate animations from the numerical results for a number of the problems
considered. Some more recent dynamics books have used MATLAB®’s symbolic
algebra capabilities extensively. This book also occasionally takes advantage of
symbolic algebra, but it does not play a prominent role because I have wanted to
emphasize obtaining numerical solutions, and, as in most dynamics books, the
examples are simple enough that one can set up the problems for numerical solution
by hand. A second key feature of Dynamics 2.0 is that it makes extensive use of
matrices. Matrices are important for several reasons. First, they are essential both to
obtain the equations of motion and to describe the effects of constraints in forms that
are directly transferable to numerical computations. They also are very useful in
formulating kinematics problems suitable for numerical solutions. Second, matrices
are key elements in many of the software tools that engineers will use to solve more
complex and practical dynamics problems, such as the multibody codes found in
mechanical, aerospace, and biomechanics applications or finite element codes,
which have become the basis for solving many structural dynamics problems in
industry. A short introduction to matrices is provided in Appendix A that should
provide the reader with a sufficient background for the topics covered in this book.
Finally, a third feature of Dynamics 2.0 is that it uses a combination of Newton-Euler
and Lagrangian (analytical mechanics) treatments for solving dynamics problems.
However, rather than discussing these two treatments separately, as commonly
found in many intermediate and advanced dynamics texts, I have used a geometrical
approach that ties these two treatments together. Making that connection before
introducing concepts such as “virtual displacements” will hopefully take some of the
veil off of those aspects of analytical mechanics that students find to be vague and
mysterious and provide a solid foundation for higher level dynamics courses and
engineering applications.
This book follows the organization of more traditional treatments of dynamics by
first considering the motion of a single particle (Chap. 2) and then systems of
particles (Chap. 3). Chapter 4 covers kinematics and relative motion using both
vectors and matrices. In the discussion of rigid body dynamics problems in Chap. 5
Preface vii
The MATLAB® m-files for the functions and scripts developed in this book (see
Appendix F for code listings) are available on the web at https://doi.org/10.1007/
978-3-319-98470-4_2.
For MATLAB and Simulink product information, please contact:
The MathWorks, Inc.
3 Apple Hill Drive
Natick, MA, 01760-2098 USA
Tel: 508-647-7000
Fax: 508-647-7001
E-mail: [email protected]
Web: https://www.mathworks.com
How to buy: https://www.mathworks.com/store
Find your local office: https://www.mathworks.com/company/worldwide
ix
x Contents
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703
Chapter 1
Basic Elements of Dynamics
This chapter discusses some of the basic elements of dynamics, including the
Newton-Euler laws, units, description of motion in various coordinate systems,
and vector-matrix notation that is used in the book. A short summary is also given
of the objectives of this book as well as an outline of the topics covered.
1.1 Introduction
When bodies are in static equilibrium, the forces and moments acting on those
bodies must balance, i.e., the resultant vector sum of all the forces, FR, must be
zero and the resultant vector sum, MQ, of all the moments about any point Q must be
zero:
X
N
FR ¼ Fi ¼ 0
i¼1
ð1:1:1Þ
X
S
MQ ¼ MQj ¼ 0
j¼1
Q x
z
dp
FR ðt Þ ¼
dt
ð1:1:2Þ
dLQ
MQ ðt Þ ¼
dt
where p(t) is the linear momentum and LQ(t) is the angular momentum about the
fixed point Q. In Chap. 2 we will describe these dynamics equations for the motion
of a single, small body (particle) of mass m, where the linear momentum p(t) ¼ mv(t)
in terms of the velocity, v(t) ¼ dxP/Q(t)/dt of the particle, and the angular momentum
LQ(t) ¼ xP/Q(t) mv(t), i.e., it is the moment of the linear momentum (see Fig. 1.1).
[Note that xP/Q is to be read to mean the position vector x of point P with respect to
point Q.] Similarly, if we use the appropriate expressions for the linear and angular
momentum in more complex systems of particles (Chap. 3), rigid bodies (Chaps. 5
and 8), or deformable bodies (Chap. 9) the basic relationships of Eq. (1.1.2) will
remain the same (as long as the point Q is a fixed point and the coordinate system
axes in which we measure the motion do not rotate—if Q is in motion and/or the
coordinate axes rotate then these motions will contribute to changes in the linear
momentum and angular momentum as we will see in later chapters). In the single-
particle case since the mass, m, is a constant the force equation in Eq. (1.1.2) is
FR ¼ ma, where a(t) ¼ dv(t)/dt ¼ d2xP/Q(t)/dt2 is the acceleration of the particle. This
is just Newton’s second law as taught in introductory physics courses. Although
Newton’s second law takes the center stage when describing the motion of single
particles and systems of particles, Newton’s law alone is inadequate to describe the
complex moving bodies that engineers must deal with such as machinery, automo-
biles, aircraft, and spacecraft. If the deformation of those complex bodies can be
neglected (i.e., they can be assumed to be rigid) Leonhard Euler showed how the
combined force and moment equations in Eq. (1.1.2) are sufficient to completely
solve for their motions. These Newton-Euler equations form the basic foundation for
the field of dynamics.
1.3 Describing Motion in Different Coordinate Systems 3
In dynamics we need to describe forces and moments and their effects on changes in
positions and angles of moving bodies. Table 1.1 shows the units used in both the
Système International (SI) and the US customary system.
There is, however, one important difference between the SI and US systems. In the
SI system the force is a derived quantity (F ¼ ML/T2) measured in newtons (N), where
1 N ¼ 1 kg m/s2. In the US system the mass is a derived quantity (M ¼ FT2/L )
measured in slugs, where 1 slug ¼ 1 lb s2/ft. Rotational motion in either system is
measured either in degrees ( ) or radians (rad), where 1 radian ¼ 360/2π ¼ 57.2958 .
One force that is commonly encountered in dynamics problems is the force of gravity
acting on a body, otherwise known as its weight. The weight, W, of a body on earth at
sea level is equal to the mass, m, of the body times the gravitational constant, g, i.e.,
W ¼ mg where g ¼ 9.81 m/s2 in the SI system and g ¼ 32.2 ft/s2 in the US system.
Thus, a mass of 1 kg weighs 9.81 N and a weight of 1 lb has a mass of 1/32.2 slugs.
Implicit in our use of the Newton-Euler equations is the assumption that they are valid
in a special coordinate system called an inertial coordinate system. An inertial system
is either fixed or moving at a constant velocity with respect to a fixed system. The
choice of what system we consider as “fixed” is dependent on the application. For
many engineering problems we can consider the surface of the earth fixed, even
though the earth rotates about its own axis (as well as moves around the sun).
Although effects of the earth’s motion are rather small (see Problem P1.1 where
you can explore what “small” means in more precise terms), it is easy to demonstrate
the effects of the earth’s rotation on the motion of ordinary objects such as a Foucault
pendulum, which is a swinging mass suspended by a long wire that can be found in
many science centers around the world. The mass oscillates in a plane that is
continually changing as a result of the effects of earth’s rotation and those changes
are dependent on the location of the pendulum on the surface of the earth. Many
dynamics (and physics) texts derive the equations of motion for a Foucault pendulum
as a classical example of describing motion in a non-inertial system. We will examine
the Foucault pendulum problem in Chap. 4 when we examine how the Newton-Euler
equations change when we measure motion in moving and rotating coordinate
systems.
4 1 Basic Elements of Dynamics
ey y (t )
x (t )
O ex x
ez z (t )
x (t )
z
where (ex, ey, ez) are fixed (constant) unit vectors along the coordinate axes and the
(x, y, z) Cartesian position vector components are all functions of the time, t. To
obtain the velocity, v(t), of this point we must differentiate this position vector, i.e.,
dx
vð t Þ ¼
dt
dx dy dz
¼ e x þ ey þ ez ð1:3:2Þ
dt dt dt
¼ x_ ex þ y_ ey þ z_ ez
¼ vx ex þ vy ey þ vz ez
In Eq. (1.3.2) we have shown several ways in which we will represent the
components of the velocity vector. First, we have shown the explicit time derivatives
of each coordinate component (dx/dt, etc.). Second, we have used an abbreviated
“overdot” notation to indicate these time derivatives (i.e., dx=dt ¼ x_ ). Finally, we
have simply used a subscript of (x, y, z) to indicate a particular velocity component
along a Cartesian axis (vx ¼ velocity component along the x-axis, etc.). In this book
we will, at various times, use these notations interchangeably. To obtain the accel-
eration, a(t), of the point P we must differentiate the position vector twice:
1.3 Describing Motion in Different Coordinate Systems 5
d2 x
að t Þ ¼
dt 2
d2 x d2 y d2 z
¼ 2 ex þ 2 ey þ 2 ez ð1:3:3Þ
dt dt dt
¼ €xex þ €yey þ €zez
¼ ax e x þ ay e y þ az e z
Again, we have shown several different ways to describe this acceleration where
now “two overdots” indicate two derivatives on time (d2 x=dt 2 ¼ €x, etc.). Since the
acceleration is a derivative of the velocity vector, we also have
dv
að t Þ ¼
dt
dvx dvy dvz ð1:3:4Þ
¼ ex þ ey þ ez
dt dt dt
¼ v_ x ex þ v_ y ey þ v_ z ez
One of the nice things about describing motion in Cartesian inertial coordinates is
that only the scalar components are functions of time since the unit vectors (ex, ey, ez)
are constants. For other choices of coordinates we will lose this feature, making the
expressions for the velocity and acceleration more complex-looking. This loss,
however, is often more than offset by a simpler ability to describe certain motions
in non-Cartesian coordinates. Let us consider here the use of cylindrical coordinates,
(r, θ, z), as shown in Fig. 1.3b. This system is defined in terms of the Cartesian
coordinate system shown in Fig. 1.3a by
pffiffiffiffiffiffiffiffiffiffiffiffiffiffi y
r¼ x2 þ y 2 , θ ¼ tan 1 , z¼z ð1:3:5Þ
x
We can write the position vector of the point P shown in Fig. 1.3 as
z z
r
P
P
x (t ) x (t )
ez z ez
eθ z
ey
O O
ex er
x y y
y θ
x x
(a) (b)
Fig. 1.3 (a) A point P as measured in inertial Cartesian (x, y, z) coordinates and (b) the same point
measured in cylindrical coordinates (r, θ, z)
in terms of two of the three unit vectors (er, eθ, ez) along the (r, θ, z) directions, where
and where from Eq. (1.3.8) we see that eθ ¼ ez er. Unlike the Cartesian unit
vectors, however, these cylindrical coordinate unit vectors are not constants because
as θ changes the orientations of er and eθ will change. In fact, you can see directly by
differentiating the unit vectors in Eq. (1.3.8) that we have
e_ r ¼ θ_ eθ , e_ θ ¼ θ_ er , e_ z ¼ 0 ð1:3:9Þ
v ¼ x_ ¼ r_ er þ re_ r þ z_ ez
ð1:3:10Þ
¼ r_ er þ r θ_ eθ þ z_ ez
is called the centripetal acceleration, and the term 2r_ θ_ which is called the Coriolis
acceleration.
Polar coordinates are a special case of cylindrical coordinates where, if we take
the motion to occur in the z ¼ 0 plane, we have
x ¼ rer
v ¼ r_ er þ r θ_ eθ ð1:3:12Þ
a ¼ €r r θ_ 2 er þ r €θ þ 2r_ θ_ eθ
The unit vector, eϕ, lines in the x–y plane and is in the direction of increasing ϕ
(Fig. 1.4b) so that
R x (t )
θ eR eφ
eφ
O φ y
y
φ eθ φ
x
x
(a) (b)
8 1 Basic Elements of Dynamics
The velocity is
v ¼ x_ ¼ R_ eR þ Re_ R ð1:3:17Þ
so that we need to have the time derivative of eR, which from Eq. (1.3.14) is
e_ R ¼ θ_ cos θ cos ϕex þ sin θey θ_ sin θez
þ ϕ_ sin θ sin ϕex þ cos ϕey ð1:3:18Þ
¼ θ_ eθ þ ϕ_ sin θeϕ
so we need the time derivatives of (eθ, eϕ) which from Eqs. (1.3.15) and (1.3.16) are
This is a rather complex result but again we see terms having squares of first
derivatives. These correspond to centripetal acceleration terms. The mixed deriva-
tive terms are the Coriolis acceleration terms.
1.5 Angular Velocity and the Time Derivative of Unit Vectors 9
Most introductory dynamics books describe variables such as forces and moments,
or velocity and acceleration, as vectors. The vector notation seen in the previous
sections is typically the one in common use. In the following chapters we will also
use matrices and matrix algebra to formulate and solve dynamics problems since
some quantities in dynamics are inherently best described by matrices (see the
moments of inertia in Appendix B, for example) and matrices are indispensable
tools for describing the constrained motion problems found in many engineering
applications. Appendix A gives an overview of the properties of matrices that should
provide sufficient background for the topics found in this book. As shown in that
appendix, vectors can also be treated as special cases of row or column matrices. For
example, we can write a three-dimensional vector, v, in terms of its components in
either of the two matrix forms:
2 3
v1
v ¼ ½v1 ; v2 ; v3 , v ¼ 4 v2 5
v3
and these forms are related through the matrix transpose operation as discussed in
Appendix A, i.e.,
2 3 2 3
v1 v1 T
4 v2 5 ¼ ½ v1 ; v 2 ; v 3 T , 4 v2 5 ¼ ½ v1 ; v2 ; v3
v2 v2
In both cylindrical and spherical coordinates the time derivatives of the unit vectors
were needed to describe the velocity and acceleration in those coordinates. Although
we obtained those time derivatives by writing the unit vectors in a fixed Cartesian
10 1 Basic Elements of Dynamics
de
dθ
sin φ
e (t ) e ( t + dt )
φ dθ de
φ 1
sin φ
Fig. 1.5 (a) A unit vector, e, rotating about the n-axis; (b) a side view of the same geometry; and
(c) a view of the geometry looking down the n-axis
coordinate system and performing the differentiation directly, there is another way to
obtain those time derivatives that is more physically motivated. Since the length of
unit vectors by definition cannot change, all the changes of unit vectors are produced
by the changes of their orientations, i.e., their rotations. Thus, consider a unit vector,
e, which is rotating about an axis defined by the unit vector, n, as shown in Fig. 1.5a.
If the small change (in time dt) of the angle of the unit vector in a plane perpendicular
to n is dθ, as shown, then we can define the angular velocity vector, ω, of the
rotating unit vector as ω ¼ (dθ/dt)n. The change in e during this small rotation is
de ¼ e(t+dt) e(t). From the geometry as shown in Fig. 1.5a–c we see that the
magnitude of de is given as |de| ¼ sin ϕdθ so that the magnitude of the time
derivative is just |de/dt| ¼ sin ϕ dθ/dt and the direction of de/dt is perpendicular to
both n and e(t) in a direction defined by the right-hand rule when we rotate n into e.
But this is just the definition of the cross product of two vectors a and b,
a b ¼ ab sin ϕ u where a and b are the magnitudes of the two vectors, ϕ is the
acute angle between them, and u is a unit vector perpendicular to both a and b in a
direction defined by the right-hand rule when we rotate a into b. We have, therefore,
de
¼ωe ð1:5:1Þ
dt
which is a general relationship that is true for all rotating unit vectors. Equation
(1.5.1) is also true for any vector whose magnitude is constant in time since we can
multiply Eq. (1.5.1) by a constant u and write for u ¼ ue
du
¼ωu ð1:5:2Þ
dt
1.5 Angular Velocity and the Time Derivative of Unit Vectors 11
which is a particularly useful relationship for rigid bodies where the distance
between any two points in the body is fixed.
We can also write Eq. (1.5.1) or (1.5.2) in a matrix form. For example, if we let
e(t) ¼ ex(t)ex+ey(t)ey+ez(t)ez where the unit vectors (ex, ey, ez) are fixed we have
8 9 2 38 9
< e_ x >
> = 0 ωz ωy < ex >
> =
6 7
e_ y ¼ 4 ωz 0 ωx 5 ey ð1:5:3Þ
: >
> ; : >
> ;
e_ z ωy ωx 0 ez
which can be written in more compact form as fe_ g ¼ ½Ωfeg where the vector cross
product has been replaced by a matrix multiplication with a skew matrix [Ω]. In fact,
any 3-D vector cross product can be converted into a skew matrix multiplication
since if we have c ¼ a b then
8 9 2 38 9
< cx >
> = 0 az ay < bx >
> =
6 7
c y ¼ 4 az 0 ax 5 by ð1:5:4Þ
: >
> ; : >
> ;
cz ay ax 0 bz
We can now apply Eq. (1.5.1) to our previous coordinate system examples. In
cylindrical coordinates the unit vectors (er, eθ) both rotate around the z-axis with an
angular speed, θ_ , so that their angular velocity vector, ω, is ω ¼ θ_ ez and we have
e_ r ¼ ω er ¼ θ_ ez er ¼ θ_ eθ
e_ θ ¼ ω eθ ¼ θ_ ez eθ ¼ θ_ er ð1:5:5Þ
e_ z ¼ ω ez ¼ θ_ ez ez ¼ 0
ω ¼ ϕ_ ez þ θ_ eϕ
ð1:5:6Þ
¼ θ_ sin ϕex þ θ_ cos ϕey þ ϕ_ ez
dθ
ω1 = φ ez
dt
ω 2 = q eφ
O O
y
dφ y
φ
dt
x x
(a) (b)
Fig. 1.6 (a) The angular velocity, ω1, due to changes in the angle ϕ in the x–y plane, and (b) the
angular velocity, ω2, due to changes in the angle θ in the constant ϕ-plane
ex ey ez
e_ R ¼ ω eR ¼ θ_ sin ϕ θ_ cos ϕ ϕ_
sin θ cos ϕ sin θ sin ϕ cos θ
¼ ex θ_ cos ϕ cos θ ϕ_ sin θ sin ϕ þ ey θ_ sin ϕ cos θ þ ϕ_ sin θ cos ϕ
ez θ_ sin 2 ϕ sin θ þ θ_ cos 2 ϕ sin θ
¼ θ_ eθ þ ϕ_ sin θeϕ
ð1:5:7Þ
which agrees with our previous result, Eq. (1.3.18). The other two time derivatives,
which we will not show here, can be obtained similarly.
When the Newton-Euler equations are used to describe the motion of rigid bodies
they lead to ordinary differential equations that must be solved in order to obtain the
motion of those rigid bodies and the forces and moments acting on the bodies as a
function of time. Introductory dynamics books and even many intermediate and
advanced texts, however, seldom obtain complete time-dependent solutions except
for linear systems where analytical solutions are available. Instead, students are
taught to solve a large number of problems for velocities and accelerations or forces
and moments at single, specific instants of time. These problems are used to illustrate
a variety of fundamental concepts of dynamics such as work-energy or impulse-
1.6 Objective and Organization of the Book 13
1.7 Problems
P1.1. A point rotating about a fixed origin follows a circular path of radius R. If the
rotational angular velocity, ω, is a constant the point experiences a purely
centripetal acceleration of magnitude Rω2 directed towards the center of
rotation. Determine the ratio of this centripetal acceleration to the acceleration
of gravity at the earth’s surface, g, i.e., compute Rω2/g for:
(a) A point on the surface of the earth at the equator. The radius of the earth is
6.38 103 km.
(b) A point at the center of the earth in its orbit around the Sun. The radius of
the earth’s orbit is 149.6 106 km.
(c) A point at the center of the Sun in its rotation about the center of the
galaxy. The radius of the Sun’s orbit about the center of the galaxy is
2.7 104 light years and its orbital speed is 225 km/s.
These ratios give some indication of how accurate it is to take these points as
“fixed” inertial references.
P1.2. In MATLAB® there is a built-in function named cross that can perform the
cross product of two three-dimensional vectors. Write a MATLAB® function,
S ¼ vect2skew(v), which turns a three-dimensional vector, v, into a 3 3
skew matrix, S, so that the cross product can be implemented by matrix
multiplication. Verify that your function works.
1.7 Problems 15
h(t)
x
ω2
P1.3. A bead slides in a tube which itself is rotating in an x–y plane (Fig. P1.1). If the
tube is rotating about the z-axis with a constant angular velocity ψ_ ¼ ω, and
the distance, h, is changing such that h_ ¼ v0 ðt Þ and €h ¼ a0 ðt Þ, where v0
and a0 are radial velocity and acceleration terms, determine, using polar
coordinates, expressions for the absolute velocity and acceleration of the
bead in terms of h, ω, ψ, v0, and a0. What are these expressions when the
bead passes through the origin of the x–y coordinates (h ¼ 0)?
P1.4. A wheel of radius R spins at a constant speed, ω1, about its own axis which is
placed in a gimbal mount which in turn rotates at a constant speed, ω2, as
shown in Fig. P1.2. The axis of the wheel stays in a horizontal plane and the
center point, O, of the wheel is stationary. (a) Using spherical coordinates,
determine the acceleration of any point, P, on the rim of the wheel at the
instant when the wheel is in the position shown, and (b) find the acceleration in
the special cases when point P is at the top of the wheel (θ ¼ 0) and in the x–y
plane (θ ¼ π/2). How would you have to modify these results to obtain an
expression for the acceleration of a point P on the rim that is valid for any
instant of time?
Chapter 2
Dynamics of a Particle
This chapter contains a detailed treatment of the dynamics of a particle. The main
emphasis is on obtaining and solving the equations of motion when the particle is
subject to constraints. In most cases the solution will be obtained numerically using
MATLAB®. Both Newton-Euler and Lagrangian methods are used to obtain the
equations of motion. Constraints are handled by either embedding them into the
equations of motion (implicitly or explicitly) or solving an augmented system of
equations that also yields an explicit expression for the constraint forces. Both ideal
and nonideal constraints are considered. Issues that must be addressed when solving
the equations of motion numerically are discussed, including the problem of con-
straint drift.
Most dynamics books begin by analyzing the motion of a single particle, where the
particle is considered to be a point mass moving in space. Newton’s second law says
that the particle’s motion is governed by his famous equation, F ¼ ma (force ¼ mass
times acceleration), which in vector form is
X
S
FR ¼ Fs ¼ m€x ð2:1:1Þ
s¼1
where FR is the resultant force of all the forces, Fs, acting on the particle (see
Fig. 2.1); m is the mass of the particle; and €x ¼ d2 x=dt 2 is the vector acceleration.
In terms of components along Cartesian X–Y–Z-axes this vector equation is
O
X
Z
€
F Rx ¼ mX
€
F Ry ¼ mY ð2:1:2Þ
F Rz ¼ mZ€
Another way Newton’s second law is commonly written is in terms of the linear
momentum, p, defined as
p ¼ mx_ ¼ mv
X
S
dp
FR ¼ Fs ¼ ð2:1:3Þ
s¼1
dt
Equation (2.1.3) contains the essence of both Newton’s first and second laws which
state the following:
Newton’s First Law: A body that is not acted upon by a net external force will
maintain a state of uniform motion [i.e., if FR ¼ 0, it follows that p ¼ constant].
Newton’s Second Law: A body subjected to a net external force will undergo a
change in momentum whose rate of change with respect to time is equal to the net
force.
Note that since the object in motion is idealized here as a mass concentrated at a
point P, all the forces acting on the particle are concurrent forces going through that
point (Fig. 2.1). Thus, the resultant moment of all the forces about point P, MP, is
automatically zero. Unlike statics, where force and moment equilibrium must both
be considered, in dynamics we often do not see the moment equation discussed in
conjunction with the force equation (Newton’s second law) when considering the
motion of point masses yet in some particle problems the moment equation is used in
place of Newton’s second law. Why is this the case? If we take moments of
Newton’s second law about another point Q then we have
2.1 Governing Equations 19
X
S
MQ ¼ xP=Q Fs ¼ xP=Q m€x ð2:1:4Þ
s¼1
FR ¼ m€x
ð2:1:5Þ
MQ ¼ xP=Q m€x
which are a total of six equations for a particle moving in three dimensions. But since
Eq. (2.1.4) is just the condition
X
S
xP=Q Fs m€x ¼0 ð2:1:6Þ
s¼1
the moment equation is always satisfied if Newton’s second law is satisfied so that it
is not an independent equation. This is the same situation we find in statics where we
can solve a concurrent force system using only force equilibrium and the moment
equilibrium equation is not needed. However, we also know from statics that we can
still use the moment equation to great advantage when solving concurrent force
problems. In fact, we can replace the three force equilibrium equations by three
moment equations and solve concurrent force problems simply and directly. Prob-
lem P2.1 treats an example of such a statics problem. In dynamics the situation is
similar. Although the force and moment equations of Eq. (2.1.5) represent six
equations in terms of components, there are only three independent equations out
of those six equations that we can use. However, in some cases we can solve particle
dynamics problems more efficiently by replacing one or more of the force equations
by moment equations.
Just as we can write Newton’s second law for the net force in terms of the time
rate of change of the linear momentum, we can write the moment equation of
Eq. (2.1.5) in terms of the change of the angular momentum of the particle about
any point Q, LQ, defined as
Thus,
dLQ d dxP=Q dv
¼ xP=Q mv ¼ mv þ xP=Q m
dt dt dt dt
dv
¼ mv v þ xP=Q m
dt
¼ mxP=Q €x
20 2 Dynamics of a Particle
so that we have
dp
FR ¼
dt ð2:1:8Þ
dLQ
MQ ¼
dt
F Rx ¼ p_ x ¼ m€x
F Ry ¼ p_ y ¼ m€y
F Rz ¼ p_ z ¼ m€z
ð2:1:9Þ
M Qx ¼ L_ Qx
M Qy ¼ L_ Qy
M Qz ¼ L_ Qz
Remember, however, that we can only use three independent equations from the six
possible equations in Eq. (2.1.9) to obtain the motion of a particle.
We have introduced the force and moment equations of Eq. (2.1.9) in this
section because those equations are fundamental to our later discussions of dynam-
ics problems. We will see, for example, that these equations are also valid for a
system of interacting particles. Like the single-particle case, a general system of
particles can be solved without using the moment equations but the moment
equations can also serve as convenient force equation replacements in some
cases. However, when we deal with a system of particles that form up a lattice of
rigidly constrained particles or when we deal with a rigid body where the mass is
distributed continuously, we will see the real value of Eq. (2.1.9). In the rigidly
constrained system of N particles, for example, we will see that we do not have to
solve N vector force equations but we need to only solve the six equations of
Eq. (2.1.9) to obtain the motion of all N particles! In the continuous rigid-body case
(where there is actually an infinite number of “particles”) again we only need to
satisfy the six equations of Eq. (2.1.9) to determine the motion of any point of the
rigid body. As mentioned in Chap. 1 these equations were first obtained by Euler,
who extended Newton’s second law (Eq. (2.1.1)) for particles to Eq. (2.1.9) for
moving rigid bodies. Together these Newton-Euler force and moment equations
have been some of the most important equations of all time. They allow us to
predict the motion of everything from molecules to celestial bodies and are an
indispensable tool for engineers.
2.2 The Dynamics of Unconstrained Motion of a Particle 21
In dynamics problems engineers are often interested in two results: (1) obtaining an
explicit description of the motion, and (2) obtaining the values of all the forces
present. As we will see, obtaining the motion for a particle consists first of finding an
expression for the acceleration of the particle in terms of known forces which, in
some cases, may be functions of the particle velocity and position as well as time.
This acceleration expression, which represents the governing equations of motion for
the particle, is in general a second-order vector differential equation of the form
where f is a (vector) function of the position, x(t), the velocity x_ ðt Þ ¼ vðt Þ, and the
known forces, F, in the problem. The forces are not shown explicitly in Eq. (2.2.1)
since they are either constants or functions of the time, t, x(t), and x_ ðt Þ. We need to
obtain a solution of these equations of motion to find the position as a function of
time, x(t). To obtain such a solution we must also specify initial conditions of the
particle at a starting time that is usually taken to be t ¼ 0. At that time we have
x_ ð0Þ ¼ x_ 0
ð2:2:2Þ
x ð 0 Þ ¼ x0
in terms of the known constants x0 ; x_ 0 . In some cases we can find a solution to the
governing equations analytically, but in general such solutions must be obtained
numerically. In this book, numerical solutions will be obtained with MATLAB® so
you should become familiar with that software system.
To obtain the equations of motion with a Newtonian approach we first write down
expressions for all the forces, FR, acting on the particle. If all the forces are known
functions of time or known functions of the particle velocity and/or displacement,
then from Newton’s second law
FR x; x_ ; t
€x ¼ ð2:2:3Þ
m
so that Newton’s law directly gives us the equations of motion in the form of
Eq. (2.2.1). Since Eq. (2.2.1) is a vector equation, in Cartesian (x, y, z) coordinates
the equation represents three scalar equations:
_ y;
€x ¼ f x x; y; z; x; _ z_ ; t
_ y;
€y ¼ f y x; y; z; x; _ z_ ; t ð2:2:4Þ
_ y;
€z ¼ f z x; y; z; x; _ z_ ; t
22 2 Dynamics of a Particle
xð0Þ ¼ x0
yð0Þ ¼ y0
zð0Þ ¼ z0
ð2:2:5Þ
x_ ð0Þ ¼ x_ 0 ¼ v0x
y_ ð0Þ ¼ y_ 0 ¼ v0y
z_ ð0Þ ¼ z_ 0 ¼ v0z
v
D
m
W = mg
x
(a) (b)
Fig. 2.2 (a) A projectile problem where a mass m is launched at a given location with a specified
initial velocity, and (b) the free body diagram of the projectile when gravity and a drag force are
present
2.2 The Dynamics of Unconstrained Motion of a Particle 23
with an initial velocity at some specified position and then travels under the action of
gravity alone (any drag forces, D, as shown in the free body diagram of Fig. 2.2b are
for the moment neglected). As shown in Fig. 2.2 we will also assume that all the
motion occurs in the x–y plane so that we can neglect all terms involving the z-axis.
Thus, Newton’s second law generates the equations of motion directly since
d2 x
m ¼ Fx ¼ 0
dt 2 ð2:2:6Þ
d2 y
m 2 ¼ F y ¼ mg
dt
dx
¼ v0x
dt ð2:2:7Þ
dy
¼ gt þ v0y
dt
xðt Þ ¼ v0x t þ x0
ð2:2:8Þ
yðt Þ ¼ gt 2 =2 þ v0y t þ y0
Since the projectile reaches the top of its flight when dy/dt ¼ 0 Eq. (2.2.7) shows that
this occurs at the time tm ¼ v0y/g. Placing this time into the equation for y in
Eq. (2.2.8) gives ymax ¼ y0 þ v20y =2g. As you likely know, as long as both v0x and
v0y are not zero (i.e., we launch the projectile at an angle) the path of the particle is a
parabola. This is most easily seen by setting x0 ¼ y0 ¼ 0 and then computing
y ymax. We have
You are likely aware from your physics or elementary dynamics course that in this
projectile problem the force of gravity is an example where the resultant force can be
expressed in terms of a scalar potential energy function, V(x), as
FR ¼ —V ð2:2:10Þ
∂ ∂ ∂
— ¼ ex þ ey þ ez ð2:2:11Þ
∂x ∂y ∂z
with (ex, ey, ez) being unit vectors along the (x, y, z) axes, respectively. Thus, with
V ¼ V(x, y, z) we have
∂V
F Rx ¼
∂x
∂V
F Ry ¼ ð2:2:12Þ
∂y
∂V
F Rz ¼
∂z
The use of a minus sign in Eq. (2.2.10) is arbitrary but it has long been the
convention in both the science and engineering community. With a minus sign
present we see that the force is pointing in a direction of decreasing potential energy.
If the resultant force acting on a particle can be represented in terms of a potential
energy function then Newton’s second law becomes
Forces that are expressible in terms of a potential energy include constant forces,
spring forces, and gravitational force of attraction between two bodies. In the
constant force case if we have a force FR ¼ C ¼ constant acting on a particle,
then the potential can be written simply as the dot product of the force with a position
vector to that particle, which written in Cartesian coordinates gives
V ¼ C x ¼ C x x C y y C z z ð2:2:14aÞ
2.2 The Dynamics of Unconstrained Motion of a Particle 25
so that
∂V
Fx ¼ ¼ Cx
∂x
∂V
Fy ¼ ¼ Cy ð2:2:14bÞ
∂y
∂V
Fz ¼ ¼ Cz
∂z
In the projectile problem just considered, the force of gravity was treated as a
constant force F ¼ mgey, so in that case V ¼ mgy.
Note that in all cases we can add or subtract a constant value to the potential
energy without affecting the force so we are free to choose that constant to make the
potential energy to be zero at a convenient reference location.
For a linear spring, if we assume that the two ends of the spring are located at
points x1 and x2, where we assume that x1 is fixed and x2 is attached to a particle (see
Fig. 2.3), we have the potential energy
1 1
V ¼ k½jx2 x1 j L0 2 ¼ k ½L L0 2 ð2:2:15aÞ
2 2
where k is the spring constant (having dimensions of force/length) and the distance,
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
L, where L ¼ ðx2 x1 Þ2 þ ðy2 y1 Þ2 þ ðz2 z1 Þ2 is the length of the stretched
spring, and L0 is the unstretched length. In this case the Cartesian force components
acting on the particle are
L x2
F = − k [ L − L0 ] e
spring
x2 e = ( x 2 − x1 ) / L
x1
fixed support
x1
x3 (a) (b)
Fig. 2.3 (a) A linear spring acting on a particle in three dimensions, and (b) the corresponding
spring force
26 2 Dynamics of a Particle
∂V ð x2 x1 Þ
Fx ¼ ¼ k ½L L0
∂x2 L
∂V ð y y1 Þ
Fy ¼ ¼ k ½L L0 2 ð2:2:15bÞ
∂y2 L
∂V ðz2 z1 Þ
Fz ¼ ¼ k½L L0
∂z2 L
which are rather complex expressions when written out explicitly in terms of the
Cartesian coordinates. But note that if we had used spherical coordinates (r, θ, ϕ)
with origin at x1 to locate the particle, we would have r ¼ L and the potential energy
in those spherical coordinates would just be
1
V ¼ k ½r L0 2 ð2:2:16Þ
2
We can use Eq. (2.2.16) directly if we know how to take the vector gradient
operator in spherical coordinates. You can look in any book on vector calculus to
find that operator written as
∂ 1 ∂ 1 ∂
— ¼ er þ eθ þ eϕ ð2:2:17Þ
∂r r ∂θ r sin θ ∂ϕ
where (er, eθ, eϕ) are unit vectors in the (r, θ, ϕ) directions, respectively, for the
spherical coordinates shown in Fig. 2.4a. For completeness, we also note that in
cylindrical coordinates (r, θ, z) the vector gradient operator is likewise
z z
er ez
eφ
eθ
θ z
r eθ er
y y
φ θ r
x x
(a) (b)
Fig. 2.4 (a) Spherical coordinates and unit vectors, and (b) cylindrical coordinates and unit vectors
2.2 The Dynamics of Unconstrained Motion of a Particle 27
∂ 1 ∂ ∂
— ¼ er þ eθ þ ez ð2:2:18Þ
∂r r ∂θ ∂z
for the cylindrical coordinates shown in Fig. 2.4b. For 2-D problems that are
described in polar coordinates (r, θ) we can use the gradient
∂ 1 ∂
— ¼ er þ eθ ð2:2:19Þ
∂r r ∂θ
F r ¼ kðr L0 Þ
ð2:2:20aÞ
Fθ ¼ Fϕ ¼ 0
or in vector form
which is indeed a simpler form than Eq. (2.2.15b) but completely equivalent to it. Of
course, if the spring always lies along one of the Cartesian coordinate axes the
potential and force expressions are also in the simpler form of Eqs. (2.2.20a) and
(2.2.20b). For example, if the spring is along the x-axis and we let x ¼ L be the
stretched length we have
1
V ¼ kðx L0 Þ2
2
F x ¼ k ðx L0 Þ ð2:2:21Þ
Fy ¼ Fz ¼ 0
This is a model of a linear spring, since the force is linearly proportional to the
deformation, x L0, of the spring. Nonlinear springs along the x-axis might have a
force-deformation relationship like Fx ¼ k(x L0)2, for example.
As a final example, consider the force of gravitation between two particles of
mass m1 and m2, respectively (Fig. 2.5). Newton postulated that a particle m1
experiences a gravitational force of attraction to another mass m2 given by
Gm1 m2
F¼ er ð2:2:22Þ
r2
m2 y
x
(a) (b)
constant, which has been measured to be, approximately, G ¼ 6.673 1011 N m2/
kg2. It follows that we can define the potential energy of this force as
Gm1 m2
V ¼ ð2:2:23Þ
r
Near the surface of the earth, if we let the radius r ¼ R, the radius of the earth, and
let m2 ¼ M be the mass of the earth, then
MG
F ¼ m1 er ¼ m1 ger ð2:2:24Þ
R2
where g is called the acceleration of gravity at the earth’s surface. This acceleration
will be a nearly constant value if we have motion over radial distances that do not
vary significantly from R, a condition we implicitly assumed when solving our
projectile motion problems.
Newton published his universal law of gravitation in 1687 in his Principia, stating
Every particle in the universe exerts an attractive force on every other particle where the
magnitude of the force is proportional to the product of the masses of the two particles and is
inversely proportional to the square of the distance between them. The direction of the
attractive force lies along the straight line connecting the two particles.
There are mutually attractive forces acting on each of the interacting masses so
that just as mass m2 exerts an attractive force on mass m1, mass m1 also exerts an
equal and opposite force on mass m2. Thus, according to Newton’s law of gravitation
if we consider any two masses, mi and mj and write the force that mass mj exerts on
mass mi as Fi j and, likewise, let the force that mass mi exerts on mass mj be Fji, we
have (see Fig. 2.6)
Gmi m j rij
Fij ¼ F ji ¼ ð2:2:25Þ
r 2ij r ij
2.2 The Dynamics of Unconstrained Motion of a Particle 29
x (a)
(b)
where rij ¼ rj ri is the position vector directed from mass mi to mass mj (Fig. 2.6).
Equation (2.2.25), therefore, is a more complete representation of Newton’s law than
Eq. (2.2.22).
For other forces how do you know if you can associate a potential energy with
that force? The answer is: a force can be represented as the gradient of a potential if
and only if the curl (—) of the force is zero, i.e.,
—F¼0 ð2:2:26Þ
You may have encountered a similar result in vector calculus in a purely mathemat-
ical context since for any vector that is represented as the gradient of a scalar function
we have the vector identity — —V ¼ 0, which you can easily verify by carrying out
the curl and gradient operations on any scalar, V.
Systems governed by Eq. (2.2.13) where the applied force can be represented in
terms of a potential energy are called conservative systems since the total energy, E,
of the system (which we will define shortly) remains a constant so E is conserved
during the motion. To see this, first take the vector dot product of both sides of
Eq. (2.2.13) with the velocity vector, x_ , giving
m €x x_ ¼ —V x_ ð2:2:27Þ
ðt h xð
ðt Þ
m 2i
d v ¼ —V dx
2
t¼0 x0
xððt Þ
∂V ∂V ∂V
¼ dx þ dy þ dz ð2:2:29Þ
∂x ∂y ∂z
x0
xððt Þ
¼ dV
x0
Since we have perfect differentials on both sides of Eq. (2.2.29) we can perform the
integrations. We find, after a rearrangement of terms,
1 1
mvðt Þ2 þ V ðxðt ÞÞ ¼ mv20 þ V ðx0 Þ ð2:2:30Þ
2 2
where v20 ¼ v20x þ v20y þ v20z . The kinetic energy, T, of the particle is defined as
1 1
T ¼ m x_ x_ ¼ mv2 ð2:2:31Þ
2 2
so that Eq. (2.2.30) shows that the total energy, E, defined as E ¼ T+V, remains a
constant during the motion.
For the projectile problem just considered we have
" 2 #
m dx 2 dy
T¼ þ
2 dt dt ð2:2:32Þ
V ¼ mgy
and using Eqs. (2.2.7) and (2.2.8) we can easily prove that
mh 2 i
E ¼ T þ V ¼ E0 ¼ v0x þ v20y þ mg y0 ð2:2:33Þ
2
needed in MATLAB® to solve the projectile problem with drag forces included.
These steps will be the same when solving much more complex problems so it is
important that you study them carefully.
2.2.5 Work–Energy
m €x x_ ¼ F x_ ð2:2:34Þ
which, following the same steps as carried out for the potential force case, leads to
ðt hm i
xð
ðt Þ
d v ¼
2
F dx ð2:2:35Þ
2
t¼0 x0
giving
xð
ðt Þ
where W is the work of the force along the path of the particle and ΔT is the change
of the kinetic energy. Some authors prefer to write the work-energy relationship in
terms of rate-of-work terms. Since dW/dt ¼ dT/dt, where P ¼ dW/dt is the power we
have
ðt ðt
W¼ Pdt ¼ F v dt ¼ T ðt Þ T ðt 0 Þ ¼ ΔT ð2:2:37Þ
t0 t0
For general forces the work done by the force (and hence the corresponding change
in the particle’s kinetic energy) will depend on the particular path followed while for
potential forces the work done depends only on the starting and ending points of the
path since in that case
32 2 Dynamics of a Particle
xð
ðt Þ ðt Þ
xð
∂V ∂V ∂V
W¼ —V dx ¼ dx þ dy þ dz
∂x ∂y ∂z
x0 x0
ð2:2:38Þ
ðt Þ
xð
We can also use this result to show how Eq. (2.2.26) also arises naturally from work
concepts. If we compute the work of a force along any closed path where the starting
and ending points coincide, then for potential forces Eq. (2.2.38) shows that the work
must be zero, or in other words we have for the closed loop integral around any path
þ þ
F dx ¼ —V dx ¼ 0 ð2:2:39Þ
However, Stokes’ theorem states that the closed loop line integral of any vector
function, F, is equal to (— F) ndS integrated over a surface S surrounded by the
closed loop, where n is a unit normal vector to the surface (see Fig. 2.7), i.e.,
þ ð
F dx ¼ ð— FÞ ndS ð2:2:40Þ
S
so that for a force represented by a potential energy, from Eqs. (2.2.39) and (2.2.40)
we must also have
ð
ð— FÞ ndS ¼ 0 ð2:2:41Þ
S
Consider the projectile problem again but where we include a drag force, D (see
Fig. 2.2b). We will assume that the magnitude of this drag force is proportional to the
square of the magnitude of the particle velocity and the direction of the drag force is
opposite to the particle velocity, as shown in Fig. 2.2b. This type of drag force is
often used to simulate aerodynamic drag forces. In this case we have
D ¼ bjvjv
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ð2:2:42Þ
¼ b x_ 2 þ y_ 2 x_
where b is a drag constant (it has units of force/velocity2) and the minus sign is
included to ensure that the drag force is always opposite in direction to the particle
velocity. In this case the equations of motion for the projectile from Newton’s
second law become
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
m€x ¼ b x_ 2 þ y_ 2 x_
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ð2:2:43Þ
m€y ¼ b x_ 2 þ y_ 2 y_ mg
x_ ðt Þ ¼ gðxðt Þ; t Þ ð2:2:45Þ
x1 ¼ xð t Þ
x2 ¼ x_ ðt Þ
ð2:2:46Þ
x3 ¼ yð t Þ
x4 ¼ y_ ðt Þ
x_ 1 ¼ x2
pffiffiffiffiffiffiffiffiffiffiffiffiffiffi
x_ 2 ¼ cx2 x22 þ x24
ð2:2:47Þ
x_ 3 ¼ x4
pffiffiffiffiffiffiffiffiffiffiffiffiffiffi
x_ 4 ¼ cx4 x22 þ x24 g
which is indeed in the form of Eq. (2.2.45). To solve this system of equations in
MATLAB®, we first write a MATLAB® function, projectile_w_drag_eqs, which
defines the system of Eq. (2.2.47) and whose calling sequence is
The input parameters of this function are the time, t, the vector x containing our four
variables, [x(1), x(2), x(3), x(4)], and the constants c and g. This function evaluates
the right side of the system of equations in Eq. (2.2.47) and returns the left-hand side
as the vector xdot ¼ [xdot(1), xdot(2), xdot(3), xdot(4)]T which must be written as a
column vector. The function is given explicitly as
end
[Note that in this example the time, t, never appears explicitly in the equations of
motion so that input parameter is not used. But in other examples where time is
present explicitly, we do need the time input to accommodate that behavior. In
writing our equations of motion the MATLAB® function we create, like dproj, must
always contain t as its first input argument and the first-order system variable, x, is
the second argument (a vector), followed by whatever other input parameters may be
present].
With the equations of motion for the system so defined we then need to specify
three inputs: (1) the time interval tspan ¼ [0, T] (written here in MATLAB® as a row
vector) over which we want to calculate the solution, (2) the initial conditions for the
position and velocity components in a row vector x0 ¼ ½xð0Þ; x_ ð0Þ; yð0Þ; y_ ð0Þ
corresponding to our four system variables, and (3) the values for the constants
c and g. As an example calculation in MATLAB® let
Using these inputs we then can call the MATLAB® ordinary differential equation
solver ode45 with the calling sequence
The function ode45 solves a system of first-order differential equations and works
well for many dynamics problems, so it a good choice. However, solving dynamics
problems numerically can sometimes be difficult or time consuming so that there are
other solvers available in MATLAB® (and other software packages) that could be
used and may be specifically needed in special cases. In this book we will not go
through the numerical solution procedures contained in these solvers in detail but in
Appendix C we will give a general overview of how solvers such as ode45 work.
The first input argument of the function ode45 is a handle to the
projectile_w_drag_eqs function. A function handle is a MATLAB® data type that
stores all the information needed about the function that allows one to execute that
function. By passing the function handle for projectile_w_drag_eqs to the differen-
tial equation solver ode45, that solver can use it to solve our system of equations.
The function ode45 solves the system of equations over the time interval tspan with
initial conditions x0. The function ode45 also has a vector of optional input
36 2 Dynamics of a Particle
y, meters
drag (solid line) and no drag
(dashed line) 0
-20
-40
-60
0 50 100 150 200 250
x, meters
arguments which are not used here so they are specified by an empty vector, [ ],
followed by the names of the input arguments (beyond t and x) of the function we are
using, which in this case are the parameters c and g. Later, we will replace the empty
vector [ ] with options that are used to control the numerical solution. The outputs of
ode45 are a column vector of times, tout, at which the solution values were
_ y; y_ in its
calculated and an array, xout, having the values of ½x1 ; x2 ; x3 ; x4 ¼ x; x;
four columns at those times. All of these MATLAB® commands have been placed in
a MATLAB® script named projectile_w_drag_sim (see Appendix F, where a listing
is given of all the functions and scripts used in this book). This script also plots the
y versus x projectile path in this case as well as the case when no drag is present
(c ¼ 0), as shown in Fig. 2.8. It can be seen that the case with drag (solid line) has
considerably less range than the no-drag case (dashed line). The no-drag case
follows the expected symmetrical parabolic path which is distorted in the case
with drag. For long times, we see that the projectile’s x-component of the velocity
is getting smaller and the particle path is getting more and more vertical. When the
vertical drag force is equal and opposite to the force of gravity the vertical acceler-
ation of the projectile is zero and the projectile has reached a constant terminal
velocity. From the second equation in Eq. (2.2.44) we see when x_ and €y are both zero
we find y_ < 0 and the magnitude of the terminal velocity is the constant
pffiffiffiffiffiffiffi
vterm ¼ jy_ j ¼ g=c. In the example just considered we have vterm ¼ 40.41 m/s. After
executing the script the y-velocity is in the vector ydot so that if in the command
window we examine the final value of this velocity we find
ydot(end)
ans = -31.4088
In the previous section the 2-D path of motion of the particle was determined by the
forces acting on the particle but the particle was free to follow any path that was
consistent with those known forces and initial conditions. In most dynamics prob-
lems, however, there are conditions (constraints) on the motion path. These con-
straints must be accounted for when we determine the motion and there are
additional forces generated that are present that need to be determined. In this section
we examine such constrained motion problems.
As our first example of constrained motion, let a particle be acted upon by gravity
and a known force, F(t), where the particle is a small bead that is threaded onto a
smooth, straight wire that is inclined at an angle θ in the vertical x–y plane, as shown
in Fig. 2.9a, and the force F acts along the wire. In this case the bead must move
along the straight wire which we can write as the equation of a “surface” in the form
[Note: Equation (2.3.1) is really an equation of a line, not a surface because we have
restricted the motion to be two-dimensional but we will still refer to Eq. (2.3.1) as a
“surface” since it corresponds to the case of the particle moving on a 2-D surface in
3-D in which case the equation f(x, y, z) ¼ 0 does indeed describe a surface.]
In this case the initial conditions must satisfy Eq. (2.3.1) and the particle can only
pass through points in the (x, y) plane that also satisfy Eq. (2.3.1) so the motion of the
particle is constrained and Eq. (2.3.1) is the constraint equation. To keep the particle
on the wire we must have another force acting in addition to the applied force and the
force of gravity. This force we will call a constraint force. Newton’s second law then
takes the form
ex x
(a) (b)
38 2 Dynamics of a Particle
m€x ¼ Fe þ Fc ð2:3:2Þ
where Fe is the resultant force from all the external applied forces and Fc is the
resultant of all the constraint forces.
We know from statics that the smooth wire shown in Fig. 2.9a can only exert a
force on the particle in a direction that is normal to the wire so the constraint force
must be along that normal direction, as shown in the free body diagram for our
particle in Fig. 2.9b. Thus, the forces acting are
Fe ¼ F ðt Þet mgey
ð2:3:3Þ
Fc ¼ Nen
where (ex, ey) are unit vectors in the x- and y-directions and (et, en) are unit vectors
along the wire and normal to the wire (Fig. 2.9). Newton’s second law then gives
or in component form
Thus, to determine the motion of the bead we must solve the equations of motion,
Eq. (2.3.5), jointly with the constraint equation, Eq. (2.3.1), giving three equations
for the three unknowns (x(t), y(t), N ). Can we solve these equations numerically? The
answer is yes. Since Newton’s second law gives us two second-order differential
equations while the constraint equation is an algebraic equation, the system of
equations in Eq. (2.3.6) is called a system of differential-algebraic equations
(DAEs). More general constrained motion dynamics problems also lead to DAEs.
The MATLAB® ode45 solver requires that we have a system of first-order ordinary
differential equations (ODEs) so it cannot be used directly to solve Eq. (2.3.6). There
are other solvers in MATLAB® that could be used for the DAEs of Eq. (2.3.6) but
solving DAEs numerically typically requires more careful analysis of the numerical
procedures than does solving ODEs. Since in this book we do not want to focus our
attention too heavily on the numerical methods themselves, we will not discuss
numerical DAE solvers. For more information on solving DAEs, see [1]. Not using a
DAE solver directly means that we will examine ways to express Eq. (2.3.6) that will
2.3 The Dynamics of Constrained Motion of a Particle 39
lead us to a system of ODEs that we can treat with solvers such as ode45. One
method that we will use frequently is to differentiate the constraint equation twice on
time to write it in terms of the accelerations. In this case we have
syms m g F theta
The formal solution of this linear set of equations is just u ¼ K1d so we can find the
solution symbolically in this fashion and simplify the final expression so that it is
more readable:
u =inv(K)*d;
simplify(u)
Using sin(2θ) ¼ 2 sin θ cos θ and writing this solution in terms of our original
variables we have, with a few minor changes,
Note that we can also solve this problem very directly by looking at Newton’s force
equations along the wire and perpendicular to the wire, i.e., along the (x0 , y0 )
coordinates shown in Fig. 2.9b. In this case we find simply
m€x0 ¼ F ðt Þ mg sin θ
ð2:3:10Þ
m€y0 ¼ 0 ¼ N mg cos θ
Obviously the normal force agrees with our previous result. The equations of motion
are also in agreement since the transformation from the (x, y) coordinates to the
(x0 , y0 ) coordinates is just
x0 cos θ sin θ x
¼ ð2:3:11Þ
y0 sin θ cos θ y
which is also true for the acceleration components so that differentiating Eq. (2.3.11)
twice on time and using it in Eq. (2.3.9) we do find Eq. (2.3.10).
If we can integrate the F(t) term analytically then we can solve the differential
equations in Eq. (2.3.9) analytically and we do not have to perform the solution
numerically. However, remember that in performing the solution for (x, y) either
analytically or numerically the intial conditions x0 ; x_ 0 ; y0 ; y_ 0 need to satisfy the
constraints since the constraints hold for all times t, including the initial time. Thus,
in this bead on a straight-wire problem the initial conditions must satisfy
y0 cos θ x0 sin θ ¼ 0
ð2:3:12Þ
y_ 0 cos θ x_ 0 sin θ ¼ 0
1. Apply Newton’s second law to obtain the acceleration components in terms of the
known applied forces and the unknown constraint forces.
2. Use the constraint equations and differentiate them on time to write those
constraints in terms of the accelerations.
3. Solve the combination of Newton’s law equations and the differentiated con-
straint equations for the constraint forces in terms of the position and velocity
components and solve for the accelerations in the same fashion. These acceler-
ation expressions will be the equations of motion and the constraint force
expression will give us the constraint force values once the equations of motion
are solved.
4. Solve the equations of motion to obtain the position and velocity components,
using initial conditions that are consistent with the constraints. Use this solution
to obtain the constraint forces explicitly.
In our bead-on-the-straight-wire problem the constraint force is a constant so that
we can obtain it without having a solution of the equations of motion as the steps
listed above would indicate. However, when we solve more complex problems such
as where the bead moves on a curved wire (a problem we will consider shortly) we
will see that the constraint force will indeed be a function of the coordinates of the
bead and its velocity so that the constraint force can be found explicitly only after
solving the equations of motion.
Now, let us consider solving this problem numerically. We could turn the
equations of motion in Eq. (2.3.9) into a system of four first-order differential
equations. But, we can also completely solve the problem by just solving the first
equation in Eq. (2.3.9) for x(t) and x_ ðt Þ since the constraint equation and its time
derivative then give us the behavior of y(t) and y_ ðt Þ explicitly. This might be
expected since this problem is the example of a single degree of freedom system.
It makes sense that we only need to solve for only one coordinate variable because
this is also exactly what we found when we used the (x0 , y0 ) coordinates and obtained
Eq. (2.3.10).
In dynamics problems, if the motion of a completely unconstrained system can be
described in terms of ns system coordinates and if we then apply nh constraints that
relate those system coordinates to each other (such as Eq. (2.3.1)), the smallest
number of independent coordinates needed to describe the motion of the system is
the number of degrees of freedom, ndof ¼ ns nh. These ndof coordinates we will call
the independent coordinates and the remaining coordinates the nh-dependent coor-
dinates. The sum of independent and dependent coordinates equals ns, the number of
system coordinates. We can always partition the system coordinates into dependent
and independent coordinates. In our bead problem ns ¼ 2 (the two coordinates x and
y), nh ¼ 1 (one constraint on the motion in those coordinates), so ndof ¼ 1. The x-
coordinate, for example, can be chosen as an independent coordinate and then the y-
coordinate is a dependent coordinate.
If practical, it is nice to solve dynamics problems using only ndof equations of
motion for the independent coordinates since then we have as few equations as
possible and the constraints are automatically satisfied. However, in complex prob-
lems the equations of motion written in terms of the independent coordinates may be
42 2 Dynamics of a Particle
much more complex than the larger number of equations of motion we find in terms
of the system coordinates (which describe unconstrained motion). But if we use
system coordinates we must also explicitly satisfy the constraints between those
system coordinates. As we saw with this example of the bead on the wire problem, if
we differentiate the constraint equation twice to obtain an expression for the con-
straint in terms of the accelerations, then we can use those acceleration constraints to
find the equations of motion for the system coordinates (which were the coordinates
(x, y) for the bead problem). However, because we took two time derivatives of the
original constraint equation, satisfying the constraint equation itself and its first time
derivative was not explicitly part of the equations of motion for the system coordi-
nates. This is not an issue if we both solve those equations of motion exactly and
satisfy the initial conditions exactly, since then the constraint equation and its first
derivative (and in fact all derivatives) will also be exactly satisfied. In numerical
solutions of the equations of motion for the system coordinates, however, small
errors can accumulate over time and cause growing errors in satisfying the constraint
equation and its first derivative and we must deal with that problem, which is called
the problem of constraint drift. We will not discuss explicit solutions to the problem
of constraint drift until Sect. 2.12 but another viable approach is to monitor the
constraints and their first time derivatives as the numerical solution proceeds to
guarantee that constraint errors are indeed small. Of course, this second approach
does not really solve the constraint drift problem but simply ensures that it is not
present. Thus, in the bead problem, for example, we can choose to either (1) solve
the set of two equations of motion for the system coordinates (x, y) and also evaluate
the constraint equation and its first derivative to ensure that they are not violated or
(2) solve the equation of motion for an independent coordinate, such as x, and use the
constraint equation and its derivative to find the dependent coordinate, y, and its
derivative, y_ . This second choice avoids constraint drift and keeps the constraint
equation and its derivative satisfied to within the accuracy of the numerical solution.
where m is the mass, g is the acceleration of gravity, and ang is the angle θ (in rad).
Note that in this case we do need the time input variable of this function in order to
evaluate F. A script, bead_on_s_wire_sim, sets up default values for the problem as
m ¼ 1 kg, g ¼ 9.81 m/s , ang ¼ 30*pi/180 (θ ¼ 30 in rad), tspan ¼ [0, 10] s, and
2
The free body diagram of the bead is shown in Fig. 2.11b. Again we have a
constraint force, N, which acts normal to the wire, i.e., in the direction defined by
the unit vector en. From analytical geometry we know that the normal to a “surface”
44 2 Dynamics of a Particle
0.8
0.4
-0.4
-0.8
0 1 2 3 4 5 6 7 8 9 10
time, t, sec
(c)
Fig. 2.10 (a) The displacement of the bead along the wire versus time, (b) the value of the
constraint equation during the motion, and (c) the value of the derivative on time of the constraint
equation
ex x
(a) (b)
2.3 The Dynamics of Constrained Motion of a Particle 45
defined by f(x, y) ¼ 0 is in the direction of the gradient of the function f(x, y), —f,
where in this case
∂f ∂f
—f ¼ ex þ ey ¼ 2axex þ ey ð2:3:15Þ
∂x ∂y
—f 2ax 1
en ¼ ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ex þ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ey ð2:3:16Þ
j— f j 1 þ 4a x 2 2 1 þ 4a2 x2
The external and constraint forces acting on the bead, therefore, are
Fe ¼ mgey
2axN N ð2:3:17Þ
Fc ¼ Nen ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ex þ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiey
1 þ 4a2 x2 1 þ 4a2 x2
2ax
m€x ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi N
1 þ 4a2 x2
ð2:3:18Þ
N
m€y ¼ mg þ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
1 þ 4a2 x2
Taking one derivative and then a second time derivative of the constraint gives
y_ 2ax x_ ¼ 0 ð2:3:19aÞ
and
2
€y 2ax€x ¼ 2a x_ ð2:3:19bÞ
Placing the acceleration terms of Eq. (2.3.18) into Eq. (2.3.19b) gives
As done before with the bead on the straight wire we could have combined Newton’s
second law equations, Eq. (2.3.18), with the constraint equation written in terms of
the accelerationsin Eq. (2.3.19b) to have a linear system of three equations for the
three unknowns €x; €y; N . We can write those three equations succinctly as
2 38 9 8 9
m 0 ð1=j— f jÞ∂f =∂x > < €x > < 0 >
= > =
6 7
4 0 m ð1=j— f jÞ∂f =∂y 5 €y ¼ mg ð2:3:23Þ
: >
> ; >
: >
;
∂ f =∂x ∂ f =∂y 0 N 2ax_ 2
and we could again solve this system since the determinant, D, of the matrix of
coefficients for this system is never zero where
m 0 ð1=j— f jÞ∂f =∂x
2 2
1 ∂f 1 ∂f
D ¼
0 m ð1=j— f jÞ∂f =∂y
¼ m þm ¼ m j— f j
∂ f =∂x
j— f j ∂y j— f j ∂x
∂ f =∂y 0
ð2:3:24Þ
You can verify that the solution to this system (see Problem P2.5) yields the same
equations of motion and normal force expression just obtained so by whichever
method we choose we arrive at:
g þ 2ax_ 2
€x ¼ 2ax
1 þ 4a2 x2
g þ 2ax_ 2 2a x_ 2 2ax2 g
€y ¼ g þ ¼ ð2:3:25Þ
1 þ 4a2 x2 1 þ 4a2 x2
m g þ 2ax_ 2
N ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
1 þ 4a2 x2
Here the normal force is not a constant but a function of both the x-position
component and x-velocity component of the particle. Thus, we do need to find the
solution of the equations of motion before we can evaluate the constraint force. The
equations of motion also are more complex than in the straight-wire case and a
numerical solution is likely the only option we have. Again, this is a one degree of
freedom problem so that the problem can be defined in principle by one independent
variable. From Eq. (2.3.25)
we see that we could take x as that independent variable
and obtain the values of y; y_ from the constraint equation and its derivative and the
2.3 The Dynamics of Constrained Motion of a Particle 47
solutions for x; x_ . Alternatively, we could solve the equations of motion in
Eq. (2.3.25) for both x and y and then examine the satisfaction of the constraint
equation and its first derivative, as done in the straight-wire case (see Problem P2.6).
x_ 1 ¼ x2
g þ 2ax22 ð2:3:26Þ
x_ 2 ¼ 2ax1
1 þ 4a2 x21
[xdot] = bead_on_p_wire_eqs(t, x, a g)
The MATLAB® script bead_on_p_wire_sim was then written. The script solves
for the motion of the bead for the default parameters a ¼ 0.1 1/m and g ¼ 9.81 m/s2.
All the default input parameters can be specified by the user as different values, if
wanted, in the command window before executing the script. At time t ¼ 0 we
assume that the bead is at the origin and is given an initial velocity of 10 m/s in the
plus x-direction so that the default initial conditions are x0 ¼ [0, 10]. The time span
for the duration of the numerical solution is given as the default value tspan ¼ [0, 10]
s. One difference from the previous bead_on_s_wire_sim script is that we will also
specify two error tolerances, rtol and atol, that are used in ode45 to control the
numerical accuracy of the results. These error tolerances are placed in the ode45
function as part of an additional input argument to that function called options. To
generate this options argument we must use the MATLAB® function odeset. For
example, in the script bead_on_p_wire_sim (see Appendix F) we have the
statements
These generate the options argument with the specified values for rtol and atol
unless the user has specified different values before executing the script. There are
many other options that can be used by ode45 with the options input. To see these,
type
48 2 Dynamics of a Particle
help odeset
where now the options input variable is present which will specify that ode45 uses
the user-defined values of rtol and atol. Later, we will give more detail on how these
tolerances control the numerical solution. The tolerances shown above are the
default tolerances that ode45 uses when the options input argument is absent, i.e.,
when the options specification is the empty vector [ ], as used previously in the
straight-wire problem. After setting up default parameters, including these rtol and
atol values, and calling ode45 as shown above, the MATLAB® script
bead_on_p_wire_sim plots the motion x(t) versus the time, t, as well as the normal-
ized normal force N/mg versus t. These results are shown in Fig. 2.12a, b. Since there
is no dissipation modeled in this system the motion of the bead is just a back-and-
forth oscillation on the parabolic wire and we see in Fig. 2.12a this oscillatory
motion in the x-position. The normal force is also oscillatory, with its maximum
values occurring when the bead passes through x ¼ 0, which is the equilibrium
position of the bead. You might notice that the force curves are not smooth at their
peaks where the force is rapidly changing. This suggests that we may need to refine
the numerical solution. We can do that here by defining a smaller relative error
tolerance, rtol, before executing the script, i.e.,
rtol =1e-6;
The results are shown in Fig. 2.13, where we see that the force curve is now
smoother. Details of exactly how rtol affects the solution will be given in later
examples.
8 3.5
6 3
4 2.5
2 N 2
x(t) 0 mg
1.5
-2
-4 1
-6 0.5
-8 0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
(a) t, sec (b) t, sec
Fig. 2.12 (a) The x-displacement of the bead on the parabolic wire versus time, and (b) the
normalized normal force, N/mg, over the same time interval
2.3 The Dynamics of Constrained Motion of a Particle 49
0.5
0
0 1 2 3 4 5 6 7 8 9 10
t, sec
-2
-4
-6
-8
B
-10
-8 -6 -4 -2 0 2 4 6 8
x (m )
The phase plot in this case is a plot of x_ versus x, generating a single closed figure
centered about the equilibrium position x ¼ x_ ¼ 0 (shown as a black dot in the center
of Fig. 2.14). The arrows and other labels seen in Fig. 2.14 have been added
manually to this MATLAB® plot. The bead starts at O, moving in the +x-direction
50 2 Dynamics of a Particle
until it reaches its maximum x-displacement (and height, y, not shown) on the
parabolic wire (point A) with zero velocity. It then continues back to the origin
which it reaches with its maximum negative velocity (point B) and then reaches its
largest negative x-displacement (and largest height, y, again) at point C. Subse-
quently, the bead returns to the origin with its original velocity and then repeats the
entire motion. Closed figure phase plots of this type are characteristic of repetitive
motion problems where there is no damping involved so that the total energy is
conserved and the motion repeats indefinitely. Other dynamics problems as physi-
cally diverse as the linear motion of a mass attached to a spring and the motion of a
planet around the sun thus share similar phase plots to the one shown in Fig. 2.14.
In this problem the normal force does no work since it always acts perpendicular
to the motion of the particle. The only other force is the force of gravity, which is
derivable from a potential energy so the total energy, E, is conserved in this problem,
where
E ¼T þV
1 1 1 1
¼ mx_ 2 þ my_ 2 þ mgy ¼ mx_ 20 þ my_ 20 þ mgy0 ¼ constant ð2:3:27Þ
2 2 2 2
But since it is a single degree of freedom problem, we can also use the constraint to
write the total energy in terms of the single variable, x, and its derivative x_ :
1 1
E ¼ m 1 þ 4a2 x2 x_ 2 þ mgax2 ¼ m 1 þ 4a2 x20 x_ 20 þ mgax20 ð2:3:28Þ
2 2
We can also obtain phase plots from the total energy, which is somewhat more
revealing than the plot of Fig. 2.14 which is for just a single set of initial conditions.
If we vary the x-position and x-velocity and plot the contours of the total energy
function where that function is a constant then we can examine the behavior of the
system under a variety of initial conditions. The MATLAB® script
sliding_bead_energy evaluates the energy divided by the mass, m, E/m, of
Eq. (2.3.28) over a range of x_ values going from 10 to +10 m/s and a range of
x values over the range of 8 to +8 m, which are the same limits seen in Fig. 2.14.
The MATLAB® function contour is then used to generate the phase plots of the
motion for different constant values of E over these ranges. The results are shown in
Fig. 2.15. We can see that there are multiple closed curves, all of roughly the same
nature as in Fig. 2.14, although some of the curves are cut off at the edges of the plot
since they are outside the plot window. Always having closed phase plot curves
makes sense since regardless of the initial conditions the bead is always trapped
within a finite portion of the parabolic wire and the motion will be repetitive.
2.3 The Dynamics of Constrained Motion of a Particle 51
We can modify the nature of the motion in this bead on a parabolic wire problem
by including a purely viscous-like damping force, Fv, where the magnitude of the
damping force is just proportional to the magnitude of the velocity and is always in a
direction opposite to the velocity vector. This type of damping force, therefore, is
given by
Fv ¼ cx_ ¼ c x_ ex þ y_ ey
ð2:3:29Þ
¼ cx_ ex cð2axÞx_ ey
6 3.5
5 3
4
2.5
3
N 2
2
x(t) mg
1 1.5
0
1
-1
0.5
-2
-3 0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
(a) t (b) t
Fig. 2.16 (a) The x-displacement of the bead on a smooth parabolic wire versus time with a viscous
drag force, and (b) the corresponding normalized normal force
10
O
8
dx 2 O’
dt 0 C A
-2
-4
B
-6
-3 -2 -1 0 1 2 3 4 5 6
x
Fig. 2.17 The phase plot of a bead on a smooth parabolic wire when a viscous damping force is
present. The points shown correspond to when the bead is at the bottom (origin) starting point (O)
moving with a positive velocity (in the +x-direction), when it reaches its maximum height on the
right with zero velocity (A), when it returns to the origin, now with a negative velocity (B), then
reaches a maximum height again but now to the left (C), and then again returns to the origin with a
positive velocity considerably smaller than the starting velocity (O0 )
as expected, and the normalized normal force is also oscillatory and decaying,
approaching the constant value of N/mg ¼ 1, which is the value for the normal
force when the bead is in equilibrium at the bottom of the parabolic wire. After
executing the script the phase plot can again be obtained from the solution by
plotting:
plot(xout(:,1), xout(:,2))
whose output is shown in Fig. 2.17. Now the figure is no longer closed as both the
maximum amplitudes and velocities of the bead are decaying and the phase plot path
2.3 The Dynamics of Constrained Motion of a Particle 53
encircles and gradually spirals towards the equilibrium position x ¼ x_ ¼ 0 . Other
repetitive motion problems with damping and a stable, decaying dynamic behavior
exhibit similar phase plots.
A
y ¼ hð x Þ ¼ ½1 cos ðπx=LÞ ð2:3:31Þ
2
dh πA
¼ sin ðπx=LÞ
dx 2L
ð2:3:32Þ
d2 h π 2 A
¼ cos ðπx=LÞ
dx2 2L2
1 1
E ¼ T þ V ¼ m x_ 2 þ y_ 2 þ mgy ¼ m x_ 20 þ y_ 20 þ mgy0 ð2:3:33Þ
2 2
which for the sinusoidal track of Eq. (2.3.31) and initial conditions x0 ¼ y0 ¼ 0 and
x_ 0 ¼ vx0 , y_ 0 ¼ 0 gives
"
2 #
πA
2E=m ¼ 1 þ sin ðπx=LÞ x_ 2 þ gA½1 cos ðπx=LÞ ¼ x_ 20 ¼ v2x0 ð2:3:34Þ
2L
1 L
0
-10 -8 -6 -4 -2 0 2 4 6 8 10
x-distance
54 2 Dynamics of a Particle
Now, for the particle to have continuous motion along the roller-coaster track, it
must have sufficient initial velocity (to the right or left) to get over the first peaks in
the track at x ¼ L. If the particle arrives at either of pthose
ffiffiffiffiffiffiffiffipeaks with zero velocity
Eq. (2.3.34) gives the starting velocity, vm, as vm ¼ 2gA. Thus for |vx0| < |vm| the
particle is trapped in the first trough and can simply oscillate back and forth, as in the
parabolic wire case. But if |vx0| > |vm| then the particle can ride the roller coaster to the
right or left forever, assuming that the particle is held to the track by upper and lower
rails that can exert either a positive or a negative normal force on the particle. We can
see both types of behavior if we use the total energy equation to examine the phase
plots of the motion. Figure 2.19 shows the phase plots for A ¼ 4 m and L ¼ 5 m, with
vx varying over (|vm|, +|vm|) and x varying over two complete cycles of the
sinusoidal track. In the center of the figure we see arrows following a closed path
about the origin which represents oscillatory motion within the center trough of the
roller coaster (between x ¼ 5 m and x ¼ +5 m). However, we also see arrows that
follow an open path where x is continuously increasing as the particle rides the
coaster path. The maximum starting velocity for this open path is slightly larger than
vm, a value that occurs outside the plot window. Note that there are entire families of
both open and closed curves with each curve depending on the value of the total
energy.
All the black dots labeled O in Fig. 2.19 represent stable equilibrium points at the
bottoms of the path while the dots labeled P represent unstable equilibrium points at
the peaks. We can justify this statement qualitatively if we plot the total energy near a
bottom point, as shown in Fig. 2.20a and near a peak point, as shown in Fig. 2.20b.
Near a bottom point the total energy forms a “bowl-like” surface with point O at the
bottom of the bowl (Fig. 2.20a). A particle that is launched into a small motion near
O will, if there is some dissipation present so that dE/dt < 0, eventually come to rest
at the bottom equilibrium point O. However, a particle set in motion near a peak
point will see a saddlelike energy surface (Fig. 2.20b) and tend to slide off the saddle
and move away from P, eventually coming to rest, if there is dissipation present, at
2.3 The Dynamics of Constrained Motion of a Particle 55
E
E
point O
dx point P
x dx
dt
dt x
(a) (b)
Fig. 2.20 (a) The total energy near a bottom point, O, of the roller coaster and (b) the total energy
near a peak point, P, of the roller coaster
some nearby bottom point on the roller-coaster path. In Chap. 6, when we discuss
stability of systems in more detail, we will provide a more rigorous verification of
such stability results.
Fe ¼ mgey
ð2:3:35Þ
Fc ¼ Nen
1 ∂f
m€x ¼ N
j— f j ∂x
1 ∂f ð2:3:37Þ
m€y ¼ mg þ N
j— f j ∂y
f ðx; yÞ ¼ 0
56 2 Dynamics of a Particle
Since the constraint equation must be satisfied for all times, if we differentiate that
constraint once on time we have
∂f ∂f
x_ þ y_ ¼ 0 ð2:3:38Þ
∂x ∂y
∂ f 2 ∂ f 2
2 2 2
∂f ∂f ∂ f
€x þ €y þ 2 x_ þ 2 y_ þ 2 x_ y_ ¼ 0 ð2:3:39Þ
∂x ∂y ∂x ∂y ∂x∂y
∂f ∂f
€x þ €y ¼ b x; y; x;
_ y_ ð2:3:40Þ
∂x ∂y
where
∂ f 2 ∂ f 2
2 2 2
∂ f
_ y; y_ ¼ 2 x_ 2 y_ 2
b x; x; x_ y_ ð2:3:41Þ
∂x ∂y ∂x∂y
1 ∂f
m€x ¼ N
j— f j ∂x
1 ∂f
m€y ¼ mg þ N ð2:3:42Þ
j— f j ∂y
∂f ∂f
€x þ €y ¼ b x; x;
_ y; y_
∂x ∂y
which are the governing equations for a particle moving in two dimensions on an
arbitrary
surface. We can solve these three equations for the three unknowns
€x; €y; N in the same manner as shown previously for the straight and parbolic
wire problems so we will omit the details here and just write down the final results
for the normal force and equations of motion as
m ∂f
N¼ bþg
j— f j ∂y
1 ∂f ∂f
€x ¼ b þ g ð2:3:43Þ
j— f j2 ∂x ∂y
1 ∂f ∂f
€y ¼ g þ b þ g
j— f j2 ∂y ∂y
2.3 The Dynamics of Constrained Motion of a Particle 57
Using the explicit form f(x, y) ¼ y h(x) we find that the constraint force and
equations of motion are
m d2 h 2
N ¼ qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi g þ 2 x_
1 þ ðdh=dxÞ2 dx
dh=dx d2 h 2 ð2:3:44Þ
€x ¼ g þ _
x
1 þ ðdh=dxÞ2 dx2
1 d2 h 2
€y ¼ g þ g þ 2 x_
1 þ ðdh=dxÞ2 dx
To obtain the roller-coaster problem we place the values of h and its derivatives from
Eqs. (2.3.31) and (2.3.32) into this solution. This leads to rather lengthy expressions
so we will not give those explicit forms here. Recall we assumed that the roller
coaster is moving on smooth rails that prevent the cart from leaving the track. This
assumption is important since if the cart was instead riding on a smooth surface the
normal force would always have to be positive, i.e., in the plus en direction. If the
normal force ever became zero then the cart could leave the track and we would have
an unconstrained problem to solve. The rails prevent that from happening (a good
thing!) allowing the normal force to be either positive or negative.
Since this is a one degree of freedom problem we will use the x-coordinate
and the
x-velocity to define the equations of motion in terms of ðx1 ; x2 Þ ¼ x; x_ which gives
us the normal force and equations of motion as
m d2 h
N ¼ qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi g þ 2 x22
1 þ ðdh=dx1 Þ2 dx1
x_ 1 ¼ x2 ð2:3:45Þ
dh=dx1 d2 h 2
x_ 2 ¼ g þ 2 x2
1 þ ðdh=dx1 Þ2 dx1
This function contains both the ode45 numerical integration routine and the function
roller_cart that generates the equations of motion for this problem:
function [tout, xout]= roller_coaster_1D(tspan,x0,g, A, L,rtol,atol)
% [tout, xout] = roller_coaster_1D(tspan, x0, A,L)solves for the motion of
% a roller-coaster cart on a sinusoidal track whose height, h, is given by
% h= A*(1-cos(pi*x/L))/2(the MATLAB® solver is ode45). tspan is the
% time
58 2 Dynamics of a Particle
% interval over which we want to obtain the solution and x0 is the vector
% of initial conditions on the x-coordinate, x(0) and x-velocity, vx(0)
% so that x0 = [ x(0) vx(0)]. rtol and atol are input error tolerances.
% The outputs of the function are the times,tout, over which the
% solution is calculated, and the values of x and dx/dt evaluated at
% those times. Both tout and xout are column vectors.
% It is assumed that x is in meters (m) and dx/dt is in m/sec. g is the
% acceleration of gravity.
end
If you examine the above listing you will see that one difference between this
approach and how we constructed solutions previously is that here we define the
function that generates the equations of motion, roller_cart, within the function,
roller_coaster_1D, i.e., roller_cart is a nested function. Functions nested in this
manner can share variables without having to pass those variables directly. Thus,
the variables g, A, and L are shared by roller_coaster_1D and the nested function
roller_cart. Since these variables are not passed as explicit arguments we see that
2.3 The Dynamics of Constrained Motion of a Particle 59
they do not appear as input arguments to roller_cart and when we use ode45 in
conjunction with roller_cart these variables do not have to be specified as additional
input arguments to that solver as well. This sharing results in very simple calls to
both ode45 and the function that defines the equations of motion that ode45 uses so
we will frequently use such nested functions in later examples. You can see that we
also allow the function roller_coaster_1D to have input arguments, rtol and atol.
These input error tolerances, as we have mentioned previously, are used by ode45 to
adjust the numerical accuracy of the solution. In the roller-coaster problem we will
need to adjust the relative error tolerance, rtol.
A script, roller_coaster_sim, was also written to solve the roller-coaster problem.
This script sets up default values for L, A, tspan, x0, rtol, and atol given as L ¼ 5,
A ¼ 4, tspan ¼ [0, 10], x0 ¼ [0, 8.5], rtol ¼ 1e-3, and atol ¼ 1e-6, respectively.
These default values are used unless a user specifies alternate values in the
MATLAB® command window before executing this script, which is something
we will need to do for this problem. The values of rtol ¼ 1e-3 and atol ¼ 1e-6 are
again the default values of these parameters when the function ode45 is called with
the options argument set equal to the empty vector [ ]. After solving the problem the
roller_coaster_sim script plots y versus x, the path of the particle; evaluates the
normal force divided by the weight, mg; and plots it as a function of time.
If we run the script using the default values, the initial x-velocity of 8.5 m/s is less
than the velocity vm ¼ 8.86 m/s needed to get over the first peak. Thus, the motion is
just a back-and-forth periodic motion and the normal force is always positive, as
shown in the plots of Fig. 2.21a, b. If we change the initial conditions to x0 ¼ [0,
12.0] and run the script again we have the y versus x and normal force curves shown
in Fig. 2.22a, b. Now, as expected, the particle can go over the top and will ride the
roller coaster forever. We see this behavior in Fig. 2.22a, which appears to have the
correct sinusoidal motion along the track. The normal force in Fig. 2.22b now has
negative as well as positive values. However, the normal force appears to be growing
in time, which is clearly incorrect since we expect that all the motion parameters will
4 7
3.5
6
3
5
2.5
y
2
N 4
mg 3
1.5
1 2
0.5 1
0 0
-5 -4 -3 -2 -1 0 1 2 3 4 5 0 1 2 3 4 5 6 7 8 9 10
(a) x (b) t
Fig. 2.21 (a) The y versus x path of a particle for initial conditions x0 ¼ [0, 8.5] where it is trapped
in the first valley of the sinusoidal roller coaster, and (b) the corresponding normal force, which is
always positive
60 2 Dynamics of a Particle
4 20
3.5
15
3
2.5 10
y
2 N 5
1.5 mg
0
1
0.5 -5
0 -10
0 10 20 30 40 50 60 70 80 90 0 1 2 3 4 5 6 7 8 9 10
(a) x (b) t
Fig. 2.22 (a) The y versus x path of a particle for initial conditions x0 ¼ [0, 12] where it has
sufficiently high initial speed to ride the sinusoidal roller coaster and (b) the corresponding normal
force, which has both positive and negative values and exhibits an unphysical growing behavior due
to numerical errors when ode45 is used with its default tolerance
simply repeat as the cart repetitively goes through one cycle of the roller coaster to
the next. What is the problem? From Fig. 2.22a we see that while the y-coordinate is
always between values of 0 and 4, the x-coordinate is ever increasing, reaching
values that are much larger than the maximum y-values. In this case the default
relative tolerance of 1 103 used in ode45 is not sufficient to accurately solve the
problem numerically since the relative tolerance is based on the size of the variables,
one of which, x, is constantly growing. Thus, if we enter a smaller tolerance, rtol ¼
1 105, in the MATLAB® command window and rerun the script, we see that the
normal force now appears to have the proper uniform values, as shown in Fig. 2.23
(the y- versus x-plot does not visually change much and is not shown). This behavior
did not show up in Fig. 2.21b because there both y and x varied over a range of
similar values. This is a good example to show that when doing numerical solutions
we need to be careful that numerical errors do not build up over time and render the
solution inaccurate. For conservative problems, one good test is to examine the
2.4 Constraints and Equations of Motion: A Matrix Approach 61
1.5 1.5
1.4 1.4
1.3 1.3
1.2 1.2
E/E(0)
1.1 1.1
1 1
0.9 0.9
0.8 0.8
0.7 0.7
0.6 0.6
0.5
0 1 2 3 4 5 6 7 8 9 10 0.5 0 1 2 3 4 5 6 7 8 9 10
(a) t (b) t
Fig. 2.24 (a) E/E(0) for the same setup of Fig. 2.22 plotted versus time, t, for rtol ¼ 1.0 103 (the
default tolerance in ode45), where E is the total energy, and (b) the same plot for rtol ¼ 1.0 105
numerical values of the total energy. Any significant deviations from its values at the
starting time can warn of numerical inaccuracies in the solution. To see what
happens in this case we have written a second script, roller_energy, which simply
evaluates and plots E/E(0) as a function of time using the workspace values
generated by roller_coaster_sim. If the roller_coaster_sim script is run with
x0 ¼ [0, 12] initial conditions (and the default rtol value) and then the script
roller_energy is run, the total energy as a function of time is shown in Fig. 2.24a,
which clearly shows a major error in the solution. However, if the relative tolerance
is changed to rtol ¼ 1.0e-5 and the roller_coaster_sim and roller_energy scripts are
rerun the error is significantly reduced, as shown in Fig. 2.24b. The reader can verify
the error can be reduced even further by choosing rtol ¼ 1.0e-6. The other error
tolerance, atol, is not changed from its default value as changes in this error tolerance
are needed only when the solution values get quite small, which is not a problem
here. We will say more about these two error tolerances later. In problems where
energy is not a constant, one can still examine the effects of the tolerances used by
ode45 on the numerical solution to help guarantee that the solution is accurate. In
fact, it is good practice to help verify the accuracy of any numerical solution by
running the simulation more than once, if practical, using different error tolerances.
If there is no significant change in the values at the end of the simulation (for large
times and/or displacements) then one has some confidence that numerical errors
have not accumulated and rendered the solution inaccurate.
m€x ¼ Fe þ Fc ð2:4:1Þ
M€x ¼ Fe þ Fc ð2:4:2Þ
where the 2 2 mass matrix and acceleration and force vectors are
" #
m 0
M¼
0 m
( ) ( e) ( ) ð2:4:3Þ
€x Fx F xc
€x ¼ , F ¼
e
, F ¼
c
€y F ye F yc
This law was combined with the twice-differentiated constraint equation f(x, y) ¼ 0
given by (see Eq. (2.3.40))
∂f ∂f
€x þ €y ¼ b x; y; x;
_ y_ ð2:4:4Þ
∂x ∂y
A€x ¼ b ð2:4:5Þ
1 ∂f
m€x ¼ F xe þ N
j— f j ∂x
ð2:4:6Þ
1 ∂f
m€y ¼ F ye þ N
j— f j ∂y
M€x ¼ Fe þ AT λ ð2:4:7Þ
Fc ¼ AT λ ð2:4:8Þ
Constraint forces that satisfy the prescription of Eq. (2.4.8), i.e., those that are
normal to the “surface” defined by the constraint f(x, y) ¼ 0 are called ideal
constraint forces. Lagrange first used this prescription so it is also called the
Lagrange prescription and λ is called a Lagrange multiplier. Are there other
problems where the constraint force is an ideal constraint force so that the form of
Eq. (2.4.8) is valid? The answer is definitely yes. In fact, many of the common
constraints encountered in the dynamics of rigid bodies such as pins, ball-and-socket
joints, and sliding joints produce ideal constraint forces. Here are a few examples of
ideal constraint forces involving a single particle and one example of a constraint
that is not an ideal constraint:
Example 1 Consider first the case of a moving smooth surface, where the constraint
is in the form
f ðx; y; t Þ ¼ 0 ð2:4:9Þ
An example of such a problem would be the problem shown in Fig. 2.25a, where
a block of mass m (treated here as a particle) slides on a moving smooth inclined
plane under the action of gravity and a spring force, where the motion of the plane in
the x-direction is given as x0(t), as shown. In this case the constraint equation is
which is in the form of Eq. (2.4.9). Taking one and two time derivatives we have
y_ tan α x_ ¼ tan α x_ 0
ð2:4:11Þ
€y tan α€x ¼ tan α€x0
64 2 Dynamics of a Particle
y
( x (t ) , y (t )) k x
θ L
Fc
m
F c
m θ m
α
( x (t ) , y (t ))
x y
x0 ( t )
(a) (b)
x
( x (t ) , y (t ))
0 0
m − μk ATλ e
θ Fc x= xe
L
m θ
m AT λ
y
( x (t ) , y (t ))
(c) (d)
Fig. 2.25 (a) A block on a moving smooth inclined surface under the action of gravity, a spring,
and the constraint force normal to the smooth surface. (b) A pendulum consisting of a mass
m attached to a massless wire of length L to a fixed point and acted upon by gravity and a constraint
force along the wire. (c) The pendulum problem of (b) but where now the end of the wire is allowed
to move. The constraint force is still along the wire. (d) A particle moving on a rough surface where
there is both a normal constraint force and Coulomb-type friction force
so the second equation in Eq. (2.4.11) is in the form of Eq. (2.4.5) where
A ¼ [tan α, 1]. The constraint force is still normal to the moving plane, as
shown in Fig. 2.25a, so from the geometry we would normally write this force as
sin α
F ¼
c
N
cos α
tan α
Fc ¼ N cos α ¼ AT λ
1
where λ ¼ N cos θ, so the prescription for this force given in Eq. (2.4.8) is still valid.
Example 2 Now, consider the pendulum problem shown in Fig. 2.25b, where a
mass is fixed to the origin by a thin, rigid (inextensible) wire of length L. The
constraint during the motion of the pendulum is
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
½xðt Þ2 þ ½yðt Þ2 L ¼ 0 ð2:4:12Þ
2.4 Constraints and Equations of Motion: A Matrix Approach 65
x y
pffiffiffiffiffiffiffiffiffiffiffiffiffiffix_ þ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiy_ ¼ 0
x þy
2 2 x þ y2
2
x y x_ 2 y_ 2 x2 x_ 2 y2 y_ 2
pffiffiffiffiffiffiffiffiffiffiffiffiffiffi€x þ pffiffiffiffiffiffiffiffiffiffiffiffiffiffi€y ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffiffi pffiffiffiffiffiffiffiffiffiffiffiffiffiffi þ þ
x2 þ y 2 x2 þ y2 x2 þ y2 x2 þ y2 ð x2 þ y2 Þ 3=2
ðx2 þ y2 Þ3=2
ð2:4:13Þ
The second equation is again of the form of Eq. (2.4.5) where now (see Fig. 2.25b)
" #
x y
A ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffiffi; pffiffiffiffiffiffiffiffiffiffiffiffiffiffi ¼ ½ sin θ; cos θ ð2:4:14Þ
x2 þ y 2 x2 þ y 2
The tension constraint force in the wire, as shown in Fig. 2.25b, would normally be
written as
sin θ
F ¼ T
c
¼ AT λ
cos θ
which again satisfies the prescription for this force given in Eq. (2.4.8) where the
parameter, λ, in this case is the negative of the tension, T.
Example 3 Next, consider the pendulum problem again as shown in Fig. 2.25c,
where now we let one end of the wire move with a specified motion (x0(t), y0(t)). In
this case the constraint is
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
½xðt Þ x0 ðt Þ2 þ ½yðt Þ y0 ðt Þ2 L ¼ 0 ð2:4:15Þ
ð x x0 Þ ðy y0 Þ
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi x_ x_ 0 þ qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi y_ y_ 0 ¼ 0
ð x x 0 Þ 2 þ ð y y0 Þ 2 ðx x0 Þ2 þ ðy y0 Þ2
ð x x0 Þ ð y y0 Þ ðx x0 Þ€x0 ðy y0 Þ€y0
€x þ €y ¼ þ
L L L L
2 2 2 2 2
x_ x_ 0 y_ y_ 0 ðx x0 Þ x_ x_ 0 ðy y0 Þ2 y_ y_ 0
þ þ
L L L3=2 L3=2
ð2:4:16Þ
66 2 Dynamics of a Particle
where now
hx x y y0 i
0
A¼ ; ¼ ½ sin θ; cos θ ð2:4:17Þ
L L
and the force in the wire obviously once more satisfies the prescription of Eq. (2.4.8).
Note that since we are taking derivatives we must be careful to substitute Eq. (2.4.15)
into our results only after we are done taking all the derivatives needed, a fact that
you may remember (or not) from a calculus course.
Example 4 Do all constraint forces satisfy Eq. (2.4.8)? The answer is no. An
example you might be familiar with is where we have a Coulomb friction force
present due to sliding on a rough surface (Fig. 2.25d). In this case the friction force is
proportional to the magnitude of the normal force, N, acting at the surface (and this
normal force, as we have seen, does satisfy Eq. (2.4.8)) but the friction force, Ff, acts
tangent to the surface and is opposite to the direction in which it is sliding, i.e.,
x_
F f ¼ μk jNj ð2:4:18Þ
jx_ j
where μk is the coefficient of sliding friction. Thus, the total constraint force is in this
case
x_
Fc ¼ AT λ μk
AT λ
ð2:4:19Þ
jx_ j
and because of the friction force it does not have the form of Eq. (2.4.8). If we have a
connection constraint or a contact constraint that is frictionless generally the con-
straint force will be an ideal constraint force but if there is friction involved the
constraint force will not be ideal. In Sect. 2.10 we will discuss an approach that does
allow us to consider Coulomb friction and other, more general nonideal constraint
forces, but until then we will examine a wide range of problems with ideal constraint
forces.
Finally, we note that we could also consider problems where the form of the
constraint inherently involves the velocity such as
_ y;
f x; y; x; _ t ¼0 ð2:4:20Þ
In this case we only need to differentiate the constraint once on time to obtain
∂f ∂f ∂f ∂f ∂f
€x þ €y ¼ x_ y_ ð2:4:21Þ
∂x_ ∂y_ ∂x ∂y ∂t
we can always obtain constraints of the form of Eq. (2.4.20) by simply differentiat-
ing a constraint of the form g(x, y, t) ¼ 0 once to obtain
∂g ∂g ∂g
_ y;
f x; y; x; _ t ¼ x_ þ y_ þ ¼0 ð2:4:22Þ
∂x ∂y ∂t
However, the reverse is not true, namely there are also constraints of the form of
Eq. (2.4.20) that cannot be integrated to obtain a constraint of the form g(x, y, t) ¼ 0.
We will discuss in more depth later the issues surrounding constraints represented by
Eq. (2.4.20) and we will give examples of such non-integrable constraints.
M€x ¼ Fe þ Fc ð2:4:23Þ
f ðx; y; zÞ ¼ 0 ð2:4:25Þ
∂f ∂f ∂f
x_ þ y_ þ z_ ¼ 0
∂x ∂y ∂z
ð2:4:26Þ
∂f ∂f ∂f
€x þ €y þ _ y;
€z ¼ b x; y; z; x; _ z_
∂x ∂y ∂z
68 2 Dynamics of a Particle
where
∂ f 2 ∂ f 2 ∂ f 2
2 2 2
_ y;
b x; y; z; x; _ z_ ¼ 2 x_ 2 y_ 2 z_
∂x ∂y ∂z ð2:4:27Þ
2 2 2
∂ f ∂ f ∂ f
2 x_ y_ 2 x_ z_ 2 y_ z_
∂x∂y ∂x∂z ∂y∂z
This again is of the form A€x ¼ b but where now A ¼ [∂f/∂x, ∂f/∂y, ∂f/∂z] is a 1 3
matrix (row vector). Thus, a discussion of single-constraint problems of the type
discussed for 2-D problems follows along very similar lines so we will not give the
details here. However, note that we now could introduce multiple constraints on the
particle. For example, we could have two constraints of the form of Eq. (2.4.25), i.e.,
f 1 ðx; y; zÞ ¼ 0
ð2:4:28Þ
f 2 ðx; y; zÞ ¼ 0
∂f 1 ∂f ∂f
x_ þ 1 y_ þ 1 z_ ¼ 0
∂x ∂y ∂z
∂f 2 ∂f ∂f
x_ þ 2 y_ þ 2 z_ ¼ 0
∂x ∂y ∂z
ð2:4:29Þ
∂f 1 ∂f 1 ∂f 1
€x þ €y þ _ y;
€z ¼ b1 x; y; z; x; _ z_
∂x ∂y ∂z
∂f 2 ∂f 2 ∂f 2
€x þ €y þ _ y;
€z ¼ b2 x; y; z; x; _ z_
∂x ∂y ∂z
O x
z
2.4 Constraints and Equations of Motion: A Matrix Approach 69
with
∂ f 2 ∂ f 1 2 ∂ f 1 2
2 2 2
_ y;
b1 x; y; z; x; _ z_ ¼ 21 x_ y_ z_
∂x ∂y2 ∂z2
2 2 2
∂ f1 ∂ f1 ∂ f1
2 x_ y_ 2 x_ z_ 2 y_ z_
∂x∂y ∂x∂z ∂y∂z ð2:4:30Þ
∂ f 2 ∂ f 2 2 ∂ f 2 2
2 2 2
_ y;
b2 x; y; z; x; _ z_ ¼ 22 x_ y_ 2 z_
∂x ∂y2 ∂z
2 2 2
∂ f2 ∂ f2 ∂ f2
2 x_ y_ 2 x_ z_ 2 y_ z_
∂x∂y ∂x∂z ∂y∂z
A€x ¼ b ð2:4:31Þ
with the main difference being that A is now a 2 3 matrix and b is a 2 1 column
vector, where
" # " #
∂f 1 =∂x ∂f 1 =∂y ∂f 1 =∂z —f 1T
A¼ ¼
∂f 2 =∂x ∂f 2 =∂y ∂f 2 =∂z —f 2T
( ) ð2:4:32Þ
b1
b¼
b2
Fc ¼ AT λ ð2:4:33Þ
λ1
λ¼ ð2:4:34Þ
λ2
which, as expected, is the sum of the normal forces from each of the smooth surfaces.
We can see this more clearly if we let λ1 ¼ N1/|—f1|,λ2 ¼ N2/|—f2| so that then (N1, N2)
are just the values of the individual normal forces acting on the particle from each
surface.
We saw in the last section that for both 2-D and 3-D motions of a particle we are able
to write Newton’s second law equations and the constraint equations in Cartesian
coordinates as
M€x ¼ Fe þ Fc
ð2:4:36Þ
A€x ¼ b
where M is a mass matrix, x€; Fe ; Fc are acceleration and force column vectors, A is
a non-square matrix, and b is a column vector. Furthermore, when the constraint
forces are ideal constraint forces the governing equations are
M€x ¼ Fe þ AT λ
ð2:4:37Þ
A€x ¼ b
In later chapters we will see that equations very similar to Eq. (2.4.37) will also be
applicable to the motion of multiple particles or the motion of rigid bodies so they
represent a much wider range of dynamics problems than the single-particle prob-
lems just considered. In the field of dynamics Eq. (2.4.37) is called an augmentation
approach (or augmented method) to obtaining the equations of motion since we
augmented Newton’s second law with ideal constraint forces in terms of unknown
Lagrange multipliers, λ, and the differentiated constraint equations. For a very
general, high-level discussion of this approach, see Udwadia and Kalaba [2], and
for its application to multibody dynamics problems in particular see the texts of
Shabana [3, 4]. We will now show how to use this augmentation approach to obtain
explicit solutions for the ideal constraint forces and the equations of motion.
Equation (2.4.37) can be solved formally for the unknown λ values by first
multiplying the first equation in Eq. (2.4.37) by the inverse of the mass matrix.
The mass matrix is non-singular so that its inverse always exists. We have
AM1 AT λ ¼ b AM1 Fe ð2:4:39Þ
Unlike the matrix A, the coefficient matrix C ¼ AM1AT is a square matrix. For
example, for the motion of a particle in two dimensions with one constraint A is a
1 2 matrix, M1 is a 2 2 matrix, and AT is a 2 1 matrix. Thus the dimensions
of the coefficient C matrix, which follows from the product of its components
according to the rules of matrix multiplication, are 1 1 ¼ (1 2)(2 2)(2 1)
which indeed is a square matrix since it is simply a scalar. For the motion of a
particle in three dimensions where there are two constraints, A is a 2 3 matrix,
M1 is a 3 3 matrix, and AT is a 3 2 matrix, yielding a square coefficient
C matrix with dimensions 2 2 ¼ (2 3)(3 3)(3 2). If the constraint equations
are all independent (which is always true when we only have a single constraint
equation) the coefficient matrix will also have an inverse, so multiplying both sides
of Eq. (2.4.39) by C1 gives
1
λ ¼ AM1 AT b AM1 Fe ð2:4:40Þ
The ideal constraint force and the equations of motion are then given by
1
Fc ¼ AT AM1 AT b AM1 Fe
1 ð2:4:41Þ
x ¼ M1 Fe þ M1 AT AM1 AT
€ b AM1 Fe
What happens when there is more than one constraint and they are not indepen-
dent (a condition that can happen in more complex dynamics problems such as
robotics)? Then the regular inverse of the C matrix does not exist. In that case we
will see later in Chap. 3 that we can still use Eq. (2.4.41) if the regular inverse of C is
replaced by a modified matrix operation called a pseudoinverse [2]. For now we will
only consider cases where C1 exists and this is not an issue.
Do not be intimidated by the apparent complexity of Eq. (2.4.41). For a single
particle the mass matrix is a diagonal matrix so computing its inverse is trivial
(we just take the reciprocal of the diagonal terms). The remainder of the terms all
involve only matrix products except for having to take the inverse of the coefficient
matrix, C. But computing the inverse of the C matrix is also not difficult in general. It
is true that there are quite a few matrix operations involved in Eq. (2.4.41) so that if
we evaluate all the terms analytically by hand there is always a chance for algebraic
errors to occur. Thus, it would be nice to have an automated way to perform all the
analytical calculations symbolically. We have already seen in this chapter that we
can use the MATLAB® symbolic math toolbox for such applications. In Chap. 5 we
will use that toolbox to obtain the expressions found in Eq. (2.4.41). Meanwhile, the
problems we will consider will be relatively simple so we will do the calculations by
hand. We should also point out that while it is nice to evaluate all the terms in
Eq. (2.4.41) in symbolic forms, this is not really necessary. In most cases we will be
solving the equations of motion numerically anyway, so all we really need for such a
72 2 Dynamics of a Particle
numerical solution are the explicit analytical forms for A, M, b, Fe. The
corresponding numerical values of all the terms appearing in Eq. (2.4.41) can then
be obtained as needed using MATLAB®’s ability to seamlessly deal with matrix
operations.
For single-particle problems such as the problem of the bead on the smooth-
curved wire considered in Sect. 2.3.1 all of the analytical calculations are extremely
simple. Some of the main terms are
" # " # ( )
m 0 1=m 0 0
1
M¼ , M ¼
, F ¼ e
0 m 0 1=m mg
( )
∂ f =∂x
2
A ¼ ½∂ f =∂x; ∂ f =∂y, AT ¼ , b ¼ ∂ f =∂x2 x_ 2 ð2:4:42Þ
∂ f =∂y
h i
1 T 2 2
C ¼ AM A ¼ ð∂ f =∂xÞ þ ð∂ f =∂yÞ =m ¼ j— f j2 =m
1
C1 ¼ AM1 AT ¼ m=j— f j2
which for the specific case of the parabolic wire where f ¼ y ax2 gives
( )
( )
F xc m 2ax_ 2 þ g 2ax
¼
F yc 1 þ 4a2 x2 1
( ) ( ) ( ) ð2:4:44Þ
€x 0 2ax_ þ g
2 2ax
¼ þ
€y g 1 þ 4a2 x2 1
These equations of motion are identical to those obtained earlier in Eq. (2.3.22). The
constraint force is in the direction of a unit vector, en, which is normal to the surface
and the magnitude of the constraint force is N, where en and N are given by
( )
Fc 1 2ax
en ¼ c ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
jF j 1 þ 4a2 x2 1
rffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
ffi ð2:4:45Þ
c 2 c 2 m 2ax_ 2 þ g
N¼ F x þ F y ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
1 þ 4a2 x2
2.4 Constraints and Equations of Motion: A Matrix Approach 73
The normal force expression is identical to Eq. (2.3.21). See Problem P2.7 which
asks you to solve the problem in MATLAB® without having the analytical solutions
of Eq. (2.4.42), following a more completely numerical approach, as mentioned
previously.
We can reduce the complexity of Eq. (2.4.41) and also gain a more transparent
understanding of that equation by rewriting it in different terms. Let a ¼ M1Fe,
K ¼ AT(AM1AT)1, and e ¼ b Aa. Then
Fc ¼ Ke
ð2:4:46Þ
M€x ¼ Ma þ Ke
The a vector is the acceleration of the particle if it was unconstrained, since if the
constraint force was zero (Fc ¼ 0), we would just have €x ¼ a. The “error” vector
e ¼ b Aa is the amount by which the differentiated constraint equations, A€x ¼ b,
are not satisfied by this unconstrained acceleration, a. Equation (2.4.46) then simply
says that the constraint force is proportional to this error in satisfying the constraints,
where K is the proportionality matrix.
We cannot use our explicit solution for an ideal constraint force and equations of
motion, Eq. (2.4.41), when the prescription for that constraint force, Fc ¼ ATλ, is not
valid. As discussed previously, this happens in problems with friction such as a
rough surface characterized by Coulomb friction. But we can still solve such
frictional problems by modifying Eq. (2.4.41) to include such nonideal constraints,
as shown later in Sect. 2.10. For constrained motion problems involving only ideal
constraint forces we can modify the four-step procedure outlined in Sect. 2.3 and
state a more explicit five-step procedure, namely:
1. Obtain the resultant of the external applied forces, Fe, and the mass matrix, M.
2. Use the constraint equations and differentiate them on time to write those
constraints in terms of the accelerations in the form A€x ¼ b.
3. Use Fe, M, A, and b in conjunction with Eq. (2.4.41) to obtain explicit expres-
sions for the resultant of the ideal constraint force, Fc, and the equations of
motion.
4. Solve the equations of motion to obtain the position and velocity components,
using initial conditions that are consistent with the constraints. Monitor the values
of the constraint equations and their first derivatives to ensure that numerical
errors do not cause constraint drift.
5. Once we have found the solution for all the system coordinates as a function of
time we can use that solution in the ideal constraint force expression obtained in
step (3) to obtain the constraint force (as a function of time) explicitly.
Solving for all the system coordinates in this fashion is, as mentioned previously,
called an augmented approach that combines the Newton-Euler equations with the
differentiated constraint equations. Also, as outlined previously, it is possible to use
the constraint equations to reduce the number of coordinates to consider. This
embedding approach involves only ndof second-order equations of motion. If we
solve those equations of motion for the ndof independent coordinates we can then use
74 2 Dynamics of a Particle
the constraint equations and their first derivatives to find the remaining dependent
variables and their first derivatives and constraint drift is not an issue. In Sect. 2.11
the embedding method will be discussed in more detail.
m€r ¼ mr θ_ 2 þ F ra þ F rc
ð2:5:2Þ
mr €θ ¼ 2mr_ θ_ þ F θa þ F θc
where F ra ; F θa are components of the known applied force and F rc ; F θc are the
components of the constraint force. If we define a “mass” matrix, M, and the
coordinates, q, as
m 0 r
M¼ , q¼ ð2:5:3Þ
0 mr θ
M€ ~ e þ Fc
q¼F ð2:5:4Þ
where
( ) ( )
mr θ_ 2 F re r; θ; r_ ; θ_
F ¼ F r; θ; r_ ; θ_ ¼ F þ F ¼
~e ~e in e
þ ð2:5:5Þ
2mr_ θ_ F θe r; θ; r_ ; θ_
2.5 Constraints and Equations of Motion in Polar Coordinates 75
is an explicit function of the coordinates and their derivatives since the applied forces
are also known functions of these variables, as indicated in Eq. (2.5.5). Physically,
~ e is the sum of the external forces, Fe, plus the “inertial force term,” Fin, which
F
represents those parts of the total inertial force, M€x, that do not involve two time
derivatives of the coordinates.
If we have constraints that can be placed, through differentiation on time, in the
form A€ q ¼ b and the constraint force is again prescribed in terms of these constraints
as Fc ¼ ATλ then constrained motion problems in polar coordinates become
q¼F
M€ ~ e þ AT λ
ð2:5:6Þ
q¼b
A€
Although we used the case of polar coordinates to justify Eq. (2.5.7), the same
arguments can be used for other coordinates such as cylindrical or spherical coordi-
nates. Later we will consider generalized coordinates, q, involving any transforma-
tion between coordinates, x ¼ x(q), that is well behaved or for a more general
transformation x ¼ x(q, t) which can represent motion in a set of moving
coordinates.
mg
(a) (b)
k
€r ¼ r θ_ 2 þ g cos θ ðr L0 Þ
m
_ ð2:5:9Þ
€θ ¼ 2 r_ θ g sin θ
r r
We can use Eq. (2.5.9) as the basis for a numerical solution but there is some
interesting physics associated with this problem that we can highlight better by
redefining and normalizing r appropriately, and also normalizing the time, t. First,
consider the equilibrium problem when the spring pendulum is simply hanging
vertically (θ ¼ 0). In that case the equations of motion become
r ¼ Le ¼ L0 þ mg=k ð2:5:10Þ
where Le is the equilibrium length of the spring under the weight of the mass. We
will use this equilibrium length to define a new, nondimensional radius, rn, as
r n ¼ r=Le 1 ð2:5:11Þ
so that rn is physically the elongation of the spring pendulum, as measured from its
equilibrium length, Le, and normalized by that equilibrium length. In terms of rn the
equations of motion become
g k
€r n ¼ ð1 þ rn Þθ_ 2 ð1 cos θÞ rn
Le m
_ ð2:5:12Þ
€θ ¼ 2 _
r n θ g sin θ
ð 1 þ r n Þ Le ð 1 þ r n Þ
pffiffiffiffiffiffiffiffiffi
Finally, we will define a new nondimensional time variable, τ, as τ ¼ t k=m in
terms of which Eq. (2.5.12) becomes
2.5 Constraints and Equations of Motion in Polar Coordinates 77
2
d2 rn dθ mg
2
¼ ð 1 þ r n Þ ð1 cos θÞ rn
dτ dτ kLe
ð2:5:13Þ
d2 θ 2 dr n dθ mg sin θ
¼
dτ2 ð1 þ r n Þ dτ dτ kLe ð1 þ r n Þ
Equation (2.5.13) is not in a simpler form than Eq. (2.5.9) but it does show that
the spring pendulum behavior in these nondimensional variables is controlled by
only a single nondimensional parameter, mg/kLe. To understand what this constant
means, let’s consider Eq. (2.5.13) when we are near equilibrium so that both rn and θ
are small. If we expand the trigonometric functions to two terms as sinθ ffi θ θ3/6,
cosθ ffi 1 θ2/2 and neglect all terms higher than first order in (rn, θ) or their
derivatives in Eq. (2.5.13) we find
d2 rn
þ rn ¼ 0
dτ2
ð2:5:14Þ
d 2 θ mg
þ θ¼0
dτ2 kLe
d2 rn k
þ rn ¼ 0
dt 2 m
ð2:5:15Þ
d2 θ g
þ θ¼0
dt 2 Le
Equation (2.5.15) represents the linearized equations of motion that are good for
small motions about the equilibrium position (θ ¼ 0, rn ¼ 0) of the spring pendulum.
These equations both have analytical solutions representing sinusoidal vibrations in
both the r and θ directions given by
r n ¼ A cos ðωr t þ ϕa Þ
ð2:5:16Þ
θ ¼ B cos ðωθ t þ ϕb Þ
mg mg
¼ <1 ð2:5:17Þ
kLe ðkL0 þ mgÞ
78 2 Dynamics of a Particle
we see that ωθ < ωr. For small oscillations Eq. (2.5.15) shows that the motions in the
r- and θ-directions occur independent of each other, i.e., they are uncoupled.
However, as we will see, if the ratio of the natural frequencies is close to a certain
value then the nonlinear terms present in our original equations in Eq. (2.5.13) cause
an inherent coupling of the r and θ motions, producing what is called a parametric
nonlinear resonance phenomenon that is missed entirely by the linearized equations,
Eq. (2.5.15).
where K ¼ mg/kLe. This system has been placed in the MATLAB® function
spring_pend_eqs which together with the MATLAB® solver ode45 is a nested
function within the function spring_pendulum, following the same structure as
done in the roller-coaster problem. The calling sequence for spring_pendulum is
[tout, xout] = spring_pendulum(tspan, x0, K, rtol, atol);
where again tspan is the time interval over which we want to compute the solution,
x0 is the vector of initial conditions r n ð0Þ; r_ n ð0Þ; θð0Þ; θ_ ð0Þ , and K is the
nondimensional free parameter of the system. Here the two tolerances are present
that are used by the ode45 numerical solver: rtol, a relative tolerance (RelTol), and
atol, which is an absolute tolerance (AbsTol). To give you a feel for what these two
tolerances represent it is useful to look at their definitions as given in the MATLAB®
documentation:
RelTol—This tolerance is a measure of the error relative to the size of each solution
component. Roughly, it controls the number of correct digits in all solution
components, except those smaller than thresholds AbsTol(i). The default value,
1e-3, corresponds to 0.1% accuracy.
AbsTol—AbsTol(i) is a threshold below which the value of the ith solution com-
ponent is unimportant. The absolute error tolerances determine the accuracy when
the solution approaches zero. The default value is 1e-6.
2.5 Constraints and Equations of Motion in Polar Coordinates 79
Thus, it will generally be the relative tolerance that controls the accuracy of the
numerical solution except when the solution values are very small, where the
absolute tolerance will be important. The ability to control the error tolerances in
the spring pendulum is especially important because of some of the unusual behav-
iors of this seemingly simple problem and the need to distinguish real behavioral
changes from numerical errors.
The function spring_pendulum is used as part of the MATLAB® script
spring_pendulum_sim to simulate the motion of the spring pendulum and plot the
(rn, θ) values versus time (as well as a normalized energy which we will discuss
shortly). The first case considered is for K ¼ 0.1, tspan ¼ [0, 50], and initial
conditions x0 ¼ [0.1, 0, 0.05, 0], which are the default values contained in the
script unless changed by the user in the command window before executing the
script. The default tolerances are also specified in the script as rtol ¼ 1e-5 and
atol ¼ 1e-10. The initial condition amplitudes are small enough that the linearized
equations of motion, Eq. (2.5.15), might be expected to be valid and Fig. 2.28a, b
confirms that this is the case, with nearly sinusoidal oscillations seen for both rn and
θ, although there are some small deviations in the θ versus time plot from the simple
constant amplitude sinusoidal solution of Eq. (2.5.16). Those deviations are not,
however, numerical errors as the relative tolerance was changed to rtol ¼ 1e-8 and
the spring_pendulum_sim rerun without any significant change in the values of both
rn and θ at the final time of the simulation (and no change in the overall curves).
If the workspace is cleared and in the command window the K value is specified
as K ¼ 0.25, tspan is specified as tspan ¼ [0, 400], and the initial conditions given as
x0 ¼ [0.1, 0, 0.025, 0] (which are still very small) the results of running the
simulation script are completely different, as shown in Fig. 2.29a, b. The angular
oscillation grows to a much larger amplitude than the original starting value while
the extensional vibrations are reduced in amplitude to a very small value. This
interchange of energy then reverses with the angular amplitudes diminishing while
0.05 0.15
0.04
0.03 0.1
0.02
0.01 0.05
θ 0 rn
0
-0.01
-0.02 -0.05
-0.03
-0.04 -0.1
-0.05 -0.15
0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 25 30 35 40 45 50
time, τ time, τ
(a) (b)
Fig. 2.28 (a) The swinging oscillations of the spring pendulum and (b) the extensional oscillations
of the spring pendulum for K ¼ 0.1, θ(0) ¼ 0.05, rn(0) ¼ 0.1, and θ_ ð0Þ ¼ r_ n ð0Þ ¼ 0
80 2 Dynamics of a Particle
0.25 0.1
0.2 0.08
0.15 0.06
0.1 0.04
0.05 0.02
θ 0 rn 0
-0.05 -0.02
-0.1 -0.04
-0.15 -0.06
-0.2 -0.08
-0.25
0 50 100 150 200 250 300 350 400 -0.1
0 50 100 150 200 250 300 350 400
time, τ time, τ
(a) (b)
Fig. 2.29 (a) The swinging oscillations of the spring pendulum and (b) the extensional oscillations
of the spring pendulum for K ¼ 0.25, θ(0) ¼ 0.025, rn(0) ¼ 0.1, and θ_ ð0Þ ¼ r_ n ð0Þ ¼ 0
m 2 k
E ¼T þV ¼ r_ þ r 2 θ_ 2 mgr cos θ þ ðr L0 Þ2 ð2:5:19Þ
2 2
or in Cartesian coordinates
m 2 k pffiffiffiffiffiffiffiffiffiffiffiffiffiffi 2
E¼ x_ þ y_ 2 þ mgy þ x2 þ y2 L 0 ð2:5:20Þ
2 2
[in both of these expressions f_ ¼ df =dt]. Since the kinetic energy term is always
positive the minimum value of the total energy occurs when the mass is at rest and
the potential energy is a minimum. This happens when the spring is hanging
vertically under its own weight in the equilibrium position x ¼ 0, y ¼ (L0+mg/k)
¼ Le (at this position ∂V/∂x ¼ ∂V/∂y ¼ 0 and you can verify that the potential
energy surface is always concave upwards from that point).
2.5 Constraints and Equations of Motion in Polar Coordinates 81
Thus,
k K
Emin ¼ mgLe þ ðmg=k Þ2 ¼ mgLe 1 ð2:5:21Þ
2 2
To facilitate later discussions of the behavior of the spring pendulum we will use a
normalized energy, R ¼ E/Emin, written in terms of the initial conditions and the
nondimensional parameter μ ¼ 1/K to evaluate the total energy. This R energy term
has values ranging from 1 to infinity while μ ranges from +1 to infinity. The
normalized total energy will be written in terms of the nondimensional rn,θ, τ, and μ
variables since the equations of motion, Eq. (2.5.18), are also expressed in those
terms. After some algebra, we have
1 h 2 2 i
R¼ μ r_ n þ ð1 þ rn Þ2 θ_ 2 2μð1 þ r n Þ cos θ þ μ2 ðr n þ 1=μÞ2
2μ 1
ð2:5:22Þ
where now f_ ¼ df =dτ. The script spring_pendulum_sim also plots the value of
R versus time so that one can verify that energy conservation is satisfied. In all the
examples just discussed, there were insignificant R changes seen in the simulations,
confirming those results.
It is useful to see the interchange of energy in action for the spring pendulum so
we have written a script spring_pendulum_anim3 that is similar to the
spring_pendulum_sim script but where the plotting outputs are replaced with an
animation of the motion. To keep the number of times at which the calculations are
displayed fixed regardless of the other parameters, the specification of tspan has been
changed from a vector consisting only of the starting and ending points to that of a
specific set of points. The default value in spring_pendulum_anim3 is
tspan ¼ 0:0.1:400. Note that the ode45 function does not calculate the solution
with a numerical spacing defined by these specified times. It still uses its own
internal error control to determine the number and spacing of the numerical calcu-
lations. However, only the interpolated values at the points specified in tspan are
returned by the ode45 function. In the script one also has a capability to adjust the
speed of the animation. This adjustment can be made with a separate “slowdown”
parameter, sldwn, which produces a pause of 0.01*sldwn sec before updating the
motion. The default value sldwn ¼ 1 and the 4001 points chosen in tspan should give
a reasonably fast animation if the pendulum swings are relatively small. For larger
swings one might want to slow the animation down by choosing a larger value of
sldwn (see the further discussion on adjusting animation speed in Chap. 3 for the
double-pendulum problem). The animation script also contains an additional string
parameter named marker. For a value of marker ¼ “on” the path of the mass is traced
by a series of dots as the motion proceeds, eventually showing the entire set of
positions of the mass at the evaluated times. The default value is marker ¼ “off.” The
final time frame of an animation using the default values in spring_pendulum_anim3
82 2 Dynamics of a Particle
-0.4
y-axis
-0.6
-0.8
-1
-1.2
-0.2 0 0.2
x-axis
is shown in Fig. 2.30. To see the motion of the spring pendulum for the case when
parametric resonance is optimally present clear the command window and execute
the script spring-pendulum_anim3 with the default values (K ¼ 0.25 by default in
the script so it is set up to examine the parametric resonance case; you can see the
other defaults by looking at the script in Appendix F). You will see the motion of the
mass change from primarily up-and-down extensional motion to primarily back-and-
forth swinging motion. To also see the path followed by the mass in this case, type
marker ¼ ‘on’ in the command window and re-execute the script.
You can easily experiment with other K values to see the effect on the motion and
if parametric resonance is present or not.
Nonlinear parametric resonance is an instability that can cause dangerous motions
or even capsizing to occur in ships. Under the right conditions the longitudinal
motion of a vessel due to wave action can be parametrically coupled to the roll
motion of the ship. In October 1998 the large container vessel APL China encoun-
tered a parametric roll resonance on a trip from Taiwan to Seattle. More than 60% of
its cargo of containers were lost at sea or damaged. In January 2003 the container
vessel Maersk Carolina experienced parametric resonance during a storm in the
Atlantic where the rolling increased up to 47 and lasted for minutes. The ship lost
133 containers as well as another 50 that suffered severe water damage, leading to a
total cargo loss of almost 4 million dollars. Container ships are not the only ships
susceptible to such roll resonance. Destroyers, cruise ships, and roll-on/roll-off
passenger (ROPAX) vessels that carry vehicles as well as passengers can also
encounter parametric roll resonance.
2.5 Constraints and Equations of Motion in Polar Coordinates 83
3.5
C
3
2.5
1.5
R chaotic
1 behavior observed
0.5 B
0
-0.5
A
-1
0 1 2 3 4 5 6 7 8 9 10
μ
Fig. 2.31 Plot showing the approximate range of (R, μ) values (shaded region) where the motion of
the spring pendulum is observed to be chaotic and points A, B, and C where the motion changes
from regular to chaotic and back to regular
-0.5
-1
-1.5
-1 -0.5 0 0.5 1
changes in the initial conditions. Now, change the initial conditions to x0 ¼ [0.8,
0, 0.025, 0.6], and set sldwn ¼ 5 to see a smoother motion, with all the other
parameters unchanged. This gives R ¼ 3.13 which is again outside the shaded region
in Fig. 2.31 (point C). The energy is large enough that the spring pendulum exerts
complete 360-degree rotations around the support. At the end of the motion we find
rn ¼ 0.7957 and θ ¼ 276.5937 (note that the animation in this case runs for some
time so you might want to terminate it by typing ctrl-c). Changing just the initial
2.5 Constraints and Equations of Motion in Polar Coordinates 85
conditions to x0 ¼ [0.800001, 0, 0.025, 0.6] and executing the animation again leave
these final values essentially unchanged, demonstrating the change from regular
motion to chaos and then back to regular motion.
Chaos is a complex topic. We do not intend to deal with chaos in this book other
than to illustrate it in some simple examples and point the reader to a number of
sources that cover chaotic behavior in more depth (see [5, 6], for example). Engi-
neers often analyze dynamical systems by considering very small motions where the
equations of motion are linearized and where one can often find exact analytical
solutions. Since chaos is inherently a nonlinear phenomenon, such linearization
eliminates the possibility of chaos and all of the interesting features and important
consequences of its existence. Analytic solutions for nonlinear problems are gener-
ally nonexistent so studies of chaos also require detailed numerical calculations.
f ðr; θÞ ¼ r L ¼ 0 ð2:5:23Þ
r_ ¼ 0
ð2:5:24Þ
€r ¼ 0
q ¼ b, where
We can write this last equation as A€
€r
A ¼ ½1 0, €¼
q , b¼0 ð2:5:25Þ
€θ
(a) (b)
86 2 Dynamics of a Particle
Here the first equation of motion is €r ¼ 0, with initial conditions rð0Þ ¼ L, r_ ð0Þ ¼ 0
which just has as its solution the original constraint equation, r ¼ L, leaving only the
equation of motion in terms of θ and the radial constraint force, F rc ¼ T, given,
respectively, as
€θ þ g sin θ ¼ 0 ð2:5:28Þ
L
and
T ¼ m Lθ_ 2 þ g cos θ ð2:5:29Þ
This problem can be more easily solved directly with Newton’s second law, as is
done in many texts. In fact, if we start with the force equations from Newton’s
second law we have
m€r ¼ mr θ_ 2 þ mg cos θ T
ð2:5:30Þ
mr €θ ¼ 2mr_ θ_ mg sin θ
M0 ¼ r m€x ð2:5:31Þ
giving
2.5 Constraints and Equations of Motion in Polar Coordinates 87
or
which is just the force equation of motion in the θ direction in Eq. (2.5.30) multiplied
by L.
This pendulum problem shows that in dynamics problems there are often multiple
ways to arrive at a solution. Thus, the expressions for the constraint force and
equations of motion in Eq. (2.5.7) may not always be the easiest to implement in
very simple problems like the pendulum. However, the fact that Eq. (2.5.7) gives us
both the constraint force and the equations of motion is important for engineering
purposes. Alternate methods, like the use of the moment equation, Eq. (2.5.31), for
example, may effectively give us the equations of motion but they do not give us the
values of the constraint forces present. The real value of using Eq. (2.5.7) over other
methods, however, lies in its generality. It can be applied in a consistent manner for
many different problems whereas other methods often involve specific steps that are
unique to the problem being solved.
The radial constraint force does no work since it always acts perpendicular to the
motion and the force of gravity is a potential force so the total energy is conserved
for the simple pendulum. In polar coordinates the velocity is given as
v ¼ r_ er þ r θ_ eθ ð2:5:34Þ
m 2
T¼ r_ þ r 2 θ_ 2 ð2:5:35Þ
2
mL2 θ_ 2
E¼ mgL cos θ ð2:5:36Þ
2
A contour plot of E/m for L ¼ 0.4 m and θ ranging from (2π, 2π) rad and θ_
ranging from (10, +10) rad/s gives the phase plot shown in Fig. 2.34. Although the
shapes of the curves are somewhat different from the roller-coaster phase plot
(Fig. 2.19) the overall behavior is very similar. From Eq. (2.5.36) we see if the
particle starts at the bottom (θ ¼ 0) with an initial angular velocity, θ_ 0 , it will just
reach the top (θ ¼ p π) ffiffiffiffiffiffiffiffiffiffi
with zero angular velocity if we have mL2 θ_ 20 =2 mgL ¼ mgL,
pffiffiffiffiffiffiffiffiffiffi
_ _
which gives θ 0 ¼ 4g=L. Thus, if θ 0 < 4g=L the mass m will never go “over the
top” (|θmax| < π) and the mass will just oscillate back and forth, forming a closed
88 2 Dynamics of a Particle
_
pffiffiffiffiffiffiffiffiffiffiin the phase plot about the equilibrium position θ ¼ 0. However, if θ 0 >
curve
4g=L the mass will execute full rotations around the pivot point with θ ever
increasing
pffiffiffiffiffiffiffiffiffiffi as shown in Fig. 2.33. For the parameters chosen in Fig. 2.33 we have
4g=L ¼ 9.9 rad/s, approximately. The points labeled O in Fig. 2.34 are the stable
equilibrium points if the particle is resting at the bottom of a swing and the points
labeled P in Fig. 2.34 are the unstable equilibrium points when the mass is resting at
a top point of its swing. These stability assertions, which are rather obvious in this
simple example, will be discussed in more detail in Chap. 6.
constraint forces are related to consider the problem in reverse. In particular, we will
consider Kepler’s first and second laws as constraints on the motion of a planet and
ask the following question: What type of constraint force is needed to satisfy those
two laws? We will take the motion of the planet to lie in a fixed plane where the
motion is described in polar coordinates (r, θ) with the origin placed at the center of
the sun (Fig. 2.35). The planet will be treated as a particle of mass, m, that is acted
upon only by the constraint force components (Fr, Fθ). The equation of an ellipse,
written in polar coordinates with the origin of the coordinates taken at one of the foci
of the ellipse (as required by Kepler’s first law), is just
að 1 e 2 Þ
r¼ ð2:5:37Þ
1 þ e cos θ
where a is the semimajor axis of the ellipse and e is called the eccentricity of the
ellipse.pffiffiffiffiffiffiffiffiffiffiffiffi
The other ffi semiminor axis of the ellipse, b, can be shown to be given as
b ¼ a 1 e . We can write Eq. (2.5.37) as a constraint equation of the form
2
f1(r, θ) ¼ 0, where
f 1 ðr; θÞ ¼ r ð1 þ e cos θÞ a 1 e2 ¼ 0 ð2:5:38Þ
Now, let us turn to Kepler’s second law. As the planet moves in its orbit, in a
small time dt it traces out a small amount of “sectorial area,” dA, as shown in
Fig. 2.36. This sectorial area is easily shown to be dA ¼ r2dθ/2 so that we can
define the sectorial area velocity as dA/dt ¼ (r2/2)dθ/dt. Kepler’s second
law,
therefore, can be phrased mathematically as a constraint of the form f 2 r; r_ ; θ; θ_
¼ 0 where
90 2 Dynamics of a Particle
r dθ
1 sun
dA = rdθ
2
Fig. 2.36 The area, dA, swept out by a planet in a small time, dt, as it orbits the sun
r 2 θ_
f 2 r; r_ ; θ; θ_ ¼ C ¼0 ð2:5:41Þ
2
r 2 €θ ¼ 2rr_ θ_ ð2:5:42Þ
Instead of using Eqs. (2.5.42) and (2.5.40) directly, if we divide both sides in
Eq. (2.5.42) by r and place that relationship into Eq. (2.5.40) we find
q ¼ b,
Then by using Eqs. (2.5.42) and (2.5.43) as our two constraints in the form A€
we find
( ) " #
€r ð1 þ e cos θÞ 0
€¼
q , A¼
€θ 0 r2
( ) ð2:5:44Þ
er cos θθ_ 2
b¼
4r r_ θ_
The use of Eq. (2.5.43) instead of Eq. (2.5.40) makes the A matrix diagonal so, as we
will see, all the calculations become very simple. Since we have assumed that there
are no applied forces here, F ~ e only includes the inertial forces (see Eq. (2.5.5)) so
( )
~e ¼ mr θ_ 2
F ð2:5:45Þ
2mr_ θ_
2.5 Constraints and Equations of Motion in Polar Coordinates 91
Now, we can compute the constraint force compatible with these two constraints as
1
Fc ¼ AT AM1 AT ~e
b AM1 F ð2:5:46Þ
Some of the intermediate results, which you can easily verify, are
" # " #
ð1 þ e cos θÞ 0 1
ð1 þ e cos θÞ=m 0
A¼A ¼ T
, M A ¼ T
0 r 0 1=m
" # " #
1 ð1 þ e cos θÞ =m2
0 1 m=ð1 þ e cos θÞ2 0
AM A ¼ T
, AM1 AT ¼
0 r=m 0 m=r
" #
1 m=ð1 þ e cos θÞ 0
AT AM1 AT ¼
0 m
( ) " #( ) ( )
1 ~ e er cos θ θ_ 2 ð1 þ e cos θÞ 0 r θ_ 2 r θ_ 2
b AM F ¼ ¼
2r_ θ_ 0 r 2r_ θ_ =r 0
ð2:5:47Þ
But from the constraint equation, Eq. (2.5.41), and the equation of the ellipse,
Eq. (2.5.37), we can rewrite the constraint force as
8 9
< 4mC =
2
Fc ¼ að1 e2 Þr 2 ð2:5:49Þ
: ;
0
Thus, we have shown that the constraint force that generates Kepler’s first two laws
must be a purely radial attractive force whose strength varies like 1/r2. This is
nothing more than Newton’s law of gravitational attraction! Newton wrote his law
in terms of the mass of the sun, M, and the universal gravitational constant, G, but as
part of the solution for the motion one also finds 4C2/a(1 e2) ¼ GM. Of course,
Newton came up with the universal law of gravitational attraction and then showed
that this force in conjunction with his second law, F ¼ m€x, was compatible with all
three of Kepler’s laws, a true testament to his insight and genius.
This planetary motion problem is also an example where we can replace one of
the force equations in Newton’s second law with a moment equation. In this case
Newton’s second law gives
92 2 Dynamics of a Particle
m€r mr θ_ 2 ¼ F r ¼ GMm=r2
ð2:5:50Þ
mr€θ þ 2mr_ θ_ ¼ 0
Note that the second equation in Eq. (2.5.50), the force equation in the θ-direction, is
also just a statement of the constraint (2.5.41) since it can also be written as
d 1 2_
2m r θ ¼0 ð2:5:51Þ
dt 2
However, if we examine the moment equation about the origin we also recover the
same equation since
d
M0 ¼ x F ¼ ðx mvÞ
dt
d
rer F r er ¼ rer m r_ er þ r θ_ eθ ð2:5:52Þ
dt
d 2 _
0¼ mr θ ez
dt
where ez is a unit vector in the z-direction. But Eq. (2.5.52) says that the angular
momentum of the particle about O, L0 ¼ mr 2 θ_ ez , must be a constant, which written
in terms of the sectorial area velocity gives L0 ¼ 2mA_ ez ¼ constant. Thus, the
constraint where we force the sectorial area velocity to be a constant can also be
interpreted as a statement of the conservation of angular momentum of the particle
during its orbital motion.
You might have noticed that one of the constraints, the sectorial area velocity
constraint, was a constraint involving velocities as well as coordinates as a special
case of the form
_ t ¼0
f r; θ; r_ ; θ; ð2:5:53Þ
(in this case f ¼ r2 θ_ =2 C). We discussed such constraints briefly before in terms
of Cartesian coordinates. This sectorial area velocity constraint cannot be integrated
directly to obtain a constraint between the coordinates themselves and time in the
form
gðr; θ; t Þ ¼ 0 ð2:5:54Þ
Non-integrable constraints involving both the coordinates and their time derivatives
(velocities) in the form seen in Eq. (2.5.53) are called non-holonomic constraints
while constraints which either directly or indirectly imply a relationship between the
coordinates themselves in the form seen in Eq. (2.5.54) are called holonomic
constraints. However, recall we mentioned that not all velocity constraints in the
2.5 Constraints and Equations of Motion in Polar Coordinates 93
_ t ¼ ∂g r_ þ ∂g θ_ þ ∂g ¼ 0
f r; θ; r_ ; θ; ð2:5:55Þ
∂r ∂θ ∂t
which is in the form of Eq. (2.5.53) but it can be integrated back to the form seen in
Eq. (2.5.54) so we would label it a holonomic constraint.
How do we determine if a constraint involving velocities is integrable
(holonomic) or not integrable (non-holonomic)? One way for a constraint of the
form of Eq. (2.5.53) to be integrable is if it is expressible in terms of a perfect
differential. However, this is not necessary and the more general necessary and
sufficient conditions for integrability are called the Frobenius conditions. We will
not state such general conditions here since when we write our constraints in the
form A€ x ¼ b, regardless of whether the underlying constraint is holonomic or
non-holonomic, we can still solve for the ideal constraint force as our planetary
motion example showed. Thus, we can treat holonomic and non-holonomic con-
straints in the same fashion (if you are interested in the details of the requirements for
identifying non-holonomic constraints, see [7], for example).
There is however another reason to want to know if a constraint is holonomic or
non-holonomic. Since a holonomic constraint places a condition on the coordinates
themselves, each holonomic constraint reduces the number of degrees of freedom of
a problem by one (if all the constraints are independent, as we have been assuming;
we will discuss the issue of nonindependent constraints later), allowing us to solve a
dynamics problem with fewer independent coordinates. However, a non-holonomic
constraint between the coordinates and their derivatives does not affect the degrees
of freedom. To see this, go back to our example of this section. Requiring the
sectorial area function velocity to be a constant does not constrain that particle to
follow a specific type of path where r and θ are related; it simply forces the angular
momentum of the particle along the path the particle takes, as defined by the solution
of the equations of motion and initial conditions, to be conserved. If we specify a
holonomic constraint such as specifying the orbit to be an ellipse, we do reduce the
degrees of freedom by one as the particle now is constrained to follow a path where
r and θ are related to one another. This is why it is possible to place two constraints
on a particle moving in two dimensions and still have a dynamics problem where the
particle can move, as long as at least one of the constraints is non-holonomic.
Specifying the sectorial area velocity to be a constant and the path of the particle
to be an ellipse is an example of just such a situation.
94 2 Dynamics of a Particle
m€x ¼ Fe þ Fc ð2:6:1Þ
f m ðx; t Þ ¼ 0 ð2:6:2Þ
2.6 Generalized Coordinates and the Equations of Motion: A Geometric Approach 95
c1
q1
x2
f1 ( q1 , q2 , t )
x ( q1 , q2 , t )
x1
x3
(m ¼ 1 or 2) and for ideal constraint forces we assumed that those forces could be
written as
Fmc ¼ λm —f m ð2:6:3Þ
Consider for the moment one constraint (m ¼ 1). We saw previously that we can
interpret both the constraint equation and the constraint force geometrically. The
constraint f1 ¼ 0 is the equation of a moving surface in three dimensions and the
force F1c is proportional to the gradient of that surface so it is parallel to the normal to
the surface (at a fixed instance of time) on which the particle must move (see
Fig. 2.37). Since there is one constraint there are two degrees of freedom for the
particle so that the motion of the particle can be described by two independent
generalized coordinates (q1(t),q2(t)) and the time, t. Any point on the surface can be
described as
x ¼ xðq1 ; q2 ; t Þ ð2:6:4Þ
∂x ∂x
c1 ¼ , c2 ¼ ð2:6:5Þ
∂q1 ∂q2
are tangent to the coordinate curves and normal to —f1 (Fig. 2.37). To give a more
concrete example, suppose a particle is constrained to move on the time-dependent
ellipsoidal surface (see Fig. 2.38) represented by the constraint
x1 ¼ a1 ðt Þ cos q1 sin q2
x2 ¼ a2 ðt Þ sin q1 sin q2 ð2:6:8Þ
x3 ¼ a3 ðt Þ cos q2
the constraint equation, Eq. (2.6.6), will be automatically satisfied so that the
position vector will lie on the time-dependent ellipsoid. The vectors (c1, c2) are
then given by
∂x
c1 ¼ ¼ a1 ðt Þ sin q1 sin q2 e1 þ a2 ðt Þ cos q1 sin q2 e2
∂q1
ð2:6:9Þ
∂x
c2 ¼ ¼ a1 ðt Þ cos q1 cos q2 e1 þ a2 ðt Þ sin q1 cos q2 e2 a3 ðt Þ sin q2 e3
∂q2
It is easy to verify that these vectors are indeed orthogonal to the gradient vector in
this example, as illustrated in Fig. 2.38b. Note that (c1, c2) are not unit vectors and
they are not orthogonal to each other in general.
The (c1, c2) vectors play a key role in describing the ndof independent equations of
motion (here ndof ¼ 2) since if we take the dot product of these vectors with the
equations of motion we have
x3
∇f1
q1
a3 ( t )
P c1
e3 x P
q2 c2
e1 e2 a2 ( t ) x2
a1 ( t )
x1
(a) (b)
Fig. 2.38 (a) Position of a particle, x(t), which is at point P on an ellipsoid with time-dependent
semimajor axes (a1(t), a2(t), a3(t)), and (b) a plane that is tangent to the ellipsoid at point P, showing
the vectors (c1, c2) that lie in this tangent plane and the gradient vector, —f1, which is normal to the
tangent plane
2.6 Generalized Coordinates and the Equations of Motion: A Geometric Approach 97
m€x cn ¼ Fe cn þ Fc cn
¼ Fe cn þ λ1 —f 1 cn ðn ¼ 1; 2Þ ð2:6:10Þ
¼ F e cn
where we have used the fact that the gradients of the constraint are orthogonal to both
cn tangent vectors. To obtain the two equations of motion in terms of the (q1, q2)
coordinates we can differentiate Eq. (2.6.4) twice to get the acceleration:
x ¼ xðq1 ; q2 ; t Þ
X 2
∂x ∂x X 2
∂x
v ¼ x_ ¼ q_ m þ ¼ cm q_ m þ
m¼1
∂q m ∂t m¼1
∂t ð2:6:11Þ
X2 X2 X 2
∂cm X2
∂cm
2
∂ x
a¼ €
x¼ cm €qm þ q_ m q_ n þ 2 q_ m þ 2
m¼1 m¼1 n¼1
∂qn m¼1
∂t ∂t
so that
X X2 X 2
2
∂cm
x ck ¼ m
m€ ½ck cm €qm þ m ck q_ q_
m¼1 m¼1 n¼1
∂qn m n
X 2
∂ x X
2
∂cm 2
þ2m ck q_ m þ mck 2 ¼ M km €qm ð2:6:12Þ
m¼1
∂t ∂t m¼1
2 X
X 2 X
2
þ K kmn q_ m q_ n þ J km q_ m þ Bk
m¼1 n¼1 m¼1
where
∂cm
M km ¼ mck cm , K kmn ¼ mck
∂qn
2
ð2:6:13Þ
∂cm ∂ x
J km ¼ 2mck , Bk ¼ mck 2
∂t ∂t
X
2 2 X
X 2 X
2
M nm €qm þ K nmk q_ m q_ k þ J nm q_ m þ Bn ¼ Fe cn ðn ¼ 1; 2Þ
m¼1 m¼1 k¼1 m¼1
ð2:6:14Þ
98 2 Dynamics of a Particle
X
3
x¼ xm ðq1 ; q2 ; t Þem ð2:6:15Þ
m¼1
we have
∂x X
3
∂xm
cn ¼ ¼ em ð2:6:16Þ
∂qn m¼1 ∂qn
and in terms of the Cartesian components of the external force the generalized
external force, Qne ¼ Fe cn , is given by
3 X
X 3
∂xm X3
∂xp
Qne ¼ Fe cn ¼ F pe ep em ¼ F pe ð2:6:17Þ
p¼1 m¼1
∂qn p¼1
∂q n
Calling this a generalized “force” is somewhat misleading since the cn vectors are
not dimensionless and when the generalized coordinate is an angular coordinate the
generalized force has the dimensions of a moment. When the external force can be
written in terms of a potential F pe ¼ ∂V=∂xp a similar relation holds for the
generalized force since
X
3
∂xp X3
∂V ∂xp ∂V
Qne ¼ Fe cn ¼ F pe ¼ ¼ ð2:6:18Þ
p¼1
∂qn p¼1
∂xp ∂qn ∂qn
Equation (2.6.14) has acceleration terms other than those involving the second
derivatives on time of the generalized coordinates. These are analogous to the
inertial force terms we saw in polar coordinates. Here, the generalized inertial forces,
Qin
n , are given by
X
2 X
2 X
2
n ¼
Qin K nmk q_ m q_ k J nm q_ m Bn ð2:6:19Þ
m¼1 k¼1 m¼1
Although we derived all of these results explicitly for a 3-D problem with one
constraint, they are also applicable to a 2-D problem with one constraint by making
all the terms involving (x1, x2, x3) reduce to expressions of (x1, x2) only.
In the example of the particle moving on the time-dependent ellipsoidal surface,
we did not have to use the constraint equation explicitly since the generalized
coordinates were chosen so that the constraint was automatically satisfied. In that
case we could say that the constraints were implicitly embedded into the equations of
motion. However, we can also define a set of ndof generalized coordinates as simply a
2.6 Generalized Coordinates and the Equations of Motion: A Geometric Approach 99
subset of the system generalized coordinates and use the constraint equations and/or
their derivatives to express the equations of motion only in terms of those coordi-
nates. This is called explicit embedding of the constraints. For example, consider the
use of Eq. (2.6.14) for the very simple problem of the bead on the smooth parabolic
wire we considered previously. In that two-dimensional problem there was only one
degree of freedom and one generalized coordinate needed to describe the motion so
Eq. (2.6.14) reduces to the single equation
∂V
M 11 €q1 þ K 111 q_ 1 q_ 1 þ J 11 q_ 1 þ B1 ¼ ð2:6:20Þ
∂q1
f 1 ¼ y ax2 ¼ 0
—f 1 ¼ 2axex þ ey
xðxÞ ¼ xex þ yðxÞey ¼ xex þ ax2 ey ð2:6:21Þ
∂xðxÞ
c1 ¼ ¼ ex þ 2axey
∂x
from which you can verify directly that —f1 c1 ¼ 0 and we have
which yields a result identical to what we obtained earlier with Newton’s second law
(see Eq. (2.3.25)), namely
1 þ 4a2 x2 €x þ 4a2 x x_ 2 þ 2gax ¼ 0 ð2:6:23Þ
Notice that we had to use the constraint equation to obtain both x(x) and V(x) in
terms of x only since both of these quantities are inherently functions of the system
generalized coordinates (x, y). This process is where we explicitly embedded the
constraints to yield a set of ndof equations of motion in terms of only ndof independent
coordinates. This process was easy and could be done by inspection in this simple
problem. In Sect. 2.11 we will examine the processs of explicit embedding from a
more general standpoint.
100 2 Dynamics of a Particle
dv X2
∂v X2
∂v ∂v
a¼ ¼ €qm þ q_ m þ ð2:6:24Þ
dt m¼1 ∂q_ m m¼1
∂q m ∂t
But the vector cn can also be calculated directly from the velocity rather than the
position vector x because recall
X2
∂x ∂x X2
∂x
v ¼ x_ ¼ q_ m þ ¼ cm q_ m þ ð2:6:25Þ
m¼1
∂qm ∂t m¼1 ∂t
X
2 2
X
∂v ∂v
ma cn ¼ m ½cn cm €qm þ m cn q_ þ m cn ð2:6:26Þ
m¼1 m¼1
∂qm m ∂t
X
2 X
2
ma cn ¼ M nm €qm þ Dnm q_ m þ E n ð2:6:27Þ
m¼1 m¼1
where
M nm ¼ m cn cm
∂v
Dnm ¼ m cn
∂qm ð2:6:28Þ
∂v
E n ¼ m cn
∂t
X
2 X
2
M nm €qm þ Dnm q_ m þ En ¼ Qne ð2:6:29aÞ
m¼1 m¼1
which unlike Eq. (2.6.14) can also be written in standard matrix-vector form as
X
2
n ¼
Qin Dnm q_ m E n ð2:6:30aÞ
m¼1
or in matrix-vector form as
Qin ¼ ½Dfq_ g fE g ð2:6:30bÞ
If we go back to our bead sliding on the smooth parabolic wire problem with the
independent coordinate q1 ¼ x again we have the one equation of motion
∂V
M 11 €q1 þ D11 q_ 1 þ E1 ¼ ð2:6:31Þ
∂q1
with
v ¼ x_ ¼ x_ ex þ y_ x; x_ ey ¼ x_ ex þ 2ax x_ ey
∂v
¼ 2ax_ ey
∂x
∂v
c1 ¼ ¼ ex þ 2axey
∂x_
M 11 ¼ mc1 c1 ¼ mð1 þ 4a2 x2 Þ ð2:6:32Þ
∂v
D11 ¼ mc1 ¼ 4ma2 xx_
∂x
∂v
E 1 ¼ mc1 ¼0
∂t
∂V
Q1e ¼ ¼ 2mgax
∂x
which again yields the equation of motion, Eq. (2.6.23). Notice that in this case we
had to use the derivative of the constraint equation to get the value of y_ x; x_ . Once
we have solved the equation of motion for x(t) we will also have to use the constraint
equation itself to get y(t). Thus, as we will see in the general discussion of explicit
embedding in Sect. 2.11 both the constraint equation and its derivative will normally
be needed in the explicit embedding process.
Now, consider a 3-D problem where there are two holonomic constraints defined
by the functions ( f1, f2) (see Eq. (2.6.2)). There is then only one degree of freedom so
that we can write the position vector of the particle in terms of one independent
generalized coordinate, q1:
x ¼ xðq1 ; t Þ ð2:6:33Þ
102 2 Dynamics of a Particle
x ( q1 , t )
The vector c1 ¼ ∂x/∂q1 is along a line defining the intersection of the two surfaces
(Fig. 2.39) at a fixed time and is perpendicular to both the gradient vectors (and
therefore is perpendicular to the two ideal constraint forces as well). Thus all of our
previous results for defining the equations of motion hold true when multiple
holonomic constraints are present.
Since our discussion here was for a very simple problem, we will illustrate
explicit embedding of holonomic constraints in a more general context later in
Sect. 2.11. When we embed the constraints we eliminate the constraint forces from
the equations of motion. This is nice from the standpoint of generating a more
compact set of equations of motion but we also lose a direct evaluation of the
constraint forces in the process. Since engineers are often interested in the constraint
forces as well as a description of the motion, when using an explicit embedding
approach one must find the constraint forces separately. Embedding in the manner in
which we have just described can only be done with holonomic constraints since if
we have, say, nnh non-holonomic constraints we can use those non-holonomic
constraints on the velocities to reduce the number of independent velocities (and
accelerations) by nnh but we cannot do the same for the generalized coordinates
themselves since we cannot integrate those non-holonomic constraints to find nnh
comparable constraints on the generalized coordinates. We can, however, still
embed non-holonomic constraints and eliminate the constraint forces. The details
of that type of embedding, however, are left to Sect. 2.11.
where there were nh holonomic constraints and a similar number of ideal constraint
forces present, instead of embedding those constraints we could use the constraints
to solve explicitly for those nh constraint forces explicitly and so obtain ns equations
of motion for the ns system coordinates. In Cartesian coordinates, for example, we
found the ns equations of motion as
1
x ¼ M1 Fe þ M1 AT AM1 AT
€ b AM1 Fe ð2:6:34Þ
Obtaining the equations of motion via Eq. (2.6.34) is, as mentioned previously,
called an augmented approach since Eqs. (2.6.34) and (2.6.35) give the result of
augmenting the ns equations of motion with the nh twice-differentiated constraint
equations and then solving that augmented set of (ns+nh) equations to obtain ns
equations of motion as well as the nh ideal constraint forces. This augmented
approach can be performed in the same manner for non-holonomic constraints
where the non-holonomic constraints only need to be differentiated once so that
the constraint equations written in terms of accelerations can be solved in conjunc-
tion with the differential equations of Newton’s second law. The augmented method
obviously leads to a larger number of equations of motion than with an embedding
approach.
We extended this augmented approach to polar coordinates in Sect. 2.5.1. How-
ever, our geometric approach in this section for generalized coordinates differs from
that obtained previously for polar coordinates. To see how these differences arise,
recall that in this section we have written the equations of motion by taking the dot
product of the vectors ck ¼ ∂r=∂qk ¼ ∂v=∂q_ k with Newton’s second law, i.e.,
M€x Fe Fc ck ¼ 0 ð2:6:36Þ
If the generalized coordinates chosen are independent coordinates that satisfy the
constraints we saw that the constraint force in Eq. (2.6.36) was eliminated. However,
if in the coordinate transformation x ¼ x(q, t) we simply change from a set of system
Cartesian coordinates to a set of system generalized coordinates, we can still apply
Eq. (2.6.36) but now the constraint forces will remain in the equations of motion and
we find
e þ Qc
q¼Q
M€ ð2:6:37Þ
where (using the velocity vector to define these terms—see Eq. (2.6.30b))
104 2 Dynamics of a Particle
½Mkj ¼ mck c j
ð2:6:38Þ
Q e ¼ Qin þ Qe ¼ Dq_ E þ Qe
where u1 ¼ er, u2 ¼ eθ are unit vectors in the r- and the θ-directions, respectively. In
contrast, c1 ¼ ∂x/∂r ¼ er,c2 ¼ ∂x/∂θ ¼ reθ so there will be some differences in the
generalized mass and inertia matrices and in some of the components of all the
generalized forces depending on whether we choose to generate the equations of
motion with ck or uk. We will summarize those differences here:
Equations of motion using (er, eθ):
" #
m 0 €r 0 mr θ_ r_ F re F rc
þ ¼ þ ð2:6:40aÞ
0 mr €θ mθ_ mr_ θ_ F θe F θc
m 0 €r 0 mr θ_ r_ Qre Qr
þ ¼ þ
0 mr 2 €
θ mr θ_ mr r_ _θ Q e
Qc θ θ
e
c
Fr Fr
¼ þ ð2:6:40bÞ
rF θe rF θc
Ultimately, however, these reduce to the same equations. Note that in polar coordi-
nates (using (er, eθ)) the inertial, external, and constraint forces appearing in the
equations of motion are simply those forces in the (r, θ) directions while when using
(c1, c2), the equation of motion in the θ-direction is actually a moment equation and
the generalized “force” in that direction is likewise a moment. In matrix-vector form
we can acknowledge the differences in the two cases by writing them in the two
distinct forms:
~ q ¼ Fin þ Fe þ Fc ¼ F
M€ ~ e þ Fc
ð2:6:41Þ
M€q¼Q þQ þQ ¼Q
in e c e þ Qc
2.7 Lagrange’s Equations 105
In either case, for constrained motion the constraint equations are written in the
same form:
q¼b
A€ ð2:6:42Þ
so that when we solve explicitly for the constraint force and equations of motion, as
done previously, we would have
Fc ¼ AT AM ~ 1 AT 1 b AM ~e
~ 1 F
ð2:6:43Þ
€¼M
q ~e þ M
~ 1 F ~ 1 AT AM~ 1 AT 1 b AM ~e
~ 1 F
using the (c1, c2) vectors. Using the (c1, c2) vectors when forming the equations of
motion in generalized coordinates is more general, allowing us to use any types of
generalized coordinates we wish. Thus, Eq. (2.6.44) is the augmented approach in
its most general form. As a consequence, from now on we will only employ the
(c1, c2) vectors. It is important to recall, as mentioned previously, that the ck vectors
are not necessarily unit vectors nor are they orthogonal in general.
We have seen how we can generate the equations of motion for a particle moving in
3-D with one or two holonomic constraints directly from components of Newton’s
laws in the form
We wrote either the position vector or the velocity vector of a particle in terms of the
independent generalized coordinates and differentiated those vectors to get the
acceleration. There is, however, another way to compute the left side of
Eq. (2.7.1) that is the basis of a different approach to dynamics called analytical
mechanics. First, we rewrite the left side of Eq. (2.7.1) as
dv ∂v d ∂v d ∂v
x cn ¼ m
m€ ¼m v mv ð2:7:2Þ
dt ∂q_ n dt ∂q_ n dt ∂q_ n
106 2 Dynamics of a Particle
_ t ¼ mv v=2 and use the
But if we use the definition of the kinetic energy as T q; q;
relationships
∂v ∂x
¼ ð2:7:3Þ
∂q_ n ∂qn
we have
d ∂T d ∂x
m€x cn ¼ mv
dt ∂q_ n dt ∂qn
d ∂T ∂ dx
¼ mv
dt ∂q_ n ∂qn dt
ð2:7:4Þ
d ∂T ∂v
¼ mv
dt ∂q_ n ∂qn
d ∂T ∂T
¼
dt ∂q_ n ∂qn
This form of the equations of motion is called Lagrange’s equations. It shows the
importance that the kinetic energy has in terms of generating the equations of
motion. It is valid for both unconstrained motion of a particle in 3-D problems and
constrained motion with holonomic constraints since in the unconstrained case there
is no constraint force and we have three independent generalized coordinates (three
degrees of freedom) and the kinetic energy is a function of all three of those
coordinates and their derivatives, i.e., T ¼ T q1 ; q2 ; q3 ; q_ 1 ; q_ 2 ; q_ 3 ; t . In the
constrained case with two degrees of freedom if we can use the constraint equation
and its derivative to explicitly embed the constraints in the kinetic energy, we can
write the kinetic energy as T ¼ T~ q1 ; q2 ; q_ 1 ; q_ 2 ; t in terms of two independent
generalized coordinates and their derivatives. In the one degree of freedom case
if we can
explicitly embed two constraint equations and their derivatives we have
T ¼ T~ q1 ; q_ 1 ; t instead. In either constrained case ideal constraint forces do not
appear in Eq. (2.7.5) because of their orthogonality to the vectors cn. Note that since
the generalized forces may be a function of all the unconstrained system coordinates
and their derivatives, in the presence of constraints those constraints must be
embedded in the generalized force expressions as well so that those expressions
are only functions of the independent coordinates present.
2.7 Lagrange’s Equations 107
If the external forces are derivable from a potential energy and that potential
energy, V~ , is written in terms of the independent coordinates then we can write
Eq. (2.7.5) as
d ∂L~ ∂L~
¼0 ð2:7:6Þ
dt ∂q_ n ∂qn
v~ ¼ x_ ex þ 2ax x_ ey
1 m
T~ ¼ mv v ¼ 1 þ 4a2 x2 x_ 2
2 2 ð2:7:8Þ
V~ ¼ mgax2
m
L~ ¼ T~ V~ ¼ 1 þ 4a2 x2 x_ 2 mgax2
2
These give
∂L~
¼ 4ma2 x x_ 2 2mgax
∂x
∂L~
¼ m 1 þ 4a2 x2 x_ ð2:7:9Þ
∂x_
d ∂L~
¼ m 1 þ 4a2 x2 €x þ 8ma2 x x_ 2
dt ∂x_
so that Eq. (2.7.7) again gives the equation of motion, Eq. (2.6.23).
Since we derived Lagrange’s equations from Newton’s second law, one might
think that they are simply different forms of the same law for the forces. This,
however, is not quite true as you might expect from our discussion in the previous
subsection. Previously we considered the case of unconstrained two-dimensional
motion of a particle in terms of polar coordinates, i.e., (q1, q2) ¼ (r, θ). Then
v ¼ r_ er þ r θ_ eθ
m m
T ¼ v v ¼ r_ 2 þ r 2 θ_ 2
2 2
F e ¼ F r er þ F θ eθ ð2:7:10Þ
∂v ∂v
c1 ¼ ¼ e r , c2 ¼ ¼ reθ
∂r_ ∂θ_
Q1e ¼ Fe c1 ¼ F r , Q2e ¼ Fe c2 ¼ rF θ
The first of these equations is just the component of Newton’s second law in the r-
direction, but the second equation is actually a moment equation, which in this case
is also r times Newton’s second law force equation in the θ-direction. Our discussion
at the beginning of this chapter showed that the interchangeability of force and
moment equations is just a consequence of the Newton-Euler equations. This
interchange occurs automatically in a Lagrangian approach when dealing with
generalized coordinates that are angular variables rather than positional variables.
2.7 Lagrange’s Equations 109
Since the kinetic energy plays such a key role in Lagrange’s equations we want to
examine closer the structure of the terms in the kinetic energy expression. For the
case of a particle moving in 3-D described by p independent generalized coordinates
( p could in this case could be one or two depending on the number of constraints
present) we have
1 X 3
T ¼ m x_ 2i
2 i¼1
xi ¼ xi q1 ; . . . ; qp ; t ð2:7:12Þ
X p
∂xi ∂xi
x_ i ¼ q_ j þ
j¼1
∂q j ∂t
(for economy of notation we will stop placing a tilde over these functions when
constraints are present and those constraints are embedded to generate
functions
of
only the independent coordinates). Substituting the x_ i in terms of q j ; q_ j gives
T ¼ T2 þ T1 þ T0 ð2:7:13Þ
where
1XX X
p p p
T2 ¼ M ij ðq; t Þq_ i q_ j , T 1 ¼ μi ðq; t Þq_ i , T 0 ¼ w0 ðq; t Þ ð2:7:14Þ
2 i¼1 j¼1 i¼1
with
X T
3
∂xk ∂xk ∂x ∂x
M ij ¼ M ji ¼ m ¼m
k¼1
∂qi ∂q j ∂q ∂q
X ∂xk ∂xk T
3
∂x ∂x
μi ¼ m ¼m ð2:7:15Þ
k¼1
∂q i ∂t ∂q ∂t
mX
T
3
∂xk ∂xk m ∂x ∂x
w0 ¼ ¼
2 k¼1 ∂t ∂t 2 ∂t ∂t
The separation of the kinetic energy into the three parts identified in Eq. (2.7.13) and
Eq. (2.7.14) identifies three separate types of dynamics effects. The first term, T2, is
quadratic in the generalized velocities and is typically present in all problems since it
is analogous to the kinetic energy expression in Cartesian coordinates (see the
kinetic energy expression in Eq. (2.7.12)) but where the mass m is replaced by the
matrix Mij(q, t). Systems where T1 ¼ T0 ¼ 0 are called natural systems and all other
systems are called nonnatural systems. As we will see, nonnatural systems are often
where one part of the motion is treated as known. This happens, for example, when
110 2 Dynamics of a Particle
y
y
Ω ey
ez ex
z x
R
r = R sin θ
x
θ rΩ
m
(a) (b)
Fig. 2.40 (a) A particle sliding on a smooth hoop which is rotating at a constant angular velocity,
Ω, about the y-axis, and (b) the velocity of the particle due to the rotation of the hoop for a set of (x,
y, z) coordinates that rotate with the hoop
we are describing the system in terms of moving coordinates where the motion of the
coordinates is specified. One example of a nonnatural system is where the coordi-
nates are fixed to the surface of the rotating earth. The T1 component of the kinetic
energy in that case is related to so-called Coriolis effects and the T0 component to
centrifugal effects. A simple example where one can see the centrifugal effects in
particular is the problem shown in Fig. 2.40a where a bead slides on a smooth
circular ring of radius R that is rotating with a constant angular velocity, Ω. If we
choose a set of moving coordinates (x, y, z) that rotate with the ring so that the ring is
always in the x y plane (see Fig. 2.40b), and use polar coordinates (R, θ) in that
plane to describe the motion, this is a one degree of freedom problem that can be
described by the single independent generalized coordinate, θ. The position and
velocity of the particle are
x ¼ R sin θ ex ðt Þ R cos θ ey
ð2:7:16Þ
v ¼ x_ ¼ R cos θ θ_ ex þ R sin θ e_ x þ R sin θ θ_ ey
where since the unit vectors (ex, ey, ez) are rotating with the angular velocity,
ω ¼ Ωey, of the ring their time derivatives are (see Sect. 1.5)
e_ x ¼ ω ex ¼ Ω ey ex ¼ Ωez
e_ y ¼ ω ey ¼ Ω ey ey ¼ 0 ð2:7:17Þ
e_ z ¼ ω ez ¼ Ω ey ez ¼ Ωex
and
1 1
T 2 ¼ mR2 θ_ 2 , T 1 ¼ 0, T 0 ¼ mðR sin θÞ2 Ω2 ð2:7:19Þ
2 2
from which we can recognize the T0 term as due to the velocity of the ring at the
particle position caused by the ring rotation (see Fig. 2.40b) and the T2 term as due to
the velocity of the particle as seen in the rotating x- and z-axes. Even when there is no
motion of the bead relative to the ring so that θ_ ¼ €θ ¼ 0 if we differentiate the
velocity in Eq. (2.7.18) on time under those conditions we find that the acceleration
is
L ¼ T V ¼ T2 þ T0 V ¼ T2 U ð2:7:21Þ
and computing the acceleration directly, as shown in the last section, or we can use
Lagrange’s equations
d ∂T ∂T
¼ Qne ð2:7:23Þ
dt ∂q_ n ∂qn
and compute the equations of motion from the kinetic energy. To see an application
of both of these approaches together consider the bead sliding on the rotating ring
example we just discussed briefly. This is a very simple problem since it is a one
degree of freedom system where we will take as our single independent generalized
coordinates q1 ¼ θ. First, determine the equations of motion using Eq. (2.6.14)
where we need the position vector and its derivatives:
112 2 Dynamics of a Particle
x ¼ R sin θ ex ðt Þ R cos θ ey
∂x
c¼ ¼ R cos θex ðt Þ þ R sin θey
∂θ
∂c
¼ R sin θex ðt Þ þ R cos θey
∂θ
∂c ð2:7:24Þ
¼ RΩ cos θez ðt Þ
∂t
∂x
¼ RΩ sin θez ðt Þ
∂t
2
∂ x
¼ RΩ2 sin θex ðt Þ
∂t 2
which gives
M 11 ¼ mc c ¼ mR2
∂c
K 111 ¼ mc ¼0
∂θ
∂c ð2:7:25Þ
J 11 ¼ 2mc ¼0
∂t
2
∂ x
B1 ¼ mc 2 ¼ mR2 Ω2 sin θ cos θ
∂t
∂V
M 11 €θ þ B1 ¼ ð2:7:26Þ
∂θ
or explicitly
If, however, we work with the velocity vector and use the form of Eqs. (2.6.29a) and
(2.6.29b) we only need the terms
so that
M 11 ¼ mR2
∂v
D11 ¼ mc ¼0 ð2:7:29Þ
∂θ
∂v
E1 ¼ mc ¼ mR2 Ω2 sin θ cos θ
∂t
∂V
M 11 €θ þ E 1 ¼ ð2:7:30Þ
∂θ
which again yields Eq. (2.7.27). Now, let us use Lagrange’s equations in terms of the
kinetic energy, Eq. (2.7.23), to get the equations of motion in this case. From
Eq. (2.7.5) and the potential energy expression we have
1
T ¼ m R2 θ_ 2 þ R2 Ω2 sin 2 θ
2
∂V
Qe ¼ ¼ mgR sin θ
∂θ
∂T
¼ mR2 θ_ ð2:7:31Þ
_
∂θ
d ∂T
¼ mR2 €θ
dt ∂θ_
∂T
¼ mR2 sin θ cos θ
∂θ
which once again gives Eq. (2.7.27). Note that the negative of the potential appears
in the Lagrangian and there is a negative gradient of the Lagrangian in Lagrange’s
equations so that if one uses Lagrange’s equations in the form of Eq. (2.7.6) it is easy
to make sign errors in the calculations. Thus, it is often better to use Lagrange’s
equations written in terms of the kinetic energy alone (see Eq. (2.7.5)), as done here,
so that the negative sign on the gradient of the potential appears only once in the
expression for the generalized force.
As we have seen before there are multiple ways to get the equations of motion.
For the simple problems considered in most dynamics books there often is little
difference in the method we choose. For more complex problems found in engi-
neering practice there may be important differences in the approach used so that it is
important to understand a variety of methods.
114 2 Dynamics of a Particle
In this rotating hoop example, the total energy is not conserved even though the
only external force acting (gravity) is derivable from a potential energy. We can see
this since the total energy, E, is given by
1 1
E ¼ T þ V ¼ mR2 θ_ 2 þ mðR sin θÞ2 Ω2 mgR cos θ ð2:7:33Þ
2 2
dE
¼ mR2 θ_ €θ þ mR2 Ω2 sin θ cos θθ_ þ mgR sin θθ_
dt ð2:7:34Þ
¼ 2mR2 Ω2 sin θ cos θθ_
where use has been made of the equation of motion, Eq. (2.7.27). This result makes
sense from a physical standpoint since in order to produce a constant rotational
velocity, Ω, of the hoop, there must be some torque driving the shaft of the hoop, and
this torque will do work, changing the total energy of the system.
Just because the total energy is not conserved, however, does not mean that one
cannot find a different integral of the equations of motion that is a constant.
Consider, for example, a system with p degrees of freedom where there are only
forces derivable from potentials and the Lagrangian,
L, is not an explicit function of
time. In that case we can write L ¼ L q; q_ in terms of p independent generalized
coordinates and their derivatives. In the one degree of freedom rotating hoop case we
see that this form is indeed true as we have
1
L ¼ T V ¼ m R2 θ_ 2 þ R2 Ω2 sin 2 θ þ mgR cos θ ð2:7:35Þ
2
so that L ¼ L θ; θ_ . But it follows that in the more general case
dL X ∂L X ∂L d
p p
¼ q_ k þ q_ ð2:7:36Þ
dt k¼1
∂qk k¼1
∂q_ k dt k
showing that
Xp
∂L
h¼ q_ L ¼ constant ð2:7:40Þ
k¼1
∂ q_ k k
The quantity h is an integral of the equations of motion called the Jacobi integral.
To put this integral in a more convenient form note that T ¼ T2+T1+T0 (see
Eqs. (2.7.13) and (2.7.14)) and
Xp
∂L Xp
∂T Xp X p Xp
q_ k ¼ q_ k ¼ M ij ðq; t Þq_ i q_ j þ μi ðq; t Þq_ i
k¼1
∂q_ k k¼1
∂q_ k i¼1 j¼1 i¼1 ð2:7:41Þ
¼ 2T 2 þ T 1
so that
h ¼ ð2T 2 þ T 1 Þ ðT 2 þ T 1 þ T 0 V Þ ¼ T 2 T 0 þ V
ð2:7:42Þ
¼ T2 þ U
1 1
h ¼ mR2 θ_ 2 mðR sin θÞ2 Ω2 mgR cos θ
2 2 ð2:7:43Þ
1 2_2 1
¼ mR θ 0 mðR sin θ0 Þ2 Ω2 mgR cos θ0
2 2
h¼E ¼T þV ð2:7:44Þ
and we have conservation of the total energy integral. For the rotating hoop example
this obviously occurs if Ω ¼ 0.
116 2 Dynamics of a Particle
The dynamics of this problem has some interesting behavior that is controlled by
the static equilibrium solutions. If we set €θ ¼ 0 we see those equilibrium solutions
must satisfy
g
Ω2 cos θ sin θ ¼ 0 ð2:7:46Þ
R
θ1 ¼ 2nπ
θ2 ¼ ð2n þ 1Þπ
ð2:7:47Þ
1 g g
θ3 ¼ cos 2nπ for 1
RΩ2 RΩ2
x_ 1 x2
¼ ð2:7:48Þ
x_ 2 sin x1 Ω2 cos x1 g=R
0.5
θ, deg
-0.5
-1
-1.5
0 1 2 3 4 5 6 7 8 9 10
t, sec
θ 0
deg/sec
-2
-4
-6
- 1.5 -1 -0.5 0 0.5 1 1.5
θ, deg
118 2 Dynamics of a Particle
50
θ, deg
0
-50
-100
-150
0 1 2 3 4 5 6 7 8 9 10
t, sec
θ, deg
66
65
64
63
62
61
0 1 2 3 4 5 6 7 8 9 10
t, sec
-10
-20
-30
61 62 63 64 65 66 67 68 69 70 71
θ, deg
Lagrange’s equations for a problem where the forces are derivable from a potential
can be written in terms of an independent set of generalized coordinates (q1, q2, . . .,
qn) as
d ∂L ∂L
¼0 ðk ¼ 1; 2; . . . ; nÞ ð2:7:49Þ
dt ∂q_ k ∂qk
The ∂L=∂q_ k terms are called the generalized momenta of the system. This naming is
consistent with the linear and angular momenta you are likely familiar with from
various particle problems. For example, consider a single particle of mass m freely in
the x-direction, i.e., where it is not subjected to any forces. Then we have
120 2 Dynamics of a Particle
1
L ¼ T V ¼ T ¼ mx_ 2 ð2:7:50Þ
2
where px ¼ mx_ is the linear momentum of the particle and we see that Lagrange’s
equation, Eq. (2.7.51), is just a statement of conservation of this linear momentum.
Alternatively, consider a particle attached to string and moving in a circular path of
radius R in a horizontal plane with no other force except the ideal constraint force of
the string acting on the particle. Then the Lagrangian can be written in terms of the
angular velocity of the particle, θ_ , as
1
L ¼ mR2 θ_ 2 ð2:7:52Þ
2
where pθ ¼ mR2 θ_ is just the angular momentum of the particle. Thus, it makes sense
to define the generalized momenta, pk, conjugated to (i.e., associated with) the
generalized coordinate, qk, as
∂L
pk ≜ ð2:7:54Þ
∂q_ k
When a generalized coordinate, qk, is absent from the Lagrangian then that qk
coordinate is said to be an ignorable coordinate. In that case we have
∂L
p_ k ¼ ¼0 ð2:7:55Þ
∂qk
Lagrange’s equations, written in terms of the kinetic energy, are (see Eq. (2.7.5))
d ∂T ∂T
¼ Qne ð2:7:56Þ
_
dt ∂q n ∂qn
where Qnc ¼ Fc cn . If, as done previously, we write the constraint equations in terms
of the generalized accelerations and assume that the constraint forces are ideal
constraints, then in terms of the constrained generalized coordinates we have
X
d ∂T ∂T M
¼ Qne þ Amn λm ðn ¼ 1; 2; . . . ; N Þ
dt ∂q_ n ∂qn m¼1
ð2:7:58Þ
X
N
Amj €
qj ¼ b m ðm ¼ 1; 2; . . . ; M Þ
j¼1
X
N X
N X
M
M nk €
qk þ Dnk q_ k þ En ¼ Qne þ Amn λm ðn ¼ 1; 2; . . . ; N Þ
k¼1 k¼1 m¼1
ð2:7:59Þ
X
N
Amk €
q k ¼ bm ðm ¼ 1; 2; . . . ; M Þ
k¼1
or, equivalently,
X
N X
M
e þ
M nk €qk ¼ Q Amn λm ðn ¼ 1; 2; . . . ; N Þ
n
k¼1 m¼1
ð2:7:60Þ
X
N
Amk €qk ¼ bm ðm ¼ 1; 2; . . . ; M Þ
k¼1
where
X
N
e ¼ Qe
Q Dnm q_ m E n ð2:7:61Þ
n n
m¼1
is the sum of the generalized external force components and the generalized inertial
force components. Equation (2.7.60) is in a form we have seen before and leads
directly to the explicit equations for the constraint force and the equation of motion
in the augmented approach.
Thus, Lagrange’s equations can be used with either an embedding approach or an
augmented approach. The augmented approach we have outlined is a general
method but the embedding approach has been done so far on a case-by-case basis.
In Sect. 2.11 the embedding method will be considered in more general terms.
In closing, it is important to note that we can only embed holonomic constraints
and their derivatives in the kinetic energy expression and then use that kinetic energy
expression in Lagrange’s equations. If one attempts to embed non-holonomic
constraints in the same fashion, one will obtain incorrect equations of motion (see
Problem P2.19). This should not be surprising since non-holonomic constraints do
not imply similar constraints on the coordinates themselves.
In all of our discussions to date we have generated the equations of motion for
systems with ideal constraint forces by using geometrical arguments, including the
derivation of Lagrange’s equations. However, analytical dynamics has traditionally
been developed using “virtual” quantities such as virtual displacements, which you
may be familiar with from statics. We have not followed that traditional path because
2.8 Analytical Dynamics and Virtual Work 123
virtual changes appear at first glance to be rather vague and mysterious concepts and
students encountering them for the first time are often not comfortable with them.
Since we have already discussed many of the concepts in analytical dynamics from a
geometrical standpoint, in this section we will tie that foundation to an approach that
uses virtual displacements and other virtual quantities and try to remove some of the
ambiguity surrounding their use.
Consider first a particle moving in 3-D. If we have holonomic constraints acting
on that particle we can write them in vector form as
f ðx; t Þ ¼ 0 ð2:8:1Þ
Ax_ ¼ at ð2:8:2Þ
Note that this A matrix is the same matrix appearing in the twice-differentiated
constraint equation A€x ¼ b. In the presence of constraints Newton’s second law
gives
m€x ¼ Fe þ Fc ð2:8:4Þ
where Fe is the net applied external force and Fc is the net constraint force. If we
assume that the constraint forces are ideal constraint forces we have
m€x ¼ Fe þ AT λ ð2:8:5Þ
Adx at dt ¼ 0 ð2:8:6Þ
There are infinitely many differentials, dx(t), that satisfy these constraint
equations, including the differential for the actual motion of the particle. If we let
124 2 Dynamics of a Particle
(dx0 , dx00 ) be two possible differential displacements that satisfy the constraints at the
same position and time then
The quantity δx(t) is what most authors call a virtual displacement. Using the
term “virtual” has led to much confusion since it implies that somehow this quantity
is not real. However, as our above discussion shows, a virtual displacement can be
defined simply as the difference between any two allowed differential displacements
the particle can have that satisfy the constraints, i.e., δx ≜ dx0 dx00 , and there is
nothing that is not real in that definition. Part of the confusion comes from authors
making vague statements like “a virtual displacement takes place without any
passage of time” which make no sense since as we have seen the virtual displace-
ments are in fact themselves functions of time, just as are the allowed differential
displacements. Also, many times virtual displacements are defined simply as having
to satisfy the geometrical constraints but without giving any explicit meaning to
what that satisfaction looks like. As we will see the great value of the virtual
displacements is that they satisfy the constraints in the form of Eq. (2.8.8), unlike
allowed differential displacements which satisfy Eq. (2.8.6). Operationally, we can
distinguish virtual displacements, δx, from ordinary differential displacements, dx,
by noting that if, say, we have any function, g(y1(t), y2(t), t) (which could be a vector
function), then the difference between the differential of g and the virtual change of
g is embodied in the relations
X2
∂g ∂g
dg ¼ dyk þ dt
k¼1
∂y k ∂t
ð2:8:9Þ
X2
∂g
δg ¼ δyk
k¼1
∂y k
where we see that there is no corresponding (∂g/∂t)δt term in the expression for δg.
Thus, one could obtain δg formally by including the (∂g/∂t)δt term and then setting
δt ¼ 0. However, note that although using the formalism of setting δt ¼ 0 does lead
to the correct expression for the virtual change of g it can also lead to confusion, as
noted above, as to the meaning of that virtual change. It is in the elimination of the
term that involves changes of g with respect to its explicit dependency on time that
2.8 Analytical Dynamics and Virtual Work 125
But taking the transpose of Eq. (2.8.8) gives δxTAT ¼ 0 so that we have in matrix-
vector notation
δxT m€x Fe ð2:8:11aÞ
Xp
∂x Xp
δx ¼ δqk ¼ ck δqk ð2:8:12Þ
k¼1
∂qk k¼1
X
p
m€x ck Fe ck δqk ¼ 0 ð2:8:13Þ
k¼1
But if the p generalized coordinates are unconstrained then we are free to choose
the δqk independently so that we must have
m€x ck ¼ Fe ck ðk ¼ 1; . . . ; pÞ ð2:8:14Þ
which is identical to the results we obtained previously (see Eq. (2.6.10)) and
directly leads to Lagrange’s equation because of Eq. (2.7.4).
If you follow the above steps in obtaining Eq. (2.8.14) you might notice that if we
had simply defined an ideal constraint force to be one where
Fc δx ¼ 0 ð2:8:15Þ
we obtain the D’Alembert-Lagrange principle. Then if we use the expression for the
virtual displacement given by Eq. (2.8.12), and the independence of the generalized
126 2 Dynamics of a Particle
Xp
∂x Xp
δW ¼ Fc δx ¼ Fc δqk ¼ Qkc δqk ¼ 0 ð2:8:16Þ
k¼1
∂qk k¼1
which is the statement of zero virtual work in terms of the generalized ideal
constraint forces.
To see in more explicit terms why the virtual work of an ideal constraint force is
zero, consider the motion of a particle on an inclined surface of a smooth wedge
whose motion along the horizontal direction (Fig. 2.47) is specified. Let u(t) be the
given displacement of the wedge and s(t) be the displacement along the inclined
surface as shown in Fig. 2.47. Then the actual velocity, v(t), of the particle is just
vðt Þ ¼ u_ ðt Þ þ s_ ðt Þ (velocity of the particle ¼ velocity of the wedge + velocity of the
particle with respect to the wedge) and the actual differential displacement of the
particle in a time interval dt is dr ¼ v(t)dt (see Fig. 2.48a). In this problem, the
constraint force, Fc, of the smooth surface acting on the particle is normal to the
inclined surface (Fig. 2.48a). Obviously dr is an allowed differential displacement
since it is the displacement in the actual motion. Now, consider another allowable
velocity of the particle v0 ðt Þ ¼ u_ ðt Þ þ s_ 0 ðt Þ. This velocity must have the same
velocity of the wedge as in the actual motion since the motion of the wedge is
assumed to be given, but it can have a different velocity along the inclined surface,
relative to the wedge, s_ 0 ðt Þ, without violating the constraint of having to move on
that surface. Thus, this allowable velocity produces an allowable differential
displacement dr0 (t) ¼ v0 (t)dt in the time interval dt (Fig. 2.48b). We can take as a
virtual displacement, δr, the difference of these two allowable displacements, i.e.,
δr ¼ dr0 (t) dr(t) where δr must be along the inclined plane since dr0 ðt Þ drðt Þ
¼ s_ 0 ðt Þdt s_ ðt Þdt and both ðs_ 0 ðt Þ; s_ ðt ÞÞ are along the inclined plane (Fig. 2.48c).
Thus, while Fc dr 6¼ 0 (the work of the constraint force acting through the actual
differential displacement is not zero) we do have Fc δr ¼ 0, i.e., the virtual work of
the constraint force is indeed zero.
u (t )
2.8 Analytical Dynamics and Virtual Work 127
u ( t ) dt u ( t ) dt
s ( t ) dt s′ ( t ) dt
Fc dr = v ( t ) dt dr′ ( t ) = v ( t ) dt
(a) (b)
δ r = dr′ − dr
= s′ ( t ) dt − s ( t ) dt
Fc
(c)
Fig. 2.48 (a) The velocity and differential displacement of the particle in the actual motion, and (b)
a different allowed velocity and differential displacement of particle, producing (c) a virtual
displacement that is the difference of the allowed motions of (a) and (b), showing that the ideal
constraint force is perpendicular to the virtual displacement and so does no virtual work
y
s (t )
u (t )
c Fd = −cs ( t )
Fs = k ( s ( t ) − s0 )
k m
h
N
O α x mg
(a) (b)
Fig. 2.49 (a) A block moving on a smooth wedge which has a specified displacement, u(t), where
the block is attached to a linear spring and a viscous dashpot. Gravity acts in the negative y-
direction. (b) The free body diagram of the block
We will use the problem of the moving wedge to solve the problem shown in
Fig. 2.49a using the D’Alembert-Lagrange principle, where a block of mass m slides
on a smooth wedge which has a specified displacement, u(t). The block is attached to
128 2 Dynamics of a Particle
a linear spring and a dashpot that provides a viscous damping force that is propor-
tional to the velocity of the block relative to the moving wedge. These forces as well
as the normal constraint force, N, acting on the block and its own weight are shown
in the free body diagram in Fig. 2.49b, where k is the spring constant and s0 is the
unstretched length of the spring and c is the dashpot constant.
This is a one degree of freedom problem where we can write the position vector of
the block relative to the fixed origin O as
xðsðt Þ; t Þ ¼ uðt Þex þ hey þ sðt Þ cos αex sðt Þ sin αey ð2:8:17Þ
and the external spring force, dashpot force, and force of gravity acting on the block
are, respectively,
which gives
Note that when there is no motion (equilibrium) of either the block or the wedge
the equation of motion reduces to
which gives the equilibrium displacement of the spring, se ¼ s0 þ mg sin =αk. Thus,
if instead of s we use the displacement of the block from this equilibrium position,
d ¼ s se our equation of motion in terms of d becomes simply
2.8 Analytical Dynamics and Virtual Work 129
which is the “box” function shown in Fig. 2.50. Functions like this one that have
discontinuous changes in behavior are easy to simulate in MATLAB® with the use
of logical vectors. For example, if we define in MATLAB® the function f as
the term in parentheses is a logical expression which evaluates to one whenever the
expression is true and zero otherwise. Thus if t is a vector of different time values, we
will just get a set of f values from this term that are ones for 0 t t0 and zeros
otherwise. Multiplying this logical vector by A then gives values that generate a
sampled version of the box function F(t).
This equation of motion has a term with an explicit function of time, F(t), as part
of its definition, but as we have seen with the problem of a bead moving on the
straight wire such a function can be easily incorporated into the equations of motion.
In this case we have generated a MATLAB® function moving_wedge which has the
calling sequence
t0 t
130 2 Dynamics of a Particle
where, as in our previous MATLAB® examples, tspan is the range over which we
want to simulate the motion of the block; x0 is a vector of initial conditions; km ¼ k/m
is the spring constant, k, normalized by the mass, m, with the dimensions of 1/s2;
cm ¼ c/m is likewise the normalized dashpot coefficient, with dimensions of 1/s;
Am ¼ A/m is the amplitude of F(t)/m with dimensions of acceleration in m/s2; t0 is
the duration of the driving force (Eq. (2.8.24)) in s; and (rtol, atol) are the relative and
absolute error tolerances used by ode45 as we have described previously. The
function moving_wedge contains a nested function wedge_func that simulates the
equations of motion as a system of first-order differential equations, and uses that
nested function and ode45 to generate the outputs xout and tout, where the matrix
xout contains the simulated displacement, d, and velocity, d_ , of the block in its two
columns and tout is a column vector of times at which the motion was evaluated. The
MATLAB® script moving_wedge_sim has a set of default values for all the input
parameters that are used unless you enter different values in the command window
before executing the script. These values are used to evaluate the function
moving_wedge and the resulting (xout, tout) values are then used by the script to
generate a plot of d versus the time, t, and a phase plot of d_ versus d. Figure 2.51a
plots the displacement of the block versus time, showing how the behavior changes
depending on whether the driving force is present or not. The phase plot of
Fig. 2.51b can explain that changing behavior. During the first 3 s of the motion
the force is constant. If we look at the equilibrium solution for a constant driving
force, we see that the equilibrium position is de ¼ A/k. The parameters chosen for
Fig. 2.51 are the default values given in the moving_wedge_sim script, k/m ¼ 10,
Am ¼ 10, so the equilibrium position is de ¼ 1 as long as Am ¼ 10. The phase plot
begins with a slowing decaying oscillation about that equilibrium position (point
P in Fig. 2.51b), but when the amplitude of the driving force drops to zero the
2 6
4
1 2
d 0 O P
0 d
-2
-1 -4
-6
-2 -8
0 1 2 3 4 5 6 7 8 9 10 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2
time, t d
(a) (b)
Fig. 2.51 (a) The displacement of the block versus time on a moving wedge, and (b) the phase plot
of the motion
2.9 Other Principles and Virtual Quantities 131
The last section showed that if we have an ideal constraint force given in terms of the
constraints as Fc ¼ ATλ and if we can find any vector, u, such that it satisfies the
constraints in the form
Au ¼ 0 ð2:9:1Þ
then the virtual “work” of the constraint force taken through this vector is zero since
uT Fc ¼ uT AT λ ¼ ðAuÞT λ ¼ 0 ð2:9:2Þ
If the vector u is a displacement, then Eq. (2.9.2) indeed has the dimensions of
work but we will still refer to Eq. (2.9.2) as a statement of virtual “work” for other
choices of u. The virtual displacement, δu, defined in that section as the difference
between two possible differential displacements taken at the same time, t, obviously
qualifies as such a vector, u. However, we will now examine other vectors u that can
be used as well. For example, consider non-holonomic constraints of the form
f x; x_ ; t ¼ Aðx; t Þx_ at ðx; t Þ ¼ 0 ð2:9:3Þ
If we have two possible velocities x_ 0 ; x_ 00 that satisfy these constraints at the
same position x, and time, t, then
Then
takingthe difference of these equations and defining a virtual velocity as
δJ x_ ≜ x_ 00 x_ 0 , we have
AδJ x_ ¼ 0
ð2:9:5Þ
δJ x_ T Fc ¼ 0
We will call this velocity difference a Jourdain virtual velocity. Note that the
difference of the two possible velocities need not be small so that the Jourdain virtual
velocity can be of arbitrary size. Note also that holonomic constraints can be
differentiated and placed into the same form as Eq. (2.9.3), so that for both
holonomic and non-holonomic constraints of this form we can use the Jourdain
132 2 Dynamics of a Particle
velocity in place of the previously defined virtual displacement. Since the virtual
“work” done by the constraint forces is zero, if we dot Newton’s second law with the
Jourdain virtual velocity we obtain the Jourdain variational equation
m€x Fe δJ x_ ¼ 0 ðδJ x ¼ 0; δJ t ¼ 0Þ ð2:9:6Þ
Then
00 taking
the difference and defining a new virtual acceleration as
δG € x €
x≜ € x0 , we have
AδG €x ¼ 0
ð2:9:11Þ
δG x€T Fc ¼ 0
We will call this acceleration a Gaussian virtual acceleration. Like the Jourdain
virtual velocity this virtual acceleration need not be a differentially small quantity
since it is based on the finite difference between two possible accelerations. Again,
since the virtual “work” done by this virtual acceleration is zero when we dot
Newton’s second law with this acceleration we obtain Gibbs-Gauss variational
equation:
2.9 Other Principles and Virtual Quantities 133
x Fe δG €x ¼ 0
m€ δG x ¼ 0; δG x_ ¼ 0; δG t ¼ 0 ð2:9:12Þ
This Gibbs-Gauss equation can handle a wide range of holonomic and non-
holonomic constraints but its real value is that it can be used to formulate a
fundamental law of dynamics called Gauss’s law of least constraint. To see this,
first multiply Newton’s second law by the inverse of the mass matrix, M1, which
gives
and place this expression for €x into the constraint equation, Eq. (2.9.8), and we have
Even though Eq. (2.9.14) has multiple solutions for the constraint force, Fc, if we
place some conditions on the solution of Eq. (2.9.14) we can actually solve it for a
unique constraint force associated with the constrained motion. This is possible
because Gauss’s law of least constraint provides just such a condition. Gauss’s law
that says that for any possible acceleration, €x0 , that satisfies the constraints at a fixed
position,
0 velocity, and time, if we form up a scalar function of the acceleration,
G €x , where G is the Gaussian function
1 T
G x€0 ¼ €x0 M1 Fe M €x0 M1 Fe ð2:9:15Þ
2
then G is a minimum for the actual acceleration, €x. To show this, let €x þ Δ€x be a
possible acceleration, i.e., one that satisfies Eq. (2.9.8), where €x is the actual
Then Δ€x must also satisfy the constraints. Now, consider
acceleration.
G €x þ Δ€x . We have
1 T
G € x ¼ €
x þ Δ€ x þ Δ€x M1 Fe M €x þ Δ€x M1 Fe
2
1 T 1
¼ € x M1 Fe M €x M1 Fe þ Δ€xT M €x M1 Fe þ Δ€xT MΔ€x
2 2
1
¼ G €x þ Δ€xT Fc þ Δ€xT MΔ€x
2
ð2:9:16Þ
But the virtual “work” term Δ€xT Fc is zero since Δ€x is a possible acceleration so
that it can serve as the virtual acceleration in Eq. (2.9.12). This shows that for any
Δ€x 6¼ 0
1
G x€ þ Δ€x G €x ¼ Δ€xT MΔ€x > 0 ð2:9:17Þ
2
134 2 Dynamics of a Particle
which is true since the mass matrix M is a positive definite matrix. Thus G always
has its smallest value for the actual motion.
Gauss’s law is called the law of least constraint since we can write it in terms of
the constraint force (and the mass matrix, which acts as a weighting factor):
T
G ¼ M1 Fc M M1 Fc ¼ ðFc ÞT M1 ðFc Þ ð2:9:18Þ
so that when we minimize G we are minimizing the constraint force in this weighted
fashion.
Now, let
y ¼ M1=2 Fc ð2:9:19Þ
Normally, we cannot take square roots or inverse square roots of matrices, but
because M is a positive definite matrix this operation has meaning. For example, if
M is just a diagonal matrix of positive masses such as
2 3
m 0 0
6 7
M¼40 m 05 ð2:9:20Þ
0 0 m
then
2 pffiffiffiffi 3 2 pffiffiffiffi 3
m 0 0 1= m 0 0
6 pffiffiffiffi 7 6 pffiffiffiffi 7
M1=2 ¼4 0 m 0 5, M1=2 ¼ 4 0 1= m 0 5 ð2:9:21Þ
pffiffiffiffi pffiffiffiffi
0 0 m 0 0 1= m
Positive definite matrices that are not diagonal can be put into these same forms
and their square roots or inverse square roots defined similarly. In terms of the vector
y the Gaussian function G is
G ¼ yT y ¼ jyj2 ð2:9:22Þ
By ¼ c ð2:9:23Þ
1
y ¼ BT BBT c ð2:9:24Þ
T T 1
M1=2 Fc ¼ AM1=2 AM1=2 AM1=2 b AM1 Fe
ð2:9:25Þ
1=2
1
T 1 1 e
¼M T
A AM A b AM F
which can be multiplied by M1/2 on both sides to give the constraint force as
1
Fc ¼ AT AM1 AT b AM1 Fe ð2:9:26Þ
which is just the solution for an ideal constraint force that we have been using
previously. This value for the constraint force also gives the previously obtained
equations of motion explicitly as
1
x ¼ M1 Fe þ M1 AT AM1 AT
€ b AM1 Fe ð2:9:27Þ
Satisfying Gauss’s law of least constraint requires that all constraint forces that
come from independent constraints of the form A€x ¼ b must be ideal constraint
forces of the form Fc ¼ ATλ, as we have assumed previously. Furthermore, the
constraint forces are explicitly given by Eq. (2.9.26) and the equations of constrained
motion must satisfy Eq. (2.9.27). Even Newton’s second law for unconstrained
motion follows from this fundamental law. One way to see this is to simply set
Fc ¼ 0 in Eq. (2.9.27) which then reduces to Newton’s second law for the
unconstrained acceleration. Alternatively, we could examine the variation of
G due to virtual changes of the acceleration. When G is a minimum we must have
1
1 e T 1 e
δG G ¼ δG €x M F M €x M F
2
1 1 T ð2:9:28Þ
¼ δG €xT M€x Fe þ M€x Fe δG €x
2 2
¼ δG €xT M€x Fe ¼ 0
for the actual motion (where we have used the fact that the mass matrix is symmetric,
i.e., M ¼ MT, and the general property of the transpose operation (AB)T ¼ BTAT).
But if the motion is unconstrained δG €x is arbitrary so that we must also have
M€x Fe ¼ 0 ð2:9:29Þ
136 2 Dynamics of a Particle
which is just Newton’s second law. It is remarkable that Gauss’s law of least
constraint provides the foundation for much of the field of dynamics that we have
discussed in previous sections.
In Sect. 2.7 we showed that in terms of generalized coordinates we could write
components of Newton’s second law in the form
M€ e þ Qc ¼ Qin þ Qe þ Qc
q¼Q ð2:9:30Þ
1
e T M q e
G¼ € M1 Q
q € M1 Q
2 ð2:9:31Þ
1
¼ ðQc ÞT M1 ðQc Þ
2
which is in the same form as Eq. (2.9.15) so all of our previous results obtained for
Cartesian coordinates are true for generalized coordinates by making the replace-
ments x ! q, Fe ! Q e , and Fc ! Qc and noting that the mass matrix in Cartesian
coordinates becomes the generalized mass matrix for generalized coordinates.
So far we have only considered ideal constraint forces when formulating the
equations of motion. However, we can handle other constraint forces without
much difficulty if we follow the approach outlined recently by Udwadia [9]. Specif-
ically, we will show that by generalizing Gauss’s law of least constraint appropri-
ately we can obtain explicit expressions for both the ideal and nonideal constraint
forces and generate the equations of motion.
First, consider Newton’s second law for a particle in Cartesian coordinates when
constraint forces are present, written in matrix-vector form:
where M ¼ mI is the mass matrix, Fe is the known net external force, and Fc is the
total ideal constraint force present, and we now also allow a total nonideal constraint
force, Fc;ni. Let the virtual “work” done by the ideal and nonideal constraint forces be
specified explicitly as
δG €xT Fc ¼ 0
ð2:10:2Þ
δG x€T Fc;ni ¼ δG €xT K
2.10 Nonideal Constraint Forces 137
Recall that for the case of all ideal constraints, in place of Eq. (2.10.3) we
obtained
δG €xT M€x Fe ¼ 0 ð2:10:4Þ
0
and we showed that for possible acceleration, €x , that satisfies the constraints the
0any
Gaussian function, G €x , was a minimum, where
1 T
G x€0 ¼ €x0 M1 Fe M €x0 M1 Fe ð2:10:5Þ
2
This suggests that when nonideal constraint forces are present that satisfy
Eq. (2.10.2) a modified Gaussian function, G ~ €x0 , is a minimum, among all possible
accelerations, at the actual acceleration, €x, where
0 1 0 T
~ x
G € ¼ € x M1 Fe M1 K M €x0 M1 Fe M1 K ð2:10:6Þ
2
To show this extended version of Gauss’s law, as in the ideal constraint force case
let €
x þ Δ€x be a possible acceleration, where €x is the actual acceleration. Then Δ€x must
also satisfy the constraints so that
Δ€xT Fc ¼ 0
Now, consider G x€ þ Δ€x . To keep the complexity of the expressions to a
minimum, let M1Fe ¼ a and M1K ¼ k. Then
1 T
~ x
G € þ Δ€x ¼ €x þ Δ€x a k M €x þ Δ€x a k ð2:10:7aÞ
2
or, equivalently,
138 2 Dynamics of a Particle
1 T
~ x
G x ¼ €x a k M €x þ Δ€x a k
€ þ Δ€
2
1
þ Δ€xT M €x þ Δ€x a k
2
1 T 1 T
¼ €x a k M €x a k þ € x a k MΔ€x
2 2
1
þ Δ€xT M €x þ Δ€x a k
2
1 T
~ €x þ Δ€x MΔ€x þ Δ€xT M €x a k
¼G ð2:10:7bÞ
2
But
Δ€xT M x€ a k ¼ Δ€xT M€x Fe K ¼ 0 ð2:10:8Þ
since Δ€
x can serve as a virtual acceleration in Eq. (2.10.3) and we find
G ~ €x ¼ 1 Δ€xT MΔ€x > 0
~ x€ þ Δ€x G ð2:10:9Þ
2
~ like G,
which is true since the mass matrix M is a positive definite matrix. Thus G,
always has its smallest value for the actual motion. If we let
y ¼ M1=2 x€ M1 Fe M1 K ð2:10:10Þ
~ ¼ yT y, as in the ideal constraint force only case, and the constraint equation
then G
A€x ¼ b becomes
By ¼ c ð2:10:11Þ
where now
B ¼ AM1=2
ð2:10:12Þ
c ¼ b AM1 Fe AM1 K
As in the ideal constraint case if the constraint equations are linearly independent
the unique solution for y that satisfies Eq. (2.10.11) and minimizes the norm of the
vector y can be shown as
1
y ¼ BT BBT c ð2:10:13Þ
2.10 Nonideal Constraint Forces 139
Placing the expressions for B and c into Eq. (2.10.13), after some algebraic steps
very similar to the ideal constraint case, we can write the equations of motion as
1
x ¼ M1 Fe þ M1 AT AM1 AT
€ b AM1 Fe
h 1 i ð2:10:14Þ
þ M1 I AT AM1 AT AM1 K
where I is the identity matrix. There is now an ideal constraint force present in
Eq. (2.10.14) in exactly the same form as before as well as a nonideal constraint
force:
1
Fc ¼ AT AM1 AT b AM1 Fe
ð2:10:15Þ
Fc;ni ¼ I AT AM1 AT AM1 K
x_
K ¼ μjFc j ð2:10:16Þ
jx_ j
where Fc is the ideal normal constraint force exerted by a smooth surface on the
particle and μ is the coefficient of sliding friction then
μ x_
M1 K ¼ jFc j ð2:10:17Þ
m jx_ j
which is an acceleration that is tangential to the surface (and always opposite to the
direction of motion). However, recall that A is also normal to the surface so that
AM1K ¼ 0 and from Eqs. (2.10.15) and (2.10.16) it follows that
x_
Fc, ni ¼ μjFc j ð2:10:18Þ
jx_ j
which is just the ordinary Coulomb frictional force. In cases like these we see that we
can simply add the K vector into the equation of motion, using the same ideal
constraint force generated by the constraint equations in the case of ideal constraints
only in the expression for K (assuming that K depends on the ideal constraints).
140 2 Dynamics of a Particle
We have obtained all our results so far in terms of Cartesian components but as
with the ideal constraint force case very similar forms can be found in terms of ns
independent generalized coordinates where the Gibbs-Gauss virtual acceleration and
generalized force are
X
ns X
ns
δG €x ¼ ∂€x=∂€qk δG €qk ¼ ck δG €qk
k¼1 k¼1
ð2:10:19Þ
Qk ¼ F ck
from which the virtual “work” of the nonideal generalized constraint force can be
whose components are K k , as
expressed in terms of a known vector, K,
X
ns X
ns
δG €xT Fc;ni ¼ k δG €
Qc;ni qk ¼ Kk δG €qk ð2:10:20Þ
k¼1 k¼1
and
K k ¼ K ck ð2:10:21Þ
All of the steps then follow in a similar fashion as the Cartesian component case,
as discussed in the last section, so we only show the final results for the equations of
motion in generalized coordinates and generalized constraint forces as
€ ¼ M1 Q
q e M1 AT AM1 AT 1 b AM1 Q
e
h 1 i
þ M1 I AT AM1 AT AM1 K
1 ð2:10:22Þ
Qc ¼ AT AM1 AT b AM1 Qe
h 1 i
Qc;ni ¼ I AT AM1 AT AM1 K
where we have lumped the known generalized forces and inertial forces into the Q e
force term, as done before.
As an example, let’s consider the roller-coaster problem of Sect. 2.3.2 but now
assume that the track is rough with a coefficient of sliding Coulomb friction, μ. The
roller coaster was a special case of the general problem of motion on a 2-D smooth
surface of the form f(x, y) ¼ y h(x), where hðxÞ ¼ A2 ½1 cos ðπx=LÞ. Some of the
relevant terms appearing in Eq. (2.10.14) are now (see Eq. (2.3.44))
2.10 Nonideal Constraint Forces 141
1 þ ðdh=dxÞ2 1
It is easy to see that AM1K ¼ 0 and so indeed Fc;ni ¼ K. Thus, the original
equations of motion for the case of no friction simply are modified by the addition of
the x- and y-components of K, giving
dh=dx d2 h 2 μ
d2 h 2
x_
€x ¼ g þ 2 x_
g þ dx2 x_
jx_ j ð2:10:24Þ
1 þ ðdh=dxÞ2 dx 1 þ ðdh=dxÞ2
1 d2 h 2 μðdh=dxÞ
d 2 h 2
x_
€y ¼ g þ gþ _
x
g þ _
x
jx_ j ð2:10:25Þ
1 þ ðdh=dxÞ2 dx2 1 þ ðdh=dxÞ2 dx2
Coulomb frictional forces, like the drag forces we considered earlier, slow the
particle down and eventually bring it to rest. However, from statics we know that
once at rest the particle will remain at rest unless the tangential component of the net
external force acting along the surface exceeds a threshold. For Coulomb friction, if
the particle comes to rest it will remain at rest if
which yields
dh
μ ð2:10:28Þ
dx
You may recognize Eq. (2.10.28) from statics where it is normally shown that a
mass sitting on a rough inclined surface under the external force of its own weight
will remain in equilibrium as long as the slope of the surface (which here is dh/dx) is
less than the static coefficient of friction. [Note that we have let the dynamic
coefficient of sliding friction appearing in Eqs. (2.10.24) and (2.10.25) to be the
same as the static coefficient in Eqs. (2.10.26) and (2.10.28). In general the dynamic
and static values of the friction coefficient might be slightly different. We can easily
take any difference into account, if needed.] For the roller-coaster problem
Eq. (2.10.28) is
πA πx
sin
μ ð2:10:29Þ
2L L
which determines the “sticking regions” on the roller coaster. For μ πA/2L the
mass can stick anywhere along the roller-coaster track.
The event function stick must describe the event and the actions which have to be
taken by ode45 when the event occurs. This function in our case is also nested in the
2.10 Nonideal Constraint Forces 143
The inputs (t, x) are the values of the time and first-order differential equation
unknowns, which in our case are the vector components x(1) ¼ x, x(2) ¼ dx/dt.
Value is a mathematical expression describing the event, which in our case is
sticking. This event is defined to occur when value is equal to zero. The parameter
isterminal is set to 1 if the integration is to terminate when the event occurs or set to
0 if the integration is allowed to continue. In our case motion stops so we want to set
isterminal ¼ 1. The parameter direction can be 0, 1, or 1. In the case direction ¼ 0,
which is the default, whenever a zero of value is detected it is labeled as an event,
while in the case of direction ¼ 1, only those zeros of value are labeled as an event
if the event function value is decreasing, while if direction ¼ 1, only those zeros of
value where that event function is decreasing. In our case value is chosen to be the
expression:
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
value ¼ 1 real x_ 2 þ y_ 2 < vtol & jdh=dxj < μ
(written here as text pseudo-code rather than a MATLAB® expression; see the
function stick for the actual MATLAB® version). Within the parentheses in the
above expression is a logical statement which says that the magnitude of the cart
velocity must be less than some small velocity tolerance, vtol, and the slope of the
track must be less than the coefficient of friction. The ideal sticking criterion is that
the velocity must be zero but in a numerical solution this condition may never be
satisfied exactly so we must replace it with a small user-defined tolerance. Thus, vtol
is another parameter that must be defined in the script roller-coaster_f2_sim and
passed to the function roller_coaster_f2, which then shares the parameter with the
nested function stick. As long as the sticking criterion is not satisfied the logical
expression is false and has a logical value of 0. The MATLAB® function real
converts this logical expression to a real value of 0, and so value ¼ 1 0 ¼ 1.
When the sticking criterion is met the logical expression is true and has a logical
value of 1 which is converted to a real value of 1, giving value ¼ 1 – 1 ¼ 0. Thus, for
the roller-coaster problem when sticking occurs value changes from 1 to 0, which is
an event. With isterminal ¼ 1, the event function tells the numerical integrator to
stop, and direction ¼ 1 in our case since value always changes from 1 to 0 (i.e.,
value is decreasing) when the event sticking occurs, although we could also use the
default direction ¼ 0 since value always changes from 1 to 0.
144 2 Dynamics of a Particle
When an event function is present, there are some additional output parameters
available when calling ode45. These outputs are shown here:
where again tout is a column vector containing the times at which the numerical
solution is evaluated and xout is an array containing the numerical solutions for x and
dx/dt, again placed into columns. The new output parameters due to the presence of
the event function are te, xe, and ie. The value of te is the time within tspan at which
sticking occurs and the integration stops, and xe is the vector xe ¼ [x, dx/dt] at time
te. The output ie is an indicator of which event (if there is more than one event) that
the numerical solver detected. In our case there is only one event and ie ¼ 1 always
so this output is not used. As you might suspect, if needed we can handle multiple
events of different types using this same approach, where there can be multiple value
functions, and different event conditions. If you are interested in more general event
cases, you can look at the MATLAB® documentation or see various examples
shown on the Web.
In the roller-coaster example the default values placed in the
roller_coaster_f2_sim script are A ¼ 1 m; L ¼ 5 m; mu ¼ 0.1 for the coefficient
of friction; tspan ¼ [0, 30] s; x0 ¼ [0, 8] in m and m/s, respectively; rtol ¼ 1e-5;
atol ¼ 1e-6; and vtol ¼ 1e-3. This is not a very steep roller coaster and a mild friction
coefficient where we can see some interesting behavior. The outputs of the script are
(1) a plot of y versus x during the motion; (2) a plot of the normal force divided by the
weight, mg, versus time; and (3) a plot of dx/dt versus x (a phase plot). These plots
are shown in Figs. 2.52, 2.53 and 2.54. After executing the script the output
te ¼ 10.57 s, which is the time at which sticking occurred, and xe ¼ [20.37 m,
9.97e-4 m/s], which is the corresponding x-location and x-velocity component when
sticking occurred. Figure 2.52 shows that the cart has passed over two maxima in the
-4
-6
-8
0 5 10 15 20
x
2.10 Nonideal Constraint Forces 145
1.5
N /mg
1
0.5
0
0 2 4 6 8 10 12
t
A
C
D
B
(b)
track before coming to rest and sticking. The maximum x-value in Fig. 2.52 is
x ¼ 23.16 m, which is larger than the x-value at sticking, xe ¼ 20.37 m, so the cart
must have slid partly up the track and then slipped back before coming to rest
(although this behavior cannot be seen in Fig. 2.52 because of the nature of the plot).
We can see details of this behavior in the phase plot. The normal force divided by the
146 2 Dynamics of a Particle
mass versus time plot in Fig. 2.53 shows that the effects of friction are to slow the
cart down and also to reduce the intensity of the normal force oscillations. The
ending time when the cart sticks is te ¼ 10.57 s, which is much less than the total
30-s interval over which we were going to conduct the integration, showing the
existence of the termination due to sticking. The phase plot in Fig. 2.54a shows us
another view of the motion that is valuable. We see that the motion of the cart slows
on the average as it rides over the first two peaks in the track and then is trapped in
the final track valley. Point A occurs at the largest value of x, which is when the cart
has stopped and it is about to start sliding back into the final valley, as shown in
Fig. 2.54b. The cart reaches the bottom of the valley at point B and then continues to
point C where it stops again and then reverses its motion again, passes through the
bottom of the valley, and eventually comes to rest at a distance x ¼ 20.37 m (point D)
which is slightly to the right of the bottom at x ¼ 20 m. There are potential sticking
regions (regions where |dh/dx| μ) centered around all the maxima and minima of
the track. Figure 2.54a shows the sticking regions for the first two maxima and
subsequent minima as small horizontal lines in that figure. These equilibrium regions
replace the equilibrium points that exist in the case without friction. The motion of
the cart intersects the sticking region centered at x ¼ 20 m and stops in that region at
D. You should be aware of the fact that depending on the parameters chosen these
sticking regions might be very small. Thus, during the numerical solution it may be
possible to miss the sticking regions entirely due to numerical errors and time step
size. One may need to experiment with different choices of the fineness of the
numerical time steps through the setting of the error tolerances or through changes
to the velocity tolerance, vtol, to obtain the proper event behavior.
f ðq; t Þ ¼ 0 ð2:11:1Þ
Aq_ þ f t ¼ 0 ð2:11:2aÞ
Xns
∂f i ∂f
q_ j ¼ i ði ¼ 1; 2; . . . ; nh Þ ð2:11:2bÞ
j¼1
∂q j ∂t
where A
fq is an nh ns matrix of derivatives on the components of q called the
constraint Jacobian matrix given by
2 3
∂f 1 =∂q1 ∂f 1 =∂q2 ... ∂f 1 =∂qns
6 ∂f =∂q ∂f 2 =∂q2 ... ∂f 2 =∂qns 7
6 2 1 7
A
fq ¼ 6 7 ð2:11:3Þ
4 5
∂f nh =∂q1 ∂f nn =∂q2 . . . ∂f nh =∂qns
and ft
∂f/∂t is the nh 1 column vector of the time derivatives of the components
of f. As we have seen before if we take another time derivative of Eq. (2.11.3) we
arrive at constraint equations expressed in terms of the accelerations, given in
matrix-vector form by
q¼b
A€ ð2:11:4aÞ
Xns
∂f i
€qj ¼ bi ði ¼ 1; 2; . . . ; nh Þ ð2:11:4bÞ
j¼1
∂q j
X
ns
m€x ck Fe ck δG €qk ¼ 0 ð2:11:7aÞ
k¼1
X
ns
m€x ck Qke δG €qk ¼ 0 ð2:11:7bÞ
k¼1
by using the definition of the generalized external force, Qe. But, recall from
Eqs. (2.6.27) and (2.6.30a) (written in terms of our current notation)
Xns X ns
∂v ∂v
x ck ¼ m
m€ ½ck cm €qm þ m ck q_ m þ m ck
m¼1 m¼1
∂qm ∂t
X
ns X
ns
¼ M km €qm þ Dnm q_ m þ Ek ð2:11:8Þ
m¼1 k¼1
Xns
¼ M km €qm Qin
k
m¼1
where Qin is an inertial force term. Thus, the variational principle in terms of
generalized coordinates and generalized forces becomes
ns X
X ns
e δG €qk ¼ 0
M km €qm Q ð2:11:9Þ
k
k¼1 k¼1
2.11 Explicit Embedding of Constraints: A General Approach 149
where Q e ¼ Qe þ Qin is the generalized external force due to both applied forces and
inertial forces. Now, consider the presence of nh holonomic constraints as given by
Eqs. (2.11.4a) and (2.11.4b). These constraints must satisfy
€¼0
AδG q ð2:11:11Þ
€dp þ Ain δG q
Adp δG q €in ¼ 0 ð2:11:13Þ
where Ain is a nh ndof matrix and we assume that the choice of the dependent
variables is made so that the nh nh matrix Adp is non-singular and its inverse exists.
We will discuss in more detail later how this partitioning can be done, but for now
we will assume that we have Eq. (2.11.13). Multiplying both sides of Eq. (2.11.13)
by the inverse of Adp we can solve for the dependent virtual accelerations in terms of
the independent accelerations:
€dp ¼ A1
δG q €in
dp Ain δG q ð2:11:14Þ
and the total vector of system virtual accelerations can then be expressed in terms of
the independent virtual accelerations only as
" #
€dp
δG q A1
dp Ain
€¼
δG q ¼ €in
δG q ð2:11:15Þ
€in
δG q I
150 2 Dynamics of a Particle
€ ¼ Bin δG q
δG q €in ð2:11:16Þ
However,
" #!T
T A1
dp Ain
BinT AT ¼ ðABin Þ ¼ Adp Ain ¼0 ð2:11:19Þ
I
so that the Lagrange multiplier terms (and the corresponding constraint forces) are
eliminated from Eq. (2.11.12) and because of the independence of the δG q €in we
obtain the ndof equations of motion
BinT M€ e ¼ 0
q BinT Q ð2:11:20Þ
If we partition the first and second derivatives of the constraints, Eqs. (2.11.2a),
(2.11.2b), (2.11.4a) and (2.11.4b) into dependent and independent terms, we have
€in þ Adp q
Ain q €dp ¼ b
ð2:11:21Þ
Ain q_ in þ Adp q
€dp ¼ f t
€dp ¼ A1
q 1
€in
dp b Adp Ain q
ð2:11:22Þ
q_ dp ¼ A1 1
dp f t Adp Ain q_ in
so that
" # " #
A1
dp Ain A1
dp b
€¼
q € in þ
q €in þ d
¼ Bin q
I 0
" # " # ð2:11:23Þ
A1
dp Ain A1
dp f t
q_ ¼ q_ in þ ¼ Bin q_ in þ e
I 0
2.11 Explicit Embedding of Constraints: A General Approach 151
BinT MBin q e þ B T Md ¼ 0
€in BinT Q ð2:11:24Þ
in
_ _
€in ¼ Qin
Min q ð2:11:25Þ
where
_
M in ¼ BinT MBin
_ ð2:11:26Þ
Q in ¼ B T Q e B T Md
in in
Equation (2.11.25) is ndof ¼ (ns nh) equations for the ndof accelerations, q€in , but
it may also include all the generalized velocities and coordinates since in general we
_ _ _ _
may have M in ¼ M in ðq; t Þ and Q in ¼ Q in q; q; _ t . To write Eq. (2.11.25) in terms
of independent coordinates and their derivatives only we must also write both q_ and
q in terms of independent quantities only. The velocity relation of Eq. (2.11.22) can
be used to write q_ in terms of q_ in but to eliminate the dependent coordinates we need
to solve the constraint equations of Eq. (2.11.1) for those dependent coordinates.
Symbolically we can write these solutions as qdp ¼ g(qin, t) but in practice the
constraint equations are often nonlinear so this solution must be done numerically
using methods such as the Newton-Raphson method (see the discussion in Appendix
_
C). If the constraint equations are linearly independent the “mass” matrix, M in , is
non-singular so that we can obtain the second-order equations of motion for the
independent accelerations, finally, as
_ _
€in ¼ M 1
q in Q in ð2:11:27Þ
You might have noticed that in obtaining Eq. (2.11.25) we did not at any point use
the fact that the constraints were holonomic since we obtained that equation through
the Gibbs-Gauss variational principle and only worked with the constraint equations
written in terms of accelerations in a form that can be obtained from either
holonomic or non-holonomic constraints. However, suppose that the constraints of
Eqs. (2.11.4a) and (2.11.4b) came from differentiating nnh non-holonomic con-
straints. Then we could still partition the accelerations as shown and obtain
Eq. (2.11.25), which would be ns nnh equations of motion, but the number of
degrees of freedom would still be ns since the non-holonomic constraints do not
reduce the number of independent coordinates. Thus, we can eliminate the constraint
forces for these non-holonomic constraints from the equations of motion but we still
need nnh additional equations to solve for the ns independent generalized
152 2 Dynamics of a Particle
coordinates. If the non-holonomic equations are of the form of Eqs. (2.11.2a) and
(2.11.2b), for example, then we can solve the ns nnh embedded equations of
Eq. (2.11.25) in conjunction with the nnh non-holonomic constraints for the velocity
written in the form shown in Eq. (2.11.23) as
_ _
€in ¼ Q in
M in q
ð2:11:28Þ
q_ ¼ Bin q_ in þ e
x2 þ y2 l2 ¼ 0 ð2:11:30Þ
The augmented approach is a direct approach for obtaining both the equations of
motion and the constraint forces. The two major limitations of the formulation of this
approach as we have presented it so far are that (1) the inverse, (AM1AT)1, must
exist and (2) the constraint equations and their first derivatives may “drift” during the
numerical calculations, leading to violation of those constraints. In the next chapter
when we examine systems of particles we will discuss how to implement the
augmented approach when this inverse does not exist. Here we will only examine
the constraint violation issue.
154 2 Dynamics of a Particle
f ðq; t Þ ¼ 0
f_ q; q;_ t ¼ Aq_ bq ¼ 0 ð2:12:1Þ
€f q; q;_ q€; t ¼ A€
q bv ¼ 0
bq ¼ f t
h i ð2:12:2Þ
bv ¼ b ¼ Aq_ q q_ þ 2At q_ þ f tt
so that if we are going to maintain the constraints and their first derivatives at time
t+Δt to first order we must have
q ¼ bv f_ =Δt
A€ ð2:12:4bÞ
Consider first the equation in Eq. (2.12.4b) involving accelerations. This equation
is a modification of the ideal constraint equation in the absence of numerical errors,
with a correction term, f_ =Δt, that accounts for errors in satisfaction of the first
derivative of the original constraint equation over the time step Δt. If this corrected
constraint equation generates an ideal constraint force ATλ then we arrive at the
augmented system of equations:
2.12 The Augmented Approach and Constraint Satisfaction 155
€ ¼ M1 Q
q e þ M1 AT λ
ð2:12:5Þ
A€ _
q ¼ bv f=Δt
which can be solved as before for the Lagrange multiplier, constraint force, and
equations of motion, as demonstrated previously:
1
λ ¼ AM1 AT bv AM1 Q e f=Δt
_
1
Qc ¼ AT AM1 AT bv AM1 Q e f_ =Δt ð2:12:6Þ
e þ M1 AT AM1 AT 1 bv AM1 Q
€ ¼ M1 Q
q e f=Δt
_
Thus, we have taken into account, to first order, any loss of satisfaction of the first
derivative of the constraint equation f_ ¼ 0. To include the constraint equation itself
in the solution process we write the equations of motion in first-order form as
q_ ¼ v
ð2:12:7Þ
e þ M1 AT AM1 AT 1 bv AM1 Q
v_ ¼ M1 Q e f=Δt
_
We can consider Eq. (2.12.4a) as a constraint on the solution for the generalized
_ in Eq. (2.12.7) that accounts for errors in satisfaction of the constraint
velocities, q,
equation. To include this constraint we can multiply this constraint by a Lagrange
multiplier vector, μ, and place it in the equations of motion for q_ (in the same form as
done with λ and the equations for q €), to obtain
q_ ¼ v þ M1 AT μ
ð2:12:8Þ
Aq_ ¼ bq f=Δt
By substituting the expression for q_ into the constraint equation in Eq. (2.12.8)
and taking the inverse of AM1AT we can solve for μ as
1
μ ¼ AM1 AT bq Av f=Δt ð2:12:9Þ
This can be placed into a somewhat less complex looking and more symmetrical
e to give
form by defining the unconstrained acceleration, a, as a ¼ M1 Q
156 2 Dynamics of a Particle
1
q_ ¼ v þ M1 AT AM1 AT bq Av f=Δt
1 ð2:12:11Þ
v_ ¼ a þ M1 AT AM1 AT bv Aa f_ =Δt
M_v ¼ Q
q_ ¼ M 2 1 IQ
v_ ¼ M 2 1 Q
and the terms added to ensure constraint satisfaction have these forms. However,
these are not real forces or impulses as they are present only to account for the
imperfect conditions present when we solve the equations of motion numerically that
cause the constraints to be violated. Unfortunately, one cannot use Eq. (2.12.11)
directly with solvers such as ode45 since that solver has a variable time step size that
is adjusted during the integration to meet the error tolerances and the Δt used in the
solver is not available. One could write a special solver to include these Δt with a
variable step size or one can use a solver that has a fixed time step size. A
MATLAB® function, ode4, is available that implements a fourth-order Runge-
Kutta method with a fixed step size. This function, like ode45, solves the system
of first-order differential equations x_ ¼ f x; x_ ; t and is called in a very similar
fashion:
where ode_function(t, x, p1, p2, . . ., pn) is a function written for the first-order
system in the same form required by ode45, tspan ¼ [t1, t2, . . ., tn] is a vector of
given times (spaced equally apart by the time step, Δt) at which the solution is to be
obtained, x0 is a vector containing the initial conditions, and p1, p2, . . ., pn are any
additional input parameters needed, if any, when calling the function ode_function.
Note that tspan here specifies all the times at which the calculations are to be
performed by ode4 whereas in using ode45 the actual times at which the solution
2.12 The Augmented Approach and Constraint Satisfaction 157
is found are determined by the ode45 algorithm itself and ode45 then interpolates
those results to obtain the values specified in tspan when it contains a vector of given
times. The output matrix, xout, contains the solution for the vector x at the times
given in tspan, with the components of x written in the columns of xout, which is
identical to the form used by ode45. Unlike ode45, there are no options like error
tolerances or events available when using ode4. Solvers with a variable time step are
generally more versatile than fixed step size solvers since the use of a variable step
size that adjusts to the rate at which the system solution is changing is generally
computationally more efficient. However, fixed step size solvers can also be effec-
tive in many problems.
M€x ¼ Fe þ Fc ð2:12:12Þ
or
( c)
m 0 €x 0 Fx
¼ þ ð2:12:13Þ
0 m €y mg F c
y
where M is the mass matrix and (Fe, Fc) are the external and constraint forces,
respectively. The constraint equation is simply
f ðx; yÞ ¼ x2 þ y2 L2 ¼ 0 ð2:12:14aÞ
and
m
y
158 2 Dynamics of a Particle
€f ¼ 2x€x þ 2y€y þ 2 x_ 2 þ y_ 2 ¼ 0 ð2:12:14cÞ
A ¼ ½2x 2y
bq ¼ 0 ð2:12:15Þ
bv ¼ 2 x_ 2 þ y_ 2
In thefirst-order
system of Eq. (2.12.11) we have the system coordinates x ¼
_ y_ which we will write as x ¼ (x1, x2, x3, x4). To evaluate the system
ðq; vÞ ¼ x; y; x;
the terms we need are very simple to evaluate:
( )
2x=m 1
1
M A ¼ T
, AM1 AT ¼ m=4L2
2y=m
( ) ð2:12:16Þ
0
a ¼ Fe =m ¼
g
yielding
x1
x_ 1 ¼ x3 þ 2
2ðx1 x3 þ x2 x4 Þ x21 þ x22 L2 =Δt
2L
x2
x_ 2 ¼ x4 þ 2 2ðx1 x3 þ x2 x4 Þ x21 þ x22 L2 =Δt
2L ð2:12:17Þ
x1
x_ 3 ¼ 2 2 x23 þ x24 2x2 g 2ðx1 x3 þ x2 x4 Þ=Δt
2L
x2
x_ 4 ¼ g þ 2 2 x23 þ x24 2x2 g 2ðx1 x3 þ x2 x4 Þ=Δt
2L
This gives us the first-order system of equations we can use with ode4. However,
we will also want to examine the equations of motion without constraint satisfaction
corrections. We can do this by simply omitting the additional constraint terms via a
parameter, e, where e ¼ 0 for no constraint corrections and e ¼ 1 with corrections:
ex1
x_ 1 ¼ x3 þ 2
2ðx1 x3 þ x2 x4 Þ x21 þ x22 L2 =Δt
2L
ex2
x_ 2 ¼ x4 þ 2 2ðx1 x3 þ x2 x4 Þ x21 þ x22 L2 =Δt
2L ð2:12:18Þ
x1 2
x_ 3 ¼ 2 2 x3 þ x24 2x2 g 2eðx1 x3 þ x2 x4 Þ=Δt
2L
x2
x_ 4 ¼ g þ 2 2 x23 þ x24 2x2 g 2eðx1 x3 þ x2 x4 Þ=Δt
2L
where g is the acceleration of gravity, L is the length of the pendulum, dt is the time
step size, and e is the parameter controlling if constraint satisfaction is present
or not. The script pendulum_cs_sim gives default values of these parameters as
g ¼ 9.81 m/s2, L ¼ 1 m, tspan ¼ 0:0.001:900 s, x0 ¼ [L, 0, 0, 0], and e ¼ 0
(no constraint satisfaction). The default dt value is thus dt ¼ 0.001 s. As usual, these
defaults can be changed by the user in the command window before executing the
script. With this choice of parameters we are releasing the pendulum at rest in a
horizontal position and then solving for its motion over a very long time span of
about 15 min, which corresponds to 900,000 time steps. The script uses ode4 in
conjunction with pendulum_cs_eqs to solve for the pendulum motion. The value of
the constraint and its first derivative are then plotted along with the total energy
divided by the mass m. These plots are shown in Fig. 2.56. Figure 2.56a, b shows
×10– 4 ×10 –3
5 2
4
3 1
2
0
1
f 0 f -1
-1
-2 -2
-3
-3
-4
-5 -4
0 100 300 500 700 900 0 100 300 500 700 900
t, sec t, sec
(a) (b)
0.12
0.1
0.08
E/m 0.06
0.04
0.02
0
-0.02
0 100 300 500 700 900
t, sec
(c)
Fig. 2.56 Solution for the pendulum motion without satisfaction of constraints. (a) The value of the
constraint function versus time, and (b) the corresponding derivative of the constraint function
versus time. (c) The total energy divided by the mass as a function of time
160 2 Dynamics of a Particle
that the constraint function and its derivative remain small until about t ¼ 750 s when
the oscillations of their values start to grow exponentially (the oscillations are very
closely spaced and so appear as a solid-filled figure). In fact if the simulation is
continued after t ¼ 900 s the numerical solution quickly fails. This can also be seen
in the behavior of the total energy in Fig. 2.56c which remains nearly a constant
(zero) until about t ¼ 750 s when it also begins to grow exponentially. If the value of
e is changed to e ¼ 1 so that constraint satisfaction is present, the results are shown in
Fig. 2.57 (the plotting limits on the vertical axis were changed in all the plots shown).
As Fig. 2.57a, b shows, the constraint and its derivative are both well satisfied over
the full time span. Typically the values seen in Fig. 2.57a, b are on the order of 106.
Note that the vertical scales in Fig. 2.57a, b are smaller than those in Fig. 2.56a, b and
are not the scales seen when executing the script. The total energy, as seen in
Fig. 2.57c, now remains nearly constant. If you examine the total energy on the
×10–5 ×10–5
5 5
4 4
3 3
2 2
1 1
f 0 f 0
-1 -1
-2 -2
-3 -3
-4 -4
-5 -5
0 100 300 500 700 900 0 100 300 500 700 900
t, sec t, sec
(a) (b)
0.12
0.1
0.08
E/m
0.06
0.04
0.02
0
-0.02
0 100 300 500 700 900
t, sec
(c)
Fig. 2.57 Solution for the pendulum motion with first-order satisfaction of the constraint and its
first derivative. (a) The value of the constraint function versus time, and (b) the corresponding
derivative of the constraint function versus time. (c) The total energy divided by the mass as a
function of time
2.13 Problems 161
default vertical scale you will see that while it has a roughly linearly increasing
growth it remains very small (on the order of 105) over this long time interval.
Since the constraint errors were small and the energy nearly a constant when we used
constraint satisfaction, how accurate were the solutions we obtained for such long
time spans with ode4 and a fixed time step of 0.001 s? To answer that question we
solved the same problem with ode45 using very small relative and absolute error
tolerances of both 1e-12 and compared the results to that obtained with ode4 (with
constraint correction) at t ¼ 700 s, which was before any significant constraint errors
were seen. The ode4 solution with the 0.001 s step size gave x ¼ 0.9036 m and
y ¼ 0.4283 m while ode45 gave x ¼ 0.9058 m and y ¼ 0.4237 m, corresponding to
differences of less than 0.3% and 1.1%, respectively. Thus, if we treat the ode45
solution as the “trusted solution” we can say that the ode4 solutions were reasonably
accurate for this time step size even for these very long times.
This method for eliminating constraint drift is effective and relatively simple but
other methods may be preferred depending on requirements such as the need for
speed or accuracy in a particular application. However, this is no different than other
choices one must make in solving dynamics problems numerically such as the choice
of an ODE solver, for example. In this book we have tried to illustrate some of the
fundamental issues involved in numerical solutions but we will also be forced to
omit some of the important details and alternatives that can only be filled in with
higher level and more specialized texts and courses.
2.13 Problems
P2.1. A weight is supported by three cables, as shown in Fig. P2.1. The tensions in
the cables can be obtained by solving the force equilibrium equations
A (4,-3,6)
C (0,5,0)
O
y
W = 3000 lb
x
162 2 Dynamics of a Particle
P
F¼0
ðP2:1Þ
T A eA þ T B eB þ T C eC Wez ¼ 0
where (TA, TB, TC) are the tensions along the wires (OA, OB, OC), respec-
tively, and (eA, eB, eC) are unit vectors along those same wires. The weight
W ¼ 3000 lb and the unit vector ez are along the z-axis. Equation (P2.1)
represents three simultaneous equations for the three unknown tensions.
However, we can solve for the tensions directly without solving simultaneous
equations by replacing the three force equations by three moment equilibrium
equations. For example, let r ¼ eB eC, s ¼ eA eC, and t ¼ eA eB. Take
the cross product of the forces in Eq. (P2.1) with eC and then dot that result
with eb. Show that we obtain the tension TA explicitly as
r Wez
TA ¼
r eA
s Wez t Wez
TB ¼ , TC ¼
s eB t eC
Solve these equations for the tensions and show that the solution agrees with
the solution of the simultaneous equations of Eq. (P2.1).
P2.2. The equations of motion for the projectile without drag problem were given as
two second-order differential equations in Eq. (2.2.6). Although we can obtain
an analytical solution to these equations, write these equations of motion as a
system
four first-order differential equations for the four variables
of
_ y; y_ and solve that first-order system using the MATLAB® ode45
x; x;
solver. Choosing a particular set of initial conditions, verify your numerical
solution agrees with the analytical solution given by Eq. (2.2.8).
P2.3. A bead of mass m ¼ 1 kg slides on a smooth parabolic wire given by the
equation y ¼ ax2 and is connected to a linear spring whose other end is
attached at the fixed point O as shown in Fig. P2.2. The spring constant
k ¼ 10 N/m. The unstretched length of the spring is L0 ¼ d ¼ 2m and the
constant a ¼ 0.5 1/m. The bead starts at the bottom of the wire with a velocity
to the right vx ¼ x_ ¼ 5 m/s. Since this is a conservative system the total
energy, T+V, of the system is conserved. Write expressions for T(x) and V(x)
and use the conservation of energy to determine the maximum height reached
by the bead.
P2.4. Set up and solve numerically the bead sliding on a smooth, straight wire as
considered in Simulation 2.2 but treat it as a one degreeof freedom
problem
where we define a first-order system of equations for x; x_ and solve that
2.13 Problems 163
d m
y = ax 2
system with ode45, using the same input parameters as used to generate
Fig. 2.10a. Verify you obtain the same solution shown in that figure. In this
case we do not have to worry about the constraint or its derivative being
satisfied since that constraint and its derivative are used to generate the y; y_
values for the motion.
P2.5. Solve the system of equations in Eq. (2.3.23) for the bead sliding on the
parabolic wire problem either by hand or with the use of the symbolic math
toolbox. Verify you obtain the same solution given in Eq. (2.3.25).
P2.6. Set up and solve numerically the bead sliding on the smooth parabolic wire
problem
in Simulation 2.3 as a system of four first-order equations for
_ y; y_
x; x; using the same input parameters used in the script
bead_on_p_wire_sim. Examine how well the constraint and its derivative
are satisfied, using the default tolerances for rtol, atol. Examine the effect
that a smaller rtol value has on the satisfaction of the constraint and its
derivative.
P2.7. Set up and solve numerically the bead sliding on the smooth parabolic wire
problem of Simulation 2.3 by using the augmentation approach of Sect. 2.4.3
where we obtain explicit expressions for the mass matrix, M; the constraint
matrix, A; the vector, b; and the external force, Fe, and then use those directly
to form up the equations of motion, as seen in Eq. (2.4.41), where all the
needed terms are obtained through numerical matrix-vector operations in
MATLAB®.
P2.8. Set up and solve numerically the bead sliding on a parabolic wire where the
bead is connected to a linear spring, as considered
in Problem P2.3. Use a
system of two first-order equations for x; x_ and the same initial conditions of
Problem P2.3 to obtain the x-displacement of the bead and the normalized
normal force versus time. Show that the total energy of the system is con-
served during the motion. Verify that the maximum height of the bead is the
same as predicted by the conservation of energy.
P2.9. Modify Problem P2.6 by including a viscous-like damping force of the type
given by Eq. (2.3.29). Again, numerically solve this problem for the x- and y-
displacements of the bead versus time and for the normalized normal force.
Take c/m ¼ 0.5 (1/s) and compare your results to Simulation 2.4.
164 2 Dynamics of a Particle
P2.10. In this chapter we have only considered ideal constraint forces acting on a
single particle, but we will see that such ideal constraint forces appear when
considering forces acting between multiple particles as well. We will exam-
ine such cases in detail in the following chapter. As a simple introduction to
such cases, consider the two blocks shown in Fig. P2.3. (a) Determine the
equations of motion for each of the two interconnected blocks by drawing
free body diagrams of the two blocks and then applying Newton’s second
law for each block along the x1- and x2-directions, respectively. What
constraint does the inextensible string impose on (1) the positions, (2) the
velocities, and (3) the accelerations of the two blocks? Using the relationship
between the accelerations of the blocks, solve for the tension, T, in the string.
(b) Now use an augmented approach for the system of two particles, where
from Eq. (2.4.41) we have
1
Fc ¼ AT AM1 AT b AM1 Fe
1 ðP2:2Þ
x ¼ M1 Fe þ M1 AT AM1 AT
€ b AM1 Fe
m1 0
In this case x ¼ [x1 x2] , M ¼
T
, and the force of constraint is
0 m2
F ¼ A λ, where λ is a Lagrange multiplier. Determine the corresponding Fe,
c T
A,b for this problem, noting that there is only one constraint between the two
particles, and solve for the accelerations and constraint force from
Eq. (P2.2), showing that your results agree with part (a). What is the physical
meaning of the Lagrange multiplier, λ, in this problem?
P2.11. Examine the spring-pendulum problem of Sect. 2.5.2 for small, moderate,
and large values of mu, demonstrating the transition from regular to chaotic
and back to regular behavior.
P2.12. Consider the problem shown in Fig. P2.4 where a bead slides on a smooth
parabolic wire that is rotating at a constant angular velocity, Ω, about the y-
axis. Determine the equations of motion (a) using explicit embedding of the
constraint and the cm vectors to obtain Eqs. (2.6.29a) and (2.6.29b), and
(b) using explicit embedding of the constraint in Lagrange’s equations (note
that you can do the embedding by inspection so that you do not have to
2.13 Problems 165
follow the general embedding approach outlined in Sect. 2.11). Obtain the
Jacobi integral for this problem. What are the equilibrium positions for the
bead in this problem? Numerically solve the equations of motion using the
same parameters given in Problem P2.3 and for different angular velocities.
At what value of the angular velocity does the x ¼ y ¼ 0 equilibrium position
become unstable?
P2.13. Obtain phase plots for the problem of a particle sliding on a rotating hoop
(considered in Sect. 2.7) by using the Jacobi integral, h, and the MATLAB®
contour function for two cases: Ω ¼ 2 rad/s and Ω ¼ 7 rad/s. Use the same
limits for θ; θ_ used in Fig. 2.44 and the same parameters as used in
Simulation 2.7. Identify the stable and unstable equilibrium points on the
phase plots.
P2.14. Consider the spherical pendulum shown in Fig. P2.5 in spherical coordinates
where the θ angle is taken with respect to the negative z-axis as shown. Show
that the kinetic energy and the potential energy are given for the pendulum as
m 2 _ 2
T¼ R θ þ R2 ϕ_ 2 sin 2 θ
2 ðP2:3Þ
V ¼ mgR cos θ
Also show that since the angle ϕ is missing from the Lagrangian, L ¼ T – V,
that coordinate is an ignorable coordinate and the generalized momentum,
pϕ, given by pϕ ¼ mR2 ϕ_ sin 2 θ, is a constant. Show that the equations for the
spherical pendulum therefore can be written as
ϕ_ ¼ pϕ =mR2 sin 2 θ
ðP2:4Þ
€θ ¼ ϕ_ 2 sin θ cos θ g sin θ=R
φ R
x
θ
m 2_2
E¼ R θ þ V eff ðθÞ ðP2:5Þ
2
where
p2ϕ
V eff ðθÞ ¼ mgR cos θ ðP2:6Þ
2mR2 sin 2 θ
20
0
0 0.5 1 1.5 2 2.5 3
θ, rad
z = b r2
O y
r
d
k
θ
x
y_ z x_ ¼ 0 ðP2:7Þ
First, use an augmented approach and show that the equations of motion for
this problem are given as
z x_ z_
€x ¼
1 þ z2
x_ z_ ðP2:8Þ
€y ¼
1 þ z2
€z ¼ 0
y_ cz_ ¼ 0 ðP2:9Þ
P2.20. The bead sliding on a straight, smooth wire considered in Sect. 2.3.1 was
initially modeled as the set of differential algebraic equations (DAEs) given
in Eq. (2.3.6). Explore the solution of these equations using a DAE solver,
and compare with the solution to the problem considered in Simulation 2.2.
There are some MATLAB® DAE solvers available as well as others that you
can find online.
References
In Chap. 2 we used the motion of a single particle to discuss a wide range of topics
including force versus moment equations, potential energy, work-energy concepts,
constraint forces, generalized coordinates, Lagrange’s equations, and others. In this
chapter we consider those topics and others for the case where a system of multiple,
interacting particles is moving under the action of a set of forces.
A system of particles is shown in Fig. 3.1a. As in the single-particle case we can have
a total applied force, Fia , acting on the ith particle, where the applied force may be a
combination of known external forces and externally applied constraint forces, i.e.,
Fia ¼ Fie þ Fic . But a system of particles may also have internal forces which are
forces of interaction between particles, such as the force Fij that particle j exerts on
particle i, and the force Fji that particle i exerts on particle j (Fig. 3.1a). Newton
formulated a third law to deal with these internal forces (see Fig. 3.1b, where
xij ¼ xj xi):
Newton’s Third Law: The mutual forces of interaction between any two
particles are equal in magnitude and opposite in direction (i.e., Fji ¼ Fij)
and they act along the line between those two particles (i.e., Fij ¼ Fijxij/ |xij|,
Fji ¼ Fjixji/ |xji| ¼ Fjixij/ |xij|) so that both forces act along xij (Fig. 3.1b).
This law is often given more succinctly in an alternate version as follows: For
every action (of one body on another) there is an equal and opposite reaction.
Our original statement of the third law is sometimes called the “strong” version,
since it restricts both the forces to be equal and opposite and to lie along the line
separating the two particles. The alternate version given above is called the “weak”
version since it simply requires the forces to be equal and opposite. Although there
Fia
mi
mi
Fij
Fij
F ji
xi mj xij −Fij
mj
xj F ja
O
(a) (b)
Fig. 3.1 (a) A system of particles acted upon by external and internal forces, and (b) a pair of
particles showing the equal and opposite internal forces
mi mi
lij cij
xi kij mj xi mj
xj xj
(a) (b)
Fig. 3.2 (a) A pair of particles connected by a linear spring, and (b) the particles connected by a
rigid rod (of negligible mass)
are electromagnetic force interactions that violate the strong version of this “law,” all
the examples of internal forces seen in this book will satisfy the strong version.
For example, consider two particles mi and mj that are connected to a linear spring
with spring constant kij and unstretched length l0ij (Fig. 3.2a). From Chap. 2 we know
that the spring force is derivable from a potential energy, Vij, where
1 h i2
V ij ¼ k ij x j xi l0ij ð3:1:1Þ
2
where we will let xj ¼ (xj;1, xj;2, xj;3) and xi ¼ (xi;1, xi;2, xi;3). Then the kth component
(k ¼ 1, 2, 3) of the force that mass j exerts on mass i through the spring, Fij;k, is
∂V ij h ix x
¼ k ij x j xi l0ij
j;k i;k
Fij;k ¼ ð3:1:2aÞ
∂xi;k x j xi
3.1 Internal Forces 173
and the kth component of the force that mass i exerts on mass j through the spring,
Fji;k, is
∂V ij h ix x
¼ kij x j xi l0ij
i;k j;k
F ji;k ¼ ð3:1:2bÞ
∂x j;k x j xi
and obviously Fji;k¼ Fij;k and we have from Eqs. (3.1.2a) and (3.1.2b)
h ix x h ix
j i ij
Fij ¼ k ij lij l0ij ¼ k ij lij l0ij
lij lij
h ix x h ix ð3:1:3Þ
i j ji
F ji ¼ k ij lij l0ij ¼ k ij lij l0ij
lij lij
(see Fig. 3.1b) where lij ¼ |xj xi| ¼ |xij| is the stretched length of the spring. Thus,
both internal forces are also directed along the line between the two masses as
specified by Newton’s third law. It is interesting to note that any set of internal forces
between a pair of masses i and j that are derivable from a potential that only depends
on the distance between those particles, i.e.,
V ij ¼ V ij xi x j ð3:1:4Þ
will, upon differentiation, produce forces that automatically satisfy Newton’s third
law. The mutual forces of gravitation attraction between two masses that we
discussed in Chap. 2 is an example of forces which come from a potential of the
form given in Eq. (3.1.4) and so they also satisfy Newton’s third law.
Internal forces may or may not be ideal constraint forces. Internal spring forces
(Fig. 3.2a), for example, are not forces of constraint since the spring does not make
the attached particles follow a specified path but rather the spring controls the force
between particles as a function of whatever path the particles take.
One of the most important cases of an internal force that is an ideal constraint
force is shown in Fig. 3.2b where the two particles are separated by a thin, massless
rigid rod so that the distance between the particles remains fixed, i.e., we have the
constraint
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
2 2 2
x j xi cij ¼ x j;1 xi;1 þ x j;2 xi;2 þ x j;3 xi;3 cij ¼ 0 ð3:1:5Þ
which, as we saw in the last chapter, will generate an ideal constraint forces acting on
particles i and j with components given by
174 3 Dynamics of a System of Particles
(3)
(3)
(a) (b)
Fig. 3.3 (a) Particles moving in two dimensions connected by weightless rigid rods. Each particle
has two degrees of freedom and each rod acts as a single constraint. Thus the number of degrees of
freedom, ndof, are (1) ndof ¼ 2(2) 1 ¼ 3, (2) ndof ¼ 3(2) 3 ¼ 3, and (3) ndof ¼ 4(2) 5 ¼ 3. (b)
Particles moving in 3-D connected by weightless rigid rods. Each particle has three degrees of
freedom and each rod acts as a single constraint. Thus, the number of degrees of freedom are
(1) ndof ¼ 2(3) 1 ¼ 5, (2) ndof ¼ 3(3) 3 ¼ 6, and (3) ndof ¼ 4(3) 6 ¼ 6
∂f ij λij xi;k x j;k
F ij;k ¼ λij ¼
∂xi;k x j xi
ð3:1:7Þ
∂f ij λij x j;k xi;k
F ji;k ¼ λij ¼ ¼ F ji;k
∂x j;k x j xi
Like the spring forces, these constraint forces satisfy Newton’s third law.
If two masses connected by a rigid rod (see Fig. 3.3a, case (1)) are moving only in
two dimensions, then this system has three degrees of freedom. In fact, any number
of particles moving in 2-D with rigid connections between all particles also have
only three degrees of freedom as shown in Fig. 3.3a for cases of up to four particles.
For particles moving in three dimensions (Fig. 3.3b), as long as there are three or
more rigidly connected particles there will always be only six degrees of freedom.
[The case of two rigidly connected particles moving in three dimensions is different
because this system has no mass distributed off the axis connecting those particles so
the system has no angular momentum about that axis. Thus, the system is always in
moment equilibrium about that axis. This eliminates any possibility of having
rotational motion about that axis for the system and reduces the number of degrees
of freedom by one.] A lattice of rigidly connected particles is a simple example of a
“rigid system” or “rigid body.” In Chap. 5, where we will consider rigid bodies with
continuously distributed masses, it will also be true that those rigid bodies moving in
two or three dimensions will have at most only three degrees of freedom and six
degrees of freedom, respectively.
The limited number of degrees of freedom for even a large number of rigidly
constrained particles means that the motion of a rigid system can be characterized in
terms of only a few geometrical variables. Consider the rigid system of Fig. 3.4a, for
3.1 Internal Forces 175
θz C
time t0 C C
time t B
C B
C C
A A B A θz B
translation + rotation
A B A B
(a) (b)
Fig. 3.4 (a) The 2-D motion of a rigidly connected system of particles from time t0 to a later time t,
and (b) the decomposition of that motion into (1) a translation of the system, where every particle
follows the same path as a reference particle, such as A, for example, and (2) a rotation about the
where every line in the rigid system experiences
z-axis (in this case shown as a rotation θz about A)
the same rotation as shown for lines A B~ ! A B and A
C~ ! A
C
example, which is a rigid system of three particles moving in two dimensions and
has three degrees of freedom. Figure 3.4a shows the configuration of the system at
two times (t0, t). We can take as those degrees of freedom: (1) the motion of any one
of the particles, such as the one at point A, described by its coordinates (xA(t), yA(t))
relative to a fixed origin, O, and (2) a rotation about that point, θz(t). Physically, this
means that any motion of a rigid system of particles can be decomposed into a
translation and a rotation, as shown in Fig. 3.4b. Suppose, for example we let all the
particles have the same motion as point A. Then the system moves as shown in
Fig. 3.4b to a configuration where point A is in its correct final position and the lines
connecting the particles are all unchanged in their lengths and orientations. This is a
translational motion. We can, however, after the translation rotate all the lines
between particles in the system about point A through an angle θz, as shown in
Fig. 3.4b, to also bring points B and C into their correct final positions. This is
possible since in a rigidly constrained system of particles the angles between lines
connecting the particles must remain fixed (in Fig. 3.4, for example, the angles inside
the triangle ABC are all fixed) so that the rotation experienced by any one line is
experienced by all the lines. A rotation about a given point also does not change the
length of the lines connecting that point to all the other points so that the rigid
constraints of the system remain intact. In three dimensions a similar decomposition
of the motion of a rigid system into a translation and rotation can be made, but the
motion of the reference point A used to define the translation has three components
(xA, yA, zA) and we can rotate the lines in the body about all three axes (θx, θy, θz) to
produce the six degrees of freedom needed to describe the motion of the system.
176 3 Dynamics of a System of Particles
If we have a system of N particles with forces on them as shown in Fig. 3.5 then for
each particle we have from the Newton-Euler equations
X
mi €
xi ¼ Fia þ Fij ði ¼ 1; . . . ; N Þ
j6¼i
X ð3:2:1Þ
xBi mi €xi ¼ xBi Fia þ xBi Fij ði ¼ 1; . . . ; N Þ
j6¼i
where Fia is the net external and constraint force acting on mass mi and xBi is the
position vector of mi with respect to point B, which we will now let be either a
stationary or a moving point. We can use at most N of these equations but, as in the
single-particle case, we could obtain those N equations from combinations of the
force and moment equations if that makes the generation of the equations of motion
easier. In the sum over the internal forces the case j ¼ i must be excluded since
Fii ¼ 0, i.e., a mass does not exert a force on itself. In general if there are N particles
moving in 3-D and nh independent holonomic internal and/or external constraints,
the number of degrees of freedom will be ndof ¼ 3N nh. This is the smallest
number of equations of motion we will have to solve. In two-dimensional motion we
would have ndof ¼ 2N nh instead.
Rather than treating a system of particles separately for each particle it is useful to
also consider the Newton-Euler laws for the entire system of particles. Let’s examine
the force equations first. If we sum up Newton’s second law equations for the entire
system we have
O
3.2 Newton-Euler Laws for a System of Particles 177
X
N X
N XX
mi €xi ¼ Fia þ Fij ð3:2:2Þ
i¼1 i¼1 i j6¼i
The sums over all the internal forces need to be made more explicit. These sums
can be written as
XX X
N X
N X
N X
N
Fij ¼ Fij þ F ji ð3:2:3Þ
i j6¼i i¼1 j¼iþ1 i¼1 j¼iþ1
You can verify this form by looking at a simple case such as N ¼ 3. If you carry
out all the sums you will see you obtain all the values of the 3 3 internal force
matrix Fij except the diagonal terms, Fii, which are zero anyway. However, from
Newton’s third law Fji ¼ Fij so that
XX N X
X N N X
X N
Fi j ¼ Fi j þ Fi j ¼ 0 ð3:2:4Þ
i j6¼i i¼1 j¼iþ1 i¼1 j¼iþ1
X
N
mi €xi ¼ Fsys ð3:2:5Þ
i¼1
where Fsys is the total sum of all the external applied and constraint forces acting on
the entire system. On the left side of Eq. (3.2.5) we see a weighted sum of the
accelerations of the particles. Consider the same weighted sum of the position
vectors of the particles, and define a point, xC called the center of mass of the system
of particles, as
X
N
mxC ¼ m i xi
i¼1
ð3:2:6Þ
X
N
m¼ mi
i¼1
where m is the total mass of the system. It then follows that the velocity and
acceleration of this center of mass point are given by
1X N
vC ¼ x_C ¼ mi x_ i
m i¼1
ð3:2:7Þ
1X N
aC ¼ x€C ¼ mi €
xi
m i¼1
178 3 Dynamics of a System of Particles
so that the entire system of particles acts like a single particle of mass m at the center
of mass, where the motion of this single particle is determined by the total external
forces acting on the system. If we define the linear momentum of this single particle,
pC, as
X
N X
N
pC ¼ mvC ¼ mi x_ i ¼ pi ð3:2:9Þ
i¼1 i¼1
dpC
¼ Fsys ð3:2:10Þ
dt
ðt2
ΔpC ¼ pC ðt 2 Þ pC ðt 1 Þ ¼ Fsys ðt Þdt ð3:2:11Þ
t1
where ΔpC is the change of the linear momentum of the system and the integral of
the force is called the impulse (or linear impulse) of that force. Thus, we see if the net
external force acting on a system of particles is zero (or if the impulse of those
external forces is zero) the linear momentum of the system remains unchanged. This
is a statement of the principle of conservation of linear momentum for a system of
particles. In general this principle applies only to the behavior of the entire system,
but in some cases it can also give us information about the individual particles. For
example, suppose we have a mass, m1, at rest hanging vertically from a string under
its own weight that is struck by a projectile of mass, m2, that is moving horizontally
with a velocity, vin, as shown in Fig. 3.6a. If the projectile imbeds itself into the
hanging mass, we can determine the common velocity, vout, immediately after the
collision (Fig. 3.6b) since there is no external horizontal force acting on the system
of two particles during the collision, only the internal forces acting between them
(the tension in the string and the weight of the hanging mass both act in the vertical
direction so do not enter into the x-momentum calculations). Thus, the net external
impulse on the system in the x-direction is zero and the x-components of the
momenta satisfy the conservation law:
3.2 Newton-Euler Laws for a System of Particles 179
Now, consider the moment equation for each particle in Eq. (3.2.1) and sum over all
the particles in the entire system:
X
N X
N X
N X
xBi mi €xi ¼ xBi Fia þ xBi Fij ð3:2:13Þ
i¼1 i¼1 i¼1 j6¼i
We will let B be a general moving point and let C be the center of mass of the
system (Fig. 3.7). Keeping the motion of B general will make our analysis a bit more
involved but it will allow us to make some important choices for B later. First,
consider the sum over the moments of the internal forces. As with the force equation
we can write this term more explicitly and we obtain
N X
X N X
X N N X
X N
xBi Fi j ¼ xBi Fi j þ xBj F ji
i¼1 j6¼i i¼1 j¼iþ1 i¼1 j¼iþ1
N X
X N
¼ xBi xBj Fi j
i¼1 j¼iþ1
N X
X N
¼ x ji Fi j ¼ 0
i¼1 j¼iþ1
where from Newton’s third law we have used the fact that Fji ¼ Fij and that
xji ¼ xBi xBj (Fig. 3.7) is parallel to Fij. Thus, the internal moment contributions to
Eq. (3.2.13) cancel and we find
180 3 Dynamics of a System of Particles
X
N
xBi mi €xi ¼ MBsys ð3:2:14Þ
i¼1
where MBsys is the moment about point B of all the externally applied forces,
including forces of constraint, acting on the system. We can write this moment in
terms of the acceleration of the center of mass of the system in the form
X
N X
N
MBsys ¼ xBi mi €xi ¼ xC=B þ ρi mi €xi
i¼1 i¼1
ð3:2:15Þ
X
N
¼ mxC=B aC þ ρi mi €xi
i¼1
where xC/B is the position vector of C with respect to point B (see Fig. 3.7) and we
obtained the first term in Eq. (3.2.15) by writing it in terms of the acceleration of the
center of mass, aC as defined in Eq. (3.2.7). For the second term in Eq. (3.2.15) since
from the geometry xi ¼ xC + ρi (Fig. 3.7), differentiation on time of this expression
yields
xi ¼ xC þ ρi
x_ i ¼ vC þ ρ_ i ð3:2:16Þ
€xi ¼ aC þ ρ€i
and, using the expression for the acceleration, Eq. (3.2.15) becomes
X
N
MBsys ¼ mxC=B aC þ €i
ρi mi aC þ ρ
i¼1
ð3:2:17Þ
X
N X
N
¼ mxC=B aC þ mi ρi aC þ €i
ρi mi ρ
i¼1 i¼1
3.2 Newton-Euler Laws for a System of Particles 181
But because ρi is measured with respect to the center of mass, the weighted sum of
this position vector and its derivatives are zero, i.e.,
X
N
mi ρi ¼ 0
i¼1
X
N
mi ρ_ i ¼ 0 ð3:2:18Þ
i¼1
X
N
€i ¼ 0
mi ρ
i¼1
X
N
MBsys ¼ mxC=B aC þ €i
ρi mi ρ ð3:2:19Þ
i¼1
Now, consider the angular momentum of the system of particles about point B, LB,
where
X
N
LB ¼ xBi mi x_ i ð3:2:20Þ
i¼1
X
N
LB ¼ xC=B þ ρi mi vC þ ρ_ i
i¼1
X
N X
N X
N
¼ mxC=B vC þ xC=B mi ρ_ i þ m i ρ i vC þ ρi mi ρ_ i ð3:2:21Þ
i¼1 i¼1 i¼1
X
N
¼ mxC=B vC þ ρi mi ρ_ i
i¼1
X
N
L_ B ¼ mvC=B vC þ mxC=B aC þ €i
ρi mi ρ ð3:2:22Þ
i¼1
MBsys ¼ L_ B mvC=B vC
ð3:2:23Þ
¼ L_ B mvC vB
which is the general form of the Newton-Euler equation for the applied moments
acting on a general system of particles for moments taken about a general moving
point B. Two special cases of particular importance are as follows:
1. When point B is a zero velocity point, say, O. Then vB ¼ v0 ¼ 0 and we have
M0sys ¼ L_ 0 ð3:2:24Þ
MCsys ¼ L_ C ð3:2:25Þ
If a point P is either a fixed point or the center of mass the moment equation of
motion for the entire system is the same and can be integrated on time to give an
angular impulse-angular momentum relationship:
ðt2
Δ LP ¼ LP ðt 2 Þ LP ðt 1 Þ ¼ MPsys ðt Þdt ð3:2:26Þ
t1
where the integral of the moment is called the angular impulse. If the net moment on
the system of particles is zero or if the angular impulse is zero, then Δ LP ¼ 0 so that
the angular momentum with respect to point P is a constant, which is a statement of
the principle of conservation of angular momentum.
The linear impulse-linear momentum and angular impulse-angular momentum
relations for the entire system can be used jointly to find the changes in motion in a
system of rigidly constrained particles due to known external impulses since the
number of degrees of freedom is equal to the number of integrated Newton-Euler
equations for the system. For example, consider the two-dimensional problem
shown in Fig. 3.8a where a pair of particles are rigidly connected to each other
and can move on a smooth x–y plane. If a force F(t) acts in the y-direction for a very
short time interval, Δt, on mass m1 and the system is initially at rest, find the
ðt
Δ
velocities of the masses immediately after the impulse R ¼ Fðt Þdt is applied.
0
Here it is convenient to use the center of mass coordinates (xC, yC) and the angle θ as
3.2 Newton-Euler Laws for a System of Particles 183
m2
L2 r2
L1 xC = ( xC , yC ) r1
xC
m1 θ θ
y
R
x
(a) (b)
Fig. 3.8 (a) A pair of particles of masses (m1, m2) that are held together by a thin, weightless rigid
rod and where mass m1 is subjected to an impulse, R(t), acting in the y-direction. (b) The position
vectors of the two masses with respect to the center of mass
our three independent coordinates. It is easy to show that if the total length between
particles is L, then the distances (L1, L2) to the center of mass (Fig. 3.8) are given by
m2 L m1 L
L1 ¼ , L2 ¼ ð3:2:27Þ
m1 þ m2 m1 þ m2
x1 ¼ xC L1 cos θ, y1 ¼ yC L1 sin θ
ð3:2:28Þ
x2 ¼ xC þ L2 cos θ, y2 ¼ yC þ L2 sin θ
ΔðmvC Þ ¼ R ð3:2:30Þ
x_C ¼ 0
ð3:2:31Þ
ðm1 þ m2 Þy_C ¼ R
Δ LC ¼ r1 m1 v1 þ r2 m2 v2 ¼ r1 R ð3:2:32Þ
and
ex ey ez
r1 R ¼ L1 cos θ L1 sin θ 0
ð3:2:35Þ
0 R 0
¼ RL1 cos θez
which gives
RL1 cos θ
θ_ ¼ ð3:2:36Þ
m1 L21 þ m2 L22
R/2
m L/2 L/2 m m m m m
= +
R R
R/2
(a)
R R R/2
v1 =
R v2 = v1 =
2m L 2m 2m
R
m m v2 =
R 2m
R/2 R
θ =
mL
(b) (c)
Fig. 3.9 (a) An impulsive force applied to a pair of rigidly connected masses is equivalent to
applying the impulse at the center of mass and an angular impulsive moment about that center. (b)
The velocities of the masses when the impulse is applied at the center of mass, resulting in no
angular motion, and (c) the velocities of the masses resulting from the angular motion generated
when the angular impulsive moment is applied
R
v1 ¼ ey
m
v2 ¼ 0 ð3:2:38Þ
R
θ_ ¼
mL
We can interpret this result as follows. As Fig. 3.9a shows applying the impulse to
the left end of the rigidly connected masses is equivalent to applying the impulse at
the center of mass plus applying an impulsive moment about the center of mass.
[By “equivalent” we mean that the system on the left side in Fig. 3.9a has the same
force and moment (and hence the same impulse and angular impulse) as the sum of
the two systems on the right side of Fig. 3.9a. This is the same definition of
equivalence as used in statics to equate two different systems of forces and couples.]
If the impulse was applied to the center of mass, there would be no angular impulse
about the center of mass so we would have θ_ ¼ 0 and x_ C ¼ 0, y_ C ¼ R=2m. From
Eq. (3.2.29) we would find v1 ¼ v2 ¼ (R/2m)ey (see Fig. 3.9b). If instead the angular
impulsive moment shown in Fig. 3.9c is applied, we would have x_ C ¼ y_ C ¼ 0 and
θ_ ¼ R=mL. This angular velocity, when placed into Eq. (3.2.29), produces veloc-
ities of the masses given by v1 ¼ (R/2m)ey and v2 ¼ (R/2m)ey (Fig. 3.9c). Adding
both effects together we obtain the velocities of the masses given in Eq. (3.2.38).
186 3 Dynamics of a System of Particles
The work dWi done on the ith particle in a system of N particles when that particle is
given a differential displacement, dxi, is
X
dW i ¼ Fia dxi þ Fi j dxi ð3:2:39Þ
j6¼i
where Fia is the sum of all the known external applied forces and constraint forces
and Fij is the internal force that the jth particle exerts on the ith particle. From the
results of the last chapter we can write this work in terms of the differential change of
the kinetic energy through the work-energy theorem:
dW i ¼ dT i ð3:2:40Þ
1
T i ¼ mi vi vi ð3:2:41Þ
2
in terms of the velocity, vi ¼ x_i , of the ith particle. If we sum over all the particles in
the system then the total kinetic energy, T, is given by
X
N
T¼ Ti ð3:2:42Þ
i¼1
so that if we integrate the work-energy relationship for the entire system between
ð1Þ ð 2Þ
two configurations (1) and (2) where the particle positions are xi and xi ,
respectively, we have
ð 2Þ ð2Þ ð 2Þ
N ð N ð N ð
xi xi xi
X N X
X N X
X
ΔT ¼ T ð2Þ T ð1Þ ¼ Fia dxi þ Fij dxi þ F ji dx j
i¼1 ð 1Þ
i¼1 j¼iþ1 ð 1Þ
i¼1 j¼iþ1 ð1Þ
xi xi xi
ð 2Þ ð 2Þ
N ð N ð
xi xi
X N X
X
¼ Fia dxi þ Fij dxi dx j
i¼1 ð 1Þ
i¼1 j¼iþ1 ð 1Þ
xi xi
ð3:2:43Þ
where we have used Newton’s third law. Just as the external constraint forces can do
work, any internal constraint forces may also do work. One important exception is
the case of internal rigid constraints between the particles. Such ideal holonomic
3.2 Newton-Euler Laws for a System of Particles 187
constraints satisfy Eq. (3.1.6), so letting lij ¼ |xj xi| and uij;k ¼ xi;k xj;k, the ideal
constraint forces satisfy
ð 2Þ ð 2Þ
N ð N ð
xi xi
X XN X X3
∂f ij ∂lij
ΔT ¼ Fi dxi þ
a
λij duij;k
i¼1 i¼1 j¼iþ1 k¼1
∂lij ∂uij;k
ð 1Þ ð 1Þ
xi xi
ð 2Þ ð 2Þ
ð3:2:45Þ
N ð N ð X
xi xi
X X
N X 3
¼ Fi dxi þ
a
λij df ij lij
i¼1 ð 1Þ
i¼1 j¼iþ1 ð 1Þ
k¼1
xi xi
where duij;k ¼ (dxi;k dxj;k). But the total differential of all the constraints between
the particles must satisfy dfij ¼ 0 so for any system of particles rigidly connected
together, as shown in Fig. 3.10a, the internal forces will not only cancel for the entire
system but will also not do any work, and the work-kinetic energy relationship for
the rigid body of Fig. 3.10a will always be
ð2Þ
X
N ð
xi
If all of the applied forces are derivable from potentials, then Fia ¼ —xi V i , and
Eq. (3.2.46a) is instead given as
X
N N h
X
i
ð2Þ ð1Þ
ΔT ¼ ΔV i ¼ V i xi V i xi ¼ ΔV ð3:2:46bÞ
i¼1 i¼1
(a) (b)
188 3 Dynamics of a System of Particles
where V is the total potential energy of all the external forces acting on the system.
This leads to the conservation of total energy of the entire system, i.e.,
However, note that Eq. (3.2.47) is only true for systems of particles where the
internal forces do no work, like a rigidly constrained system.
For a general system of particles the total kinetic energy can be written in terms of
the center of mass velocity and the velocity with respect to the center of mass as
vi ¼ vC þ ρ_ i ð3:2:48Þ
1X N
T¼ mi vC þ ρ_ i vC þ ρ_ i
2 i¼1
1 XN
1X N
¼ mvC vC þ vC mi ρ_ i þ mi ρ_ i ρ_ i ð3:2:49Þ
2 i¼1
2 i¼1
1 1X N
¼ mvC vC þ mi ρ_ i ρ_ i
2 2 i¼1
where m is the total mass of the system and we have used the second equation in
Eq. (3.2.18) to arrive at this result. The first term in Eq. (3.2.49) is the kinetic energy
of a mass m moving with the center of mass and the second term is the kinetic energy
due to motion of the particles relative to the center of mass.
For a rigid system of particles (rigid body) we can get a more explicit form for the
relative motion part of the total kinetic energy. In the position vectors ρi ¼ liei from
the center of mass to the individual particles, let the unit vectors ei rotate with the
rigid system angular velocity ω. Then the distances li in those position vectors will
be constants because all lines in the rigid system have the same angular motion and
the relative position coordinates between any two points in the system are fixed. But
if the distances li are constants we have ρ_i ¼ li e_i . In Chap. 1 we found that the time
derivative of any unit vector rotating with an angular velocity ω is given by
e_i ¼ ω ei . Thus, we have ρ_i ¼ li ω ei ¼ ω ρi and the total kinetic energy
becomes
3.2 Newton-Euler Laws for a System of Particles 189
1 1X N
T ¼ mvC vC þ mi ðω ρi Þ ðω ρi Þ
2 2 i¼1 ð3:2:50Þ
¼ T C þ T rot
Physically, Eq. (3.2.50) says that the total kinetic energy of a rigid system is equal to
the translational kinetic energy, TC, of the center of mass of the system plus
the rotational kinetic energy, Trot, about the center of mass. The rotational energy
can be written in terms of components by letting ω ¼ ωxex + ωyey + ωzez,
ρi ¼ xCiex + yCiey + zCiez (where the notation means that these position coordinates
are measured from the center of mass C to particle i; we could also write such
position coordinates as xi/C, etc.) and expanding the cross and dot products. The
process yields an end result which is best placed in a vector-matrix form. By
expanding the two cross products in Eq. (3.2.50) and collecting terms, we obtain
1
T rot ¼ fωgT ½I C fωg ð3:2:51Þ
2
with {ω} ¼ [ωx ωy ωz]T and [IC] is the mass moment of inertia matrix:
2X X X 3
mi y2Ci þ z2Ci mi xCi yCi mi xCi zCi
6 i 7
6 i i
7
6 Xm x y X
mi x2Ci þ z2Ci
X
mi yCi zCi 7
½I C ¼ 6
6
i Ci Ci 7
7 ð3:2:52Þ
6 i
X
i
X X
i
7
4 2 5
mi xCi zCi mi yCi zCi mi xCi þ yCi
2
i i i
In the case of two-dimensional motion of the rigid system in the x–y plane the kinetic
energy expression is much simpler as there is only translational motion in that plane
and rotational motion is only about the z-axis so that
1
T C ¼ m v2Cx þ v2Cy
2
XN ð3:2:53Þ
1
T rot ¼ I C ω2z , I C ¼ mi x2Ci þ y2Ci
2 i¼1
The mass moment of inertia matrix also appears in the expression for the angular
momentum about the center of mass since from Eq. (3.2.21)
X
N X
N
LC ¼ ρi mi ρ_ i ¼ mi ρi ðω ρi Þ ð3:2:54Þ
i¼1 i¼1
190 3 Dynamics of a System of Particles
You can either expand the two cross products or use the vector identity
ρi (ω ρi) ¼ (ρi ρi)ω (ρi ω)ρi and expand the dot products (which is
much easier) to obtain in matrix form
where {LC} ¼ [LCx LCy LCz]T. We can obtain a similar relationship for the angular
momentum of the system about a fixed point, O, since from Eq. (3.2.21)
X
N X
N X
N X
N
LO ¼ mi xC=O vC þ xC=O mi ðω ρi Þ þ mi ρi vC þ mi ρi ðω ρi Þ
i¼1 i¼1 i¼1 i¼1
X
N X
N
¼ mi xC=O þ ρi vC þ mi xC=O þ ρi ðω ρi Þ
i¼1 i¼1
X
N
¼ mi xC=O þ ρi ðvC þ ω ρi Þ
i¼1
ð3:2:56Þ
But because the center of mass is rotating about O, xC/O ¼ leC/O and vC ¼ x_ C=O ¼ l
e_ C=O ¼ lω eC=O we have vC ¼ ω xC/O and
X
N
LO ¼ mi xC=O þ ρi ω xC=O þ ρi
i¼1
ð3:2:57Þ
X
N
¼ mi xi ðω xi Þ
i¼1
which is identical to Eq. (3.2.54) except that the components of the position vectors
xi ¼ xOiex + yOiey + zOiez of the particles are measured from the fixed point O to each
mass while the components of the position vectors ρi ¼ xCiex + yCiey + zCiez are
measured with respect to the center of mass. Thus, [IO] has exactly the same form
as [IC] (see Eq. (3.2.52)) except that (xCi, yCi, zCi) in Eq. (3.2.52) are replaced by (xOi,
yOi, zOi) and we have
In the case of planar motion where there is only a rotation about the z-axis this matrix
relation reduces to the scalar relation
LOz ¼ I O ωz
XN ð3:2:59Þ
IO ¼ mi x2Oi þ y2Oi
i¼1
3.2 Newton-Euler Laws for a System of Particles 191
Another important case for which we want to examine the internal forces and work-
energy relations is where all the particles are connected by linear springs, as shown
in Fig. 3.10b. Just as the lattice of rigidly connected particles represents a rigid body
composed of discrete masses, this lattice of springs represents an elastic body, i.e.,
one that can deform. If, as before, we let Vij be the potential energy of the spring
connecting the ith and jth particle then
k ij h i2
V ij ¼ lij l0ij ð3:2:60Þ
2
where kij is the spring constant and lij ; l0ij are the current and the unstretched spring
lengths and lij ¼ |xj xi|. [Note: Here we will assume that all particles can be
connected to all the other particles by springs. In Fig. 3.10b only nearest-neighbor
connections are shown. However, the case shown can be obtained from this general
case by simply setting appropriate spring constants to zero.] Then
∂V ij ∂V ij ∂lij ∂uij;k
F ij;k ¼ ¼
∂xi;k ∂lij ∂uij;k ∂xi;k
ð3:2:61Þ
∂V ij ∂lij
¼
∂lij ∂uij;k
where uij;k ¼ xi;k xj;k. The work done on the entire system is
X
N X
N X
N X
N
dW i ¼ Fia dxi þ Fij dxi
i¼1 i¼1 i¼1 j6¼i
X
N N X
X N N X
X N
¼ Fia dxi þ Fij dxi þ F ji dx j ð3:2:62Þ
i¼1 i¼1 j¼iþ1 i¼1 j¼iþ1
X
N N X
X N
¼ Fia dxi þ Fij dxi dx j
i¼1 i¼1 j¼iþ1
where we have again used Newton’s third law Fji ¼ Fij. However, assuming
motion in 3-D we have
192 3 Dynamics of a System of Particles
X3
Fij dxi dx j ¼ F ij;k d xi;k x j;k
k¼1
ð3:2:63Þ
X
3
¼ F ij;k d uij;k
k¼1
where we have let dVint be the change in the internal potential energy (also often
called the strain energy) of all the springs to distinguish it from any potential energy,
V, coming from the external forces. Writing the differential of the work in terms of
the differential of the kinetic energy (Eq. (3.2.40)) gives
X
N X
N
dT i ¼ Fia dxi dV int ð3:2:65Þ
i¼1 i¼1
ð 2Þ
X
N ð
ri
1X N X N h i2
V int ¼ k ij lij l0ij ð3:2:67Þ
2 i¼1 j¼iþ1
Equation (3.2.66) is the work-kinetic energy relationship for a deformable body. The
internal potential energy for a lattice of springs is given by Eq. (3.2.67). This internal
potential energy is absent for a rigid body since work done by the external forces
cannot be stored internally, so that all the external work must go into changing the
3.2 Newton-Euler Laws for a System of Particles 193
kinetic energy of the rigid body. If the external forces are also derivable from a
potential, and Ve is the total potential energy of those forces, then Eq. (3.2.66)
becomes
or, equivalently,
Δ T þ V e þ V int ¼ 0 ð3:2:69Þ
X
N X
N
dT ¼ dT i ¼ Fia dxi dV int
i¼1 i¼1 ð3:2:70Þ
¼ dW dV e int
where dT is the differential of the total kinetic energy and dWe is a differential work
done by the external forces. Dividing by the differential time dt we have
dT X N
dV int
¼ Fia vi
dt dt
i¼1 ð3:2:71Þ
dV int
¼P e
dt
in terms of the power Pe ¼ dWe/dt. Integrating over a time interval (t0, t) gives
ðt
T ðt Þ T ðt 0 Þ ¼ ΔT ¼ Pe dt V int ðt Þ V int ðt 0 Þ
t0 ð3:2:72Þ
or
ΔT ¼ W e ΔV int
When the applied external forces are all derivable from potential energy functions
We ¼ ΔVe and we again obtain Eq. (3.2.69).
194 3 Dynamics of a System of Particles
Fsys ¼ m€xC
ð3:3:1Þ
MCsys ¼ L_ C
which are six equations for the six degrees of freedom in the case of three-
dimensional motion. For two-dimensional motion (in the x–y plane), the Newton-
Euler equations (in component form) are
d 2 xC
m ¼ F xsys
dt 2
d2 y
m 2C ¼ F ysys ð3:3:2Þ
dt
d d 2 θz sys
ðI C ωz Þ ¼ I C 2 ¼ M Cz
dt dt
for the three degrees of freedom of the rigid body. Consider the 2-D case. If, under
specified initial conditions (xC0, yC0, θz0) at some time t0, we solve Eq. (3.3.2) for the
position of the center of mass xC(t) ¼ (xC(t; xC0), yC(t; yC0)) and rotation θz(t; θz0)
3.3 Dynamics of a Rigidly Constrained System of Particles (Rigid Body) 195
ρi 0 = li ei 0
mi ρi = li ei
θ i
mi θz
z0
y xi 0 C y C
xC 0 xi
xC
O x O x
(a) (b)
Fig. 3.11 Geometry for a system of rigidly constrained particles moving in two dimensions at (a)
some initial time, t0 and (b) some arbitrary time, t, during the motion
about C at later times t we have in fact completely solved for the motion of all the
particles in the system. We can show this explicitly by examining in detail the
two-dimensional motion of the system in Fig. 3.11, which shows a particular particle
in the rigid system at some initial and current time. The position of each particle at
time t is xi(t) ¼ xC(t)+ρi(t) or xi(t) ¼ xC(t)+liei(t). The unit vectors ei all have the
same angular motion in the rigid system
but they start at time t0 with different
orientations θz0i
, i.e., ei ðt Þ ¼ ei θz ; θz0
i
(Fig. 3.11). Thus,solving
the Newton-Euler
equations for (xC, θz) and using the known starting values li ; θz0 i
for each particle we
can find the position vector of any particle. A similar result, which we will not show
here, follows for 3-D problems as well.
In Chap. 5 we will consider the motion of rigid bodies with continuously
distributed mass. This is a generalization of the rigidly constrained system of
particles considered here and has very similar behavior in terms of both kinematics
and dynamics. Thus, in this chapter we limit our treatment of rigidly constrained
particles. However, to set the stage for the discussions in Chap. 5 we will give an
example in this section of the two-dimensional motion of a system of rigidly
constrained particles. Specifically, consider the case of two masses, each of mass
m, connected by a thin, massless rigid rod of length l1, where the center of the rod
(which is also the center of mass, C, of the two particles) is attached by a pin to
another massless rigid rod of length l2 that rotates about a fixed point O as shown in
Fig. 3.12a. A rotational damper acts at the connection point C, producing a resisting
moment that is proportional to the total angular velocity, θ_ þ ϕ_ , between the two
rods as shown in the free body diagram of Fig. 3.12b, where the proportionality
constant is c1. A similar rotational damper exists at O producing a resisting moment
that is proportional angular velocity, ϕ_ , with proportionality constant, c2 (see
Fig. 3.12c). This is a two degree of freedom problem since the center of mass
position of the two particles is a function only of the angle ϕ and the angular motion
of the rigidly connected pair of particles can be described by the angle θ. This is also
196 3 Dynamics of a System of Particles
c2φ
Ox
φ l2
Oy Fy
(
c1 θ + φ )
Fx
(c)
a problem of two rigid bodies since the dumbbell rigid body AB is connected to the
rigid rod OC. The Newton-Euler equations for AB are given by
dvC
2m ¼ FAB
dt ð3:3:3Þ
dLC
¼ MCAB
dt
where FAB ; MCAB are the net force and moment acting on AB. Because the mass and
angular moment of inertia of rod OC are neglected, this rod is in “dynamic equilib-
rium,” i.e., the Newton-Euler equations are just
FOC ¼ 0
ð3:3:4Þ
MOOC ¼ 0
where FOC ; MOOC are the net force and moment acting on OC, and where in this
case we have taken the moments about the fixed point O. In terms of components for
this two-dimensional motion problem then the Newton-Euler equations for AB are
(see the free body diagram in Fig. 3.12b)
3.3 Dynamics of a Rigidly Constrained System of Particles (Rigid Body) 197
d 2 xC
2m ¼ Fx
dt 2
d2 y
2m 2C ¼ F y þ 2mg ð3:3:5Þ
dt
d d 2 θz
ðI C ωz Þ ¼ I C 2 ¼ c1 θ_ þ ϕ_
dt dt
Ox F x ¼ 0
Oy F y ¼ 0 ð3:3:7Þ
F x l2 cos ϕ F y l2 sin ϕ þ c2 ϕ_ þ c1 θ_ þ ϕ_ ¼ 0
Now, consider the motion of the center of mass of AB in Fig. 3.11a in terms of the
angle ϕ. Defining that motion with respect to the fixed origin O we have
where (ex, ey) are unit vectors in the x- and y-directions, respectively. Placing
Eq. (3.3.8) into Eq. (3.3.5) gives
€ ¼ Fx
2ml2 sin ϕ ϕ_ 2 þ cos ϕ ϕ
2ml2 cos ϕ ϕ_ 2 þ sin ϕ ϕ€ ¼ F y þ 2mg
ð3:3:9Þ
l2
m 1 €θ ¼ c1 θ_ þ ϕ_
2
To eliminate the unknown forces from these equations we multiply the first equation
in Eq. (3.3.9) by l2 cos ϕ and the second equation by l2 sin ϕ and add the two
resulting equations, giving
But using the moment equation in Eq. (3.3.7) we obtain the equations of motion
2ml22 ϕ€ ¼ c2 ϕ_ c1 θ_ þ ϕ_ 2mgl2 sin ϕ
ml21 € ð3:3:11Þ
θ ¼ c1 θ_ þ ϕ_
2
c2 _ c1 _ g
€θ þ 2c1 θ_ þ ϕ_ ¼ 0
€ þ
ϕ 2
ϕþ 2
θ þ ϕ_ þ sin ϕ ¼ 0 2
ð3:3:12Þ
2ml2 2ml2 l2 ml1
These equations involve four constant coefficients. The constant g/l2 has the dimen-
sions of 1/s2 and is the square
pffiffiffiffiffiffiffiffi
ffi of the natural frequency, ω, of a simple pendulum of
length l2, i.e., ω ¼ g=l2 . Thus, as we have done before, it is useful to define a
nondimensional time τ ¼ ωt and write our equations in terms of τ to obtain
d2 ϕ dϕ dθ dϕ
þ
c 2 þ
c 1 þ þ sin ϕ ¼ 0
dτ2 dτ dτ dτ
ð3:3:13Þ
d2 θ 4l22 dθ dϕ
þ 2 c1 þ ¼0
dτ2 l1 dτ dτ
where c2 ¼ c2 = 2ml22 ω and c1 ¼ c1 = 2ml22 ω are nondimensional damping
coefficients.
70 20
65 15
60
10
55
5
θ 50 φ
0
45
40 -5
35 -10
30 -15
0 5 10 15 20 25 30 35 40 45 50 0 5 10 15 20 25 30 35 40 45 50
τ τ
Fig. 3.13 The angles θ and ϕ (measured in degrees) versus time for the multiparticle pendulum
c2 ¼ 0.2, lr ¼ 2.0, rtol ¼ 1e-6, and atol ¼ 1e-6 which are used unless the user
changes these values in the command window before executing the script. The script
also plots the θ versus time and ϕ versus time values for the pendulum. Figure 3.13
shows these outputs for the default values of the script. Both angles exhibit decaying
oscillations, eventually reaching equilibrium values. If we look for equilibrium
values from the equations of motion, Eq. (3.3.13), by setting all the acceleration
and velocity terms to zero, we find sinϕ ¼ 0 which has equilibrium values of 0 and π.
Only the zero value represents a stable equilibrium position which is also the ϕ value
that the system approaches to asymptotically in Fig. 3.13 as time increases. But what
about the final equilibrium value of θ? If we integrate the second equation in
Eq. (3.3.13) on time, we find
dθ 4l22 dθ 4l2
þ 2 c1 ðθ þ ϕÞ ¼ þ 22 c1 ðθ0 þ ϕ0 Þ ð3:3:14Þ
dτ l1 dτ τ¼0 l1
so at when the motion ceases we have ϕ ¼ 0 and we find an equilibrium angle, θeq,
given by
l21 dθ
θeq ¼ ðθ0 þ ϕ0 Þ þ ð3:3:15Þ
4l22 c1 dτ τ¼0
For the parameters used in simulating Fig. 3.13 we have θeq ¼ 53.125 which is close
to the final value seen in Fig. 3.13. Note that this is not a problem where the total
energy is a constant so we cannot use energy conservation to check that our
numerical solution is accurate, but we can use Eq. (3.3.14) in the same manner
since, like the total energy for conservative problems, it is an exact integral of the
equations of motion.
Once we find the solution of the equations of motion for (θ, ϕ) we have the
motion of the translation of the center of mass xC ¼ xC(ϕ) and the rotation θz ¼ θ
200 3 Dynamics of a System of Particles
0.8
0.85
yA
0.9
0.95
1
-0.1 0 0.1 0.2 0.3 0.4 0.5
xA
about the center of mass for the rigid body AB. As we have seen, from this
information we can determine the motion of any particle in the rigid system. For
the particle at A in Fig. 3.12, for example, we have its (xA, yA) coordinates given by
which are plotted in Fig. 3.14 for motion defined by the default parameters in
MP_pendulum_sim and with l2 ¼ 1.0 and l1 ¼ 0.5 (the arrows in Fig. 3.14 give
the direction of motion) showing the 2-D oscillatory and decaying motion for this
point.
In the last section we solved the multiparticle pendulum problem with a classical
“Newtonian” approach that directly used the Newton-Euler equations for a rigidly
constrained system and used those equations to eliminate the unknown forces (Fx,
Fy) and obtain the equations of motion. Those forces are actually forces of constraint
between the two rigid bodies. As seen in the last chapter for the motion of a single
particle there are a number of other ways to eliminate or evaluate those constraint
forces. In Chap. 5, when we discuss the motion of rigid bodies in depth we will
examine those alternate approaches. In this section we will examine the problem of
obtaining the equations of motion for a more general constrained system of particles.
To begin, we will follow the approach of Sect. 2.8, where we used n independent
generalized coordinates and the D’Alembert-Lagrange principle to embed the con-
straints and generate n ¼ ndof equations of motion. If a constrained system of
N particles is subjected to holonomic constraints such that the system can be
3.4 Equations of Motion in Generalized Coordinates 201
Xn
∂xi
δxi ¼ δqk ð3:4:1Þ
k¼1
∂q k
X
N X
N
mi €xi Fie Fijint δxi ¼ 0 ð3:4:2Þ
i¼1 j6¼i
If the virtual displacements satisfy all the holonomic constraints that are present then
the associated ideal constraint forces, both external and internal, are absent from
Eq. (3.4.2) since, as discussed in the last chapter, they do no virtual work. Most
books do not distinguish between the remaining external and internal forces because
they are both “external” to an individual particle, but here we will keep that
distinction and also assume that the internal forces are derivable from potentials.
Then following the same steps as when dealing with the real work done by the
internal forces, we have
N X
X N Xn
∂V int
Fijint δxi ¼ δV int ¼ δq ð3:4:3Þ
i¼1 j6¼i k¼1
∂qk k
where Vint is the total internal energy of the system. Then, using Eq. (3.4.1) the
D’Alembert-Lagrange principle becomes
" #
X
n X
N
∂xi ∂V int
mi €xi Qke þ δqk ¼ 0 ð3:4:4Þ
k¼1 i¼1
∂qk ∂qk
X
N
∂xi
Qke ¼ Fie ð3:4:5Þ
i¼1
∂qk
Since the qk generalized coordinates are assumed to be independent, from Eq. (3.4.5)
we find
X
N
∂xi ∂V int
mi €xi Qke þ ¼0 ð3:4:6Þ
i¼1
∂qk ∂qk
202 3 Dynamics of a System of Particles
Following the same steps as followed for the single particle we can write the position
vector and its derivatives as
xi ¼ xi ðq1 ; . . . ; qn ; t Þ
Xn
∂xi ∂xi X n
∂xi
vi ¼ x_ i ¼ q_ m þ ¼ ci;m q_ m þ
m¼1
∂qm ∂t m¼1
∂t ð3:4:7Þ
Xn Xn X n
∂ci;m Xn
∂ci;m
2
∂ xi
ai ¼ €
xi ¼ ci;m €qm þ q_ m q_ n þ 2 q_ m þ 2
m¼1 m¼1 n¼1
∂qn m¼1
∂t ∂t
where
so that
" #
XN Xn X N X n X n XN
∂ci;m
mi €
xi ci;k ¼ mi ci;k ci;m €qm þ mi ci;k q_ m q_ p
i¼1 m¼1 i¼1 m¼1 p¼1 i¼1
∂qp
X n X
X 2
N
∂ci;m N
∂ xi
þ2 mi ci;k q_ m þ mi ci;k 2
m¼1 i¼1
∂t i¼1
∂t
X
n n X
X n X
n
¼ M km €qm þ K kmp q_ m q_ p þ J km q_ m þ Bk
m¼1 m¼1 p¼1 m¼1
ð3:4:9Þ
where we have used the same notation as the single-particle case for these coeffi-
cients since they are just sums of the single-particle coefficients over the entire
system:
X
N X
N
∂ci;m
M km ¼ mi ci;k ci;m , K kmp ¼ mi ci;k
i¼1 i¼1
∂qp
ð3:4:10Þ
XN
∂ci;m X
N
∂ xi
2
J km ¼ 2mi ci;k , Bk ¼ mi ci;k 2
i¼1
∂t i¼1
∂t
X
n n X
X n X
n
∂V int
M km €
qm þ K kmp q_ m q_ p þ J km q_ m þ Bk ¼ Qke ð3:4:11Þ
m¼1 m¼1 p¼1 m¼1
∂qk
If, instead we used the velocity of the particles, vi ¼ vi q1 ; . . . ; qn ; q_ 1 ; . . . ; q_ n ; t to
calculate the equations of motion, as in the single-particle case we find
3.4 Equations of Motion in Generalized Coordinates 203
dvi X n
∂vi X n
∂vi ∂vi
ai ¼ ¼ €qm þ q_ m þ
dt m¼1
∂q_ m m¼1
∂qm ∂t
ð3:4:12Þ
Xn X n
∂vi ∂vi
¼ ci;m €qm þ q_ m þ
m¼1 m¼1
∂q m ∂t
X Xn X Xn X
X
N N N
∂vi N
∂vi
mi ai ci;k ¼ mi ci;k ci;m €qm þ mi ci;k q_ m þ mi ci;k
i¼1 m¼1 i¼1 m¼1 i¼1
∂qm i¼1
∂t
X
n X
n
¼ M km €qm þ Dkm q_ m þ E k
m¼1 m¼1
ð3:4:13Þ
where
X
N
M km ¼ mi ci;k ci;m
i¼1
XN
∂vi
Dkm ¼ mi ci;k ð3:4:14Þ
i¼1
∂qm
X
N
∂vi
Ek ¼ mi ci;k
i¼1
∂t
X
n X
n
∂V int
M km €qm þ Dkm q_ m þ E k ¼ Qke ð3:4:15Þ
m¼1 m¼1
∂qk
where Ti ¼ mivi vi/2 is the kinetic energy of the ith particle so that
X
N
d ∂T ∂T
mi €xi ci;k ¼ ð3:4:17Þ
i¼1
dt ∂q_ k ∂qk
204 3 Dynamics of a System of Particles
X
N
where T ¼ T i is the total kinetic energy of the system. This leads us then to
i¼1
Lagrange’s equation for the system of particles, namely,
d ∂T ∂T ∂V int
¼ Qke ð3:4:18Þ
dt ∂q_k ∂qk ∂qk
T ¼ T2 þ T1 þ T0 ð3:4:19Þ
we can let
1X n X n X
n
1X N
∂xi ∂xi
T2 ¼ M km q_ k q_ m , T1 ¼ μm q_ m , T0 ¼ mi
2 k¼1 m¼1 m¼1
2 i¼1 ∂t ∂t
ð3:4:21Þ
with
X
N
∂xi ∂xi
M km ¼ M mk ¼ mi
i¼1
∂qm ∂qk
ð3:4:22Þ
X
N
∂xi ∂xi
μm ¼ mi
i¼1
∂q m ∂t
provide a more detailed discussion here. First, let’s obtain the equations of motion
using several of the methods described previously. This is a two degree of freedom
problem since each mass has two degrees of freedom and there are two holonomic
constraints l1,l2 ¼ constants. The motion of the masses can be completely described
in terms of the two independent generalized coordinates (q1, q2) ¼ (θ1, θ2). If we
write the position vectors of the two masses in terms of these angles we have
x1 ¼ l1 sin θ1 ex þ l1 cos θ1 ey
ð3:4:23Þ
x2 ¼ ðl1 sin θ1 þ l2 sin θ2 Þex þ ðl1 cos θ1 þ l2 cos θ2 Þey
v1 ¼ l1 cos θ1 θ_ 1 ex l1 sin θ1 θ_ 1 ey
ð3:4:24Þ
v2 ¼ l1 cos θ1 θ_ 1 þ l2 cos θ2 θ_ 2 ex l1 sin θ1 θ_ 1 þ l2 sin θ2 θ_ 2 ey
Using the velocity and its derivatives (Eq. (3.4.14)) to form the equations of motion,
we need
∂v1
c1;1 ¼ ¼ l1 cos θ1 ex l1 sin θ1 ey
∂θ_ 1
∂v1
c1;2 ¼ ¼0
∂θ_ 2
ð3:4:25Þ
∂v2
c2;1 ¼ ¼ l1 cos θ1 ex l1 sin θ1 ey
∂θ_ 1
∂v2
c2;2 ¼ ¼ l2 cos θ2 ex l2 sin θ2 ey
∂θ_ 2
206 3 Dynamics of a System of Particles
and
∂v1
¼ l1 sin θ1 θ_ 1 ex l1 cos θ1 θ_ 1 ey
∂θ1
∂v1
¼0
∂θ2
ð3:4:26Þ
∂v2
¼ l1 sin θ1 θ_ 1 ex l1 cos θ1 θ_ 1 ey
∂θ1
∂v2
¼ l2 sin θ2 θ_ 2 ex l2 cos θ2 θ_ 2 ey
∂θ2
The generalized external forces are due to the gravitational forces F1 ¼ m1gey, and
F2 ¼ m2gey shown in Fig. 3.15, and Vint ¼ 0 giving
X
2
Q1 ¼ Fi ci;1 ¼ ðm1 þ m2 Þgl1 sin θ1
i¼1
ð3:4:28Þ
X
2
Q2 ¼ Fi ci;2 ¼ m2 gl2 sin θ2
i¼1
Collecting all these results the equations of motion (see Eq. (3.4.15)) are
We can divide the first equation by l1 and the second equation by l2 to obtain the
form of these equations found in most texts:
3.4 Equations of Motion in Generalized Coordinates 207
1
T ¼ ðm1 v1 v1 þ m2 v2 v2 Þ ð3:4:31Þ
2
m1 2 _ 2 m2 2 _ 2
T¼ l1 θ 1 þ l1 θ 1 þ l22 θ_ 22 þ 2l1 l2 cos ðθ1 θ2 Þθ_ 1 θ_ 2 ð3:4:32Þ
2 2
∂T
¼ m1 l21 θ_ 1 þ m2 l21 θ_ 1 þ l1 l2 cos ðθ1 θ2 Þθ_ 2
∂θ1_
∂T
¼ m2 l1 l2 sin ðθ1 θ2 Þθ_ 1 θ_ 2
∂θ1
ð3:4:33Þ
∂T
¼ m2 l22 θ_ 2 þ m2 l1 l2 cos ðθ1 θ2 Þθ_ 1
∂θ_2
∂T
¼ m2 l1 l2 sin ðθ1 θ2 Þθ_ 1 θ_ 2
∂θ2
d ∂T ∂T
so that Q1 ¼ 0 becomes
dt ∂θ_1 ∂θ1
which
is the same as the first equation in Eq. (3.4.29). Also,
d ∂T ∂T
Q2 ¼ 0 becomes
dt ∂θ2_ ∂θ2
m2 l22 €
θ2 þ m1 l1 l2 cos ðθ1 θ2 Þ€θ1 m2 l1 l2 sin ðθ1 θ2 Þθ_ 21 þ m2 gl2 sin θ2 ¼ 0
ð3:4:35Þ
but to put these equations into the standard form we have used before for a system of
first-order differential equations, we need to first remove the generalized mass
matrix, M. We can do this by multiplying Eq. (3.4.36) by the inverse of the mass
matrix to obtain
which is not difficult to do but the resulting expressions are rather complex so to
make the forms more manageable we will leave the inverse matrix written in terms of
the components of [M], i.e.,
" #
1 1 M 22 M 12
½M ¼
Δ M 21 M 11 ð3:4:38Þ
Δ ¼ M 11 M 22 M 12 M 21
Then, since
( )
θ_ 22
½Dfq_ g ¼ m2 l1 l2 sin ðθ1 θ2 Þ ð3:4:40Þ
θ_ 2 1
and
ðm1 þ m2 Þgl1 sin θ1
fQ g ¼
e
ð3:4:41Þ
m2 gl2 sin θ2
we have
( )
1 1 ðm1 þ m2 Þgl1 sin θ1 m2 l1 l2 sin ðθ1 θ2 Þθ_ 22
½M ðfQ g ½Dfq_ gÞ ¼ ½M
e
m2 gl2 sin θ2 þ m2 l1 l2 sin ðθ1 θ2 Þθ_ 2 1
ð3:4:42Þ
1 1 t1
½M ðfQ g ½Dfq_ gÞ ¼ ½M
e
ð3:4:43Þ
t2
with
( )
t1 ðm1 þ m2 Þgl1 sin θ1 m2 l1 l2 sin ðθ1 θ2 Þθ_ 22
¼ ð3:4:44Þ
t2 m2 gl2 sin θ2 þ m2 l1 l2 sin ðθ1 θ2 Þθ_ 21
Thus, we find
( )
€θ1 1 M 22 M 12 t1
¼ ð3:4:45Þ
€θ2 Δ M 21 M 11 t2
which gives
€θ1 ¼ M 22 t 1 M 12 t 2
Δ ð3:4:46Þ
€θ2 ¼ M 11 t 2 M 12 t 1
Δ
and by letting ½x1 ; x2 ; x3 ; x4 ¼ θ1 ; θ_ 1 ; θ2 ; θ_ 2 the first-order equations of motion are
x_ 1 ¼ x2
M 22 t 1 M 12 t 2
x_ 2 ¼
Δ ð3:4:47Þ
x_ 3 ¼ x4
M 11 t 2 M 21 t 1
x_ 4 ¼
Δ
where
t 1 ¼ m2 l1 l2 sin ðx1 x3 Þx24 ðm1 þ m2 Þgl1 sin x1
t 2 ¼ m2 l1 l2 sin ðx1 x3 Þx22 m2 gl2 sin x3
ð3:4:48Þ
Δ ¼ M 11 M 22 M 212
¼ ðm1 þ m2 Þm2 l21 l22 m22 l21 l22 cos 2 ðx1 x3 Þ
and
m1 2 _ 2 m2 2 _ 2
E¼ l1 θ 1 þ l1 θ 1 þ l22 θ_ 22 þ 2l1 l2 cos ðθ1 θ2 Þθ_ 1 θ_ 2
2 2 ð3:4:50Þ
ðm1 þ m2 Þg cos θ1 m2 g cos θ2
The double pendulum can have chaotic behavior so that the default error tolerances
in the script are set to the very small values rtol ¼ 1e-10, atol ¼ 1e-10.
For different starting angles the double pendulum can exhibit a variety of
behaviors. Figure 3.16 shows the angles (in radians) versus time for the default
values in the double_pendulum_sim script which are l1 ¼ l2 ¼ 0.1 m,
m1 ¼ m2 ¼ 0.1 kg, θ1(0) ¼ 50 , θ2(0) ¼ 25 (which must be converted to radians),
θ_ 1 ð0Þ ¼ θ_ 2 ð0Þ ¼ 0, and tspan ¼ [0, 4] s. The angular motion is somewhat periodic
as is the (x2, y2) motion of the mass m2 as shown in Fig. 3.17. The double pendulum
can exhibit a rich variety of behaviors so we have also written a MATLAB® script
double_pendulum_anim2 that replaces the plotting outputs of the
double_pendulum_sim script with an animation of the motion so that you can
visualize the entire motion. In addition to the ordinary inputs this animation script,
like the animation script described in Chap. 2, has an additional input, sldwn, that
produces a slow down of the animation, when needed, by placing a pause of
0.01*sldwn seconds in the animation between draws and a marker parameter input
for following the path of mass m2, as found in the animation script for the spring
pendulum. There is no built-in parameter for speeding up the animation, but the
easiest way to obtain a speedup of any of these animations is to simply reduce the
3.4 Equations of Motion in Generalized Coordinates 211
1 1.5
0.8
0.6 1
0.4
0.5
0.2
θ1 θ2
0 0
-0.2
-0.4 -0.5
-0.6
-1
-0.8
-1 -1.5
0 0.5 1 1.5 2 2.5 3 3.5 4 0 0.5 1 1.5 2 2.5 3 3.5 4
time, t time, t
Fig. 3.16 The angles θ1 and θ2 versus time for the double pendulum, for l1 ¼ l2 ¼ 0.1 m,
m1 ¼ m2 ¼ 0.1 kg, with starting angles θ1 ¼ 50 , θ2 ¼ 25 , and θ_ 1 ¼ θ_ 2 ¼ 0
Fig. 3.18 An animation of the motion of the double pendulum, showing the path followed by mass
m2 and the final configuration of the pendulum with tspan ¼ linspace(0, 4.5, 1000) and x0 ¼ [pi/2,
0, pi, 0]
Figure 3.18 shows the final configuration of the double pendulum and the path
followed by the marker by clearing the workspace, specifying initial conditions
x0 ¼ [pi/2, 0, pi, 0], and setting tspan ¼ linspace(0, 4.5, 1000) to speed up the
animation. You can see the very complex path followed in this example. It is
instructive to experiment with this animation script to see the different types of
motion possible. For example, if you use the same inputs as in Fig. 3.18 except with
slightly different initial conditions x0 ¼ [pi/2 + 0.01, 0, pi, 0] the path followed (see
Fig. 3.19) is initially the same as seen in Fig. 3.18 but differences grow with time,
ending in a final configuration that is not close to the one seen in Fig. 3.18. This
sensitivity of the motion to initial conditions is the trademark of chaotic behavior.
Both at very small and very large energy levels the double pendulum shows
regular periodic behavior. The low-energy case corresponds to very-small-angle
vibrations about θ1 ¼ θ2 ¼ 0 while the high-energy case is when the masses are
executing complete revolutions with ever-increasing or -decreasing angles. Let’s
consider the low-energy case. At small angles, we can neglect all the nonlinear terms
in both Eq. (3.4.34) and (3.4.35) and write the approximate linear equations of
motion as
3.4 Equations of Motion in Generalized Coordinates 213
Fig. 3.19 An animation of the motion of the double pendulum, showing the path followed by mass
m2 and the final configuration of the pendulum with slightly different initial conditions of
x0 ¼ [pi/2 + 0.01, 0, pi, 0] from those used in Fig. 3.18
€θ1 þ μg θ1 μ 1 θ2 ¼ 0
l1 μ ð3:4:51Þ
μg
€θ2 þ ðθ2 θ1 Þ ¼ 0
l2
where
m2
μ¼1þ ð3:4:52Þ
m1
Even at small amplitudes we see that the motions of the two masses are intimately
coupled. We will study such coupled vibratory motions in more detail in Chap. 7, but
here we can learn some important aspects of such coupled systems by examining the
solutions of Eq. (3.4.51). To keep things simple algebraically, we will let l1 ¼ l2 ¼ l
and m1 ¼ m2 ¼ m. Then our equations of motion become
€θ1 þ 2g θ1 1θ2 ¼ 0
l 2
ð3:4:53Þ
€θ2 þ 2g ðθ2 θ1 Þ ¼ 0
l
214 3 Dynamics of a System of Particles
The quantity ω20 ¼ g=l is physically just the square of the natural frequency,
ω0 (in rad/s) for small oscillations of a simple pendulum of length l. To see this,
first note that the simple pendulum problem is contained in Eq. (3.4.51) by simply
setting m2 ¼ 0 (μ ¼ 1) which gives the equation of motion for θ1 as
€θ1 þ g θ1 ¼ 0 ð3:4:54Þ
l
This is the same equation of motion we found for the simple pendulum in the last
chapter (see Eq. (2.5.28)) under the small-angle approximation where sinθ1 ffi θ1. To
obtain a solution of Eq. (3.4.54) that represents harmonic oscillations we will let θ1
be represented in the form of a complex function, θ1 ¼ a1 exp (iωt), where ω is a
circular frequency and a1 is also complex, i.e., we can represent it in terms of a
magnitude and phase as a1 ¼ A1 exp (iϕ1) so that θ1 ¼ A1 exp [i(ωt+ϕ1)]. Since θ1
must be a real angle we can take the real part of this complex expression
to find θ1 ¼ A1 cos (ωt+ϕ1). If instead we take the imaginary part we find
θ1 ¼ A1 sin (ωt+ϕ1). Any of these forms can be used to represent real solutions of
Eq. (3.4.54) where the constants (A1, ϕ1) can be found from the initial conditions.
Thus, the complex function form is an alternate (and convenient) way to express
these real oscillatory solutions. Placing θ1 ¼ a1 exp (iωt) into Eq. (3.4.54) gives
g
ω2 a1 expðiωt Þ ¼ 0
l
pffiffiffiffiffiffiffi
which indeed is satisfied by a frequency ω ¼ ω0 ¼ g=l for the pendulum. The
equations for the double pendulum, Eq. (3.4.53), are more complicated but we can
again seek complex solutions given by θk ¼ ak exp (iωt) (k ¼ 1, 2). The two
equations in this case can be put in matrix form (dividing out the common exp(iωt)
term) as
2g=l ω2 g=l a1 0
¼ ð3:4:55aÞ
2g=l 2g=l ω2 a2 0
or, equivalently,
" #
2ω20 ω2 ω20 a1 0
¼ ð3:4:55bÞ
2ω20 2ω20 ω2 a2 0
This is a homogeneous system of linear equations which only has the trivial solution
of a1 ¼ a2 ¼ 0 unless the determinant of the matrix of coefficients vanishes, giving
(in terms of ω0)
which is just a quadratic equation for ω2. Solving this quadratic equation for its two
roots we find
pffiffiffi 2
ω2 ¼ 2ω20 2 ω0 ð3:4:57Þ
so taking the positive square root of this result gives, finally, two natural frequencies
at which the system can oscillate:
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
pffiffiffi
ω1 ¼ 2 2 ω0 ffi 0:765ω0
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
pffiffiffi ð3:4:58Þ
ω2 ¼ 2 þ 2 ω0 ffi 1:848ω0
Because the determinant was set equal to zero the two equations in Eq. (3.4.55b) are
not independent and we cannot solve for the amplitude constants (a1, a2) but we can
use one of those equations to find a relationship between p those
ffiffiffi constants. For the
lowest natural frequency, ω1, for example, we obtain a2 ¼ 2 a1 so the two masses
oscillate in phase aspshown
ffiffiffi in Fig. 3.20a. At the higher natural frequency, ω2, we
have instead a2 ¼ 2 a1 , so the masses oscillate completely out of phase as shown
in Fig. 3.20b. These amplitudes define the two normal modes of oscillation of the
double pendulum at these two natural frequencies. We can write these amplitudes as
components of a column vector. For ω1, for example, if we normalize the amplitudes
to produce a unit vector, e(1), we have
( pffiffiffiffiffiffiffiffi )
1 a1 1=3
eð1Þ ¼ pffiffiffiffiffiffiffiffiffiffiffiffiffiffi
ffi ¼ pffiffiffiffiffiffiffiffi ð3:4:59aÞ
a1 þ a22
2 a2 2=3
Since our small-amplitude equations, Eq. (3.4.53), are linear and homogeneous
we can take as a general solution of those equations the sum of these two normal
mode solutions with unknown (complex) constant amplitudes, i.e.,
θ1
θ¼ ¼ A1 expðiω1 t þ iδ1 Þeð1Þ þ A2 expðiω2 t þ iδ2 Þeð2Þ ð3:4:60Þ
θ2
where the real constants (A1, δ1, A2, δ2) are obtained from the given initial conditions
of the motion θ1 ð0Þ; θ_ 1 ð0Þ; θ2 ð0Þ; θ_ 2 ð0Þ . Specifically, we have from Eq. (3.4.61)
A1 A2
θ1 ð0Þ ¼ pffiffiffi cos δ1 þ pffiffiffi cos δ2
3 3
pffiffiffi pffiffiffi ð3:4:62aÞ
2A1 2A2
θ2 ð0Þ ¼ pffiffiffi cos δ1 pffiffiffi cos δ2
3 3
ω1 A1 ω2 A2
θ_ 1 ð0Þ ¼ pffiffiffi sin δ1 pffiffiffi sin δ2
3 3
pffiffiffi pffiffiffi ð3:4:62bÞ
2ω1 A1 2ω2 A2
θ_ 2 ð0Þ ¼ pffiffiffi sin δ1 þ pffiffiffi sin δ2
3 3
0.15 0.15
0.1 0.1
0.05 0.05
θ2 0 0
-0.05 -0.05
-0.1 -0.1
-0.15 -0.15
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
time, t time, t
(a) (b)
Fig. 3.21 (a) The angle θ2 versus time for the double pendulum from the linearized solution in
terms of the normal modes, and (b) the numerical solution of the double pendulum as found from
the MATLAB® script double_pendulum_sim
complete solution, the complete solution behavior is certainly not simple, even at
these small amplitudes.
When we discuss vibration problems in more detail in Chap. 7, we will see that
the determination of the natural frequencies and normal modes is the solution to what
is called an eigenvalue problem. In the current example, if we let λ ¼ ω2 =ω20 we can
rewrite Eq. (3.4.55b) as
2 λ 1 a1 0
¼ ð3:4:63Þ
2 2 λ a2 0
which is in the standard form of an eigenvalue problem where the eigenvalues are the
solutions for λ (i.e., the squares of the normalized natural frequencies) and the
eigenvectors are corresponding modal vectors of Eqs. (3.4.59a) and (3.4.59b).
There is a MATLAB® function eig that can directly solve such eigenvalue problems.
One merely needs to define the matrix of coefficients in Eq. (3.4.64) and give that
matrix as an argument to the eig function to get both the eigenvalues and the
eigenvectors. For the example considered in the linear_dp script, the natural fre-
quencies are approximately ω1 ¼ 5.36 rad/s and ω2 ¼ 12.94 rad/s and ω0 ¼ 7.00
rad/s. If in the MATLAB® command window we place the 2 2 matrix of
coefficients in Eq. (3.4.64) into a matrix A and call the eig function we find
218 3 Dynamics of a System of Particles
A = [ 2 -1; -2 2];
[eigvectors, eigvals] = eig(A)
eigvals = 3.4142 0
0 0.5858
The first column in the matrix eigvectors is just the normal mode vector e(2) and the
second column is the modal vector e(1) as defined previously and the corresponding
eigenvalues in the eigvals matrix are the values of λ2 ¼ ω22 =ω20 ¼ 3:4142 and
λ1 ¼ ω21 =ω20 ¼ 0:5858, which you can verify are the correct squares of the normal-
ized natural frequencies.
We also want to use the double-pendulum problem to show a simpler way to set
up and solve this problem, using an approach that is very useful for more complex
multiple degree of freedom problems. Our solution with ode45 used a system of
equations where the mass matrix was first eliminated so that we could put the first-
order system of equations in the standard form of x_ ¼ f x; x; _ t . This entailed doing
some algebra where there is always a chance of introducing errors. However, ode45
can also solve a first-order
system of ordinary differential equations in the form
Mðx; t Þx_ ¼ f x; x; _ t where M is a “mass” matrix. [Note: This is not the same
“mass” matrix found in the equations of motion written as second-order differential
equations.] Our original second-order system of equations, Eqs. (3.4.34) and
(3.4.35), can be easily placed in this form by simply collecting terms appropriately,
so that no additional algebra isneeded. From those two equations, and recalling that
½x1 ; x2 ; x3 ; x4 ¼ θ1 ; θ_ 1 ; θ2 ; θ_ 2 , the mass matrix of the first-order system is
2 3
1 0 0 0
60 ðm1 þ m2 Þl1 m2 l2 cos ðx1 x3 Þ 7
6 0 7
M¼6 7 ð3:4:65Þ
40 0 1 0 5
0 m1 l1 cos ðx1 x3 Þ 0 m 2 l2
where a common factor of l1 in Eq. (3.4.34) and a common factor of l2 in Eq. (3.4.35)
have been eliminated before generating these M and f expressions.
3.4 Equations of Motion in Generalized Coordinates 219
where MM is the name of a function which must return in this case the 4 4 matrix
of Eq. (3.4.65). Thus, the second change we must make is to include a nested
function MM. This function has input arguments (t, x) and in this case is given
explicitly as
function M =MM(t, x)
r1 = [1 0 0 0];
r2=[ 0 (m1+m2)*l1 0 m2*l2*cos(x(1)-x(3))];
r3 = [ 0 0 1 0];
r4 = [0 m1*l1*cos(x(1)-x(3)) 0 m2*l2];
M=[r1;r2;r3;r4];
end
The other arguments appearing in this nested function such as m1 do not have to be
passed explicitly since they are shared with the function double_pend_m, where they
are defined. Third, and finally, we must include another nested function within
double_pend_m, called dp_m_eqs, which returns the f vector of Eq. (3.4.66) and is
function [f] = dp_m_eqs(t, x)
f = zeros(4,1);
x1 =x(1); %theta1
x2 = x(2);%theta1dot
x3 = x(3); %theta2
x4 =x(4); %theta2dot
f(1)= x2;
f(2) = -(m2*l2*x4^2)*sin(x1-x3)-(m1+m2)*g*sin(x1);
f(3) = x4;
f(4) =( m2*l1*x2^2)*sin(x1-x3) -m2*g*sin(x3);
end
where again all the other parameters besides the (t, x) input parameters are shared
with the function double_pend_m.
220 3 Dynamics of a System of Particles
1 1.5
0.8
1
0.6
0.4
0.5
0.2
θ2
θ1 0 0
-0.2
-0.5
-0.4
-0.6 -1
-0.8
-1 -1.5
0 0.5 1 1.5 2 2.5 3 3.5 4 0 0.5 1 1.5 2 2.5 3 3.5 4
time, t time, t
Fig. 3.22 Use of a mass matrix for solving the double-pendulum problem. The angles θ1 and θ2
versus time for the double pendulum, for l1 ¼ l2 ¼ 0.1 m and m1 ¼ m2 ¼ 0.1 kg, with starting
angles θ1 ¼ 50 , θ2 ¼ 25 , and θ_ 1 ¼ θ_ 2 ¼ 0. These are the same parameters used to generate
Fig. 3.16
The x-coordinates of the endpoints of the lines to be animated are held in the
N columns of the matrix, x_array(:, n) (n ¼ 1, N ), where N is the total number of
endpoints to be animated. Note that we must include any fixed points, such as the
base point of the double pendulum, in this array. Similarly, y_array(:, n) holds the y-
coordinates of the endpoints. The input argument sldwn is a “slow down” factor as
described previously. There is not a speedup factor included in this animation
function, but, as mentioned before, this can be accomplished by specifying fewer
points in tspan. The input argument marker is a string (“on” or “off”) that determines
if the path of the endpoint of the last line is to be plotted or not plotted as a series of
dots, as done previously in animation plots. The animate_lines function is a simple
function for doing 2-D animation of any number of lines, so it can be used in many
2-D simulations without having to write animation coding for each new problem, as
we have been doing up to this point.
3.5 A Non-holonomic Constrained System of Particles 221
-0.05
-0.1
y-axis
-0.15
-0.2
Fig. 3.23 Final frame of the animation of the double-pendulum motion in Simulation 3.5
The double pendulum is a very simple system but as we have seen it can be used
as the vehicle to describe a number of issues including chaotic motion, effects of
linearization, vibrations of a coupled two degree of freedom system, and use of a
mass matrix in the numerical calculations.
Almost all of the constraints considered so far have been holonomic constraints, as
these are typically the types of constraints found in single particle and systems of
particle problems. Problems involving the rolling of rigid bodies are one class of
222 3 Dynamics of a System of Particles
y m ( x2 , y2 )
L
m C (x , y )
c c
C ds
z θ
m
y
m ( x1 , y1 )
x
x
(a) (b)
Fig. 3.24 (a) A pair of wheels connected by a rigid axle of length L and rolling without slipping on
the x–y plane, and (b) the geometry of this problem as seen in the x–y plane
dxc ¼ sin θ ds
ð3:5:1Þ
dyc ¼ cos θ ds
But we can eliminate the ds and divide by the time differential dt to write Eq. (3.5.1)
instead as a single-velocity constraint in the form
the plane, coming back to the original point (xc0, yc0) but at any orientation, θ1, so we
cannot hope to find an equivalent holonomic constraint that relates all three of these
variables. Since Eq. (3.5.2) is a non-holonomic constraint, there are still only three
degrees of freedom which we will take as (xc, yc, θ). To keep the problem simple so
that we can analyze it easily, we will assume that there are no external forces acting
on the system but that at time t ¼ 0 we have initial conditions xc0 ¼ yc0 ¼ 0,
x_ c0 ¼ 0, y_ c0 ¼ v0 , and θ0 ¼ 0, θ_ 0 ¼ ω, i.e., the center of mass starts at the origin
moving with a velocity, v0, in the y-direction and with the axle oriented along the x-
axis and spinning with an angular velocity, ω. To obtain the equations of motion,
let’s use Lagrange’s equations since it is easy to obtain the kinetic energy, T, which is
the sum of the translational and rotational parts:
T ¼ T trans þ T rot
1 1 ð3:5:3Þ
¼ ð2mÞ x_ 2c þ y_ 2c þ I c θ_ 2
2 2
1
T ¼ m x_ 2c þ y_ 2c þ mL2 θ_ 2 ð3:5:4Þ
4
There is no potential energy since the masses move only parallel to the x–y plane.
The non-holonomic constraint, Eq. (3.5.2), can be differentiated once to obtain
cos θ€xc þ sin θ€yc ¼ θ_ sin θx_ c cos θy_ c ð3:5:5Þ
A ¼ ½ cos θ; sin θ; 0
ð3:5:6Þ
b ¼ θ_ sin θx_ c cos θy_ c
and where b in this case is just a scalar. This problem is a specific example of where
we have a combination of Lagrange’s equations for a set of independent generalized
coordinates, qk, and one or more non-holonomic constraints. If these non-holonomic
constraints generate ideal constraint forces of the form
X
Qkc ¼ A jk λ j ð3:5:7Þ
j
where λj are Lagrange multipliers, then we can use an augmented approach and write
the solution as a combination of Lagrange’s equations and the non-holonomic
constraint conditions as
224 3 Dynamics of a System of Particles
X
d ∂T ∂T
¼ Qke þ Qkc ¼ Qke þ Aik λi
dt ∂q_ k ∂qk
X
i
ð3:5:8Þ
Aij €qj ¼ bi
j
In our problem the external forces do not have any components in the x–y plane and
the external forces do not generate any moments about the z-axis so that the external
generalized forces are all zero and there is only one constraint so that we have
d ∂T ∂T
¼ 2m€xc ¼ cos θλ
dt ∂x_ c ∂xc
d ∂T ∂T
¼ 2m€yc ¼ sin θλ ð3:5:9Þ
dt ∂y_ c ∂yc
d ∂T ∂T 1 2 €
¼ mL θ ¼ 0
dt ∂θ_ ∂θ 2
We can use the general solution we wrote earlier for augmented problems of the type
given by Eq. (3.5.9) and (3.5.10) (see Eq. (2.6.44), for example) to find the equations
of motion and the constraint force (or, equivalently, the Lagrange multiplier, λ) but
here we can easily solve for λ directly by just multiplying the constraint equation,
Eq. (3.5.10), by 2m and placing the first two equations in Eq. (3.5.9) into that
constraint equation to obtain the Lagrange multiplier as
λ ¼ 2mθ_ sin θx_ c cos θy_ c ð3:5:11Þ
One can substitute this result back into Eq. (3.5.9) to obtain the second-order
equations of motion as
€xc ¼ cos θ θ_ sin θx_ c cos θy_ c
€yc ¼ sin θ θ_ sin θx_ c cos θy_ c ð3:5:12Þ
€θ ¼ 0
which we then could rewrite as a system of first-order equations and solve them
numerically. However, we can also solve this problem analytically by noting that the
Lagrange multiplier in this case is actually a constant. This is not immediately
obvious but if we compute the time derivative of this multiplier we have
3.5 A Non-holonomic Constrained System of Particles 225
dλ
¼ 2m€θ sin θx_ c cos θy_ c þ 2mθ_ sin θ€xc cos θ€yc
dt
þ2mθ_ cos θx_ c þ sin θy_ c
¼0
which follows by using the equations of motion, Eq. (3.5.12), and the constraint
equation, Eq. (3.5.2). Thus, from Eq. (3.5.11) and the initial conditions we have
λ ¼ 2mωv0 and we can integrate the third of the equations in Eq. (3.5.12), using
the initial conditions, to obtain θ ¼ ωt, which gives from Eq. (3.5.9)
Using the initial conditions, Eq. (3.5.13) can easily be integrated twice to find
and
v0 v0
xc ¼ cos ðωt Þ
ω ω ð3:5:15Þ
v0
yc ¼ sin ðωt Þ
ω
v0 2 v2
xc þ þ y2c ¼ 02 ð3:5:16Þ
ω ω
so that the center of mass follows a circular path of radius v0/ω where the center of
the circle is at (v0/ω, 0) (Fig. 3.25a). One mass follows a circular path of radius
r1 ¼ v0/ω L/2 and the other mass follows a circle of radius r2 ¼ v0/ω+L/2 so these
masses will experience inward centripetal accelerations of r1ω2 and r2ω2, respec-
tively. Thus, there must be constraint forces F1 ¼ mr1ω2 and F2 ¼ mr2ω2 that act
on the particles (actually, the forces act on the contact points between the wheels and
the x–y plane) to keep them on their circular paths (Fig. 3.25b). The total constraint
force is just Qc ¼ ATλ ¼ 2mv0ω[cosθ, sinθ, 0]T which we can also write in terms of
the forces (F1, F2) as Qc ¼ F1[cosθ, sinθ, 0]T+F2[cosθ, sinθ, 0]T, so we see that the
total force F1+F2 ¼ mr1ω2 mr2ω2 ¼ λ. Another way to obtain these results is to
use the definition of the generalized constraint force (Eq. (3.4.6)) in terms of the
applied constraint forces
226 3 Dynamics of a System of Particles
(a) (b)
X
N
∂xi
Qkc ¼ Fic ð3:5:17Þ
i¼1
∂qk
X
2
∂xi
Q1c ¼ Fic ¼ ðF 1 þ F 2 Þ cos θ
i¼1
∂q1
X
2
∂xi
Q2c ¼ Fic ¼ ðF 1 þ F 2 Þ sin θ
∂q2
i¼1
ð3:5:19Þ
X
2
∂xi
Q3c ¼ Fic ¼ F 1 ½ cos θ; sin θ½L sin θ=2; L cos θ=2T
i¼1
∂q3
þ F 2 ½ cos θ; sin θ½L sin θ=2; þL cos θ=2T
¼0
x_ 2c þ y_ 2c ¼ v20 ð3:5:20Þ
The rolling axle problem of the previous section can also be used to give an example
of where the constraints might not all be independent. For example, suppose we take
the generalized coordinates to be the individual coordinates of the two particles,
X ¼ (x1, y1, x2, y2). The distance between the mass must be fixed, but also both
masses, like the center of mass, must move perpendicular to the axle so that we have
the three constraints
ðx2 x1 Þ2 þ ðy2 y1 Þ2 ¼ L2
ðx2 x1 Þx_ 1 =L þ ðy2 y1 Þy_ 1 =L ¼ 0 ð3:6:1Þ
ðx2 x1 Þx_ 2 =L þ ðy2 y1 Þy_ 2 =L ¼ 0
since cos θ ¼ (x2 x1)/L and sin θ ¼ (y2 y1)/L. The first constraint is a holonomic
constraint but the other two constraints are non-holonomic so that the system indeed
has three degrees of freedom. If we differentiate these constraints to write them in
terms of the accelerations we have
2 2
ðx2 x1 Þ €x2 €x1 þ ðy2 y1 Þ €y2 €y1 ¼ x_ 2 x_ 1 y_ 2 y_ 1
ðx2 x1 Þ€x1 þ ðy2 y1 Þ€y1 ¼ x_ 2 x_ 1 x_ 1 y_ 2 y_ 1 y_ 1 ð3:6:2Þ
ðx2 x1 Þ€x2 þ ðy2 y1 Þ€y2 ¼ x_ 2 x_ 1 x_ 2 y_ 2 y_ 1 y_ 2
€ ¼ b, where
Equation (3.6.2) can be placed in the vector-matrix form AX
2 3
ðx2 x1 Þ ð y2 y1 Þ ð x 2 x1 Þ ð y 2 y1 Þ
6 7
A ¼ 4 ð x 2 x1 Þ ð y2 y1 Þ 0 0 5 ð3:6:3Þ
0 0 ð x 2 x1 Þ ð y 2 y1 Þ
and
8 2 2 9
>
< x_ 2 x_ 1 y_ 2 y_ 1 >
=
b ¼ x_ 2 x_ 1 x_ 1 y_ 2 y_ 1 y_ 1 ð3:6:4Þ
>
: > ;
x_ 2 x_ 1 x_ 2 y_ 2 y_ 1 y_ 2
It is clear that the constraints of Eq. (3.6.2) are not independent since the first
equation is equal to the difference of the third equation and the second equation.
Physically this makes sense since if the velocities of the masses are both always
228 3 Dynamics of a System of Particles
perpendicular to the axle, then the distance between the masses along the axle also
cannot change, which is just our first constraint. Here it is easy to recognize the
reason for this dependency, but in more complex systems it may not be this obvious.
We could eliminate one of the redundant constraints or, as shown in the last section,
we can avoid it entirely by simply changing to a new set of generalized coordinates.
However it may be simpler to try to directly solve the problem with a dependent set
of constraints. Can we do that? The answer is yes. To see what is needed, note that in
the Cartesian coordinates we are using here the equations of motion and constraint
equations for the system of particles can be written as
€ ¼ Fe þ Fc
MX
ð3:6:5Þ
€ ¼b
AX
By ¼ c ð3:6:6Þ
y ¼ M1=2 Fc
B ¼ AM1=2 ð3:6:7Þ
1 e
c ¼ b AM F
If the constraints are all independent there is unique solution for y given by
1
y ¼ BT BBT c ð3:6:8Þ
which, in terms of the original variables of Eq. (3.6.5), leads to the solutions
€ ¼ M1 Fe þ M1 AT AM1 AT 1 b AM1 Fe
X
1 ð3:6:9Þ
Fc ¼ AT AM1 AT b AM1 Fe
for the equations of motion and the ideal constraint force that we have already used.
These solutions fail if the constraints are not independent because then the ordinary
inverse of the AM1AT matrix does not exist. However, even in the case of
dependent constraints there is a unique solution for y which has a minimum norm
and satisfies the constraint equations of Eq. (3.6.6) given by
{
y ¼ BT BBT c ð3:6:10Þ
3.6 Dependent Constraints 229
We can also solve problems in this same way when we have dependent con-
straints involving generalized coordinates, q. In this case the equations of motion
and constraints become
e þ Qc
q¼Q
M€
ð3:6:12Þ
q¼b
A€
where the main difference with the Cartesian case, Eq. (3.6.11), is that the general-
ized external force, Q e , includes both the external applied forces and the inertial
forces present in terms of the generalized coordinates and that the mass matrix, M, in
Eq. (3.6.13) is generally a function of the generalized coordinates as well as the
masses present.
€ ¼ Fc ¼ AT λ
MX
ð3:6:14Þ
€ ¼b
AX
230 3 Dynamics of a System of Particles
since there are no external applied forces with components in the x–y plane. In this
case the mass matrix is just the diagonal matrix M ¼ mI so M1 ¼ (1/m)I and the
equations of motion are just
€ ¼ AT AAT { b
X ð3:6:15Þ
{
where we have used the fact that m1 B ¼ mB{ to cancel out the mass terms (which
we know are absent from the problem—see the exact solution obtained in the last
T
section). If we let x ¼ XT ; X_ T then we have the first-order system
( )
X_
x_ ¼ { ð3:6:16Þ
AT AAT b
To solve these equations with initial conditions consistent with those used in the
last section (vC ¼ v0ey, ω ¼ ωez) we must take
since the particles are located at (L/2, 0) and (L/2, 0) at t ¼ 0 and if we decompose
the motion at this time into a translational and rotational part (Fig. 3.26a) each mass
(and in fact any point on the axle) will have the same vertical velocity, v0, in the
translational motion, while for the rotational motion the velocity of the center of
mass will be zero while the mass on the left side will move down with a velocity ωL/
2 while the mass on the right side will move up with a velocity ωL/2 (Fig. 3.26b) so
that the total velocity components of the mass on the left side will be (0, v0 ωL/2)
while the mass on the right side will have total velocity components (0, v0+ωL/2).
L v = ωL / 2
(b)
3.7 Problems 231
-0.4
-0.6
-1.5 -1 -0.5 0
x
3.7 Problems
(b) What is the approximate linear equation of motion for the system when the
angle θ is small? What is the natural frequency of small oscillations for the
system? (c) Using the Cartesian coordinates (x1, y1) for mass m1 and (x2, y2) for
m2 as shown in Fig. P3.3, what are the three constraints on the motion of this
system? Using an augmented approach, determine the equations of motion
and the constraint forces acting on the masses and solve for their motions
using the same parameters and initial conditions of part (a). How are the
constraint forces acting on the masses related to the forces acting at O on the
pivot point? (Hint: Draw free body diagrams of the masses and the rod.)
P3.4. A particle of mass m1 rides in a smooth vertical track and is connected by a
rigid, weightless rod of length L to a particle of mass m2 that rides in a smooth
horizontal track (Fig. P3.4). (a) Using the angle θ as a generalized coordinate,
3.7 Problems 233
θ m2
x
x2
obtain the equation of motion for the system and solve the equation of motion
numerically for 10 s with the initial conditions θ ¼ π/2, θ_ ¼ 5 rad/s,
m1 ¼ 2m2 ¼ 0.5 kg, and L ¼ 2 m. (b) Using the (y1, x2) coordinates as
shown in Fig. P3.4 determine the equations of motion for this system and
solve the equations of motion numerically using the augmented method for the
same initial conditions and parameters used in part (a). Also, determine the
tension in the rod as a function of time.
P3.5. A mass m1 and a weightless, inextensible wire of length L form a simple
pendulum whose base is attached to a box of mass m2 (Fig. P3.5). The box is
free to slide on a smooth horizontal surface and is attached to a linear spring
with a spring constant, k. The unstretched length of the spring is xu.
(a) Determine the equations of motion in terms of the generalized coordinates
(x, θ). Solve these equations of motion numerically for 20 s for xu ¼ 0.5 m,
L ¼ 0.25 m, m1 ¼ 3m2 ¼ 3 kg, and k ¼ 20 N/m, and initial conditions x(0) ¼ 1
m, x_ ð0Þ ¼ 0, and θð0Þ ¼ θ_ ð0Þ ¼ 0. (b) Using the x-coordinate of the box and
the (x1, y1) coordinates of the mass m1 as generalized coordinates, determine
the equations of motion of the systems and solve those equations numerically
using an augmented approach for the same parameters and initial conditions
used in part (a). Also, determine the tension in the wire as a function of time.
P3.6. Two particles of mass m1 and m2 move on a smooth horizontal surface. The
two particles are connected together by a weightless, inextensible rod of
234 3 Dynamics of a System of Particles
system. There are three holonomic constraints in this problem so that there are
three degrees of freedom for this problem and we can take (xC, yC, θ) as
independent generalized coordinates. However, there are also two
non-holonomic constraints that relate the generalized velocities x_ C ; y_ C ; θ_ .
Show that those two non-holonomic constraints are not independent. Solve
this system of equations numerically for 15 s with the initial conditions
xC ¼ yC ¼ θ ¼ 0 and x_ C ¼ 0, y_ C ¼ 2 rad/s at time t ¼ 0, taking m ¼ 3 kg
and L ¼ 0.5 m. What is the initial angular velocity, θ_ , consistent with the non-
holonomic constraints? (b) Use the coordinates of the three masses (xA, yA),
(xB, yB), and (xD, yD) as the generalized coordinates, subject to three
holonomic constraints and two non-independent, non-holonomic constraints.
Determine the equations of motion and solve this system numerically using
the augmented approach using the same initial conditions and parameters of
part (a).
P3.8. In Chap. 2 we saw that with a judicious choice of generalized coordinates for a
single particle we can implicitly imbed the constraints of a problem so that the
constraint forces are not explicitly a part of the problem. The same is true for a
system of particles. Consider, for example, three masses connected by
inextensible strings to a two-pulley system as shown in Fig. P3.8.
(a) Determine the constraint equation satisfied by the (x1, x2, x3) coordinates.
(b) Express the three xn coordinates in terms of the two qm coordinates and
show that the equation of constraint of part (a) is satisfied by the qm so that
they are independent generalized coordinates for this problem.
P3.9. Use the animate_lines function to animate the motion of the Simulation 3.1
multiple-particle pendulum problem, which we can treat as the motion of the
three connected lines OC, CA, and AB (see Fig. 3.12).
x2
q2
x3
m2
m3
236 3 Dynamics of a System of Particles
References
1. O.M. O’Reilly, Intermediate Dynamics for Engineers (Cambridge University Press, New York,
2008)
2. F.E. Udwadia, R.E. Kalaba, Analytical Dynamics (Cambridge University Press, Cambridge,
1996)
Chapter 4
Kinematics and Relative Motion
This chapter describes the kinematics of point masses and rigid bodies when
non-inertial coordinate systems (frames) are used to describe their motion. We
obtain relative velocity and acceleration expressions for moving frames and then
apply those expressions to find the velocities and accelerations of constrained
systems of rigid bodies at specific instances of time, similar to what is done in
many elementary dynamics texts. However, we also show that it is possible to
determine the kinematics of a constrained system of rigid bodies more completely
as a function of time. In some cases this can be done analytically but in general the
solution must be done numerically since the positional constraints are normally
nonlinear. To solve the positional constraints we use the Newton-Raphson method.
Kinematics is treated in this chapter both by the traditional vector approach and by
an equivalent matrix-vector method that is more readily suited to dealing with
complex systems. The matrix-vector approach for planar problems is covered in
Sects. 4.4 and 4.5 while more general three-dimensional problems are treated in Sect.
4.6 and those that follow. Three-dimensional rotations are described in terms of both
Euler angles and Euler parameters as these are the most commonly used generalized
rotational coordinates. Some classical examples of the dynamics effects seen in
rotating coordinate systems, such as the Foucault pendulum, are also given.
The Newton-Euler equations involve time derivative terms such as the acceleration
and rate of change of the angular momentum. As discussed in Chap. 1 these time
derivatives must be computed in an inertial coordinate system whose origin is
“fixed” and whose axes do not rotate. If, however, we make measurements of the
time derivatives in a coordinate system where either the origin translates and rotates
then those measurements relative to such a moving coordinate system are only a part
of the total time derivatives as seen in an inertial system and we must include
additional terms that account for the translation and rotation of the coordinate system
itself. For example, consider the position vector, xP ¼ X1E1+X2E2+X3E3, of a point,
P, as measured in a Cartesian inertial coordinate system whose origin, O, is fixed and
where the vectors (E1, E2, E3) along the (X1, X2, X3) axes are constant (i.e.,
nonrotating) unit vectors (see Fig. 4.1). Then computing the velocity and accelera-
tion of the point P is very simple since
vP ¼ x_ P ¼ X_ 1 E1 þ X_ 2 E2 þ X_ 3 E3
ð4:1:1Þ
aP ¼ €xP ¼ X€ 1 E1 þ X
€ 2 E2 þ X€ 3 E3
which only involve the time derivatives of the inertial coordinates. However, if we
have a coordinate system (x1, x2, x3) whose origin B moves, then we can let the
position vector of the point B be xB and the position vector of point P relative to this
moving origin B be xP/B, as shown in Fig. 4.1. From the geometry we have directly
xP ¼ xB þ xP=B ð4:1:2Þ
vP ¼ vB þ vP=B
ð4:1:3Þ
aP ¼ aB þ aP=B
These relations simply state that the velocity of P, vP, equals the velocity of B, vB,
plus the velocity of P with respect to B, vP/B, and the acceleration of P, aP, equals the
acceleration of B, aB, plus the acceleration of P with respect to B, aP/B. We can, of
course, measure all of the terms appearing in Eqs. (4.1.2) and (4.1.3) in the inertial
(X1, X2, X3) coordinate system in which case only the components of these terms will
vary with time. However, since vP/B and aP/B are the velocity and acceleration of
P relative to point B, it is advantageous to measure these relative motion terms with
respect to a coordinate system (x1, x2, x3) whose origin moves with B and whose unit
vectors are (e1, e2, e3) as shown in Fig. 4.1. In terms of this moving coordinate
4.1 Relative Velocity and Acceleration 239
system we could write the relative position vector as xP/B ¼ x1e1+x2e2+x3e3. Now,
consider the case when the unit vectors are constants, i.e., the coordinate system
translates with the motion of point B but does not rotate. In this case we simply have
vP=B ¼ x_ 1 e1 þ x_ 2 e2 þ x_ 3 e3
ð4:1:4Þ
aP=B ¼ €x1 e1 þ €x2 e2 þ €x3 e3
An observer who translates with the coordinate system (see Fig. 4.2) would measure
the position vector of point P relative to B as xP/B ¼ x1e1+x2e2+x3e3 and would see
the motion of point P relative to B simply as changes of his/her measurements of the
(x1, x2, x3) coordinates. These changes would give the total relative velocity or
acceleration of P with respect to B since in this case the (e1, e2, e3) unit vectors,
like the (E1, E2, E3) unit vectors, do not change with time.
Now, consider the case when the moving coordinate system translates with point
B and rotates, as shown in Fig. 4.3. In that case if we again write the relative position
vector as xP/B ¼ x1e1+x2e2+x3e3 we have for the relative velocity
dxP=B
¼ vP=B ¼ x_ 1 e1 þ x_ 2 e2 þ x_ 3 e3 þ x1 e_ 1 þ x2 e_ 2 þ x3 e_ 3 ð4:1:5Þ
dt
But from Chap. 1 we saw that if these unit vectors (e1, e2, e3) rotate with respect to
the inertial system with an angular velocity vector, ω, we have
e_ k ¼ ω ek ðk ¼ 1; 2; 3Þ and so
240 4 Kinematics and Relative Motion
vP=B ¼ vP=B
rel
þ ω xP=B ð4:1:7Þ
Equation (4.1.7) shows that the total relative velocity of P with respect to B, which is
measured in an inertial coordinate system, is equal to the relative velocity as
measured in a moving and rotating coordinate system plus a term, ω xP/B, due
to the rotation of the coordinates. The total velocity of point P is then given as
vP ¼ vB þ vP=B
rel
þ ω xP=B ð4:1:8Þ
rel
dvP=B
¼ aP=B
rel
þ ω vP=B
rel
ð4:1:10Þ
dt
rel
where aP=B ¼ €x1 e1 þ €x2 e2 þ €x3 e3 is the relative acceleration seen by an observer
moving and rotating with the (x1, x2, x3) coordinates and from the changes of the unit
vectors we have
x_ 1 e_ 1 þ x_ 2 e_ 2 þ x_ 3 e_ 3 ¼ x_ 1 ω e1 þ x_ 2 ω e2 þ x_ 3 ω e3
¼ ω x_ 1 e1 þ x_ 2 e2 þ x_ 3 e3 ð4:1:11Þ
¼ ω vP=B
rel
which gives us the second term in Eq. (4.1.10). Also, ω_ ¼ α, where α is the angular
acceleration of the rotating coordinates and finally we have x_ P=B ¼ vP=B ¼ vP=B
rel
þ
ω xP=B so collecting all these results we can write Eq. (4.1.9) as
aP ¼ aB þ α xP=B þ ω ω xP=B þ aP=B
rel
þ 2ω vP=B
rel
ð4:1:12Þ
4.1 Relative Velocity and Acceleration 241
Consider first the case of cylindrical coordinates. The origin, O, of this coordinate
system is fixed (vO ¼ aO ¼ 0) but the unit vectors (er, eθ, ez) rotate about the z-axis
with an angular velocity ω ¼ θ_ ez . Thus, since in the rotating coordinate system
where the position vector to a point P is xP/O ¼ rer+zez we have
vP ¼ vO þ vP=O
rel
þ ω xP=O
¼ 0 þ r_ er þ z_ ez þ θ_ ez ðrer þ zez Þ ð4:1:13Þ
¼ r_ er þ r θ_ eθ þ z_ ez
€ z,
which is just Eq. (1.3.10). Similarly, to calculate the acceleration we have α ¼ θe
rel
vP=O ¼ r_ er þ z_ ez , aP=O
rel
¼ €r er þ €zez so that
aP ¼ aO þ α xP=O þ ω ω xP=O þ aP=O rel
þ 2ω vP=Orel
€ z ðrer þ zez Þ þ θ_ ez θ_ ez ðrer þ zez Þ
¼ 0 þ θe ð4:1:14Þ
þ €r er þ €zez þ 2θ_ ez r_ er þ z_ ez
dθ
ω1 = φ&e z
dt
ω 2 = θ&eφ
O O
y
dφ y
φ
dt
x x
(a) (b)
Fig. 4.4 In spherical coordinates, the total angular velocity of the coordinates is composed of (a) an
angular velocity, ϕ_ , about the z-axis, and (b) an angular velocity, θ_ , in the eϕ direction (normal to
the ϕ z plane)
Spherical coordinates are more complicated since the total angular velocity of the
(eR, eθ, eϕ) unit vectors (see Fig. 4.4) is
ω ¼ ϕ_ ez þ θ_ eϕ
¼ ϕ_ ð cos θeR sin θeθ Þ þ θ_ eϕ ð4:1:16Þ
¼ ϕ_ cos θeR þ θ_ eϕ ϕ_ sin θeθ
vP ¼ vO þ vP=O
rel
þ ω xP=O
¼ 0 þ R_ eR þ ϕ_ cos θeR þ θ_ eϕ ϕ_ sin θeθ ReR ð4:1:17Þ
¼ R_ eR þ Rθ_ eθ þ Rϕ_ sin θeϕ
rel
which is the same as Eq. (1.3.19). For the acceleration we need vP=O ¼ R_ eR ,
€
aP=O ¼ ReR . Also,
rel
€ z þ θe
α ¼ ϕe € ϕ þ θ_ ω eϕ
€ z þ θe
¼ ϕe € ϕ þ θ_ ϕ_ cos θeθ ϕ_ sin θeR ð4:1:18Þ
¼ ϕ€ cos θ θ_ ϕ_ sin θ eR þ θe
€ ϕ þ ϕ€ sin θ θ_ ϕ_ cos θ eθ
4.2 Relative Motion and the Transport Theorem 243
so that
aP ¼ aO þ α xP=O þ ω ω xP=O þ aP=O rel
þ 2ω vP=O
rel
¼ 0 þ θe€ ϕ þ ϕ€ sin θ θ_ ϕ_ cos θ eθ ReR
ð4:1:19Þ
þ ϕ_ cos θeR þ θ_ eϕ ϕ_ sin θeθ Rθ_ eθ þ Rϕ_ sin θeϕ
€ R þ 2 ϕ_ cos θeR þ θ_ eϕ ϕ_ sin θeθ R_ eR
þ Re
Carrying out all the cross products and grouping terms we have
€ θ þ Rϕ€ sin θ þ Rθ_ ϕ_ cos θ eϕ
aP ¼ Rθe
þ Rθ_ ϕ_ cos θeϕ Rϕ_ 2 sin θ cos θeθ Rθ_ 2 eR Rϕ_ 2 sin 2 θeR
€ R þ 2R_ θ_ eθ þ 2R_ ϕ_ sin θeϕ
þ Re
ð4:1:20Þ
¼ R€ Rθ_ 2 Rϕ_ 2 sin 2 θ eR
þ Rθ€ þ 2R_ θ_ Rϕ_ 2 sin θ cos θ eθ
þ Rϕ€ sin θ þ 2Rθ_ ϕ_ cos θ þ 2R_ ϕ_ sin θ eϕ
The results shown in the previous section for the velocity and acceleration as
computed in fixed (inertial) and moving coordinate systems are based on a relation
that is valid for vectors in general when we take derivatives of those vectors. Any
vector, p, for example, can be measured in a fixed (inertial) I ¼ (X, Y, Z) system as
p ¼ pX Ex þ pY EY þ pZ EZ ð4:2:1Þ
and the time derivative of this vector, as measured in the inertial system, I, (dp/dt)I,
would just be
dp d
¼ ðpX EX þ pY EY þ pZ EZ Þ
dt I dt
ð4:2:2Þ
dp dp dp
¼ X EX þ Y EY þ Z EZ
dt dt dt
dp d
¼ p e x þ p y e y þ pz e z
dt I dt x
dpx dpy dpz dex dey dez
¼ ex þ ey þ e z þ px þ py þ pz ð4:2:3Þ
dt dt dt dt dt dt
dp
¼ þ px ω e x þ py ω e y þ p z ω e z
dt R
where (dp/dt)R is the derivative of p as seen in the rotating coordinates, R (p here can
be any vector so (dp/dt)R is the generalization of the velocity and acceleration terms
labeled as “relative” earlier and denoted by a “rel” superscript). Rearranging the
second term on the right side of Eq. (4.2.3) we can write that relationship as
dp dp
¼ þωp ð4:2:4Þ
dt I dt R
which is called the transport theorem. In many cases authors will assume that a time
derivative term taken where the ( )I subscript is missing will implicitly mean that
such a derivative is with respect to an inertial system and write the transport theorem
simply as
dp dp
¼ þωp ð4:2:5Þ
dt dt R
However, in some complex relative motion problems it is advisable to keep the more
explicit form of Eq. (4.2.4). There is another change in the notation we will use to
write the transport theorem that is important. The angular velocity, ω, is the angular
velocity of the rotating R coordinates relative to the inertial I coordinates. To make
this more explicit we will write ω ¼ IωR so that Eq. (4.2.4) then becomes
dp dp
¼ þ I ωR p ð4:2:6Þ
dt I dt R
This notation is a bit more cumbersome but useful since the transport equation in the
form of Eq. (4.2.6) is also valid for any two coordinate systems (R1, R2), i.e.,
dp dp
¼ þ R1 ωR2 p ð4:2:7Þ
dt R1 dt R2
where the time derivatives are those seen in coordinates (R1, R2), and R1 ωR2 is the
angular velocity of coordinates R2 relative to the R1 coordinates. These coordinate
systems are also sometimes called frames. Thus, Eq. (4.2.7) relates the time deriv-
ative taken in the R1 frame to the time derivative taken in the R2 frame and R1 ωR2 is
the angular velocity of the R2 frame as seen in the R1 frame. The proof of Eq. (4.2.7)
follows the same steps used to derive Eq. (4.2.6) so we will not show them here.
4.2 Relative Motion and the Transport Theorem 245
frame C
where we have used the fact that r is fixed in C so that its time derivative is zero in
that frame. Combining the results in Eq. (4.2.8) and relating the motion in frame A to
the motion in frame C we have
dr
¼ ðA ωB þ B ωC Þ r
dt A
ð4:2:9Þ
dr dr
¼ þ A ωC r ¼ A ωC r
dt A dt C
ðA ωC A ωB B ωC Þ r ¼ 0 ð4:2:10Þ
which, since r is an arbitrary fixed vector, yields the addition theorem for angular
velocities in this case as
246 4 Kinematics and Relative Motion
A ωC ¼ A ωB þ B ωC ð4:2:11Þ
This result is easily generalized to very complex cases. For example, when there are
N multiple coordinate systems (R1, R2, . . ., RN) and we want to calculate, say, the
time derivative of a vector in an inertial coordinate system I in terms of the derivative
in the RN system using the transport theorem, then we need to find the relative
angular velocity, I ωRN , that appears in that theorem. We can obtain this velocity from
the relative angular velocity addition theorem as
With the right choice of the coordinate frames computing and then summing the
angular velocity terms on the right side of Eq. (4.2.12) are usually easier than trying
to calculate I ωRN itself directly.
We can differentiate the relative angular velocity addition theorem of Eq. (4.2.12)
and use the transport theorem to obtain a relation between the angular accelerations.
If, for example, there is the inertial frame I and two other frames A and B we have
d I ωB
I αB
dt I
d I ωA d A ωB
¼ þ
dt I dt I ð4:2:13Þ
d I ωA d A ωB
¼ þ þ I ωA A ωB
dt I dt A
¼ I αA þ A αB þ I ωA A ωB
We can also use the transport theorem to relate the angular velocities AωB and BωA
themselves since for any vector p
dp dp
¼ þ A ωB p
dt A dt B
ð4:2:14Þ
dp dp
¼ þ B ωA p
dt B dt A
ðB ωA þ A ωB Þ p ¼ 0 ð4:2:15Þ
B ωA ¼ A ωB ð4:2:16Þ
4.2 Relative Motion and the Transport Theorem 247
which makes physical sense since, for example, if you are standing on a merry-go-
round and rotating with it you will see the stationary bystanders as if they are rotating
in the opposite sense of the merry-go-round.
We can express all of the results of Sect. 4.4.1 in terms of the notation used in
Eq. (4.2.6). For example, the relative velocity relationship of Eq. (4.1.7) can also be
written as
x_ P=B I
¼ x_ P=B R þ I ωR xP=B ð4:2:17Þ
Note that if the angular velocity of the R frame, IωR, is expressed in terms of unit
vectors of another frame, a, that is rotating with an angular velocity, Iωa, we would
have
d I ωR dI ωR
I αR ¼ þ I ωa I ωR ð4:2:20Þ
dt I dt a
We will see the use of this result in Chap. 8 when we examine the motion of a rigid
body in a frame other than one attached to the body itself.
An important special case of the relative velocity and acceleration expressions that is
applicable to rigid bodies is where we take a moving coordinate system to have the
248 4 Kinematics and Relative Motion
motion of a particular point, say C, of the rigid body and we let the coordinate system
also rotate with the rigid body. Then for any other point A in the rigid body there is
no velocity or acceleration of point A relative to C as measured in a coordinate
system moving with the rigid body since the distance must remain constant between
any two points in a rigid body. Thus, Eqs. (4.2.18) and (4.2.19) become, for a rigid
body,
vA=O I
¼ vC=O I þ ω xA=C ð4:2:21aÞ
and
aA=O I
¼ aC=O I þ α xA=C þ ω ω xA=C ð4:2:21bÞ
where ω and α are the angular velocity and angular acceleration of the rigid body as
measured in the inertial frame I. These relations show that if we can find the motion
of a point C of the rigid body and the rotational motion of the rigid body we then use
these relations to find the motion of any other point A in the rigid body. From Chap. 3
we saw that the Newton-Euler equations relate the acceleration of the center of mass
point, C, of a rigidly constrained system of particles to the net external force acting
on the system and also relate the net external moment to the angular acceleration of
the system. Thus, if we solve the equations of motion for the rigid system we can,
with the use of Eqs. (4.2.21a) and (4.2.21b) determine the velocity and acceleration
of all particles in the rigid system. This is also true for rigid bodies composed of a
continuously distributed mass.
In the special case where we consider the motion of a two-dimensional rigid body
in planar motion, these relative velocity and acceleration expressions can be made
more explicit. Consider, for example, a rigid body that resides in the X–Y plane is
translating in that plane and rotating about the Z-axis in an inertial X, Y, Z coordinate
system with origin at O (Fig. 4.6). In this case the angular velocity of the body with
respect to the inertial system is ω ¼ ω EZ and the angular acceleration α ¼ αEZ,
x A/ O C
θ
xC / O
EY
O EX X
4.2 Relative Motion and the Transport Theorem 249
rA / C ω rA / Cα
et A et A rA/ Cω 2
rA/ C e
n
C ( vC /O )I ( aC / O ) I
C
(a) (b)
Fig. 4.7 For the rigid body of Fig. 4.6 in planar motion: (a) the velocity of point C, (vC/O)I, and the
relative velocity of point A with respect to point C, (vA/C)I ¼ rA/Cωet, and (b) the acceleration of
point C, (aC/O)I, and the relative acceleration of point A with respect to point C, (aA/C)I ¼ rA/Cαet+rA/
Cω en
2
where ω ¼ θ_ , α ¼ θ,
€ in terms of the angle θ that the body makes with respect to the
X-axis (Fig. 4.6). The relative velocity term, ω xA/C, is given by
where rA/C ¼ |xA/C| is the distance from C to A, eA/C is a unit vector directed along the
line from C to A, and et ¼ EZ eA/C is a unit vector in the X–Y plane perpendicular to
the line from C to A (Fig. 4.7a). Since the distance from C to A is fixed, the relative
motion of C with respect to A at any given instant is a circular motion of radius rA/C
about point A and et is a unit vector tangent to that circular path. Thus, the relative
velocity expression is
vA=O I ¼ vC=O I þ r A=C ω et ð4:2:23aÞ
If we implicitly assume that the velocities of A and C are measured with respect to an
inertial system we can write Eq. (4.2.23a) in the simpler form
vA ¼ vC þ r A=C ω et ð4:2:23bÞ
The relative acceleration expression, Eq. (4.2.21b), also simplifies for planar motion.
The relative acceleration term α xA/C reduces like the relative velocity term to
(Fig. 4.7b)
where en ¼ EZ et is a unit vector in the X–Y plane directed along the line from A to
C (Fig. 4.7b), i.e., it is normal to the circular path that point A takes relative to point
C at that instant. The relative acceleration expression then becomes
aA=O I
¼ aC=O I þ r A=C α et þ r A=C ω2 en ð4:2:26aÞ
These reduced and explicit terms for the relative velocity and acceleration terms for
the planar motion of a rigid body allow one to examine the planar motion kinematics
of interconnected systems of rigid bodies in a very simple manner using graphical or
vector-based approaches. Many introductory dynamics books apply these equations
to find the velocities and accelerations or angular velocities and accelerations of rigid
bodies, usually at fixed instances of time, so that all the calculations can be done by
hand. For example, consider the slider-crank mechanism shown in Fig. 4.8 where a
slider (piston) P is connected to two rods. Rod AB is the crankshaft and rod BC the
connecting rod. We will label bar AB as body (1), the rod BC as body (2), and the
sliding piston P as body (3). The labels of these bodies are shown in Fig. 4.8. In this
example we specify that the crankshaft is driven with a constant clockwise angular
velocity of 6 rad/s, as shown in Fig. 4.8, and we wish to determine the velocity and
acceleration of the piston at the time when the mechanism is in the position shown in
Fig. 4.8. We can solve problems of this type by successively applying the relative
velocity and acceleration expressions just developed for planar motion. Consider
first the velocity analysis, where the velocities and relative velocities needed are
shown in Fig. 4.9a. For the crankshaft (body 1) we have for the relative velocity
relationship between points A and B
13 in.
5 in. (1)
EY (2) piston P
6 rad/sec
A EX
C (3)
X
12 in.
4.2 Relative Motion and the Transport Theorem 251
of the slider-crank
( 2)
Bω
mechanism seen in Fig. 4.8, B
showing (a) the linear and r1
angular velocities needed to r2 v(y3) = ω (3) = 0
determine the velocity of the (1) 5
ω vx( ) = vP
3
piston, P, and (b) the linear 12
5 C C
and angular accelerations A
(and angular velocities) 12
needed to determine the
r2 ω (
2)
acceleration of the piston
(a)
(1)
r1α
( 2)
B B α ω ( 2) = 0
( )
2
(1)
r1 ω
a(y ) = α ( ) = 0
3 3
r1 r2
( )
2
5 ( 2)
α (1)
=0 r2 ω a(x ) = aP
3
12 C
5 C
A
12
r2 α ( 2)
(b)
where we have used the fact that the crankshaft is pinned to the fixed ground at A and
ð1Þ
so has no velocity, and we let et ¼ EX . [Note that if we had chosen to calculate the
cross product expression for the relative velocity term directly we would have to
set ω(1) ¼ 6EZ and xB/A ¼ 5EY.] For the connecting rod, relating points B and C
we have
where we have assumed that the unknown angular velocity of the rod is ω(2) in the
direction shown in Fig. 4.9a and have used the fact that the rods are pinned to each
252 4 Kinematics and Relative Motion
other at point B and so have the same velocity. [To calculate the relative velocity
ð2Þ
term with the cross product we would use ω(2) ¼ ω(2)EZ and xC=B ¼ 12EX 5EY .]
But the velocity of the piston is along the X-direction only and is the same as that of
point C so we have
ð2Þ
vC ¼ vP EX ¼ 30 5ωð2Þ EX 12ωð2Þ EY
which gives ω(2) ¼ 0, vP ¼ 30 in./s, yielding the answer for the velocity of the piston
as vP ¼ 30EX in./s. At this instant of time the angular velocity of the connecting rod
is zero, but at earlier or later times where the positions have changed this will not be
true so that the angular acceleration of the connecting rod is not necessarily zero, as
we will see. To obtain the acceleration of the piston we proceed in a similar fashion,
using the relative acceleration expressions (see Fig. 4.9b). For the crankshaft, since
its angular velocity is a constant, α(1) ¼ 0 and we have
ð1Þ ð1Þ ð1Þ ð1Þ
aB ¼ aA þ αð1Þ xB=A þ ωð1Þ ωð1Þ xB=A
ð1Þ ð1Þ 2
¼ aA þ r 1 αð1Þ et þ r 1 ωð1Þ eðn1Þ
¼ 0 þ ð5Þð0ÞEX þ ð5Þð36ÞðEY Þ
¼ 180EY in:=s
where we have used the fact that the acceleration is the same for bodies 1 and 2 at
point B since they are connected by a pin at that point. Since the acceleration of the
piston is the same as the acceleration of point C and is along the X-direction we find
ð2Þ
aC ¼ aP EX ¼ 5αð2Þ EX 180 þ 12αð2Þ EY
which yields α(2) ¼ 15 rad/s2 and the answer for the acceleration of the piston as
aP ¼ 75EX in./s2.
There are several important features of this kinematics problem that we should
mention. First, we see that we need to solve for the unknown linear and/or angular
velocities from the relative velocity relations before we can perform the acceleration
4.2 Relative Motion and the Transport Theorem 253
analysis. These relative velocity and relative acceleration relations are linear, so that
it is easy to obtain their solution. Note, however, that we did not have to perform a
positional analysis since the positions and angles of the bodies were given at the
particular time at which the calculations were performed. Positional relations, as we
will see, are generally nonlinear and so may require a numerical solution. Second,
this problem was an example of a one degree of freedom kinematically driven
mechanism, which means that if we specify the motion, say, of the single generalized
coordinate, θ1(t), of the crankshaft, for example (which also means we know the
angular velocity, θ_ 1 , and angular acceleration, θ€1 , of the crankshaft) then we can
solve for the motion of any other parts in the mechanism such as the piston. We did
not state that fact up front but simply assumed that we could find the motion of the
piston from the given information. Clearly, this fixed time type of a kinematic
analysis gives us a very limited view of the actual dynamical motion of the
mechanism so that it is important to determine the motion of kinematically driven
systems at any time, which we will now do.
Consider the slider-crank problem again, but now let us examine the mechanism
when it is in a general position and let the lengths of the crankshaft and connecting
rod be (l1, l2), respectively (Fig. 4.10). The geometry of this mechanism at any time
can be completely described if we know the values of the angles (θ1(t), θ2(t)) and the
displacement of the piston, XP(t), at any time t. These generalized coordinates for the
mechanism, however, are not independent, so we must examine the constraints
present. Note that regardless of these angles and displacement the vector from A to
B plus the vector from B to C plus the vector from C to A must add up to zero, i.e.,
AB+BC+CA ¼ 0. This is called the loop closure equation. Explicitly, in terms of
geometry of Fig. 4.10 we have
EY piston P
θ2
θ1
A C
EX X
XP
254 4 Kinematics and Relative Motion
l1 cos θ1 þ l2 cos θ2 X P ¼ 0
ð4:2:28Þ
l1 sin θ1 l2 sin θ2 ¼ 0
which are two constraint equations for the three generalized coordinates (θ1, θ2, XP).
This clearly shows that the slider-crank is indeed a one degree of freedom system. If
we specify, say, the crankshaft motion, θ1(t), then we see that in principle
Eq. (4.2.28) can be solved for the other two coordinates in terms of θ1. However,
as mentioned previously, solving these positional relations is not as easy as using the
velocity and acceleration relations since the positional relations are generally
nonlinear. In this simple case this is not a particular problem since we can rewrite
these equations as
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
X P ¼ l1 cos θ1 l2 1 sin 2 θ2
ð4:2:29Þ
sin θ2 ¼ l1 sin θ1 =l2
Placing the second equation in Eq. (4.2.29) into the first equation and solving the
second equation directly give
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
X P ¼ l1 cos θ1 l22 l21 sin 2 θ1
ð4:2:30Þ
1 l1 sin θ1
θ2 ¼ sin
l2
where the plus or minus sign in the first equation in Eq. (4.2.30) depends on whether
the piston is started out to the right or left of point B. Note that we must have
|l1 sin θ1/l2| 1 in order to have a real solution for θ2. Obviously, we can always
guarantee this is the case if l1/l2 < 1. While we do have an analytical solution
available for this problem, more complex problems will typically require a numerical
solution. In Sect. 4.2.5 we will examine how to obtain numerical solutions to such
systems of nonlinear algebraic equations.
Now, let us consider the velocity and acceleration analysis for this problem where
we obtain expressions that will allow us to examine the motion of the slider-crank
mechanism for all times t. One way to do this analysis is to differentiate the
positional equations of Eq. (4.2.28) on time. Taking one derivative of these equa-
tions, for example, yields the set of linear equations
" #( ) ( )
1 l2 sin θ2 X_ P l1 θ_ 1 sin θ1
¼ ð4:2:31Þ
0 l2 cos θ2 θ_ 2 l1 θ_ 1 cos θ1
which we can either solve explicitly for the generalized velocities X_ P ; θ_ 2 or leave
in this form and obtain the solution numerically. A second approach is to use the
relative velocity relations. Following the same steps as used previously we have (see
Fig. 4.11a) for the crankshaft
4.2 Relative Motion and the Transport Theorem 255
l1θ&1
B
θ1
B
θ&2
l1
l2 v (y ) = θ&3 = 0
3
θ& θ2
vx( ) = X& P
3
1
θ1 C C
A θ2
l2 θ&2
(a)
l1θ&&1
B
θ1 B θ&&
l1θ&12
2
l1 l2 v (y3) = θ&3 = 0
θ&&1 θ2
l2 θ&22 a(x ) = X&&P
3
θ1 C C
A
θ2
l2 θ&&2
(b)
Fig. 4.11 (a) The three bodies of the slider-crank mechanism shown in Fig. 4.10, showing (a) the
linear and angular velocities needed to determine the velocities of the system, and (b) the linear and
angular accelerations (and angular velocities) needed to determine the accelerations of the system
vB ¼ vA þ l1 θ_ 1 et
ð1Þ ð1Þ ð1Þ
ð4:2:32Þ
¼ 0 þ l1 θ_ 1 ð sin θ1 EX þ cos θ1 EY Þ
vC ¼ vB þ l2 θ_ 2 et
ð2Þ ð2Þ ð2Þ
which are identical to the matrix system of equations in Eq. (4.2.31). For the
acceleration analysis we can differentiate these velocity equations once again on
time to yield the linear equations
" #( ) ( )
1 l2 sin θ2 €P
X l2 θ_ 22 cos θ2 l1 θ€1 sin θ1 l1 θ_ 21 cos θ1
¼ ð4:2:35Þ
0 l2 cos θ2 θ€2 l2 θ_ 2 sin θ2 þ l1 θ€1 cos θ1 l1 θ_ 2 sin θ1
2 1
which can be solved for X€ P ; θ€2 . Alternatively, we can use the relative acceleration
expressions. For body 1 we have
aB ¼ aA þ l1 θ€1 et þ l1 θ_ 21 eðn1Þ
ð1Þ ð1Þ ð1Þ
aC ¼ aB þ l2 θ€2 et þ l2 θ_ 22 eðn2Þ
ð2Þ ð2Þ ð2Þ
Fig. 4.12 Kinematic analysis of the crank-slider, showing (a) the angle of the crank (deg) versus
time, (b) the velocity of the slider (in./s) versus time, and (c) the angular velocity (rad/s) of the
connecting rod versus time. The marked points are the values approximately at the time when the
position of the mechanism is as shown in Fig. 4.8
-250 -15
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
(a) (b)
Fig. 4.13 Kinematic analysis of the slider-crank, showing (a) the acceleration of the slider in in. /s2
versus time, and (b) the angular acceleration of the connecting rod in rad/s2 versus time. The marked
points are values approximately at the time when the position of the mechanism is as shown in
Fig. 4.8
that at the specific time of t ¼ 0.7856 s, when the mechanism is close to the
configuration of Fig. 4.8, the acceleration of the piston is X€ P ¼ aP ¼ 74:81 in:=s2
€
and the angular acceleration of the connecting rod is θ2 ¼ 15 rad=s2 , which again
agree closely with our previous analytical results. The position of the piston, XP(t),
and the angle of the connecting rod, θ2(t), are also calculated in the script but not
plotted. With all the calculated results the relative velocity and acceleration equa-
tions can be used to evaluate the velocity and acceleration at any point in the slider-
crank mechanism.
Using the MATLAB® function animate_lines described in Chap. 3 it is easy to
see the slider-crank motion explicitly for this problem (see Problem P4.17).
If a rigid body mechanism such as the slider-crank is not designed properly, there can
be situations where the mechanism will “lock up” and a smooth progression of the
motion ceases. To see this, let’s obtain the explicit solution of the linear velocity
equations of Eq. (4.2.31). We have
1
X_ P ¼ l1 l2 θ_ 1 sin θ1 cos θ2 l1 l2 θ_ 1 cos θ1 sin θ2
l2 cos θ2
1
¼ l1 l2 θ_ 1 sin ðθ1 þ θ2 Þ ð4:2:39Þ
l2 cos θ2
1 _
θ_ 2 ¼ l1 θ 1 cos θ1
l2 cos θ2
4.2 Relative Motion and the Transport Theorem 259
1
θ_ 1 ¼ l2 cos θ2 X_ P
l1 l2 sin ðθ1 θ2 Þ
ð4:2:41Þ
1
θ_ 2 ¼ l1 cos θ1 X_ P
l1 l2 sin ðθ1 θ2 Þ
l1
XP
(b)
As seen in the slider-crank example, the relative velocity and acceleration expres-
sions lead to a system of linear equations for the unknown velocities or accelerations.
The constraint equations which relate the unknown generalized coordinates to the
known “driving” coordinate(s), however, are not linear so that it may be difficult, as
mentioned previously, to find a closed-form analytical solution as done in the slider-
crank example. Thus, it is necessary to have a way to obtain this solution numeri-
cally. One way to do this is through the use of the Newton-Raphson method, which is
a well-known method for solving systems of nonlinear algebraic equations. In this
section we will discuss this method from a general standpoint where we have
n nonlinear constraint equations for n generalized coordinates q ¼ (q1, q2, . . ., qn)
of the form
f i ðq; t Þ ¼ 0 ði ¼ 1; 2; . . . ; nÞ ð4:2:43Þ
θ1 þ 6t θ10 ¼ 0
l1 cos θ1 þ l2 cos θ2 X P ¼ 0 ð4:2:44Þ
l1 sin θ1 l2 sin θ2 ¼ 0
To solve the constraint equations, Eq. (4.2.43), we start with a guess for the solution
as q~p at some fixed time, tk. If we expand these functions in a Taylor series about this
guess we have to first order
Xn
∂f i
f i ðq; t k Þ ¼ f i q~ ; t k
p
þ
qm q~mp ð4:2:45Þ
m¼1
∂qm q¼q~p , t¼tk
where we assume that qm q~mp is small enough so that we can neglect all higher
order terms. The matrix of derivatives
of the constraint functions is called the
constraint Jacobian matrix, f q q~p ; t k , where
2 3
∂f 1 =∂q1 ∂f 1 =∂q2 ... ∂f 1 =∂qn
6 7
6 ∂f 2 =∂q1 ∂f 2 =∂q2 ... ∂f 2 =∂qn 7
f q q ; tk ¼ 6
~p
6
7
7 ð4:2:46Þ
4 5
∂f n =∂q1 ∂f n =∂q2 ... ∂f n =∂qn
If the constraint equations are independent, we generally expect the Jacobian matrix
to be non-singular and have an inverse so that we can solve Eq. (4.2.47) to yield
p p
q ¼ q~p f 1
q q ~ ; t k f q~ ; t k ð4:2:48Þ
and we can take q as an updated guess, q~pþ1 , which then can be placed back into
Eq. (4.2.48) to solve for the next updated set of values in the same manner. Thus, we
successively perform the updates
p p
q~pþ1 ¼ q~p f 1
q q ~ ; t k f q~ ; t k ðp ¼ 1; 2; . . .Þ ð4:2:49Þ
262 4 Kinematics and Relative Motion
until we reach some desired accuracy in the result. One way to specify this is to
ensure that the magnitudes of the constraint functions themselves are sufficiently
small, i.e.,
p
f q~ ; t k
ftol ð4:2:50Þ
where ftol is a user-specified tolerance. One can also specify an upper limit on the
number of iterations, Niter, i.e., p Niter, and a maximum
allowable
value, maxval,
on the magnitude of the constraint functions, i.e.,
f q~p ; t k
maxval, since if the
initial guess is not close enough to the actual solution or the system is near a singular
configuration the solution may diverge or converge too slowly. Note that to imple-
ment the Newton-Raphson approach we need to evaluate the constraint functions as
well as the elements of the Jacobian matrix at the successive approximation values.
For the slider-crank problem, therefore, we need to have the values of the constraint
functions
8 9 8 9
<f1 >
> = >
< θ1 þ 6t θ10 >
=
f ¼ f 2 ¼ l1 cos θ1 þ l2 cos θ2 X P ð4:2:51Þ
: >
> ; >
: >
;
f3 l1 sin θ1 l2 sin θ2
where @fun and @jac are function handles for the constraint and Jacobian functions,
which here are the functions slider_crank_f and slider_crank_J, respectively; the
scalar t is the time; and x0 is a row vector containing an initial guess for the solution
to this problem. The parameter, ftol, is a user-supplied error tolerance based on the
magnitude of the constraint functions and varargin is an optional set of additional
parameters that are input arguments for the constraint and Jacobian functions
(besides the t and x). Here, varargin is replaced by d1, d2, and ang10, where
ang10 ¼ θ10. Note that all of these optional parameters must be included as input
arguments to both the constraint function and the Jacobian, even if not all of the
parameters are used in both of those functions. The output argument, x, is a 3 1
column vector containing the approximate values of the three generalized coordi-
nates, (θ1, θ2, XP), at the time, t, and iter is a scalar which contains the numbers of
iterations needed at time, t, to find a solution. [Note: Within the newton_raph
function there is an error tolerance variable jtol ¼ e-10. If the determinant of the
Jacobian matrix is less than this tolerance an error message is generated that the
Jacobian is singular. There is also an internal variable maxval ¼ 10,000. If any of the
position functions exceed this value an error message is generated that the iterative
procedure is diverging. Finally, there is an internal variable Niter ¼ 100 that
specifies the maximum allowable number of iterations. If this limit is reached an
error message is generated that there is no convergence for the iterative process. To
change any of these internal variables within newton_raph one has to edit that
function and then save it.]
To illustrate the use of the Newton-Raphson scheme for the slider-crank problem
a MATLAB® function slider_crank_sol2 was also written which has the calling
sequence
[xout, numit] = slider_crank_sol2(tspan ,x0, d1, d2, ang10, ftol)
where tspan is a row vector of times at which we want to solve the position constraint
equations. This function calls the MATLAB® Newton-Raphson function and the
functions slider_crank_f and slider_crank_J at each of these times to generate the
approximate solutions. The output argument, xout, contains all of the approximate
values of the three generalized coordinates, (θ1, θ2, XP), in its three columns at the
times specified in tspan and numit is a column vector which contains the numbers of
iterations needed to find a solution at those times.
Finally, we have generated a MATLAB® script slider_crank_newton_sim2,
which sets up default values of d1 ¼ 5 in., d2 ¼ 13 in., ang10 ¼ 0, ftol ¼ e-10,
tspan ¼ linspace(0, 1500), and x0 ¼ [0, 0, 18] for the case we have been considering,
where the initial guess contains the exact starting values at t ¼ 0. All these values can
be changed in the command window before executing the script to override the
defaults. This script evaluates the exact analytical solutions (based on Eq. (4.2.30)
and θ1(t) ¼ θ10 6 t) at the specified times in tspan and then calls the
slider_crank_sol2 function to obtain the approximate values of these variables at
the same times with the Newton-Raphson method. The script then plots the exact and
264 4 Kinematics and Relative Motion
0.3 0.3
0.2 0.2
0.1 0.1
0 0
-0.1 -0.1
-0.2 -0.2
-0.3 -0.3
-0.4 -0.4
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
(a) (b)
Fig. 4.16 The angle of the connecting rod versus time from (a) the exact analytical solution, and
(b) the approximate numerical solution using the Newton-Raphson method
Fig. 4.17 The displacement of the slider versus time from (a) the exact analytical solution, and (b)
the approximate numerical solution using the Newton-Raphson method
so that the convergence of the solution with the Newton-Raphson method was quite
fast. If the initial guess only approximated the initial conditions, however, there will
be some increase in the maximum number of iterations. This increase should not be
large, however, as long as the initial guess is relatively close to the exact initial
values. More iterations will also be needed, of course, if the time interval between
solutions is increased.
In the preceding example the default initial guesses for the solution at t1 ¼ 0 were the
exact initial conditions while subsequent starting guesses at later times, tk, were
simply taken to be the final values of the Newton-Raphson iteration process coming
from the previous time, tk1. This may only be effective, however, if we use very
small time steps. But if we differentiate the position constraints on time we can use
the resulting velocity and acceleration forms of the constraint equations to provide
improved guesses at each instant.
If we differentiate the constraint equations on time, for example, we have
d f=dt ¼ f q q_ þ f t ¼ 0 ð4:2:53Þ
where
8 9
< ∂f 1 =∂t >
> =
f t ¼ ∂f 2 =∂t ð4:2:54Þ
>
: >
;
∂f 3 =∂t
and since we already have the Jacobian we have the linear system of equations
f q q_ ¼ f t ð4:2:55Þ
which we can solve numerically for the generalized velocities. Taking another
derivative on time gives
€ þ f q q_ q q_ þ 2f qt q_ þ f tt ¼ 0
d 2 f=dt 2 ¼ f q q ð4:2:56Þ
where
8 9
>
> ∂
2
f =∂t 2>
>
>
>
1 >
>
< 2 2=
∂ f 2 =∂t
f tt ¼ ð4:2:57aÞ
>
> >
>
>
> >
>
: 2 2;
∂ f n =∂t
266 4 Kinematics and Relative Motion
2 2 2 2
3
∂ f 1 =∂q1 ∂t ∂ f 1 =∂q2 ∂t ∂ f 1 =∂qn ∂t
6 2 7
6 ∂ f 2 =∂q1 ∂t 2
∂ f 2 =∂q2 ∂t ∂ f 2 =∂qn ∂t 7
2
f qt ¼ 6
6
7
7 ð4:2:57bÞ
4 5
2 2 2
∂ f n =∂q1 ∂t ∂ f n =∂q2 ∂t ∂ f n =∂qn ∂t
We can let f q q_ q ¼ Fq where F ¼ f q q_ is given by the vector
8 9
> F1 >
> >
<F >
> =
2
F¼
> >
> >
: >
> ;
Fn
8 9
> ð∂f 1 =∂q1 Þq_ 1 þ ð∂f 1 =∂q2 Þq_ 2 þ þ ð∂f 1 =∂qn Þq_ n >
>
>
< ð∂f =∂q Þq_ þ ð∂f =∂q Þq_ þ þ ð∂f =∂q Þq_ >
> =
2 1 1 2 2 2 2 n n
¼ ð4:2:58aÞ
>
> >
>
>
: >
;
ð∂f n =∂q1 Þq_ 1 þ ð∂f n =∂q2 Þq_ 2 þ þ ð∂f n =∂qn Þq_ n
and, finally,
f q q_ q_ ¼ Fq q_
8 9
> ∂F 1 =∂q1 q_ 1 þ ∂F 1 =∂q2 q_ 2 þ þ ∂F 1 =∂qn q_ n >
>
> >
< ∂F =∂q q_ þ ∂F =∂q q_ þ þ ∂F =∂q q_ > =
2 1 1 2 2 2 2 n n
¼ ð4:2:58cÞ
>
> >
>
>
: >
;
∂F n =∂q1 q_ 1 þ ∂F n =∂q2 q_ 2 þ þ ∂F n =∂qn q_ n
From Eq. (4.2.56) we obtain the system of linear equations for the accelerations
€ ¼ bv
f qq ð4:2:59Þ
For the slider-crank problem we have for ft and the velocity equations
8 9 2 38 9 8 9
_
< 6 >
> = 1 0 0 < θ1 >
> < 6 >
= > =
6 7
ft ¼ 0 , 4 l1 sin θ1 l2 sin θ2 1 5 θ_ 2 ¼ 0 ð4:2:61Þ
>
: >
; >
: ; >
> : >
;
0 l1 cos θ1 l2 cos θ2 0 X_ P 0
and so
2 3
0 0 0
6 7
Fq ¼ 4 l1 cos θ1 θ_ 1 l2 cos θ2 θ_ 2 05 ð4:2:63Þ
l1 sin θ1 θ_ 1 l2 sin θ2 θ_ 2 0
and
8 9
>
< 0 >
=
bv ¼ Fq q_ ¼ l1 cos θ1 θ_ 21 þ l2 cos θ2 θ_ 22 ð4:2:64Þ
>
: >
;
l1 sin θ1 θ_ 2 l2 sin θ2 θ_ 2
1 2
which is also consistent with our previous acceleration results (see Eq. (4.2.35)).
The way in which these velocity and acceleration values can be used in improving
the positional analysis is that instead of using the values of q~k from the kth step as the
initial guess for the q~kþ1 values at step (k+1), we can update instead, knowing the
€k , at the kth step, via
values of the velocities, q_ k , and accelerations, q
268 4 Kinematics and Relative Motion
1
q~kþ1 ¼ q~k þ q_ k Δt þ q€ Δt 2 ð4:2:66Þ
2 k
where Δt ¼ tk+1 tk is the time step. To calculate the q_ ; q € values we need a
function that uses the Jacobian matrix, fq, and the vectors, ft and bv, and returns those
values at a given time, t. See Problem P4.2 which asks you to implement this
improved updating by incorporating Eq. (4.2.66) into the Newton-Raphson method.
f¼0
f q q_ ¼ f t ð4:2:67Þ
€ ¼ bv
f qq
15
10
-5
-10
-15
0 0.2 0.4 0.6 0.8 1
(c)
Fig. 4.18 Simulated kinematics of the slider_crank connecting rod for (a) its angular position in
radians versus time, (b) its angular velocity in rad/s versus time, and (c) its angular acceleration in
rad/s2 versus time
coordinate system (called here the earth frame E) with origin at B and which rotates
with the earth’s angular velocity, Ω. We will assume that the height from which the
mass is dropped is small enough so that the gravitational force is approximately its
value at the earth’s surface and we will also neglect any change in the angular
velocity of the earth so that the angular acceleration of the earth is assumed to be
zero. From Newton’s second law and the relative acceleration expression of
Eq. (4.2.19) we have
mg ez ¼ maP=O
¼ m aB=O þ ω ω xP=B þ 2ω x_ P=B E þ €xP=B E ð4:3:1Þ
where ω ¼ Ω cos θ ey + Ω sin θ ez in terms of the latitude angle, θ, xP/B ¼ xex þ yey
þ zez, x_ P=B E ¼ x_ ex þ y_ ey þ z_ ez , and €xP=B E ¼ €xex þ €yey þ €zez . The magnitude
4.3 Motion on the Rotating Earth 271
16 30
20
14
10
12 0
10 -10
-20
8
-30
6 -40
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
(a) (b)
acceleration versus time
150
100
50
0
-50
-100
-150
-200
-250
0 0.2 0.4 0.6 0.8 1
(c)
Fig. 4.19 Simulated kinematics of the slider-crank piston for (a) its position in inches versus time,
(b) its velocity in in./s versus time, and (c) its acceleration in in./s2 versus time
of the angular velocity of the earth is very small (Ω ¼ 7.272 105 rad/s) so that we
can neglect any terms that involve the square of that angular velocity. For example,
point B moves in a circular path of radius R cos θ at a constant speed so that it
experiences a centripetal acceleration towards the Y-axis of magnitude RΩ2 cos θ.
However, even though R is very large this acceleration is much smaller than the
acceleration, g, at the earth’s surface (see Problem P1.1) so that the aB/O term can be
neglected. Similarly, the centripetal acceleration term ω (ω xP/B) has a
magnitude proportional to the square of the angular velocity of the earth so it also
can be neglected, leaving only the Coriolis acceleration and the relative acceleration
as measured in the (x, y, z) system:
g ez ¼ 2ω x_ P=B E þ €xP=B E ð4:3:2Þ
where (c1, c2, c3) are constants of integration. If we place the expressions for y_ , z_ into
the equation for €x we find
where again we can neglect the terms involving the square of the angular velocity of
the earth, so that
If we place Eq. (4.3.7) into the expressions for y_ and z_ , again neglect the terms
involving the square of the angular velocity of the earth, and then integrate these
expressions on time, we find
4.3 Motion on the Rotating Earth 273
Since the mass is being dropped from a height h while at rest relative to the (x, y, z)
coordinates, the initial conditions are x0 ¼ y0 ¼ 0, z0 ¼ h, x_ 0 ¼ c1 ¼ 0, y_ 0 ¼ c2 ¼ 0,
and z_ 0 ¼ c3 ¼ 0. When the mass strikes the surface of the earth z ¼ 0, so from the
pffiffiffiffiffiffiffiffiffiffi
equation for z in Eq. (4.3.8) we find the time to drop is t d ¼ 2h=g. At this time we
have y ¼ z ¼ 0 and
so that the mass lands to the east of its initial position. This deflection is, of course,
very small. If h ¼ 100 m, for example, at a 45 latitude we find x ¼ 15 mm,
approximately.
The second example we will give of describing motion in a non-inertial coordi-
nate system is the Foucault pendulum (Fig. 4.21a). The Foucault pendulum is
famous because it is a simple dynamical system yet it can explicitly demonstrate
through its motion that the earth is indeed rotating. It can be found in many science
museums and planetariums around the world. It is simply a long pendulum which is
started in a familiar back-and-forth oscillation in a given plane but where the earth’s
rotation causes that plane of motion to slowly change over time. In contrast to the
falling mass (see Eq. (4.3.1)), Newton’s second law for the pendulum is
T mg ez ¼ maP=O
¼ m aB=O þ ω ω xP=B þ 2ω x_ P=B E þ €xP=B E ð4:3:10Þ
z
Y
Ω S
y z
m L L
L
RB ez T
θ L P
Z y
O B ey
ex mg
x
(a) (b)
Fig. 4.21 (a) A pendulum of mass m and length L swinging in three-dimensional motion,
suspended at a height L from the surface of the rotating earth, and (b) the free body diagram of
the pendulum mass, showing the force of gravity and tension, T, in the supporting wire
274 4 Kinematics and Relative Motion
where T is the vector tension in the wire supporting the mass, m (Fig. 4.21b). Like
the falling mass problem we will neglect the acceleration aB/O and the ω (ω xP/B)
terms because of the very small angular velocity of the earth, again leaving only the
Coriolis acceleration and the relative acceleration terms, which in this case gives
T mg ez ¼ 2mω x_ P=B E þ m €xP=B E ð4:3:11Þ
Letting (x, y, z) be the coordinates of the mass at point P relative to the moving
origin, B, we have T ¼ TxS/P/|xS/P| ¼ TxS/P/L, where xS/P is the position vector from
the mass (point P) to the support point, S (Fig. 4.21b), and from the geometry
xS/P ¼ xS/B xP/B where we have xS/B xP/B ¼ Lez (xex þ yey þ zez), giving
x y Lz
T ¼ T ex T ey þ T ez ð4:3:12Þ
L L L
Placing this expression into Eq. (4.3.10) and carrying out the cross product in that
equation we find
If, however, the length L z then the motion occurs primarily in the x–y plane so if
we ignore the z-motion entirely by setting z ¼ z_ ¼ €z ¼ 0 we obtain
If we place the expression for T in Eq. (4.3.14) into the other two equations of motion
and neglect any nonlinear (product) terms in those two equations, we arrive at the set
of linear equations for the motion of the pendulum in the x–y plane:
We have followed the steps found in most books to arrive at this system of
equations since we can solve these equations directly for the motion. First, note that
if Ω ¼ 0 then Eq. (4.3.15) is identical to decoupled small-amplitude motions of a
simple pendulum of length L in
ffi both the x- and y-directions. These motions have a
pffiffiffiffiffiffiffi
natural frequency ωn ¼ g=L and a corresponding period Tn ¼ 2π/ωn. However,
there is another characteristic frequency parameter in Eq. (4.3.15) given by the
“precession” frequency, ωp ¼ Ω sin θ, and a corresponding period Tp ¼ 2π/ωp.
4.3 Motion on the Rotating Earth 275
While ωn, as we will see, is approximately the frequency of the ordinary back-and-
forth motion of the mass in the x–y plane, ωp is associated with changes of the plane
of motion of the pendulum itself, i.e., it is the source of the precession of that plane
that we readily observe in the behavior of a Foucault pendulum. This precession
frequency is dependent on the latitude location of the pendulum, reaching a maxi-
mum magnitude at the poles and disappearing at the equator. Note, however, that
these two characteristic frequencies and periods are vastly different. A very long
pendulum of length 50 m, for example, will have a back-and-forth oscillation period
of approximately 14 s, while the precession period at a latitude of 45 will be
approximately 1.2 105 s or about 1.4 days!
To obtain the analytical solution of Eq. (4.3.15) we can define the complex
variable z ¼ x+i y [note: z here is not the z-coordinate of the pendulum mass] so
that we can write the two equations in Eq. (4.3.15) as one complex equation
We can write an explicit solution to this equation. Consider, for example, if at time
t ¼ 0 we set x ¼ a, y ¼ 0, and x_ ¼ y_ ¼ 0. Then it is easy to verify that the solution for
these initial conditions is just
a
z¼ ωn þ ωp exp i ωn ωp t þ ωn ωp exp i ωn þ ωp t
2ωn
ð4:3:18aÞ
or, equivalently,
ωp
z ¼ aexp iωp t cos ωn t þ i sin ωn t ð4:3:18bÞ
ωn
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
where ωn ¼ ω2n þ ω2p . Since ωn ωp it follows that ωn ffi ωn . The path followed
by the pendulum mass is a curve called a hypocycloid. To put Eq. (4.3.18a) into the
standard form for the hypocycloid we let
ω n ωp 2ωn
b¼ a, ϕ¼ t ð4:3:19Þ
2ωn a
which is the equation of the hypocycloid in complex form, equivalent to writing the
real and imaginary parts separately as x ¼ f(a, b, ϕ) and y ¼ g(a, b, ϕ). If we want to
see a typical hypocycloid path, let a ¼ 1, ωn ¼ 1 and ωp ¼ 0.1, and let ϕ range from
0 to 30. If we evaluate Eq. (4.3.20) under these conditions and plot the imaginary
part of z versus the real part of z we see the hypocycloidal path shown in Fig. 4.22.
For the real Foucault pendulum the precession angular velocity is extremely small
and the arcs of the hypocycloid are nearly straight lines so that when we observe a
Foucault pendulum in action the motion appears to be in a straight path. Thus, we
have artificially increased the relative size of the precession angular velocity used to
generate Fig. 4.22 so that the actual path of the motion can be seen clearly. In the
northern hemisphere the precession frequency is positive and the plane of the
pendulum rotates in a clockwise sense as seen in Fig. 4.22. In the southern hemi-
sphere the rotation would instead be counterclockwise. The period for a complete to-
and-fro swing of the pendulum is Tn ¼ 2π=ωn which is almost identical to the period
Tn ¼
2π/ωn when the rotation of the earth is absent. The value of z at T n is z ¼ a
exp 2πiωp =ωn (from Eq. (4.3.18b)) so that the plane of the pendulum has rotated
in a negative sense (clockwise) through an angle of Φ ¼ 2πωp =ωn radians in the time
Tn ¼ 2π=ωn . Thus, the average angular velocity of the plane is just Φ=Tn ¼ ωp ,
which justifies us calling ωp the precession angular velocity.
maintaining accuracy over the timescale needed to demonstrate the slow motions.
The adaptive time interval used for calculations in MATLAB®’s ode45 is very
versatile and can often handle this problem but in some cases at the expense of
very long solution times. To ensure the accuracy of the solution it is good practice to
monitor the accuracy of the solution as a function of time for stiff systems (and for
non-stiff systems as well). This is possible for the system of Eq. (4.3.15) since if we
multiply the first equation by x_ and the second equation by y_ and add the two
resulting equations the Coriolis terms cancel and we find
€x x_ þ €y y_ þ g x x_ þ y y_ =L ¼ 0 ð4:3:21Þ
x_ 2 þ y_ 2 x2 þ y2 x_ 20 þ y_ 20 x2 þ y20
E¼ þg ¼ þg 0 ð4:3:23Þ
2 2L 2 2L
Having an energy-like integral for this problem may seem to be at odds with our
discussion in Chap. 2 of the motion of a particle on a rotating hoop where we saw
that the total energy was not conserved but that instead there was an integral of the
equations of motion called the Jacobi integral that was conserved. These properties
are also true for the exact solution of Foucault pendulum but the linearized equations
in Eq. (4.3.15) do exhibit an energy-like conservation relationship because a number
of terms have been neglected in the approximations used. Note that when we are
going to solve the Foucault pendulum problem numerically we do not have to use
any approximations to the equations of motion to obtain the dynamic behavior of the
pendulum. Here, however, we will use the linearized equations in Eq. (4.3.15) to
form up a first-order system of equations of motion in the MATLAB® function
f_pendulum. This function is nested in the MATLAB® function foucault which uses
f_pendulum and the MATLAB® solver ode45 to obtain the numerical solution as
done in our previous examples. The MATLAB® script foucault_sim sets up default
input parameters and numerical tolerances for the problem which the user can
override before executing the script, if desired. The x–y motion is plotted by the
script as well as the normalized energy, E(t)/E(0). For the simulation the parameters
chosen are L ¼ 10 m for the length of the pendulum and θ ¼ 45 for the latitude,
initial conditions are x(0) ¼ 0.01L and yð0Þ ¼ x_ ð0Þ ¼ y_ ð0Þ ¼ 0, the time interval
(in seconds) for calculations is tout ¼ [0, 10,000], and error tolerances are rtol ¼ 1e-
10 and atol ¼ 1e-10. These very small error tolerances were chosen to guarantee a
high accuracy in energy conservation during the relatively long time interval. The
278 4 Kinematics and Relative Motion
E (t )
1
E (0)
0.98
0.96
plot of the motion is shown in Fig. 4.23, where the individual oscillations are so
close together that they appear as a continuously colored region, but where we can
clearly see the clockwise motion of the oscillation plane which starts as approxi-
mately along the x-axis. The normalized energy as a function of time is shown in
Fig. 4.24, which indeed gives us some confidence in the numerical solution. Note
that with these very small error tolerances the solution with ode45 requires a
computational time on the order of 10 s. This time can be substantially reduced by
choosing larger tolerances but with a corresponding loss of some accuracy in the
satisfaction of energy conservation.
4.4 Matrix Kinematics of Rigid Body Planar Motion 279
To begin, consider a planar rigid body that is translating and rotating in the x–y plane
(Fig. 4.25). We will take point A as a reference point to define the translation of the
y(
n)
P (n)
Y
x(
n)
x(Pn/)A
( n) ( n)
xP
e(y )
n e
θn x
eY
A
x(An )
O eX X
Fig. 4.25 A planar rigid body, labeled (n), translating and rotating in the x–y plane, where we can
take point A as the reference point to define the translation and the angle θn defines the rotation of
of fixed (X, Y ) axes. The unit vectors (eX, eY) act along the
the body with respect to the X-axis of a set
fixed (X, Y ) axes and the unit vectors eðxnÞ ; eðynÞ act along a set of (x, y) axes that rotate with
rigid body
280 4 Kinematics and Relative Motion
body. The position of any other point, P, in that body is then related to the position of
A via
As done before we will use the superscript label (n) to denote the rigid body in a
system so that we can distinguish relations for one rigid body from another. At a
time, t, we will let the angle θn define orientation of body (n) with respect to the X-
axis where the X–Y-axes are assumed to be fixed. We can define a set of unit vectors
along the X–Y-axis as (eX, eY). We can also define a set of (x(n), y(n)) axesthat rotate
with the rigid body (n) and a corresponding set of rotating unit vectors eðxnÞ ; eðynÞ
(see Fig. 4.25). From the geometry we can relate these two sets of unit vectors to
each other:
( ) " #( )
eX cos θn sin θn eðxnÞ
¼ ð4:4:4Þ
eY sin θn cos θn eðynÞ
which we will write in terms of a rotation matrix, R(n)(θn), for body (n):
" #
ðnÞ
cos θn sin θn
R ðθ n Þ ¼ ð4:4:5Þ
sin θn cos θn
Although a different matrix appears in Eq. (4.4.3), we can write it in terms of the
matrix R(n) by noting that it is just the transpose of that matrix, (R(n))T. The matrix
R(n) is a proper orthogonal matrix. Any proper orthogonal matrix, A, satisfies the
following relations:
AAT ¼ AT A ¼ I
detðAÞ ¼ 1
A1 ¼ AT
4.4 Matrix Kinematics of Rigid Body Planar Motion 281
and it is easy to verify that R(n) has all of these properties. If we dot the two equations
ðnÞ
in Eq. (4.4.4) with the relative position vector, xP=A (Fig. 4.25), and let
ðnÞ ðnÞ
xP=A eX ¼ X P=A
ðnÞ ðnÞ
xP=A eY ¼ Y P=A
ð4:4:6Þ
ðnÞ ðnÞ
xP=A eðxnÞ ¼ xP=A
ðnÞ ðnÞ
xP=A eðynÞ ¼ yP=A
then we find
8 9 " #8 ðnÞ 9
< X ðP=A
nÞ
= cos θn sin θn < xP=A =
¼ ð4:4:7Þ
: Y ðnÞ ; sin θn cos θn : yðnÞ ;
P=A P=A
If we write Eq. (4.4.1), written in terms of vector components with respect to the
fixed (X, Y ) axes, we have
( ) ( ) 8 9
XP
ðnÞ
XA
ðnÞ < X ðP=A
nÞ
=
¼ þ ð4:4:8Þ
YP
ðnÞ
YA
ðnÞ : Y ðnÞ ;
P=A
Equation (4.4.9) is the positional relationship between two points in a rigid body in a
matrix-vector form. It involves components along both fixed (inertial) axes and
components along a set of axes fixed in the moving body and a rotation matrix
that defines the angular motion of the rigid body as well as any set of lines such as the
line between points A and P that are fixed in that body. Thus, it is important to
remember the underlying coordinates (frames) that define the terms in Eq. (4.4.9).
We will also write Eq. (4.4.9) as
where the “overbar” is used to explicitly indicate that the relative position
vector
ðnÞ ðnÞ ðnÞ
xP=A is measured in a set of body coordinates. This means that for the xP=A ; yP=A
282 4 Kinematics and Relative Motion
coordinates
seenin Eq. (4.4.9),
for example, we have redefined those coordinates as
ðnÞ ðnÞ ðnÞ ðnÞ
xP=A ; yP=A xP=A ; yP=A to indicate that those coordinates are those seen by an
observer
moving
with the body. In contrast, all the other position vectors
ðnÞ ðnÞ ðnÞ
xP ; xA ; xP=A appearing in Eq. (4.4.10) are measured in fixed (inertial) coordi-
nates whose components are given in Eq. (4.4.8). The rotation matrix R(n) transforms
ðnÞ
vectors like xP=A in body-fixed coordinates to the corresponding vectors in inertial
coordinates. The meaning of the overbar in Eq. (4.4.10) is particularly important
ðnÞ
when differentiating RðnÞ ðθn ÞxP=A on time. Changes occur with respect to the
components of the matrix[R(n)] seenin Eq. (4.4.9) but there are no changes with
ðnÞ ðnÞ
respect to the components xP=A ; yP=A since points P and A are always fixed relative
to each other in the rigid body so these components are constants. In the matrix-
vector form seen in Eq. (4.4.10) this means that upon differentiating we have
ðnÞ
That is, xP=A is a constant vector during differentiation on time. We will use this
relation in the next section when discussing the velocity relationship.
The particular forms of the positional relationship of two points A and P in a rigid
body given by Eqs. (4.4.9) and (4.4.10) are most useful because we see that the
motion of point P is decomposed into a motion of point A (a translational motion)
plus a rotation of the rigid body as defined explicitly by the rotation matrix. Thus, we
can differentiate these positional relations to obtain similar velocity and acceleration
relationships in terms of translational and rotational terms.
We can differentiate the positional equations of the last section on time to obtain a
velocity relationship between points in a rigid body in a vector-matrix form. We
have, from Eq. (4.4.10), using the more explicit notation discussed previously:
ðnÞ ðnÞ _ ðnÞ ðθn ÞðnÞ
x_ P ¼ x_ A þR xP=A ð4:4:12Þ
I I
or, equivalently,
ðnÞ ðnÞ _ ðnÞ xðnÞ
vP ¼ vA þR P=A ð4:4:13Þ
I I
4.4 Matrix Kinematics of Rigid Body Planar Motion 283
where
ðnÞ sin θn cos θn
Rθ ¼ ð4:4:17Þ
cos θn sin θn
h i
0 θ_ n
cos θn sin θn
_
R ðnÞ
¼ ð4:4:19Þ
θ_ n 0 sin θn cos θn
where
h i
0 θ_ n
ðnÞ
Ω ¼ ð4:4:21Þ
θ_ n 0
h i h ih iT
ΩðnÞ ¼ R_ ðnÞ RðnÞ ð4:4:22Þ
about the fixed Z-axis. Now, consider placing Eq. (4.4.20) into the velocity rela-
tionship of Eq. (4.4.14). We find
( ) 8 9 8 ðnÞ 9
ðnÞ
X_ P < X_ ðnÞ = < xP=A =
A
¼ þ ΩðnÞ RðnÞ
ðnÞ
Y_ P : _ ðnÞ ; : ðnÞ ;
YA yP=A
8 9 8 ðnÞ 9
< X_ ðnÞ = < X P=A =
A T
¼ þ ΩðnÞ RðnÞ RðnÞ ð4:4:23Þ
: Y_ ðnÞ ; : Y ðnÞ ;
A P=A
8 9 8 ðnÞ 9
< X_ =
ð nÞ
< X P=A =
A
¼ þ Ωð n Þ
: _ ðnÞ ; : ðnÞ ;
YA Y P=A
ðnÞ
where I ΩB ΩðnÞ , i.e., we have emphasized that the angular velocity matrix is
associated with the angular velocity of the body frame relative to the fixed inertia
ðnÞ
frame by writing it in the more explicit form I ΩB just as we have done with the
angular velocity vector. But
( ðnÞ ) ( _ ðnÞ )
ðnÞ ðnÞ 0 θ_ n X P=A θ n Y P=A
I ΩB xP=A ¼ _ ¼
θ_ n X P=A
ðnÞ ðnÞ
θn 0 Y P=A
¼ θ_ n eZ X P=A eX þ Y P=A eY ¼ θ_ n Y P=A eX þ θ_ n X P=A eY
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
I ΩB xP=A
ð4:4:25Þ
which are just two different forms of the same result. Thus, the relative velocity
relationship can be written in a number of equivalent forms:
þ θ_ n Rθ xP=A
ðnÞ ðnÞ ðnÞ ðnÞ
vP ¼ vA ð4:4:26aÞ
I I
4.4 Matrix Kinematics of Rigid Body Planar Motion 285
ðnÞ ðnÞ ðnÞ ðnÞ
vP ¼ vA þ I ΩB xP=A ð4:4:26bÞ
I I
T
ðnÞ ðnÞ _ ðnÞ RðnÞ xðnÞ
vP ¼ vA þR P=A ð4:4:26cÞ
I I
ðnÞ ðnÞ ðnÞ ðnÞ
vP ¼ vA þ I ωB xP=A ð4:4:26dÞ
I I
The mixed vector-matrix forms of Eqs. (4.4.26a) and (4.4.26b) are the ones we
will typically use in our kinematic analysis of constrained rigid bodies in
two-dimensional motion. The purely vector form of Eq. (4.4.26d) is the velocity
relationship found in most introductory dynamics texts.
" #
h i cos θn sin θn h i
_ ðnÞ _
R θ ¼ θ n ¼ θ_ n RðnÞ ð4:4:28Þ
sin θn cos θn
To compare this with the relative acceleration vector relationship developed earlier
(see, for example, Eq. (4.2.21b)) first note that the angular acceleration vector, α(n),
like the angular velocity, is along the fixed Z-axis, i.e., αðnÞ ¼ θ€n eZ . We can rework
the second terms on the right side of Eq. (4.4.29) in the same manner as done for the
relative velocity term as
8 9 " # 8 9 8 9
h i< xðP=A
nÞ
= 0 θ€n h i< xðP=A
nÞ
= h i< X ðP=A
nÞ
=
θ€n Rθ ¼ Ω_ ðnÞ
ðnÞ
¼ RðnÞ ð4:4:30Þ
: yðnÞ ; €
θn 0 : yðnÞ ; : Y ðnÞ ;
P=A P=A P=A
" #
h i 0 θ€n
Ω_ ðnÞ
¼ ð4:4:31Þ
€
θn 0
For the third term on the right side of Eq. (4.4.29) it is easy to show that we have
( ðnÞ ) ( ðnÞ )
2 h ðnÞ i xP=A 2 X P=A
_
θn R ¼ θ_ ¼ ω
ðnÞ
ω
ðnÞ
x
ðnÞ
ð4:4:33Þ
ðnÞ n ðnÞ I B I B P=A
yP=A Y P=A
From these results it follows that our relative acceleration expression has the
equivalent forms:
2
þ θ€n Rθ xP=A θ_ n RðnÞ xP=A
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
aP ¼ aA ð4:4:34aÞ
I I
2 ðnÞ
þ I Ω_ B xP=A θ_n xP=A
ðnÞ ðnÞ ðnÞ ðnÞ
aP ¼ aA ð4:4:34bÞ
I I
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
aP ¼ aA þI αB xP=A þ I ωB I ωB xP=A ð4:4:34cÞ
I I
where we again have emphasized that the skew symmetrical angular acceleration
matrix is based on angular accelerations of the body B as measured in the inertial
frame, I, by writing it as I Ω_ B . Because we are dealing with the case of
ðnÞ
which is also equivalent to the form involving the tangential and normal components
discussed previously. We will generally use the mixed forms of Eqs. (4.4.34a) and
(4.4.34b) when writing the acceleration relationship in matrix-vector form. Equation
(4.4.34c) or (4.4.35) is the customary form seen in dynamics texts when writing the
relationship in terms of vectors only.
In rigid body motion problems, if we are relating the motion of two points in the
same body then we can use the rigid body velocity and acceleration expressions
4.4 Matrix Kinematics of Rigid Body Planar Motion 287
O eX X
developed in the last two subsections. However, we may need to consider the more
general case where a point P moves relative to a point A that is fixed in a rigid body
but where the point P itself may not be in the same rigid body. As a simple example,
consider the case where we want to examine the motion of a point P on a block that
moves within a slot of a rigid body, as shown in Fig. 4.26. In that case the positional
relationship between points A and P can still be written as (Eq. (4.4.10))
ðnÞ
where x_ P=A is the relative velocity of P with respect to A as seen by an observer who
moves with the body, B. We can differentiate Eq. (4.4.37) once more to obtain,
following the same steps as before,
2
þ θ€n Rθ xP=A θ_ n RðnÞ xP=A
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
aP ¼ aA
I I ð4:4:38Þ
þRðnÞ €xP=A þ θ_ n Rθ x_ P=A þ R
_ ðnÞ x_ ðnÞ
ðnÞ ðnÞ ðnÞ
P=A
ðnÞ
where €
xP=A is the relative acceleration of P with respect to A as seen by an observer
who moves with the body, B. Using the fact that R _ ðnÞ ¼ θ_ n RðnÞ (see Eq. (4.4.16)) we
θ
have, finally,
288 4 Kinematics and Relative Motion
2
þ θ€n Rθ xP=A θ_ n RðnÞ xP=A
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
aP ¼ aA
I I ð4:4:39Þ
þ RðnÞ €xP=A þ 2θ_ n Rθ x_ P=A
ðnÞ ðnÞ ðnÞ
These matrix-vector relationships are the equivalent forms to the purely vector
relationships we developed earlier. Using Eq. (4.2.18), for example, to relate the
motion of points P and A would give
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
x_ P ¼ x_ A þ x_ P=A þ I ωB xP=A ð4:4:40Þ
I I B
where I and B are inertial and body-fixed frames, respectively. The terms in
Eq. (4.4.40) can be directly compared to those in Eq. (4.4.37). Similarly, from
Eq. (4.2.19)
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
€
xP ¼ x€A þI αB xP=A þ I ωB I ωB xP=A
I
I ð4:4:41Þ
ðnÞ ðnÞ ðnÞ
þ €xP=A þ 2I ωB x_ P=A
B B
whose terms can be directly compared to those in Eq. (4.4.39). In particular, you
should note that the following terms are equal:
ðnÞ ðnÞ
x_ P=A ¼ RðnÞ x_ P=A , €xðP=A
nÞ ðnÞ
¼ RðnÞ €xP=A ð4:4:42Þ
B B
Finally, we recall that while for the relative position vector we have
ðnÞ ðnÞ
xP=A ¼ RðnÞ xP=A ð4:4:43Þ
But if we let the velocity and acceleration terms on the left side of Eq. (4.4.44) be
ðnÞ ðnÞ
x_ P=A ¼ vP=A
I
ð4:4:45Þ
€xðP=A
nÞ ðnÞ
¼ aP=A
I
4.4 Matrix Kinematics of Rigid Body Planar Motion 289
then we can also relate these relative velocity and acceleration vectors, as given in an
inertial frame, to the same vectors in a body-fixed coordinates by the transformation
given in Eq. (4.4.43), i.e.,
ðnÞ ðnÞ
vP=A ¼ RðnÞ vP=A
ð4:4:46Þ
ðnÞ ðnÞ
aP=A ¼ RðnÞ aP=A
However,
ðnÞ ðnÞ
vP=A 6¼ x_ P=A
ð4:4:47Þ
ðnÞ ðnÞ
aP=A 6¼ €xP=A
since the left-hand sides of Eq. (4.4.47) are the total relative velocity and acceleration
terms as computed by an observer in an inertial frame and then transformed to a
body-fixed frame while the right-hand sides are the relative velocities and acceler-
ations as computed by an observer moving with the body-fixed frame. Indeed, by
multiplying both sides of Eq. (4.4.44) by (R(n))T it is not difficult to show (see
Problem P4.3) that
the notation ( )I or ( )B refers to the frame in which the time derivative is calculated
and implicitly there must be another common frame present that we use to describe
290 4 Kinematics and Relative Motion
the components of all the terms present in the transport theorem after the derivatives
are calculated. Some authors prefer to write the transport theorem as
I B
d d
ðpÞ ¼ ðpÞ þ I ωB p ð4:4:50Þ
dt dt
to indicate more clearly that I and B here refer to the frame in which the derivative is
being taken. We could also bring in explicitly the underlying common frame we use
to ultimately describe all the terms in the transport theorem by writing that theorem
in a new notation as
I
B
d d
ðpÞ ¼ ðpÞ þ ½I ωB pA ð4:4:51Þ
dt A dt A
where [ ]A indicates that components of all these vectors are being computed in a
frame that we have labeled as A. Thus, for example, the term
B
d
ðpÞ ð4:4:52Þ
dt A
then means that (1) we are taking the derivative of p when p is expressed in the
B frame and (2) we are expressing that differentiated vector in the A frame. The
A frame can be an inertial frame, a body-fixed frame, or any other frame we choose.
For example, in this more explicit notation we could write Eq. (4.4.50) when
evaluated in the inertial I frame as
I
B
d d
ðpÞ ¼ ðpÞ þ ½I ωB pI ð4:4:53Þ
dt I dt I
and we have
B
B
d d
ðpÞ ¼R ðnÞ
ðpÞ ¼ RðnÞ p_ ð4:4:54Þ
dt I dt B
where p_ is the vector p expressed in body-fixed coordinates whose time derivative
indicated by the “dot” is taken relative to that coordinate system, i.e., holding the unit
vectors along the B frame coordinates fixed. Thus, we can also write the transport
theorem in this case as
I h i
d ðnÞ
ðpÞ ¼ RðnÞ p_ þ I ωB p ð4:4:55Þ
dt I I
4.5 Matrix-Vector Kinematics of Constraints and Kinematically Driven Systems 291
_
where the rotation matrix, R(n), which transforms pfrom the B frame to the I frame, is
now explicitly present.
Note, however, that in this new notation [ ]A refers to the frame A in which the
expression in the square brackets is being evaluated while in our previous notation
( )A referred to the frame A in which the time derivative is being calculated. Thus,
while the notations look similar the meanings are quite different.
To illustrate how these notations are related, consider Eq. (4.4.42), which can be
written in the equivalent forms (assuming we are evaluating the end results in the
I frame):
B
ðnÞ d xP=A ðnÞ
x_ P=A ¼ dt ¼ RðnÞ x_ P=A
B
" #I ð4:4:56Þ
B 2
d xP=A
€xðP=A
nÞ
¼
ðnÞ
¼ RðnÞ €xP=A
B dt 2
I
where only the middle form shows the I frame explicitly. This new notation is a bit
more cumbersome but we will use it when it is necessary to be more explicit.
Y B
l1 l2
(1) (2)
EY piston P (3)
θ2
θ1
A D
EX X
XP
(a)
Y B B
y(
2)
y( )
1
(1) θ2
x xC( ) = X ( )E X + Y ( )EY
2 2 2
xC( ) = X ( )E X + Y ( )EY Y( ) = 0
1 1 1
EY 3
y(
3)
θ1 θ3 = 0
A D
x( )
3
EX X D
x(C ) = X ( ) E X + Y ( )EY
3 3 3
(b)
Fig. 4.27 (a) The geometry of the slider-crank as defined by the generalized coordinates
~θ 1 ; ~θ 2 ; X P and (b) the same elements defined by their absolute coordinates (X(1), Y(1), θ1), (X(2),
Y(2), θ2), and (X(3), Y(3), θ3). Note that the pin on the slider block has been relabeled as point D
problem being considered but they will typically change, depending on the problem.
In contrast, we will always take the angle of a body being considered by our matrix-
vector approach to be the angle to the body-fixed x-axis as measured from the
positive inertial coordinate X-axis. This choice must not be changed since the
rotation matrix used to describe the motion also makes this assumption. The angle
θ2 in Fig. 4.27b follows this convention and is related to the angle ~θ 2 used previously
by θ2 ¼ 2π ~θ 2 . For the connecting rod as shown in Fig. 4.27b we also could take
its orientation as being at the negative angle θ2 ¼ ~θ 2 , which only differs by a factor
of 2π from the angle θ2 shown in Fig. 4.27b so that both choices describe the same
orientation of the rod. Using (X(n), Y(n), θn) as our generalized coordinates means, of
course, that we have to use more coordinates and more constraints on those coordi-
nates to solve the problem than with other coordinate choices. But if we are going to
obtain the solution numerically by computer anyway, this disadvantage can be
outweighed by the fact that in a complex problem with many bodies the motion of
each body is always treated in exactly the same fashion. Also, each type of constraint
is also described in terms of these same coordinates so that the constraints also can be
treated in a uniform manner for complex problems. For the slider-crank problem we
have two types of constraints—constraints between bodies that are pinned to one
4.5 Matrix-Vector Kinematics of Constraints and Kinematically Driven Systems 293
y(
Fig. 4.28 The geometry for m)
x(
m)
two rigid bodies (n) and (m),
shown separated, that are
(m ) ( m) (m)
pinned together at point P Cm xC = X E X + Y EY
P
θm
x(
n)
y(
n)
x(C ) = X ( ) E X + Y ( ) EY
n n n
Y Cn
θn
EY
EX X
another (or to the fixed ground) and the constraint of the slider to only translate along
the X-axis. The slider constraint is easy to formulate here as
Y ðnÞ ¼ 0
ð4:5:1Þ
θn ¼ 0
where the slider is labeled as body three (n ¼ 3). For the pinned constraint (also
called a revolute joint constraint), consider two rigid bodies (n) and (m) that are
pinned at point P, as shown in Fig. 4.28. Point P is common to both bodies and is
fixed in distance from all other points in both bodies so that we have
ðnÞ ðmÞ
xP ¼ xP
or ð4:5:2Þ
ðnÞ ðnÞ ðnÞ ðmÞ ðmÞ ðmÞ
xC þR ðθn Þ
xP ¼ xC þR ðθm Þ
xP
ðnÞ ðmÞ
with xC ¼ X ðnÞ EX þ Y ðnÞ EY and xC ¼ X ðmÞ EX þ Y ðmÞ EY . Strictly speaking, to be
ðnÞ ðnÞ ðmÞ ðmÞ
consistent with our previous notation we should write xP ¼ xP=Cn and xP ¼ xP=Cm ,
i.e., these vectors are position vectors in body-fixed coordinates relative to the
different centers of mass, Cn and Cm (see Fig. 4.28), but we will drop the explicit
reference to those centers for economy of notation with the understanding that these
body-fixed relative position vectors always will be relative to the center of mass
locations of the body under consideration unless otherwise stated. If we want to
solve a kinematically driven slider-crank problem then we also have to include a
driving constraint. If the crank is being driven we can define this driving constraint as
θ 1 ¼ gð t Þ ð4:5:3Þ
With the use of all these constraints we can then write the constraint equations for
the kinematically driven slider-crank problem as
294 4 Kinematics and Relative Motion
EY
EX X
(1) (4)
2 ð1Þ ð1Þ
3 2 3
xC þ Rð1Þ xA 0
6 ð2Þ 7
6 xC þ Rð2Þ xðB2Þ xðC1Þ Rð1Þ xðB1Þ 7 6
607
7
6 ð3Þ 7 6
6 ð3Þ ð3Þ ð2Þ ð2Þ ð2Þ 7 07
f ðq; t Þ ¼ 6 xC þ R xD xC R xD 7 ¼ 6 7 ð4:5:4Þ
6 ð3Þ 7 607
6
6 Y 7 4 7
4 θ3 5 05
θ 1 gð t Þ 0
where the generalized coordinates are q ¼ [X(1), Y(1), θ1, X(2), Y(2), θ2, X(3), Y(3), θ3]T.
Note that it is common practice (see [1], for example) to consider the fixed ground as
a fourth body in this problem (see Fig. 4.29). This allows the pin constraint at the
ground (point A) to be written in the same fashion as the other pins and to write the
fixity constraints of the ground explicitly, which is important for more complex
problems. In this case, the explicit constraint for the ground is (Fig. 4.29)
X ð1Þ ¼ 0
Y ð1Þ ¼ 0 ð4:5:5Þ
θ1 ¼ 0
where each body (and its coordinates) now has a different label number. We will use
the simpler form of the constraints given in Eq. (4.5.4) as in this book we will not
need to use the generality afforded by Eq. (4.5.6) and both forms lead to exactly the
same solution. We can write the constraints of Eq. (4.5.4) in terms of the generalized
coordinates directly as
2 3 2 3
X ð1Þ l1 cos θ1 =2 0
6 ð1Þ 7 607
6 Y l1 sin θ1 =2 7 6 7
6 ð2Þ 7
6 X l2 cos θ2 =2 X ð1Þ l1 cos θ1 =2 7 6 07
6 7 6 7
6 Y ð2Þ l sin θ =2 Y ð1Þ l sin θ =2 7 6 0 7 6
6 7 6 7
7 6 7
2 2 1 1
6
f ðq; t Þ ¼ 6 ð Þ ð Þ
X X l2 cos θ2 =2
3 2
7 ¼ 607 ð4:5:7Þ
6 7 6 7
6 ð3Þ
ð2Þ
θ =2 7 607
6 Y Y l 2 sin 2 7 6 7
6 7 607
6 Y ð3Þ 7 6 7
6 7 4 7
4 3 θ 5 05
θ 1 gð t Þ 0
Equation (4.5.7) is a nonlinear system of nine equations for the generalized coordi-
nates which we can solve with the Newton-Raphson method as done before. We also
need to have the Jacobian matrix fq, which in this case is a 9 9 matrix given by
2 3
1 0 l1 sin θ1 =2 0 0 0 0 0 0
6 0 1 l1 cos θ1 =2 0 0 0 0 0 07
6 7
6 1 l1 sin θ1 =2 l2 sin θ2 =2 07
6 0 1 0 0 0 7
6 7
6 0 1 l1 cos θ1 =2 0 1 l2 cos θ2 =2 0 0 07
6 7
fq ¼ 6
6 0 0 0 1 0 l2 sin θ2 =2 1 0 077 ð4:5:8Þ
6 0 1 l2 cos θ2 =2 07
6 0 0 0 0 1 7
6 7
6 0 0 0 0 0 0 0 1 07
6 7
4 0 0 0 0 0 0 0 0 15
0 0 1 0 0 0 0 0 0
Since fqt ¼ 0 for these pinned joint constraints, differentiatingthe velocity constraint
_
gives us the acceleration relationship d f q q =dt þ f tt ¼ 0, or,
on time once more
equivalently, d f q q_ =dt ¼ f tt , where formally we have
2 3
€xðC1Þ þ θ€1 Rðθ1Þ xðA1Þ 2 3
θ_ 1 R_ θ xA
ð1Þ ð1Þ
6 ð2Þ 7
6€xC þ θ€2 Rθ xB €xC θ€1 Rθ xB 7
ð2Þ ð2Þ ð1Þ ð1Þ ð1Þ 6 7
6 7 6 θ_ 2 R_ ðθ2Þ xðB2Þ θ_ 1 R_ ðθ1Þ xðB1Þ 7
d f q q_ 6 7 6 7
6 xðC3Þ þ θ€3 Rð3Þ xðD3Þ €xðC2Þ θ€2 Rð2Þ xðD2Þ 7 6 θ_ 3 R_ ð3Þ xð3Þ θ_ 2 R_ ð2Þ xð2Þ 7
¼ 6€ θ θ 7þ6 θ D θ D 7
dt 6 Y€ ð3Þ 7 6 7
6 7 6 0 7
6 7 4 5
4 θ€3 5 0
θ€1
0
ð4:5:10Þ
and
2 3
0
6 0 7
6 7
6 0 7
f tt ¼ 6
6 0 7
7 ð4:5:11Þ
6 7
4 0 5
d 2 g=dt 2
Comparing Eq. (4.5.10) with Eq. (4.5.9) and using Eq. (4.4.28) for R_ θ we see that
ðnÞ
€ ¼ bv , we have
so that if we write the acceleration constraint equation as f q q
2 2 ð1Þ ð1Þ 3
θ_ 1 R xA
6 7
6 _ 2 ð2Þ ð2Þ _ 2 ð1Þ ð1Þ 7
6 θ 2 R xB θ 1 R xB 7
6 7
6 2 ð3Þ ð3Þ 2 ð2Þ ð2Þ 7
6 θ_ 3 R x θ_ 2 R x 7
bv ¼ 6 D D 7 ð4:5:13Þ
6 7
6 0 7
6 7
6 7
4 0 5
d2 g=dt 2
4.5 Matrix-Vector Kinematics of Constraints and Kinematically Driven Systems 297
f¼0
f q q_ ¼ f t ð4:5:15Þ
€¼bv
f qq
The positional equations are solved via the Newton-Raphson method, while the
linear velocity and acceleration equations are solved with the system of linear
equations solver built into MATLAB®. A script, slider_crank_matrix_sim, follows
the same structure of the other slider-crank scripts. Default values are same as those
used in the previous slider-crank scripts so that we can compare results with those
formulations. The script uses two functions, slider_crank_f_matrix and
slider_crank_J_matrix, that implement the positional constraints of Eq. (4.5.7) and
the Jacobian of Eq. (4.5.8), respectively. The script calls the function
slider_crank_matrix_sol which uses the Newton-Raphson method to solve for
[X(1), Y(1), θ1, X(2), Y(2), θ2, X(3), Y(3), θ3]T, the nine generalized coordinates used in
the matrix approach. These values are then used in the script to solve the velocity
and acceleration equations. To compare with our previous results the position,
velocity, and acceleration of the connecting rod are shown as a function of time in
Fig. 4.30 and the same parameters of the slider are shown in Fig. 4.31. These can be
compared to the same results shown previously in Figs. 4.18 and 4.19, respectively.
Other than a change in sign between Figs. 4.18 and 4.30 the two figures are in
excellent agreement. (The change of sign occurs because the angle θ2 used here is the
298 4 Kinematics and Relative Motion
10
0
θ2
-5
-10
-15
0 0.2 0.4 0.6 0.8 1
(c)
Fig. 4.30 Simulated kinematics of the slider-crank connecting rod using a matrix approach for (a)
its angular position in radians versus time, (b) its angular velocity in rad/s versus time, and (c) its
angular acceleration in rad/s2 versus time. These results can be compared with Fig. 4.18 where the
behavior is identical except for a change in sign due to the difference in definitions of the angles
used in the two figures
negative of the angle ~θ 2 used previously. This is, however, not the θ2 ¼ 2π ~θ 2
angle shown in Fig. 4.27b. To obtain the θ2 shown in Fig. 4.27b we would have had
to set the initial value of θ2 at t ¼ 0 to be θ20 ¼ 2π rather than the θ20 ¼ 0 initial value
used in the script. Either choice, of course, results in identical behavior.) Similarly,
the results shown in Figs. 4.31 and 4.19 agree completely for the dynamics of the
slider (piston).
From the data generated in the MATLAB® workspace by the script you can also
examine the kinematics of the center of mass for the crank and the connecting rod.
These results are shown in Figs. 4.32 and 4.33, respectively. Recall that we also
solved analytically for the kinematics of the slider-crank for the specific position of
4.5 Matrix-Vector Kinematics of Constraints and Kinematically Driven Systems 299
2 -30
0 -40
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
(a) (b)
slider center of mass acceleration
components versus time
150
100
50
Y( ) = 0
3
0
-50
-100
X(
3)
-150
-200
-250
0 0.2 0.4 0.6 0.8 1
(c)
Fig. 4.31 Simulated kinematics of the slider-crank slider (piston) with a matrix approach for (a) its
position in inches versus time, (b) its velocity in in./s versus time, and (c) its acceleration in in./s2
versus time. These results can be compared to Fig. 4.19
the mechanism shown in Fig. 4.7. At this position, the velocities and accelerations of
the three components can be easily obtained with the relative velocity and acceler-
ation expressions. The results are shown in Fig. 4.34. Recall also that the mechanism
reaches the position shown in Fig. 4.34 at t ¼ 0.7865 s, approximately. It can be seen
that the curves in Figs. 4.31–4.33 are consistent with those analytical values at that
time. Of course the curves can give us a complete picture of the kinematics
throughout the entire motion of the mechanism, something that is generally not
practical to obtain by hand with analytical, fixed time calculations.
300 4 Kinematics and Relative Motion
1
5
0.5
0 0
X( )
1
-0.5
-1 -5 Y (1)
Y( )
1
-1.5
-10
-2
-2.5 -15
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
(a) (b)
crank center of mass acceleration
components versus time
100
80
60
40
20 Y (1)
0
-20
-40
-60 X (1)
-80
-100
0 0.2 0.4 0.6 0.8 1
(c)
Fig. 4.32 Kinematics of the crank in the slider-crank mechanism for (a) the position components of
the center of mass (inches), (b) the velocity components of the center of mass (in./s), and (c) the
acceleration components of the center of mass (in./s2)
In dealing with the three-dimensional motion of rigid bodies one of the major
complicating factors is their behavior during rotations. In two-dimensional (planar)
motions the body only experiences a rotation about a single inertial Cartesian axis,
usually taken as the Z-axis. However, in three-dimensional motions rotations can
occur about all three Cartesian axes. This may not seem to be a major change but
when one tries to combine rotations one soon finds that the motion of a rigid body
depends on the order of the rotations. For example, consider the block shown in
Fig. 4.35. If the block is rotated 90 degrees about the Y-axis and then 90 degrees
4.6 Three-Dimension Motion: Finite Rotations and Relative Position 301
6 10
4 0
Y ( 2)
2 -10
0 -20
Y(
2)
X ( 2)
-2 -30
-4 -40
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
(a) (b)
connecting rod center of mass
acceleration components versus time
150
100
50
0
Y ( 2)
-50
-100
X(
2)
-150
-200
-250
0 0.2 0.4 0.6 0.8 1
(c)
Fig. 4.33 Kinematics of the connecting rod in the slider-crank mechanism for (a) the position
components of the center of mass (inches), (b) the velocity components of the center of mass (in./s),
and (c) the acceleration components of the center of mass (in./s2)
about the Z-axis, the resulting orientation of the block is different from when the Z-
axis rotation occurs first, followed by the Y-rotation. If we call (θX, θY, θZ) the
rotations about the (X, Y, Z ) axes, respectively, then these rotations cannot be
characterized as components of a vector since adding vector components is not
order dependent.
However,
if we differentiate these coordinates on time, the deriv-
atives θ_ X ; θ_ Y ; θ_ Z are just the angular velocity components (ωX, ωY, ωZ) about the
Cartesian inertial axes, which are components of an angular velocity vector
ω ¼ ωXEX+ωYEY+ωZEZ. The Newton-Euler moment equations involve the angular
velocities and their derivatives so they cannot be integrated to yield the rotations
(θX, θY, θZ) except in special cases like planar motion where there is only one rotation
about a fixed axis. Since we cannot integrate the angular velocities
directly we must
find a set of generalized coordinates and their derivatives, q; q_ , in terms of which
Fig. 4.34 (a) The positions Y
and velocities of the center
of masses for the slider-
crank elements at the instant
shown and (b) the
corresponding accelerations 30 in/sec
15
2.5 in in/sec
30 in/sec
X
6 in
12 in
(a)
Y
37.5 in/sec2
90 90
in/sec2 in/sec2
75 in/sec2
X
(b)
y
x
Fig. 4.35 An illustration of the order dependency of rotations, showing that the rotation of a block
about the y-axis and then the z-axis is not equivalent to the rotation about the z-axis followed by a
rotation about the y-axis
4.6 Three-Dimension Motion: Finite Rotations and Relative Position 303
x2( ) , y
n
P (n)
( n) P (n)
X 2 ,Y xP / A
( n)
A X 2 ,Y xP / A
e(2 ) x1( ) , x
n n
(n )
xP A
x(An ) e(3 )
n e1(
n)
E2 (n )
E2 x3 , z
E3 O E1 X1, X
E3 O E1 X1, X
X 3, Z
X 3, Z
(a) (b)
Fig. 4.36 (a) Geometryrelating two points A and P that are both in the same rigid
body, and (b)
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
body-fixed coordinates x1 ; x2 ; x3 ¼ x; y; z and unit vectors e1 ; e2 ; e3
we can express the angular velocities in the form ω ¼ ω q; q_ and in terms of which
we can carry out the integrations to obtain the rotational motions. The need to define
these intermediate generalized coordinates and their derivatives often makes the
solution of three-dimensional dynamics problems complex. Because of the signifi-
cant difference between planar motions and 3-D motions of rigid bodies we will have
to generalize many of the kinematic results discussed earlier in this chapter. Thus,
bear with me while we do that generalization.
Although rotations are not vectors, we can represent them in terms of matrices.
For example, consider the rigid body shown in Fig. 4.36a. As we have already seen
motion of this rigid body can be decomposed into a translation and a rotation. We
will take point A as a reference point moving with the body to define the translation
of that body. The position of any other point, P, in that body is then related to the
position of A via
ðnÞ
where xP=A is the vector defining the relative position of P with respect to A. Again
we will use the superscript label (n) to denote the rigid body so that we can
distinguish relations for one rigid body from another. Now, define a set of unit
1, X2, X3) ¼ (X, Y,Z ) Cartesianaxis as (E1, E2,
vectors along the fixed (inertial) (X
ðnÞ ðnÞ ðnÞ
E3). We will also define a set of x1 ; x2 ; x3 ¼ xðnÞ ; yðnÞ ; zðnÞ Cartesian axes
with origin atA that rotate with
the rigid body (n) and a corresponding set of rotating
ðnÞ ðnÞ ðnÞ
unit vectors e1 ; e2 ; e3 (see Fig. 4.36b). We can relate these two sets of unit
vectors to each other through a rotation matrix, [R(n)], where
304 4 Kinematics and Relative Motion
X
3
ðnÞ ðnÞ
Ei ¼ Rij e j ði ¼ 1; 2; 3Þ ð4:6:3Þ
j¼1
But these are unit vectors and they are orthogonal to each other so that we have
X
3
ðnÞ ðnÞ
Ei Ei ¼ Rij Rij ¼ 1 ði ¼ 1; 2; 3Þ
j¼1
ð4:6:4Þ
X
3
ðnÞ ðnÞ
Ei Ek ¼ Rij Rkj ¼0 ði 6¼ k Þ
j¼1
X
3
ðnÞ ðnÞ
Rij Rkj ¼ δik ði; k ¼ 1; 2; 3Þ ð4:6:5Þ
j¼1
where I is the 3 3 identity matrix. Since there are six relationships between the
nine direction cosines, there are only three independent parameters needed to define
a general 3-D rotation. Equation (4.6.7) also demonstrates that the rotation matrix
[R(n)] is an orthogonal matrix. This rotation matrix can also be shown to be a proper
orthogonal matrix where det([R(n)]) ¼ 1.
4.6 Three-Dimension Motion: Finite Rotations and Relative Position 305
ðnÞ
Now, let us take the relative position vector xP=A in Eq. (4.6.1) and form up the dot
products
ðnÞ ðnÞ
xP=A E1 ¼ X P=A
ðnÞ ðnÞ
xP=A E2 ¼ Y P=A
ðnÞ ðnÞ
xP=A E3 ¼ Z P=A
ð4:6:8Þ
ðnÞ ðnÞ ðnÞ
xP=A e1 ¼ xP=A
ðnÞ ðnÞ ðnÞ
xP=A e2 ¼ yP=A
ðnÞ ðnÞ ðnÞ
xP=A e3 ¼ zP=A
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
where X P=A ; Y P=A ; Z P=A and xP=A ; yP=A ; zP=A are the components of the relative
position vector as measured in the inertial and body-fixed coordinate systems,
respectively. Then we have
8 ðnÞ 9 2 38 ðnÞ 9
>
> X P=A >
> ðnÞ ðnÞ >
ðnÞ
> xP=A >
>
>
< > R
= 6 11
R12 R13 >
< >
=
7
Y P=A ¼ 6 ðnÞ 7
ðnÞ ðnÞ ðnÞ ðnÞ
4 R21 R22 R23 5 yP=A ð4:6:9Þ
>
> >
> >
> >
>
: ðnÞ >
> ; ðnÞ
R31
ðnÞ
R32
ðnÞ > nÞ >
R33 : zðP=A ;
Z P=A
where we have again placed a bar over the relative displacement term in Eq. (4.6.11)
ðnÞ ðnÞ ðnÞ ðnÞ
to indicate that it is measured in the body-fixed axes, i.e., xP=A ¼ xP=A ; yP=A ; zP=A .
Equation (4.6.11) is the three-dimensional relationship equivalent to the planar case
(see Eq. (4.4.10)). The rotation matrix for rotations about a single axis is much
ðnÞ
simpler than the general case. For example, if a rotation, θZ , as measured counter-
clockwise from the positive X-axis, occurs around the Z-axis only (see Fig. 4.37)
then
306 4 Kinematics and Relative Motion
EX X
( n)
E3 , e3
Z, z
2 3
ðnÞ ðnÞ
h i 6 cos θZ sin θZ 0
7
RðnÞ ¼ 6 ðnÞ
4 sin θZ cos θZ
ðnÞ
07
5 ð4:6:12Þ
0 0 1
since
ðnÞ ðnÞ ðnÞ
R11 ¼ cos θ11 ¼ cos θZ ,
ðnÞ ðnÞ ðnÞ ðnÞ
R12 ¼ cos θ12 ¼ cos θZ þ π=2 ¼ sin θZ ,
etc:
Equation (4.6.12) is the 3-D counterpart of the rotation matrix used for planar
ðnÞ
problems. If we have a rotation through an angle θX about the X-axis, then similar
to Eq. (4.6.12) we find
2 3
1 0 0
h i
6 ðnÞ
sin θX 7
ðnÞ
RðnÞ ¼ 4 0 cos θX 5 ð4:6:13Þ
ðnÞ ðnÞ
0 sin θX cos θX
ðnÞ
and for a rotation θY about the Y-axis
2 ðnÞ ðnÞ 3
h i cos θY 0 sin θY
6 7
RðnÞ ¼ 4 0 1 0 5 ð4:6:14Þ
ðnÞ ðnÞ
sin θY 0 cos θY
(Note the change in signs on the sine terms for the Y-axis rotation versus the X- and
Z-axis rotations.)
You may wonder why we chose to define the rotation matrix as a transformation
from body-fixed axis quantities to fixed (inertial) axis quantities (see Eqs. (4.6.2) and
(4.6.9)) instead of vice versa. To see why, consider the rotation matrix for rotation
about the Z-axis (Eq. (4.6.12)). The 2-D rotation submatrix that relates the (X, Y )
coordinates to the (x, y) coordinates gives
4.6 Three-Dimension Motion: Finite Rotations and Relative Position 307
(a) (b)
8 9 " #8 ðnÞ 9
< X ðP=A
nÞ
= cos θZ
ðnÞ
sin θZ
ðnÞ < xP=A =
¼ ð4:6:15aÞ
: Y ðnÞ ; sin θZ
ðnÞ
cos θZ
ðnÞ : yðnÞ ;
P=A P=A
Now, consider a rigid body that rotates about the Z-axis and consider a vector p in
the X–Y plane between two points in the rigid body that rotates with that body as
shown in Fig. 4.38. The length of the vector is fixed so we have
p(t+Δt) ¼ ( p cos (α+θZ), p sin (α+θZ)), and p(t) ¼ ( p cos α, p sin α). Thus the
components along the fixed axes at time t + Δt are
pX ðt þ Δt Þ ¼ p cos ðα þ θZ Þ
¼ p cos α cos θZ p sin α sin θZ ð4:6:16Þ
¼ pX ðt Þ cos θZ pY ðt Þ sin θZ
and
pY ðt þ Δt Þ ¼ p sin ðα þ θZ Þ
¼ p sin α cos θZ þ p sin θZ cos α ð4:6:17Þ
¼ pY ðt Þ cos θZ þ pX ðt Þ sin θZ
Thus, the rotation of p (or any line in the body) through an angle θZ is charac-
terized by the rotation matrix of Eq. (4.6.18). Comparing with Eqs. (4.6.15a) and
(4.6.15b) we see that the comparable rotation matrix relating the components of the
ðnÞ
relative position vector xP=A is Eq. (4.6.15a). Thus, our choice to call the matrix of
Eq. (4.6.9) the rotation matrix is consistent with how that matrix affects the rotations
of lines in a rigid body. This choice, however, is not a universal one and so in other
texts you should be careful to determine how the rotation matrix is defined. We
should also point out that even if other texts define the rotation matrix consistent with
our choice they may instead define the direction cosine matrix [D] through the
transformation
8 ðnÞ 9 2 38 ðnÞ 9
>
> xp=A >
> ðnÞ ðnÞ ðnÞ >
> X P=A >
>
>
< > D
= 6 11
D12 D13 >
< >
=
7
yP=A ¼ 6 ðnÞ 7
ðnÞ ðnÞ ðnÞ ðnÞ
4 D21 D22 D23 5 Y ð4:6:19Þ
>
> >
> >
>
P=A >
>
: ðnÞ >
> ; ðnÞ ðnÞ ðnÞ >
D33 : Z ðP=AnÞ >
;
zP=A D31 D32
Equation (4.6.11) gives us the basic matrix-vector expression for the motion of an
arbitrary point P in a rigid body as a combination of translation of a reference point
A and a rotation, R(n), about that point:
x_ P ¼ x_ A þ R_ ðnÞ xP=A
ðnÞ ðnÞ ðnÞ
ð4:7:2Þ
T
T T
_R ðnÞ RðnÞ ¼ R_ ðnÞ RðnÞ ð4:7:5Þ
which we will call the skew symmetric angular velocity matrix, Ω(n). This matrix has
the form
2 ðnÞ ðnÞ
3
0 ω3 ω2
6 ðnÞ 7
ΩðnÞ ¼ 6
4 ω3 0 ω1 7
ðnÞ
5 ð4:7:7Þ
ðnÞ ðnÞ
ω2 ω1 0
and where
the components
of Ω(n) define the angular velocity vector
ðnÞ ðnÞ ðnÞ ðnÞ
ω ¼ ω1 ; ω2 ; ω3 as measured in inertial coordinates. If we post-multiply
both sides of Eq. (4.7.6) by R(n) we find an expression for the derivative of the
rotation matrix as
Equations (4.7.9) and (4.7.10) are equivalent matrix-vector expressions for the
relative velocity relationship of a rigid body. They are the three-dimensional coun-
terparts of the relations we found for planar motion. We can also write the relative
ðnÞ ðnÞ
velocity relationship in purely vector form by noting that ΩðnÞ xP=A ¼ ωðnÞ xP=A so
that
As in planar case there are a number of ways to write the relative velocity
relationship (see Eqs. (4.4.26a)–(4.4.26d)). Here we have the equivalent forms
ðnÞ ðnÞ ðnÞ ðnÞ
vP ¼ vA þ I ΩB RðnÞ xP=A ð4:7:12aÞ
I I
ðnÞ ðnÞ ðnÞ ðnÞ
vP ¼ vA þ I ΩB xP=A ð4:7:12bÞ
I I
T
ðnÞ ðnÞ
þ R_ ðnÞ RðnÞ xP=A
ðnÞ
vP ¼ vA ð4:7:12cÞ
I I
ðnÞ ðnÞ ðnÞ ðnÞ
vP ¼ vA þ I ωB xP=A ð4:7:12dÞ
I I
ðnÞ ðnÞ ðnÞ ðnÞ
where we have set x_ P ¼ vP , x_ A ¼ vA to emphasize that these are
I I
velocities calculated by taking derivatives in an inertial frame, I. Similarly, we
ðnÞ
have written the angular velocity matrix and angular velocity vector as I ΩB and
ðnÞ
I ωB , respectively, to emphasize that these are the angular velocity matrix and
angular velocity vector of the body with respect to the inertial frame. It is also useful
to represent the relative velocity of P with respect to A in body-fixed coordinates.
Consider the relative velocity term as measured in the inertial frame
ðnÞ ðnÞ ðnÞ
vP=A ¼ I ΩB xP=A ð4:7:13Þ
I
where we made the fact that this is the relative velocity calculated in the inertial
frame explicit by including an I subscript. If we express all of the terms in
Eq. (4.7.13) in body-fixed coordinates we can write that equation as
Thus, we have
T
ðnÞ ðnÞ ðnÞ
vP=A ¼ RðnÞ I ΩB RðnÞ xP=A ð4:7:16Þ
I
4.7 Angular Velocity and Relative Velocity Relations 311
which, comparing with Eq. (4.7.13), gives the relationship between the angular
velocity matrix as measured in the inertial frame and the matrix measured in the
body-fixed frame as
T
ðnÞ ðnÞ
I ΩB ¼ RðnÞ I ΩB RðnÞ ð4:7:17aÞ
which can be easily inverted by pre- and post-multiplying both sides of Eq. (4.7.17a)
by the rotation matrices (R(n))T and R(n), respectively, to obtain
T
ðnÞ ðnÞ
I ΩB ¼ RðnÞ I ΩB RðnÞ ð4:7:17bÞ
ðnÞ
It is easy to show that the angular velocity matrix I ΩB in body-fixed coordinates is a
skew symmetric matrix with components given as
2 ðnÞ ðnÞ
3
0 ω3 ω2
ðnÞ 6 ðnÞ 7
I ΩB ¼6
4 ω3 0 ω1 7
ðnÞ
5 ð4:7:18Þ
ðnÞ ðnÞ
ω2 ω1 0
ðnÞ
where the angular
velocity vector in body-fixed coordinates is I ωB ¼
ðnÞ ðnÞ ðnÞ
ω1 ; ω2 ; ω3 . This angular velocity in body-fixed coordinates is related to the
same vector in inertial coordinates and vice versa through
ðnÞ T ðnÞ
I ωB ¼ RðnÞ I ωB
ð4:7:19Þ
ðnÞ ðnÞ
I ωB ¼ RðnÞ I ωB
Thus, we can also write the rigid body relative velocity relationship in the matrix-
vector forms
ðnÞ ðnÞ ðnÞ ðnÞ
vP ¼ vA þ RðnÞ I ΩB xP=A ð4:7:20aÞ
I I
ðnÞ ðnÞ ðnÞ ðnÞ
vP ¼ vA þ RðnÞ I ωB xP=A ð4:7:20bÞ
I I
We can also multiply these equations by the transpose of R(n) to produce equations
written entirely in terms of body-fixed coordinates, i.e.,
From the discussion of the last section you can see that the angular velocity
T
components were related to elements of the skew symmetric matrix R_ ðnÞ RðnÞ
but were not explicitly derivatives of any angular rotation variables. We need to
define the rotation matrix in terms of a set of angular rotations so that we can relate
the angular velocity components to those rotations and their derivatives. As seen by
our discussion of direction cosines we need three independent rotations. One choice
is to use a set of angular rotations, called Euler angles, taken in a specified order
about three non-orthogonal directions. As we will see, there are a number of different
combinations (sets) of Euler angles possible, but we will describe here a set which is
called the 3-1-3 set. This set, shown in Fig. 4.39, is used in many texts to
describe rigid body problems such as tops and gyroscopes. Starting with a set of
inertial (X, Y, Z ) coordinates it consists of rotation about the Z-axis, followed by a
rotation about the x0 -axis and then about
the z00 -axis, as shown in Fig. 4.39, to
produce a final set of rotated x; y; z body-fixed axes. Since the rotation occurs
about the third, first, and third coordinates of the (X, Y, Z ), (x0 , y0 , z0 ), and (x00 , y00 , z00 )
systems, respectively, it is called a 3-1-3 set of Euler angles. The angles (ϕ, θ, ψ) are
called the precession, nutation, and spin angles because for a spinning disk on an
axle that rotates about a fixed point, as shown in Fig. 4.40, the rotation ϕ of the axle
and disk assembly around the Z-axis is called precession, while the “bobbing” or
“nodding” up and down of the assembly, corresponding to changes in the angle θ, is
called nutation, and the rotation of the disk about the axle produces changes in the
spin angle, ψ. The rotation matrix for the ϕ ¼ ϕ(n) rotation of a rigid body (n) is
Z , z′
Z , z′ z ′′ z′′, z y
θ y′′
ψ ψ
φ y′′
θ
y′ y′
φ
θ ψ x
X φ Y
x′ x′, x ′′ x′, x ′′
2 3
cos ϕðnÞ sin ϕðnÞ 0
ðnÞ 6 7
R1 ¼ 4 sin ϕðnÞ cos ϕðnÞ 05 ð4:8:1Þ
0 0 1
so the total rotation matrix that relates the inertial (X, Y, Z ) coordinates to the body-
fixed coordinates (x, y, z) is
where we have used an abbreviated notation where cψ (n) ¼ cos (ψ (n)) and
sψ (n) ¼ sin (ψ (n)), etc.
The 3-1-3 set of Euler angles is only one possibility. In choosing the first Euler
angle rotation there are three rotation axes to choose from but for the second Euler
angle there are only two choices since making the choice of axis the same as the first
choice would not give an independent rotation. Similarly, there are only two choices
for the third Euler angle. Thus, there are a total of 3 2 2 ¼ 12 combination of
choices we could make to define Euler angles. Three of those choices, the 3-1-3 set
we have described above, and the 3-2-1, and the 3-2-3 sets, are the ones most
commonly used. Although Euler angles are popular choices to represent rotations,
they have some restrictions. For the 3-1-3 set we see that if the z and the Z-axes are
aligned (θ ¼ 0) or in opposite alignment (θ ¼ π) then the rotations about those two
axes are not independent and the Euler angles cannot represent a general rotation.
Such singularities also occur at certain values of the rotations for all of the other
Euler angle sets as well. In practice, one can choose a set where the singularities are
not encountered during the normal motion of the system. Or one can resort to a
different set of parameters to define the motion that are not singular. A common
choice of this type is the choice of the Euler parameters discussed in Sect. 4.10.
To obtain the angular velocity we can differentiate the rotation matrix and then
use Eq. (4.7.6) to find the angular velocity components from the components of the
angular velocity matrix. However, we can also use the relative angular velocity
expression. If we let the inertial (X, Y, Z ) frame be the frame I, the (x0 , y0, z0 ) frame be
the frame A0 , the (x00 , y00 , z00 ) frame be the frame A00 , and the frame x; y; z be the body
frame B, then the angular velocity of a body B as measured in an inertial system is
Z
φ ( n ) EZ Z
Z , z′
z ′′
y′
EZ e′y y′′
θ(
n)
( n) ( n)
φ ψ ( )e′′z
n θ
EX EY e x′ y′
( n)
X Y X φ Y
θ ( n )e′x x′, x ′′
x′
(a) (b) (c)
Fig. 4.41 The angular velocities about (a) the Z-axis, (b) the x0 axis, and (c) the z00 axis
¼ HðnÞ θ_ ðnÞ
ðnÞ
I ωB ð4:8:8Þ
where
2 3
0 cos ϕðnÞ sin θn sin ϕðnÞ
6 7
HðnÞ ¼ 4 0 sin ϕðnÞ sin θðnÞ cos ϕðnÞ 5 ð4:8:9Þ
ðnÞ
1 0 cos θ
and θ_ ðnÞ is the time derivative of θ(n) ¼ [ϕ(n), θ(n), ψ (n)]T, a column vector of the Euler
angles. The columns of the H(n) can be recognized as the (X, Y, Z ) components of the
unit vectors acting along the axes about which the Euler angle rotations
(ϕ(n), θ(n), ψ (n)) are taken. We can also find the angular velocity components for a
set of x; y; z body-fixed axes in the same fashion. We have
316 4 Kinematics and Relative Motion
ðnÞ
I ωB ¼ ϕ_ ðnÞ EZ þ θ_ ðnÞ cos ψ ðnÞ ex sin ψ ðnÞ ey þ ψ_ ðnÞ ez
¼ ϕ_ ðnÞ cos θðnÞ ez þ sin θðnÞ e00y þ θ_ ðnÞ cos ψ ðnÞ ex sin ψ ðnÞ ey
þ ψ_ ðnÞ ez
¼ ϕ_ ðnÞ sin θðnÞ cos ψ ðnÞ ey þ sin ψ ðnÞ ex
þ θ_ ðnÞ cos ψ ðnÞ ex sin ψ ðnÞ ey þ ϕ_ ðnÞ cos θðnÞ þ ψ_ ðnÞ ez
¼ ϕ_ ðnÞ sin θðnÞ sin ψ ðnÞ þ θ_ ðnÞ cos ψ ðnÞ ex
þ ϕ_ ðnÞ sin θðnÞ cos ψ ðnÞ θ_ ðnÞ sin ψ ðnÞ ey
þ ϕ_ ðnÞ cos θðnÞ þ ψ_ ðnÞ ez ð4:8:10Þ
where (ex, ey, ez) are unit vectors along the x; y; z axes. Resolving all these
components in the body-fixed frame, the x; y; z components are
h i
¼ ϕ_ ðnÞ sin θðnÞ sin ψ ðnÞ þ θ_ ðnÞ cos ψ ðnÞ
ðnÞ
I ωB
x
h i
¼ ϕ_ ðnÞ sin θðnÞ cos ψ ðnÞ θ_ ðnÞ sin ψ ðnÞ
ðnÞ
I ωB ð4:8:11Þ
y
h i
¼ ϕ_ ðnÞ cos θðnÞ þ ψ_ ðnÞ
ðnÞ
I ωB
z
ðnÞ
I ωB
ðnÞ θ_ ðnÞ
¼H ð4:8:12Þ
where
2 3
sin θðnÞ sin ψ ðnÞ cos ψ ðnÞ 0
ðnÞ ¼ 6
H 4 sin θðnÞ cos ψ ðnÞ sin ψ ðnÞ
7
05 ð4:8:13Þ
ðnÞ
cos θ 0 1
The columns of the H ðnÞ can similarly be recognized as the x; y; z components of the
unit vectors along the axes about which the Euler angle rotations (ϕ(n), θ(n), ψ (n)) are
taken.
Having these angular velocity relations, we now can write the relative velocity
term directly in terms of derivatives of the Euler angles. From Eqs. (4.7.12d) and
(4.7.20b) we have
4.9 Acceleration Relations 317
ðnÞ ðnÞ ðnÞ ðnÞ
vP ¼ vA xP=A I ωB ð4:8:14aÞ
I I
ðnÞ ðnÞ ðnÞ ðnÞ
vP ¼ vA RðnÞ xP=A I ωB ð4:8:14bÞ
I I
where we have changed the order in the cross products. We now can replace these
cross products with multiplications by skew symmetric matrices
2 2 3
0
ðnÞ
Z P=A Y P=A
ðnÞ ðnÞ ðnÞ 3
0 zP=A yP=A
6 7 6 7
6 ðnÞ ðnÞ 7
XP=A ¼ 6
ðnÞ
X ðnÞ ¼ 6
7, X 6
ðnÞ
ðnÞ 7
ð4:8:15Þ
Z
6 P=A 0 P=A 7 P=A z
4 P=A
0 x P=A 7
5
4 5
ðnÞ ðnÞ
ðnÞ ðnÞ
Y P=A X P=A 0 yP=A xP=A 0
ðnÞ ðnÞ ðnÞ I ωðnÞ
vP ¼ vA RðnÞ X P=A B ð4:8:16bÞ
I I
ðnÞ
vP
ðnÞ
¼ vA RðnÞ X ðnÞ θ_ ðnÞ
ðnÞ H ð4:8:17bÞ
I P=A
I
If we differentiate the velocity relation of Eq. (4.7.2) on time we find the acceleration
relation
€ ðnÞ xðnÞ
€xðPnÞ ¼ €xðAnÞ þ R P=A ð4:9:1Þ
318 4 Kinematics and Relative Motion
2 ðnÞ ðnÞ
3 2 ðnÞ ðnÞ
3
0 ω_ 3 ω_ 2 0 α3 α2
_ ðnÞ 6 ðnÞ ðnÞ 7 6 ðnÞ ðnÞ 7
I ΩB ¼ 4 ω_ 3 0 ω_ 1 5 ¼ 4 α3 0 α1 5 ð4:9:4Þ
ðnÞ ðnÞ ðnÞ ðnÞ
ω_ 2 ω_ 1 0 α2 α1 0
which we can also write in terms of vectors and vector cross products as
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
xP ¼ €xA þ I αB xP=A þ I ωB
€ I ωB xP=A ð4:9:6Þ
ðnÞ ðnÞ
From our earlier results in this chapter we recognize the I αB xP=A term as the
ðnÞ ðnÞ ðnÞ
tangential component of the acceleration and I ωB I ωB xP=A as the normal
component. As with the velocity components we can express the relative accelera-
tion in terms of body-fixed components as
It is useful to recast the matrix-vector forms in terms of the angular accelerations. For
Eq. (4.9.5) we have in inertial coordinates
we have
¼ I ω_ B ¼ HðnÞ θ€ðnÞ þ H
_ ðnÞ θ_ ðnÞ
ðnÞ ðnÞ
I αB
ð4:9:10Þ
ðnÞ
I αB ¼ I ω_ B ¼ H
ðnÞ _ ðnÞ θ_ ðnÞ
ðnÞ θ€ðnÞ þ H
or, in a form where the relative position terms are in body-fixed coordinates and
hence constants,
ðnÞ H
€x ðPnÞ ¼ €xðAnÞ RðnÞ X ðnÞ θ€ðnÞ
P=A
ðnÞ H
RðnÞ X _ ðnÞ θ_ ðnÞ þ RðnÞ I ΩðnÞ I ΩðnÞ xðnÞ ð4:9:12Þ
P=A B B P=A
Since all the Euler angles have singular configurations where they cannot uniquely
represent a general rotation they are not a good choice in general for doing numerical
calculations, particularly in complex situations where it cannot be guaranteed that
the singular configurations will not occur. Euler parameters are often used as a
replacement for Euler angles since they do not have such singular behavior. Before
introducing the Euler parameters, we need to examine the rotation matrix in more
detail. According to Euler’s theorem, the general rotation of a rigid body about a
fixed point can always be expressed as a single rotation about a given axis, called the
axis of rotation. Thus, consider a position vector, x, that goes from O to the point P
that is fixed in a body where the body rotates about a fixed point O through an angle
Θ in a plane perpendicular to the axis of rotation, OC, whose direction is given by a
unit vector, n (Fig. 4.42a). [In this section we will drop the (n) superscript to denote
320 4 Kinematics and Relative Motion
X2
C
a
a Θ C
P
x P Θ
n α a
x
d1
d2
O
X1 P
P Δx
X3
(a) (b)
Fig. 4.42 (a) Rotation of a rigid body about an axis of rotation defined by the unit vector, n, that
transforms the vector x to x and (b) the geometry relating Δx to the other parameters
the body for economy of notation.] This rotation will cause the body-fixed vector x to
change by an amount Δx, producing a new position vector, x, where
x ¼ x þ Δx ð4:10:1Þ
The vector Δx lies in a plane perpendicular to n, as shown in Fig. 4.42b, and can be
written as
Δx ¼ d1 þ d2 ð4:10:2Þ
n x
d1 ¼ a sin Θ ¼ n x sin Θ ð4:10:3Þ
jn xj
Now consider the vector, d2, which has a magnitude |d2| ¼ (1 cos Θ)a
¼ 2a sin (Θ/2). This vector is perpendicular to n and also is perpendicular to the
unit vector n x=a, which defines the direction of d1 so we have
n n x
d2 ¼ 2a sin ðΘ=2Þ
2
¼ 2 n n x sin 2 ðΘ=2Þ ð4:10:4Þ
a
Thus, from Eqs. (4.10.4), (4.10.3), and (4.10.2), Eq. (4.10.1) becomes
x ¼ x þ n x sin Θ þ 2 n n x sin 2 ðΘ=2Þ ð4:10:5Þ
4.10 Euler Parameters 321
But if the cross products are written in terms of the skew symmetric matrix
2 3
0 n3 n2
N ¼ 4 n3 0 n1 5 ð4:10:6Þ
n2 n1 0
where I is the 3 3 identity matrix and the matrix product (N)2 ¼ NN. This equation
can also be written as
x ¼ R
x ð4:10:8Þ
which is also called the Rodrigues’ formula. Since R ¼ R(n, Θ) and n is a unit
vector, the rotation matrix is characterized by three independent parameters.
To avoid the singularities associated with the writing of the rotation matrix in
terms of three Euler angles, one can define four parameters, θ ¼ (θ0, θ1, θ2, θ3), called
the Euler parameters, as
θT θ ¼ 1 ð4:10:10bÞ
Using these relations the rotation matrix can be written in terms of these parameters
in the form
2 3
1 2θ22 2θ23 2 ð θ 1 θ 2 θ 0 θ 3 Þ 2ð θ 1 θ 3 þ θ 0 θ 2 Þ
6 7
R ¼ 4 2ð θ 1 θ 2 þ θ 0 θ 3 Þ 1 2θ21 2θ23 2ð θ 2 θ 3 θ 0 θ 1 Þ 5 ð4:10:11Þ
2ð θ 1 θ 3 θ 0 θ 2 Þ 2ð θ 2 θ 3 þ θ 0 θ 1 Þ 1 2θ21 2θ22
322 4 Kinematics and Relative Motion
R ¼ EET ð4:10:12Þ
with
2 3 2 3
θ1 θ0 θ3 θ2 θ1 θ0 θ3 θ2
6 7 ¼6 7
E ¼ 4 θ2 θ3 θ0 θ1 5, E 4 θ2 θ3 θ0 θ1 5 ð4:10:13Þ
θ3 θ2 θ1 θ0 θ3 θ2 θ1 θ0
ET ¼ I, ET E ¼ E
EET ¼ E T E ¼ I4 θθT
ð4:10:14Þ
_ θ_ ¼ 0, EE
¼ 0, E_ θ_ ¼ E
Eθ ¼ Eθ _ T ¼ E_ E
T
where I is the 3 3 identity matrix and I4 is the 4 4 identity matrix. In terms of the
rotation matrix and its derivative the skew symmetric angular velocity matrix, Ω, is
Ω ¼ RR_ T , which contains the angular velocity components of the body relative to
an inertial frame. Similarly, Ω ¼ RT ΩR ¼ RT R_ is in terms of the angular velocity
components measured in a body-fixed frame. Thus, using Eq. (4.10.12) and the
we find
properties of E, E
2 3
0 ω3 ω2
6 7 _ T ¼ 2EE
_ T
Ω ¼ 4 ω3 0 ω1 5 ¼ RR ð4:10:15Þ
ω2 ω1 0
which gives the following relationship between the angular velocity components and
the Euler parameters:
ω1 ¼ 2 θ_ 3 θ2 θ_ 2 θ3 þ θ_ 1 θ0 θ_ 0 θ1
ω2 ¼ 2 θ_ 1 θ3 θ_ 0 θ2 θ_ 3 θ1 þ θ_ 2 θ0 ð4:10:16Þ
ω3 ¼ 2 θ_ 2 θ1 þ θ_ 3 θ0 θ_ 0 θ3 θ_ 1 θ2
ω ¼ 2Eθ_ ¼ 2Eθ
_ ð4:10:17Þ
2 3
0 ω3 ω2
6 7 _
T
Ω ¼ 4 ω3 0 ω1 5 ¼ RT R_ ¼ 2E
E ð4:10:18Þ
ω2 ω1 0
giving
ω1 ¼ 2 θ3 θ_ 2 θ2 θ_ 3 θ1 θ_ 0 þ θ0 θ_ 1
ω2 ¼ 2 θ1 θ_ 3 þ θ0 θ_ 2 θ3 θ_ 1 θ2 θ_ 0 ð4:10:19Þ
ω3 ¼ 2 θ2 θ_ 1 θ3 θ_ 0 þ θ0 θ_ 3 θ1 θ_ 2
ω ¼ 2E _
θ_ ¼ 2Eθ ð4:10:20Þ
or
1
θ_ ¼ ET ω ð4:10:22Þ
2
8 9 2 38 9
>
> θ_ 0 >
> 0 ω1 ω2 ω3 >> θ0 >
>
>_ >
> > 6 > >
7> >
< θ1 = 1 6 ω1 0 ω3 ω2 7< θ1 =
¼ 6 7 ð4:10:24Þ
>
> θ_ 2 >
> 264 ω2 ω3 0 ω1 7
5> >
> θ2 >
>
> >
> >
> >
:_ ; : > ;
θ3 ω3 ω2 ω1 0 θ3
ðnÞ
I ωB
_
¼ HðnÞ θ,
ðnÞ
I ωB
ðnÞ θ_
¼H ð4:10:25Þ
Here, we can use the same matrix-vector forms where θ_ ¼ θ_ 0 ; θ_ 1 ; θ_ 2 ; θ_ 3 and
H ¼ 2E, ¼ 2E
H ð4:10:26Þ
In terms of these matrices and the Euler parameters we have the following relations:
_ T ¼ HH
HH _ T ¼ 2 I ΩB
_
_
T
HH ¼ HH ¼ 2 I ΩB
T
ð4:10:27aÞ
Hθ_ ¼ Hθ,
_ H _
θ_ ¼ Hθ
The relations for the angular accelerations in inertial or body-fixed coordinates for
Euler parameters are simpler than for Euler angles (see Eq. (4.9.9)) since
ðnÞ
I αB
ðnÞ €
¼ I ω_ B ¼ HðnÞ θ,
ðnÞ
I αB
ðnÞ θ€
¼ I ω_ B ¼ H
ðnÞ
ð4:10:28Þ
where we have used the relations H _ θ_ ¼ 0 from Eq. (4.10.27b). Note that we
_ θ_ ¼ H
also can determine the angular acceleration in body-fixed coordinates from the
angular acceleration in inertial coordinates, giving the same result, i.e.,
Table 4.1 Euler parameters in terms of Euler angles for the common Euler angle sets
Euler angle 3-1-3 3-2-3 3-2-1
set:
Euler angles: ϕ,θ,ψ ϕ,θ,ψ ψ ,θ,ϕ
ψ
θ0 ϕþψ θ ϕþψ θ θ ϕ
cos cos cos cos cos cos cos
2 2 2 2 2 2 2
ψ θ ϕ
þ sin sin sin
2 2 2
ψ
θ1 ϕψ θ ψ ϕ θ θ ϕ
cos sin sin sin cos cos sin
2 2 2 2 2 2 2
ψ
θ ϕ
sin sin cos
2 2 2
ψ θ
θ2 ϕψ θ ψ ϕ θ ϕ
sin sin cos sin cos sin cos
2 2 2 2 2 2 2
ψ
θ ϕ
þ sin cos sin
2 2 2
ψ
θ3 ϕþψ θ ϕþψ θ θ ϕ
sin cos sin cos sin cos cos
2 2 2 2 2 2 2
ψ
θ ϕ
cos sin sin
2 2 2
ðnÞ
so that we can get the angular acceleration in the body-fixed frame, I αB , either by
differentiating the angular velocity components in the body-fixed frame
(Eq. (4.10.28)) or, as shown in Eq. (4.10.29), by taking the time derivative of the
angular velocity in an inertial frame and then transforming those derivatives to the
body-fixed frame.
When using the Euler parameters, it is often convenient to specify the body
orientation in terms of Euler angles and then convert them to equivalent Euler
parameter values. Specifying initial conditions, for example, is a case where this
conversion is useful. We can obtain the Euler parameters in terms of the Euler angles
by examining the rotation matrix in terms of either the Euler angles or Euler
parameters and then equating components or combinations of components of the
matrix. The process is rather tedious so in Table 4.1 we simply list the relationships
for different Euler angle choices [3].
We mentioned previously that of the 12 possible Euler angle sets, 3 sets were those
most commonly used—the 3-1-3 set, the 3-2-3 set, and the 3-2-1 set. In this section
we will give the rotation matrix, R, associated with these sets where,
recall, this
matrix transforms body-fixed vector components such as x ¼ x; y; z into inertial
components such as X ¼ (X, Y, Z), i.e.,
326 4 Kinematics and Relative Motion
X ¼ R
x ð4:11:1Þ
To write these matrices succinctly we will use the notation cθi ¼ cos (θi) and
sθi ¼ sin (θi) where the angles in θ ¼ (θ1, θ2, θ3) are the angles for the first, second,
and third rotations, respectively, in any of these sets. We will also give the matrices
that transform the angular velocity, measured in terms of body-fixed components,
and the Euler angle derivatives, i.e.,
ω¼H _
θ, θ_ ¼ H
1 ω ð4:11:2Þ
2 3
cθ3 cθ1 sθ3 cθ2 sθ1 sθ3 cθ1 cθ3 cθ2 sθ1 sθ2 sθ1
6 7
R ¼ 4 cθ3 sθ1 þ sθ3 cθ2 cθ1 sθ3 sθ1 þ cθ3 cθ2 cθ1 sθ2 cθ1 5 ð4:11:3Þ
sθ3 sθ2 cθ3 sθ2 cθ2
2 3 2 3
sθ3 sθ2 cθ3 0 sθ3 cθ3 0
¼6
H 4 sθ2 cθ3 sθ3
7
0 5, 1 ¼ 1 6
H 4 sθ2 cθ3 sθ2 sθ3
7
0 5 ð4:11:4Þ
sθ2
cθ2 0 1 cθ2 sθ3 cθ2 cθ3 sθ2
2 3
cθ3 cθ2 cθ1 sθ3 sθ1 sθ3 cθ2 cθ1 cθ3 sθ1 sθ2 cθ1
6 7
R ¼ 4 cθ3 cθ2 sθ1 þ sθ3 cθ1 sθ3 cθ2 sθ1 þ cθ3 cθ1 sθ2 sθ1 5 ð4:11:5Þ
cθ3 sθ2 sθ3 sθ2 cθ2
2 3 2 3
sθ2 cθ3 sθ3 0 cθ3 sθ3 0
¼6
H 4 sθ2 sθ3 cθ3
7
0 5, 1 ¼ 1 6
H 4 sθ2 sθ3 sθ2 cθ3
7
0 5 ð4:11:6Þ
sθ2
cθ2 0 1 cθ2 cθ3 cθ2 sθ3 sθ2
4.12 Combination Rotations with Body-Fixed and Space-Fixed Frames 327
2 3
cθ2 cθ1 sθ3 sθ2 cθ1 cθ3 sθ1 cθ3 sθ2 cθ1 þ sθ3 sθ1
6 7
R ¼ 4 cθ2 sθ1 sθ3 sθ2 sθ1 þ cθ3 cθ1 cθ3 sθ2 sθ1 sθ3 cθ1 5 ð4:11:7Þ
sθ2 sθ3 cθ2 cθ3 cθ2
2 3 2 3
sθ2 0 1 0 sθ3 cθ3
¼6
H 4 cθ2 sθ3 cθ3
7
0 5, 1 ¼ 1 6
H 4 0 cθ2 cθ3
7
cθ2 sθ3 5 ð4:11:8Þ
cθ2
cθ2 cθ3 sθ3 0 cθ2 sθ2 sθ3 sθ2 cθ3
The Euler angle sets are examples of the use of frames that are fixed to the body as it
undergoes a combination of rotations about a set of axes. For example, if we have
three rotation matrices (R1, R2, R3) that define the rotations of a body relating the
initial X ¼ [X1, X2, X3]T axes to the final x ¼ [x, y, z]T rotated axes then we can
consider the rotations as applied successively as
X ¼ R 1 x1
x1 ¼ R 2 x2 ð4:12:1Þ
x2 ¼ R 3 x
where x1 ¼ [x1, y1, z1]T and x2 ¼ [x2, y2, z2]T. The total composite rotation X ¼ Rx is
then given by
X ¼ R1 R2 R3 x ð4:12:2Þ
For example, a 3-1-3 set of Euler angle rotations then corresponds to where R1 is a
rotation about the Z1 axis, R2 is a rotation about the x1 axis, and R3 is a rotation about
the z2 axis. This result can be easily generalized to n rotations, where for a sequence
of body-fixed rotations relating an initial frame, X, to a final frame, x, we have
X ¼ R1 R2 . . . Rn x ð4:12:3Þ
Note that for body-fixed frames, therefore, we need to multiply the rotations
sequentially going from left to right. When dealing with a set of body-fixed rotations
in this manner the orientations of the axes of rotation are constantly changing. We
328 4 Kinematics and Relative Motion
could, however, when relating the frame X to the final frame x, define a set of
rotations that are all taken about the initial space-fixed (inertial) frame, X. For three
rotations, for example, we would have
X ¼ R 1 x1
X ¼ R 2 x2 ð4:12:4Þ
X ¼ R 3 x3
In this case, to get the total effects of all the rotations we need to define an
intermediate frame, which we will call xf, and the final frame, x, in addition to the
frames shown in Eq. (4.12.4). Relating the X frame to the x1 frame is simple since we
can just use the first equation in Eq. (4.12.4). Let the xf frame be the result of
applying both the R1 and R2 rotations. Since both the xf frame and the x2 frame share
the same rotation, R2, they must only differ by the rotation R1 so we have
x2 ¼ R1 x f ð4:12:5Þ
X ¼ R2 R 1 x f ð4:12:6Þ
The final frame, x, which is a result of applying all three rotations, shares the same
R3 rotation with the frame x3 so they must only differ by the first two rotations,
giving
x3 ¼ R2 R1 x ð4:12:7Þ
X ¼ R3 R 2 R 1 x ð4:12:8Þ
X ¼ Rn . . . R2 R1 x ð4:12:9Þ
Note, however, that these orderings depend on our definition of the rotation matrix.
If we define instead, as some books do [4], rotation matrices R0 ¼ RT where x ¼ R0 X
then we find for body-fixed axes
4.13 Problems 329
But in this book we will stick with our original definition of the rotation matrix as
presented in Sect. 4.6 (see, for example, Eq. (4.6.9)). One can combine body-fixed
and space-fixed rotations as long as one adheres to these orderings. For example if
we perform rotations R1 and R2 about body-fixed axes but then perform a rotation
R3 about a space-fixed axis, we have X ¼ R3R1R2x. Body-fixed rotations are
normally preferred over space-fixed rotations since angular velocities and accelera-
tions are usually more conveniently expressed in terms of axes attached to the body.
4.13 Problems
P4.1. Prove the general form of the transport theorem, Eq. (4.2.7), by using
Eq. (4.2.6) twice (I to R1, I to R2) and the relative angular velocity equation,
Eq. (4.2.11).
P4.2. Use the updating formula Eq. (4.2.66), to improve the initial guess used in the
Newton-Raphson method. Write a MATLAB® script similar to Simulation 4.2
except where the Newton-Raphson method is modified to use the updating of
Eq. (4.2.66). Compare the performance of the Newton-Raphson method with
and without this improvement on the problem considered in Simulation 4.2.
P4.3. Show that the relative velocity and acceleration terms expressed in body-fixed
axes are given by Eq. (4.4.48).
P4.4. Consider the slider-crank mechanism shown in Fig. P4.1 where the slider is in
a smooth inclined slot that makes an angle α with respect to the X-axis. If the
crankshaft AB rotates at a constant angular velocity of 6 rad/s and α ¼ 30 ,
determine the angular velocity and angular acceleration of the connecting rod
BC and the velocity of the slider at the given instant of time when the
mechanism is in the position shown in Fig. P4.1. Use the relative velocity
and acceleration expressions as done in Sect. 4.2.2.
P4.5. The slider-crank mechanism of Fig. P4.2a is in a general configuration defined
by the angles ϕ1 and ϕ2 and the position of the slider along the inclined slot,
DP, which makes an angle α with respect to the X-axis. Alternatively, we can
describe the system in the inclined coordinates by the parameters θ1, θ2, and
XP of Fig. P4.2b which are similar to those used in the slider-crank mechanism
considered previously in this chapter. (a) Show that in terms of the inclined
coordinates of Fig. P4.2b the constraint equations are
330 4 Kinematics and Relative Motion
6 rad/sec
A
C
α X
12 in.
Y B
l2
l1
EY φ2 C
φ1 α
A X
EX DP
d
(a)
B
Y l2
X
l1
θ1 C
θ2 α
A
EY
d sinα XP
EX
(b)
Fig. P4.2 (a) A slider-crank mechanism in a general positional configuration where the slider
(piston) rides in a smooth inclined slot. (b) The slider-crank described in a set of X–Y coordinates
along and perpendicular to the smooth slot. Using the XP coordinate of the piston and the angles
ϕ1,ϕ2 this problem is very similar to the slider-crank problem of Fig. 4.10 but where there is an
offset, d sin α, between the slot and point A in the Y-direction
4.13 Problems 331
X P ¼ l1 cos θ1 þ l2 cos θ2
ðP4:1Þ
l2 sin θ2 ¼ l1 sin θ1 þ d sin α
These are identical to Eq. (4.2.28) when α ¼ 0 so that except for the solution of
these positional equations the determination of the velocity and acceleration
constraints for this problem proceeds in an entirely similar manner to the α ¼ 0
case. In this case the solution for θ2 gives
which will always have a real solution if l1+d sin α l2. Take l1 ¼ 5 in.,
l2 ¼ 13 in., d ¼ 12 in., and α ¼ 30 which will satisfy this inequality.
Following similar steps as done in Simulation 4.1, use the constraint equations
in Eq. (P4.1) and their derivatives to write a MATLAB® script that solves for
velocities and accelerations and plots them versus time for the slider-crank
mechanism of Fig. P4.2b when the crankshaft is being kinematically driven,
e.g., θ1(t) ¼ θ10 6t. Use the same default geometry parameters found in
Simulation 4.1 and take d ¼ 12 in. and α ¼ 30 . Note, however, that the
starting initial conditions here are different.
P4.6. Consider the slider-crank mechanism of Fig. P4.2a in a general configuration
as defined by the angles ϕ1 and ϕ2 and the position of the slider along the
inclined slot, DP, which makes an angle α with respect to the X-axis. Show that
the constraint equations become
Numerically solve the positional constraints of Eq. (P4.3), using the Newton-
Raphson method. Write a MATLAB® script following steps similar to those
found in Simulation 4.3. Use the same default geometry parameters of that
script as well as d ¼ 12 in. and α ¼ 30 . Note, however, that the starting initial
conditions here are different.
P4.7. Solve the problem of the kinematically driven slider-crank of Fig. P4.2a using
the vector-matrix approach of Sect. 4.5 and following similar steps to those
found Simulation 4.5. Use the same default geometry parameters of that script
as well as d ¼ 12 in. and α ¼ 30 . Note, however, that the starting initial
conditions here are different.
P4.8. Figure P4.3 shows two bars that are pinned at point B and where bar (2) has a
smooth slot which rides in a fixed pin at D. (a) If the crank (bar (1)) rotates
with a constant clockwise angular velocity of 6 rad/s as shown, at the instant
when the crank is vertical, determine the angular velocity and angular accel-
eration of the slotted bar, BD, using the relative velocity and acceleration
relations. Also, determine the velocity and acceleration of the center of masses
of the two uniform bars at this instant. Let l1 ¼ 5 in., d ¼ 12 in., and l2 ¼ 18 in.
332 4 Kinematics and Relative Motion
P4.9. Figure P4.4 shows the crank-slotted bar mechanism in a general position as
defined by the angles ~θ 1 ; ~θ 2 . This is a one degree of freedom system so we
need to find a single positional constraint between the two angles. This is most
easily done by noting that the position vector from B to D is always perpen-
dicular to the unit vector, e, which is normal to the slotted bar, which can be
written as the constraint f ~θ 1 ; ~θ 2 ¼ xB=A d EX e ¼ 0.
(a) Show that this relationship leads to the constraint equation in the form
d sin ~θ 2 l1 sin ~θ 1 þ ~θ 2 ¼ 0 ðP4:4Þ
which is a simple but nonlinear relationship between the two angles which
is difficult to solve analytically for ~θ 2 . However, from the geometry of
Fig. P4.4 we also see that
4.13 Problems 333
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
u¼ l21 þ d2 2l1 d cos ~θ 1
ðP4:5Þ
sin ~θ 2 =l1 ¼ sin ~θ 1 =u
(b) Differentiate Eq. (P4.4) once and twice to get relationships for the angular
velocities and angular accelerations. Let ~θ 1 ¼ 6t, l1 ¼ 5 in., d¼ 12 in.,
and l2 ¼ 18 in. and obtain the angular velocity and angular acceleration of
the slotted bar by solving for ~θ 2 and then using that solution to find the
angular velocities and accelerations from t ¼ 0 to t ¼ 1 s. Show that your
results agree with Problem P4.8 at that specific instant of time.
P4.10. Repeat part (b) of Problem P4.9 except solve the nonlinear Eq. (P4.4)
numerically using the Newton-Raphson method in conjunction with the
velocity and acceleration expressions.
P4.11. The kinematics of the mechanism of Fig. P4.4 can also be described in a
general matrix-vector form, as considered previously for the slider-crank
problem by using the variables (X(1), Y(1), θ1, X(2), Y(2), θ2), where (X(n), Y(n))
are the coordinates of the center of mass of bar (n) and θn is the angle that bar
(n) makes with respect to the positive X-axis. Note that θ2 6¼ ~θ 2 was also true
for the slider-crank problem.
(a) Obtain the five positional constraints. Four of these come from the
conditions at the pins A and B and at pin D we have the fifth constraint
g(θ1, θ2) ¼ (X(2) d EX) e ¼ 0, which again shows that this is a one
degree of freedom system.
(b) Differentiate the positional constraints once and twice to get the velocity
and acceleration relations and solve them numerically in conjunction
with the positional equations (using Newton-Raphson) for the same
parameters given in Problem P4.10. Show that your results agree with
those for the angular velocities and accelerations and velocities and
accelerations of the center of mass obtained in Problem P4.8.
P4.12. Figure P4.5 shows a four-bar mechanism which is a configuration commonly
used in practice. It is called a four-bar mechanism since the distance, l1, can
be considered to represent a fixed, fourth bar.
(a) If one uses the three angles (θ2, θ3, θ4) to define the positions of the bars,
show that they are related through the two positional constraints:
334 4 Kinematics and Relative Motion
Y B (3)
θ3
l2 (4) l4
(2)
EY
θ2 θ4
X E
A
EX
l1
P4.14. Repeat Problem P4.13 for the case where the four-bar mechanism is of the
crank-rocker type shown in Fig. P4.6b and the time interval is sufficiently
4.13 Problems 335
p
l
q l
p
θ2 s θ2
θ4 q
s θ4
double-crank crank-rocker
s+l<p+q s+l<p+q
(a) (b)
Fig. P4.6 Four-bar mechanisms where the driving angle, θ2, executes a continuous full revolution
type of motion and (a) where the angle θ4 also exhibits a continuous, full revolution motion, and (b)
where the angle θ4 exhibits a rocking motion back and forth between two extreme values. The label
s denotes the length of the shortest bar and the label l denotes the length of the largest bar. In both
cases one must have s+l < p+q satisfied, where p and q are the lengths of the bars shown
long so that the angle θ4 reaches maximum and minimum values several
times.
P4.15. (a) Define the eight positional constraints for the four-bar mechanism of
Fig. P4.5 by using as unknowns (X(2), Y(2), θ2, X(3), Y(3), θ3, X(4), Y(4), θ4),
where (X(n), Y(n)) are the X- and Y-coordinates of the center of mass of bar
(n) and θn is the angle of bar (n) with respect to the positive X-axis.
Differentiate these positional constraints to obtain the velocity and acceler-
ation constraints.
(b) Letting θ2(t) ¼ 5 t rad, where t is the time in seconds, determine and plot
the center of mass coordinates and angles versus time, using the same bar
lengths as chosen in Problem P4.13 so that the mechanism acts as the double-
crank mechanism of Fig. P4.6a.
P4.16. Repeat Problem P4.15 using the same bar lengths as chosen in Problem
P4.14 so that the mechanism acts as the crank-rocker mechanism of
Fig. P4.6b.
P4.17. Write a MATLAB® script that uses the function animate_lines to animate the
motion of the slider_crank problem of Simulation 4.1, evaluating the motion
at 1000 times over the interval [0, 10] s.
P4.18. The 4-in.-long arm OA in the final position shown in Fig. P4.7 is initially
along the X-axis and is free to rotate about point O. (a) Show that the final
position of the arm can be reached through space-fixed rotations of 30 about
the negative Y-axis and then 45 about the positive Z-axis or by body-fixed
rotations of 45 about the Z-axis and then 30 about the negative y-axis (not
shown) obtained after the Z-axis rotation. Find the individual and total
rotation matrices explicitly. (b) Determine the (X, Y, Z ) coordinates of point
A on the arm after the rotations.
336 4 Kinematics and Relative Motion
30o
O
Y
45o
X
P4.19. A series of connected arms form a robotic linkage as shown in Fig. P4.8a
where the lengths are OA ¼ 1.5 m, AB ¼ 1.0 m, and BC ¼ 0.25 m. Arm OA
can rotate about the Z-axis, arm AB can rotate about its own axis, and arm BC
is pinned to AB with the pin for rotation initially horizontal. Initially the
linkage lies in in the X–Z plane with the variable angles α ¼ β ¼ γ ¼ 0. The
35 angle is fixed. The assembly is given a set of rotations α ¼ 45 , β ¼ 30 ,
and γ ¼ 25 . The objective is to determine the (X, Y, Z ) coordinates of the
endpoint C after these rotations, using the coordinate systems (frames)
shown in Fig. P4.8b. The (x1, y1, z1) frame is attached to OA, the (x2, y2, z2)
frame is attached to arm AB, and the (x3, y3, z3) frame is attached to arm BC.
In this problem, use the relative position relation
where (xA/O, yA/O, zA/O) are the coordinates of point A as measured with
respect to point O in the (x1, y1, z1) frame, with similar definitions for the
B/A and C/B terms as measured in the other two frames. The vectors
4.13 Problems 337
O
β
35o
X
(a)
y3 x3
Z γ
y2 z3 C
α y1 β
z1 z2 γ
Y B x1 , x2
A
35o β
35o
O
α
X
(b)
ex j ; ey j ; ez j ( j ¼ 1, 2, 3) are the coordinate unit vectors associated with the
(xj, yj, zj) axes and (EX, EY, EZ) are unit vectors along the axes of the fixed (X,
Y, Z ) frame. From our definition of rotation matrices and their relationship to
these unit vectors we can write
8 9 8 9 8 9 8 9 8 9
> ex1 > > EX > > ex2 > > ex1 > > EX >
< >
> = >
< > < >
= > = < >
> = >
< >
=
ey1 ¼ ½R1 T EY , ey2 ¼ ½R2 T ey1 ¼ ½R2 T ½R1 T EY
> > > > > > > > > >
: >
> ; >
: > : >
; > ; : >
> ; >
: >
;
ez 1 EZ ez2 ez1 EZ
8 9 8 9 8 9
> ex3 > > ex2 > > EX >
>
< = > >
< = > >
< >
=
T T T T
ey3 ¼ ½R3 ey2 ¼ ½R3 ½R2 ½R1 EY
>
> > > > > >
: > ; : >
> ; >
: >
;
ez 3 ez 2 EZ
ðP4:10Þ
(Why are the transposes present in Eq. (P4.10)?) Substituting these unit
vector expressions into Eq. (P4.9) and cancelling the common (X, Y, Z )
unit vectors in Eq. (P4.8) give
338 4 Kinematics and Relative Motion
h i h i
X C=O ; Y C=O ; Z C=O ¼ xA=O ; yA=O ; zA=O ½R1 T þ xB=A ; yB=A ; zB=A ½R2 T ½R1 T
h i
þ xC=B ; yC=B ; zC=B ½R3 T ½R2 T ½R1 T
ðP4:11Þ
and taking the transpose of Eq. (P4.11) leads to the relationship in terms of
matrices and column vectors as
8 9 8 9 8 9 8 9
< C=O >
> X = < A=O >
> x =
< B=A >
> x =
< C=B >
> x =
Y C=O ¼ ½R1 yA=O þ ½R1 ½R2 yB=A þ ½R1 ½R2 ½R3 yC=B ðP4:12Þ
>
: >
; >
: >
; >
: >
; >
: >
;
Z C=O zA=O zB=A zC=B
Equation (P4.12) will solve our problem once we have obtained the
necessary rotation matrices. Note that the only nonzero coordinates on the
right side of Eq. (P4.12) are xA/O ¼ 1.5 m, xB/A ¼ 1.0 m, and xC/B ¼ 0.25 m
from the data specified for the problem.
(a) The rotation matrix [R1] can be obtained from a space-fixed frame
rotation about the negative Y-axis followed by a rotation about the
space-fixed (and body-fixed) Z-axis, i.e., [R1] ¼ [RZ][RY] (see
Fig. P4.8b) or, equivalently, by a rotation about the Z-axis followed by
a rotation about the body-fixed negative y1-axis, i.e., ½R1 ¼ ½RZ Ry1 .
Determine the total matrix [R1] numerically.
(b) Similarly obtain the matrices [R2] and [R3] numerically, where [R2] is a
rotation about the x2 (or x1) axis and [R3] is a rotation about the negative
y3 (or y2) axis.
(c) Using the rotation matrices from (a) and (b) and Eq. (P4.12) obtain the
(XC/O, YC/O, ZC/O) coordinates of point C in the fixed (X, Y, Z ) frame.
Note that since we can write all the rotations in terms of rotations about body-
fixed axes and we know the sequence in which such rotation matrices should
be multiplied from the results in Sect. 4.12, we could have written down the
terms appearing in Eq. (P4.12) directly, thus bypassing the rather lengthy
derivation of that equation.
References
1. A.A. Shabana, Computational Dynamics, 3rd edn. (John Wiley, Chichester, 2010)
2. A.A. Shabana, Dynamics of Multibody Systems, 4th edn. (Cambridge University Press,
New York, 2013)
3. H. Baruh, Analytical Dynamics (McGraw-Hill, New York, 1999)
4. J.H. Ginsberg, Advanced Engineering Dynamics, 2nd edn. (Cambridge University Press,
New York, 1995)
Chapter 5
Planar Dynamics of Rigid Bodies
This chapter examines the dynamics of rigid bodies in planar motion and the forces/
moments that act upon them. It will be shown how the equations of motion can be
generated using a classical Newton-Euler approach as well as with Lagrange’s
equations. The augmented approach considered for single particles and systems of
particles is also discussed. The matrix-vector kinematics developed in Chap. 4 is
used throughout this chapter and the emphasis is on obtaining complete numerical
solutions.
A rigid body whose mass is continuously distributed throughout its volume can be
considered to be the limit of an infinitely large collection of rigidly constrained
particles. In Chap. 3 we saw that the equations governing the system of particles
consisted of the force and moment equations (see Eqs. (3.2.5) and (3.2.14)):
X
N
mi €xi ¼ Fsys ð5:1:1Þ
i¼1
X
N
xBi mi €xi ¼ MBsys ð5:1:2Þ
i¼1
where Fsys is the net force acting on the system from the known external forces and
external forces of constraint and MBsys is the corresponding net external moment with
respect to an arbitrary point B (see Fig. 5.1a). As shown in Chap. 3 the internal
constraint forces and their moments do not appear in Eqs. (5.1.1) and (5.1.2) because
(n) (n)
P P
Y Vn x(Pn/B) Y Vn x(Pn/)A
x(P )
n x(Pn ) A
B
xA
eY xB eY
eZ O eX X eZ X
O eX
Z Z
(a) (b)
Fig. 5.1 (a) Geometry for describing the motion of a continuous rigid body. Point P is an arbitrary
point in the body and reference point B can be an arbitrary (fixed or moving) point. (b) The same
geometry but where reference point A is a point moving with the rigid body
those rigid constraints satisfy Newton’s third law. If we let mi ¼ ρ ΔVi where ρ is the
mass density (mass/volume) of the particle and ΔVi is a small volume, then in the
limit as the number of particles becomes infinitely large we can replace the sums in
Eqs. (5.1.1) and (5.1.2) by integrals over the entire volume, Vn, of the continuous
rigid body, which we will label as (n), yielding
ð
ðnÞ
ρ€xP dV ¼ FðnÞ
Vn
ð h i ð5:1:3Þ
ðnÞ ðnÞ ðnÞ
ρ xP=B €xP dV ¼ MB
Vn
ðnÞ
where €xP is the acceleration (in an inertial system) of an arbitrary point P in the rigid
ðnÞ ðnÞ
body (n), xP=B is the position of P relative to a reference point B, and F(n) and MB are
the net force and moment on the rigid body. In Chap. 3 we showed that a rigidly
constrained system of particles moving in 3-D had six degrees of freedom. The same
is true for a continuous rigid body so the six Newton-Euler equations in Eq. (5.1.3)
are sufficient to determine the motion of a rigid body. The governing equations in
Eq. (5.1.3) are valid for any rigid body and the reference point B can be taken as an
arbitrary point for each body (n). In this chapter, however, we want to consider only
planar motion problems. As done previously, when discussing planar motion kine-
matics, we will take the translational motion to be in the X–Y plane and the rotational
motion about the Z-axis (Fig. 5.2). We will also take the reference point to be a point
A that is fixed in the same rigid body as P (Fig. 5.1b). [We will come back to the
more general case of Fig. 5.1a where point B is arbitrary in a later section.] In the
5.1 Governing Equations for a Rigid Body in Plane Motion 341
ðnÞ
case shown in Fig. 5.1b we can write the position vector for P, xP , in matrix-vector
form as (see Eq. (4.4.10))
ðnÞ
Note that if we differentiate on time this relationship xP=A is a constant since both
ðnÞ
A and P move with the rigid body and xP=A is the relative position of point P with
respect to point A as measured in a set of body-fixed coordinates. Performing that
differentiation twice we can relate the accelerations of P and A as (see Eq. (4.4.29))
2
€xðPnÞ ¼ €xðAnÞ þ €θn RðθnÞ xðP=A
nÞ
θ_ n RðnÞ xP=A
ðnÞ
ð5:1:5Þ
Because of the cross product terms Eq. (5.1.6) is still in a “mixed” form with both
matrix and vector operations. But we can put it in a purely matrix-vector form by
noting that in 2-D problems the cross product of any two 2-D vectors a and b can be
written as
a b ¼ ax ex þ ay ey bx ex þ by ey
¼ a x by ay bx ez ð5:1:8Þ
T _
¼ _a b ez ¼ bT ez
_ T
where, for any 2-D vector v ¼ [vx, vy]T, we have v ¼ vy ; vx . Using these results
ðnÞ ðnÞ
and noting that MA ¼ M A z eZ in the planar case, we can write Eq. (5.1.6) as
ð ð ð
2
ρdV þ €θn ρRθ xP=A dV θ_ n RðnÞ
ðnÞ ðnÞ ðnÞ ðnÞ
€
xA ρxP=A dV ¼ FðnÞ
Vn Vn Vn
0 1 ð5:1:9Þ
ð T ð
@ ρ _ _ ðnÞ T ðnÞ ðnÞ
x P=A dV A€xA þ €θn ρ x P=A Rθ xP=A dV ¼ M Az
ðnÞ ðnÞ ðnÞ
Vn Vn
We can write Eq. (5.1.9) in a more symmetrical form by examining the coefficient of
€
θn in the force equation:
ð ð T
ðnÞ ðnÞ ðnÞ ðnÞ
ρRθ xP=A dV ¼ ρRθ RðnÞ xP=A dV
Vn Vn
ð " sin θ cos θ
#"
cos θ sin θ
#
ðnÞ
¼ ρ xP=A dV ð5:1:10Þ
cos θ sin θ sin θ cos θ
Vn
ð "0 1
# ð
ðnÞ _ ðnÞ
¼ ρ xP=A dV ¼ ρ x P=A dV
1 0
Vn Vn
ðnÞ ðnÞ
where we have also used RðnÞ xP=A ¼ xP=A . If we choose the generalized coordinates
ðnÞ
qðnÞ ¼ xA ; θn to describe the motion of rigid body (n) then we see that the
Newton-Euler equations can be written in matrix-vector form as
V
n T ð
ðnÞ ðnÞ _ ðnÞ
mXθ ¼ mθX ¼ ρ x P=A dV ð5:1:14Þ
ð V
n
ðnÞ _ ðnÞ T ðnÞ ðnÞ
mθθ ¼ ρ x P=A Rθ xP=A dV
Vn
ðnÞ
where m(n) is the mass of the body, I is the 2 2 identity matrix, mXθ is a 2 1
ðnÞ ðnÞ
vector, mθX is a 1 2 vector, and mθθ is a scalar. There is also a term in Eq. (5.1.11)
that does not involve the accelerations. This has been placed in a generalized 3 1
inertial force vector, Qin;(n), while the other 3 1 generalized force vector, Q(n),
contains the actual forces and moments, i.e.,
8 ð 9
> 2 > ( )
> _
< θn
ðnÞ
ρxP=A dV >
=
in;ðnÞ ðnÞ
FðnÞ
Q ¼ , Q ¼ ð5:1:15Þ
>
>
Vn
>
> ðnÞ
: ; M AZ
0
Choosing the point A to be an arbitrary point in the rigid body causes the Newton-
Euler equations to be rather complex. However, choosing A to be C, the center of
mass point for the rigid body results in a significant simplification since
ð ð ð
ðnÞ _ ðnÞ _ðnÞ T
ρ xP=C dV ¼ ρ x P=C dV ¼ ρ x P=C dV ¼ 0 ð5:1:16Þ
Vn Vn Vn
which, when placed into Eq. (5.1.6), gives Qin; (n) ¼ 0 and
344 5 Planar Dynamics of Rigid Bodies
ðnÞ
mðnÞ €xC ¼ FðnÞ
ð T
€θn ρ x_ ðnÞ ðnÞ ðnÞ ðnÞ ð5:1:17Þ
P=C Rθ xP=C dV ¼ M CZ
Vn
Thus, the mass matrix is a diagonal matrix and all coupling terms between the
accelerations of point A and the rotational motion are eliminated. We see that the
ðnÞ
generalized inertial force also vanishes. Now consider mθθ . We find
ð ð T
ðnÞ _ ðnÞ T ðnÞ ðnÞ _ ðnÞ T ðnÞ ðnÞ
mθθ ¼ ρ x P=C Rθ xP=C dV ¼ ρ x P=C Rθ RðnÞ xP=C dV
Vn Vn
ð " # ð
1
_ ðnÞ T 0 ðnÞ _ ðnÞ T _ ðnÞ
¼ ρ x P=C xP=C dV ¼ ρ x P=C x P=C dV
1 0
Vn Vn
ð ð
ðnÞ 2 ðnÞ 2 ðnÞ 2 ðnÞ 2
¼ ρ X P=C þ Y P=C dV ¼ ρ xP=C þ yP=C dV
Vn Vn
ðnÞ
¼ IC
ð5:1:19Þ
since
2 ðnÞ
3
T h i Y P=C
_ ðnÞ _ ðnÞ
¼ Y P=C X P=C 4
ðnÞ ðnÞ 5
x P=C x P=C
ðnÞ
X P=C
ðnÞ 2 ðnÞ 2
¼ X P=C þ Y P=C
ðnÞ
is just the distance squared between P and C in terms of inertial coordinates xp=C
ðnÞ ðnÞ
¼ X P=C ; Y P=C which also can be written as
5.1 Governing Equations for a Rigid Body in Plane Motion 345
n oT n o n oT n o
ðnÞ ðnÞ ðnÞ ðnÞ
xP=C xP=C ¼ RðnÞ xP=C RðnÞ xP=C
n oT T n o n oT n o
ðnÞ ðnÞ ðnÞ
¼ xP=C RðnÞ RðnÞ xP=C ¼ xP=C xðP=C
nÞ
2 2
ðnÞ ðnÞ
¼ xP=C þ yP=C
ðnÞ ðnÞ ðnÞ
in terms of the body-fixed coordinates xP=C ¼ xP=C ; yP=C . In fact, the distance
squared between P and C is the same, regardless of the planar (x, y) coordinates used.
The moment equation is therefore I C €θn ¼ M CZ and
ðnÞ ðnÞ
ð ð
ðnÞ ðnÞ 2 ðnÞ 2 ðnÞ 2 ðnÞ 2
IC ¼ ρ X P=C þ Y P=C dV ¼ ρ xP=C þ yP=C dV ð5:1:20Þ
Vn Vn
ðnÞ
mðnÞ €xC ¼ FðnÞ
ð5:1:21Þ
I C €θn ¼ M CZ
ðnÞ ðnÞ
ðnÞ
€ C ¼ FX ðnÞ
mðnÞ X
ðnÞ ðnÞ
mðnÞ Y€ C ¼ F Y ð5:1:22Þ
I C θ€n ¼ M CZ
ðnÞ ðnÞ
These three equations are sufficient to determine the motion of a rigid body, since
like the plane motion of a rigidly constrained system of particles discussed in
Chap. 3, an unconstrained continuous rigid body in plane motion only has three
degrees of freedom.
In terms of inertial components the Newton-Euler equations can also be written as
2 38 ðnÞ 9 8 ðnÞ 9
mðnÞ 0 0 > €
> XC > > > FX >
> >
>
6 7< = >< =
6 0 mðnÞ 7
0 5 Y€ C ð nÞ ¼ FYðnÞ
ð5:1:23aÞ
4 > > > >
ðnÞ :
> >
; >> >
>
€ : ð Þ ;
0 0 IC θn n
M CZ
€ ¼ QðnÞ
MðnÞ q ð5:1:23bÞ
h iT
ðnÞ ðnÞ
where the inertial
force is absent and q ¼ X C ; Y C ; θn and
h iT
ðnÞ ðnÞ ðnÞ
QðnÞ ¼ F X ; F Y ; M CZ .
We derived the equations of planar motion for a rigid body, Eq. (5.1.22), using a
matrix-vector approach. In most dynamics texts you will likely find instead the
derivation using only vectors. You may be more familiar with the vector version so
for completeness we will give it here so you can compare it to the matrix-vector
approach. As shown in Chap. 4 for planar motion the acceleration of a point P in a
rigid body relative to a point A in the same rigid body can be written in several
equivalent vector forms:
where ωðnÞ ¼ θ_ n eZ and αðnÞ ¼ €θn eZ and the distance r P=A and normal and tangential
ðnÞ
unit vectors (en, et) are shown in Fig. 5.3a. If we use elements of these forms in
Eq. (5.1.3) we find
ð ð ð
ρxP=A dV θ_ 2n
ðnÞ ðnÞ ðnÞ
€
xA ρdV þ αðnÞ ρxP=A dV ¼ FðnÞ
Vn Vn Vn
ð ð ð
ðnÞ
€ðAnÞ þ €θn
ρxP=A dV x ρxP=A r P=A et dV θ_ 2n
ðnÞ ðnÞ ðnÞ ðnÞ
ρxP=A r P=A en dV ¼ MA
ðnÞ
Vn Vn Vn
ð5:1:25Þ
ðnÞ ðnÞ
But we have xP=A ¼ r P=A en and en et ¼ eZ so that these equations become
ð ð ð
ρxP=A dV θ_ 2n
ðnÞ ðnÞ ðnÞ
€
xA ρdV þ αðnÞ ρxP=A dV ¼ FðnÞ
Vn Vn Vn
ð ð 2 ð5:1:26Þ
þ €θn eZ ρ r P=A dV ¼ MA
ðnÞ ðnÞ ðnÞ ðnÞ
ρxP=A dV x€A
Vn Vn
P (n)
et
en rP( / A)
n
Vn C θn C
Y
x(Pn ) A
θn
&x& A O
xA
eY
O eX X
(a) (b)
Fig. 5.3 (a) The same geometry of Fig. 5.2 showing the acceleration of the reference point A and
the normal and tangential unit vectors used to express the relative acceleration of point P with
respect to A. (b) The special case where the rigid body is rotating about a fixed point, O. In both
cases the angle θn is shown as measured from the positive X-axis to the line drawn from the
reference point to the center of mass point C but it could also be measured from the positive X-axis
to any fixed line in the body
ðnÞ
m€xC ¼ FðnÞ
0 1
ð 2 ð5:1:27Þ
@ ρ r ðn Þ A€ ðnÞ
P=C dV θ n eZ ¼ MC
Vn
ðnÞ
which again is Eq. (5.1.21) since we recognize the integral in Eq. (5.1.27) as just I C .
Although the moment equation has a simple form when the center of mass point is
used as the reference point to take moments, the same simplification occurs if
the rigid body is rotating about a fixed point O in the body as shown in Fig. 5.3b
and we use that fixed point as our reference point. In that case, since €xA ¼ €xO ¼ 0
ðnÞ ðnÞ
and r P=A ¼ r P=O in the moment equation of Eq. (5.1.26) we have
ð
€θn eZ ðnÞ 2 ðnÞ
ρ r P=O dV ¼ MO
Vn
ð5:1:28Þ
or
I O €θn eZ ¼ MO
ðnÞ ðnÞ
In the matrix-vector approach Eq. (5.1.28) also follows directly from the moment
equation in Eq. (5.1.11).
348 5 Planar Dynamics of Rigid Bodies
The moment equation requires that we calculate the moment of inertia for the rigid
body. For some simple shapes this is easy to do analytically. Consider, for example,
the thin, homogeneous rod of Fig. 5.4a. If A is the cross-sectional area of the rod then
dV ¼ Adx and
ð
L=2
L=2
x3
IC ¼ ρx Adx ¼ ρA
2
3 L=2
L=2 ð5:2:1Þ
1 1
¼ ρAL3 ¼ mL2
12 12
where m ¼ ρAL is the total mass of the rod. Similarly, for the homogeneous disk of
Fig. 5.4b we can take dV ¼ 2πR t dR, where t is the thickness, and
y
y
1 1
IC = mL2 IC = mR 2
12 2
C
R
x C
L x
y
(a) (b)
m ( a 2 + b2 )
1
IC =
12 b
C x
(c)
Fig. 5.4 Moments of inertia about the center of mass for (a) a homogeneous rod, (b) a homoge-
neous disk, and (c) a homogeneous rectangle
5.2 Moment of Inertia 349
ðR
R
R4
where the mass of the disk m ¼ ρπR2t. Finally, for the rectangle of Fig. 5.4c
dV ¼ t dx dy, where t is the thickness, and
ð a=2
b=2 ð
IC ¼ ρ x2 þ y2 tdxdy
b=2 a=2
ð
b=2
a=2
b=2
x3
2
ρta3 b y3
ð5:2:3Þ
¼ ρt þ y x
dy ¼ þ ρta
3 a=2 12 3 b=2
b=2
ρta3 b ρtab3 1
¼ þ ¼ m a2 þ b2
12 12 12
where x is the location of an arbitrary point in the composite body and m ¼ m1+m2 is
the total mass. However, by breaking the integration over the composite body into
C2
C1
( x2 , y2 )
V1 ( x1 , y1 ) V2
x
350 5 Planar Dynamics of Rigid Bodies
integrations over the components, we can also recognize those components are
integrals that define the location of the center of masses of the individual compo-
nents,xC1 and xC2 , respectively, so that
m 1 x1 þ m 2 x2
xC ¼
m1 þ m2
ð5:2:6Þ
m 1 y1 þ m 2 y2
yC ¼
m1 þ m2
Thus, if we know the locations of the centers of mass of the components, we can use
Eq. (5.2.6) to calculate the center of mass location for the composite body. Obvi-
ously, this same process can be used for more than two components, if necessary.
We can also determine the moment of inertia for the composite body about this
center of mass location. This requires that we know how the moment of inertia
values about the center of masses of the individual components change when we
want to calculate them about a different point. Another way to view this is that we
want to shift the moment of inertia values from a z-axis located at the center of mass
for each component to a different (but parallel) z-axis located at another point (in this
case the center of mass of the entire composite body). There is a general expression
for making that shift called the parallel axis theorem which we will now derive.
Consider, for example, a body with a center of mass location C ¼ (xC/O, yC/O), as
shown in Fig. 5.6. If we want to calculate the moment of inertia with respect to point
O, we have
xC / O P yP /C
C = ( xC / O , yC / O )
yC / O
O
x
5.2 Moment of Inertia 351
ð
I O ¼ ρ x2 þ y2 dV
V
ð 2
2
¼ ρ xC=O þ xP=C þ yC=O þ yP=C dV
V
ð ð ð5:2:7Þ
¼ xC=O þ yC=O
2 2
ρdV þ 2xC=O ρxP=C dV
V V
ð ð 2
2
þ2yC=O ρyP=C dV þ ρ xP=C þ yP=C dV
V V
But we have
ð
m ¼ ρdV
V
ð ð
ρxP=C dV ¼ ρyP=C dV ¼ 0 ð5:2:8Þ
V V
ð 2
2
I C ¼ ρ xP=C þ yP=C dV
V
where we have used the definitions of the mass and the moment of inertia about the
center of mass. The two “first-moment” integrals in Eq. (5.2.8) vanish since the
distances in those integrals are measured from the center of mass so the center of
mass location in those coordinates would be at (0, 0). Using these results in
Eq. (5.2.7) we find
I O ¼ I C þ m x2C=O þ y2C=O ð5:2:9Þ
which is the parallel axis theorem, where x2C=O þ y2C=O ¼ r 2C=O is just the distance
squared between a z-axis located at O and a z-axis located at C.
We can apply the parallel axis theorem to our composite body problem of
Fig. 5.5. We have
h i
I C ¼ I C1 þ m1 ðxC x1 Þ2 þ ðyC y1 Þ2
h i ð5:2:10Þ
þ I C2 þ m2 ðxC x2 Þ2 þ ðyC y2 Þ2
352 5 Planar Dynamics of Rigid Bodies
where (IC1, IC2) are the mass moments of inertia about the center of masses of the
individual components.
In planar motion problems only one mass moment of inertia appears in the
governing equations but for 3-D rigid body problems there are more moments of
inertia that need to be defined and calculated. This should not be surprising because
we saw such multiple mass moments when we considered the 3-D motion of a
rigidly constrained system of particles in Chap. 3. For more information on rigid
body mass moments see Appendix B.
In Chaps. 2 and 3 we saw that we can obtain the equations of motion and constraint
forces for individual particles or systems of particles by a number of different
methods. The same options are available when we solve for the motion of contin-
uous rigid bodies. In this section we want to examine some of the approaches
available for solving continuous rigid body problems.
As a first example of solving a planar dynamics problem, consider the motion of the
pendulum shown in Fig. 5.7 where a thin, rigid rod of length L and mass m is
supported by a smooth pin at O and swings under the action of its own weight. This
is an example of a physical pendulum where the body has distributed inertial
properties that are less idealized than that of the point mass of the simple pendulum.
Let us examine this problem initially by using the Newton-Euler equations directly.
The free body diagram of the pendulum is shown in Fig. 5.7b. From that diagram the
Newton-Euler equations are
FXc
L
θ
C
mg
mg
X
(a) (b)
5.3 Planar Problems and Constraint Forces 353
€ C ¼ mg þ F Xc
mX
mY€ C ¼ F Yc ð5:3:1Þ
1
mL2 €θ ¼ F Xc L sin θ=2 F Yc L cos θ=2
12
where F Xc ; F Yc are the constraint forces acting at the smooth pin at point O (a smooth
pin cannot support a moment). At the fixed pin we must have xO ¼ xC+xO/C ¼ 0
which gives
X C L cos θ=2 ¼ 0
ð5:3:2Þ
Y C L sin θ=2 ¼ 0
Taking one derivative on time of these constraints we find the velocity constraints
X_ C þ L sin θ θ_ =2 ¼ 0
ð5:3:3Þ
Y_ C L cos θ θ_ =2 ¼ 0
Placing these acceleration constraints into the first two equations in Eq. (5.3.1) we
find
mL
F Xc ¼ mg sin θ €θ þ θ_ 2 cos θ
2
ð5:3:5Þ
mL
F Yc ¼ cos θ €θ θ_ 2 sin θ
2
which, when placed into the moment equation of Eq. (5.3.1), gives
€θ ¼ 3 g sin θ ð5:3:6Þ
2L
Using this equation of motion in Eq. (5.3.5) the constraint forces become
3 mL
F Xc ¼ mg 1 sin 2 θ θ_ 2 cos θ
4 2
ð5:3:7Þ
3 mL
F Yc ¼ mg sin θ cos θ θ_ 2 sin θ
4 2
354 5 Planar Dynamics of Rigid Bodies
These constraint forces are the only forces acting at O since the pin is assumed to be
smooth. However, if we calculate the equivalent constraints around other points we
must also include a constraint moment. Note that the constraint moment about the
center of mass, C, generated by these constraint forces,
c
M CZ ¼ F Xc L sin θ=2 F Yc L cos θ=2, can be obtained from these constraint forces
and Eq. (5.3.1) as
1
c
M CZ ¼ mgL sin θ ð5:3:8Þ
8
Finally, the other two equations of motion, from Eq. (5.3.1), are
X€ C ¼ 3g sin 2 θ L θ_ 2 cos θ
4 2
ð5:3:9Þ
3 L
Y€ C ¼ g sin θ cos θ θ_ 2 sin θ
4 2
Since we have three degrees of freedom and two holonomic constraints this is a one
degree of freedom problem. If we take θ as the independent coordinate and (XC, YC)
as the dependent coordinates then we can solve the problem completely by only
solving Eq. (5.3.6) for θ ¼ θ(t). We could have obtained Eq. (5.3.6) much quicker, of
course, by simply using the moment equation about the fixed point O since
1
I O €θ ¼ mgL sin θ ð5:3:10Þ
2
The moment inertia about O we can get from the center of mass value through the
parallel axis theorem, which gives
2
L 1 1
IO ¼ IC þ m ¼ mL2 þ mL2
2 12 4
ð5:3:11Þ
1
¼ mL2
3
where h is the distance from O to the center of mass and IO ¼ IC+mh2 in terms of the
center of mass moment of inertia, IC, for the given shape. While Eq. (5.3.12) is still
true for an unsymmetrical body, in that case there will also be out-of-plane moments
acting on the pin at O so that it is really a three-dimensional problem.
5.3 Planar Problems and Constraint Forces 355
mg
q ¼ Qe þ Qc
M€ ð5:3:13Þ
q ¼ b, give
The constraint equations, written in terms of the accelerations as A€
" # ( )
1 0 L sin θ=2 Lθ_ 2 cos θ=2
A¼ ,b ¼ ð5:3:16Þ
0 1 L cos θ=2 Lθ_ 2 sin θ=2
356 5 Planar Dynamics of Rigid Bodies
Are the generalized constraint forces at the smooth pin ideal constraints? If they
are then we must have Qc ¼ ATλ, where λ is a 2 1 vector. For our case
2 3 8 9
1 0
> < λ1 >
=
6 7 λ1
Qc ¼ 4 0 1 5 ¼ λ2
λ2 >
: >
;
L sin θ=2 L cos θ=2 Lλ1 sin θ=2 Lλ2 cos θ=2
ð5:3:17Þ
ðFÞI ¼ ðFÞII
ð5:3:18Þ
ðMP ÞI ¼ ðMP ÞII
For our pendulum problem this means that if we take the reference point P to be, say,
C we must have
F Xc ¼ OXc
F Yc ¼ OYc
ð5:3:19Þ
c
M CZ ez ¼ M OZ
c
ez þ xO=C Oc
¼ M OZ
c
ez þ OXc L sin θ=2 OYc L cos θ=2 eZ
FXc
X
force system I force system II
(a) (b)
5.3 Planar Problems and Constraint Forces 357
c c
which gives OXc ; OYc ; M OZ
c
¼ F X ; F Y ; 0 . These are now the true constraint forces
and zero moment which act at the smooth pin. Thus, in rigid body problems we must
typically use the condition of equipollence to transform the generalized constraint
forces solved for at the center of mass into the constraint forces and moments acting
at the point where the constraints are actually applied. Note, however, that for
choices of generalized coordinates other than the q ¼ (XC, YC, θ) coordinates used
here or for other types of constraints the λ vector may not represent the actual
constraint forces (see Chap. 2 for some examples).
Since the pin constraints are ideal constraints, we need to find the solution of the
system
q ¼ Qe þ AT λ
M€
ð5:3:20Þ
q¼b
A€
which is in exactly the same form as found in an augmented approach for particles.
Thus, if the constraints are independent we can immediately write the solution down
explicitly for the equations of motion and generalized constraint force as
1
Qc ¼ AT AM1 AT b AM1 Qe
1 ð5:3:21Þ
€ ¼ M1 Qe þ M1 AT AM1 AT
q b AM1 Qe
Since we have explicit algebraic expressions for (A, b, M, Qe) with the appropriate
MATLAB® matrix operations we can find all the terms needed in Eq. (5.3.21)
numerically without obtaining explicit algebraic expressions for the end results.
However, we can also perform the operations symbolically to obtain explicit expres-
sions. MATLAB® can help make this process much less time consuming through its
symbolic math toolbox so we will show an example of such MATLAB® symbolic
manipulations for this problem.
To begin, we need to declare the variables we will use as symbolic. For this case
we have the variables m, L, θ, θ_ , and g which we will call the symbolic variables
m, L, ang, angd, and g in MATLAB®:
A = [ 1 , 0 , L*sin(ang)/2; 0 , 1 , -L*cos(ang)/2];
b = [ -L*angd^2*cos(ang)/2 ; -L*angd^2*sin(ang)/2];
Qe = [ m*g ; 0 ; 0];
M = [ m , 0 , 0 ; 0 , m , 0; 0 , 0 , m*L^2/12];
358 5 Planar Dynamics of Rigid Bodies
V = inv(A*inv(M)*A.');
Note that in computing the transpose in MATLAB® we used the operation A.' rather
than A' since in general a matrix A could be complex. In that case the MATLAB®
operation A' produces the complex conjugate of the transpose of matrix A, which is
still correct here as everything is real, but gives a more complex-looking symbolic
expression. The operation A.' simply gives the transpose, which is what we want. If
you look at V explicitly in MATLAB® you will see that it is not in a compact form.
However, we can simplify this expression and get a more readable version with the
MATLAB® function simplified, which yields the simplified version of V, Vs, as
Vs = simplify(V)
We now define the vector B ¼ b AM1Qe and the generalized constraint force,
Qc:
B = b - A*inv(M)*Qe;
Qc = A.'*Vs*B;
Qcs = simplify(Qc)
Qcs =
and using this generalized constraint force we can obtain the equations of motion for
€ as
q
qdd = inv(M)*Qe + inv(M)*Qcs
qdd =
which are the same results derived previously in Eqs. (5.3.6), (5.3.7), (5.3.8), and
(5.3.9) except that the sin2θ terms have been written in Eq. (5.3.22) in terms of cos2θ
and the sinθ cos θ terms have been written in Eq. (5.3.22) using the double-angle
formula sin2θ ¼ 2 sin θ cos θ.
We now have all the symbolic expressions we need to set up the equations of
motion and evaluate the constraint force. We could use those functions to generate
by hand MATLAB® functions that solve the problem numerically, but MATLAB®
can also do that for us with the built-in function called matlabFunction. Let’s see an
example of this by solving Eq. (5.3.6) for the angle θ. First, we put this equation of
motion in the form of a first-order system by defining the symbolic column vector
xdot:
xdot = [ angd; qdd(3)]
xdot = angd
-(3*g*sin(ang))/(2*L)
The vector xdot is exactly the vector needed to be calculated by ode45 but it is still in
symbolic form. Since the function that ode45 uses also has to have the time t in its
input arguments, we need to define a symbolic value for that time:
syms t
which will generate a function m-file whose name is the string 'NAME'. The input
variable 'Vars' contains the input variable names IN1, IN2,. . . in a cell array, and
'Outputs' contains the output variable names in the strings 'OUT1', 'OUT2', .. in a cell
array. For our example we will call the file name phys_pend2, the input variables
will be { t, [ang; angd], g, L}, and the output of the function will be called dxdt. The
call to matlabFunction is
We can see the function that matlabFunction generates with the command type:
type phys_pend2
which gives, as we can see below, a function of exactly the type needed by ode45 for
the physical pendulum:
ang = in2(1,:);
angd = in2(2,:);
dxdt = [angd;(g.*sin(ang).*(-3.0./2.0))./L];
Now, we can simply use this function in ode45 in the normal manner, by giving a
time interval tspan ¼ [0 10] and initial conditions for θ(0) and θ_ ð0Þ as π/2 radians
and zero, respectively, and provide values for (g, L) as (9.8, 10):
which uses, for course, the default error tolerances. We can then plot the angle versus
time
plot(tout,xout(:,1))
whose plot is shown in Fig. 5.10. We can also generate a file for calculating the
constraint forces from the symbolic vector Qcs generated previously. The call to
matlabFunction in this case is
θ 0.5
(rad) 0
-0.5
-1
-1.5
-2
0 1 2 3 4 5 6 7 8 9 10
time, t (sec)
where we have called the pendulum constrain function pend_con. Note that we need
the mass here also as an input variable and the generalized constraint force vector is
in the output vector Qcon. We can see the function file generated again with the
command type
type pend_con
function Qcon = pend_con(in1,m,g,L)
%PEND_CON
% QCON = PEND_CON(IN1,M,G,L)
We can use the outputs of ode45 as the inputs to this function to generate the
generalized constraint force vector as a function of time:
Note that we have set the mass m ¼ 1 here and we have changed the xout variables
from column to row vectors to be compatible with the forms seen in the pend_con
function. We can then plot the first generalized force component, F Xc , versus time as
362 5 Planar Dynamics of Rigid Bodies
plot(tout', Qvect(1,:));
which gives the plot shown in Fig. 5.11. From that figure we see that the curves are
not smooth so the default error tolerances are likely too large. We can change those
error tolerance values to get a more accurate result, but we will not do that here. At
t ¼ 0 the rod is horizontal and has zero velocity. At that time all the forces and
moments (including the inertial force mX € Cand inertial moment I C €θ) are shown in
Fig. 5.12. We see that these forces and moments are in “dynamic equilibrium”, i.e.,
they balance, and that the constraint force component F Xc ¼ mg=4 ¼ 2.45 N,
which is also the starting value seen in Fig. 5.11.
-20
-25
0 1 2 3 4 5 6 7 8 9 10
time, t (sec)
X
5.3 Planar Problems and Constraint Forces 363
One type of rigid body constraint that occurs frequently in dynamics is the constraint
of rolling without slipping. In planar motion problems where the rotational motion is
always relative to a fixed axis this constraint is a holonomic constraint but for three-
dimensional problems rolling without slipping is non-holonomic. This should not be
surprising since in Chap. 4 we saw that the rolling axle problem was non-holonomic.
In that case while the motion was planar motion, the axle (and hence the axis of
rotation of the wheels) was changing.
Consider now a circular disk of radius r that is rolling on a horizontal plane
(Fig. 5.13a). We will assume that the surface is rough so that the surface can exert
both a normal force, N, and a tangential force, F. The normal force as we have seen is
a force of constraint that prevents motion of the disk at point D in the Y-direction.
Similarly, if the disk is rolling without slipping the friction force will be a constraint
force that maintains that condition. No slipping means that there must be no relative
velocity of the disk at point D, where it touches the plane, with respect to the plane.
But the plane itself is motionless so that the velocity of the disk at D must be zero.
Thus, we could express the constraint of no slipping in terms of the velocity as
simply vD ¼ 0. However, we said that the constraint is holonomic so that we should
also be able to express the constraint in geometrical terms. As shown in Fig. 5.14,
since there is no relative motion between the points on the edge of the disk and the
plane, within one complete revolution of the disk there should be a unique corre-
spondence between points on the disk edge and corresponding points on the plane
where both points were in contact. Some such points are labeled points 1–4 in
Fig. 5.14 for both the disk and the plane. But this also means that the distance
between points 1 and 4 along the disk edge must be the same distance between points
1 and 4 along the plane. (Imagine rolling the disk back to its original position when
the two points labeled 1 were in contact. During the rolling all successive points 4, 3,
2, and then 1 will coincide so the distance between any of these points laid out along
the edge must be the same distance along the plane.) The distance along the edge is
just rα while the distance moved along the plane is XC, which is also the distance
D F
(a) (b)
364 5 Planar Dynamics of Rigid Bodies
C C
r 2
α
3
4
1 2 3 4 X
XC
X C ¼ rθ
ð5:3:23Þ
YC ¼ r
X_ C þ r θ_ ¼ 0
ð5:3:24Þ
Y_ C ¼ 0
€ C þ r €θ ¼ 0
X
ð5:3:25Þ
Y€ C ¼ 0
q ¼ b gives
which written as A€
" #
1 0 r
A¼ b¼0 ð5:3:26Þ
0 1 0
8 c 9 2 3 8 9
>
> FX > > 1 0 ( ) > > λ1 >
>
< = 6 7 λ1 < =
Q ¼
c
FYc 6
¼ 40 15 7 ¼ λ2 ð5:3:27Þ
> > λ2 > >
: c >
> ; >
: >
;
M CZ r 0 rλ1
which, as discussed before, is just the force system from the constraints at the plane
as measured at the center of mass point C (Fig. 5.15a) which is equipollent to the
force system at the point of contact D with the plane (Fig. 5.15b). Thus, we recognize
λ2 as the normal force and λ1 as the friction force, which is pointing in the plus X-
direction since if the rotation, θ, of the disk is positive (counterclockwise) the disk
will be rolling to the left. Note that if we use the constraint equations (Eq. (5.3.24) in
the relative velocity relationship between points C and D we have
vD ¼ vC þ ω xD=C
¼ vC þ θ_ eZ ðreY Þ
( ) ( ) ( ) ð5:3:28Þ
X_ C r θ_ 0
¼ þ ¼
Y_ C 0 0
aD ¼ aC þ α xD=C θ_ 2 xD=C
¼ aC þ €θeZ ðreY Þ þ r θ_ 2 eY
( ) ( €) ( ) ( ) ð5:3:29Þ
X€C rθ 0 0
¼ þ þ ¼
Y€ C 0 r θ_ 2 r θ_ 2
λ2
force system I force system II
(a) (b)
366 5 Planar Dynamics of Rigid Bodies
so that the point D on the disk that is in contact with the plane has a Y-component
(vertical) acceleration of r θ_ 2 . Note that if in Eq. (5.1.26) we take point A in the
moment equation to be the contact point D in a problem of rolling without slipping
we find
ð ð
ðnÞ 2
ρxP=D dV x€D þ €θn eZ ρ r P=D dV ¼ MD
ðnÞ ðnÞ ðnÞ
Vn Vn
ð5:3:30Þ
or
mxC=D €xD þ I D €θn eZ ¼ MD
ðnÞ ðnÞ ðnÞ ðnÞ
ðnÞ ðnÞ
But xC=D is parallel to x€D so the cross product is zero and the moment equation about
the contact point D of no slipping has just the same simple form as about the center
of mass or a fixed point about which a rigid body rotates:
I D €θn eZ ¼ MD
ðnÞ ðnÞ
ð5:3:31Þ
We also obtain the same result from the moment equation in Eq. (5.1.9) by noting
T
ðnÞ ðnÞ _ðnÞ ðnÞ
xD ¼ τxC=D , where τ is a proportionality factor, the term x C=D €xD
that since €
T
_ðnÞ ðnÞ _
¼ τ x C=D xC=D ¼ 0 because aT a ¼ 0 for any vector a.
Equation (5.3.30) is often very useful in rolling without slipping problems since
by taking moments about D the constraint forces are automatically eliminated. As an
example, consider a homogeneous disk of radius r and mass m rolling without
slipping on a circular track of radius R, as shown in Fig. 5.16a. If we take moments
about point D, then from the free body diagram of Fig. 5.16b we have
R vC = ( R − r ) φ& = − rθ&
φ
θ,θ&
C
C F
r
t mg D
φ N
(a) (b)
Fig. 5.16 (a) A circular disk of radius r rolling without slipping on a circular track of radius R, and
(b) the free body diagram of the disk
5.3 Planar Problems and Constraint Forces 367
where, using the parallel axis theorem, ID ¼ mr2/2+mr2 ¼ 3mr2/2. Since the center
of mass point C is moving in a circular path of radius (R r) it has a speed tangent
to the path given as vC ¼ ðR r Þϕ_ . But the rolling without slipping constraint
also gives vC ¼ r θ_ , where the minus sign is due to the fact that θ and θ_ are
taken as positive in the counterclockwise direction (see Fig. 5.16b), so that we have
θ_ ¼ ðR r Þϕ_ =r and hence €θ ¼ ðR r Þϕ=r.€ Placing this relationship into
Eq. (5.3.31) gives the equation of motion in terms of ϕ as
€þ 2g
ϕ sin ϕ ¼ 0 ð5:3:33Þ
3ð R r Þ
This equation of motion is identical in general form to that of the simple pendulum.
However, one difference is that Eq. (5.3.32) is only valid if the disk rolls without
slipping. The frictional force, F, is the force that maintains this constraint. But this
frictional force must satisfy |F| < μsN so that if it becomes too large (i.e., |F| μsN )
the disk will slip and we have to solve a rolling-with-slipping dynamics problem
where |F| ¼ μkN and the direction of the friction force is opposite to the velocity of
the point D on the disk. The coefficients μs and μk are the static and dynamic
coefficients of friction, where generally μk is somewhat smaller than μs. Thus,
when solving Eq. (5.3.32) we need to check to see if |F| < μsN is satisfied. This is
a good example of a problem where even though we used a very efficient method
(the moment equation about D) to generate the equation of motion, we still do need
to obtain the constraint forces to validate the solution. This is not difficult to do here
using the free body diagram of Fig. 5.16b and the force equations for the motion of
the center of mass in the n- and t-directions. We have
v2C ð5:3:34Þ
N mg cos ϕ ¼ maCn ¼ m ¼ mðR r Þϕ_ 2
ðR r Þ
where we have used the constraint of rolling without slipping to write the acceler-
ation of the center of mass in the t-direction as aCt ¼ r €θ and we have also used the
fact that the center of mass is moving in a circular path of radius ρ ¼ (R r) about
the center of the track so that it experiences an acceleration in the n-direction,
aCn ¼ v2C =ρ. Solving for F and N we have
F ¼ mg sin ϕ=3
ð5:3:35Þ
N ¼ mg cos ϕ þ ðR r Þϕ_ 2 =g
which leads to the requirement that for rolling without slipping we must have
368 5 Planar Dynamics of Rigid Bodies
j sin ϕj
jF j=N ¼ μs ð5:3:36Þ
3 cos ϕ þ ðR r Þϕ_ 2 =g
[Note: We have assumed that N is always positive so we are not considering the
possibility that N ¼ 0 and the disk can leave the circular track.]
where tspan and x0 are the time interval for the solution and the initial conditions
x0 ¼ ϕð0Þ; ϕ_ ð0Þ , and g, R, and r are the acceleration of gravity (in m/s2), the radius
of the track (in m), and the radius of the disk (in m), respectively. The rolling_disk
function
returns the times at which the solution was found in tout and the values of
ϕ; ϕ_ in the columns of the xout matrix. A script rolling_disk_sim sets up defaults
for all the parameters, calls the function rolling_disk with those default parameters,
and obtains the solution. The script then plots the solution for the angle vesus time,
ϕ(t), and on a second plot plots both |F| and μsN (see Fig. 5.17). The default values
0.3 2
0.1 1.5
-0.1 1
-0.3 0.5
-0.5 0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
time, t time, t
(a) (b)
Fig. 5.17 (a) The angle ϕ versus time for the disk rolling without slipping on a circular track, and
(b) the magnitude of the friction force, |F| (solid line), and the maximum allowable friction force for
rolling without slipping, μsN (dashed line)
5.4 Kinetic Energy and Work-Energy 369
used in the script are m ¼ 1, g ¼ 9.81, R ¼ 2, r ¼ 0.1, μs ¼ 0.2, tspan ¼ [0, 10], and
x0 ¼ [0, 0.9] which can be changed by entering new values in the command window
before executing the script. It can be seen from Fig. 5.17b that |F| < μsN is satisfied
for the motion so that the condition of rolling without slipping is satisfied but you can
verify that for a somewhat higher initial angular velocity such as ϕ_ ð0Þ ¼ 1:2 rad/s
slipping does occur. We will not consider such cases here.
1X N
T¼ mi x_ i x_ i ð5:4:1Þ
2 i¼1
If again we let mi ¼ ρ ΔVi where ρ is the mass density (mass/volume) of the particle
and ΔVi is a small volume, then in the limit as the number of particles becomes
infinitely large we can write the kinetic energy for a continuous body (n) as
ð
1 ðnÞ ðnÞ
T ðnÞ ¼ ρx_ P x_ P dV ð5:4:2Þ
2
Vn
ðnÞ
where x_ P is the velocity at an arbitrary point P in the body. If the body is a rigid
body we can express the position vector to P in terms of the position vector to a
reference point A in the body and a rotation of the body:
ðnÞ
where xP=A is constant since it is in body-fixed coordinates. Differentiating this
position vector we find
x_ P ¼ x_ A þ θ_ n Rθ xP=A
ðnÞ ðnÞ ðnÞ ðnÞ
ð5:4:4Þ
which we can put in the alternate matrix-vector form as the product of a 2 3 matrix
and a 3 1 vector, namely
( )
h i x_ ðnÞ
ðnÞ ðnÞ ðnÞ
x_ P ¼ I Rθ xP=A A
ð5:4:5Þ
θ_ n
370 5 Planar Dynamics of Rigid Bodies
ðnÞ T ðnÞ
where we have used the fact that Rθ Rθ ¼ I. Equation (5.4.6) can be written as
with
0 1
ð
mXX ¼ @ ρdV AI ¼ mðnÞ I
ðnÞ
Vn
ð ð
ðnÞ ðnÞ T ðnÞ ðnÞ _ ðnÞ
mXθ ¼ mθX ¼ Rθ ρxP=A dV ¼ ρ x P=A dV ð5:4:9Þ
V Vn
ð T
ðnÞ ðnÞ ðnÞ ðnÞ
mθθ ¼ ρ xP=A xP=A dV ¼ I AZ
Vn
One important special case is when point A is at the center of mass, C. In that case
" #
ðnÞ
mðnÞ I 0
M ¼ ðnÞ
ð5:4:10Þ
0 I CZ
so that
5.4 Kinetic Energy and Work-Energy 371
1 1 ðnÞ
T ðnÞ ¼ mðnÞ vC vC þ I CZ θ_ 2n
ðnÞ ðnÞ
ð5:4:11Þ
2 2
If instead point A is a fixed point O about which the body is rotating we have
ðnÞ
x_ A ¼ 0 and T(n) becomes
1 ðnÞ
T ðnÞ ¼ I OZ θ_ 2n ð5:4:12Þ
2
The work-energy theorem for a single particle says that the differential work done by
the forces acting on the particle is equal to the differential change of the kinetic
energy of the particle (see Eq. (3.2.40)):
dW i ¼ dT i ð5:4:13Þ
If we sum over all N particles then this is also true for the entire system of particles,
i.e.,
X
N X
N
dW ¼ dW i ¼ dT ¼ dT i ð5:4:14Þ
i¼1 i¼1
X
N
dW ¼ Fia dxi ¼ dT ð5:4:15Þ
i¼1
Suppose now that we have a rigidly constrained system of particles in planar motion
(Fig. 5.18a). Then if we have a point A which moves with the rigid system we can
write
xi ¼ xA þ xi=A
ð5:4:16Þ
¼ xA þ RðθÞxi=A
where xi=A is the position vector of the ith particle with respect to point A as measured
in a set of body-fixed coordinates and R is the rotation of the rigid system. The same
relationship is also true for a continuous rigid body (Fig. 5.18b) if we let xi be the
372 5 Planar Dynamics of Rigid Bodies
Fia
mi Fa
xi / A xi / A i
θ θ
Y xi Y xi
A A
xA xA
X X
(a) (b)
Fig. 5.18 (a) A system of forces acting on rigidly connected particles in planar motion and a point
A that moves with the rigid system. The angle θ is shown as measured to the line from A to the ith
particle but it could be the angle from the positive X-axis to any line that moves with the rigid
system. (b) The same set of forces acting on a continuous rigid body in planar motion where xi is a
point on the rigid body where the ith force acts. The angle θ is shown as measured to the line from
A to xi but it could be the angle from the positive X-axis to any line that moves with the rigid system
point on the rigid body where F ia acts and point A is an arbitrary point that moves
with the rigid body. Thus, Eq. (5.4.16) is applicable to either a rigidly constrained
system of particles or a continuous rigid body. In a continuous rigid body we could
also have forces which act over an area or a line on the body surface or are distributed
throughout the body (such as gravity). Those forces could be included in our
discussion of work but for simplicity we will treat all forces as discrete forces as
found in the system of particles case. Upon differentiation of Eq. (5.4.16) we find
Thus,
!
X
N X
N X
N
dW ¼ Fia dxi ¼ Fia dxA þ dθ Rθ xi=A Fia
i¼1 i¼1 i¼1
ð5:4:18Þ
X
N
¼ Fe dxA þ dθ Rθ xi=A Fia
i¼1
where Fe is the total external force acting on the rigid body. Now, consider the term
T
Rθ xi=A Fia ¼ Rθ xi=A Fia
T ð5:4:19Þ
¼ xi=A RθT Fia
5.4 Kinetic Energy and Work-Energy 373
To evaluate this term we will show that for any vector, A, that lies in the X–Y plane
we have
T
xi=A A eZ ¼ xi=A ðRθ ÞT A ð5:4:20Þ
To prove this, we first note that from the definition of the cross product in terms of
components we have for the left side of Eq. (5.4.20)
xi=A A eZ ¼ X i=A AY Y i=A AX ð5:4:21Þ
We also have
T T
xi=A ðRθ ÞT A ¼ ðRÞT xi=A ðRθ ÞT A
T
¼ xi=A RðRθ ÞT A
which, from Eq. (5.4.21), is identical to the left-hand side of Eq. (5.4.20) so that
Eq. (5.4.20) has been proven. If we let A ¼ Fia then Eq. (5.4.18) can be written as
X
N
dW ¼ Fe dxA þ dθ xi=A Fia eZ ð5:4:22Þ
i¼1
But
X
N
xi=A Fia eZ ¼ M AZ
e
ð5:4:23Þ
i¼1
e
where M AZ is the total external moment about point A in the Z-direction, so we have
finally
374 5 Planar Dynamics of Rigid Bodies
dW ¼ Fe dxA þ M AZ
e
dθ ð5:4:24Þ
and the work-energy theorem for the rigid body in plane motion becomes
dW ¼ Fe dxA þ M AZ
e
dθ ¼ dT ð5:4:25Þ
If the rigid body goes through a motion where (xA, θ) changes from a starting
position at (xAs, θs) where the kinetic energy is Ts to a final position at (xAf, θf)
where the kinetic energy is Tf then we have for the total work, W,
xðAf θðf
W¼ F dxA þ
e e
M AZ dθ ¼ T f T s ¼ ΔT ð5:4:26Þ
xAs θs
where the integrals will depend on the actual motion. We can also divide both sides
of Eq. (5.4.24) by the differential time dt and relate it to the kinetic energy to obtain a
power relationship:
dW dxA e dθ
P¼ ¼ Fe þ M AZ
dt dt dt
ð5:4:27Þ
dT
¼ Fe vA þ M AZ
e
ωZ ¼
dt
where P is the power (rate at which work is done), vA is the velocity of point A, and
ωZ ¼ θ_ is the angular velocity about the Z-axis. We can then integrate Eq. (5.4.27)
on time to obtain
If all the external forces and moments are derivable from potential energy functions
then dW ¼ dV where V is the total potential energy and we have d(T+V ) ¼ 0 so that
the total energy is conserved for a rigid body. But note that the total external force on
a rigid body may come from constraints as well as known applied forces so that all of
the forces must be derivable from potentials or be workless for the total energy to be
conserved. Although ideal constraint forces do no virtual work it is not true in
general that ideal constraint forces are workless. For a set of constraints f(q, t) ¼ 0
an ideal generalized constraint force Qc ¼ fqλ. The differential work done by that
force is dW ¼ dqTQc so that dW ¼ dqTfqTλ ¼ (fqdq)Tλ. But from differentiating the
constraints we have fqdq+ft ¼ 0 so dW ¼ (ft)Tλ which is not zero unless ft ¼ 0, i.e.,
the constraints will be workless if the constraints are not explicit functions of time.
5.5 Angular Momentum and the Moment Equation 375
R
φ
θ,θ
vC = ( R − r ) φ = − rθ
C
r
mg
h
Fig. 5.19 Geometric parameters and velocities for a disk rolling without slipping on a circular track
and the only force acting on the disk (its own weight) that does work
The total energy must be conserved for the problem of a disk rolling on a circular
track considered in the last section since the no-slipping constraints are not explicitly
functions of time and the only other force is the force of gravity, which is derivable
from a potential. Thus, the total energy in that problem is (see Fig. 5.19)
1 1
E ¼ T þ V ¼ mv2C þ I C θ_ 2 þ mgh
2 2
1 1 1 2 Rr 2 _2
¼ mðR r Þ2 ϕ_ 2 þ mr ϕ þ mgh ð5:4:29Þ
2 2 2 r
3
¼ mðR r Þ2 ϕ_ 2 þ mg½R ðR rÞ cos ϕ
4
If the MATLAB® script rolling_disk_sim is executed, all the terms needed to find
E are available in the MATLAB® workspace as a function of the time, t, where
phi ¼ ϕ and phidot ¼ ϕ_ . Thus if after running rolling_disk_sim you enter
E = 3*m*(R-r)^2*phidot.^2/4 +m*g*(R-(R-r)*cos(phi));
plot(t, E/E(1))
axis([ 0 10 0.95 1.05])
you will see the plot of E(t)/E(0) shown in Fig. 5.20, where obviously the total
energy of the numerical solution has been conserved (you can refine the vertical
scale if you want to see explicitly the very small changes present).
One of the differences between the motion of a particle and the motion of a rigid
body is that the motion of the rigid body is governed by both force and moment
376 5 Planar Dynamics of Rigid Bodies
E ( t ) 1.01
1
E (0)
0.99
0.98
0.97
0.96
0.95
0 1 2 3 4 5 6 7 8 9 10
time, t (sec)
equations while the particle only requires the force equations of Newton’s second
law. The moments acting on a rigid body are related to changes in the angular
momentum so that we must examine that relationship in more depth. Even for planar
motion problems the relationship can be rather involved.
For a system of N rigidly constrained particles, the angular momentum about a
point A that moves with the rigid system is
X
N
LA ¼ xi=A mi x_ i ð5:5:1Þ
i¼1
where xi/A is the position vector of the ith particle with respect to point A. If,
as before, we let mi ¼ ρ ΔVi where ρ is the mass density (mass/volume) of the
particle and ΔVi is a small volume, then in the limit as the number of particles
becomes infinitely large the angular momentum about point A for a continuous rigid
body (n) is
ð
ðnÞ ð nÞ ðnÞ
LA ¼ ρxP=A x_ P dV ð5:5:2Þ
Vn
x_ P ¼ x_ A þ θ_ n Rθ
ðnÞ ðnÞ ðnÞ ðnÞ
xP=A ð5:5:3Þ
so
5.5 Angular Momentum and the Moment Equation 377
ð ð
ρxP=A θ_ n Rθ xP=A dV
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
LA ¼ ρxP=A dV x_ A þ
Vn Vn
ð
_ ðnÞ T ðnÞ ðnÞ ð5:5:4Þ
þ θ_ n eZ
ðnÞ ðnÞ
¼ mðnÞ xC=A vA ρ x P=A Rθ xP=A dV
Vn
¼ mðnÞ xC=A vA þ I AZ θ_ n eZ
ðnÞ ðnÞ ðnÞ
where we have used Eqs. (5.1.8) and (5.1.19) to rewrite the cross product of the
second term on the right-hand side of Eq. (5.5.4), first in purely matrix-vector form
and then as the moment of inertia. Two important special cases are the following:
ðnÞ
1. Point A is at the center of mass point, C. In that case xC=A ¼ 0 so
LC ¼ I CZ θ_ n eZ
ðnÞ ðnÞ
ð5:5:5Þ
2. Point A is at a fixed point O in the rigid body about which the body rotates. In that
ðnÞ
case vA ¼ 0 so
LO ¼ I OZ θ_ n eZ
ðnÞ ðnÞ
ð5:5:6Þ
We have already examined the moment equation for these two special cases in
Eqs. (5.1.22) and (5.1.28). Thus, in terms of the angular momentum these
moment equations become
MC ¼ L_ C ¼ I C θ€n eZ
ðnÞ ðnÞ ðnÞ
ð5:5:7aÞ
and
MO ¼ L_ O ¼ I O €θn eZ
ðnÞ ðnÞ ðnÞ
ð5:5:7bÞ
It is also instructive to examine the angular momentum and the moment equation
when we use a general reference point B (see Fig. 5.1a). In that case the angular
momentum about B is
ð
ðnÞ ðnÞ ðnÞ
LB ¼ ρxP=B x_ P dV ð5:5:8Þ
Vn
378 5 Planar Dynamics of Rigid Bodies
Vn V
0 1 ð5:5:9Þ
ð ð
þ xC=B @ ρvP=C dV A þ
ðnÞ ðnÞ ðnÞ ðnÞ
ρxP=C vP=C dV
Vn Vn
The first term in brackets on the right side of Eq. (5.5.9) is just the mass m(n) while
the other two terms in brackets vanish, leaving
ð
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
LB ¼ mðnÞ xC=B vC þ ρxP=C vP=C dV ð5:5:10Þ
Vn
But since P and C are both points in the same rigid body vP=C ¼ θ_ n Rθ xP=C and
ðnÞ ðnÞ ðnÞ
we have, following the same steps that we used when considering the relations for a
body-fixed point A,
ð
ρxP=C θ_ n Rθ xP=C dV
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
LB ¼ mðnÞ xC=B vC þ
Vn
ð
¼ mðnÞ xC=B vC þ θ_ n eZ
ðnÞ ðnÞ _ ðnÞ ðnÞ ðnÞ
ρ x P=C Rθ xP=C dV ð5:5:11Þ
Vn
I CZ θ_ n eZ
ðnÞ ðnÞ ðnÞ
¼ mðnÞ xC=B vC þ
Now, consider the moment equation about the general point B from Eq. (5.1.3):
ð h i
ðnÞ ðnÞ ðnÞ
MB ¼ ρ xP=B €xP dV ð5:5:13Þ
Vn
0 1
ð ð
MB ¼ xC=B @ ρ€xP dV A þ
ðnÞ ðnÞ ðnÞ ðnÞ
ρxP=C €xP dV ð5:5:14Þ
Vn Vn
ðnÞ
where aC is the acceleration of the center of mass point C. The integral term is
identical in form to the one considered previously when considering a body-fixed
point A so we will briefly repeat the pertinent steps here in its evaluation:
ð ð
2
ρxP=C x€C þ €θn Rθ xP=C θ_ n RðnÞ xP=C dV
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
ρxP=C €
xP dV ¼
Vn Vn
0 1
ð ð ð
@ ðnÞ A ðnÞ € _ ðnÞ T ðnÞ ðnÞ _ _ ðnÞ T ðnÞ
¼ ρxP=C aC þ θn eZ x P=C Rθ xP=C dV θ n eZ ρ x P=C xP=C dV
2
Vn Vn Vn
¼ 0þI CZ €
ðnÞ
θn eZ þ0
ð5:5:16Þ
giving
MB ¼ L_ B þ mðnÞ vB vC
ðnÞ ðnÞ ðnÞ ðnÞ
ð5:5:18bÞ
Equations (5.5.18a) and (5.5.18b) are the most general forms of the relationship
between the moment and the angular momentum. Although we derived these results
assuming planar motion, Eqs. (5.5.18a) and (5.5.18b) are in fact also valid for
general 3-D problems as we will see in Chap. 8. Since point B is an arbitrary point
we can recover all of the previous special cases considered from Eqs. (5.5.18a) and
(5.5.18b). These include the following:
380 5 Planar Dynamics of Rigid Bodies
MC ¼ L_ C
ðnÞ ðnÞ
ð5:5:19aÞ
L_ C ¼ I CZ €θn eZ .
ðnÞ ðnÞ
2. Point B is a fixed point O in the body about which the body is rotating. Since
vB ¼ vO ¼ 0
MO ¼ L_ O
ðnÞ ðnÞ
ð5:5:19bÞ
L_ ¼ I θ€n eZ .
ðnÞ ðnÞ
O OZ
ðnÞ
3. Point B is a point D in the body where xC=D is parallel to aD. Using Eq. (5.5.18a)
and letting point A be point D in Eq. (5.5.4) we find
MD ¼ L_ D mðnÞ vC=D vC
ðnÞ ðnÞ ðnÞ ðnÞ
¼ I DZ €θn eZ
ðnÞ
The case of rolling without slipping of a cylinder on a surface where point D is the
point of contact with the surface and the center of mass is at the center of the
cylinder is an example of this type of case that we have seen before in Sect. 5.3.3.
However note that if the center of mass is offset from the center of the cylinder
then L_ D 6¼ I DZ €θn eZ in general.
ðnÞ ðnÞ
4. Point B is a fixed (inertial) point Q where Q is not a point moving with the rigid
body. Since vQ ¼ 0
MQ ¼ L_ Q
ðnÞ ðnÞ
ð5:5:19dÞ
but we cannot relate the angular momentum about Q to a mass moment of inertia
so that this choice of a point is of limited use for rigid body problems.
In this chapter we have given detailed discussions of the general forms of the
equations that govern planar rigid body motion. In principle, we could use any of
those forms to solve a particular problem. However, in practice there are several
5.6 Solving Systems of Rigid Bodies in Plane Motion 381
forms and approaches that are often preferred. In Sect. 5.1, for example, we saw that
we can describe the equations of plane motionof a rigid body (n) in terms of
ðnÞ ðnÞ
Cartesian center of mass coordinates X C ; Y C and the angle θn that a line in
the body makes with respect to the positive X-axis. In general, that body will have a
ðnÞ;e ðnÞ;e
net external force acting it whose Cartesian components are F X ; F Y and net
ðnÞ;e
external moment about the center of mass is M CZ . Similarly, there may be
constraints
acting on the body generating constraint force components
ðnÞ;c ðnÞ;c ðnÞ;c
FX ; FY and a constraint moment about the center of mass, M CZ . As we
discussed, the equations of motion in these coordinates can be written in matrix-
vector form as
in terms of a mass matrix, M(n), and generalized forces which are separated into
externally applied forces, Q(n; e), and constraint forces, Q(n); c:
2 3 8 ðnÞ;e 9 8 ðnÞ;c 9
mðnÞ 0 0 > > > >
< X >
> < X >
>
F F
6 7 = =
MðnÞ ¼ 6
4 0 mðnÞ 0 7
5, Q
ðnÞ;e
¼ FY ðnÞ;e
, Q ðnÞ;c
¼ FY ðnÞ;c
ð5:6:2Þ
> > > >
ðnÞ : ðnÞ;e >
> ; : ðnÞ;c >
> ;
0 0 IC M CZ M CZ
ðnÞ
and where m(n) is the mass of body (n) and I C is its moment of inertia with respect to
the center of mass in the Z-direction. For a system of Nb interconnected rigid bodies
in these coordinates we can collect all of the equations of motion in a similar matrix-
vector form as
q ¼ Qe þ Qc
M€ ð5:6:3Þ
where M,q,Qe,Qc are collections of all the individual rigid body terms in the system.
If the constraint forces are ideal constraints then we can also write them in the
382 5 Planar Dynamics of Rigid Bodies
standard form we have seen before, namely, Qc ¼ ATλ, where the A matrix appears
in the constraint equations written as
q¼b
A€ ð5:6:5Þ
and, assuming that the constraints are independent, we can solve the augmented
system of Eqs. (5.6.4) and (5.6.5) for the equations of motion and constraint forces as
1
€ ¼ M1 Qe þ M1 AT AM1 AT
q b AM1 Qe
1 ð5:6:6Þ
Qc ¼ AT AM1 AT b AM1 Qe
Making this choice of coordinates and using an augmented approach means that for
Nb rigid bodies we must solve 3Nb equations. This may be too large of a system to
solve by hand, but it is ideally set up for a numerical computer-based solution. Some
of the complexities of forming up the large vectors and matrices with this augmented
approach can also be handled with the use of computer-based symbolic algebra.
Because of the importance of this approach, in many of the problems at the end of
this chapter we have asked that the solution be obtained with this augmented
approach method. Of course, as mentioned earlier, we must be aware of the problem
of constraint drift and ensure that we have an accurate numerical solution with this
method.
If one wants to use generalized coordinates other than the center of mass Cartesian
coordinates and angles of rotation for each rigid body to describe the motion then it
is often convenient to obtain the equations of motion using Lagrange’s equations.
For a continuous rigid body Lagrange’s equations will appear in much the same
forms we have seen in the particle or multiple-particle cases but there are some
differences in the underlying expressions so we will examine the derivation of
Lagrange’s equations here for planar motion. To keep the discussion simple, con-
sider a single unconstrained rigid body in planar motion. Let the rigid body be
described by the generalized coordinates q ¼ (XC, YC, θ) and suppose we transform
to a new set of generalized u-coordinates through the transformation q ¼ q(u, t).
Then the kinetic energy is
1 1
T ¼ mvC u; u_ vC u; u_ þ I C ω u; u_ ω u; u_ ð5:6:7Þ
2 2
Now, consider
5.6 Solving Systems of Rigid Bodies in Plane Motion 383
∂T ∂vC ∂ω
¼ mvC þ ICω
∂u_ k ∂u_ k ∂u_ k
¼ mvC ck þ I C ω dk ð5:6:8Þ
∂T ∂vC ∂ω
¼ mvC þ ICω
∂uk ∂uk ∂uk
∂vC ∂ω
ck ¼ , dk ¼ ð5:6:9Þ
∂u_ k ∂u_ k
Thus,
d ∂T d ðmvC Þ dðI C ωÞ
¼ ck þ dk þ mvC c_ k þ I C ω d_ k
dt ∂u_ k dt dt ð5:6:10Þ
¼ F ck þ
e
MCe dk þ mvC c_ k þ I C ω d_ k
and
dθ X ∂θ ∂θ
ω¼ ¼ u_ k þ ð5:6:12Þ
dt k
∂u k ∂t
∂vC ∂XC ∂ω ∂θ
ck ¼ ¼ , dk ¼ ¼ ð5:6:13Þ
∂u_ k ∂uk ∂u_ k ∂uk
∂ω
¼ d_ i ð5:6:15Þ
∂ui
Using Eqs. (5.6.14) and (5.6.15) into Eq. (5.6.10), and using Eq. (5.6.8), Eq. (5.6.10)
becomes
d ∂T ∂T ~e
¼Q ð5:6:16Þ
dt ∂u_ k ∂uk k
~ e , given by
which is Lagrange’s equation with a generalized external force, Q k
~ e ¼ Fe ck þ M e dk
Q k C
∂vC ∂ω ð5:6:17Þ
¼ Fe þ MCe
∂u_ k ∂u_ k
If there are constraints acting on the rigid body then there will also be generalized
constraint forces, whose components, Q ~ c , are given in terms of Cartesian
k
components:
~ c ¼ Fc ck þ M c dk
Q k C
X _ ð5:6:18Þ
2
∂X_ Ci c ∂θ
¼ F ic þ M CZ
i¼1
∂u_ k ∂u_ k
X
3
∂q_ i
~c ¼
Q Qic ð5:6:19Þ
k
i¼1
∂u_ k
X
3
Aki €qi ¼ bk ðk ¼ 1; . . . ; pÞ ð5:6:20Þ
i¼1
and that these constraints generate ideal constraint “forces.” Then from the Lagrang-
ian prescription we have
5.6 Solving Systems of Rigid Bodies in Plane Motion 385
X
p
Qic ¼ Aki λk ð5:6:21Þ
k¼1
X3
∂qi ∂q
q_ i ¼ u_ m þ i
m¼1
∂u m ∂t
ð5:6:22Þ
X3
∂qi X3
d ∂qi
2
∂ q
€qi ¼ €um þ u_ m þ 2i
m¼1
∂um m¼1
dt ∂um ∂t
which is a relationship called the “cancelling of the dots” for the obvious reason. If
we place the acceleration expression in Eq. (5.6.22) into the constraint equations,
Eq. (5.6.20), then the constraints can be written as
3 X
X 3
∂qi
Aki €um ¼ b~k ðk ¼ 1; . . . ; pÞ ð5:6:24Þ
i¼1 m¼1
∂um
or, equivalently,
X
3
A~km €um ¼ b~k ðk ¼ 1; . . . ; pÞ ð5:6:25Þ
m¼1
where
X
3
∂qi X3
∂q_ i
A~km ¼ Aki ¼ Aki ð5:6:26Þ
i¼1
∂um i¼1
∂u_ m
Now, let us return to the generalized constraint force, Eq. (5.6.19), and use
Eqs. (5.6.21) and (5.6.26). We find
386 5 Planar Dynamics of Rigid Bodies
X3 X p
∂q_ i
~c ¼
Q Aki λk
m
i¼1 k¼1
∂ u_ m
ð5:6:27Þ
X
p
¼ A~km λk
k¼1
which shows that the generalized constraint force in the new generalized u-coordi-
nates remains an ideal constraint, i.e., it satisfies the Lagrange prescription.
In summary, the motion of a constrained rigid body can be written, using
Lagrange’s equations and the constraint equations in the new set of generalized
(and constrained) coordinates, as
Xp
d ∂T ∂T
~e þ
¼Q A~km λk
dt ∂u_ m ∂um m
k¼1
ð5:6:28Þ
X
3
A~km €um ¼ b~k ðk ¼ 1; . . . ; pÞ
m¼1
Also, it is important to note that we have shown that the form of Eq. (5.6.28) for the
equations of motion and the acceleration-based constraint equations for a
constrained rigid body with ideal constraint forces is the same for any generalized
coordinates we may want to use.
Once the kinetic energy terms in Lagrange’s equations are evaluated explicitly we
can identify the M€ ~ in (which was missing in the
u term and the inertial force term, Q
original q-coordinates), and solve for the equations of motion and generalized
constraint force with the standard augmented approach in the generalized u-coordi-
nates. We can use Lagrange’s equations in exactly the same manner for a system of
rigid bodies, but we will not show that generalization here. A number of the
problems in the next section use this Lagrangian approach to generate the equations
of motion.
5.7 Problems
P5.1. The two ends of a homogeneous thin bar of mass m and length l ride in
smooth slots as shown in Fig. P5.1. (a) Derive the equation of motion for this
one degree of freedom problem using a direct Newton-Euler approach, i.e.,
draw a free body diagram and apply the force and moment equations of
motion. Using the constraint equations, eliminate the unknown constraint
forces and obtain a single differential equation for the angle, θ. Solve this
equation numerically. Let m ¼ 4 kg, l ¼ 1.5 m, and θ(0) ¼ 3π/4 rad, θ_ ð0Þ
¼ 0 and take the solution time to be long enough to see a complete sequence
5.7 Problems 387
of up-and-down and back-and-forth motions for the bar. (b) Animate the
motion using the MATLAB® function animate_lines described in Chap. 3.
P5.2. Use an augmented approach to solve for the motion of the bar in Fig. P5.1 in
terms of the coordinates (XC, YC, θ) where (XC, YC) are the X- and Y-coordi-
nates of the center of mass of the bar and θ is the angle shown in Fig. P5.1
Solve the equations of motion numerically for the bar in conjunction with the
twice-differentiated constraint equations. Let m ¼ 4 kg, l ¼ 1.5 m, and
θ(0) ¼ 3π/4 rad, θ_ ð0Þ ¼ 0 and take the solution time to be long enough to
see a complete sequence of up-and-down and back-and-forth motions for the
bar. Compare with the solution obtained in problem P5.1.
P5.3. Using the numerical solution of problem P5.2 determine the constraint forces
acting at A and B on the bar.
P5.4. The motion of the bar shown in Fig. P5.1 is a conservative problem so show
that the numerical solution obtained in problem P5.2 satisfies the conserva-
tion of energy during the motion. What about the satisfaction of the posi-
tional constraint equation and its first derivative during the motion?
P5.5. Consider the case where a thin homogeneous bar is connected to two sliding
masses as shown in Fig. P5.2. Use a Lagrangian approach to obtain the
equation of motion of this single degree of freedom problem for the angle, θ.
Let m1 ¼ m2 ¼ 2 kg, m3 ¼ 3 kg, l2 ¼ 1.5 m, and θ2(0) ¼ 3π/4, θ_ 2 ð0Þ ¼ 0.
Solve this equation numerically. Take the solution time to be long enough to
see a complete sequence of up-and-down and back-and-forth motions for
the bar.
P5.6. Consider the system shown in Fig. P5.2. Use an augmented approach to
solve for the motion of the bar and the masses in terms of the coordinates
(Y(1), X(2), Y(2), θ2, X(3)) where (X(n), Y(n)) are the X- and Y-coordinates of the
center of mass of body (n) and let m1 ¼ m2 ¼ 2 kg, m3 ¼ 3 kg, l2 ¼ 1.5 m, and
θ2(0) ¼ 3π/4, θ_ 2 ð0Þ ¼ 0. Again take the solution time to be long enough to
see a complete sequence of up-and-down and back-and-forth motions for the
bar. Compare this solution with the solution of problem P5.5.
388 5 Planar Dynamics of Rigid Bodies
l2
m2
(2)
θ2
B
P5.7. Using the numerical solution of problem P5.6 determine the constraint forces
acting at A and B on the bar.
P5.8. P5.8 The motion of the bar shown in Fig. P5.2 is a conservative problem so
show that the numerical solution obtained in problem P5.6 satisfies the
conservation of energy during the motion. What about the satisfaction of
the positional constraint equation and its first derivative during the motion?
P5.9. A block of mass m1 slides on a horizontal surface and is attached to a linear
spring with spring constant k. The block is pinned to a thin homogeneous rod
of mass m2 and length l2, as shown in Fig. P5.3. (a) Use a Lagrangian
approach to obtain the equations of motion for this two degree of freedom
system in terms of (X(1), θ2) where X(1) is the horizontal position of the block.
Solve this system numerically. Assume that the spring is unstretched when
X(1) ¼ 0. Let m1 ¼ 2 kg, m2 ¼ 3 kg, l2¼ 2 m, and k¼ 15 N/m and take the rod
to be vertical at time t ¼ 0 when the spring has a stretch of 1 m and the system
is released from rest. Let the time interval for the solution be 15 s. (b) Animate
the motion using the MATLAB® function animate_lines described in
Chap. 3.
5.7 Problems 389
θ1 l2 , m2
A
(2)
X θ2
P5.10. Consider the system shown in Fig. P5.3. Use an augmented approach to
solve for the motion of this two degree of freedom system using the gener-
alized coordinates (X(1), X(2), Y(2), θ2), where (X(n), Y(n)) are the coordinates in
the X- and Y-directions of the center of mass of body (n). As in problem P5.9
assume that the spring is unstretched when X(1) ¼ 0. Let m1 ¼ 2 kg, m2 ¼ 3
kg, l2¼ 2 m, and k¼ 15 N/m and take the rod to be vertical at time t ¼ 0 when
the spring has a stretch of 1 m and the system is released from rest. Let the
time interval for the solution be 15 s. Compare your solution with the
solution of problem P5.9.
P5.11. Using the numerical solution of problem P5.10 determine the constraint
forces acting at A on the rod.
P5.12. The motion of the system in Fig. P5.3 is a conservative problem so show that
the numerical solution obtained in problem P5.10 satisfies the conservation
of energy during the motion. What about the satisfaction of the positional
constraint equation and its first derivative during the motion?
P5.13. The double pendulum of Fig. P5.4 consists of two thin, homogeneous bars
where bar (1) has a mass m1 and a length l1 and bar (2) has a mass m2 and a
length l2. (b) Use a Lagrangian approach to obtain the equations of
motion for this two degree of freedom system in terms of (θ1, θ2). Let
m1 ¼ 2 kg, l1 ¼ 1.5 m, m2 ¼ 3 kg, and l2 ¼ 2 m. At time t ¼ 0 take
θ1(0) ¼ π/4 and θ2(0) ¼ π/4 when the system is released from rest and solve
for the motion over a time interval of 10 s. (b) Animate the motion using
the MATLAB® function animate_lines described in Chap. 3.
P5.14. Consider the double pendulum shown in Fig. P5.4. Use an augmented
approach to solve for the motion of this two degree of freedom system
using the generalized coordinates (X(1), Y(1), θ1, X(2), Y(2), θ2), where (X(n),
Y(n)) are the coordinates in the X- and Y-directions of the center of mass of
bar (n). As in problem P5.13 let m1 ¼ 2 kg, l1 ¼ 1.5 m, m2 ¼ 3 kg, and l2 ¼
2 m. At time t ¼ 0 take θ1(0) ¼ π/4 and θ2(0) ¼ π/4 when the system is
released from rest and solve for the motion over a time interval of 10 s.
Compare to the solution obtained previously in problem P5.13. Animate the
motion using the MATLAB® function animate_lines described in Chap. 3.
390 5 Planar Dynamics of Rigid Bodies
P5.15. Using the numerical solution of problem P5.14 determine the constraint
forces acting at O and A on bar (1) and the constraint forces acting at A on
bar (2).
P5.16. The motion of the system in Fig. P5.4 is a conservative problem so show that
the numerical solution obtained in problem P5.14 satisfies the conservation
of energy during the motion. What about the satisfaction of the positional
constraint equation and its first derivative during the motion?
P5.17. Consider the crank-slider system shown in Fig. P5.5 where the crank AB is
being driven by an external moment, M(t). (a) Use a Lagrangian approach to
obtain the equations of motion of this system in terms of the coordinates
X P ; ~θ 1 ; ~θ 2 . Incorporate the constraint equations as ideal constraint forces,
which are given explicitly in terms of the second-order time derivatives of
the constraint equations in an augmented approach. Let m1g¼ 2 lb., m2g ¼ 1
lb., m3g¼ 3 lb., l1¼ 0.5 ft., and l2¼ 1.0 ft., and assume that the driving
moment is a constant given by M ¼ 2 ft.-lb. At time t ¼ 0 assume that the
system is released from rest and ~θ 1 ¼ 30∘ . Solve numerically for the motion
over at least three revolutions of the crank. (b) Animate the motion using the
MATLAB® function animate_lines described in Chap. 3.
P5.18. Solve the problem of the crank-slider shown in Fig. P5.5 using an augmented
approach with the coordinates (X(1), Y(1), θ1, X(2), Y(2), θ2, X(3)) where (X(n),
Y(n)) are the coordinates of the center of mass of body (n) and (θ1, θ2) are
angles measured from the positive X-axis (note the change of θ2 from the
angle ~θ 2 shown in Fig. P5.5). Let m1g¼ 2 lb., m2g ¼ 1 lb., m3g¼ 3 lb., l1¼
0.5 ft., and l2¼ 1.0 ft., and assume that the driving moment is a constant
given by M ¼ 2 ft.-lb. At time t ¼ 0 assume that the system is released from
rest and ~θ 1 ¼ 30∘ . Solve numerically for the motion over at least three
revolutions of the crank. Compare your solution with the solution obtained
in problem P5.17. Animate the motion using the MATLAB® function
animate_lines described in Chap. 3.
m1 , l1 l2 , m2
(1) (2)
EY m3 (3)
θ%2
M (t ) θ%1
A D
EX X
XP
5.7 Problems 391
P5.19. Using the numerical solution of problem P5.18 determine the constraint
forces acting at A and B on bar (1) and the forces at B and D acting on bar (2).
P5.20. Examine the satisfaction of the constraint equation and its time derivative for
the numerical solution of problem P5.18.
P5.21. Consider the two-bar mechanism shown in Fig. P5.6 where bar AB is being
driven by an external moment, M(t), and bar BE has a smooth slot which
rides in a fixed pin at D. (a) Use the Lagrangian for this system to obtain the
equations of motion in terms of the coordinates ~θ 1 ; ~θ 2 and use an aug-
mented approach to solve these two equations of motion in conjunction with
the constraint equation for this one degree of freedom system. Note that the
constraint equation can be obtained from the geometry of Fig. P5.6 as
f ~θ 1 ; ~θ 2 ¼ xB=A d EX e ¼ 0, where e is a unit vector normal to bar
BE at point D. Let m1g¼ 2 lb., m2g¼ 3 lb., l1¼ 1.0 ft., and l2¼ 2.0 ft., and
assume that the driving moment is a constant given by M ¼ 3 ft.-lb. At time
t ¼ 0 assume that the system is released from rest and ~θ 1 ¼ 90∘ . Solve
numerically for the motion over at least three revolutions of the crank.
(b) Animate the motion using the MATLAB® function animate_lines
described in Chap. 3.
P5.22. Solve the problem of the two-bar mechanism shown in Fig. P5.6, where bar
AB is being driven by an external moment, M(t), and bar BE has a smooth slot
which rides in a fixed pin at D. (a) Use an augmented approach with the
coordinates (X(1), Y(1), θ1, X(2), Y(2), θ2) where (X(n), Y(n)) are the coordinates
of the center of mass of body (n) and θn are angles of body (n) as measured
from the positive X-axis (note the change of θ2 from the angle ~θ 2 shown in
Fig. P5.6). The constraint equation at D can be obtained from the geometry
of Fig. P5.6 as g(θ1, θ2) ¼ (xB/A d EX) e ¼ 0, where e is a unit vector
normal to bar BE at point D. Let m1g¼ 2 lb., m2g¼ 3 lb., l1¼ 1.0 ft., and l2¼
2.0 ft., and assume that the driving moment is a constant given by M ¼ 3 ft.-
lb. At time t ¼ 0 assume that the system is released from rest and ~θ 1 ¼ 90∘ .
Solve numerically for the motion over at least three revolutions of the crank.
Compare your solution with the solution obtained in problem P5.21.
392 5 Planar Dynamics of Rigid Bodies
Y B (3)
θ3
l2 , m2 (4) l4 , m4
(2)
EY
M (t ) θ2 θ4
X E
A
EX
l1
P5.23. Using the numerical solution of problem P5.22 determine the constraint
forces acting on bar (1) at A and B and the constraint forces acting on bar
(2) at B and D.
P5.24. Examine the satisfaction of the constraint equation and its time derivative for
the numerical solution of problem P5.22.
P5.25. Consider the four-bar mechanism shown in Fig. P5.7 where bar AB is being
driven by an external moment, M(t). (a) Use the Lagrangian for this system to
obtain the equations of motion in terms of the coordinates (θ2, θ3, θ4) and use
an augmented approach to solve these three equations of motion in conjunc-
tion with the two constraint equations for this one degree of freedom system.
Let m2¼ 3 kg, m3¼ 3 kg, m4¼ 3 kg, l1¼ 1.0 m, l2¼ 0.4 m, l3¼ 0.8 m, and l4¼
0.7 m, and assume that the driving moment is M(t) ¼ 2t N-m, where t is the
time in seconds. At time t ¼ 0 the system is released from rest and θ2 ¼ π/2
rad. In this mechanism, while bar AB can execute continuous revolutions, bar
DE performs a rocking back-and-forth motion. Solve numerically for the
motion over a time frame long enough to see four complete back-and-forth
motions of DE. (b) Animate the motion using the MATLAB® function
animate_lines described in Chap. 3.
P5.26. Solve the problem of the four-bar mechanism of Fig. P5.7 where bar AB is
being driven by an external moment, M(t). (a) Use an augmented approach to
solve this problem with the coordinates (X(2), Y(2), θ2, X(3), Y(3), θ3, X(4),
Y(4), θ4) where (X(n), Y(n)) are the coordinates of the center of mass of body
(n) and θn are angles of body (n) as measured from the positive X-axis. Here
there are nine equations of motion and eight constraint equations for this one
degree of freedom problem. Let m2¼ 3 kg, m3¼ 3 kg, m4¼ 3 kg, l1¼ 1.0 m,
l2¼ 0.4 m, l3¼ 0.8 m, and l4¼ 0.7 m, and assume that the driving moment is
M(t) ¼ 2t N-m, where t is the time in seconds. At time t ¼ 0 the system is
released from rest and θ2 ¼ π/2 rad. In this mechanism, while bar AB can
execute continuous revolutions, bar DE performs a rocking back-and-forth
motion. Solve numerically for the motion over a time frame long enough to
see four complete back-and-forth motions of DE. Compare your solution
5.7 Problems 393
with the solution obtained in problem P5.25. (b) Animate the motion using
the MATLAB® function animate_lines described in Chap. 3.
P5.27. Use the numerical solution of problem P5.26 to obtain the constraint forces at
A and B acting on bar (2), the constraint forces at B and D acting on bar (3),
and the constraint forces at D and E acting on bar DE.
P5.28. Examine the satisfaction of the constraint equation and its time derivative for
the numerical solution of problem P5.26.
Chapter 6
Dynamic and Static Stability
There are a number of ways to define dynamic stability. In this section we outline in
physical terms one common stability criterion using the graphical depictions of
Rosenberg [1]. Consider, for example, a two degrees of freedom motion of a
dynamical system where we can define the motion in terms of the two generalized
coordinates (q1, q2) (Fig. 6.1). Under a given set of initial conditions we can plot the
motion of the system as a path followed in the (q1, q2, t) coordinates, where t is the
time. The solid line, labeled “original motion” in Fig. 6.1, is such a path. If we
perturb the initial conditions slightly then the motion will occur along a different
path, shown as the dashed line in Fig. 6.1. If at some time this different path is close
to the unperturbed path and remains close to it for all later times, we say that the
motion is stable. We can visualize this criterion by saying that the path of motion
must always lie in a region which surrounds the unperturbed path and does not grow
with time such as the tube shown in Fig. 6.1. This “definition” of stability can be
q2
q1
q2
q1
Consider the case of a natural system with p degrees of freedom. Recall from Chap. 2
that for natural systems when we transform from Cartesian to p independent gener-
alized coordinates the time, t, is not explicitly present in that transformation so that
the kinetic energy, T, is just quadratic in the generalized velocities, i.e. (see
Eq. (2.7.14)),
1XX
p p
T ¼ T2 ¼ M ij ðqÞq_ i q_ j ð6:2:1Þ
2 i¼1 j¼1
where Mij is a positive definite mass matrix. If in addition all the forces are derivable
from potential energy functions, then the total energy, E ¼ T+V ¼ T2+V, is
conserved, where V is the total potential energy of all the forces present. For such
natural, conservative systems one has Lagrange-Dirichlet stability theorem which
says:
Lagrange-Dirichlet Stability Theorem
An equilibrium position of a natural, conservative dynamical system with p degrees
of freedom is (Lyapunov) stable if the potential energy, V(q1, q2, . . ., qp), which is
stationary at an equilibrium point q0 ¼ (q10, q20, . . ., qp0), also has a minimum value
at that equilibrium point relative to all neighboring points.
According to this theorem an equilibrium state is stable if when the system is
given any small change in the generalized coordinates from the equilibrium state,
then the change of the potential energy is positive, i.e., ΔV > 0. If, for some small
change of one or more coordinates, ΔV < 0, then the equilibrium state is unstable,
while if ΔV ¼ 0 for some small change of one or more coordinates but ΔV > 0 for all
other coordinate changes then we will say that the equilibrium state is neutrally
stable. These conditions make sense from a physical standpoint since conservation
of the total energy and the kinetic energy being given by Eq. (6.2.1) means that a
positive change of the potential energy requires that the kinetic energy must decrease
as a system moves away from the equilibrium position, thus limiting how far from
equilibrium the system can go. Likewise, a negative change of the potential energy
means that the kinetic energy will actually increase as the system moves to a nearby
position and the system will tend to be driven away from the equilibrium position. A
zero change of potential energy means that there is no tendency to either keep the
system close to equilibrium or drive it away from equilibrium. As a simple example
of this reasoning, consider the case of a one degree of freedom system such as the
ball of mass m constrained to move in the x–y plane on a cylindrical surface as shown
in Fig. 6.3. Here the total potential energy of the system is just that of gravity, i.e.,
V ¼ mgy. For an equilibrium position at the bottom of a cylindrical trough
(Fig. 6.3a), we see that y must increase for any small displacement either to the
398 6 Dynamic and Static Stability
x x
ΔV = 0
Fig. 6.3 Examples of (a) a stable equilibrium position, (b) an unstable equilibrium position, and (c)
a neutrally stable position
right or to the left so that ΔV > 0 always and the equilibrium state is stable. For the
cylindrical hill of Fig. 6.3b, however, we see that ΔV < 0 away from equilibrium at
the top of the hill so that the equilibrium state is unstable. Finally, for the case of the
ball on the plane surface of Fig. 6.3c it is clear that y is a constant for any small
displacement from an equilibrium position so ΔV ¼ 0 and the equilibrium is by
definition neutrally stable.
The fact that the potential energy is stationary at equilibrium follows from
Lagrange’s equations for conservative systems at equilibrium (where the kinetic
energy is identically zero):
∂V
¼0 ðk; ¼ 1; 2; . . . ; pÞ ð6:2:2Þ
∂qk q¼q0
ð6:2:3Þ
6.2 Stability of a Natural, Conservative System Near Equilibrium 399
where H.O.T. indicates “higher order terms.” Since the first derivatives vanish at
equilibrium we have ΔV ¼ V(q) V(qo) > 0 for all small changes Δqk if the matrix of
second derivatives, Akm, is positive definite, where Akm ¼ ∂2V/∂qk∂qm. This
assumes, of course, that all the second derivatives do not vanish, since if this occurs
one must then consider the higher order derivatives in the H.O.T. that contribute to
ΔV. A positive definite matrix has the property that its determinant must be positive
and the determinant of all its principal minors must also be positive, where succes-
sive principal minors are obtained by deleting a row and column from the remaining
matrix. Figure 6.4, for example, shows the matrix, A, of second derivatives of a
N degree of freedom system where for stability one must have the successive
determinants DN > 0,DN 1 > 0,. . .,D1 > 0. For a system with a large number of
degrees of freedom it becomes computationally expensive to perform an exhaustive
test of all these determinants in order to establish stability but for a system with one
or two degrees of freedom it is easy to determine stability in this manner. In fact for a
one degree of freedom system we simply have
8
>0
d V <
2 stable
<0 unstable ð6:2:4Þ
dq2 : ¼ 0 indeterminate
d2 V mgAπ 2 πx
2
¼ 2
cos ð6:2:5Þ
dx 2L L
400 6 Dynamic and Static Stability
L m
x
(a) (b)
which shows that the second derivative is positive at the equilibrium points at the
bottom of the coaster track, x ¼ 2mL (m ¼ 0, 1, 2, . . .), so that the positions are
stable, and at the high points x ¼ (2m+1)L (m ¼ 0, 1, 2, . . .) the second
derivative is negative so that those positions are unstable. These results, of course,
correspond to our expectations from the example discussed in Fig. 6.3.
The simple pendulum that we discussed in Chap. 2, Sect. 2.5.3, was also a natural,
conservative, one-dimensional system (Fig. 6.5b). In that case the potential energy
V ¼ mgL cos θ so that ∂V/∂θ ¼ mgL sin θ ¼ 0 gives the equilibrium positions
θ ¼ nπ (n ¼ 0, 1, 2, . . .) and so for ∂2V/∂θ2 ¼ mgL cos θ we see that the second
derivative is positive at equilibrium positions θ ¼ 2mπ (m ¼ 0, 1, 2, . . .) and
negative when θ ¼ (2m+1)π (m ¼ 0, 1, 2, . . .) which correspond to the pendulum
hanging down and up vertically, as we would expect. Note that another way to find
the equilibrium positions is directly from the equation of motion €θ þ g sin θ=L ¼ 0
by setting all time derivatives present equal to zero, which again leads to sinθ ¼ 0 at
equilibrium.
The multiparticle pendulum of Chap. 3, Sect. 3.3 (Fig. 6.6a), without dampers
present would appear to be an example of a two degrees of freedom stability problem
but if we examine the potential energy we find that adding the potential energy of the
two equal masses gives
6.2 Stability of a Natural, Conservative System Near Equilibrium 401
V ¼ mgl2 cos ϕ þ mgl1 cos θ=2 mgl2 cos ϕ mgl1 cos θ=2
ð6:2:6Þ
¼ 2mgl2 cos ϕ
which is independent of the angle θ; this makes sense from a physical standpoint
since the two masses can balance at any fixed angle θ about the pivot point C shown
in Fig. 3.12a. Recall, however, that the final θ equilibrium position of this system,
which had rotational dampers that are not shown in Fig. 6.5a, was not arbitrary but
was determined by the initial conditions. The equilibrium condition stability criteria
for this problem (with dampers absent) are thus identical to a simple pendulum of
mass 2 m and length l2, giving stable equilibrium positions for ϕ ¼ 2mπ
(m ¼ 0, 1, 2, . . .) and unstable positions for ϕ ¼ (2m+1)π (m ¼ 0, 1, 2, . . .).
The double pendulum of Chap. 3, Sect. 3.4.1 (Fig. 6.6b), is a system with true
two degrees of freedom stability criteria. We have for the potential energy
V ¼ m1gl1 cos θ1 m2g(l1 cos θ1 +l2 cos θ2) so that setting ∂V/∂θ1 ¼ 0 and ∂V/
∂θ2 ¼ 0 gives the equilibrium conditions sinθ1 ¼ 0 and sinθ2 ¼ 0. This results in the
four possible equilibrium positions shown in Fig. 6.7 which are θ1 ¼ 0, θ2 ¼ 0
(Fig. 6.7a), θ1 ¼ 0, θ2 ¼ π (Fig. 6.7b), θ1 ¼ π, θ2 ¼ 0 (Fig. 6.7c), and θ1 ¼ π, θ1 ¼ π
(Fig. 6.7d). There are, of course, additional positions that are multiples of 2π, as
given in the previous examples, but which are not shown here. The second deriva-
tives of the potential energy are
2
∂ V
¼ ðm1 þ m2 Þgl1 cos θ1
∂θ21
2
∂ V
¼ m2 gl2 cos θ2 ð6:2:7Þ
∂θ22
2
∂ V
¼0
∂θ1 ∂θ2
which, because the mixed second derivative vanishes, can be reduced to the equiv-
alent stability criteria
2 2
∂ V ∂ V
> 0, >0 ð6:2:9Þ
∂θ21 ∂θ22
Thus, placing the four possible equilibrium states into these conditions gives
(a) stable, (b) unstable, (c) unstable, and (d) unstable. Again, these results coincide
with what we intuitively expect to be the behavior of the double pendulum from our
discussion of Fig. 6.3.
All of the examples discussed have been for natural, conservative systems. However,
recall our discussion of Lagrange’s equations and the particle on a rotating hoop
example in Chap. 2, Sect. 2.7 (see Fig. 6.8). There we showed that, for nonnatural
systems where all the forces are derivable from potential energy functions and the
Lagrangian is not an explicit function of time (i.e., ∂L/∂t ¼ 0), the Jacobi integral
h ¼ T2+V To is a constant. This conservation law was also written in the alternate
form h ¼ T2+U ¼ constant where U ¼ V T0 is called the dynamic potential. For
nonnatural dynamical systems where the Jacobi integral is a constant and where
T1 ¼ 0 we can again use the stability theorem of Lagrange-Dirichlet where we
R
x
θ
m
6.3 Stability of a Nonnatural System Near Equilibrium 403
simply replace the stability criteria on the total potential energy by the same criteria
on the dynamic potential. The particle on the rotating hoop problem is such a
problem so that for this one degree of freedom system we have ∂U/∂q ¼ 0 at
equilibrium and the stability conditions are
8
> > 0 stable
d U <
2
< 0 unstable ð6:3:1Þ
dq2 >
:
¼ 0 indeterminate
1
In the rotating hoop problem T 2 ¼ mR2 θ_ 2 and
2
1
U ¼ mðR sin θÞ2 Ω2 mgR cos θ ð6:3:2Þ
2
At equilibrium
∂U
¼ mR sin θ g RΩ2 cos θ ¼ 0 ð6:3:3Þ
∂θ
which gives the same conditions as found in Eq. (2.7.46) whose solutions
(neglecting multiples of 2π) are θ1 ¼ 0, θ2 ¼ π, and θ3 ¼ cos1(g/RΩ2),
as found previously in Chap. 2. The second derivative of the dynamic potential is
2
∂ U
¼ mR cos θ g RΩ2 cos θ þ mR2 Ω2 sin 2 θ
∂θ 2 ð6:3:4Þ
¼ mgR cos θ mR2 Ω2 cos 2θ
From this result it follows that the θ2 ¼ π positions are always unstable since the
second derivative is negative, as can be easily seen from the expression for the
second derivative in the second line of Eq. (6.3.4). At θ1 ¼ 0 we have ∂2U/∂θ2 ¼ mR
(g RΩ2) so this position is stable if Ω2 < g/R and unstable if Ω2 > g/R. However,
if Ω2 < g/R there is no real equilibrium value at θ3 (since cosθ3 ¼ g/RΩ2 would have
to be greater than one in that case) and for Ω2 > g/R there are real θ3 equilibrium
positions that are stable since the first line in Eq. (6.3.4) gives ∂2U/∂θ2 ¼
mR2Ω2sin2θ3 > 0. All of these results agree with those stated without proof in
Chap. 2.
Use of the dynamic potential in this fashion requires that T1 ¼ 0 for the nonnatural
system since the T1 kinetic energy term typically comes from dynamic “gyroscopic”
effects which can produce stability or instability of the system.
404 6 Dynamic and Static Stability
The direct methods discussed in the previous sections are applicable only when the
potential energy or dynamic potential energy controls their behavior. Systems that
are nonconservative and dissipative thus cannot be treated with those methods.
Although there are other stability methods available to examine a wider class of
systems they are rather involved and best treated in a dedicated course on stability.
There is, however, an important “indirect” approach to stability that we will con-
sider. This approach relies on first linearizing the equations of motion about the
possible equilibrium positions. These linear equations can then be analyzed and used
to infer the behavior of the original nonlinear system from which they came.
The equations of motion of a system in terms of n independent generalized
coordinates can be written in the general case as
€ðt Þ ¼ f ðqðt Þ; q_ ðt Þ; t Þ
q ð6:4:1Þ
When solving these equations numerically we placed them in the form of a system of
first-order differential equations by defining 2n variables xðt Þ ¼ ðqðt Þ; q_ ðt ÞÞ and
writing the system as
x_ ðt Þ ¼ gðxðt Þ; t Þ ð6:4:2Þ
Here, we will consider the case when the system has the form
x_ ðt Þ ¼ gðxðt ÞÞ ð6:4:3Þ
In this case the system of equations is said to be autonomous. Thus, our analysis will
be limited to autonomous systems but this still includes a wide variety of commonly
occurring problems. An equilibrium position of the autonomous system of
Eq. (6.4.3), xe ¼ (qe, 0), must satisfy
gð xe Þ ¼ 0 ð6:4:4Þ
since q_ ¼ q _ q
€ ¼ 0 at equilibrium so that x_ ¼ q; € ¼ 0 as well. Now, let us assume
that we expand the motion about this equilibrium position by letting x(t) ¼ xe+ε(t),
where ε(t) is assumed to be small. Then neglecting all terms except the zeroth- and
first-order ones we have
∂g
ε_ ðt Þ ¼ gðxe Þ þ εð t Þ
∂x x¼xe ð6:4:5Þ
¼ Bεðt Þ
Eq. (6.4.4) to eliminate the zeroth-order term. Thus, our original nonlinear system of
Eq. (6.4.3) has been reduced to the linear system
ε_ ðt Þ ¼ B εðt Þ ð6:4:6Þ
for small motions about an equilibrium position. To study stability we let the small
motion be given as ε ¼ E exp (λt). This will be a solution of Eq. (6.4.6) if we can find
a solution of the homogeneous set of linear equations
½B λIE ¼ 0 ð6:4:7Þ
where I is the identity matrix. But this is only possible if we set the determinate of
coefficients of the vector E equal to zero, i.e.,
or, equivalently, by
ε ¼ expðαk t Þ½ðE k þ E kþ1 Þ cos ðωk t Þ þ iðEk Ekþ1 Þ sin ðωk t Þ ð6:4:10Þ
These solutions can be used to illustrate why the real parts of the roots, αk, determine
stability, as stated in the following conditions:
Dynamic Stability via a Linearized System Analysis
1. When all the roots, λk, have negative real parts, αk, the solution of the linearized
system is asymptotically stable.
2. When one or more than one root, λk, has a positive real part, αk, the solution of the
linearized system is unstable.
3. When some roots have zero real parts while the remaining ones, if any, have
negative real parts, the solution of the linearized system is critically stable.
Furthermore, the nonlinearities present in the original system, Eq. (6.4.2), do not
change the conclusion on stability based on the linearized equations of Eq. (6.4.6)
when the linearized system is either asymptotically stable or unstable. For the critical
406 6 Dynamic and Static Stability
dε start dε
dt dt
start
(a) ε (b) ε
start
dε
dt
(c) ε
Fig. 6.9 Phase plots of ε_ versus ε about the equilibrium position ε; ε_ ¼ ð0; 0Þ (the black dots
shown in the figures) for (a) the case when the real part of a pair of complex conjugate roots of the
characteristic equation is less than zero and the linear system is asymptotically stable, (b) when the
real part of the complex conjugate roots is greater than zero and the system is unstable, and (c) when
the real part of the complex conjugate roots is equal to zero and the system is critically stable. The
points labeled “start” are where the motion began
stability case, additional other tests are needed to determine if the original system of
Eq. (6.4.2) is stable or unstable.
Case (1) is called asymptotically stable because when all the roots have negative
real parts the linearized solution is composed of a combination of decaying expo-
nentials which all go to zero as t ! 1. This behavior can be seen from the phase plot
of a motion where a pair of complex conjugate roots yield the motion of Fig. 6.9a
where the system spirals into the stable equilibrium position ε; ε_ ¼ ð0; 0Þ. Like-
wise, the system is unstable for Case (2) since if one or more roots have a positive
real part the solution will grow infinitely large as t ! 1, as shown in Fig. 6.9b,
where the pair of complex conjugate solutions produce a motion that spirals outward
from the unstable equilibrium position (0, 0). In the critical stability Case (3), no
conclusion can be reached as to stability of the original nonlinear system (based on
the linearized analysis) where the pair of complex conjugate solutions produce a
stable orbit of the linear system about the equilibrium position (Fig. 6.9c) but the
nonlinearities are crucial and can cause the original nonlinear system to be either
stable or unstable depending on the nature of the nonlinearities present. In that case
6.4 Stability Analysis Through Linearization 407
one could perform other stability tests or do some numerical studies of the behavior
of the solutions of the original nonlinear equations of motion.
As an example of these linearized system stability tests, consider a simple
pendulum where we include a linear angular velocity term so that the equation of
motion is
x_ 1 ¼ x2
g sin x1 ð6:4:12Þ
x_ 2 ¼ c x2
L
The addition of the linear angular velocity term does not affect the equilibrium
positions of the pendulum which are xe1 ¼ (0, 0) and xe2 ¼ (π, 0). If we consider
small motions around the first equilibrium point, xe1, by setting x ¼ xe1+ε then the
linearized equations of motion are
( ) " #( )
ε_ 1 0 1 ε1
¼ ð6:4:13Þ
ε_ 2 g=L c ε2
First, consider the case when q |c/2| < g/L. In that case the roots are the complex
ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
conjugate pair λ1, 2 ¼ c=2 i g=L ðc=2Þ2 . If c > 0 the real parts of the roots are
both negative so this equilibrium position is asymptotically stable while if c < 0 both
roots have a positive real part and the position is unstable. This makes sense
physically since the c > 0 case corresponds to having an angular damper present
which causes the motion to decay around the equilibrium position while the c < 0
case would correspond to a “negative” damping which would preinforce
ffiffiffiffiffiffiffiffi the motion,
causing it to grow. In the c ¼ 0 case the roots are λ1, 2 ¼ i g=L so the system is
critically stable. In that case the system is a natural, conservative system so that our
previous direct analysis tells us that the total potential energy is a minimum and the
equilibrium position is indeed stable for the original nonlinear system. Now, exam-
ine the case when |c/2| g/L. In this case the two roots are real. If c > 0 both roots are
408 6 Dynamic and Static Stability
negative so the system is again asymptotically stable. If c < 0 both roots are positive
so the system is again unstable.
Next, if we expand the motion about the second equilibrium position xe2 ¼ (π, 0)
then we have sinx1 ¼ sin (π+ε1) ffi ε1 so the characteristic equation is
" #
λ 1
det ¼ λ2 þ cλ g=L ¼ 0 ð6:4:16Þ
g=L c λ
so there is always at least one positive real root for all values of c, including c ¼ 0,
and this equilibrium position is unstable.
As an example of the use of the linearization approach for a multi-degree of
freedom problem consider the double pendulum. If we let the two lengths of the
pendulum be equal as well as the masses, i.e., l1 ¼ l2 ¼ l and m1 ¼ m2 ¼ m, then the
equations of motion can be written as (see Eq. (3.4.30))
x_ 1 ¼ x2
2x_ 2 þ cos ðx1 x3 Þx_ 4 þ sin ðx1 x3 Þx24 þ 2g sin x1 =l ¼ 0
ð6:4:19Þ
x_ 3 ¼ x4
cos ðx1 x3 Þx_ 2 þ x_ 4 sin ðx1 x3 Þx22 þ g sin x3 =l ¼ 0
For an equilibrium position xe ¼ (xe1, 0, xe3, 0) and motions about that position,
x ¼ xe+ε Eq. (6.4.19) becomes
ε_ 1 ¼ ε2
2ε_ 2 þ cos ðxe1 þ ε1 xe3 ε3 Þε_ 4 þ sin ðxe1 þ ε1 xe3 ε3 Þε24 þ 2gsin ðxe1 þ ε1 Þ=l ¼ 0
ε_ 3 ¼ ε4
cos ðxe1 þ ε1 xe3 ε3 Þε_ 2 þ ε_ 4 sin ðxe1 þ ε1 xe3 ε3 Þε22 þ gsin ðxe3 þ ε3 Þ=l ¼ 0
ð6:4:20Þ
6.4 Stability Analysis Through Linearization 409
since x_ ¼ ε_ and x2 ¼ ε2, x4 ¼ ε4. We can now use Eq. (6.4.20) to obtain the
linearized equations about any of the equilibrium positions. Consider the first
position (xe1, xe3) ¼ (0, 0). Then Eq. (6.4.20) becomes
ε_ 1 ¼ ε2
2ε_ 2 þ cos ðε1 ε3 Þε_ 4 þ sin ðε1 ε3 Þε24 þ 2g sin ðε1 Þ=l ¼ 0
ð6:4:21Þ
ε_ 3 ¼ ε4
cos ðε1 ε3 Þε_ 2 þ ε_ 4 sin ðε1 ε3 Þε22 þ g sin ðε3 Þ=l ¼ 0
and using the approximations cosu ffi 1 and sinu ffi u for u small our equations for
small motions about the equilibrium position to first order are
ε_ 1 ¼ ε2
2ε_ 2 þ ε_ 4 þ 2gε1 =l ¼ 0
ð6:4:22Þ
ε_ 3 ¼ ε4
ε_ 2 þ ε_ 4 þ gε3 =l ¼ 0
which can easily be reduced to the first-order system in the form we want, i.e.,
ε_ 1 ¼ ε2
ε_ 2 ¼ ðgε3 =l 2gε1 =lÞ
ð6:4:23Þ
ε_ 3 ¼ ε4
ε_ 4 ¼ ð2gε1 =l 2gε3 =lÞ
by combining the second and fourth equations in Eq. (6.4.22) appropriately (the
difference of the second and fourth equations in Eq. (6.4.22) just gives us the second
equation in Eq. (6.4.23) and placing this result into the fourth equation in
Eq. (6.4.22) gives us the fourth equation in Eq. (6.4.23)). This result can also be
written in matrix form as
8 9 2 38 9
>
> ε_ 1 >
> 0 1 0 0 >> ε1 >
>
> > 6 > >
7>
< ε_ 2 >
> = 6 2g=l 0 g=l 0 < ε1 =
7
>
¼6
6 0
7 ð6:4:24Þ
>
>
> ε_ 3 >
>
> 4 0 0 175>
> >
> ε3 >
>
>
: ; > : >
> ;
ε_ 4 2g=l 0 2g=l 0 ε4
2 3
λ 1 0 0
6 7
6 2g=l λ g=l 0 7
det6
6 0
7 ¼ λ4 þ 4ðg=lÞλ2 þ 2ðg=lÞ2 ¼ 0 ð6:4:25Þ
4 0 λ 1 75
2g=l 0 2g=l λ
which are both real and negative so that taking the square roots gives the four purely
imaginary roots
rffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
ffi
pffiffiffi
λ1 , 2 , 3 , 4 ¼ i 2 2 g=l ð6:4:27Þ
and the linearized analysis shows that this position is critically stable. The direct
analysis, of course, showed that the original system is stable here.
When we considered the double-pendulum problem in Chap. 3 we also examined
the solution for small oscillations about this stable equilibrium position. We found
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
pffiffiffi
ffiffiffiffiffiffiffi were two natural frequencies of vibration ω1, 2 ¼ 2 2 ω0 where ω0
thatpthere
¼ g=l is the natural frequency of small oscillations for a simple pendulum of
length l. Thus, the four roots of the characteristic equation are just λ1,2 ¼ iω1,
λ3,4 ¼ iω2. Corresponding to the natural frequencies ω1,ω2 we also found the
normalized normal mode shapes
( ð1Þ
) ( pffiffiffiffiffiffiffiffi ) ( ð2Þ
) ( pffiffiffiffiffiffiffiffi )
e1 1=3 e1 1=3
eð1Þ ¼ ¼ pffiffiffiffiffiffiffiffi , eð2Þ ¼ ¼ pffiffiffiffiffiffiffiffi
ð1Þ ð2Þ
e2 2=3 e2 2=3
these eigenvectors are not needed but we have shown them here to connect this
linearized analysis with our previous linearized small vibrations solutions.
Now, consider the second equilibrium position where (xe1, xe3) ¼ (0, π). Then
Eq. (6.4.20) becomes
ε_ 1 ¼ ε2
2ε_ 2 þ cos ðε1 ε3 π Þε_ 4 þ sin ðε1 ε3 π Þε24 þ 2g sin ðε1 Þ=l ¼ 0
ð6:4:28Þ
ε_ 3 ¼ ε4
cos ðε1 ε3 π Þε_ 2 þ ε_ 4 sin ðε1 ε3 π Þε22 þ g sin ðπ þ ε3 Þ=l ¼ 0
or, equivalently,
ε_ 1 ¼ ε2
2ε_ 2 cos ðε1 ε3 Þε_ 4 sin ðε1 ε3 Þε24 þ 2g sin ðε1 Þ=l ¼ 0
ð6:4:29Þ
ε_ 3 ¼ ε4
cos ðε1 ε3 Þε_ 2 þ ε_ 4 þ sin ðε1 ε3 Þε22 g sin ðε3 Þ=l ¼ 0
ε_ 1 ¼ ε2
2ε_ 2 ε_ 4 ¼ 2ε1 g=l
ð6:4:30Þ
ε_ 3 ¼ ε4
ε_ 2 þ ε_ 4 ¼ ε3 g=l
ε_ 1 ¼ ε2
ε_ 2 ¼ ε3 g=l 2ε1 g=l
ð6:4:31Þ
ε_ 3 ¼ ε4
ε_ 4 ¼ 2ε3 g=l 2ε1 g=l
2 3
λ 1 0 0
6 7
6 2g=l λ g=l 0 7
det6
6 0
7 ¼ λ4 2ðg=lÞ2 ¼ 0 ð6:4:33Þ
4 0 λ 1 75
2g=l 0 2g=l λ
The root with both plus signs obviously is positive and so this position is unstable, as
also found with the direct analysis. You can examine the other two cases in the same
manner and show that they also are unstable via the linearized equations.
Examining systems with only a few degrees of freedom can be easily done by
examining all the roots of the characteristic equation but this can become burden-
some for more complex systems. Fortunately, there is a way to examine the stability
without explicitly finding all the roots. The characteristic equation yields a polyno-
mial whose coefficients can be used to derive algebraic criteria for the determination
of stability called the Routh-Hurwitz criteria. We will not examine those criteria here
but you can see some examples of their use in [2].
" #
X
n X
N
∂xi ∂V int
mi €xi Qk þ
e
δqk ¼ 0 ð6:5:1Þ
k¼1 i¼1
∂qk ∂qk
where Qke were the components of the external forces, Vint was the potential energy of
the internal forces (such as springs), and δqk were virtual changes of the generalized
displacements. For static equilibrium problems, therefore, we have
X
∂V int
Qke þ δqk ¼ 0 ð6:5:2Þ
k¼1
∂qk
However,
X
n
δW e ¼ Qke δqk ð6:5:3Þ
k¼1
where δWe is the virtual work of the external generalized force, Qke , due to the virtual
displacements, δqk, and
Xn
∂V int
δV int ¼ δq ð6:5:4Þ
k¼1
∂qk k
where δVint is just the virtual change of the internal potential energy of the system.
Thus, at equilibrium the D’Alembert-Lagrange principle becomes the principle of
virtual work given as
δW e ¼ δV int ð6:5:5Þ
i.e., the virtual work done by the external loads, δWe, is equal to the virtual change of
the internal potential energy, δVint, of the system. Although here we have obtained
the principle of virtual work from the D’Alembert-Lagrange principle, historically
the principle of virtual work preceded the D’Alembert-Lagrange principle. In fact
the principle of virtual work for static problems is what inspired D’Alembert and
Lagrange to extend this principle to dynamical systems. Although we used a system
of particles to obtain this principle, it is also directly applicable to systems of rigid
bodies.
In calculating the virtual work of the external generalized force, the generalized
displacement is varied but not the generalized force itself. This means that the
generalized external forces Qke can be treated as constants in calculating δWe. As
seen in Chap. 2 constant forces are derivable from a potential energy, Ve, and the
potential energy is in that case of the form { – ("force") times ("displacement")} so
414 6 Dynamic and Static Stability
X
n
that here we could let V e ¼ Qke qe (Ve is often called the “force potential”) and
k¼1
we can write
Xn
∂V e
δW e ¼ δq ¼ δV e ð6:5:6Þ
k¼1
∂qk k
where δVe is the virtual change of the force potential. Thus, the principle of virtual
work becomes
δV tot ¼ 0 ð6:5:7Þ
where Vtot ¼ Ve+Vint is the total potential energy of the internal and external forces.
For forces derivable from a potential we can also relate the total work done by the
external force, We, to the change in potential energy through We ¼ ΔVe. But the
potential energy is always determined up to an irrelevant constant anyway so we can
replace the change in potential energy with just the potential energy itself and simply
let the work be equal to the negative of the potential energy, i.e., We ¼ Ve. The
total potential energy of the system is then
[Note that in this form the work is computed as just {("force") times ("displace-
Xn
ment")}, i.e., W e ¼ Qke qk , so that there is no minus sign present in obtaining We
k¼1
but We is multiplied by a minus sign in Eq. (6.5.8) in the calculation of the total
potential energy.]
Since the total potential energy is completely defined by the set of generalized
coordinates, (q1, q2, . . ., qn) the principle of virtual work becomes
Xn
∂V tot
δV tot ¼ δq ¼ 0 ð6:5:9Þ
k¼1
∂qk k
which, since the generalized coordinates are assumed to be independent, gives the
conditions of equilibrium as
∂V tot
¼0 ðk ¼ 1; 2; . . . ; nÞ ð6:5:10Þ
∂qk
[Note: We earlier obtained this same result directly from Lagrange’s equations by
simply setting all the kinetic energy terms to zero for a conservative system. We
derived this result from the principle of virtual work to illustrate the explicit use of
that principle, following the traditional way in which this result is often obtained.]
6.6 Bifurcations and Buckling 415
Static stability criteria for conservative systems follow the same reasoning used
for dynamic systems. To guarantee stability we must have any virtual change of the
total potential energy, δVtot, to be positive in a region about an equilibrium position.
We can write this condition by considering first- and second-order virtual coordinate
changes which causes the change in the total potential energy to be
X
n
∂V ot 1X n X n 2
∂ V tot
δV tot ¼ δqk þ δq δq þ H:O:T:
k¼1
∂qk 2 k¼1 m¼1 ∂qk ∂qm k m
ð6:5:11Þ
1X n X 2
n
∂ V tot
¼ δq δq þ H:O:T:
2 k¼1 m¼1 ∂qk ∂qm k m
since the linear terms in the first line of Eq. (6.5.11) vanish by virtue of the
equilibrium conditions of Eq. (6.5.10) and the higher order terms (H.O.T.) have
been neglected. Thus, as found previously, in a small region about an equilibrium
position the conditions for stability depend on the potential energy through the
matrix of its second derivatives. For multiple degree of freedom systems for static
stability we need to again have the matrix of second derivative terms in Eq. (6.5.11)
to be a positive definite matrix, leading to the conditions on the principal determi-
nants of that matrix, as discussed earlier. For the commonly occurring one degree of
freedom case we have, as before, the static stability criteria:
8
d V 2 tot <> 0
> stable
<0 unstable ð6:5:12Þ
dq2 >
:
¼0 indeterminate
bifurcation point
P
k P
Fs = k ( L sin θ )
u = L − L cosθ
L sin θ
L
L
L cos θ
smooth L
rigid θ
O
(a) (b)
Fig. 6.11 (a) A one degree of freedom system that has a critical load at which the system loses
stability and (b) the geometry and loads of the system in a deflected position
of the possible loading paths are unstable then when the critical load is reached the
system may move to a new equilibrium position far from the bifurcation point,
resulting in collapse.
To see this type of instability in an explicit example, consider the bar-spring
system of Fig. 6.11a. The bar is assumed to be rigid and weightless and one end of
the linear spring is assumed to ride in a smooth horizontal slot so that the spring
always remains horizontal. It is also assumed that the spring is initially not stretched
when the bar is vertical. The work, We, done by this external force can be calculated,
from our previous discussion, as simply
where u is the displacement in the direction of the load (Fig. 6.11b). The internal
(potential) energy of the linear spring is also
6.6 Bifurcations and Buckling 417
1 1
V int ¼ k s2 ¼ kðL sin θÞ2 ð6:6:2Þ
2 2
where k is the spring constant (force/unit length) and s is the stretch in the spring
(Fig. 6.11b) so the total potential energy is
1
V tot ðθÞ ¼ PLð1 cos θÞ þ k ðL sin θÞ2 ð6:6:3Þ
2
dV tot
¼ ðP þ kL cos θÞL sin θ ¼ 0 ð6:6:4Þ
dθ
Equation (6.6.4) has two solutions for π/2 < θ < π/2. One solution is with the angle
θ equal to zero. Then the load P is arbitrary and equilibrium is possible anywhere
along the vertical loading path line of Fig. 6.12, corresponding to the bar remaining
vertical and not deflected while the load increases. However, if θ is not zero, then we
can divide out the sinθ term in Eq. (6.6.4) and we obtain the second load path
P ¼ kL cos θ ð6:6:5Þ
which is the curved loading path shown in Fig. 6.12. We see the two loading paths
intersect at the bifurcation point B where the load P ¼ Pcr ¼ kL is called the critical
load or the buckling load. To examine the conditions of stability along these loading
paths, we compute the second derivative of the potential energy to find
d 2 V tot
2
¼ PL cos θ þ kL2 cos 2 θ sin 2 θ ð6:6:6Þ
dθ
418 6 Dynamic and Static Stability
d2 V tot
¼ kL2 PL ð6:6:7Þ
dθ2
which is positive when P < kL, and negative for P > kL, resulting in the stability
labels shown in Fig. 6.12 on the primary load path. For the other equilibrium solution
of Eq. (6.6.4) we find
d 2 V tot
¼ kL2 sin 2 θ ð6:6:8Þ
dθ2
showing that the curved loading paths in Fig. 6.12 are always unstable for
π/2 < θ < π/2. These results demonstrate that the bar can be stably loaded with
no angular deflection for all loads up to the critical load, but to continue along this
path beyond the critical load is unstable so any small disturbance will cause some
angular deflection. However, no angular position along the curved path is stable so
the bar will collapse to the floor at θ ¼ π/2. Thus, we say that the post-critical load
behavior of this system is unstable. In one degree of freedom systems such as this
one we can also plot the total potential energy to show the stability conditions
explicitly. Figure 6.13a–c shows the normalized total potential energy when the
load is one-half the critical load, at the critical load, and 1.2 times the critical load,
respectively, showing the change from stable to unstable conditions on the θ ¼ 0
path and the unstable nature of the other equilibrium solutions along the curved
loading paths. [Note that in these plots of the potential energy and in all subsequent
plots we will omit the vertical axis values, as the potential energy is always defined
only to within an arbitrary constant value so the exact values on these plots are
unimportant and can be a distraction from focusing on the important changing
behavior of these potential energy curves.]
From this example we see that we could fully characterize the stability of
this simple system by considering both first- and second-order virtual variations
of the total potential energy. Setting the first variation equal to zero,
δVtot ¼ (∂Vtot/∂θ)δθ ¼ 0, (1) guaranteed that equilibrium was satisfied, (2) gave
us the possible equilibrium load paths, and (3) gave us the value of the critical load at
the bifurcation point. Examining the sign of the second-order variation δ2Vtot ¼ (1/2)
(∂2Vtot/∂θ2)(δθ)2 gave us information on the stability of the post-critical load
behavior. We see from Eq. (6.6.7) that we could also have found the value of the
critical load by determining the load when δ2Vtot ¼ 0, since this condition requires
P ¼ Pcr ¼ kL. This criterion makes sense from a physical standpoint since we can
define the critical load to be the load where we go from a stable equilibrium location
on the load path where δ2Vtot > θ to an unstable location where δ2Vtot < 0. At the
boundary of these stable/unstable conditions δ2Vtot ¼ 0.
In more complex multiple degree of freedom stability problems, performing a full
stability characterization of this type is often not possible because of the complicated
6.6 Bifurcations and Buckling 419
(a) (b)
unstable neutral
V tot V tot
Pcr L Pcr L
stable
unstable
V tot
Pcr L
1 1
V tot ðθÞ ffi PLθ2 þ k ðLθÞ2 ð6:6:9Þ
2 2
dV tot
¼ ðP þ kLÞLθ ¼ 0 ð6:6:10Þ
dθ
Note that the equilibrium equation is indeed linear in θ, but that in the linearized
analysis we need to keep second-order (quadratic) terms in the total energy. This
420 6 Dynamic and Static Stability
L cosθ ≅ L
L
θ
linearized problem has the two solutions: (1) θ ¼ 0, P arbitrary and (2) θ 6¼ 0,
P ¼ Pcr ¼ kL. If we look at the second derivative, we have
d2 V tot
¼ ðP þ kLÞL ð6:6:11Þ
dθ2
which goes from positive (stable behavior) for P < kL to negative for P > kL
(unstable behavior), showing again that the second derivative is zero at the critical
load. Thus, linearization allows us to find the critical load. Linearization does not
allow us to analyze in detail the post-critical load behavior of the system, which is
controlled by its higher order nonlinear behavior along other possible loading paths
besides the primary (θ ¼ 0) path. Even so, having the critical load is an important
result from a safety standpoint and a linearized analysis can often be performed on
very complex systems using numerical methods such as finite elements to obtain that
critical load. Linearization only requires that we solve the equilibrium conditions for
small changes about a non-deflected position. Note that we can establish linearized
equilibrium conditions such as Eq. (6.6.10) either with energy methods, as done
here, or directly from the Newton-Euler equations at equilibrium. For example,
Fig. 6.14 shows a free body diagram of the system for small (linearized) deflections.
Equilibrium of moments about point O then gives, for positive counterclockwise
moments,
P
Mz ¼ 0
ð6:6:12Þ
ðkLθÞðLÞ ðPÞðLθÞ ¼ 0
which is identical with Eq. (6.6.10). Solving for critical loads with either linearized
energy or Newton-Euler methods is sometimes more precisely called a linearized
precritical load analysis to emphasize the fact that after linearization no information
is obtained on post-critical behavior.
6.6 Bifurcations and Buckling 421
L cos θ
rigid L
L
torsional
spring
θ
M 0 = kθθ
O
(a) (b)
1
V tot ðθÞ ¼ PLð1 cos θÞ þ k θ θ2 ð6:6:13Þ
2
At equilibrium we have
dV tot
¼ PL sin θ þ k θ θ ¼ 0 ð6:6:14Þ
dθ
which has two solutions: (1) θ ¼ 0, P arbitrary, and (2) θ 6¼ 0, P ¼ kθθ/L sin θ. Again,
these two loading paths have an intersection (bifurcation point) at the critical load
P ¼ Pcr ¼ kθ/L. If we examine the second derivative of the potential energy we find
d2 V tot
¼ PL cos θ þ k θ ð6:6:15Þ
dθ2
d2 V tot
¼ PL þ kθ ð6:6:16Þ
dθ2
422 6 Dynamic and Static Stability
and the second derivative is positive for P < Pcr and negative for P > Pcr, consistent
with the labels shown in Fig. 6.16. For the θ 6¼ 0 path from Eqs. (6.6.14) and (6.6.15)
we have
d 2 V tot θ cos θ
¼ LP cr 1 ð6:6:17Þ
dθ2 sin θ
which shows that the second derivative is always positive along this path since
θ/ tan θ < 1. Thus, the initial primary loading path is stable, as shown in Fig. 6.16.
Once the critical load is reached for this system, continuing along the θ ¼ 0 path is
unstable, but the system can continue along the stable post-critical curved load path.
In this case the spring supports the bar in a deflected position but without any
catastrophic behavior. This behavior can also be seen by examining the total
potential energy of this system, as shown in Fig. 6.17. Below the bifurcation
load the system is stable in the no-deflection position and above the bifurcation
load the no-deflection load path is unstable but the other deflected paths are both
stable.
If one linearizes the problem then the potential energy is given as
θ2 1
V tot ðθÞ ffi PL þ k θ θ2 ð6:6:18Þ
2 2
dV tot
¼ ðPL þ k θ Þθ ¼ 0 ð6:6:19Þ
dθ
which again indicates that either θ ¼ 0 and P is arbitrary or θ 6¼ 0 and P ¼ Pcr. The
second derivative becomes
6.6 Bifurcations and Buckling 423
(a) (b)
V tot V tot
kθ kθ
stable neutral
unstable
V tot
kθ
stable
d2 V tot
¼ PL þ kθ ð6:6:20Þ
dθ2
which shows that we go from stable to unstable behavior at the critical load, which is
certainly true along the primary (θ ¼ 0) loading path (Fig. 6.16) but this does not
describe the nature of the post-critical load behavior. You can verify that we also get
Eq. (6.6.19) by a Newton-Euler approach, i.e., guaranteeing equilibrium of moments
about point O for the linearized case of small deflections.
These one degree of freedom examples show us many of the key features
associated with a bifurcation type of instability. Simple two degrees of freedom
systems, however, can give us a clearer window into the behavior of more complex
systems. Consider, for example, the system of Fig. 6.18a where three rigid bars are
pinned together and support an axial load, P. It is assumed that there are linear
torsional springs with spring constants (k1, k2), respectively, at the two center pins.
The left-hand-side pin is fixed while the right-hand-side pin is allowed to move
horizontally. We will first examine this system with a linearized Newton-Euler type
424 6 Dynamic and Static Stability
k1 k2 P
(a)
B
L
A α1
L θ2 α3
L
θ1 θ3
(b)
M A = k1α1 P
M B = k2α 3
P
L L
L sin θ1 L sin θ 3
P θ1 θ3 P
(c)
Fig. 6.18 (a) A two degrees of freedom mechanism, and (b) the definition of the geometric
parameters in a deflected shape, and (c) free body diagrams of two of the three bars
θ1 þ θ2 ¼ θ3 ð6:6:22Þ
Thus, we will take the angles (θ1, θ3) as the two independent degrees of freedom. We
will assume that the torsional springs are both not stretched in the configuration of
Fig. 6.18a. In the deformed position of Fig. 6.18b the moments generated by the
springs are proportional to the angles (α1, α3), which are the changes of the angles of
the two bars attached to the springs from their not-stretched positions. From the
geometry of Fig. 6.18b and Eq. (6.6.22) we see that
α1 ¼ θ1 θ2 ¼ 2θ1 θ3
ð6:6:23Þ
α3 ¼ θ2 þ θ3 ¼ 2θ3 θ1
6.6 Bifurcations and Buckling 425
From moment equilibrium of the two bars whose free body diagrams are shown in
Fig. 6.18c we have
k 1 ð2θ1 θ3 Þ PL sin θ1 ¼ 0
ð6:6:24Þ
k2 ð2θ3 θ1 Þ PL sin θ3 ¼ 0
You can verify that moment equilibrium for the other (center) bar is satisfied
identically by the equations of Eq. (6.6.24) so we do not have to also examine that
bar. Since we are doing a linearized analysis, to first order these equilibrium
equations become
ð2k1 PLÞθ1 k1 θ3 ¼ 0
ð6:6:25Þ
k2 θ1 þ ð2k 2 PLÞθ3 ¼ 0
Equation (6.6.25) is a system of homogeneous linear equations for the two angles
(θ1, θ3). The term homogeneous means that there are no constant terms present in
these equations and so the right-hand-side terms of these equations are identically
zero. As in the one degree of freedom case there are two possibilities. The first is that
θ1 ¼ θ3 ¼ 0 and P is arbitrary, which is just the case of no deflection as the system is
loaded. However, if the angles are not zero then a solution of these two homoge-
neous equation is only possible if the determinant of the coefficients of (θ1, θ3) is
equal to zero, i.e.,
ð2k 1 PLÞ k1
¼0 ð6:6:26Þ
k2 ð2k2 PLÞ
ðk 1 þ k2 Þ k1 k2
P2 2 Pþ3 ¼0 ð6:6:27Þ
L L L
Thus, there are two roots, each of which represents a critical load for the system,
given by
sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
ðk 1 þ k 2 Þ ðk 1 þ k 2 Þ2 k1 k2
P1 ¼ 3
L L2 L L
sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ð6:6:28Þ
ðk 1 þ k 2 Þ ðk 1 þ k 2 Þ2 k1 k2
P2 ¼ þ 3
L L2 L L
sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
ðk 1 þ k2 Þ ðk 1 k 2 Þ2 k 1 k 2
P1 ¼ þ
L L2 L L
sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ð6:6:29Þ
ðk 1 þ k2 Þ ðk 1 k 2 Þ2 k 1 k 2
P2 ¼ þ þ
L L2 L L
From the forms shown in Eq. (6.6.29) we see that the terms in the square roots are
always positive so the two critical loads are both real. From Eq. (6.6.28) we see that
the square root terms are also always less than that of the terms outside the square
roots so that the critical loads are both positive and P1 < P2. Thus, the smallest
critical load is P1. However, in this two degrees of freedom case, the linearized
analysis tells us more than just the critical loads. It also tells us the nature of the
deflected shape (also called the mode shape or buckling mode). To keep the algebra
simple in examining these modes, let’s consider the case when k1 ¼ k2 ¼ k so the two
torsional springs are identical. In this case the two critical loads are
k 3k
P1 ¼ , P2 ¼ ð6:6:30Þ
L L
Setting the determinant of the two equations in Eq. (6.6.25) equal to zero means that
at the critical loads these two equations are not independent; that is, they really only
represent one set of conditions for the two unknowns (θ1, θ3). However, from either
one of these equations we can determine a relationship between these angles at the
critical load, which gives a system configuration called a mode shape. For example,
the first critical load of Eqs. (6.6.30) and (6.6.25) gives θ1 ¼ θ3, the mode shape
shown in Fig. 6.19a. In contrast, at the second critical load we find, from
Eq. (6.6.25), θ1 ¼ θ3, the mode shape of Fig. 6.19b. Note that we can only find
the relationship between the angles here, not their actual values, so specific ampli-
tudes of the deflections shown in Fig. 6.19a, b are not determined.
P=P1
(a)
P=P2
(b)
Fig. 6.19 (a) The system at the first critical load in a symmetric buckling pattern, and (b) the
system at the second critical load in an antisymmetrical buckling pattern
6.6 Bifurcations and Buckling 427
We can write these results for this two degrees of freedom system in matrix form
that gives us some valuable new ways to look at this problem. First, we note that the
relationship between the moments of the torsional springs and the angles (θ1, θ3) for
the k1 ¼ k2 ¼ k case is
( ) " #( )
MA 2k k θ1
¼ ð6:6:31Þ
MB k 2k θ3
fM g ¼ ½K fθg ð6:6:32Þ
where the matrix of coefficients, [K], is called a stiffness matrix. This stiffness matrix
also appears when we write the equilibrium equations, Eq. (6.6.25), in matrix-vector
form as
" #( ) ( )
2k k θ1 θ1
¼ PL ð6:6:33Þ
k 2k θ3 θ3
½ K f θ g ¼ λ fθ g ð6:6:34Þ
K = [2 -1 ; -1 2]
K = 2 -1
-1 2
428 6 Dynamic and Static Stability
If we use this matrix as an input argument to the MATLAB® function eig, the modes
are stored as vectors in the columns of a matrix we have called modes and the
eigenvalues of (1, 3) are placed on the diagonal of a matrix we have called vals:
[modes, vals] = eig(K)
vals = 1 0
0 3
where [Ks] is the stiffness matrix and [Kg] is called the geometric matrix. In
complicated structures we can break up the structure into small elements and use
potential energy methods to determine the stiffness matrix and geometric matrix for
each element. If these elements are then all assembled into a representation of the
entire structure then we can form up the “global” stiffness and geometric matrices
associated with the entire structure and find an equation of the form of Eq. (6.6.37)
but where one may be dealing with thousands if not millions of degrees of freedom.
Solving this eigenvalue problem is then done just for a few of the smallest eigen-
values since those are associated with the most important critical loads that first
occur. Finite element software packages can implement this approach in an efficient
manner and give an engineer an important tool for obtaining critical loads at
bifurcation.
Let us now examine this two degrees of freedom problem from a linearized
potential energy standpoint. For the system of Fig. 6.18a, for example, the internal
energy of the two springs can be written, for small angles, as approximately
6.6 Bifurcations and Buckling 429
1 1
U ¼ k1 α21 þ k 2 α23
2 2
ð6:6:38Þ
1 1
ffi k1 ð2θ1 θ3 Þ2 þ ð2θ3 θ1 Þ2
2 2
1 1 PL h 2 i
V tot ¼ k 1 ð2θ1 θ3 Þ2 þ k2 ð2θ3 θ1 Þ2 θ1 þ ðθ3 θ1 Þ2 þ θ23 ð6:6:40Þ
2 2 2
∂V tot
¼ k1 ð2θ1 θ3 Þð2Þ þ k 2 ð2θ3 θ1 Þð1Þ PL½θ1 þ ðθ3 θ1 Þð1Þ
∂θ1
¼ ð4k1 þ k2 Þθ1 ð2k2 þ 2k2 Þθ3 PLð2θ1 θ3 Þ ¼ 0
∂V tot
¼ k1 ð2θ1 θ3 Þð1Þ þ k 2 ð2θ3 θ1 Þð2Þ PL½θ3 þ ðθ3 θ1 Þ
∂θ3
¼ ð2k1 þ 2k 2 Þθ1 þ ðk1 þ 4k 2 Þθ3 PLð2θ3 θ1 Þ ¼ 0
ð6:6:41Þ
These equilibrium equations look quite different from those that we obtained with
the Newtonian-Euler approach (Eq. (6.6.36)) but if we compute the inverse of the
second matrix, given by
" #1 " #
2 1 2 1
¼ ð1=3Þ
1 2 1 2
and pre-multiply Eq. (6.6.42) by this inverse, we recover Eq. (6.6.36) so both
methods do give the same matrices and hence the same critical loads and modes.
430 6 Dynamic and Static Stability
However, this multiplication is not necessary. We can directly solve the generalized
eigenvalue problem of Eq. (6.6.42) in MATLAB® with the eig function. We have
which are the same values obtained before if we normalize the eigenvectors so they
are both unit vectors.
For the second derivatives of the potential energy we have
2
∂ V tot
¼ ð4k1 þ k 2 Þ 2PL ¼ 5k 2PL
∂θ21
2
∂ V tot
¼ ðk1 þ 4k 2 Þ 2PL ¼ 5k 2PL ð6:6:43Þ
∂θ23
2
∂ V tot
¼ ð2k1 þ 2k 2 Þ þ PL ¼ 4k þ PL
∂θ1 ∂θ3
From our discussion of dynamic stability we know that we must keep the change of
the total potential positive for any virtual change of the independent variables
(θ1, θ3), which is also the requirement for static stability. Here this change is to
second order
!
2 2 2 2
1 ∂ V tot 2 ∂ V tot 2 ∂ V tot ∂ V tot
δV tot
¼ δθ1 þ δθ3 þ δθ1 δθ3 þ δθ1 δθ3
2 ∂θ12
∂θ3
2 ∂θ1 ∂θ3 ∂θ3 ∂θ1
ð6:6:44Þ
so that the change of the potential energy is characterized by its second derivatives,
which we can again place in the form of a matrix as
" 2 2
#
∂ V tot =∂θ21 ∂ V tot =∂θ1 ∂θ3
A¼ 2 2
ð6:6:45Þ
∂ V tot =∂θ1 ∂θ3 ∂ V tot =∂θ23
Since for static stability we must have δVtot > 0 for all changes (δθ1, δθ3) the matrix
A must be positive definite. Recall that a positive definite matrix has the property that
its determinant must be positive and the determinant of all its principal minors also
must be positive, where successive principal minors are obtained by deleting a row
and column from the remaining matrix. However, Langhaar [3] has shown that if the
6.6 Bifurcations and Buckling 431
or, equivalently,
2
2 2 2
D2 ¼ ∂ V tot =∂θ21 ∂ V tot =∂θ23 ∂ V tot =∂θ1 ∂θ3 > 0,
ð6:6:47Þ
2
D1 ¼ ∂ V tot =∂θ21 > 0
By expanding the determinant D2 and collecting terms it is easy to see that the
determinants can be rewritten as
If one examines the expression for D2 in Eq. (6.6.49) we see that the smallest value
of P where this determinant goes to zero is P ¼ k/L. Below this load Eq. (6.6.49)
shows that D1 > 0,D2 > 0 so the system is stable and Eq. (6.6.49) also shows that
there are values immediately above this load where D2 < 0 and the system is not
stable, so Pcr ¼ k/L. Note that there are other values where D2 ¼ 0 (P ¼ 3k/L is such a
value in this example) but the system becomes unstable before such loads and their
corresponding modes are ever reached. However, if one constrains the system so that
the lower critical modes cannot occur, then these higher loads may become the new
critical loads that govern the stability of the system. For example, if we place some
rollers at the center of this system, as shown in Fig. 6.20, then we must have
k1 k2 P
Fig. 6.20 The system of Fig. 6.9a supported so as to prevent the first critical mode from occurring
432 6 Dynamic and Static Stability
θ1 ¼ θ3. Placing this constraint into our potential energy expression, Eq. (6.6.40),
with k1 ¼ k2 ¼ k gives
∂V tot
¼ ð18k 6PLÞθ1 ¼ 0 ð6:6:51Þ
∂θ1
2
∂ V tot
¼ ð18k 6PLÞ ð6:6:52Þ
∂θ21
showing that the critical load is now Pcr ¼ 3k/L. We see that knowing the mode of
deformation of the first critical load, and supporting the system so as to prevent the
buckling behavior of that first mode, allows us to increase the critical load by a factor
of three, a substantial increase that leads to a much safer system.
In the case of a bifurcation type of instability multiple load paths exist at the critical
loads. However, even when a system follows a single load path, if a maximum or
minimum limit load is reached the system may become unstable. This is illustrated
schematically in Fig. 6.21 for a plot of a load P versus a deflection, Δ, where along
the load path up to the maximum load the system is stable, while past that limiting
load the system is unstable. We can modify the same simple one degree of freedom
systems discussed earlier to exhibit this limit load behavior. First consider the
problem shown in Fig. 6.22a, where the load of Fig. 6.11a is now applied to the
rigid bar at a distance, e, along an extension. It is assumed that the load still remains
constant in magnitude and direction and the spring is not stretched when the bar is
Δ
6.7 Limit Load Instability 433
P
e
k Fs = k ( L sin θ ) e sin θ
P
u L L cosθ e sinθ
L sin θ e
L
L
smooth L
L cos θ
rigid θ
O
(a) (b)
Fig. 6.22 (a) A one degree of freedom system (slightly modified from Fig. 6.10a) in its
undeformed position and (b) the geometry and loads of the system in a deformed position
vertical. The stretch of the spring in the deformed position (Fig. 6.22b) is still L sin θ
but the vertical displacement of the load is now u ¼ L L cos θ+e sin θ. Thus, the
total potential energy is
1
V tot ¼ k ðL sin θÞ2 PðL L cos θ þ e sin θÞ ð6:7:1Þ
2
At equilibrium
∂V tot
¼ kL2 sin θ cos θ PLð sin θ þ e cos θ=LÞ ¼ 0 ð6:7:2Þ
∂θ
kL sin θ cos θ
P¼ ð6:7:3Þ
sin θ þ e cos θ=L
Figure 6.23 plots the normalized load, P/kL, versus θ for various values of the
parameter e/L, which is called the eccentricity. It can be seen that the eccentricity
of the loading has destroyed the symmetrical nature of the problem. As P increases
from zero, θ is also a positive, increasing angle until the load reaches a maximum
limiting load (that is a function of e/L ). Beyond the limit load the load decreases with
increasing angle, showing an unstable behavior. As the eccentricity becomes very
small, the limit load approaches the critical bifurcation load of the e/L ¼ 0 case. Note
that there are no stable equilibrium positions when the angle θ is negative (Fig. 6.23).
These conditions can be confirmed by examining ∂2Vtot/∂θ2 or by simply plotting
434 6 Dynamic and Static Stability
unstable
unstable
unstable
tot
V V tot
Pcr L Pcr L
stable
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2
θ , rad θ , rad
(a) (b)
Fig. 6.24 The normalized total potential energy, Vtot/PcrL, versus θ for the problem of Fig. 6.22a
and the nature of the equilibrium positions for e/L ¼ 0.1 and (a) P ¼ 0.5Pcr, and (b) P ¼ 1.2Pcr
the total potential energy (at a given eccentricity) versus θ for different loads.
Figure 6.24, for example, shows the total potential energy for e/L ¼ 0.1 at loads
both below and above the limit load. We see both stable and unstable solutions for
θ > 0 but only unstable solutions for θ < 0.
Some texts study bifurcation stability problems using a linearized approach when
introducing eccentricities to the load. For example, in this case for small angles θ we
can let sinθ ffi θ and cosθ ffi 1 and the equation for the load curves becomes
kLθ
P¼ ð6:7:4Þ
θ þ e=L
6.7 Limit Load Instability 435
α
P θ π − 2θ P
θ
2Lcosθ u
2L
(b)
which is shown in Fig. 6.25. However, with linearization the limit load behavior
disappears entirely for θ > 0 and even the unstable behavior for θ < 0 shows an
incorrect behavior. Thus, there is little value in such linearized eccentricity analysis
except to demonstrate qualitatively that for very small eccentricities the load curves
exhibit a very rapid increase in deflection for very small load changes near the
critical bifurcation load.
To see another way in which a system with a bifurcation behavior changes into a
limit load behavior, consider the system shown in Fig. 6.26a where a linear torsional
spring acts on two rigid bars that are pinned together and at their ends. It is assumed
that the spring is not stretched when the bars are collinear, as shown in Fig. 6.26a.
Figure 6.26b shows the system in a deflected position, where from the geometry we
436 6 Dynamic and Static Stability
2Lcosθ u
(b)
see that the angle α ¼ 2θ. In the deformed configuration the total potential energy is
given by
1
V tot ¼ kθ α2 Pu
2
ð6:7:5Þ
1
¼ kθ ð2θÞ2 Pð2L 2L cos θÞ
2
There are two equilibrium solutions: (1) θ ¼ 0, P arbitrary, and (2) θ 6¼ 0, P ¼ 2kθθ/
L sin θ. This leads to a stable bifurcation behavior almost identical to the one bar
system of Fig. 6.15a, as seen in Fig. 6.16, except the critical load is now Pcr ¼ 2kθ/L.
However, let us now introduce an eccentricity into this system by assuming that
there is initially a small angle, θe, when the load is absent and the spring is not
stretched. In this case from Fig. 6.27a, b we see that the total potential energy
1
V tot ¼ kθ ð2θ 2θe Þ2 Pð2L cos θe 2L cos θÞ ð6:7:7Þ
2
2kθ ðθ θe Þ
P¼ ð6:7:8Þ
L sin θ
Figure 6.28 shows the loading paths for this system where there is a small angular
misalignment θe ¼ 0.07. We see that as the load is increased from zero, the angle θ
increases with the load along a stable equilibrium loading path with no critical angle
6.7 Limit Load Instability 437
0.6 stable
limit point
0.2
θ , rad
or limit load behavior along this primary load path. However, now there is also a set
of stable (and unstable) equilibrium positions for negative angles as well. This can be
seen by plotting the total potential energy at a load P/Pcr ¼ 1.4 as shown in Fig. 6.29,
where there are stable potential “wells” for both positive and negative angles, as well
as an unstable potential “hill” at a small negative angle, agreeing with the labels
shown in Fig. 6.28. Thus, if the bars were forced to one of these stable negative angle
positions we could hold it there in stable equilibrium with the appropriate force. If
we then started to reduce that force, we would follow the arrows along the stable
unloading path of Fig. 6.30a until a minimum limit point is reached at a load of
approximately P/Pcr ¼ 1.186 at point A. The total potential energy curve at this limit
load value is shown in Fig. 6.30b. If the load was reduced slightly from this limit
load value there is no stable position for the system to go to for negative angles so the
bars “snap through” to a new equilibrium position B at a positive angle, as shown in
438 6 Dynamic and Static Stability
1.8
unstable
1.4 A B
P stable
Pcr 1
0.6
stable
limit point
0.2
V tot
2kθ
A
B
-1.5 -1 -0.5 0 0.5 1 1.5
θ , rad
(b)
Fig. 6.30 (a) Following a stable unloading path to a limit point where “snap-through” behavior
occurs for the misaligned case (see Fig. 6.26), and (b) the total potential energy curve at the limit
point where P/Pcr ¼ 1.186. Again θe ¼ 0.07 rad in this example
Fig. 6.30a, corresponding to a motion from the neutral equilibrium position of point
A to the stable equilibrium position of position B on the potential energy curve of
Fig. 6.30b. At B the system could then continue along a stable unloading or loading
path. Snap-through instability is another type of instability behavior that is possible
in some systems. Abrupt snap-through behavior must be introduced somewhat
artificially in this example by starting the system out from a particular loaded
position, but as we will see in the next section snap-through behavior can also
occur along a primary loading path when a limit load is reached along that path and
the system jumps to a new stable position.
6.8 Snap-Through Instability 439
To see how snap-through instabilities can occur directly in a simple case, consider
the single degree of freedom bar and spring system of Fig. 6.31a, where θ
(Fig. 6.31b) is the angle of the bar at a load P. It is assumed that the spring is
initially not stretched and the bar (whose weight is neglected) is unloaded when
θ ¼ θ0. From Fig. 6.31b we see that total potential energy of the system is
1
V tot ¼ kðL sin θ L sin θ0 Þ2 PðL cos θ0 L cos θÞ ð6:8:1Þ
2
(a)
u θ0 L
L cos θ0
L cos θ θ
L
L sin θ0 x
L sin θ
(b)
440 6 Dynamic and Static Stability
1.5
1
A B
P
kL 0.5
stable
0
unstable
-0.5 stable
C
-1
0 20 40 60 80 100 120 140 160 180
θ , degrees
1.5
1
P
kL 0.5
stable
0
unstable
stable
-0.5
D C
-1
0 20 40 60 80 100 120 140 160 180
θ , degrees
equilibrium position and the bar snaps through at a much smaller angle before this
position is ever reached. At B the load could continue to be stably increased or it
could also be decreased to a new negative limit load at point C (see Fig. 6.33) where
the bar then snaps through back to a stable position at point D with a positive angle
under the action of the negative load.
6.8 Snap-Through Instability 441
a a
(a)
L0 δ
L0
L y L
(b)
A structure that can exhibit snap-through buckling and is often used to illustrate
this behavior is the truss shown in Fig. 6.34a. It is assumed that the truss is shallow,
i.e., y0 << a, and that we have a linear elastic (springlike) deformation of the truss
members under the load, P. The spring constant of each truss member is k ¼ EA/L0
where A is the cross-sectional area of a member, E is Young’s modulus (a material
constant), and L0 is the member’s initial length when P ¼ 0. Application of the load
causes this length to change a small amount and become the new length, L, while the
initial height, y0, changes to a height, y, under the load P, as shown in Fig. 6.34b.
Since both members act as springs the total potential energy of this truss is
1
V tot ¼ k ðL L0 Þ2
2 Pδ
2
hpffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffii2
¼k y2 þ a2 y20 þ a2 Pδ ð6:8:3Þ
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
2
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 2
¼k ð y0 δ Þ þ a y 0 þ a 2 2 2 Pδ
where δ ¼ y0 y is the distance moved by the load, P. In this one degree of freedom
system Vtot ¼ Vtot(δ) so at equilibrium we must have
2 3
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
dV tot
6 δ y0 7
¼ 2k ðy0 δÞ2 þ a2 y20 þ a2 4qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 5 P ¼ 0 ð6:8:4Þ
dδ 2
ð y 0 δ Þ þ a2
2 3
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
P 6 δ=y0 1 7
¼2 ð1 δ=y0 Þ2 þ ða=y0 Þ2 1 þ ða=y0 Þ2 4qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi5
ky0 2
ð1 δ=y0 Þ þ a =y0
2 2
ð6:8:5Þ
Equation (6.8.5) looks rather complex, but we can simplify it, using the fact that a/
y0 > > 1, which gives, after some manipulation and collecting terms,
"sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi#
P ð1 δ=y0 Þ2 1
ffi2 2
þ1 þ 1 ½δ=y0 1
ky0 ða=y0 Þ ða=y0 Þ2
" #
ð1 δ=y0 Þ2 1
ffi2 þ11 ½δ=y0 1
2ða=y0 Þ2 2ða=y0 Þ2 ð6:8:6Þ
y2
¼ 02 2δ=y0 þ δ2 =y20 ½δ=y0 1
a
y20 δ δ δ
¼ 2 1 2
a y0 y0 y0
Equation (6.8.6) shows that the approximate load versus deflection curve is a cubic
curve which we can write finally as
P δ δ δ
¼ 1 2 ð6:8:7Þ
P0 y0 y0 y0
where P0 ¼ ky30 =a2 . If we plot the nondimensional load of Eq. (6.8.7) versus
nondimensional deflection we see the typical loading curve characteristic of snap-
through buckling (Fig. 6.35), which shows that we can load the truss stably up to a
D stable
-0.5
C
-0.5 0 0.5 1 1.5 2 2.5
δ / y0
6.9 Problems 443
limit point A (at P/P0 ¼ 0.385 with δ/y0 ¼ 0.423) where the truss snaps through to a
new stable equilibrium point at B. As in the previous example it is also possible to
snap the truss back from point C to point D. Eq. (6.8.7) shows that the load is zero
when δ/y0 ¼ (0, 1, 2), corresponding, respectively, to the original unloaded position,
truss members both horizontal (which requires no load to maintain this unstable
equilibrium position), and the truss in a snapped-through position, mirroring the
original unloaded position. Although all these results are based on Eq. (6.8.7), which
is an approximate expression, you can plot the original expression (Eq. (6.8.5)) and
verify that Eq. (6.8.7) captures the snap-through behavior very well.
Snap-through behavior is sometimes called “oil canning” since the slightly
outwardly curved bottom of an oil can will often snap through to an inwardly curved
position when pushed on by a finger. Snap-through behavior can also occur in large,
shallow domes or arch structures.
6.9 Problems
P6.1. Plot the behavior of the normalized dynamic potential, U/mgR, for the
problem of a particle sliding on rotating hoop (Eq. (6.3.2)) for Ω2R/g ¼ 0.5
and Ω2R/g ¼ 2.0 and identify the stable and unstable points.
P6.2. One end of a simple pendulum is attached to an assembly that rotates at a
constant angular velocity, Ω, about the z-axis as shown in Fig. P6.1. Deter-
mine the equilibrium positions and the stability of those positions.
P6.3. A mass, m, is attached to a rigid arm of length L and negligible weight and to
a linear spring with spring constant, k (Fig. P6.2). The spring rides in a
smooth horizontal track so that it always remains horizontal and the spring is
unstretched when the arm is vertical. This dynamic problem is analogous to
the static stability problem discussed in Sect. 6.6 (see Fig. 6.11) where the
load P in the static problem is now the weight mg of the moving mass.
(a) Determine the equation of motion for the system in terms of the angle, θ,
and find the equilibrium positions of the mass for mg < kL and mg > kL. Are
y
L
x θ
m
444 6 Dynamic and Static Stability
smooth θ
rigid
O
torsional
spring kθ
these equilibrium positions stable or unstable? Plot the total potential energy
for 5π/4 < θ < 5π/4 rad to verify your results. (b) This is a conservative
system so that the total energy, E ¼ T+V, is a constant. Obtain a phase plot of
the motion by finding the constant energy contours of the normalized energy,
E/mgL, for mg/kL ¼ 0.7 and L/g ¼ 0.1 sec2, plotting 20 contours over the
region 5π/4 < θ < 5π/4 rad and 5 < θ_ < 5 rad/s (use at least 500 points
for both θ and θ_ to generate the contour plot). Identify the stable and unstable
equilibrium positions on this phase plot. Based on the phase plot, describe
the nature of the motion you would expect if the initial conditions are θ ¼ θ0,
θ_ ¼ 0 for θ0 ¼ 30o, and θ0 ¼ 60 . How does the phase plot and your
description of the motion change if mg/kL ¼ 1.2? (c) Solve the equation of
motion numerically for different initial condition values θ0 and verify that
your descriptions of the motion deduced from the phase plots in parts (a) and
(b) are correct. Animate the motion using the MATLAB® animate_lines.
P6.4. A mass, m, is attached to a rigid arm of length L and negligible weight and to
a linear torsional spring that applies a resisting moment M ¼ kθθ about the
pivot point O (Fig. P6.3). The spring is unstretched when the arm is vertical.
This dynamic problem is analogous to the static stability problem discussed
in Sect. 6.6 (see Fig. 6.15) where the load P in the static problem is now the
6.9 Problems 445
weight mg of the moving mass. (a) Determine the equation of motion for the
system in terms of the angle, θ, and find the equilibrium positions of the mass
for mg < kθ/L and mg > kθ/L. Are these equilibrium positions stable or
unstable? Plot the total potential energy for 5π/4 < θ < 5π/4 rad to verify
your results. (b) This is a conservative system so that the total energy, E ¼ T
+V, is a constant. Obtain a phase plot of the motion by finding the constant
energy contours of the normalized energy, E/mgL, for mgL/kθ ¼ 0.7 and L/g
¼ 0.1 sec2, plotting 20 contours over the region 5π/4 < θ < 5π/4 rad and
5 < θ_ < 5 rad/s (use at least 500 points for both θ and θ_ to generate the
contour plot). Identify the equilibrium positions on this phase plot. Based on
the phase plot, describe the nature of the motion you would expect if the
initial conditions are θ ¼ 0 and θ_ ¼ 1:5 rad/s. How does the phase plot and
your description of the motion change if mgL/kθ ¼ 1.5? (c) Solve the
equation of motion numerically for different initial conditions and verify
that your descriptions of the motion deduced from the phase plots in parts
(a) and (b) are correct. Animate the motion using the MATLAB®
animate_lines.
P6.5. Two masses, each of mass m, are connected by a weightless rigid bar, as
shown in Fig. P6.4 and ride in smooth horizontal and vertical slots. The mass
in the horizontal slot is also attached to a linear spring with spring constant, k.
The spring is unstretched when the angle θ ¼ θ0. [Note: This is not the initial
starting angle or equilibrium angle of the system.] This dynamic problem is
analogous to the static problem discussed in Sect. 6.8 (see Fig. 6.31) where
the load P in the static problem is now the weight of the moving mass in the
vertical slot. (a) Let θ0 ¼ 9 . Determine the equation of motion for the system
in terms of the angle, θ, and determine the equilibrium positions of the
system for mg/kL ¼ 0.4 and mg/kL ¼ 0.7. Are these equilibrium positions
stable or unstable? Plot the total potential energy for 5π/4 < θ < 5π/4 rad to
verify your results. (b) This is a conservative system so that the total energy,
E ¼ T+V, is a constant. Obtain a phase plot of the motion by finding the
constant energy contours of the normalized energy, E/mgL, for mg/kL ¼ 0.4
and L/g ¼ 0.1, plotting 40 contours over the region 5π/4 < θ < 5π/4 rad and
5 < θ_ < 5 rad/s (use at least 1000 points for both θ and θ_ to generate the
contour plot). Identify the equilibrium positions on this phase plot. Based on
the phase plot, describe the nature of the motion you would expect if the
initial conditions are θ ¼ 30∘, θ_ ¼ 0, or if θ ¼ 65∘ θ_ ¼ 0. Can you connect
this behavior to the static analysis in Sect. 6.8? How does the phase plot and
your description of the motion change if mg/kL ¼ 0.7? (c) Solve the equation
of motion numerically for different initial starting angles (and zero velocity)
and verify that your descriptions of the motion deduced from the phase plots
in parts (a) and (b) are correct. Animate the motion using the MATLAB®
animate_lines.
P6.6. A single rigid bar of length L (whose weight can be neglected) is supported
by two springs which ride in a smooth vertical track as shown in Fig. P6.5.
Both springs are unstretched when the bar is vertical. Let the spring constants
be k1 ¼ k, k2 ¼ 2k. (a) Determine the critical load and the post-critical load
behavior for large deflections. (b) Perform a linearized analysis of this
problem and show that the critical buckling load of part (a) is obtained
from this analysis.
P6.7. A rigid bar of length L (whose weight can be neglected) is supported by a
spring of length ηL which is attached to a fixed support as shown in Fig. P6.6.
The spring is unstretched when the bar is in a vertical position. (a) Determine
the critical load and the post-critical load behavior for large deflections for
η ¼ 0.5,1.0,5.0. How do these results differ from the case considered in the
text when the spring rides in a smooth slot? (b) Perform a linearized analysis
of this problem and show that the critical loads of part (a) are obtained from
this analysis. Does the linearized analysis of this problem differ from the case
considered in the text when the spring rides in a smooth slot?
P6.8. Two bars, each of length L (whose weight can be neglected), are pinned to
each other and supported by a spring as shown in Fig. P6.7. The spring is
unstretched when the bars are vertical. The top bar rides in a smooth slot and
the lower bar is pinned at one end. Perform a linearized analysis of this
problem and determine the critical load.
L/2
k2
L/2
rigid
bar O
6.9 Problems 447
ηL L
rigid
bar
rigid L
k bar
rigid L
bar O
P6.9. Two rigid bars, each of length L (whose weight can be neglected), are pinned
to each other and supported by springs as shown in Fig. P6.8. The springs
are unstretched when the bars are vertical. Let the spring constants be
k1 ¼ k, k2 ¼ 3k. Using a linearized analysis, determine the critical loads
and mode shapes for this problem.
P6.10. Three rigid bars, each of length L (whose weight can be neglected), are
pinned to each other and supported by springs as shown in Fig. P6.9. The
springs are unstretched when the bars are vertical. The top bar rides in a
smooth slot and the lowest bar is pinned to a fixed support at its lowest end.
Let the spring constants be k1 ¼ k, k2 ¼ 2k. Using a linearized analysis,
determine the critical loads and mode shapes for this problem.
448 6 Dynamic and Static Stability
rigid L
k2 bar
L
rigid
bar O
rigid
k1 bar L
rigid L
k 2 bar
L
rigid
bar O
References
1. R.M. Rosenberg, Analytical Dynamics of Discrete Systems (Plenum Press, New York, 1977)
2. M.R.M. Crespo Da Silva, Fundamentals of Dynamics and Analysis of Motion (Dover Publica-
tions, New York, 2016)
3. H.L. Langhaar, Energy Methods in Applied Mechanics (John Wiley, New York, 1962)
Chapter 7
Vibrations of Dynamical Systems
Engineers must often analyze and design systems that vibrate. In many cases the
vibrations are of very small amplitude so that the equations governing them are
linear. This allows one to use a variety of analytical tools to solve for the motion and
forces. This chapter examines vibrating systems with multiple degrees of freedom
where matrix methods can be used to great advantage. The vibration of single degree
of freedom systems is covered in Appendix D.
We have already analyzed a number of dynamical systems where the motion was a
repetitive oscillatory motion. Many of those systems were one degree of freedom
systems such as the bead on a parabolic wire; the simple or physical pendulum; the
particle sliding on a rotating, circular hoop; the mass connected to a spring-dashpot
and moving on an inclined plane; and others. In general the motion was governed by
nonlinear equations having different forms but when the motion is assumed to be a
small-amplitude motion around an equilibrium position, all of these problems are
governed by the same type of linear equations. Below we list the equations of
motion, under the small-amplitude assumption, for the problems mentioned above
(as well as the original nonlinear equation, if any, shown in parentheses).
1. Bead on a parabolic wire:
2ax g þ 2ax_ 2
€x þ 2agx ¼ 0 €x þ ¼ 0 ð7:1:1aÞ
1 þ 4a2 x2
2. Simple pendulum:
€θ þ g θ €θ þ g sin θ ¼ 0 ð7:1:1bÞ
l l
3. Physical pendulum:
€θ þ mgh θ ¼ 0 I O €θ þ mgh sin θ ¼ 0 ð7:1:1cÞ
I0
g
€
θþ Ω2 θ ¼ 0 €θ þ g Ω2 cos θ sin θ ¼ 0 ð7:1:1dÞ
R R
The equation of motion for all of these problems is of the general form
q
k kq
F(t) mg F(t)
c m
smooth cq
N
(a) (b)
Fig. 7.1 (a) Model of a 1-D vibrating system and (b) its free body diagram
7.2 Linearized Motion Near Equilibrium 451
q þ Cq_ þ Kq ¼ Q
M€ ð7:1:3Þ
1 0 €r n 1 0 rn
€θ þ ¼0 ð7:1:4aÞ
0 1 0 mg=kLe θ
pffiffiffiffiffiffiffiffiffi
where here the dot indicated a derivative on a normalized time, τ ¼ t k=m.
2. Double pendulum:
1 0 €θ1 μg=l1 ðμ 1Þg=l1 θ1
€θ2 þ ¼0 ð7:1:4bÞ
0 1 μg=l2 μg=l2 θ2
In the next section we will see why Eq. (7.1.3) covers a wide range of systems.
To see how Eq. (7.1.3) arises in many dynamics problems we will examine the
behavior of the kinetic and potential energies for small-amplitude motion near an
equilibrium position and derive the equations using Lagrange’s equations. Recall
Lagrange’s equations for a system where the forces derivable from a potential energy
function, V, are
d ∂T ∂T ∂V
þ ¼0 ð7:2:1Þ
_
dt ∂q k ∂qk ∂qk
We have seen before that the kinetic energy can be generally expressed in terms
of three separate terms (T2, T1, T0) as
1X n X n Xn
T¼ M ij q_ i q_ j þ μi q_ i þ T 0
2 i¼1 j¼1 i¼1 ð7:2:2Þ
¼ T2 þ T1 þ T0
452 7 Vibrations of Dynamical Systems
We can combine the potential energy function together with the T0 part of the kinetic
energy into the dynamic potential U ¼ V T0 to write Lagrange’s equations as
_! _
d ∂T ∂T ∂U
þ ¼0 ð7:2:3Þ
dt ∂q_ k ∂qk ∂qk
_
where now T ¼ T 2 þ T 1 . If we let J represent either the dynamic potential or one of
the remaining kinetic energy terms (T2 or T1), then assuming any explicit time
dependency is not present we have in general J ¼J q; q_ . Ifwe want to examine
Lagrange’s equations near an equilibrium position qe ; q_ e ¼ 0 and obtain the first-
order (linear) behavior of the system we need to keep at most quadratic terms in the
J functions since we have to take a derivative of these functions on q or q_ , as seen in
Eq. (7.2.3), to obtain the equations of motion. Note also that we can also redefine the
generalized coordinates so that equilibrium is at q ¼ qe ¼ 0. This means we need to
examine a Taylor series expansion for J to second order given by
X ∂J
X ∂J
1X n X
∂ J
n n n 2
J q; q_ ¼ J ð0; 0Þ þ q þ q_ þ
qi q j
i¼1
∂qi
ð0;0Þ i i¼1 ∂q_ i
ð0;0Þ i 2 i¼1 j¼1 ∂qi ∂q j
ð0;0Þ
X n X n 2
∂ J
1 Xn X n 2
∂ J
þ
qi q_ j þ
q_ i q_ j
i¼1 j¼1
∂q i ∂ q_ j
2 i¼1 j¼1
∂ _ i ∂q_ j
q
ð0;0Þ ð0;0Þ
ð7:2:4Þ
First, consider the dynamic potential and let J ¼ U. Since this term is only a function
of the generalized coordinates we can approximate U as
X ∂U
1X n X
∂ U
n n 2
U ðqÞ ¼ U ð0Þ þ q þþ
qq ð7:2:5Þ
i¼1
∂qi
ð0Þ i 2 i¼1 j¼1 ∂qi ∂q j
i j
ð0Þ
where
7.2 Linearized Motion Near Equilibrium 453
∂ U
2
K ije ¼
ð7:2:7Þ
∂qi ∂q j
ð0Þ
are the components of the constant stiffness matrix, Ke, which are the second
derivatives of the dynamic potential evaluated at the equilibrium position. It is called
the stiffness matrix since if we have a linear spring with a stretch, x, we have
U ¼ V ¼ kx2/2 and k ¼ ∂2V/∂x2 is the spring stiffness so that K ije plays the same
role for a multiple degree of freedom problem as that spring constant. Next, consider
the case where we let J ¼ T2. If we examine all the terms in Eq. (7.2.4) we see only
the last term to be nonzero and we find
1X n X
∂ T 2
n 2
T 2 q; q_ ¼
q_ i q_ j
2 i¼1 j¼1 ∂q_ i ∂q_ j
ð0;0Þ
ð7:2:8Þ
1X n X n
¼ M e q_ q_
2 i¼1 j¼1 ij i j
where Me is the constant mass matrix at equilibrium. Finally, let J ¼ T1. In this case,
the only nonzero terms on the right side of Eq. (7.2.4) are the third and the last terms,
giving
X
∂J
Xn X
∂ J
n n 2
T 1 q; q_ ¼ q_ i þ
qi q_ j
∂q_
i¼1 i ð0;0Þ i¼1 j¼1
∂qi ∂q_ j
ð0;0Þ
ð7:2:9Þ
X
n n X
X n
¼ μie q_ i þ Bije qi q_ j
i¼1 i¼1 j¼1
∂μi
where Bije ¼
. With all these results we see that
∂q j
ð0;0Þ
_
∂T Xn Xn
¼ M kje q_ j þ μke þ B ejk q j
∂q_ k j¼1 j¼1
_
∂T X n
¼ Bkje q_ j ð7:2:10Þ
∂qk j¼1
∂U X n
¼ K kje q j
∂qk j¼1
X
n n
X X
n
M kje €qj þ B ejk Bkje q_ j þ K kje q j ¼ 0 ð7:12:11Þ
j¼1 j¼1 j¼1
or in matrix form
where the gyroscopic matrix [Ge] ¼ [Be]T [Be]. If the system is not conservative so
that there are other generalized forces Qnc acting, then the equations of motion
become
Equation (7.2.13) is in the form of Eq. (7.1.3) but here the gyroscopic matrix is
related to Coriolis effects and is not associated with dissipation. The matrix [Ge] can
produce stabilizing or destabilizing effects on the motion about the equilibrium
position. Note that the stiffness matrix comes from the dynamic potential U ¼ V T0,
where the T0 term often arises in problems when the motion of the system takes place
in a non-inertial system. In that case, T0 can contain centripetal acceleration effects
which may also be destabilizing. We saw this in the case of a particle on a rotating
hoop where the stiffness was k ¼ (g/R Ω2) in terms of the acceleration of gravity,
g; the radius of the hoop, R;pand ffiffiffiffiffiffiffiffi the angular velocity of the hoop, Ω (see
Eq. (7.1.1d)). As long as Ω < g=R the stiffness is positivepand ffiffiffiffiffiffiffiffithe particle can
oscillate near the θ ¼ 0 equilibrium position but when Ω > g=R the stiffness is
negative and the particle is driven away from θ ¼ 0. We saw examples of that type of
behavior in Chap. 2.
In Chap. 6 we showed that the linearized equations of motion could give us
important information about the stability of a system. There we expressed the
equations of motion as a system of first-order differential equations. The second-
order system of Eq. (7.2.13) can be placed into that first-order form or we can use
Eq. (7.2.13) directly since the behavior of this second-order system of linear
differential equations is also easy to examine.
If the dynamical system is a natural system then T1 ¼ T0 ¼ 0 and the equations of
motion become
which is in the form of Eq. (7.1.3) but with no damping matrix present.
If there are losses due to linear viscous damping types of forces, then they are easy
to include in a Lagrangian formulation of a dynamical system. We have seen a 1-D
example of this in the behavior of a linear dashpot, where the force of the dashpot
acting on a particle in motion along the x-direction, for example, is given by
F ¼ cx_ . This force can be expressed in terms of potential-like function called
the Rayleigh dissipation function, D, where D ¼ cx_ 2 =2. Clearly the force, F, is then
7.2 Linearized Motion Near Equilibrium 455
1X n X n
D¼ Cij q_ i q_ j ð7:2:15Þ
2 i¼1 j¼1
in terms of the generalized velocities and a damping matrix, [C]. In the 1-D case we
must have c > 0 in order to produce damping of the motion. Otherwise, the included
term will actually cause the motion to grow. Similarly, the matrix [C] is assumed to
be a symmetrical, positive definite matrix to ensure that physically it does produce a
damping of the motion. For a natural system Lagrange’s equations in the presence of
these viscous damping forces, therefore, become
d ∂T 2 ∂V ∂D
þ þ ¼ Qknc ð7:2:16Þ
dt ∂q_ k ∂qk ∂q_ k
where [Ce] is the damping matrix, [C], evaluated at the equilibrium position.
Equation (7.2.17) is now in exactly the form seen in Eq. (7.1.3).
Finally, we will mention that the Rayleigh function can also be used to describe
another type of force called circulatory forces. Circulatory forces can arise, for
example, from the electromagnetic forces in electric motors. In this case the Ray-
leigh dissipation function can be written as
1X n X n Xn X n
D¼ Cij q_ i q_ j þ H ij q_ i q j ð7:2:18Þ
2 i¼1 j¼1 i¼1 j¼1
½M e f€
qg þ ð½C e þ ½Ge Þfq_ g þ ð½K e þ ½H e Þfqg ¼ fQnc g ð7:2:19Þ
where [He] is the circulatory matrix, [H], evaluated at the equilibrium position.
Equation (7.2.19) covers the general case when damping, gyroscopic, and circu-
latory matrices are all present in addition to the usual mass and stiffness matrices. In
this chapter we will examine vibrations of structural systems where gyroscopic and
circulatory forces are absent.
456 7 Vibrations of Dynamical Systems
To examine the vibratory motion of the system we will express the solution in the
form of sinusoidal motions as
where {u} is a vector amplitude and we have written the sinusoidal response in
complex exponential terms where ω is a frequency of oscillation in rad/s. Using this
solution, Eq. (7.3.2) becomes
½K e ω2 ½M e fug ¼ 0 ð7:3:3Þ
which are a set of homogeneous algebraic equations. We want to find values for ω
and {u} that satisfy these equations. This type of problem, as we have seen before, is
an eigenvalue problem, where solutions for ω2 are called eigenvalues and the
corresponding solutions for {u} are called eigenvectors. Physically, the eigenvalues
represent the squares of the natural frequencies at which this system freely vibrates
and the eigenvectors represent the amplitudes the system coordinates have during the
motion at these natural frequencies. The eigenvectors are usually called the natural
modes or normal modes of the system. One can show that there are only nontrivial
solutions of Eq. (7.3.3) if the determinant of the coefficient matrix in Eq. (7.3.3) is
zero:
det ½K e ω2 ½M e ¼ 0 ð7:3:4Þ
Eq. (7.3.3) then Cp{up} will also be a solution, where Cp is a constant. The properties
of roots are determined by the properties of the stiffness matrix, [Ke]. The mass
matrix [Me] is generally a symmetrical, positive definite matrix but the stiffness
matrix may be a symmetrical positive definite or positive semi-definite matrix when
we are examining stable oscillatory motion about an equilibrium position. Since
these matrix types have important characteristics that determine the behavior of the
system, we list in Table 7.1 some of their mathematical properties [1]:
In order for a matrix to be positive definite or positive semi-definite it must be a
symmetrical matrix. As indicated in Table 7.1 when the stiffness matrix is positive
definite then the eigenvalues and eigenvectors are all real and the eigenvalues are all
positive so that taking the square
qffiffiffiffiffiroot
ffi there are real positive and negative natural
frequencies given by ωp ¼ ωp . A general solution for the free response, {q},
2
will be a superposition of all these individual solutions, therefore, having the form
X
n
fq g ¼ up Cp exp iωp t þ Dp exp iωp t ð7:3:5Þ
p¼1
where (Cp, Dp) are arbitrary (complex) constants. Alternatively, we could write the
free response in real form as
X
n
f qg ¼ Ap up cos ωp t ϕp ð7:3:6Þ
p¼1
where (Ap, ϕp) are real constants. The values of the constants (Cp, Dp) or (Ap, ϕp)
must be chosen to satisfy the initial conditions.
We previously solved an eigenvalue problem of the type we have been discussing
here for the double pendulum in Chap. 3 and also saw that an eigenvalue problem
arose in Chap. 6 when considering the stability of the small-amplitude solutions of
the double pendulum about an equilibrium position. In that simple two degree of
freedom double-pendulum problem we solved for the eigenvalues and eigenvectors
analytically but we also pointed out that MATLAB® has a built-in function, eig, that
can be used to solve eigenvalue problems. That MATLAB® function can also be
used effectively here. Consider, for example, the three degree of freedom system
458 7 Vibrations of Dynamical Systems
(a)
k1 ( x2 − x1 ) k2 ( x3 − x2 )
k1 ( x2 − x1 ) k2 ( x3 − x2 )
(b)
shown in Fig. 7.2a where we have three carts connected together by two springs.
Using the free body diagram of Fig. 7.2b Newton’s second law gives us directly
m1€x1 ¼ k1 ðx2 x1 Þ
m2€x2 ¼ k2 ðx3 x2 Þ k1 ðx2 x1 Þ ð7:3:7Þ
m€x3 ¼ k2 ðx3 x2 Þ
[V, D] = eig(K, M)
where D is a matrix having the eigenvalues along its diagonal (the other elements of
D are zeros) and V is a matrix whose columns contain the corresponding
7.3 Free Vibrations Without Damping 459
M = [ 2 0 0; 0 2 0; 0 0 2]
M= 2 0 0
0 2 0
0 0 2
K = [ 2 -2 0; -2 4 -2; 0 -2 2]
K= 2 -2 0
-2 4 -2
0 -2 2
[V, D] = eig(K, M)
D = -0.0000 0 0
0 1.0000 0
0 0 3.0000
Fig. 7.3 Motion of the system at a zero eigenvalue (rigid body motion)
460 7 Vibrations of Dynamical Systems
If we multiply the first equation by {uq}T and the second equation by {up}T and
subtract the two resulting equations we find
T
ω2q ω2p uq ½M e up ¼ 0 ð7:3:11Þ
where we have used the fact that since both [Me] and [Ke] are symmetrical matrices it
follows that
T e T e
uq ½ K u p ¼ u p ½ K u q
T e T e ð7:3:12Þ
uq ½M up ¼ up ½M uq
But since ω2q ω2p is not zero Eq. (7.3.11) gives
T e
uq ½ M u p ¼ 0 ð7:3:13aÞ
If we multiply the first equation in Eq. (7.3.10) by {uq}T again and use Eq. (7.3.13a)
then we also find
T e
uq ½K up ¼ 0 ð7:3:13bÞ
Because the mass matrix is always positive definite, it follows that for any natural
mode we have
T e
up ½ M u p > 0
As we have seen the natural modes are always defined to within constant values so it
is useful to normalize them by consistently choosing those constants. There are a
number of ways to make that choice but here we will normalize them by requiring
that
T e
u p ½ M up ¼ 1 ð7:3:14aÞ
Again, this is similar to the usual normalization seen for vectors where we can make
the magnitude of a vector unity by requiring that u u ¼ 1 or, equivalently,
{u}T{u} ¼ 1. Equation (7.3.14a) is similar but also uses the mass matrix as a
weighting factor, so this normalization for the eigenvectors does not make them
unit vectors. If the eigenvectors are normalized according to Eq. (7.3.14a) then from
Eq. (7.3.10) we also have
T e
up ½K up ¼ ω2p ð7:3:14bÞ
We can combine Eqs. (7.3.13a) and (7.3.13b) with Eqs. (7.3.14a) and (7.3.14b) to
give the orthonormality relations:
T e T e
up ½M uq ¼ δpq , up ½K uq ¼ ω2p δpq ð7:3:15aÞ
or, in terms of the matrix V that is produced by the MATLAB® eig function and
which has all the eigenvectors in its columns,
½V T ½M e ½V ¼ ½I , ½ V T ½ K e ½ V ¼ ½ Ω ð7:3:15bÞ
where [I] and [Ω] are diagonal matrices with ones and the squares of the natural
frequencies, respectively, along their diagonals and where δpq is the Kronecker delta,
defined as
(
1 p¼q
δpq ¼ ð7:3:16Þ
0 p 6¼ q
In solving for the eigenvalues and eigenvectors with the MATLAB® eig function the
eigenvectors obtained are orthogonal, as mentioned previously, and they satisfy the
462 7 Vibrations of Dynamical Systems
N = V.'*M*V
which verifies the orthonormality relations of Eq. (7.3.15b) for the mass matrix. For
the stiffness matrix we have
N2 = V.'*K*V
N2 = 0.0000 -0.0000 -0.0000
-0.0000 1.0000 0.0000
-0.0000 0 3.0000
so the stiffness matrix orthonormality relations of Eq. (7.3.15b) are also satisfied.
[Note that because the eigenvalues and eigenvectors are computed numerically they
are only approximate values and so it is possible for the eigenvalues and eigenvec-
tors to have very small imaginary components and for the eigenvectors to be not
exactly orthogonal. Thus we may have to remove any such small unwanted com-
ponents before we do further calculations with them. Also note that other eigenvalue
problem solvers may not normalize the eigenvectors according to Eq. (7.3.14a). In
that case, to make the eigenvectors have the normalization of Eq. (7.3.14a) we must
compute
T e
up ½ M u p ¼ α p
pffiffiffiffiffi
and then form the normalized eigenvectors, {up}norm, as up norm ¼ αp up ].
The orthogonality of the natural modes implies that they are an independent set of
vectors and that we can express any n-dimensional vector as a linear combination of
these natural modes multiplied by appropriate coefficients. This very important
result is called the expansion theorem. In particular, we can express our
n generalized coordinates, {q(t)}, for the free vibration problem as
X
n
fqð t Þ g ¼ z p ð t Þ up ð7:3:17aÞ
p¼1
Since the MATLAB® eig function generates the V matrix having all the eigenvectors
in its columns, we can also write Eq. (7.3.17a) as
7.3 Free Vibrations Without Damping 463
where {z} ¼ [z1, z2, . . ., zn]T. Similarly, by multiplying both sides of Eq. (7.3.17a) by
{uq}T[Me] and using the orthonormality relation we find
T
zq ðt Þ ¼ uq ½M e fqðt Þg ð7:3:18aÞ
or
The zp(t) coefficients in Eq. (7.3.17a) are called modal coordinates or principal
coordinates. This transformation from generalized coordinates to modal coordinates
makes the solution to our free vibration problem very easy. To see this, we place
Eq. (7.3.17a) into Eq. (7.3.1) and multiply the resulting equation by {uq}T to find
X
n
T X
n
T
uq ½M e up €zp ðt Þ þ uq ½ K e u p z p ð t Þ ¼ 0 ð7:3:19Þ
p¼1 p¼1
But by the orthonormality relations and the properties of the Kronecker delta these
equations reduce to simply
z_ q ð0Þ
zq ðt Þ ¼ zq ð0Þ cos ωq t þ sin ωq t ð7:3:21Þ
ωq
which is well behaved for ωq 6¼ 0. For problems with rigid body modes where
ωq ¼ 0 the solution becomes
We can get this solution for ωq ¼ 0 from Eq. (7.3.21) by taking the limit of that
equation as ωq ! 0 but since ωq is present in both the denominator and the
numerator of the second term in Eq. (7.3.21) we formally have a 0/0 value.
L’ Hopital’s rule gives us the correct limit and hence Eq. (7.3.22). When we try to
evaluate such terms numerically in MATLAB® we will get an error if we try to do a
straight division with ωq ¼ 0. A work-around to this problem in MATLAB® is to
464 7 Vibrations of Dynamical Systems
simply replace ωq in Eq. (7.3.21) by ωq + eps, where eps is a very small number that
loosely speaking is on the order of the computer machine precision. With that
replacement we then can also use Eq. (7.3.21) for ωq ¼ 0.
By using Eq. (7.3.18a) and its derivative we can get the initial values of the modal
coordinates from the initial values of the original generalized coordinate as
T
z q ð 0Þ ¼ u q ½ M e f q ð 0Þ g
T ð7:3:23aÞ
z_ q ð0Þ ¼ uq ½M e fq_ ð0Þg
fzð0Þg ¼ ½V T ½M e fqð0Þg
ð7:3:23bÞ
fz_ ð0Þg ¼ ½V T ½M e fq_ ð0Þg
where V is the matrix of eigenvectors generated by the MATLAB® eig function with
the eigenvectors in its columns. From these initial values and the modal coordinate
solutions of Eq. (7.3.21) we can write the solution for the generalized coordinates,
Eq. (7.3.17b).
where d is the distance between particles at equilibrium. The elongation in the elastic
string, Δl, is therefore
1 2
Δl ¼ qkþ1 qk
2d
The work done by the internal tension Te during this elongation, TeΔl, must be equal
to the change in the internal potential energy, ΔV, of the string so that we have
7.3 Free Vibrations Without Damping 465
m
m m m m m m Te Te
d
(a) (b)
Fig. 7.4 (a) A linear array of n equally spaced masses on a stretched string. (b) The free body
diagram of an individual mass
m
m
m
m
m m
qk qk +1
q1 q2 qn −1 qn
d
(a) (b)
Fig. 7.5 (a) The masses on the string when it is in motion, and (b) the vertical displacements of a
generic pair of masses
Te 2
T e Δl ¼ ΔV ¼ qkþ1 qk
2d
and the total potential energy of the string (neglecting any irrelevant constant value)
is
1Xnþ1 2
V¼ ke qkþ1 qk ð7:3:24Þ
2 k¼0
where we have included the parts of the springs from the first and last masses to the
fixed ends by summing from k ¼ 0 to k ¼ n + 1. At those ends q0 ¼ qn+1 ¼ 0. The
constant ke ¼ Te/d acts as a stiffness constant for this system. The kinetic energy of
the system is just
1X n
T¼ mq_ 2k ð7:3:25Þ
2 k¼1
Since in this case ∂T/∂qp ¼ 0 Lagrange’s equations (Eq. (7.2.1)) are just
466 7 Vibrations of Dynamical Systems
!
d ∂T ∂V
þ ¼ 0 ðp ¼ 1; 2; . . . ; nÞ ð7:3:26Þ
dt ∂q_ p ∂qp
1 2 1 2
V ¼ . . . þ ke qp qp1 þ ke qpþ1 qp þ . . .
2 2
so that
∂V
¼ ke qp qp1 ke qpþ1 qp ð7:3:27Þ
∂qp
Note that this holds for p ¼ 1 to p ¼ n with q0 ¼ qn+1 ¼ 0. Using this relationship and
differentiating the kinetic energy we find the equations of motion as
qp þ k e qp qp1 k e qpþ1 qp ¼ 0 ðp ¼ 1; 2; . . . ; nÞ
m€ ð7:3:28Þ
Now, consider the problem of the free vibration of a string with five masses with
m ¼ 2 kg and ke ¼ 10 N/m. We could generate these matrices by hand but we can let
MATLAB® do it for us. The mass matrix is a diagonal matrix. If we generate a
vector with the masses in them and use the MATLAB® function diag we will obtain
the diagonal mass matrix:
mv = ones(1,5)*2;
M = diag(mv)
M= 2 0 0 0 0
0 2 0 0 0
0 0 2 0 0
7.3 Free Vibrations Without Damping 467
0 0 0 2 0
0 0 0 0 2
The stiffness matrix is a tridiagonal matrix with elements on the main diagonal
(which is labeled as the K ¼ 0 diagonal) and on the diagonal immediately below it
(labeled as the K ¼ 1 diagonal) and on the diagonal immediately above it (labeled
as the K ¼ 1 diagonal). The MATLAB® function diag(v, K) generates a diagonal
matrix with the elements of the vector v on the Kth diagonal so if we generate vectors
(vd, vu, vl) with the stiffnesses on the K ¼ 0, K ¼ 1 and K ¼ 1 diagonals,
respectively, we can then use the diag function to obtain the tridiagonal matrix that
contains those values:
vd = ones(1,5)*20;
vu = ones(1,4)*(-10);
vl = vu;
K = diag(vd) +diag(vu,1) +diag(vl, -1)
K = 20 -10 0 0 0
-10 20 -10 0 0
0 -10 20 -10 0
0 0 -10 20 -10
0 0 0 -10 20
where diag(vd) as used above is equivalent to diag(vd, 0). Notice that the diagonal
and off-diagonal vectors have different dimensions. There are other ways in
MATLAB® to generate a tridiagonal matrix but the above method works fine for
our purposes. Having the mass and stiffness matrices we can obtain the eigenvalues
and normalized eigenvectors by using the eig function:
[V, D] = eig(K, M)
D= 1.3397 0 0 0 0
0 5.0000 0 0 0
0 0 10.0000 0 0
0 0 0 15.0000 0
0 0 0 0 18.6603
Besides the eigenvalues and eigenvectors, the only additional quantities needed are
the initial conditions for the string and then one can solve for the motion. In this case
we will give the string the initial shape shown in Fig. 7.6a with zero velocities for
all the masses. The generalized displacements and velocities are then q(0) ¼ [1, 1.6,
2.0, 1.6, 1], q_ ð0Þ ¼ ½0; 0; 0; 0; 0. The MATLAB® script vibrating_string_anim
contains all the steps listed above and sets up the default parameters previously
468 7 Vibrations of Dynamical Systems
-1
-2
-3
0 1 2 3 4 5 6
(b)
described. The script then uses Eq. (7.3.23b) to get the initial values for the modal
coordinates. The solution for modal coordinates is found from Eq. (7.3.21) as a
function of time over the interval from t ¼ 0 to t ¼ tmax ¼ 20 s at times spaced apart
by a time interval dt ¼ 0.1 s. These modal coordinates and Eq. (7.3.17b) are then
used to evaluate the corresponding coordinates of the masses over that time interval
and to display those coordinates as an animation of the motion. The final position of
the string from that animation is shown in Fig. 7.6b. As can be seen in the entire
animation the string vibrates primarily in the form of the first mode which has a
natural frequency of approximately ω1 ¼ 1.16 rad/s. This occurs since the initial
string displacements are close to the first eigenvector which, when normalized so
that its maximum component is 2, is given by {u1} ¼ [1, 1.73, 2, 1.73, 1]T, a
result that is very close to the initial displacements shown in Fig. 7.6a.
qp þ ke qp qp1 ke qpþ1 qp ¼ 0,
m€ q0 ¼ qnþ1 ¼ 0 ð7:3:31Þ
If we assume harmonic solutions qp ¼ ap cos (ωt) then this is equivalent to taking the
real part of the vector form we used before, namely {q} ¼ {u} exp (iωt), where the
components of {u} are now the ap, i.e., {u} ¼ [a1, a2, . . ., an]T. These components
satisfy
mω2 ap ¼ k e apþ1 2ap þ ap1 , a0 ¼ anþ1 ¼ 0 ð7:3:32Þ
whose n roots are the eigenvalues obtained previously. However, we can find those
roots and the eigenvectors by working with the recursion relationship of Eq. (7.3.32)
directly. Let us write the ap in the form
mω2 A sin ðpϕÞ ¼ ke A½ sin ðpϕ ϕÞ 2 sin ðpϕÞ þ sin ðpϕ þ ϕÞ ð7:3:35Þ
which yields
ϕ
ω ¼ 2ω0 sin ð7:3:37Þ
2
pffiffiffiffiffiffiffiffiffiffi
where ω0 ¼ ke =m. To find the parameter ϕ we note that Eq. (7.3.34) satisfies the
one end condition a0 ¼ 0 but not the other one. Requiring an+1 ¼ A sin [(n+1)ϕ] ¼ 0
means that we can find n values for the angle ϕ, ϕs (s ¼ 1, 2, . . ., n) given by
470 7 Vibrations of Dynamical Systems
(n+1)ϕs ¼ sπ that satisfies that end condition. Each of these s values gives us one of
the natural frequencies and eigenvectors. Thus Eq. (7.3.37) gives us the n natural
frequencies:
sπ
ωs ¼ 2ω0 sin ðs ¼ 1; 2; . . . ; nÞ ð7:3:38Þ
2 ð n þ 1Þ
and the components of the sth eigenvector, (ap)s, from Eq. (7.3.34) are
psπ
ap s ¼ As sin ðp ¼ 1; 2; . . . ; nÞ ðs ¼ 1; 2; . . . ; nÞ ð7:3:39Þ
nþ1
Equations (7.3.38) and (7.3.39) are explicit analytical solutions for the natural
frequencies and natural modes. Notice, however, that the natural modes are not
normalized here. When the system is vibrating only in the sth mode we then have
πps
qp s ¼ ap s cos ðωs t ψ s Þ ¼ As sin cos ðωs t ψ s Þ ð7:3:40Þ
nþ1
where we have included arbitrary phase terms, ψ s. A general expression for the
motion can then be formed as a superposition of all the natural modes:
Xn X
n
πps
qp ¼ qp s ¼ As sin cos ðωs t ψ s Þ ð7:3:41Þ
s¼1 s¼1
nþ1
where (As, ψ s) can be determined from the initial conditions. We can compare these
analytical solutions with the numerical results we obtained in Simulation 7.1 where
m ¼ 2, ke ¼ 10, n ¼ 5. Then evaluating Eq. (7.3.38) in MATLAB® and comparing
with the square root of the D matrix generated by the eig function give
s =1:5;
wexact = 2*sqrt(ke/m)*sin(s*pi/12) % exact eigenvalues
wexact = 1.1575 2.2361 3.1623 3.8730 4.3198
sqrt(D) % eigenvalues calculated from eig
ans = 1.1575 0 0 0 0
0 2.2361 0 0 0
0 0 3.1623 0 0
0 0 0 3.8730 0
0 0 0 0 4.3198
which are the same natural frequencies. In comparing the eigenvectors we have to
remember that the analytical values of Eq. (7.3.39) are not normalized so we have to
account for that fact. For example, the first mode in the V matrix generated by eig
can be renormalized so its max value is one and we have the same maximum value
7.3 Free Vibrations Without Damping 471
for the exact first mode given by Eq. (7.3.39) if we set A1 ¼ 1. These steps in
MATLAB® yield
p = 1:5;
u1 = V(:,1)'/min(V(:,1)) % first mode eigenvector calculated with eig
re-normalized
u1 = 0.5000 0.8660 1.0000 0.8660 0.5000
u1exact = sin(p*pi/6) % exact first mode eigenvector values
u1exact = 0.5000 0.8660 1.0000 0.8660 0.5000
so the numerical and exact first eigenvector values agree. Similar agreement is found
for the other eigenvectors.
The fact that the analytical values for the eigenvector components are given by a
sine function has a physical significance. If the particles are all separated by a
distance d then x ¼ pd is the distance of the pth particle from the left end of the
string, and we can write Eq. (7.3.39) as
sπx
sπpd
ap s ¼ As sin ¼ As sin ð7:3:42Þ
ðn þ 1Þd L
where L ¼ (n+1)d is the total length of the string. When the number of masses is
large and the distance d is small, the system should closely model a real string where
the mass is continuously distributed along its length and Eq. (7.3.42) should model
the eigenvectors for vibrations of that continuous string where the variable x is a
continuous function. If we plot the first three exact eigenvectors of Eq. (7.3.39) and
the continuous functions of x given by Eq. (7.3.42) for As ¼ 1 we find the plots
shown in Fig. 7.7. Thus, the modal coordinates of the discrete masses lie along these
continuous curves and as the number of masses in a given string length increases the
modal coordinates of the masses “fill in” these curves at more and more points. We
also see clearly from these plots that as the mode number increases the number of
nulls (zeros) in the mode shapes increases.
Finally, consider the expression for the natural frequencies, Eq. (7.3.38), when
the number of masses, n, is large and d is small so that we are modeling a string with
continuously distributed mass. In that case let us examine the lowest natural fre-
quencies where s < < n. Then these frequencies are given approximately as
sπ sπ
ωs ¼ 2ω0 sin ffi ω0 d ðs << nÞ ð7:3:43Þ
2 ð n þ 1Þ L
pffiffiffiffiffiffiffiffiffiffiffiffi pffiffiffiffiffiffiffiffiffi
where ω0 d ¼ Td=m ¼ T=ρl , and where ρl is the linear mass density (mass/unit
length) for the string. Thus, we see that the lower natural frequencies of the
continuous string are approximately multiples of the first (fundamental) frequency,
ω1, i.e.,
472 7 Vibrations of Dynamical Systems
1 1
0.8
0.5
0.6
0
0.4
0.2 -0.5
0 -1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
(a) (b)
0.5
-0.5
-1
0 1 2 3 4 5 6
(c)
Fig. 7.7 The first three mode shapes for a string with a continuously distributed mass (solid line)
and the modal coordinates for a string with five discrete masses (dots) for (a) the first mode, (b) the
second mode, and (c) the third mode
sffiffiffiffi
π T
ωs ¼ sω1 ðs << nÞ, ω1 ¼ ð7:3:44Þ
L ρl
2 2
1 ∂ u ∂ u
¼ 2 ð7:3:45Þ
c2 ∂t 2 ∂x
pffiffiffiffiffiffiffiffi
where c ¼ E=ρ is the wave speed for waves traveling in the rod. The constant E is
a material constant called Young’s modulus and ρ is the mass density (mass/unit
volume). The rod model comes from a discrete model that is identical in form to our
7.3 Free Vibrations Without Damping 473
time, t + Δ t
pffiffiffiffiffiffiffiffiffiffiffi
model for the transverse motions of a string if we let c ¼ T e =ρl instead so the
vertical q-displacement in a continuous string also satisfies
2 2
1 ∂ q ∂ q
¼ 2 ð7:3:46Þ
c2 ∂t 2 ∂x
As seen in Chap. 9 there are traveling wave solutions to the 1-D wave equation
such as q ¼ f(x ct)+g(x+ct), where f(x ct) represents a wave traveling in the
positive x-direction and g(x+ct) represents a wave traveling in the negative x-direc-
tion. Suppose we examine the special case of a combination of rightward and
leftward propagating sinusoidal waves in the string of identical form where
2π 2π
q ¼ A sin ðx ct Þ þ A sin ðx þ ct Þ ð7:3:47Þ
λ λ
The parameter λ is called the wavelength of the sinusoid; that is, it is the distance
between two successive maxima (or minima) in the sinusoid (see Fig. 7.8). The
wavelength is related to the circular frequency of oscillations of the wave, ω, in rad/s,
by λ ¼ 2πc/ω. Figure 7.8 plots the function sin[2π(x ct)/λ] at two times t and t + Δt,
showing that indeed the sinusoid is moving in the positive x-direction. Similarly,
sin[2π(x+ct)/λ] can be shown to be a sinusoidal wave moving in the negative
x-direction. If we again use the trigonometric relations sin(B C) ¼
sin B cos C sin C cos B we can write Eq. (7.3.47) as
2πx
q ¼ 2A sin cos ðωt Þ ð7:3:48Þ
λ
time, t1
time, t2
time, t3
time, t4
Comparing Eq. (7.3.48) with Eq. (7.3.49) we see that they are identical if A1 ¼ 2A
and λ ¼ 2L. Thus, we see that this vibrational motion of the string, which is also
called a standing wave since the motion is purely an up-and-down motion that does
not move to the right or left (see Fig. 7.9 which plots Eq. (7.3.49) at several times),
can be thought of as a superposition of rightward and leftward propagating
sinusoidal waves. The condition λ ¼ 2L guarantees that the boundary conditions
q(0) ¼ q(L ) ¼ 0 are satisfied. A similar comparison can be done for the higher modes
as well so that we see that there is a duality between the vibrational motions of
dynamical systems and waves that propagate back and forth in those systems.
The last section showed that the use of modal coordinates makes the solution of free
vibration problems relatively simple. The use of modal coordinates makes the
solution of many undamped forced multi-degree of freedom problems easy as
well. Consider again the small-amplitude motion of a natural system near equilib-
rium where there are no damping or circulatory forces present but where now there is
an applied generalized force, Q(t). Then the equations of motion for the generalized
coordinates are
We again place the modal expansion of Eq. (7.3.17a) into Eq. (7.4.1) and multiply
the resulting equation by {uq}T to find
7.4 Forced Vibrations Without Damping 475
X
n
T X
n
T T
uq ½M e up €zp ðt Þ þ uq ½K e up zp ðt Þ ¼ uq fQðt Þg ð7:4:2Þ
p¼1 p¼1
where Nq(t) ¼ {uq}T{Q(t)}. Since the modal coordinates are uncoupled we can solve
all of the 1-D forced vibration problems in Eq. (7.4.3) independently.
As shown in Appendix D there are two ways in which we can write the solutions
of Eq. (7.4.3). One way, which is valid for any force Q(t), to combine the free
vibration solution with a convolution integral expression that provides a particular
solution that accounts for the force. In this case we have for ωq 6¼ 0
ðt
z_ q ð0Þ sin ωq ðt τÞ
zq ðt Þ ¼ zq ð0Þ cos ωq t þ sin ωq t þ N q ðτÞ dτ ð7:4:4Þ
ωq ωq
0
and for ωq ¼ 0
ðt
zq ðt Þ ¼ zq ð0Þ þ z_ q ð0Þt þ N q ðτÞðt τÞdτ ð7:4:5Þ
0
Again, we can use Eq. (7.4.4) in numerical evaluations in MATLAB® for the case
ωq ¼ 0 if we use the same work-around described in the last section.
A second way to obtain the solution is to write it as a sum of a homogeneous
solution and a particular solution, i.e., zq ðt Þ ¼ zqhom ðt Þ þ zpart
q ðt Þ, where the homoge-
neous solution is a general solution to the free vibration problem which we could
write in real form as
zqhom ðt Þ ¼ C q sin ωq t þ Dq cos ωq t ð7:4:6Þ
and the particular solution is any explicit solution of Eq. (7.4.3) when the force is
present. The convolutional integral in Eq. (7.4.4) is such a particular solution but it is
also a particular solution that satisfies zero initial conditions for the modal coordi-
nates, i.e., zq ð0Þ ¼ z_ q ð0Þ ¼ 0 (see Appendix D). Thus, the homogeneous solution of
Eq. (7.4.3) in that case must satisfy by itself the initial conditions (so that it is
identical with the free vibration solution), leading to the form seen in Eq. (7.4.4)
where Cq ¼ z_ q ð0Þ=ωq and Dq ¼ zq(0). If the particular solution, however, is simply
chosen to satisfy Eq. (7.4.3) then the initial conditions on the modal coordinates must
be satisfied by the combination of the homogeneous and particular solutions:
476 7 Vibrations of Dynamical Systems
which is a set of equations to determine (Cq, Dq) since the particular solution is an
explicit solution without arbitrary constants. Again, the initial conditions for the
modal coordinates are obtained from the initial conditions on the original general-
ized coordinates by Eq. (7.3.23b). This second approach is most useful when the
form of the force function is simple so that one can easily obtain an analytical
particular solution. We show an example of such a case for a 1-D system in
Appendix D. Here, multiple degree of freedom problems can be solved in the
same fashion.
where {Q0} is a vector amplitude and ω is the driving frequency (rad/s). To obtain a
steady-state solution, {qss(t)}, we can assume a particular solution of Eq. (7.4.8) as
Placing Eq. (7.4.10) into Eq. (7.4.8) and dividing out a common exp(iωt) factor, we
find
7.5 Free Vibrations with Damping 477
½K e ω2 ½M e fAg ¼ fQ0 g ð7:4:11Þ
which is a system of linear equations for the unknown steady-state amplitudes, {A}.
As long as ω 6¼ ωq these equations have a solution given formally as
1
fAg ¼ ½K e ω2 ½M e fQ0 g ð7:4:12Þ
This is analogous to the solution found by simple division for a one degree of
freedom system in Appendix D (see Eq. (D.1.33) with no damping). It is also
instructive to examine the steady-state response using the modal coordinates where
T T
€zq ðt Þ þ ω2q zq ðt Þ ¼ uq fQðt Þg ¼ uq fQ0 gexpðiωt Þ ð7:4:13Þ
Letting zq(t) ¼ Zq exp (iωt) we can solve for each mode response as
T
uq fQ 0 g 1
zq ð t Þ ¼ expðiωt Þ ð7:4:14Þ
ωq2 1 ω2 =ω2q
Equation (7.4.15) shows that the steady-state response becomes infinitely large at the
natural frequencies (resonances) of the system, due to the fact that we have ignored
damping. Each mode is multiplied by a factor of 1=ω2q so the relative contribution to
the steady response is larger for the lower frequency modes.
Consider a multi-degree of freedom system with linear viscous damping but with no
gyroscopic or circulatory forces and no driving forces. Then the small-amplitude
motions around equilibrium satisfy
This system of equations again only has a nontrivial solution if the determinant of the
coefficients is equal to zero which leads to the characteristic equation
det ½K e þ λ½C e þ λ2 ½M e ¼ 0 ð7:5:4Þ
Since the coefficients in the stiffness, damping, and mass matrices are all real, one
can show that for an n degree of freedom system the 2n roots of this equation must
either be real or occur in complex conjugate pairs. For a dissipative system, i.e., one
that has no energy-creating sources, the real parts of all the roots will be negative.
For each root λp there will be a corresponding solution for the vectors {up}. If the
root is real the corresponding vector will be real but for a pair of roots that are
complex conjugates of each other the modal vectors will also be complex conjugates
of each other. For an underdamped system (see Appendix D for the 1-D
underdamped case) without rigid body modes we expect all the roots to be distinct
and complex so the homogeneous solution will be of the form
X
2n
f qg ¼ C p up exp λp t ð7:5:5Þ
p¼1
where I is an n n identity matrix and the zero matrix entry shown is also an n n
matrix. Equation (7.5.6) is in the form
so if we let
7.5 Free Vibrations with Damping 479
we have
X
2n
f xg ¼ Ck fak gexpðλk t Þ ð7:5:10Þ
k¼1
and we can solve for the unknown constants Ck from the 2n initial conditions {x0}
since
X
2n
fx 0 g ¼ C k fak g ð7:5:11Þ
k¼1
or in matrix-vector form where the eigenvectors are in the columns of the matrix [V]:
This is a linear system of equations that we can solve for the constants. Then we can
write the free vibration solution also in matrix-vector form by defining the diagonal
matrix, Λ, as
2 3
expðλ1 t Þ 0 0
6 7
6 0 expðλ2 t Þ 0 7
½Λðt Þ ¼ 6
6
7
7 ð7:5:13Þ
4 5
0 0 expðλ2n t Þ
Although this solution is valid only for underdamped systems without any rigid body
modes, this is typically the case found in the vibrations of many structural systems
since the damping is normally small and rigid body motions are usually not allowed.
This book will not cover more general damped free vibration solutions. For those
cases, see any text on differential equations that covers the eigenvalue problem for a
first-order system of ordinary differential equations in depth.
480 7 Vibrations of Dynamical Systems
The first-order system will then be in the form of Eq. (7.5.6). The script
free_vibs_2D sets up the eigenvalue problem for this first-order system and solves
it with the MATLAB® eig function. These eigenvalues and eigenvectors are used to
find the constants in the homogeneous solution that satisfy the initial conditions and
the solution is then given by Eq. (7.5.14). The script plots the motion of mass m1
from t ¼ 0 to t ¼ 50 s. The default parameters used are m1 ¼ 2 kg, m2 ¼ 4 kg,
k1 ¼ k3¼ 2 N/m, k2¼ 3 N/m, and c1 ¼ c3¼ 0.25 N-s/m, c2¼ 0.5 N-s/m. The initial
conditions are x0 ¼ ½x1 ð0Þ; x2 ð0Þ; x_ 1 ð0Þ; x_ 2 ð0Þ ¼ [1, 0, 0, 0]. The eigenvalues are
λ1,2 ¼ 0.2406 1.7459 i and λ3,4 ¼ 0.0407 0.8014 i so the eigenvalues are
all distinct and occur in complex conjugate pairs with negative real parts, as
discussed previously. Thus, all our solutions are of the form seen in Eq. (7.5.10)
(a)
k2 ( x2 − x1 ) k3 x2
k1 x1
c1 x1 c3 x2
c2 ( x2 − x1 )
(b)
7.5 Free Vibrations with Damping 481
x1
-0.5
0 5 10 15 20 25 30 35 40 45 50
time, t (sec)
so we are justified in obtaining the solution in the script by following the same steps
previously outlined, leading to the underdamped, free vibration solution of
Eq. (7.5.14). Figure 7.11 shows a plot of the displacement of mass m1 versus time.
We can see that the initial behavior starts from the given initial condition and is
rather complex but settles down to a decaying simple oscillation of the mass.
X
n
€zq ðt Þ þ c~qp z_ p ðt Þ þ ω2q zq ðt Þ ¼ 0 ð7:5:17Þ
p¼1
It can be seen that in the damped case the use of the undamped modal coordinates is
not particularly useful since the equations remain coupled. However, if it is possible
to ignore the off-diagonal components of the c~qp matrix, and if we define a damping
c~qq
factor ςq ¼ , the modal equations do decouple and we have
2ωq
482 7 Vibrations of Dynamical Systems
which is identical to the equation for a one degree of freedom damped system. Using
the solution for the underdamped free vibration problem obtained in Appendix D the
solution for each mode can be written as
z_ q ð0Þ þ zq ð0Þςq ωq
zq ðt Þ ¼ exp ςq ωq t zq ð0Þ cos ωqd t þ sin ωqd t ð7:5:20Þ
ωqd
qffiffiffiffiffiffiffiffiffiffiffiffiffi
where ωqd ¼ ωq 1 ς2q is the damped natural frequency. We can write Eq. (7.5.20)
in matrix-vector form by defining two diagonal matrices, (Λ, Λd), where the diagonal
elements are
ς q ωq
Λqq ðt Þ ¼ exp ςq ωq t cos ωqd t þ sin ωqd t
ωqd ðq ¼ 1; 2; . . . ; nÞ
Λqq
d
ðt Þ ¼ exp ςq ωq t sin ωqd t =ωqd
ð7:5:21Þ
so that we have
fzðt Þg ¼ ½Λðt Þfzð0Þg þ Λd ðt Þ fz_ ð0Þg ð7:5:22Þ
-0.5
0 5 10 15 20 25 30 35 40 45 50
time, t
approximate solution were ω1 ¼ 0.8024 rad/s and ω2 ¼ 1.7624 rad/s. The diagonal
damping factors were ς1 ¼ 0.0507 and ς2 ¼ 0.1365. In the exact analysis recall that
the eigenvalues obtained were λ1,2 ¼ 0.2406 1.7459 i and λ3,4 ¼ 0.0407
0.8014 i. From Appendix D we saw that the eigenvalues of a one degree of
freedom system were related to the damping factor and the undamped natural
pffiffiffiffiffiffiffiffiffiffiffiffiffi
frequency by (see Eq. (D.1.12))λ ¼ ςωn iωn 1 ς2 . Thus, if we let λ ¼ a ib
we have
pffiffiffiffiffiffiffiffiffiffiffiffiffi
ςωn ¼ a, ωn 1 ς2 ¼ b ð7:5:25Þ
Using the eigenvalues from the exact analysis and Eq. (7.5.26) we find the same
natural undamped frequencies and damping factors (to four decimal places) used in
the approximate analysis so that one expects that the approximate solution will be
quite accurate in this case. This is verified by plotting the two solutions for the
motion of mass m1 on the same plot, as shown in Fig. 7.12, where there is very little
difference, even in the early time response. There is, of course, no guarantee that
such agreement will always be found but this comparison does show that the
approximate analysis can lead to good results.
we can again consider the case of harmonic driving forces {Q(t)} ¼ {Q0} exp (iωt)
and examine steady-state harmonic solutions of the form {qss(t)} ¼ {A} exp (iωt)
which gives us the resulting equations
½K e þ iω½Ce ω2 ½M e fAg ¼ fQ0 g ð7:6:2Þ
where the transfer matrix [G] (note: this is not the gyroscopic matrix considered
earlier) is given by
1
½G ¼ ½K e þ iω½C e ω2 ½M e ð7:6:4Þ
The elements of [G], Gij(ω), are complex numbers that represent the amplitude and
phase of the steady-state response, (qss)i, in terms of the qi coordinate due to a force
component of unit amplitude, Q0j ¼ 1, with all the other components equal to zero.
This transfer matrix is symmetric because the mass, stiffness, and damping matrix
are symmetric. The general steady-state response is thus
X
n
ðqss Þi ¼ Gij ðωÞQ0 j expðiωt Þ ð7:6:5bÞ
j¼1
The transfer matrix is the direct multi-degree of freedom generalization of the scalar
transfer function found for a one degree of freedom system in Appendix D. It is a
matrix of particular solutions of Eq. (7.6.1) for harmonic driving forces. The steady-
state solution here is also the generalization of the steady-state solution found in
Appendix D for a single degree of freedom system. In general, this matrix of
solutions is the response of the system after all the transient solutions have died
out and so it does not satisfy the initial conditions.
In Appendix D we show that the transfer function for 1-D systems is closely related
to a system impulse response. We have a similar relationship for multi-degree of
7.6 Forced Vibrations with Damping 485
ε
t
freedom systems. Consider, for example a generalized force that has only one
nonzero component, Qj(t), with
(
1=ε 0<t<ε
Q j ðt Þ ¼ ð7:6:6Þ
0 otherwise
where ε is a constant. The graph of this force is shown in Fig. 7.13. If this constant is
a small number then this force component is a large force acting over a small time but
where the integral of the force, called the impulse, is unity. The complete force
vector is then {Q(t)} ¼ [0, 0, . . ., Qj(t), 0, 0, . . .]T. Now suppose we integrate
Eq. (7.6.1) from t ¼ 0 to t ¼ ε and assume zero initial conditions. If we let the
ith component of generalized displacement due to a unit impulse force with only a
k-component be gik(t), then in terms of these components we have
X
n X
n ð
t¼ε
X
n ð
t¼ε
M eji g_ ik jt¼ε
t¼0 þ C eji g_ ik dt þ K eji gik dt ¼ δ jk ðj; k ¼ 1; 2; . . . ; nÞ
i¼1 i¼1 i¼1
t¼0 t¼0
ð7:6:7Þ
where
(
1 j¼k
δ jk ¼ ð7:6:8Þ
0 otherwise
is called the Kronecker delta. These Kronecker delta components are just the
components of the identity matrix, I, which has ones on its diagonal and zeros
elsewhere. If we have zero initial conditions the lower limit seen in Eq. (7.6.7)
vanishes and in the limit as ε ! 0 the two integrals vanish since both the velocity and
displacement integrands must be bounded in that limit, leaving
486 7 Vibrations of Dynamical Systems
X
n
M eji g_ ik ð0þ Þ ¼ δ jk ðj; k ¼ 1; 2; . . . ; nÞ ð7:6:9Þ
i¼1
where g_ jk ð0þ Þ means that these velocities are to be calculated just after the unit
impulse is applied at t ¼ 0. We can write Eq. (7.6.9) in matrix-vector form as
We also have
½gð0þ Þ ¼ 0 ð7:6:11bÞ
(recall from physics that an impulsive force can produce an instantaneous change in
velocity but it cannot produce an instantaneous change in position) so we see the
matrix of unit impulse response solutions, [g(t)], are just the solutions to the initial
value problems specified by Eqs. (7.6.11a) and (7.6.11b). These are just generaliza-
tions, for a multiple degree of freedom system, of the impulse response function for a
one degree of freedom system considered in Appendix D.
Now, consider the problem where one of the external force components, Qj, is a
specified function of time, i.e., Qj ¼ Qj(t). We can consider a small portion of that
force at time t ¼ τ, as shown in Fig. 7.14. That portion acts as an impulsive force of
strength Qj(τ)Δτ at time t ¼ τ. Following the steps outlined in Appendix D for the
one degree of freedom case, since our multi-degree of freedom system is a linear
t
τ Δτ
7.6 Forced Vibrations with Damping 487
time-shift invariant system, we can write the response at the generalized coordinate
qi at time t due to the impulsive force Qj at time τ as qi(t, τ) where
The total response due to all the force components and impulse-like elements of the
total force curve shown in Fig. 7.14 is therefore
XX
n
qi ðt Þ ¼ gij ðt τÞQ j ðτÞΔτ ð7:6:13Þ
τ j¼1
X
n ð
þ1
ð
þ1
This is called a convolution integral. As in the 1-D case we can also use the
properties of the impulse responses and the forces to express the convolution in
alternate forms. For example, for t < 0 gij(t) ¼ 0 and we normally have {Q(t)} ¼ 0 for
t < 0; we can write the convolution as
ðt
fqðt Þg ¼ ½gðt τÞfQðτÞgdτ ð7:6:16Þ
0
ðt
fqðt Þg ¼ ½gðτÞfQðt τÞgdτ ð7:6:17Þ
0
Following the same steps as used in Appendix D for the one degree of freedom case
we can show that these convolution integrals represent particular solutions that
satisfy zero initial conditions. Thus, we merely have to add the free vibration
(homogeneous) solution to the convolution integral to obtain a complete solution
to a forced vibration problem with given initial conditions. For example, if we use
488 7 Vibrations of Dynamical Systems
ðt
fqðt Þg ¼ expðiωt Þ ½gðτÞfQ0 gexpðiωτÞdτ ð7:6:19Þ
1
and at very large times the solution must approach the steady-state solution so from
Eq. (7.6.5a)
0 þ1 1
ð
½GðωÞfQ0 gexpðiωt Þ ¼ @ ½gðτÞexpðiωτÞdτAfQ0 gexpðiωt Þ
1
which gives
ð
þ1
Equation (7.6.20) shows that the steady-state transfer matrix is the Fourier transform
of the matrix of impulse responses. From the inverse Fourier transform then we also
have
ð
þ1
1
½ gð τ Þ ¼ ½GðωÞexpðiωτÞdτ ð7:6:21Þ
2π
1
Appendix E discusses these Fourier transforms and shows how they can be used to
numerically determine the impulse response from the transfer function (and vice
versa) for the one degree of freedom case considered in Appendix D.
7.7 Problems 489
7.7 Problems
P7.1. Consider the cart-rod system shown in Fig. P7.1 where a cart of mass m is
attacked to the vertical wall by a linear spring with spring constant k and a
linear dashpot with damping constant, c. The cart is also pinned to a thin rod
of mass M and length L. A driving force, F(t), also acts on the cart. The
spring is unstretched when x ¼ 0.
(a) Determine the equations of motion for this two degree of freedom
system.
(b) Linearize the equations of motion for small vibrations about the equilib-
rium position x ¼ 0,θ ¼ 0 and obtain the mass, damping, and stiffness
matrices that define this system.
(c) Let m ¼ 2 kg, M ¼ 4 kg, L ¼ 1 m, k ¼ 10 N/m, and c ¼ 0 and set
F(t) ¼ 0. Determine the natural frequencies and natural modes (eigen-
vectors) for this system. Plot the values of these modal vectors and show
graphically the motion system when it is vibrating in these natural
modes.
(d) Show that the matrix V that contains the eigenvectors in its columns
satisfies the orthonormality relations of Eq. (7.3.15b), or, if you have
used an eigenvalue solver that does not normalize the eigenvectors in this
form, normalize your eigenvectors so that they do satisfy these
orthonormality relations.
P7.2. The three carts in Fig. P7.2 are connected via linear springs and linear
dashpots as shown.
(a) Determine the equations of motion for this three degree of freedom
system and obtain the mass, damping, and stiffness matrices that define
this system.
(b) Let m1¼ 1 kg, m2¼ 2 kg, m3¼ 4 kg, k1¼ 20 N/m, k2¼ 40 N/m, k3¼ 10 N/
m, k4¼ 20 N/m,, c1 ¼ c2 ¼ c3 ¼ c4 ¼ 0, and F1 ¼ F2 ¼ F3 ¼ 0.
M, L
θ
490 7 Vibrations of Dynamical Systems
F1 ( t ) F2 ( t ) x2 F3 ( t )
x1 x3
k1 k2 k3 k4
m1 m2 m3
c1 c2 c3 c4
m, l m, l
θ1 θ2
k
X
(d) Show that the matrix V that contains the eigenvectors in its columns
satisfies the orthonormality relations of Eq. (7.3.15b), or, if you have
used an eigenvalue solver that does not normalize the eigenvectors in this
form, normalize your eigenvectors so that they do satisfy these
orthonormality relations.
P7.4. Solve for the free undamped small vibrations of cart-rod system of Fig. P7.1
using modal coordinates for m ¼ 2 kg, M ¼ 4 kg, L ¼ 1 m, c ¼ 0, and
F(t) ¼ 0. At time t ¼ 0 take x(0) ¼ 0, x_ ð0Þ ¼ 0, θ(0)¼ 0, and θ_ ð0Þ ¼ 2 rad/s.
(a) Use the analysis of problem P7.1 to obtain the natural frequencies and
natural modes of the system [be sure to eliminate any small imaginary
components from these numerical results]. From the initial conditions,
determine the corresponding initial conditions for the modal coordinates,
{z(0)} and fz_ ð0Þg(see Eq. (7.3.23b)).
(b) From the initial conditions on the modal coordinates, obtain the
undamped free vibration solutions for the {z(t)} (see Eq. (7.3.21)) for a
time interval from t ¼ 0 to t ¼ 15 s.
(c) Use the solutions for the modal coordinates obtained in part (b) to obtain
the corresponding solutions for the undamped free vibrations in terms of
the original coordinates (x(t), θ(t)) and plot these solutions for the orig-
inal coordinates versus time.
P7.5. Solve for the free undamped vibrations of the three degree of freedom system
shown in Fig. P7.2. Let m1¼ 1 kg, m2¼ 2 kg, m3¼ 4 kg, k1¼ 20 N/m,
k2¼ 40 N/m, k3¼ 10 N/m, k4¼ 20 N/m, c1 ¼ c2 ¼ c3 ¼ c4 ¼ 0, and
F1 ¼ F2 ¼ F3 ¼ 0. At time t ¼ 0 take x1(0)¼ 0, x_ 1 ð0Þ ¼ 0, x2(0)¼ 0, x_ 2 ð0Þ
¼ 0, x3(0)¼ 0, and x_ 3 ð0Þ ¼ 2 m/s.
(a) Use the analysis of problem P7.2 to obtain the natural frequencies and
natural modes of the system [be sure to eliminate any small imaginary
components from these numerical results]. From the initial conditions,
determine the corresponding initial conditions for the modal coordinates,
{z(0)}, fz_ ð0Þg(see Eq. (7.3.23b)).
(b) From the initial conditions on the modal coordinates, obtain the
undamped free vibration solutions for the {z(t)} (see Eq. (7.3.21)) for a
time interval from t ¼ 0 to t ¼ 10 s.
(c) Use the solutions for the modal coordinates obtained in part (b) to obtain
the corresponding solutions for the undamped free vibrations in terms of
the original coordinates (x(t), θ(t)) and plot these solutions for the orig-
inal coordinates versus time.
P7.6. Solve for the free undamped small vibrations of the two-pendulum system
shown in Fig. P7.3. Let m ¼ 2 kg, l ¼ 1.5 m, and k ¼ 10 N/m. At time t ¼ 0,
take θ1(0) ¼ 0, θ_ 1 ð0Þ ¼ 0, θ2(0) ¼ 0.2 rad, and θ_ 2 ð0Þ ¼ 0.
492 7 Vibrations of Dynamical Systems
(a) Use the analysis of problem P7.3 to obtain the natural frequencies and
natural modes of the system [be sure to eliminate any small imaginary
components from these numerical results]. From the initial conditions,
determine the corresponding initial conditions for the modal coordinates,
{z(0)}, fz_ ð0Þg(see Eq. (7.3.23b)).
(b) From the initial conditions on the modal coordinates, obtain the
undamped free vibration solutions for the {z(t)} (see Eq. (7.3.21)) for a
time interval from t ¼ 0 to t ¼ 20 s.
(c) Use the solutions for the modal coordinates obtained in part (b) to obtain
the corresponding solutions for the undamped free vibrations in terms of
the original coordinates (θ1(t), θ2(t)) and plot these solutions for the
original coordinates versus time.
P7.7. Consider the forced undamped vibrations of the cart-rod system of Fig. P7.1
where there is a harmonic driving force F(t) ¼ F0 exp (iωt). Since the force is
always present any small damping in a real system will result eventually in a
steady-state motion of the system given by {qss(t)} ¼ {A} exp (iωt), where
{qss(t)} ¼ [xss(t), θss(t)]T and {A} is the steady-state amplitude. We can write
this steady-state amplitude in terms of the natural frequencies and natural
modes as a function of the driving frequency, ω (see Eq. (7.4.15)). Taking
F0 ¼ 1 and using the other parameters of problem P7.1, plot the components
of the steady-state amplitude versus frequency for a frequency from zero to
1.5 times the largest natural frequency. Note that this steady-state amplitude
will go to infinity at the natural frequencies since there is no damping.
P7.8. Consider the forced undamped vibrations of the three degree of freedom
system shown in Fig. P7.2 where there are harmonic driving forces
Fn(t) ¼ F0n exp (iωt) (n ¼ 1, 2, 3). Since these forces are always present
any small damping in this system will result eventually in a steady-state
motion of the system given by {qss(t)} ¼ {A} exp (iωt), where {q(t)} ¼
[x1;ss(t), x2;ss(t), x3;ss]T and {A} is the steady-state amplitude. We can write
this steady-state amplitude in terms of the natural frequencies and natural
modes as a function of the driving frequency, ω (see Eq. (7.4.15)). Taking
F01 ¼ 0,F02 ¼ 1,F03 ¼ 0 and using the other parameters of problem P7.2,
plot the components of the steady-state amplitude versus frequency for a
frequency from zero to 1.5 times the largest natural frequency. Note that this
steady-state amplitude will go to infinity at the natural frequencies since there
is no damping.
P7.9. Show that if the spring and dashpot of the cart-rod system of Fig. P7.1 are
removed, then this system can have a natural frequency of zero. Use the
corresponding zero-frequency eigenvector to describe the motion of the
system with the same parameters for m, M, and L (k ¼ 0, c ¼ 0, F(t) ¼ 0)
found in problem P7.1. Show graphically the system in this rigid body mode.
P7.10. Three identical thin rods, each of mass m and length l, are connected by two
identical linear springs with spring constant k, as shown in Fig. P7.4.
7.7 Problems 493
θ1 θ2 θ3
m, l m, l m, l
k k
X
(a) Determine the linearized equations of motion for this two degree of
freedom system about the equilibrium position θ1 ¼ θ2 ¼ 0 and obtain
the mass and stiffness matrices that define this system. Assume that the
springs are unstretched when the bars are vertical; that is, both
unstretched spring lengths are the distance d.
(b) Let m ¼ 2 kg, l ¼ 1.5 m, and k ¼ 10 N/m. Determine the natural
frequencies and natural modes (eigenvectors) for this system. Plot the
values of these modal vectors and show graphically the system when it is
vibrating in these natural modes.
(c) Show that the matrix V that contains the eigenvectors in its columns
satisfies the orthonormality relations of Eq. (7.3.15b), or, if you have
used an eigenvalue solver that does not normalize the eigenvectors in this
form, normalize your eigenvectors so that they do satisfy these
orthonormality relations.
P7.11. Consider the forced undamped vibrations of the cart-rod system of Fig. P7.1
when there is a transient driving force, F(t). Use the convolution integral
solution of Eq. (7.4.4) to obtain the solution for (x(t), θ(t)). Let the force be
given as
(
F0 0 t t0
F ðt Þ ¼ ðP7:1Þ
0 otherwise
and take F0 ¼ 1 N, t0 ¼ 2 s. Note that for this force we can do the convolution
integral analytically. Use the other parameters and initial conditions of
problem P7.4 and plot the solution over a time span 0 t 5t0.
P7.12. Consider the forced undamped vibrations of the three degree of freedom
system shown in Fig. P7.2 when there is a transient driving force, F3(t), given
by the same form of Eq. (P7.1) and the other forces F1 ¼ F2 ¼ 0. Use the
convolution integral solution of Eq. (7.4.4) with F0 ¼ 1 N, t0 ¼ 2 s to obtain
the solution for (x1(t), x2(t), x3(t)). Note that for this force we can do the
494 7 Vibrations of Dynamical Systems
convolution integral analytically. Use the other parameters and initial con-
ditions of problem P7.5 and plot the solution over a time span 0 t 5t0.
P7.13. Solve for the free underdamped vibrations of the three degree of freedom
system shown in Fig. P7.2. Let m1 ¼ 3 kg, m2 ¼ 2 kg, m3 ¼ 3 kg, k1 ¼ 2 N/m,
k2 ¼ 4 N/m, k3 ¼ 4 N/m, k2 ¼ 2 N/m, c1 ¼ 1.0 N-s/m, c2 ¼ 0.5 N-s/m,
c3 ¼ 2 N-s/m, and c4 ¼ 1.0 N-s/m.
(a) Show that the eigenvalues for the system of first-order differential
equations that describe this problem demonstrate that this is an
underdamped system with three distinct natural frequencies.
(b) Let the initial conditions be x1(0)¼ 1.0 m, x2(0) ¼ x3(0) ¼ 0, and x_ 1 ð0Þ
¼ x_ 2 ð0Þ ¼ x_ 3 ð0Þ ¼ 0 and solve for the free vibrations of this system
following the same steps outlined in Simulation 7.2. Plot the motion of
mass m1 from t ¼ 0 to t ¼ 40 s.
P7.14. Solve for the free underdamped vibrations of the three degree of freedom
system shown in Fig. P7.2 by using the approximate analysis of Simulation
7.3. Use the same parameters given in problem P7.13 and compare the
motion of mass m1 obtained in that problem with the approximate solution
obtained here.
Reference
The planar problems examined in Chap. 5 do not describe a number of the dynamical
behaviors found in 3-D problems such as gyroscopic effects. In this chapter we
describe the spatial dynamics of rigid bodies and the numerical solutions of the
equations of motion using both Euler angles and Euler parameters. We again
examine both a Newton-Euler approach and Lagrange’s equations. There are
many other methods and issues that could be considered for 3-D problems that we
will leave to more advanced treatments of dynamics.
The equations of motion of rigid bodies for general three-dimensional motion are
more complex than the planar motion cases considered in Chap. 5. As seen in
Chap. 4, most of this complexity arises because of the nature of general rotations.
The rotational motion part of the Newton-Euler equations involves changes in
angular momentum so in this section we obtain expressions for the angular momen-
tum that are generalizations of the system of particles case considered in Chap. 3.
If we have a point A that moves with a continuous rigid body (Fig. 8.1) the angular
ðnÞ
momentum, dLA , about that point for a mass element, dm ¼ ρdV, where ρ is the
mass density and dV is a volume element, is
x(A )
n
O X
Using the matrix-vector expression for the velocity developed in Chap. 4, Eq. (4.8.
16a), and replacing the cross product in Eq. (8.1.1) with multiplication by a skew
ðnÞ
symmetric matrix, XP=A , we have
0 1 0 1
ð ð T
ðnÞ
¼@ ρΧP=A dV AvA
ðnÞ ðnÞ
þ@
ðnÞ ðnÞ
dV AI ωB
ðnÞ
LA ρΧP=A ΧP=A ð8:1:2Þ
Vn Vn
ðnÞ
The 3 3 matrix IA given by
ð T
ðnÞ ðnÞ ðnÞ
IA ¼ ρΧP=A ΧP=A dV ð8:1:3Þ
Vn
is the moment of inertia matrix with components relative to the inertial (X, Y, Z ) axes
given by
2 ðnÞ ðnÞ ðnÞ
3
I I XY I XZ
ðnÞ 6 XX ðnÞ 7
IA ¼ 4 I ðYX
nÞ ðnÞ
I YY I YZ 5 ð8:1:4Þ
ðnÞ ðnÞ ðnÞ
I ZX I ZY I ZZ
8.1 Angular Momentum 497
where
ð 2 2
ðnÞ ðnÞ ðnÞ
I XX ¼ ρ Y P=A þ Z P=A dV
ð
Vn
2 2
ðnÞ ðnÞ ðnÞ
I YY ¼ ρ X P=A þ Z P=A dV
ð
Vn
2 2
ðnÞ ðnÞ ðnÞ
I ZZ ¼ ρ X P=A þ Y P=A dV
Vn ð ð8:1:5Þ
ðnÞ ðnÞ ðnÞ ðnÞ
I XY ¼ I YX ¼ ρX P=A Y P=A dV
Vðn
ðnÞ ðnÞ ðnÞ ðnÞ
I XZ ¼ I ZX ¼ ρX P=A Z P=A dV
Vðn
ðnÞ ðnÞ ðnÞ ðnÞ
I YZ ¼ I ZY ¼ ρY P=A Z P=A dV
Vn
These moments of inertia integrals are the counterparts of the sums seen for a rigidly
constrained system of particles in Chap. 3. Appendix B discusses moments and
products of inertia and gives a table of their values for some simple shapes. In terms
of the moment of inertia matrix the angular momentum expressions become
0 1
ð
ðnÞ
¼@ ρΧP=A dV AvA
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
LA þ IA I ωB ¼ mðnÞ xC=A vA þ IA I ωB ð8:1:6Þ
Vn
If point A is chosen to be the center of mass, C, then the cross product term vanishes
so that the angular momentum is instead
Because the moment of inertia components are measured in a fixed inertial system
their values will change during the motion. However, if we compute the angular
T
momentum in body-fixed coordinates, L ¼ RðnÞ L , using Eq. (4.8.16b) we
ðnÞ ðnÞ
A A
find
0 1 0 1
ð ð T
LA ¼ @ ρΧP=A dV AvA þ @ ρΧP=A ΧP=A
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
dV AI ωB
ðnÞ
ð8:1:8Þ
Vn Vn
498 8 General Spatial Dynamics of Rigid Bodies
ð
ðnÞ T
where now the moment of inertia matrix IA ¼
ðnÞ ðnÞ
ρΧP=A ΧP=A dV has the
Vn
components
ð
ðnÞ 2 ðnÞ 2
IðxxnÞ ¼ ρ yP=A þ zP=A dV
ð
Vn
ðnÞ 2 ðnÞ 2
IðyynÞ ¼ ρ xP=A þ zP=A dV
ð
Vn
2 2
ðnÞ ðnÞ
IðzznÞ ¼ ρ xP=A þ yP=A dV
Vn ð ð8:1:9Þ
ðnÞ ðnÞ
IðxynÞ ¼ IðyxnÞ ¼ xP=A yP=A dV
ρ
Vðn
ðnÞ ðnÞ
IðxznÞ ¼ IðzxnÞ ¼ ρ
xP=A zP=A dV
Vðn
ðnÞ ðnÞ
IðyznÞ ¼ IðzynÞ ¼ ρ
yP=A zP=A dV
Vn
which are all constants during the motion. When point A is again at the center of
mass we have
LC ¼ IC I ωB
ðnÞ ðnÞ ðnÞ
ð8:1:10Þ
In Appendix B we discuss the parallel axis theorem for transforming the moment of
inertia matrix with respect to a set of axes at the center of mass point to a set of
parallel axes through a separate point. The parallel axis theorem is particularly easy
ðnÞ ðnÞ ðnÞ
to obtain in terms of the matrix-vector forms seen here. We let xP=A ¼ xC=A þ xP=C .
We have
ð T ð h ih iT
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
IA ¼ ρXP=A XP=A dV ¼ ρ XC=A þ XP=C XC=A þ XP=C dV
Vn Vn 0 1
T ð T ð T
¼ mðnÞ XC=A XC=A þ XC=A ρ XP=C dV þ @ ρXP=C dV A XC=A
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
ð
Vn Vn
ðnÞ ðnÞ T
þ ρXP=C XP=C dV
Vn
ð8:1:11Þ
8.1 Angular Momentum 499
But the two middle terms vanish since the coordinates in those integrals are all
measured from the center of mass and we recognize the last term as just the moment
of inertia matrix with respect to the center of mass, so we have finally
T
ðnÞ ðnÞ ðnÞ
IA ¼ ICn þ mðnÞ XC=A XC=A ð8:1:12Þ
which is just the parallel axis theorem of Appendix B in matrix form. The “shifting”
matrix in Eq. (8.1.12) is just
2 2 2 3
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
yC=A þ zC=A xC=A yC=A xC=A zC=A
6 2 2 7
ðnÞ ðnÞ T 6 7
XC=A XC=A ¼ 66
ðnÞ ðnÞ
xC=A yC=A
ðnÞ
xC=A þ zC=A
ðnÞ ðnÞ ðnÞ
yC=A zC=A 7
7
4 2 2 5
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
xC=A zC=A yC=A zC=A xC=A þ yC=A
ð8:1:13Þ
If we want to compute the angular momentum about a general moving point B that
may or may not be moving with the body (Fig. 8.2) then
x(P /B)
n
x(P /)C
n
( n)
xP
C
x(C /)B
n
Y B
x(B )
n
O X
Z
500 8 General Spatial Dynamics of Rigid Bodies
ð
ðnÞ ðnÞ ðnÞ
LB ¼ ρxP=B x_ P dV ð8:1:14Þ
Vn
ðnÞ
The first integral is mðnÞ x_ C , a linear momentum term, and the second integral is just
the angular momentum about the center of mass point, C, so
Note that Eq. (8.1.16) is a general relationship since point B can be any moving point
and the body need not be a rigid body. It is the generalization, for a continuous body,
of the angular momentum expression for a system of particles, Eq. (3.2.21), in
Chap. 3.
When using Lagrange’s equation to obtain the equations of motion we need to obtain
general expressions for the kinetic energy of a rigid body as the kinetic energy is one
of the key parameters that generate the equations of motion in generalized coordi-
nates. In this section we derive the kinetic energy expressions.
From our discussion of particle motion we know that if an element of mass
dm ¼ ρdV of a continuous rigid body is treated as a particle it has a kinetic energy,
dT(n), given by
1 ðnÞ ðnÞ
dT ðnÞ ¼ dmvP vP
2
ð T T T T
1 ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
T ðnÞ ¼ ρ vA v A vA XP=A I ωB I ωB XP=A vA
2
Vn ð8:2:2Þ
T T
ðnÞ ðnÞ ðnÞ ðnÞ
þ I ωB XP=A XP=A I ωB dV
which reduces to
0 1
T ð
1 ðnÞ ðnÞ 1 ðnÞ @
T ðnÞ ðnÞ
T ðnÞ¼ mðnÞ vA vA vA ρXP=A dV AI ωB
2 2
Vn
0 1 0 1
ð ð
1 ðnÞ T @ ðnÞ T A ðnÞ 1 ðnÞ T @ ðnÞ T ðnÞ
ρ XP=A XP=A dV AI ωB
ðnÞ
I ωB ρ XP=A dV vA þ I ωB
2 2
Vn Vn
ð8:2:3Þ
so that
1 T 1 T 1
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ T ðnÞ T ðnÞ
T ðnÞ ¼ mðnÞ vA vA mðnÞ vA XC=A I ωB mðnÞ I ωB XC=A vA
2 2 2
1 ðnÞ T ðnÞ ðnÞ
þ I ωB IA I ωB
2
ð8:2:6Þ
If we combine the velocity of point A and the angular velocity into a single-column
h i
ðnÞ ðnÞ T
vector q_ ðnÞ ¼ vA ; I ωB then we can write the total kinetic energy as
2 ðnÞ
3
mðnÞ 1 mðnÞ XC=A
ðnÞ ¼4
ðnÞ T ðnÞ
5 ð8:2:8Þ
mðnÞ XC=A IA
where 1 is the 3 3 identity matrix. However, note that q_ ðnÞ is not really a
generalized velocity because the angular velocity vector is not the derivative of a
corresponding rotational vector but instead is related to derivatives of the rotation
matrix or derivatives of angular parameters such as the Euler angles. Thus, when we
use Euler angles or other angular variables such as Euler parameters the associated
mass matrix will be different from Eq. (8.2.8).
As with the angular momentum, if we take point A to be the center of mass point, C,
the kinetic energy expression simplifies. We have
so the kinetic energy is the kinetic energy due to the translation of the body of total
mass m with the velocity of the center of mass plus the rotational kinetic energy
about the center of mass. The mass matrix then reduces to
mðnÞ 1 0
ðnÞ ¼ ðnÞ ð8:2:10Þ
0 IC
As we will see in the next section the Newton-Euler equations for a continuous rigid
body can be written as
ðnÞ
p_ C ¼ FðnÞ
ð8:3:1Þ
L_
ðnÞ ðnÞ
C ¼M C
ðnÞ ðnÞ
where pC ¼ mðnÞ x_ C is a linear momentum associated with the motion of the center
ðnÞ
of mass and LC is the angular momentum with respect to the center of mass. These
are identical to the equations of motion found for a system of rigidly constrained
particles so that the impulse-momentum principles are also identical, giving
8.3 Impulse-Momentum and Work-Energy Principles for a Rigid Body 503
ðt2
ðnÞ ðnÞ ðnÞ
ΔpC ¼ pC ðt 2 Þ p C ðt 1 Þ ¼ FðnÞ ðt Þdt
t1
ðt2 ð8:3:2Þ
ðnÞ ðnÞ ðnÞ ðnÞ
Δ LC ¼ LC ðt 2 Þ L C ðt 1 Þ ¼ MC ðt Þdt
t1
These momentum principles are useful for dealing with the collisions of rigid bodies
of the same type as discussed in Chap. 3 for systems of particles and in analyzing
systems where certain momenta are conserved. For rigid bodies, conservation of
generalized momenta, as discussed in Chap. 2 for particles, also is useful for
analyzing rigid body motions. Recall that Lagrange’s equations for a problem
where all the forces were derivable from a potential are given by
d ∂L ∂L
¼0 ð8:3:3Þ
dt ∂q_ k ∂qk
and the generalized momenta, pK, associated with that coordinate, defined as
∂L ∂T
pK ¼ ¼ ð8:3:5Þ
∂q_ K ∂q_ K
are conserved. We can replace the Lagrangian, L ¼ T -V, with the kinetic energy, T,
in Eq. (8.3.5) since the potential energy is typically not dependent on the generalized
velocities. When conservation of momenta exists in rigid body problems this
information can be used to analyze and understand the nature of the motion.
Work-energy principles for the three-dimensional motion of a rigid body are also
closely related to those principles already discussed for systems of particles and for
rigid bodies in plane motion. For example, consider a rigid body acted upon by a set
of N forces, as shown in Fig. 8.3. The differential work, dW(n), done by these forces
is
X
N
ðnÞ ðnÞ
dW ðnÞ ¼ F j dx j ð8:3:6Þ
j¼1
F3(
Fig. 8.3 A rigid body acted n)
F (j
n)
upon by a set of forces
(n)
(n )
x j /C
x(jn ) C F2( n )
Y
x(Cn )
F1(
n)
O X
dW ðnÞ X N
ðnÞ ðnÞ
¼ Fj vj ð8:3:7Þ
dt j¼1
But we can relate the velocities at where the forces act to the velocity of the center of
mass through the relative velocity equation for the rigid body, i.e.,
dW ðnÞ X N XN
ðnÞ ðnÞ ðnÞ ðnÞ
¼ F j vC þ F j ωðnÞ x j=C
dt j¼1 j¼1
X N ð8:3:9Þ
ðnÞ ðnÞ ðnÞ
¼ FðnÞ vC þ ωðnÞ x j=C F j
j¼1
ðnÞ ðnÞ ðnÞ
¼F vC þ MC ωðnÞ
where use was made of the vector identity a (b c) ¼ b (c a) and we define the
net external moment with respect to the center of mass, acting on the rigid body, as
ðnÞ
X
N
ðnÞ ðnÞ
MC ¼ x j=C F j ð8:3:10Þ
j¼1
When the forces acting on the rigid body are derivable from a potential, then
8.4 Newton-Euler Equations of Motion 505
ðnÞ ðnÞ
dW ðnÞ XN
ðnÞ dx j
XN dV
j dV ðnÞ
¼ —V j ¼ ¼ ð8:3:11Þ
dt j¼1
dt j¼1
dt dt
where V(n) is the total potential energy of all the forces. The kinetic energy expres-
sion can also be written as (see Eq. (8.2.9))
Differentiating the translational kinetic energy term on time is easy. For the rota-
tional part we can write the term in principal body-fixed coordinates, where the
moment of inertia matrix is a constant diagonal matrix and we find
1 d ðnÞ ðnÞ 2 ðnÞ ðnÞ 2 ðnÞ ðnÞ 2
I C1 ω1 þ I C2 ω2 þ I C3 ω3
2 dt
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ _ ðnÞ ð8:3:13Þ
¼ IC1 ω1 ω_ 1 þ IC2 ω2 ω_ 2 þ IC2 ω3 ω_ 3 ¼ ωðnÞ L C
¼ ωðnÞ L_ C
ðnÞ
dT ðnÞ
¼ mðnÞ vC v_ C þ ωðnÞ L_ C
ðnÞ ðnÞ ðnÞ
dt
ðnÞ ðnÞ
¼ vC FðnÞ þ ωðnÞ MC ð8:3:14Þ
ðnÞ
dW
¼
dt
showing that the time rate of change of the work done (power) is equal to the time
rate of change of the kinetic energy of the rigid body. When the forces are derivable
from a potential it then follows that
dE ðnÞ d T ðnÞ þ V ðnÞ
¼ ¼0 ð8:3:15Þ
dt dt
We will first derive the governing equations for the case where the moment equation
is taken with respect to a general point B. Point B can be moving and it is not
506 8 General Spatial Dynamics of Rigid Bodies
necessarily attached to the body (see Fig. 8.2). Following the discussion in Chap. 5,
for a continuous body we have
ð
ðnÞ
ρ€xP dV ¼ FðnÞ
Vðn
h i ð8:4:1Þ
ðnÞ ðnÞ ðnÞ
ρ xP=B €xP dV ¼ MB
Vn
where x€ðPnÞ is the acceleration (in an inertial system) of an arbitrary point P in the
ðnÞ ðnÞ
body, xP=B is the position of P relative to the reference point B, and F(n) and MB are
the net external force and moment about point B acting on the body. For the force
equation we will relate the motion of point P to the motion of the center of mass, C,
ðnÞ ðnÞ ðnÞ
through xP ¼ xC þ xP=C , giving
ð ð
€xðCnÞ ρdV þ
ðnÞ
ρ€xP=C dV ¼ FðnÞ ð8:4:2Þ
Vn Vn
But the second integral on the left side of Eq. (8.2.2) vanishes since the integral of
ðnÞ
the relative position vector xP=C or any of its derivatives vanishes (see the
corresponding case for the system of particles treated in Chap. 3, Eq. (3.2.18)) so
we have
ðnÞ
mðnÞ €xC ¼ FðnÞ ð8:4:3Þ
which is just the equation of motion of the center of mass. Now, consider the
ðnÞ ðnÞ ðnÞ
moment equation in Eq. (8.4.1) and let xP=B ¼ xC=B þ xP=C . Then
ð ð
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
MB ¼ xC=B ρ€xP dV þ ρxP=C €xP dV ð8:4:4Þ
Vn Vn
The first integral in Eq. (8.4.4) is just the mass times the acceleration of the center of
mass and the second integral can be expressed as the sum of two integrals, i.e.,
0 1
ð ð
ðnÞ ðnÞ ðnÞ d ðnÞ ðnÞ ðnÞ ðnÞ
MB ¼ mðnÞ xC=B €xC þ @ ρxP=C x_ P dV A ρx_ P=C x_ P dV ð8:4:5Þ
dt
Vn Vn
The first integral in Eq. (8.4.5) can be recognized as the derivative of the angular
momentum of the body with respect to the center of mass. Letting
8.4 Newton-Euler Equations of Motion 507
If we differentiate Eq. (8.1.16), which expresses the angular momentum with respect
to the center of mass to the angular momentum about a general point, we have
MB ¼ L_ B mðnÞ x_ C=B x_ C
ðnÞ ðnÞ ðnÞ ðnÞ
ð8:4:8Þ
¼ L_
ðnÞ ðnÞ ðnÞ
þ mðnÞ x_ x_
B B C
Now, consider the equations of motion for a continuous rigid body labeled (n) as
shown in Fig. 8.4 and where the moments are taken with respect to a point A that
moves with the rigid body. In this case Eq. (8.4.1) becomes
ð
ðnÞ
ρ€xP dV ¼ FðnÞ
Vðn
h i ð8:4:9Þ
ðnÞ ðnÞ ðnÞ
ρ xP=A €xP dV ¼ MA
Vn
ðnÞ
where €
xP is the acceleration (in an inertial system) of an arbitrary point P in the rigid
ðnÞ
body, xP=A is the position of P relative to a reference point A that moves with the rigid
ðnÞ
body, and F(n) and MA are the net external force and moment about point A acting
508 8 General Spatial Dynamics of Rigid Bodies
xA
EY
EZ O EX
X
on the rigid body. Let’s consider the force equation first. Placing Eq. (4.9.8) (the
acceleration relationship between points in a rigid body) into that equation we find
0 1
ð ð ð
ðnÞ
ρdV @ ρXP=A dV AI αB þ I ΩB I ΩB
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
€
xA ρxP=A dV ¼ FðnÞ ð8:4:10Þ
Vn Vn Vn
ðnÞ ðnÞ
where aA ¼ €xA is the acceleration of A as measured in the inertial system. You may
have seen this equation written in a purely vector form. Replacing the skew
symmetric matrices with cross products we have
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
mðnÞ aA þ mðnÞ I αB xC=A þ mðnÞ I ωB I ωB xC=A ¼ FðnÞ ð8:4:12Þ
For point A at the center of mass point C all of these forms reduce, as before, to
simply
ðnÞ
mðnÞ aC ¼ FðnÞ ð8:4:13Þ
Now, consider the moment equation. From the relative acceleration equation,
Eq. (4.9.8), and the moment equation in Eq. (8.4.9) we have
8.4 Newton-Euler Equations of Motion 509
0 1
ð ð ð
@ ρxðnÞ dV A €xðnÞ ðnÞ ðnÞ
ρxP=A XP=A I αB dV þ
ðnÞ ðnÞ
ρxP=A
P=A A
Vn Vn Vn
ðnÞ ðnÞ ðnÞ ðnÞ
I ΩB I ΩB xP=A dV¼ MA ð8:4:14Þ
Vn Vn
ðnÞ ðnÞ ðnÞ ðnÞ
I ΩB I ΩB xP=A dV¼ MA ð8:4:15Þ
Consider the integrand of third term on the left side of Eq. (8.4.15). It can be written
in purely vector terms as
ðnÞ ðnÞ ðnÞ ðnÞ
J ¼ ρxP=A I ωB I ωB xP=A
0 1
ð T
mðnÞ xC=A €xA þ @ ρ XP=A XP=A dV AI αB
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
0Vn 1 ð8:4:16Þ
ð T
þI ωB @ ρ XP=A XP=A dV AI ωB ¼ MA
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
Vn
ðnÞ
where we can recognize the integrals as moment of inertia matrices, IA , giving the
moment equation as
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
mðnÞ xC=A aA þ IA I αB þ I ωB IA I ωB ¼ MA ð8:4:17aÞ
Equations (8.4.17a) and (8.4.17b) are moment equations about any point A that
moves with the rigid body. However, the moment equation is seldom used in this
form in terms of inertial coordinates because the moment of inertia matrix is then
time dependent. Instead, if the moment equation is written in body-fixed coordinates
we have the equivalent moment equations
mðnÞ xC=A aA þ IA I αB þ I ωB IA I ωB ¼ M
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
A ð8:4:18aÞ
Using moments about a general point moving with the rigid body makes the moment
equation particularly complex. In many applications choosing A to be the center of
mass point C is convenient, where Eq. (8.4.18b) becomes
IC I αB þ I ΩB IC I ωB ¼ M
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
C ð8:4:19Þ
which can be solved in conjunction with the force equation, Eq. (8.4.13).In other
cases choosing point A to be a fixed point O about which the rigid body is rotating is
a good choice, leading to the moment equation
IO I αB þ I ΩB IO I ωB ¼ M
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
O ð8:4:20Þ
which can again be solved in conjunction with Eq. (8.4.13). Thus, when A is either
the center of mass or a fixed point about which the body rotates, the moment
equation is
8.4 Newton-Euler Equations of Motion 511
IP I αB þ I ΩB IP I ωB ¼ M
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
P ðP ¼ C; OÞ ð8:4:21Þ
Because of the presence of the inertia matrix, the terms in Eq. (8.4.21) are still
complicated. As a consequence, many applications choose the body-fixed axes to be
principal axes of the rigid body where the moment of inertia matrix is diagonal. If we
let
the moments of inertia about a set of principal body-fixed axes x ;
x ;
x
1 2 3 be
ð Þ ð Þ ð Þ
IP;1 ; IP;2 ; IP;3 and let the corresponding body-fixed angular velocity and angular
n n n
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
acceleration components be ω1 ; ω2 ; ω3 and α1 ; α2 ; α3 , respectively,
then the moment equations are
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðP;1
nÞ
IP;1 α1 IP;2 IP;3 ω2 ω3 ¼ M
ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ ðnÞ
IP;2 α2 IP;3 IP;1 ω1 ω3 ¼ M P;2 ðP ¼ C; OÞ ð8:4:22Þ
ð Þ ð Þ ð Þ ð Þ ð Þ ð Þ ðP;3
nÞ
IP;3 α3 IP;1 IP;2 ω1 ω2 ¼ M
n n n n n n
Equations (8.4.22) are the form of the moment equation commonly called Euler’s
equations. Together with Eq. (8.4.13) we have the Newton-Euler equations for a
rigid body. Although Euler’s equations cannot be directly integrated to obtain the
rotations of the rigid body they can be part of the integration process, as we will see
shortly, and they can be used to deduce important properties of the motion. They can
be expressed in terms of generalized coordinates such as Euler angles or any other
set of parameters that does allow them to be integrated to determine the motion of the
rigid body. Before illustrating the use of Euler’s equations we should highlight the
meaning of the angular acceleration terms in Eqs. (8.4.21) and (8.4.22) and how they
ðnÞ
are calculated. If we have the angular velocity of the body, I ωB , measured in inertial
frame components, then we can differentiate that angular velocity to obtain the
ðnÞ
angular acceleration, I αB , and also measure it in an inertial frame. Following the
discussion in Chap. 4 we can make explicit both the frame in which the time
derivative is taken and the frame in which the resulting vector is computed by
writing
" #
h i I ðnÞ
d I ωB
ðnÞ
I αB ¼ ð8:4:23Þ
I dt
I
which we have generally written in the equivalent but less explicit form
ðnÞ ðnÞ
I αB ¼ I ω_ B ð8:4:24Þ
But we can also transform this angular acceleration to body-fixed coordinates with
the rotation matrix via
512 8 General Spatial Dynamics of Rigid Bodies
T
ðnÞ ðnÞ ðnÞ
α
I B ¼ R I αB ð8:4:25Þ
and this is the angular acceleration term appearing in Eqs. (8.4.21) and (8.4.22).
However, this is not the most convenient way to compute this acceleration term. We
would like instead to do the computation directly in body-fixed coordinates. This is
possible since recall from Chap. 4 that we can relate the time derivative taken in one
frame to the derivative taken in another frame with the transport theorem. In this
case, we can write that theorem in the inertial frame as
" # " #
ðnÞ ðnÞ h i
I
d I ωB B
d I ωB ðnÞ ðnÞ
dt ¼ dt þ I ωB I ωB
I
I I
" # ð8:4:26Þ
ðnÞ
B
d I ωB
¼ dt
I
since the cross product term vanishes. But the derivative of the angular velocity
components in the body-fixed frame is just what we have called I ω_ B and
ðnÞ
transforming those derivatives to the inertial frame is done with the rotation matrix
as RðnÞ I ω_ B so Eq. (8.4.26) can be written as
ðnÞ
" #
ðnÞ
ðnÞ
I
d I ωB
¼ RðnÞ I ω_ B
ðnÞ
I αB ð8:4:27Þ
dt
I
ðnÞ
¼ I ω_ B
ðnÞ
I αB ð8:4:28Þ
M M3 x1
F3 F1
M1
X θ
θ O O
φ F2 x′
x′ θ L
y′ y′, x2
φ L
Y
φ R
Z , z′ x3
mg
(a) (b)
Fig. 8.5 (a) A thin disk attached to a bar of negligible mass and that swings about a pinned support
which is driven by a given moment, M, and (b) the free body diagram of the assembly showing the
constraint forces and moments in a set of body-fixed axes
support is pinned to the end of the bar at O. If the disk is allowed to rotate about the
bar axis then this assembly will act as a gyro-pendulum. In this example, however,
we will assume that the disk is rigidly fixed to the bar so that there are no gyroscopic
effects present. Thus, the fixed gyro-pendulum is essentially a spherical pendulum.
A free body diagram of the bar is shown in Fig. 8.5b. There are constraint forces
along all three body-fixed axes x1 ; x2 ; x3 but only constraint moments acting along
the x1 ; x3 axes since the x2-axis is always aligned with the axis of the smooth pin at
O, about which the bar is free to rotate. It is convenient to take moments
about point
O because then the constraint forces are eliminated. The x1 ; x2 ; x3 axes are principal
axes for the bar/disk. From Appendix B and the use of the parallel axis theorem, the
moments of inertia are
mR2 R2
IO;3 ¼ , I O;1 ¼ IO;2 ¼ m L2 þ
2 4
Since the pinned support prevents rotating about the x3-axis (which is the reason for
the existence of the constraint moment, M3) there are only two angular degrees of
freedom (ϕ, θ) for the system. These are like the 3-2 components of a set of 3-2-3
Euler angles but where the final 3 rotation is absent. The angular velocity of the bar
in body-fixed coordinates is (dropping the (n) superscript since there is only one
body)
I ωB ¼ ϕ_ EZ þ θ_ e2
ð8:5:1Þ
¼ ϕ_ ð cos θe3 sin θe1 Þ þ θ_ e2
514 8 General Spatial Dynamics of Rigid Bodies
where (EX, EY, EZ) are unit vectors along the fixed inertial axes (X, Y, Z ) shown in
Fig. 8.5a and (e1, e2, e3) are unit vectors along the body-fixed axes x1 ; x2 ; x3 of
Fig. 8.5b. As just discussed, we can calculate the angular acceleration as the
derivative of these body-fixed components of the angular velocity, giving
I αB
€ 2 þ ϕ€ cos θ ϕ_ θ_ sin θ e3
¼ ϕ€ sin θ ϕ_ θ_ cos θ e1 þ θe ð8:5:2Þ
which reduce to
R2 €
m L þ 2
ϕ sin θ 2mL2 θ_ ϕ_ cos θ ¼ M 1
4
2
R2 € R
m L2 þ θþm L2 ϕ_ 2 sin θ cos θ ¼ mgL sin θ ð8:5:4Þ
4 4
R2 €
m ϕ cos θ ϕ_ θ_ sin θ ¼ M3
2
Since the mass of the rotating support is also negligible the support is in dynamic
“equilibrium” so the sum of the moments must vanish (see Fig. 8.6). Setting the sum
of the moments along the Z-axis to be zero gives
M ðt Þ M 1 sin θ ¼ 0
3 cos θ þ M ð8:5:5Þ
M
x1
M1
O
θ M3
x3
Z
Fig. 8.6 The support of the assembly of Fig. 8.5 showing the driving and constraint moments. Note
that these constraint moments are opposite to those shown in Fig. 8.5 since these are the moments
that the assembly exerts on the support while the moments in Fig. 8.5 are the equal and opposite
moments that the support exerts on the assembly
8.5 Solutions of Euler’s Equations for Rotational Motion 515
Multiplying the third equation in Eq. (8.5.4) by cosθ and the first equation by sin θ
and adding the resulting two equations then give the two equations of motion:
R2 R2 € R2 _ _
m L þ2
sin θ þ cos θ ϕ þ 2m L
2 2 2
θ ϕ sin θ cos θ ¼ M ðt Þ
4 2 4
R2 € R2 _ 2
m L2 þ θ m L2 ϕ sin θ cos θ ¼ mgL sin θ
4 4
ð8:5:6Þ
Y L sin θ
P
Z , z′
X P ¼ L sin θ cos ϕ
Y P ¼ L sin θ sin ϕ ð8:5:8Þ
Z P ¼ L cos θ
Alternatively, we could use the rotation matrix between the body-fixed axes and the
inertial axes to transform the body-fixed coordinates of P, x1 ; x2 ; x3 ¼ ð0; 0; LÞ, to
(XP, YP, ZP). Since the resulting motion can be rather complex, a 3-D animation of
the motion of the system (shown as simply the motion of the line from O to P) is
generated by the script. Figure 8.8a shows a plot of the motion when the default
values are used. The bar-disk assembly performs a combination of precessional ϕ
motions as well as nutational θ motions, resulting in a path that takes the shape of an
undulating bowl-like figure as seen in Fig. 8.8a. If the workspace is cleared and the
initial values are changed to x0 ¼ [45*pi/180, 0, 0, 6], the higher precessional
velocity causes the assembly to perform a mostly conical motion (Fig. 8.8b) (see
Problem P8.1 which discusses conditions for pure conical motion). Finally, if the
workspace is cleared and the initial values are given as x0 ¼ [45*pi/180, 0, 0, 0], the
assembly acts as a two-dimensional pendulum with its motion in the X–Z plane as
shown in Fig. 8.8c.
If the disk in the assembly is allowed to rotate about its central axis (Fig. 8.9),
then it
acts as a true gyro-pendulum. In this case a set of body-fixed axes x1 ; x2 ; x3
attached to the disk also have an angular velocity component, ψ_ , as well as a
rotation ψ, taken about the third coordinate of the previous body-fixed axes of the
fixed gyro-pendulum assembly. Those previous body-fixed axes are now a set of
intermediate axes which are called x1a ; x2a ; x3a as shown in Fig. 8.9. In this case the
angular velocity components as computed in the x1 ; x2 ; x3 body-fixed axes of the
gyro-pendulum are
ω1 ¼ ϕ_ sin θ cos ψ þ θ_ sin ψ
ω2 ¼ ϕ_ sin θ sin ψ þ θ_ cos ψ ð8:5:9Þ
ω3 ¼ ϕ_ cos θ þ ψ_
-0.5
-0.4
-0.3
-0.2
-0.1
z 0 0
0.1
0.2
0.3
0.4 -0.4
0.5 -0.5 -0.2
-0.4 -0.2 0
-0.5 0 0 0.2
0 0.2 0.4 0.4
y
0.5 0.5 y x
x
b
a
-0.5
0.5 -0.5
-0.5 0
0
0.5 0.5
x y
Fig. 8.8 Motions of the bar-disk assembly (shown as a moving line from the origin O to the
endpoint P) under different starting conditions with no driving moment. (a) When the bar-disk is
started at θ ¼ 45∘,ϕ ¼ 0 with an angular velocity ϕ_ ¼ 3 rad/s, θ_ ¼ 0, tspan ¼ [0, 11] s (the default
conditions in the script fixed_gyro_pend_sim). (b) When the bar-disk is started at θ ¼ 45∘, ϕ ¼ 0,
with an angular velocity ϕ_ ¼ 6 rad/s, θ_ ¼ 0, for the time interval tspan ¼ [0 11] s. (c) When the
bar-disk is started at θ ¼ 45∘, ϕ ¼ 0 with an angular velocity θ_ ¼ ϕ_ ¼ 0 rad/s for a time interval
tspan ¼ [0 11] s
M3 x1a
M ψ x
F3 F1 1
O M1
O F2
θ X
φ
θ L
x′
y′ φ x2 ψ M
L 2
Y y′, x2a
φ R
Z , z′ ψ x3a , x3
x3a , x3 mg
(a) (b)
Fig. 8.9 (a) A thin disk which rotates about the axis of a bar of negligible mass that swings about a
pinned support, and where the support is driven by a given moment, M, and (b) the free body
diagram of this gyro-pendulum showing the constraint forces and moments in a set of body-
fixed axes
518 8 General Spatial Dynamics of Rigid Bodies
Note that Eq. (8.5.9) reduces to Eq. (8.5.1) when ψ_ ¼ ψ ¼ 0. The (ϕ, θ, ψ) angles
correspond to using a 3-2-3 set of Euler angles. We can alternatively write the
derivatives of these Euler angles in terms of the angular velocities to find
1
ϕ_ ¼ ω 1 cos ψ þ ω2 sin ψ
sin θ
θ_ ¼ ω1 sin ψ þ ω2 cos ψ ð8:5:10Þ
1
ψ_ ¼ ω1 cos θ cos ψ ω2 cos θ sin ψ þ ω3
sin θ
or θ_ ¼ H
1 ω where (see Eq. (4.11.6))
2 3
cos ψ sin ψ
6 07
6 sin θ sin θ 7
H 1 ¼6 sin ψ cos ψ 07 ð8:5:11Þ
6 7
4 cos θ cos ψ cos θ sin ψ 5
1
sin θ sin θ
Equation (8.5.11) shows explicitly the singularities that are always present at certain
angles when using Euler angles, Here, we see that for the 3-2-3 set of angles the
derivative expressions are unbounded when θ ¼ 0 or θ ¼ π due to the presence of the
sine term in the denominators of these expressions.
where
2 3
cos θ cos ψ θ_ þ sin θ sin ψ ψ_ cos ψ ψ_ 0
6
_ ¼ 4 cos θ sin ψ θ_ þ sin θ cos ψ ψ_ 7
H sin ψ ψ_ 05 ð8:5:13Þ
sin θθ_ 0 0
This leads to very complex-looking equations and is not usually an approach found
in traditional dynamics texts which concentrate on expressing the equations of
motion in explicit, analytical forms. However, for a numerical solution one only
needs to set up the necessary matrices and vectors in Eq. (8.5.12) so this can be a
viable method.
A second approach is to write Euler’s equation in terms of the
x1a ; x2a ; x3a axes (called the a-frame) used in the fixed gyro-pendulum problem
8.5 Solutions of Euler’s Equations for Rotational Motion 519
_
ω 1 IO;2 IO;3 ω2 ω3 =IO;1 ¼ M ðt Þ sin θ cos ψ=IO;1 mgL sin θ sin ψ=IO;1
_
ω 2 IO;3 IO;1 ω1 ω3 =IO;2 ¼ M ðt Þ sin θ sin ψ=IO;2 mgL sin θ cos ψ=IO;2
_
ω 3 IO;1 IO;2 ω1 ω2 =IO;3 ¼ M ðt Þ cos θ=IO;3
1
ϕ_ ¼ ω1 cos ψ þ ω2 sin ψ
sin θ
θ_ ¼ ω1 sin ψ þ ω2 cos ψ
1
ψ_ ¼ ω1 cos θ cos ψ ω2 cos θ sin ψ þ ω3
sin θ
ð8:5:14Þ
where we have resolved the driving moment into its body-fixed components by first
resolving the moment into its components along the x1a ; x2a ; x3a coordinates, as seen
in Fig. 8.6, and then finding the components in the body-fixed
axes (Fig. 8.10). From
the dynamic moment equilibrium of the support in the x1a ; x3a directions (Fig. 8.10a)
we have
520 8 General Spatial Dynamics of Rigid Bodies
M 3a ¼ M cos θ
ð8:5:15Þ
M 1a ¼ M sin θ
and in the body-fixed coordinates x1 ; x2 ; x3 as seen in Fig. 8.10b
which are the components seen in Eq. (8.5.14). The moment contribution from the
weight was also calculated by noting that the moment is just mgL sin θ along a
the x2
-axis (see Eq. (8.5.6)) so that if we simply resolve that moment into its x1 ; x2
components we obtain the terms seen in Eq. (8.5.14).
The script gyro_pend_sim has defaults for the parameters of the system given by
R ¼ 0.1 m, L ¼ 0.5 m, m ¼ 1 kg, tspan ¼ linspace(0,10,1000); s, and x0 ¼ [0, 90*pi/
180, 0, 0, 0, 200], where the angles are in rad and the angular velocities are in
rad/s. Thus, the gyro-pendulum is released from rest with the bar in a horizontal
position. The default error tolerances are set as rtol ¼1e-6 and atol ¼ 1e-6. The script
solves the system of equations and then animates the 3-D motion by showing the
motion of the bar in the assembly. If the script is executed with the defaults the
animation shows a precessional motion combined with a nutation that forms a series
of cusps as seen in Fig. 8.11. The specification of the time interval as 1000 points
over a time interval of 10 s allows the animation to proceed at a reasonable rate.
However, if we had used tspan ¼ [0,10] the animation would be very slow since the
MATLAB® ode45 solver calculates approximately 40,000 positions of the gyro-
pendulum, taking very small time steps, so that displaying all those small position
changes is slow. Note that, as we have mentioned before, even by specifying
tspan ¼ linspace(0, 10, 1000) the solver still calculates the same number of points
during the solution process. You can examine other examples of the use of
gyro_pend_sim but we will stop further discussion here and instead implement the
same problem with Euler parameters.
8.5 Solutions of Euler’s Equations for Rotational Motion 521
Although we did not use Lagrange’s equations to obtain the equations of motion
for the gyro-pendulum, examining the Lagrangian does give us significant informa-
tion. Using the symmetry of the gyro-pendulum we have
1 1 2
L ¼ IO;1 ϕ_ 2 sin 2 θ þ θ_ 2 þ IO;3 ϕ_ cos θ þ ψ_ þ mgL cos θ ð8:5:17Þ
2 2
which shows that the Lagrangian does not depend explicitly on both ϕ and ψ; that is,
these are ignorable coordinates. Thus the generalized momenta associated with these
coordinates are constants, so we have
∂L _
pϕ ¼ ¼ I O;1 ϕ sin 2 θ þ IO;3 ψ_ þ ϕ_ cos θ cos θ ¼ constant
∂ϕ_
ð8:5:18Þ
∂L
pψ ¼ ¼ IO;3 ϕ_ cos θ þ ψ_ ¼ constant
∂ψ_
From Eq. (8.5.9) we see that pψ ¼ IO;3 ω3 ¼ L3 , so the angular momentum
component about the body-fixed axis x3 is a constant. It can also be shown that
pϕ ¼ LZ, where LZ is the angular momentum about the inertial Z-axis. We can write
both ϕ_ and ψ_ in terms of the constants L3 , LZ as
LZ L3 cos θ
ϕ_ ¼
I O;1 sin 2 θ
ð8:5:19Þ
L3 LZ L3 cos θ cos θ
ψ_ ¼
I O;3 IO;1 sin 2 θ
It follows that the total energy, E, which is conserved in this problem, is given by
1 1 2
E ¼ IO;1 ϕ_ 2 sin 2 θ þ θ_ 2 þ IO;3 ϕ_ cos θ þ ψ_ mgL cos θ ð8:5:20Þ
2 2
522 8 General Spatial Dynamics of Rigid Bodies
1
E ¼ IO;1 θ_ 2 þ U ðθÞ ð8:5:21Þ
2
Many texts use these expressions for the generalized momenta and energy to infer
the behavior of the gyro-pendulum without actually solving the equations of motion.
Because we can illustrate the behavior of this system directly with the numerical
solutions (as we will do shortly) we will not go into those discussions but simply
refer you to a reference such as [1] for more details. Problem P8.3 at the end of this
chapter, however, does consider verifying that the numerical solution satisfies the
conservation of these momenta and the total energy.
_
ω 1 I O;2 I O;3 ω2 ω3 =I O;1 ¼ 2M ðt Þðθ1 θ3 θ0 θ2 Þ=I O;1 2mgLðθ2 θ3 þ θ0 θ1 Þ=I O;1
_
ω 2 I O;3 I O;1 ω1 ω3 =I O;2 ¼ 2M ðt Þðθ2 θ3 þ θ0 θ1 Þ=I O;2 þ 2mgLðθ1 θ3 θ0 θ2 Þ=I O;2
_
ω 3 I O;1 I O;2 ω1 ω2 =I O;3 ¼ M ðt Þ 1 2θ21 2θ22 =I O;3
1
θ_ 0 ¼ ω1 θ1 ω2 θ2 ω3 θ3
2
1
θ_ 1 ¼ ω1 θ0 ω2 θ3 þ ω3 θ2
2
1
θ_ 2 ¼ ω1 θ3 þ ω2 θ0 ω3 θ1
2
1
θ_ 3 ¼ ω1 θ2 þ ω2 θ1 þ ω3 θ0
2
ð8:5:23Þ
8.5 Solutions of Euler’s Equations for Rotational Motion 523
where we have used Eq. (4.10.22) and have written the moment terms in terms of the
Euler parameters by comparing matrix elements in the rotation matrix, given in terms
of the Euler parameters, Eq. (4.10.11), with the same elements written in terms of the
Euler angle, Eq. (4.11.5). We will
still give the initial conditions in terms of the Euler
_ θ;
angles and their derivatives, ϕ; θ; ψ; ϕ; _ ψ_ , and then generate the initial condi-
tions for our seven parameters by using Eq. (8.5.9) and Table 4.1, i.e.,
In solving the seven first-order differential equations of Eq. (8.5.23) the Euler
parameters are related to each other by the constraint
But this constraint does not produce a generalized constraint force so that it does not
change the equations of motion. We will prove this fact and discuss this issue more
later. However, the constraint still must be satisfied so that we have to either
incorporate it into the solution process or monitor the constraint during the numerical
solution to ensure that it is not being violated. The MATLAB® function
gyro_pend_ep and the script gyro_pend_ep_sim implement the solution of the
gyro-pendulum problem using Eqs. (8.5.23) and (8.5.24) with M(t) ¼ 0. Again the
point P is followed, whose inertial coordinates can be calculated using the rotation
matrix, written in terms of the Euler parameters,
(Eq. (4.10.11)), to transform the
body-fixed coordinates of P, x1 ; x2 ; x3 ¼ ð0; 0; LÞ to (XP, YP, ZP), giving
X P ¼ 2Lðθ1 θ3 θ0 θ2 Þ
Y P ¼ 2Lðθ2 θ3 þ θ0 θ1 Þ ð8:5:26Þ
Z P ¼ L 1 2θ21 2θ22
script are identical to those used in the Euler angle case, namely R ¼ 0.1 m,
L ¼ 0.5 m, m ¼ 1 kg, tspan ¼ linspace(0, 10,1000), and x0 ¼ [0, 90*pi/180, 0, 0,
0, 200], where again the angles are in rad and the angular velocities are in rad/s. The
default error tolerances are set as rtol ¼ 1e-6 and atol ¼ 1e-6. In this case the initial
Euler angles and their derivatives in x0 are transformed into a set of initial conditions
for ω1 ; ω2 ; ω3 ; θ0 ; θ1 ; θ2 ; θ3 that are used by the ode45 solver. Running the
gyro_pend_ep_sim script results in the animation results shown in Fig. 8.12a,
which is identical to the simulation using Euler angles. If the initial conditions are
changed to x0 ¼ [0, 90*pi/180, 0, 0.9, 0, 200], with all other parameters
unchanged, then the animation produces a smoother “nodding” behavior during
the precession, as shown in Fig. 8.12b. If instead we set x0 ¼ [0, 90*pi/180,
0, 0.9, 0, 200], then the motion is as shown in Fig. 8.12c where the axis of the
system exhibits loops during the precession. In problem P8.6 you are asked to
examine the satisfaction of the constraint equation and its derivative during these
motions.
As discussed previously, many texts give detailed analytical discussions of the
behaviors seen in Fig. 8.12 from an analysis of the conservation of momenta and
-0.5
-0.5
Z 0
Z 0
0.5 -0.5
0.5 -0.5
-0.5 0
0 -0.5 0
0.5 0.5 0
X Y 0.5 0.5
X Y
a
-0.5 b
Z 0
0.5
-0.5
-0.5 0
0
0.5 0.5
X Y
Fig. 8.12 (a) Motion of the gyro-pendulum (solved using Euler parameters) for the default
parameters R ¼ 0.1 m, L ¼ 0.5 m, m ¼ 1 kg, tspan ¼ linspace (0,10,1000);s, and rtol ¼ 1e-6,
atol ¼ 1e-6, and x0 ¼ [0, 90*pi/180, 0, 0, 0, 200], and (b) the solution with the initial conditions
changed to x0 ¼ [0, 90*pi/180, 0, 0.9, 0, 200], and finally (c) the solution with the initial
conditions changed to x0 ¼ [0, 90*pi/180, 0, 0.9, 0, 200]
8.6 Rotational Motion and the Euler Parameter Constraint 525
energy. By solving the problem numerically and animating that solution we can
directly see the fascinating motions of the gyro-pendulum. Such motions are also
characteristic of other spinning bodies such as tops and gyros.
Let us return to the constraint condition, Eq. (8.5.25), and the solution of the
equations of motion. This constraint comes from describing the three degrees of
freedom of the angular motion in terms of four parameters so it is a result of that
over-determinacy, not a result of any physical constraint. Thus, we might expect that
this constraint will be different from the physical constraints we have previously
discussed in many examples. This is indeed the case since if we try to incorporate the
constraint into the rotational equations of motion we can show that it does not
produce a generalized “force.” To see this, consider writing Euler’s equations,
Eq. (8.4.21), in terms of Euler parameters. Using Eq. (4.10.25) and the identities
of Eqs. (4.10.27a) and (4.10.27b) we have
We cannot incorporate the constraint on the four Euler parameters directly into these
equations since there are only three equations for the four unknown Euler parame-
T
ters. However, if we pre-multiply Eq. (8.6.1) by H ðnÞ we generate a set of four
equations that are subject to these constraints:
T T T
H ðnÞ θ€ðnÞ þ 1 H
ðnÞ IðnÞ H ðnÞ H ðnÞ H_ ðnÞ IðnÞ H
ðnÞ θ_ ðnÞ
P P
2
T
¼ H ðnÞ M ðnÞ ð8:6:2Þ
P
Since the constraint can be written as θTθ ¼ 1 we can use a Lagrange multiplier, λ,
and incorporate it into Eq. (8.6.2) as
T T T
H ðnÞ θ€ðnÞ þ 1 H
ðnÞ IðnÞ H ðnÞ H ðnÞ H_ ðnÞ IðnÞ H
ðnÞ θ_ ðnÞ þ θðnÞ λ
P P
2
T
¼ H ðnÞ M ðnÞ ð8:6:3Þ
P
ðnÞ θðnÞ ¼ 0
However, if we pre-multiply Eq. (8.6.3) by (θ(n))T and use the fact that H
we find
526 8 General Spatial Dynamics of Rigid Bodies
T
θðnÞ θðnÞ λ ¼ 0 ð8:6:4Þ
so that λ ¼ 0 and there is no generalized “force” associated with this constraint. Thus,
we can write the moment equation in terms of the Euler parameters in its original
form, Eq. (8.6.2), or pre-multiply Eq. (8.6.2) by H and use the relationship between
the Euler parameters and the angular velocity and acceleration to recover the original
Euler’s equations, Eq. (8.4.21). In either case the constraint does not appear directly
in the governing equations of motion. There are other ways to write the equations of
motion in forms where the Lagrange multiplier, λ, is not zero. However, those forms
all result in the same equations for θ. € See [2] for a very clear discussion of the
different forms of the rotational equations of motion.
Note that Eq. (8.6.2) can be written in the form
then since
T
ðnÞ ðnÞ
P P ¼ 16 I4 θðnÞ θðnÞ ð8:6:8Þ
we have
T ðnÞ T ðnÞ 1 ðnÞ _ ðnÞ T ðnÞ ðnÞ ðnÞ
16θ€ðnÞ 16θðnÞ θðnÞ θ€ðnÞ ¼ 2 H IP
H H θ_
IP H
ðnÞ T ðnÞ 1 ðnÞ
þ4 H IP
M P
ð8:6:9Þ
T
ðnÞ H
where we have also used H ðnÞ ¼ 4I. Differentiating the constraint equation
twice on time gives
8.7 Solving Systems of Rigid Bodies 527
T T
θðnÞ θ€ðnÞ þ θ_ ðnÞ θ_ ðnÞ ¼ 0 ð8:6:10Þ
which is in a form that can easily be turned into a system of first-order differential
equations for the Euler parameters. During the numerical solution we still need to
ensure that the constraint equation θTθ ¼ 1 is satisfied. As with ordinary physical-
based constraints we could try to include satisfaction of this constraint (and its
derivative) as part of the solution process, but further discussion of this topic is
left to other more advanced texts.
In solving for the motion of a rigid body, one must choose a set of generalized
coordinates. If we know the motion of a given point in the body and the behavior of a
set of angles that define the rotational motion, then we can find the motion of any
other point in the rigid body so consider using the Cartesian components of the
motion of a point in the body, xA ¼ (XA, YA, ZA), and a set of either Euler angles or
Euler parameters, θ, a choice which is similar to the one used in planar problems.
ðnÞ
Thus, our generalized coordinates for body (n) will be qðnÞ ¼ xA ; θðnÞ . We want
to write the equations of motion in those generalized coordinates in the form
where M(n) is a mass matrix and Q(n);in and Q(n);e are the generalized inertial and
applied external forces, respectively. To obtain these terms we can go back to the
Newton-Euler equations given in Eqs. (8.4.11) and (8.4.18b):
which are in a mixed form involving both inertial and body-fixed axes. To make
them consistently use the acceleration of point A, €xA , in inertial coordinates and to
ensure that all terms that involve the relative positions of two points in the body such
ðnÞ ðnÞ ðnÞ
as xC=A , XC=A , IA are written in body-fixed axes so they remain constants during the
528 8 General Spatial Dynamics of Rigid Bodies
motion, we will use the relationship between inertial and body-fixed coordinates
given by
ðnÞ
In terms of either Euler angles or Euler parameters we have I ωB ¼ H ðnÞ θ_ ðnÞ and
ðnÞ θ€ þ H
ð Þ ð Þ _
θ_
ð Þ ð Þ _
θ_ nÞ ¼ 0 (see
ð Þ ð
I αB ¼H n n n n n
(but note that for Euler parameters H
Eq. (4.10.27b))) so placing these relations into Eq. (8.7.4) gives
ðnÞ
xA mðnÞ RðnÞ X
mðnÞ € ðnÞ H ðnÞ θ€ðnÞ þ H _ ðnÞ θ_ ðnÞ þ mðnÞ RðnÞ I ΩðnÞ I ΩðnÞ xðnÞ ¼ FðnÞ
C=A B B C=A
mðnÞ X
ðn Þ ðnÞ T
€xA þ IA H
ð nÞ ð nÞ ðnÞ θ€ðnÞ þ H _ ðnÞ θ_ ðnÞ þ I Ω I I ω ¼ M
ð nÞ ðn Þ ð n Þ ðnÞ
C=A R B A B A
ð8:7:5Þ
Equation (8.7.5) is almost in the final form we need. For Euler parameters we
need four equations for these parameters, which we can obtain by multiplying the
T
moment equation by H ðnÞ . This will also make the mass matrix symmetrical for
both the Euler angle and Euler parameter choices, as we will see shortly. Thus,
performing this multiplication and rearranging terms we find finally
ðnÞ H
xA mðnÞ RðnÞ X
mðnÞ € ðnÞ θ€ðnÞ
ðnÞ
C=A
ðnÞ ðnÞ ðnÞ ðnÞ H
¼ FðnÞ mðnÞ RðnÞ I ΩB I ΩB xC=A þ mðnÞ RðnÞ X _ ðnÞ θ_ ðnÞ
C=A
n T ðnÞ ðnÞ T ðnÞ ðnÞ T ðnÞ ðnÞ ðnÞ ð8:7:6Þ
X
mðnÞ H €xA þ H θ€
IA H
C=A R
ðnÞ T ðnÞ ðnÞ T ðnÞ _ ðnÞ ðnÞ ðnÞ T ðnÞ ðnÞ ðnÞ
¼ H M H IA H θ_ H
I ΩB IA I ω B
A
where
T
ðnÞ ðnÞ ðnÞ H ðnÞ
MðxxnÞ ¼ mðnÞ I, Mxθ ¼ Mθx ¼ mðnÞ RðnÞ X C=A
and I is the 3 3 identity matrix. These terms are rather complex since there is
coupling between the motion of A and the rotations in both the mass matrix and the
generalized inertial force. However, if we choose point A to be the mass center, C,
we arrive at a much simpler result where
ðnÞ ðnÞ T
MðxxnÞ ¼ mðnÞ I, Mxθ ¼ Mθx ¼0
ðnÞ
Mθθ ¼ H ðnÞ T IðnÞ H
ðnÞ
C
ðnÞ;e ðnÞ T ðnÞ ð8:7:9Þ
QðnÞ;e ¼ FðnÞ , Q ¼ H M
x θ C
QxðnÞ;in ¼ 0
ðnÞ T ðnÞ _ ðnÞ ðnÞ ðnÞ T ðnÞ ðnÞ ðnÞ
Qθ
ðnÞ;in
¼ H IC H θ_ H
I ΩB IC I ωB
If the generalized constraint forces are ideal constraints and we use the Lagrange
prescription for these constraints then we see that the equations of motion and
constraints of a complex system of rigid bodies in three-dimensional motion can
be placed into the same form we have seen before for particles, systems of particles,
and rigid bodies in plane motion, namely
530 8 General Spatial Dynamics of Rigid Bodies
q ¼ Qin þ Qe þ AT λ
M€
ð8:7:11Þ
q¼b
A€
and these equations can be solved for the equations of motion and generalized
constraint forces by the augmented approach. Details of solving such complex
systems are beyond the scope of this book. You can find more details in texts on
multibody dynamics (see, in particular, references [4–7]).
We should mention some details in computing the generalized forces in
Eq. (8.7.9). The force F(n) is the total external force acting on the rigid body. It
ðnÞ
comes from whatever individual forces, F j , are acting, as shown in Fig. 8.13. Thus,
we have for the generalized force
X
nf
ðnÞ
QxðnÞ;e ¼ Fj ð8:7:12Þ
j¼1
where nf is the total number of forces. Note that all of these forces are computed in an
ðnÞ;e
inertial frame. The generalized force, Qθ , however, is in terms of the moment
about the center of mass C, M , calculated in body-fixed axes. The moment about
ð nÞ
C
ðnÞ
C in terms of inertial coordinates, MC , comes from the moments about C due to the
ðnÞ
external forces plus the moments due to any couples, C j , acting on the body, i.e.,
ðnÞ
X
nf
ðnÞ ðnÞ
X
nc
ðnÞ
MC ¼ x j=C F j þ Cj ð8:7:13Þ
j¼1 j¼1
(n)
x(j / C)
n
F2( n )
x(j )
n
C
( n)
Y xC
C1(
n)
( n)
F1
O X
Z
8.7 Solving Systems of Rigid Bodies 531
(see Fig. 8.13) where nc is the total number of couples. In body-fixed coordinates,
therefore, we have
X
nf X
nc
ðnÞ ¼
M xj=C Fj þ
ðnÞ ðnÞ ðnÞ
C ð8:7:14Þ
C j
j¼1 j¼1
with
~ e ¼ Fe ∂vC þ M e ∂I ωB
Q ð8:7:16Þ
k
∂u_ k C
∂u_ k
Note that the kinetic energy terms on the left side of Eq. (8.7.15) produce both the
mass matrix term in the equations of motion as well as the generalized inertia forces.
For the important special case where all the external forces (and moments) are
derivable from a potential energy function, V ðq; t Þ ¼ V~ ðu; t Þ, one finds
∂V~ X
p
d ∂T ∂T
¼ þ Amk λm ð8:7:17Þ
dt ∂u_ k ∂uk ∂uk m¼1
Dynamics texts often use Eq. (8.7.17) since one can go directly from the scalar
kinetic energy and potential energy expressions to obtain explicit expressions for the
terms in Eq. (8.7.17) by performing all the appropriate derivatives, thus bypassing
the vectors and matrices present in the approach described earlier in this section. For
constrained bodies, however, the unknown Lagrange multipliers are also present so
532 8 General Spatial Dynamics of Rigid Bodies
Z
Z
φ x2a
x2a
x3 , x ψ
a
3
x3 , x3a
θ
ρ
C θ
C
θ R
mg R sin θ
D x1a D
F N
R cos θ
(a) (b)
Fig. 8.14 (a) A disk rolling without slipping on a horizontal plane. (b) A side view
8.8 The Rolling Disk 533
where the tilde and bracket notation []a indicate the evaluation of this angular
velocity in the a-frame. Note that the angular velocity of the intermediate coordinate
a-frame, Iωa, can similarly be written as
~a
Iω ½I ωa a ¼ θ_ e1a þ sin θϕ_ e2a þ ϕ_ cos θe3a ð8:8:2Þ
vD ¼ vC þ I ωB xD=C ¼ 0 ð8:8:3aÞ
which we can write more explicitly using inertial coordinates to evaluate the
velocities and the a-frame coordinates for the cross product terms as
~ B x~D=C I ¼ 0
½vD I ¼ ½vC I þ I ω ð8:8:3bÞ
where []I means we must transform the cross product in the a-frame to inertial
coordinates. Thus, we find
X_ C EX þ Y_ C EY þ Z_ C EZ þ θ_ e1a þ sin θϕ_ e2a þ ϕ_ cos θ þ ψ_ e3a Re2a I ¼ 0
ð8:8:4Þ
or
X_ C EX þ Y_ C EY þ Z_ C EZ þ Rθ_ e3a þ R ϕ_ cos θ þ ψ_ e1a I ¼ 0 ð8:8:5Þ
Z C ¼ R sin θ ð8:8:10Þ
(see Fig. 8.14b) so that we can use this constraint to eliminate ZC (i.e., embed this
constraint) and describe the problem in terms of the five generalized coordinates (q1,
q2, q3, q4, q5) ¼ (XC, YC, ϕ, θ, ψ). If we use Lagrange’s equations and Lagrange
multipliers to represent the ideal constraint forces, as discussed in the last section,
we have
d ∂T ∂T ∂V X 2
¼ þ Apk λp ðk ¼ 1; . . . ; 5Þ
dt ∂q_ k ∂qk ∂qk p¼1
ð8:8:11Þ
X
5
A jk €qk ¼ b j ðj ¼ 1; 2Þ
k¼1
Rather than solving this system of equations explicitly with an augmented approach
(see Prob P8.7 where you are asked to obtain the augmented solution), we will
follow the steps given by Baruh [3] which will allow us to analyze an important
special case where the disk rolls in a circle with no nutational motion. First, write the
equations of motion in terms of the Lagrange multiplier, which is easy to do since the
A matrix appearing in the constraint equations involving the accelerations is the
same matrix appearing in our velocity constraints in Eq. (8.8.8), which we can write
as
X
5
A jk q_ k ¼ 0 ðj ¼ 1; 2Þ ð8:8:12Þ
k¼1
where
1 0 R cos θ cos ϕ R sin θ sin ψ R cos ϕ
½A ¼ ð8:8:13Þ
0 1 R cos θ sin ϕ R sin θ cos ϕ R sin ψ
8.8 The Rolling Disk 535
The kinetic and potential energy is given as (see Eq. (8.8.1) for the angular velocity
components)
1 1 2 1 1
T ¼ m X_ 2C þ Y_ 2C þ Z_ 2C þ I 3 ϕ_ cos θ þ ψ_ þ I 1 θ_ 2 þ I 2 sin 2 θϕ_ 2
2 2 2 2
1 _2 1 1 1
¼ m X C þ Y_ 2C þ R2 θ_ 2 cos 2 θ þ I 3 ϕ_ cos θ þ ψ_ þ I 1 θ_ 2 þ I 2 sin 2 θϕ_ 2
2
2 2 2 2
V ¼ mgR sin θ
ð8:8:14Þ
1 1
I 3 ¼ mR2 , I 2 ¼ I 1 ¼ mR2 ð8:8:15Þ
2 4
Using Eq. (8.8.14) in the Lagrange equations of Eq. (8.8.11) then gives
mX€ C ¼ λ1
mY€ C ¼ λ2
ðI 1 sin 2 θ þ I 3 cos 2 θÞϕ€ þ I 3 cos θψ€ þ ð2I 1 2I 3 Þ sin θ cos θθ_ ϕ_ I 3 sin θθ_ ψ_
¼ R cos θ cos ϕλ1 þ R cos θ sin ϕλ2
I 1 þ mR2 cos 2 θ θ€ mR2 sin θ cos θθ_ 2 ðI 1 þ I 3 Þ sin θ cos θϕ_ 2 I 3 sin θϕ_ ψ_
¼ mgR cos θ R sin θ sin ϕλ1 þ R sin θ cos ϕλ2
I 3 cos θϕ€ þ I 3 ψ€ I 3 sin θθ_ ϕ_ ¼ R cos ϕλ1 þ R sin ϕλ2
ð8:8:16Þ
which show us that the Lagrange multipliers (λ1, λ2) are just the constraint forces
acting in the (X, Y) directions, respectively. If we differentiate the constraint equa-
tions, Eq. (8.8.8), on time and use them in the first two equations of motion, we can
write the Lagrange multipliers in terms of the (ϕ, θ, ψ) coordinates and their deriv-
atives and then place those expressions into the last three equations in Eq. (8.8.16).
When done by hand, this process is essentially the same as using the explicit
expressions for the constraint forces in the augmented approach. The details of this
lengthy process we will not describe here but instead simply give the end result as
the three equations obtained by Baruh [3]:
I 3 þ mR2 ψ€ þ cos θϕ€ sin θθ_ ϕ_ mR2 sin θθ_ ϕ_ ¼ 0
I 1 þ mR2 θ€ þ I 3 þ mR2 sin θϕ_ cos θϕ_ þ ψ_ I 1 sin θ cos θϕ_ 2 ¼ mgR cos θ
I 1 sin θϕ€ þ 2I 1 cos θθ_ ϕ_ I 3 θ_ cos θϕ_ þ ψ_ ¼ 0
ð8:8:17Þ
536 8 General Spatial Dynamics of Rigid Bodies
These are still rather complex equations but we can use them to consider the
following special case. Let the nutation angle, θ, be a constant. Then Eq. (8.8.17)
reduces to
I 3 þ mR2 ψ€ þ cos θϕ€ ¼ 0
þ I 3 þ mR2 sin θϕ_ cos θϕ_ þ ψ_ I 1 sin θ cos θϕ_ 2 ¼ mgR cos θ ð8:8:18Þ
I 1 sin θϕ€ ¼ 0
The third equation in Eq. (8.8.18) shows that the precessional rate, ϕ_ , is a constant.
Placing this result back into the first equation in Eq. (8.8.18) gives that the spin rate,
ψ_ , is also a constant. A motion that satisfies these conditions is when the center of
the disk, C, follows a circular path with the precessional velocity being the rotational
rate of the radial line that defines that circular path. To see this, try a solution for the
motion of C that satisfies
X C ¼ ρ sin ϕ
ð8:8:19Þ
Y C ¼ ρ cos ϕ
where ρ is the constant radius of the path (see Fig. 8.13a). Placing this relationship
into Eq. (8.8.8), we see that the constraints are satisfied if
ρ
ψ_ ¼ ϕ_ þ cos θ ð8:8:20Þ
R
Placing Eq. (8.8.20) into the second equation of Eq. (8.8.18) then gives
mgR2 cot θ
ϕ_ 2 ¼ ð8:8:21Þ
I 3 þ mR2 ρ þ I 1 R cos θ
which can be expressed in a more compact form if we let I3 ¼ mκ 2,I1 ¼ mκ 2/2, where
κ is a radius of gyration for the disk. We find
2gR2 cot θ
ϕ_ 2 ¼ 2 ð8:8:22Þ
2 κ þ R2 ρ þ κ2 R cos θ
pffiffiffi
For a homogeneous disk κ ¼ R= 2 and Eq. (8.8.22) reduces to
4g cot θ
ϕ_ 2 ¼ ð8:8:23Þ
6ρ þ R cos θ
To obtain a numerical solution for the generalized coordinates (XC, YC, ϕ, θ, ψ) for
the case where the disk does follow a circular path with no nutational motion, we
must first specify the parameters (ρ, R, θ ¼ θ0), which fixes the radius of the path, the
8.8 The Rolling Disk 537
size of the disk, and the constant nutation angle. We also need to know the initial
_ θ;
conditions for (XC, YC, ϕ, θ, ψ) and their velocities X_ C ; Y_ C ; ϕ; _ ψ_ which will lead
to such circular motion. Obviously for a constant nutation angle we have θ(0) ¼ θ0
and θ_ ð0Þ ¼ 0. From Eqs. (8.8.23) and (8.8.20) we find
rffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
4g cot θ0
ϕ_ ð0Þ ¼
6ρ þ R cos θ0 ð8:8:24Þ
ρ
ψ_ ð0Þ ¼ ϕ_ ð0Þ þ cos θ0
R
If we specify the initial precessional and spin angles as ϕ(0) ¼ ϕ0 and ψ(0) ¼ ψ 0 then
from Eq. (8.8.19) we must have
X C ð0Þ ¼ ρ sin ϕ0
ð8:8:25Þ
Y C ð0Þ ¼ ρ cos ϕ0
Rolling in a circular path with no nutational angle changes is a special case that can
be used to check the numerical solution of the augmented system of equations for the
five generalized coordinates. In Prob. P8.7 you are asked to do just such a check for
this problem.
The constraint forces acting on the rolling-disk problem are frictional forces so
that in order to have rolling without slipping those forces must not exceed
their maximum allowable values. It is useful to examine those frictional forces in
an (X0 , Y0 , Z0 ) system which is obtained after the first Euler angle rotation (Fig. 8.15).
There are two components of the frictional force in this coordinate system. If the
constraint maintained by force F1 is lost the spin of the disk is decoupled from its
forward motion, a condition called spin slip. If, however, the constraint maintained
by F2 is lost instead the disk will slide on the surface, resulting in what is called
sliding slip. These conditions of course do not occur separately in general, where for
no slip of either type we must have
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
F 21 þ F 22 μN ð8:8:27Þ
where N is the normal force and μ is the coefficient of friction. It may seem that by
embedding the Z-constraint in our analysis we will have difficulty in examining this
no-slip condition since the normal force never appears in the analysis. However, the
normal force can easily be found since the missing force equation in the Z-direction
is just
538 8 General Spatial Dynamics of Rigid Bodies
ya
Y’
θ θ
C mg
F2
D
N F1
X ′, xa
d
N mg ¼ mZ€ ¼ m R cos θθ_ ð8:8:28Þ
dt
To obtain the frictional forces we will again follow a series of steps outlined by
Baruh [3]. We note that the relationship between the acceleration of the center of
mass and these forces in the (X0 , Y0 , Z0 ) system is just
maCX 0 ¼ F X 0 ¼ F 1
maCY 0 ¼ F Y 0 ¼ F 2 ð8:8:29Þ
maCZ 0 ¼ N mg
where the last equation in Eq. (8.8.29) is just Eq. (8.8.28). The relationship between
the unit vectors in the (X0 , Y0 , Z0 ) system and the a-frame is just
e1a exa ¼ eX 0
e2a eya ¼ cos θeY 0 þ sin θeZ 0 ð8:8:30Þ
e3a eza ¼ sin θeY 0 þ cos θeZ 0
since these axes only differ by the θ-rotation (see Fig. 8.14). Thus, if we write the
acceleration of the center of mass in terms of the a-frame components we can use
Eq. (8.8.30) to place these accelerations into their (X0 , Y0 , Z0 ) components and so
obtain expressions for the forces in Eq. (8.8.29). First, recall we already know the
angular velocity of the disk and the angular velocity of the a-frame from Eqs. (8.8.1)
and (8.8.2), which we rewrite here:
8.8 The Rolling Disk 539
~B
Iω ¼ θ_ e1a þ sin θϕ_ e2a þ ϕ_ cos θ þ ψ_ e3a
ð8:8:31Þ
~ a ¼ θ_ e1a þ sin θϕ_ e2a þ ϕ_ cos θe3a
Iω
In obtaining the acceleration of the center of mass we will have to perform some time
derivatives which will become rather complex algebraically, so let us first rewrite
Eq. (8.8.31) in the simpler forms:
~B
Iω ¼ω~ 1 e1a þ ω
~ 2 e2a þ ω
~ 3 e3a
~2 a
ω ð8:8:32Þ
~a ¼ ω
Iω ~ 1 e1a þ ω
~ 2 e2a þ e
tan θ 3
Because of the no-slip condition the velocity of the center of mass in a-frame
coordinates, v~C , is therefore
~ B Re2a
v~C ¼ I ω
ð8:8:33Þ
¼ Rω1 e3a Rω3 e1a
We can obtain the acceleration in a-frame coordinates by using the transport theorem
of Chap. 4 as
d a v~C
a~C ¼ þ Iω~ a v~C
dt
~2 a
ω
¼ Rω _
~ 1 e3 R ω
a _
~ 3 e1 þ ω
a
~ 1 e1 þ ω
a
~ 2 e2 þ
a
e3 R~ ω 1 e3a R~
ω 3 e1a
tan θ
a ~ 2ω
ω ~3 a
¼R ω ~ 1ω
~2 ω _
~ 3 e1 R ω ~1 þ
2
e2 þ R ω ~_ 1 þ ω
~ 2ω
~ 3 e3a
tan θ
ð8:8:34Þ
Replacing ω ~ 1; ω
~ 2; ω
~ 3 by their Euler angle expressions and carrying out the
necessary derivatives, we find
a~C ¼ R ϕ€ cos θ þ 2ϕ_ θ_ sin θ ψ€ e1a R ϕ_ cos θ ϕ_ cos θ þ ψ_ θ_ 2 e2a
a
þR θ€ þ ϕ_ sin θ ϕ_ cos θ þ ψ_ e3
ð8:8:35Þ
d _
F 1 ¼ mR ϕ cos θ þ ψ_ mRϕ_ θ_ sin θ
dt
d
F 2 ¼ mRϕ_ ϕ_ cos θ þ ψ_ mR θ_ sin θ ð8:8:36Þ
dt
d
N mg ¼ mR θ_ cos θ
dt
For the special case of rolling without nutation in a circular path, since θ is a constant
and ϕ_ cos θ þ ψ_ ¼ ϕ_ ρ=R, which is also a constant, we find simply
F1 ¼ 0
mv2
F 2 ¼ mρϕ_ 2 ¼ ð8:8:37Þ
ρ
N ¼ mg
where v ¼ ρϕ_ is the constant speed of the center of mass along its circular path.
Using these results Prob. P8.8 explores the no-slip condition for this special case.
8.9 Problems
P8.1. For the fixed gyro-pendulum shown in Fig. 8.5, show that if the assembly is
released at an angle θ < π/2 with θ_ ¼ 0 and ϕ ¼ 0 then the assembly will
execute a purely conical motion (no nutation) with a constant precessional
angular velocity, ϕ_ , if initially we have
rffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
g
ϕ_ ¼ ðP8:1Þ
L cos θ 1 R2 =4L2
P8.4. In this problem we will solve the gyro-pendulum problem of Simulation 8.2
by writing Euler’s equations in terms of the intermediate x1a ; x2a ; x3a coordi-
nates, as used in the fixed gyro-pendulum problem, called the a-frame. To
explain in detail what we mean we will give a rather long introduction to the
problem so bear with me. In terms of a-frame coordinates the Euler’s equa-
tions become (dropping the (n) superscript as we only have a single body here)
I~OI α ~ B I~OI ω
~ ðBnÞ þ I Ω ~O
~B ¼ M ðP8:2Þ
where the tilde over all these terms means that they are measured in the
a-frame just as the overbar in Eq. (8.4.20) indicated that these terms were in
the body-fixed frame. Note that a-frame components are identical with body-
fixed frame components when ψ ¼ 0. In terms of 3-2-3 Euler angles the
angular velocity of the body and the angular velocity of the a-frame are given
by (see the fixed-gyro-pendulum problem for similar terms where ψ_ ¼ 0)
~B
Iω ¼ sin θϕ_ e1a þ θ_ e2a þ ϕ_ cos θ þ ψ_ e3a
ðP8:3Þ
~a
Iω ¼ sin θϕ_ e1a þ θ_ e2a þ ϕ_ cos θe3a
Note that
~B
Iω ~ a þ ψ_ e3a
¼ Iω
ðP8:4Þ
~a þω
¼ Iω ~s
The IO; 3 term is the same in both frames since the x3a -axis is the same
aas athe
body-fixed x3 . The moments of inertia (IO;1, IO;2 ¼ IO;1) along the
x1 ; x2 -
axes, respectively, are the same as those about the body-fixed x1 ; x2 -axes
since even though these two sets of axis differ by the spin angle, ψ, the
rotational symmetry of the body means that these moments of inertia in the
two frames are independent of this angle and hence equal.
542 8 General Spatial Dynamics of Rigid Bodies
The external moment in Eq. (P8.2) can be obtained directly by writing the
components directly in the a-frame, or one can simply set ψ ¼ 0 for the
moment terms seen in Eq. (8.5.14), giving
~ O;1 ¼ M ðt Þ sin θ
M
~ O;2 ¼ mgL sin θ
M ðP8:6Þ
~ O;3 ¼ M ðt Þ cos θ
M
The only remaining term we need to find is the angular acceleration term, I αB .
As done with the corresponding body-fixed term (see the discussion in Sect.
8.4) we can find this term with the transport theorem. We will repeat the use of
that theorem when using the a-frame components. Note that in Sect. 8.4 we
used a very explicit notation that we will repeat here. First, the angular
acceleration of the body in inertial coordinates was written as
d I I ωB
I αB ½I αB I ¼ ðP8:7Þ
dt I
to make it clear that the derivative of the angular velocity of the body was
being taken in inertial coordinates and the result of that differentiation was
also being expressed in inertial coordinates.
We transformed this angular acceleration to/from a body-fixed frame through
the rotation matrix, R, where
I αB ¼ RT I αB , I αB ¼ R I αB ðP8:8Þ
and the overbar indicated that this acceleration was in body-fixed coordinates.
The R matrix is here represented by the 3-2-3 set of Euler angles, i.e.,
R ¼ R(ϕ, θ, ψ). We can transform the angular acceleration between a set of
inertial axes to/from the a-frame in exactly the same fashion, namely
~B
Iα ¼ RaT I αB , I αB ¼ Ra I αB ðP8:9Þ
where the rotation matrix, Ra, only involves the Euler angles associated with
the 3-2 rotations, i.e., Ra ¼ R(ϕ, θ, ψ ¼ 0). Now consider the transport
theorem for the angular acceleration, using time derivatives Id/dt in an inertial
frame and ad/dt in an a-frame and where the final results of all terms are
expressed in the inertial frame:
8.9 Problems 543
I a
d I ωB d I ωB
I αB ¼ þ ½I ωa I ωB I ðP8:10Þ
dt I dt I
(a) Using the results just discussed obtain the equations of motion of the gyro-
pendulum for the 3-2-3 Euler angles (ϕ, θ, ψ) using Euler’s equations
(Eq. (P8.2)) written in a-frame coordinates.
(b) Solve the equations of motion obtained in (a) numerically for the same
parameters considered in Simulation 8.2 and show that your results agree
with those in that simulation.
P8.5. In this problem we will solve the gyro-pendulum problem of Simulation 8.2
by writing the moment equation directly in a-frame components, leading to
what is called the modified Euler’s equation. In this case the moment equation
written in terms of the angular momentum in inertial coordinates is, using the
very explicit notation described in Chap. 4 (see the use of this notation in Prob.
P8.4 also),
I
dLO
¼ ½ MO I ðP8:12Þ
dt I
If we multiply this equation by the rotation matrix RaT (see Prob. P8.4) to
transform to the a-frame coordinates we have
544 8 General Spatial Dynamics of Rigid Bodies
I a
dLO dLO
¼ þ ½I ωa LO a ¼ ½MO a ðP8:14Þ
dt a dt a
or, using the notation of Prob. P8.4 where a tilde indicates evaluation in the a-
frame coordinates,
~_ O þ I ω
L ~O ¼ M
~a L ~O ðP8:15Þ
~ O ¼ I~O I ω
L ~B ðP8:16Þ
and assume that the body is rotationally symmetric in the a-frame so that the
moment of inertia is a diagonal matrix with diagonal terms
I~O;1 ; I~O;2 ¼ I~O;1 ; I~O;3 . Also write (see Eq. (P8.4))
~B
Iω ¼ω~ 1 e1a þ ω
~ 2 e2a þ ω
~ 3 e3a
~a¼ ω
Iω ~ a1 e1a þ ω
~ a2 e2a þ ω
~ a3 e3a ðP8:17Þ
¼ω~ 1 e1a þ ω
~ 2 e2a þ ω
~ a3 e3a
same form as the moment equation used here about a fixed point, we can also
use these modified equations when we replace the fixed point O by the center
of mass point, C.
P8.6. Monitor the satisfaction of the constraint equation and its derivative in the
solution obtained in Simulation 8.3.
P8.7.
(a) Solve the rolling-disk problem of Sect. 8.8 numerically for the generalized
coordinates (XC, YC, ϕ, θ, ψ) using the augmented method. As an initial
check that your solution is valid, consider the special case discussed in
Sect. 8.8 where the disk rolls around in a circular path with no changes of
the nutational angle and constant precessional and spin angular velocities.
Let R ¼ 0.25 m, ρ ¼ 5R, θ(0) ¼ π/3 rad, and θ_ ð0Þ ¼ 0 (note that the mass
drops out of the equations). Also take ϕ(0) ¼ ψ(0) ¼ 0 and find the
remaining initial conditions as discussed in Sect. 8.8. Solve for and plot
the nutational angle, θ(t), and the spin angle, ψ(t), to show that they are
constant and linearly varying in time, respectively, over a time interval of
0–10 s. Also plot the X- versus Y-coordinates of the center of the disk to
show that the motion is indeed that of a circle.
(b) Repeat the solution of part (a) by changing the initial nutational angle to
θ(0) ¼ π/4 and by setting the initial values for the generalized coordinates
at time t ¼ 0 to be (XC, YC, ϕ, θ, ψ) ¼ (0, 5R, 0, π/4, 0), which
differs from part (a) only in the initial nutational angle. For the initial
velocities take ϕ_ ð0Þ; ψ_ ð0Þ to be the same values as found in part (a) but
for the initial nutational angular velocity take θ_ ð0Þ ¼ ψ_ ð0Þ=2. Finally, use
the constraint equations, Eq. (8.8.8), to calculate consistent values for
X_ C ð0Þ; Y_ C ð0Þ . Plot the same parameters as in part (a). What can you
deduce about the motion?
(c) The rolling-disk problem is a conservative problem so examine the total
energy during the motion obtained in parts (a) and (b) to ensure that the
total energy is conserved during the motion.
P8.8. Consider the special case examined in Sect. 8.8 where a disk rolls in a circular
path with a constant nutational angle. If the disk is a thin homogeneous disk of
radius 10 cm and it is given an initial speed v ¼ ρϕ_ ¼ 6 m/s at a nutation angle
θ0 ¼ 20∘, determine the radius of the circular path, ρ (note that you will have
to solve a quadratic equation), and find the minimum coefficient of friction
needed to prevent slipping. Is this a realistic value? (b) Repeat the analysis of
part (a) where the initial nutation angle is θ0 ¼ 60∘.
P8.9. The single-axis gyroscope of Fig. P8.1 is a device that can be used to measure
an angular velocity component of a vehicle. The gyroscope consists of a single
gimbal that can rotate about one axis and a spinning disk. A linear torsional
spring and torsional dashpot are attached to the axis of the gimbal to resist the
546 8 General Spatial Dynamics of Rigid Bodies
torsional
ψ spring
kθ
θ
xa , X
za
ΩZ
Z
ΩX
X
angular motion of the gimbal. Let (X, Y, Z ) be a reference frame attached to the
vehicle which has angular velocity components (ΩX, ΩY, ΩZ). The angular
motion of the gimbal relative to the vehicle is defined by the angle θ and the
spin of the disk is ψ_ .
(a) Express the total angular velocity of the rotor in the a-frame, (xa, ya, za),
and write the kinetic energy due to rotation only (neglect any translational
contributions). Model the spring and dashpot through the potential energy
and the Rayleigh dissipation function (see Chap. 7) as
1 1
V ¼ kθ2 , D ¼ cθ_ 2 ðP8:19Þ
2 2
(b) Assuming that θ is small and the spin of the disk is much larger than the
angular velocity components of the vehicle, linearize the equation of
motion. For the case when the angular velocity components of the vehicle
are slowly varying so they can be considered to be constants, show that the
steady-state solution of the linearized equation of motion is just
pψ
θ¼ ΩY ðP8:20Þ
k
Cθ
mg θ
φ x2′
O
φ Y
X
θ
x1′, x1a
Fig. P8.2). This follows the same steps outlined in Prob. P8.4 for the
gyro-pendulum.
(b) Using the equations obtained in (a) numerically solve for the motion of
the top. Choose different initial conditions as done in Simulation 8.3 to
illustrate cases where different types of motion for the top are seen (see
Fig. 8.12 for the corresponding gyro-pendulum motions).
P8.11. Consider again the spinning top of Prob. P8.10. Use the top properties in
Prob. P8.10. and the same 3-1-3 Euler angles to define the initial conditions.
(a) Obtain the equation of motion of the top by using Euler parameters and
Eq. (8.6.11). Leave your results in terms of H, IO and carry out all the
matrix multiplications numerically.
(b) Using the equations obtained in (a) numerically solve for the motion of
the top. Choose different initial conditions as done in Simulation 8.3 to
548 8 General Spatial Dynamics of Rigid Bodies
illustrate cases where different types of motion for the top are seen (see
Fig. 8.12 for the corresponding gyro-pendulum motions).
(c) Verify that the constraint equation for the Euler parameters is satisfied
during the motion.
References
F− = K s ( uk – uk −1 ) F+ = K s ( uk −1 − uk )
Δm
(b)
length (see Fig. 9.1a). The masses are all assumed to have displacements, u, only
along the x-axis. The generalized coordinates for this system of particles are just the
individual displacements, un, (n ¼ 1, 2, ...) of each mass.
If we examine the free body diagram of the kth mass, as shown in Fig. 9.1b, we
see that Newton’s second law for this mass is just
where Δx is the separation between any two particles in their equilibrium positions. If
the number of particles is large and the separation, Δx, is very small we expect that
this collection of particles will approximate a continuous rod where the displacement
will also be a continuous function of both the x-position and time, i.e., u ¼ u(x, t).
When Δx is small we have
ukþ1 uk ∂uðx; t Þ
ffi
Δx ∂x x¼kΔxþΔx=2
ð9:1:3Þ
uk uk1 ∂uðx; t Þ
ffi
Δx ∂x x¼kΔxΔx=2
If the cross-sectional area of the rod is A, then we can define a mass density, ρ, for
the rod as ρ ¼ Δm/AΔx. We will also define the elastic stiffness of a small section of
the rod of length Δx, E, as E ¼ KsΔx/A, where E has the dimensions of force/unit area
and is called Young’s modulus. In terms of those parameters we have
E ∂ uðx; t Þ
2
u€k ffi ð9:1:6Þ
ρ ∂x2
x¼kΔx
Now consider the limit as Δm,Δx ! 0 but with E and ρ both remaining finite
2
constants. Since we also have €uk ! ∂ uðx; t Þ=∂t 2 we obtain a partial differential
equation
2 2
1 ∂ u ∂ u
¼ 2 ð9:1:7Þ
c2 ∂t 2 ∂x
pffiffiffiffiffiffiffiffi
which is called the 1-D wave equation, with c ¼ E=ρ, where we will see that c is
the wave speed of disturbances. You might have noticed that if E is a finite constant
but also E ¼ KsΔx/A then as Δx ! 0 the spring constant, Ks, must go to infinity while
KsΔx remains constant. This makes sense since if you take a linear spring with a
given unstretched length D and stiffness Ks and cut it into two pieces, each piece will
have a stiffness, K, which is twice as stiff as the original spring (K ¼ 2Ks) and have a
new length d ¼ D/2 but the product Kd will be the same as the original spring; that is,
Kd ¼ KsD will remain constant. What about the internal force acting in the rod? If we
look at a small segment of the rod of length Δx the elongation of this segment will
also be small so let that elongation be Δu. Then the force acting on the small element
will be F ¼ KsΔu ¼ EAΔu/Δx and as the segment gets smaller, in the limit as Δx ! 0,
we have F ¼ EA∂u/∂x. The quantity εx ¼ ∂u/∂x is the elongation per unit length in
the continuous rod, a dimensionless quantity called the axial strain, εx. For more
general deformations of a deformable body there will be multiple strains. Strains are
important parameters as they measure the local deformation in a continuous body.
If we divide the total force, F, by the cross-sectional area of the rod we have
σ x ¼ F/A ¼ E∂u/∂x, where σ x is the axial stress (force/unit area) in the rod and
we have the stress-strain relation σ x ¼ Eεx, which is called Hooke’s law. For more
complex deformations there will be multiple stresses within a deformable body and
multiple strains. For a linear elastic body the stresses and strains are related through a
generalized Hooke’s law. Strength of materials and other mechanics courses cover
those more general descriptions for deformable bodies. Figure 9.2 shows an example
552 9 Dynamics of Deformable Bodies
(a)
(b)
Fig. 9.2 (a) A stationary rod, whose length is shown divided into multiple segments, and (b) the
same rod when it is excited so that a longitudinal wave is traveling in the rod causing segments to
change length as the wave propagates
where an initially stationary rod that is divided into multiple segments (shown in
Fig. 9.2a) is excited, causing a wave to propagate that changes the spacing of the
segments of the rod locally as the wave moves along the rod (Fig. 9.2b). In reality a
wave propagating along the rod will also cause the cross-sectional area to change
but we have not shown those changes (which can be expressed in terms of the
x-displacement of the rod) in Fig. 9.2.
As mentioned in the introduction to this chapter, the wave equation appears in a
wide range of problems and governs, for example, the propagation of electromag-
netic, seismic, and acoustic disturbances. For the problem that we are considering
here, the wave equation governs the propagation of longitudinal elastic waves in the
rod. The quantity c is the wave speed of those disturbances. While the dynamics of
rigid bodies leads to ordinary differential equations, the motion of deformable bodies
requires the solution of partial differential equations like the wave equation. A
general solution for the 1-D wave equation is in the form
where f and g are arbitrary functions, where f(t x/c) represents a wave of constant
form propagating in the positive x-direction with wave speed, c, and g(t+x/c)
represents a wave of constant form propagating in the negative x-direction with
that same wave speed. You can easily verify that these are exact solutions by
plugging them into the wave equation. We will see how to obtain these types of
solutions for different wave motion problems numerically. Unlike the dynamics of
rigid bodies, which often leads to nonlinear equations, the wave equation is linear.
Thus, while solving partial differential equations is substantially harder than solving
ordinary differential equations, having linear partial differential equations like the
wave equation means that there are a wide variety of analytical tools that can be used
to help solve those equations. However, for deformable bodies of complex shapes
and varying material properties numerical solutions are required. Two commonly
used numerical methods are the methods of finite differences and the method of finite
elements. In the next subsection we examine the method of finite differences.
9.1 Longitudinal Wave Motion 553
u ( x1 , t ) u ( x2 , t ) u ( x3 , t ) u ( xK , t )
x
Δx xK
x1 x2 x3
Fig. 9.3 Modeling the motion of a rod at discrete locations in the finite differences method
The method of finite differences uses a discrete model to solve for the motion of a
rod at specific locations along the rod, xk ¼ (k 1)Δx (k ¼ 1, 2, . . ., K ), where
k ¼ 1 corresponds to the left end of the rod at x ¼ 0 and k ¼ K is at the right-hand end
x ¼ L, which is divided into K-1 small segments of length Δx (Fig. 9.3). If you go
back to a calculus book you will see that the second-order derivatives of a function
can be approximated by a central difference formula that relates the second deriv-
ative to values of the function at discrete locations. For a function of one variable,
f(x), for example, we have
This approximation can be used on both the time and spatial derivatives for the
displacement of the rod to give
2
∂ uðxk ; t Þ uðxk ; t þ Δt Þ 2uðxk ; t Þ þ uðxk ; t Δt Þ
ffi
∂t 2 Δt 2
2
ð9:1:10Þ
∂ uðxk ; t Þ uðxk þ Δx; t Þ 2uðxk ; t Þ þ uðxk Δx; t Þ
ffi
∂x2 Δx2
If we call time t the current time, we see in Eq. (9.1.11) that there is a term at the
future time, t + Δt, and a term at the past time, t Δt, as well as terms at the current
time. We can solve for the future time term as a function of the current and past time
terms as
uðxk ; t þ Δt Þ ¼ r 2 ½uðxk þ Δx; t Þ þ uðxk Δx; t Þ þ 2 1 r 2 uðxk ; t Þ
uðxk ; t Δt Þ ð9:1:12Þ
where r ¼ cΔt/Δx. Now let’s use Eq. (9.1.13) to solve a specific problem for the rod,
where we drive the left end of the rod with a known displacement and hold the right
end fixed (zero displacement). In this case we have u(x1, t) ¼ h(t) and u(xK, t) ¼ 0.
The objective is to determine the displacements as a function of time at all of the
other locations, xk, for k ¼ 2,3,. . .,K 1. Equation (9.1.13) is an updating formula
that allows us to calculate those unknown displacements. To describe how this
updating works it is instructive to set up the problem in a form that can be coded
in MATLAB®. In the updating formula of Eq. (9.1.13) we see that there are values of
the displacements at past, current, and future times so let’s place those values in three
arrays called past, current, and future. The past array will hold the values at time
t Δt, the current array will hold the values at time t, and the array future will hold
the values at time t+Δt. The updating formula, Eq. (9.1.13), then can be written for
elements k ¼ 2, 3,. . ., K-1 in these arrays as
futureðkÞ ¼ r2 ½currentðk þ 1Þ þ currentðk 1Þ þ 2 1 r 2 currentðk Þ
pastðk Þ ð9:1:14Þ
To begin with the rod is stationary (i.e., we have zero initial conditions) so we will
initialize all the elements of the past, current, and future arrays with zeros. In
MATLAB® this gives
We now need to calculate the elements of the future array. This is accomplished
with the updating formula, starting at time t ¼ 0 and extending to some final time,
tmax, specified by the user. At each time we need to apply the updating for all the
elements k ¼ 2, 3,. . ., K-1. One could use loops to perform both the space and time
updates but in MATLAB® we can use array operations, which are faster, to handle
all the spatial components of the arrays and only use an explicit loop to step through
all the times. Thus, our updating formulae (and subsequent actions) are:
9.1 Longitudinal Wave Motion 555
for t = 0:dt:tmax
% perform updating over all interior points
We see that at any time, t, the values of all of the interior points in the future array,
going from point 2 to point K-1, are obtained from the updating formula. Then the
end values at point 1 and point K are set equal to their known values. We have
performed the interior point updating first before applying the values at the bound-
aries since in some cases, as we will see, the boundary conditions may depend on the
values at the interior points. After the all updating occurs at any given time t then the
values of the current array are assigned to those of the past array and the values of the
future array are assigned to those of the current array. This initializes those arrays
with their proper values for the next time, t + dt, before performing the next updating
to calculate the next future array values. Obviously, this entire process continues for
t + 2dt, t + 3dt, etc. over all the specified times.
values) then L/dx will be rounded to the nearest integer. This will change the value of
dx slightly so this new value of dx being used will be displayed in the command
window. The default r parameter, which is called the Courant number, in this case is
r ¼ cdt/dx ¼ (5)(0.01)/(0.1) ¼ 0.5. This is a very important parameter since it can be
shown that the updating procedure we are using is only stable if r 1. Thus, when
choosing dx and dt values that are different from the default values it is important
that the Courant number satisfies this stability criterion. The script will check this
condition and generate an error if r > 1. The script wave_1D_sim sets up the default
parameters; initializes the past, current, and future arrays; and then implements the
iterative updating over the time interval [0, tmax]. Since a large number of iterations
occur, the script plots the current displacements in the rod only after every Nframe
iterations (i.e., the number of time “frames” calculated), where the default value for
Nframe is Nframe ¼ 10. This will generate an animation of the motion. A small
pause between plots is specified by the parameter tplot. The default value is
tplot ¼ 0.01 s but this can be changed (as well as Nframe), if necessary, to adjust
the speed of the animation.
Executing the script will show a waveform in the form of a positive half-cycle
sine wave propagating to the right. When the wave reaches the end x ¼ L it will be
reflected, producing a waveform of the same shape but with the opposite sign
traveling to the left. The wave will then be reflected off the end x ¼ 0 and travel
to the right again as a positive waveform until it reaches the end x ¼ L again, at
which time the simulation stops. With these default parameters the finite difference
solution will be very good but you will notice a small “ringing” in the tail of the
traveling waveform at later times which is due to numerical errors (see Fig. 9.4a).
There is also a slight rounding of the leading edge response of the waveform which is
not as evident. Remarkably, we can eliminate all the numerical errors completely and
generate an exact numerical solution to the 1-D wave equation by choosing the
parameters such that r ¼ 1. Thus, if we change dx to dx ¼ 0.05 in the command
1.2
0.8
0.6
0.4 numerical
errors
0.2
-0.2
0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100
(a) (b)
Fig. 9.4 (a) Finite difference solution of the 1-D wave equation, r ¼ 0.5, showing small numerical
errors, and (b) the finite difference solution for r ¼ 1.0, which satisfies the “magic time step” value
where the numerical solution is exact. Both waves are shown at approximately the same time after
the wave has been reflected from both the right and left ends
9.1 Longitudinal Wave Motion 557
2
1.5
1
0.5
0
-0.5
-1
-1.5
-2
0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100
(a) (b)
Fig. 9.5 (a) Finite difference solution of the 1-D wave equation, r ¼ 0.5, showing large distortions
of a traveling “box” function due to numerical errors, and (b) the finite difference solution for
r ¼ 1.0, which produces an exact solution. Both waves are shown at the final time, tmax
window and leave all the other parameters the same, we will have r ¼ 1 and when
executing the script under this condition even the small numerical errors previously
seen will vanish. This happens because for r ¼ 1 we have Δx ¼ cΔt so that each time
calculation is done at exactly the time it takes a wave traveling with the wave speed
c to reach the next evaluation point. Having numerical solutions generate exact
results is rare and so this choice is called the magic time step. As Fig. 9.4b shows, at
the magic time step the waveform is indeed a propagating undistorted half-cycle sine
wave. A more dramatic example of the effects of the magic time step can be
seen if we choose a driving function that has discontinuities. For example, if we
set future(1) ¼ (t < pi) – (t < pi/2), this will generate a “box” function. If we modify
the wave_1D_sim script with this change and use the default parameters (r ¼ 0.5) we
will see a highly distorted propagating box waveform, shown at the final time tmax in
Fig. 9.5a. However, if we change the dx value to dx ¼ 0.05 to generate the magic
time step again before executing the script, we will indeed see a perfect propagating
box function as shown in Fig. 9.5b at the final time tmax. We could, of course, have
instead refined the grid and time steps for the r ¼ 0.5 case to try to reduce these
numerical errors but for functions with discontinuities in value or slope we cannot
expect to eliminate them entirely if the magic time step is not used. Unfortunately,
for wave propagation in 2-D and 3-D it is more difficult to set up similar exact
conditions for the finite difference grid of points and times since waves can travel in
many different directions and thus their distance of propagation in a single time step
will not always be matched to the distance between grid points. One can, however,
greatly reduce numerical errors such as those shown in Fig. 9.5a even when r is not
equal to one by choosing driving functions that are very smooth (i.e., have contin-
uous values and derivatives). Gaussian functions, for example, have this property
and so are a popular choice.
Our simulations show that specifying a zero displacement condition at a boundary
causes the waveform to reflect from that boundary. When executing wave_1D_sim
with its default parameters, reflections off both ends of the rod satisfy zero
558 9 Dynamics of Deformable Bodies
displacement conditions since the driving displacement at the left end is also zero at
the times when the waves reach this boundary. At a fixed boundary we see that the
reflected wave always has an opposite sign to the incident wave so we say the
reflection coefficient (amplitude of the reflected wave divided by the amplitude of
the incident wave) is equal to minus one. If the rod has a force-free end (or,
equivalently, a stress-free end) we will also have reflections but the reflected wave
will have the same sign as the incident wave and the reflection coefficient will be
plus one. Since at a free end the stress, σ x (force/unit area), is zero and, as we
showed previously, σ x ¼ E∂u/∂x it follows that at a free end ∂u/∂x ¼ 0, which
we can satisfy at, say, the right end of the rod, x ¼ L, by approximating the
derivative there (at x ¼ xK) by [u(xK, t) u(xK 1, t)]/Δx ¼ 0 at any time t, which
would give u(xK, t) ¼ u(xK 1, t) leading to the boundary condition
If we change the script wave_1D_sim to use Eq. (9.1.15) and run the changed script
you will see that the wave reflects but does not change sign at x ¼ L but it still reflects
with a change of sign at x ¼ 0 since the displacement is zero there again at the time of
reflection. Fig. 9.6a shows the half-cycle sine curve wave after it has reflected from
x ¼ L, and Fig. 9.6b shows the wave after having reflected at the x ¼ 0 boundary.
Note that if we have a problem where the left-hand end of the rod is stress free we
can similarly approximate the boundary condition there as u(x2, t) ¼ u(x1, t) and use
this condition to obtain
Under most boundary conditions the boundaries reflect waves. A finite difference
grid will always have boundaries since the mesh of evaluation points will, like the
2
1.5
1
0.5
0
-0.5
-1
-1.5
-2
0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100
(a) (b)
Fig. 9.6 (a) The wave reflected from a stress-free end at x ¼ 100 mm, and (b) the wave reflected
from x ¼ 0, which acts as a fixed end since the driving displacement is zero during the reflection at
this end
9.1 Longitudinal Wave Motion 559
rod, always be finite. This is not a problem if we want to include the boundary
reflections in our simulation, but it complicates matters if we want to look at wave
interactions within a region that do not include reflections from the boundaries of the
mesh. We can, of course, in principle simply use a very large mesh so that any
reflected waves do not arrive at the points of interest until very long times, but this is
often impractical because of limited computational resources. An alternative is to try
to define a boundary condition that does not reflect any wave incident on it, i.e., to
generate an absorbing boundary condition. For the 1-D wave equation we can
actually design a boundary condition, called the Mur boundary condition that is a
perfect absorber. We will not go into the details of how the Mur boundary condition
is obtained (see Prob. P9.1) but simply state it here. For the right boundary, xK ¼ L,
for example, we would have
r1
uðxK ; t þ Δt Þ ¼ uðxK1 ; t Þ þ ½uðxK1 ; t þ Δt Þ uðxK ; t Þ ð9:1:17Þ
rþ1
r1
futureðK Þ ¼ currentðK 1Þ þ ½futureðK 1Þ currentðK Þ ð9:1:18Þ
rþ1
r1
futureð1Þ ¼ currentð2Þ þ ½futureð2Þ currentð1Þ ð9:1:19Þ
rþ1
Notice that at the magic time step r ¼ 1 so these absorbing boundary conditions
become
futureðK Þ ¼ currentðK 1Þ
ð9:1:20Þ
futureð1Þ ¼ currentð2Þ
which makes sense since in that case the wave travels from an interior point
immediately adjacent to the boundary to the boundary point in exactly one time
step and, if no reflection occurs at the boundaries, the boundary values must be the
same as the values in the rightward-propagating or leftward-propagating wave at
those immediately adjacent interior points and one time step earlier.
You can easily demonstrate an absorbing boundary condition with
wave_1D_sim. Replace the fixed boundary condition at x ¼ L with the absorbing
boundary condition of Eq. (9.1.18) and save the changed script. Change the value of
tmax to tmax ¼ 25 in the command window since we only want to examine the wave
as it traverses the rod once. Finally, execute the script. You should see that the wave
simply crosses the rod and disappears without any reflections taking place.
Figure 9.7, for example, shows the wave at t ¼ 21 μs showing that the boundary
indeed acts as if it were transparent to the incident wave.
560 9 Dynamics of Deformable Bodies
d 2 uð x k ; t Þ c2
¼ ½uðxkþ1 ; t Þ 2uðxk ; t Þ þ uðxk1 ; t Þ ð9:1:21Þ
dt 2 Δx2
which, for k ¼ 2 to k ¼ K-1, is just a set of ordinary differential equations for the
unknown interior displacements. We can write this system as
8 9 2 38 9 8 9
>
> u2 >> 2 1 0 ... ... 0 > > u2 >> >
> u1 ð t Þ >
>
> >
> > u3 >
> > > >
>
> u
> 3 > > 6
6 1 2 1 0 ... 0 7
7>> >
>
>
>
> 0 > >
>
d2 < = c2 6 7 < = c 2 < =
¼ 26 7 þ
dt 2 >
> ⋮ > > Δx 66⋮ ⋮7 7>> ⋮ > > Δx2 >
> ⋮ > >
> >
> > >
> > >
>
>
> >
>
4 0 ... 0 1 2 1 5>>
> >
>
>
>
> 0 > >
>
: ; : ; : ;
uK1 0 ... 0 1 2 uK1 uK ð t Þ
ð9:1:22Þ
where uk(t) u(xk, t). If we define the vector U ¼ [u2, u3, . . ., uK 1]T and the vector
b ¼ (c2/Δx)[u1, 0, . . ., 0, uK]T and let B be (c2/Δx) times the 2 2 matrix appearing in
Eq. (9.1.22), then this system of second-order equations can be expressed simply as
€ ¼ BU þ b
U ð9:1:23Þ
Assuming that u1(t) and uK(t) are known (and both are not zero so we have a driving
term) this is a linear system of second-order ordinary differential equations that can
easily be placed into a system of first-order ordinary differential equations and
solved, under appropriate initial conditions, by a solver such as ode45, as we have
done before. However, because the system is a linear system and because the matrix
B is a sparse tridiagonal matrix (i.e., it contains nonzero elements only along its main
diagonal and the two immediately adjacent diagonals), there are other options for
9.1 Longitudinal Wave Motion 561
solvers that might be more efficient. Equation (9.1.21) is called a semi-discrete form
of the wave equation in contrast to the fully discrete form used in the method of finite
differences. Solving Eq. (9.1.22) involves solving a very large system of equations
so that it could be a challenge. We can view the difference formula used for the time
variable in the finite differences method as a specific choice of an ordinary differ-
ential equation solver that uses an explicit time stepping method to efficiently obtain
the solution to Eq. (9.1.23).
Modeling the rod in the semi-discrete form is essentially going back to the
particle model that we started out with for the rod since Eq. (9.1.2) for the system
of particles can be written as
which is just Eq. (9.1.21) expressed in terms of different constants. The finite
difference formulation is thus also just a fully discrete form of the particle model.
However, the finite difference method can be applied to many other partial differ-
ential equations and more complex cases so the method has broad applicability to
other problems. Problem P9.2, for example, shows how to use finite differences to
solve for the 1-D waves in an inhomogeneous bar where the material properties vary
along its length.
Since the 1960s, when computers first became capable of solving significant engi-
neering problems, the method of finite elements has grown to become one of the
most widely used numerical approaches in a range of engineering applications,
including dynamics. Like finite differences, finite elements are applicable to the
solution of the partial differential equations that describe the motion of continuous
bodies. To see the differences (and similarities) with the finite difference method, we
will use the one-dimensional wave equation for a rod again as a specific example. To
solve the wave equation in the rod the finite element method, like the finite difference
method, will solve for the displacements in the rod at a number of discrete positions,
uk(t) ¼ u(xk, t) (see Fig. 9.3). In finite elements these displacements are called the
nodal displacements. Unlike finite differences these discrete positions need not be
equally spaced in the finite element method, but to compare finite elements with
finite differences we will assume that xk+1 xk ¼ Δx, where Δx is a constant. To
approximate the continuous function u(x, t) in terms of the nodal displacements we
will use a set of approximating functions, ϕk(x), that are nonzero only over small
finite portions (i.e., elements) of the rod but which collectively can be used to
describe the motion of the entire rod, i.e., we take
562 9 Dynamics of Deformable Bodies
X
K
uðx; t Þ ¼ u j ðt Þ ϕk ðxÞ ð9:1:25Þ
k¼1
The ϕk(x) are called shape functions. Often these shape functions are expressed in
terms of polynomials. For example, one can take combinations of linear functions
where
8 ε
>
> þ 1 Δx ε 0
>
< Δx
ϕk ð xÞ ¼ 1 ε 0 ε Δx ð9:1:26Þ
>
> Δx
>
:
0 otherwise
where ε ¼ x xk is the distance measured from the node point x ¼ xk. These
functions represent “hat” functions (Fig. 9.8a) that we can use to cover the entire
region of the rod (Fig. 9.8b). Note that these shape functions satisfy ϕk(xk) ¼ 1,
ϕk(xj) ¼ 0 ( j 6¼ k), so that if we multiply the shape functions by the nodal
displacements, as done in Eq. (9.1.25), we obtain a piecewise linear approximation
to the continuous displacement, u(x, t) (Fig. 9.9) where u(xk, t) ¼ uk(t). We will use
these functions to determine the governing equations for the motion for all the
interior points of the rod, uk (k ¼ 2, . . ., K 1), again assuming that the rod is
driven at the left end (u1 ¼ h(t)) and fixed at the right end (uK ¼ 0). First, multiply the
wave equation by the interior shape functions ϕj ( j ¼ 2, . . ., K 1) and integrate
over the length of the rod to obtain
φk ( x )
ε = x − xk
1.0
φ1 φ2 φK −1 φK
Δx Δx
xk −1 xk xk +1 x x1 x2 xK −1 xK
x=0 x=L
(a) (b)
Fig. 9.8 (a) A localized linear shape function, and (b) a covering of the entire rod length with these
shape functions (the functions are shown alternately as solid and dashed lines to better distinguish
the individual functions, which are overlapping)
9.1 Longitudinal Wave Motion 563
0 L x
ðL !
2 2
∂ u 2∂ u
c ϕ j ðxÞdx ¼ 0 ðj ¼ 2; . . . ; K 1Þ ð9:1:27Þ
∂t 2 ∂x2
0
In this form we cannot use linear shape functions to approximate the displacement
since all the second derivatives would then vanish, but if we integrate Eq. (9.1.27) by
parts and use the fact that ϕj(0) ¼ ϕj(L) ¼ 0 for all j ¼ (2, 3,. . ., K-1) we find what is
called the weak form of Eq. (9.1.27), namely
ðL !
2
∂ u 2 ∂u
dϕ j
ϕ þc dx ¼ 0 ðj ¼ 2; . . . ; K 1Þ ð9:1:28Þ
∂t 2 j ∂x dx
0
If we now place our approximation for the displacement, Eq. (9.1.25), into
Eq. (9.1.28) we obtain
X ðL X ðL
K
d 2 u k ðt Þ K
dϕk dϕ j
2
ϕk ðxÞϕ j ðxÞdx þ c 2
u k ðt Þ dx
k¼1 dt k¼1
dx dx
0 0
¼0 ðj ¼ 2; . . . ; K 1Þ ð9:1:29Þ
ðL
M jk ¼ ϕ j ðxÞϕk ðxÞdx ðj ¼ 2; . . . ; K 1Þ, ðk ¼ 1; . . . ; K Þ
0
ð9:1:31Þ
ðL
dϕ j dϕk
K jk ¼ c2 dx ðj ¼ 2; . . . ; K 1Þ, ðk ¼ 1; . . . ; K Þ
dx dx
0
564 9 Dynamics of Deformable Bodies
Because the shape functions overlap only with their immediately adjacent func-
tions, in general the only nonzero elements of these matrices are Mj ( j1),Mj j,Mj ( j+1)
and Kj ( j1),Kj j,Kj ( j+1). For example, consider the evaluation of
ðL ð0 Δðx
ε 2 ε 2
Mj j ¼ ϕ2j ðxÞdx ¼ 1þ dε þ 1 dε
Δx Δx
0 Δx 0
ð1 ð0
2
¼ Δx v2 dv Δx w2 dw ¼ Δx
3
0 1
where we have let v ¼ 1+ε/Δx and w ¼ 1 ε/Δx. A similar evaluation of the other
two nonzero terms will give Mj ( j1) ¼ Mj ( j1) ¼ Δx/6. Similarly for Kj j we have
ðL
ð0 Δðx
dϕ j 2 c2 c2
K j j ¼ c2 dx ¼ 2 dε þ dε
dx Δx Δx
0 Δx 0
2c2
¼
Δx
and for the other two terms we would find Kj ( j1) ¼ Kj ( j+1) ¼ c2/Δx. If we look at
these matrices, therefore, we would have
2 3
1=6 2=3 1=6 0 ... 0 8 9
> €u1 >
6 0
6 1=6 2=3 1=6 0 ... 0 7>
7
> >
> >
>
6 7< €u2 =
ug ¼ Δx6
½M f€ 6 ⋮ ⋮ 7 7> > ⋮
6 7> > >
4 0 1=6 2=3 1=6 0 5> : >
> ;
€uK
0 0 ... 1=6 2=3 1=6
ð9:1:32Þ
and
2 3
1 2 1 0 ... 0 8 9
> u1 >
6 0
6 1 2 1 0 ... 0 7>
7
> >
> >
>
c2 6 7 < u2 =
½ K fug ¼ 6 ⋮ 7
⋮7 ⋮ ð9:1:33Þ
Δx 6
6 7>> > >
4 0 1 2 1 0 5>: >
> >
;
uK
0 0 ... 1 2 1
Note that these are still non-square matrices. The matrix [M] is called the “mass”
matrix since it multiplies the nodal acceleration terms. This matrix is also called a
consistent mass matrix since it was obtained by weighting the acceleration terms at
9.1 Longitudinal Wave Motion 565
the nodes consistent with the assumed shape functions. In the particle model of the
rod, however, each actual mass was only associated with an individual nodal
acceleration so the mass matrix was diagonal. In using finite elements to solve
dynamics problems it is common practice to replace the consistent mass matrix by
a lumped mass matrix consisting only of diagonal matrix terms. This is often done
for computational efficiency, but it can also be viewed as using an equivalent particle
model of the continuous rod. To obtain the lumped mass matrix here we merely have
to sum the values (1/6, 2/3, 1/6) in each row and replace the middle value (2/3) by
that sum, which here is 1/6 + 2/3 + 1/6 ¼ 1. Thus, in terms of a lumped mass matrix,
M~ , we have
2 38 9
0 1 0 0 ... 0 > > u€1 >
>
6 0 >
> >
>
6 0 1 0 0 ... 0 7
7 €u2 =
<
M ug ¼ Δx6
~ f€
6⋮
7
⋮7 ⋮
> > >
4 0 0 1 0 0 5> > >
> >
: ;
2 0 0 ... 308 1 90 €u8 9
K
ð9:1:34Þ
1 0 0 ... 0 > > €u2 >
> >
> €u2 >
>
> >
> > >
6 0
6 1 0 7 >
7< €u3 = < €u3 >
> =
¼ Δx6
6⋮ 1 ⋮7 7 ⋮ ¼ Δx ⋮
> >
> > >
>
4 0 1 0 5>>
> >
>
>
>
> >
>
: ; : ;
0 0 ... 0 1 €uK1 €uK1
where the first and Kth columns of the lumped mass matrix are all zeros so that we
can eliminate them and obtain
a square (K-2) (K-2) identity matrix involving only
the interior accelerations €u2 ; €u3 ; . . . ; €uK1 . The [K] matrix is called the “stiffness”
matrix since it multiplies the displacements at the nodes just as a discrete set of
spring constants would do in a spring-particle model. This non-square matrix term
can also be reduced to a square (K-2) (K-2) matrix involving only the interior
displacements (u2, u3, . . ., uK1) by removing the first and Kth columns, which
involve only the known end displacements, and placing them into a separate
known vector so that we have
2 3
2 1 0 0 8 9 8 9
6 1 7>
> u2 >> >
> u1 >
>
6 2 1 ⋮ 7>>
< u
>
>
=
>
>
<
>
0 >
=
c2 6 7 3
c 2
½ K f ug ¼ 6 ⋮ 7 ⋮ ⋮ ð9:1:35Þ
Δx 6 7>
7> >
> Δx >> >
6
1 5>
> >
> >
> 0 >
>
4 0 1 2 : ; : > ;
uK1 uK
0 0 ... 1 2
If we place Eq. (9.1.34) and Eq. (9.1.35) into Eq. (9.1.30) and divide by Δx we
find
566 9 Dynamics of Deformable Bodies
8 9 2 38 9 8 9
>
> €
u2 >
> 2 1 0 ... ... 0 > > u2 >> >
> u1 ð t Þ >
>
> >
> > u3 >
> > > >
>
>
> €
u3 >
>
6 1
6 2 1 0 ... 0 77>
> >
>
>
>
> 0 > >
>
< = c2 6 7< = c 2 < =
¼ 26 7 þ
>
> ⋮ > > Δx 66⋮ ⋮7 7>
> ⋮ > > Δx2 >> ⋮ > >
> >
> > >
> > >
>
>
> >
>
4 0 ... 0 1 2 1 >5>
> >
>
>
>
> 0 > >
>
: ; : ; : ;
€
uK1 0 ... 0 1 2 uK1 uK ð t Þ
ð9:1:36Þ
m€u þ ku ¼ f ð9:1:38Þ
u(t)
k
f(t)
m
smooth
Fig. 9.10 A spring-mass system being driven by a known force, f(t), where the displacement, u(t),
is measured from the unstretched length of the spring
9.2 Problems 567
9.2 Problems
P9.1. The Mur perfectly absorbing boundary condition can be obtained by noting
that the second-order wave equation can be factored into two first-order
operators as
2 2
∂ u 1 ∂ u ∂ 1∂ ∂ 1∂
¼ þ u¼0 ðP9:1Þ
∂x2 c2 ∂t 2 ∂x c ∂t ∂x c ∂t
∂uþ 1 ∂uþ
þ ¼0 ðP9:2Þ
∂x c ∂t
∂u 1 ∂u
¼0 ðP9:3Þ
∂x c ∂t
1 uðxK ; t m Þ uðxK1 ; t m Þ uðxK ; t mþ1 Þ uðxK1 ; t mþ1 Þ
þ
2
Δx Δx ðP9:4Þ
1 uðxK ; t mþ1 Þ uðxK ; t m Þ uðxK1 ; t mþ1 Þ uðxK1 ; t m Þ
¼ þ
2c Δt Δt
1
ðuðxK Δx=2; t m Þ þ uðxK Δx=2; t mþ1 ÞÞ
2 ðP9:5Þ
1
¼ ðuðxK ; t m þ Δt=2Þ þ uðxK1 ; t m þ Δt=2ÞÞ
2c
which are both approximations for Eq. (P9.2) at the same point and time,
namely
∂u 1 ∂u
ðxK Δx=2; t m þ Δt=2Þ ¼ ðxK Δx=2; t m þ Δt=2Þ ðP9:6Þ
∂x c ∂t
(a) Show that Eq. (P9.4) yields the Mur boundary condition for a 1-D wave
traveling in the +x direction at the boundary point x ¼ xK.
(b) Derive the corresponding Mur boundary condition for a wave traveling in
the –x direction at the boundary x ¼ 0.
P9.2. The rod examples considered so far were for a homogeneous rod, i.e., one
whose properties were constant. Numerical methods such as finite differences,
however, can also handle wave propagation in inhomogeneous media. Con-
sider, for example, a rod whose Young’s modulus, E, and density, ρ, are both
functions of position, x. Recall that the internal force, F, acting in the rod is
given in terms of the displacement, u, by F ¼ EA∂u/∂x where A is the cross-
sectional area of the rod and E is Young’s modulus. Thus, if we isolate a small
element of length dx at a point x in the rod, as shown in Fig. P9.1, the net force
acting on this element is
∂F
F ðx þ dx; t Þ F ðx; t Þ ffi F ðx; t Þ þ dx F ðx; t Þ
∂x
ðP9:7Þ
∂F
¼ dx
∂x
and this net force must by Newton’s second law be equal to the mass, dm, of
this small element times its acceleration so that we have
2 2
∂F ∂ u ∂ u
dx ¼ dm 2 ¼ ρAdx 2 ðP9:8Þ
∂x ∂t ∂t
Placing the relationship between the force and displacement in Eq. (P9.8) and
using the fact that the area A is a constant, we find
2
∂ ∂u ∂ u
E ¼ρ 2 ðP9:9Þ
∂x ∂x ∂t
which is the equation for the motion of the rod when E ¼ E(x), ρ ¼ ρ(x). When
the rod is homogeneous this is just the 1-D wave equation.
We can replace Eq. (P9.9) by its approximation in terms of finite differences at
equally spaced discrete locations, xk, and times, tn. To keep the expressions
manageable, let us write
ρðxk Þ ¼ ρk
E ð xk Þ ¼ E k ðP9:10Þ
uðxk ; t n Þ ¼ ukn
ρ
2
∂ u
ρ ¼ k2 uknþ1 2ukn þ un1 ðP9:11Þ
∂t 2 Δt k
Δx2 ðP9:12Þ
E ½uðxkþ1 ; t n Þ uðxk ; t n Þ E½uðxk ; t n Þ uðxk1 ; t n Þ
¼
Δx2
570 9 Dynamics of Deformable Bodies
where
where
Δt 2 2
r2 ¼ C
Δx2 ref
þ
^ þ ¼ Ek , ^ E
k ¼
k
E E ðP9:16Þ
k
ρref C 2ref ρref C2ref
ρ
ρ^k ¼ k
ρref
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
In Eq. (P9.16) ρref is a reference density in the rod and Cref ¼ maxðE k =ρk Þ is
a reference wave speed that is the largest wave speed in the rod. Equation
(P9.15) is the generalization for the inhomogeneous rod of the updating
equation for the homogeneous case, Eq. (9.1.13), which can be written in
our current notation as
n
uknþ1 ¼ r 2 ukþ1 2ukn þ uk1
n
þ 2ukn un1
k ðP9:17Þ
A At
Ar
ρ1 , c1 ρ 2 , c2 ρ1 , c1 ρ 2 , c2
(a) (b)
Fig. P9.2 (a) An incident wave traveling in a rod whose density and wave speed in the first half are
(ρ1, c1) and (ρ2, c2) in the second half. (b) The reflected and transmitted waves generated by the
interaction of the incident wave with the interface at the center of the rod
Cref ¼ 5.0 mm/μs, which is the same wave speed in the homogeneous case.
This corresponds to a rod with a sudden change of properties at x ¼ L/2
pffiffiffiffiffiffiffiffiffi
(Fig. P9.2) where the wave speed in the first half of the rod is 12:5 mm/μs
and the wave speed in the second half is 5 mm/μs. This discontinuity in
wave speed will cause a reflected wave to appear and modify the ampli-
tude of a wave that is transmitted through the interface at x ¼ L/2, as the
animation should reveal (see Fig. P9.2b). The tmax ¼ 40 μs value was
chosen so that the wave does not reach the end of the rod but you can make
that value larger if you want to see subsequent end reflections.
(b) When a 1-D incident wave of displacement amplitude A is reflected and
transmitted at an interface between a homogeneous material with density
and wave speed (ρ1, c1) and a second homogeneous material with density
and wave speed (ρ2, c2) the amplitude ratio, Ar/A, of the reflected wave
displacement to the incident wave displacement and the amplitude ratio,
At/A, of the transmitted wave displacement to the incident wave displace-
ment can be shown to be given by (see problem P9.3)
572 9 Dynamics of Deformable Bodies
A r ρ1 c 1 ρ2 c 2
¼
A ρ2 c 2 þ ρ1 c 1
ðP9:18Þ
At 2ρ1 c1
¼
A ρ2 c 2 þ ρ1 c 1
These ratios are called reflection and transmission coefficients. [Note that the
displacement amplitudes in these ratios are all based on displacements in
the +x-direction. Many wave propagation books define the reflection coeffi-
cient in terms of ratio of displacements of the waves as measured in their
directions of propagation, which will give a reflection coefficient that is the
negative of the one seen in Eq. (P9.18) since the reflected wave is traveling in
the –x-direction.] Run your modified script and show that the amplitudes seen
in the animation are in agreement with these ratios (see Fig. P9.2).
P9.3. A 1-D wave traveling in the +x direction has the form f(t x/c) while a wave
traveling in the –x direction has the form g(t+x/c) where f and g are arbitrary
functions. Show that the Fourier transforms of these waves (see Appendix E)
have the forms F(ω) exp (ik x) and G(ω) exp (ik x), respectively, in terms of
the circular frequency, ω, where the wave number k ¼ ω/c and F(ω) and G(ω)
are the Fourier transforms of f(t) and g(t). The inverse Fourier transforms
in terms of ω then have integrands of the forms [F(ω)/2π] exp (ikx+iωt) and
[G(ω)/2π] exp (ikx+iωt). These integrands represent traveling plane harmonic
waves. Likewise, show that in taking the inverse Fourier transforms of these
harmonic waves we recover the original traveling waves.
P9.4. Consider an incident plane harmonic wave uinc ¼ A exp (ik1x+iωt) traveling
in a material whose density and wave speed are (ρ1, c1), respectively, where
k1 ¼ ω/c1 is the wave number for the material whose wave speed is c1. If this
wave strikes a plane interface at x ¼ 0 with another material whose density and
wave speed are (ρ2, c2), respectively (see Fig. P9.3), a reflected wave
ur ¼ Ar exp (ik1x+iωt) traveling in the first medium and a transmitted wave
ut ¼ At exp (ik2x+iωt) traveling in the second medium are generated, where
k2 ¼ ω/c2 in terms of the wave speed, c2, of the second medium. At the
interface x ¼ 0 the total displacement, u, is continuous, as is the internal force/
unit area (stress), σ x, where σ x ¼ ρc2∂u/∂x. Show that the reflection and
transmission coefficients Ar/A and At/A are given by Eq. (P9.18). The quantity
ρc appearing in these coefficients is called the mechanical or acoustic imped-
ance of a material.
P9.5. Explore solving the system of ordinary differential equations, Eq. (9.1.22),
numerically. This equation can be placed in the form given in Eq. (9.1.37) so
you can find many discussions on the web or in the literature on such
numerical solutions.
Appendix A: Matrices
Introductory courses in dynamics have been traditionally taught with the use of
scalars, such as lengths and masses, and vector quantities, such as forces, moments,
velocities, and accelerations. In modern treatments of these subjects, however, it is
extremely useful to also consider matrices. In fact, quantities that are normally
considered as just a collection of scalars, such as mass moments of inertia, are really
matrix quantities. Modern software packages such as MATLAB® can easily operate
with matrices, even those with many elements, in a very efficient manner so that
engineers can use these software tools to manipulate matrices with ease. In this
chapter, we give a brief introduction to matrices, using MATLAB®, to show specific
examples. More detailed treatments can be found in many references such as [1, 2].
A = [ 1 3; 3 5; 2 4; 6 7]
A= 1 3
3 5
2 4
6 7
where the semicolons are used to indicate the start of a new row in the matrix. The
dimensions of a matrix are N M, where N is the number of rows and M is the
number of columns in the matrix. In the above example, matrix A has the dimensions
(4 2). In many books, matrices are written either as symbols in brackets such as
[A] or as bold symbols, such as A, or in some cases as simply an upper case symbol
such as A when it is clear that the quantity being described is a matrix. All of these
notations are used in this book.
We can add or subtract matrices by simply adding or subtracting each element in
the arrays located at the same position (row, column). For example, consider the two
matrices, A and B, defined as
A = [ 1 2; 3 4]
A= 1 2
3 4
B = [3 3; 5 5]
B= 3 3
5 5
Then the sum of these two matrices, C ¼ A + B, is just the sum of their elements,
i.e.,
C = A+B
C=
4 5
8 9
Note that to add or subtract two matrices they must have the same dimensions.
To multiply (or divide) matrices by a scalar we simply multiply (or divide) each
element by the value of that scalar. For example, to obtain ten times the above matrix
C we would simply write
D = 10*C
D = 40 50
80 90
We can also define multiplication for matrices in the following manner. Let Amn
be the element at the mth row and nth column position in an array, A, of dimensions
(M N). Similarly for a matrix, B, of dimensions (N K) let Bnk be the element at
the nth row and kth column position. Then the matrix product of A and B, C ¼ AB, is
defined for each element of C as
X
N
Cmk ¼ Amn Bnk ðm ¼ 1; 2; . . . ; M Þ ðk ¼ 1; 2; . . . ; K Þ ðA:1:1Þ
n¼1
and C is an (M K) matrix. Many books write Eq. (A.1.1) for two matrices A and B
and their product matrix, C, as simply
C ¼ A B or C ¼ AB or ½C ¼ ½A½B
Note that for this multiplication to be meaningful we must have the number of
columns of A be equal to the number of rows of B but the other dimensions of A and
Appendix A: Matrices 577
A = [ 2 3; 1 5 ];
B = [ 2 2; 6 3 ];
where the semicolons at the end of each line in MATLAB® prevents the echoing of
the entered result, as seen in our earlier examples. In MATLAB® matrix multipli-
cation is again indicated by the “ * ” symbol so to multiply the above matrices
together we write
C = A*B
C = 22 13
32 17
which can be seen consistent with our multiplication rule, Eq. (A.1.1), since by that
rule C is a 2 2 matrix with elements:
It is important to realize, however, that even when the two matrices, A and B, are
of the same size, as in the previous example, ordinary matrix multiplication, A*B, is
not the multiplication of each element of A by the corresponding element of B, but
still follows the rule of Eq. (A.1.1). For equal-sized matrices, MATLAB® does also
578 Appendix A: Matrices
which is obviously different from our previously obtained matrix product A*B. This
type of multiplication does not appear in ordinary matrix algebra but is very useful in
tasks such as forming up and plotting the values of functions at multiple points. For
example, if we have the function y ¼ x ex and a series of x-values which we place in a
1 4 matrix:
x = [ 1 2 3 4 ];
we can find and plot the values of this function at those x-values by simply writing
y = x.*exp(x);
plot(x, y)
B*A
Ans = 6 16
15 33
2 3
m1 0 0
M¼4 0 m2 0 5
0 0 m3
then the square root and inverse square root of this positive definite matrix are just
2 pffiffiffiffiffiffi 3 2 pffiffiffiffiffiffi 3
m1 0 0 1= m1 0 0
pffiffiffiffiffiffi pffiffiffiffiffiffi
M1=2 ¼4 0 m2 0 5, M1=2 ¼ 4 0 1= m2 0 5
pffiffiffiffiffiffi pffiffiffiffiffiffi
0 0 m3 0 0 1= m3
These matrices have some of the same properties we expect for their scalar
counterparts, namely under matrix multiplication rules we have M1/2M1/2 ¼ M and
M1/2M1/2 ¼ I, where I is the identity matrix with ones on its diagonal and zeros
elsewhere. These diagonal matrices are only special cases of a positive definite
matrix. For a more extensive discussion of positive definite matrices, see [3].
One matrix operation that is used often is that of transpose. By definition, the
transpose of an M N matrix A is the N M matrix, AT, where the rows of matrix
A are the columns of AT, i.e., if we have the (2 4) matrix A:
A = [ 1 2 3 4; 5 6 7 8]
A= 1 2 3 4
5 6 7 8
A'
Ans = 1 5
2 6
3 7
4 8
One property of the transpose that we often find is useful to use is the relation
ðABÞT ¼ BT AT ðA:1:4Þ
i.e., the transpose of the product of two matrices is the product of the transpose of
those individual matrices, but taken in opposite order. We will not prove that result
here but you can experiment with some matrices in MATLAB® to see that this
relationship is true. In MATLAB®, the right-hand side of Eq. (A.1.4) would be
written as B'*A' and the left-hand side would be written as (A*B)'.
One important note about calculating the transpose with MATLAB® is that we
have been assuming that the elements of the matrix whose transpose we seek are all
real when we use A' to calculate the transpose. But if elements of A are complex then
computing A' also takes the complex conjugate of the elements as well as
interchanging of the rows and columns of A. Thus, if we want to ensure that we
only do the interchange of rows and columns, leaving the original elements
unchanged, in MATLAB® we must write the transpose as A.', i.e., we must include
a “dot” as well.
Vectors as Matrices
vN
represented as a column vector through the use of the bracket and transpose symbols,
[]T, and u and w are column vectors whose transposes, uT and wT, are row vectors.
These two row vectors have been combined into the single-row vector [uT wT] whose
transpose produces the column vector, v. The dimension of v is the sum of the
dimensions of u and w. We can write the same result in a much simpler fashion as
u
v¼
w
v1 = [ 1 2 3 5]
v1 = 1 2 3 5
v2 = [1;2;3;5]
v2 = 1
2
3
5
v2 = [1 2 3 5] '
v2 = 1
2
3
5
We can multiply two vectors, a and b, to form a product, a*b, with matrix
multiplication as long as we adhere to the matrix multiplication rule that the number
of columns of a equals the number of rows of b in the product ab. For example
v1 = [ 1 2 3 4];
v2 = [1;2;3;4];
d = v1*v2
d = 30
u v ¼ ½ ux uy uz ½ vx vy vz T
ðA:2:1Þ
¼ u x v x þ uy v y þ uz v z ,
In MATLAB®, the dot product can also be implemented with the built-in function
dot, i.e.,
v3 = [ 1 2 3 4];
v4 = [1 2 3 4];
d = dot( v3, v4)
d = 30
Now, consider what happens when we reverse the order and instead multiply the
previous column vector, v2, by the row vector v1 to obtain the product v2*v1:
v1 = [ 1 2 3 4];
v2 = [1;2;3;4];
p = v2*v1
p= 1 2 3 4
2 4 6 8
3 6 9 12
4 8 12 16
D = det(A);
X
N
jAj ¼ Aij Cij ðA:3:3Þ
j¼1
where we have also expanded the 2 2 sub-determinants present. In Eq. (A.3.3) the
same i appears in both the Aij and Cij because we are using the same rows in both
matrices. However, if the cofactors are taken from any other row than the ith row in
the expansion then the result is zero. We can summarize both of these results as
X
N
jAj i ¼ k
Aij Ckj ¼ ðA:3:4Þ
j¼1
0 i 6¼ k
X
N
jAj j ¼ k
Aij Cik ¼ ðA:3:5Þ
i¼1
0 j 6¼ k
We can simply write both Eq. (A.3.4) and Eq. (A.3.5) in matrix forms, as
where [I] is a N N identity matrix whose diagonal elements are all equal to one and
whose off-diagonal elements are zero. You can generate a N N identity matrix, I,
in MATLAB® via the eye function:
I = eye(N);
The above discussion of determinants, minors, and cofactors may seem rather
abstract to you but in fact those quantities have great importance in practice. This
is because many problems in mechanics lead to a set of simultaneous linear algebraic
equations for a set of unknowns which can be written in matrix-vector form as
½CT
fxg ¼ f bg ðA:4:3Þ
jAj
The adjugate of A divided by its determinant is called the inverse of the matrix A,
[A]1. From Eq. (A.3.6) we see that
and that the solution of the N N simultaneous equations of Eq. (A.4.1) is just
Appendix A: Matrices 585
½CT
½A1 ¼
jA j
for the inverse to exist the determinant of A cannot be zero. If the determinant of A is
zero then A is said to be singular and the solution of Eq. (A.4.5) is not valid. This
solution fails because the condition |A| ¼ 0 essentially means that all N equations are
not independent of each other.
In MATLAB® if we let B be the inverse of a square matrix A, this inverse can be
obtained with the inv function:
B = inv(A) ;
x = inv(A)*b ;
However, this is not the most efficient way to typically solve such linear equa-
tions and MATLAB® can also obtain the solution with the use of the “backslash”
operator ( \ ) where the solution x is obtained via
x = A\b ;
which is generally the preferred method of solution. We will not cover the details of
how these two methods differ here.
The inverse shares the same property as the transpose when we take the inverse of
the product of two non-singular square matrices, namely (see Eq. (A.1.4))
but note that in this form we must use the transpose of the matrix of coefficients
[A] instead of [A] itself. To solve Eq. (A.4.7) we can post-multiply both sides by
(A1)T and, after the use of Eqs. (A.1.4) and (A.4.4), obtain the solution for the row
vector {x}T as
586 Appendix A: Matrices
T
T T
fxgT ½AT A1 ¼ fxgT A1 A ¼ fxgT ½IT ¼ fxgT ¼ fbgT A1
which we can also obtain by simply taking the transpose of both sides of Eq. (A.4.5) and
using Eq. (A.1.4). In MATLAB®, we can solve this system of equations in this fashion
using the transpose of the inverse, but again MATLAB® has more efficient methods
which are preferred. If y ¼ {x}T is a row vector of unknowns, d ¼ {b}T is a row vector
of coefficients, and the matrix C ¼ AT, then the solution of the system of equations
yC ¼ d in MATLAB® is solved with the “forward slash” operator ( / ) in the form
y = d/C ;
as long as the inverse is non-singular so that it exists. In this case the matrix [A][A]T
is a square MxM matrix so that it can have an ordinary inverse. A singular inverse
again typically indicates that some of the rows of [A] are not independent; that is, the
constraints on the motion of the system are not independent. Remarkably, a unique
Appendix A: Matrices 587
minimum norm solution also exists when the constraints are dependent and the
ordinary inverse in Eq. (A.4.9) does not exist. In that case, a unique solution can still
be obtained to the undetermined system given by
{
fxg ¼ ½AT ½A½AT fbg ðA:4:10Þ
where (){ denotes the Moore-Penrose pseudoinverse of the square [A][A]T matrix.
Just as [A]1 can be implemented for a matrix A in MATLAB® with the function
inv(A), the pseudoinverse can also be implemented with the MATLAB® function
pinv(A). Going into the details of inverses and pseudoinverses is beyond the scope
of this book, but if you are interested in digging deeper into this subject, see [4] for
example. The minimum norm solution of an underdetermined system of linear
equations is important for dynamics since as shown in this book Gauss’s principle
of least constraint (or a generalization of his principle for nonideal constraint forces)
is equivalent to the laws of dynamics of rigid bodies and can be expressed as just
such a minimum norm problem.
References
1. H. Sneider, G.P. Barker, Matrices and Linear Algebra, 2nd edn. (Dover Publications,
New York, 1973)
2. S.J. Chapman, MATLAB® Programming for Engineers, 4th edn. (Thomson, Toronto, 2008)
3. R. Horn, C. Johnson, Matrix Analysis (Cambridge University Press, Cambridge, 1985)
4. C. Lawson, R. Hanson, Solving Least Squares Problems (Prentice-Hall, Englewood Cliffs,
1974)
Appendix B: Mass Moments and Products
of Inertia
The governing equations for the rotational motion of rigid bodies inherently involve
the mass moments and products of inertia of those bodies. We examined these types
of quantities for rigidly connected systems of particles in Chap. 3, for planar motion
problems of continuous rigid bodies in Chap. 5, and for 3-D motion of continuous
rigid bodies in Chap. 8. In this Appendix we want to provide an overview of the
moments and products of inertia involved in general 3-D motions of continuous rigid
bodies. Moments of inertia of some common shapes are given in Fig. B.5.
Definitions
The mass moments and products of inertia can be defined with respect to any
coordinates but normally the coordinates used will move and rotate with the rigid
body so that these inertia values of the body do not change during the motion. For
example, Fig. B.1 shows a rigid body (labeled as (n)) and an element of mass
dm ¼ ρdV at point P in that body located with respect to coordinates (x(n), y(n), z(n))
that rotate with the body and whose origin is a point A that translates with the body,
and where ρ is the density of the body (mass/vol) and dV is a differential volume
element. The mass moments and products of inertia can be defined as simply the
following integrals:
O x
ð
2
2
I ðxxnÞ ¼ ρ yðnÞ þ zðnÞ dV
Vn
ð
2
2
I ðyynÞ ¼ ρ xðnÞ þ zðnÞ dV
Vn
ð
2
2
I ðzznÞ ¼ ρ xðnÞ þ yðnÞ dV
Vn
ð ðB:1:1Þ
ðnÞ ðnÞ
I ðxynÞ ¼ I ðyxnÞ ¼ ρx y dV
Vn
ð
I ðxznÞ ¼ I ðzxnÞ ¼ ρxðnÞ zðnÞ dV
Vn
ð
I ðyznÞ ¼ I ðzynÞ ¼ ρyðnÞ zðnÞ dV
Vn
where I ðxxnÞ ; I ðyynÞ ; I ðzznÞ I ðxynÞ ; I ðxznÞ ; I ðyznÞ are called
are called moments of inertia and
h i
ðnÞ
products of inertia. We can place all these quantities in an inertia matrix, I A , given by
2 3
I ðxxnÞ I ðxynÞ I ðxznÞ
h i 6 ðnÞ 7
ðnÞ
IA ¼6
4 I yx I ðyynÞ I ðyznÞ 7
5 ðB:1:2Þ
I ðzxnÞ I ðzynÞ I ðzznÞ
where since I ðyxnÞ ¼ I ðxynÞ , I ðzxnÞ ¼ I ðxznÞ , and I ðzynÞ ¼ I ðyznÞ the inertia matrix is symmetric. One
can also show that this inertia matrix, like the mass matrix, is positive definite. This
property, as we will see, has some important consequences for the behavior of the
Appendix B: Mass Moments and Products of Inertia 591
-x x
y y
x
z
matrix. All the moments and products of inertia are in nonzero in general. However,
if any two coordinate axes (a, b) form a plane of symmetry for the body, then the
products of inertia associated with a coordinate axis (c) normal to that plane of
ðnÞ
symmetry will vanish, i.e., I ðacnÞ ¼ I bc ¼ 0. For example, consider the body shown in
Fig. B.2 which has the y–z plane as a plane of symmetry (a ¼ y, b ¼ z). Then (c ¼ x)
and we have I ðxynÞ ¼ I ðxznÞ ¼ 0. We can see in Fig. B.2 why the I ðxynÞ in particular should
vanish since the body is always composed of matching elements where one element
is located at (x, y) and an identical element is located at (x, y) so their contributions
to the product of inertia are xy dm and xy dm, which cancel.
The inertia matrix can be expressed in matrix-vector form in several ways. We
can write
h i ð n oT n o n on oT
ðnÞ
IA ¼ xðnÞ xðnÞ ½1 xðnÞ xðnÞ ρdV ðB:1:3Þ
Vn
where {x(n)} ¼ [x(n), y(n), z(n)]T, and [1] is the identity matrix,which elsewhere in this
book we have called [I]. In this Appendix we will use [1] to avoid confusing this
identity matrix with an inertia matrix. Note that {x(n)}T{x(n)} ¼ (x(n))2 + (yn)2 + (z(n))2.
Another, more compact form is
h i ðh iT h i ðh ih iT
ðnÞ
IA ¼ X ðnÞ X ðnÞ ρdV ¼ X ðnÞ X ðnÞ ρdV ðB:1:4Þ
Vn Vn
where [X(n)] is the skew matrix formed from the elements of {x(n)}, i.e.,
2 3
h i 0 zðnÞ yðnÞ
X ðnÞ ¼ 4 zðnÞ 0 xðnÞ 5 ðB:1:5Þ
yðnÞ xðnÞ 0
592 Appendix B: Mass Moments and Products of Inertia
The moments and products of inertia found in tables are often calculated with respect
to the centroid of a body, which is also the center of mass of the body if it is
homogeneous. See the table at the end of this Appendix for some examples.
However, in a dynamics problem we may need to calculate the moment of inertia
about another point. In the physical pendulum problem, for example, it is useful to
calculate the moment of inertia about the axis through the pendulum’s support rather
than its center of mass since the moment equation about the support gives the
equation of motion directly. If we know the values of inertia matrix with respect to
a set of axes at the center of mass then we can calculate the values with respect to any
other set of axes that are parallel to the center of mass axes through the parallel axis
theorem. Consider, for example, the body shown in Fig. B.3 where we assume that
we know the moments and products of inertia about the center of mass axes at point
C but we want to calculate the values instead about a set of parallel axes through
point A. From the geometry, we can locate an arbitrary element at point P with
respect to C or A through the vector relationship
xP=C ¼ xP=A þ fdg ðB:2:1Þ
where {d} ¼ [dx, dy, dz]T has components that are location of point A as measured in
the coordinate system at C. Then by the definition of the inertia matrix about point
A we have
ð
T T
½I A ¼ xP=A xP=A ½1 xP=A xP=A ρdV
ð V n
T T
¼ xP=C xP=C þ fdgT fd g 2 xP=C fd g ½1 ðB:2:2Þ
Vn
T
xP=C xP=C fdgfdgT 2 xP=C fdg ρdV
where we have dropped the (n) label on all the terms to make the expressions less
complex. We can collect the first and fourth terms of the integrand and recognize it
as the inertia matrix about point C and note that integration of the third and sixth
terms involving {xP/C} vanishes because the origin is the center of mass, leaving
ð
½I A ¼ ½I C þ fdgT fd g½1 fdgfd gT ρdV ðB:2:3Þ
Vn
but all the matrix elements are constants in the integration of Eq. (B.2.3), giving
finally
½I A ¼ ½I C þ m fdgT fdg½1 fdgfdgT ðB:2:4Þ
in terms of the mass, m, of the body. This equation can be expanded out more
explicitly as
2 3
d 2y þ d2z dx dy dx dz
6 7
½I A ¼ ½I C þ m4 dx dy d 2x þ d2z dy dz 5 ðB:2:5Þ
dx dz dy dz d 2x þ d2y
Equation (B.2.5) is the parallel axis theorem that allows us to shift the inertia
matrix values from those calculated about the center of mass C to those calculated
through a parallel set of axes at A. It is particularly useful when a given body can be
decomposed into simpler parts. Such bodies are called composite bodies. See
Chap. 5 where a composite body problem was considered for a simple planar
problem.
Rotation of Axes
The moments and products of inertia can change with a rotation of axes at a given point.
This is shown schematically in Fig. B.4. If we let the position vector from a point A to a
0
general point P in the body in (x, y, z) coordinates be {x} and let {x } represent the
0 0 0
coordinates (x , y , z ) of the same point P with respect to A in a rotated coordinate
0
system, then we can relate {x} and {x } through a rotation matrix, [Q], where
[Note: The rotation matrix Q here is not the rotation matrix considered in the text that
relates the body-fixed coordinates to inertial coordinates. The matrix Q is simply a
change from one coordinate system at A to another.] The inertia matrix in the rotated
coordinates, I 0A , is
594 Appendix B: Mass Moments and Products of Inertia
P
P
y y′
A
z A z′
x
x′
(a) (b)
Fig. B.4 (a) A given coordinate system for computing the moments and products of inertia with
respect to point A, and (b) a coordinate system at A that has a different orientation
ð
0
f x 0 g f x 0 g ½ 1 f x0 g fx 0 g
T T
IA ¼ ρdV
Vðn
¼ fxgT fxg½1 ½QfxgfxgT ½Q ρdV ðB:3:2Þ
Vðn
¼ ½QfxgT fxg½1½QT ½QfxgfxgT ½Q ρdV
Vn
where we have used the fact that the rotation matrix is orthogonal, [Q]T[Q] ¼
[Q][Q]T ¼ [I], and rewritten the first term since {x}T{x}[1] ¼ |x|2[1] ¼ |x|2[Q][1][Q]T ¼
[Q]{x}T{x}[1][Q]T. But we can take the rotation matrices outside the integration
so we find
0 1
ð
0
T
I A ¼ ½Q@ fxg fxg½1 fxgfxg ρdV A½QT
T
ðB:3:3Þ
Vn
¼ ½Q½I A ½QT
which is the rotational transformation relationship. Note that point A can be any point.
We can invert this relationship and also write
½I A ¼ ½QT I 0A ½Q ðB:3:4Þ
natural mode shapes of the vibration. In this case what does an eigenvalue problem
mean physically? If a body has three axes of symmetry, such as an ellipsoid, for
example, then the inertia matrix is diagonal and all the products of inertia vanish.
a given point and try to find a set of axes, like the ellipsoid,
Suppose we rotate axes at
where the inertia matrix I 0A is diagonal. Can we do that? The answer is yes. If I 0A is
diagonal let its diagonal components be (λ1, λ2, λ3). Now, consider Eq. (B.3.4) and
post-multiply both sides of that relationship by [Q]T. Then we find
2 3
λ1 0 0
½I A ½QT ¼ ½QT 4 0 λ2 05 ðB:4:1Þ
0 0 λ3
If we let the vector {u} be one of the columns of the matrix [Q]T we see that
Eq. (B.4.1) is equivalent to solving the eigenvalue problem:
where λ is one of the diagonal inertia matrix values. As we have seen before the
eigenvalue problem has a nontrivial solution if
and the eigenvectors can be normalized such that {uk}T{uk} ¼ 1 (k ¼ 1, 2, 3). It then
follows that we also have {ui}T[I]{ui} ¼ λi (i ¼ 1, 2, 3). Also as done in the vibration
problem we can place the eigenvectors as columns in an eigenvector matrix, [U],
where because of the normalization of the eigenvectors we have [U]T[U] ¼ [1], i.e.,
the eigenvector matrix is orthogonal. In terms of this eigenvector matrix we see that
the eigenvalue problem can be written in matrix form as
where [λ] is a diagonal matrix containing the eigenvalues. Comparing Eq. (B.4.5)
with Eq. (B.4.1) it appears that we simply have [U] ¼ [Q]T. This, however, may not
always be the case. If {ui} is an eigenvector then so is {ui} so there is some
ambiguity in those vectors and, hence, in the matrix [U]. If we choose the signs such
596 Appendix B: Mass Moments and Products of Inertia
that ({u1}, {u2}, {u3}) form a right-handed system, then det[U] ¼ + 1 and the [U]
matrix is a proper orthogonal transformation matrix, as is [Q]T. With that choice for
[U] we can set [U] ¼ [Q]T.
sphere
thin circular disk
z z
r r
C C
y y
t << r x x
1 2 I = I = 1 mr 2 2 2
I zz = mr xx yy I xx = I yy = I zz = mr
2 4 5
thin rod cylinder
z z
L/2
r L/2
C C y
y
L/2 L/2
x x
1 1 2 1 1
I zz ≅ 0 I xx = I yy = 12 mL I xx = I yy = mr 2 + mL2
2
I zz = mr
2 4 12
Fig. B.5 The moments of inertia with respect to the centroids (center of mass) of some simple
homogeneous bodies
Appendix C: Numerical Methods
Solving the equations of motion of dynamical systems usually requires the use of
numerical methods. Normally, as we have seen, before we attempt to solve the
equations of motion we write them as a system of first-order ordinary differential
equations of the form
x_ ¼ f ðx; t Þ
ðC:1:1Þ
xðt 0 Þ ¼ x0
Equation (C.1.1) is called an initial value problem, i.e., where we start with the
known values of the initial solution, x0, at time t0, and we want to determine x as a
function of the later times, t. There are numerous numerical methods for obtaining
such a solution, methods that you can study in detail in books and courses on solving
ordinary differential equations. Here, our objectives are much more modest and we
only want to give you a basic understanding of how a particular class of solvers work
that are used in the MATLAB® functions ode45 and ode4. Thus, we examine in this
Appendix only methods called single-step explicit methods. Specifically, we
describe single-step explicit Runge-Kutta methods, which are some of the most
popular solvers used for ordinary differential equations, and the ones that are used
exclusively in this book. The idea behind single-step explicit solvers is simple. If we
know the solution at a given time, tn, we numerically integrate the ordinary differ-
ential equations of Eq. (C.1.1) to obtain the solution at time tnþ1 and then repeat this
same process from time tnþ1 to tnþ2, tnþ2 to tnþ3, etc. over the entire time interval we
want to have the solution. To formally integrate on time the equations of motion in
Eq. (C.1.1) from tn to tnþ1, for example, we have
ð
t nþ1
We will examine this integration, assuming that we use a fixed step size
Δt ¼ tnþ1tn for all the time intervals. As you might expect, a given numerical
solver makes a particular choice of how the integration in Eq. (C.1.2) is performed.
A very simple choice would be to assume that the function f is slowly varying over
the time interval and simply take the integral to be the value of the function at the
starting time, tn, times the length of the interval, i.e.,
ð
t nþ1
giving
A more accurate estimate might take the integral to be the average of its two
values at the endpoints of the interval time times the length of the interval, i.e.,
ð
t nþ1
Δt
f ðxðt Þ; t Þdt ½f ðxðt n Þ; t n Þ þ f ðxðt nþ1 Þ; t nþ1 Þ ðC:1:5Þ
2
tn
which you might recall from calculus is called the trapezoidal rule. If we use the
trapezoidal rule in Eq. (C.1.2) we obtain
Δt
xðt nþ1 Þ ¼ xðt n Þ þ ½f ðxðt n Þ; t n Þ þ f ðxðt nþ1 Þ; t nþ1 Þ ðC:1:6Þ
2
Note that since we are trying to use Eq. (C.1.6) to obtain the value of the solution,
x(tnþ1), at time tnþ1, that solution is only given implicitly by Eq. (C.1.6) since x(tnþ1)
is also present within the function f on the right side of that equation. However, if we
use Eq. (C.1.4) to evaluate x(tnþ1) on the right side of Eq. (C.1.6) we have
Δt
xðt nþ1 Þ ¼ xðt n Þ þ ½f ðxðt n Þ; t n Þ þ f ðxðt n Þ þ Δt f ðxðt n Þ; t n Þ; t nþ1 Þ ðC:1:7Þ
2
Δt
xnþ1 ¼ xn þ ½f ðxn ; t n Þ þ f ðxn þ Δt f ðxn ; t n Þ; t nþ1 Þ ðC:1:8Þ
2
1 1
xnþ1 ¼ xn þ k1 þ k2 ðC:1:9Þ
2 2
where
k1 ¼ Δt f ðxn ; t n Þ
ðC:1:10Þ
k2 ¼ Δt f ðxn þ k1 ; t n þ Δt Þ
Equations (C.1.9) and (C.1.10) are called the classical second-order Runge-Kutta
integration method. It uses a fixed step size, Δt, for each interval, and we can apply it
to any first-order system of ordinary differential equations by simply supplying the
appropriate function f(x(t), t) and evaluating that function at the argument values
given in Eq. (C.1.10). This method is normally not developed through the steps
shown above but instead through a Taylor series expansion of the function f in the
time interval, but we will not give the details of such a derivation here. Since the
expansion extends to two derivatives this is called a second-order method where the
local truncation error used in approximating the integral is O(Δt3). It is also called a
two-stage method because it requires, for each time interval, evaluations of the two
functions k1 and k2. Much more accurate and popular than the second-order method,
however, is the classical fourth-order Runge-Kutta method, which is given by
1 1 1 1
xnþ1 ¼ xn þ k1 þ k2 þ k3 þ k4 ðC:1:11Þ
6 3 3 6
where
k1 ¼ Δt f ðxn ; t h Þ
1 Δt
k2 ¼ Δt f xn þ k1 ; t n þ
2 2
ðC:1:12Þ
1 Δt
k3 ¼ Δt f xn þ k2 ; t n þ
2 2
k4 ¼ Δt f ðxn þ k3 ; t n þ Δt Þ
It is a four-stage method and the local truncation error for this method is O(Δt5).
We will also not derive this fourth-order method here, but as you can see it follows a
very similar structure to the second-order method. This fourth-order Runge-Kutta
method is a versatile method that, like the second-order method, can be easily
applied to a system of ordinary differential equations by simply supplying the
appropriate function f. The MATLAB® function ode4 used in this book is based
on this classical fourth-order, fixed step size, explicit Runge-Kutta method.
600 Appendix C: Numerical Methods
These second- and fourth-order Runge-Kutta methods are only two examples of a
whole class of different Runge-Kutta approximations which can be described in
terms of coefficients ci,bi,aij (i, j ¼ 1, . . ., s) and where
X
s
g i ¼ xn þ aij k j
j¼1
ki ¼ Δt f ðgi ; t n þ ci Δt Þ ðC:1:13Þ
X s
xnþ1 ¼ xn þ bi ki
j¼1
Here s is the number of stages. For example, for the classical second-order
Runge-Kutta method we have s ¼ 2 and [c1, c2] ¼ [0, 1], [b1, b2] ¼ [1/2, 1/2], and
a21 ¼ 1 with a11 ¼ a12 ¼ a22 ¼ 0. For the classical fourth-order Runge-Kutta method
s ¼ 4 and [c1, c2, c3, c4] ¼ [0, 1/2, 1/2, 1], [b1, b2, b3, b4] ¼ [1/6, 1/3, 1/3, 1/6], and
a21 ¼ a32 ¼ 1/2,a43 ¼ 1 with all the other aij ¼ 0.
Fixed-step methods have a major disadvantage from the standpoint of numerical
efficiency in that they must use the small step size needed to produce accurate results
in regions where the function f is rapidly changing even in other regions where the
step size could potentially be larger. Also, to estimate the numerical errors present it
is necessary, with fixed-step methods, to calculate the solution twice, using different
step sizes, which is inefficient. For these reasons, modern solvers often instead use
an adaptive step size to control the step sizes based on a specified error tolerance in
the solution. The MATLAB® function ode45 is an example of this type of solver.
The ode45 function implements a Dormand-Prince scheme which uses two Runge-
Kutta methods of the type shown in Eq. (C.1.13). It involves the seven functions
k1 ¼ Δt f ðxn ; t n Þ
1 Δt
k2 ¼ Δt f xn þ k1 ; t n þ
5 5
3 9 3
k3 ¼ Δt f xn þ k1 þ k2 ; t n þ Δt
40 40 10
44 56 32 4
k4 ¼ Δt f xn þ k1 k2 þ k3 ; t n þ Δt
45 15 9 5
19372 25360 64448 212 8
k5 ¼ Δt f xn þ k1 k2 þ k3 k4 ; t n þ Δt
6561 2187 6561 729 9
9017 355 46732 49 5103
k6 ¼ Δt f xn þ k1 k2 k3 þ k4 k5 ; t n þ Δt
3168 33 5247 176 18656
35 500 125 2187 11
k7 ¼ Δt f xn þ k1 þ k3 þ k4 k5 þ k6 ; t n þ Δt
384 1113 192 6784 84
ðC:1:14Þ
Appendix C: Numerical Methods 601
where the next step value, xnþ1, is calculated from a Runge-Kutta method of order
four given by
Note that although k2 does not appear explicitly in Eq. (C.1.15) it is needed to
calculate k3 and so forth. From these same k functions we can determine a different
next step value, x~nþ1 , by a Runge-Kutta method of order 5 as
x~nþ1 ¼ xn
5179 7571 393 92097 187 1
þ k1 þ k3 þ k4 k5 þ k6 þ k7
57600 16695 640 339200 2100 40
ðC:1:16Þ
The magnitude of the difference of the two values, jx~nþ1 xnþ1 j, is then
71 71 71 17253 22 1
jx~nþ1 xnþ1 j ¼ k1 k3 þ k4 k5 þ k6 k7
57600 16695 1920 339200 525 40
ðC:1:17Þ
This difference is considered to be the error, en, in xnþ1. In the MATLAB® ode45
function we have seen that there are two error tolerances, an absolute tolerance, atol,
and a relative tolerance, rtol, where rtol defines an error based on the size of the solution.
From these two tolerances we can define a maximum allowable error, emax, as
If en ¼ jx~nþ1 xn j emax ¼ maxfrtoljxn j; atolg we keep the current step size, Δt,
but if not, we adjust the step size to satisfy this error criterion. In this fashion we can
have an adaptive step size based on the user-supplied error tolerances. We will not go
into any further detail as to the explicit workings of the ode45 function, but this
should give you at least a general understanding of how this function solves a system
of ordinary differential equations and the fundamental role that rtol and atol play in
that solution.
To solve for the motion in kinematically driven dynamical systems one has to find
the solution for the values of a set of coordinates, xk (k ¼ 1, 2, . . ., n), that satisfy the
equations fi(xk) ¼ 0 (i ¼ 1, 2, . . ., n). In Chap. 4 we showed how the Newton-
Raphson method provides a numerical solution to these nonlinear algebra equations.
602 Appendix C: Numerical Methods
xzero
x0
− f ( x0 ) x
x2 x1
θ
f ð x1 Þ ¼ f ð x0 Þ þ f 0 ð x0 Þ ð x 1 x0 Þ ¼ 0 ðC:2:1Þ
f ð x0 Þ
x 1 ¼ x0 ðC:2:2Þ
f 0 ð x0 Þ
f ðx0 Þ
f 0 ðx0 Þ ¼ tan θ ¼ ðC:2:3Þ
ð x1 x 0 Þ
where x1 is the point on the straight line that intersects the x-axis. This same process
can be continued at x1 to obtain a new approximation, x2, as shown in Fig. C.1, and
so on. The general method, therefore, is an iterative scheme where
Appendix C: Numerical Methods 603
f ð xk Þ
xkþ1 ¼ xk ðk ¼ 0; 1; 2; . . .Þ ðC:2:4Þ
f 0 ð xk Þ
and the method can be stopped whenever the magnitude of the changes to the
approximation falls below some small error tolerance value, tol, i.e.,
f ðxk Þ
f 0 ðx Þ tol ðC:2:5Þ
k
where funh and dfunh are function handles for the function and its derivative, x0 is
the initial guess for the solution, and tol is an error tolerance which stops the
iterations when the magnitude of the difference between two approximations is
less than this specified value. As a simple example, consider f(x) ¼ x3 6x2pffiffiffi2xþ12
whose derivative is f 0 (x) ¼ 3x2 12x 2. This function has zeros at x ¼ 2, x ¼ 6
as shown in Fig. C.2. The following MATLAB® commands generate handles to
these functions in MATLAB® and give an initial guess of x0 ¼ 8, with a tolerance of
1e-6. Executing newton_m produces the solution at approximately x ¼ 6 in five
iterations:
in terms of J ¼ ∇f, which is the Jacobian matrix of derivatives of the functions. The
components of J are Jij ¼ ∂fi(xk)/∂xj (i, j ¼ 1, 2, . . ., n). Eq. (C.2.6) is the basis for
the iterative improvement relation
Chapter 7 discusses the small vibrations of multiple degree of freedom systems. This
Appendix will lay the foundation for many of the results obtained in Chap. 7 by
examining the behavior of a single degree of freedom vibrating system.
General Solutions
subject to initial conditions on how the motion starts at t ¼ 0 given as x(0) ¼ x0,
x_ ð0Þ ¼ x_ 0 . Here m is a mass, c is a dashpot (damping) constant, k is a spring
constant, and F is a driving force. A system that satisfies Eq. (D.1.1) is an example
of what is called a linear, time-shift invariant (LTI) system. LTI systems can be
viewed in general as a system where some operator L[] acts on an input to the
system, i(t), and produces an output, o(t), i.e.,
x
k kx
F(t) mg F(t)
c m
smooth cxx
N
(a) (b)
Fig. D.1 (a) A one degree of freedom vibrating system and (b) its free body diagram
i (t ) o (t )
L i (t )
Fig. D.2 A linear time-shift invariant system that takes an input function, i(t), and performs a linear
time-shift invariant operation L[] on that input to generate an output o(t) ¼ L[i(t)]
oðt Þ ¼ L½a1 i1 ðt Þ þ a2 i2 ðt Þ
ðD:1:3Þ
¼ a1 L½i1 ðt Þ þ a2 L½i2 ðt Þ
where (a1, a2) are arbitrary constants. Thus, in linear systems if we multiply the input
by a given amount, the output is multiplied by that same amount and if we
superimpose two inputs, the output is also the superposition of the outputs generated
by the individual inputs. If we examine Eq. (D.1.1) we see that the vibrating system
it describes does have these properties. The time-shift invariance property of LTI
systems means that if we advance or delay the input by a certain amount then the
output will also be advanced or delayed by the same amount, a property we can
express through the relationship
where t0 is some constant time. Our vibrating system of Eq. (D.1.1) also satisfies
Eq. (D.1.4) since we see if the force is changed to F(t t0) then the displacement
x(t t0) satisfies the differential equation. We have described an LTI system in these
general terms since it is precisely these properties that LTI systems possess that
allows us to obtain many of the analytical results we will obtain in this Appendix for
our vibrating system of Eq. (D.1.1).
Equation (D.1.1) is a second-order linear differential equation with constant coef-
ficients. To obtain a solution of this equation we can write the solution as the sum of two
Appendix D: Vibrations of One Degree of Freedom Systems 607
terms called the homogeneous and particular solutions as x(t) ¼ xh(t)þxp(t). The
homogeneous solution, xh(t), satisfies Eq. (D.1.1) with F(t) ¼ 0, i.e.,
The particular solution, xp(t), is a solution of Eq. (D.1.1) that generates the force
term so
In general, neither the homogeneous nor the particular solution will satisfy the
initial conditions but their sum must so that
xh ð 0 Þ þ x p ð 0 Þ ¼ x 0
ðD:1:7Þ
x_ h ð0Þ þ x_ p ð0Þ ¼ x_ 0
Homogeneous Solutions
First, let’s examine the homogeneous solution. We will find it convenient first to
write Eq. (D.1.1) in different terms. If we divide that equation by the mass m we can
rewrite it as
which is a quadratic equation which has two roots that we can write as
pffiffiffiffiffiffiffiffiffiffiffiffiffi
λ1, 2 ¼ ςωn iωn 1 ς2 ðD:1:12Þ
608 Appendix D: Vibrations of One Degree of Freedom Systems
The damping factor, as we will see, plays a crucial role in determining the nature
of the solution. There are four different cases:
1. When ς ¼ 0 (no damping) the two roots are purely imaginary and the solution
(D.1.9) can be written as
In either case there are two unknown constants (C1, C2) or (A, ϕ). This undamped
case is just a constant-amplitude, oscillatory motion with an undamped natural
frequency, ωn (Fig. D.3a).
2 2
1.5 1.5
1 1
0.5 0.5
0 0
-0.5 -0.5
-1 -1
-1.5 -1.5
-2 -2
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
(a) (b)
2 2
1.5 1.5
1 1
0.5 0.5
0 0
-0.5 -0.5
-1 -1
-1.5 -1.5
-2 -2
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
(c) (d)
Fig. D.3 Homogeneous solution for a 1-D system for (a) undamped case, (b) underdamped case,
(c) critically damped case, and (d) overdamped case
Appendix D: Vibrations of One Degree of Freedom Systems 609
2. When 0 < ς < 1 the two roots are complex with negative real parts. The solution
then can be written as
or in real terms as
pffiffiffiffiffiffiffiffiffiffiffiffiffi
where ωd ¼ ωn 1 ς2 is called the damped natural frequency. The motion in
this case has exponentially decaying oscillations at the damped natural frequency
and is called the underdamped case (Fig. D.3b).
3. When ς ¼ 1 the two roots coalesce into a single negative real root λ1 ¼ λ2 ¼ ωn.
In this case the form of the solution given by Eq. (D.1.9) is only one part of the
total solution. The complete solution in this case can be shown to be
which may initially increase but which eventually decays in time without oscil-
lation. The motion in this case is said to be critically damped (Fig. D.3c).
4. When ς > 1 there are two real negative roots:
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
λ1, 2 ¼ ςωn ωn ¼ ςωn 1 1 1=ς2
¼ ςωn μ1, 2
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
where μ1, 2 ¼ 1 1 1=ς2 are both real, positive values and the solution is
The homogeneous solutions developed in the last section are only a part of the total
solution for a forced vibration problem. However if the driving force is absent the
610 Appendix D: Vibrations of One Degree of Freedom Systems
system can vibrate as a free vibration problem. In this case the homogeneous
solution is all that we need and we can find the unknown constants in that solution
from the initial conditions. We will not examine all four cases here but will only
consider the underdamped case since that case is usually the one of most physical
interest where the damping is relatively small. In that case the solution in terms of the
initial conditions can be shown to be [1]
x_ 0 þ ςωn x0
xðt Þ ¼ expðςωn t Þ x0 cos ðωd t Þ þ sin ðωd t Þ ðD:1:15Þ
ωd
The free vibration undamped case can be obtained directly by letting ς ¼ 0 which
gives
x_ 0
xðt Þ ¼ x0 cos ðωn t Þ þ sin ðωn t Þ ðD:1:16Þ
ωn
To obtain an expression for the particular part of the general solution of Eq. (D.1.1)
we first will introduce the concept of the unit impulse response. Consider a system
with zero initial conditions and an applied force that has a constant value, F0, only
over a very small time interval, ε, near t ¼ 0 (Fig. D.4). Let us integrate Eq. (D.1.1)
from t ¼ 0 to t ¼ ε. We find
ðε ðε
mx_ ðεÞ mx_ ð0Þ þ cx_ dt þ kxdt ¼ F 0 ε ðD:1:17Þ
0 0
But the initial conditions are assumed to be zero so x_ ð0Þ vanishes. Now, consider
letting ε ! 0 but simultaneously let the force F0 ! 1 such that the product I ¼ F0ε
ε
t
Appendix D: Vibrations of One Degree of Freedom Systems 611
remains a constant. Such a force is called an impulsive force and I is the magnitude
of the impulse. As ε ! 0 the integrals in Eq. (D.1.17) go to zero so that in the limit
we are left with
xð0þ Þ ¼ 0
ðD:1:18Þ
mx_ ð0þ Þ ¼ I
where 0+ indicates that we are evaluating the response immediately after the
impulsive force is applied at t ¼ 0. Thus we see that the response of a system to
an impulsive force at t ¼ 0 can also be considered to be a free vibration problem
where F ¼ 0 for t > 0 but where the initial conditions are given by Eq. (D.1.18). If we
let I ¼ 1 then we say that we have a unit impulse response of our system. Solving for
the unit impulse response then is equivalent to solving the free vibration problem:
For an underdamped system, therefore, we have the unit impulse response of the
system, g(t), from Eq. (D.1.15) as simply
8
< 1 expðςω t Þ sin ðω t Þ t 0
n d
gðt Þ ¼ mωd ðD:1:20Þ
:
0 t<0
where we have included the values for t < 0 to emphasize that the unit impulse
response does not begin until the impulse is applied. What makes the unit impulse
response so useful is that it can be used as a building block to form up a particular
solution that satisfies
To see this, Fig. D.5 shows a general force as a function of time and a small
portion of that force at a time τ . The shaded area in Fig. D.5 thus acts like an impulse
of strength F(τ)Δτ. If we let xp(t, τ) be the response of the system to the force in that
shaded area we have
612 Appendix D: Vibrations of One Degree of Freedom Systems
t
τ Δτ
Notice that in obtaining Eq. (D.1.23) we have implicitly used the fact that our
system is an LTI system since the output is scaled by the same amount that the unit
impulse input is scaled (the factor FΔτ) and the output is shifted in time by the same
amount as the shift in the input (the impulse acts at a delayed time t ¼ τ) by writing
the output in terms of the shifted impulse response g(t τ). Using the properties of
LTI systems again the total response to the force can be represented as the superpo-
sition of the responses to impulses such as those shown as the dashed areas in
Fig. D.5, so we have
X X
xp ðt Þ ¼ xp ðt; τÞ ¼ F ðτÞΔτgðt τÞ ðD:1:24Þ
τ τ
ð
1
The integral in Eq. (D.1.25) is called a convolution integral. Often we see this
integral expressed in a form which accounts for the properties of the functions F and
g. For example the impulse response function satisfies g(t τ) ¼ 0 for τ > t so we can
replace the upper limit of τ ¼ þ1 by τ ¼ t. Also, in most cases the driving force
satisfies F(τ) ¼ 0 for τ < 0 (i.e., the driving force vanishes before the start of the
motion) so we can replace the lower limit of τ ¼ 1 by τ ¼ 0. These two conditions
then allow us to write the convolution integral as
Appendix D: Vibrations of One Degree of Freedom Systems 613
ðt
xp ðt Þ ¼ F ðτÞgðt τÞdτ ðD:1:26aÞ
0
ðt
xp ðt Þ ¼ F ðt τÞgðτÞdτ ðD:1:26bÞ
0
Equations (D.1.26a) and (D.1.26b) are the forms of the convolution integral one
sees most often in texts but Eq. (D.1.25) is the most general form. Although we
derived Eq. (D.1.25) with our vibrating system of Eq. (D.1.1) in mind, it is also valid
for any LTI system if written in the form
ð
þ1
where g(t) is the unit impulse response of the system, i.e., the response to an input of
magnitude i0 ¼ 1/ε over a small time ε near t ¼ 0, in the limit as ε ! 0. Thus, LTI
systems have the remarkable property that we can find a solution for any input to
those systems by knowing only the system impulse response, g(t).
A convolution integral solution, Eqs. (D.1.26a) and (D.1.26b), is a particular
solution to Eq. (D.1.22) that also satisfies zero initial conditions, i.e.,
xp ð0Þ ¼ x_ p ð0Þ ¼ 0. The first initial condition is obvious if we let t ¼ 0 in
Eqs. (D.1.26a) and (D.1.26b) since the integral then vanishes. Proving that x_ p ð0Þ
¼ 0 is a bit trickier since both the upper limit of the integral and the integrand are
functions of time. A theorem from calculus, called Leibniz’s rule, shows how to
handle such cases. Namely, for any function f(t, τ) we have
ðt ðt
d ∂ f ðt; τÞ
f ðt; τÞdτ ¼ f ðt; t Þ þ dτ ðD:1:28Þ
dt ∂t
0 0
ðt
x_ p ðt Þ ¼ F ðt Þgð0Þ þ F ðτÞg0 ðt τÞdτ ðD:1:29Þ
0
614 Appendix D: Vibrations of One Degree of Freedom Systems
where g0 (t τ) ¼ dg(t τ)/d(t τ). Examining Eq. (D.1.29), from the properties of
the impulse response we know g(0) ¼ 0 and the integral goes to zero as t goes to
zero, so we also have x_ p ð0Þ ¼ 0.
Since this particular solution in the form of a convolution integral satisfies zero
initial conditions when we form up the total solution x(t) ¼ xh(t)þxp(t) the homo-
geneous solution itself must then satisfy whatever initial conditions are present; that
is, it must be a free vibration solution as already found, and we can write the solution
for a forced, underdamped system, therefore, as (see Eq. (D.1.15))
x_ 0 þ ςωn x0
xðt Þ ¼ expðςωn t Þ x0 cos ðωd t Þ þ sin ðωd t Þ
ωd
ðt ðD:1:30aÞ
1
þ F ðt τÞexpðςωn τÞ sin ðωd τÞdτ
mωd
0
or, equivalently,
x_ 0 þ ςωn x0
xðt Þ ¼ expðςωn t Þ x0 cos ðωd t Þ þ sin ðωd t Þ
ωd
ðt ðD:1:30bÞ
1
þ F ðτÞexpðςωn ðt τÞÞ sin ðωd ðt τÞÞdτ
mωd
0
ðt
x_ 0 1
xðt Þ ¼ x0 cos ðωn t Þ þ sin ðωn t Þ þ F ðt τÞ sin ðωn τÞdτ ðD:1:31aÞ
ωn mωn
0
or, equivalently,
ðt
x_ 0 1
xðt Þ ¼ x0 cos ðωn t Þ þ sin ðωn t Þ þ F ðτÞ sin ðωn ðt τÞÞdτ ðD:1:31bÞ
ωn mωn
0
In many cases the driving force is a periodic force of a very long duration. Mass
imbalances in motors are an example of such forces. As long as there is some
damping in the system the homogeneous solution will decay with time, leaving
only the particular solution to the periodic driving force. The long time response,
therefore, is only due to the particular solution in this case, which is called the
steady-state response. We can often obtain the steady-state response directly from
Appendix D: Vibrations of One Degree of Freedom Systems 615
F0 F0 1
X¼ ¼ ðD:1:33Þ
k þ iωc mω 2 k 1 ω =ωn þ 2iςω=ωn
2 2
X ¼ jX jexpðiψ Þ ðD:1:34Þ
6 180
5 160 ς = 0.1
ς = 0.1 140
4 ς = 0.2
120
X 100
3
ψ ς = 0.5
ς = 0.2 80
2
ς = 0.5 60 ς = 2.0
1 ς = 2.0 40
20
0 0
0 0.5 1 1.5 2 2.5 3 0 0.5 1 1.5 2 2.5 3
ω /ω n ω /ω n
(a) (b)
Fig. D.6 (a) The magnitude of the steady-state response as a function of the damping factor, and
(b) the corresponding behavior of the phase of the steady-state response
616 Appendix D: Vibrations of One Degree of Freedom Systems
use the MATLAB® function atan2 since it produces angles over a range of (0, π)
whereas the function atan will produce angles over (π2, +π/2) and so atan produces
artificial jumps in the phase when the phase exceeds those limits.]
A zero-degree phase corresponds to positive and negative forces and displace-
ments occurring in synchronization while a 180
phase corresponds to the force and
the displacement having opposite signs (and hence directions) while in synchroni-
zation. For the undamped case (not shown) the phase is zero below the natural
frequency and 180
above the natural frequency so the force and displacement are
completely in phase when ω/ωn < 1 and completely out of phase when ω/ωn > 1 in
undamped systems. It is easy to demonstrate this behavior by holding in your hand a
long elastic band with a weight on its end. If you move your hand up and down
slowly the mass will move up and down in synchronization with your hand while if
you move your hand up and down quickly the mass will move up when your hand
moves down and it will move down when your hand moves up.
Writing the steady-state solution as
1
GðωÞ ¼ ðD:1:37Þ
k þ iωc mω2
This transfer function is closely related to the unit impulse response of the system.
To see this relationship consider a force F(t) ¼ F0 exp (iωt) that has been in existence
from t ¼ 1. Since F(t) is not zero for t < 0 we must write the convolution integral
response to this function as (see Eq. (D.1.25))
ðt ðt
xð t Þ ¼ F ðt τÞgðτÞdτ ¼ F 0 expðiωt Þ expðiωτÞgðτÞdτ ðD:1:38Þ
1 1
ð
þ1
ð
þ1
The integral that appears in Eq. (D.1.40) is called the Fourier transform of g(τ).
One of the properties of Fourier transforms is that we also have an inverse Fourier
transform relationship given by
ð
þ1
1
gðτÞ ¼ GðωÞexpðiωτÞdω ðD:1:41Þ
2π
1
so that we can obtain the transfer function from the impulse response and the impulse
response from the transfer function through these Fourier transform relations. This
same relationship is true for any well-behaved function, f(t), and its Fourier trans-
form, F(ω), i.e.,
ð
þ1
F ð ωÞ ¼ f ðt Þexpðiωt Þdt
1
ðD:1:42Þ
ð
þ1
1
f ðt Þ ¼ F ðωÞexpðiωt Þdω
2π
1
The Fourier transform of f(t), F(ω), is also called the frequency spectrum of the
function or the Fourier domain characterization of the function in contrast to f(t)
itself which describes the behavior of the function in the time domain. An equivalent
form that is often used in numerical calculations writes the frequency in terms of
f cyles/s rather than ω rad/s. Since there are 2π radians per cycle we have ω ¼ 2πf
and the forward and inverse Fourier transforms in terms of f become
ð
þ1
F ðf Þ ¼ f ðt Þexpð2πift Þdt
1
ðD:1:43Þ
ð
þ1
f ðt Þ ¼ F ðf Þexpð2πift Þdf
1
If the Fourier transform of f1(t) is F1( f ) and the Fourier transform of f2(t) is F2( f )
then the Fourier transform of the convolution of f1 and f2 given by
ð
þ1
uð t Þ ¼ f 1 ðτÞf 2 ðt τÞdτ
1
is the product of F1( f ) and F2( f ) so U( f ) ¼ F1( f )F2( f ), where U( f ) is the Fourier
transform of u(t).
As a consequence of this theorem, one can perform the convolution of two
functions by multiplying their Fourier transforms together and then performing an
inverse Fourier transform on the result of that multiplication. Because Fourier
transforms are in general complex functions, their multiplication must be done as a
complex multiplication. What makes this approach attractive is that there are well-
developed algorithms, called fast Fourier transform (FFT) algorithms, that can do
the Fourier and inverse Fourier transforms numerically with high speed and accu-
racy. As discussed in Appendix E we have written two MATLAB® functions Ftrans
and IFtrans that implement the FFT algorithms for generating the Fourier transform
and its inverse given in Eq. (D.1.43).
Fourier transforms are important tools for modeling and analyzing dynamical
systems. While we cannot give a comprehensive discussion of those transforms at
the level of this book the details found in Appendix E should be sufficient to give you
a basic understanding of them.
We can combine this solution with the homogeneous solution of Eq. (D.1.14b)
for the underdamped case to find the total solution as
Appendix D: Vibrations of One Degree of Freedom Systems 619
-4
-6
-8
0 2 4 6 8 10 12 14 16 18 20
time, t
so that at t ¼ 0 we have
where
The total solution of Eq. (D.1.45) is plotted in Fig. D.7 along with the steady-state
solution of Eq. (D.1.44) for k ¼ 4 N/m, m ¼ 1 kg, ω ¼ 4 rad/s, ς ¼ 0.2, F0/k ¼ 1, and
x0 ¼ 4 m and x_ 0 ¼ 0. The total solution is the solid line in Fig. D.7 and the steady-
state solution is the dashed line. In this case it can be seen that the transient effects of
the homogeneous solution are rapidly attenuated and the steady-state solution is all
that remains after approximately t ¼ 10 s.
Reference
Fourier transforms are frequently used in analyzing dynamical systems and they are
also tools that are used in a wide variety of other areas of science and engineering. In
this Appendix we outline the important properties of Fourier transforms and describe
how they are calculated numerically using a fast Fourier transform (FFT) algorithm.
ð
þ1
vð t Þ ¼ V ðf Þexpð2πi f t Þdf
1
where v(t) is a function of the time, t, and V( f ) is its Fourier transform as a function
of the frequency, f. While there are other forms that are used to define these trans-
forms (see Sect. E.3) weffi will use the forms of Eq. (E.1.1) exclusively. Notice that
pffiffiffiffiffiffi
because of the i ¼ 1 appearing in the exponential function even if v(t) is a real
function of time the Fourier transform, V( f ), will usually be a complex-valued
function. However, when we integrate those Fourier transform complex values
over frequency in the inverse Fourier transform integral we will recover the original
real v(t) function. For some simple functions we can perform these transforms
analytically but in most cases they will have to be done numerically. Those numer-
ical evaluations are normally done by evaluating (sampling) the continuous time and
frequency functions (v(t), V( f )) at equally spaced discrete times, tn, and equally
spaced frequencies, fn, (n ¼ 1,2,. . .,N ) and rewriting the Fourier transforms as
discrete forward and inverse transforms of those sampled values given by
X
N
V p ðf n Þ ¼ Δt vp ðt k Þexpð2πi ðk 1Þðn 1Þ=N Þ ðn ¼ 1; 2; . . . ; N Þ
k¼1
ðE:1:2Þ
1 XN
vp ð t k Þ ¼ V p ðf n Þexpð2πi ðk 1Þðn 1Þ=N Þ ðk ¼ 1; 2; . . . ; N Þ
NΔt n¼1
where N is the number of samples of these functions and Δt ¼ tkþ1tk is the time
interval between sampling times. Equation (E.1.2) can be derived directly from the
Fourier transforms of Eq. (E.1.1) without approximation and the expressions in
Eq. (E.1.2) are called the forward and inverse discrete Fourier transforms. You
may wonder how discrete Fourier transforms can arise directly from Fourier trans-
forms since Eq. (E.1.1) involves infinite integrals but Eq. (E.1.2) involves finite
sums. The answer is in the subscript p that appears on vp(tk) and Vp( fn). This p stands
for “periodic” indicating that the functions appearing in the discrete transforms are
repeated periodically an infinite number of times. This is illustrated for the time
function in Fig. E.1 which shows a given function in Fig. E.1a and its periodically
repeated version in Fig. E.1b. The period of the repeating function is T ¼ NΔt. We
will not prove the equivalence of Eqs. (E.1.1) and (E.1.2) here but you can find it in
texts that cover Fourier transforms in depth. Figure E.1b also shows where the
N sampled values of the time function lie within a given period. The first sample
is at t ¼ 0 and the last (Nth) sample is at t ¼ T Δt. If we look at a sample at t ¼ T,
which is not part of the sum in Eq. (E.1.2), it would just be the same value as the one
at t ¼ 0. A similar situation holds in the frequency domain as shown in Fig. E.2. The
magnitude of a Fourier transform is plotted in Fig. E.2a since the Fourier transform
itself is usually complex valued. The same periodically repeated function is shown in
Fig. E.2b. Figure E.2b also shows where the sampled values of the frequency
vp (t )
v (t )
N samples
t t
tmax T
-T
(a) (b)
Fig. E.1 (a) A transient function. (b) The same function periodically repeated and the sampled
values used in a discrete Fourier transform
Appendix E: Fourier Transforms 623
V(f) Vp ( f )
N samples
f f
− fs f max fs
Fig. E.2 (a) The magnitude of the Fourier transform. (b) The same function periodically repeated
and the sampled values used in the inverse discrete Fourier transform
function lie within a given period. The first sample is at f ¼ 0 and the last (Nth)
sample is at f ¼ fs Δf where fs ¼ 1/Δt is the sampling frequency and where Δf ¼ fs/
N ¼ 1/T is the frequency interval between samples. If we look at a sample at f ¼ fs,
which is not part of the sum in Eq. (E.1.2), it would just be the same value as the one
at f ¼ 0. One difference between the frequency functions and the time functions is
that the time function is zero for t < 0 (assuming that we have transient functions that
start at some given time that we can always take as t ¼ 0) but the frequency functions
have values at both positive and negative frequencies. In the sampled frequency
values we see that the values at negative frequencies actually are in the upper half of
the sampled values from n ¼ N/2 to n ¼ N. In Fig. E.1 we have also indicated a time,
tmax, that denotes the time at which the time signal has become sufficiently small so
that it is essentially zero for t > tmax. Similarly, in Fig. E.2 there is a frequency, fmax,
that indicates the highest frequency at which the Fourier transform magnitude has
any significant value. Thus, if T tmax and fs 2fs the sampled values will be just
those of the original time and frequency functions and we can drop the p subscript in
Eq. (E.1.2). This last requirement is a famous criterion called the Nyquist criterion,
which states:
The sampling frequency, fs ¼ 1/Δt, must be at least twice the maximum signif-
icant frequency, fmax, contained in the waveform being sampled.
If the Nyquist criterion is not satisfied, then the periodically repeated function
may not be representative of the Fourier transform we seek and fictitious frequency
values (called aliases) can appear. Thus, the time function must be sampled at
sufficiently small time intervals to prevent such behavior, which is also called
aliasing. Although the Nyquist criterion only requires one to sample at a factor of
two times fmax in practice one often uses higher factors.
If we assume that we have satisfied the Nyquist criterion and that the sampled
values are representative of the original nonperiodic functions, then we can drop the
p subscript and simply write Eq. (E.1.2) as
624 Appendix E: Fourier Transforms
X
N
V ðf n Þ ¼ Δt vðt k Þexpð2πi ðk 1Þðn 1Þ=N Þ ðn ¼ 1; 2; . . . ; N Þ
k¼1
ðE:1:3Þ
1 XN
vðtk Þ ¼ V ðf n Þexpð2πi ðk 1Þðn 1Þ=N Þ ðk ¼ 1; 2; . . . ; N Þ
NΔt n¼1
To obtain the sampled values present in Eq. (E.1.3) we need a function that
generates N evenly spaced time samples spaced Δt ¼ T/N apart from t ¼ 0 to
t ¼ T Δt or N evenly spaced frequency samples spaced Δf ¼ fs/N apart from
f ¼ 0 to f ¼ fs Δf. Unfortunately, the built-in MATLAB® function linspace does
not give us those samples. If we let t ¼ linspace(0, T, N ) or let f ¼ linspace(0, fs, N )
we will generate N samples but they will include the repeated values at t ¼ T or f ¼ fs
and we would improperly have Δt ¼ T/(N 1) and Δf ¼ fs/(N 1). Thus, we have
written a MATLAB® sampling function s_space that does do the proper sampling. It
is a very simple function that we list here:
You should use the function s_space to generate any of the sampled time or
frequency values needed when doing Fourier transform analysis.
X
N
MATLAB® fft: vðt k Þexp½2πi ðk 1Þðn 1Þ=N
k¼1
1 XN
MATLAB® ifft: V ðf n Þexp½2πi ðk 1Þðn 1Þ=N
N n¼1
so that they do not include the Δt parameter in their definition. Thus, we have written
two new MATLAB® functions, Ftrans and IFtrans, that simply use fft and ifft,
respectively, and include the appropriate Δt factors appearing in Eq. (E.1.3). The
calling sequence for these functions is
where dt ¼ Δt.
In performing Fourier transforms numerically there are a few issues that need to
be considered. First, in the definition of the inverse Fourier transform the integration
is done over both positive and negative frequencies. If the time domain function, v(t),
is real, however, its Fourier transform, V( f ), satisfies V(f ) ¼ V∗( f ), where ()∗
denotes the complex conjugate, where recall for a complex number aþib,
(aþib)∗ ¼ aib. Thus, the integration over the negative frequencies can be found
from the integration over the positive values. The integration over the negative
frequencies, however, is present in order to produce a real v(t) function from the
inverse Fourier transform. What happens if we calculate the inverse Fourier trans-
form only over positive frequencies? Then the resulting function will be complex
and we can in fact show that we obtain
ð
þ1
vð t Þ i
H ½vðt Þ ¼ V ðf Þexpð2πi f t Þdf ðE:2:1Þ
2 2
0
ð
þ1
1 vðτÞdτ
H ½vðt Þ ¼ ðE:2:2Þ
π ðτ t Þ
1
Thus, we can find the time domain function v(t) from only the positive frequency
components of V( f ) if we take twice the real part of the integration over those
positive components, i.e.,
626 Appendix E: Fourier Transforms
(a) (b)
81 9
<ð =
vðt Þ ¼ 2Re V ðf Þexpð2πift Þdf ðE:2:3Þ
: ;
0
where Re indicates “real part of.” Figure E.3 illustrates the process. When computing
the inverse Fourier transform with an FFT algorithm the positive sampled frequency
components of the spectrum are placed in the first half of the samples going from
zero to fs/2 and the components from fs/2 to fs (which is where the sampled negative
frequency components would ordinarily be) are filled with zeros. There is one more
step, however, before these positive frequency components and zeros can be
inverted. When we throw out the negative frequencies there is the issue of what to
do with the zero frequency component since it is neither a positive nor a negative
frequency. From Fig. E.3b we see that if the negative frequencies are removed then
the remaining frequency spectrum has a jump at zero frequency. If you have studied
Fourier series you will know that if you represent a periodic function that has a jump
from, say, V1 to V2 at some location then the Fourier series will converge to the mean
(V1þV2)/2 at that location. The same is true for the discrete Fourier transforms. Thus,
the first sampled value of V( f ), which is V(0), must be divided by 2 before the
spectrum can be inverted. This is shown in Fig. E.3b.
As an example of the steps needed in the calculation of an inverse Fourier
transform using only positive frequency components, consider the steady-state
transfer function for a 1-D system obtained in Appendix D (see Eq. (D.1.37)). In
terms of the frequency, f, that transfer function can be written as
1
G ðf Þ ¼ ðE:2:4Þ
k þ 2πicf 4π 2 mf 2
Now, let the mass m ¼ 1 kg, the spring constant k ¼ 2 N/m, and the damping
constant c ¼ 0.03 kg/s. The plot of the magnitude and phase of this function for
frequencies from f ¼ 0 Hz to f ¼ 4 Hz (a Hertz (Hz) is one cycle/s) are shown in
Fig. E.4. We can see that the function is very small above frequencies of approxi-
mately 1.0 Hz and has a strong peak near the undamped natural frequency of
0.225 Hz. The phase goes continuously from 0 to 180
. These behaviors are
Appendix E: Fourier Transforms 627
0 -3.5
0 0.5 1 1.5 2 2.5 3 3.5 4 0 0.5 1 1.5 2 2.5 3 3.5 4
frequency f, Hz frequency f, Hz
(a) (b)
Fig. E.4 (a) The magnitude of the transfer function at positive frequencies for a system with
m ¼ 1 kg, k ¼ 2 N/m, and c ¼ 0.1 kg/s and (b) the phase (rad) of the transfer function
consistent with those seen in Appendix D in Fig. D.6, but notice that the phase angle
ψ in Fig. D.6 is the negative of the angle shown in Fig. E.4. These phases, as
mentioned in Appendix D, must be calculated with the MATLAB® atan2 function.
hold on
hold off
These steps are placed in the MATLAB® script impulse_response. We have listed
all of them here so that you can see explicitly how the evaluation proceeds. The plot
generated by the script is shown in Fig. E.5 where we can see that the numerical
solution (solid line) is nearly coincident with the exact solution (dashed line) on this
scale. Note that the plotted time interval is only about one-tenth of the total time
window, T. This abbreviated plot was generated by using a logical statement to act as
a “mask” to determine the values we want plotted. Thus a MATLAB expression
such as t(t < 25) selects only those indices in the vector t that satisfy the logical
expression, yielding a plot up to t ¼ 25 s only.
It is instructive to take the numerically generated impulse function and use Ftrans
to recalculate the transfer function. This can be easily done after running the
impulse-response script with the commands
Appendix E: Fourier Transforms 629
Fig. E.6 (a) The magnitude of the transfer function, and (b) its phase
Ga = Ftrans(g, dt);
plot(f, abs(Ga))
figure(2)
plot(f, atan2(imag(Ga), real(Ga)));
where Ga is the numerically generated transfer function. The results are shown in
Fig. E.6. In that figure we now see both the positive and negative frequency
components of the transfer function in the lower and upper half, respectively, of
the samples plotted.
630 Appendix E: Fourier Transforms
This Appendix should give you the basic tools you will need to do Fourier analysis.
You should be aware of the fact, however, that other books and authors may use
different definitions for Fourier transforms and discrete Fourier transforms. We can
define a general pair of Fourier and inverse Fourier transforms in the forms (using the
circular frequency, ω)
ð
þ1
vð t Þ ¼ n2 V ðωÞexpðiω t Þdω
1
as long as the coefficients(n1, n2) satisfy n1n2 ¼ 1/2π. Many math books, for
example, like pffiffiffiffiffito write these transforms in symmetrical forms where
n1 ¼ n2 ¼ 1= 2π . Our choice of transforms used n1 ¼ 1 and n2 ¼ 1/2π. As can
be seen in Eq. (E.3.1) there also may be different choices made for the signs in the
complex exponentials. For our choice of the transforms we used a minus sign in the
forward transform and a plus sign in the inverse transform. Similar differences may
also appear in the discrete Fourier transforms and hence in FFT analyses. In general
we can write those transforms as
X
N
V n ¼ n1 vk expð2πi ðk 1Þðn 1Þ=N Þ ðn ¼ 1; 2; . . . ; N Þ
k¼1
ðE:3:2Þ
X
N
vk ¼ n2 V n expð2πi ðk 1Þðn 1Þ=N Þ ðk ¼ 1; 2; . . . ; N Þ
n¼1
as long as n1n2 ¼ 1/N, where N is the total number of samples. We used n1 ¼ Δt and
n2 ¼ 1/NΔt to ensure that the discrete transforms were consistent with the forward
and inverse Fourier transforms we used. Recall that MATLAB® used n1 ¼ 1 and
n2 ¼ 1/N which is why we had to modify the MATLAB® definitions of fft and ifft to
get a consistent set of discrete FFT transform functions. We chose a minus sign in the
forward transform and a plus sign in the inverse transform, which are the same
choices made in the MATLAB® fft and ifft functions. We should mention that some
authors use values and sums which range over (0, N 1) rather than (1, N ) seen in
Eq. (E.3.2) but this is just a simple renumbering of the samples. MATLAB® vectors
and arrays cannot have zero indices so we need to use the range (1, N ) in
MATLAB®. Finally,psome ffiffiffiffiffiffiffi disciplines, suchpasffiffiffiffiffiffi
electrical
ffi engineering, for example,
prefer to define j ¼ 1 instead of the i ¼ 1 we have used throughout.
Appendix F: MATLAB® Functions and Scripts
There are many MATLAB® functions and scripts that are defined and used in this
book. In this section we have organized listings of these programs according to the
chapter and simulation example in which they appear. Most of the simulations and
animations are performed with scripts whose names end in either _sim or _anim,
respectively. The functions that define the first-order system of ordinary differential
equations used by ode45 to perform the numerical solution usually have names
ending in _eqs. In some cases these functions are nested inside other functions, as
described in the text. The MATLAB® m-files for the functions and scripts developed
in this book are available at https://doi.org/10.1007/978-3-319-98470-4_2 on
the web. Note that there are differences between the line widths in the MATLAB
editor and this text, causing some lines in the listings to be wrapped around. I have
corrected the comments where this happens but have left the actual code unchanged
so that it is identical in syntax to what is in the m-files.
Chapter 2
1. projectile_w_drag_eqs
2. projectile_w_drag_sim
% projectile_w_drag_sim script
% solve an example projectile problem with drag numnerically and
% compare solution to the case where the drag force is absent.
clear
close all
% input parameters
tspan = [0, 7]; % time interval for solution (sec)
x0 = [0 30 0 30]; % initial values of [x,xdot,y,ydot] (m and m/sec)
c = 0.006; % normalized drag coefficient (1/m)
g = 9.81; % acceleration of gravity (m/sec^2)
% consider case with zero drag and also plot on the same graph
hold on
c2 = 0.0;
[tout, xout] = ode45(@projectile_w_drag_eqs, tspan, x0, [], c2, g);
plot(xout(:,1), xout(:,3), '--')
xlabel('x, meters');ylabel('y, meters')
hold off
Appendix F: MATLAB® Functions and Scripts 633
3. bead_on_s_wire_eqs
4. bead_on_s_wire_sim
% script bead_on_s_wire_sim
% This script solves the problem of a bead sliding on a smooth,
% straight inclined wire and subject to an applied force, F(t), acting
% along the wire.
close all
% plot position versus time along the wire, the value of the constraint
% and
% its first derivative
figure (1)
plot(t, xp)
xlabel('t, sec'); ylabel('x''');
figure (2)
plot(t, C)
xlabel('t, sec');ylabel('C');
axis([ 0 10 -1e-13 1e-13])
figure (3)
plot(t, Cd)
axis([ 0 10 -1e-13 1e-13])
xlabel('t, sec'); ylabel('dC/dt');
5. bead_on_p_wire_eqs
6. bead_on_p_wire_sim
% script bead_on_p_wire_sim
% This script solves the equations of motion for a bead sliding on a
% smooth, parabolic wire whose shape is y = a*x^2 as a one degree of
% freedom system
close all
% plot x and normal force divided by the weight (Nw = N/mg) versus time
plot(t, x)
xlabel('t, sec'); ylabel('x');
Nw = (1 + 2*a*vx.^2/g)./sqrt(1+4*a^2*x.^2);
figure(2)
plot(t, Nw)
axis([ 0 10 0 3.5])
xlabel('t, sec'); ylabel('N/mg');
636 Appendix F: MATLAB® Functions and Scripts
7. sliding_bead_energy
% script sliding_bead_energy
% This script generates phase plots for a bead sliding on the parabolic
% shaped wire given by y = a*x^2, where a = 0.1.
clear
close all
% define input parameters
a = 0.1;
g = 9.81;
8. bead_on_p_wire_eqs2
9. bead_on_p_wire_sim2
% script bead_on_p_wire_sim2
% This script solves the equations of motion for a bead sliding on a
% smooth, parabolic wire whose shape is y = a*x^2 as a one degree of
% freedom system, where damping is present.
close all
% plot x and normal force divided by the weight (Nw = N/mg) versus time
plot(t, x)
xlabel('t, sec');ylabel('x');
Nw = (1 + 2*a*vx.^2/g)./sqrt(1+4*a^2*x.^2);
figure(2)
plot(t, Nw)
axis([ 0 10 0 3.5])
xlabel('t, sec');ylabel('N/mg');
% so that x0 = [ x(0) vx(0)]. rtol and atol are input error tolerances.
% The outputs of the function are the times,tout, over which the
% solution is calculated, and a matrix, xout, which holds the values of x
% and dx/dt evaluated at those times in its columns.
% It is assumed that x is in meters (m) and dx/dt is in m/sec. g is the
% acceleration of gravity.
end
11. roller_coaster_sim
% script roller_coaster_sim
% This script solves for the motion of a roller coaster cart on a
% sinusoidal track whose height, h, is given by h= A*(1-cos(pi*x/L))/2.
% The script plots the cart path and the normalized normal force.
close all
12. roller_energy
% script roller_energy
% This script uses the output values of roller_coaster_sim to plot the
% normalized energy Em/Em(1). Em is the value of 2E/m, where E is the total
% energy and m is the mass so that Em(t)/Em(0) = E(t)/E(0)is the
% normalized
% total energy. Note the energy Em at t = 0 is the MATLAB value Em(1)
close all
end
Appendix F: MATLAB® Functions and Scripts 641
14. spring_pendulum_sim
% script spring_pendulum_sim
% This script solves the equations of motion for a spring-pendulum and
% plots the normalized radial length and angle of the pendulum versus
% time.
% Also plotted is a normalized energy versus time for this conservative
% system.
close all
% rename angle and normalized radius outputs and plot them versus time
ang = xout(:, 3); % angle (rad)
rn = xout(:, 1); % normalized radial length
figure(1)
plot(tout, ang);
xlabel('time, \tau'); ylabel('\theta');
figure(2)
plot(tout, rn)
xlabel('time, \tau'); ylabel('r_n');
15. spring_pendulum_anim3
% script spring_pendulum_anim3
% This script solves for the motion of the spring-pendulum and then
% generates an animation of the motion.
642 Appendix F: MATLAB® Functions and Scripts
close all
% rename outputs
t = tout;
th = xout(:, 3); % the angle, theta, in rad
rn = xout(:, 1); % the normalized radius
r = rn*Le + Le;
% define arrays with x- and y-coordinates for the endpoints of the spring
x_array(:,1) = zeros(size(r));
x_array(:,2) = r.*sin(th);
y_array(:,1) = zeros(size(r));
y_array(:,2)= -r.*cos(th); % positive y is up
% find largest and smallest x- and y-values of the points being evaluated
xbig = max(max(x_array));
ybig = max(max(y_array));
xsmall = min(min(x_array));
ysmall = min(min(y_array));
% x- and y-locations of the center of the region where the points are
% being plotted and the lengths of that region in the x- and y-directions
xcenter = (xbig + xsmall)/2;
ycenter = (ybig + ysmall)/2;
lx = abs(xbig - xsmall);
ly = abs(ybig - ysmall);
%define limits of a somewhat larger region for the plot
xmin = xcenter - 1.5*lx/2;
xmax = xcenter + 1.5*lx/2;
ymin = ycenter - 1.5*ly/2;
ymax = ycenter +1.5*ly/2;
Appendix F: MATLAB® Functions and Scripts 643
hold on
% draw mass, spring and path marker at their successive locations in time
for i = 1:length(t)
set(mass,'XData',xscircle +x_array(i,2), 'YData', yscircle +y_array
(i,2));
set(spring,'XData', [x_array(i,1), x_array(i,2)], 'YData', ...
[y_array(i,1), y_array(i,2)]);
if strcmp(marker, 'on')
set(path, 'XData', x_array(1:i, 2), 'YData' , y_array(1:i, 2));
end
if i < length(t)
pause(0.01*sldwn);
end
end
hold off
rnd = xout(:,2);
thd = xout(:,4);
R = (1./(2.*mu-1)).*(mu^2*(rnd.^2 + ((1+rn).^2).*thd.^2) ...
-2.*mu.*(1+rn).*cos(th) + mu.^2.*(rn+1./mu).^2);
h2 = figure(2);
clf(h2);
plot(t, R)
xlabel('time, \tau'); ylabel('R');
17. rotating_hoop_sim
% rotating_hoop_sim script
% This script solves the equations of motion for a bead sliding on a
% smooth, circular hoop that is also rotating about its axis in a vertical
% plane. The script plots the angle, theta, of the bead on the hoop versus
% time and a phase plot for the angle and its derivative.
close all
end
19. moving_wedge_sim
% moving_wedge_sim script
% This script solves the problem of a mass attached to a spring and dashpot
% that slides on a moving wedge which has a specified motion. This problem
% is equivalent to a mass connected to a spring and dashpot, moving on a
% smooth, horizontal surface under the action of a known applied force, a
% problem that can be solved analytically but which is solved here
% numerically with ode45. The script plots the displacenent of the mass
% versus time as well as a phase plot of the displacement versus velocity.
close all
% rename outputs and plot displacement versus time as well as a phase plot
d = xout(:,1); % displacement of the mass
ddot = xout(:,2); % velocity of the mass
figure(1)
plot(tout, d)
xlabel('time, t'); ylabel('displacement');
figure (2)
plot(d, ddot)
xlabel('displacement'); ylabel('velocity');
21. roller_coaster_f2_sim
% script roller_coaster_f2_sim
% this script solves the problem of the motion of a cart on a rough
% sinusoidal track. It plots the path of the cart, the normal force
% (normalized by the weight mg of the cart) versus time, and gives
% a phase plot of the motion.
close all
function Y = ode4(odefun,tspan,y0,varargin)
% ODE4 Solve differential equations with a non-adaptive method of order 4.
% Y = ODE4(ODEFUN,TSPAN,Y0) with TSPAN = [T1, T2, T3, ... TN] integrates
% the system of differential equations y' = f(t,y) by stepping from T0 to
% T1 to TN. Function ODEFUN(T,Y) must return f(t,y) in a column vector.
650 Appendix F: MATLAB® Functions and Scripts
% The vector Y0 is the initial conditions at T0. Each row in the solution
% array Y corresponds to a time specified in TSPAN.
%
% Y = ODE4(ODEFUN,TSPAN,Y0,P1,P2...) passes the additional parameters
% P1,P2... to the derivative function as ODEFUN(T,Y,P1,P2...).
%
% This is a non-adaptive solver. The step sequence is determined by TSPAN
% but the derivative function ODEFUN is evaluated multiple times per step.
% The solver implements the classical Runge-Kutta method of order 4.
%
% Example
% tspan = 0:0.1:20;
% y = ode4(@vdp1,tspan,[2 0]);
% plot(tspan,y(:,1));
% solves the system y' = vdp1(t,y) with a constant step size of 0.1,
% and plots the first component of the solution.
%
if ~isnumeric(tspan)
error('TSPAN should be a vector of integration steps.');
end
if ~isnumeric(y0)
error('Y0 should be a vector of initial conditions.');
end
h = diff(tspan);
if any(sign(h(1))*h <= 0)
error('Entries of TSPAN are not in order.')
end
try
f0 = feval(odefun,tspan(1),y0,varargin{:});
catch
msg = ['Unable to evaluate the ODEFUN at t0,y0. '];
error(msg);
end
neq = length(y0);
N = length(tspan);
Y = zeros(neq,N);
F = zeros(neq,4);
Y(:,1) = y0;
for i = 2:N
ti = tspan(i-1);
hi = h(i-1);
yi = Y(:,i-1);
Appendix F: MATLAB® Functions and Scripts 651
F(:,1) = feval(odefun,ti,yi,varargin{:});
F(:,2) = feval(odefun,ti+0.5*hi,yi+0.5*hi*F(:,1),varargin{:});
F(:,3) = feval(odefun,ti+0.5*hi,yi+0.5*hi*F(:,2),varargin{:});
F(:,4) = feval(odefun,tspan(i),yi+hi*F(:,3),varargin{:});
Y(:,i) = yi + (hi/6)*(F(:,1) + 2*F(:,2) + 2*F(:,3) + F(:,4));
end
Y = Y.';
23. pendulum_cs_eqs
end
24. pendulum_cs_sim
% script pendulum_cs_sim
% This script solves for the motion of a simple pendulum using a fixed time
% step solver, ode4. It allows one to satisfy the constraint function
% and its derivative explicitly during the solution. The value of the
% constraint function and its derivative as well as the total energy
% divided by the mass are plotted versus time.
652 Appendix F: MATLAB® Functions and Scripts
close all
% rename outputs
x = xout(:,1); % x-coordinate
y = xout(:,2); % y-coordinate
vx = xout(:,3); % vx = dx/dt
vy = xout(:,4); % vy = dy/dt
% plot the constraint function, its derivative, and the total energy, E,
% divided by the mass, m
figure(1)
plot(tspan', C)
xlabel('t, sec'); ylabel('f');
figure (2)
plot(tspan' , Cd)
xlabel('t, sec'); ylabel('df/dt');
figure(3)
plot(tspan', (vx.^2 +vy.^2)/2-g*y) % E/m
xlabel('t, sec'); ylabel('E/m');
Chapter 3
function [tout, xout] = MP_pendulum( x0, tspan, c1, c2, lr, rtol,atol)
% [ tout, xout] = MP_pendulum( x0, tspan, c1, c2, lr, rtol, atol) solves
% the equations of motion for a multi-particle pendulum, where the input
% parameters are x0, the initial conditions, tspan, the time interval for
Appendix F: MATLAB® Functions and Scripts 653
26. MP_pendulum_sim
% script MP_pendulum_sim
% This script solves for the motion of a multi-particle pendulum.
% It plots the theta and phi angles of the pendulum verus time.
% Note that the angular inputs in the initial conditions are in
% units of degrees and degrees/sec.
close all
function [tout, xout] = double_pend( x0, tspan, m1, m2, l1,l2,g, rtol,
atol)
% [tout, xout] = double_pend( x0, tspan, m1, m2, l1, l2, g, rtol, atol)
% solves for the motion of a double pendulum. The inputs are the initial
% conditions x0 = [ theta, thetadot, phi, phidot], measured in rad and
% rad/sec, tspan, the time interval for the calculations, m1 and m2, the
% two masses in the pendulum, l1, l2, the lengths of the two massless rods
% connecting the masses, g, the acceleration of gravity, and rtol, atol,
% the relative and absolute error tolerances used in the solution. The
% outputs are tout, the times at which the solution is obtained, and xout,
% a matrix that contains the first order system variables at those times,
% given in columns.
28. double_pendulum_sim
% script double_pendulum_sim
% This script solves for the motion of a double pendulum. It plots the
% angles of the two masses versus time, and calculates and plots the
% normalized total energy for this conservative system. Finally, the x-y
% coordinate motion of the second mass is plotted.
close all
% rename outputs
t = tout;
theta1 = xout(:,1);
theta1dot = xout(:,2);
theta2 = xout(:,3);
theta2dot = xout(:,4);
% compute and plot the magnitude of the normalized total energy E(t)/E(0)
E = (m1/2)*l1^2*theta1dot.^2 +(m2/2)*(l1^2*theta1dot.^2 + ...
l2^2*theta2dot.^2 + 2*l1*l2*cos(theta1 -theta2).*theta1dot.* ...
theta2dot) -(m1+m2)*g*l1*cos(theta1)- m2*g*l2*cos(theta2);
figure(3)
plot(t,abs(E/E(1)))
axis([ tspan(1) tspan(end) 0 1.5])
xlabel('time, t'); ylabel('E(t)/E(0)');
% compute the x2- and y2- coordinates of mass 2 and plot (x2, y2)
x2 = l1*sin(theta1) +l2*sin(theta2);
y2 = -l1*cos(theta1)- l2*cos(theta2); %y2 here is positive upwards
figure(4)
plot(x2,y2)
xlabel('x_2'); ylabel('y_2');
29. double_pendulum_anim2
% script double_pendulum_anim2
% This script solves the equations of motion for the double pendulum,
% using the same formulation as in the script double_pendulum_sim and then
% generates an animation of the motion.
close all
% rename outputs
t = tout;
theta1 = xout(:,1);
theta1dot = xout(:,2);
theta2 = xout(:,3);
theta2dot = xout(:,4);
% define arrays holding the endpoints of the two lines between the masses
% note: y1, y2 here are positive upwards
x_array(:,1) = zeros(size(theta1));
x_array(:,2) = l1*sin(theta1);
x_array(:,3) = l1*sin(theta1) +l2*sin(theta2);
y_array(:,1) = zeros(size(theta1));
y_array(:,2) = -l1*cos(theta1);
y_array(:,3) = -l1*cos(theta1)- l2*cos(theta2);
xbig = max(max(x_array));
ybig = max(max(y_array));
xsmall = min(min(x_array));
ysmall = min(min(y_array));
% find x- and y-locations of the center of the region where the points are
% being plotted and the lengths of that region in the x- and y-directions
xcenter = (xbig + xsmall)/2;
ycenter = (ybig + ysmall)/2;
lx = abs(xbig - xsmall);
ly = abs(ybig - ysmall);
%define limits of a somewhat larger region for the plot
xmin = xcenter - 1.5*lx/2;
xmax = xcenter + 1.5*lx/2;
ymin = ycenter - 1.5*ly/2;
ymax = ycenter +1.5*ly/2;
maxr = l1+l2;
xscircle = maxr/50*sin(a);
yscircle = maxr/50*cos(a);
xssquare = maxr/50*s(1,:);
yssquare = maxr/50*s(2,:);
fill(xssquare,yssquare,'k');
hold on
% define path, massless rods connecting the particles, and the masses as
% objects at t = 0.
if strcmp(marker, 'on')
path = plot(x_array(1,3), y_array(1,3), 'k.', 'MarkerSize',2);
end
r1 = plot([x_array(1,1),x_array(1,2)],[y_array(1,1),y_array(1,2)],
...
'r', 'LineWidth', 2);
r2 = plot([x_array(1,2),x_array(1,3)], [y_array(1,2), y_array(1,3)],
...
'r', 'LineWidth', 2);
mass1 = fill(xscircle +x_array(1,2), yscircle + y_array(1,2), 'k');
mass2 = fill(xscircle + x_array(1,3), yscircle + y_array(1,3), 'k');
axis equal
grid off
axis([ xmin xmax ymin ymax]);
xlabel('x-axis')
ylabel( 'y-axis')
% draw rods, masses, and path marker at their successive locations in time
for i = 1:length(t)
30. linear_dp
% script linear_dp
% This script solves analytically for the small amplitude motion of the
% double pendulum using a superposition of the two normal modes of the
% system. The script plots the angles of the two masses in the double
% pendulum and also provides all of the inputs needed to run the script
% double_pendulum_sim with the same parameters.
clear
close all
% input parameters
m1 = 0.1; % mass 1
m2 = 0.1; % mass 2
l1 = 0.2; % massless rod length 1
l2 = 0.2; % massless rod length 2
A1 = 0.1; % amplitude of first normal mode
A2 = 0.07; % amplitude of second normal mode
d1 = 0; % starting phase of first normal mode
d2 = pi/2; % starting phase of second normal mode
g = 9.81; % acceleration of gravity
w0 = sqrt(g/l1); % simple pendulum natural frequency
w1 = sqrt(2-sqrt(2))*w0; % first natural frequency of double pendulum
w2 = sqrt(2+sqrt(2))*w0; % second natural frequency of double pendulum
t = linspace(0, 10, 300); % times for calculation
tspan = t; % place times into tspan for use in double_pendulum_sim
figure (2)
plot(t, theta2)
xlabel('time, t'); ylabel('\theta_2');
% right side of the first order system of equations with mass matrix
f(1) = x2;
f(2) = -(m2*l2*x4^2)*sin(x1-x3)-(m1+m2)*g*sin(x1);
f(3) = x4;
f(4) =(m2*l1*x2^2)*sin(x1-x3) -m2*g*sin(x3);
end
end
32. double_pendulum_m_sim
% script double_pendulum_m_sim
% This script solves the double pendulum problem using a formulation that
% includes a mass matrix in the solution. Like the script
% double_pendulum_sim this script plots the angles of the two masses
% versus
% time, evaluates and plots the normalized total energy versus time, and
% plots the (x2, y2) coordinates of the mass m2 during the motion.
close all
figure (2)
plot(t, theta2)
xlabel('time, t'); ylabel('\theta_2');
% calculate the total energy E(t) and plot E(t)/E(0) versus time
E = (m1/2)*l1^2*theta1dot.^2 +(m2/2)*(l1^2*theta1dot.^2 + ...
l2^2*theta2dot.^2 + 2*l1*l2*cos(theta1 -theta2).*theta1dot.* ...
theta2dot) -(m1+m2)*g*l1*cos(theta1) - m2*g*l2*cos(theta2);
figure(3)
plot(t,abs(E/E(1)))
axis([ tspan(1) tspan(end) 0 1.5])
xlabel('time, t'); ylabel('E(t)/E(0)');
33. animate_lines
% find number of line end points, npts, and the number of values in those
% end points, nvals, to be plotted
[nr,nc] = size(x_array);
npts = nc;
nvals = nr;
% number of lines
nlines = npts -1;
Appendix F: MATLAB® Functions and Scripts 663
% find largest and smallest x- and y-values of the points being plotted and
% define a region slightly larger for the animation.
xbig = max(max(x_array));
ybig = max(max(y_array));
xsmall = min(min(x_array));
ysmall = min(min(y_array));
for nn = 1:nlines
if strcmp(marker, 'on')
path = plot(x_array(1, npts), y_array(1, npts), 'k.','MarkerSize', ...
2);
end
for nn = 1:nlines
set(h(nn),'XData', [x_array(ii, nn), x_array(ii,nn+1)], 'YData', ...
[y_array(ii, nn) , y_array( ii, nn+1)]);
end
if strcmp(marker,'on')
set(path, 'XData', x_array(1:ii, npts),'YData', y_array(1:ii, npts));
end
664 Appendix F: MATLAB® Functions and Scripts
if ii <= nvals
pause(.01*sldwn);
end
end
hold off
end
34. double_pendulum_m_anim
% script double_pendulum_m_anim
% This script solves the double pendulum problem using a formulation that
% includes a mass matrix in the solution. Like the script
% double_pendulum_anim this script animates the motion of the masses but
% in this case the animation is done by calling a 2-D animation function,
% animate_lines.
close all
% calculate the (x1, y1) coordinates of mass m1 and the (x2, y2)
% coordinates of mass m2 , store them in arrays and animate
x1 = l1*sin(theta1);
y1 = -l1*cos(theta1); % positive y1 here is measured upwards
x2 = l1*sin(theta1) +l2*sin(theta2);
Appendix F: MATLAB® Functions and Scripts 665
% create column vectors to hold the outputs and the accelerations, which
% are parts of the first order system of equations
xdot = zeros(8,1);
accel = zeros(4,1);
36. rolling_axle_sim
% script rolling_axle_sim
% This script solves for the motion of a rolling axle where the mass of the
% system is concentrated at the ends of the axle. This problem is an
% example of a combination of holonomic and non-holonomic constraints
% where
% the constraints are not independent. The solution is obtained with the
% use of the pseudo-inverse of a matrix. The path of the center of mass of
% the axle is plotted. There is an analytical solution to this problem that
% can be used to verify the numerical solution.
close all
Chapter 4
37. slider_crank
% slider_crank script
% This script solves for the angular positions, velocities, and the
% accelerations of the slider-crank mechanism by writing general
% analytical expressions for the positions and then differentiating those
% expressions two times analytically to obtain linear equations for the
% velocities and accelerations. The angular motion of the crank is a
% specified function of time.
clear
close all
% position analysis
ang2 = asin(l1*sin(ang1)/l2); % angle of connecting rod
xp = l1*cos(ang1)+ sqrt(l2.^2 -(l1.^2)*sin(ang1).^2); % position of
% piston
% velocity analysis
% solving the linear system [A]{vels} = {bv} at the times t
% {vels} = [ vp ; dang2] where vp is the velocity of the piston and
% dang2 is the angular velocity of the connecting rod
for nn = 1: numpts
A = [1 l2*sin(ang2(nn)) ; 0 l2*cos(ang2(nn))];
bv = [-l1*dang1(nn)*sin(ang1(nn)); l1*dang1(nn)*cos(ang1(nn))];
vels = A\bv;
vp(nn) = vels(1);
dang2(nn) = vels(2);
end
% acceleration analysis
% solving the linear system [A]{acels} = {ba} at the times t
% {acels} = [ ap ; ddang2] where ap is the acceleration of the piston and
% ddang2 is the angular acceleration of the connecting rod. The column
% vector {ba} =[ b1 ; b2]
for mm = 1:numpts
A = [1 l2*sin(ang2(mm)) ; 0 l2*cos(ang2(mm))];
ba = [b1(mm); b2(mm)];
acels = A\ba;
ap(mm) = acels(1);
ddang2(mm) = acels(2);
end
figure(4)
plot(t, ap)
xlabel('time, t'); ylabel('a_p');
% plot angular acceleration of the connecting rod (rad/sec^2) versus time
figure(5)
plot(t, ddang2)
xlabel('time, t'); ylabel('d^2\theta/dt^2');
38. slider_crank_f
39. slider_crank_J
40. newton_raph
% internal variables
jtol = 1e-10; % tolerance value to detect singular Jacobian
maxval = 10000.;% maximum value of the functions used to detect divergence
Niter = 100; % maximum number of iterations
while (NN>0)
JJ = feval(Jh, t, xx, varargin{:});% evaluate Jacobian at current guess
if abs(det(JJ)) < jtol % check to ensure Jacobian is non-singular
error('newtonrm-Jacobian is singular');
abort;
end
41. slider_crank_sol2
for nn = 1:numtimes
[xn, iter] = newton_raph(@slider_crank_f, ...
@slider_crank_J,t(nn),x0, ftol,d1,d2,ang10);
ang1a(nn) = xn(1);
ang2a(nn) = xn(2);
xpa(nn) = xn(3);
numit(nn) = iter;
x0 = xn;
end
672 Appendix F: MATLAB® Functions and Scripts
end
42. slider_crank_newton_sim2
% slider_crank_newton_sim2
% This script solves the positional equations for the slider-crank problem
% numerically using the Newton-Raphson method. It generates plots for the
% the connecting rod and piston motions, both from the numerical solution
% and from evaluating anaytical expressions.
close all
% rename outputs
ang1a = xout(:,1);
ang2a = xout(:,2);
xpa = xout(:,3);
figure (4)
plot(tspan, xpa)
xlabel('time, sec'); ylabel('approx X_p');
43. slider_crank_sim3
close all
for nn = 1: num
accels = J\bv;
end
676 Appendix F: MATLAB® Functions and Scripts
45. foucault_sim
% script foucault_sim
% This script solves for the motion of the Foucault pendulum numerically
% over a long time interval (10,000 sec) to demonstrate the rotation of the
% plane of motion of the pendulum over time. The script also plots the
% normalized total energy over this time interval.
close all
46. slider_crank_f_matrix
% constraint functions
f1 = x(1) -d1*cos(x(3))/2;
f2 = x(2) - d1*sin(x(3))/2;
f3 = x(4) - d2*cos(x(6))/2 - x(1) - d1*cos(x(3))/2;
f4 = x(5) - d2*sin(x(6))/2 - x(2) -d1*sin(x(3))/2;
f5 = x(7) - x(4) - d2*cos(x(6))/2;
f6 = x(8) - x(5) - d2*sin(x(6))/2;
f7 = x(8);
f8 = x(9);
f9 = x(3) +6*t -ang10;
47. slider_crank_J_matrix
J1 = [ 1 0 d1*sin(x(3))/2 0 0 0 0 0 0];
J2 = [ 0 1 -d1*cos(x(3))/2 0 0 0 0 0 0];
J3 = [ -1 0 d1*sin(x(3))/2 1 0 d2*sin(x(6))/2 0 0 0 ];
J4 = [ 0 -1 -d1*cos(x(3))/2 0 1 -d2*cos(x(6))/2 0 0 0];
678 Appendix F: MATLAB® Functions and Scripts
J5 = [ 0 0 0 -1 0 d2*sin(x(6))/2 1 0 0];
J6 = [ 0 0 0 0 -1 -d2*cos(x(6))/2 0 1 0];
J7 = [ 0 0 0 0 0 0 0 1 0];
J8 = [ 0 0 0 0 0 0 0 0 1];
J9 = [ 0 0 1 0 0 0 0 0 0];
48. slider_crank_matrix_sol
for nn = 1:numtimes
[xn, iter] = newton_raph(@slider_crank_f_matrix, ...
@slider_crank_J_matrix,t(nn),x0, ftol,d1,d2,ang10);
x1(nn) = xn(1);
y1(nn) = xn(2);
ang1(nn) = xn(3);
x2(nn) = xn(4);
y2(nn) = xn(5);
ang2(nn) = xn(6);
x3(nn) = xn(7);
y3(nn) = xn(8);
ang3(nn) = xn(9);
Appendix F: MATLAB® Functions and Scripts 679
numit(nn) = iter;
x0 = xn;
end
% place the angles and displacements as column vectors in the matrix, xout.
xout = [x1', y1', ang1', x2',y2',ang2',x3',y3',ang3'];
end
49. slider_crank_matrix_sim
% slider_crank_matrix_sim
% This script sets up matrix-vector equations for a kinematically driven
% crank-slider for the positions, velocities, and accelerations and solves
% them numerically, starting with the use of the Newton-Raphson method to
% solve the non-linear positional constraints and then solving the
% linear equations for the velocities and accelerations in succession.
close all
Chapter 5
51. rolling_disk_sim
% script rolling_disk_sim
% This script solves for the motion of a circular disk of radius r that
% rolls without slipping on a circular track of radius R. The script plots
% the angular motion versus time and plots both the friction force and
% the maximum allowable frictional force to ensure that slipping has not
% occurred.
close all
% rename outputs
t = tout;
phi = xout(:,1);
phidot = xout(:,2);
% plot angle phi versus time and plot the magnitude of the friction force,
% |F|, together with mu times the normal force, N, to examine if slipping
% has occurred.
Appendix F: MATLAB® Functions and Scripts 683
figure(1)
plot(t, phi)
xlabel('time, t'); ylabel('\phi');
figure (2)
plot(t, abs(F))
hold on
plot(t, mu*N, '--')
xlabel('time, t'); ylabel(' |F| and \muN');
hold off
Chapter 7
52. vibrating_string_anim
% vibrating_string_anim script
% This script solves for the free, vertical vibrating of a series of masses
% that are held together by an elastic string and where the ends of the
% string are held fixed. The natural frequencies (eigenvalues) and
% eigenfunctions of the system are calculated and then used to express the
% solution to the problem as a superposition of modal coordinates. The
% system of masses is given a set of initial displacements and velocities
% and the solution for the subsequent free vibration motion is animated.
close all
a = 0:pi/100:2*pi;
xcircle = 0.05*cos(a);
ycircle = 0.05*sin(a);
hold on
% generate small point masses
mass1 = fill(xcircle +1,ycircle,'b');
mass2 = fill(xcircle +2,ycircle,'b');
mass3 = fill(xcircle +3,ycircle,'b');
mass4 = fill(xcircle +4,ycircle,'b');
mass5 = fill(xcircle +5,ycircle,'b');
pause(.07);
end
hold off
53. free_vibs_2D
% script free_vibs_2D
% This script solves for the free vibrations of a damped, two degree of
% freedom system where two masses are connected to each other and to two
% fixed supports by springs and dashpots. It sets up the problem as a
% system of first order differential equations, solves for the eigenvalues
% and eigenvectors of the system, which are then used to find the constants
% in the homogeneous solution that satisfy the initial conditions. The
% script plots the displacement versus time of the first mass.
% NOTE ****** This solution assumes that the system is an underdamped
% system without any rigid body modes *******
close all
% solve for the eigenvectors and eigenvalue of the first order system
[V,D] = eig(B,A);
end
% plot displacement of mass 1. Take real part to eliminate any small
% imaginary components
plot(t, real(x1))
xlabel('time, t'); ylabel('x_1');
54. free_vibs_2D_approx
% script free_vibs_2D_approx
% This script solves for the free vibrations of a damped, two degree of
Appendix F: MATLAB® Functions and Scripts 687
% freedom system where two masses are connected to each other and to two
% fixed supports by springs and dashpots. It solves the problem
% by assuming the solution can be expanded in terms of the undamped natural
% modes of the system and then forces the damping matrix in the modal
% coordinates to be diagonal by ignoring the off-diagonal terms. This
% decouples the modal equations but is only an approximation. The
% script plots the displacement versus time of the first mass.
% NOTE ****** This solution assumes that the system is an underdamped
% system without any repeated natural frequencies *******
close all
nn = nn+1;
end
% plot motion of mass 1
plot(t, x1, '--')
xlabel('time, t'); ylabel('x_1');
Chapter 8
55. fixed_gyro_pend
% rename variables
theta = x(1);
phi = x(2);
thdot = x(3);
phdot = x(4);
56. fixed_gyro_pend_sim
% script fixed_gyro_pend_sim
% This script simulates the motion of a bar-disk assembly that is pinned
% at one end to a support that is free to rotate about a vertical axis.
% The assembly acts like a spherical pendulum since the disk is rigidly
% fixed to the bar. The output of the script is an animation of the motion
% of the end of the bar-disk assembly.
close all
% set up 3-D plotting region with X-Y-Z axes oriented and viewed as shown
% in the text and label the axes
view(3)
grid on
Appendix F: MATLAB® Functions and Scripts 691
set(gca,'ZDir', 'reverse')
set(gca,'YDir', 'reverse')
view(33,15)
xlabel('x')
ylabel('y')
zlabel('z')
axis([ -r, r, -r, r, -r, r ]);
pause(0.01);
end
57. gyro_pend
% rename inputs
w1 = x(1); % omega1 angular velocity
w2 = x(2); % omega2 angular velocity
w3 = x(3); % omega3 angular velocity
ph = x(4); % angle phi
th = x(5); % angle theta
psi =x(6); % angle psi
58. gyro_pend_sim
% script gyro_pend_sim
% This script simulates the motion of a bar-disk assembly that is pinned
% at one end to a support that is free to rotate about a vertical axis.
% The disk is free to spin so the assembly acts as a gyro-pendulum. The
% script solves for the motion of the system using Euler's equation,
% written in terms of the angular velocities, and the time derivatives of
% Euler angles(the 3-2-3 set) written in terms of the angles and the
% angular velocities. The output of the script is an animation of the
% motion of the end of the arm of the gyro-pendulum.
close all
% rename times
t = tout;
num = length(t); % number of calculation times
% set up 3-D plotting region with X-Y-Z axes oriented and viewed as shown
% in the text and label the axes
view(3)
grid on
set(gca,'ZDir', 'reverse')
set(gca,'YDir', 'reverse')
view(33,15)
xlabel('X')
ylabel('Y')
zlabel('Z')
axis([ -r, r, -r, r, -r, r ]);
pause(0.01);
end
59. gyro_pend_ep
% parameters
% and the angular velocities. The inputs are tspan,the times at which the
% motion is calculated, x0, the initial conditions for the system
% variables
% (w1, w2, w3, e0, e1, e2, e3), R, the radius of the disk, L, the length of
% the weightless arm, m, the mass, g, the acceleration of gravity, and
% rtol, atol, the relative and absolute error tolerances. The outputs are
% tout, a column vector of the times at which the solution is calculated,
% xout, a matrix which contains the system variables evaluated at those
% times and located in the columns of the matrix.
% rename inputs
% angular velocities
w1 = x(1); % omega1
w2 = x(2); % omega2
w3 = x(3); % omega3
% Euler parameters
e0 = x(4); % theta0
e1 = x(5); % theta1
e2 = x(6); % theta2
e3 = x(7); % theta3
60. gyro_pend_ep_sim
% script gyro_pend_ep_sim
% This script simulates the motion of a bar-disk assembly that is pinned
% at one end to a support that is free to rotate about a vertical axis.
% The disk is free to spin so the assembly acts as a gyro-pendulum. The
% script solves for the motion of the system using Euler's equation,
% written in terms of the angular velocities, and the time derivatives of
% the Euler parameters, written in terms of those parameters and the
% angular velocities. The output of the script is an animation of the
% motion of the end of the arm of the gyro-pendulum.
close all
% rename times
t = tout;
% number of time calculations
num = length(t);
w2 = xout(:,2); % omega2
w3 = xout(:,3); % omega3
% Euler parameters
e0 = xout(:,4); % theta0
e1 = xout(:,5); % theta1
e2 = xout(:,6); % theta2
e3 = xout(:,7); % theta3
% set up 3-D plotting region with X-Y-Z axes oriented and viewed as shown
% in the text and label the axes
view(3)
grid on
set(gca,'ZDir', 'reverse')
set(gca,'YDir', 'reverse')
view(33,15)
xlabel('X')
ylabel('Y')
zlabel('Z')
axis([ -r, r, -r, r, -r, r ]);
698 Appendix F: MATLAB® Functions and Scripts
pause(0.01);
end
Chapter 9
61. wave_1D_sim
% wave_1D_sim script
% This script generates a finite difference solution to the 1-D wave
% equation that simulates the longitudinal waves propagating in an
% elastic
% rod. The rod is driven by specifying the displacement as a function of
% time at one end and holding the other end fixed. An animation of the
% traveling waveform is generated. close all
for t = 0:dt:tmax
% plot the current displacements in the rod after every Nframe iterations
% in the loop and pause tplot seconds to allow the plot to be displayed
if mod(t/dt, Nframe) == 0
plot([0:new_dx:L], current, 'b', 'LineWidth',1.5)
axis([0 L -2 2])
pause(tplot)
end
end
Appendix C
62. newton_m
% internal variables
dtol = 1e-10; % tolerance on derivative
700 Appendix F: MATLAB® Functions and Scripts
Appendix E
63. s_space
64. Ftrans
y = dt*fft(x);
end
65. IFtrans
y = (1/dt)*ifft(x);
end
702 Appendix F: MATLAB® Functions and Scripts
66. impulse_response
% script impulse_response
close all
Chaotic behavior, 83, 85, 210, 212 Drag forces, 22, 23, 30, 33–36, 52, 141,
Characteristic equation, 405–412, 456, 631, 632
469, 478 Dynamic potential energy, 111, 395, 404
Circulatory matrix, 455
Cofactors (matrix), 582–584
Conservation of angular momentum, 92, 182 E
Conservation of energy, 30, 162, 163, 193, Eigenvalue problems, 217, 405, 427, 428, 430,
387–390 456–458, 462, 479, 480, 595, 687
Conservation of linear momentum, 120, 178 Embedding of constraints, 94–102, 146–153
Conservative systems, 29, 30, 80, 162, 210, Equations of motion, 3, 21, 176, 248, 352, 404,
397–402, 407, 412, 414, 444, 445, 655 449, 495
Constrained motion, vii, 9, 13, 37–43, 45–61, Equivalent force systems, 356, 365
73, 75, 85–90, 94, 105, 133, 135, Euler angles, vii, 237, 312, 314–317, 319, 321,
229, 261 324, 325, 327, 502, 511, 513, 518–524,
Constraint drift, 42, 43, 73, 74, 161, 167, 382 527, 528, 531, 532, 537, 539, 541–544,
Constraint forces, v, 13, 37, 41, 43, 46, 57, 547, 691, 692, 696
62–66, 68–75, 86–88, 91, 93–95, Euler parameters, vii, 237, 314, 319–325, 502,
102–107, 120–123, 125–128, 131–144, 520, 522–528, 531, 547, 694, 695, 697
146, 149–151, 153, 154, 156, 157, 164, Euler parameters constraint, 525–527
173, 174, 176, 177, 186, 200, 201, Euler’s equations, 511–525, 541, 543, 544,
222–224, 226, 228, 229, 232, 235, 339, 547, 692, 696
352–369, 374, 381, 384–393, 513, 517, Expansion theorem, 462
523, 529, 530, 534, 535, 537
Constraint satisfaction, 153–161, 649–652
Convolution integrals, 475, 486–488, 493, 610, F
612–614, 616, 618 Fast Fourier transform (FFT), 618, 624,
Coriolis acceleration, 7, 8, 241, 272, 274 630, 701
Coulomb friction force, 66 Finite differences method, 553
Courant number, 556, 571, 699 Finite element method, vii, 561–567
Critical load, see Buckling load Foucault’s pendulum, 3, 277
Cylindrical coordinates, 5–7, 11, 26, 167, 241 Fourier transforms, 14, 488, 572, 617, 618,
621–628, 630, 701
Frames, 81, 221, 237, 244–248, 270, 281, 284,
D 286, 288–291, 310, 311, 314, 316, 322,
D’Alembert-Lagrange principle, 125, 127, 128, 325, 327–329, 336, 338, 392, 511, 512,
200, 412, 413 519, 530, 533, 538, 539, 541, 542, 544,
Damping factors, 481, 483, 607, 608, 615, 628, 546, 547, 556
687, 702 Frobenius conditions, 93
Degrees of freedom, 41, 93–95, 106, 114, 146,
151, 174–176, 182, 194, 205, 222,
223, 227, 235, 268, 340, 345, 354, G
397, 399, 401, 412, 424, 428, 450, Galerkin approach, 567
456, 513, 525 Gauss’s law of least constraint, 133–136, 228
Dependent constraints, 227–232 Gaussian virtual acceleration, 132, 137
Dependent coordinates, 41, 42, 149, 151, Generalized coordinates, 75, 94–108, 110, 111,
268, 354 114, 119–121, 125, 136, 140, 146–149,
Determinants (matrix), 11, 39, 46, 214, 215, 152, 153, 194, 200–223, 227–229,
259, 263, 399, 402, 415, 425, 426, 430, 231–235, 253, 260, 262, 263, 268, 291,
431, 456, 469, 478, 582–585 292, 294, 295, 301, 343, 355, 357, 364,
Differential algebraic equation (DAE), 38, 169 382, 386, 389, 395, 397, 404, 412, 414,
Direction cosine matrix, 304, 308 452, 462–464, 474, 476, 482, 487, 500,
Double pendulum, 81, 204–221, 389, 400–402, 503, 511, 527, 531, 533, 534, 536, 537,
408, 410, 451, 457, 654, 659–665 545, 550, 673, 684
Index 705
R T
Rayleigh dissipation function, 454, 455, 546 Terminal velocity, 36
Relative error tolerance (rtol), 48, 49, 59, 635, Total energy, 29, 30, 50, 54, 55, 61, 80, 81, 83,
637, 639, 641, 642, 645, 646, 653, 87, 114, 115, 159, 160, 162, 163,
655, 656, 661, 664, 666, 676, 682, 166–168, 188, 199, 210, 277, 374–376,
689, 693, 696 397, 419, 444, 445, 505, 521, 522,
Relative velocity and acceleration, 237–243, 540, 545, 636, 639, 652, 655, 656,
247, 248, 250, 258, 260, 269, 279, 661, 662, 676
286–289, 299, 329, 331 Transfer matrix, 484, 488
Rodriguez formula, 321 Transport theorem, 243–269, 289–292, 329,
Roller-coaster 512, 539, 542, 543
with Coulomb friction, 142–144, 146, Transpose (matrix), 9, 125, 135, 280, 283,
647–649 308, 311, 337, 338, 358, 579–581,
frictionless, 140 584–586, 684
Rolling without slipping, 222, 363–369, 375,
376, 380, 532, 537, 681–683
Rotating hoop, 114–119, 165, 277, 402, 403, U
443, 450, 454, 644, 645 Unconstrained motion, 21–36, 42, 75–85, 94,
Rotation matrix, 280–283, 289, 291, 292, 303, 106, 135, 194
304, 306–310, 312–314, 319, 321, 322, Unit impulse response, see Impulse response
325, 328, 329, 338, 502, 511, 512, 516, Universal law of gravitation, see Newton’s law
523, 542, 543, 593, 594 of gravitation
Runge-Kutta methods, 156, 597, 599–601, 650
V
S Virtual displacements, vi, 13, 122, 124–128,
Shape functions, 562–567 131, 132, 201, 413
Singular configurations, 258–260, 262, Virtual work, 13, 32, 122–130, 201, 372,
268, 319 412–414, 567
Skew matrix, 11, 14, 591 Viscous damping force, 52, 128, 455
Slider-crank, 250, 251, 253–263, 267,
269–271, 291–293, 295, 297–299,
329–331, 333, 335, 667–669, 671–674, W
677–681 Wave equation, vii, 472, 473, 551–553, 556,
Snap-through instability, 412, 438, 439, 557, 559–562, 567, 568
441–443 Wavelength, 473
Spherical coordinates, 7–9, 11, 15, 26, 27, 75, Work-energy relation
165, 241, 242 elastically connected system of particles,
Spin angles, 312, 537, 541, 545 191–193
Spring Pendulum, 75–85, 164, 210, 451, 640 particle, 31, 186, 193
Standing wave, 474 rigid body in plane motion, 371–375
Steady-state solutions, 476, 484, 488, 546, 616, system of particles, 188–190
618, 619 Work of a force, 32
Stiffness matrix, 427, 428, 451, 453, 454, 457,
459, 462, 467, 565, 684
Stokes’ theorem, 32 Y
Strain energy, see Internal potential energy Young’s modulus, 441, 472, 551,
System coordinates, 41, 42, 73, 94, 102, 106, 568, 571
146–148, 158, 456
System of first-order equations, 33, 166, 224,
478, 481, 655