Upload
trinhtu
View
236
Download
0
Embed Size (px)
Citation preview
Approaches to dynamic modeling (reprise)
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
! closed-form (symbolic) equations are directly obtained
! best suited for study of dynamic properties and analysis of control schemes
Newton-Euler method (balance of forces/torques)
! dynamic equations written separately for each link/body
! inverse dynamics in real time
! equations are evaluated in a numeric and recursive way
! best for synthesis (=implementation) of model-based control schemes
! by elimination of reaction forces and back-substitution of expressions, we still get closed-form dynamic equations (identical to those of Euler-Lagrange!)
Robotics 2 2
Derivative of a vector in a moving frame
!i
derivative of “unit” vector
… from velocity to acceleration
!
0 ˙ R i = S 0" i( )0Ri
Robotics 2 3
Dynamics of a rigid body
!
fi" =ddt
mvc( ) = m ˙ v c
! Newton dynamic equation ! balance: sum of forces = variation of linear momentum
! Euler dynamic equation ! balance: sum of torques = variation of angular momentum
! principle of action and reaction ! forces/torques: applied by body i to body i+1 = - applied by body i+1 to body i
!
µi" =ddt
I#( ) = I ˙ # +ddt
R I R T( )# = I ˙ # + ˙ R I R T + R I ̇ R T( )#= I ˙ # + S #( )R I R T# + R I R TST #( )# = I ˙ # +# $ I#
Robotics 2 4
Newton-Euler equations - 1
link i
axis i (qi)
vci
axis i+1 (qi+1)
Oi-1 Oi . .
fi fi+1
ci zi
mig
fi force applied from link (i-1) on link i
fi+1 force applied from link i on link (i+1)
Newton equation
mig gravity force
all vectors expressed in the same RF (better RFi)
FORCES
N
zi-1
linear acceleration of ci
center of mass
!
fi" fi+1 + mig = miaci
Robotics 2 5
Newton-Euler equations - 2 link i !i
Oi-1 Oi . .
"i "i+1 ri-1,ci ri,ci
"i torque applied from link (i-1) on link i
"i+1 torque applied from link i on link (i+1)
Euler equation
TORQUES
fi fi+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
E
zi zi-1
all vectors expressed in the same RF (RFi !!)
Robotics 2 6 angular acceleration of bodyi
axis i (qi)
axis i+1 (qi+1)
gravity force gives no torque at ci
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
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
from Ni to Ni-1
from Ei to Ei-1
F/TR
initializations
add here dissipative terms (here viscous friction only)
eliminated, if inserted in forward recursion (i=0)
Robotics 2 8
generalized forces (in rhs of Euler-Lagrange eqs)
for prismatic joint
for revolute joint N scalar
equations FP
at the end
ri,ci ri,ci)
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
AR
AR
F/TR
F/TR
FP
FP
inputs outputs
(force/torque exchange environment/E-E)
(at robot base) numeric steps at every instant t
Robotics 2 10
! 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
general routine NE"(arg1,arg2,arg3)
Matlab (or C) script
Robotics 2 11
Examples of output
! complete inverse dynamics
! gravity terms
! centrifugal and Coriolis terms
! i-th column of the inertia matrix
! generalized momentum
ei = i-th column of identity matrix
u = NE0g(q,0,0) = g(q)
u = NE0(q,0,ei) = bi(q)
u = NE0(q,0,q) = B(q)q . .
u = NE0(q,q,0) = c(q,q) . .
u = NE0g(qd,qd,qd) = B(qd)qd+c(qd,qd)+g(qd)=ud
. . .. ..
Robotics 2 12
Inverse dynamics of a 2R planar robot
Robotics 2 13
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
⇔
Inverse dynamics of a 2R planar robot
Robotics 2 14
motion in vertical plane (under gravity) both links are thin rods of uniform mass m1 = 10 kg, m2 = 5 kg
zero initial torques = free equilibrium configuration
+ zero initial
accelerations
final torques u1 ! 0, u2 = 0
balance link weights
in final (0°,90°) configuration
Inverse dynamics of a 2R planar robot
Robotics 2 15
torque contributions at the two joints for the desired motion = total, = inertial = Coriolis/centrifugal, = gravitational
Use of NE routine for simulation direct dynamics
! numerical integration, at current state (q,q), of
! Coriolis, centrifugal, and gravity terms
! i-th column of the inertia matrix, for i =1,..,N
! numerical inversion of inertia matrix
! given u, integrate acceleration computed as
bi = NE0(q,0,ei)
InvB = inv(B)
q = B-1(q) [u – (c(q,q)+g(q))]= B-1(q) [u – n(q,q)] . ..
Robotics 2 16
.
complexity O(N)
O(N2)
O(N3) but with small coefficient
n = NE0g(q,q,0)
.
.
q = InvB * [u – n] .. new state (q,q)
and repeat over time...
.