Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ujoints(t) uCartesian(t)
q(t)
!
initial state at t != 0
! experimental solution
!
! apply torques/forces with motors and measure joint variables
!
Approaches to dynamic modeling
Euler-Lagrange method Newton-Euler method
(energy-based approach) (balance of forces/torques)
! dynamic equations in ! dynamic equations in
symbolic/closed form numeric/recursive form
! best for study of dynamic ! best for implementation of
properties and analysis of control schemes (inverse
control schemes dynamics in real time)
Robotics 2 5
Euler-Lagrange method
(energy-based approach)
basic assumption: the N links in motion are considered as rigid bodies
(+ possibly, concentrated elasticity at the joints)
1 ˙2
g0 L = T " U = I # + mg0 dcos # " U0
2
n!m, " Fx
!
"L d "L "L
p x = ! sin" = I #˙ = I #˙˙ = $mg0 dsin#
˙p x = ! cos " # "˙ = J x!
"˙ "#˙ dt "#˙ "#
I ˙˙ m "m % b! (
˙ ! "m
"
2 m + g0 d sin = #m $ ' 2 + b "
m* m + cos + Fx
n n n &n ) n n
position of 1
rc = " r dm
center of mass (CoM) mB
RFc when!all vectors are referred to a body frame
RFc attached to the CoM, then
rc !
rc = 0 ⇒ " B r dm = 0
RF0 kinetic energy T=
1
v T
(x,y,z) v(x,y,z)dm
2
" B
(fundamental) !
kinematic relation v = v c + " # r = v c + S(")r
for a rigid body
! skew-symmetric matrix
Robotics 2 10
!
Kinetic energy of a rigid body (cont)
1 T
T= # [ v c + S(")r ] [v c + S(")r ] dm
2B sum of elements
on the diagonal
1 T T 1 T T of a matrix
= # v c v c dm + # v c S(")r dm + # r S (")S(")r dm
2B B
2B
aTb=trace{abT}
1 T T 1
= m vc vc = v c S(") # r dm = 0 = $ trace{ S(")r# r T
S T (")} dm
2 B 2 B
!
1 % T
( T
translational = trace{ S(")' $ r# r dm* S (")}
2 &B )
! kinetic energy
!
(point mass 1
in CoM) + = trace{ S(") Jc S T (")}
2
rotational 1
König theorem kinetic energy = " T Ic " Euler matrix
(of the whole body)
2 Ex #1: provide the expressions
of the elements of Euler matrix Jc
Ex #2: prove last equality and
body inertia matrix provide the expressions of the
elements of inertia matrix Ic
(around the CoM)
Robotics 2 ! 11
Examples of body inertia matrices
homogeneous bodies of mass m, with axes of symmetry
Robotics 2 13
Kinetic energy of a robot link
1 T 1 T
Ti = mi v ci v ci + " i Ici " i
2 2
!i, Ici should be expressed in the same reference frame,
but the product !iTIci!i is invariant w.r.t. any chosen frame
!
Robotics 2 14
!
.
Dependence of T from q and q
"i vci
link i-1 qN
link 1
qi+1
q2 qi-1 link i link N
q1 qi
" ! 0 ! 0%
v ci = JLi (q) q˙ = $ 1 ! i 0 ! 0 ' q˙ 3 rows
$$ ''
# ! 0 ! 0&
(partial) Jacobians
typically expressed in RF0 # ! 0 ! 0&
" i = JAi(q) q˙ = % 1 ! i 0 ! 0 ( q˙ 3 rows
! %% ((
$ ! 0 ! 0'
Robotics 2 15
Final expression of T
1 N
T = # (mi v ciT v ci + " iT Ici " i)
2 i=1
N
1 T# T T
&
NOTE: = q˙ % "mi JLi (q)JLi(q) + JAi(q)Ici JAi(q)( q˙
in practice, NEVER 2 $ i=1 '
!
use this formula constant if ! i
(or partial Jacobians) is expressed in RFci
for computing T; else
a better method
! 1 T 0
Ici(q)= 0 R i (q) i Ici 0 R iT (q)
is available...
T(q, q˙ ) = q˙ B(q)q˙
2
robot (generalized) inertia ! matrix
" symmetric
" positive definite,∀q ⇒ always invertible
Robotics 2 16
!
Robot potential energy
assumption: GRAVITY contribution only
N
U = " Ui N rigid bodies (+ fixed base)
i=1
! Ui = " mi g Tr0,ci
! typically
gravity acceleration position of the
expressed
vector center of mass of link i
in RF0
dependence
! on q
"r0,ci % 0 "ri,ci % constant
1 i(1
$ 1 ' = A1 (q1 ) A2 (q2 )! A i (qi ) $ 1 '
in RFi
# & # &
NOTE: need to work with homogeneous coordinates
Robotics 2 17
Summarizing ...
positive definite
kinetic 1 T 1
T = q˙ B(q)q˙ = " bij (q)q˙ i q˙ j # 0 quadratic form
energy 2 2 i,j T = 0 q˙ = 0
potential U = U(q)
energy
Lagrangian L(q, q˙ ) = T(q, q˙ ) " U(q) !
!
Euler-Lagrange ! d "L "L
# = uk k = 1,...,N
equations dt "q˙ k "qk
!
non-conservative (active/dissipative)
generalized forces performing work on qk coordinate
!
Robotics 2 18
Applying Euler-Lagrange equations
(the scalar derivation; see Appendix for vector format)
1
L(q, q˙ ) = " bij (q)q˙ iq˙ j # U(q)
2 i,j
"L d "L "b kj
= # b kj q˙ j = # b kjq
˙˙ j + # q˙ i q˙ j
"q˙ k j dt "q˙ k j i,j "qi
!
(dependences on q
are not shown) "L 1 "bij "U
= # q˙ i q˙ j $
"qk 2 i,j "qk "qk
! !
..
LINEAR terms in ACCELERATION q
.
QUADRATIC terms in VELOCITY q
!
NONLINEAR terms in CONFIGURATION q
Robotics 2 19
k-th dynamic equation ...
d "L "L
# = uk
dt "q˙ k "qk
% # b kj 1 # b ij ( #U
" bkj (q)qj +" ' # q $ 2 # q * qiqj + # q = uk
˙˙ ˙ ˙
j i, j & i k ) k
!
exchanging
indices i,j
1. B(q)q
˙˙ + c(q, q˙ ) + g(q) = u
c k (q, q˙ ) = q˙ T C k (q)q˙ k-th component
T
of vector c
k-th column #
1 " bk # " bk & "B &
of matrix B(q) Ck (q) = % +% ( ) ( symmetric
2 % " q $ " q ' " qk ( matrix
$ '
! !
2. B(q)q
˙˙ + S(q, q˙ )q˙ + g(q) = u
NOTE: !
these models NOT a
are in the form
symmetric s kj (q, q˙ ) = " c kij (q)q˙ i factorization of c
"(q, q˙ , q
˙˙) = u by S is not unique!
matrix i
as expected
Robotics 2 22
Dynamic model of a PR robot
T = T1 + T2 U = constant
y (on horizontal plane)
d pc2 # q1 " dc1 &
2 T
p c1 = % 0 ( v c1 = p˙ c1 p˙ c1 = q˙ 12
dc1 % 0 (
q2 $ '
! 1
pc1 x T1 = m1q˙ 12
! 2
q1 !
1 T 1 T
T2 = m2 v c2 v c2 + "2 Ic2 "2
2 2
" q1 + d cos q2 % # q˙ 1 " d sin
! q2 q˙ 2 & #0&
p c2 = $ d sinq2 ' v c2 = % d cos q2 q˙ 2 ( "2 = % 0 (
$ ' % ( %% ((
0 % 0 (
# & ! $ ' $ q˙ 2 '
1 1
T2 = m2 (q1 + d q2 " 2d sinq2 q1 q2 ) + Ic2,zz q˙ 22
˙ 2 2 2
˙ ˙ ˙
2 2
! Robotics 2 ! ! 23
Dynamic model of a PR robot (cont)
# m1 + m2 "m2d sinq2 & " c1 (q, q˙ ) %
B(q) = % c(q, q˙ ) = $ '
$ "m2d sinq2 Ic2,zz + m2d2 (' c q,
# 2( )& q˙
b1 b2 c k (q, q˙ ) = q˙ T C k (q)q˙
T
#
1 " bk # " bk & "B &
where Ck (q) = % +% ( ) (
! 2 " q $ " q ' " qk (
% !
$ '
!
1 ##0 0 & #0 0 & #0 0&&
C1 (q) = % % +% "% (
2 $ $ 0 "m2d cosq2 ' $ 0 "m2d cosq2 ' $ 0 0 (' '
( (
! c1 (q, q˙ ) = "m2d cos q2 q˙ 22
1 # # 0 "m2d cos q2 & # 0 0& # 0 "m2d cos q2 & &
C2 (q) = % % ( +% ( "% ((
! 2 $$0 0 ' $ "m2d cos q2 0 ' $ "m2d cos q2 0 ''
=0 ! c2 (q, q˙ ) = 0
Robotics 2 24
Dynamic model of a PR robot (cont)
B(q)q
˙˙ + c(q, q˙ ) = u
# m1 + m2 "m2d sinq2 & # ˙q˙1 & # "m2d cos q2 q˙ 22 & #u1 &
% "m d sin q 2 ( % ˙˙ ( + % ( = %u (
$ 2 2
q
Ic2,zz + m2d ' $ 2 ' $ 0 ' $ 2'
!
NOTE: the bNN element (here, for N=2)
is always a constant!
! Q1: why Coriolis terms are not present?
Q2: when applying a force u1, does the second joint accelerate? … always?
Q3: what is the expression of a factorization matrix S? … is it unique?
Q4: which is the configuration with “maximum inertia”?
Robotics 2 25
A structural property
matrix B˙ " 2S is skew-symmetric
(when using Christoffel symbols to define matrix S)
Proof
˙b = # "b kj 1 % # b kj # b ki # b ij (
kj ! q˙ i 2s kj = 2" c kjiq˙ i = 2" ' + $ * q˙ i
i "qi i i 2 & # qi # qj # qk )
x T B˙ " 2S x = 0, #x
( )
Robotics !
2 26
Energy conservation
! total robot energy
1
E = T + U = q˙ TB(q)q˙ + U(q)
2
! its evolution over time (using the dynamic model)
E˙ = q˙ TB(q)q˙˙ + 1 q˙ TB˙ (q)q˙ + " U q˙
! 2 "q here, any
1 factorization
= q˙ T (u # S(q, q˙ )q˙ # g(q)) + q˙ TB˙ (q)q˙ + q˙ T g(q) of vector c
2 by a matrix S
1 can be used
= q˙ Tu + q˙ T B˙ (q) # 2S(q, q˙ ) q˙
( )
2
! if u≡0, total energy is constant (no dissipation or increase)
E˙ = 0 q˙ T B˙ " 2S q˙ = 0, #q, q˙
( ) E˙ = q˙ Tu
!
in general, the variation
weaker than skew-symmetry, of the total energy is
as the external velocity is the same equal to the work of
that appears in the internal matrices non-conservative forces
!Robotics 2 ! ! 27
Appendix:
Vector format derivation of dynamic model
T T
d #" L & #" L & 1
% ( )% ( = u L = q˙ TB(q)q˙ " U(q)
dt $ " q˙ ' $ " q ' 2 [0 ... 1 ... 0]
N
B(q) = [b1 (q) ... bi (q) ... bN (q)] = "bi(q)e iT i-th
position
!
i=1
! T ! dyadic expansion
T
#" L & d # & N #
T
T "L ˙ "bi &
% ( = (q˙ B(q)) = B(q)q˙ % ( = B(q)q ˙˙ + B(q)q˙ = B(q)q ˙˙ + )% ( q˙ q˙ i
$ " q˙ ' dt $ " q˙ ' i=1 $ "q '
!
T T
# " L & T # 1 T # N " bi T & " U & # 1 T # N " bi & " U & 1 N #
" bi & T
# "U & T
% ( = %% q % )
˙ e i (q * (( = %% q %)
˙ ˙ qi ( * (( = )% ( qi q * % (
˙ ˙ ˙
$ " q' $ 2 $ i=1 " q ' " q ' $ 2 $ i=1 " q ' " q ' 2 i=1 $ " q ' $ " q'
! !
+N $ T' . T
"b 1 "b $ ' $ "U '
B(q)q ˙˙ + -*& i # & i ) )q˙ i 0 q˙ + & ) = u
-, i=1 &% " q 2 % " q ( )( 0/ % " q (
! k-th row of matrix S
s kT (q, q˙ ) = q˙ T Ck (q) S(q, q˙ ) g(q)
Robotics 2 28