You are on page 1of 16

Robotics 2

Dynamic model of robots:

Newton-Euler approach

Prof. Alessandro De Luca

Approaches to dynamic modeling

energy-based approach Newton-Euler method

(Euler-Lagrange) (balance of forces/torques)
! multi-body robot seen as a whole ! dynamic equations written
separately for each link/body
! constraint (internal) reaction forces
between the links are automatically ! inverse dynamics in real time
eliminated: in fact, they do not ! equations are evaluated in a
perform work numeric and recursive way
! closed-form (symbolic) equations ! best for synthesis
are directly obtained (=implementation) of model-
! best suited for study of dynamic based control schemes
properties and analysis of control ! by elimination of reaction forces and
schemes back-substitution of expressions, we
still get closed-form dynamic
equations (identical to those of Euler-
Robotics 2 2
Derivative of a vector in a moving frame
from velocity to acceleration
( )
R i = S 0" i 0 Ri

derivative of unit vector


Robotics 2 3
Dynamics of a rigid body
! Newton dynamic equation
! balance: sum of forces = variation of linear momentum
" fi = dt
(mv c ) = m v c
! Euler dynamic equation
! balance: sum of torques = variation of angular momentum
d d
= I
" i dt ( ) # = I
# + (R I R T ) # = I# + R I R T + R I R T #
( )
= I# + S(# )R I R T# + R I R T S T (# ) # = I# + # $ I#

! principle of action and reaction

! ! forces/torques: applied by body i to body i+1
= - applied by body i+1 to body i
Robotics 2 4
Newton-Euler equations -1

link i

center vci fi force applied

of mass from link (i-1) on link i
zi-1 ci zi
fi+1 force applied
. from link i on link (i+1)
. fi+1
Oi-1 Oi mig gravity force
axis qi axis qi+1
all vectors expressed in the
same RF (better RFi)

Newton equation fi " fi+1 + mi g = mi aci N

linear acceleration of ci
Robotics 2 5

Newton-Euler equations -2
link i
"i torque applied zi-1 zi
from link (i-1) on link i ri-1,ci ri,ci "i+1
"i+1 torque applied . .
from link i on link (i+1) Oi-1 Oi fi+1
axis qi axis qi+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 all vectors expressed in

the same RF (RFi !!)
Euler equation

angular acceleration of bodyi

Robotics 2 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


the gravity force term can be skipped in Newton equation, if added here
Robotics 2 7
Backward recursion
Computing forces and torques
eliminated, if inserted
from Ni to Ni-1 in forward recursion (i=0) initializations


from Ei 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
for prismatic joint
FP N scalar
for revolute joint equations
at the end
generalized forces add here dissipative terms
(in rhs of Euler-Lagrange eqs) (here viscous friction only)
Robotics 2 8
Comments on Newton-Euler method
! the previous forward/backward recursive formulas can
be evaluated in symbolic or numeric form
! 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

Robotics 2 9
Newton-Euler algorithm
efficient computational scheme for inverse dynamics

(at robot base) numeric steps

at every instant t



inputs outputs



(force/torque exchange
Robotics 2 10
Matlab (or C) script
general routine NE"(arg1,arg2,arg3)
! data file (of a specific robot)
! 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)
! input
! 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
! generalized force u for the complete inverse dynamics
! or single terms of the dynamic model

Robotics 2 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) ei = i-th column
of identity matrix
! generalized momentum
. .
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 final torques

initial torques = u1 ! 0, u2 = 0
free equilibrium balance
configuration link weights
+ in final (0,90)
zero initial 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) but with small coefficient
! given u, integrate acceleration computed as .
.. new state (q,q)
q = InvB * [u n]
and repeat over time...
Robotics 2 16