Robotics 2 3
Bounds on dynamic terms
! for an open-chain (serial) manipulator, there always exist
positive. real constants k0 to k7 such that, for any value of
q and q
2
k 0 " B(q) " k 1 + k 2 q + k 3 q inertia matrix
factorization matrix of
S(q, q˙ ) " q˙ k 4 + k5 q
( ) Coriolis/centrifugal terms
Comau Smart NJ130 MIT Direct Drive Mark II and Mark III
Robotics 2 5
Robots with closed kinematic chains -2
4 !5 center of mass:
3
q2 - ! arbitrary ! ci
! c3 y ! c4
1
5 E-E parallelogram:
! c1 ! !1 = ! 3
q2 ! !2 = ! 4
! 2 ! q1 x
! c2
direct kinematics
!
" ! 1c1 % " ! 5 cos(q2 ( ) ) % " ! 1!
c1 % " ! 5 c2 %
p EE = $ + =
' $ ! sin(q ( ) ) ' $ !! ' ( $! s '
! s
# 1 1& # 5 2 s
& # 1 1& # 5 2&
!
position of center of masses
!" ! c % "! c % "! c % "! c % "! c % "! c %
p c1 = $ c1 1 ' p c2 = $ c2 2 ' p c3 = $ 2 2 ' + $ c3 1 ' p c4 = $ 1 1 ' ( $ c4 2 '
# ! c1s1 & # ! c2s 2 & # ! 2s 2 & # ! c3s1 & # ! 1s1 & # ! c4s 2 &
Robotics 2 7
! ! ! !
Kinetic energy
linear/angular velocities
# "! s & # "! s & # "! s & # "! s &
v c1 = % c1 1 ( q˙ 1 v c2 = % c2 2 ( q˙ 2 v c3 = % c3 1 ( q˙ 1 + % 2 2 ( q˙ 2
$ ! c1c1 ' $ ! c2c2 ' $ ! c3c1 ' $ ! 2s 2 '
# "! s & # "! s &
v c4 = % 1 1 ( q˙ 1 " % c4 2 ( q˙ 2 "1 = " 3 = q˙ 1 " 2 = " 4 = q˙ 2
$ ! 1c1 ' $ ! c4c2 '
! ! !
Note: a 2D notation is used here!
! 1 2 ! 1 ! 1 1
Ti 2
T1 = m1! c1q1 + Ic1,zzq1
˙ ˙ 2
T2 = m2! c2q2 + Ic2,zz q˙ 22
2
˙ 2
2 2 2 2
1 1
T3 = Ic3,zz q1 + m3 (!22q˙ 22 + !2c3q˙ 12 + 2! 2! c3c2"1q˙ 1q˙ 2 )
˙ 2
2 2
! 1 2 1! 2 2 2 2
T4 = Ic4,zz q˙ 2 + m4 (! 1q˙ 1 + ! c4q˙ 2 " 2! 1! c4c2"1q˙ 1q˙ 2 )
2 2
!
Robotics 2 8
!
Robot inertia matrix
4
1
T = " Ti = q˙ TB(q)q˙
i=1 2
# Ic1,zz + m1!2c1 + Ic3,zz + m3!2c3 + m4!21 symm &
B(q) = % (
$ (m3! 2! c3! " m4! 1! c4 )c2"1 Ic2,zz + m2!2c2 + Ic4,zz + m4!2c4 + m3!22 '
structural condition
in mechanical design
m 3 ! 2 ! c3 = m 4 ! 1! c4 (*)
!
Robotics 2 9
Potential energy and gravity terms
from the y-components of vectors pci
Ui U1 = m1g0! c1s1 U2 = m2g0! c2s 2
U3 = m3g0 (! 2s 2 + ! c3s1 ) U4 = m4g0 (! 1s1 " ! c4s 2 )
4
! !
U= " Ui
! ! i=1 gravity
# " U & T # g0 (m1! c1 + m3! c3 + m4! 1 )c1 & # g1 (q1 ) & components
g(q) = % ( = % (=% ( are always
$ " q ' $ g0 (m2! c2 + m3! 2 ) m4! c4 )c2 ' $g2 (q2 )' “decoupled”
in addition,
! b11q ˙˙1 + g1 (q1 ) = u1 ui
(non-conservative) torque
when (*) holds b22˙q˙2 + g2 (q2 ) = u2 producing work on qi
!
further structural conditions in the mechanical design lead to g(q) ≡ 0!!
Robotics 2 ! 10
Adding dynamic terms ...
! dissipative phenomena due to friction at the joints/transmissions
! viscous, dry, Coulomb, ...
joint 2
RFw link 2 link N
link 1 RFN-1
(world frame)
RF1
RF0
RFN
link N - 1
. .
link 0 motor 2 joint N !mi = nri !i
(base) joint1
"i = nri "mi
.
!m2
Robotics 2 12
Resulting dynamic model
! simplifying assumption: in the rotational part of kinetic
energy, only the “spinning” rotor velocity is considered
1 2 1 1 N
1
Tmi = Imi "˙mi = Imi n2ri q˙ 2i = Bmi q˙ 2i Tm = " Tmi = q˙ T Bm q˙
2 2 2 i=1 2
diagonal, >0
! including all added terms, the robot dynamics becomes
moved to
! ! the left ...
(B(q) + Bm )˙q˙ + c(q, q˙ ) + g(q) + FV q˙ + FS sgn(q˙ ) = "
motor torques
constant does NOT Fv > 0, FS > 0 (after
contribute to c diagonal reduction gears)
! scaling by the reduction gears, looking from the motor side
diagonal except the terms b
! ( " b ii(q) %+ "1 %( + jj motor torques
*Im + diag# 2 &- ˙.˙m + diag # & ** / bj (q)q ˙˙ j + f(q, q˙ )-- = 0m (before
) n
$ ri ', n
$ ri ' ) j=1,..,n , reduction gears)
Robotics 2 13
Including joint elasticity
! in industrial robots, use of motion transmissions based on
! belts
! harmonic drives
! long shafts
introduces flexibility between actuating motors (input) and
driven links (output)
! in research robots for human cooperation, compliance in
the transmissions is introduced on purpose for safety
! actuator relocation by means of (compliant) cables and pulleys
! harmonic drives and lightweight (but rigid) link design
DLR LWR-III
with harmonic drives
Dexter
with cable transmissions
elastic
motor load/link
spring
(stiffness K)
joint i
rCi kinematic frame i
CoM Ci yi
(DH or modified DH)
mig0 Oi
xi
base ri
frame 0
"r % " Ici,xx Ici,xy Ici,xz %
xi
! each link is characterized by 10 mi rCi = $ryi ' ICi = $$ Ici,yy
'
Ici,yz '
dynamic parameters $ '
#rzi & #symm Ici,zz &
! however, the robot dynamics depends in a nonlinear way on some of these
parameters (e.g., through the combination Ici,zz+mirxi2)
Robotics 2 ! ! 17
Dynamic parameters of robots -2
! since the E-L equations involve only linear operations on T and U, also
the robot dynamic model is linear in the standard parameters " # R10N$
! Robotics 2 19
Dynamic parameters of robots -4
!
Dynamic parameters of robots -5
!! the minimal number p of dynamic coefficients that is needed can also be
checked numerically (see later → Identification)
Robotics 2 21
Linear parameterization
of robot dynamics
it is always possible to rewrite the dynamic model in the form
regression a = vector of
matrix dynamic coefficients
! only the robot dynamic coefficients can be identified (not all link
standard parameters!)
Robotics 2 25
Identification experiments
1. choose a motion trajectory that is sufficiently “exciting”, i.e.,
" explores the robot workspace and involves all components in the
robot dynamic model
" is periodic, with multiple frequency components
2. execute this motion (approximately) by means of a control law
" taking advantage of any available information on the robot model
. .
" usually, u = KP(qd-q)+KD(qd-q) (PD, no model information used)
.
3. measure q (encoder) and, if available, q in nc time instants
" joint velocity and acceleration can be later estimated off line by
numerical differentiation (use of non-causal filters is feasible)
4. with such measures/estimates, evaluate the regression matrix Y (on
the left) and use the applied commands (on the right) in the
expression
Y(q(t k ), q˙ (t k ), ˙q˙(t k )) a = u(t k ) k = 1,…,nc
Robotics 2 26
Least Squares (LS) identification
! set up the system of linear equations
" Y(q(t1 ), q˙ (t1 ), ˙q˙(t1 )) % " u(t1 ) %
$ ' $ '
nc ! N $ ! ' a = $ ' Ya = u
$ Y(q(t ), q˙ (t ), ˙q˙(t )) ' $ u(t ) '
# n c n c n c & # nc &
! sufficiently “exciting” trajectories, large enough number of
Robotics 2 ! 27
Additional remarks on LS identification
! it is convenient to preserve the block (upper) triangular structure of
the regression matrix, by “stacking” all time evaluations sequenced by
the rows of the original Y matrix
nc
" Y1 (q(t1 ), q˙ (t1 ), ˙q˙(t1 )) % " u1(t1 ) %
nc $ ! ' $ ! '
$ Y (q(t ), q˙ (t ), ˙q˙(t )) ' $ u (t ) '
$ 1 n c n c n c ' $ 1 nc ' Y=
N! $ Y2 (q(t1 ), q˙ (t1 ), q ˙˙(t1 )) ' u (t )
a =$ 2 1 ' Ya = u
$ ! ' $ ! '
$ YN (q(t1 ), q˙ (t1 ), ˙q˙(t1 )) ' $ uN(t1 ) '
nc $ ! ' $ ! ' nc
$ ˙˙(t n ))'& $ ' !
# YN (q(t n c ), q˙ (t n c ), q c #u N (t n )
c &
! " numerical check of full column rank is
more robust ⇔ rank = p (# of col’s)
! further practical hints _
! outlier data can be eliminated in advance (when building Y)
!
! if complex friction models are not included in Y䏙a, discard the data
Newton-Euler method
Robotics 2 31
Dynamic scaling of trajectories
uniform time scaling of motion
dqd dqs dr
qd (t) = qs (r(t)) q˙ d (t) = = = q's (r) r˙
same path executed dt dr dt
(at different instants of time)
! rest-to-rest motion with cubic polynomials for planar 2R robot under gravity
(from downward equilibrium to horizontal link 1 & upward vertical link 2)
! original trajectory lasts T=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
! 20
" s (2# 0.1) $ g(qs (2# 0.1)) = = 5 Nm
T=0.5 s 22
*
gravity torque
component * *
does not scale 0 Nm
scaled !
total
torque 1
4
!
T=0.5 s k =2 T’=1 s
T’=1 s
Robotics 2 35
!
State equations
Direct dynamics
N differential
Lagrangian
dynamic model
B(q)˙q˙ + c(q, q˙ ) + g(q) = u 2nd-order
equations
" x1 % " q % 2N
defining the vector of state variables as x = =
$ x ' $ q˙ ' ( IR
# 2& # &
state equations
!
" x˙ 1 % " x2 % " 0 % 2N differential
x˙ = $ ' = $ (1 ! ' + $ (1 ' u 1st-order
# x 2 & # (B (x1 )[c(x1 ,x 2 ) + g(x1 )] & # B (x1 ) &
˙ equations
= f(x) + G(x)u
2N!1 2N!N
" q % .
~
! another choice... x = $
˜ ' generalized x = ... (do it as exercise)
# B(q)q˙ & momentum
Robotics 2 36
Dynamic simulation
Simulink here, a generic 2-dof robot
block c(q, q˙ ) q, q˙ q˙ 1 (0) q1 (0)
scheme
q˙˙1 q˙ 1
input torque ! _
" " q1
! !
command
! +
(open-loop u B-1(q)
or in _ !
q˙˙2
!
q˙ 2
feedback)
!
"! " q2
including “inv(B)”
!
" initialization (dynamic coefficients and initial state) !
!
! Matlab
! !
" calls to (user-defined) functions for the evaluation of model terms
" choice of a numerical integration method (and of its parameters)
Robotics 2 37
… an incorrect realization
c1+ g1
q˙ 1 (0) q1 (0)
_ 1 q˙˙1 q˙ 1
u1
_ b11 " " q1
! !
b12 causality
! algebraic
! loop! principle
is violated!!
b!12 q˙ 2 (0) q2 (0)
_ !1 q˙˙2 ! q˙ 2
u2
_ b22 " " q2
! !
c2 + g2 ! !
!
inversion of the ! matrix in toto is needed
! robot inertia
(and not only of its elements on the diagonal...)
Robotics 2 38
Approximate linearization
! we can derive a linear dynamic model of the robot, which is valid
locally around a given operative condition
! useful for analysis, design, and gain tuning of linear (or, the linear
Robotics 2 40
!
Linearization along a trajectory
! variations around an equilibrium trajectory
q = qd + "q q˙ = q˙ d + "q˙ ˙˙ = q
q ˙˙ d + "q
˙˙ u = ud + "u
! after simplifications …
B(qd ) "˙q˙ + C2 (qd , q˙ d )"q˙ + D(qd , q˙ d , ˙q˙ d )"q = "u
with
N
" bi ˙˙ d e iT
D(qd , q˙ d , q
˙˙ d ) = G(qd ) + C1 (qd , q˙ d ) + # q
i=1 " q q=q
d
! ! in state-space format
# 0 I & # 0 &
"x˙ = % -1 -1 ( "x + % -1 ( "u
! $ -B (qd )D(qd , qd , qd ) -B (qd )C2 (qd , qd ) '
˙ ˙˙ ˙ $ B (qd ) '
= A(t ) "x + B (t ) "u
! Robotics 2 42
Coordinate transformation
q " IR N B(q)q
˙˙ + c(q, q˙ ) + g(q) = B(q)q
˙˙ + n(q, q˙ ) = u q 1
! J"T!
(q) # pre-multiplying the whole equation...
Robotics 2 43
Robot dynamic model
after coordinate transformation
(
˙˙ + J" T (q) n(q, q˙ ) " B(q)J"1 (q) ˙J(q)J"1 (q)p˙ = up
J" T (q)B(q)J"1 (q)p )
for actual computation,
q"p these inner substitutions q, q˙ " p,p˙
are not necessary non-conservative
generalized forces
B p (p)p
˙˙ + c p (p,p˙ ) + gp (p) = up performing work on p
symmetric,
! B p = J BJ "T "1
!
positive definite gp = J"T g
(out of singularities)
quadratic .
cp = J "T
c " BJ JJ p˙ = J"T c " B p J˙ J"1p˙
( "1 ˙ "1
) dependence on p
!
c p (p,p˙ ) = S p (p,p˙ )p˙ B˙ p " 2Sp skew - symmetric
! !
when p = E-E pose, this is the robot dynamic model in Cartesian coordinates
Q: What if the robot is redundant with respect to the Cartesian task?
! Robotics 2 44
! !
Optimal point-to-point robot motion
considering the dynamic model
" given the initial and final robot configurations (at rest) and
actuator torque bounds, find
! the minimum-time Tmin motion