50
Lagrange Approach Basilio Bona DAUIN – Politecnico di Torino Semester 1, 2016-17 B. Bona (DAUIN) Lagrange Semester 1, 2016-17 1 / 50

Lagrange Approach - PoliTO

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lagrange Approach - PoliTO

Lagrange Approach

Basilio Bona

DAUIN – Politecnico di Torino

Semester 1, 2016-17

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 1 / 50

Page 2: Lagrange Approach - PoliTO

Introduction

A multibody system is considered as a system in which the dynamicequations derive from a unifying principle.

This principle is based on the fact that, in order to describe the motion ofa system, it is sufficient to consider some scalar quantities.

These quantities were in origin called vis viva and work function, todaythey are called kinetic energy and potential energy.

Both are state functions, i.e., functions that map the value of the statevector into a scalar function.

The concept of state will be defined later; for the moment we simplyconsider that the state corresponds to the two vectors of the generalizedcoordinates q(t) and of the generalized velocities q(t).

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 2 / 50

Page 3: Lagrange Approach - PoliTO

This general principle is called the Principle of Least Action.

Let us consider the space Q of the generalized coordinates q ∈Q, assketched in Figure for a two-dimensional space Q.

A particle starts its motion at time t1 in Q1 = q(t1) and ends it motion attime t2 reaching the state Q2 = q(t2) (or vice-versa, since time can bereversed).

Assume that the motion keeps constant the total energy, i.e., the sumE = K +P of the kinetic energy K and the potential energy P that theparticle has at time t1.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 3 / 50

Page 4: Lagrange Approach - PoliTO

Q1 and Q2 are connected by a continuous path (trajectory) called truetrajectory , that is unknown, since it is what we want to compute as theresult of the dynamical equation analysis.

If we choose at random different trajectories, with the only condition thatthe two boundary points remain the same (perturbed trajectories), thechance to obtain exactly the true trajectory will be very small.

What characterizes the true trajectory with respect to all possible otherperturbed trajectories?

Euler contributed to the solution of this problem, but Lagrange developeda complete theory, that was later extended by Hamilton.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 4 / 50

Page 5: Lagrange Approach - PoliTO

The true trajectory is the one that minimizes the integral of the vis-viva(i.e., twice the kinetic energy) of the entire motion between Q1 and Q2.

This integral is called action and has a constant and well defined value foreach perturbed trajectory having constant total energy E (E depends onlyon the initial state).

The least action principle states that the nature “chooses”, among theinfinite number of trajectories starting in q(t1) and ending in q(t2), thetrajectory that minimizes the definite integral

S =∫ t2

t1K ∗(q(t), q(t))dt

of a particular state function K ∗(q(t), q(t)).

The integral between the initial time t1 and the final time t2 must obey tothe boundary constraints in the two time instants.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 5 / 50

Page 6: Lagrange Approach - PoliTO

The scalar quantity S is the integral of a function and is called afunctional.

A functional is a mapping between a function and a real number; thefunction shall be considered as a whole, i.e., not a single particular value;in this sense a functional is often the integral of the function.

The minimization of a functional is based on a particular mathematicaltechnique, called calculus of variations.

The conditions that guarantee the minimization of S provide a set ofdifferential equations that contain the first and second time derivatives ofthe qi (t); this set of equations completely describes the systemdynamics.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 6 / 50

Page 7: Lagrange Approach - PoliTO

These differential equations specify the evolution of a physical quantityas the result of infinitesimal increments of time or position; summing upthis infinitesimal variations we obtain the physical variables at everyinstant, knowing only their initial value and possibly some initial derivative:we can say that the motion has a local representation.

The action characterizes the motion dynamics requiring only theknowledge of the states at the initial and final times; every intermediatevalue of the variables can be determined by the minimization of the action,that is a global, rather than a local, measure.

The Lagrange approach is based on the definition of two scalar quantities,namely

the total kinetic co-energy K ∗ and the total potential energy P

associated with the body.

The reason for using the term co-energy instead of the term energy , willbe clarified later.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 7 / 50

Page 8: Lagrange Approach - PoliTO

Lagrangian approach

The Lagrange method allows to define a set of Lagrange equations, thathave some advantages with respect to the vector equations provided bythe Newton-Euler approach.

The approach provides n second-order scalar differential equations,directly expressed in the generalized coordinates qi (t) e qi (t).

If holonomic constraint are present, the constraint forces do notappear in the equations.

The kinetic co-energies and the potential energies are independent ofthe reference frame used to represent the body motion.

The kinetic co-energies and the potential energies are additive scalars:in a multi-body system the total energies/co-energies are the sum ofeach energy/co-energy component.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 8 / 50

Page 9: Lagrange Approach - PoliTO

Linear and angular momenta

Linear momentum hL is the physical vector defined as the product of abody mass M for its linear velocity v (the center-of-mass velocity)

hL(t) = Mv(t)

In non-relativistic mechanics the mass M of a body is constant (except forsome particular cases, as rockets consuming fuel, etc.)

Angular momentum hA (also called moment of momentum or rotationalmomentum) is the physical vector defined as the product of a bodyrotational inertia Γ for its rotational velocity ω

hA(t) = Γ(t)ω(t)

While the mass of a body is usually constant, the inertia matrix (or inertiatensor) Γ may vary in time.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 9 / 50

Page 10: Lagrange Approach - PoliTO

Kinetic energy and co-energy for single point-mass

The mechanical kinetic energy associated to a point-mass m is definedas the work necessary to increase the linear or angular momentum from 0to h, i.e.,

K (h) =∫ h

0dW

The infinitesimal work associated to the mass is given by

dW = f ·dx + τ ·dα

where the symbol · indicates the scalar product, and f is the resultant ofthe applied linear forces on the mass, dx is the infinitesimal lineardisplacement increment, τ is the resultant of the applied angular torques,and dα is the infinitesimal angular displacement increment. Moreover

f =dhL

dtτ =

dhA

dt

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 10 / 50

Page 11: Lagrange Approach - PoliTO

The resulting infinitesimal work is therefore the sum of two terms

dW = dWL + dWA =dhL

dt·dx +

dhA

dt·dα = v ·dhL + ω ·dhA

and we can write

K (h) =∫ h

0v ·dhL + ω ·dhA

The kinetic energy is a scalar state function associated to the particlestates (v,ω) and (hL,hA).

Another state function associated to the point-mass, called mechanicalkinetic co-energy, is defined as

K ∗(v) =∫ v

0hL ·dv + hL ·dω

As shown in Figure, between the mechanical energy and the co-energy arelation exists

K ∗(v) = h ·v−K (h)

(for notational simplicity, only the linear velocity is considered)

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 11 / 50

Page 12: Lagrange Approach - PoliTO

Figure: This relation is an example of the Legendre transformation

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 12 / 50

Page 13: Lagrange Approach - PoliTO

In particular, if the mass particle is moving at a velocity significantlysmaller that the speed of light c , i.e., it is not a relativistic mass, therelation is h = mv with m constant, and the two “energies” become

K (h) =∫ h

0

1

mh ·dh =

1

2mh ·h =

1

2m‖h‖2

K ∗(v) =∫ v

0mv ·dv =

1

2mv ·v =

1

2m‖v‖2

As one can see, in this case the kinetic energy and co-energy are the samesince ‖h‖2 = m2 ‖v‖2

This does not happen for relativistic masses where m = m(v(t)).

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 13 / 50

Page 14: Lagrange Approach - PoliTO

In an extended body composed by N masses mi the kinetic co-energy isthe sum of the kinetic co-energy of each mass

K ∗(v) =1

2

N

∑i=1

mivi ·vi

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 14 / 50

Page 15: Lagrange Approach - PoliTO

We consider the velocity v0i = x0i with respect to R0.

Each velocity i in R0 can be computed from the general relation

x0i (t) = ω001(t)×ρ

0i (t) + R0

1x1i (t) + d01(t) = ω

001(t)×ρ

0(t) + d01(t)

where the term R01xi (t) is zero, since the point-masses are fixed with

respect to the body-frame, i.e., x1i (t) = 0.

Now we consider a purely translatory motion and then a purely rotationalmotion.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 15 / 50

Page 16: Lagrange Approach - PoliTO

Translational motion

If the motion is purely translational all point masses have the same linearvelocity v0 with respect to R0

x0i (t) = d01(t)≡ v0(t) ∀i

then

K ∗ =1

2v0 ·v0

N

∑i=1

mi =1

2mtot v0 ·v0 =

1

2mtot

∥∥v0∥∥2 =

1

2(v0)T(mtotI)v0

where the mass mtot is the total body mass.

The kinetic co-energy is equivalent to that of one particle with total massmtot with the translational velocity v0.

The total mass mtot can be ideally concentrated in the bodycenter-of-mass C , whose position is xc

xcmtot = ∑i

ximi → xc =1

mtot∑i

ximi

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 16 / 50

Page 17: Lagrange Approach - PoliTO

Since the velocity is equal for all points of the body, v0 is also the velocityof the center-of-mass C ; if we use the symbol v0c ≡ v0 for this velocity, wecan write

K ∗ =1

2mtot v0c ·v0c =

1

2mtot

∥∥v0c∥∥2 =

1

2(v0c)T(mtotI)v0c

that gives the usual rule: “the kinetic energy is half the product of thetotal mass for the total velocity squared.”

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 17 / 50

Page 18: Lagrange Approach - PoliTO

Rotational motion

If the motion is purely rotational , then

x0i (t) = ω001(t)×xbi i.e., vi = ω

0×xi

where ω001 ≡ ω0 is the total angular velocity and xi is the position of the

i-th mass in R0.

Considering all masses

K ∗ =1

2

N

∑i=1

mi (ω0×xi ) · (ω

0×xi )

sincea · (b×c) = b · (c×a)

and assuminga≡ (ω

0×xi ), b≡ ω0, c≡ xi

we obtain

K ∗ =1

2

N

∑i=1

miω0 ·xi × (ω

0×xi ) =1

0 ·

(N

∑i=1

mixi × (ω0×xi )

)B. Bona (DAUIN) Lagrange Semester 1, 2016-17 18 / 50

Page 19: Lagrange Approach - PoliTO

The previous relation is equivalent to

K ∗ =1

0 ·

(N

∑i=1

hi

)=

1

0 ·h0

where h0 is the total angular momentum with respect to the origin O ofthe reference frame R0.

Since h0 = Γ0ω0, we have

K ∗ =1

2(ω

0)TΓ0ω0

Notice the similarity:

K ∗trasl =

1

2(v0c)T(mtotI)v0c pure translation

K ∗rot =

1

2(ω0)TΓ0ω0 pure rotation

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 19 / 50

Page 20: Lagrange Approach - PoliTO

Total kinetic co-energy

Therefore, the total kinetic co-energy is

K ∗ = K ∗trasl +K ∗

rot =1

2

{(v0c)T(mtotI)v0c + (ω

0)TΓ0ω0}

This is a well known result, that can be expressed in words as:

the total kinetic co-energy of a body is the sum of the translationalkinetic co-energy of the center of mass plus the rotational kinetic

co-energy around the center of mass.

This relation is valid also for extended bodies.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 20 / 50

Page 21: Lagrange Approach - PoliTO

Generalized coordinates

Considering the generalized coordinates q(t) and velocities q(t) and theJacobians

vc = JL(q)q or ω = JA(q)q

we obtain

K ∗(q,q) =1

2

[qTJTL (mI)JLq + qTJTAΓcJAq

]and

K ∗(q,q) =1

2qT[JTL (mI)JL + JTAΓcJA

]q =

1

2qTΓtotq

where

Γtot = JTL (mI)JL + JTAΓcJA

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 21 / 50

Page 22: Lagrange Approach - PoliTO

Potential energy

Potential energy is a form of energy that depends only on position; twotypes of position-related energies exist.

One is due to the gravitational field,

the other is the energy stored in the elastic components of thebody, that accumulate energy under the effects of deformation.

Since in our approach the considered bodied are rigid, the elastic parts areexternal to the bodies and are represented by ideal springs that connectvarious parts of the mechanical system.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 22 / 50

Page 23: Lagrange Approach - PoliTO

A potential function P(x), is a scalar function that depends only on the

position x =[x y z

]TA force f is said to be conservative when it is the negative gradient ofP(r)

f(x) =−∇P(x) =−[

∂P(x)

∂x

∂P(x)

∂y

∂P(x)

∂z

]TIf a potential function exists, it is called potential energy of the systemand it is unique apart from an additive constant.

This implies that the effects on the body dynamics depend only from thepotential energy variation, and not on its absolute value.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 23 / 50

Page 24: Lagrange Approach - PoliTO

Gravitational energy

An example of conservative force field is the gravitational field around theEarth. The potential field produces the so-called weight forces.

The potential energy due to a gravitational field and associated to ageneric mass m is given by the following relation:

Pg =−mg ·x0c

where g is the local gravitational acceleration vector and x0c is the bodycenter-of-mass position vector with respect to a plane going through theorigin of R0 and orthogonal to g, that provides the conventional zero valueof potential energy (zero potential energy plane) as shown in Figure.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 24 / 50

Page 25: Lagrange Approach - PoliTO

Figure: The potential energy due to the gravitational field.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 25 / 50

Page 26: Lagrange Approach - PoliTO

Elastic energy

Another force field is related to potential energy, that due to elasticelements: these elements represent the abstract model of a proportionalrelation between displacement and force.

If we assume a one-dimensional linear spring, the relation between theapplied force f and the linear elongation e from the rest position of thespring is

f = kee

If we assume a one-dimensional torsional or torsion spring we can write arelation between the applied torque τ and the resulting angulardeformation δ from the rest position of the spring

τ = k ′eδ

ke and k ′e are the so-called elastic constants of the springs.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 26 / 50

Page 27: Lagrange Approach - PoliTO

Figure: A one dimensional linear spring. The rest length of the spring is x0, and eis the extension/compression occurring when the force f is applied.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 27 / 50

Page 28: Lagrange Approach - PoliTO

The potential energy is the integral of the virtual work performed by thespring deformation

P(e) =∫ e

0f ·de or P(δ ) =

∫δ

0τ ·dδ

We can define also in this case the potential co-energies, that are

P∗(f) =∫ f

0e ·df or P∗(τ) =

∫τ

0δ ·dτ

the relation between P∗(f) and P(e) is is given by the Legendretransformation

P∗(f) = f ·e−P(e)

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 28 / 50

Page 29: Lagrange Approach - PoliTO

A nonlinear spring: the relation between f(t) and e is nonlinear, but therelation f ·e = P(e) +P∗(f) holds.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 29 / 50

Page 30: Lagrange Approach - PoliTO

When the elastic elements are linear with constant ke , the potential energyand co-energy are given by

P(e) =1

2eT(keI)e =

1

2ke ‖e‖2

and

P∗(f) =1

2fT(keI)−1f =

1

2ke‖f‖2

When torsion springs with constant k ′e are considered, the potential energyand co-energy are given by

P(δ ) =1

2δT(k ′eI)δ =

1

2k ′e ‖δ‖

2

and

P∗(τ) =1

2τT(k ′eI)−1τ =

1

2k ′e‖τ‖2

In linear case, energies and co-energies are equal

P(e) = P∗(f) and P(δ ) = P∗(τ)

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 30 / 50

Page 31: Lagrange Approach - PoliTO

If the elastic constants are different along the three directions, a moregeneral relation applies

P(e) =1

2eTKee; P∗(f) =

1

2fTK−1e f

and

P(δ ) =1

2δTK′eδ ; P∗(τ) =

1

2τT(K′e)−1τ

where Ke = diag(ke1,ke2,ke3) e K′e = diag(k ′e1,k′e2,k

′e3) are the elastic

constant matrices along the three dimensional axes.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 31 / 50

Page 32: Lagrange Approach - PoliTO

Generalized forces in holonomic systems

The forces f i acting on the i-th mass can be classified according to threegroups:

N ′′′ constraint forces fvi due to constraint reactions.

N ′′ conservative forces fci due to conservative fields.

N ′ non conservative forces fnci .

The total force is the sum of these three types of forces

f =N ′

∑i=1

fnci +N ′′

∑i=1

fci +N ′′′

∑i=1

fvi

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 32 / 50

Page 33: Lagrange Approach - PoliTO

Constraint forces

The virtual displacements δxi are always tangent to the constraints, whilethe constraint forces fvi are always orthogonal to the constraints; from thisassumption it follows that

fvi ·δxi = 0

Therefore the work done by the constraint forces is zero (the forces “donot work”)

δW v =N ′′′

∑i=1

fvi ·δxi = 0.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 33 / 50

Page 34: Lagrange Approach - PoliTO

Conservative forces

The N ′′ conservative forces do a work that results

δW c =N ′′

∑i=1

fci ·δxi =−N ′′

∑i=1

∇Pi ·δxi =

−N ′′

∑i=1

∇Pi ·

[n

∑j=1

∂xi∂qj

δqj

]=

n

∑j=1

[N ′′

∑i=1

−∇Pi ·∂xi∂qj

]︸ ︷︷ ︸

F cj

δqj

This last expression highlights the so called generalized conservativeforces F c

j

The virtual work can be expressed as a function of the generalizedcoordinates qj :

δW c =N ′′

∑i=1

fci ·δxi =n

∑j=1

F cj δqj = F c ·δq

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 34 / 50

Page 35: Lagrange Approach - PoliTO

Non conservative forces

The N ′ non conservative forces fnci do a work equal to

δW nc =N ′

∑i=1

fnci ·δxi =N ′

∑i=1

fnci ·

[n

∑j=1

∂xi∂qj

δqj

]=

n

∑j=1

[N ′

∑i=1

fnci ·∂xi∂qj

]︸ ︷︷ ︸

F ncj

δqj

This last expression highlights the so called generalized nonconservative forces F nc

j and allows to transform the virtual work from afunction of the positions x to a function of the generalized coordinates qj :

δW nc =N ′′

∑i=1

fnci ·δxi =n

∑j=1

F ncj δqj = F nc ·δq

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 35 / 50

Page 36: Lagrange Approach - PoliTO

In conclusion, only two types of forces will do work in a system subject toholonomic constraints

the j-th generalized conservative forces:

F cj (q) =−

N ′′

∑i=1

∇Pi ·∂xi∂qj

the j-th generalized non conservative forces:

F ncj (q) =

N ′

∑i=1

fnci ·∂xi∂qj

The generalized force, being the result of a scalar product, will be itself ascalar quantity.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 36 / 50

Page 37: Lagrange Approach - PoliTO

In case of torques acting on the system, the generalized forces due to themwill give origin to the following generalized torques

T cj =

N ′′

∑i=1

−∇Pi ·∂α i

∂qj; T nc

j =N ′

∑i=1

τnci ·

∂α i

∂qj

The symbol used to identify both the generalized forces and thegeneralized torques will be F .

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 37 / 50

Page 38: Lagrange Approach - PoliTO

Lagrange equations with holonomic constraints

In a multi-body system subject to holonomic constraints, the formulationof the Lagrange equations may take different forms.

From the knowledge of the total co-energy of the system

K ∗(q, q) =N

∑`=1

K ∗` (q, q)

one derives the Lagrange equations: they are a set of n equations (one foreach generalized coordinates qi ) defined as

ddt

(∂K ∗

∂ qi

)− ∂K ∗

∂qi= Fi i = 1, . . . ,n

where Fi = F ci +F nc

i is the i-th generalized force, with a positive sign ifapplied by the external environment to the body, or a negative sign ifapplied by the body to the external environment.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 38 / 50

Page 39: Lagrange Approach - PoliTO

Since the conservative forces due to the gravitational field are the negativeof the gradient of the potential, we can move to the left hand part of theequation, resulting in

ddt

(∂K ∗

∂ qi

)− ∂K ∗

∂qi+

[N ′

∑k=1

∇Pk ·∂xk∂qi

]= F nc

i

The term inside the square bracket is equal to∂P

∂qi; therefore

ddt

(∂K ∗

∂ qi

)−(

∂K ∗

∂qi− ∂P

∂qi

)= F nc

i

Moreover P does not depend on qi , so one can write

∂P

∂ qi= 0

and one obtains the most common form of the Lagrange equations

ddt

(∂K ∗

∂ qi− ∂P

∂ qi

)−(

∂K ∗

∂qi− ∂P

∂qi

)= F nc

i i = 1, . . . ,n

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 39 / 50

Page 40: Lagrange Approach - PoliTO

Lagrange state function

The Lagrange (state) function L is defined as the difference betweenthe total kinetic co-energy K ∗ and the total potential energy P of hesystem

L (q, q) = K ∗(q, q)−P(q)

We can write n differential equations

ddt

(∂L (q, q)

∂ qi

)− ∂L (q, q)

∂qi= F nc

i (q) i = 1, . . . ,n

each one relative to the i-th generalized coordinate

The term∂L

∂ qiis the generalized momentum and is usually indicated by

the symbol µi ; the vector of generalized momenta is indicated by µ(q(t)).

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 40 / 50

Page 41: Lagrange Approach - PoliTO

Dissipative and friction forces

The friction phenomena involve energy dissipated by the body as heat;they are due to complex interaction between solid/solid or solid/fluidsurfaces; tribology is the science that studies the friction forces.

If we keep the friction or other dissipative forces f frici separate from theother non conservative forces, the Lagrange equation becomes:

ddt

(∂L

∂ qi

)− ∂L

∂qi= Fi − f frici

We can approximately describe the friction force f frici as a nonlinearfunction of the relative velocity v between the two contact surfaces of theinvolved bodies.

We can model the total friction force as in Figure and write

f frictotal = f fricstiction + f friccoulomb + f fricviscous

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 41 / 50

Page 42: Lagrange Approach - PoliTO

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 42 / 50

Page 43: Lagrange Approach - PoliTO

While stiction and Coulomb friction must be explicitly introduced asnon-conservative forces, it is a common assumption to express the viscousdissipative phenomenon as the derivative of a dissipation function, alsocalled Rayleigh function, given by:

Di (q) =1

2qT(βi I)q =

1

2βi ‖q‖2

where the coefficient βi is the viscous friction coefficient, and ‖q‖ is thenorm of the relative velocity between the moving body and the surfaceresponsible of the viscous friction effect.

This quadratic expression is NOT a dissipation “energy”, but only aconventional way to introduce it in the Lagrange equation, as follows

ddt

(∂L

∂ qi

)− ∂L

∂qi+

∂Di

∂ qi= Fi i = 1, . . . ,n

Now the term Fi includes only the remaining non conservative forces

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 43 / 50

Page 44: Lagrange Approach - PoliTO

Summary

Find the k = 1, . . . ,N rigid bodies composing the system and computethe n degrees-of-freedom.If necessary, define the various body frames Rk

Define a set of complete and independent generalized coordinatesqi (t), i = 1, . . . ,n ≤ 6NCompute the position vectors of each center-of massxk(q(t)),k = 1, . . . ,NCompute the linear velocity vectors of each center-of massvc,k(q(t), q(t)) and the angular velocities vectors ωk(q(t), q(t)) ofeach body

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 44 / 50

Page 45: Lagrange Approach - PoliTO

Energy computation

Compute the kinetic co-energy K ∗k of each k-th rigid body with mass

mk and inertia matrix (wrt the center-of-mass) Γk as

K ∗k =

1

2mk

∥∥vc,k∥∥2 +

1

Tk Γkωk

Set the local gravity acceleration vector g and represent it in R0

Localize the Ne elastic energy storage elements and model them with“ideal springs” with elastic constants k`, ` = 1, . . . ,Ne

Compute the gravitational potential energy Pg ,k and the elasticenergy Pe,` as

Pg ,k =−mkgTpk Pe,` =1

2k` ‖e‖2

where e is the elongation (positive or negative) of the spring.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 45 / 50

Page 46: Lagrange Approach - PoliTO

Lagrangian function

Compute the total energies

K ∗(q, q) =N

∑k=1

K ∗k P(q) =

N

∑k=1

Pg ,k +Ne

∑`=1

Pe,`

Compute the Lagrange function of the system L = K ∗−P

Compute the generalized forces Fi

Write the n Lagrange equations

ddt

(∂L

∂ qi

)− ∂L

∂qi= Fi i = 1, . . . ,n

i.e.,ddt

(∂K ∗

∂ qi

)− ∂K ∗

∂qi+

∂P

∂qi= Fi i = 1, . . . ,n

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 46 / 50

Page 47: Lagrange Approach - PoliTO

Lagrange equations

If there are linear dissipative elements, model them with a lineardashpot, having friction coefficient βi .

Compute the dissipative function Di =1

2βi

∥∥vf ,i∥∥2, where vf ,i is the

velocity associated to the friction producing element.

Upgrade the Lagrange equations as follows

ddt

(∂K ∗

∂ qi

)− ∂K ∗

∂qi+

∂P

∂qi+

∂D

∂ qi= Fi i = 1, . . . ,n

When nonlinear elastic or friction elements are present, one should directlyintroduce the resulting nonlinear elastic or friction forces at the secondterm of the Lagrange equations.

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 47 / 50

Page 48: Lagrange Approach - PoliTO

Characterization of the Lagrange equations

The Lagrange approach generates n differential equations

ddt

(∂L

∂ qi

)− ∂L

∂qi= Fi i = 1, . . . ,n

Collecting the n equations in one vector equation one obtains

ddt

(∂L

∂ q

)− ∂L

∂q+

∂D

∂ q= F

If the equations are linear (or if we consider small perturbations aroundsome equilibrium point), we will have a general formulation expressed as asecond order differential vector equation

A1q(t) + A2q(t) + A3q(t) = F

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 48 / 50

Page 49: Lagrange Approach - PoliTO

The linear equations can be rewritten as

Mq(t) + (D + G)q(t) + (K + H)q(t) = F

where

M = MT is the mass or inertia matrixpositive definite, symmetric

D = DT is the viscous damping matrixsymmetric

G =−GT is the gyroscopic matrixskew-symmetric

K = KT is the stiffness (elasticity) matrixsymmetric

H =−HT is the circulatory matrix (constrained damping)skew-symmetric

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 49 / 50

Page 50: Lagrange Approach - PoliTO

Lagrangian systems are holonomic systems where the forces are solelydue to generalized potential functions P(q, q),

Hamiltonian systems are those where the kinetic co-energy and thepotential energy explicitly depend on time

K ∗ = K ∗(q, q, t) and P = P(q, q, t)

... or, if you prefer the Wikipedia definition ...

A Lagrangian system is a pair (Y ,L ) of a smooth fiber bundle Y → Xand a Lagrangian density L which yields the Euler–Lagrange differentialoperator acting on sections of Y → X .

B. Bona (DAUIN) Lagrange Semester 1, 2016-17 50 / 50