HYBRID ROBUST CONTROLLER BASED ON INTERVAL TYPE 2 FUZZY NEURAL NETWORK AND HIGHER ORDER SLIDING MODE FOR ROBOTIC MANIPULATORS CONTROLADOR

Industrial arms should be able to perform their duties in environments where unpredictable conditions and perturbations are present. In this paper, controlling a robotic manipulator is intended under significant external perturbations and parametric uncertainties. Type-2 fuzzy logic is an appropriate choice in the face of uncertain environments, for various reasons, including utilizing fuzzy membership functions. Also, using the neural network (NN) can increase robustness of the controller. Although neural network does not basically need to build its type-2 fuzzy rules, the initial rules based on sliding surface of higher order sliding mode controller (HOSMC) can improve the system's performance. In addition, self-regulation feature of the controller, which is based on the existence of the neural network in the central type-2 fuzzy controller block, increases the robustness of the method even more. Effective performance of the proposed controller (IT2FNN-HOSMC) is shown under various perturbations in numerical simulations.


INTRODUCTIÓN
Most of the robotic applications in real world have some level of uncertainties in their nature.Uncertainties can be originated from several sources such as lack of the knowledge about the environment, inaccurate and incomplete modelling and even receiving of controversy feedback and sensor data.Fuzzy logic systems (FLS) is able to improve the capability of the system in facing uncertainties since they are less dependent to system modelling.Also, knowledge of experts can be utilized in building its linguistic rule base (Goguen, 1973;Zadeh, 1975).In general, two versions of fuzzy logic have been introduced: type-1 fuzzy logic system (T1FLS) and type-2 fuzzy logic system (T2FLS).Both are widely used in control methods when uncertainties are supposed to be taken into account (Mendel, 2004).However, T1FLS membership grade for each input is a crisp number which can limit its capability to deal with significant uncertainties.To address this weakness, T2FLS is introduced (Zadeh, 1975) in which crisp numbers are replaced by intervals in membership functions.General type 2 fuzzy sets (GT2FS) and interval type 2 fuzzy sets (IT2FS) are the two main categories which are developed from T2FLS (Nodeh, Ghasemi, & Daniali, 2019).Various researches reveal that latter is more accurate and more efficient in coping with uncertainties (Larguech, Aloui, Pagès, El Hajjaji, & Chaari, 2015;Park & Shin, 2018;Ramesh, Panda, & Kumar, 2013;Shabaniniai, Etedali, & Ghadamyari, 2014;Zirkohi & Lin, 2015).Another advantage of IT2FS is that fewer fuzzy rules are needed as it uses foot of uncertainty (FOU) in its membership functions.In fact, by using FOU input/output domains can be covered by fewer membership functions and it enables the technique to cover the uncertainties more effective.Smoother control signals, better performance in stability control due to simplicity in building rule base are other benefits of the IT2FS.Sliding mode control (SMC) is a well-known robust method for nonlinear systems control in presence of uncertainties and external perturbations (Hung, Gao, & Hung, 1993).Desirable transient response of the system and insensitivity to perturbations and changes in system parameters are the main advantages of this technique (Drakunov & Utkin, 1992).However, typical chattering which is caused by using switch function is its main drawback.To address this issue, higher order sliding mode controller (HOSMC) is developed by using higher order derivatives of classic SMC.In HOSMC sign function is exerted on higher order derivatives, so accuracy is increased in discontinuous time sampling.One innovative method is to Combine HOSMC with T2FLS.Type 2 fuzzy sliding mode control (T2FSMC) provides a robust controller which is able to benefit from advantages of the both methods concurrently.For example, SMC is able to reduce the degree of the system equations which leads to fewer rules to be needed by fuzzy logic (Utkin, 2013).On the other hand, chattering effect of SMC can be reduced by using fuzzy mechanism instead of switch function (Song & Smith, 2006).Generally, there are two methods for combining sliding mode and fuzzy logic: employing fuzzy logic in a sliding mode controller (SMC is the main controller) and employing sliding mode in a fuzzy controller (FLC is the main controller).There exist advantages and disadvantages for each of these combinations.In the first method, the employed switch function might be classic sliding mode and the type-II fuzzy logic connects various control algorithms as a unique system.For 2D systems, sliding line is a function of error and error derivative which is a 1D function.Thus, less rules are required to approximate the 1D function which shows how this combination can reduce size of rule base.In the second method, a nonlinear sliding mode is generated which has an advantage over classic sliding mode which uses a linear sliding surface.Although in order to improve performance of the controller, width of the sliding surface is an important parameter.Shortcoming of this method lies in the necessity of defining control parameters of the sliding Nexo Revista Científica / Vol.32, No. 02, pp.106-125 / Diciembre 2019 mode accurately by an expert.What is considered in this paper is using the second method for controlling a robotic operator in the presence of uncertainty and external disturbance in which IT2FS is the main controller and HOSM block is the regulator.Lin and Chen (Lin & Chen, 2002) have used fuzzy-sliding mode method to control a class of uncertain nonlinear MIMO systems.In this method, fuzzy-sliding mode controller has been used to approximate equivalent control in neighborhood of the sliding manifold.They have showed that the system is able to cover parametric uncertainty and compensate external disturbance.The method has been implemented on a double-link arm and its stability is proved using Lyapunov method.Hu and Woo (Hu & Woo, 2006) have proposed a method combining sliding mode and neural network with different weights where the weights are determined using a fuzzy controller.Since equations are highly nonlinear, coupled and timevariant, robotic arms are affected by various uncertainties.Although sliding mode control overcomes uncertainties and fast transient response, it results in chattering due to discontinuity of the signal.Thus, they have combined fuzzy-robust-neural network methods to overcome the challenges.They have proved convergence and stability of the system using direct Lyapunov method.Simulations under various conditions show proper performance of the controller.Medhaffar et al. (Medhaffar, Derbel, & Damak, 2006) have proposed a decoupled sliding mode-fuzzy controller for a robotic arm.This controller has been proposed to control a group of MIMO systems with nonlinear dynamic.In fact, a fuzzy method has been used to approximate nonlinear functions of the system.In addition, local controllers have been used to decouple equations.Finally, the method has been implemented on a robotic arm with two degrees of freedom to control the implementation trajectory.Onder (Efe, 2008) has presented a fuzzy-sliding mode controller for a double-link arm.Parameters of the controller have been adjusted such that the system under control has a limited tracking error.In this method, an adaptive process has been used to improve the controller based on integration of the feedback signal.Huang et.al.(Huang, Kuo, & Chang, 2008) have studied control of nonlinear systems in the presence of uncertainties using fuzzy-sliding mode method.An adaptive adjustment method without high frequency switch has been employed to handle bounded uncertainties.Robustness and stability of the system has been proved using Lyapunov theory.However, during control process, it has been observed that upper bound of uncertainty does not need to be known.The proposed method has been verified by experimental tests.Roopaei et.al.(Roopaei, Zolghadri, & Meshksar, 2009) have proposed a fuzzy-sliding mode controller to compensate uncertainty and disturbance.They have used two fuzzy systems to complete the sliding mode block.In addition, they have used fuzzy logic to approximate some parts of the system. in order to overcome chattering, fuzzy model has been used like saturation function.Its advantage is that it does not require to know uncertainty and disturbance bounds.They have proved stability and convergence of the closed loop system using Lyapunov theory and Burbalat lemma.Noroozi et.al.(Noroozi, Roopaei, & Jahromi, 2009) have proposed a fuzzy-sliding mode controller for a class of nonlinear systems in the presence of uncertainty and external disturbance.Their innovation is based on recognition of a part of the system and not requiring to know uncertainty and disturbance bounds.In addition, chattering has been eliminated without damaging robustness of the controller.Hacioglu et.al.(Hacioglu, Arslan, & Yagiz, 2011) have studied controlling a double-arm with two degrees of freedom while moving objects.Since these robots are mainly used in dangerous applications like transportation of radioactive material and explosive disposal, they applied a sliding mode controller lacking improved chattering by the fuzzy logic block to the robot so that it can scan the desired trajectory with high accuracy and security.In order to evaluate performance of the controller against parametric changes and external disturbances, results of sudden load changes and noise have been presented.Amer et.al.(Amer, Sallam, & Elawady, 2011) have used fuzzy-sliding mode method to control a robotic arm.They have integrated sliding surface adjusted by PID signal to prevent chattering.In addition, they have adjusted output gain of the controller by a separate fuzzy block online.System stability has been proved using Lyapunov method.They have implemented their method on a robotic arm with 3 degrees of freedom in the presence of uncertainty and showed its positive effect of tracking.Nekoukar and Erfanian Nexo Revista Científica / Vol.32, No. 02, pp.106-125 / Diciembre 2019 (Nekoukar & Erfanian, 2011) have proposed an adaptive learning algorithm and a fuzzy logic system to estimate dynamic system for controlling a robotic operator using sliding mode method.Advantage of this method is that initial dynamic of the robot is not required to be known which results in stability and timelimited convergence of the proposed algorithm.Cerman and Husek (Cerman & Hušek, 2012) have proposed a fuzzy-sliding mode controller for a class of nonlinear continuous systems with unknown dynamic and bounded disturbance.Their main idea includes a self-adjusting fuzzy mechanism for adjusting sliding mode parameters and changing gains.This modification reduced chattering and increased convergence rate.They implemented the proposed controller on hydroelectric servomotors.Kayacan and Kaynak (Kayacan & Kaynak, 2012) have combined sliding mode and IT2FS and used neural network with triangular membership function to control speed of a servomotor.Instead of minimizing an error function, they have adjusted weights of the neural network such that balance equation is held.Niknam et al. (Niknam, Khooban, Kavousifard, & Soltanpour, 2014) have proposed an optimal controller by combining type-II fuzzy logic and sliding mode for controlling a specific class of nonlinear systems.To this end, particle swarm optimization algorithm has been employed for adjusting parameters of input and output membership functions.Despite proper performance of the algorithm, dynamic system of SISO and its equations are limited.Keymasi and Moosavian (Khalaji & Moosavian, 2014) have employed two kinematic and dynamic controllers to stabilize motion of a mobile wheeled robot with a trailer around time trajectories.They have employed kinematic control of output feedback and fuzzy sliding mode control.They have used practical simulation and implementation to illustrate performance of their algorithm.Soltanpour et al. (Soltanpour, Khooban, & Khalghani, 2016) have approximated boundary layer of system uncertainties to overcome chattering of the sliding mode method.Before that, they have reduced order of system uncertainties using linearizer feedback.The method of interest has been applied to a reverse pendulum.However, employing this method is limited to nonlinear system of the problem.Hendel et al. (Hendel, Khaber, & Essounbouli, 2015) have used HOSM to reduce chattering of an uncertain system and approximated uncertain part of the system using type-II fuzzy logic.The simulated the method on a system with two state variables.Naik et al. (Naik, Samantaray, Roy, & Pattanayak, 2015) have compared fuzzy-PD controller and sliding mode for a double-link arm.In addition, they have used model-based and model-less methods for both controllers.Finally, the designed fuzzy-sliding mode controller has advantages of both techniques.Simulations showed positive performance of the controller and acceptable tracking error.Farahmand et al. (Farahmand, Ghasemi, & Salari, 2018) have used a hybrid nonlinear fuzzy-sliding mode controller in a flying robot.They have reduced chattering of the controller compared to its classic counterpart by using fuzzy logic as the external loop of the controller and spiral sliding mode in the internal loop.Simulations have been performed in Simulink.Camci et al. (Camci, Kripalani, Ma, Kayacan, & Khanesar, 2018) have employed type-II fuzzy logic equipped with neural network to control a flying robot.First order sliding mode optimized using PSO has been used to adjust parameters of the neural network.They have compared their simulation results with practical values of the PID controller.Li et al. (Li, Wang, Wu, Lam, & Gao, 2017) have proposed a controller based on optimal sliding mode for main IT2FS block.Integral sliding surface has helped neutralizing disturbance and minimizing control error.Despite proper performance of the controller in simulating the reverse pendulum, chattering of the system is significant.Nafia et al. (Nafia, El Kari, Ayad, & Mjahed, 2018) have proposed a two-step controller for controlling n-link robotic operator.First, an adaptive type-II fuzzy logic block has been used to approximate uncertainty of a system.Then, a hybrid type-II fuzzy-sliding mode controller has been used for control in the presence of uncertainty and external disturbance.The simulations have been done on a two-link robotic manipulator.In this work, a T2FLS controller is developed in which the rule base acts in terms of second order SMC inputs and then neural network calculation is used to determine final control signal.The proposed controller is intended to be worked on a robotic arm with parametric uncertainties in presence of external perturbations.For this aim, the following factors must be met by the proposed controller: -Robustness of the system against parametric uncertainties of the manipulator and external perturbations.Nexo Revista Científica / Vol.32, No. 02, pp.106-125 / Diciembre 2019 -Ensure the efficiency of the T2FLcontroller in limited time.
-No need to complicated offline computation.To do so, an online regulation algorithm is needed.Although IT2NN (neural network based on type-2 fuzzy logic) is capable to handle control task in presence of uncertainty, it is not able to cover external perturbations with any domain.To improve the controller, HOSMC outputs are employed as an input for the main IT2NN controller.The organization of this article is as follows.In section 2, dynamic model of a manipulator is presented.In the next Section, the control method is described.In Section 4, stability analysis of the controller is investigated.Finally, section 5 is results and discussions which reveals the advantages of the proposed method in numerical simulations.

DYNAMIC MODEL OF A ROBOT MANIPULATOR
For an n-link planar rigid manipulator, the Euler-Lagrange dynamic equations can be written as where angular states of joints are considered as system states in which . ̇.̈  are joint position, velocity and acceleration vectors respectively, () is positive definite inertia matrix,  is the control vector representing the control torque, and (.̇) is matrix of system nonlinear expressions matrix.Equation ( 1) can be rewritten as follow: Nonlinear terms are Coriolis accelerations matrix, the dynamic coefficient matrix, the static friction vector, the matrix of perturbation vector and un-modelled dynamics, and gravitational vector which are defined by (.̇),    × ,   (̇)  ,   (.̇), and (), respectively.It should be noted that the only constraint on   (.̇) is its compatibility with the dimensions and the weight of the robot.For instance, a light robotic arm is expected to withstand some perturbations in an appropriate domain, while a heavy robot has easier job.In equation ( 2), there exist highly nonlinear terms such as trigonometric multiplications and it is also assumed that has parametric uncertainties which means the mass and inertia of the links are unknown.

CONTROL METHOD
In this paper, goal of control method is to construct a control loop in which desired trajectory of     in presence of parametric uncertainty and external perturbation is followed.Moreover, the proposed controller should not need offline complicated calculations.To design such a controller, first mathematical equations of the neural network block based on type 2 fuzzy logic as the main control block is developed.Then, equations of the SMC as the outer loop are obtained.Finally, the complete controlling system and its block diagram is illustrated.

Neural Network Block based on Type 2 Fuzzy Logic
In this section, some terms and definitions of type 2 fuzzy sets are discussed.A fuzzy set of type-2 can be expressed by the following form: The type-2 fuzzy sets is described by Zadeh [22] according to ( 5) and ( 6): (4) =∪ ∀∈   () (5) where,    and ξ are standard deviation and gaussian average of the i-th input, respectively.
Level 3: rule base level in which each node corresponds to a fuzzy rule and is used through fuzzy operator to calculate (8) variable: ]  (12) Level 5: output level in where each output acts as a defuzzifier and the final output is in the following form: In general, this structure does not need predetermined rules as it is able to use online learning based on inputs and outputs of the controlling system.However, using expert's knowledge in building the initial rule base can be helpful.This rule base can be based on output of a HOSMC which is explained briefly in the next section.

Higher Order Sliding Mode Control
The classic sliding mode controller design consists of two levels of designing the slip surface and selecting the control rule for tracking this surface.By calculating slip surface, closed loop system order is reduced and a robust behaviour for robot is provided.
A simple system can be considered as ( 14): where,  and  are state matrix and control input, respectively.ℎ() is a nonlinear indefinite function?sign and bounds of () are determined by a continuous function of .Here, the problem is that in limited time, following desired variable state must be followed by the state . (15) Despite ℎ() and () are uncertain, finite control input  and initial conditions is used as: (16) Tracking error is defined as: (17) A high speed switching mechanism is necessary to ensure the desired performance of a closed loop system.Because of the practical limitations, direct implementing of the abovementioned controlling algorithm leads the system to oscillation in the neighbourhood of the sliding surface.To reduce the typical chattering effect in this paper, HOSMC is developed from original SMC.By using higher order derivatives, HOSMC provides a more robust controller with smoother signals.Second order SMC model is represented in equations ( 18) to ( 20): ( 18) (20) Where  is sliding variable,  is a positive constant,   ,   and   are PID parameters for sliding surface, and K is paramer for calculating uncertainty effect on the system. is boundry layer width in which chattering relaxation can have occurred.Equation ( 18) is a general form for writing sliding surface with different orders.However, it is common to assign a different tuning parameter to each obtained signal which can be tuned separately.The control rule (20), which is the result of a second-order sliding mode and a saturation switch function, is able to delete the chattering of signals effectively.The main reason behind the chattering removing performance of the HOSMC is using of higher derivatives which leads to smoother signals.

The proposed controlling system
In Fig. 2 the block diagram of the proposed control is depicted.The sliding surface is designed based on equation ( 29).In this diagram, the input is determined by NN using output and reference signals based on T2FLC and HOSMC.External perturbation is represented by   .Inputs of the T2FLC are  and .Input and output signals of the controller have 5 type 2 fuzzy sets which are called negative big (NB), negative small (NS), zero (ZE), positive small (PS), and positive big (PB).Input range is determined by estimation of s in the presence of perturbations.This range is assumed to be [-3,3] in simulations.
Figure 2. Flow-chart of IT2FNN-HOSMC Membership functions are considered in Gaussian form.Fuzzy rules are defined based on analysis of system trajectories towards sliding surface.For example, if the system states are far from the sliding surface and its velocity is small, a big input is needed to get closer to the sliding surface.The fuzzy rule base is represented in table 1.In Fig. 3, mapping of error of the system states and its derivative to the sliding surface is illustrated.Then, output of the controller will be calculated by T2FLC and using fuzzy rules with defined membership functions, based on the rule base in Table .1.

STABILITY ANALYSIS
By making assumption that   is output of fuzzy controller and   is output of the neural network block, stability analysis of the system is carried out by the following positive definite Lyapunov function: ̇=    ̇ =   ( ̇ + ) Since the output of the NN is defined in the following form: (23) Therefore, Because derivatives of the   ̃ and   ̃ equal to zero, derivative of the Lyapunov function can be expressed as follows: By defining   ̇ in equation ( 38), ( 27) where,  is a positive number which is bigger than positive number .By substituting equation ( 27) in ( 26), the following equation can be obtained:

RESULTS AND DISCUSSIONS
In this section, the performance of the proposed algorithm is inspected by carrying out simulations on a 2 DOF rigid two links manipulator.
The proposed IT2FNN-HOSMC algorithm is used to control a rigid two links manipulator.In this case mass and length of the links are specified as  1 =  2 = 1  and  1 =  2 = 0.5 , respectively.The dynamical effects such as static frictions and nonlinear viscous are determined by equations ( 29) and ( 30 To assess the performance of the proposed approach, two sets of tracking trajectory simulations are performed.In each set, different type of external perturbations is exerted.In the first set, the desired trajectory is   () = 1 − cos () which is a periodic signal for joint angle.To make the situation more challenging for the controller, initial position of the desired joints is set as 2 radians.Control parameters for classic SMC and second-order SMC (PID sliding surface) are   = {300.300.300}.  = {250.250.250}.and   = {20.20.20}.
In the first set, perturbation is considered as a sinusoidal wave with specified amplitude (Fig. 4).In equation ( 31), the frequency of this wave is selected small enough for conventional controllers such as SMC to not be unable to control the manipulator properly.In all simulations, the performance of the proposed controller is compared to conventional SMC.The performance of the two methods in tracking problem of the first and second link is shown in Figures 5 and 6, respectively.The proposed technique is able to converge effectively in an acceptable time period of less than 1 second for the both links, whereas conventional SMC is able to do so in a much longer period of time.In fact, delay which is a typical problem for conventional SMC has been addressed by implementing HOSMC as input block for the main controller.It should be noted that the reason of unsuitable performance of the SMC is that the frequency of the perturbations is deliberately selected as small as it could cause problem for this method.In Figs. 7 and 8, the controlling torque needed for tracking simulation is shown.As soon as SMC converge to the desired path, remarkable chattering effect can be seen for this technique.On the other hand, IT2FNN-HOSMC by using IT2FS in it is able to reduce the chattering effect.It should be noted that the range of the torque of each motor is constrained to [-20,20] which is the main reason of chattering effect in the proposed technique.By using stronger motor, even this amount of chattering can be vanished.Moreover, neural network helps the proposed method to maintain control input in desired interval.
In the last simulations for this part, position errors of first and second joints are shown in Figures 9 and 10, respectively.It is obvious that the proposed method is able to converge to zero and keep the position error in both joints in an acceptable range much faster than SMC (Fig. 11).In the second set of the simulations, random perturbations are exerted on both joints (Fig. 12).Controlling robotic systems in the presence of this type of perturbation is always challenging.To simulate random perturbation here, a random function is employed.The frequency of perturbation is as small as it could cause chattering issue for conventional SMC.
Figures 13 and 14 show comparison between performance of SMC and proposed technique in trajectory tracking problem for first and second joints of the manipulator, respectively.As it is expected, IT2FNN-HOSMC reveals better controlling factors in comparison to SMC.In contrast to conventional SMC, the combined method is able to reach and track the desired path much faster.By taking a glance at the position errors curves in Figures 15 and 16, the contrast between the performance of the SMC and the proposed method is more obvious.According to these figures, the position error of the joints converges to zero by using SMC much slower than the combined method.Figures 16 and 17 compare chattering effect for both controllers in both joints.Again here, as soon as SMC reach the sliding surface, the chattering effect begins to happen whereas the proposed method is able to handle this issue more effectively and keep the chattering in an acceptable amount (Fig 19).When more intense perturbation is exerted on the system, SMC is unable to prevent response trajectory to be shifted into perturbation profile.In general, any control algorithm start imitating the perturbation profile for its trajectory error diagram from a level which is called Perturbation Resistance Threshold (PRT).In this paper, IT2FNN-HOSMC is able to increase its PRT significantly in comparison to SMC.

FUTURE WORKS AND CONCLUSIONS
In this paper, a hybrid controller is presented for a robotic manipulator with parametric uncertainties under external perturbations.In this regard, the algorithm is based on interval type 2 fuzzy logic with neural network core which its inputs are calculated by a higher order sliding surface is presented.Base on numerical simulations, conventional SMC performance is limited by chattering and delay, but performance of the proposed algorithm due to using IT2FS (which is able to overcome chattering) and HOSMC (which is able to reduce delay), is more robust.Although control torque is limited in a range of [-20, 20] N.m, novel algorithm is able to follow desired trajectory as neural network can satisfy input constraints.In addition, PRT for IT2FNN-HOSMC performance is higher than SMC which shows the robustness of the proposed controller.In future work, run time of the algorithm should be improved which is caused by its nonlinear structure and capability to be updated in time stamps.Neural network parameter regulation would be applicable idea.

Figure 13 .
Figure 13.Comparison between SMC and IT2FNN-HOSMC in trajectory tracking of joint 1 under random perturbation 3) Nexo RevistaCientífica / Vol.32, No. 02, pp.106-125 / Diciembre 2019where,  is reference set,  is initial variable or primary variable.  () is secondary membership function.  and   () are set of initial membership grades and secondary membership grade respectively.
(Zeghlache, Saigaa, & Kara, 2016)    are secondary variable weights.The better performance of the T2FLS in comparison to conventional FLS, especially when there are high levels of uncertainty and nonlinear dynamics, has been proven in various studies(Hamza, Yap, & Choudhury, 2017).However, because of the type reduction processes such as Karnink-Mendel algorithm (KM), computational cost of the technique is a drawback.Using neural network (NN) is one possible solution to reduce computational cost(Zeghlache, Saigaa, & Kara, 2016).In fact, NN is an efficient technique to estimate controlling parameters without previous knowledge about them and its dynamic system.Structure of an interval type 2 fuzzy neural network (IT2FNN) is illustrated in Fig.1.As it is depicted, IT2FNN has 5 different levels as follows: Level 1: input level in which input variables of IT2FNN are defined.
Level 2: membership level in which each node represents a membership function.Foot of uncertainty is defined by upper membership function (UMF) and lower membership function (LMF) in equations (6) and (7), respectively.