Dynamic model of robots: Newton

Robotics 2
Dynamic model of robots:
Newton-Euler approach
Prof. Alessandro De Luca
Approaches to dynamic modeling
(reprise)
Newton-Euler method
(balance of forces/torques)
energy-based approach
(Euler-Lagrange)
! 
! 
! 
! 
multi-body robot seen as a whole
constraint (internal) reaction forces
between the links are automatically
eliminated: in fact, they do not
perform work
! 
! 
Robotics 2
inverse dynamics in real time
! 
closed-form (symbolic) equations
are directly obtained
best suited for study of dynamic
properties and analysis of control
schemes
dynamic equations written
separately for each link/body
! 
! 
equations are evaluated in a
numeric and recursive way
best for synthesis
(=implementation) of modelbased control schemes
by elimination of reaction forces and
back-substitution of expressions, we
still get closed-form dynamic
equations (identical to those of EulerLagrange!)
2
Derivative of a vector in a moving frame
… from velocity to acceleration
0
( )
R˙ i = S 0" i 0 Ri
!
derivative of “unit” vector
!i
Robotics 2
3
Dynamics of a rigid body
! 
Newton dynamic equation
! 
balance: sum of forces = variation of linear momentum
" fi =
! 
d
(mv c ) = m v˙ c
dt
Euler dynamic equation
! 
balance: sum of torques = variation of angular momentum
!
d
d
˙
µ
=
I
#
=
I
#
+
R I R T ) # = I#˙ + R˙ I R T + R I R˙ T #
" i dt ( )
(
dt
= I#˙ + S(# )R I R T# + R I R T S T (# ) # = I#˙ + # $ I#
(
! 
!
)
principle of action and reaction
! 
Robotics 2
forces/torques: applied by body i to body i+1
= - applied by body i+1 to body i
4
Newton-Euler equations
link i
FORCES
zi-1
center
of mass
zi
ci
Oi-1
axis i
(qi)
fi force applied
from link (i-1) on link i
vci
.
.
fi
-1
mig
Newton equation
fi+1 force applied
from link i on link (i+1)
fi+1
Oi
axis i+1
(qi+1)
mig gravity force
all vectors expressed in the
same RF (better RFi)
fi " fi+1 + mi g = mi aci
N
linear acceleration of ci
Robotics 2
5
!
Newton-Euler equations
link i
!i
TORQUES
"i torque applied
from link (i-1) on link i
zi-1
"i
"i+1 torque applied
from link i on link (i+1)
fi x ri-1,ci torque due to fi w.r.t. ci
- fi+1 x ri,ci torque due to - fi+1 w.r.t. ci
Euler equation
-2
fi
ri-1,ci
.
Oi-1
axis i
(qi)
gravity force gives
no torque at ci
zi
ri,ci
.
"i+1
fi+1
Oi
axis i+1
(qi+1)
all vectors expressed in
the same RF (RFi !!)
E
Robotics 2
angular acceleration of bodyi
6
Forward recursion
Computing velocities and accelerations
•  “moving frames” algorithm (as for velocities in Lagrange)
•  wherever there is no leading superscript, it is the same as the subscript
•  for simplicity, only revolute joints
(see textbook for the more general treatment)
initializations
AR
the gravity force term can be skipped in Newton equation, if added here
Robotics 2
7
Backward recursion
Computing forces and torques
from Ni
to Ni-1
eliminated, if inserted
in forward recursion (i=0)
initializations
F/TR
ri,ci)
from Ei
ri,ci
to Ei-1
at each step of this recursion, we have two vector equations (Ni + Ei) at the
joint providing
and
: these contain ALSO the reaction forces/torques
at the joint axis
they should be next “projected” along/around this axis
FP
generalized forces
(in rhs of Euler-Lagrange eqs)
Robotics 2
for prismatic joint
for revolute joint
add here dissipative terms
(here viscous friction only)
N scalar
equations
at the end
8
Comments on Newton-Euler method
! 
the previous forward/backward recursive formulas can
be evaluated in symbolic or numeric form
! 
! 
Robotics 2
symbolic
!  substituting expressions in a recursive way
!  at the end, a closed-form dynamic model is obtained, which
is identical to the one obtained using Euler-Lagrange (or any
other) method
!  there is no special convenience in using N-E in this way
numeric
!  substituting numeric values (numbers!) at each step
!  computational complexity of each step remains constant ⇒
grows in a linear fashion with the number N of joints (O(N))
!  strongly recommended for real-time use, especially when the
number N of joints is large
9
Newton-Euler algorithm
efficient computational scheme for inverse dynamics
numeric steps
at every instant t
(at robot base)
AR
FP
F/TR
outputs
inputs
AR
FP
F/TR
Robotics 2
(force/torque exchange
environment/E-E)
10
Matlab (or C) script
general routine NE"(arg1,arg2,arg3)
! 
data file (of a specific robot)
! 
! 
! 
! 
input
! 
! 
! 
number N and types ! ={0,1}N of joints (revolute/prismatic)
table of DH kinematic parameters
list of dynamic parameters of the links (and of the motors)
vector parameter " = {0g,0} (presence or absence of gravity)
three ordered vector arguments
!  typically, samples of joint position, velocity, acceleration
taken from a desired trajectory
output
! 
! 
Robotics 2
generalized force u for the complete inverse dynamics
… or single terms of the dynamic model
11
Examples of output
! 
complete inverse dynamics
..
. ..
.
u = NE0g(qd,qd,qd) = B(qd)qd+c(qd,qd)+g(qd)=ud
! 
gravity terms
u = NE0g(q,0,0) = g(q)
! 
centrifugal and Coriolis terms
.
.
u = NE0(q,q,0) = c(q,q)
! 
i-th column of the inertia matrix
u = NE0(q,0,ei) = bi(q)
! 
generalized momentum
.
ei = i-th column
of identity matrix
.
u = NE0(q,0,q) = B(q)q
Robotics 2
12
Inverse dynamics of a 2R planar robot
desired (smooth) joint motion:
quintic polynomials for q1, q2 with
zero vel/acc boundary conditions
from (90°,-180°) to (0°,90°) in T=1 s
Robotics 2
⇔
13
Inverse dynamics of a 2R planar robot
zero
initial torques =
free equilibrium
configuration
+
zero initial
accelerations
final torques
u1 ! 0, u2 = 0
balance
link weights
in final (0°,90°)
configuration
motion in vertical plane (under gravity)
both links are thin rods of uniform mass m1 = 10 kg, m2 = 5 kg
Robotics 2
14
Inverse dynamics of a 2R planar robot
torque contributions at the two joints for the desired motion
= total,
= inertial
= Coriolis/centrifugal,
= gravitational
Robotics 2
15
Use of NE routine for simulation
direct dynamics
.
! 
numerical integration, at current state (q,q), of
..
q=
! 
B-1(q)
.
[u – (c(q,q)+g(q))]=
B-1(q)
[u – n(q,q)]
Coriolis, centrifugal, and gravity terms
.
complexity
n = NE0g(q,q,0)
! 
O(N)
i-th column of the inertia matrix, for i =1,..,N
bi = NE0(q,0,ei)
! 
O(N2)
numerical inversion of inertia matrix
InvB = inv(B)
! 
.
O(N3)
but with small coefficient
given u, integrate acceleration computed as
..
q = InvB * [u – n]
Robotics 2
.
new state (q,q)
and repeat over time...
16