12
1 Chapter 5 Virtual Work and Lagrangian Dynamics Overview: Virtual work can be used to derive the dynamic and static equations without considering the constraint forces as was done in the Newtonian Mechanics, presented in Chapter 4. Two tools are needs: o Virtual displacement o Generalized forces The principle of virtual work will be used to derive Hamilton Principle and the Lagrange’s Equations where generalized inertia forces are expressed in terms of the kinetic energy of the system. Solving these equations will be presented later. Virtual Displacement Generalized Forces Hamilton Principle Lagrange’s Equations

Chapter 5 Virtual Work and Lagrangian Dynamics Overviembt/740/Course Notes/Chapter 5 Part a.pdf · Virtual work can be used to derive the dynamic and static equations without considering

  • Upload
    others

  • View
    6

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Chapter 5 Virtual Work and Lagrangian Dynamics Overviembt/740/Course Notes/Chapter 5 Part a.pdf · Virtual work can be used to derive the dynamic and static equations without considering

1

Chapter 5

Virtual Work and Lagrangian Dynamics

Overview:

Virtual work can be used to derive the dynamic and static equations without considering the

constraint forces as was done in the Newtonian Mechanics, presented in Chapter 4.

Two tools are needs:

o Virtual displacement

o Generalized forces

The principle of virtual work will be used to derive Hamilton Principle and the Lagrange’s

Equations where generalized inertia forces are expressed in terms of the kinetic energy of the

system.

Solving these equations will be presented later.

Virtual Displacement

Generalized Forces

Hamilton Principle

Lagrange’s Equations

Page 2: Chapter 5 Virtual Work and Lagrangian Dynamics Overviembt/740/Course Notes/Chapter 5 Part a.pdf · Virtual work can be used to derive the dynamic and static equations without considering

2

Virtual Displacements

X

Y Xi

Yi

i

Pi

Ri

uiP

riP O

i

The global position of Pi

𝑟𝑖𝑃 = 𝑅𝑖 + 𝑢𝑖𝑃

𝑟𝑖𝑃 = 𝑅𝑖 + 𝐴𝑖 �̅�𝑖𝑃

Ri is the global position vector of the reference point

Ai is the transformation matrix from the body to global coordinate systems

𝐴𝑖 = [cos 𝜃𝑖 −sin 𝜃𝑖

sin 𝜃𝑖 cos 𝜃𝑖]

Let’s assume that that the position vector is change slightly (virtual change). This change can be thought

of as similar to partial derivative.

𝛿𝑟𝑖𝑃 = 𝛿𝑅𝑖 + 𝛿(𝐴𝑖 �̅�𝑖𝑃)

𝛿𝑟𝑖𝑃 = 𝛿𝑅𝑖 + 𝛿(𝐴𝑖) �̅�𝑖𝑃 + 𝐴

𝑖𝛿( �̅�𝑖𝑃)

�̅�𝑖𝑃 is constant. Therefore,

𝛿𝑟𝑖𝑃 = 𝛿𝑅𝑖 + �̅�𝑖𝑃𝛿(𝐴

𝑖)

𝛿𝑟𝑖𝑃 = 𝛿𝑅𝑖 + 𝐴𝜃

𝑖 �̅�𝑖𝑃𝛿𝜃𝑖

where,

𝐴𝑖𝜃 =𝜕𝐴𝑖

𝜕𝜃𝑖=

𝜕

𝜕𝜃𝑖[cos 𝜃

𝑖 −sin 𝜃𝑖

sin 𝜃𝑖 cos 𝜃𝑖] = [−sin 𝜃

𝑖 −cos 𝜃𝑖

cos 𝜃𝑖 −sin 𝜃𝑖]

Please note that virtual displacement vector looks like the velocity equation.

The equation can be rewritten in matrix format as,

𝛿𝑟𝑖𝑃 = [𝐼 𝐴𝜃𝑖 �̅�𝑖

𝑃] 𝛿 {𝑅

𝑖

𝜃𝑖}

2x1 2x3 3x1

Page 3: Chapter 5 Virtual Work and Lagrangian Dynamics Overviembt/740/Course Notes/Chapter 5 Part a.pdf · Virtual work can be used to derive the dynamic and static equations without considering

3

Classical Kinematic Formulation

Example:

Two-Link manipulator

2

O

3

P

X1

Y1

X2

Y2

X3

Y3

R2

R3

Note: we are going to the classical kinematics formulation here

𝑟𝑃 = 𝐴2 {𝑙2

0} + 𝐴3 {𝑙

3

0} = {𝑙

2 cos 𝜃2 + 𝑙3 cos 𝜃3

𝑙2 sin 𝜃2 + 𝑙3 sin 𝜃3}

The virtual change of the position vector is,

𝛿𝑟𝑃 = 𝐴𝜃2 {𝑙

2

0} + 𝐴𝜃

3 {𝑙3

0} = {−𝑙

2 sin 𝜃2𝛿 𝜃2 − 𝑙3 sin 𝜃3𝛿 𝜃3

𝑙2 cos 𝜃2𝛿 𝜃2 + 𝑙3 cos 𝜃3𝛿 𝜃3}

𝛿𝑟𝑃 = [−𝑙2 sin 𝜃2 −𝑙3 sin 𝜃3

𝑙2 cos 𝜃2 𝑙3 cos 𝜃3] {𝛿𝜃

2

𝛿𝜃3}

Page 4: Chapter 5 Virtual Work and Lagrangian Dynamics Overviembt/740/Course Notes/Chapter 5 Part a.pdf · Virtual work can be used to derive the dynamic and static equations without considering

4

Computational Kinematic Approach Constraint Jacobian Matrix

Similar to what was described in Chapter 3, the virtual changes can be used to calculate the Jacobian

matrix. Remember that the kinematic constraint equations.

𝐶(𝑞, 𝑡) = 0

where q is the system coordinates. The kinematic constraint equations

𝐶 =

{

𝐶1(𝑞, 𝑡)

𝐶2(𝑞, 𝑡)⋮⋮

𝐶𝑛𝑐(𝑞, 𝑡)}

= 0

These nc equations are linearly independent.

The result of a virtual change,

𝐶𝑞𝛿𝑞 = 0

nc x n n x 1

where Cq is the constraint Jacobian matrix

𝐶𝑞 =

[ 𝜕𝐶1𝜕𝑞1

𝜕𝐶1𝜕𝑞2

𝜕𝐶2𝜕𝑞1

𝜕𝐶2𝜕𝑞2

𝜕𝐶1𝜕𝑞𝑛𝜕𝐶2𝜕𝑞𝑛

⋮ ⋱ ⋮𝜕𝐶𝑛𝑐𝜕𝑞1

𝜕𝐶𝑛𝑐𝜕𝑞2

⋯𝜕𝐶𝑛𝑐𝜕𝑞𝑛 ]

The vector coordinates can be rearranged as,

𝑞 = [𝑞𝑑𝑇 𝑞𝑖

𝑇]

qd is the dependent variables vector.

qi is the independent variables vector.

Page 5: Chapter 5 Virtual Work and Lagrangian Dynamics Overviembt/740/Course Notes/Chapter 5 Part a.pdf · Virtual work can be used to derive the dynamic and static equations without considering

5

The virtual change equation can be rearranged as,

𝐶𝑞𝑑𝛿𝑞𝑑 + 𝐶𝑞𝑖𝛿𝑞𝑖 = 0

nc x nc nc x 1 nc x (n- nc) (n- nc) x 1

This step requires identifying the columns that correspond to qi

Rearranging,

𝛿𝑞𝑑 = −𝐶𝑞𝑑−1𝐶𝑞𝑖𝛿𝑞𝑖

Note: qd has to have the same number of the constraints nc to be inverted.

Or,

𝛿𝑞 = {−𝐶𝑞𝑑

−1𝐶𝑞𝑖{1}

} 𝛿𝑞𝑖 = 𝐵𝑖𝛿𝑞𝑖

Page 6: Chapter 5 Virtual Work and Lagrangian Dynamics Overviembt/740/Course Notes/Chapter 5 Part a.pdf · Virtual work can be used to derive the dynamic and static equations without considering

6

Example:

2

34

2

3

A

B

O

X1

Y1

Y2

X2 X

3

Y3

X4

Y4

R3R

2

R4

𝐶 =

{

𝑅2 + 𝐴2 �̅�2𝑂

−𝑅2 − 𝐴2 �̅�2𝐴 + 𝑅3 + 𝐴3 �̅�3𝐴

−𝑅3 − 𝐴3 �̅�3𝐵 + 𝑅4

𝜃4

(𝐴4 {01})𝑇

{𝑅𝑥4

0}

}

= 0

By taking the virtual change in the system coordinates,

Cqδq =

[

𝐼δ𝑅2 𝐴𝜃2 �̅�2𝑂δ𝜃

2 0 0 0 0

−𝐼δ𝑅2 −𝐴𝜃2 �̅�2𝐴δ𝜃

2 𝐼δ𝑅3 𝐴𝜃3 �̅�3𝐴δ𝜃

3 0 0

000

000

−𝐼δ𝑅3

00

−𝐴𝜃3 �̅�3𝐵δ𝜃

3

00

δ𝑅4

0

(𝐴4 {01})𝑇

{δ𝑅𝑥4

0}

0δ𝜃4

(𝐴𝜃4 {01})𝑇

{𝑅𝑥4

0} δ𝜃4

]

= 0

Cqδq =

[

𝐼 𝐴𝜃2 �̅�2𝑂 0 0 0 0

−𝐼 −𝐴𝜃2 �̅�2𝐴 𝐼 𝐴𝜃

3 �̅�3𝐴 0 0

000

000

−𝐼00

−𝐴𝜃3 �̅�3𝐵00

𝐼0

(𝐴4 {01})𝑇

{10}

0δ𝜃4

(𝐴𝜃4 {01})𝑇

{𝑅𝑥4

0}]

δq = 0

In this case 𝑞𝑖 = 𝜃2 is the independent variable while the dependent coordinates are the remainder of q.

Rearranging,

𝐶𝑞𝑑𝛿𝑞𝑑 + 𝐶𝑞𝑖𝛿𝑞𝑖 =

[

𝐼 0 0 0 0−𝐼 𝐼 𝐴𝜃

3 �̅�3𝐴 0 0

0 −𝐼0 00 0

−𝐴𝜃3 �̅�3𝐵00

𝐼0

(𝐴4 {01})𝑇

{10}

0δ𝜃4

(𝐴𝜃4 {01})𝑇

{𝑅𝑥4

0}]

𝛿𝑞𝑑 +

{

𝐴𝜃2 �̅�2𝑂

−𝐴𝜃2 �̅�2𝐴000 }

δθ2 = 0

Page 7: Chapter 5 Virtual Work and Lagrangian Dynamics Overviembt/740/Course Notes/Chapter 5 Part a.pdf · Virtual work can be used to derive the dynamic and static equations without considering

7

Based on the previous section,

𝛿𝑞𝑑 = −𝐶𝑞𝑑−1𝐶𝑞𝑖𝛿𝑞𝑖

Therefore the virtual change of this mechanism is,

𝛿𝑞 = Bi𝛿𝑞𝑖 = {−𝐶𝑞𝑑

−1𝐶𝑞𝑖1

} δθ2

Homework

For this PR manipulator:

Express virtual change of dependent variables in terms of independent variables

Find the virtual change of point P

3

2

1

P

Page 8: Chapter 5 Virtual Work and Lagrangian Dynamics Overviembt/740/Course Notes/Chapter 5 Part a.pdf · Virtual work can be used to derive the dynamic and static equations without considering

8

Virtual Displacements of Joints: Revolute Joints

X

Y

Xi

i

Ri

uiP

Oi

P

Yi

Xj

Yj

Rj

Oj

ujP

riP=

rjP

j

A revolute joint ensures relative rotation between the two joined bodies, i.e.

𝑟𝑖𝑃 = 𝑟𝑗𝑃

𝜃𝑖 ≠ 𝜃𝑗

Therefore,

(𝑅𝑖 + 𝐴𝑖 �̅�𝑖𝑃) − (𝑅𝑗 + 𝐴𝑖 �̅�𝑗𝑃) = 0

Taking the virtual change in absolute coordinates of bodies i and j,

𝛿𝑅𝑖 + (𝐴𝜃𝑖 �̅�𝑖𝑃)𝛿𝜃

𝑖 − 𝛿𝑅𝑗 − (𝐴𝜃𝑗 �̅�𝑗𝑃)𝛿𝜃

𝑗 = 0

𝛿𝑅𝑗 can be then selected as the vector of dependent coordinates

𝛿𝑅𝑗 = 𝛿𝑅𝑖 + (𝐴𝜃𝑖 �̅�𝑖𝑃)𝛿𝜃

𝑖 − (𝐴𝜃𝑗 �̅�𝑗𝑃)𝛿𝜃

𝑗

Page 9: Chapter 5 Virtual Work and Lagrangian Dynamics Overviembt/740/Course Notes/Chapter 5 Part a.pdf · Virtual work can be used to derive the dynamic and static equations without considering

9

Example

Derive the constraint Jacobian matrix for this two-link manipulator

2

O

3

P

X1

Y1

X2

Y2

X3

Y3

R2

R3

For convenience, Frame of link coincides with the global frame

{𝑅1

𝜃1} = 0

Assuming the two links to be uniform rods, each link has it frame at its geometric center,

representing the center of mass, which is fairly typical when modeling dynamic systems

𝑅2 + 𝐴2 �̅�2𝑂 − 𝑅1 = 0

where,

�̅�2𝑂 = {−𝑙2 2⁄0

}

The same process can be repeated for point A

−𝑅2 − 𝐴2 �̅�2𝐴 + 𝑅3 + 𝐴3 �̅�3𝐴 = 0

where,

�̅�2𝐴 = {𝑙2 2⁄0}

�̅�3𝐴 = {−𝑙3 2⁄0

}

Page 10: Chapter 5 Virtual Work and Lagrangian Dynamics Overviembt/740/Course Notes/Chapter 5 Part a.pdf · Virtual work can be used to derive the dynamic and static equations without considering

10

These kinematic constraint equations can be written in a vector form as:

𝐶(𝑞1, 𝑞2, 𝑞3) = {

𝑅1

𝜃1

𝑅2 + 𝐴2 �̅�2𝑂 − 𝑅1

−𝑅2 − 𝐴2 �̅�2𝐴 + 𝑅3 + 𝐴3 �̅�3𝐴

} = {

0000

}

where C=[C1,C2,….,C7]T is the vector of algebraic constraints that describe this system.

The system has nine generalized coordinates, 𝑞 =

[𝑅1𝑥 𝑅1𝑦 𝜃1 𝑅2𝑥 𝑅2𝑦 𝜃2 𝑅3𝑥 𝑅3𝑦 𝜃3]𝑇.

The number of degrees of freedom is equal to two

The constraint Jacobian matrix is,

𝐶𝑞 = [

𝐼 0 0−𝐼 0 𝐼 𝐴2𝜃 �̅�

2𝑂 0 0

0 0 −𝐼 −𝐴2𝜃 �̅�2𝐴 𝐼 𝐴3𝜃 �̅�

3𝐴

]

In this example, there are 9 coordinates and 7 constraint equations.

The two degrees of freedom: 𝜃2 𝑎𝑛𝑑 𝜃3

Remember that,

𝐶𝑞𝑑𝛿𝑞𝑑 + 𝐶𝑞𝑖𝛿𝑞𝑖 = 0

[𝐼 0 0

−𝐼 0 𝐼 00 −𝐼 𝐼

] {

𝛿𝑅1

𝛿𝜃1

𝛿𝑅2

𝛿𝑅3

} + [

0 0𝐴2𝜃 �̅�

2𝑂 0

−𝐴2𝜃 �̅�2𝐴 𝐴3𝜃 �̅�

3𝐴

] {𝛿𝜃2

𝛿𝜃3} = 0

7 x 7 7 x 1 7 x 2 2x 1

𝛿𝑞𝑑 = −𝐶𝑞𝑑−1𝐶𝑞𝑖𝛿𝑞𝑖

Symbolically, the results are,

𝛿𝑞𝑑 = −

[

0 00 00

𝑙2 sin 𝜃2 2⁄

− 𝑙2 cos 𝜃2 2⁄

𝑙2 sin 𝜃2

−𝑙2 cos 𝜃2

000

𝑙3 sin 𝜃3 2⁄

−𝑙3 cos 𝜃3 2⁄ ]

{𝛿𝜃2

𝛿𝜃3}

Or,

Page 11: Chapter 5 Virtual Work and Lagrangian Dynamics Overviembt/740/Course Notes/Chapter 5 Part a.pdf · Virtual work can be used to derive the dynamic and static equations without considering

11

𝛿𝑞 = Bi𝛿𝑞𝑖 =

[

0 00 00

− 𝑙2 sin 𝜃2 2⁄

𝑙2 cos 𝜃2 2⁄

−𝑙2 sin 𝜃2

𝑙2 cos 𝜃2

10

000

−𝑙3 sin 𝜃3 2⁄

𝑙3 cos 𝜃3 2⁄01 ]

{𝛿𝜃2

𝛿𝜃3}

Rearranging to be in the standard form:

𝛿𝑞 =

[

0 00 00

− 𝑙2 sin 𝜃2 2⁄

𝑙2 cos 𝜃2 2⁄1

−𝑙2 sin 𝜃2

𝑙2 cos 𝜃2

0

0000

−𝑙3 sin 𝜃3 2⁄

𝑙3 cos 𝜃3 2⁄1 ]

{𝛿𝜃2

𝛿𝜃3}

Note: The symbolic matrix inversion is done to show that the results make sense only.

Homework

Use computational approach and virtual displacement to determine Bi matrix for this machine

23

4

Page 12: Chapter 5 Virtual Work and Lagrangian Dynamics Overviembt/740/Course Notes/Chapter 5 Part a.pdf · Virtual work can be used to derive the dynamic and static equations without considering

12

Nonholonomic Constraints

Nonholonomic constraints are constraints that cannot be described in terms of motion of the

system only.

An example is a ball rolling on the floor.

These nonholonomic constraints cannot be used to eliminate the dependent constraints.