05 LagrangianDynamics 3
05 LagrangianDynamics 3
𝑚!! 𝑚!"
n Cartesian “skew” robot 𝑀= 𝑚
!" 𝑚""
Robotics 2 2
Analysis of gravity term
n absence of gravity
n constant 𝑈! (motion on horizontal plane)
n applications in remote space
n static balancing 𝑔 𝑞 ≈0
n distribution of masses (including motors)
n mechanical compensation
n articulated system of springs
n closed kinematic chains
Robotics 2 3
Bounds on dynamic terms
n for an open-chain (serial) manipulator, there always exist
positive real constants 𝑘0 to 𝑘7 such that, for any value of
𝑞 and 𝑞̇
#
𝑘! ≤ 𝑀 𝑞 ≤ 𝑘" + 𝑘# 𝑞 + 𝑘$ 𝑞 inertia matrix
factorization matrix of
𝑆 𝑞, 𝑞̇ ≤ 𝑘% + 𝑘& 𝑞 𝑞̇ Coriolis/centrifugal terms
𝑘! ≤ 𝑀 𝑞 ≤ 𝑘" 𝑆 𝑞, 𝑞̇ ≤ 𝑘% 𝑞̇ 𝑔 𝑞 ≤ 𝑘'
(the same holds true with bounds 𝑞$,&$' ≤ 𝑞$ ≤ 𝑞$,&() on prismatic joints)
NOTE: norms are either for vectors or for matrices (induced norms)
Robotics 2 4
Robots with closed kinematic chains -1
Comau Smart NJ130 MIT Direct Drive Mark II and Mark III
Robotics 2 5
Robots with closed kinematic chains -2
4 𝑙+
3 center of mass:
𝑞$ − 𝜋 arbitrary 𝑙*$
𝑙*# 𝑦 𝑙*,
5 E-E parallelogram:
1
𝑙*!
𝑙' = 𝑙(
𝑞#
𝑙$ = 𝑙)
2 𝑞" 𝑥
𝑙*"
direct kinematics
𝑙' 𝑐' 𝑙+ cos 𝑞$ − 𝜋 𝑙' 𝑐' 𝑙+ 𝑐$
𝑝** = + = −
𝑙' 𝑠' 𝑙+ sin 𝑞$ − 𝜋 𝑙' 𝑠' 𝑙+ 𝑠$
Robotics 2 7
Kinetic energy
linear/angular velocities
−𝑙*! 𝑠! −𝑙*# 𝑠! −𝑙" 𝑠"
𝑣*! = 𝑞̇ ! 𝑣*# = 𝑞̇ ! + 𝑞̇ " 𝜔! = 𝜔# = 𝑞̇ !
𝑙*! 𝑐! 𝑙*# 𝑐! 𝑙" 𝑐"
−𝑙*" 𝑠" −𝑙! 𝑠! 𝑙 𝑠
𝑣*" = 𝑞̇ " 𝑣*, = 𝑞̇ ! + *, " 𝑞̇ " 𝜔" = 𝜔, = 𝑞̇ "
𝑙*" 𝑐" 𝑙! 𝑐! −𝑙*, 𝑐"
Robotics 2 8
Robot inertia matrix
,
1 .
𝑇 = 4 𝑇$ = 𝑞̇ 𝑀 𝑞 𝑞̇
2
$-!
% +𝐼 % %
𝐼!",$$ + 𝑚" 𝑙!" !&,$$ + 𝑚& 𝑙!& + 𝑚' 𝑙" symm
𝑀 𝑞 = % +𝐼 % %
𝑚& 𝑙% 𝑙!& − 𝑚' 𝑙" 𝑙!' 𝑐%(" 𝐼!%,$$ + 𝑚% 𝑙!% !',$$ + 𝑚' 𝑙!' + 𝑚& 𝑙%
structural condition
𝑚$ 𝑙# 𝑙*$ = 𝑚% 𝑙" 𝑙*% (*)
in mechanical design
𝑈 = 4 𝑈$
$-! gravity
.
𝜕𝑈 𝑔/ 𝑚! 𝑙*! + 𝑚# 𝑙*# + 𝑚, 𝑙! 𝑐! 𝑔 𝑞 components
𝑔 𝑞 = = = ! ! are always
𝜕𝑞 𝑔/ 𝑚" 𝑙*" + 𝑚# 𝑙" − 𝑚, 𝑙*, 𝑐" 𝑔" 𝑞"
“decoupled”
Robotics 2 10
Adding dynamic terms ...
1) dissipative phenomena due to friction at the joints/transmissions
n viscous, Coulomb, stiction, Stribeck, LuGre (dynamic)...
𝑭𝑪 𝒔𝒈𝒏(𝒒)
̇
𝑭𝒔𝒕𝒊𝒄𝒕𝒊𝒐𝒏
Robotics 2 11
Adding dynamic terms ...
2) inclusion of electrical actuators (as additional rigid bodies)
n motor 𝑖 mounted on link 𝑖 − 1 (or before) , with very few exceptions
𝑚𝑜𝑡𝑜𝑟 3
𝑗𝑜𝑖𝑛𝑡 3
𝑚𝑜𝑡𝑜𝑟 2
𝑗𝑜𝑖𝑛𝑡 2
Mitsubishi RV-3S
Robotics 2 12
Placement of motors along the chain
𝜃̇&0
𝜃̇&! rotor N
frame
motor 1 motor N
rotor 1
frame joint 2
link 2 link N
RFW link 1 RFN-1
(world frame)
RFN
RF0 RF1
link N - 1
𝜃̇&"
Robotics 2 13
Resulting dynamic model
n simplifying assumption: in the rotational part of the kinetic
energy, only the “spinning” rotor velocity is considered
0
1 1 1 1 .
𝑇&$ ̇
= 𝐼&$ 𝜃&$ = 𝐼&$ 𝑛1$ 𝑞̇ $ = 𝐵&$ 𝑞̇ $"
" " "
𝑇& = 4 𝑇&$ = 𝑞̇ 𝐵& 𝑞̇
2 2 2 2
$-!
diagonal, > 0
n including all added terms, the robot dynamics becomes
moved to
the left ...
𝑀 𝑞 + 𝐵. 𝑞̈ + 𝑐 𝑞, 𝑞̇ + 𝑔 𝑞 + 𝐹+ 𝑞̇ + 𝐹- sgn 𝑞̇ = 𝜏
motor torques
constant does NOT 𝐹𝑉 > 0, 𝐹1 > 0 (after
contribute to 𝑐 diagonal reduction gears)
n scaling by the reduction gears, looking from the motor side
diagonal 7
𝑚33 (𝑞) 1 motor torques
𝐼2 + diag ̈
𝜃2 + diag C5 (𝑞)𝑞̈ 5 + 𝑓 𝑞, 𝑞̇
B𝑀 = 𝜏2 (before
%
𝑛43 𝑛43 reduction gears)
56"
Robotics 2 except the terms 𝑚!! 14
Special actuation and associated coordinates
planar 2R robot with remotely driven forearm
DLR LWR-III
with harmonic drives
Dexter
with cable transmissions
elastic
motor spring load/link
(stiffness K)
𝜏1 = 𝑀 𝑞1 + 𝐵. 𝑞̈ 1 + 𝑐 𝑞1 , 𝑞̇ 1 + 𝑔 𝑞1 + 𝐹+ 𝑞̇ 1 + 𝐹- sgn 𝑞̇ 1
5
(in contact, with an external wrench) … − 𝐽234 𝑞1 𝐹234,1
n useful also for control (e.g., nominal feedforward)
n however, this way of performing the algebraic computation (∀𝑡 ) is
not efficient when using the Lagrangian modeling approach
n symbolic terms grow much longer, quite rapidly for larger 𝑁
Robotics 2 19
State equations
direct dynamics
Lagrangian 𝑁 differential
dynamic model 𝑀 𝑞 𝑞̈ + 𝑐 𝑞, 𝑞̇ + 𝑔 𝑞 = 𝑢 2nd order
equations
𝑥" 𝑞 #6
defining the vector of state variables as 𝑥 = = ∈ ℝ
𝑥# 𝑞̇
state equations
𝑥̇ " 𝑥# 0
𝑥̇ = = + 𝑢
𝑥̇ # −𝑀 /" (𝑥" ) 𝑐 𝑥" , 𝑥# + 𝑔(𝑥" ) 𝑀 /" (𝑥" )
Robotics 2 20
Dynamic simulation
Simulink here, a generic 2-dof robot
block 𝑐(𝑞, 𝑞)
̇ 𝑞, 𝑞̇ 𝑞̇ ! (0) 𝑞! (0)
scheme
𝑞̈ " 𝑞̇ "
𝑞"
input torque _
command +
(open-loop 𝑢 𝑀!" (𝑞)
or in _ 𝑞̈ # 𝑞̇ #
feedback) 𝑞#
𝐶" (𝑞3 , 𝑞̇ 3 )
Robotics 2 24
Linearization along a trajectory (cont)
n after simplifications …
𝑀(𝑞! )∆𝑞̈ + 𝐶" (𝑞! , 𝑞̇ ! )∆𝑞̇ + 𝐷 𝑞! , 𝑞̇ ! , 𝑞̈ ! ∆𝑞 = ∆𝑢
with 6
𝜕𝑀)
𝐷 𝑞1 , 𝑞̇ 1 , 𝑞̈ 1 = 𝐺 𝑞1 + 𝐶" 𝑞1 , 𝑞̇ 1 +M N 𝑞̈ 1 𝑒)5
𝜕𝑞 878
)7" 4
n in state-space format
̇ 0 𝐼
∆𝑥 = −𝑀#$ 𝑞 𝐷 𝑞 , 𝑞̇ , 𝑞̈ #$ 𝑞 𝐶 𝑞 , 𝑞̇ ∆𝑥
! ! ! ! −𝑀 ! " ! !
0
+ 𝑀#$ (𝑞 ) ∆𝑢 = 𝐴(𝑡) ∆𝑥 + 𝐵(𝑡) ∆𝑢
!
a linear, but time-varying system!!
Robotics 2 25
Coordinate transformation
𝑞 ∈ ℝ% 𝑀 𝑞 𝑞̈ + 𝑐 𝑞, 𝑞̇ + 𝑔 𝑞 = 𝑀 𝑞 𝑞̈ + 𝑛 𝑞, 𝑞̇ = 𝑢& 1
̇
𝑀 𝑞 𝐽#$ 𝑞 𝑝̈ − 𝑀(𝑞)𝐽#$ (𝑞)𝐽(𝑞)𝐽 #$ (𝑞)𝑝̇ + 𝑛 𝑞, 𝑞̇ = 𝐽' (𝑞)𝑢
(
̇
𝐽/' 𝑞 𝑀 𝑞 𝐽/" 𝑞 𝑝̈ + 𝐽/' 𝑞 𝑛 𝑞, 𝑞̇ − 𝑀(𝑞)𝐽/" (𝑞)𝐽(𝑞)𝐽 /"
(𝑞)𝑝̇ = 𝑢0
symmetric,
𝑀0 = 𝐽/5 𝑀𝐽/" positive definite 𝑔0 = 𝐽/5 𝑔
(out of singularities)
quadratic
𝑐0 = 𝐽/5 𝑐− 𝑀𝐽/" 𝐽 ̇ 𝐽/" 𝑝̇ = 𝐽/5 𝑐 − 𝑀0 𝐽 ̇ 𝐽/" 𝑝̇ dependence on 𝑝̇
when 𝑝 = E-E pose, this is the robot dynamic model in Cartesian coordinates
NOTE: in this case, we have implicitly assumed than 𝑀 = 𝑁 (no redundancy!)
Robotics 2 27
Example of coordinate transformation
planar 2R robot using absolute coordinates
/5 𝑎" − 𝑎$ − 2𝑎# 𝑐#
/" 𝑎# 𝑐# 𝑎% 𝑐"
𝑀0 = 𝐽 𝑀 𝐽 = 𝑔0 = 𝐽/5 𝑔
= 𝑎 𝑐
𝑎# 𝑐# 𝑎$ & "#
# 𝑢" − 𝑢#
−2𝑎 # 𝑠# 𝑞̇ " + 𝑞 ̇ #
𝑐0 = 𝐽/5 𝑐 = /5
𝑢0 = 𝐽 𝑢8 = 𝑢#
𝑎# 𝑠# 𝑞̇ "#
Robotics 2 28
Robot dynamic model
in the task/Cartesian space, with redundancy
4) isolate on the right-hand side the generalized forces 𝐹 in the task space …
Robotics 2 29
Robot dynamic model
in the task/Cartesian space, with redundancy
6!
𝐽 𝑞 𝑀 6! 𝑞 𝐽. 𝑞 𝑟̈ = 𝐹 +
6!
𝐽 𝑞 𝑀 6! .
𝑞 𝐽 𝑞 𝐽 𝑞 𝑀 6! 𝑞 𝐼 − 𝐽. 𝑞 𝐻(𝑞) 𝜏/ − 𝑛 𝑞, 𝑞̇ ̇ 𝑞̇
+ 𝐽(𝑞)
.
5) choose as generalized inverse 𝐻 = 𝐽𝑀 6! 𝐽. 6! 𝐽𝑀 6! = 𝐽5 #
, i.e., the transpose
of the inertia-weighted pseudoinverse of the task Jacobian (see block of slides #2)
in this way, the joint torque component 𝜏; will NOT affect the task acceleration 𝑟̈
6! 6!
𝐽 𝑞 𝑀 6! 𝑞 𝐽. 𝑞 𝑟̈ = 𝐹 + 𝐽 𝑞 𝑀 6! 𝑞 𝐽. 𝑞 𝐽 ̇ 𝑞 𝑞̇ − 𝐽 𝑞 𝑀 6! 𝑞 𝑛 𝑞, 𝑞̇
𝑑 𝑞̇ 1 𝑑𝑞:; 𝑑𝑟 ;
𝑑 𝑟̇
𝑞̈ 1 𝑡 = = 𝑟̇ + 𝑞: = 𝑞:;; (𝑟)𝑟̇ # (𝑡) + 𝑞:; (𝑟)𝑟(𝑡)
̈
𝑑𝑡 𝑑𝑟 𝑑𝑡 𝑑𝑡
n uniform scaling of the trajectory occurs when 𝑟 𝑡 = 𝑘𝑡
𝑞̇ 1 𝑡 = 𝑘𝑞:; (𝑘𝑡) 𝑞̈ 1 𝑡 = 𝑘 # 𝑞:;; (𝑘𝑡)
Q: what is the new input torque needed to execute the scaled trajectory?
(suppose dissipative terms can be neglected)
Robotics 2 31
Dynamic scaling of trajectories
inverse dynamics under uniform time scaling
n the new torque could be recomputed through the inverse dynamics, for
every 𝑟 = 𝑘𝑡 ∈ 0, 𝑇 6 = [0, 𝑘𝑇] along the scaled trajectory, as
𝜏: 𝑘𝑡 = 𝑀 𝑞: 𝑞:;; + 𝑐 𝑞: , 𝑞:; + 𝑔(𝑞: )
n however, being the dynamic model linear in the acceleration and
quadratic in the velocity, it is
𝜏( 𝑡 = 𝑀 𝑞( 𝑞̈ ( + 𝑐 𝑞( , 𝑞̇ ( + 𝑔 𝑞( = 𝑀 𝑞5 𝑘 # 𝑞566 + 𝑐 𝑞5 , 𝑘𝑞56 + 𝑔(𝑞5 )
= 𝑘 # 𝑀 𝑞5 𝑞566 + 𝑐 𝑞5 , 𝑞56 + 𝑔 𝑞5 = 𝑘 # 𝜏5 𝑘𝑡 − 𝑔 𝑞5 + 𝑔 𝑞5
n thus, saving separately the total torque 𝜏( (𝑡) and gravity torque 𝑔( (𝑡)
in the inverse dynamics computation along the original trajectory, the
new input torque is obtained directly as
𝑘 > 1: slow down
1 ⇒ reduce torque
𝜏) 𝑘𝑡 = " 𝜏! 𝑡 − 𝑔 𝑞! (𝑡) + 𝑔 𝑞! (𝑡)
𝑘 𝑘 < 1: speed up
⇒ increase torque
gravity term (only position-dependent): does NOT scale!
Robotics 2 32
Dynamic scaling of trajectories
numerical example
n rest-to-rest motion with cubic polynomials for planar 2R robot under gravity
(from downward equilibrium to horizontal link 1 & upward vertical link 2)
n original trajectory lasts 𝑇 = 0.5 s (but maybe violates the torque limit at joint 1)
only joint 1 torque is shown
torque only due
to non-zero initial
acceleration
at equilibrium
= zero gravity
torque
𝜏! 0.1 − 𝑔 𝑞! 0.1 = 20 Nm
*
#$
𝜏" 2 A 0.1 − 𝑔 𝑞" 2 A 0.1 = = 5 Nm
#"
𝑇 = 0.5 s
*
gravity torque
component * *
does not scale 0 Nm
scaled
total
torque 1
4
§ given the initial and final robot configurations (at rest) and
actuator torque bounds, find
n the minimum-time Tmin motion