Ch. 7: Dynamics
Transcript of Ch. 7: Dynamics
Ch. 7: Dynamics
Example: three link cylindrical robot
• Up to this point, we have developed a systematic method to determine the forward and inverse kinematics and the Jacobian for any arbitrary serial manipulator– Forward kinematics: mapping from joint
variables to position and orientation of the end effector
– Inverse kinematics: finding joint variables that satisfy a given position and orientation of the end effector
– Jacobian: mapping from the joint velocities to the end effector linear and angular velocities
• Example: three link cylindrical robot
General system overview
• Ex: position control…
Why are we studying inertial dynamics and control?
Kinematic vs dynamic models:
• What we’re really doing is modeling the manipulator
• Kinematic models
• Simple control schemes
• Good approximation for manipulators at low velocities and accelerations when inertial coupling between links is small
• Not so good at higher velocities or accelerations
• Dynamic models
• More complex controllers
• More accurate
Methods to Analyze Dynamics
• Two methods:– Energy of the system: Euler-Lagrange method– Iterative Link analysis: Euler-Newton method
• Each has its own ads and disads. • In general, they are the same and the results are the same.
Terminology
• Definitions– Generalized coordinates: any minimal set of independent
parameters sufficient to completely specify the configuration of a system
– Vector norm: measure of the magnitude of a vector• 2-norm:
– Inner product:• Dot product for arbitrary vector spaces• Note that:
• Note also that the inner product is zero if the two vectors are orthogonal
xx
xxxxxxT
nn
=
∈+++== R ,... 222
212
nT yxxy R∈= , yx,2 xx, xxxT ==
Euler-Lagrange Equations
• We can derive the equations of motion for any nDOF system by using energy methods– All we need to know are the conservative (kinetic and potential)
and non-conservative (dissipative suach as friction) terms• This is a shortcut to describing the motion of each particle in a
rigid body along with the constraints that form rigid motions• For this, we need to first use virtual displacements subject to
holonomic constraints, then use the principle of virtual work, then finally use D’Alembert’s Principle to derive the Euler-Lagrange equations of motion
• But first, an example…
Ex: 1DOF system
• To illustrate, we derive the equations of motion for a 1DOF system– Consider a particle of mass m– Using Newton’s second law:
Ex: 1DOF system
• To illustrate, we derive the equations of motion for a 1DOF system– Consider a particle of mass m– Using Newton’s second law:
– Now define the kinetic and potential energies:
– Rewrite the above differential equation• Left side:
• Right side:
mgfym −=&&
2
21 ymK &= mgyP =
( )yK
dtdym
ydtdym
dtdym
&&
&&&&
∂∂
=⎟⎠⎞
⎜⎝⎛
∂∂
== 2
21
( )yPmgy
ymg
∂∂
=∂∂
=
Ex: 1DOF system
• Thus we can rewrite the initial equation:
yPf
yK
dtd
∂∂
−=∂∂&
Ex: 1DOF system
• Thus we can rewrite the initial equation:
• Now we make the following definition:
• L is called the Lagrangian– We can rewrite our equation of motion again:
• Thus, to define the equation of motion for this system, all we need is a description of the potential and kinetic energies
yPf
yK
dtd
∂∂
−=∂∂&
PKL −=
fyL
yL
dtd
=∂∂
−∂∂&
Euler-Lagrange Equations
• If we represent the variables of the system as generalized coordinates, then we can write the equations of motion for an nDOF system as:
• We will come back to this, but it is important to recognize the form of the above equation: – The left side contains the conservative terms– The right side contains the non-conservative terms
• This formulation leads to a set of n coupled 2nd order differential equations
iii q
LqL
dtd τ=
∂∂
−∂∂&
Ex: 1DOF system
• Single link, single motor coupled by a drive shaft– θm and θl are the angular displacements of the shaft and the link
respectively, related by a gear ratio, r:
– Start by determining the kinetic and potential energies:lr
mθθ =
Ex: 1DOF system
• Single link, single motor coupled by a drive shaft– θm and θl are the angular displacements of the shaft and the link
respectively, related by a gear ratio, r:
– Start by determining the kinetic and potential energies:
– Jm and Jl are the motor/shaft and link inertias respectively and Mand L are the mass and length of the link respectively
lrm
θθ =
( ) 22
22
21
21
21
llm
llmm
JJr
JJK
θ
θθ
&
&&
+=
+=
( )lMgLP θcos1
2−=
Ex: 1DOF system
• Let the total inertia, J, be defined by:
• :lm JJrJ += 2
Ex: 1DOF system
• Let the total inertia, J, be defined by:
• Now write the Lagrangian:
• Thus we can write the equation of motion for this 1DOF system as:
• The right side contains the non-conservative terms such as:– The input motor torque: – Damping torques:
• Therefore we can rewrite the equation of motion:
lm JJrJ += 2
( )llMgLJL θθ cos1
221 2 −−= &
lllMgLJ τθθ =+ sin
2&&
mru τ=
lm BrBB +=
umglBJ
BuBBu
lll
lllmml
=−+
−=+−=
)sin(
)(
θθθ
θθθτ&&&
&&&
Holonomic constraints
• Motivation: reduce the number of DOFs of the system– i.e. reduce the number of coordinates necessary to fully describe a
system of particles• Consider a set of k independent particles r1, r2, …, rk:
– Requires 3k generalized coordinates to fully describe the set
• If we add constraints, the number of DOFs (and hence generalized coordinates) is reduced
Holonomic constraints
• Without constraints, we can simply write:– i.e. k uncoupled differential equations
• If there are constraints on the motion of the particles, we mustalso consider constraint forces
• Example, consider a system of two particles with positions r1, r2– If there are no constraints, we need 6 parameters to fully describe
this system– Consider the following constraint: the distance between the
particles is constant
– Now we can write the equations by finding all the forces that will ensure the constraints are met
ii frm =&&
( ) ( ) Lrrrrrr T =−−=− 212121
Holonomic constraints
• Instead, we want a method of deriving the equations of motion without having to explicitly know the constraint forces
• Definition: a constraint on r1, r2, …, rk is holonomic if it can be represented as:
– In this case there are m holonomic constraints– Differentiating gives:
• If there are m holonomic constraints, the system has m fewer degrees of freedom (than the unconstrained case)– Now we can fully represent the coordinates of the particles using
the generalized coordinates: q1, q2, …, qn
( ) mirrrg ki ,...,1 for ,0,...,2,1 ==
01
=∂∂∑
=
k
jj
j
i drrg
Holonomic constraints
• Thus, the holonomic constraints,Can be rewritten as:
– i.e. the particles can be fully expressed by the n independent generalized coordinates
• Ex: consider a rigid object, i.e. an infinite number of particles– To specify the coordinates of each particle, we would require an
infinite # of terms– However, there are constraints imposed by the rigid body: the
distance between any two points is fixed– Therefore, there are a maximum of 6 independent (generalized)
coordinates needed to fully specify all the particles in a rigid body
( ) mirrrg ki ,...,1 for ,0,...,2,1 ==
( ) kiqqrr nii ,...,1 ,,...,1 ==
Virtual displacements
• Definition: for a system of k particles with m holonomicconstraints, the set of virtual displacements is the set:– These displacements are also consistent with the holonomic
constraintskrr δδ ,...,1
Virtual displacements
• Definition: for a system of k particles with m holonomicconstraints, the set of virtual displacements is the set:– These displacements are also consistent with the holonomic
constraints• Ex: again, consider a system of two particles that has a fixed
distance
– Now supposed that both r1 and r2 are perturbed by the virtual displacements δr1 and δr2
– Thus, the same constraint has to be satisfied:
– Rearranging this gives:
krr δδ ,...,1
( ) ( ) 22121 Lrrrr T =−−
( ) ( ) 222112211 Lrrrrrrrr T =−−+−−+ δδδδ
( ) ( )( ) ( ) ( ) ( ) ( ) ( ) 2
212121212121
221212121
2 Lrrrrrrrrrrrr
LrrrrrrrrTTT
T
=−−+−−+−−⇒
=−+−−+−
δδδδδδ
δδδδ
Show the bar example first
Virtual displacements
• If we ignore second order terms in the virtual displacements:
• Now our initial constraint is:
• Therefore:
• This says that in order for the virtual displacements to satisfy the holonomic constraints, they must be orthogonal to the constraint forces • Any other case (non-orthogonal ones)?• For example:
( ) ( ) ( ) ( ) 221212121 2 Lrrrrrrrr TT =−−+−− δδ
( ) ( ) 22121 Lrrrr T =−−
( ) ( ) 02 2121 =−− rrrr T δδ
Principle of virtual work
• So, if, due to the holonomic constraints on a system of particles, the coordinates of the particles can be fully defined by a set of generalized coordinates, then we can write the set of virtual displacements as:
Principle of virtual work
• So, if, due to the holonomic constraints on a system of particles, the coordinates of the particles can be fully defined by a set of generalized coordinates, then we can write the set of virtual displacements as:
– There are no constraints on the generalized coordinates, so there are no constraints on the virtual displacements of the generalized coordinates
• Now suppose each particle is in equilibrium– Thus the net force on each particle is zero– This implies that the work done by each set of virtual displacements
is zero
• Fi is the total force acting on particle i
kiqqrr
n
jj
j
ii ,...,1 ,
1=
∂∂
= ∑=
δδ
01
=∑=
k
ii
Ti rF δ
D’Alembert’s principle
• The previous discussion assumed that the system of particles was in equilibrium
• To make this more general, we assume that the system is not in equilibrium
D’Alembert’s principle
• The previous discussion assumed that the system of particles was in equilibrium
• To make this more general, we assume that the system is not in equilibrium– Thus adding an additional force will put the more general system in
equilibrium (D’Alembert’s Principle)– This additional force is:
• Where pi is the momentum of the ith particle– And we can include this as follows:
– We can again use the principle of virtual work to remove the constraint forces from Fi and this becomes:
ip&−
( ) 01
=−∑=
k
ii
Tii rpF δ&
011
=−∑∑==
k
iii
k
ii
Ti rprf δδ &
amrmprmp iiiiiii ===>= &&&&
D’Alembert’s principle
• Putting this pack into our first equation for the work from the fictitious force:
• Finally, combining this with the external forces:
• Since the virtual displacements of the generalized coordinates are independent, we can say that each coefficient of δqj is zero:
j
n
j jji
k
i
Ti q
qK
qK
dtdrp δδ ∑∑
== ⎪⎭
⎪⎬⎫
⎪⎩
⎪⎨⎧
∂∂
−∂∂
=11 &
01
=⎪⎭
⎪⎬⎫
⎪⎩
⎪⎨⎧
−∂∂
−∂∂∑
=j
n
jj
jj
qqK
qK
dtd δψ
&
njqK
qK
dtd
jjj
,...,1 , ==∂∂
−∂∂ ψ&
Euler-Lagrange Equations
• If we assume that the generalized force ψj is the sum of an external force and a force due to potential energy, we can simplify further– Potential energy function P(q) and external forces τj:
– Then remembering the definition of the Lagrangian: L = K – P:
– This is the Euler-Lagrange equation and it allows us to derive the equations of motion for an nDOF system subject to holonomicconstraints
jjj q
LqL
dtd τ=
∂∂
−∂∂&
jj
j qP τψ +
∂∂
−=
Newton-Euler Formulation
• Rules:– Every action has an equal reaction– The rate of change of the linear momentum equals
the total forces applied to the body
– The rate change of the angular momentum equals the total torque applied to the body.
madt
dmvf ==
dtdI OO
Oωτ =
Newton-Euler Formulation
• Euler equation
Newton-Euler Formulation
• Euler equation
ωωωωωω
ωωωωωω
ωωω
ωω
ωωω
ωωω
&&&
&&&
&&
&&&
&
IIIIShR
IIRSIRISRhR
RIRISh
RIIRh
RIRRIRIh
RRRS
T
OT
OTT
O
TOO
O
TO
+×=+=
=+=+=
+=
+=
===
==
)()(
)()(
)(
)(
h=angular momentum
iiR 1+
Force and Torque Equilibrium
• Force equilibrium
• Torque equilibrium
iciiiiiii amgmfRf ,11 =+− ++
)()(
)()(
,111,11
,111,11
iiiiciiiiiciiii
iii
iiiiciiiiiciiii
iii
IrfRrfR
IrfRrfR
ωωαττ
ωωαττ
×++×+×−=
×+=×−×+−
+++++
+++++
Angular Velocity and Acceleration
Initial and terminal conditions
Next class…
• Mobile robots