Robot Dynamics – Part I: The Euler-Lagrange Approach

101
Robot Dynamics I – PPGEE/UFMG 1 / 98 Robot Dynamics – Part I: The Euler-Lagrange Approach Leonardo A. B. Tˆorres August, 2020.

Transcript of Robot Dynamics – Part I: The Euler-Lagrange Approach

Page 1: Robot Dynamics – Part I: The Euler-Lagrange Approach

Robot Dynamics I – PPGEE/UFMG 1 / 98

Robot Dynamics – Part I:The Euler-Lagrange Approach

Leonardo A. B. Torres

August, 2020.

Page 2: Robot Dynamics – Part I: The Euler-Lagrange Approach

Foundations of Lagrangian Mechanics

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 2 / 98

Page 3: Robot Dynamics – Part I: The Euler-Lagrange Approach

Introduction

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 3 / 98

There are very good textbooks that can be consulted toaid in understanding what we are going to discuss. Thefollowing two volumes were the most influential in thepreparation of these notes:

■ (Spong et al., 2005): Our basic source. Our primaryobjective is to explain in detail some of the derivationsin Chapter 7.

■ (Lanczos, 1986): This is an excelent book thatpresents mechanics in a very elegant way.

Page 4: Robot Dynamics – Part I: The Euler-Lagrange Approach

Introduction

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 4 / 98

To understand the Euler-Lagrange approach to Mechanics,consider the robotic mechanism depicted below:

q2

x2

ag

q1

x1

r1

O

X2

X1

Page 5: Robot Dynamics – Part I: The Euler-Lagrange Approach

Introduction

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 4 / 98

To understand the Euler-Lagrange approach to Mechanics,consider the robotic mechanism depicted below:

q2

x2

ag

q1

x1

r1

O

X2

X1

It is very important to define the Inertial Reference Frame!

Page 6: Robot Dynamics – Part I: The Euler-Lagrange Approach

Introduction

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 4 / 98

To understand the Euler-Lagrange approach to Mechanics,consider the robotic mechanism depicted below:

q2

x2

ag

q1

x1

r1

O

X2

X1

A

B

C

~rA

~rB

Page 7: Robot Dynamics – Part I: The Euler-Lagrange Approach

Introduction

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 5 / 98

Initially, just to simplify matters, lets consider that eachpart of the robot can be viewed as equivalent point-masselements m1 and m2:

O

X2

X1

~rA

⊕m1

~rB

⊕m2

Page 8: Robot Dynamics – Part I: The Euler-Lagrange Approach

Introduction

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 6 / 98

Notice that by considering the Robot Configuration Spaceinstead of the Robot Workspace we are automaticallyincorporating the constraints that determine how therelative positions of the point-masses m1 and m2 shouldevolve with time:

~rA = FAK (~q) ⇒ ~rA ≡ ~rA(~q),

~rB = FBK (~q) ⇒ ~rB ≡ ~rB(~q);

where FAK (·) : R

2 → R2 and FB

K (·) : R2 → R

2 are theForward Kinematics maps associated with the centers ofmass 1 and 2, respectively, with ~q = [q1 q2]

⊤.

Page 9: Robot Dynamics – Part I: The Euler-Lagrange Approach

Virtual Displacements

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 7 / 98

■ Any variation of the point-mass elements positions inthe Workspace that do not violate the mechanicalconstraints, i.e. they are consistent with themovements the mechanism can perform, are calledvirtual displacements:

δ~rA =∂~rA

∂q1δq1 +

∂~rA

∂q2δq2;

δ~rB =∂~rB

∂q1δq1 +

∂~rB

∂q2δq2.

They are virtual because they don’t need tocorrespond to real displacements, i.e. δ~rA and δ~rB areconsidered just as possible/kinematically consistentinfinitesimal movements, not actual displacements.

Page 10: Robot Dynamics – Part I: The Euler-Lagrange Approach

Virtual Displacements

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 7 / 98

■ Any variation of the point-mass elements positions inthe Workspace that do not violate the mechanicalconstraints, i.e. they are consistent with themovements the mechanism can perform, are calledvirtual displacements:

δ~rA =∂~rA

∂q1δq1 +

∂~rA

∂q2δq2;

δ~rB =∂~rB

∂q1δq1 +

∂~rB

∂q2δq2.

Notice that although δ~rA depends on δ~rB (due to theunderlying mechanical constraints), δq1 and δq2 areindependent variables!

Page 11: Robot Dynamics – Part I: The Euler-Lagrange Approach

Virtual Displacements

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 8 / 98

Suppose the corresponding Jacobian matrices associatedwith the Forward Kinematic maps can be written as:

JA =

[∂~rA

∂q1|

∂~rA

∂q2

]

;

JB =

[∂~rB

∂q1|

∂~rB

∂q2

]

such that

δ~rA = JAδ~q;δ~rB = JBδ~q;

(1)

with δ~q = [δq1 δq2]⊤.

Page 12: Robot Dynamics – Part I: The Euler-Lagrange Approach

Virtual Work

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 9 / 98

■ The work done on a mass-point element, consideringa virtual displacement and the force applied to it, isgiven by:

δWA = ~F⊤A δ~rA,

δWB = ~F⊤B δ~rB.

The Total Virtual Work is δW = ~F⊤A δ~rA + ~F⊤

B δ~rB.In this case, one has that:

δW = ~F⊤A [JAδ~q] + ~F⊤

B [JBδ~q] ,

=[

~F⊤A JA + ~F⊤

B JB

]

︸ ︷︷ ︸

~F⊤

δ~q.

Page 13: Robot Dynamics – Part I: The Euler-Lagrange Approach

Generalized Forces

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 10 / 98

From the previous discussion, we can define:

■ Generalized Force:

~F = J⊤A~FA + J⊤

B~FB (2)

Notice that the unit of a Generalized Force doesn’t haveto be N (Newtons), but the product between aGeneralized Force and a Virtual DisplacementδW = ~F⊤δ~q is necessarily energy in J (Joules).

The power of this concept lies on the fact that δ~q can bechosen arbitrarily, and the corresponding displacements ofthe point-mass elements will automatically be consistentwith the underlying mechanical constraints.

Page 14: Robot Dynamics – Part I: The Euler-Lagrange Approach

Generalized Forces: External or Non-conservativeTorques

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 11 / 98

If there are not only external forces applied to themechanical system, but also external torques, one has that

δW = ~F⊤

A δ~rA + ~F⊤

B δ~rB + · · ·

+ ~T⊤1 δ~θ1 + ~T⊤

2 δ~θ2 + · · · ,

with ~FA, ~FB, . . . the external forces; ~Ti, i = 1, 2, . . . , nq,the resultant external torque applied to the Robot’s parti; δ~rA, δ~rB, . . . the virtual displacements of the points ofapplication of each external forces; and δ~θi = ~ωiδt thevirtual angular displacements for each part of the Robot.

Page 15: Robot Dynamics – Part I: The Euler-Lagrange Approach

Generalized Forces: External or Non-conservativeTorques

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 12 / 98

A virtual angular displacement δ~θi can be understood asan allowed small rotation, i.e. it is a small variation in theorientation of the part i, that is consistent with themechanical constraints of the Robot.In this case

~ωi =d~θi

dt, i = 1, 2, . . . , nq,

and one expects that

~θi ≡ ~θi(~q) ⇒ δ~θi =

(

∂~θi

∂~q

)

δ~q =

(∂~ωi

∂~q

)

δ~q,

where the fact that ∂~θi∂~q = ∂~ωi

∂~q(see slide 92) was used.

Page 16: Robot Dynamics – Part I: The Euler-Lagrange Approach

Generalized Forces: External or Non-conservativeTorques

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 13 / 98

Therefore,

~τ⊤δ~q =[

~F⊤

A JA + ~F⊤

B JB + · · ·

+~T⊤1

(∂~ω1

∂~q

)

+ ~T⊤2

(∂~ω2

∂~q

)

+ · · ·

]

δ~q.

Consequently

~τ =J⊤

A~FA + J⊤

B~FB + · · ·

+

(∂~ω1

∂~q

)⊤

~T1 +

(∂~ω2

∂~q

)⊤

~T2 + · · ·

A similar expression can be found in Siciliano and Khatib(2008), Section 3.3.5, and in a more involved derivationin Kane and Levinson (2005).

Page 17: Robot Dynamics – Part I: The Euler-Lagrange Approach

Generalized Forces: External or Non-conservativeTorques

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 14 / 98

Some important observations:

■ It doesn’t matter the specific point of application of aTorque vector, but only the body in which it is applied(and the corresponding angular velocity of the body).

■ When representing external pure torques (couples)applied by actuators that are rigidly attached to therobotic mechanism (e.g. an electrical motor in one ofthe robot’s joints), the corresponding ReactionTorque, which is applied to the robot’s part wherethe actuator is anchored, has to be accounted for, inthe last expression, as an external contribution too.

Page 18: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Total Virtual Work done by Constraint Forces isZero

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 15 / 98

Suppose that the resultant forces applied to each materialpoint of the Robot can be decomposed in the followingway:

~FA = ~F externalA + ~F constr

A ;

~FB = ~F externalB + ~F constr

B .

In this case the Generalized Force can be broken up into:

~F = ~Fexternal + ~Fconstr,

where

~Fexternal = J⊤

A~F externalA + J⊤

B~F externalB ,

~Fconstr = J⊤

A~F constrA + J⊤

B~F constrB ,

Page 19: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Total Virtual Work done by Constraint Forces isZero

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 16 / 98

A very important hypothesis we will adopt is:

(

~Fconstr)⊤

δ~q = 0,

i.e. the net contribution (the sum) of Generalized Forcesassociated with the constraints to the Total Virtual Workis zero.

Page 20: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Total Virtual Work done by Constraint Forces isZero

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 17 / 98

In practice this means that the constraint forces areorthogonal to the Virtual Displacements or, when theconstraint forces are parallel to them, they form anaction-reaction pair that acts in opposite directions withcontributions to the total Virtual Work that cancel eachother out.

Since the Euler-Lagrange approach is based on Work andEnergy, the constraint forces will not show up explicitly inthe equations because of this assumption.

Page 21: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Total Virtual Work done by Constraint Forces isZero

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 18 / 98

To try to show that the previous assumption of zeroVirtual Work done by contraint forces makes sense,consider the following holonomic constraint in Robot’sWorkspace:

h(~rA, ~rB) = 0.

And also assume that there is no external force applied tothe underlying mechanism. Despite of this, the aboveconstraint has to be fulfilled at all times.

Page 22: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Total Virtual Work done by Constraint Forces isZero

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 19 / 98

For example, consider the fact that the points A, B andC (center of rotation) in the Robotic Mechanism we havebeen considering so far should always be on the same lineconnecting them, i.e.

(~rA − ~rB)⊤(~rB − ~pC) = ‖~rA − ~rB‖‖~rB − ~pC‖,

where ~rA = [xA yA]⊤ and ~rB = [xB yB]

⊤ are variablequantities, and ~pC = [c1 c2]

⊤ is a constant/fixed columnvector.

q2

x2

ag

q1

x1

r1

Page 23: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Total Virtual Work done by Constraint Forces isZero

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 20 / 98

In this case, since the holonomic constraint is satisfied ∀t,we necessarily have that:

δh = 0 ⇒∂h

∂~rAδ~rA +

∂h

∂~rBδ~rB = 0, (3)

where ∂h∂~rA

is the row vector that corresponds to thegradient of the function h:

∂h

∂~rA=

[∂h

∂xA

∂h

∂yA

]

.

On the other hand, from the previous hypothesis we knowthat:

( ~F constrA )⊤δ~rA + ( ~F constr

B )⊤δ~rB = 0. (4)

Page 24: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Total Virtual Work done by Constraint Forces isZero

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 21 / 98

By comparing expressions (3) and (4) we can see that ifthe constraint forces are such that:

~F constrA = λA

(∂h∂~rA

)⊤

,

~F constrB = λB

(∂h∂~rB

)⊤

,

with λA, λB ∈ R, this would make each constraint forceindeed orthogonal to the surface defined by theholonomic constraint h(~rA, ~rB) = 0.

Page 25: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Total Virtual Work done by Constraint Forces isZero

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 22 / 98

If this is not the case, expression (4):

( ~F constrA )⊤δ~rA + ( ~F constr

B )⊤δ~rB = 0,

⇒[

( ~F constrA )⊤JA + ( ~F constr

B )⊤JB

]

︸ ︷︷ ︸

Generalized Constraint Force ( ~Fconstraints)⊤

δ~q = 0

would also be verfied if ~F constrA and ~F constr

B comprise an

action-reaction pair of forces, i.e. ~F constrA = −~F constr

B ,which are applied to the same point, i.e. A = B, or suchthat they are applied to points that “move together”when there are changes in the configuration variables inthe sense that JA(~q) = JB(~q).

Page 26: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Principle of Virtual Work

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 23 / 98

■ As we know from Newton’s second law, if theresultant force acting on the system is zero, thesystem will be in equilibrium, meaning that there willbe no accelerations with respect to an inertialreference frame.

■ In this case

~F =∑

i

~Fi =∑

i

~F externali + ~F constr

i = 0.

■ Therefore,

( ~F )⊤δ~r = ( ~F)⊤δ~q = 0,

=

(∑

i

~Fexternali + ~Fconstr

i

)⊤

δ~q = 0.

Page 27: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Principle of Virtual Work

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 24 / 98

In this case, since

(

~Fconstr)⊤

δ~q = 0,

one has that

■ The Total Virtual Work done by all External Forcesand Torques is zero if, and only if, the mechanicalsystem is in equilibrium, i.e. accelerations are null:

δW = ( ~Fexternal)⊤δ~q = 0 ⇔ Equilibrium.

This principle can be extended to the case when the sumof external forces is nonzero by introducing the concept ofInertia Forces.

Page 28: Robot Dynamics – Part I: The Euler-Lagrange Approach

Inertia Forces and Effective Forces

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 25 / 98

■ Inertia Forces: the time derivative of the linearmomentum associated with the mass elements:

~FIA = −d

dt(m1~vA) ,

~FIB = −d

dt(m2~vB) .

■ Effective Forces: the sum of the applied ExternalForces and the Inertia Forces:

~FeA = ~FA + ~FIA,

~FeB = ~FB + ~FIB.

Page 29: Robot Dynamics – Part I: The Euler-Lagrange Approach

D’Alembert Principle

Foundations ofLagrangianMechanics

Introduction

Introduction

Introduction

IntroductionVirtualDisplacements

VirtualDisplacements

Virtual Work

Generalized ForcesGeneralized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

Generalized Forces:External orNon-conservativeTorques

The Total VirtualWork done byConstraint Forces isZero

Robot Dynamics I – PPGEE/UFMG 26 / 98

Generalizing the Principle of Virtual Work we have that

■ D’Alembert Principle: the mechanical system wouldbe in equilibrium if to the External Forces we addedthe Inertia Forces, i.e. the Total Virtual Work done bythe Effective Forces is Zero:

δW = 0 ⇒[

~FA − ddt (m1~vA)

]⊤

δ~rA+[

~FB − ddt (m2~vB)

]⊤

δ~rB = 0.

(5)

Notice that in the above expression the sum is zero, andthis does not imply that each term should be null sincethe Virtual Displacements δ~rA and δ~rB are notindependent variations.

Page 30: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Euler-Lagrange Equations

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Total Virtual Work –Analysis

Total Virtual Workdone by ExternalForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesThe Euler-LagrangeEquation

The Euler-LagrangeEquation

The Euler-LagrangeEquation

Rigid Body KineticEnergy

Robot Dynamics I – PPGEE/UFMG 27 / 98

Page 31: Robot Dynamics – Part I: The Euler-Lagrange Approach

Total Virtual Work – Analysis

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Total Virtual Work –Analysis

Total Virtual Workdone by ExternalForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesThe Euler-LagrangeEquation

The Euler-LagrangeEquation

The Euler-LagrangeEquation

Rigid Body KineticEnergy

Robot Dynamics I – PPGEE/UFMG 28 / 98

From D’Alembert Principle:

δW = 0 ⇔

(

~F⊤A δ~rA + ~F⊤

B δ~rB

)

︸ ︷︷ ︸

δWext

+

[d

dt(m1~vA)

⊤ δ~rA +d

dt(m2~vB)

⊤ δ~rB

]

︸ ︷︷ ︸

δWInercia

= 0. (6)

And each additive term above can be analyzed separately.

Page 32: Robot Dynamics – Part I: The Euler-Lagrange Approach

Total Virtual Work done by External Forces

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Total Virtual Work –Analysis

Total Virtual Workdone by ExternalForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesThe Euler-LagrangeEquation

The Euler-LagrangeEquation

The Euler-LagrangeEquation

Rigid Body KineticEnergy

Robot Dynamics I – PPGEE/UFMG 29 / 98

As we have seen before, the Virtual Work done byExternal Forces can be rewritten depending on theGeneralized Forces and on the changes of the Mechanismconfiguration, such that:

δWext = ~F⊤A (JAδ~q) + ~F⊤

B (JBδ~q) ,

=[

~F⊤A JA + ~F⊤

B JB

]

︸ ︷︷ ︸

~F⊤

δ~q.

δWext = ~F⊤δ~q (7)

Page 33: Robot Dynamics – Part I: The Euler-Lagrange Approach

Total Virtual Work done by Inertia Forces

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Total Virtual Work –Analysis

Total Virtual Workdone by ExternalForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesThe Euler-LagrangeEquation

The Euler-LagrangeEquation

The Euler-LagrangeEquation

Rigid Body KineticEnergy

Robot Dynamics I – PPGEE/UFMG 30 / 98

The Virtual Work done by the Inertia Forces is:

−δWInertia =d

dt(m1~vA)

⊤ δ~rA︸ ︷︷ ︸

1st term

+d

dt(m2~vB)

⊤ δ~rB︸ ︷︷ ︸

2nd term

. (8)

The first term above can be expanded to become

d

dt(m1~vA)

⊤ δ~rA =

d

dt(m1~vA)

[∂~rA

∂q1δq1 +

∂~rA

∂q2δq2

]

=

[d

dt(m1~vA)

⊤ ∂~rA

∂q1

]

δq1 +

[d

dt(m1~vA)

⊤ ∂~rA

∂q2

]

δq2.

Page 34: Robot Dynamics – Part I: The Euler-Lagrange Approach

Total Virtual Work done by Inertia Forces

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Total Virtual Work –Analysis

Total Virtual Workdone by ExternalForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesThe Euler-LagrangeEquation

The Euler-LagrangeEquation

The Euler-LagrangeEquation

Rigid Body KineticEnergy

Robot Dynamics I – PPGEE/UFMG 31 / 98

The first term in the last expression can also be rewrittenas:

[d

dt(m1~vA)

⊤ ∂~rA

∂q1

]

︸ ︷︷ ︸

u′.v

=

d

dt

(

m1~v⊤A

∂~rA

∂q1

)

︸ ︷︷ ︸

(u.v)′

−m1~v⊤A

d

dt

(∂~rA

∂q1

)

,

︸ ︷︷ ︸

u.v′

from which we can do the following substitutions (see theproofs for these facts at the end of this presentation):

∂~rA

∂q1=

∂~vA

∂q1e

d

dt

(∂~rA

∂q1

)

=∂~vA

∂q1.

Page 35: Robot Dynamics – Part I: The Euler-Lagrange Approach

Total Virtual Work done by Inertia Forces

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Total Virtual Work –Analysis

Total Virtual Workdone by ExternalForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesThe Euler-LagrangeEquation

The Euler-LagrangeEquation

The Euler-LagrangeEquation

Rigid Body KineticEnergy

Robot Dynamics I – PPGEE/UFMG 32 / 98

Using the previous substitutions one can define theso-called “Kinetic Energy of Mass 1”:

KA =1

2m1~v

⊤A~vA (9)

from which we can see that:

∂KA

∂q1= m1~v

⊤A

∂~vA

∂q1,

∂KA

∂q1= m1~v

⊤A

∂~vA

∂q1.

[d

dt(m1~vA)

⊤ ∂~rA

∂q1

]

=

[d

dt

(∂KA

∂q1

)

−∂KA

∂q1

]

Page 36: Robot Dynamics – Part I: The Euler-Lagrange Approach

Total Virtual Work done by Inertia Forces

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Total Virtual Work –Analysis

Total Virtual Workdone by ExternalForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesThe Euler-LagrangeEquation

The Euler-LagrangeEquation

The Euler-LagrangeEquation

Rigid Body KineticEnergy

Robot Dynamics I – PPGEE/UFMG 33 / 98

Therefore it is possible to write, from (8), that:

[d

dt(m1~vA)

⊤ ∂~rA

∂q1

]

δq1 =

[d

dt

(∂KA

∂q1

)

−∂KA

∂q1

]

δq1;

[d

dt(m1~vA)

⊤ ∂~rA

∂q2

]

δq2 =

[d

dt

(∂KA

∂q2

)

−∂KA

∂q2

]

δq2;

[d

dt(m2~vB)

⊤ ∂~rB

∂q1

]

δq1 =

[d

dt

(∂KB

∂q1

)

−∂KB

∂q1

]

δq1;

[d

dt(m2~vB)

⊤ ∂~rB

∂q2

]

δq2 =

[d

dt

(∂KB

∂q2

)

−∂KB

∂q2

]

δq2;

where the “Kinetic Energy of Mass 2” is given by:

KB =1

2m2~v

⊤B~vB (10)

Page 37: Robot Dynamics – Part I: The Euler-Lagrange Approach

Total Virtual Work done by Inertia Forces

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Total Virtual Work –Analysis

Total Virtual Workdone by ExternalForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesThe Euler-LagrangeEquation

The Euler-LagrangeEquation

The Euler-LagrangeEquation

Rigid Body KineticEnergy

Robot Dynamics I – PPGEE/UFMG 34 / 98

By summing up all the individual contributions from eachmass element of the Robot, the Total Kinetic Energy ofthe mechanism will be

K = KA +KB ,

and, from (8), one has that

−δWInertia =

[d

dt

(∂K

∂~q

)

−∂K

∂~q

]⊤

δ~q (11)

Notice that we only consider the Total Kinetic Energy ofthe Robot. We haven’t had to include the so-called“internal reaction forces” between parts of the mechanicalsystem, or the constraint forces that guarantee kinematicconsistency for the Robot movement.

Page 38: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Euler-Lagrange Equation

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Total Virtual Work –Analysis

Total Virtual Workdone by ExternalForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesThe Euler-LagrangeEquation

The Euler-LagrangeEquation

The Euler-LagrangeEquation

Rigid Body KineticEnergy

Robot Dynamics I – PPGEE/UFMG 35 / 98

From (6), (7), (8) and (11), and using the Principle ofD’Alembert, we have that:

δWext = −δWInertia,

~F⊤δ~q =

[d

dt

(∂K

∂~q

)

−∂K

∂~q

]⊤

δ~q,

And therefore:

~F =

[d

dt

(∂K

∂~q

)

−∂K

∂~q

]

, (12)

because δ~q is an arbitrary variation!This is one expression of the famous Euler-LagrangeEquation.

Page 39: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Euler-Lagrange Equation

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Total Virtual Work –Analysis

Total Virtual Workdone by ExternalForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesThe Euler-LagrangeEquation

The Euler-LagrangeEquation

The Euler-LagrangeEquation

Rigid Body KineticEnergy

Robot Dynamics I – PPGEE/UFMG 36 / 98

However, it is common pratice to separate the GeneralizedForces in two vector quantities:

~F = ~τ +

[

−∂V

∂~q

]

with ~τ the vector of Non-conservative ExternalGeneralized Forces, and V (~q) a Potential Functionassociated with the Conservative External GeneralizedForces, e.g. the weight force resulting from the earthgravitational field. Moreover, it is usual to define theso-called Lagrangian Function:

L(

~q, ~q)

= K(

~q, ~q)

− V (~q) .

Page 40: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Euler-Lagrange Equation

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Total Virtual Work –Analysis

Total Virtual Workdone by ExternalForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesTotal Virtual Workdone by InertiaForcesThe Euler-LagrangeEquation

The Euler-LagrangeEquation

The Euler-LagrangeEquation

Rigid Body KineticEnergy

Robot Dynamics I – PPGEE/UFMG 37 / 98

From the previous definitions, and considering (12), wecan finally write down the most common form of theEuler-Lagrange Equation:

~τ =

[d

dt

(∂L

∂~q

)

−∂L

∂~q

]

(13)

The importance of this equation is that it represents thetime evolution of the mechanical system configurationvector ~q, only from the knowledge of the differencebetween the Total Kinetic Energy and the Total PotentialEnergy of the Robot, without explicitly taking intoaccount neither the constraint forces that make the Robotmovement kinematically consistent, nor the internalreaction forces between parts of the Robot.

Page 41: Robot Dynamics – Part I: The Euler-Lagrange Approach

Rigid Body Kinetic Energy

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 38 / 98

Page 42: Robot Dynamics – Part I: The Euler-Lagrange Approach

Rigid Bodies Total Kinetic Energy

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 39 / 98

If we consider that each part of the Robot is comprised bya large number of point-mass elements, the Robot KineticEnergy will be given by:

K = K1︸︷︷︸

Part 1

+ K2︸︷︷︸

Part 2

+ . . .+ Kp︸︷︷︸

Part p

+ . . . ,

where

Kp =1

2

np∑

i=1

mi~v⊤i ~vi.

with ~vi the velocity vectors of each point-mass elementmi from body p, represented in theInertial Reference Frame previously defined.

Page 43: Robot Dynamics – Part I: The Euler-Lagrange Approach

Rigid Bodies Total Kinetic Energy

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 40 / 98

Indeed, continuing with the example we have investigatedso far, we have 2 rigid bodies and not two point-masselements.

yx

y

xy

xθ1

C

Parte 1

Parte 2

We will see that the Kinetic Energy of each rigid bodycan be decomposed in two portions: one associated withthe translation of the rigid body center of mass itself, andanother one related to the rotation of the rigid bodyaround its center of mass.

Page 44: Robot Dynamics – Part I: The Euler-Lagrange Approach

Rigid Bodies: Translation and Rotation

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 41 / 98

The velocity of a point-mass element i can be split in twoterms:

~vi = ~vcm + ~vi/cm (14)

with ~vcm the rigid body center of mass velocity vector,and ~vi/cm the point-mass element velocity i relative tothis center of mass.By definition, ~vi/cm has to be associated with a rotationsince mass element i of a rigid body cannot reduce orincrease its distance to the center of mass, i.e.:

~vi/cm = ~ω × ~ri/cm (15)

where ~ω is the rigid body angular velocity vector, and~ri/cm the mas element i position relative to the c.m.

Page 45: Robot Dynamics – Part I: The Euler-Lagrange Approach

Rigid Bodies: Translation and Rotation

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 42 / 98

In our example, we can see below the relationshipbetween vectors ~ri = ~rcm + ~ri/cm:

y

x

yx

C

~ri

mi ~ri/cm

~rcm

Notice that all the vectors depicted above could berepresented in the Inertial/World Reference Frame, orwith respect to a Reference Frame attached to a part ofthe Robot.

Page 46: Robot Dynamics – Part I: The Euler-Lagrange Approach

Rigid Bodies: some definitions

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 43 / 98

It is important to keep in mind the following definitions:

■ Center of Mass Position:

~rcm =1

M

np∑

i=1

mi~ri. (16)

■ Center of Mass Velocity:

~vcm =d~rcm

dt=

1

M

np∑

i=1

mi~vi. (17)

M is the rigid body Total Mass.

Page 47: Robot Dynamics – Part I: The Euler-Lagrange Approach

Rigid Bodies: some definitions

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 44 / 98

From (16) we have that:

np∑

i=1

mi~ri/cm = 0

because

np∑

i=1

mi~ri/cm =

np∑

i=1

(mi~ri −mi~rcm) =

np∑

i=1

mi~ri

︸ ︷︷ ︸

M~rcm

( np∑

i=1

mi

)

~rcm = 0,

Page 48: Robot Dynamics – Part I: The Euler-Lagrange Approach

Rigid Bodies: some definitions

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 45 / 98

Similarly, from equation (17) one has that:

np∑

i=1

mi~vi/cm = 0

because

np∑

i=1

mi~vi/cm =

np∑

i=1

(mi~vi −mi~vcm) =

k∑

i=1

mi~vi

︸ ︷︷ ︸

M~vcm

( np∑

i=1

mi

)

~vcm = 0,

Page 49: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Rigid Body Kinetic Energy

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 46 / 98

From the previous definitions, we can write the followingexpression for the Total Kinetic Energy associated withRigid Body1 p:

Kp =1

2

np∑

i=1

mi

(~vcm + ~vi/cm

)⊤ (~vcm + ~vi/cm

),

=1

2

np∑

i=1

mi~v⊤cm~vcm + ~v⊤cm

( np∑

i=1

mi~vi/cm

)

+

1

2

np∑

i=1

mi~v⊤

i/cm~vi/cm

1So far, considered to be comprised by countable np point-mass

elements.

Page 50: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Rigid Body Kinetic Energy

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 47 / 98

Kp =1

2

np∑

i=1

mi

(~vcm + ~vi/cm

)⊤ (~vcm + ~vi/cm

),

=1

2

np∑

i=1

mi~v⊤cm~vcm + ~v⊤cm

✟✟✟✟✟✟✟✟✯0( np∑

i=1

mi~vi/cm

)

+

1

2

np∑

i=1

mi~v⊤

i/cm~vi/cm

Page 51: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Rigid Body Kinetic Energy

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 48 / 98

Kp =1

2

( np∑

i=1

mi

)

~v⊤cm~vcm +1

2

np∑

i=1

mi~v⊤

i/cm~vi/cm,

=1

2Mp~v

⊤cm~vcm

︸ ︷︷ ︸

Translation

+1

2

np∑

i=1

mi~v⊤

i/cm~vi/cm

︸ ︷︷ ︸

Rotation

.

As we will see, the component of the Kinetic Energyassociated with the rotation of the rigid body can berewritten to better reveal its relation with the rigid bodyangular velocity vector ~ω.

Page 52: Robot Dynamics – Part I: The Euler-Lagrange Approach

Angular Velocity and Skew-symmetric Matrices

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 49 / 98

The mass element mi position relative to the c.m. ~ri/cmcan be represented with respect to the Inertial ReferenceFrame ~r Inertial

i/cm , or with respect to a Reference Frame

attached to the rigid body ~rBodyi/cm . We know that these

representations are related by a Rotation Matrix, suchthat

~r Inertiali/cm = R~r

Bodyi/cm ,

with R ∈ SO(3), that is, RR⊤ = I, and det{R} = +1.Computing the time derivative of the above expression,one has that

~v Inertiali/cm = R~r

Bodyi/cm +R

✟✟✟✟✟✯0(

~rBodyi/cm

)

= R(

R⊤~r Inertiali/cm

)

.

Page 53: Robot Dynamics – Part I: The Euler-Lagrange Approach

Angular Velocity and Skew-symmetric Matrices

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 50 / 98

From the previous expression, it follows that

RR⊤~r Inertiali/cm = ~ω Inertial × ~r Inertial

i/cm = S(~ω)~r Inertiali/cm ,

i.e. the vector cross-product is equivalent to a matrixmultiplication using the special matrix S(~ω):

S(~ω) = RR⊤ (18)

Matrix S(~ω) is Skew-symmetric, i.e.

RR⊤ = I ⇒d

dt

(

RR⊤

)

= 0,

RR⊤

︸ ︷︷ ︸

S(~ω)

+RR⊤

︸ ︷︷ ︸

S⊤(~ω)

= 0 ⇒ S(~ω) = −S⊤(~ω) .

Page 54: Robot Dynamics – Part I: The Euler-Lagrange Approach

Angular Velocity and Skew-symmetric Matrices

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 51 / 98

From the skew-symmetry of S(~ω) a series of propertiescan be derived for its elements sij :

sij = −sji, ∀i, j;

sii = −sii ⇒ sii = 0, ∀i,

and, therefore, matrix S(~ω) can be rewritten as

S(~ω) =

0 −ωz ωy

ωz 0 −ωx

−ωy ωx 0

(19)

Thus, from the knowledge of R one can find out thecomponents ωx, ωy and ωz of the angular velocity vector~ω, since S(~ω) = RR⊤.

Page 55: Robot Dynamics – Part I: The Euler-Lagrange Approach

Skew-symmetric Matrices and the Cross-Product

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 52 / 98

S(·) can also be seen as an operator, in the sense that

~ω × ~r =

ωx

ωy

ωz

×

rxryrz

=

ωyrz − ωzryωzrx − ωxrzωxry − ωyrx

,

= S(~ω)

rxryrz

,

=

0 −ωz ωy

ωz 0 −ωx

−ωy ωx 0

rxryrz

.

And, therefore, any vector cross-product ~a×~b can bewritten as S(~a)~b, with S(~a) = −S⊤(~a).

Page 56: Robot Dynamics – Part I: The Euler-Lagrange Approach

Skew-symmetric Matrices and the Cross-Product

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 53 / 98

To consider S(~a) as an operator, whose result depends onthe components of ~a, is very interesting because thisallow us to obtain the following expression

~ω × ~r = −~r × ~ω,

= −S(~r)~ω.

And, therefore,

~v⊤i/cm~vi/cm =(~ω × ~ri/cm

)⊤ (~ω × ~ri/cm

),

=[−~ri/cm × ~ω

]⊤ [−~ri/cm × ~ω

],

=[−S

(~ri/cm

)~ω]⊤ [

−S(~ri/cm

)~ω],

= ~ω⊤

[

S(~ri/cm

)⊤S(~ri/cm

)]

~ω.

Page 57: Robot Dynamics – Part I: The Euler-Lagrange Approach

Rotational Kinetic Energy

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 54 / 98

The former expression makes it possible to compute theKinetic Energy portion associated with the RotationalKinetic Energy of a given part p of the Robot, assumingthat this part is comprised by np point-mass elements,such that:

Krotationp =

1

2

np∑

i=1

mi~ω⊤

[

S(~ri/cm

)⊤S(~ri/cm

)]

~ω,

=1

2

np∑

i=1

mi~ω⊤

[

−S(~ri/cm

)2]

~ω,

=1

2~ω⊤

{ np∑

i=1

mi

[

−S(~ri/cm

)2]}

~ω,

=1

2~ω⊤

Is~ω.

where Is is a 3× 3 real matrix called Inertia Tensorassociated with the specific rigid body part of the Robot.

Page 58: Robot Dynamics – Part I: The Euler-Lagrange Approach

Inertia Tensor

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 55 / 98

To compute Is considering that each Robot’s part p is arigid body formed by an infinite number of point-masselements whose volumes tend to zero, the formersummations must be replaced by volume integrals:

Is =

Vp

[

−S(~ri/cm

)2]

ρp(~ri/cm

)dV

︸ ︷︷ ︸

≈ dmi

, (20)

Is =

Ixx −Ixy −Ixz ,

−Ixy Iyy −Iyz,

−Ixz −Iyz Izz,

,

with ρp(~ri/cm

)the mass density function evaluated at

~ri/cm; Ixx, Iyy and Izz are called moments of inertiaaround x, y and z axes, respectively; and Ixy, Ixz and Iyzare called products of inertia.

Page 59: Robot Dynamics – Part I: The Euler-Lagrange Approach

Inertia Tensor – Computation

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 56 / 98

By expanding expression (20), and considering that~ri/cm = [x y z]⊤, we have that:

−S(~ri/cm

)2= −

0 −z y

z 0 −x

−y x 0

2

−S(~ri/cm

)2=

(y2 + z2) −xy −xz

−xy (x2 + z2) −yz

−xz −yz (x2 + y2)

,

and, therefore, the moments of inertia will be given byIxx =

vol(y2 + z2)ρpdV , Iyy =

vol(x2 + z2)ρpdV ,

Izz =∫

vol(x2 + y2)ρpdV ; and the products of inertia will

be given by Ixy =∫

vol(xy)ρpdV , Iyz =∫

vol(yz)ρpdV ,Ixz =

vol(xz)ρpdV .

Page 60: Robot Dynamics – Part I: The Euler-Lagrange Approach

Inertia Tensor – Reference Frames

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 57 / 98

Notice that, in the previous development, the componentsof ~ri/cm = [x y z]⊤ for each point-mass element wererepresented with respect to the Inertial Reference Frame.This makes very involved the calculation of thesummations or volume integrals defined previously, sincex, y and z are changing as long as the rigid body p ismoving, and we end up with a time varying Inertia Tensor.However, it is easy to see that:

~r Inertiali/cm = R~r

Bodyi/cm ,

for some R ∈ SO(3).

Page 61: Robot Dynamics – Part I: The Euler-Lagrange Approach

Inertia Tensor – Reference Frames

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 58 / 98

Notice that it is always true that:

R(

~a×~b)

= (R~a)×(

R~b)

,

R(

S(~a)~b)

= [S(R~a)][

R~b]

.

From the last expression, it follows that

RS(~a) = S(R~a)R,⇒ RS(~a)R⊤ = S(R~a)

for vectors ~a, and arbitrary rotation matrices R.

Page 62: Robot Dynamics – Part I: The Euler-Lagrange Approach

Inertia Tensor – Reference Frames

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 59 / 98

On the other hand, the computation of the Inertia Tensordepends on the following development:

−S(

~r Inertiali/cm

)2= −

[

S(

~r Inertiali/cm

)

S(

~r Inertiali/cm

)]

,

= −[

S(

R~rBodyi/cm

)

S(

R~rBodyi/cm

)]

,

and using the previous property, we can write that

S(

R~rBodyi/cm

)

S(

R~rBodyi/cm

)

= RS(

~rBodyi/cm

)

✟✟✟✯I

R⊤RS(

~rBodyi/cm

)

R⊤,

and, therefore,

−S(

~r Inertiali/cm

)2= R

[

−S(

~rBodyi/cm

)2]

R⊤

Page 63: Robot Dynamics – Part I: The Euler-Lagrange Approach

Inertia Tensor – Reference Frames

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 60 / 98

From the previous expression, one has that

Is =

Vp

[

−S(

~r Inertiali/cm

)2]

ρpdV,

=

Vp

R

[

−S(

~rBodyi/cm

)2]

R⊤ρpdV,

= R

(∫

Vp

[

−S(

~rBodyi/cm

)2]

ρpdV

)

︸ ︷︷ ︸

Ib

R⊤.

Therefore, the relation between a time-varying Is and theconstant Ib computed with respect to the body fixedReference Frame is:

Is = R Ib R⊤.

Page 64: Robot Dynamics – Part I: The Euler-Lagrange Approach

Rotational Kinetic Energy – Final Expressions

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 61 / 98

From the previous developments, the Rotational KineticEnergy associated with a Robot’s part p is given by

Krotationalp =

1

2

(

~ω Inertial)⊤

Is

(

~ω Inertial)

,

=1

2

(

R~ω Body)⊤ (

RIbR⊤

)(

R~ω Body)

,

Krotationalp =

1

2

(

~ω Body)⊤

Ib

(

~ω Body)

.

Page 65: Robot Dynamics – Part I: The Euler-Lagrange Approach

Rigid Body Kinetic Energy – Summary

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 62 / 98

The Total Kinetic Energy of a Robot’s part p is given by:

Kp =1

2Mp

(

~v Inertialcm

)⊤ (

~v Inertialcm

)

︸ ︷︷ ︸

Translation

+

1

2

(

~ω Body)⊤

Ibp

(

~ω Body)

︸ ︷︷ ︸

Rotation

(21)

with Mp ∈ R+ the mass of the part p and Ibp the

corresponding Inertia Tensor (a positive definitesymmetric matrix).

Page 66: Robot Dynamics – Part I: The Euler-Lagrange Approach

Center of Mass Velocity as a Function of ~q and ~q

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 63 / 98

To use the Euler-Lagrange equation (13) we need toexpress the Kinetic Energy as a function of ~q and ~q.

To do this, notice that:

~v Inertialcm =

d

dt

[

~r Inertialcm (~q)

]

,

and, therefore,

~v Inertialcm = Jcm(~q)~q, (22)

where Jcm(~q) is the Jacobian matrix ascociated with theForward Kinematics that gives ~r Inertial

cm from theknowledge of ~q.

Page 67: Robot Dynamics – Part I: The Euler-Lagrange Approach

Angular Velocity as a Function of ~q and ~q

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 64 / 98

As we have seen in previous classes of this course, we canget an expression for the angular velocity ~ω Body

associated to a specific Robot’s part depending on ~q and~q. Remember that, from (19), the angular velocity isgiven by

S(

~ω Inertial)

= RR⊤.

where R ∈ SO(3) is the Rotation Matrix in the expression~r Inertial = R~r Body. On the other hand, we know that

S(

~ω Inertial)

= S(

R~ω Body)

= RS(

~ω Body)

R⊤;

and, therefore,

S(

~ω Body)

= R⊤R (23)

Page 68: Robot Dynamics – Part I: The Euler-Lagrange Approach

Angular Velocity as a Function of ~q and ~q

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 65 / 98

On the other hand, notice that:

R (~q) =[~rx (~q) | ~ry (~q) | ~rz (~q)

];

R⊤ (~q) =

~r⊤x (~q)

~r⊤y (~q)

~r⊤z (~q)

;

R(

~q, ~q)

=[

∂~rx∂~q ~q

∂~ry∂~q ~q

∂~rz∂~q ~q

]

,

where ∂~rx∂~q ,

∂~ry∂~q e ∂~rx

∂~q are Jacobian matrices associatedwith each column of R(~q).

Page 69: Robot Dynamics – Part I: The Euler-Lagrange Approach

Angular Velocity as a Function of ~q and ~q

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 66 / 98

From (23), and considering that:

S(

~ω Body)

=

0 −ωz ωy

ωz 0 −ωx

−ωy ωx 0

,

one has that, for example,

ωx

(

~q, ~q)

= −~r⊤y

(∂~rz

∂~q

)

~q,

ωy

(

~q, ~q)

= ~r⊤x

(∂~rz

∂~q

)

~q,

ωz

(

~q, ~q)

= −~r⊤x

(∂~ry

∂~q

)

~q.

Page 70: Robot Dynamics – Part I: The Euler-Lagrange Approach

Angular Velocity as a Function of ~q and ~q

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 67 / 98

Finally, it is possible to write that

~ω Body ≡ W (~q) ~q (24)

with

W (~q) =

−~r⊤y

(∂~rz∂~q

)

~r⊤x

(∂~rz∂~q

)

−~r⊤x

(∂~ry∂~q

)

.

Page 71: Robot Dynamics – Part I: The Euler-Lagrange Approach

Rigid Bodies Kinetic Energy

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 68 / 98

Using expressions (22) and (24), in (21), one has that

Kp =1

2Mp~q

⊤ [Jcm(~q)]⊤ [Jcm(~q)] ~q

︸ ︷︷ ︸

Translation

+

1

2~q⊤ [W (~q)]⊤ Ibp [W (~q)] ~q,︸ ︷︷ ︸

Rotation

Hence the Total Kinetic Energy associated with a Robot’spart p is a quadratic function of the so-called generalizedvelocity ~q, i.e.:

Kp =1

2~q⊤Mp(~q) ~q

Page 72: Robot Dynamics – Part I: The Euler-Lagrange Approach

Robot Total Kinetic Energy

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 69 / 98

From the previous expressions, we have that:

K =

n∑

p=1

Kp =

n∑

p=1

{1

2~q⊤Mp(~q) ~q

}

.

with

Mp = [Jp,cm(~q)]⊤Mp [Jp,cm(~q)] + [Wp(~q)]

⊤Ibp [Wp(~q)] ,

where Jp,cm(~q) and Wp(~q) are the matrices definedpreviously that depend on which Robot’s part p that it isbeing considered.

Page 73: Robot Dynamics – Part I: The Euler-Lagrange Approach

Robot Total Kinetic Energy

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 70 / 98

This means that, for any Robot in the world, its TotalKinetic Energy, resulting from summing up all thecontributions from each one of its parts, is indeed aquadratic function of the generalized velocity ~q:

K =1

2~q⊤M(~q) ~q (25)

where

M(~q) = M1(~q) +M2(~q) + . . .+Mn(~q).

is the so-called Mass Matrix.

Page 74: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Mass Matrix

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 71 / 98

The Mass Matrix M(~q) has some very interestingproperties: it is symmetric and positive definite.Therefore, M−1(~q) always exists, because the eigenvaluesof M(~q) are real and positive.

From (25), the Mass Matrix can also be defined from theknowledge of the Total Kinetic Energy K, such that itselements Mij(~q) are given by:

Mij(~q) =∂2K

∂qi∂qj(26)

Page 75: Robot Dynamics – Part I: The Euler-Lagrange Approach

Robot Total Potential Energy

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 72 / 98

To each Robot’s part p we can also associated a PotentialFunction Vp(~q), whose gradient determines the directionof the conservative force that acts on that part:~τ conservativep = −

∂Vp

∂~q .

The Robot Total Potential Energy can be written as

V (~q) =n∑

p=1

Vp(~q) (27)

Obs.: usually the Potential Energy is associated with thegravity that manifests itself as weight vector forcesapplied at the center of mass of each part p of the Robot.

Page 76: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Robot Lagrangian Function

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Rigid Bodies TotalKinetic Energy

Rigid Bodies TotalKinetic Energy

Rigid Bodies:Translation andRotationRigid Bodies:Translation andRotationRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsRigid Bodies: somedefinitionsThe Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

The Rigid BodyKinetic Energy

Angular Velocity andSkew-symmetricMatricesAngular Velocity and

Robot Dynamics I – PPGEE/UFMG 73 / 98

From (25) and (27), the Robot Lagrangian function isgiven by

L(~q, ~q) = K(~q, ~q)− V (~q),

L(~q, ~q) =1

2~q⊤M(~q) ~q − V (~q).

Finally, the Robot Euler-Lagrange equation is

~τ =d

dt

(∂L

∂~q

)

−∂L

∂~q.

Page 77: Robot Dynamics – Part I: The Euler-Lagrange Approach

Robot Canonical Equations

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 74 / 98

Page 78: Robot Dynamics – Part I: The Euler-Lagrange Approach

Canonical Equations

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 75 / 98

From the Robot Euler-Lagrange equation, notice that:

d

dt

(∂L

∂~q

)

=d

dt

(∂K

∂~q

)

,

∂L

∂~q=

∂~q

[

K(~q, ~q)− V (~q)]

.

And since K = 12 ~q

⊤M(~q)~q, one has that2

∂K

∂~q= M(~q)~q,

2See Proof 3 at the end of these lecture notes.

Page 79: Robot Dynamics – Part I: The Euler-Lagrange Approach

Canonical Equations

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 76 / 98

Therefore, we can write that:

d

dt

(∂K

∂~q

)

=d

dt

(

M(~q)~q)

= M(~q)~q +dM(~q)

dt︸ ︷︷ ︸

?

~q,

and

∂~q

[

K(~q, ~q)− V (~q)]

=1

2

∂[

~q⊤M(~q)~q]

∂~q− g(~q),

where g(~q) = ∂V (~q)∂~q .

In the previous equations, the expressions dM(~q)dt and

12

∂[~q⊤M(~q)~q]∂~q need to be further explained.

Page 80: Robot Dynamics – Part I: The Euler-Lagrange Approach

Canonical Equations – Details

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 77 / 98

The Euler-Lagrange equations is a vector equation that isequivalent to the following set of scalar equations:

τ1 =d

dt

(∂L

∂q1

)

−∂L

∂q1,

τ2 =d

dt

(∂L

∂q2

)

−∂L

∂q2, (28)

...

τnq =d

dt

(∂L

∂qnq

)

−∂L

∂qnq

,

with τ1, τ2, . . . , τnq the components of the generalizedforce ~τ .

Page 81: Robot Dynamics – Part I: The Euler-Lagrange Approach

Canonical Equations – Details

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 78 / 98

Therefore, to really understand the expression dM(~q)dt we

need to remember that dM(~q)dt ~q should give us a column

vector, whose k-th element will be given by

{dM(~q)

dt~q

}

k

=

nq∑

j=1

{dM

dt

}

kj

qj ,

=

nq∑

j=1

{dMkj

dt

}

qj ,

=

nq∑

j=1

{ nq∑

i=1

∂Mkj

∂qiqi

}

qj . (29)

Page 82: Robot Dynamics – Part I: The Euler-Lagrange Approach

Canonical Equations – Details

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 79 / 98

Similarly, the k-th element in the column vector∂K∂~q = 1

2

∂[~q⊤M(~q)~q]∂~q will be

1

2~q⊤

∂M

∂qk~q =

1

2~q⊤

∑nq

j=1

∂M1j

∂qkqj ,

∑nq

j=1

∂M2j

∂qkqj ,

...

∑nq

j=1

∂Mnqj

∂qkqj ,

,

=1

2

nq∑

i=1

nq∑

j=1

∂Mij

∂qkqj

qi. (30)

Page 83: Robot Dynamics – Part I: The Euler-Lagrange Approach

Canonical Equations – Details

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 80 / 98

Combining expressions (29) and (30) above; exchangingthe indexes i and j in (30), and noticing that Mij = Mji,one has that one of the terms in the k-th Euler-Lagrangeequation can be expanded in the following way:

{dM

dt~q −

∂K

∂~q

}

k

=

nq∑

j=1

{ nq∑

i=1

(∂Mkj

∂qi−

1

2

∂Mji

∂qk

)

qi

}

qj ,

and this last result looks like the multiplication of a rowvector Γk

⊤ by the column vector ~q, with

Γk⊤ =

[Γk1 Γk2 . . .Γk nq

].

Page 84: Robot Dynamics – Part I: The Euler-Lagrange Approach

Canonical Equations – Details

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 81 / 98

From the previous developments, we have that

dM

dt~q −

∂K

∂~q= C(~q, ~q)~q,

with the Coriolis and Centrifugal Matrix given by

C(~q, ~q) =

Γ11 Γ12 . . . Γ1nq

Γ21 Γ22 . . . Γ2nq

......

. . ....

Γnq 1 Γnq 2 . . . Γnq nq

where

Γkj =

nq∑

i=1

(∂Mkj

∂qi−

1

2

∂Mji

∂qk

)

qi (31)

Page 85: Robot Dynamics – Part I: The Euler-Lagrange Approach

Canonical Equations – Details

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 82 / 98

A related development usually found in Robotics consistsin rewriting expression (29) such as:

nq∑

j=1

{ nq∑

i=1

∂Mkj

∂qiqi

}

qj =

nq∑

j=1

{ nq∑

i=1

1

2

∂Mkj

∂qiqi

}

qj +

nq∑

j=1

{ nq∑

i=1

1

2

∂Mkj

∂qiqi

}

qj ,

=

nq∑

j=1

{nq∑

i=1

1

2

∂Mkj

∂qiqi

}

qj +

nq∑

i=1

nq∑

j=1

1

2

∂Mki

∂qjqj

qi,

where index j was exchanged with index i in the lastsummation.

Page 86: Robot Dynamics – Part I: The Euler-Lagrange Approach

Canonical Equations – Details

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 83 / 98

By changing the order of the summations in the lastexpression:

nq∑

j=1

{ nq∑

i=1

∂Mkj

∂qiqi

}

qj =

nq∑

j=1

{ nq∑

i=1

1

2

∂Mkj

∂qiqi

}

qj +

nq∑

j=1

{ nq∑

i=1

1

2

∂Mki

∂qjqi

}

qj ,

Therefore,

nq∑

j=1

{nq∑

i=1

∂Mkj

∂qiqi

}

qj =1

2

nq∑

j=1

{nq∑

i=1

(∂Mkj

∂qi+

∂Mki

∂qj

)

qi

}

qj

(32)

Page 87: Robot Dynamics – Part I: The Euler-Lagrange Approach

Canonical Equations – Details

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 84 / 98

Again by exchanging the indexess i and j in (30), andusing (32), one has that:

{dM

dt~q −

∂K

∂~q

}

k

=

nq∑

j=1

{nq∑

i=1

1

2

(∂Mkj

∂qi+

∂Mki

∂qj−

∂Mij

∂qk

)

qi

}

qj ,

from which we can define the so-called ChristoffelSymbols of the first kind:

cijk =1

2

(∂Mkj

∂qi+

∂Mki

∂qj−

∂Mij

∂qk

)

(33)

Note that, with fixed k, one hast that cijk = cjik.

Page 88: Robot Dynamics – Part I: The Euler-Lagrange Approach

Canonical Equations – Details

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 85 / 98

In this case the Coriolis and Centrifugal Matrix elementsdefined in (31) can be rewritten as

Γkj =

nq∑

i=1

cijk(~q)qi (34)

and each scalar k-th Euler-Lagrange equation will begiven by

nq∑

j=1

Mkj qj +

nq∑

j=1

Γkj

(

~q, ~q)

qj + gk(~q) = τk,

where gk(~q) is the k-th element of the vector

g(~q) = ∂V (~q)∂~q ; and τk is the k-th element of the

generalized force vector ~τ .

Page 89: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Robot Canonical Equation

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 86 / 98

Finally, the so-called Canonical Equation or NormalForm Equation of the Robot can be compactly written as

M (~q ) ~q + C(

~q, ~q)

~q + g (~q ) = ~τ , (35)

with M(~q) ∈ Rnq × R

nq a real symmetric positive definitematrix called mass matrix, or inertia matrix ;C(~q, ~q) ∈ R

nq × Rnq is the Coriolis and Centrifugal terms

matrix obtained from M(~q); g(~q) ∈ Rnq is the total

potential energy gradient; and ~τ ∈ Rnq is the vector of

non-conservative generalized forces (which includesexternal and friction forces and torques).

Page 90: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Robot Canonical Equations – Observations

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 87 / 98

■ The importance of (35) is not in the systematic waywe have used to derive it, but actually in the fact thatwe can see more clearly what are the properties ofeach term in this equation that will be true for everyrobot in the world.

■ With respect to this last point, notice that very oftenit is much easier/simpler, regarding the algebraicdevelopment of the final Robot Canonical Equation,to depart from (28) and to apply the Euler-Lagrangeapproach instead of writing explicitly the elements Γkj

in C(~q, ~q) following some tedious recipe.

Page 91: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Robot Canonical Equations – InterestingProperties

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 88 / 98

From the previous developments, it is possible to provethat

■ M(~q) is a square positive definite real matrix.Therefore, it will always exist the inverse matrixM−1(~q). Moreover, if the configuration ~q is alwaysbounded, one has that:

0 < λmin(~q)I ≤ M(~q) ≤ λmax(~q)I;

with λmin the smallest real and positive eigenvalue,and λmax the greatest real and positive eigenvalue ofM(~q). (every M(~q) eigenvalue is real and positive).

Page 92: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Robot Canonical Equations – InterestingProperties

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 89 / 98

■ The matrix M − 2C is skew symmetric, i.e.

[

M − 2C]

⊤ = −[

M − 2C]

,

and, therefore, ~q⊤[

M − 2C]

~q = 0, since

~q⊤[

M − 2C]

~q = a ∈ R

a = a⊤,

a = ~q⊤[

M − 2C]⊤

~q,

a = −~q⊤[

M − 2C]

~q,

a = −a ⇒ a = 0.

Page 93: Robot Dynamics – Part I: The Euler-Lagrange Approach

The Robot Canonical Equations – InterestingProperties

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Canonical Equations

Canonical Equations

Canonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsCanonical Equations– DetailsThe RobotCanonical Equation

The RobotCanonical Equations

Robot Dynamics I – PPGEE/UFMG 90 / 98

Linearity with respect to the constitutive parameters:

■ The Robot Canonical Equation is linear with respectto parameters formed by combining masses, inertiamoments and products, and geometric lengths, suchthat:

M(~q)~q + C(~q, ~q)~q + g(~q) = ~τ ,

Y (~q, ~q, ~q)~Θ = ~τ ,

with Y (~q, ~q, ~q) ∈ Rl × R

l a regression matrix(sometimes difficult to be derived); and ~Θ ∈ R

l is avector of parameters that depend on the Robot massdistribution and geometry.

Page 94: Robot Dynamics – Part I: The Euler-Lagrange Approach

Mathematical Proofs

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Mathematical Proofs

Proof 1

Proof 2

Proof 3

Proof 3 (cont.)

Proof 4

Proof 4 (cont.)

Bibliography

Robot Dynamics I – PPGEE/UFMG 91 / 98

Page 95: Robot Dynamics – Part I: The Euler-Lagrange Approach

Proof 1

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Mathematical Proofs

Proof 1

Proof 2

Proof 3

Proof 3 (cont.)

Proof 4

Proof 4 (cont.)

Bibliography

Robot Dynamics I – PPGEE/UFMG 92 / 98

∂~rA

∂q1=

∂~vA

∂q1. or

∂~θi

∂q1=

∂~ωi

∂q1

~vA =d~rA

dt,

=∂~rA

∂q1q1 +

∂~rA

∂q2q2,

∂~vA

∂q1=

∂~rA

∂q1

Similarly,

~ωi =d~θi

dt=

∂~θi

∂q1q1 +

∂~θi

∂q2q2 ∴

∂~ωi

∂q1=

∂~θi

∂q1.

Page 96: Robot Dynamics – Part I: The Euler-Lagrange Approach

Proof 2

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Mathematical Proofs

Proof 1

Proof 2

Proof 3

Proof 3 (cont.)

Proof 4

Proof 4 (cont.)

Bibliography

Robot Dynamics I – PPGEE/UFMG 93 / 98

d

dt

(∂~rA

∂q1

)

=∂~vA

∂q1

d

dt

(∂~rA

∂q1

)

=∂

∂q1

[∂~rA

∂q1

]

q1 +∂

∂q2

[∂~rA

∂q1

]

q2,

=∂2~rA

∂q21q1 +

∂2~rA

∂q2∂q1q2,

=∂

∂q1

[∂~rA

∂q1q1 +

∂~rA

∂q2q2

]

,

=∂~vA

∂q1.

Page 97: Robot Dynamics – Part I: The Euler-Lagrange Approach

Proof 3

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Mathematical Proofs

Proof 1

Proof 2

Proof 3

Proof 3 (cont.)

Proof 4

Proof 4 (cont.)

Bibliography

Robot Dynamics I – PPGEE/UFMG 94 / 98

∂K

∂~q= M(~q)~q

General case:∂(~x⊤A~x)

∂~x = 2A~x for any symmetric matrix

A whose elements do not depend on the vector ~x. Noticethat

F (x1, x2, . . . , xn) = ~x⊤A~x =n∑

i=1

n∑

j=1

aijxj

︸ ︷︷ ︸

fi(x1,x2,...,xn)

xi,

=n∑

i=1

fixi.

Page 98: Robot Dynamics – Part I: The Euler-Lagrange Approach

Proof 3 (cont.)

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Mathematical Proofs

Proof 1

Proof 2

Proof 3

Proof 3 (cont.)

Proof 4

Proof 4 (cont.)

Bibliography

Robot Dynamics I – PPGEE/UFMG 95 / 98

If we consider ∂F∂~x as a column vector with elements ∂F

∂xk,

k = 1, 2, . . . , n, we can write that:

∂F

∂xk=

(n∑

i=1

∂fi

∂xkxi

)

+ fk,

=

(n∑

i=1

aikxi

)

+n∑

j=1

akjxj .

By replacing index i by the index variable j in the firstsummation, and relying on the symmetry of A, i.e.ajk = akj , one has that

∂F

∂xk= 2

n∑

j=1

akjxj ,= k-th element in the muliplication 2A~x.

Page 99: Robot Dynamics – Part I: The Euler-Lagrange Approach

Proof 4

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Mathematical Proofs

Proof 1

Proof 2

Proof 3

Proof 3 (cont.)

Proof 4

Proof 4 (cont.)

Bibliography

Robot Dynamics I – PPGEE/UFMG 96 / 98

If N = M − 2C, with M ≡ M(~q) and C ≡ C(~q, ~q), then

N = −N⊤.

By using (33) in (34), and noticing that the element kj inmatrix M can be written as

{

M}

kj=

nq∑

i=1

∂Mkj

∂qiqi,

it is possible to write that every element Nkj in N will begiven by

Nkj =

nq∑

i=1

{

����∂Mkj

∂qi−

(

����∂Mkj

∂qi+

∂Mki

∂qj−

∂Mij

∂qk

)}

qi,

Page 100: Robot Dynamics – Part I: The Euler-Lagrange Approach

Proof 4 (cont.)

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Mathematical Proofs

Proof 1

Proof 2

Proof 3

Proof 3 (cont.)

Proof 4

Proof 4 (cont.)

Bibliography

Robot Dynamics I – PPGEE/UFMG 97 / 98

Therefore, every element Nkj in N can be written as

Nkj =

nq∑

i=1

{∂Mki

∂qj−

∂Mij

∂qk

}

qi,

and we reach the conclusion that Nkj = −Njk, i.e.N = −N⊤.

Page 101: Robot Dynamics – Part I: The Euler-Lagrange Approach

Bibliography

Foundations ofLagrangianMechanics

The Euler-LagrangeEquations

Rigid Body KineticEnergy

Robot CanonicalEquations

Mathematical Proofs

Proof 1

Proof 2

Proof 3

Proof 3 (cont.)

Proof 4

Proof 4 (cont.)

Bibliography

Robot Dynamics I – PPGEE/UFMG 98 / 98

Kane, T. R. and Levinson, D. A. (2005). Dynamics,Theory and Applications. The Internet-First UniversityPress. Freely available from Cornell University.

Lanczos, C. (1986). The Variational Principles ofMechanics. Dover Publications, fourth edition.

Siciliano, B. and Khatib, O., editors (2008). Handbookof Robotics. Springer-Verlag Berlin Heidelberg, firstedition.

Spong, M. W., Hutchinson, S., and Vidyasagar, M.(2005). Robot Modeling and Control. John Wiley &Sons, Inc., first edition.