Thesis- Multibody Dynamics

101
INVESTIGATIVE STUDY ON AN ENERGY THEOREM FOR DEVELOPING TESTING FUNCTIONS FOR NUMERICAL SIMULATIONS OF MULTIBODY DYNAMIC SYSTEMS Kulasegaram Gugaratshan, M.S.E. Western Michigan University, 2008 Multibody dynamic systems designers utilize computer software extensively to simulate the motion of mechanical systems. The governing differential equations of motion are formulated and solved numerically. The accuracy of the numerical solutions is always a concern to the analyst. There have been many investigations done around the world to check the accuracy of these simulations, and based on these investigations, many methods have been developed. These methods are usually based on energy balance equations and can be used to test the validity or the correctness of the numerical solutions. This thesis analyzes and compares these methods based on their formulation and their applicability to test the accuracy of the simulations. A MATLAB/Simulink model of a triple pendulum example system is used to demonstrate the utility of each method. The methods are used to identify numerical inaccuracies associated with the differential equation solver, the integration step size, and errors in the equations of motion.

Transcript of Thesis- Multibody Dynamics

Page 1: Thesis- Multibody Dynamics

INVESTIGATIVE STUDY ON AN ENERGY THEOREM FOR DEVELOPING TESTING FUNCTIONS FOR NUMERICAL SIMULATIONS OF

MULTIBODY DYNAMIC SYSTEMS

Kulasegaram Gugaratshan, M.S.E.

Western Michigan University, 2008

Multibody dynamic systems designers utilize computer software extensively to

simulate the motion of mechanical systems. The governing differential equations of

motion are formulated and solved numerically. The accuracy of the numerical solutions

is always a concern to the analyst. There have been many investigations done around

the world to check the accuracy of these simulations, and based on these investigations,

many methods have been developed. These methods are usually based on energy

balance equations and can be used to test the validity or the correctness of the numerical

solutions. This thesis analyzes and compares these methods based on their formulation

and their applicability to test the accuracy of the simulations. A MATLAB/Simulink

model of a triple pendulum example system is used to demonstrate the utility of each

method. The methods are used to identify numerical inaccuracies associated with the

differential equation solver, the integration step size, and errors in the equations of

motion.

Page 2: Thesis- Multibody Dynamics

INVESTIGATIVE STUDY ON AN ENERGY THEOREM FOR DEVELOPING TESTING FUNCTIONS FOR NUMERICAL SIMULATIONS OF

MULTIBODY DYNAMIC SYSTEMS

by

Kulasegaram Gugaratshan

A Thesis Submitted to the

Faculty of The Graduate College in partial fulfillment of the

requirements for the Master of Science in Engineering (Mechanical)

Department of Mechanical and Aeronautical Engineering

Western Michigan University Kalamazoo, Michigan

April 2008

Page 3: Thesis- Multibody Dynamics

Copyright by Kulasegaram Gugaratshan

2008

Page 4: Thesis- Multibody Dynamics

ii

ACKNOWLEDGEMENTS

I like to thank Dr. James Kamman, advisor, for his priceless help throughout my

class work and thesis work. His support and patience helped me overcome my life

changing events to fulfill my degree requirements.

Also, I like to thank my thesis committee members Dr. Koorosh Naghshineh and

Dr. Dennis VandenBrink for their support.

Finally, I want to thank my wife, Watzala, for her patience with me when I was

working on the thesis nights after nights sitting in front of my computer.

Kulasegaram Gugaratshan

Page 5: Thesis- Multibody Dynamics

iii

TABLE OF CONTENTS

ACKNOWLEDGEMENTS............................................................................................. ii

TABLE OF CONTENTS................................................................................................. iii

LIST OF FIGURES ......................................................................................................... vi

CHAPTER

1. SOLVING EQUATIONS OF MOTION .............................................................. 1

1.1. Introduction.......................................................................................... 1

1.2. Mechanical System and Coordinates ................................................... 2

2. DEVELOPING TESTING FUNCTIONS............................................................. 4

2.1. Kane and Levinson’s Method, 1988 .................................................... 4

2.2. Kane and Levinson’s Method Extended, 1990 .................................... 6

2.3. Liu and Huston’s Method, 1995 ........................................................... 7

2.4. Wang’s Method, 1993.......................................................................... 8

2.5. Testing Function Development............................................................ 9

2.5.1. Unconstrained System of N Bodies ......................................... 9

2.5.2. System of N Bodies with Configuration Constraints.............. 14

2.5.3. Configuration Constraints and Motion Constraints ................ 16

2.5.4. Derivation of Energy Conservation Theorem......................... 21

3. TRIPLE PENDULUM SYSTEM ........................................................................ 29

3.1. Equations of Motion ........................................................................... 30

3.1.1. Developing Equations of Motions using Lagrange’s Method 31

3.1.2. Derivation of Kinetic Energy Rate K .................................... 35

3.2. Application of Energy Theorems........................................................ 36

Page 6: Thesis- Multibody Dynamics

iv

Table of Contents-Continued

CHAPTER

3.2.1. Coordinates ............................................................................. 37

3.2.2. Generalized Forces.................................................................. 37

3.2.3. Configuration Constraints....................................................... 38

3.2.4. Wang’s Energy Theorem: No Motion Constraints ................. 39

3.2.5. Liu and Huston’s Energy Theorem: No Motion Constraints.. 41

3.2.6. Wang’s Energy Theorem: With Motion Constraint................ 41

3.2.7. Liu and Huston’s Energy Theorem: With Motion Constraint 44

4. MATLAB AND SIMULINK SIMULATION RESULTS................................... 46

4.1. Modeling in Matlab and Simulink ...................................................... 47

4.1.1. Liu and Huston’s Testing Function in Matlab and Simulink.. 47

4.1.2. Wang’s Testing Function in Matlab and Simulink ................. 48

4.2. Free Motion......................................................................................... 49

4.2.1. Initial Kinetic Energy of the System = 0 ................................ 49

4.2.2. Initial Kinetic Energy of the System ≠ 0 ................................ 52

4.2. Specified Motion................................................................................. 53

4.3. Make a Mistake in Formulation of Equations of Motions.................. 56

4.4. Contribution of a Small Damper in Simulation Accuracy.................. 58

5. CONCLUSION .................................................................................................... 63

BIBLIOGRAPHY........................................................................................................... 64

Page 7: Thesis- Multibody Dynamics

v

Table of Contents-Continued

APPENDICES

A. Definition of Terms............................................................................... 65

B. Matlab/ Simulink Programming for Free Motion of the Pendulum..... 67

Page 8: Thesis- Multibody Dynamics

vi

LIST OF FIGURES

3.1. Triple pendulum example ..................................................................................... 30

4.1. Motion for integration time steps of 0.01, 0.001, and 0.0001 seconds................. 50

4.2. Euler, Runge-Kutta, and Dormand-Prince integrations for 0.001 second ............ 51

4.3. Time steps of 0.01, 0.001, and 0.0001seconds with an initial kinetic energy ..... 52

4.4. Specified motion for 1( t ) Asin tθ ω= .................................................................. 54

4.5. Driving toque 1M to maintain Body 1 pendulum specified motion...................... 55

4.6. Euler, and Runge-Kutta, and Dormand -Prince integration method for the time

step=0.001 second................................................................................................. 56

4.7. Mistake in the equations of motion that affect the kinetic energy calculation ..... 58

4.8. Triple pendulum motion without and with the damper ........................................ 60

4.9. Damping effect in simulation accuracy ................................................................ 60

4.10. Dampers effect in incorrect equations of motions ................................................ 62

Page 9: Thesis- Multibody Dynamics

1

CHAPTER 1

SOLVING EQUATIONS OF MOTION

1.1. Introduction

Dynamics has been the subject of extensive research over the past three decades.

The advent of computers contributed significant improvement in the field of dynamics.

Scientists and engineers realized the need for understanding the dynamics of

interconnected bodies by computer simulation before spending money on physical

experiments. Dynamics of the bodies are highly nonlinear in nature and their analysis

requires the use of matrix, numerical, and computer methods [1].

The non-linear equations of motion of large-scale mechanical systems are too

complicated to be developed in closed-form. Consequently, they are usually formulated

and solved numerically. Given the complexity of this computational procedure, the

correctness of the equations and the accuracy of their solution is always in question.

Generally, simulation errors may be a result of inaccuracies associated with the

differential equation solver, the integration step size, and errors in the equations of

motion [2].

Recently, there has been increasing focus by analysts in finding ways to test the

accuracy of numerical solutions [2,3,5,6,8,9]. Accuracy of the solution can be checked

by intuitive or physical reasoning or using a conservation principle regulating the solution

[3]. Testing functions have been developed based on the conservation principles.

Page 10: Thesis- Multibody Dynamics

2

However, these testing functions are generally dependent upon the mechanical systems

specified. Analysts like T.R Kane, D.A Levinson, R. L. Huston etc. [2,3,4], have worked

on many forms of testing functions for the mechanical systems. The development of

testing functions has generally been dependent upon the mechanical system under

consideration, and often also upon the insight of the analyst [3]. There seems to be no

fundamental starting point for testing function development. System constraints,

dissipation forces, and nonlinearities seem to control the applicability of the developed

testing functions.

Keeping this in mind, it will be very useful to understand the applicability of

testing functions on various forms of differential equations that were developed for

mechanical systems. Also, it is useful to see the differences and similarities between the

testing functions in an effort to pave the way to develop a universal testing function for

dynamic systems. This can help scientists to formulate a method, which corrects the

computer simulations using the testing functions.

1.2. Mechanical System and Coordinates

A multibody system consists of number of parts, subject to interconnections and

constraints of various kinds. In a constrained mechanical system, the total work

performed by the effective forces due to infinitesimal virtual displacement is zero and it

became a foundation to the development of Lagrangian dynamics [12]. There are several

ways of representing a rigid body in space. Depending on the number of generalized

coordinates selected to define the configuration of a mechanical system, different

equation structures can be obtained and different solution procedures can be adopted.

Some of the formulations lead to equations that are expressed in terms of the constraint

Page 11: Thesis- Multibody Dynamics

3

forces, while in other formulations, the constraint forces are eliminated automatically.

Equations of motion of simple systems can be formulated using a minimum number of

independent coordinates or using a redundant set of coordinates. It is always possible to

obtain a set of dynamic equations which do not include constraint forces when the

independent sets of coordinates are used. Use of a dependent set of coordinates can have

computational advantages and can also increase the generality and flexibility of the

formulation used. When the equations of motion are formulated using an independent set

of coordinates (equal in number to the number of degree of freedom of the system), one

obtains differential equations that can be solved using a simpler numerical strategy.

When the equations of motion are formulated in terms of dependent set of coordinates, a

more elaborate numerical method must be used and that may increase the numerical

solution error.

Page 12: Thesis- Multibody Dynamics

4

CHAPTER 2

DEVELOPING TESTING FUNCTIONS

Scientist developed many testing functions to check the simulation of a dynamic

system. All the testing functions are based on some form of energy balance equation. Of

all the testing functions developed, three testing functions stand out as unique. They

were developed by Kane and Levinson [2,4], Liu and Huston [3], and Wang [8]. This

chapter will discuss these testing functions and compare them analytically using Wang’s

mathematical notations [8].

2.1. Kane and Levinson’s Method, 1988

For discrete holonomic dynamic systems having “n” degrees of freedom, Kane

and Levinson [2] proposed the following procedure for checking the accuracy of

numerical simulations of the system dynamics.

1. Define a set of generalized speeds ru ( 1, , )r n= … from the derivatives of the

generalized coordinates as

( )1

( 1, , )n

r rs s rs

u Y q Z r n=

= + =∑ … (2.1.1)

where rsY and rZ are in general functions of the generalized coordinates iq ( 1, , )i n= …

and time t . Then, invert this relationship to find

( )1

( 1, , )n

s sr r sr

q W u X s n=

= + =∑ … (2.1.2)

Page 13: Thesis- Multibody Dynamics

5

Here again, srW and sX are functions of the generalized coordinates and time.

2. Find rF ( 1, , )r n= … the generalized active forces (section 2.5.1.e) associated with the

generalized coordinates.

3. Find the functions 1( , , , )nV q q t… and 1( , , , )r nG q q t… that satisfy the following

equations

1

( 1, , )n

r sr rs s

VF W G r nq=

⎛ ⎞∂= − + =⎜ ⎟∂⎝ ⎠∑ … (2.1.3)

and

1

0n

ss s

V V Xt q=

⎛ ⎞∂ ∂+ =⎜ ⎟∂ ∂⎝ ⎠∑ (2.1.4)

Note that the functions V and rG are found by inspection of the generalized forces. A

good candidate for the function 1( , , , )nV q q t… is the potential energy function for the

system.

4. Find the kinetic energy function for the system expressed in the form

2 1 0K K K K= + + . Here, 2K is quadratic in the sq , 1K is linear in the sq , and 0K depends

only on the generalized coordinates and time.

5. Integrate the equations of motion of the system along with the following differential

equation for the variable z

1 1

n n

r r sr s s

K Kz G u Xt q= =

⎛ ⎞∂ ∂= − + + ⎜ ⎟∂ ∂⎝ ⎠∑ ∑ (2.1.5)

where K is the kinetic energy of the system.

6. Calculate the following equation.

2 0C V z K K= + + − (2.1.6)

Page 14: Thesis- Multibody Dynamics

6

If C is not constant, then not all integration results are correct.

The difficulty with this method is identifying the functions 1( , , , )nV q q t… and

1( , , , )r nG q q t… ( 1, , )r n= … in step 3. The forms of these functions depend on the

mechanical system being analyzed. As mentioned earlier, however, the potential energy

function for the system is a good candidate for the function 1( , , , )nV q q t… .

2.2. Kane and Levinson’s Method Extended, 1990

The method described above was later found not to apply to all dynamic systems,

so Kane and Levinson [4] modified their procedure. The new method was essentially the

same as the old method, except the differential equation for the variable z was changed to

be

( ) ( ) ( )1

n

r r G t B tr bodies

z G u mv v Iω ω=

⎡ ⎤= − + ⋅ + ⋅ ⋅⎣ ⎦∑ ∑ (2.2.1)

Here, the second summation is over all the bodies in the system. The vectors tv and tω

are the time derivatives of tv and tω which are found by inspection of the following

equations of the velocities of the mass centers and the angular velocities of the bodies.

1

nG

G r tr r

vv u vu=

⎛ ⎞∂= +⎜ ⎟∂⎝ ⎠∑ (2.2.2)

1

nB

B r tr r

uuωω ω

=

⎛ ⎞∂= +⎜ ⎟∂⎝ ⎠∑ (2.2.3)

The line of reasoning that leads to this new equation (2.2.1) begins with the observation

from Kane and Levinson [4,7] shown in the equation (2.2.4)

( ) ( )p

*r r 2 0 G t B t

r 1 bodiesF u K K mv v Iω ω

=

⎡ ⎤− = − + ⋅ + ⋅ ⋅⎣ ⎦∑ ∑ (2.2.4)

Page 15: Thesis- Multibody Dynamics

7

Here, *rF is the generalized inertia forces (section 2.5.1.f) associated with ru and I is the

inertia dyadic. The difficulty of finding the functions V and rG ( 1, , )r n= … is still

present in this method.

2.3. Liu and Huston’s Method, 1995

Liu and Huston’s Method [3], proposed a testing function that uses Kane’s

equations for general mechanical systems. The testing function is given by equation

(2.3.1) for a simple nonholonomic system. It says that the derivative of the kinetic

energy K of a system may be expressed as a linear combination of products of

generalized active forces rF (see section 2.5.1.e) and generalized speeds ru ( 1, , )r n= … .

n

r rr 0

dK F udt =

=∑ (2.3.1)

When expanding equation(2.3.1), 0 1 1 n ndK F .1 F u ...F udt

= + + , 0F is the acatastatic term

(see Appendix A). Equation (2.3.1) must be satisfied in addition to the governing

dynamical equations [6].

Integrating the equation (2.3.1) over the time interval 0t t→ gives

0 0

0

0

00

0

0

t t n

r rrt t

t n

r rrt

dK dt F u dtdt

K K F u dt

=

=

⎛ ⎞⎛ ⎞ − =⎜ ⎟ ⎜ ⎟⎝ ⎠ ⎝ ⎠

⎛ ⎞− − =⎜ ⎟

⎝ ⎠

∑∫ ∫

∑∫ (2.3.2)

or

0

00

t n

r rrt

K K F u dt=

⎛ ⎞− = ⎜ ⎟⎝ ⎠∑∫ (2.3.3)

Page 16: Thesis- Multibody Dynamics

8

If the initial kinetic energy 0 0K =

0

0

t n

r rrt

K F u dt=

⎛ ⎞= ⎜ ⎟⎝ ⎠∑∫ (2.3.4)

If the initial kinetic energy 0K is zero, then the instantaneous value of the kinetic energy

can be compared directly to the integral as stated in Equation(2.3.4). However, if

the 0 0K ≠ , then the integral gives the kinetic energy difference as suggested by

Equation(2.3.3).

A testing function that should remain constant through any simulation could be

defined to be

0

00

t n

r rrt

C K F u dt K=

⎡ ⎤⎛ ⎞Δ = − −⎢ ⎥⎜ ⎟⎝ ⎠⎢ ⎥⎣ ⎦∑∫ (2.3.5)

2.4. Wang’s Method, 1993

Wang [8] formulated a more general form of testing function which is based on

Kane’s multibody formulations of equation of motion[7]. The testing function can be

given using kinetic energy, potential energy and net energy flow into the system.

. . . .

E K V Q 0= + − = (2.4.1)

where .

E ,.

K and .

V are the time derivatives of the total mechanical energy, kinetic

energy, and potential energy of the system respectively. .

Q is the net power flowing into

the system or work being done on the system. A positive .

Q signifies that the net power

is flowing into the system and, conversely, a negative .

Q indicates that the net power is

Page 17: Thesis- Multibody Dynamics

9

flowing out of the system. The integral of the equation (2.4.1) is a constant.

K V Q cons tant+ − = (2.4.2)

Equation (2.4.2) is the adjusted total energy of the system as discussed by Wang[8]. Both

equations (2.4.1) and (2.4.2) can be used to test the simulations to identify any simulation

errors.

2.5. Testing Function Development

Wang’s energy conservation methodology[8] was analyzed in depth in order to

understand the similarities between testing functions developed by Kane and

Levinson[2,4], Liu and Huston[3], and Wang [8]. Matrix mathematical notations are

adopted similar to Wang’s paper[8].

2.5.1. Unconstrained System of N Bodies

Consider a set of N rigid bodies whose motion is unconstrained. The position and

velocity of the system at any time can be described by a 6 N 1× vector of translational

and angular coordinates and speeds.

a) Generalized Coordinates

Define a vector of generalized coordinates. The first coordinates are the Cartesian

coordinates of the mass centers of the bodies relative to an inertial frame, and the last

are absolute orientation angles of each of the bodies relative to an inertial frame.

( ) ( )1 2 6, , ,TT T T

N Gx x x x x θ= =… (2.5.1)

Page 18: Thesis- Multibody Dynamics

10

b) Generalized Speeds

Define a vector of generalized speeds. The first coordinates are the inertial

components of the velocities of the mass centers of the bodies relative to an inertial

frame, and the last are the body-fixed components of the angular velocities of the bodies

relative to an inertial frame. Moreover, the body-fixed directions are assumed to be

principal directions of the bodies.

( ) ( ) ( )1 2 6, , ,TTT T T T T

N Gv v v v v xω θ= = =… (2.5.2)

c) Partial Velocities

From the definitions of x and v , we can write

11

0ˆ0

D GI xvv Px

Pω θ⎡ ⎤⎧ ⎫ ⎧ ⎫

= =⎨ ⎬ ⎨ ⎬⎢ ⎥⎩ ⎭ ⎩ ⎭⎣ ⎦

(2.5.3)

where 1P is a 6 6N N× matrix, DI is a 3 3N N× identity matrix of partial velocity

components, and 1P is a 3 3N N× matrix of partial angular velocity components.

d) Kane’s Equations of Motion of the Unconstrained System

Using Kane’s equations, the equations of motion of the unconstrained system may

be written as

* 0F F+ = (2.5.4)

Page 19: Thesis- Multibody Dynamics

11

where F and *F are the generalized active and generalized inertia force vectors for the

system.

e) Generalized Active Forces

Vector iF is 3 1× vector of inertial components of the resultant force acting at the

center of mass of body “ i ” and vector iM is 3 1× vector of inertial components of the

corresponding resultant moment/torque acting on body “ i ”. Given these definitions,

force and moment vectors can be formed for the multibody system as follows.

( )1 2

TT T T

f NF F F F= and ( )1 2

TT T T

M NF M M M= (2.5.5)

Using the velocity and angular velocity components as the generalized speeds for Kane’s

equations, the generalized active forces may be written as

0

0

T Tf fD

f MD M M

F FIv vF F FIv F Fω

⎧ ⎫ ⎧ ⎫⎛ ⎞ ⎛ ⎞ ⎡ ⎤∂ ∂= + = =⎨ ⎬ ⎨ ⎬⎜ ⎟ ⎜ ⎟ ⎢ ⎥∂ ∂ ⎣ ⎦⎝ ⎠ ⎝ ⎠ ⎩ ⎭ ⎩ ⎭

(2.5.6)

Also, we can state the active force vector into two terms such as potential force vector VF

and non potential force vector DF .

V DF F F= + (2.5.7)

Page 20: Thesis- Multibody Dynamics

12

f) Generalized Inertia Forces

Vector *iF is 3 1× vector of inertial components of the inertia force of body “ i ”

and *iM is 3 1× vector of inertial components of the corresponding inertia moment/torque

of body “ i ”. Given these definitions, inertia force and inertia moment vectors can be

formed for the multibody system as follows.

( ) ( ) ( )* * * *1 2

TTT T

f NF F F F⎛ ⎞= ⎜ ⎟⎝ ⎠

and ( ) ( ) ( )* * * *1 2

TT T T

M NF M M M⎛ ⎞= ⎜ ⎟⎝ ⎠

(2.5.8)

Using the velocity and angular velocity components as the generalized speeds for Kane’s

equations, the generalized inertia forces may be written as

( )* *

* * ** *

,

00

0 00

0

f M

T Tf fD B

D M M

B

m I

F FI m vv vF F FIv F F I I

m vI I

M vI

ω ω ω

ω ω

ω

⎧ ⎫⎧ ⎫ ⎧ ⎫⎛ ⎞ ⎛ ⎞ ⎡ ⎤ −∂ ∂ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪= + = = =⎨ ⎬ ⎨ ⎬ ⎨ ⎬⎜ ⎟ ⎜ ⎟ ⎢ ⎥∂ ∂ − +Ω⎪ ⎪ ⎪ ⎪⎣ ⎦⎝ ⎠ ⎝ ⎠ ⎪ ⎪⎩ ⎭ ⎩ ⎭ ⎩ ⎭⎧ ⎫ ⎧ ⎫⎡ ⎤

= − −⎨ ⎬ ⎨ ⎬⎢ ⎥ Ω⎣ ⎦ ⎩ ⎭ ⎩ ⎭⎛ ⎞⎧ ⎫

− +⎜ ⎟⎨ ⎬Ω⎩ ⎭⎝ ⎠

(2.5.9)

Here the mass matrix ,

00

Bm I

mM

I⎡ ⎤

= ⎢ ⎥⎣ ⎦

and B 1,2,3,...,N=

where Bm is a 3 3N N× system mass matrix, I is a 3 3N N× system inertia matrix, v is

a 3 1N × vector of inertial components of mass center velocities, ω is a 3 1N × vector of

body-fixed angular velocity components, and Ω is the 3 3N N× dual matrix of ω (see

equation (2.5.13)). As defined by equation(2.5.9), ,m IM is a 6 6N N× generalized mass

matrix. More detailed definitions of the system mass matrix Bm , the system inertia

matrix I , and the system angular velocity dual matrix Ω are given below.

Page 21: Thesis- Multibody Dynamics

13

g) System Mass Matrix

( )*

0 00 00 0

i

f i i i ii

i

mF m v m v

m

⎡ ⎤⎢ ⎥= ⎢ ⎥⎢ ⎥⎣ ⎦

(2.5.10)

The inertia force vector for the system may be then written as

( )( )

( )

*

1 1 1*

2* 22

*

0 00 0

00 0 0

f

ff B

N Nf N

F m vF m v

F m v

m vF

⎧ ⎫⎧ ⎫⎡ ⎤⎪ ⎪⎪ ⎪⎢ ⎥⎪ ⎪⎪ ⎪ ⎪ ⎪⎢ ⎥= = − −⎨ ⎬ ⎨ ⎬⎢ ⎥⎪ ⎪ ⎪ ⎪⎢ ⎥⎪ ⎪ ⎪ ⎪⎣ ⎦ ⎩ ⎭⎪ ⎪⎩ ⎭

(2.5.11)

h) System Inertia Matrix and Angular Velocity Dual Matrix

The inertia moment (torque) for a single body “ i ” of the multibody system may

be written as

( )1 3 2 1

*2 3 1 2

3 2 1 3

0 0 0 0 00 0 0 0 00 0 0 0 0

i i i i

M i i i i i i i i i i ii

i i i i

I IF I I I I

I I

ω ωω ω ω ω ω ω

ω ω

−⎡ ⎤ ⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥ ⎢ ⎥= − − − − −Ω⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥ ⎢ ⎥−⎣ ⎦ ⎣ ⎦ ⎣ ⎦ (2.5.12)

Dual matrix iΩ is in fact the skew symmetric matrix of ω (see appendix for the skew

symmetric matrix). Here it is assumed that the chosen body-fixed directions are aligned

with the body principal directions. The system inertia moment vector may then be written

as

( )( )

( )

*

1 1 1 1 11*

2 2 2 2* 22

*

0 0 0 0 0 00 0 0 0 0 0

0 0 00 0 0 0 0 0 0 0 0

M

MM

N N N NNM N

F I IF I I

F

I IF

ωωωω

ωω

⎧ ⎫Ω⎧ ⎫⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎧ ⎫⎪ ⎪

⎪ ⎪⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎪ ⎪⎪ ⎪ Ω⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎢ ⎥ ⎢ ⎥ ⎢ ⎥= = − −⎨ ⎬ ⎨ ⎬ ⎨ ⎬⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎢ ⎥ ⎢ ⎥ ⎢ ⎥⎪ ⎪ ⎪ ⎪ ⎪ ⎪Ω⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ⎩ ⎭⎩ ⎭⎪ ⎪⎩ ⎭ (2.5.13)

Page 22: Thesis- Multibody Dynamics

14

or

( )*MF I Iω ω− +Ω (2.5.14)

Where

1

2

0 00 0

00 0 0 N

II

I

I

⎡ ⎤⎢ ⎥⎢ ⎥=⎢ ⎥⎢ ⎥⎣ ⎦

and

1

2

0 00 0

00 0 0 N

Ω⎡ ⎤⎢ ⎥Ω⎢ ⎥Ω =⎢ ⎥⎢ ⎥Ω⎣ ⎦

2.5.2. System of N Bodies with Configuration Constraints

a) Configuration Constraints: Non-Time Varying

If the system is now subjected to cm configuration constraints that are not time

varying

( ) ( ) i cf x 0 i 1, ,m= = … (2.5.15)

then not all of the ix are independent. These equations can also be presented as a set of

linear equations in x by simply differentiating them to give

2 0if x P xx

⎡ ⎤∂=⎢ ⎥∂⎣ ⎦

(2.5.16)

where 2P is an 6cm N× matrix that is a function of x .

For the constrained system, define a new set of 6 cn N m= − independent coordinates

( )1 2, , , Tnq q q q= … such that

1x A q= (2.5.17)

Page 23: Thesis- Multibody Dynamics

15

Here, 1A is a function of q (or x ). The original generalized speeds can be written in

terms of q substituting from Equation (2.5.17) into (2.5.3)

1 1 1v Px P A q Rq= = (2.5.18)

Here 1 1R P A is a 6N n× matrix of partial velocity components associated with q and is

a function of q (or x ).

If we can find a matrix J such that 0JR = , then Equation (2.5.18) can be rewritten

solely in terms of v as follows

0Jv JRq= = (2.5.19)

Here, J is a 6cm N× matrix and is an orthogonal complement of matrix R [11].

b) Kane’s Equations of Motion of the System with Configuration Constraints: Non-Time Varying

Using Kane’s equations, the equations of motion of the constrained system may

be written as[11]

* '' * 0TcF F F F F J λ+ + = + + = (2.5.20)

As before, F and *F represent the generalized active and generalized inertia forces for

the system. ''F represents the generalized active forces associated with the constraint

forces and torques required to maintain the constraints, and cλ represents a vector of

undetermined multipliers related to the constraint forces and torques.

These equations can be transformed into a simpler form by pre-multiplying by

TR .

( )* * *ˆ ˆ 0T T T T T Tc cR F F J R F R F R J F Fλ λ+ + = + + + = (2.5.21)

Page 24: Thesis- Multibody Dynamics

16

Here, ˆ TF R F and * *ˆ TF R F are the generalized active and generalized inertia forces

for the constrained system. The vectors F and *F are defined by equations (2.5.6) and

(2.5.9). Note that the term associated with the constraint forces and torques is zero,

because ( ) 0TT TR J JR= = [8].

2.5.3. Configuration Constraints and Motion Constraints

This section discusses the system of bodies with configuration constraints and

motion constraints.

a) Motion Constraint

As discussed by J.T. Wang [8], now, consider constraining the system further

with a set of mm motion constraints

ˆ 0Av b ARq b Aq b+ = + = + = (2.5.22)

where A is an 6mm N× matrix, A AR is an mm n× matrix, b is an 1mm × vector, and

all are functions of the generalized coordinates q and time t . Given these constraints,

only mn m− of the iq are independent. Now, define a new set of independent

generalized speeds u such that

ˆˆq Ru b= + (2.5.23)

where R is an ( )mn n m× − matrix u is ( ) 1mn m− × matrix and b is an 1n× vector. If R

and b are chosen such that

ˆ ˆ 0AR = and ˆAb b= − (2.5.24)

Page 25: Thesis- Multibody Dynamics

17

then, multiplying equation (2.5.23) by A gives

ˆˆ ˆ ˆˆ

orˆ 0

Aq ARu Ab b

Aq b

= + = −

+ =

(2.5.25)

This last result is the constraint equation (2.5.22). Note that the matrix R is an

orthogonal complement of A .

The velocity vector v can now be found in terms of u the new vector of generalized

speeds by substituting equation (2.5.23) into equation (2.5.18) to give

( )ˆˆtv Rq R Ru b Ru v= = + = + (2.5.26)

Here, ˆR RR is an 6 ( )mN n m× − matrix, and ˆtv Rb= is a 6 1N × vector. Both R and

tv can be functions of generalized coordinates q and time t . For the nonholonomic

system, ˆ 0tv Rb= ≠ , therefore tv is the acatastatic term.

b) Partial Velocities for the Fully Constrained System

Using equations (2.5.2) and (2.5.26), we can use partitioned matrix multiplication

to write

1

2

t

t

vRvv uRω ω

⎧ ⎫⎡ ⎤⎧ ⎫= = +⎨ ⎬ ⎨ ⎬⎢ ⎥⎩ ⎭ ⎣ ⎦ ⎩ ⎭

(2.5.27)

Page 26: Thesis- Multibody Dynamics

18

where 1R and 2R are 3 ( )mN n m× − partial velocity and partial angular velocity matrices,

and tv and tω are 3 1N × vectors.

c) Kane’s Equations of Motion for the Fully Constrained System

Using Kane’s equations, the equations of motion of the constrained system may

be written as [11],

* * 0T T c

m

F F F F F J A λλ

⎧ ⎫⎡ ⎤′+ + = + + =⎨ ⎬⎣ ⎦ ⎩ ⎭ (2.5.28)

As before, F and *F represent the generalized active and generalized inertia forces for

the system. F ′ represents the generalized active forces associated with the constraint

forces and torques required to maintain the constraints, and cλ and mλ represent vectors

of undetermined multipliers related to the constraint forces and torques associated with

the configuration and motion constraints.

T T c

m

F J A λλ

⎧ ⎫⎡ ⎤′ = ⎨ ⎬⎣ ⎦ ⎩ ⎭ (2.5.29)

These equations can be transformed into a simpler form by pre-multiplying by TR [8].

( )* * 0T T T T T T c

m

R F F F R F R F R J A λλ

⎧ ⎫⎡ ⎤′+ + = + + =⎨ ⎬⎣ ⎦ ⎩ ⎭ (2.5.30)

Here, TR F F= and * *TR F F= are the generalized active force and generalized inertia

force vectors for the constrained system, and

Page 27: Thesis- Multibody Dynamics

19

ˆ

ˆ ˆ

ˆˆ ˆ

0

T T T T T T Tc c

m m

T T T T T T c

m

T T T T T c

m

R J A R R J A

R R J R R A

R R J R A

λ λλ λ

λλ

λλ

⎧ ⎫ ⎧ ⎫⎡ ⎤ ⎡ ⎤=⎨ ⎬ ⎨ ⎬⎣ ⎦ ⎣ ⎦⎩ ⎭ ⎩ ⎭⎧ ⎫⎡ ⎤= ⎨ ⎬⎣ ⎦ ⎩ ⎭

⎧ ⎫⎡ ⎤= ⎨ ⎬⎣ ⎦ ⎩ ⎭=

(2.5.31)

The result of equation (2.5.31) is zero, because ( ) 0TT TR J JR= = and

( )ˆ ˆˆ ˆ 0T

T TR A AR= = . So, the equations of the fully constrained system are

* 0F F+ = (2.5.32)

The generalized active and inertia force vectors for the fully constrained system

(associated with the generalized speedsu ) may now be written as

1 2 1 2f fT T T T T T

f MM M

F FF R F R R R R F R F

F F⎧ ⎫ ⎧ ⎫⎡ ⎤= = = = +⎨ ⎬ ⎨ ⎬⎣ ⎦⎩ ⎭ ⎩ ⎭

(2.5.33)

( )* * *1 2 1 2

1 2 1 2

,

0 00

0

f M

T T T T

T T T T

Tm I

F R F R F R Mv R I I

M vR R R RI I

R M vI

ω ω

ω ω

ω

= + = − − +Ω

⎧ ⎫ ⎧ ⎫⎡ ⎤⎡ ⎤ ⎡ ⎤= − −⎨ ⎬ ⎨ ⎬⎢ ⎥⎣ ⎦ ⎣ ⎦ Ω⎣ ⎦ ⎩ ⎭ ⎩ ⎭⎛ ⎞⎧ ⎫

− +⎜ ⎟⎨ ⎬Ω⎩ ⎭⎝ ⎠

(2.5.34)

d) Kinetic Energy

The kinetic energy of the multibody system may be written as the sum of the

kinetic energies of the individual bodies

( ) ( )1 12 2

T Ti i i i i ii

i i

K K v m v Iω ω= = +∑ ∑ (2.5.35)

Page 28: Thesis- Multibody Dynamics

20

This can be written in a more compact matrix form as

1 1,2 2

00

BT T Tm I

m vK v v M vI

ωω⎧ ⎫⎡ ⎤⎡ ⎤= =⎨ ⎬⎢ ⎥⎣ ⎦ ⎣ ⎦ ⎩ ⎭

(2.5.36)

This result can be expressed in terms of the generalized speeds by using equation

(2.5.26) as follows.

( ) ( )1 1, ,2 2

1 1, , ,2 2

2 1 0

TTm I t m I t

T T T Tm I t m I t m I t

K v M v Ru v M Ru v

u R M Ru v M Ru v M v

K K K

= = + +

= + +

+ +

(2.5.37)

Here T T12 m,I2K u R M Ru= which is quadratic in u , T

1 t m,IK v M Ru= which is linear in u ,

and T10 t m,I t2K v M v= which is independent of u .

The time derivative of the kinetic energy can be found by differentiating these results as

follows.

2 1 0dK K K Kdt

= + + (2.5.38)

where

( ) ( )( ) ( ) ( ) ( ) ( )

( ) ( )

1 12 , , ,2 2

,

, ,

T T T

m I m I m I

T

m I

T T T Tm I m I

d d dK Ru M Ru Ru M Ru Ru M Rudt dt dt

dRu M Rudt

u R M Ru u R M Ru

⎛ ⎞= = +⎜ ⎟⎝ ⎠

=

= +

(2.5.39)

1 , , ,T T Tt m I t m I t m IK v M Ru v M Ru v M Ru= + + (2.5.40)

1 10 , , ,2 2

T T Tt m I t t m I t t m I tK v M v v M v v M v= + = (2.5.41)

Page 29: Thesis- Multibody Dynamics

21

e) Potential Energy

From the definition of the potential energy [7], we can say

TVV v F= − (2.5.42)

Recall that VF is the potential force vector defined by equation (2.5.7).

2.5.4. Derivation of Energy Conservation Theorem

This section discusses the derivation of the energy conservation thoerem which is

also known as power equation. The equations of motion as expressed in equation

(2.5.32) can be converted into a single power equation by pre-multiplying the equation by

Tu− as follows.

( )* 0Tu F F− + = (2.5.43)

From equations (2.5.33) and (2.5.34)

,0 0T T T T T T

m Iu R F u R M v u RIω

⎧ ⎫− + + =⎨ ⎬Ω⎩ ⎭

(2.5.44)

Based on the above equation (2.5.44), the power equation will be formed.

Page 30: Thesis- Multibody Dynamics

22

a) First Term T Tu R F−

The first term involves the generalized force vector F . In the development of

equation (2.5.45) below, the force vector is separated into contributions from

conservative forces and moments ( VF ) and non-conservative forces and moments ( DF ).

( )( )( ) ( )( )

TT T

Tt

Tt V D

T TV D t

T T TV D t

T TD t

u R F Ru F

v v F

v v F F

v F F v F

v F v F v F

V v F v F

− = −

= − −

= − − +

= − + +

= − − +

= − +

(2.5.45)

b) Second Term ,T T

m Iu R M v

The second term can be related to changes in the kinetic energy function as follows.

( )

( )( )

, ,

, , ,

2 ,

2 ,

2 , ,

2 0 ,

T T T Tm I m I t

T T T T T Tm I m I m I t

T

m I t

Tt m I t

T Tm I t t m I t

Tm I t

du R M v u R M Ru vdt

u R M Ru u R M Ru u R M v

K Ru M v

K v v M v

K v M v v M v

K K v M v

= +

= + +

= +

= + −

= + −

= − +

(2.5.46)

c) Third Term 0T Tu RIω

⎧ ⎫⎨ ⎬Ω⎩ ⎭

In equation (2.5.47), IωΩ is perpendicular to ω . So, the scalar product of ω

and IωΩ is zero

Page 31: Thesis- Multibody Dynamics

23

( )

( )( )

1 2

1 2

2

0 0

0

0

T T T T T

T T T T

T

Tt

T Tt

Tt

Tt

u R u R RI I

u R u R I

R u I

I

I I

I

vI

ω ω

ω

ω

ω ω ω

ω ω ω ω

ω ω

ω

⎧ ⎫ ⎧ ⎫⎡ ⎤=⎨ ⎬ ⎨ ⎬⎣ ⎦Ω Ω⎩ ⎭ ⎩ ⎭= + Ω

= Ω

= − Ω

= Ω − Ω

= − Ω

⎧ ⎫= − ⎨ ⎬Ω⎩ ⎭

(2.5.47)

The above matrix manipulation can be explained by vector notation and the following

example will elaborate. Here assume the elements of the equation (2.5.48) are vectors for

this elaboration only.

( ) ( ) ( ) ( )( ) ( )

( ) ( )

Tt B t B

B t B

TB t B

Tt B

I . . I .

. I . . I .

. I . I .

0 I

ω ω ω ω ω ω ω ω

ω ω ω ω ω ω

ω ω ω ω ω ω

ω ω

− × = − ×

= × − ×

= × − ×

= − ×( )( ) T

t B

.

I .

ω

ω ω ω= − ×

(2.5.48)

Substituting the results from equations(2.5.45), (2.5.46), and (2.5.47) into equation

(2.5.44) gives

2 0 ,0 0T T T T

D t m I t tV v F v F K K v M v vIω

⎧ ⎫− + + − + − =⎨ ⎬Ω⎩ ⎭

(2.5.49)

or

2 0 0K K V Z− + + = (2.5.50)

Page 32: Thesis- Multibody Dynamics

24

Where ,0T T T T

D t m I t tZ v F v F v M v vIω

⎧ ⎫= − + + − ⎨ ⎬Ω⎩ ⎭

Equation (2.5.50) is similar to the equation presented by Kane and Levinson as

shown in equation (2.1.6). As written, it contains the system’s potential energy, but only

part of the system’s kinetic energy. To make use of the complete kinetic energy function,

it can be written as in equation (2.5.51).

( )2 0 2 1 0 1 0

1 0

2

2

K K K K K K K

K K K

− = + + − −

= − − (2.5.51)

Substituting this result into equation (2.5.50) gives

( )1 02 0K V Z K K+ + − − = (2.5.52)

( )1 02Z K K− − can be manipulated as below.

( )

( ) ( )

1 0 , , , ,

, , , ,

02 2

0 2

T T T T T T TD t m I t t t m I t m I t m I t

T T T T T T TD t m I t t t m I t t m I t t m I t

TD t

dZ K K v F v F v M v v v M Ru v M Ru v M vI dt

v F v F v M v v v M v v v M v v v M vI

v F v

ω

ω

⎧ ⎫− − = − + + − − − −⎨ ⎬Ω⎩ ⎭

⎧ ⎫= − + + − − − − − −⎨ ⎬Ω⎩ ⎭

= − + , , ,

0

, , ,

0

,

,

0

2

0

0

T T T T Tm I t m I t t t m I

T T Tt m I t t m I t t m I t

T T T TD t t t m I

Tt m I

F v M v v M v v v M vI

v M v v M v v M v

v F v F v v M vI

v F M v vI

ω

ω

ω

⎧ ⎫+ − − −⎨ ⎬Ω⎩ ⎭

+ + −

⎧ ⎫= − + − −⎨ ⎬Ω⎩ ⎭

⎛ ⎞⎧ ⎫= − − −⎜ ⎟⎨ ⎬Ω⎩ ⎭⎝ ⎠

( )*

TD

T Tt D

F

v F F v F

Q

= + −

− (2.5.53)

Substituting from equation (2.5.53) into equation (2.5.52) gives the final form of Wang’s

Page 33: Thesis- Multibody Dynamics

25

power equation.

0K V Q+ − = (2.5.54)

Where

( )*T TD tQ v F v F F− + (2.5.55)

Substitute equation (2.5.28),

'T TD tQ v F v F+ (2.5.56)

Wang’s interpretation of Q is that it is the net power flowing into the system.

The total energy of the system is

K V Q cons tant+ − = (2.5.57)

where K is the kinetic energy of the system, V is the potential energy of the system , and

Q is the net energy flowing into the system.

As shown in equation (2.5.54) the fundamental equation of Wang’s method is

0E K V Q= + − = . This equation can be integrated over time interval 0t t→ to give

( ) ( ) ( )0 0 0

0 0 0

0

0

t t t

t t t

dK dV dQdt dt dtdt dt dt

K K V V Q Q

⎛ ⎞ ⎛ ⎞ ⎛ ⎞+ − =⎜ ⎟ ⎜ ⎟ ⎜ ⎟⎝ ⎠ ⎝ ⎠ ⎝ ⎠

− + − − − =

∫ ∫ ∫ (2.5.58)

or

0 0 0K V Q K V Q+ − = + − (2.5.59)

Wang’s testing function can be stated as

( ) ( )0 0 0C K V Q K V QΔ = + − − + − (2.5.60)

Page 34: Thesis- Multibody Dynamics

26

The testing function CΔ should remain zero through out any simulation.

d) Interpretation of the Power Equation

From equation (2.5.28), the equations of motion of the constrained system may be

written as

* 0F F F ′+ + = (2.5.61)

where F ′ represents the contribution of the constraint forces to the generalized active

forces. So, Q as defined in equation (2.5.55) can be rewritten as

( )

( )

( )( )

*

*

*

T TD t

T TD t

TTD

T T T TD

T T T TD

T T TD

T TD

Q v F v F F

v F v F

v F v Ru F

v F v F u R F

v F v F u R F F

v F v F u F F

v F v F

= − +

′= +

′= + −

′ ′= + −

′= + + +

′= + + +

′= +

(2.5.62)

Here ( )* 0F F+ = as shown in equation (2.5.32).

The second term in the last of equation (2.5.62) can be further reduced as follows

( ) ( )

0

T T T T c

m

T T T T c

m

T T c

m

T c

m

Tm

v F v J A

v J v A

Jv Av

b

b

λλ

λλ

λλ

λλ

λ

⎧ ⎫⎡ ⎤′ = ⎨ ⎬⎣ ⎦ ⎩ ⎭⎧ ⎫⎡ ⎤= ⎨ ⎬⎣ ⎦ ⎩ ⎭⎧ ⎫⎡ ⎤= ⎨ ⎬⎣ ⎦ ⎩ ⎭

⎧ ⎫⎡ ⎤= − ⎨ ⎬⎣ ⎦ ⎩ ⎭= −

(2.5.63)

Page 35: Thesis- Multibody Dynamics

27

Substituting this last result back into equation (2.5.62) gives

T TD mQ v F b λ= − (2.5.64)

Equation (2.5.64) needs a unknown multiplier mλ to calculate Q . mλ is a set of

unknown multipliers related to the motion constraint forces and moments. It provides an

interpretation for Q . The first term ( TDv F ) represents power flowing into the system

associated with the non-conservative forces and moments, and the second term ( Tmb λ− )

represents power flowing into the system associated with the motion constraint forces and

moments.

e) A Second Form of the Power Equation

The power term Q as expressed in equation (2.5.62) is calculated from the

generalized forces for the unconstrained system. A second form of the power equation

using generalized forces for the constrained system may be developed as follows. From

equations(2.5.45), (2.5.54) and (2.5.55), we have

( )( ) ( )

( )( )

*

*

*

*

T T TD t V

T TD V t

T Tt

T T Tt t

K Q V

v F v F F v F

v F F v F F

v F v F F

v v F v F

= −

= − + +

= + − +

= − +

= − −

(2.5.65)

Now, using equations (2.5.26) and (2.5.21)

( ) ( ) *

*

ˆ

ˆ

TT

T T T T

K Ru F Rb F

u R F b R F

= −

= − (2.5.66)

Page 36: Thesis- Multibody Dynamics

28

or

*ˆ ˆT TK u F b F= − (2.5.67)

Equation (2.5.67) is equivalent to the energy theorem published by Liu and Huston.

Using matrix notation, their energy theorem can be stated as

0TK u F F= + (2.5.68)

where

* *0 0 0

TF F v F− = − (2.5.69)

and

tv v Ru v Rb− = = (2.5.70)

So, Liu and Huston’s energy theorem can be stated as

( )

0

*0

*

*

ˆ

ˆ ˆ

T

T T

TT

T T

K u F F

u F v F

u F Rb F

u F b F

= +

= −

= −

= −

(2.5.71)

Equations (2.5.67) and (2.5.71) prove the equivalence of the Wang and Liu and Huston

results

Page 37: Thesis- Multibody Dynamics

29

CHAPTER 3

TRIPLE PENDULUM SYSTEM

In an effort to apply the testing functions discussed in the previous chapters, an

example system, a triple pendulum, was selected. Motion of the pendulum is a very well

understood subject as it helped develop many scientific understandings which may

include mass, gravitation, acceleration, and chaos theory. The triple pendulum example

is a holonomic system where the equations of motions can be given in the form of

algebraic and differential equations. A simple nonholonomic system example was not

selected here as it is beyond the scope of this thesis, nevertheless the formulation of the

testing functions encompasses both systems. One of the goals of the analysis is to show

the simulation errors due to the numerical integration error. Simulations of the equations

of motion of the triple pendulum can be performed with and without numerical

integration in Matlab and Simulink and they can be compared for errors. Also, triple

pendulum is suitable candidate to demonstrate multiple scenarios that show free motion,

specified motion, and damper effect with a prior understanding of their dynamic

behavior. Familiar dynamic behavior helps analyze and understand the results without

running experiments, yet the formulation of the equations of motion is complicated

enough to check the validity of the testing functions. Robotic arms and GEO 600

interferometric gravitational wave detector [14] are few examples that use the triple

pendulum. Following sections discusses the development of the equations of motions

and testing function formulations.

Page 38: Thesis- Multibody Dynamics

30

3.1. Equations of Motion

x

y

1 1m ,l

2 2m ,l

3 3m ,l

O

A

B

1M

2M

3M

1r

2r

3r

1c

1c

1c

Body –B1

Body- B2

Body-B3

1cg

2cg

3cg

11Be

21Be

31Be

i

j

k

x

y

1 1m ,l

2 2m ,l

3 3m ,l

O

A

B

1M

2M

3M

1r

2r

3r

1c

1c

1c

Body –B1

Body- B2

Body-B3

1cg

2cg

3cg

11Be

21Be

31Be

i

j

k

Figure 3.1. Triple pendulum example

The Figure 3.1 shows a triple pendulum of three bodies ( N 3= ) with driving

moments and rotational dampers at the connecting joints. The pendulum is hanging in the

vertical plane with the y-axis pointing up. The mass centers of the bodies are assumed to

lie along the joint connecting lines. This triple pendulum is moving in vertical plane with

frictionless pins.

Here ( )k 1 k 2 k 3B B Be ,e ,e k 1,2,3= are unit vectors rotating with the bodies

and 1 2 3B ,B , B respectively. These unit vectors coincide with the principle moment of

inertia of the bodies. Here the reference frame S has the unit vectors represented by i, j ,

and k .

Page 39: Thesis- Multibody Dynamics

31

1 2cg cgv ,v ,and 3cgv are the velocity vectors of the center of gravity 1 2 3cg ,cg ,cg respectively

1 2l ,l and 3l are the length of the bodies. The length between the connecting joints at O

and A is 1l , and the length between the connecting joints at A and B is 2l .

. 1 2m ,m , and 3m are the uniform mass of the bodies

1 2r ,r ,and 3r are the distance of the center of gravity of the bodies from O, A, B

respectively.

1 2I ,I ,and 3I are the mass moment of inertia of the bodies.

1 2, ,θ θ and 3θ are the swing angles related to the vertical axis. One of the angles may be a

specified motion. Example: 1( t ) Asin tθ ω= where A is amplitude and ω is frequency

1 2M ,M ,and 3M are the torques at joints O, A, and B

1 2c ,c ,and 3c are damping coefficients.

Following steps shows the development of the equation of motion of triple pendulum

shown in Figure 3.1.1.

Trigonometric notations are abbreviated as follows.

( ) ( )1 1 1 1 2 1 2 1 2 1 2 1S sin , C cos , C cos , S sinθ θ θ θ θ θ− −= = = − = −

3.1.1. Developing Equations of Motions using Lagrange’s Method

Assuming that 1 2, ,θ θ and 3θ for a set of independent generalized coordinates, the

equation of motion of the three link pendulum may be written as shown in equation

(3.1.1).

Page 40: Thesis- Multibody Dynamics

32

( )( )( )

1

2

3

1 1non conservative

non conservative2 2

non conservative

3 3

d L Ldt Fd L L Fdt

Fd L Ldt

θ

θ

θ

θ θ

θ θ

θ θ

⎡ ⎤⎛ ⎞∂ ∂−⎢ ⎥⎜ ⎟∂ ∂ ⎧ ⎫⎝ ⎠⎢ ⎥

⎪ ⎪⎢ ⎥⎛ ⎞∂ ∂ ⎪ ⎪⎢ ⎥− = ⎨ ⎬⎜ ⎟⎢ ⎥∂ ∂⎝ ⎠ ⎪ ⎪⎢ ⎥ ⎪ ⎪⎛ ⎞∂ ∂ ⎩ ⎭⎢ ⎥−⎜ ⎟⎢ ⎥∂ ∂⎝ ⎠⎣ ⎦

(3.1.1)

Here [ ]T1 3 3q θ θ θ= . L K V= − is the Lagrangian of the system. K is the kinetic

energy and V is the potential energy function for the conservative forces and torques.

Velocity of the center of gravity of the bodies are

1 1cg 1 1v r eθθ= (3.1.2)

2 1 2cg 1 1 2 2v l e r eθ θθ θ= + (3.1.3)

3 1 2 3cg 1 1 2 2 3 3v l e l e r eθ θ θθ θ θ= + + (3.1.4)

Kinetic energy of the system from fundamentals in dynamics is given

( )1 2 3 cgi

32 2

B B B i i ii

1K K K K I m v2

θ= + + = +∑ (3.1.5)

Where K is the kinetic energy of the system, Ncgv is the velocity of the center of the

body N . Here, N 1,2,3= .

1

2 2 2B 1 1 1 1 1

1K I m r2

θ θ⎡ ⎤= +⎣ ⎦ (3.1.6)

2

2 2 2 2 2B 2 2 2 1 1 2 2 2 2 1 2 1 2 2 1

1K I m l m r 2m l r C2

θ θ θ θ θ −⎡ ⎤= + + +⎣ ⎦ (3.1.7)

3

2 2 2 2 2 2 23 3 3 1 1 3 2 2 3 2 3 3 1 2 1 2 2 1

B3 2 3 2 3 3 2 3 1 3 1 3 3 1

I m l m l m r 2m l l C1K2 2m l r C 2m l r C

θ θ θ θ θ θ

θ θ θ θ−

− −

⎡ ⎤+ + + += ⎢ ⎥

+ +⎢ ⎥⎣ ⎦ (3.1.8)

Page 41: Thesis- Multibody Dynamics

33

Potential energy of the system is given below.

1 2 3B B BV V V V= + + (3.1.9)

1B 1 1 1V r C m g= − (3.1.10)

( )2B 1 1 2 2 2V l C r C m g= − + (3.1.11)

( )3B 1 1 2 2 3 3 3V l C l C r C m g= − + + (3.1.12)

( ) ( ) ( )1 1 2 1 3 1 1 1 2 2 3 2 2 2 3 3 3 3V m r m l m l gS m r m l gS m r gSθ θ θ= + + + + + (3.1.13)

Non-conservative forces ( )q non conservativeF

− are shown below.

( ) ( )1 1 2 1 1 2 2 1non conservativeF M M c cθ θ θ θ

−⎡ ⎤= − + − − −⎣ ⎦ (3.1.14)

( ) ( ) ( )2 2 3 2 2 1 3 3 2non conservativeF M M c cθ θ θ θ θ

−⎡ ⎤= − + − − + −⎣ ⎦ (3.1.15)

( ) ( )3 3 3 3 2non conservativeF M cθ θ θ

−= − − (3.1.16)

Using L K V= − and equation(3.1.1), following equations of motions can be derived.

( )[ ] ( ) ( )[ ]

( )

1 1

2 21 1 1 2 3 1 1 2 2 3 2 1 2 1 2

2 23 1 3 3 1 3 2 2 3 2 1 2 1 2 3 1 3 3 1 3

1 1 2 3 1 1

1 2 1 1 2 2 1

d L Ldt

I m r ( m m )l m r m l l C

m l r C m r m l l S m r S

m r ( m m )l gS

M M c c

θ θ

θ θ

θ θ θ

θ θ θ

− − −

⎛ ⎞∂ ∂−⎜ ⎟∂ ∂⎝ ⎠

⎡ ⎤= + + + + +⎣ ⎦+ − + −

+ + +

⎡ ⎤= − + − + −⎣ ⎦

(3.1.17)

( ) [ ]( ) ( ) [ ]

( ) ( )

2 2

2 22 2 3 2 1 2 1 1 2 2 2 3 2 2 3 2 3 3 2 3

2 22 2 3 2 1 2 1 1 3 2 3 3 2 3 2 2 3 2 2

2 3 2 2 1 3 3 2

d L Ldt

m r m l l C I m r m m l r C

m r m l l S m l r S m r m l gS

M M c c

θ θ

θ θ θ

θ θ

θ θ θ θ

− −

− −

⎛ ⎞∂ ∂−⎜ ⎟∂ ∂⎝ ⎠

⎡ ⎤= + + + + +⎣ ⎦+ + − + +

⎡ ⎤= − + − − + −⎣ ⎦

(3.1.18)

Page 42: Thesis- Multibody Dynamics

34

[ ] [ ][ ] [ ]

( )

3 3

3 1 3 3 1 1 3 2 3 3 2 2

2 2 23 3 3 3 3 1 3 3 1 1 3 2 3 3 2 2

3 3 3

3 3 3 2

d L Ldt

m l r C m l r C

I m r m l r S m l r S

m r gS

M c

θ θ

θ θ

θ θ θ

θ θ

− −

− −

⎛ ⎞∂ ∂−⎜ ⎟∂ ∂⎝ ⎠

= +

⎡ ⎤+ + + +⎣ ⎦+

= − −

(3.1.19)

By adding all equations(3.1.17),(3.1.18), and (3.1.19), the following equation (3.1.20)

can be derived.

( ) ( ) ( )( ) ( )( ) ( )

2 2 2 2 2 21 1 2 2 3 3 1 1 2 1 3 1 1 2 2 3 2 2 3 2 3

2 22 1 2 3 1 2 2 1 2 3 1 3 3 1 3 2 1 2 3 1 2 2 3 1 3 3 1 3

2 1 2 3 1 2 2 1 1 3 2 3 3 2 3 2 1 2 3 1 2 2 1 1

I I I m r m l m l m r m l m r

m l r m l l C m l r C m l r m l l m l r S

m l r m l l C m l r C m l r m l l S

θ θ θ θ θ θ

θ θ θ θ

θ θ θ− − −

− − −

⎡ ⎤+ + + + + + + +⎣ ⎦+ + + − + −

+ + + + +

( ){ } ( ) ( ){ }( ){ } [ ]{ } ( ){ } { }

2 23 2 3 3 2 3

2 23 1 3 3 1 1 3 2 3 3 2 2 3 1 3 3 1 1 3 2 3 3 2 2

1 2 1 1 2 2 1 2 3 2 2 1 3 3 2

3 3 3 2 1 1 2 3 1 1 2 2 3 2 2 3 3 3

m l r S

m l r C m l r C m l r S m l r S

M M c c M M c c

M c m r ( m m )l gS m r m l gS m r gS

θ

θ θ θ θ

θ θ θ θ θ θ θ

θ θ

− − − −

+ + + +

=

⎡ ⎤ ⎡ ⎤− + − − − + − + − − + −⎣ ⎦ ⎣ ⎦

+ − − − + + − + −

(3.1.20)

Here

( )( )( )

( )( ) ( )

( )

1

2

3

1 2 1 1 2 2 1non conservative

2 3 2 2 1 3 3 2non conservative

3 3 3 2non conservative

M M c cF

F M M c c

F M c

θ

θ

θ

θ θ θ

θ θ θ θ

θ θ

⎧ ⎫⎡ ⎤⎧ ⎫ − + − − −⎣ ⎦⎪ ⎪⎪ ⎪⎪ ⎪ ⎪ ⎪⎡ ⎤= − + − − + −⎨ ⎬ ⎨ ⎬⎣ ⎦⎪ ⎪ ⎪ ⎪⎪ ⎪ ⎪ − − ⎪⎩ ⎭ ⎩ ⎭

(3.1.21)

Page 43: Thesis- Multibody Dynamics

35

3.1.2. Derivation of Kinetic Energy Rate K

From equations(3.1.6), (3.1.7), and (3.1.8), K can be calculated. Here the

equation (3.1.22) is shown in matrix form with three terms term1K , term2K , and term3K .

[ ]

( )term1 term 2

T2 2 2 2 21 1 1 2 1 3 1 12 2 2 2

1 2 3 2 2 2 3 2 22 2 23 3 2 3

K K

T2 1 2 3 1 2 2 1 1 2

3 2 3 3 2 2 3

3 1 3 3 1 1 3

m r m l m l1 1K I I I m r m l2 2

m r

m l r m l l Cm l r Cm l r C

θ θθ θθ θ

θ θθ θθ θ

⎧ ⎫ ⎧ ⎫⎡ ⎤+ +⎪ ⎪ ⎪ ⎪⎢ ⎥= + +⎨ ⎬ ⎨ ⎬⎢ ⎥⎪ ⎪ ⎪ ⎪⎢ ⎥⎣ ⎦⎩ ⎭ ⎩ ⎭

⎡ ⎤+⎢ ⎥+ ⎢ ⎥⎢ ⎥⎣ ⎦

term3K

⎧ ⎫⎪ ⎪⎨ ⎬⎪ ⎪⎩ ⎭

(3.1.22)

term1 term2 term3dK dK dKdKdt dt dt dt

= + + (3.1.23)

1

term11 1 2 2 3 3 2

3

dK I I Idt

θθ θ θ θ

θ

⎧ ⎫⎪ ⎪⎡ ⎤= ⎨ ⎬⎣ ⎦⎪ ⎪⎩ ⎭

(3.1.24)

( )( )

( )

T2 2 21 1 2 1 3 1 1

12 2term2

2 2 3 2 2 2

2 33 2 3

m r m l m ldK m r m l

dtm r

θ θθ θ

θθ

⎡ ⎤+ + ⎧ ⎫⎢ ⎥ ⎪ ⎪⎢ ⎥= + ⎨ ⎬⎢ ⎥ ⎪ ⎪⎢ ⎥ ⎩ ⎭⎣ ⎦

(3.1.25)

Page 44: Thesis- Multibody Dynamics

36

( ) ( )( )( )( )( )( )

( )

T

2 1 2 3 1 2 2 1 2 1 1 2 2 1 1 2 2 1 1 2

term33 2 3 3 2 3 2 2 3 3 2 2 3 3 2 2 3

3 1 3 3 1 3 1 1 3 3 1 1 3 3 1 1 3

2 1 2 3 1 2 2 1 2

m l r m l l S C CdK m l r S C C

dtm l r S C C

m l r m l l C m

θ θ θ θ θ θ θ θ

θ θ θ θ θ θ θ θ

θ θ θ θ θ θ θ θ

θ

− − −

− − −

− − −

⎡ ⎤+ − − + +⎢ ⎥⎢ ⎥= − − + +⎢ ⎥⎢ ⎥

− − + +⎢ ⎥⎣ ⎦

+ +=

( )( ) ( )

T2 23 1 3 3 1 3 2 1 2 3 1 2 2 3 1 3 3 1 3 1

2 22 1 2 3 1 2 2 1 1 3 2 3 3 2 3 2 1 2 3 1 2 2 1 1 3 2 3 3 2 3 2

2 23 1 3 3 1 1 3 2 3 3 2 2 3 1 3 3 1 1 3 2 3 3 2 2 3

l r C m l r m l l m l r Sm l r m l l C m l r C m l r m l l S m l r S

m l r C m l r C m l r S m l r S

θ θ θ θθ θ θ θ θθ θ θ θ θ

− −

− − − −

− − − −

⎡ ⎤ ⎧− + −⎢ ⎥+ + + + − ⎨⎢ ⎥⎢ ⎥+ + +⎣ ⎦

⎫⎪ ⎪

⎬⎪ ⎪⎩ ⎭

(3.1.26)

By adding equations (3.1.24), (3.1.25), and (3.1.26)

( )( )

( )( ) ( )

T2 2 21 1 2 1 3 1 1

1 12 2

1 1 2 2 3 3 2 2 2 3 2 2 2

23 33 2 3

2 22 1 2 3 1 2 2 1 2 3 1 3 3 1 3 2 1 2 3 1 2 2 3 1 3 3 1 3

2 1 2

m r m l m l

K I I I m r m l

m r

m l r m l l C m l r C m l r m l l m l r Sm l r m

θθ θθ θ θ θ θ θ

θ θθ

θ θ θ θ− − −

⎡ ⎤+ +⎧ ⎫ ⎧ ⎫⎢ ⎥⎪ ⎪ ⎪ ⎪⎢ ⎥⎡ ⎤= + + +⎨ ⎬ ⎨ ⎬⎣ ⎦ ⎢ ⎥⎪ ⎪ ⎪ ⎪⎢ ⎥⎩ ⎭ ⎩ ⎭⎣ ⎦

+ + − + −+( ) ( )

T

12 2

3 1 2 2 1 1 3 2 3 3 2 3 2 1 2 3 1 2 2 1 1 3 2 3 3 2 3 22 2

3 1 3 3 1 1 3 2 3 3 2 2 3 1 3 3 1 1 3 2 3 3 2 2 3

l l C m l r C m l r m l l S m l r Sm l r C m l r C m l r S m l r S

θθ θ θ θ θθ θ θ θ θ

− − − −

− − − −

⎡ ⎤ ⎧ ⎫⎢ ⎥ ⎪ ⎪+ + + − ⎨ ⎬⎢ ⎥

⎪ ⎪⎢ ⎥+ + +⎣ ⎦ ⎩ ⎭

(3.1.27)

From equations (3.1.20) and (3.1.27) we can show that

( ) ( )

( ) ( ) ( )

( )

1 2 1 1 2 2 1 1 1 2 1 3 1 1 1

2 3 2 2 1 3 3 2 2 2 3 2 2 2

3 3 3 2 3 3 3 3

K M M c c m r m l m l gS

M M c c m r m l gS

M c m r gS

θ θ θ θ

θ θ θ θ θ

θ θ θ

⎡ ⎤= − − + − − + + +⎣ ⎦⎡ ⎤− − − + − − + +⎣ ⎦⎡ ⎤− − −⎣ ⎦

(3.1.28)

Here the K was derived with the help of basic dynamics fundamentals and Lagrange’s

method.

3.2. Application of Energy Theorems

This section will demonstrate the application of the testing functions using the

Page 45: Thesis- Multibody Dynamics

37

triple pendulum example for free motion and constraint motion.

3.2.1. Coordinates

Define the vector x to contain the XY coordinates of the mass centers and the

angles that each body makes with the vertical, and define the vector v to contain the

velocity and angular velocity components.

( ) ( )1 1 2 2 3 3 1 2 3, , , , , , , ,TT T T

Gx x y x y x y xθ θ θ θ (3.2.1)

( ) 1T Tv v x Pxω = (3.2.2)

Here, 1P is a 9 9× identity matrix of partial velocity and partial angular velocity

components.

3.2.2. Generalized Forces

The generalized active force vector is defined to be

1f

M

FF P

F⎧ ⎫

= ⎨ ⎬⎩ ⎭

(3.2.3)

where fF is a 6 1× vector of resultant force components acting on the mass centers of

the bodies, and MF is a 3 1× of resultant moments acting on the bodies.

The generalized inertia force vector is defined to be

*

*1 *

f

M

FF P

F⎧ ⎫⎪ ⎪= ⎨ ⎬⎪ ⎪⎩ ⎭

(3.2.4)

Page 46: Thesis- Multibody Dynamics

38

Where

1 1

1 1

2 2*

2 2

3 3

3 3

0 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 0

f B

m xm y

m xF m v

m ym x

m y

⎡ ⎤ ⎧ ⎫⎢ ⎥ ⎪ ⎪⎢ ⎥ ⎪ ⎪⎢ ⎥ ⎪ ⎪⎪ ⎪= − = − ⎢ ⎥ ⎨ ⎬⎢ ⎥ ⎪ ⎪⎢ ⎥ ⎪ ⎪⎢ ⎥ ⎪ ⎪⎢ ⎥ ⎪ ⎪⎣ ⎦ ⎩ ⎭

(3.2.5)

1 1

*2 2

3 3

0 00 00 0

M

IF I I

I

θω θ

θ

⎧ ⎫⎡ ⎤⎪ ⎪⎢ ⎥= − = ⎨ ⎬⎢ ⎥⎪ ⎪⎢ ⎥⎣ ⎦ ⎩ ⎭

(3.2.6)

or

*

*,*

00

Bfm I

M

m vFF M v

IF ω⎧ ⎫ ⎧ ⎫⎡ ⎤

= = − −⎨ ⎬ ⎨ ⎬⎢ ⎥⎣ ⎦ ⎩ ⎭⎩ ⎭

(3.2.7)

Note that ( )1, 2,3iI i = are the moments of inertia of the bodies about their mass centers.

3.2.3. Configuration Constraints

The elements of x can be related through a set of configuration constraints

1 1 1

1 1 1

00

x r Sy rC− =+ =

(3.2.8)

2 1 1 2 2

2 1 1 2 2

00

x l S r Sy l C r C

− − =+ + =

(3.2.9)

3 1 1 2 2 3 3

3 1 1 2 2 3 3

00

x l S l S r Sy l C l C r C

− − − =+ + + =

(3.2.10)

Page 47: Thesis- Multibody Dynamics

39

These equations can be differentiated and arranged into the following matrix form

1 1 1

1 1 1

2 1 1 2 2

2 11 1 2 2

3 21 1 2 2 3 3

3 31 1 2 2 3 3

1

2

3

0 00 0

00

1 0 00 1 00 0 1

x rCy r Sx l C r Cy l S r S

v x Rql C l C r Cy l S l S r S

θθθ

ωωω

⎧ ⎫ ⎡ ⎤⎪ ⎪ ⎢ ⎥⎪ ⎪ ⎢ ⎥⎪ ⎪ ⎢ ⎥⎪ ⎪ ⎢ ⎥ ⎧ ⎫⎪ ⎪ ⎢ ⎥ ⎪ ⎪⎪ ⎪ ⎢ ⎥= =⎨ ⎬ ⎨ ⎬

⎢ ⎥⎪ ⎪ ⎪ ⎪⎢ ⎥ ⎩ ⎭⎪ ⎪⎢ ⎥⎪ ⎪⎢ ⎥⎪ ⎪⎢ ⎥⎪ ⎪⎢ ⎥⎪ ⎪ ⎣ ⎦⎩ ⎭

(3.2.11)

3.2.4. Wang’s Energy Theorem: No Motion Constraints

K Q V= − (3.2.12)

From equation (2.5.56), ' 0Ttv F = for no motion constraint.

( )( )

'

0, if no motion constraints

ˆ

T TD t

T

D

TD

TD

Q v F v F

Rq F

q RF

q F

=

+

=

=

=

(3.2.13)

Here, ( ) ( ) ( )( )1 2 3ˆ , ,

T

D D D DF F F Fθ θ θ= represents the generalized forces associated with q

and the non-potential forces and moments and ( )1 2 3, ,Tq θ θ θ= . The vector of generalized

forces may be calculated by noting that

( ) ( ) ( ) ( ) 31 21 2 3i

R R R

Di i i

F M k M k M kθωω ω

θ θ θ∂∂ ∂

= ⋅ + ⋅ + ⋅∂ ∂ ∂

(3.2.14)

Page 48: Thesis- Multibody Dynamics

40

where RiM represents the resultant moment on body i in the reference frame ( )i, j ,k . So

( )( )( )

( )( ) ( )

( )

1

2

3

1 2 1 1 2 2 1

2 3 2 2 1 3 3 2

3 3 3 2

ˆnon conservative

D non conservative

non conservative

F M M c c

F F M M c c

M cF

θ

θ

θ

θ θ θ

θ θ θ θ

θ θ

⎧ ⎫ ⎧ ⎫− − + −⎪ ⎪ ⎪ ⎪⎪ ⎪ ⎪ ⎪= = − − − + −⎨ ⎬ ⎨ ⎬⎪ ⎪ ⎪ ⎪

− −⎪ ⎪ ⎪ ⎪⎩ ⎭⎩ ⎭

(3.2.15)

The time derivative of the potential energy may be calculated as follows

( ) ( ) ˆTT T T TV V V VV v F Rq F q R F q F− = = = = (3.2.16)

where ( ) ( ) ( )( )1 2 3ˆ , ,

T

V V V VF F F Fθ θ θ= . The elements of this vector can be calculated by

noting that

( ) ( ) ( ) ( ) 31 21 2 3i V

i i i

vv vF m g j m g j m g jθ θ θ θ∂∂ ∂

= − ⋅ + − ⋅ + − ⋅∂ ∂ ∂

(3.2.17)

Where ( 1,2,3)i = Using this relationship, we find

( )( )1 1 2 1 3 1 1

2 2 3 2 2

3 3 3

V

m r m l m l gSF m r m l gS

m r gS

− + +⎧ ⎫⎪ ⎪= − +⎨ ⎬⎪ ⎪−⎩ ⎭

(3.2.18)

( ) ( ) ( )1 1 2 1 3 1 1 1 2 2 3 2 2 2 3 3 3 3V m r m l m l gS m r m l gS m r gSθ θ θ= + + + + + (3.2.19)

Equation (3.2.19) was the exact same solution for V as shown in equation (3.1.13)

Substituting from equations(3.2.13), (3.2.15), (3.2.16), and (3.2.19) into equation

(3.2.12) gives the following energy statement which is shown in equation (3.1.28).

( ) ( )

( ) ( ) ( )

( )

1 2 1 1 2 2 1 1 1 2 1 3 1 1 1

2 3 2 2 1 3 3 2 2 2 3 2 2 2

3 3 3 2 3 3 3 3

K M M c c m r m l m l gS

M M c c m r m l gS

M c m r gS

θ θ θ θ

θ θ θ θ θ

θ θ θ

⎡ ⎤= − − + − − + + +⎣ ⎦⎡ ⎤− − − + − − + +⎣ ⎦⎡ ⎤− − −⎣ ⎦

(3.2.20)

Page 49: Thesis- Multibody Dynamics

41

3.2.5. Liu and Huston’s Energy Theorem: No Motion Constraints

*

0, if no motion constraints

ˆ ˆT T TK u F b F u F=

= − = (3.2.21)

where

( )1 2 3, ,Tu θ θ θ= (3.2.22)

( ) ( )( ) ( )( ) ( )

( ) ( )

( ) ( ) ( )

( )

1 11

2 2 2

33 3

1 2 1 1 2 2 1 1 1 2 1 3 1 1

2 3 2 2 1 3 3 2 2 2 3 2 2

3 3 3 2 3 3 3

D V

D V

D V

F F M M c c m r m l m l gSF

F F F F M M c c m r m l gS

F M c m r gSF F

θ θθ

θ θ θ

θθ θ

θ θ θ

θ θ θ θ

θ θ

⎧ ⎫ ⎧ ⎫+ − − + − − + +⎧ ⎫ ⎪ ⎪ ⎪ ⎪⎪ ⎪ ⎪ ⎪ ⎪ ⎪= = + = − − − + − − +⎨ ⎬ ⎨ ⎬ ⎨ ⎬⎪ ⎪ ⎪ ⎪ ⎪ ⎪

− − −+⎩ ⎭ ⎪ ⎪ ⎪ ⎪⎩ ⎭⎩ ⎭

(3.2.23)

Substituting from equations (3.2.22) and (3.2.23) into equation (3.2.21) gives the same

result as with Wang’s theorem as presented in equation(3.2.20).

3.2.6. Wang’s Energy Theorem: With Motion Constraint

K Q V= − (3.2.24)

where

( )( ) ( ) ( )

( ) ( )( )

*

*

*

*

ˆ

ˆ

ˆˆ ˆ ˆ

T TD t

TT

D

T T T T TD

T TD

Q v F v F F

Rq F Rb F F

q R F b R F R F

q F b F F

− +

= − +

= − +

= − +

(3.2.25)

Page 50: Thesis- Multibody Dynamics

42

The term ˆTDq F is the same as that presented in the previous section. The other terms are

associated with the motion constraints.

Motion Constraint 1 sin( )A tθ ω= :

To identify the vector b , we write the motion constraint equation

1

22

33

0 0 cos( )ˆˆ1 0 0

0 1 0

A tq Ru b

θ ω ωθ

θθ

θ

⎧ ⎫ ⎡ ⎤ ⎧ ⎫⎧ ⎫⎪ ⎪ ⎪ ⎪⎢ ⎥= = + +⎨ ⎬ ⎨ ⎬ ⎨ ⎬⎢ ⎥ ⎩ ⎭⎪ ⎪ ⎪ ⎪⎢ ⎥⎣ ⎦ ⎩ ⎭⎩ ⎭

(3.2.26)

Using the definition of b given by equation (3.2.26), we can write

( ) ( ) ( )1 1 1 1

* * *1

ˆ ˆ ˆ cos( )Tb F F A t F F F Fθ θ θ θω ω θ+ = + = + (3.2.27)

Here, 1

Fθ is given by the first term in equation (3.2.23), and 1

*Fθ may be calculated as

follows.

( ) ( ) ( )

( ) ( ) ( )

1

* 31 21 1 2 2 3 3

1 1 1

31 21 1 2 2 3 3

1 1 1zero zerok

vv vF m a m a m a

I k I k I k

θ θ θ θωω ωθ θ θ

θ θ θ

∂∂ ∂− ⋅ + − ⋅ + − ⋅

∂ ∂ ∂∂∂ ∂

+ − ⋅ + − ⋅ + − ⋅∂ ∂ ∂

(3.2.28)

where, by direct differentiation, it can be shown that

( ) ( )2 21 1 1 1 1 1 1 1 1 1 1a r C S i r S C jθ θ θ θ= − + + (3.2.29)

( ) ( )2 2 2 22 1 1 1 1 1 1 2 2 2 2 2 2 1 1 1 1 1 1 2 2 2 2 2 2a l C l S r C r S i l S l C r S r C jθ θ θ θ θ θ θ θ= − + − + + + + (3.2.30)

( )

( )

2 2 23 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3

2 2 21 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3

a l C l S l C l S r C r S i

l S l C l S l C r S r C j

θ θ θ θ θ θ

θ θ θ θ θ θ

= − + − + −

+ + + + + + (3.2.31)

Substituting from equations(3.2.29), (3.2.30), and (3.2.31) into equation (3.2.28), and

Page 51: Thesis- Multibody Dynamics

43

simplifying using some trigonometric identities, it can be shown that

( ) ( ) ( )( ) ( )

1

* 2 2 21 1 1 2 1 3 1 1 2 1 2 3 1 2 2 1 2 3 1 3 3 1 3

2 22 1 2 3 1 2 2 1 2 3 1 3 3 1 3

F I m r m l m l m l r m l l C m l r C

m l r m l l S m l r Sθ θ θ θ

θ θ− −

− −

= − + + + − + −

+ + +(3.2.32)

Substituting equations (3.1.17) and (3.2.23)

( ) ( )1

*1 2 1 1 2 2 1 1 1 2 1 3 1 1F M M c c m r m l m l gSθ θ θ θ⎡ ⎤= − − − + − − + +⎣ ⎦ (3.2.33)

1 1

1 1

*

* 0

F F

F Fθ θ

θ θ

= −

+ = (3.2.34)

Using equation (3.2.33)

( ) ( ) ( )1 1 1 1

* * *1

ˆ ˆ ˆ cos( ) 0Tb F F A t F F F Fθ θ θ θω ω θ+ = + = + = (3.2.35)

The results shown in equation (3.2.35) can also be derived using equation (2.5.21)

where ( )*ˆ ˆ 0F F+ = . Therefore, for both situations with the motion constraint and

without the motion constraint,

ˆTDQ q F= (3.2.36)

The energy theorem can also be found by substituting from equations (3.2.25), (3.2.15),

(3.2.27), (3.2.23), and (3.2.32) into equation (3.2.24) and canceling terms.

( ) ( ) ( )( ) ( ) ( )

( ) ( ) [ ]

1 2 1 1 2 2 1 1 2 3 2 2 1 3 3 2 2

3 3 3 2 3 1 2 1 1 2 2 1 1 1 2 1 3 1 1 1

1 1 2 1 3 1 1 1 2 2 3 2 2 2 3 3 3 3

1 1

K Q V

M M c c M M c c

M c M M c c m r m l m l gS

m r m l m l gS m r m l gS m r gS

I m

θ θ θ θ θ θ θ θ θ

θ θ θ θ θ θ θ

θ θ θ

= −

⎡ ⎤ ⎡ ⎤= − − + − + − − − + − +⎣ ⎦ ⎣ ⎦⎡ ⎤ ⎡ ⎤+ − − − − − + − − + +⎣ ⎦ ⎣ ⎦

− + + − + −⎡ ⎤ ⎡ ⎤⎣ ⎦ ⎣ ⎦

+ +( ) ( ) ( )

( ) ( )

2 2 21 2 1 3 1 1 2 1 2 3 1 2 2 1 2 3 1 3 3 1 3 1

2 22 1 2 3 1 2 2 1 2 3 1 3 3 1 3 1

r m l m l m l r m l l C m l r C

m l r m l l S m l r S

θ θ θ θ

θ θ θ

− −

− −

⎡ ⎤+ + + + +⎣ ⎦⎡ ⎤− + +⎣ ⎦

or

Page 52: Thesis- Multibody Dynamics

44

( ) ( ) ( ) ( )( ) ( ) ( )( ) ( )

2 3 2 2 1 3 3 2 2 2 3 2 2 2 3 3 3 2 3 3 3 3

2 2 21 1 1 2 1 3 1 1 2 1 2 3 1 2 2 1 2 3 1 3 3 1 3

12 22 1 2 3 1 2 2 1 2 3 1 3 3 1 3

K M M c c m r m l gS M c m r gS

I m r m l m l m l r m l l C m l r C

m l r m l l S m l r S

θ θ θ θ θ θ θ θ

θ θ θθ

θ θ

− −

− −

⎡ ⎤ ⎡ ⎤= − − − + − − + + − − −⎣ ⎦ ⎣ ⎦⎡ ⎤+ + + + + +⎢ ⎥+⎢ ⎥− + −⎣ ⎦

(3.2.37)

Substitute equation (3.1.17) into (3.2.37), the K will be same result as shown in

equation (3.2.20).

( ) ( )

( ) ( ) ( )

( )

1 2 1 1 2 2 1 1 1 2 1 3 1 1 1

2 3 2 2 1 3 3 2 2 2 3 2 2 2

3 3 3 2 3 3 3 3

K M M c c m r m l m l gS

M M c c m r m l gS

M c m r gS

θ θ θ θ

θ θ θ θ θ

θ θ θ

⎡ ⎤= − − + − − + + +⎣ ⎦⎡ ⎤− − − + − − + +⎣ ⎦⎡ ⎤− − −⎣ ⎦

(3.2.38)

3.2.7. Liu and Huston’s Energy Theorem: With Motion Constraint

*ˆ ˆT TK u F b F= − (3.2.39)

where

( )2 3,Tu θ θ= (3.2.40)

( ) ( )1

2

2

3

3

0 1 0ˆ ˆ ˆ ˆ0 0 1

TT T T

FF

F R F RR F R RF R F FF

F

θθ

θθ

θ

⎧ ⎫⎧ ⎫⎪ ⎪⎡ ⎤ ⎪ ⎪= = = = = =⎨ ⎬ ⎨ ⎬⎢ ⎥

⎣ ⎦ ⎪ ⎪⎪ ⎪ ⎩ ⎭⎩ ⎭

(3.2.41)

or

( ) ( ) ( )

( )2

3

2 3 2 2 1 3 3 2 2 2 3 2 2

3 3 3 2 3 3 3

M M c c m r m l gSFF

F M c m r gS

θ

θ

θ θ θ θ

θ θ

⎧ ⎫− − − + − − +⎧ ⎫⎪ ⎪ ⎪ ⎪= =⎨ ⎬ ⎨ ⎬− − −⎪ ⎪ ⎪ ⎪⎩ ⎭ ⎩ ⎭

(3.2.42)

The term associated with the motion constraint is

1

* *1

ˆ ˆTb F Fθθ− = − (3.2.43)

Page 53: Thesis- Multibody Dynamics

45

where 1

*Fθ is given by equation (3.2.32) or equation (3.2.33).

Substituting from equations (3.2.40), (3.2.42), (3.2.43), and (3.2.32) into equation

(3.2.39) gives the same result as with Wang’s theorem as presented in equation (3.2.20)

which is shown below.

( ) ( )

( ) ( ) ( )

( )

1 2 1 1 2 2 1 1 1 2 1 3 1 1 1

2 3 2 2 1 3 3 2 2 2 3 2 2 2

3 3 3 2 3 3 3 3

K M M c c m r m l m l gS

M M c c m r m l gS

M c m r gS

θ θ θ θ

θ θ θ θ θ

θ θ θ

⎡ ⎤= − − + − − + + +⎣ ⎦⎡ ⎤− − − + − − + +⎣ ⎦⎡ ⎤− − −⎣ ⎦

(3.2.44)

Page 54: Thesis- Multibody Dynamics

46

CHAPTER 4

MATLAB AND SIMULINK SIMULATION RESULTS

This chapter will discuss example simulations to understand Liu and Huston’s

testing function and Wang’s testing function to evaluate the accuracy of the simulation by

changing the time step, integration method, making error in equations of motion

formulation, and using a damper on the pendulum. Kane and Levinson’s testing function

is not used here because the testing function based on the total energy of the system

encompasses their approach. In multibody dynamics system simulation, selecting the

method of integration and the time step or the step size are important. Any of the fixed-

step continuous solvers in Simulink can simulate a model to any desired level of accuracy

as long as it is given an adequate time and a small enough time step. However, without

much experience, it is difficult to determine what type of a solver or time step would

provide an accurate simulation. A good simulation practice is to optimize the time step.

Smaller time step would increases the computer processing time and bigger time step

would increase the simulation error. During the process of developing equations of

motions or building a computer model, we may make careless mistakes. Unless there is

an experimental result or an intuitive reasoning, these types of mistakes may never be

detected. Also, some mistakes may not be very obvious for a set of conditions. The

triple pendulum example simulation will demonstrate how these testing functions will

help overcome the concerns discussed here.

Page 55: Thesis- Multibody Dynamics

47

4.1. Modeling in Matlab and Simulink

The three pendulums were selected as uniform slender bars having lengths of

0.1 m1l = , 0.25 m2l = , and 0.5m3l = . The weights of the bars are

10N1m g = , 30N2m g = , and 20N3m g = . The gravitational acceleration is 29.8m sg = .

Standard simulation time is 10 seconds.

For the uniform slender bar mass moments of inertia are

21 1

11

1 12

2131 1

1 m l 0 0I 0 0 12I 0 I 0 0 0 0

0 0 I 10 0 m l12

⎡ ⎤⎢ ⎥⎡ ⎤⎢ ⎥⎢ ⎥= = ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦ ⎢ ⎥⎣ ⎦

,

22 2

21

2 22

2232 2

1 m l 0 0I 0 0 12I 0 I 0 0 0 0

0 0 I 10 0 m l12

⎡ ⎤⎢ ⎥⎡ ⎤⎢ ⎥⎢ ⎥= = ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦ ⎢ ⎥⎣ ⎦

, and

23 3

31

3 32

2333 3

1 m l 0 0I 0 0 12I 0 I 0 0 0 0

0 0 I 10 0 m l12

⎡ ⎤⎢ ⎥⎡ ⎤⎢ ⎥⎢ ⎥= = ⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦ ⎢ ⎥⎣ ⎦

The differential equations of motions were solved numerically using Matlab and

Simulink. All the example simulations results are shown in three plots that contain time

history of pendulums’ swing angle, Liu and Huston’s testing function solution, and

Wang’s testing function solution.

4.1.1. Liu and Huston’s Testing Function in Matlab and Simulink

For the triple pendulum example, the kinetic energy K was calculated by using

the fundamental principles of dynamics (section 3.1) without using the numerical

integration. Therefore, we can assume the numerical simulation error is insignificant.

Let’s call this kinetic energy as aK . K was calculated by using the Liu and Huston’s

Page 56: Thesis- Multibody Dynamics

48

method and numerically integrated to get the kinetic energy K as shown in equations

(2.3.1) and (2.3.4)

Let’s call this kinetic energy as bK .

0

0

t n

b r rrt

K F u dt=

⎛ ⎞= ⎜ ⎟⎝ ⎠∑∫ (4.1.1)

For this numerical integration, Simulink numerical “integrator” was used. Equation

(2.3.5) was used to calculate the kinetic energy differences by both methods.

[ ]a b 0C K K KΔ = − − (4.1.2)

Assumption was made that there was no simulation error generated when calculating the

kinetic energy aK using the fundamentals of dynamics as there was no integration or

differentiation used. In Liu and Hustons method, numerical integration was used to

calculate the bK from K . During this calculation, generated error can be detected by the

CΔ . Ideally, CΔ should be zero.

Also, when modeling the specified motion, 1( t ) Asin tθ ω= was not differentiated

to get the 1θ and 1θ as it will introduce errors when calculating the kinetic energy aK

using the fundamentals of dynamics.

1θ and 1θ were modeled using the equations (4.1.3) and (4.1.4).

1 A cos tθ ω ω= (4.1.3)

21 A sin tθ ω ω= − (4.1.4)

4.1.2. Wang’s Testing Function in Matlab and Simulink

In Wang’s testing function, K , V , and Q were calculated and integrated to get

Page 57: Thesis- Multibody Dynamics

49

K ,V , and Q . Using the testing function ( ) ( )0 0 0C K V Q K V QΔ = + − − + − , simulation

errors were checked. Ideally, CΔ should be zero.

4.2. Free Motion

4.2.1. Initial Kinetic Energy of the System = 0

Free motion of the triple pendulum can be achieved by a simple push on one of

the pendulums. The pendulum can freely swing due to gravity influence. The free motion

of the triple pendulum was simulated for three integration time steps such as 0.01 second,

0.001 second, and 0.0001 second. Dormand-Prince fixed-step continuous solver formula,

also known as ode5 in Matlab was used for the integration. The initial conditions for the

pendulums were o1 0θ = , o602θ = , and o153θ = . Also, initial conditions for 1θ , 2θ , and

3θ were zero and all the damping coefficients were zero. This initial kinetic energy of

the system is zero.

Page 58: Thesis- Multibody Dynamics

50

0 1 2 3 4 5 6 7 8 9 10-100

-50

0

50

100 Triple Pendulum Motion

Swin

g A

ngle

θ (d

egre

e)

0 1 2 3 4 5 6 7 8 9 1010-20

10-10

100

Δ C

(J)

Time (sec)

Testing Function by Wang: Δ C = (K+V-Q)-(K0+V0-Q0) 0 1 2 3 4 5 6 7 8 9 10

10-20

10-10

100

Δ C

(J)

Testing Function by Liu and Huston: Kinetic Energy Difference Δ C

θ1θ2θ3

Time step: 0.01 secTime step: 0.001 secTime step: 0.0001 sec

Time step: 0.01 secTime step: 0.001 secTime step: 0.0001 sec

Figure 4.1. Motion for integration time steps of 0.01, 0.001, and 0.0001 seconds

From the three plots shown in Figure 4.1, the testing function developed by Liu

and Huston and Wang methods showed similar plots. The testing function CΔ gets

closer and closer to zero as time step decreases. Further time step reduction from 0.001

seconds to 0.0001 seconds does not remarkably affect CΔ in both methods. Therefore,

the time step 0.001 second can be chosen as the suitable value for this simulation.

Next example is to compare the simulation accuracy between the fixed-step

solvers. Euler’s fixed-step continuous solver known as ode1 and fourth-order Runge-

Kutta fixed step continuous solver formula, also known as ode4 in Matlab, were

compared with the Dormand-Prince fixed-step continuous solver formula. The time step

Page 59: Thesis- Multibody Dynamics

51

selected for this integration is 0.001 second.

0 1 2 3 4 5 6 7 8 9 10-100

-50

0

50

100 Triple Pendulum Motion

Swin

g A

ngle

θ (d

egre

e)

0 1 2 3 4 5 6 7 8 9 1010-20

10-10

100

Δ C

(J)

Testing Function by Liu and Huston: Kinetic Energy Difference Δ C

0 1 2 3 4 5 6 7 8 9 1010-20

10-10

100

1010

Δ C

(J)

Time (sec)

Testing Function by Wang: Δ C = (K+V-Q)-(K0+V0-Q0)

θ1θ2θ3

E-EulerR-Runge-KuttaD-Dormand-Prince

E-EulerR-Runge-KuttaD-Dormand-Prince

E

R

D

E

R D

Figure 4.2. Euler, Runge-Kutta, and Dormand-Prince integrations for 0.001 second

From Figure 4.2, testing functions from both methods clearly show that the

Euler’s method cannot be used to simulate this dynamic system due to the fact that at the

end of the simulation testing function 7.7CΔ = J. Dormand-Prince integration method

yielded 10C 10−Δ ≈ J and Runge-Kutta integration method yielded 7C 10−Δ ≈ J for the

testing function. Therefore, based on these observations, Dormand-Prince (ode5)

integration method and Runge-Kutta (ode4) integration method can be used for the triple

pendulum simulation. Dormand-Prince integration method will yield the lowest

Page 60: Thesis- Multibody Dynamics

52

simulation error.

4.2.2. Initial Kinetic Energy of the System ≠ 0

When the initial kinetic energy is not zero, it will be interesting to see if the

testing functions can detect the simulation error. Initial conditions for the pendulums

were 01θ = degree, 602θ = degree, and 153θ = degree. Also, initial conditions

for 10rad/sec1θ = , 02θ = , and 03θ = and all the damping coefficients were zero. The

initial kinetic energy of the system is 2.721 J.

0 1 2 3 4 5 6 7 8 9 10-100

-50

0

50

100 Triple Pendulum Motion with an Initial Kinetic Energy

Swin

g A

ngle

θ (d

egre

e)

0 1 2 3 4 5 6 7 8 9 10

10-10

100

Δ C

(J)

Testing Function by Liu and Huston: Kinetic Energy Difference Δ C

0 1 2 3 4 5 6 7 8 9 10

10-10

100

Δ C

(J)

Time (sec)

Testing Function by Wang: Δ C = (K+V-Q)-(K0+V0-Q0)

θ1θ2θ3

Time step: 0.01 secTime step: 0.001 secTime step: 0.0001 sec

Time step: 0.01 secTime step: 0.001 secTime step: 0.0001 sec

Figure 4.3. Time steps of 0.01, 0.001, and 0.0001seconds with an initial kinetic energy

Page 61: Thesis- Multibody Dynamics

53

Figure 4.3 shows that the testing functions detect the simulation error with an

initial kinetic energy in the system. Again, both Liu and Huston’s testing functions and

Wang’s testing functions show that the 0.001 second and 0.0001 second time steps are

better than the 0.01 second time step for accurate simulation.

4.2. Specified Motion

In this example, the triple pendulum motion was obtained creating a specified

motion for the link OA. Specified motion was achieved by applying a torque 1M (see

Figure 4.2.2) at the joint O in such a way that 1( t ) Asin tθ ω= . Select 1A = radian and

0.75ω = radian/sec. 1M can be found using equation (3.1.17). The initial conditions

were 60 degree2θ = and 15 degree3θ = . Also, initial conditions for 2θ and 3θ were zero

and all of the damping coefficients were set to zero.

Page 62: Thesis- Multibody Dynamics

54

0 1 2 3 4 5 6 7 8 9 10-100

-50

0

50

100 Triple Pendulum Motion

Swin

g A

ngle

θ (d

egre

e)

0 1 2 3 4 5 6 7 8 9 1010-30

10-20

10-10

Δ C

(J)

Testing Function by Liu and Huston: Kinetic Energy Difference Δ C

0 1 2 3 4 5 6 7 8 9 1010-30

10-20

10-10

Δ C

(J)

Time (sec)

Testing Function by Wang: Δ C = (K+V-Q)-(K0+V0-Q0)

θ1θ2θ3

Time step: 0.01 secTime step: 0.001 secTime step: 0.0001 sec

Time step: 0.01 secTime step: 0.001 secTime step: 0.0001 sec

Figure 4.4. Specified motion for 1( t ) Asin tθ ω=

As shown in Figure 4.4, smaller time step show smaller simulation error as

expected. Time step of 0.001 second and 0.0001second showed very similar CΔ and

therefore, reducing the time step smaller than 0.001 second would not add much value to

the simulation.

Page 63: Thesis- Multibody Dynamics

55

0 1 2 3 4 5 6 7 8 9 10-15

-10

-5

0

5

10

15

Driv

ing

Torq

ue (N

m)

Time (sec)

Driving Torque to Maintain Specified Motion

Figure 4.5. Driving toque 1M to maintain Body 1 pendulum specified motion

Applied torque to maintain the specified motion of the link OA is shown in Figure

4.5. Euler, Runge-Kutta, and Dormand-Prince integration methods were compared for

the time step of 0.001 second for this specified motion example.

Page 64: Thesis- Multibody Dynamics

56

0 1 2 3 4 5 6 7 8 9 10-100

-50

0

50

100 Triple Pendulum Motion

Swin

g A

ngle

θ (d

egre

e)

0 1 2 3 4 5 6 7 8 9 10

10-20

100

Δ C

(J)

Testing Function by Liu and Huston: Kinetic Energy Difference Δ C

0 1 2 3 4 5 6 7 8 9 10

10-20

100

Δ C

(J)

Time (sec)

Testing Function by Wang: Δ C = (K+V-Q)-(K0+V0-Q0)

θ1θ2θ3

E-EulerR-Runge-KuttaD-Dormand-Prince

E-EulerR-Runge-KuttaD-Dormand-Prince

E R

D

E R

D

Figure 4.6. Euler, and Runge-Kutta, and Dormand -Prince integration method for the time step=0.001 second

Figure 4.6 shows that the Eluer’s integration method produced significant

simulation error as compared to the Runge-Kutta and Dormand-Prince testing functions.

Runge-Kutta’s method and Dormand-Prince’s method yielded similar results and

therefore, both of these methods can be utilized to simulate the specified motion example.

4.3. Make a Mistake in Formulation of Equations of Motions

Developing differential equations of motions and programming them are very

tedious and time consuming process. During this process, even a small mistake such as

incorrect signs (positive and negative signs) or missing out a term can cause errors in the

Page 65: Thesis- Multibody Dynamics

57

simulation results. Some errors are very hard to detect in a complex multibody system

simulations, but it is extremely important to identify if there is an error in the simulations.

Using the testing functions, it is relatively easy to detect if there was a mistake in the

formulations of the equations of motion or programming. Free motion of the triple

pendulum discussed in the example problem section 4.1 was selected to demonstrate a

mistake in simulation.

Let’s take one of equations of motions developed using the Lagrange’s method in

equation (3.1.18) and make a sign mistake as shown in equation (4.3.1) from

[ ]2 2 3 2 2m r m l gS+ + to [ ]2 2 3 2 2m r m l gS− +

( ) [ ]( ) ( )

2 2

2 22 2 3 2 1 2 1 1 2 2 2 3 2 2 3 2 3 3 2 3

2 22 2 3 2 1 2 1 1 3 2 3 3 2 3

d L Ldt

m r m l l C I m r m m l r C

m r m l l S m l r S

θ θ

θ θ θ

θ θ

− −

− −

⎛ ⎞∂ ∂−⎜ ⎟∂ ∂⎝ ⎠

⎡ ⎤= + + + + +⎣ ⎦+ + − + [ ]

( ) ( )2 2 3 2 2

2 3 2 2 1 3 3 2

m r m l gS

M M c cθ θ θ θ

− +

⎡ ⎤= − + − − + −⎣ ⎦

(4.3.1)

The initial conditions for the pendulums were 1 0θ = degree, 602θ = degree, and 153θ =

degree. Also, initial conditions for 1θ , 2θ , and 3θ were zero and all the damping

coefficients were zero. Time step used for this simulation is 0.001 second established as

the adequate time step for an accurate simulation. The integration method selected is

Dormand-Prince fixed-step continuous solver formula.

In Figure 4.7, both testing functions detected the incorrect equation where the

CΔ s are more than 010 or 1. For correct equations, the testing functions are about

J10C 10−Δ ≈ .

Page 66: Thesis- Multibody Dynamics

58

0 1 2 3 4 5 6 7 8 9 10-100

-50

0

50

100 Triple Pendulum Motion

Swin

g A

ngle

θ (d

egre

e)

0 1 2 3 4 5 6 7 8 9 10

10-10

100

Δ C

(J)

Testing Function by Liu and Huston: Kinetic Energy Difference Δ C

0 1 2 3 4 5 6 7 8 9 10

10-10

100

Δ C

(J)

Time (sec)

Testing Function by Wang: Δ C = (K+V-Q)-(K0+V0-Q0)

θ1θ2θ3

Incorrect Equation

Correct Equation

Incorrect Equation

Correct Equation

Figure 4.7. Mistake in the equations of motion that affect the kinetic energy calculation

Based on this observation, both of the testing functions can be incorporated into

the dynamic simulations softwares to check the accuracy of the models or formulations of

the equations.

4.4. Contribution of a Small Damper in Simulation Accuracy

Systems that have no damping can exhibit erratic behavior, and with the damper

the erratic behaviors can vanish. Damping can be used to help the energy dissipation

which is dependent of displacement and velocity or combination of both.

The purpose of this example is to see the simulation error with the damper in the system.

Page 67: Thesis- Multibody Dynamics

59

The example system selected was the triple pendulum with an initial kinetic energy. The

following parameters were selected to simulate the system. 0.1 m1l = , 0.25 m2l = , and

0.5m3l = . The weights of the bars are 10N1m g = , 0N2m g 4= , and 0N3m g 1= . The

gravitational acceleration is 29.8m sg = . The initial conditions for the pendulums

were 301θ = degree, 602θ = degree, and 153θ = degree. Also, initial angular speeds of

the bars are 10rad/sec1θ = , 02θ = , and 03θ = . Time step of 0.01 second was selected for

the simulation. Iterations were performed for the following conditions. Without Dampers

01 2 3c c c= = = and with dampers 0 .0011 2 3c c c= = = Nms/rad. The simulation was

run for 50 seconds to capture all the details. First plot in Figure 4.8 shows the erratic

behavior of the triple pendulum motion when the system does not have a damper, but

when the system has a very small damper (see Figure 4.8 second plot), the erratic

behavior was eliminated.

Page 68: Thesis- Multibody Dynamics

60

0 5 10 15 20 25 30 35 40 45 50-1000

0

1000

2000 Triple Pendulum Motion without Damper (Time Step=0.01seconds)

Swin

g A

ngle

θ (d

egre

e)θ1θ2θ3

0 5 10 15 20 25 30 35 40 45 50-200

-100

0

100

200 Triple Pendulum Motion with Damper (Time Step=0.01 second)

Swin

g A

ngle

θ (d

egre

e)

θ1θ2θ3

Time (sec)

Figure 4.8. Triple pendulum motion without and with the damper

0 5 10 15 20 25 30 35 40 45 5010-10

10-5

100

Δ C

(J)

Testing Function by Liu and Huston: Kinetic Energy Difference Δ C

0 5 10 15 20 25 30 35 40 45 5010-10

10-5

100

Δ C

(J)

Time (sec)

Testing Function by Wang: Δ C = (K+V-Q)-(K0+V0-Q0)

Without Dampers

With Dampers

Without Dampers

With Dampers

Figure 4.9. Damping effect in simulation accuracy

In Figure 4.9, the system with the damper shows much smaller CΔ than the

Page 69: Thesis- Multibody Dynamics

61

system without the damping. From 0-2 seconds, magnitude of the initial error was much

more than the previous simulation examples due to the fact that there was an initial speed

rad/sec1 10θ = applied to the arm OA. Without this initial speed, simulation of damping

effect could not be achieved. Application of the damper in the system helped eliminate

the erratic behavior of the system. Further analysis was performed to understand whether

the damper interferes with the ability of the testing functions to detect the mistakes in

simulations.

Example simulation from section 4.3 was rerun here. A mistake was incorporated

into Lagrange’s equations of motions with the damper and without the damper.

Simulations were run at the time step of 0.001 second in the following order.

Incorrect Equation with No Damper - IE+ND

Incorrect Equation with Damper- IE+D

Correct Equation with No Damper- CE+ND

Page 70: Thesis- Multibody Dynamics

62

0 1 2 3 4 5 6 7 8 9 10-100

-50

0

50

100 Triple Pendulum Motion

Swin

g A

ngle

θ (d

egre

e)

0 1 2 3 4 5 6 7 8 9 10

10-10

100

Δ C

(J)

Testing Function by Liu and Huston: Kinetic Energy Difference Δ C

0 1 2 3 4 5 6 7 8 9 10

10-10

100

Δ C

(J)

Time (sec)

Testing Function by Wang: Δ C = (K+V-Q)-(K0+V0-Q0)

θ1θ2θ3

IE+ND->Incorrect Equation+No DamperIE+D->Incorrect Equation+DamperCE+ND->Correct Equation +No DamperCE+ND

CE+ND

IE+NDand IE+D

IE+NDand IE+D

Figure 4.10. Dampers effect in incorrect equations of motions

Based on the Figure 4.10, damper does not interfere with the ability of the testing

functions to detect the mistakes in the equations of motions. However, it helps to

stabilize the dynamic simulations. Thus understanding the effectiveness of the testing

functions in the presence of a damper will be beneficial when we incorporate the testing

functions in simulation programs.

Page 71: Thesis- Multibody Dynamics

63

CHAPTER 5

CONCLUSION

The testing functions developed by Kane and Levinson, Liu and Huston, and

Wang have similar approaches based on Kane’s equation even though they are in

different forms. This thesis demonstrated the application of Liu and Huston’s testing

function and Wang’s testing function using a triple pendulum example. Even though the

forms of the testing functions are different, they were able to demonstrate that they can be

used to identify the correct time step, to identify the careless mistakes made in

formulations of the equations of motions or computer programming, to identify the

numerical integration method suitable for the dynamic system, and to detect the dampers

effect in the dynamic simulations. Also, the testing functions were able to suggest the

best time step for accurate numerical integration. The testing functions discussed in this

thesis are applicable to any holonomic and simple nonholonomic systems. By applying

these methods on multiple example systems, a robust procedure can be developed to be

incorporated into the dynamic simulation softwares to check the accuracy of the

simulation.

Page 72: Thesis- Multibody Dynamics

64

BIBLIOGRAPHY

1. Shabana, Ahmed A., Computational Dynamics, John Wiley and Sons, Inc, 1994. 2. Kane, T.R., and Levinson, D.A., “A Method for testing Numerical Integration of

Equations of Motion of Mechanical Systems,” ASME Journal of Applied Mechanics, Vol. 55, pp711-715, 1988.

3. Liu, C.Q., and Huston, R.L., “An Energy Theorem for Developing Testing Functions for Numerical Simulations of Dynamic Systems,” Journal of Dynamic Systems, Measurement, and Control, Vol. 117, pp193-198, June 1995.

4. Kane, T.R., and Levinson, D.A., “Testing Numerical Integration of Equation of Motion,” ASME Journal of Applied Mechanics, Vol. 57, pp.248-249, March 1990.

5. Souchet, R., “A New Expression of Energy Theorem in Discrete Mechanical System,” ASME Journal of Applied Mechanics, Vol. 58, pp. 1086-1088, 1991.

6. Huston, R. L. and Kamman, J. W., “Testing the Accuracy of Numerical Simulations of Multibody System,” Mechanics Research Communications, Vol. 28, No.1 pp1-6, 2001.

7. Kane, T.R. and Levninson, D.A. “Dynamics, Theory and Applications,” McGraw Hill, 1985.

8. Wang, J.T., “A Conservation Theorem for Constrained Multibody Systems,” ASME Journal of Applied Mechanics, Vol. 60, pp 962-969, 1993.

9. Blajer, W., “State and Energy Stabilization in Multibody System Simulation,” Technical University of Radom, Department of Mechanics, pp 261-268, 1998.

10. Kamman, J., Multibody Dynamics, Course Notes, ME659, 2003. <http://www.mae.wmich.edu/faculty/kamman/Me659course_notes.htm <http://www.mae.wmich.edu/faculty/kamman/Me459GenForcesPVW.pdf> 11. Wang, J.T. & Huston, R.L., “Kane’s Equations with Undetermined Multipliers-

Application to Constrained Multibody Systems,” ASME Journal, Vol. 54, June 1987.

12. Meirivitch, L., “Methods of Analytical Dynamics,” McGraw-Hill Book Company, 1970.

13. Arabyan, A., Multibody Dynamics Course Notes, AME550, 2006. < http://www.ame.arizona.edu/courses/ame550/Class_notes_main.htm>

14. Plissi , M. V. et al.”GEO 600 triple pendulum suspension system: Seismic isolation and control.” American Institute of Physics, June 2000.

Page 73: Thesis- Multibody Dynamics

65

APPENDICES

A. Definition of Terms

Holonomic Constraints and Nonholonomic Constraint

If the constraints can be given in an algebraic form of equations, they are called

holonomic constraints. If they cannot be given in an algebraic form of equations, they are

called nonholonomic constraints. In a nonholonomic system, the constraint relationships

are given only in differential form and the coordinates of the system cannot be expressed

by the rest of coordinates in an algebraic form. Time-independent holonomic constraint

is called scleronomic constraint. Time-dependent holonomic constraint is called

rheonomic constraint. Table 1 shows the classification of the holonomic and

nonholonomic constraints [13].

Table 1. Classification of Constraints [13]

Holonomic

Scleronomic Rheonomic

( )j 1 2 nf q ,q ,...,q 0= ( )j 1 2 nf q ,q ,...,q ,t 0=

Nonholonomic

Catastatic Acatastatic

n

jk kk 1

a dq 0=

=∑ n

jk k j0k 1

a dq a dt 0=

+ =∑

Page 74: Thesis- Multibody Dynamics

66

Here ( )jk jk 1 2 na a q ,q ,...,q ,t= and ( )j0 j0 1 2 na a q ,q ,...,q ,t= . 1 2 nq ,q ,...,q are generalized

coordinates and t is time. When j0a dt 0= the system is said to be a catastatic (“orderly”

or “homogenous”) system and the constraint equations become homogeneous.

When jta dt 0≠ , the system is called an acatastatic system. An acatastatic system is a

non-conservative system where constraint forces do work on the system.

Skew Symmetric Matrix

Skew symmetric matrix is a square matrix. When it is transposed, it becomes its

negative.

Let’s take two vectors a and b

1 1 2 2 3 3a a e a e a e= + + (A1)

1 1 2 2 3 3b b e b e b e= + + (A2)

Cross or vector product of the two vectors can be given as follows.

( ) ( ) ( )2 3 3 2 1 3 1 1 3 2 1 2 2 1 3a b a b a b e a b a b e a b a b e× = − + − + − (A3)

[ ]{ } { } [ ] 3 2 1

T3 1 2 1 2 3

2 1 3

0 a a ba b a b e a 0 a b e e e

a a 0 b

⎡ ⎤−⎡ ⎤ ⎧ ⎫⎪ ⎪⎢ ⎥⎢ ⎥⎡ ⎤× = = − ⎨ ⎬⎣ ⎦ ⎢ ⎥⎢ ⎥⎪ ⎪⎢ ⎥⎢ ⎥−⎣ ⎦ ⎩ ⎭⎣ ⎦

(A4)

Here 3 2

3 1

2 1

0 a aa 0 aa a 0

−⎡ ⎤⎢ ⎥−⎢ ⎥⎢ ⎥−⎣ ⎦

is the skew symmetric matrix [10].

Page 75: Thesis- Multibody Dynamics

67

B. Matlab/ Simulink Programming for Free Motion of the Pendulum

Combination of Matlab codes and Simulink was used to simulate example problems.

Following program was used in all the examples by changing some of the parameters as

shown in the examples in section 4. Examples are shown for the free motion and

specified motion of the pendulums.

%This Program is to simulate Tripple pendulum free motion

%Define Variables

Specify_Time_Step=[0.01 0.001 0.0001]

for j=1:3

Time_Step=Specify_Time_Step(1,j)

End_Time=10

L1=0.1; L2=0.25; L3=0.5;

m1=10/9.8; m2=30/9.8; m3=20/9.8;

r1=L1/2; r2=L2/2; r3=L3/2;

I1=1/12*m1*L1^2;

I2=1/12*m2*L2^2;

I3=1/12*m3*L3^2;

c1=0;

c2=0;

c3=0;

g=9.8 % m/s^2 Gravity

M1=0;

Page 76: Thesis- Multibody Dynamics

68

M2=0;

M3=0;

Theta1=0; % in degrees

Theta2=60; % in degrees

Theta3=15; % in degrees

Theta1dot=0;

Theta2dot=0;

Theta3dot=0;

%Calculate Initial Kinetic Energy

InitialKE=1/2*(I1+m1*r1^2)*Theta1dot^2+1/2*...

(I2*Theta2dot^2+m2*L1^2*Theta1dot^2+m2*r2^2*Theta2dot^2+2*m2*L1*r2*Theta1d

ot*Theta2dot*cos(Theta2-Theta1))+...

1/2*(I3*Theta3dot^2+m3*L1^2*Theta1dot^2+m3*L2^2*Theta2dot^2+m3*r2^2*Theta3

dot^2+2*m3*L1*L2*Theta1dot*Theta2dot*cos(Theta2-Theta1)+...

2*m3*L2*r3*Theta2dot*Theta3dot*cos(Theta3-

Theta2)+2*m3*L1*r3*Theta1dot*Theta3dot*cos(Theta3-Theta1));

%To Run the simulation in Simulink

sim('TPSC')

%===To Plot the pendulum motion

subplot(3,1,1)

plot(tout,Theta1,tout,Theta2,tout,Theta3)

title('\bf Triple Pendulum Motion','FontName','Times')

ylabel('Swing Angle \it\theta \rm (degree)','FontName','Times')

Page 77: Thesis- Multibody Dynamics

69

%xlabel('Time (sec)','FontName','Times')

legend('\it\theta_1','\it\theta_2','\it\theta_3' )

Grid on

%==============================================================

%To process the data to draw plots for KEdifference and total energy of the

%system versus time

tstep=(tout(2)-tout(1));

a=who;

if (ismember('data',a) & ismember('time',a))

c=size(data,2)+1;

if length(tout)<size(time,1)

time(length(tout)+1:end,c)=NaN;

data(length(tout)+1:end,c)=NaN;

elseif length(tout)>size(time,1)

time(size(time,1)+1:length(tout),:)=NaN;

data(size(data,1)+1:length(tout),:)=NaN;

end

else

c=1;

end

if size(KEdiff,2)>size(KEdiff,1)

Page 78: Thesis- Multibody Dynamics

70

KEdiff=KEdiff';

end

if size(tout,2)>size(tout,1)

tout=tout';

end

data(1:length(tout),c)=KEdiff;

time(1:length(tout),c)=tout;

if ismember('leg',a)

d=length(leg)+1;

else

d=1;

end

leg{d}=['Time step: ',num2str(tstep),' sec'];

%To plot Kinetic energy difference versus time

subplot(3,1,2)

semilogy(time,data)

ylim([10^-20 1])

ylabel('\it\Delta C\rm(J)','FontName','Times')

%xlabel('Time (sec)','FontName','Times')

title('\bf Testing Function by Liu and Huston: Kinetic Energy Difference \it\Delta

C\rm','FontName','Times')

Page 79: Thesis- Multibody Dynamics

71

Grid on

legend(leg)

%=================================================

%to plot K+V-Q versus time

dataKVQ(1:length(tout),c)=KVQ;

delta=abs(dataKVQ-dataKVQ(1,1));

subplot(3,1,3)

semilogy(time,delta)

ylim([10^-20 1])

ylabel('\it\Delta C\rm (J)','FontName','Times')

xlabel('Time (sec)','FontName','Times')

title('\bf Testing Function by Wang: \it\Delta C = (K+V-Q)-(K_0+V_0-Q_0)\rm

','FontName','Times')

Grid on

legend(leg)

%=================================================

clear tout KEdiff a c d tstep KVQ

end

Simulink program was used to solve the differential equations of motion. Matlab

was used to run the overall solutions procedure. Following pages show the Simulink

programming diagrams.

Page 80: Thesis- Multibody Dynamics

Free

Mot

ion

of T

rippl

e Pe

ndul

um U

sing

D

epen

dent

Set

of C

oord

inat

es

Thet

a3

To W

orks

pace

5

KE

diff

To W

orks

pace

4

Thet

a2

To W

orks

pace

3

Thet

a1

To W

orks

pace

2

Thet

a 1

Thet

a 2

Thet

a 3

Mux

Thet

aK

E D

iffer

ence

Kin

etic

Ene

rgy

Com

paris

onK

E D

iffer

ence

[The

ta]

From

2

Thet

aE

quat

ion

3

Equ

atio

n 3

Thet

aE

quat

ion

2

Equ

atio

n 2

Thet

aE

quat

ion

1

Equ

atio

n 1

Dem

ux

180/

pi

Con

vert

Thet

a3 to

Deg

ree

180/

pi

Con

vert

Thet

a2 to

Deg

ree

-K-

Con

vert

Thet

a1 to

Deg

ree

f sub

1

f sub

2

f sub

3

Thet

a

Cac

ulat

e Th

eta

Vec

tors

Thet

a 1

Thet

a 2

Thet

a 3

72

Page 81: Thesis- Multibody Dynamics

Inte

grat

ions

to C

alcu

late

The

ta V

ecto

rs

1

Thet

ath

eta2

dot

Thet

a 1

Thet

a 1

dot

Thet

a 1

DD

ot

Thet

a 2

Thet

a2 D

ot

Thet

a 2

DD

ot

Thet

a 3

Thet

a3 D

ot

Thet

a 3

DD

ot

1/s

Inte

grat

or6

1/s

Inte

grat

or5

1/s

Inte

grat

or4

1/s

Inte

grat

or3

1/s

Inte

grat

or2

1/s

Inte

grat

or1

Thet

a

Got

o

f(z)

zS

olve

f(z) =

0A

lgeb

raic

Con

stra

int3

f(z)

zS

olve

f(z) =

0A

lgeb

raic

Con

stra

int2

f(z)

zS

olve

f(z) =

0A

lgeb

raic

Con

stra

int1

3

f sub

3

2

f sub

21

f sub

1

Thet

a 3

Thet

a 3

DD

otTh

eta3

Dot

Thet

a 2

Thet

a 2

DD

otTh

eta2

Dot

Thet

a 1

Thet

a 1

DD

otTh

eta

1 do

t

73

Page 82: Thesis- Multibody Dynamics

Sig

nal G

uide

Thet

a 1

= u

[1]

Thet

a 1d

ot=

u[2]

Thet

a 1d

d=u[

3]Th

eta

2 =

u[4

]Th

eta

2dot

= u[

5]Th

eta

2dd=

u[6]

Thet

a 3

= u

[7]

Thet

a 3d

ot=

u[8]

Thet

a 3d

d=u[

9]dd

= do

uble

dot

Cal

cula

te E

quat

ion

1D

epen

dent

Set

of C

oord

inat

es

1E

quat

ion

1

-(M

1-M

2-c1

*u[2

]+c2

*(u[

5]-u

[2]))

Fcn7

(m1*

r1+(

m2+

m3)

*L1)

*g*s

in(u

[1])

Fcn6

-(m

3*L1

*r3)

*sin

(u[7

]-u[1

])*(u

[8])^

2Fc

n5

-(m

2*r2

+m3*

L2)*

L1*s

in(u

[4]-u

[1])*

(u[5

])^2

Fcn4

m3*

L1*r

3*co

s(u[

7]-u

[1])*

u[9]

Fcn3

(m2*

r2+m

3*L2

)*L1

*cos

(u[4

]-u[1

])*u[

6]

Fcn2

(I1+m

1*r1

^2+(

m2+

m3)

*L1^

2)*u

[3]

Fcn1

1Th

eta

74

Page 83: Thesis- Multibody Dynamics

Sig

nal G

uide

Thet

a 1

= u

[1]

Thet

a 1d

ot=

u[2]

Thet

a 1d

d=u[

3]Th

eta

2 =

u[4

]Th

eta

2dot

= u[

5]Th

eta

2dd=

u[6]

Thet

a 3

= u

[7]

Thet

a 3d

ot=

u[8]

Thet

a 3d

d=u[

9]

Cal

cula

te E

quat

ion

2D

epen

dent

Set

of C

oord

inat

es

1E

quat

ion

2

-(M

2-M

3-c2

*(u[

5]-u

[2])+

c3*(

u[8]

-u[5

]))

Fcn7

(m2*

r2+m

3*L2

)*g*

sin(

u[4]

)

Fcn6

-(m

3*L2

*r3)

*sin

(u[7

]-u[4

])*(u

[8])^

2

Fcn5

(m2*

r2+m

3*L2

)*L1

*sin

(u[4

]-u[1

])*(u

[2])^

2

Fcn4

m3*

L2*r

3*co

s(u[

7]-u

[4])*

u[9]

Fcn3

(I2+m

2*r2

^2+m

3*L2

^2)*

u[6]

Fcn2

(m2*

r2+m

3*L2

)*L1

*cos

(u[4

]-u[1

])*u[

3]

Fcn1

1Th

eta

75

Page 84: Thesis- Multibody Dynamics

Sig

nal G

uide

Thet

a 1

= u

[1]

Thet

a 1d

ot=

u[2]

Thet

a 1d

d=u[

3]Th

eta

2 =

u[4

]Th

eta

2dot

= u[

5]Th

eta

2dd=

u[6]

Thet

a 3

= u

[7]

Thet

a 3d

ot=

u[8]

Thet

a 3d

d=u[

9]dd

= do

uble

dot

Cal

cula

te E

quat

ion

3D

epen

dent

Set

of C

oord

inat

es

1E

quat

ion

3

-(M

3-c3

*(u[

8]-u

[5]))

Fcn7

m3*

r3*g

*sin

(u[7

])

Fcn6

m3*

L2*r

3*si

n(u[

7]-u

[4])*

(u[5

])^2

Fcn5

m3*

L1*r

3*si

n(u[

7]-u

[1])*

(u[2

])^2

Fcn4

(I3+m

3*r3

^2)*

u[9]

Fcn3

m3*

L2*r

3*co

s(u[

7]-u

[4])*

u[6]

Fcn2

m3*

L1*r

3*co

s(u[

7]-u

[1])*

u[3]

Fcn1

1Th

eta

76

Page 85: Thesis- Multibody Dynamics

Kin

etic

Ene

rgy

Com

paris

on

1K

E D

iffer

ence

V1

V

KV

Q

To W

orks

pace

4

KE

Fund

a

To W

orks

pace

2

KE

Hou

ston

To W

orks

pace

1

Q

Out

1

Pot

entia

l Ene

rgy

V

Kdo

t+V

dot-Q

dot

KE

Hou

ston

KE

Diff

eren

ce1

K+V

-Q

abs(

u[1]

)

Fcn1

Q

Ene

rgy

Inou

t Q

du/d

t

Der

ivat

ive

Thet

aK

E H

usto

n's

Met

hod

Cal

cula

te K

E fr

om H

usto

n's

Met

hod

Thet

aK

E fu

ndam

enta

l

Cal

cula

te K

E U

sing

Dyn

amic

Fun

dam

enta

ls

1Th

eta

77

Page 86: Thesis- Multibody Dynamics

Sig

nal G

uide

Thet

a 1

= u

[1]

Thet

a 1d

ot=

u[2]

Thet

a 1d

d=u[

3]Th

eta

2 =

u[4

]Th

eta

2dot

= u[

5]Th

eta

2dd=

u[6]

Thet

a 3

= u

[7]

Thet

a 3d

ot=

u[8]

Thet

a 3d

d=u[

9]dd

= do

uble

dot

Cal

cula

te K

inet

ic E

nerg

y fr

om F

unda

men

tals

in D

ynam

ics

1K

E fu

ndam

enta

l

m3*

L1*r

3*co

s(u[

7]-u

[1])*

u[2]

*u[8

]

Fcn6

m3*

L2*r

3*co

s(u[

7]-u

[4])*

u[5]

*u[8

]

Fcn5

(m2*

L1*r

2+m

3*L1

*L2)

*cos

(u[4

]-u[1

])*u[

2]*u

[5]

Fcn4

1/2*

(I3+m

3*r3

^2)*

(u[8

])^2

Fcn3

1/2*

(I2+m

2*r2

^2+m

3*L2

^2)*

(u[5

])^2

Fcn2

1/2*

(I1+m

1*r1

^2+m

2*L1

^2+m

3*L1

^2)*

(u[2

])^2

Fcn1

1Th

eta

78

Page 87: Thesis- Multibody Dynamics

Sig

nal G

uide

Thet

a 1

= u

[1]

Thet

a 1d

ot=

u[2]

Thet

a 1d

d=u[

3]Th

eta

2 =

u[4

]Th

eta

2dot

= u[

5]Th

eta

2dd=

u[6]

Thet

a 3

= u

[7]

Thet

a 3d

ot=

u[8]

Thet

a 3d

d=u[

9]dd

= do

uble

dot

Cal

cula

te K

inet

ic E

nerg

y fr

om L

iu a

nd H

usto

n's

Met

hod

1K

E H

usto

n's

Met

hod

1/s

Inte

grat

or

(M3-

c3*(

u[8]

-u[5

]))*u

[8]

Fcn6

(M2-

M3-

c2*(

u[5]

-u[2

])-c3

*(u[

5]-u

[8]))

*u[5

]

Fcn5

(M1-

M2-

c1*u

[2]-c

2*(u

[2]-u

[5]))

*u[2

]

Fcn4

-m3*

r3*g

*sin

(u[7

])*u[

8]

Fcn3

(-m

2*r2

-m3*

L2)*

g*si

n(u[

4])*

u[5]

Fcn2

(-m

1*r1

-m2*

L1-m

3*L1

)*g*

sin(

u[1]

)*u[

2]

Fcn1

1Th

eta

79

Page 88: Thesis- Multibody Dynamics

Sig

nal G

uide

Thet

a 1

= u

[1]

Thet

a 1d

ot=

u[2]

Thet

a 1d

d=u[

3]Th

eta

2 =

u[4

]Th

eta

2dot

= u[

5]Th

eta

2dd=

u[6]

Thet

a 3

= u

[7]

Thet

a 3d

ot=

u[8]

Thet

a 3d

d=u[

9]dd

= do

uble

dot

Ener

gy In

put Q

1 Q1/

s

Inte

grat

or2

[The

ta]

From

2

(M3-

c3*(

u[8]

-u[5

]))*u

[8]

Fcn4

(M1-

M2-

c1*u

[2]+

c2*(

u[5]

-u[2

]))*u

[2]

Fcn3

(M2-

M3-

c2*(

u[5]

-u[2

])+c3

*(u[

8]-u

[5]))

*u[5

]

Fcn2

80

Page 89: Thesis- Multibody Dynamics

Pote

ntia

l Ene

rgy

V

1O

ut1

[The

ta]

From

2

-(L1

*cos

(u[1

])+L2

*cos

(u[4

])+L3

/2*c

os(u

[7]))

*m3*

g

Fcn4

-L1/

2*co

s(u[

1])*

m1*

g

Fcn3

-(L1

*cos

(u[1

])+L2

/2*c

os(u

[4]))

*m2*

g

Fcn2

81

Page 90: Thesis- Multibody Dynamics

Spec

ified

Mot

ion

of T

riple

Pen

dulu

m U

sing

D

epen

dent

Set

of C

oord

inat

es

driv

ing

torq

Thet

a3

To W

orks

pace

5

KE

diff

To W

orks

pace

4

Thet

a2

To W

orks

pace

3

Thet

a1

To W

orks

pace

2

Thet

a 1

Thet

a 2

Thet

a 3

Mux

M1

M1

Thet

aK

E D

iffer

ence

Kin

etic

Ene

rgy

Com

paris

onK

E D

iffer

ence

M1

Got

o1

[The

ta]

From

2

Thet

aE

quat

ion

3

Equ

atio

n 3

Thet

aE

quat

ion

2

Equ

atio

n 2

Thet

aM

Equ

atio

n 1

Dem

ux

180/

pi

Con

vert

Thet

a3 to

Deg

ree

180/

pi

Con

vert

Thet

a2 to

Deg

ree

-K-

Con

vert

Thet

a1 to

Deg

ree

f sub

2

f sub

5

Thet

a1

Cac

ulat

e Th

eta

Vec

tors

Thet

a 1

Thet

a 2

Thet

a 3

82

Page 91: Thesis- Multibody Dynamics

Inte

grat

ions

to C

alcu

late

The

ta V

ecto

rs

1

Thet

a1

Sin

e W

ave2

Sin

e W

ave1

Sin

e W

ave

Sco

pe6

Sco

pe5

Sco

pe4

Sco

pe1

Thet

a1

sign

al2

Thet

a1 D

Dot

Thet

a 2

Thet

a2 D

ot

Thet

a 2

DD

ot

Thet

a 3

Thet

a3 D

ot

Thet

a 3

DD

ot

1/s

Inte

grat

or9

1/s

Inte

grat

or8

1/s

Inte

grat

or7

1/s

Inte

grat

or10

Thet

a

Got

o1

f(z)

zS

olve

f(z) =

0A

lgeb

raic

Con

stra

int5

f(z)

zS

olve

f(z) =

0A

lgeb

raic

Con

stra

int4

2

f sub

5

1

f sub

2

Thet

a 3

Thet

a 3

DD

otTh

eta3

Dot

Thet

a 2

Thet

a 2

DD

otTh

eta2

Dot

Thet

a1

Thet

a1

Thet

a1 D

Dot

83

Page 92: Thesis- Multibody Dynamics

Sig

nal G

uide

Thet

a 1

= u

[1]

Thet

a 1d

ot=

u[2]

Thet

a 1d

d=u[

3]Th

eta

2 =

u[4

]Th

eta

2dot

= u[

5]Th

eta

2dd=

u[6]

Thet

a 3

= u

[7]

Thet

a 3d

ot=

u[8]

Thet

a 3d

d=u[

9]dd

= do

uble

dot

Cal

cula

te E

quat

ion

1D

epen

dent

Set

of C

oord

inat

es

1 M

-(-M

2-c1

*u[2

]+c2

*(u[

5]-u

[2]))

Fcn7

(m1*

r1+(

m2+

m3)

*L1)

*g*s

in(u

[1])

Fcn6

-(m

3*L1

*r3)

*sin

(u[7

]-u[1

])*(u

[8])^

2Fc

n5

-(m

2*r2

+m3*

L2)*

L1*s

in(u

[4]-u

[1])*

(u[5

])^2

Fcn4

m3*

L1*r

3*co

s(u[

7]-u

[1])*

u[9]

Fcn3

(m2*

r2+m

3*L2

)*L1

*cos

(u[4

]-u[1

])*u[

6]

Fcn2

(I1+m

1*r1

^2+(

m2+

m3)

*L1^

2)*u

[3]

Fcn1

f(z)

zS

olve

f(z) =

0

Alg

ebra

ic C

onst

rain

t4

1Th

eta

84

Page 93: Thesis- Multibody Dynamics

Sig

nal G

uide

Thet

a 1

= u

[1]

Thet

a 1d

ot=

u[2]

Thet

a 1d

d=u[

3]Th

eta

2 =

u[4

]Th

eta

2dot

= u[

5]Th

eta

2dd=

u[6]

Thet

a 3

= u

[7]

Thet

a 3d

ot=

u[8]

Thet

a 3d

d=u[

9]

Cal

cula

te E

quat

ion

2D

epen

dent

Set

of C

oord

inat

es

1E

quat

ion

2

-(M

2-M

3-c2

*(u[

5]-u

[2])+

c3*(

u[8]

-u[5

]))

Fcn7

(m2*

r2+m

3*L2

)*g*

sin(

u[4]

)

Fcn6

-(m

3*L2

*r3)

*sin

(u[7

]-u[4

])*(u

[8])^

2

Fcn5

(m2*

r2+m

3*L2

)*L1

*sin

(u[4

]-u[1

])*(u

[2])^

2

Fcn4

m3*

L2*r

3*co

s(u[

7]-u

[4])*

u[9]

Fcn3

(I2+m

2*r2

^2+m

3*L2

^2)*

u[6]

Fcn2

(m2*

r2+m

3*L2

)*L1

*cos

(u[4

]-u[1

])*u[

3]

Fcn1

1Th

eta

85

Page 94: Thesis- Multibody Dynamics

Sig

nal G

uide

Thet

a 1

= u

[1]

Thet

a 1d

ot=

u[2]

Thet

a 1d

d=u[

3]Th

eta

2 =

u[4

]Th

eta

2dot

= u[

5]Th

eta

2dd=

u[6]

Thet

a 3

= u

[7]

Thet

a 3d

ot=

u[8]

Thet

a 3d

d=u[

9]dd

= do

uble

dot

Cal

cula

te E

quat

ion

3D

epen

dent

Set

of C

oord

inat

es

1E

quat

ion

3

-(M

3-c3

*(u[

8]-u

[5]))

Fcn7

m3*

r3*g

*sin

(u[7

])

Fcn6

m3*

L2*r

3*si

n(u[

7]-u

[4])*

(u[5

])^2

Fcn5

m3*

L1*r

3*si

n(u[

7]-u

[1])*

(u[2

])^2

Fcn4

(I3+m

3*r3

^2)*

u[9]

Fcn3

m3*

L2*r

3*co

s(u[

7]-u

[4])*

u[6]

Fcn2

m3*

L1*r

3*co

s(u[

7]-u

[1])*

u[3]

Fcn1

1Th

eta

86

Page 95: Thesis- Multibody Dynamics

Kin

etic

Ene

rgy

Com

paris

on

1K

E D

iffer

ence

V

KV

Q

To W

orks

pace

4

KE

Hou

ston

To W

orks

pace

2

KE

Fund

a

To W

orks

pace

1

Q

Out

1

Pot

entia

l Ene

rgy

V

Kdo

t+V

dot-Q

dot

KE

Diff

eren

ce1

K+V

-Q

abs(

u[1]

)

Fcn2

Q

Ene

rgy

Inou

t Q

du/d

t

Der

ivat

ive

Thet

aK

E H

usto

n's

Met

hod

Cal

cula

te K

E fr

om H

usto

n's

Met

hod

Thet

aK

E fu

ndam

enta

l

Cal

cula

te K

E U

sing

Dyn

amic

Fun

dam

enta

ls

1Th

eta

87

Page 96: Thesis- Multibody Dynamics

Sig

nal G

uide

Thet

a 1

= u

[1]

Thet

a 1d

ot=

u[2]

Thet

a 1d

d=u[

3]Th

eta

2 =

u[4

]Th

eta

2dot

= u[

5]Th

eta

2dd=

u[6]

Thet

a 3

= u

[7]

Thet

a 3d

ot=

u[8]

Thet

a 3d

d=u[

9]dd

= do

uble

dot

Cal

cula

te K

inet

ic E

nerg

y fr

om F

unda

men

tals

in D

ynam

ics

1K

E fu

ndam

enta

l dKE

/dtKE

m3*

L1*r

3*co

s(u[

7]-u

[1])*

u[2]

*u[8

]

Fcn6

m3*

L2*r

3*co

s(u[

7]-u

[4])*

u[5]

*u[8

]

Fcn5

(m2*

L1*r

2+m

3*L1

*L2)

*cos

(u[4

]-u[1

])*u[

2]*u

[5]

Fcn4

1/2*

(I3+m

3*r3

^2)*

(u[8

])^2

Fcn3

1/2*

(I2+m

2*r2

^2+m

3*L2

^2)*

(u[5

])^2

Fcn2

1/2*

(I1+m

1*r1

^2+m

2*L1

^2+m

3*L1

^2)*

(u[2

])^2

Fcn1

du/d

t

Der

ivat

ive

1Th

eta

88

Page 97: Thesis- Multibody Dynamics

Cal

cula

te K

inet

ic E

nerg

y fr

om L

iu a

nd H

usto

n's

Met

hod

Sig

nal G

uide

Thet

a 1

= u

[1]

Thet

a 1d

ot=

u[2]

Thet

a 1d

d=u[

3]Th

eta

2 =

u[4

]Th

eta

2dot

= u[

5]Th

eta

2dd=

u[6]

Thet

a 3

= u

[7]

Thet

a 3d

ot=

u[8]

Thet

a 3d

d=u[

9]dd

= do

uble

dot

Sig

nal G

uide

Thet

a 1

= u

[1]

Thet

a 1d

ot=

u[2]

Thet

a 1d

d=u[

3]Th

eta

2 =

u[4

]Th

eta

2dot

= u[

5]Th

eta

2dd=

u[6]

Thet

a 3

= u

[7]

Thet

a 3d

ot=

u[8]

Thet

a 3d

d=u[

9]dd

= do

uble

dot

Cal

cula

te K

inet

ic E

nerg

y fr

om L

iu a

nd H

usto

n's

Met

hod

1

KE

Hus

ton'

s M

etho

d

V1

Out

1

Sub

syst

em1

Thet

a

In2

Sub

syst

em

Pro

duct

1 s

Inte

grat

or1

[The

ta]

From

4[M

1]

From

2

(-m

2*r2

-m3*

L2)*

g*si

n(u[

4])*

u[5]

Fcn7

(-m

1*r1

-m2*

L1-m

3*L1

)*g*

sin(

u[1]

)*u[

2]

Fcn6

u[2]

Fcn1

4

(M3-

c3*(

u[8]

-u[5

]))*u

[8]

Fcn1

3

(M2-

M3-

c2*(

u[5]

-u[2

])-c3

*(u[

5]-u

[8]))

*u[5

]

Fcn1

2

(-M

2-c1

*u[2

]-c2*

(u[2

]-u[5

]))*u

[2]

Fcn1

1

-m3*

r3*g

*sin

(u[7

])*u[

8]

Fcn1

0

1

Thet

a

89

Page 98: Thesis- Multibody Dynamics

Met

hod

1

V

1 s

Inte

grat

orm

3*L1

*r3*

cos(

u[7]

-u[1

])*u[

9]*u

[2]

Fcn9

(m2*

L1*r

2+m

3*L1

*L2)

*(co

s(u[

4]-u

[1]))

*u[6

]*u[

2]

Fcn8

(M2-

M3-

c2*(

u[5]

-u[2

])+c3

*(u[

8]-u

[5])-

(m2*

r2+m

3*L2

)*g*

sin(

u[4]

))*u

[5]

Fcn5

(M3-

c3*(

u[8]

-u[5

])-m

3*r3

*g*s

in(u

[7]))

*u[8

]

Fcn4

-(m

3*L1

*r3*

sin(

u[7]

-u[1

]))*(

u[8]

)^2*

u[2]

Fcn3

-(m

2*L1

*r2+

m3*

L1*L

2)*s

in(u

[4]-u

[1])*

(u[5

])^2*

u[2]

Fcn2

(I1+m

1*r1

^2+m

2*L1

^2+m

3*L1

^2)*

u[3]

*u[2

]

Fcn1

2 In2

1

Thet

a

90

Page 99: Thesis- Multibody Dynamics

Met

hod

3

1O

ut1

Pro

duct

1

1 s

Inte

grat

or2

[The

ta]

From

3

[M1]

From

1

(M3-

c3*(

u[8]

-u[5

])-m

3*r3

*g*s

in(u

[7]))

*u[8

]

Fcn1

8

(M2-

M3-

c2*(

u[5]

-u[2

])+c3

*(u[

8]-u

[5])-

(m2*

r2+m

3*L2

)*g*

sin(

u[4]

))*u

[5]

Fcn1

7

(-M

2-c1

*u[2

]+c2

*(u[

5]-u

[2])-

(m1*

r1+m

2*L1

+m3*

L1)*

g*si

n(u[

1]))

*u[2

]

Fcn1

6

u[2]

Fcn1

5

91

Page 100: Thesis- Multibody Dynamics

Sig

nal G

uide

Thet

a 1

= u

[1]

Thet

a 1d

ot=

u[2]

Thet

a 1d

d=u[

3]Th

eta

2 =

u[4

]Th

eta

2dot

= u[

5]Th

eta

2dd=

u[6]

Thet

a 3

= u

[7]

Thet

a 3d

ot=

u[8]

Thet

a 3d

d=u[

9]dd

= do

uble

dot

Ene

rgy

Inpu

t QvT

FD p

ortio

n

mot

ion

cons

train

t por

tion=

0

F-th

eta1

F-th

eta1

*

1 Q

mot

ion

cons

trian

t por

tio

aaa2

aaa1

aaa

Q

To W

orks

pace

1

Pro

duct

1

Pro

duct

M1

1/s

Inte

grat

or7

[M1]

From

3

[The

ta]

From

2

[M1]

From

1

-(m

3*L1

*r3*

cos(

u[7]

-u[1

]))*u

[9]

Fcn9

(m2*

L1*r

2+m

3*L1

*L2)

*sin

(u[4

]-u[1

])*(u

[5])^

2

Fcn8

-(m

2*L1

*r2+

m3*

L1*L

2)*c

os(u

[4]-u

[1])*

u[6]

Fcn7

-(I1

+m1*

r1^2

+m2*

L1^2

+m3*

L1^2

)*u[

3]

Fcn6

-M2-

c1*u

[2]+

c2*(

u[5]

-u[2

])-(m

1*r1

+m2*

L1+m

3*L1

)*g*

sin(

u[1]

)

Fcn5

(M3-

c3*(

u[8]

-u[5

]))*u

[8]

Fcn4

(-M

2-c1

*u[2

]+c2

*(u[

5]-u

[2]))

*u[2

]

Fcn3

(M2-

M3-

c2*(

u[5]

-u[2

])+c3

*(u[

8]-u

[5]))

*u[5

]

Fcn2

u[2]

Fcn1

1

m3*

L1*r

3*si

n(u[

7]-u

[1])*

(u[8

])^2

Fcn1

0

u[2]

Fcn1

92

Page 101: Thesis- Multibody Dynamics

Pote

ntia

l Ene

rgy

V

1O

ut1

[The

ta]

From

2

-(L1

*cos

(u[1

])+L2

*cos

(u[4

])+L3

/2*c

os(u

[7]))

*m3*

g

Fcn4

-L1/

2*co

s(u[

1])*

m1*

g

Fcn3

-(L1

*cos

(u[1

])+L2

/2*c

os(u

[4]))

*m2*

g

Fcn2

93