0% found this document useful (0 votes)
127 views9 pages

Gibbs & Apell Equations

Gibbs & apell

Uploaded by

Yeizer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
127 views9 pages

Gibbs & Apell Equations

Gibbs & apell

Uploaded by

Yeizer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Gibbs-Appell Equations of Motion

for a Three Link Robot with MATLAB

Dan B. Marghitu and Dorian Cojocaru

Abstract The present study uses MATLAB as a tool to develop and to solve the
dynamical equations of motion for an open kinematic chain. MATLAB is conve-
nient for finding the equations of motion using Lagrange method and for solving
numerically the nonlinear differential equations.

Keywords Three link robot  Equations of motion  MATLAB

1 Introduction

In this paper, MATLAB is considered for solving the mathematical equations of a


three-dimensional (3D) robot with three links. The kinematic and dynamic equa-
tions of motion for the robot are deduced using a symbolical algorithm. The
equations of motion are solved numerically using designed MATLAB functions.
A form of Lagrange’s equations in terms of quasi-coordinates used for robots is
presented in [1]. This formulation is suitable for symbolic computation and
dynamic analysis of complex systems. According to Whittaker [2], the concept of
quasi-coordinates was used by Lagrange and Euler, and other advanced texts in
dynamics include sections on the subject [3, 4]. Baruh [5] described the equations
of analytic dynamics and showed a classification based on vector principles (for
example, D’Alembert’s principle) or on scalar principles (for example, Hamilton’s
equations). Advantages and disadvantages of various approaches are analyzed. The
equations of motion are the projection of the classical equations of force and

D.B. Marghitu (&)


Auburn University, Auburn, AL 36849, USA
e-mail: [email protected]
D. Cojocaru
Faculty of Automatic Control, Computers and Electronics University of Craiova,
Craiova, Romania
e-mail: [email protected]

© Springer International Publishing Switzerland 2016 317


T. Borangiu (ed.), Advances in Robot Design and Intelligent Control,
Advances in Intelligent Systems and Computing 371,
DOI 10.1007/978-3-319-21290-6_32
318 D.B. Marghitu and D. Cojocaru

moment balances along directions affected by the kinematic coefficients. The


equations of motion for a human body model are developed in [6], using the
principles of classical mechanics. The solution provides displacement and rotation
of the body. Some example of motions are: simple lifting on the earth and the
moon, underwater swimming, or a vertically suspended man. The achievements in
the robot dynamics research starting with the development of the recursive
Newton-Euler algorithm are given in [7]. The main algorithms and equations are
provided, where the Kane’s equations [8] can be of great value. Pan and Sharp [9]
used homogeneous transformation matrices with Denavit–Hartenberg notation and
the Lagrangian formulation method for a general computer program. An algebraic
manipulation language, REDUCE, is employed for the open-chain structure.
Equations of motion in scalar form can be automatically transferred to FORTRAN
format for later numerical simulations. A recursive approach for solving snake-like
robots’ problems using Kane’s equations is presented in [10]. The proposed method
is used to derive kinematic and dynamic equations recursively. The Lagrangian
method is used for the dynamics of a 3-bar deformable structure that can adapt to
unconstrained environments [11]. A robot that combines the hopping movement
and the wheeling movement is presented in [12]. The five-shank hopping structure
was analyzed, and a non-linear spring-mass model for the robot was used. A unified
method for the whole-body humanoid robot control problem in the context of
multi-point multi-link contacts, constraints, and obstacles is presented in [13].
Gomes and Ruina [14] developed equations of rigid-body mechanics for an ape
model with zero energy cost motions. The results are comparable with the motions
of real gibbons using a 5-link model.
This paper describes the systematic computation of the equations of motion for a
three link open chain using MATLAB. The software combines symbolical and
numerical computations and can be applied to find and solve the equations of
motions for robots, humans, and animals systems.

2 Design and Implementation

The study presented in this section is based on a three-link robot. Figure 1 is a


schematic representation of a Rotation Rotation Rotation (RRR) open kinematic
chain or robot arm consisting of three links 1, 2, and 3.
Let m1 ; m2 ; m3 be the masses of links 1, 2, 3, respectively. Link 1 can be rotated
at origin O in a “fixed” reference frame 0 (RF0) of unit vectors ½i0 ; j0 ; k0  about a
vertical axis k 0 . The unit vector k 0 is fixed in link 1. The link 1 is connected to link
2 at the revolute joint at point A. The element 2 rotates relative to link 1 about an
axis fixed in both 1 and 2, passing through A, and perpendicular to the axis of link
1. The last link 3 is connected to 2 by means of a revolute joint at B. The mass
centers of links 1, 2, and 3 are C1 ; C2 , and C3 , respectively. The length of link 1 is
OA ¼ L1 , the length of link 2 is AB ¼ L2 , and the length of link 3 is BD ¼ L3 . The
distance from O to C1 is OC1 ¼ L1 =2, the distance from A to C2 is AC2 ¼ L2 =2,
Gibbs-Appell Equations of Motion … 319

q3
k2 3
j2
B
k3
k1
ı2 2 C3
j1 1 C2
k0 q1
ı1 C1 A D
ı0 j0 ı3
j3
O q2

Fig. 1 RRR robot

and the distance from B to C3 is BC3 ¼ L3 =2. The reference frame p (RFp) of unit
vectors ½ip ; jp ; kp  is attached to link p; p ¼ 1; 2; 3; as shown in Fig. 1.

2.1 Kinematics

The generalized coordinates (quantities associated with the the instantaneous


position of the system) are q1 ðtÞ; q2 ðtÞ; q3 ðtÞ. The first generalized coordinate q1
denotes the radian measure of the angle between the axes of RF1 and RF0. The unit
vectors i1 , j1 , and k1 can be expressed as functions of i0 , j0 , and k0
2 3 2 32 3 2 3
i1 c1 s1 0 i0 i0
4 j1 5 ¼ 4 s1 c1 0 54 j0 5 ¼ R10 4 j0 5: ð1Þ
k1 0 0 1 k0 k0

where s1 ¼ sin q1 and c1 ¼ cos q1 . The transformation matrix from RF1 to RF0 is
R10 and the transformation matrix from RF1 to RF0 is R01 ¼ RT10 where RT10 is the
transpose of the matrix R10 . The second generalized coordinate also designates a
radian measure of the rotation angle between RF1 and RF2. The unit vectors i 2 , i2
and k2 can be expressed as i2 ¼ i1 ; j2 ¼ c2 j1 þ s2 k1 ; k2 ¼ s2 j1 þ c2 k 1 ; where
s2 ¼ sin q2 and c2 ¼ cos q2 . The transformation matrices from RF2 to RF1 and
from RF3 to RF2 (with s3 ¼ sin q3 and c3 ¼ cos q3 ) are
2 3 2 3
1 0 0 1 0 0
R21 ¼ 4 c2 s2 05 and R32 ¼ 4 c3 s3 0 5: ð2Þ
s2 c2 0 s3 c3 0

Next, the angular velocity of the links 1, 2, and 3 will be expressed in the fixed
reference frame, RF0. The angular velocity of 1 in RF0 expressed in terms of RF1
is x10 ¼ q_ 1 k 1 : The angular velocity of the link 2 with respect to link 1 expressed in
terms of RF1 is x21 ¼ q_ 2 i1 : The angular velocity of the link 2 with respect to the
fixed reference frame, RF0, expressed in terms of RF1, is x20 ¼ x10 þ x21 ¼
q_ 1 k 1 þ q_ 2 i1 : The angular velocity of the link 3 with respect to link 2 expressed in
320 D.B. Marghitu and D. Cojocaru

terms of RF2 is x32 ¼ q_ 3 i2 : The angular velocity of the link 3 with respect to the
fixed reference frame, RF0, expressed in terms of RF2, is x30 ¼ x20 þ x32 : The
angular acceleration of the link p; p ¼ 1; 2; 3; in RF0 is

ðpÞ ðpÞ
d d d
ap0 ¼ xp0 ¼ xp0 þ xp0  xp0 ¼ xp0 ; ð3Þ
dt dt dt
ðpÞ
where dtd represents the derivative with respect to time in reference frame RFp.
The position vectors of Cp , the mass center of link p; p ¼ 1; 2; 3; are rC1 ¼
0:5L1 j1 ; rC2 ¼ L1 j1 þ 0:5L2 j2 ; and rC3 ¼ L1 j1 þ L2 j2 þ 0:5 L3 j3 : The velocities
and accelerations of Cp ; p ¼ 1; 2; 3; in RF0 are

ðpÞ ðpÞ
d d
v Cp ¼ rC þ xp0  rCp and aCp ¼ vCp þ xp0  vCp : ð4Þ
dt p dt

2.2 Gibbs-Appell Equations of Motion

The Gibbs function for the link i; i ¼ 1; 2; 3 is [15]:

1 1
Si ¼ mi aCi  aCi þ ai0  Ii  ai0 þ ai0  ðxi0  Ii  xi0 Þ; ð5Þ
2 2

where mi is the mass of the link, aCi is the acceleration of the mass center of the link
in RF0, xi0 ¼ xxi ii þ xyi ji þ xzi ki is the angular velocity of the link in (0), ai0 ¼
x_ i0 is the angular acceleration, and Ii ¼ ðIxi ii Þii þ ðIyi ji Þji þ ðIzi ki Þki is the central
inertia dyadic of the link. The central principal axes of the link are parallel to ii ; ji ; ki
and the associated moments of inertia have the values Ixi ; Iyi ; Izi , respectively. The
dot product of the vector x with the dyadic I is x  I ¼ I  x ¼ xx Ix i þ xy Iy j þ
xz Iz k: The central moments of inertia of links 1, 2, and 3 are calculated using
Fig. 1. The central principal axes of link i; i ¼ 1; 2; 3 are parallel to ii ; ji ; ki and the
associated moments of inertia have the values Iix ; Iiy ; Iiz , respectively.
The Gibbs-Appell dynamical equations governing the system are:

@ 2 ðS1 þ S2 þ S3 Þ
:: ¼ Qr ; r ¼ 1; 2; 3: ð6Þ
@ qr

To calculate the partial derivative of the function S ¼ S1 þ S2 þ S3 with respect


::
to the variable qr a MATLAB function, deriv, was created. The function deriv
(f, g) differentiates a symbolic expression f with respect to the variable g, where
the variable g is a function of time g = g(t). The statement diff(f,‘x’)
differentiates f with respect to the free variable x. In MATLAB the free variable x
cannot be a function of time and that is why the function deriv was introduced.
Gibbs-Appell Equations of Motion … 321

2.3 Generalized Active Forces

Remark: If a set of contact and/or body forces acting on a rigid body is equivalent to
a couple of torque T together with force R applied at a point P of the rigid body,
then the contribution of this set of forces to the generalized force, Qr , is given by
@vP
Qr ¼ @@xq_ r  T þ @ q_ r  R; r ¼ 1; 2; . . .; where x is the angular velocity of the rigid
body in (0), vP is the velocity of P in (0), and r represents the generalized
coordinates.
In the case of the robotic arm, there are two kinds of forces that contribute to the
generalized forces Q1 ; Q2 ; and Q3 namely, contact forces applied in order to drive
the links 1, 2, and 3, and gravitational forces exerted on 1, 2, and 3. The set of
contact forces transmitted from 0 to 1 can be replaced with a couple of torque T01
applied to 1 at O. Similarly, the set of contact forces transmitted from 1 to 2 can be
replaced with a couple of torque T12 applied to 2 at A. The law of action and
reaction then guarantees that the set of contact forces transmitted from 1 to 2 is
equivalent to a couple of torque T12 to 1 at A. Next, the set of contact forces
exerted by link 2 on link 3 can be replaced with a couple of torque T32 applied to 3
at B. The law of action and reaction then guarantees that the set of contact forces
transmitted from 2 to 3 is equivalent to a couple of torque T23 to 2 at B. The
expressions T01 , T12 , and T23 are T01 ¼ T01x i1 þ T01y j1 þ T01z k1 ; T12 ¼ T12x i2 þ
T12y j2 þ T12z k2 ; and T23 ¼ T23x i3 þ T23y j3 þ T23z k3 : The external gravitational
forces exerted on the links 1, 2, and 3 are Gi ¼ mi gk1 ; i ¼ 1; 2; 3: The reason for
replacing k 1 in connection with the forces G2 , and G3 is that they are soon to be
@v @v
dot-multiplied with @ q_Cr2 and @ q_Cr3 . The contribution, ðQr Þ1 , to the generalized active
force Qr of all the forces and torques acting on link 1 is:

@x10 @vC1 @x10


ðQr Þ1 ¼  T01 þ  G1 þ  ðT12 Þ; r ¼ 1; 2; 3: ð7Þ
@ q_ r @ q_ r @ q_ r

The contribution to the generalized active force Qr for the link 2 is

@x20 @vC2 @x20


ðQr Þ2 ¼  T12 þ  G2 þ  ðT23 Þ; r ¼ 1; 2; 3: ð8Þ
@ q_ r @ q_ r @ q_ r

The contribution to the generalized active force Qr for the link 3 is

@x30 @vC3
ðQr Þ3 ¼  T23 þ  G3 ; r ¼ 1; 2; 3: ð9Þ
@ q_ r @ q_ r

The generalized active force Qr of all the forces and torques acting on the links
1, 2, and 3 are
322 D.B. Marghitu and D. Cojocaru

Qr ¼ ðQr Þ1 þ ðQr Þ2 þ ðQr Þ3 ; r ¼ 1; 2; 3: ð10Þ

The MATLAB results for the generalized active force Qr ; r ¼ 1; 2; 3 are:

3 Results

For the direct dynamics the feedback control law is arbitrary selected as:

The system of equations of motion is solved numerically using the statements:

The ode45 solver is used for the system of differential equations for direct
dynamics. Figure 2 shows the plots of q1 ðtÞ; q2 ðtÞ; and q3 ðtÞ, the solutions of the
nonlinear differential equations, for five seconds. Figure 3 represents the successive
positions of the robotic arm for the simulations.
For the inverse dynamics a desired motion of the three-link chain is specified for
a time interval 0  t  Tp ¼ 5 s. The input generalized coordinates are selected
as [8]:
  
qr ðTp Þ  qr ð0Þ Tp 2 pt
qr ðtÞ ¼ qr ð0Þ þ t sin ; r ¼ 1; 2; 3; ð11Þ
Tp 2p Tp
Gibbs-Appell Equations of Motion … 323

q1 (deg) 0

-20

-40

-60

0
q2 (deg)

-20

-40

-60
0
-10
q3 (deg)

-20

-30

-40
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
t (s)

Fig. 2 Generalized coordinates q1 ðtÞ; q2 ðtÞ; and q3 ðtÞ

1.2

initial position
1

0.8
3
z(m)

0.6

0.4

2
0.2 y0
1 1
3 final position 0.8
0 O
1 2
0.6
-0.2 x
0 0 0.4
0.2
0.4 0.2
0.6 y(m)
0.8 0
1 -0.2
x(m) 1.2

Fig. 3 Position of the robot arm


324 D.B. Marghitu and D. Cojocaru

(a) (b)
0
10

T01z (N m)
5
q1 (deg)

-20
0
-40 -5
-10
-15
-60
0 400

T12x (N m)
300
q2 (deg)

-20

200
-40
100
-60
0
200

T23x (N m)
150
q3 (deg)

-10
100
-20 50
0
-30
1 2 3 4 t (s) 1 2 3 4 t (s)

Fig. 4 Inverse dynamics: a input positions for the generalized coordinates and b calculated
torques for input positions

with qr ðTp Þ ¼ qrf . The robot arm can be brought from an initial position of rest in
reference frame (0) to a final position of rest in (0) in such a way that q1 ; q2 , and q3
have specified values: q1 ðTp Þ ¼ q1f ¼ p=3 rad, q2 ðTp Þ ¼ q2f ¼ p=3 rad, and
q3 ðTp Þ ¼ q3f ¼ p=6 m.
The MATLAB commands used to find the motion equations are identical with
the commands presented in previous section. Figure 4a shows the input generalized
coordinates. The generalized coordinates, q1 , q2 , and q3 and their derivatives, are
substituted in the expressions of T01x , T12x , and T23x . The plots and the values of the
external torques T01z ðtÞ, T12x ðtÞ, and T23x ðtÞ are shown in Fig. 4b. The MATLAB
programs can be found at ftp://eng.auburn.edu/pub/marghdb.

4 Conclusion

Gibbs-Appell equations of motion are developed symbolically using MATLAB.


The equations are solved numerically using matlabFunction and ode45.
Future research will focus on developing the proposed software for dynamic sys-
tems with multiple links and incorporating better numerical functions for solving
the ordinary differential equations.
Gibbs-Appell Equations of Motion … 325

References

1. Quinn, R.: Equations of motion for structures in terms of quasicoordinates. J. Appl. Mech. 57
(3), 745–749 (1990)
2. Whittaker, E.: Analytical Dynamics of Particles and Rigid Bodies. Dover Publications, New
York (1944)
3. Meirovitch, L.: Methods of Analytical Dynamics. McGraw Hill, New York (1970)
4. Baruh, H.: Analytical Dynamics. WCB/McGraw Hill, New York (1999)
5. Baruh, H.: Another look at the describing equations of dynamics. J. Chin. Soc. Mech. Eng. 1,
15–24 (2000)
6. Huston, R., Passerello, C.: On the dynamics of a human body model. J. Biomech. 4(5), 369–
378 (1971)
7. Featherstone, R., Orin, D.: Robot dynamics: equations and algorithms. In: IEEE International
Conference Robotics & Automation, San Francisco, CA, 826–834 (2000)
8. Kane, T., Levinson, D.: Kane’s dynamical equations in robotics. Int. J. Robot. Res. 2(3), 3–21
(1983)
9. Pan, D., Sharp, R.: Automatic formulation of dynamic equations of motion of robot
manipulators. Proc. Inst. Mech. Eng. Part C: J. Mech. Eng. Sci. 202(6), 397–404 (1988)
10. Tavakoli Nia, H., Pishkenari, H., Meghdari, A.: A recursive approach for the analysis of snake
robots using kane’s equations. Robotica 24, 251–256 (2006)
11. Tur, J., Juan, S., Rovira, A.: Dynamic equations of motion for a 3-bar tensegrity based mobile
robot. In: IEEE Conference on Emerging Technologies and Factory Automation, Patras,
Greece, pp. 1334–1339 (2007)
12. Zhao, J., Liu, G., Yan, J., Zang, X.: Scout robot with wheeling-hopping combination
locomotion. Ind. Robot: Int. J. 36(3), 244–248 (2009)
13. Khatib, O., Sentis, L., Park, J.: A unified framework for whole-body humanoid robot control
with multiple constraints and contacts. In: European Robotics Symposium 2008, STAR 44,
pp. 303–312. Springer, Berlin (2008)
14. Gomes, M., Ruina, A.: A five-link 2d brachiating ape model with life-like zero-energy-cost
motions. J. Theor. Biol. 237(3), 265–278 (2005)
15. Mata, V., Provenzano, S., Cuadrado, P., Valero, F.: An o(n) algorithm for solving the inverse
dynamic problem in robots by using the gibbs-appell formulation. In: Tenth World Congress
IFToMM, Oulu 3, pp. 1208–1215 (1999)

You might also like