neuro sliding mode control of robotic manipulators

25
Neuro sliding mode control of robotic manipulators Meliksah Ertugrul a , Okyay Kaynak b, * a TUBITAK MRC, Information Technologies Research Institute, 41470, Gebze, Turkey b Mechatronics R&A Center, Bogazic ° i University, 80815, Istanbul, Turkey Received 27 October 1998; accepted 13 May 1999 Abstract In this paper, a synergistic combination of neural networks with sliding mode control (SMC) methodology is proposed. As a result, the chattering is eliminated and error performance of SMC is improved. In the approach, two parallel Neural Networks (NNs) are utilized to realize a neuro-SMC. The equivalent control and the corrective control terms of SMC are the outputs of the NNs. The weight adaptations of NNs are based on the SMC equations in such a way that the use of the gradient descent method minimizes the control activity and the amount of chattering while optimizing the error performance. The approach is almost model-free, requiring a minimal amount of a priori knowledge and robust in the face of parameter changes. Experimental studies carried out on a direct drive arm are presented, indicating that the proposed approach is a good candidate for trajectory control applications. # 1999 Elsevier Science Ltd. All rights reserved. 1. Introduction Variable structure systems (VSSs) with a sliding mode were first proposed in the early 1950s, but it was not until the 1970s that sliding mode control (SMC) became more popular. It nowadays enjoys a wide variety of application areas. The main reason for this popularity is the attractive superior properties of SMC, such as good control performance even in the case of nonlinear systems, applicability 0957-4158/00/$ - see front matter # 1999 Elsevier Science Ltd. All rights reserved. PII: S0957-4158(99)00057-4 Mechatronics 10 (2000) 239–263 * Corresponding author. Tel.: +90-212-287-2475; fax: +90-212-287-2465. E-mail address: [email protected] (O. Kaynak).

Upload: anonymous-zte8oy2e

Post on 12-Jul-2016

6 views

Category:

Documents


0 download

DESCRIPTION

Neuro sliding mode control of roboticmanipulators

TRANSCRIPT

Page 1: Neuro sliding mode control of robotic manipulators

Neuro sliding mode control of roboticmanipulators

Meliksah Ertugrula, Okyay Kaynakb,*aTUBITAK MRC, Information Technologies Research Institute, 41470, Gebze, Turkey

bMechatronics R&A Center, Bogazic° i University, 80815, Istanbul, Turkey

Received 27 October 1998; accepted 13 May 1999

Abstract

In this paper, a synergistic combination of neural networks with sliding mode control(SMC) methodology is proposed. As a result, the chattering is eliminated and error

performance of SMC is improved. In the approach, two parallel Neural Networks (NNs)are utilized to realize a neuro-SMC. The equivalent control and the corrective control termsof SMC are the outputs of the NNs. The weight adaptations of NNs are based on the

SMC equations in such a way that the use of the gradient descent method minimizes thecontrol activity and the amount of chattering while optimizing the error performance. Theapproach is almost model-free, requiring a minimal amount of a priori knowledge and

robust in the face of parameter changes. Experimental studies carried out on a direct drivearm are presented, indicating that the proposed approach is a good candidate for trajectorycontrol applications. # 1999 Elsevier Science Ltd. All rights reserved.

1. Introduction

Variable structure systems (VSSs) with a sliding mode were ®rst proposed in theearly 1950s, but it was not until the 1970s that sliding mode control (SMC)became more popular. It nowadays enjoys a wide variety of application areas. Themain reason for this popularity is the attractive superior properties of SMC, suchas good control performance even in the case of nonlinear systems, applicability

0957-4158/00/$ - see front matter # 1999 Elsevier Science Ltd. All rights reserved.

PII: S0957 -4158 (99)00057 -4

Mechatronics 10 (2000) 239±263

* Corresponding author. Tel.: +90-212-287-2475; fax: +90-212-287-2465.

E-mail address: [email protected] (O. Kaynak).

Page 2: Neuro sliding mode control of robotic manipulators

to MIMO systems, design criteria for discrete time systems, etc. The best propertyof the SMC is its robustness. Loosely speaking, a system with an SMC isinsensitive to parameter changes or external disturbances [1].

The essential characteristic of VSS is that the feedback signal is discontinuous,switching on one or more manifolds in state space. When the state crosses eachdiscontinuity surface, the structure of the feedback system is altered. All motion inthe neighbourhood of the manifold is directed towards the manifold and thus asliding motion occurs in which the system state repeatedly crosses the switchingsurface [2,3].

The theory of variable structure systems with a sliding mode has been studiedintensively by many researchers. Motion control, especially in robotics, has beenan area that has attracted particular attention and numerous reports haveappeared in the literature [4±10]. A recent survey is given in [1].

In practical motion control applications, an SMC su�ers mainly from twodisadvantages. The ®rst one is the high frequency oscillations of the controlleroutput, termed ``chattering''. The second disadvantage is the di�culty involved inthe calculation of what is known as the equivalent control. A thorough knowledgeof the plant dynamics is required for this purpose [4]. In literature, somesuggestions are made to abate these problems. The most popular technique for theelimination of the chattering is the use of a saturation function [10]. For avoidingthe computational burden involved in the calculation of the equivalent control anestimation technique can be used [4]. More recently, the use of ``intelligent''techniques based on fuzzy logic, neural networks, evolutionary computing andother techniques adapted from arti®cial intelligence have also been suggested.These methodologies provide an extensive freedom for control engineers to exploittheir understanding of the problem, to deal with problems of vagueness,uncertainty or imprecision, and to learn by experience and, therefore, are goodcandidates for alleviating the problems associated with sliding mode controllersabove. A good deal of work is reported in the literature in this respect, a fewexamples of which are cited in Refs. [11±27]. The main emphasis in these works ison the elimination of the requirement on exact priory knowledge of plantdynamics and on the smoothing of the control input. In one report [28], thesimilarity between fuzzy control and VSS is addressed and in some other [29±36],intelligent techniques are combined sliding mode control techniques.

Robotic manipulators are frequently used as test beds for the evaluation ofcomputationally intelligent identi®cation and control methods because theircoupled nonlinear equations and ambiguities on the friction related dynamicsinevitably require the use of ¯exible control architectures. A recently publishedbook [37] is devoted entirely to the topic of adaptive neural network control ofrobotic manipulators. The use of neural networks for learning the inversedynamics of the manipulator is a common approach. Two main approaches canbe identi®ed in this context [11,14,15]. The ®rst one utilizes o�-line learningtechniques and is named as ``general learning''. The learning process tries tominimize the square of the error between robot input and NN output. In thisstructure, after an initial o�-line training period, the NN is assumed to have learnt

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263240

Page 3: Neuro sliding mode control of robotic manipulators

the inverse dynamics and its output is directly connected to the robot input. In thesecond approach, termed as ``specialized learning'', on-line learning is adopted.The learning process tries to minimize the square of the error between the robotoutput and desired trajectory. In this structure the control and learning are carriedout simultaneously. Both methods have advantages and disadvantages.

A di�erent approach to the computation of inverse dynamics in robot control isproposed by Kawato et al. [12], termed as ``feedback error learning''. It is basedon the NN realization of the computed torque, plus a secondary PD controller.The output of the PD controller is used as the error signal to update the weightsof NN.

In this paper, two parallel NNs are proposed to realize the equivalent controland the corrective control of the SMC design. The equivalent control has a rolesimilar to that played by inverse dynamics. When the system states are on thesliding surface, the equivalent control is enough to keep the system on the surfaceand the corrective control is zero. The latter is necessary only when the systemstates deviate from the surface. Based on this interpretation, a two-layer feed-forward NN is designed to compute the equivalent control and weights areadapted to minimize the square of the corrective control. The corrective control ofSMC is also computed by an additional NN. The proposed adaptation schemedirectly results in chattering-free control action for the corrective control. Thedesign parameters (the gains) of SMC are admitted as the weights of the NN andadapted to minimize a cost function.

One of the main problems of an NN design is how to select the layers, numberof neurons for each layer and the connections between layers. In the structure ofthe corrective control that is proposed in this paper, this problem is not met sincethe network topology of the NN is well determined from the SMC design. NNhas a two-layer structure: a hidden and an output layer. The number of neuronsfor each layer and connections between neurons are directly established throughthe design of the SMC.

The paper concludes with the presentation of some experimental resultsobtained for the control of a direct drive scara-type robot.

2. Sliding mode control

In the application of the VSS theory to control nonlinear processes it is arguedthat one only needs to drive the error to a ``switching'' or ``sliding'' surface, afterwhich the system is in a ``sliding mode'' and will not be a�ected by any modellinguncertainties and/or disturbances [1,3]. Intuitively, VSS with a sliding mode isbased on the argument that the control of ®rst-order systems (i.e., systemsdescribed by ®rst-order di�erential equations) is much easier, even when they arenonlinear or uncertain, than the control of general nth-order systems [10].

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263 241

Page 4: Neuro sliding mode control of robotic manipulators

2.1. The system (plant)

Consider a nonlinear, non-autonomous, multi-input multi-output system of theform

x�ki �i � fi�X � �

Xmj�1

bijuj �1�

where x�ki �i indicates the kthi derivative of xi. The vector U of components uj is the

control input vector and the state X is composed of the xis and their ®rst (kiÿ1)derivatives. Such systems are called square systems since they have as manycontrol inputs as outputs xi to be controlled [10]. The system can be written in amore compact form as letting

X � bx1 . . . xm _x1 . . . _xm . . . x�k1ÿ1�1 . . . x �kmÿ1�m cT �2�

U � �u1 . . . um�T �3�Assuming that X is (n � 1), the system equation becomes

_X�t� � F�X � � BU�t� �4�where B is an (n � m ) input gain matrix.

2.2. Sliding surface

For the system given in (4), the sliding surface variable that is represented by Sis generally an (m � 1) vector. S= 0 de®nes a sliding surface. It is selected [4] as

S�X, t� � G�Xd�t� ÿ X�t�� � f�t� ÿ Sa�X � �5�where

f�t� � GXd�t�, Sa�X � � GX�t� �6�i.e., the time and the state dependent parts. The vector Xd represents the desired(reference) state and G (m � n ) is the slope matrix of the sliding surface.Generally, G is selected such that the sliding surface function becomes

Si ��

d

dt� li

�kiÿ1ei �7�

where ei is the error for xi (ei=xdiÿxi) and lis are selected as positive constants.

Therefore, ei goes to zero when Si equals zero.The aim in SMC is to force the system states to the sliding surface. Once the

states are on the sliding surface, the system errors converge to zero with errordynamics dictated by the matrix G.

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263242

Page 5: Neuro sliding mode control of robotic manipulators

2.3. Sliding mode controller design

In this section, the design of an SMC based on the selection of a Lyapunovfunction is presented [4]. The control should be chosen such that the candidateLyapunov function satis®es Lyapunov stability criteria. Lyapunov global stabilityis stated in the following theorem.

Lyapunov theorem for global stability: assume that there exists a scalar functionV of S, with continuous ®rst-order derivatives such that (A)V�S � is positive definite, (B) dV(S )/dt is negative de®nite, (C)V�S �41 as kSk41, then the equilibrium at the S= 0 is globallyasymptotically stable [10].

Let the Lyapunov function be selected as below:

V�S � � STS

2�8�

It can be noted that this function is positive de®nite (V(S = 0)=0 and V(S ) > 08S$0). It is aimed that the derivative of the Lyapunov function is negativede®nite. This can be assured if one can assure that

dV�S �dt� ÿSTD sign�S � �9�

where D is (m � m ) positive de®nite diagonal gain matrix, and sign(S ) meanssignum function is applied to each element of S, i.e.

sign�S � � �sign�S1� . . . sign�Sm��T �10�

and sign(Si) is de®ned as

sign�Si � ���1 if Si > 0ÿ1 otherwise

�11�

Taking the derivative of (8) and equating this to (9), the following equation isobtained:

ST dS

dt� ÿSTD sign�S � �12�

The time derivative of S can be obtained using (5) and the plant equation as givenbelow:

dS

dt� df

dtÿ @Sa

@X

dX

dt� df

dtÿ G�F�X � � BU � �13�

By putting (13) into (12), the control input signal can be written as

U�t� � Ueq�t� �Uc�t� �14�

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263 243

Page 6: Neuro sliding mode control of robotic manipulators

where Ueq(t ) is the equivalent control given by

Ueq�t� � ÿ�GB �ÿ1�GF�X � ÿ df�t�

dt

��15�

and Uc(t ) is the corrective control given by

Uc�t� � �GB �ÿ1D sign�S � � K sign�S � �16�

2.4. Chattering elimination

The controller of (14) exhibits high frequency oscillations in its output, causinga problem known as the chattering phenomena. Chattering is highly undesirablebecause it can excite the high frequency dynamics of the system. For itselimination, it is suggested to use a saturation [10] or a shifted sigmoid function[4] instead of the sign function. In the latter case, the corrective control iscomputed as

Uc�t� � Kh�S � �17�where h(�) is a shifted sigmoid function, de®ned as

h�Sj � � 2

1� eÿSjÿ 1 �18�

3. Neuro-sliding mode control

A basic Arti®cial Neural Network consists of ``neurons'', ``weights'' and``activation functions''. The weights are adapted to achieve a desired mappingbetween the input and the output sets. Nowadays, a variety of neuro-controllersare successfully used for various control applications [11].

3.1. The structure of the proposed controller

In the proposed structure, the equivalent control and the corrective control insliding mode control are computed by NN1 and NN2, respectively. The outputsof NN1 and NN2 are summed to form the control signal to be applied to therobot.

The weights of the NN2 are updated such that the error performance of theoverall system is improved. The weights of the NN1 are updated to minimize theoutput of the secondary controller. In other words, the output of the secondarycontroller is accepted as a measure of error for NN1. This is because, in slidingmode, equivalent control is enough to keep the system on the sliding surface and

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263244

Page 7: Neuro sliding mode control of robotic manipulators

corrective control is necessary to compensate the deviations from the surface. Theoverall system with the proposed controller is presented in Fig. 1.

3.2. Neural computation of the equivalent control

3.2.1. The parallels between the inverse dynamics and the equivalent controlIn model based trajectory control of robotic manipulators, the use of inverse

dynamics in a primary feedback±feed forward loop is very common. In this way,the nonlinear terms in the dynamics are cancelled as much as possible and asecondary controller is used to compensate for the plant-model mismatches anddisturbances. The technique is also known as the computed torque. In whatfollows, a parallel is drawn between the inverse dynamics and the equivalentcontrol.

A direct approach to show the equivalence of the inverse dynamics and theequivalent control is as follows; the system equation given in (4) can be solved forthe desired control signal as given below:

_Xd�t� � F�Xd� � BUd�t� �19�Since B is not a square matrix, (19) is multiplied with a transformation matrix G:

G _Xd�t� � GF�Xd� � GBUd�t� �20�If (20) is solved for the desired control, it will be obtained as

Ud � ÿ�GB �ÿ1�GF�Xd� ÿ df�t�

dt

��21�

The functional structure of the inverse dynamics is exactly the same as the

Fig. 1. The overall system with proposed controller.

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263 245

Page 8: Neuro sliding mode control of robotic manipulators

equivalent control that is given in (15). The only di�erence is that the F(Xd) termin desired control is replaced with F(X ) which is the actual value in the equivalentcontrol. It can, therefore, be concluded that when the system is in the slidingmode, the equivalent control is the same as the inverse dynamics.

3.2.2. Computation of the equivalent control by an NNIn a practical application of the control law of (15), there will always be

di�culties due to the fact that the knowledge of F(X ) and B will not be exact. Itis shown in the literature that in the face of similar di�culties for the calculationof inverse dynamics, neural networks provide a solution, being able to learn theinverse dynamics quite satisfactorily. This has motivated the authors of this paperto use an NN in the computation of the equivalent control.

3.2.3. NN1 structure to compute the equivalent controlThe structure of NN1 is selected as a two-layer feed-forward network, with one

hidden layer and one output layer. The inputs and outputs of the network aredictated by the equivalent control equation. In the computation of the equivalentcontrol, all the desired and actual states are used, as it is obvious from (15).Therefore, the inputs to NN1 that will compute the equivalent control are thedesired and the actual states. The number of neurons in the output layer isdetermined by the number of the actuators of the robot. In other words, it equalsthe number of inputs of the robot. The number of neurons in the hidden layershould be selected such that the NN1 is capable of computing a whole span ofinverse dynamics. In practice, this can be selected as two times the number ofneurons in the input layer. Any errors that may occur due to poor modelling isexpected to be compensated by the secondary controller.

Let us consider a two degrees of freedom (DOF) robot manipulator. The states

Fig. 2. NN1 structure for a two DOF robot to estimate the equivalent control (Ueq).

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263246

Page 9: Neuro sliding mode control of robotic manipulators

of the robot dynamics can be selected as angular positions and velocities. Thenumber of states will therefore be four and the NN has eight inputs (four foractual states and four for desired states). In accordance with the rule of thumbstated above, the number of neurons in the hidden layer can be selected as sixteen.The structure of NN1 for this manipulator is presented in Fig. 2.

The inputs (designated as Z ) to the net consist of desired and actual states(Z=[(Xd)

T X T]T). The net sum and the output of the hidden layer are designatedas Ynet and Yout, respectively. Similarly, the net sum and the output of the outputlayer are designated as Unet and UÃ eq, respectively. The values can be computed as

Ynetj �X�2n�i�1

W �zj, iZi j � 1, . . . , �4n� Youtj � g�Ynetj� �22�

Unetj �X�4n�i�1

W�yj, iYouti j � 1, . . . , m Ueqj � Umax jg�Unetj� �23�

where Wzj,iis the weight from input node-i to hidden node-j, and Wyj,i

is theweight from hidden node-i to output node-j. The activation function, g(�), isselected as a shifted sigmoid function as de®ned in (18). (4n ) represents thenumber of the hidden neurons. Umaxj

is a constant that represents the maximumavailable value of the controller output (or limits of the robot inputs). UÃ eq is theestimated value of the equivalent control. As a precaution against the equivalentcontrols reaching unreasonably large values, the outputs of the neural network arekept between 21, and multiplied by the maximum available controller outputs.The inputs are normalized by dividing them by their maximum values.

3.2.4. Weight adaptation of NN1 for the equivalent control estimationThe weight adaptation is based on a minimization of a cost function that is

selected as the di�erence between the desired and the estimated equivalent control

E � 1

2

Xm�2j�1

Ueqj ÿ Ueqj

Umax j

!2

�24�

Gradient descent method (or back propagation) is used for the output layer as

DWyj, i � ÿm@E

@Wyj, i

� ÿm @E

@Unetj

@Unetj

@Wyj, i

� mdyjYoutj �25�

where

dyj � ÿ@E

@Unetj

� ÿ @E

@Ueqj

@Ueqj

@Unetj

� �Ueqj ÿ Ueqj�Umax j

@g�Unetj�@Unetj

�26�

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263 247

Page 10: Neuro sliding mode control of robotic manipulators

dyj �Ucj

Umax j

@g�Unetj�@Unetj

�27�

The derivative of the shifted sigmoid function is computed as

@g�Unetj �@Unetj

� 1

2�1ÿ g�Unetj�2� �28�

Gradient descent for the hidden layer is computed as

DWzj, i � ÿm@E

@Wzj, i

� ÿm @E

@Ynetj

@Ynetj

@Wzj, i

� mdzjZi �29�

where

dzj � ÿ@E

@Ynetj

� Xm

k�1dykWyk, j

!�1ÿ �Youtj �2� �30�

The most important point in this derivation is that the error between desired andestimated equivalent control is replaced with the corrective control of the slidingmode control, as it is seen from (27).

3.3. NN2 for the corrective control computation

In this NN structure, the gains of SMC are taken as the weights of NN2. Theaim is the use of NN weight adaptation techniques to adapt the gains of SMC.The structure of NN2 is thus well determined from the SMC design. NN2 has atwo-layer structure: a hidden and an output layer. The number of neurons foreach layer and connections between neurons are obviously established.

Fig. 3. NN2 structure for a two DOF robot to compute the corrective control (Uc).

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263248

Page 11: Neuro sliding mode control of robotic manipulators

The inputs for the neural network are selected as the state errors. In the hiddenlayer, the number of neurons is equal to the number of sliding functions (i.e. thenumber of plant inputs). Each input is not connected to all neurons at the hiddenlayer; instead, it is connected to only one neuron at the hidden layer so that anappropriate sliding surface is formed at that neuron. The outputs of the hiddenlayer are passed through an activation function too, such as the sign function orsign-like continuous functions (e.g. shifted sigmoid).

The hidden layer is fully connected to the output layer at which the number ofneurons is equal to the number of plant inputs. There is no activation function forthis layer. The output of the neurons is the corrective control term to be added toequivalent control as shown in (16). The structure of NN2 for the manipulator ispresented in Fig. 3.

An adaptation scheme to minimize the control e�ort and sliding function isproposed using the gradient descent method. The criterion (cost) which is to beminimized is chosen as

J � 12�STS�U T

cUc� �31�The reason behind the selection of the cost function as in (31) is that minimizing(optimizing) the S function results in a minimization of the error, because S is afunction of error as de®ned in (5) and optimizing Uc results in elimination ofchattering and optimization of the control.

To make J small it is reasonable to change the parameters (weights) in thedirection of the negative gradient of it, i.e.

DKj, i � ÿg @J

@Kj, iand DGj, i � ÿg @J

@Gj, i�32�

3.3.1. Weight adaptation for the output layer of NN2Weight adaptation for the output layer also means the adaptation of the K-

matrix of SMC. The e�ect of K-adaptation is presented in Fig. 4. The gradient

Fig. 4. The e�ect of K-adaptation on the phase plane.

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263 249

Page 12: Neuro sliding mode control of robotic manipulators

descent as in (32) for K can be derived as

DKj, i � ÿg @J@Sj

@Sj

@Kj, iÿ g

@J

@Ucj

@Ucj

@Kj, iwhere j � 1, . . . , m and

i � 1, . . . , m

�33�

The partial derivatives are calculated as

@J

@Sj� Sj,

@J

@Ucj

� Ucj , and@Ucj

@Kj, i� h�Si � �34�

The sliding function in (5) can be rewritten using (17) and the integral of (4) as

S � G�Xd ÿ X � � GXd ÿ G

��F�X � � B�Ueq � Kh�S ���dx �35�

Taking the partial derivative of (35) and assigning the constants to g ' which areobtained by multiplication of elements of G and B:

@Sj

@Kj, i� ÿg 0

�h�Si�x��dx �36�

The last form of K-adaptation is obtained as

DKj, i � g1Sj

�h�Si�x��dxÿ g2Ucj h�Si � �37�

The minimization of the corrective controller (Uc) prevents chattering when thesystem is on the sliding surface or inside the boundary layer. Minimization outsidethe boundary layer e�ects the overall performance negatively; the reaching timeand the error will increase. Consequently, the adaptation of K as in (37) can bemodi®ed in a boundary layer (Sb):

Fig. 5. The e�ect of G-adaptation.

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263250

Page 13: Neuro sliding mode control of robotic manipulators

DKj, i �

8>>><>>>:g1Sj

�h�Si�x��dxÿ g2Ucj h�Si � if ÿ Sb < Sj < Sb

g1Sj

�h�Si�x��dx otherwise

�38�

3.3.2. Weight adaptation for the hidden layer of NN2Weight adaptation for the hidden layer also means the adaptation of G. The

e�ect of G-adaptation is presented in Fig. 5. Similar to the derivation of (33), thegradient descent for G can be derived as

DGj, i � ÿg @J@Sj

@Sj

@Gj, iÿ g

Xmk�1

@J

@Uck

@Uck

@Gj, i�39�

where j = 1, . . . , m and i = 1, . . . , n. The partial derivatives are calculated as

@Sj

@Gj, i� Ei and

@Uck

@Gj, i� @Uck

@h�Sj �@h�Sj �@Sj

@Sj

@Gj, i� Kk, j

1

2�1ÿ h2�Sj ��Ei �40�

The last form of G-adaptation is obtained as

DGj, i � ÿg3SjEi ÿ g4�1ÿ h2�Sj ��Ei

Xmk�1

UckKk, j

!�41�

Fig. 6. Direct drive scara-type experimental robot.

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263 251

Page 14: Neuro sliding mode control of robotic manipulators

If, because of the reasons described above, the minimization of Uc is excludedoutside the boundary layer, the ®nal form of G-adaptation is obtained as

DGj, i �

8>><>>:ÿg3SjEi ÿ g4�1ÿ h2�Sj ��Ei

Xmk�1

UckKk, j

!if ÿ Sb < Sj < Sb

ÿg3SjEi otherwise

�42�

It is to be noted that the adaptation process of G and K should be stopped whenthe state errors reach acceptable small values, as they may be sensitive to systemperturbations. Additionally, limits should be put on G and K values to assurestability. The overall algorithm described above is summarized in The ApplicationAlgorithm.

4. Robotics application

In order to study the performance of the proposed controller, extensiveimplementation studies are carried out on a two DOF, direct drive, scara-typeexperimental manipulator, shown in Fig. 6.

4.1. The application algorithm

Step 1. Initialize: Set all weights of NN1 to small random values, between20.01. Set all weights of NN2 to form an SMC corrective control. Select valuesfor the adaptation rates as 0 < m < 1 and 0 < g < 1.

Step 2. Compute the equivalent control from NN1: Using Eqs. (22) and (23)compute the net outputs to form the equivalent control.

Step 3. Compute the corrective control from NN2: Compute it as explained in(17).

Step 4. Apply control to robot: Sum the estimated equivalent control and thecorrective control to form the control signal and then apply this to the robot.Measure the angular positions and velocities of the robot.

Step 5. Update the weights of NN1: Update them as explained in (25) and (29).Step 6. Update the weights of NN2: Update them as explained in (38) and (42).Step 7. Repeat by going to step 2.

4.2. Robotic dynamics

The robot model is written as

M�q� �q� C�q, _q� _q� fc � t �43�where q is the vector of joint angles. The torque vector applied to the joints arerepresented by t. M is the inertia matrix. C is the vector of centripetal and coriolisforces, and fc stands for Coulomb friction. The details of the dynamics can be

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263252

Page 15: Neuro sliding mode control of robotic manipulators

found in [38]. The model in (43) can be written in the state-space formrepresentation as�

_x1_x2

���x2

ÿMÿ1�Cx2 � fc����0Mÿ1

�u �44�

where

�x1 x2�T � �q _q�T � �q1 q2 _q1 _q2�T and u � t

Eq. (44) is in the form of (4), and the proposed method can be applied.

4.3. Experimental results

The results of the experimental studies are shown in Figs. 7±18, the dashedcurves of which are always related to the elbow link. The reference state trajectoryused is depicted in Fig. 7, and the related angular errors are presented in Fig. 8. Itshould be pointed out that the initial condition errors are deliberately introducedto show the system behaviour when the system is not on the sliding surface. Suchcases are shown in Figs. 9 and 10. Theoretically, when the states reach to theorigin on the phase plane, they should stay there. However, in DSP-basedsampled data applications, due to the fact that the system is an open loop for theduration of the sampling time (2 ms is used in this paper), they deviate from the

Fig. 7. Reference angular position.

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263 253

Page 16: Neuro sliding mode control of robotic manipulators

Fig. 8. Angular errors.

Fig. 9. The motion on phase plane for base.

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263254

Page 17: Neuro sliding mode control of robotic manipulators

Fig. 10. The motion on phase plane for elbow.

Fig. 11. The adapted parameters G1,1 and G2,2 (dashed).

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263 255

Page 18: Neuro sliding mode control of robotic manipulators

Fig. 12. The adapted parameters G1,3 and G2,4 (dashed).

Fig. 13. The adapted parameters K1,1 and K2,2 (dashed).

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263256

Page 19: Neuro sliding mode control of robotic manipulators

Fig. 14. The adapted parameters K1,2 and K2,1 (dashed).

Fig. 15. The changes in slope 1 (dashed), S1 (solid) and e1 (dot±dashed) at the initial stages (slope 1

and e1 are scaled and shifted for clarity).

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263 257

Page 20: Neuro sliding mode control of robotic manipulators

Fig. 16. The changes in K1,1 (dashed) and S1 at the initial stages (K1,1 is scaled and shifted for clarity).

Fig. 17. Controller outputs.

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263258

Page 21: Neuro sliding mode control of robotic manipulators

origin. When the control for the next sampling time is applied, the states againmove towards the origin. In other words, the proposed controller establishes astable domain of attraction around the origin.

The adapted parameters of the G matrix are presented in Figs. 11 and 12. Fig.15 depicts the changes in slope, sliding surface variable (S ) and error (E ). It is tobe noted that the slope and E values are scaled and shifted, to be able to see onthe same ®gure how they change with respect to each other. It is seen that theslope of the sliding line is decreased until the value of S goes into the boundarylayer. Obviously, this minimizes the reaching time. When S is inside the boundarylayer, the slope is increased until the error converges to zero or the E vicinity ofzero and this minimizes the sliding time.

The adapted parameters of the K matrix are presented in Figs. 13 and 14. Thechange of K1,1 is detailed in Fig. 16 to show how it is adapted based on the valueof S1. The value of K1,1 is increased until S1 goes into the boundary layer. Thisdecreases the reaching time. When S1 is inside the boundary layer, the value ofK1,1 is decreased to decrease the excessive control activity.

The control signals that are applied to the robot are presented in Fig. 17. Ascan be seen there is some ringing at the beginning. However, this is quicklyeliminated as a result of K- and G-adaptation. The equivalent control that isestimated by NN1 is presented in Fig. 18. As is expected, it is a continuous signal.The learning rate (m ) for NN1 is selected as 0.04.

In the adaptation process for G and K, limits are used to assure stability. Theinitial, maximum and minimum values of G and K matrices are selected as below:

Fig. 18. Estimated equivalent controls.

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263 259

Page 22: Neuro sliding mode control of robotic manipulators

Ginit ��20 0 1 00 20 0 1

�Gmax �

�100 0 5 00 100 0 5

Gmin ��1 0 0:5 00 1 0 0:5

Kinit ��400 00 135

�Kmax �

�500 11 200

�Kmin �

�20 ÿ1ÿ1 1

�The important tuning parameters in the weight adaptation of NN2 are gis thatappear in (38) and (42). When selecting a value for gi, there are two criteria:adaptation capability and stability. While a low value causes low adaptationcapability, a high value may lead to instability. As a result, a su�ciently largevalue that does not make the system unstable should be chosen. The resultspresented in this paper are obtained by

bg1 g2 g3 g4c � �10:0 1:0 0:5 0:0001�

5. Conclusions

In this paper, a Neuro-Sliding Mode Controller is proposed and experimentalresults are presented. Two parallel NNs are used to realize the Neuro-SMC.

The structure of the neural network that estimates the equivalent control (NN1)is a standard two-layer feed-forward NN with the back propagation adaptationalgorithm. The error between the desired and estimated equivalent control isaccepted as the corrective control.

The structure of the neural network for the corrective control (NN2) is suchthat its weights are the gains of SMC and its outputs are the corrective controlterms that are to be added to the equivalent control. An adaptation scheme basedon gradient descent is used to adapt its weights. The aim of the adaptation is toeliminate chattering and to reduce the error. Therefore, the cost function isselected as the sum of squares of the corrective control and the sliding function.

In the design of a classical SMC, the controller output is obtained as theequivalent control plus a corrective control term. The corrective control isnecessary when the system deviates from the sliding surface. This term pushes thesystem back on to the sliding surface and keeps it there. Therefore, the correctivecontrol should be minimized when the system is in the vicinity of the slidingsurface to minimize chattering. This can be achieved by minimizing themultiplicative gain K for the second layer. The G-adaptation e�ects the slope ofthe sliding surface, i.e. the speed of response. The adaptation process enables oneto minimize the ``sliding time'' and the ``reaching time''.

The experimental studies have shown that the proposed Neuro-SMC has thefollowing advantages:

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263260

Page 23: Neuro sliding mode control of robotic manipulators

1. The learning process is on-line: learning and the calculation of the controlsignal are carried out simultaneously.

2. Chattering and the excessive activity (ringing) of the control signal areeliminated without a degradation of the trajectory following performance.

3. There is no need to compute the inertia (or inverse) matrix to estimate theequivalent control.

4. In the case of the NN used for the computation of the corrective control, theproblem of how to choose its structure (number of layers, number of neuronsand connections) is not met, the structure is uniquely determined by the SMCdesign.

5. The weights of NN used for the computation of the corrective control do nothave to be randomly initialized, the required performance from the slidingmode controllers allows the designer to ®x the initial weights.

6. In neurocontroller applications, the e�ect of each neuron and weight is notclear on the overall controller performance. However, in the structure of theneural network proposed for corrective control computation, they carry clearmeanings.

7. The neuro-controller incorporates a degree of robustness, brought about by thecharacteristics of SMC.

The experimental results presented in this paper indicate that the suggestedapproach has considerable advantages compared to the classical one and iscapable of achieving a good chatter-free trajectory following performance withoutan exact knowledge of the plant parameters. These characteristics make it a goodcandidate for motion control applications.

Acknowledgements

The second author would like to acknowledge the support provided by Bogazic° iUniversity Research Fund within the Project No: 97A0202.

References

[1] Hung JY. Variable structure control: a survey. IEEE Transactions on Industrial Electronics

1993;40(1):2±22.

[2] Utkin VI. Sliding modes in control optimization. Springer-Verlag, 1981.

[3] Utkin VI. Variable structure systems with sliding modes. IEEE Trans Autom Contrl 1977;ACC-

22(2):212±22.

[4] Ertugrul M, Kaynak O, Sabanovic A, Ohnishi K. A generalized approach for Lyapunov design of

sliding mode controllers for motion control applications. In: Proceedings of the of Advanced

Motion Control Conference, 1996. p. 407±12.

[5] Young KD. Variable structure control for robotics and aerospace applications. Elsevier, 1993.

[6] Zinober ASI, editor. Variable structure and Lyapunov control. Springer-Verlag, 1994.

[7] Wijesoma SW. Robust trajectory following of robots using computer torque structure with VSS,

Int J Control 1990;52(4):935±962.

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263 261

Page 24: Neuro sliding mode control of robotic manipulators

[8] Denker A, Kaynak O. Applications of VSC in motion control systems. In: Zinober ASI, editor.

Variable structure and Lyapunov control. Springer-Verlag, 1994. p. 365±82.

[9] Zhao F, Utkin VI. Adaptive simulation and control of variable structure control systems in sliding

regimes. Automatica 1996;32(7):1037±1042.

[10] Slotine JJ, Li W. Applied nonlinear control. Prentice-Hall, 1991.

[11] Tzafestas SG. Neural networks in robotics: state of the art. In: IEEE International Conference on

Industrial Electronics, 1995. p. 12±20.

[12] Kawato M, Uno Y, Isobe M, Suzuki RA. Hierarchical model for voluntary movement and with

application to robotics, IEEE Control System Magazine 1988;8(2):8±16.

[13] Fukuda T, Shibata T. Theory and applications of neural networks for industrial control systems.

IEEE Trans on Industrial Electronics 1992;39(6):472±89.

[14] Barto AG [Chapter 1]. In: Neural networks for control. Cambridge, MA: MIT Press, 1999. p. 5±

58 [Chapter 1].

[15] Hunt KJ, Sbarbaro D, Zbikowski R, Gawthrop PJ. Neural networks for control systems Ð a sur-

vey. Automatica 1992;28(6):1083±112.

[16] Ozaki T, Suzuki T, Furuhashi T, Okuma S, Uchikawa Y. Trajectory control of robotic manipula-

tors using neural networks. IEEE Transactions on Industrial Electronics 1991;38(3):195±202.

[17] Lippmann RP. An introduction to computing with neural nets. IEEE ASSP Magazine

1987;4(2):4±22.

[18] Bose NK, Liang P. Neural network fundamentals with graphs, algorithms, and applications.

McGraw-Hill, 1996.

[19] Albus J. A new approach to manipulator control: the cerebellar model articulation controller

(CMAC). J Dyn Syst Meas and Control 1975;97:220±227.

[20] Psaltis D, Sideris A, Yamamura A. Neural controllers. In: Proceedings of the IEEE International

Conference on Neural Networks, 1987. p. 17±21.

[21] Guez A, Ahmad Z. Solution to the inverse problem in robotics by neural networks. In:

Proceedings of the International Conference on Neural Networks, 1988. p. 617±24.

[22] Elsley R. A learning architecture for control based on back-propagation neural-networks. In:

IEEE Conference on Neural Networks, 1988. p. 584±7.

[23] Grossberg S, Kuperstein M. Neural dynamics of adaptive sensory-motor control. Elmsford, NY:

Pergamon Press, 1989.

[24] Fukuda T, Shibata T, Tokita M, Mitsuoka T. Neural servo controller: adaptation and learning.

In: Proceedings of the IEEE International Workshop Advanced Motion Contr., 1990. p. 107±15.

[25] Bekey GA. In: Kosko B, editor. Robotics and neural networks, in neural networks for signal pro-

cessing. Prentice-Hall, 1992.

[26] Narendra K, Parthasarathy K. Identi®cation and control of dynamical systems using neural net-

works. IEEE Trans Neural Networks 1990;1(1):4±27.

[27] Tokita M, Mitsuoka T, Fukuda T, Kurihara T. Force control of robots by neural models: control

of one-dimensional manipulators. J Japan Society of Robotics Engineers 1989;8(3):52±9.

[28] Erbatur K, Kaynak O, Sabanovic A, Rudas I. Fuzzy adaptive sliding mode control of a direct

drive robot. Robotics and Autonomous Systems 1996;19:215±22.

[29] Ertugrul M, Kaynak O. Neural network adaptive sliding mode control and its application to scara

type robot manipulator. In: Proceedings of the 1997 IEEE International Conference on Robotics

and Automation, 1997. p. 2932±7.

[30] Ertugrul M, Kaynak O. Neural computation of the equivalent control in sliding mode for robot

trajectory control applications. In: Proceedings of the 1998 IEEE International Conference on

Robotics and Automation, 1998. p. 2042±7.

[31] Ertugrul M, Kaynak O. Neuro-sliding mode control of robotic manipulators. In: Proceedings of

the IEEE 8th International Conference on Advanced Robotics, 1997. p. 951±6.

[32] Parma GG, Menezes BR, Braga AP. Sliding mode algorithm for training multilayer arti®cial

neural networks. Electronics Letters 1998;34(1):97±8.

[33] Jezernik K, Rodic M, Safaric R, Curk B. Neural network sliding mode robot control. Robotica

1997;15:23±30.

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263262

Page 25: Neuro sliding mode control of robotic manipulators

[34] Sundareshan MK, Askew C. Neural network-assisted variable structure control scheme for control

of a ¯exible manipulator arm. Automatica 1997;33(9):1699±710.

[35] Karakasoglu A, Sundareshan MK. A recurrent neural network-based adaptive variable structure

model Ð following control of robotic manipulators. Automatica 1995;31(10):1495±507.

[36] Ramirez HS, Morles EC. A sliding mode strategy for adaptive learning in adalines. IEEE Trans

on Circuits and Systems Ð I: Fundamental Theory and Applications 1995;42(12):1001±12.

[37] Ge SS, Lee TH, Harris CJ. Adaptive neural network control of robotic manipulators. World

Scienti®c, 1998.

[38] Direct drive manipulator R&D package User Guide. Integrated Motion Incorporated, Berkeley,

CA, 1992.

M. Ertugrul, O. Kaynak /Mechatronics 10 (2000) 239±263 263