Solution 04

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Recapitulation: Newton-Euler-Method

The Newton-Euler-Method is a way to determine the dynamics equations that govern the movement
of a robot. The eld of analytical dynamics, or more briey dynamics, is concerned with the rela-
tionship between motion of bodies and its causes, namely the forces acting on the bodies and the
properties of the bodies (particularly mass and moment of inertia) inuencing that movement. This
is in contrast to kinematics, where we were not concerned with the physical phenomena causing robot
movement, but only with the movement itself.
Overall, the purpose of the Newton-Euler-Method is determining the joint torques that are
required to achieve a desired motion of the robot. More specially, if we have a joint trajectory (t)
that describe the positions and velocities for a certain trajectory of the robot, then the Newton-Euler
method will allow us to compute corresponding (t) that will, in an ideal world (no friction or other
disturbances for the moving robot), cause the robot to carry out the desired trajectory.
The fundamental physical relationships that are used for deriving this method are:
F = m v
C
N =
C
I +
C
I
The rst equation is the regular physical rule for forces: Force equals mass times acceleration.
This formula holds for the force that applies to the center of mass of an object. The second equation
is the rotational equivalent of force, the torque. Here,
C
I is the inertia tensor that is computed with
respect to the center of mass, a 3 3 matrix that describes the distribution of masses in a link. The
equations are named Newtons equation and Eulers equation, hence the name of the method.
The Newton-Euler-Method is composed of two phases: A forward phase and a backwards phase.
In the rst phase, the velocities and accelerations (both rotational and linear) are computed for each
joint. The formulas for the rotational velocities and accelerations, in case of a rotational joint i + 1,
are:
i+1

i+1
=
i+1
i
R
i

i
+

i+1

i+1
Z
i+1
i+1

i+1
=
i+1
i
R
i

i
+
i+1
i
R
i

i+1

i+1
Z
i+1
+

i+1
i+1
Z
i+1
And if joint i + 1 is prismatic, the formulas simplify to
i+1

i+1
=
i+1
i
R
i

i
i+1

i+1
=
i+1
i
R
i

i
For linear accelerations, the formulas are: (rotational joint i + 1):
i+1
v
i+1
=
i+1
i
R(
i

i

i
P
i+1
+
i

i
(
i

i

i
P
i+1
) +
i
v
i
)
If joint i + 1 is prismatic, the formula becomes substantially more complicated:
i+1
v
i+1
=
i+1
i
R(
i

i

i
P
i+1
+
i

i
(
i

i

i
P
i+1
) +
i
v
i
) + 2
i+1

i+1


d
i+1
i+1
Z
i+1
+

d
i+1
i+1
Z
i+1
During the computation, it is necessary to nd the linear acceleration of the center of mass of each
link, which can be found using the following relationship:
i
v
C
i
=
i

i

i
P
C
i
+
i

i
(
i

i

i
P
C
i
) +
i
v
i
Here, C
i
denotes the center of mass of link i. This equation holds for both rotational and prismatic
joint i +1. In the next step, we can compute the forces and torques that apply to the center of mass
of each link from the accelerations and speeds that we have just computed:
i
F
i
= m
i
v
C
i
i
N
i
=
C
i
I
i

i

i
+
i

i

C
i
I
i

i

i
Based on those forces and moments, we can compute f and n for the joints of the robot:
i
f
i
=
i
i+1
R
i+1
f
i+1
+
i
F
i
i
n
i
=
i
N
i
+
i
i+1
R
i+1
n
i+1
+
i
P
C
i

i
F
i
+
i
P
i+1

i
i+1
R
i+1
f
i+1
As in the static case, the values of
i
, compute as
i
=
i
n
T
i

i
Z
i
for a rotational joint and
i
=
i
f
T
i

i
Z
i
for a translational joint.
We also need to take into account the eect of gravity on the links of the robot. This can be done
through setting
0
v
0
= G where G is the gravitational acceleration. By doing so, we simulate the eect
of gravity by having the robot move upwards, which exactly simulates the eect of gravitation.
The equations of movement that have been computed this way can be rearranged into the so-called
state-space equation (or M-V-G-form). This looks as follows:
= M()

+ V (,

) + G()
M is a n n matrix, and V as well as G are n 1 vectors. Note that in general, M, V , G are
complex-valued. The matrix M can be determined from the dynamics equations by factorizing all
summands that contain

. Similarily, V is determined by factorizing all summands that contain

.
Finally, G is determined by factorizing all summands that contain g. V can be further decomposed
into components B and C, yielding the conguration-space equation (or M-B-C-G-form):
= M()

+ B()[


] + C()[

2
] + G()
B() is a matrix of dimension n n(n 1)/2, and [


] is an abbreviation for the vector
(

2
,

3
, . . . ,

n1

n
)
T
that has length n(n 1)/2. This also explains the dimension of B: n(n 1)/2 is the number of
products
i

j
with i = j. The matrix C has dimension n n, and [

2
] in an abbreviation for the
vector
(

2
1
,

2
2
, . . . ,

2
n
)
T
with length n. The matrices B and C can be determined by nding the coecients of
i

j
and
2
i
,
respectively.
A simple example for robot dynamics
Because the computations for the regular problems are very lengthy, the two methods for computing
robot dynamics are shown here at length for a very simple example robot, shown in Figure 1. The
following values are specied:
The length of the link: l, the mass of the link (including gripper): m, center of mass of the
arm:
1
P
C
1
= (
l
2
, 0, 0)
T
Figure 1: Example robot
Inertia tensor for the rst arm:
C
1
I
1
= I (Identity matrix)
Gravity acceleration:

G = (0, g, 0)
T
Rotation matrix
0
1
R:
0
1
R =
_
_
c
1
s
1
0
s
1
c
1
0
0 0 1
_
_
,
1
0
R =
_
_
c
1
s
1
0
s
1
c
1
0
0 0 1
_
_
In the following, we will compute the manipulator dynamics using the Newton-Euler method. We
simply need to apply the formulas from the Newton-Euler method summary above. Note that the
acceleration of the base system
0
v
0
is set to the negative gravitational acceleration, as has been
explained there as well. We compute the velocities and accelerations as:
1

1
=
1
0
R
0

0
+

1

1
Z
1
= 0 +

1

_
_
0
0
1
_
_
=
_
_
0
0

1
_
_
1

1
=
1
0
R
0

0
+
1
0
R
0

0

1

1
+

1

1
Z
1
= 0 + 0 +
_
_
0
0

1
_
_
1
v
1
=
1
0
R (
0

0

0
P
1
+
0

0
(
0

0

0
P
1
) +
0
v
0
)
=
1
0
R (0 + 0 +

G) =
_
_
s
1
g
c
1
g
0
_
_
1
v
C
1
=
_
_
0
0

1
_
_

_
_
l
2
0
0
_
_
+
_
_
0
0

1
_
_

_
_
_
_
0
0

1
_
_

_
_
l
2
0
0
_
_
_
_
+
_
_
s
1
g
c
1
g
0
_
_
=
_
_
0

1

l
2
0
_
_
+
_
_
0
0

1
_
_

_
_
0

1

l
2
0
_
_
+
_
_
s
1
g
c
1
g
0
_
_
=
_
_

2
1

l
2
+ s
1
g

1

l
2
+ c
1
g
0
_
_
The next step is the computation of forces and moments on the centers of mass of the links:
1
F
1
= m
1

1
v
C
1
1
N
1
=
C
1
I
1

1

1
+
1

1

C
1
I
1

1

1
=
_
_
0
0

1
_
_
And in the backwards iteration, the forces and moments can be determined:
1
f
1
= 0 +
1
F
1
1
n
1
=
_
_
0
0

1
_
_
+
_
_
l
2
0
0
_
_

_
_
m
1
(

2
1

l
2
gs
1
)
m
1
(

1

l
2
+ gc
1
)
0
_
_
=
_
_
0
0

1
+
l
2
m
1
(

1

l
2
+ gc
1
)
_
_
All in all, the result is then:

1
=
1
n
1

1
Z
1
=

1
_
1 +
l
2
4
m
_
+
l
2
m g c
1
Solution 1
The transformation matrices for this robot are as follows:
0
1
T =
_
_
_
_
c
1
s
1
0 0
s
1
c
1
0 0
0 0 1 0
0 0 0 1
_
_
_
_
1
2
T =
_
_
_
_
1 0 0 l
1
0 0 1 d
2
0 1 0 0
0 0 0 1
_
_
_
_
We know that gravity force applies in negative X
0
-direction, and we denote the corresponding ac-
celeration with g. Now, we are supposed to apply the Newton-Euler-Method to derive the dynamic
equations of this robot. We start with the forward iteration, determining speeds and accelerations:
i = 0 :
1

1
=
1
0
R
0

0
+

1

1
Z
1
=
_
_
0
0

1
_
_
1

1
= 0 + 0 +

1

1
Z
1
=
_
_
0
0

1
_
_
1
v
1
=
1
0
R
_
_
0

0

0
P
1
+
_
_
g
0
0
_
_
_
_
=
_
_
gc
1
gs
1
0
_
_
1
v
C
1
=
1

1

1
P
C
1
+
1

1
(
1

1

1
P
C
1
) +
1
v
1
=
_
_

l
1
2

2
1
+ gc
1
l
1
2

1
gs
1
0
_
_
The next joint is a prismatic joint, which means that we have to use slightly dierent formulas:
i = 1
2

2
=
2
1
R
1

1
=
1
2
R
T
_
_
0
0

1
_
_
=
_
_
0

1
0
_
_
2

2
=
2
1
R
1

1
=
_
_
1 0 0
0 0 1
0 1 0
_
_

_
_
0
0

1
_
_
=
_
_
0

1
0
_
_
2
v
2
=
2
1
R
_
1

1

1
P
2
+
1

1
(
1

1

1
P
2
) +
1
v
1
_
+ 2
2

2


d
2
2
Z
2
+

d
2
2
Z
2
=
1
2
R
T
_
_
_
_
0
0

1
_
_

_
_
l
1
d
2
0
_
_
+
_
_
0
0

1
_
_

_
_
_
_
0
0

1
_
_

_
_
l
1
d
2
0
_
_
_
_
+
_
_
gc
1
gs
1
0
_
_
_
_
+2
_
_
0

1
0
_
_

_
_
0
0

d
2
_
_
+
_
_
0
0

d
2
_
_
=
1
2
R
T

_
_
_
_
d
2

1
l
1

1
0
_
_
+
_
_
l
1

2
1
d
2

2
1
0
_
_
+
_
_
gc
1
gs
1
0
_
_
_
_
+
_
_
2

1

d
2
0

d
2
_
_
=
_
_
d
2

1
l
1

2
1
+ gc
1
2

1

d
2
0
l
1

1
d
2

2
1
gs
1
+

d
2
_
_
2
v
C
2
=
2

2

2
P
C
2
+
2

2
(
2

2

2
P
2
C
) +
2
v
2
=
_
_
0

1
0
_
_

_
_
0
0
l
2
_
_
+
_
_
0

1
0
_
_

_
_
_
_
0

1
0
_
_

_
_
0
0
l
2
_
_
_
_
+
_
_
d
2

1
+ l
1

2
1
+ gc
1
2

1

d
2
0
l
1

1
d
2

2
1
gs
1
+

d
2
_
_
=
_
_
(l
2
+ d
2
)

1
l
1

2
1
+ gc
1
2

1

d
2
0
(l
2
+ d
2
)

2
1
+ l
1

1
gs
1
+

d
2
_
_
Next, we compute the forces and torques that apply to the centers of mass of the links:
1
F
1
= m
1

1
v
C
1
= m
1
_
_

l
1
2

2
1
+ gc
1
l
1
2

1
gs
1
0
_
_
1
N
1
=
C
1
I
1

1

1
+
1

1

C
1
I
1
1

1
=
_
_
0
0
I
zz1

1
_
_
+
_
_
0
0

1
_
_

_
_
0
0
I
zz1

1
_
_
=
_
_
0
0
I
zz1

1
_
_
2
F
2
= m
2

2
v
C
2
= m
2

_
_
(l
2
+ d
2
)

1
l
1

2
1
+ gc
1
2

1

d
2
0
(l
2
+ d
2
)

2
1
+ l
1

1
gs
1
+

d
2
_
_
2
N
2
=
C
2
I
2

2

2
+
2

2

C
2
I
2
2

2
=
_
_
0
I
yy2

1
0
_
_
+
_
_
0

1
0
_
_

_
_
0
I
zz1

1
0
_
_
=
_
_
0
I
yy2

1
0
_
_
To slightly simplify the further computations, we will introduce abbreviations for the components of
2
F
2
as follows:
2
F
2
= (A, 0, B)
T
. Now we can start with the backwards iteration:
i = 2 :
2
f
2
=
2
F
2
2
n
2
=
2
N
2
+ I
3
n
3
+
2
P
C
2

2
F
2
+ 0
=
_
_
0

1
I
yy2
0
_
_
+
_
_
0
0
l
2
_
_

2
F
2
=
_
_
0

1
I
yy2
m
2
l
2
(l
2
+ d
2
)

1
l
1
l
2
m
2

2
1
+ m
2
l
2
gc
1
2m
2
l
2

d
2

1
0
_
_
=:
_
_
0
C
0
_
_
Thus, we have already determined
2
=
2
f
T
2
2
Z
2
(remember that the second joint is prismatic):

2
= m
2
((l
2
+ d
2
)

2
1
+ l
1

1
gs
1
+

d
2
)
Continuing with the backwards iteration:
i = 1 :
1
n
1
=
1
N
1
+
1
2
R
2
n
2
+
1
P
C
1

1
F
1
+
1
P
2

1
2
R
2
f
2
=
_
_
0
0
I
zz1

1
_
_
+
_
_
0
0
C
_
_
+
_
_
0
0
n
1
l
2
1
4

1
gm
1
l
1
2
s
1
_
_
+
_
_
l
1
d
2
0
_
_

_
_
A
B
0
_
_
=
_
_
0
0
I
zz1

1
C + m
1
l
2
1
4

1
gm
1
l
1
2
s
1
+ l
1
B d
2
A
_
_
All in all:

1
=
1
n
1
1
Z
1

1
= I
zz1

1
C + m
1
l
2
1
4

1
gm
1
l
1
2
s
1
+ l
1
B d
2
A
= (I
zz1
+ I
yy2
+ m
2
(d
2
+ l
2
)
2
+ m
1
l
2
1
4
+ m
2
l
2
1
)

1
+ m
2
l
1

d
2
+2m
2
(l
2
+ d
2
)

d
2

1

_
m
1
2
+ m
2
_
gl
1
s
1
m
2
g(l
2
+ d
2
)c
1
And we have nally determined formulas for computation of the joint torques/forces. Now we are
supposed to rewrite these in state space form (MVG form). With = (
1
, d
2
)
T
,

= (

1
,

d
2
)
T
,

= (

1
,

d
2
)
T
, = (
1
,
2
)
T
, this amounts to:
M() =
_
I
zz1
+ I
yy2
+ m
2
(d
2
+ l
2
)
2
+ m
1
l
2
1
4
+ m
2
l
2
1
m
2
l
1
m
2
l
1
m
2
_
V (,

) =
_
2m
2
(l
2
+ d
2
)

1

d
2
m
2
(l
2
+ d
2
)

2
1
_
G() =
_
(
m
1
2
+ m
2
)gl
1
s
1
m
2
g(l
2
+ d
2
)c
1
m
2
gs
1
_
Recapitulation: Lagrangian Dynamics
The Lagrangian dynamic formulation is another method for determining the dynamics of a robot
which is derived from energy considerations. For each link of the robot, the kinetic energy can be
computed as:
k
i
=
1
2
m
i
v
T
C
i
v
C
i
+
1
2
i

T
i

C
i
I
i

i

i
The rst term corresponds to the kinetic energy caused by the linear motion of the link, and the
second term corresponds to the kinetic energy caused by the rotational velocity of the link. To
determine these energies, we need to compute the linear and rotational velocities of the joints. The
overall kinetic energy computes then as sum of the kinetic energies of all links:
k =
n

i=1
k
i
Another way to compute kinetic energy is
k(,

) =
1
2

T
M()

,
where M again is the n n mass matrix from the M-V-G form of the dynamics equations. To
compute all energies that are present in this system, we also need to take into account the potential
energy:
u
i
= m
i

0
g
T

0
P
C
i
+ u
ref
i
Here, g is the vector of gravity,
0
P
C
i
denotes the center of mass of link i, and u
ref
i
is an arbitrary
constant (the constant is added because potential energy depends on height, and a certain base
height can be chosen arbitrarily). In the further computations, this constant will not play a role,
since only the derivatives of the potential energy are considered - and any constant will vanish when
dierentiated. The computation of is nally done through the following formula:
=
d
dt
k

+
u

It is also possible to compute the joint torques


i
on a per-joint basis, which is more practical in most
cases. The formula then becomes:

i
=
d
dt
k

i
+
u

i
.
Simple dynamics example: Lagrange Method
Here, we will revisit the simple example for which we have computed the dynamics using the Newton-
Euler method. This time, we will solve the problem using the Lagrangian formulation of dynamics.
The method of Lagrangian dynamics uses a completely dierent approach, but the results will be
the same as with the Newton-Euler method. To successfully apply the Lagrangian method, we need
to determine some additional values:
0
P
C
1
=
_
_
c
1

l
2
s
1

l
2
0
_
_

d
dt
0
P
C
1
=
_
_
s
1

1

l
2
c
1

1

l
2
0
_
_
To compute the kinetic energy, we need to know the velocity of the center of mass. In principle, the
system of reference in which the velocities are determined does not matter. This can be seen easily
from the formula for kinetic energy:
k
i
=
1
2
m
i
v
T
C
i
v
C
i
+
1
2
i

i

C
i
I
i

i

i
The rst summand contains only the dot product of the velocity with itself, thus the squared length
of the vector v
C
i
. This means that only the length of that vector is relevant, and the length is
obviously invariant under coordinate transformations. It is usually most convenient to determine the
velocities directly in the base system {0} from geometric considerations. In our case, the position of
the center of mass is described by
0
P
C
1
=
_
_
l
2
c
1
l
2
s
1
0
_
_
.
The velocity is then determined simply by dierentiating with respect to time:
d
dt
0
P
C
1
=
_
_

l
2
s
1

1
l
2
c
1

1
0
_
_
The rotational velocity in the rst system can be determined as follows: There is only one rotational
joint, and it rotates about the Z
0
-axis. This means that
1

1
=
_
_
0
0

1
_
_
The same result can be obtained using the standard formulas for computing angular and linear
velocities. Now we have already determined all values that we need for applying the formulas. We
substitute the values into the formula and obtain:
k
1
=
1
2
m
_
s
2
1

2
1

l
2
4
+ c
2
1

2
1

l
2
4
_
+
1
2

2
1
=

2
1
_
1
2
m
l
2
4
+
1
2
_
And the potential energy computes as:
u
1
= m
_
_
0
g
0
_
_
T
_
_
c
1

l
2
s
1

l
2
0
_
_
= gms
1
l
2
The reference enery has been ignored here, because, as explained in the recapitulation section, it is
not relevant for further computations. In the next step, we compute some intermediary results for
evaluating the formula for . The overall formula is
=
d
dt
k

+
u

.
We compute:
k

1
=

1
(m
l
2
4
+ 1)
d
dt
k

1
=

1
(m
l
2
4
+ 1)
k

1
= 0
u

1
= m c
1

l
2
g
This yields the overall result

1
=

1
(m
l
2
4
+ 1) + m
l
2
g c
1
,
which is the same as the result obtained using the Newton-Euler method.
Solution 2
We start out by computing the kinetic energies:
0
v
C
1
=
d
dt
(
0
P
C
1
) =
_
_
0
0

d
1
_
_
1

1
=
1
0
R
0

0
+

1

i+1
Z
i+1
=
_
_
0
0
0
_
_
k
1
=
1
2
m
1
v
T
C
1
v
C
1
+
1
2
1

T
1

C
1
I
1

1

1
=
1
2
m
1
_
_
0
0

d
1
_
_
T
_
_
0
0

d
1
_
_
+ 0 =
1
2
m
1

d
2
1
For k
2
:
0
P
C
2
=
_
_
l
2
2
c
2
l
2
2
s
2
d
1
_
_
0
v
C
2
=
d
dt
(
0
P
C
2
) =
_
_

l
2
2
s
2

2
l
2
2
c
2

d
1
_
_
2

2
=
_
_
0
0

2
_
_
Using these values in the formulas:
k
2
=
1
2
m
2
_
_
l
2
2

2
_
2
+

d
2
1
_
+
1
2
_
_
0
0

2
_
_
T
_
_
I
xx2
0 0
0 I
yy2
0
0 0 I
zz2
_
_
_
_
0
0

2
_
_
=
1
8
m
2
l
2
2

2
2
+
1
2
m
2

d
2
1
+
1
2
I
zz2

2
2
Computation of k
3
is done analogously:
0
P
C
3
=
_
_
l
2
c
2
+
l
3
2
c
23
l
2
s
2
+
l
3
2
s
23
d
1
_
_
0
v
C
3
=
_
_
l
2
s
2

2

l
3
2
s
23
(

2
+

3
)
l
2
c
2

2
+
l
3
2
c
23
(

2
+

3
)

d
1
_
_
3

3
=
3
2
R
2

2
+

3

1
Z
1
=
_
_
0
0

2
+

3
_
_
k
3
=
1
2
m
3
_

d
2
1
+
_
l
2
+
l
2
3
4
+ l
2
l
3
c
3
_

2
2
+
_
l
2
3
2
+ l
2
l
3
c
3
_

3
+
l
2
3
4

2
3
_
+
1
2
I
zz3
(

2
+

3
)
2
The potential energy computes as:
u
1
= m
1


G
0
P
C
1
= m
1
(0, 0, g)
_
_
0
0
d
1
l
1
_
_
= m
1
(d
1
l
1
)g
u
2
= m
2


G
0
P
C
2
= m
2
d
1
g
u
3
= m
3


G
0
P
C
3
= m
3
d
1
g
Thus, we can formulate the total potential energy:
u = m
1
(d
1
l
1
)g + (m
2
+ m
3
)d
1
g
Now we can use the results computed so far in the Lagrangian formulation:
=
d
dt
k

+
u

Since the terms will become rather large, we are not going to compute everything at once, but we
will rather split the computation into smaller parts. The joint conguration vector is of form
(d
1
,
2
,
3
)
T
, so

= (

d
1
,

2
,

3
)
T
etc. For , we have = (
1
,
2
,
3
)
T
. Then, we compute:
k


d
1
= m
1

d
1
+ m
2

d
1
+ m
3

d
1
= (m
1
+ m
2
+ m
3
)

d
1
d
dt
k


d
1
= (m
1
+ m
2
+ m
3
)

d
1
k
d
1
= 0
u
d
1
= m
1
g + (m
2
+ m
3
)g = (m
1
+ m
2
+ m
3
)g
For
1
, we get the following result:

1
= (m
1
+ m
2
+ m
3
)

d
1
+ (m
1
+ m
2
+ m
3
)g
Now on to the second component of . We compute some intermediary results:
k

2
=
1
4
m
2
l
2
2

2
+ I
zz2

2
+
1
2
m
3
_
2
_
l
2
2
+
l
2
3
4
+ l
2
l
3
c
3
_

2
+
_
l
2
3
2
+ l
2
l
3
c
3
_

3
_
+ I
zz3
(

2
+

3
)
What follows is the computation of derivatives of above expressions, which is quite cumbersome and
complicated. In particular, you need to make sure not to overlook abbreviated terms like c
3
etc.
Using the product rule for derivatives, we can compute:
d
dt
k

2
=
1
4
m
2
l
2
2

2
+ I
zz2

2
+
1
2
m
3
_
2
_
l
2
2
+
l
2
3
4
+ l
2
l
3
c
3
_

2
+ 2

2
_
l
2
l
3
s
3

3
_
_
+
1
2
m
3
__
l
2
3
2
+ l
2
l
3
c
3
_

3
+
_
l
2
l
3
s
3

3
_

3
_
+ I
zz3

2
+ I
zz3

3
The other partial derivatives are substantially easier to compute:
k

2
= 0,
u

2
= 0
And overall, after rearranging terms, we end up with:

2
=
_
1
4
m
2
l
2
2
+ I
zz2
+ m
3
_
l
2
2
+
l
2
3
4
+ l
2
l
3
c
3
_
+ I
zz3
_

2
+
_
1
2
m
3
_
l
2
3
2
+ l
2
l
3
c
3
_
+ I
zz3
_

3
m
3
l
2
l
3
s
3

3

1
2
m
3
l
2
l
3
s
3

2
3
Finally, for
3
we compute:
k

3
=
1
2
m
3
__
l
2
3
2
+ l
2
l
3
c
3
_

2
+
l
2
3
2

3
_
+ I
zz3
_

2
+

3
_
Again, we dierentiate w.r.t time t, and obtain:
d
dt
k

3
=
1
2
m
3
_
l
2
3
2

2
+ l
2
l
3
c
3

2
l
2
l
3
s
3

2
+
l
2
3
2

3
_
+ I
zz3

2
+ I
zz3

3
k

3
=
1
2
m
3
(l
2
l
3
s
3

2
2
+ l
2
l
3
s
3

3
)
u

3
= 0
All in all,
3
is then:

3
=
1
2
m
3
__
l
2
3
2
+ l
2
l
3
c
3
_

2
+
l
2
3
2

3
l
2
l
3
s
3

3
_
+
1
2
m
3
_
l
2
l
3
s
3

2
2
+ l
2
l
3
s
3

3
_
+ I
zz3

2
+ I
zz3

3
Thus, we have nally determined the dynamics equations. One more thing remains to be done:
We are supposed to bring the equations in state space form as well as conguration space form.
Determining the state space form should be straightforward:
= M()

+ V (,

) + G()
To compute M(), we look for terms that contain the second derivative of any joint variable (so we
look for

d
1
,

2
,

3
), and we determine the corresponding factors. This yields:
M() =
_
_
_
m
1
+ m
2
+ m
3
0 0
0 (
1
4
m
2
l
2
2
+ I
zz2
+ m
3
(l
2
2
+
l
2
3
4
+ l
2
l
3
c
3
) + I
zz3
) (
1
2
m
3
(
l
2
3
2
+ l
2
l
3
c
3
) + I
zz3
)
0 (
1
2
m
3
(
l
2
3
2
+ l
2
l
3
c
3
) + I
zz3
)
1
4
m
3
l
2
3
+ I
zz3
_
_
_
On to the vector V (,

). It is made up of all terms that contain the rst derivative of a joint
variable.
V =
_
_
0
m
2
l
2
l
3
s
3

3

1
2
m
2
l
2
l
3
s
3

2
3
1
2
m
3
l
2
l
3
s
3

2
2
_
_
And nally, the vector G() contains all terms in which the constant g appears:
G() =
_
_
(m
1
+ m
2
+ m
3
)g
0
0
_
_
To further decompose the equations into conguration space form, we need to take a closer look at
V (,

). This vector is decomposed as follows:
V (,

) = B()[


] + C()[

2
]
where
B =
_
_
0 0 0
0 0 m
2
l
2
l
3
s
3
0 0 0
_
_
and
C =
_
_
0 0 0
0 0
1
2
m
2
l
2
l
3
s
3
0
1
2
m
3
l
2
l
3
s
3
0
_
_
.
The advantage of the conguration space equation is that M, B, C, G all depend only on . This
is important for applications where the dynamic equations change due to movement of the robot:
For some settings, it might be easier, faster, or more accurate (depending on the robots sensors) to
update the dynamics equations only based on , not on

.

You might also like