06 NewtonEulerDynamics
06 NewtonEulerDynamics
06 NewtonEulerDynamics
!
𝑣̇ $ = 0𝑎$ = 0𝑅$ 𝑖 𝑎$ = 0𝑅$ $𝑣̇ $ + 0𝑅̇ $ 𝑖 𝑣$
= 0𝑅$ $𝑣̇ $ + 0𝜔$ × 0𝑅$ 𝑖 𝑣$ = 0𝑅$ $
𝑣̇ $ + $ 𝜔$ × 𝑖 𝑣$
𝑒$
Robotics 2 3
Dynamics of a rigid body
n Newton dynamic equation
n balance: sum of forces = variation of linear momentum
𝑑
3 𝑓$ = 𝑚𝑣6 = 𝑚𝑣̇6
𝑑𝑡
n Euler dynamic equation
n balance: sum of torques = variation of angular momentum
𝑑 𝑑
3 𝜇$ = 𝐼𝜔 = 𝐼 𝜔̇ + ̅ : 𝜔 = 𝐼 𝜔̇ + 𝑅̇ 𝐼𝑅
𝑅 𝐼𝑅 ̅ : + 𝑅𝐼𝑅
̅ ̇: 𝜔
𝑑𝑡 𝑑𝑡
= 𝐼 𝜔̇ + 𝑆 𝜔 𝑅 𝐼𝑅̅ : 𝜔 + 𝑅 𝐼𝑅̅ : 𝑆 : 𝜔 𝜔 = 𝐼 𝜔̇ + 𝜔 × 𝐼𝜔
linear acceleration of 𝐶$
Robotics 2 5
Newton-Euler equations -2
link 𝑖
TORQUES 𝜔$
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 𝑁$ to 𝑁$C@ in forward recursion (𝑖 =0) initializations
$ $
𝑓$ = 𝑅$?@ $?@𝑓$?@ + 𝑚$ $
𝑎6$ − $𝑔 𝑓R?@ 𝜏R?@
F/TR
$ $
𝜏$ = 𝑅$?@ $?@𝜏$?@ + $
𝑅$?@ $?@𝑓$?@ × $𝑟$,6$ − $𝑓$ × $
𝑟$C@,$ + $𝑟$,6$
at each step of this recursion, we have two vector equations (𝑁𝑖 + 𝐸𝑖 ) at the
joint providing 𝑓$ and 𝜏$ : these contain ALSO the reaction forces/torques
at the joint axis ⇒ they should be “projected” next along/around this axis
$ : $
𝑓$ 𝑧$C@ + 𝐹N$ 𝑞̇ $ for prismatic joint 𝑁 scalar
FP 𝑢$ = L $ : $
𝜏$ 𝑧$C@ + 𝐹N$ 𝑞̇ $ for revolute joint equations
at the end
generalized forces add any dissipative term
(in rhs of Euler-Lagrange eqs) (here, viscous friction only)
Robotics 2 8
Comments on Newton-Euler method
n the previous forward/backward recursive formulas can
be evaluated in symbolic or numeric form
n symbolic
n substituting expressions in a recursive way
n numeric
n substituting numeric values (numbers!) at each step
Robotics 2 9
Newton-Euler algorithm
efficient computational scheme for inverse dynamics
!
𝜔! , !𝜔̇ ! , !𝑎! − !𝑔 (at robot base) numeric steps
at every instant 𝑡
𝑞@
@
𝑞̇ @ AR 𝑓@ , @𝜏@ FP 𝑢@
𝑞̈ @
@
𝜔@ , @𝜔̇ @ , @𝑎@ , @𝑎6@ F/TR
U
inputs 𝑓U , U𝜏U outputs
RC@
𝜔RC@ , RC@𝜔̇ RC@ , RC@𝑎RC@ , RC@𝑎6,RC@
𝑞R
R
𝑞̇ R AR 𝑓R , R𝜏R FP 𝑢R
𝑞̈ R
R
𝜔R , R𝜔̇ R , R𝑎R , R𝑎6R F/TR
(force/torque exchange
R?@ R?@
𝑓R?@ , 𝜏R?@ environment/E-E)
Robotics 2 10
Matlab (or C) script
general routine 𝑁𝐸X (arg1, arg2, arg3)
n data file (of a specific robot)
n number 𝑁 and types σ = 0,1 R of joints (revolute/prismatic)
n table of DH kinematic parameters
n list of ALL dynamic parameters of the links (and of the motors)
n input
n vector parameter 𝛼 = 0𝑔, 0 (presence or absence of gravity)
n three ordered vector arguments
n typically, samples of joint position, velocity, acceleration
Robotics 2 11
Examples of output
n complete inverse dynamics
𝑢 = 𝑁𝐸 !^ (𝑞𝑑, 𝑞̇ b , 𝑞̈ b ) = 𝑀(𝑞b )𝑞̈ b + 𝑐(𝑞b , 𝑞̇ b ) + 𝑔(𝑞b ) = 𝑢b
n gravity term
𝑢 = 𝑁𝐸 !^ (𝑞, 0, 0) = 𝑔(𝑞)
n centrifugal and Coriolis term
𝑢 = 𝑁𝐸! (𝑞, 𝑞,̇ 0) = 𝑐(𝑞, 𝑞)
̇
n 𝑖-th column of the inertia matrix
𝑒$ = 𝑖 -th column
𝑢 = 𝑁𝐸! (𝑞, 0, 𝑒$ ) = 𝑀$ (𝑞) of identity matrix
n generalized momentum
𝑢 = 𝑁𝐸! 𝑞, 0, 𝑞̇ = 𝑀 𝑞 𝑞̇ = 𝑝
Robotics 2 12
A further example of output
n factorization of centrifugal and Coriolis term
𝑢 = 𝑁𝐸! 𝑞, 𝑞,̇ 0 = 𝑐 𝑞, 𝑞̇ = 𝑆(𝑞, 𝑞)
̇ 𝑞̇
n for later use, what about a “mixed” velocity term?
𝑢 = 𝑁𝐸! (𝑞, 𝑞̇ c , 0) = 𝑆(𝑞, 𝑞̇ c )𝑞̇ c
𝑆(𝑞, 𝑞)
̇ 𝑞̇ c ⇎ no good!
𝑢 = 𝑁𝐸! (𝑞, 𝑒$ 𝑞̇ c$ , 0) = 𝑆$ (𝑞, 𝑒$ 𝑞̇ c$ )𝑞̇ c$
a) 𝑆 𝑞, 𝑞̇ 𝑞̇ c = 𝑆 𝑞, 𝑞̇ c 𝑞̇ , when using Christoffel symbols
b) 𝑆 𝑞, 𝑞̇ + 𝑞̇ c 𝑞̇ + 𝑞̇ c = 𝑆 𝑞, 𝑞̇ 𝑞̇ + 𝑆 𝑞, 𝑞̇ c 𝑞̇ c + 2𝑆 𝑞, 𝑞̇ 𝑞̇ c
1
⇒ 𝑢 = 𝑁𝐸! 𝑞, 𝑞̇ + 𝑞̇ c , 0 − 𝑁𝐸! 𝑞, 𝑞,̇ 0 − 𝑁𝐸! (𝑞, 𝑞̇ c , 0)
2
= 𝑆 𝑞, 𝑞̇ 𝑞̇ c (i.e., with 3 calls of standard NE algorithm)
[Kawasaki et al., IEEE T-RA 1996]
Robotics 2 13
Modified NE algorithm
e X (arg1, arg2, arg3, arg4) with 4 arguments
modified routine 𝑁𝐸
[De Luca, Ferrajoli, ICRA 2009]
e X 𝑥, 𝑦, 𝑦, 𝑧 = 𝑁𝐸X (𝑥, 𝑦, 𝑧)
𝑁𝐸 consistency property
e !^ 𝑞, 0, 0, 0 = 𝑁𝐸 !^ 𝑞, 0, 0 = 𝑔(𝑞)
e.g., 𝑢 = 𝑁𝐸
e ! 𝑞, 𝑞,̇ 𝑞̇ c , 0 = 𝑆(𝑞, 𝑞)
⇒ 𝑢 = 𝑁𝐸 ̇ 𝑞̇ c with 𝑀̇ − 2𝑆 skew-symmetric
(i.e., with 1 call of modified NE algorithm)
e ! 𝑞, 𝑞,̇ 𝑒$ , 0 = 𝑆$ (𝑞, 𝑞)
⇒ 𝑢 = 𝑁𝐸 ̇
(i.e., the full matrix 𝑆 with 𝑁 calls of modified NE algorithm)
Robotics 2 14
Inverse dynamics of a 2R planar robot
Robotics 2 15
Inverse dynamics of a 2R planar robot