lecture 2. a day of principles the principle of virtual work d’alembert’s principle hamilton’s...

39
Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the end)

Upload: devyn-meggitt

Post on 15-Dec-2015

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

1

Lecture 2. A Day of Principles

The principle of virtual work

d’Alembert’s principle

Hamilton’s principle

(with an example that applies ‘em all at the end)

Page 2: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

2

Principle of virtual work says the work done by a virtual displacement from an equilibrium position must be zero.

δW = fi ⋅δri

i=1

N

∑ = 0

This can be used in statics to find forcesWe need to move this up to dynamics

d’Alembert’s principle says that

−ma = −m˙ v can be treated as an

inertial force

Page 3: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

3

Combine these

δW = fi − m˙ v i( ) ⋅δri

i=1

N

∑ = 0

We eliminated internal forces last time, so the fs are external

We suppose we know them, and since the displacement is tinythey don’t change during the virtual displacement

Page 4: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

4

The virtual displacements, if unconstrained, can be written

δri = δxi + δyj + δzk

What I’d like to do is gather all of this up into what I’ll call configuration space

q = x1 y1 z1 x2 y2 z2 L xK yK zK{ }T

The dimension of q is N = 3K

Page 5: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

5

That’s just an example of a configuration space.We’ll see more as we go along.

The general rule, which we’ll investigate as we go along,there are (at least) as many qs as there are degrees of freedom.

We’ll take up the matter of constraints — relations among the qs —later

Bottom line: we can write the rs in terms of the qs.

Page 6: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

6

m1 m2

y1 y2

k1 k2k3

Simple example of possible qs

q =y1

y2

⎧ ⎨ ⎩

⎫ ⎬ ⎭

, y1 + y2

y1 − y2

⎧ ⎨ ⎩

⎫ ⎬ ⎭

Page 7: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

7

Each r can depend on all the qs.

δri =∂ri

∂qkδqk

i=1

N= 3K

∑ =∂ri

∂qkδqk

repeatedindices

δW = fi − m˙ v i( ) ⋅∂ri

∂qkδqk

i=1

N

∑ = 0

summation convention does not apply to i in this formula

Page 8: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

8

fi ⋅∂ri

∂qkδqk

i=1

N

∑ = m˙ v i ⋅∂ri

∂qkδqk

i=1

N

Let’s do some rearranging

fi ⋅∂ri

∂qki=1

N

∑ ⎛

⎝ ⎜

⎠ ⎟δqk = m˙ v i ⋅

∂ri

∂qki=1

N

∑ ⎛

⎝ ⎜

⎠ ⎟δqk

Define the generalized force

Qk = fi ⋅∂ri

∂qki=1

N

∑ ⎛

⎝ ⎜

⎠ ⎟

This force goes with the kth generalized coordinate

Page 9: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

9

m˙ v i ⋅∂ri

∂qki=1

N

∑ ⎛

⎝ ⎜

⎠ ⎟δqk = Qkδqk

The left hand side looks a lot like a momentum changedotted into something. If you like manipulations

you’ll LOVE what comes next

First a bit of what I call “integration by parts”

d

dtfg( ) = ˙ f g + f˙ g ⇒ ˙ f g =

d

dtfg( ) − f ˙ g

This is a useful trick in deriving things

Page 10: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

10

mi ˙ v i ⋅∂ri

∂qk= mi

d

dtvi ⋅

∂ri

∂qk

⎝ ⎜

⎠ ⎟− mivi ⋅

d

dt

∂ri

∂qk

⎝ ⎜

⎠ ⎟

˙ q j is not a function of

qk

d

dt

∂ri

∂qk

⎝ ⎜

⎠ ⎟=

∂q j

∂ri

∂qk

⎝ ⎜

⎠ ⎟˙ q j

∂∂q j

∂ri

∂qk

⎝ ⎜

⎠ ⎟˙ q j =

∂qk

∂ri

∂q j

⎝ ⎜

⎠ ⎟˙ q j

∂∂qk

∂ri

∂q j

⎝ ⎜

⎠ ⎟˙ q j =

∂qk

∂ri

∂q j˙ q j

⎝ ⎜

⎠ ⎟

∂∂qk

∂ri

∂q j˙ q j

⎝ ⎜

⎠ ⎟=

∂qk˙ r i( ) =

∂vi

∂qk

d

dt( ) =

∂q j ( ) ˙ q j ⇒

Page 11: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

11

mi ˙ v i ⋅∂ri

∂qk= mi

d

dtvi ⋅

∂ri

∂qk

⎝ ⎜

⎠ ⎟− mivi ⋅

∂q j

∂ri

∂qk

⎝ ⎜

⎠ ⎟˙ q j

mi ˙ v i ⋅∂ri

∂qk= mi

d

dtvi ⋅

∂ri

∂qk

⎝ ⎜

⎠ ⎟− mivi ⋅

∂vi

∂qk

so

turns into

We still aren’t done. The second term on the right is cool

mivi ⋅∂vi

∂qk =∂

∂qk

1

2mivi ⋅vi

⎝ ⎜

⎠ ⎟=

∂Ti

∂qk

but we need to play with the first term

Page 12: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

12

mi

d

dtvi ⋅

∂ri

∂qk

⎝ ⎜

⎠ ⎟

vi =∂ri

∂q j˙ q j ⇒

∂vi

∂˙ q j=

∂ri

∂q j

so

mi

d

dtvi ⋅

∂vi

∂˙ q k ⎛

⎝ ⎜

⎠ ⎟=

d

dt

∂ ˙ q k1

2mivi ⋅vi

⎝ ⎜

⎠ ⎟

⎝ ⎜

⎠ ⎟=

d

dt

∂˙ q kTi( )

⎝ ⎜

⎠ ⎟

sort of a trick

Page 13: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

13

m˙ v i ⋅∂ri

∂qki=1

N

∑ ⎛

⎝ ⎜

⎠ ⎟δqk = Qkδqk

turns into

d

dt

∂T

∂˙ q k ⎛

⎝ ⎜

⎠ ⎟−

∂T

∂qk− Qk

⎝ ⎜

⎠ ⎟δqk = 0

Remember that there is a sum on k here!

I can split Qk into two pieces: the potential and nonpotential parts

Qk = −∂V

∂qk+ QNP( )k

so

Page 14: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

14

d

dt

∂T

∂˙ q k ⎛

⎝ ⎜

⎠ ⎟−

∂T

∂qk+

∂V

∂qk− QNP( )k

⎝ ⎜

⎠ ⎟δqk = 0

V = V qk( )⇒

∂V

∂˙ q k= 0For our purposes

d

dt

∂ T −V( )∂ ˙ q k

⎝ ⎜

⎠ ⎟−

∂ T −V( )∂qk

− QNP( )k

⎝ ⎜

⎠ ⎟δqk = 0

d

dt

∂ T −V( )∂ ˙ q k

⎝ ⎜

⎠ ⎟−

∂ T −V( )∂qk

⎝ ⎜

⎠ ⎟δqk = QNP( )k

δqk

Page 15: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

15

d

dt

∂L

∂˙ q k ⎛

⎝ ⎜

⎠ ⎟−

∂L

∂qk

⎝ ⎜

⎠ ⎟δqk = Qkδqk

The Lagrangian

L = T −V

If the qk are independent, then we have the Euler-Lagrange equations

From here on in Qk will be understood to be the nonpotential generalized forcesWe’ll have an algorithm for the calculation later.

d

dt

∂L

∂˙ q k ⎛

⎝ ⎜

⎠ ⎟−

∂L

∂qk

⎝ ⎜

⎠ ⎟= Qk

Page 16: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

16

What did we do and what did we assume?

Principle of virtual work

d’Alembert’s principle (inertial forces)

Independence of the generalized coordinates

We will spend a lot of time dealing with cases where the qs are not independent. . . . . but not today . . .

All the rest was clever manipulation

Page 17: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

17

??

Page 18: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

18

Hamilton’s Principle

This is a formalism that leads to the Euler-Lagrange equationsand it will help us when we need to consider constraints

(relations between the dqs).

This is generally posed in terms of the Lagrangianbut that eliminates the generalized forces

which I’d like to include

Let me define

L* = T + W

where W denotes the work, potential and nonpotential

Page 19: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

19

We write the action integral

I = L * qk, ˙ q k, t( )dtt1

t2∫

The action integral depends on the path between the two end points.

Page 20: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

20

Hamilton’s principle statesThe actual path will be the path that minimizes the action integral.

Suppose that

qk = qk η( ), qk 0( ) = q0k where the zero denotes the desired path

I η( ) = L * qk η , t( ), ˙ q k η , t( ), t( )dtt1

t2∫

dI η( )dη

= 0 =∂L *

∂qk

∂qk

∂η+

∂L *

∂˙ q k∂˙ q k

∂η

⎝ ⎜

⎠ ⎟dt

t1

t2∫

The first piece is fine; we need to play with the second.

Page 21: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

21

∂L *

∂˙ q k∂˙ q k

∂η

⎝ ⎜

⎠ ⎟dt

t1

t2∫ =∂L *

∂˙ q kd

dt

∂qk

∂η

⎝ ⎜

⎠ ⎟

⎝ ⎜

⎠ ⎟dt

t1

t2∫

∂L *

∂˙ q kd

dt

∂qk

∂η

⎝ ⎜

⎠ ⎟

⎝ ⎜

⎠ ⎟dt

t1

t2∫ =d

dt

∂L *

∂˙ q k∂qk

∂η

⎝ ⎜

⎠ ⎟−

d

dt

∂L *

∂˙ q k ⎛

⎝ ⎜

⎠ ⎟∂qk

∂η

⎝ ⎜

⎠ ⎟dt

t1

t2∫

I can integrate the first part. All the paths hit the end points, and the integral is zero.

∂qk

∂η= δqk → 0

I do my integration by parts trick again

qk = q0k +

∂qk

∂ηη = 0

⎝ ⎜ ⎜

⎠ ⎟ ⎟η +L

Page 22: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

22

so I have

dI η( )dη

= 0 =∂L *

∂qk−

d

dt

∂L *

∂˙ q k ⎛

⎝ ⎜

⎠ ⎟

⎝ ⎜

⎠ ⎟∂qk

∂ηdt

t1

t2∫ =∂L *

∂qk−

d

dt

∂L *

∂˙ q k ⎛

⎝ ⎜

⎠ ⎟

⎝ ⎜

⎠ ⎟δqkdt

t1

t2∫

and this gives us the Euler-Lagrange equations

No matter how we look at it, we have a governing system

d

dt

∂L

∂˙ q k ⎛

⎝ ⎜

⎠ ⎟−

∂L

∂qk

⎝ ⎜

⎠ ⎟δqk = Qkδqk

Page 23: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

23

from a governing integral

Qk +∂L

∂qk−

d

dt

∂L

∂˙ q k ⎛

⎝ ⎜

⎠ ⎟

⎝ ⎜

⎠ ⎟δqkdt

t1

t2∫

We get the Euler-Lagrange equations if the dqk are independent

We will have issues regarding independenceand solutions for them.

We will have issues regarding the generalized forcesand we’ll develop techniques for finding them.

Page 24: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

24

??

Page 25: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

25

A special kind of friction: “viscous” friction, damper/dashpot

y€

friction force = −c˙ y

damping constant

Page 26: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

26

We can get the force by differentiating something called the Rayleigh dissipation function

F =1

2ν ij ˙ q i ˙ q j

The (unconstrained) Euler-Lagrange equations become

d

dt

∂L

∂˙ q k ⎛

⎝ ⎜

⎠ ⎟+

∂F

∂˙ q k−

∂L

∂qk= Qk

where Qk no longer includes the friction forces

note double summationthe coefficients are the most generalthey will usually be much simpler

Page 27: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

27

I’d like to put all this together in some sort of procedure.

??

We can look at some mechanical systems that can be viewed as collections of point masses

OK. Away we go . . .

Page 28: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

28

The Euler-Lagrange process

1. Find T and V as easily as you can

2. Apply geometric constraints to get to N coordinates

3. Assign generalized coordinates

4. Define the Lagrangian

Page 29: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

29

5. Differentiate the Lagrangian with respect to the derivative of the first generalized coordinate

6. Differentiate that result with respect to time

7. Differentiate the Lagrangian with respect to the same generalized coordinate

8. Subtract that and set the result equal to Q1

∂L

∂˙ q 1

d

dt

∂L

∂˙ q 1 ⎛

⎝ ⎜

⎠ ⎟

∂L

∂q1

d

dt

∂L

∂˙ q 1 ⎛

⎝ ⎜

⎠ ⎟−

∂L

∂q1= Q1

Repeat until you have done all the coordinates

Page 30: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

30

M

y1, f1

OVERHEAD CRANE

(y2, z2)

m

q

Steps 1-4 lead us to

T =1

2M + m( ) ˙ q 1

2+

1

2ml2 ˙ q 2

2+ ml ˙ q 1˙ q 2 cosq2

V = −mglcosq2

L =1

2M + m( ) ˙ q 1

2+

1

2ml2 ˙ q 2

2+ ml ˙ q 1˙ q 2 cosq2 + mglcosq2

(start without the generalized forces)

y1 = q1, θ = q2

Page 31: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

31

For q1

5. ∂L

∂˙ q 1= M + m( ) ˙ q 1 + ml ˙ q 1 cosq1

6. d

dt

∂L

∂˙ q 1 ⎛

⎝ ⎜

⎠ ⎟= M + m( )˙ ̇ q 1 + mlcosq1˙ ̇ q 2 − ml ˙ q 2

2sinq2

7. ∂L

∂q1= 0

8. d

dt

∂L

∂˙ q 1 ⎛

⎝ ⎜

⎠ ⎟−

∂L

∂q1= M + m( )˙ ̇ q 1 + mlcosq2˙ ̇ q 2 − ml ˙ q 2

2sinq2 = 0

L =1

2M + m( ) ˙ q 1

2+

1

2ml2 ˙ q 2

2+ ml ˙ q 1˙ q 2 cosq2 + mglcosq2

Page 32: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

32

For q2

5. ∂L

∂˙ q 2= ml2 ˙ q 2 + ml ˙ q 1 cosq2

6. d

dt

∂L

∂˙ q 2 ⎛

⎝ ⎜

⎠ ⎟= ml2˙ ̇ q 2 + ml˙ ̇ q 1 cosq2 − ml ˙ q 1˙ q 2 sinq2

7. ∂L

∂q2= −ml ˙ q 1˙ q 2 sinq2 − mglsinq2

8. d

dt

∂L

∂˙ q 2 ⎛

⎝ ⎜

⎠ ⎟−

∂L

∂q2= ml2˙ ̇ q 2 + ml˙ ̇ q 1 cosq2 − ml ˙ q 1˙ q 2 sinq2 + ml ˙ q 1˙ q 2 + mgl( )sinq2 = 0

L =1

2M + m( ) ˙ q 1

2+

1

2ml2 ˙ q 2

2+ ml ˙ q 1˙ q 2 cosq2 + mglcosq2

Page 33: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

33

8a. M + m( )˙ ̇ q 1 + mlcosq2˙ ̇ q 2 − ml ˙ q 22sinq2 = 0

8b. ml2˙ ̇ q 2 + ml˙ ̇ q 1 cosq2 − ml ˙ q 1˙ q 2 sinq2 + ml ˙ q 1˙ q 2 + mgl( )sinq2 = 0

The governing equations are then

8a. M + m( )˙ ̇ y 1 + mlcosθ ˙ ̇ θ − ml ˙ θ 2 sinθ = 0

8b. ml2˙ ̇ θ + ml˙ ̇ y cosθ − ml˙ y ̇ θ sinθ + ml˙ y ̇ θ + mgl( )sinθ = 0

Put the physical variables back so it looks more familiar

This is all without forcing or damping — let’s add those

Page 34: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

34

M

y1, f1

OVERHEAD CRANE

(y2, z2)

m

q

If y1 changes, f1 does workQ1 = f1

If q changes, t1 does workQ2 = t1

add a torque, t1

If y1 changes, t1 does no workQ1 does not change

If q changes, f1 does no workQ2 = 0

(with forces)

Page 35: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

35

The governing equations were

8a. M + m( )˙ ̇ y + mlcosθ ˙ ̇ θ − ml ˙ θ 2 sinθ = 0

8b. ml2˙ ̇ θ + ml˙ ̇ y cosθ − ml˙ y ̇ θ sinθ + ml˙ y ̇ θ + mgl( )sinθ = 0

We added the generalized forces

8a. M + m( )˙ ̇ y + mlcosθ ˙ ̇ θ − ml ˙ θ 2 sinθ = Q1 = f1

8b. ml2˙ ̇ θ + ml˙ ̇ y cosθ − ml˙ y ̇ θ sinθ + ml˙ y ̇ θ + mgl( )sinθ = Q2 = τ 1

Now we need the Rayleigh dissipation function

Page 36: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

36

F =1

2c ˙ θ 2

The damper works when the angle changes, but not when the cart movesSo, the Rayleigh dissipation function for this problem is

∂F∂ ˙ y

= 0, ∂ F

∂ ˙ θ = c ˙ θ

8a. M + m( )˙ ̇ y + mlcosθ ˙ ̇ θ − ml ˙ θ 2 sinθ = f1

8b. ml2˙ ̇ θ + ml˙ ̇ y cosθ − ml˙ y ̇ θ sinθ + ml˙ y ̇ θ + mgl( )sinθ + c ˙ θ = τ 1

Page 37: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

37

We aren’t really up to discussing solving these problems,but let me say a few things that we will revisit.

M + m( )˙ ̇ y + mlcosθ ˙ ̇ θ − ml ˙ θ 2 sinθ = f1

ml2˙ ̇ θ + ml˙ ̇ y cosθ − ml˙ y ̇ θ sinθ + ml˙ y ̇ θ + mgl( )sinθ + c ˙ θ = τ 1

a pair of coupled second order ordinary differential equations

It would be nice to have first order equations

There are lots of ways to do this, and we’ll look at many of thembut the simplest is to let

˙ q i = ui

Page 38: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

38

Then we’ll have

M + m( ) ˙ u 1 + mlcosq2 ˙ u 2 − mlu22sinq2 = f1

mlcosθ ˙ u 1 + ml2 ˙ u 2 − mlu1u2 sinq1 + mlu1u2 + mgl( )sinq2 + cu2 = τ 1

˙ q 1 = u1

˙ q 2 = u2

If you supply a force, a torque and initial conditionsyou can solve this set numerically.

Page 39: Lecture 2. A Day of Principles The principle of virtual work d’Alembert’s principle Hamilton’s principle 1 (with an example that applies ‘em all at the

39

You can solve for the variables, which I won’t do because it is pretty messy, and you’ll wind up with

d

dt

q1

q2

u1

u2

⎨ ⎪ ⎪

⎩ ⎪ ⎪

⎬ ⎪ ⎪

⎭ ⎪ ⎪

=

u1

u2

rhs( )3

rhs( )4

⎪ ⎪

⎪ ⎪

⎪ ⎪

⎪ ⎪

Later on we’ll learn to call this a state vector