Sunteți pe pagina 1din 7

Proceedings of FDA’10. The 4th IFAC Workshop Fractional Differentiation and its Applications. Article no.

FDA10-038
Badajoz, Spain, October 18-20, 2010 (Eds: I. Podlubny, B. M. Vinagre Jara, YQ. Chen,
V. Feliu Batlle, I. Tejado Balsera). ISBN 9788055304878.

Adaptive Fractional PID Controller for Robot Manipulator


H. Delavari*,**, R. Ghaderi*, A. Ranjbar N.* , S.H. HosseinNia***, S. Momani****


*Intelligent Research Group, Babol (Noushirvani) University of Technology,
Faculty of Electrical and Computer Engineering,
P.O. Box 47135-484, Babol, Iran,( r.ranjbar@nit.ac.ir)
**Hamedan university of Technology, Faculty of Electrical Engineering,(hdelavary@gmail.com),Hamedan, Iran
*** Department of Electrical, Electronic and Automation Engineering,
Industrial Engineering School,University of Extremadura, Badajoz, Spain
**** Department of Mathematics, Faculty of Science, University of Jordan,
Amman 11942, Jordan

Abstract: A Fractional adaptive PID (FPID) controller for a robot manipulator will be proposed. The
PID parameters have been optimized by Genetic algorithm. The proposed controller is found robust by
means of simulation in a tracking job. The validity of the proposed controller is shown by simulation of
two-link robot manipulator. The result then is compared with integer type adaptive PID controller. It is
found that when error signals in the learning stage are bounded, the trajectory of the robot converges to
the desired one asymptotically.
Keywords: Fractional order controller, Adaptive FPID, Robot Manipulator, Genetic algorithms.
robotic arm. A fractional derivative controller is used to
1. INTRODUCTION
shape an outer loop into a form of a fractional order
In recent years, the use of robotic arms in industrial integrator. The resultant step response behaves constant
applications has significantly been increased. Due to highly overshoot, independent of variations in the load, and robust,
coupled nonlinear and time varying dynamic, the robot in a stability sense, to spillover effects. In (Duarte et al.,2002)
motion tracking control is one of the challenging problems. several aspects of phenomena generated by a pseudo-inverse-
In addition uncertainty in the parameters of both mechanical based trajectory control of redundant manipulators are
part of manipulators and the actuating systems would cause studied. Results are consistent which represent a step towards
more complexity. Many control algorithm such as computer understanding the relation between chaotic phenomena and
torque method(Spong et al.,1989), optimal control(Green et fractional calculus. Interactive communication between robot
al.,2004; Green et al.,2001), variable structure control (VSC) and human has been presented through a human interface
(Slotine et al.,1991), neural networks (NNs) (Barambones et design for path planning, using a fractional potential to take
al.,2002) and fuzzy system (Llama et al.,2000; Yoo et into account danger of obstacles in (Melchior et al.,2002).
al.,2000; Cruz et al.,2006; Labiod et al.,2005) have been In this paper, a novel adaptive FPID controller for n-R planar
proposed to deal with this problem. Here because of manipulator will be proposed. It must be noted that robot
nonlinear dynamics in robot manipulator, adaptive FPID has dynamics have integer order derivative and just the controller
investigated. has fractional order derivative. Although FPID controller has
Recently, fractional control of nonlinear systems begins to good performance but in order to have more robustness,
attract increasing attention to applications in control smoother control signal and smaller tracking error an
engineering. A fractional-order controller to stabilize an adaptive FPID is proposed here.
unstable open loop has been proposed in (Tavazoei et It is known that the integration and differentiation can be
al.,2007). Adaptive fractional controller and adaptive PID specified in terms of the fundamental operator a Dt known
controller are proposed to control chaotic systems in
as differ-integration operator, where a and t are limited, and
(Hosseinnia et al.,2008a) and (Hosseinnia et al.,2008b),
respectively. An adaptive fractional PID controller has been for the ordinary integration,   Z  is the order of the
studied in (Ladaci, et al.,2006). The performance of integer operator, where Z  is the set of integers. In the case of non-
and fractional order controllers in a hexapod robot with joints integer integration and differ-integration,   R .There are
at the legs having viscous friction and flexibility has been several basic definitions of the non-integer integration and
studied (SILVA et al.,2004). The experiments reveal that differentiation. Among them, the most popular two
even when a good model of real operating dynamical definitions are the Grünwald–Letnikov (GL) and the
phenomena exists, an implemented fractional-order PDα Riemann–Liouville (RL) and the Caputo definitions.
controller would provide better robustness in comparison The GL definition is:
with an integer-order PD algorithm. Ref. (Valério et (t  ) h (1)
 

 1
al.,2003) assesses relative merits and drawbacks of different a Dt f (t )  lim  (1) j   f (t  jh)
digital implementations of non-integer order controllers for a h 0 h
j 0 j

Page 1 of 7
Where . is a flooring-operator while the RL definition is manipulator generally presents uncertainties such as frictions
given by: and disturbances. Therefore, (5) can be written as:
t (2) M ( q) q  C ( q, q )q  G ( q )  Dist  U (6)
1 dn f ( )


D
a t f ( t )  d  where Dist stands for uncertainty of the dynamic,
(n   ) dt n a (t   )  n 1
including F (q ) frictions and disturbance. The friction in
For ( n  1    n ) and ( x ) is the well-known Euler’s
dynamic (6) is of the form F (q )  Fv q  Fd sgn( q )
Gamma function. According to recent literatures, an equation
contains fractional-order derivative/integration is referred to where Fv , Fd are the coefficient matrix of viscous friction
as fractional-order ordinary differential/integral equation and dynamic friction term, respectively.
(FO-ODE for the former in short). FO-ODE is defined as an
equation containing fractional-order derivatives, which is as
follows:
g (t , x, a Dt1 x, a Dt 2 x,...)  0 (3)
where  k  R  . The Caputo's definition can be written as
t (4)
1 f ( n ) ( )


a Dt f (t )  d
(  n) (t   )  n 1
a
For ( n  1    n ) . In this paper, fractional operators are
implemented by continuous CRONE approximations. In the Fig. (1): n-link planar robot
robotics context, it is known that PID controllers are sensitive
to uncertainties which arise from imprecise knowledge of the 3. DESIGN OF FRACTIONAL ADAPTIVE PID
kinematics and dynamics, and from joint and link flexibility, CONTROLLER
actuator dynamics, friction, sensor noise, and unknown loads, Let us consider a 2-degree of freedom dynamic of robot
then an adaptive fractional PID (FPID) controller is proposed manipulators as:
to use the robustness of fractional order controller and (7)
q    M ( q)  [C ( q, q )q  G ( q)  Dist ]   M ( q )  U
1 1
  
adaptive controller. Three PID control gains in (10), Kp, Ki,
and Kd, are adjustable parameters and will be updated online where M ( q )  R 2 2 , C ( q, q )  R 22 , G( q)  R 21 ,
with an adequate adaptation mechanism and the  and  will
Dist  R 21 and U  R 21 . Suppose that we can choose a gain
be determined offline, here a genetic algorithm will be used.
By introducing a supervisory controller, the stability of the vector K  [k0 , k1 ]T such that roots of S 2  k1S  k0  0 are
closed-loop FPID control system under external disturbance in the open left-half complex plane, and let qd is desired
can be guaranteed. In previous works, FPID controller
state and E   e e with e  qd  q is the error vector
T
parameters Kp, Ki, and Kd are constant during the control
process but here in this paper these parameters will be signal between the desired and actual outputs. Define
updated online with an adequate adaptation mechanism to
Qd   qd q d  and assume that both qd and qd are bounded,
T
have better results.
This paper is organized as follows: Section 2 presents i.e., Qd 
 sup t  0 Qd (t )   .Now let a feedback
dynamic of n-R planar manipulator. Adaptive FPID controller
linearization controller be given by:
designation and tuning FPID controller and the effect of
fractional parameters are discussed in Section 3 and Section 
u*  C ( q, q )q  G ( q )  Dist  M ( q ) K T E  qd  (8)
4, respectively. Simulation Result is studied in section 5.
Substituting (4) into (2), we have 
e  k1e  k0  0 it means
Finally, concluding remarks are drawn in Section 6.
that we have e(t )  0 as t   i.e. q  qd asymptotically.
2. DYNAMICS OF n-R PLANAR MANIPULATOR
It must be noted that we assume the constraint set
For controller design, it is necessary to have a mathematical  x   X  R 2 : X  M x  where M x is a pre-specified
model of system. A robot manipulator can be defined as an
open kinematics chain of usually rigid links in Fig.1. parameter. It is assumed that the state trajectory of system
According to the Lagrangian formulation, dynamic of an n- X never reaches the boundary  x during the control
joint robot manipulator with revolute joints can be formulated
procedure, and we define that qd  M x . Now we choose
as: 

M ( q )q  C ( q, q )q  G ( q )  U (5) the control input by:


U  uFPID  us (9)
where q , q , q  R n are n-D joint variables and U represents
A control input U  R will be generated from a FPID and
21

n-D generalized forces. M (q )  R n n is a symmetric and a supervisory controller. The latter will be designed to
positive definite inertia matrix, C ( q, q ) q , the Coriolis provide the stability. The schematic diagram of control
/centripetal vector, and G (q) is the gravity vector. A robot process is shown in Fig.2. The fractional controller part i.e.
u FPID will be generated according to:

Page 2 of 7
u FPID  K Tp diag e (t )   If G  G u and Dist  d u therefore: (10)
(10)
K Ti D  diag e (t )   K dT D diag e (t )  u *  Gu  d u  C ( q, q ) q  M ( q) K T E  M ( q) qd (19)

Where, K p  R
21
, K i  R 21 and K d  R 21 whilst Selecting a supervisory controller:
0 ,V u V M
e(t )  R 21 stands for the error vector and  ,  is fractional 

u s  sgn( E P  M (q )  B ){Gu  d u  C (q , q )q
T 1
order integral and differential. (20)

  M (q ) K E  M (q )qd  u FPID }
Substituting the control input into equation (7), we have, in T
,V u V M
view of (8):
1 Together with (18) guarantees the stability.(11)
q    M (q )  [C (q , q )q  G (q )  D ist ]
1
  M (q )  (u FPID  u s )
1
   M (q )  [C (q , q )q  G (q )  D ist ] (11)
1
  M (q )  (u FPID  u s  u *  u * )
1
 K T E  qd   M (q )  (u FPID  u s  u * )
With the error vector signal e  qd  q one can obtain:
e   K T E   M ( q )  (u FPID  u s  u * )
 (12)
1

where E  [e, e ]T and K  [k0 , k1 ]T . Defining: Fig. 2. Robust fractional adaptive PID control for robot
 0 1  0 manipulator system.
A   ,B   
  k0  k1  1  4. FPID CONTROLLER TUNING AND PARAMETERS
Changes equation (12) into a companion form of: OF THE FRACTIONAL CONTROLLER

E  AE   M ( q )  B ( uFPID  us  u * ) (13)
1
When a supervisory controller is designed, parameters of the
FPID controller i.e.  and  have to be determined, here a
The following function will be a candidate of the Lyapunov:
genetic algorithm has used to determine these parameters. An
V u  1 2  E T PE (14)
adaptive technique based on gradient method can be used to
where P is a positive definite matrix which will be obtained tune (determine) parameters of FPID controller coefficients
from the following relation: ( K P , K I , K D ).
AT P  PA  Q (15)
4.1 Tuning FPID controller based on adaptive law
where Q is a positive definite matrix. In order to tune the parameters, an adaptation mechanism
This may be designed by the user in advance. Let us Define should be designed. Let us define a designed signal qr as:
VM as: (21)
 
T
qr  qd  K E
V  1 2  min( ( P ))( M  q )2
M x
(16)
d  This may be achieved using a sliding mode controller. A
sliding surface for each arm can be defined as:
Leads us to the following equation: S  q  qr (22)
V u  1 2  min( ( P ))( E ) 2  When the system settles at the sliding mode, i.e. S  0
therefore:
1 2  min( ( P ))( q  qd )  2
(17) q  qr (23)
1 2  min( ( P ))( M x  qd  )2 V M Replacement of relation (23) in (21) approaches:
(24)
q  qd  K E
T
Where min( ( P )) denotes the minimum value of eigenvalue
of matrix P. For the case V u  V M one obtains qd  M x . Or in a scalar format:

e  k1e  k0e  0 (25)
Meanwhile when Vu satisfies in equation (14), leads us to:
The error approaches zero when k0 and k1 are assigned
Vu  1 2  E ( A P  PA ) E 
T T

appropriately. To investigate the stability a Lyapunov


EP  M (q )  B ( u FPID  u s  u * ) 
1 function will be candidate as follows:
(26)
V s  1 2  S  0
2

 1 2  E QE  E P  M (q )  B ( u FPID  u s  u * )
T T 1
(18)
In order to stay in the sliding mode the differentiation of the
  1 2  E QE  E P  M (q )  B ( u FPID  u * )
T T 1
Lyapunov function must be negative definite. Satisfying the
necessity in (27) guarantees states to keep staying in the
 E P  M (q )  Bu s
T 1
surface S  0 .

Page 3 of 7
Vs  SS  0 (27) y
For a proper adaptation mechanism, the gradient method will
be used to condition in (27). The gradient search algorithm is
calculated in the opposite direction of the energy flow. The q2
derivative of the sliding surface is:
S  q  q  [ M (q ) Cq  G  D
   (28)

1
r ist q1
O x
  M (q )  (u FPID  u s )  qr ]
1

Multiplication of S to both sides of equation (28) yields: Fig. 3: A two-link robot manipulator
SS  S .[   M (q )  Cq  G  D ist   (29)
1

 M 11 M 12  C C 12  G   D ist 1  U 1  (34)
 M (q ) 
1
(u FPID  u s )  qr ] M  q   11  q   1     
 21 M 22  C 21 C 22  G 2   D ist 2  U 2 
Accordingly, the PID coefficients will be updated as: where:
K P   grad (SS , K p ) 
(30) M 11  ( m1  m 2 )l12  m 2l 22  2 m 2l 1l 2 cos q 2 ,
 grad (SS ,u FPID ). grad (u FPID , K p ).   Se (t )  T
M 12  m 2l 22  m 2 l1l 2 cos q 2 , M 21  M 12 ,
K I   grad (SS , K i ) 
M 22  m 2 l 22 ,C 11  2( m 2  m 3 )l1l 2q2 sin q 2
grad (SS ,u ).grad (u , K i ). 
FPID FPID
(31) C 22  0,C 12  ( m 2  m 3 )l1l 2q2 sin q 2 ,
T (35)
S   e ( )d    C 21  ( m 2  m 3 )l1l 2q1 sin q 2
t

 0 
G1  g ( m1l1 cos q1  m 2l 1 cos q1  m 2 l 2 cos (q1  q 2 ))
K d   grad (SS , K d ) 
G 2  gm 2 l 2 cos(q1  q 2 ), D ist k  d k (t ), k  1, 2
 grad (SS ,u ). grad (u , K d ). 
FPID FPID
(32) U 1  1, U 2   2
T
d  Where m1 and m2 are masses, l1 and l2 are lengths of link
 S  e (t )  .
 dt 
1 and 2, respectively.  1 and  2 are driving force and torque
where   R 21 is a positive learning coefficients vector. As
at joints 1 and 2 respectively. d k (t ) is unknown but bounded
proposed, best fit parameters of fractional controller will be
updated using Genetic Algorithm. It is of the goal to verify external disturbance with:
the performance of an artificial FPID with respect to the d (t )  d , k  1,2 (36)
k uk
classic controller.
During the simulation, parameters are chosen as: m1  1kg ,
4.2 Genetic Algorithm (GA) based Tuning of fractional
parameters m2  1 kg , l1  1m , l2  0.8m , g  9.8 m s 2 and the
The following cost function will be defined to simultaneously initial conditions are
minimize the control energy (effort) and the tracking error. [q1 (0), q1 (0),q 2 (0), q2 (0)]T  [0,-0.2, 0.35,0.5]T . Considering

I  w 1 (q  q d ) 2  w 2 u 2 (33) the disturbance d1 (t )  0.4 cos(5t ) Nm and
where u 2 is the control energy, wi , i  1, 2 is the weighting d 2 (t )  0.6 cos(5 t ) Nm , an upper limit of related
functions are assumed as follows:
coefficients, q and qd are the system output and the desired
 0.4 cos(5 t )   0.4 (37)
one, respectively. The search space to find FPID coefficient D ist (.)     
is a real number. The parameters of the GA with trial and  0.6cos(5 t )   0.6
error are chosen as: Population size = 60, Crossover Primary setting of FPID coefficients are chosen as:
probability = 0.75, Generations = 80, Mutation probability = k P 2 (0)  10 , k I 1 (0)  25 , K D 1 (0)  20 k P 2 (0)  12
0.03. In this method Genetic algorithm is used offline.
The outcome of Genetic Algorithm verifies that FPID k I 2 (0)  20 , K D 2 (0)  15 whilst the learning rate has been
achieves less cost function. selected as  1   2  25 . GA will be used to minimize the
5. SIMULATION RESULTS cost in (33) to find an optimum value of the fractional
controller. Meanwhile, the search space of  and  is a real
5.1 A two-link robot manipulator
In this section, the proposed adaptive FPID controller is used space of [0,1] and [-1,0] respectively. Parameters are
on a two-link robot manipulator in Fig.3, where parameter averaged over some different run and found as: 1  0.901 ,
matrices are given by: 1  0.921 , 2  0.931 , and 2  0.932 .
The robot manipulator joints are driven according to the
following desired trajectory:
q1d  sin(t ) (38)
q2 d  sin(t )

Page 4 of 7
The controller parameter k 11  k 12 and k 21  k 22 have been Regarding equations (15), yields the symmetric and definite
assigned as 1 and 2 respectively. The performance is shown 1.75 1 
positive matrix p as: P1  P2    . Tracking of
improved (Fig. 4- Fig. 5) when the search space is expanded
 1 1.5
from the integer type to the fractional one. FPID controller
reduces the tracking error significantly. q1 , q1d and q 2 , q 2d by using integer order and fractional
In comparison with equation (15) a matrix gain A1 , A2 can be order controller have been shown in Fig.4.a , Fig .5.a
respectively, whereas control signals are shown in Fig. 4.b,
found and choosing Q1 , Q2 as: and Fig.5.b. As it can be seen the tracking is made enhanced
 0 1 1 0  (39) together with more feasibility of the control signal, if the
A1  A2    , Q1  Q2    fractional controller is used.
 0.5 1 0 1 
2 2
q1 q2
1.5 1.5
q1d q2d
1
1
0.5
0.5
0
0
-0.5
-0.5 -1

-1 -1.5
0 10 20 30 0 10 t 20 30
t

(a)
50 3000

2000 2000

1000
0
1000 0
u1

-1000
u2

0 0.1 0.2 0.3 0.4


-50 0 t
20

10

-1000
-100 0
9 9.2 9.4 9.6 9.8 10
0 10 20 30 t
t 0 10 20 30
t
(b)
1 0.4

0.2
0.5
0
e2
e1

0 -0.2

-0.4
-0.5 0 10 20 30
0 10 20 30
t
t

(c)
Fig. 4: Simulation result of an integer-order controller, (a) Tracking of desired and actual state,
(b) control signals, (c) Error of tracking

Page 5 of 7
1.5 1.5
q q2
1
1 q 1 q2d
1d

0.5 0.5

0 0

-0.5 -0.5

-1 -1

-1.5 -1.5
0 5 10 15 20 25 30 0 5 10 15 20 25 30
t t
(a)
80 100

60
50

40
u2

0
1
u

20
-50
0

-20 -100
0 5 10 15 20 25 30 0 5 10 15 20 25 30
t t

(b)
0.1 0.4

0
0.3
-0.1

-0.2 0.2
e1

e2

-0.3
0.1
-0.4

-0.5 0

-0.6
0 5 10 15 20 25 30 -0.1
t
0 5 10 15 20 25 30
t
(c)
Fig. 5: Simulation result of a fractional-order controller, (a) Tracking of desired and actual state,
(b) control signals, (c) Error of tracking

6. CONCLUSION
REFERENCES:
A trajectory control of a robot manipulator using adaptive Spong, M.W., and Vidyasagar, M. (1989). Robot
FPID controller and integer order PID control algorithms has Dynamics and Control, Wiley, New York.
been studied. Three PID control gains in (10), Kp, Ki, and Kd, Green, A., and Sasiadek, J.Z. (2004). Dynamics and
are adjustable parameters and will be updated online with an trajectory tracking control of a two-link robot
adequate adaptation mechanism and the  and  will be manipulator, J. Vibr. Control 10 (10) 1415–1440.
determined offline, here a genetic algorithm will used. The Green, A., Sasiadek, J.Z. (2001). Fuzzy and optimal
stability of closed-loop FPID control system can be control of a two-link flexible manipulator, in:
guaranteed under external disturbance by using the Lyapunov Proceedings of the IEEE/ASME International
approach with a supervisory controller. The proposed control Conference on Advanced Intelligent Mechatronics , pp.
technique was analyzed for two types of manipulators having 1169–1174.
different dynamic (It is clear that robot dynamics have integer Slotine, J.E., and Li, W. (1991). Applied Nonlinear
order derivative and just the controller has fractional order Control, Prentice-Hall, Englewood Cliffs (NJ).
derivative). A genetic algorithm has also been used to choose Barambones, O., and Etxebarria, V. (2002). Robust
the order of the fractional order. Simulation result verifies the neural control for robotic manipulators, Automatica 38
significance of the fractional controller. 235–242.

Page 6 of 7
Llama, M.A., Kelly, R., and Santibanez, V. (2000). controller to synchronize fractional –order hard spring
Stable computed-torque control of robot manipulators Φ6-van der pol oscillator, Third IFAC international
via fuzzy self-tuning, IEEE Trans. Syst. Man Cybern. 30 workshop on Fractional Differential and its Application.
143–150. SILVA, M. F., MACHADO, J. A. T., and LOPES, A.
Yoo, B.K., and Ham,W.C. (2000). Adaptive control of M., (2004). Fractional Order Control of a Hexapod
robot manipulator using fuzzy compensator, IEEE Robot, Nonlinear Dynamics 38: 417–433.
Trans. Fuzzy Syst. 8 186–198. Valério, D., Costa, José Sá da (2003). DIGITAL
Cruz, E.A.M., and Morris, A.S., (2006), Fuzzy-GA- IMPLEMENTATION OF NON-INTEGER CONTROL
based trajectory planner for robot manipulators sharing AND ITS APPLICATION TO A TWO-LINK
a common workspace, IEEE Trans. Robot. 22 613–624. ROBOTIC ARM, In European Control Conference,
Labiod, S., Boucherit, M.S., and T.M., Guerra, (2005). Cambridge.
Adaptive fuzzy control of a class of MIMO nonlinear Fernando B. M. D., and Tenreiro Machado, J. A.,
systems, Fuzzy Sets Syst. 151 59–77. (2002). Pseudo inverse Trajectory Control of Redundant
Tavazoei, M. S., and Haeri, M. (2008). Chaos control Manipulators: A Fractional Calculus Perspective,
via a simple fractional-order controller, Physics Letters CRA’02-2002 IEEE Int. Conference on Robotics and
A, 372, 798–807. Automation, Washington,USA, pp175- 180.
Hosseinnia, S.H., Ghadrei, R., Ranjbar N., A., Sadati, J., Melchior, P., Orsoni, B., Lavialle, O., and Oustaloup,
and Momani, S., (2008). Synchronization of fractional A., (2002). The CRONE toolbox for Matlab: Fractional
chaotic system via fractional-order adaptive controller, Path Planning Design in Robotics, 41st IEEE
Third IFAC international workshop on Fractional CONFERENCE ON DECISION AND CONTROL,
Differential and its Application. LAS VEGAS, DECEMBER 9, pp252- 258.
Hosseinnia, S.H., Ghadrei, R., Ranjbar N., A., Sadati, J., Ladaci, S. and Charef, A. (2006)An Adaptive
and Momani, S., (2008). Designation of an adaptive PID Fractional PI  Dµ Controller , Proceedings of TMCE
2006, April 18–22,Ljubljana, Slovenia, pp. 1533-1540.

Page 7 of 7