Open access peer-reviewed chapter

# Solution to a System of Second Order Robot Arm by Parallel Runge-Kutta Arithmetic Mean Algorithm

By S. Senthilkumar and Abd Rahni Mt Piah

Submitted: November 1st 2010Reviewed: May 4th 2011Published: June 9th 2011

DOI: 10.5772/19064

## 1. Introduction

Enormous amount of real time robot arm research work is still being carried out in different aspects, especially on dynamics of robotic motion and their governing equations. Taha [5] discussed the dynamics of robot arm problems. Research in this field is still on-going and its applications are massive. This is due to its nature of extending accuracy in order to determine approximate solutions and its flexibility. Many studies [4-8] have reported different aspects of linear and non-linear systems. Robust control of a general class of uncertian non-linear systems are investigated by zhihua [10].

Most of the initial value problems (lVPs) are solved using Runge-Kutta (RK) methods which in turn are employed in order to calculate numerical solutions for different problems, which are modelled in terms of differential equations, as in Alexander and Coyle [11], Evans [12], Shampine and Watts [14], Shampine and Gordan [18] codes for the Runge-Kutta fourth order method. Runge-Kutta formula of fifth order has been developed by Butcher [15-17]. Numerical solution of robot arm control problem has been described in detail by Gopal et al.[19]. The applications of non-linear differential–algebraic control systems to constrained robot systems have been discussed by Krishnan and Mcclamroch [22]. Asymptotic observer design for constrained robot systems have been analyzed by Huang and Tseng [21]. Using fourth order Runge-Kutta method based on Heronian mean (RKHeM) an attempt has been made to study the parameters concerning the control of a robot arm modelled along with the single term Walsh series (STWS) method [24]. Hung [23] discussed on the dissipitivity of Runge-Kutta methods for dynamical systems with delays. Ponalagusamy and Senthilkumar [25,26] discussed on the implementations and investigations of higher order techniques and algorithms for the robot arm problem. Evans and Sanugi [9] developed parallel integration techniques of Runge-Kutta form for the step by step solution of ordinary differential equations.

This paper is organized as follows. Section 2 describes the basics of robot arm model problem with variable structure control and controller design. A brief outline on parallel Runge-Kutta integration techniques is given in section 3. Finally, the results and conclusion on the overall notion of parallel 2-stage 3-order arithmetic mean Runge-Kutta algorithm and obtains almost accurate solution for a given robot arm problem are given in section 4.

## 2. Statement of the robot arm model problem and essential variable structure

### 2.1. Model of a robot arm

It is well known that both non-linearity and coupled characteristics are involved in designing a robot control system and its dynamic behavior. A set of coupled non-linear second order differential equations in the form of gravitational torques, coriolis and centrifugal represents dynamics of the robot. It is inevitable that the significance of the above three forces are dependent on the two physical parameters of the robot namely the load it carries and the speed at which the robot operates. The design of the control system becomes more complex when the end user needs more accuracy based on the variations of the parameters mentioned above. Keeping the objective of solving the robot dynamic equations in real time calculation in view, an efficient parallel numerical method is needed. Taha [5] discussed dynamics of robot arm problem represented by as

T=A(Q)Q¨+B(Q,Q˙)+C(Q)E1

where A(Q)represents the coupled inertia matrix, B(Q,Q˙)is the matrix of coriolis and centrifugal forces. C(Q)is the gravity matrix, Tdenotes the input torques applied at various joints.

For a robot with two degrees of freedom, by considering lumped equivalent massless links, i.e. it means point load or in this case the mass is concentrated at the end of the links, the dynamics are represented by

T1=D11q¨1+D12q¨21+D122(q¨2)2+D112(q˙1q˙2)+D1E2
,
T2=D21q¨1+D22q¨2+D211(q˙1)2+D2E3
,

where

D11=(M1+M2)d22+2M2d1d2cos(q2)E4
,
D12=D21=M2d22+M2d1d2cos(q2)E5
,
D22=M2d22E6
,
D112=2M2d1d2sin(q2)E7
,
D122=D211=M2d1d2sin(q2)E8
,
D1=[(M1+M2)d1sin(q1)+M2d2sin(q1+q2)]gE9
and
D2=[M2d2sin(q1+q2)]gE10
.

The values of the robot parameters used are M1= 2kg, M2 = 5kg, d1 = d2 = 1. For problem of set point regulation, the state vectors are represented as

X=(X1,X2,X3,X4)T=(q1q1d,q˙1,q2q2d,q˙2)TE11
,

where

q1and q2are the angles at joints 1 and 2 respectively, and q1dand q2dare constants. Hence, equation (2) may be expressed in state space representation as
e˙1=x2E12
x˙2=D22d(D122X22+D112X2X4+D1+T1)D12d(D211X42+D2+T2)E13
e˙3=x4E14
x˙4=D12d(D122X22+D112X2X4+D1+T1)D12d(D211X42+D2+T2)E15
.

Here, the robot is simply a double inverted pendulum and the Lagrangian approach is used to develop the equations.

In [5] it is found that by selecting suitable parameters, the non-linear equation (3) of the two-link robot-arm model may be reduced to the following system of linear equations:

e˙1=x2E16
,
x˙2=B10T1A11x2A10e1E17
,
e˙3=x4E18
,
x˙4=B202T2A212x4A202e3E19
,

where one can attain the system of second order linear equations:

x¨1=A11x˙1A10x1+B10T1E20
,
x¨3=A˙212x3A202x1+B2102T2E21
,

with the parameters concerning joint-1 are given by

A10 = 0.1730, A11 = -0.2140, B10 = 0.00265,

and the parameters of joint-2 are given by

A20= 0.0438, A21 = 0.3610, B20 = 0.0967

If we choose T1 = ґ (constant) and T2 = λ (constant), it is now possible to find the complementary functions of equation (4) because the nature of the roots of auxiliary equations (A. Es) of (4) is unpredictable. Due to this reason and for the sake of simplicity, we take T1 = T2 = 1.

considering q1= q2= 0, q1d= q2d= 1 and q˙1= q˙2= 0, the initial conditions are given by

e1(0) = e3(0) = -1 and e2(0)= e4(0) = 0 and the corresponding exact solutions are,

e1(t)=e0.107t[1.15317919cos(0.401934074t)+0.306991074sin(0.401934074t)]+0.15317919E22
,
e2(t)=e0.107t[0.463502009sin(0.401934074t)+0.123390173cos(0.401934074t)]+e0.107t[1.15317919cos(0.401934074t)+0.306991074sin(0.401934074t)]E23
,
e3(t)=1.029908976e0.113404416t6.904124484e0.016916839t+4.874215508E24
,
e4(t)=0.116795962e0.11340416t+0.116795962e0.016916389tE25
.

## 3. A brief sketch on parallel Runge-Kutta numerical integration techniques

The system of second order linear differential equations originates from mathematical formulation of problems in mechanics, electronic circuits, chemical process and electrical networks, etc. Hence, the concept of solving a second order equation is extended using parallel Runge-Kutta numerical integration algorithm to find the numerical solution of the system of second order equations as given below. It is important to mention that one has to determine the upper limit of the step-size (h)in order to have a stable numerical solution of the given ordinary differential equation with IVP. We thus consider the system of second order initial value problems,

y¨j=fj(x,yj,y˙j),j=1,2,.....mE26

with

yj(x0)=yj0E27

y˙j(x0)=y˙j0for all j= 1,2,…..m.

### 3.1. Parallel Runge-Kutta 2-stage 3-order arithmetic mean algorithm

A parallel 2-stage 3-order arithmetic mean Runge-Kutta technique is one of the simplest technique to solve ordinary differential equations. It is an explicit formula which adapts the Taylor’s series expansion in order to calculate the approximation. A parallel Runge-Kutta 2-stage 3-order arithmetic mean formula is of the form,

k1=hf(xn,yn)E28
k2=hf(xn+12,yn+k12)=
k2*E29
k3=hf(xn+k1,yn+k1)=
k3*E30
.

Hence, the final integration is a weighted sum of three calculated derivatives per time step is given by,

yn+1=yn+h6[k1+4k2+k3]E31
.

Parallel 2-stage 3-order arithmetic mean Runge-Kutta algorithm to determine yj and y˙j,j=1,2,3,....mis given by,

yjn+1=yjn+h6[k1j+4k2j+k3j]E32
and
y˙jn+1=y˙jn+h6[u1j+4u2j+u3j]E33
k1j=y˙jnE34
, k2j=y˙jn+hu1j2=
k2j*E35
k3j=y˙jn+hu1j=
k3j*E36
u1j=f(xn,yjn,y˙jn),
j=1,2,3....,mE37
u2j=f(xn+h2,y1n+hk112,y2n+hk122,...,ymn+hk1m2,y˙1n+hu112,y˙2n+hu122,...,y˙mn+hu1m2)E38
u3j=f(xn+h,y1n+hk11,y2n+hk12,...,ymn+hk1m,y˙1n+hu11,y˙2n+hu12,...,y˙mn+hu1m)E39
.

The corresponding parallel 2-stage 3-order arithmetic mean Runge-Kutta algorithm array to represent equation (9) takes the form

 0 12 12 1 1 1 4 1

### Table 1.

Therefore, the final integration is a weighted sum of three calculated derivatives per time step given by,

yn+1=yn+h6[k1+4k2+k3]E40

### 3.2. Parallel Runge-Kutta 2-stage 3-order geometric mean algorithm of type-I

The parallel 2-stage 3-order geometric mean Runge-Kutta formula of type–I is of the form,

k1=hf(xn,yn)E41
, k2=hf(xn+23,yn+2k13)=
k2*E42
,k3=hf(xn+k1,yn+k1)=
k3*E43
,

Hence, the final integration is a weighted sum of three calculated derivates per time step which is given by,

yn+1=yn+hk114k234E44
.

Parallel 2-stage 3-order geometric mean Runge-Kutta algorithm of type–I to determine yj and y˙j,j=1,2,3,....mis given by,

yjn+1=yjn+hk1j14k2j34E45
,and
y˙jn+1=y˙jn+hk1j14k2j34E46
,
k1j=y˙jnE47
, k2j=y˙jn+2hu1j3=
k2j*E48
,k3j=y˙jn+hu1j=
k3j*E49
,u1j=f(xn,yjn,y˙jn),
j=1,2,3....,mE50
u2j=f(xn+2h3,y1n+2hk113,y2n+2hk123,...,ymn+2hk1m3,y˙1n+2hu113,y˙2n+2hu123,...,y˙mn+2hu1m3),E51
u3j=f(xn+h,y1n+hk11,y2n+hk12,...,ymn+hk1m,y˙1n+hu11,y˙2n+hu12,...,y˙mn+hu1m).E52

parallel Runge-Kutta 2-stage 3-order geometric mean of type–I array represent equation (13) takes the form

Hence, the final integration is a weighted sum of three calculated derivatives per time step and the parallel Runge-Kutta 2-stage 3-order geometric mean of type–I formula is given by,

yn+1=yn+hk114k234E53
.
 0 23 23 1 1 114 114

### Table 2.

3.3. Parallel 2-stage 3-order geometric mean runge-kutta formula of type–II

The parallel 2-stage 3-order geometric mean Runge-Kutta formula of type–II is of the form,

k1=hf(xn,yn)E54
,
k3=hf(xnk16,ynk16)E55
.

Hence, the final integration is a weighted sum of three calculated derivates per time step given by,

yn+1=yn+hk14k33E56
.

Parallel 2-stage 3-order geometric Mean Runge-Kutta algorithm of type–II to determine yj and y˙j,j=1,2,3,....mis given by,

yjn+1=yjn+h[k1j4k3j3]E57
.and
y˙jn+1=y˙jn+h[u1j4+u3j3]E58
.
k1j=y˙jnE59
,
k3j=y˙jnhuij6E60
,u1j=f(xn,yjn,y˙jn),
j=1,2,3....,mE61
u3j=f(xnh6,y1nhk116,y2n+hk126,...,ymn+hk1m6,y˙1n+hu116,y˙2n+hu126,...,y˙mn+hu1m6).E62

The corresponding parallel Runge-Kutta 2-stage 3-order geometric mean algorithm of type-II array to represent Equation (17) takes the form:

 0 −16 −16 14 1−3

### Table 3.

Therefore, the final integration is a weighted sum of three calculated derivatives and the parallel Runge-Kutta 2-stage 3-order geometric mean algorithm formula is given by

yn+1=yn+hk14k33E63
.

## 4. Results and conclusion

In this paper, the ultimate idea is focused on making use of parallel integration algorithms of Runge-Kutta form for the step by step solution of ordinary differential equations to solve system of second order robot arm problem. The discrete and exact solutions of the robot arm model problem have been computed for different time intervals using equation (5) and yn+1. The values of e1(t), e2(t),e3(t) and e4(t) can be calculated for any time tranging from 0.25 to 1 and so on.

To obtain better accuracy for e1(t), e2(t), e3(t) and e4(t)by solving the equations (5) and yn+1.

 Sol. No. Time ExactSolution Parallel RKAMSolution Parallel RKAMError 1 0.00 -1.00000 -1.00000 0.00000 2 0.25 -0.99365 -0.99533 -0.00167 3 0.50 -0.97424 -0.97864 -0.00440 4 0.75 -0.94124 -0.94943 -0.00819 5 1.00 -0.89429 -0.90733 -0.01303

### Table 4.

Solutions of equation (5) for e1(t)

 Sol. Time ExactSolution Parallel RKAMSolution Parallel RKAMError 1 0.00 0.00000 0.00000 0.00000 2 0.25 0.05114 0.04598 0.00515 3 0.50 0.10452 0.09412 0.01044 4 0.75 0.15968 0.14389 0.01578 5 1.00 0.21610 0.19499 0.02110

### Table 5.

Solutions of equation (5) for e2(t)

 Sol. No. Time ExactSolution Parallel RKAMSolution Parallel RKAMError 1 0.00 -1.00000 -1.00000 0.00000 2 0.25 -0.99965 -0.99973 -0.00008 3 0.50 -0.99862 -0.99871 0.00009 4 0.75 -0.99693 -0.99700 0.00007 5 1.00 -0.99460 -0.99462 0.00001

### Table 6.

Solutions of equation (5) for e3(t)

 Sol. No. Time ExactSolution Parallel RKAMSolution Parallel RKAMError 1 0.00 0.00000 0.00000 0.00000 2 0.25 0.00277 0.00285 -0.00007 3 0.50 0.00545 0.00560 -0.00015 4 0.75 0.00805 0.00879 -0.00074 5 1.00 0.01056 0.01084 -0.00028

### Table 7.

Solutions of equations (5) for e4(t)

Similarly, by repeating the same computation process for parallel Runge-Kutta 2- stage 3- order geometric mean algorithm of type-I and type-II respectively, yield the required results. It is pertinent to pinpoint out that the obtained discrete solutions for robot arm model problem using the 2-parallel 2-processor 2-Stage 3-order arithmetic mean Runge-Kutta algorithm gives better results as compared to 2-parallel 2-procesor 2-stage 3-order geometric mean Runge-Kutta algorithm of type-I and 2-parallel 2-procesor 2-stage 3-order geometric mean Runge-Kutta algorithm of type-II. The calculated numerical solutions using 2-parallel 2-procesor 2-stage 3-order arithmetic mean Runge- Kutta algorithm is closer to the exact solutions of the robot arm model problem while 2-parallel 2-procesor 2-stage 3-order geometric mean Runge-Kutta algorithm of type-I and type-II gives rise to a considerable error. Hence, a parallel Runge-Kutta 2-stage 3-order arithmetic mean algorithm is suitable for studying the system of second order robot arm model problem in a real time environment. This algorithm can be implemented for any length of independent variable on a digital computer.

## Acknowledgments

The first author would like to extend his sincere gratitude to Universiti Sains Malaysia for supporting this work under its post-doctoral fellowship scheme. Much of this work was carried out during his stay at Universiti Sains Malaysia in 2011. He wishes to acknowledge Universiti Sains Malaysia’s financial support.

chapter PDF
Citations in RIS format
Citations in bibtex format

## How to cite and reference

### Cite this chapter Copy to clipboard

S. Senthilkumar and Abd Rahni Mt Piah (June 9th 2011). Solution to a System of Second Order Robot Arm by Parallel Runge-Kutta Arithmetic Mean Algorithm, Robot Arms, Satoru Goto, IntechOpen, DOI: 10.5772/19064. Available from:

### Related Content

#### Robot Arms

Edited by Satoru Goto

Next chapter

#### Knowledge-Based Control for Robot Arm

By Aboubekeur Hamdi-Cherif

First chapter

#### Introduction to Infrared Spectroscopy

By Theophile Theophanides

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.