Optimal super-twisting sliding mode control design of robot manipulator: Design and comparison study

This article presents a tracking control design for two-link robot manipulators. To achieve robust tracking control performance, a super-twisting sliding mode control (STSMC) is derived. The stability of the system based on the proposed approach is proved based on the Lyapunov theorem. However, one problem with the designed STSMC is to properly set its parameters during the design. Therefore, it is proposed a social spider optimization (SSO) to tune these design parameters to improve the dynamic performance of the robot manipulator controlled considering STSMC. The performance of the STSMC approach based on SSO is compared to that based on particle swarming optimization (PSO) in terms of dynamic performance and robustness characteristics. The effectiveness of the proposed optimal controllers is verified by simulations within the MATLAB software. It is verified that the performance given by SSO-based STSMC outperforms that resulting from PSO-based STSMC. The experimental results are conducted based on LabVIEW 2019 software to validate the numerical simulation.


Introduction
Robot manipulators are widely used to assist workers in repetitive and insecurity tasks in a myriad of industrial processes, performing them faster and more efficiently. Examples of such activities are transportation, manufacturing, welding, and drilling. However, it is essential that the manipulators track desired trajectories very precisely with a fast convergence. 1 Although motion control has been extensively studied for robot manipulators, it is still a challenging problem because these systems are highly nonlinear, the model parameters can be time varying and also be uncertain, and the operational conditions are generally subjected to different kinds of input disturbances. These difficulties impose the necessity to apply advanced control techniques to solve the motion control problem, such as intelligent control (neural and fuzzy), adaptive control, and sliding mode control (SMC). 2 However, selecting a suitable control technique is a major challenge for many researchers. 3 Among those controllers, SMC, one of the most significant discoveries in advanced control theory, is an effective and efficient tool to solve the control problems of nonlinear systems. 4,5 It is well known that SMC is robust to model uncertainties, unknown disturbances, and parameter variations. 6,7 Therefore, the SMC has been widely applied in real applications. 8 SMC, especially on its simple first-order control structure, has many applications to mechanical systems, where the insensitiveness to uncertainties in the model is an important issue. 4,5 But this simple control structure has the limitation of being suitable just when the relative degree of the output is one, besides inducing chattering because of its switching with high frequency. 9 To avoid these restrictions, a natural solution is the application of the SMC with higher-order control structure. The super-twisting sliding mode control (STSMC) is a second-order control structure and characterized by the following advantages 10-13 : 1. The effect of chattering with STSMC is less than that in the case of SMC. 2. The STSMC can make the states of the system reach the equilibrium point in finite time, that is, it is able to zeroing both sliding variable and its derivative in finite time. 3. The STSMC requires only the sliding variable (output variable) and there is no need for its derivative and, hence, it does not require the knowledge of state derivatives as most SMC schemes do. This results in a simple control law and less computation effort. 4. The STSMC avoids the singularity and achieves exact convergence.
The main problem with the design of STSMC design is the presence of many design parameters that have to be properly set to satisfy asymptotical convergence of tracking error. In the same sense, these design parameters play a vital role on the system performance and an improper setting of these design parameters may lead to deterioration of the STSMC performance or even cause instability problems. The try-and-error procedure was the only technique to tune these design parameters in most previous works. However, the problems with this technique are that it is tedious and it could not find the best design parameters for optimal dynamic performance. Instead, modern optimization methods have been introduced to tackle the tuning problem; firstly, to avoid the try-and-error procedure, which is usually tedious, and secondly, to find the optimal design parameters, which give an optimal performance of STSMC. Thus, optimization techniques can be more adequate as a tool to tune the design parameters, providing stability and better performance.
In the field of optimization, several successful swarm algorithms have been developed by a combination of deterministic rules and randomness, mimicking the behavior of insect or animal groups in nature. 14,15 Particle swarm optimization (PSO), 16 genetic algorithm (GA), and artificial bee colony (ABC) are the most popular swarm algorithms for solving complex optimization problems. However, they present serious flaws, such as premature convergence and difficulty to overcome local minima. 15 Swarm algorithm is an optimization strategy that minimizes the behavior of animals in nature, such as insects, 15 and has been applied to complex problems in the field of optimization. GA, PSO, and ABC 16 are good examples of swarm algorithms, but they generally provide suboptimal solutions. 15 Optimization has been applied in many control problems in the robotics field. [17][18][19][20][21][22][23] In the literature, 17 PSO was used to tune the parameters of fuzzy and proportional integral derivative (PID) controllers designed for the trajectory tracking of a robotic system. In this work, changes in parameters, input disturbances, and measurement noises were tested to evaluate the robustness of the algorithms.
In the literature, 18 it was introduced an optimal robust SMC tuned by ingenious multiobjective PSO to address the problem of nonlinear dynamics and tracking systems for a biped robot. In this proposed algorithm, the rate of convergence and variety of solutions are enhanced simultaneously, and innovative methods were proposed to select the global and personal best positions for each particle.
In the literature, 19 PSO was applied to tune PID controllers of aerial robots operating in a hose transportation system that requires robust controllers. The fast convergence of the proposed PSO method was verified experimentally, which also demonstrated that the solution is not unique, and the design is robust.
An efficient and fast method for tuning the controller parameters of a three degrees-of-freedom (3-DOF) robot manipulator in constrained motion was considered in the literature. 20 The optimal design of the controller parameters is tuned offline by a PSO algorithm. For designing the PSO algorithm, different performance indexes are considered in both Cartesian and joint spaces. In this work, the gripper motion was constrained by a circular trajectory to validate the effectiveness of the proposed approach.
In the literature, 21 an active disturbance rejection control was designed to control the position of a robot manipulator, considering a linear and a nonlinear strategy. Parameter uncertainties and disturbance rejection were considered in the design and the robustness of the controllers was compared in terms of the performance deviations due to the uncertainties. An estimator was considered in the control scheme proposed in this work and a PSO algorithm was responsible to tune and enhance the estimation, proving to be useful in the improvement of the system performance.
In the literature, 22 an optimization procedure was developed for the choice of parameters in the sliding surfaces of a fuzzy SMC. The control law is a state feedback implemented by a parallel distributed control scheme, where the feedback gains are calculated using the linear quadratic regular problem with weights tuned by the PSO algorithm.
In the literature, 23 the aim was the presentation of a method for estimation of parameters and modeling of dynamics in a 7-DOF hydraulic manipulator. In this work, it was developed a mechanism to achieve a feasible parameters' set consistent with input, output, and states measurements of the system, considering both noisy and uncertain conditions. A GA was applied for the identification of the system, considering the output error of a joint, resulting in a good accuracy of convergence to the desired solution.
Han and Jia proposed a sliding mode controller to achieve tracking control, anti-interference, and suppression of vibration due to flexibility in 2-DOF two-link rigidflexible coupling manipulator subjected to bounded disturbance at input torques. The work presented a proof for the existence and uniqueness of the solution for the closed-loop system using sequences of Galerkin approximation. 24 Yang and Tan designed a sliding mode controller based on adaptive radial basis function (RBF) neural network for joint tracking control and vibration suppression of a single flexible-link manipulator. The flexible link has been treated as a Euler-Bernoulli beam and the partial differential equation has been developed based on Hamilton approach. The adaptive RBF is employed as a neural approximator to enhance the robustness of controller by compensating both internal and external uncertainties. 25 Rahmani et al. combined both PD control and SMC for tracking control of planar robot manipulator based on the extended gray wolf optimizer (EGWO). The hybrid controller could avoid the drawbacks of PD controller and to have a robust controller against external disturbances and uncertainties. By adding the emphasis coefficients to classical GWO, the EGWO is obtained, which is used to optimize the design parameters of GWO and EGWO-based SMCs. The work conducted a comparison in performance between the proposed control and other controllers via computer simulation. 26 Jung 27 presented a neurosliding mode control (NSMC) to improve the tracking performance of a three-link manipulator on the basis of nonmodel-based configuration. The neural network is used as a compensator to replace the nonlinear gain in SMC such as to deal with the stability of the controlled system in an intelligent manner. A comparison in performance has been conducted via computer simulation between the proposed controller and the classical SMC to show the improvement obtained by NSMC in both Cartesian and joint spaces.
Feng et al. 28 have proposed a full-order sliding-mode controller for rigid robotic manipulators. The work suggested a time-varying gain to adjust the gain of the signum function. The regulated gain would restrict the upper bounds of uncertainties to be overestimated and has considerably reduced the effort in control signal. The proposed controller led to an attenuation in chattering and an improvement in robustness characteristics against uncertainties and it has resulted in continuous signals, which made it feasible to real-time applications.
Nicolis et al. combined SMC with model predictive control (MPC) to develop robust centralized controller for trajectory tracking and impedance control of redundant manipulators subjected to unmodeled uncertainty and disturbance. The second-order integral SMC law has been suggested to reduce the effect of chattering. The MPC utilized nominal feedback linearized of robot to guarantee motion and to fulfill the actuation constraint. The hybrid model predictive sliding mode controller could cope with the delays acting on the control input torque. 29 Van et al. proposed adaptive backstepping nonsingular fast terminal SMC (BNFTSMC) for trajectory tracking of robot manipulators. The proposed BNFTSMC combined the merits of nonsingular SMC in terms of finite convergence high robustness and fast transient behavior, also the merit of backstepping control methodology by showing globally asymptotic stability. In addition, an adaptive version of BNFTSMC has been developed to estimate the upper bound of inherited uncertainties. 30 Lee et al. used adaptive integral SMC based on with time-delay estimator (TDE) for tracking control of robot manipulators subjected to uncertainties. The TDE is used to estimate parametric uncertainty and disturbance. The integral sliding surface is devoted to reduce the reaching phase and to eliminate the chattering noise in control action, while the adaption mechanism can achieve high accuracy. The proposed controller demonstrated high accuracy, chattering-free, and robustness characteristics. 31 Baek et al. applied a new adaptive sliding mode control (ASMC) based on TDE to control a robot manipulator. Also, the proposed ASMC scheme utilized poleplacement control for achieving good tracking performance with low level of chattering and guaranteed uniformly ultimately bounded of tracking errors. 32 Ferrara and Incremona presented integral suboptimal second-order sliding mode control for trajectory tracking of robot manipulators. The control algorithm has been developed to reduce the time of reaching phase, to eliminate the chattering level in control action, and to improve the robustness characteristics of controlled system. 33 Islam and Liu proposed an SMC technique to 2-DOF robot manipulator based on multiple model-control approach to reduce the effect of parametric uncertainty and also to reduce the gains of controller and observer. The uniformly compact set of unknown parameters is firstly divided into smaller compact subsets and a candidate SMC is designed for each subset. The candidate model, used for approximating the plant instantaneously, can be identified based on the time derivative of the Lyapunov function. 34 Zhang et al. presented fixed-time SMC for the global fixed-time trajectory tracking of robot manipulators under bounded external disturbances and uncertain dynamics. The fixed-time sliding surface with singularity-free sliding mode controller is synthesized and the global convergence of tracking errors and sliding variable to the origin has been proven. The proposed control scheme showed fixed-time tracking, fast response, high tracking precision, and time-independent settling time with the presence of uncertainties. 35 Ma and Sun proposed a dual terminal SMC scheme for tracking control of robot manipulator. The work has addressed the problem of underactuated issue and input limitation. The proposed controller could achieve finitetime convergence of tracking errors and it has been combined with the adaptive approach to compensate the adverse effect of input limitation. The proposed methods are characterized by chattering suppression, nonsingularity, effectiveness, and high efficiency. 36 Wang et al. proposed a robust adaptive fuzzy terminal sliding mode controller (FTSMC) based on low-pass filter (LPF) for trajectory tracking of robot manipulator in the presence of parametric uncertainty and external disturbance. The FTSMC could satisfy desirable tracking precision and fast convergence, while the LPF keeps smooth position profile. The controller could successfully reject the effect of uncertainties without prior knowledge of their upper bound. 37 Su and Zheng presented a new terminal sliding mode control (TSMC) for 2-DOF robot manipulators under uncertainty. A nonsingular TSMC is developed by proposing a novel integral sliding surface based on finite-time stability theory. The tracking errors and sliding surface has been proved to achieve a global finite-time convergence. 38 Gao et al. have presented an improved robust supertwisting algorithm in the presence of unbounded uncertainties for hybrid robot system based on adaptive switching gains. The fast-adaptive law has been designed to effectively reduce the chattering effect and a global robust sliding surface has been designed to eliminate the reaching phase such that the global robustness is ensured. 39 Ahmed et al. proposed a model-free adaptive fractional STSMC for trajectory tracking of robotic manipulators subjected to external disturbances and uncertainties. The proposed controller integrates a fractional order control, which is responsible for fast finite-time convergence, chatter-free control inputs, and better tracking performance and robustness, with an adaptive STSMC, which is designed to cope with the unknown upper-bounded uncertainty. The state estimation is performed utilizing robust exact differentiator. 40 Louise et al. proposed STSMC based on adaptive gains for trajectory tracking of underwater swimming manipulator. The state estimation is performed by proposing a higher-order sliding mode observer. The ultimate boundedness of the tracking errors has been proven. As compared to linear PD controller, the proposed control law showed better performance characteristics. 41 Shokoohinia and Fateh presented a robust SMC for SCARA robot based on Fourier series expansion for estimating the uncertainties. An adaptive law based on Fourier series expansion is developed to avoid try-and-error procedure in tuning the fundamental frequency. 42 In the literature, other interesting robotic applications, such as mobile robot, underwater robot, and autonomous farm vehicles, have applied sliding control either for tracking or stabilizing control purposes.
Yang and Kim have proposed a novel sliding mode controller for a robust tracking control of nonholonomic wheeled mobile robots subjected to bounded external disturbances. The computed torque method is utilized for feedback linearization of robot dynamic system. It is shown that the tracking errors are asymptotically stabilized and the proposed scheme gives better performance in terms of accuracy and robustness. 43 Matveev et al. have developed guidance laws for automatic path tracking of farm vehicles subjected to both constrained steering angle and bounded uncertainties. The first guidance law was synthesized based on SMC, while the other combined a smooth nonlinear control to reduce the chattering effect in control signal. The global convergence and robust stability of the proposed guidance laws have been rigorously proved and its performance has been numerically verified and experimentally tested and applied. 44 Sarfraz et al. presented adaptive integral SMC for robust stabilizing of nonholonomic underwater systems subjected to uncertainties in both model and control inputs. The system was firstly transformed into chain form with matched uncertainties and secondly into a form with a nominal part and unknown terms. A nominal controller is devoted for nominal part and an adaptive controller for uncertain part compensation. The proposed control scheme has been developed based on Lyapunov analysis and its effectiveness has been verified via computer simulation. 45 To address the problem of design parameters emerging throughout the design of STSMC, which have direct impact on the dynamic performance of controlled robotic system, modern optimization techniques have been introduced for optimal tuning of these parameters. In the present work, two optimization algorithms have been developed to tune the design parameters of STSMC in such a way to improve the performance of STSMC-based robotic system. One technique is based on social spider optimization (SSO) and the other is based on PSO.
The PSO technique was firstly proposed by Kennedy and Eberhart in 1995 and it was inspired by the behavior of organisms. 16 On the other hand, the SSO algorithm, proposed by Cuevas et al. in 2013, 15 is based on the simulation of the cooperative behavior of social spiders. This algorithm realistically emulates the cooperative behavior of the swarms and incorporates computational mechanisms to avoid critical flaws that are popular in other algorithms. 46 These characteristics have motivated the use of the SSO algorithm to solve many engineering applications in different areas. 47 Other modern and generalized optimization techniques can be employed either to improve the optimization process or to make a comparison in performance among each other. [48][49][50][51][52][53] Therefore, this study has addressed two main contributions: one concerning the solutions of chattering problem in control signal and the tracking control problem of Pelicantype manipulator in the presence of uncertainty by designing a robust controller based on STSMC. The other contribution focuses on the development of two optimization algorithms, based on SSO and PSO methods, to tune the design parameters that emerge in the design of STSMC, such to reach the optimal performance of STSMC-based robotic system. Also, a comparative study has been conducted between the performances of STSMC based on the proposed optimization techniques. Thus, the contribution of the present work can be embodied by pursuing the following steps of objectives.
Development of the control law for the STSMC-based 2-DOF manipulator (Pelican-type). This includes the proof of asymptotic stability for the controlled system based on Lyapunov theorem.

Development of optimization algorithm for SSO and PSO techniques.
Conducting a comparative study between SSO and PSO algorithms in terms of dynamic performance and robustness characteristics. Experimental verification of simulated results based on LABView software.
The article is organized as follows: In the second section, the dynamic model of the robot manipulators system is presented. The third section is dedicated to the design of the STSMC. The fourth section is dedicated to utilize the SSO algorithm to find the optimal design parameters of the proposed controller. In the fifth section, a simulation study is given to verify the effectiveness of the proposed scheme. The experimental results have been conducted in the sixth section to validate the results of numerical simulation. In the seventh section, the conclusions drawn based on numerical and experimental observations are given.

Modeling of pelican robot manipulator
As shown in Figure 1, the robot manipulator under consideration is a 2-DOF planar arm composed of a revolute joint and two links. Each link is actuated by an electrical motor, so one is in the base and the other is in the elbow. The motor axes and the links are directly coupled.
The arm of the manipulator has planar movement in the Cartesian directions x À y and is composed of two links, considered to be rigid bodies, with lengths I 1 and I 2 , and masses m 1 and m 2 . These parameters of the manipulator can be seen in Figure 1. The moments of inertia are denoted by l c1 and l c2 , each one calculated with respect to the axes parallel to the direction x that cross the center of mass of the respective link. The parameters l c1 and l c2 represent, respectively, the distance between the rotating axe and the center of mass of each link. The angles q 1 and q 2 , both positive counterclockwise, denote the DOF of the manipulator. 54 The positions of the joints are represented by the vector q ¼ q 1 q 2 ½ T . Aiming a representation suitable for the application of control methods, the following compact form of the dynamic model can be written as follows where t 1 and t 2 are the external torques delivered by the actuators at joints 1 and 2 and d represents the uncertainty vector in system parameters. Also, the elements of matrices M, C, and G are given by Equation (1) can be rewritten as follows It is important to notice that q 1 and q 2 , the angular positions, and _ q 1 and _ q 2 , their derivatives, are the state variables. So, the dynamic model should be rewritten considering these state variables d dt In Table 1, it can be found the values adopted for each parameter of the manipulator.

Design of super-twisting sliding mode control for two degrees of freedom manipulator
The sliding surface vector s ¼ s 1 s 2 ½ T is given by where c ¼ c 1 c 2 ½ T is a positive design parameter and e ¼ e 1 e 2 ½ T is the error value between the desired and actual angular positions (q d ) and q ð Þ, respectively where q d ¼ q d1 q d2 ½ T represents the desired joint positions. The time derivative of equation (4) gives Substituting equation (18) into equation (6), we have The control signal is composed of two terms, which are the equivalent (u eq ) and the switching (u sw ) control laws, represented by where u sw ¼ u sw 1 u sw 2 ½ T . The equivalent law is given by Also, the design of the switching law is derived from the super-twisting algorithm and the control law is written as where i ¼ 1; 2, k i and w i are positive design parameters. The equivalent law is given by Substituting equations (9) and (10) into equation (8), we have Then, substituting equation (11) into equation (7), we get The Lyapunov method can be applied for the stability analysis of the system with the STSMC. The quadratic Lyapunov candidate function can be written in terms of the sliding surfaces The Lyapunov function derivative is calculated as Using equations (12) and (13) becomes Writing b 1 and b 2 in integral forms, equation (14) becomes The STSMC design is schematically represented in Figure 2.
Remark 1: The manipulator will have guaranteed stability if w 1 and w 2 have values satisfying w 1 > d 1 > _ b 1 and Under this condition, V will be positive definite and _ V will be negative definite for all t ! 0. Also, sliding variables s 1 and s 2 will converge to zero as t ! 1.

Optimized super-twisting sliding mode control for two degrees of freedom manipulator
During the development of STSMC algorithm for robot manipulator system, three design parameters have appeared, denoted by c, k, and w. These design parameters are essential for stability and performance of the closed loop system. The trial and error procedure for the adjustment of these parameters is not really practical and, in fact, makes it impossible to find an optimal set of values. In the present work, two optimization techniques, represented by SSO and PSO algorithms, are applied for the finding of optimal design parameters in terms of best dynamic performance of a 2-DOF manipulator controlled by the STSMC.

Social spider optimization-based optimization of super-twisting sliding mode control
In this part, the performance of the robot manipulator is optimized by the SSO algorithm, which is formulated to find an optimal value for the design parameters of the STSMC.
The SSO algorithm considers both male and female spiders, being their numbers defined as members inside the search space when the algorithm is initialized. The number related to the females is N f and it is chosen within the range between 65% and 90%, randomly, of the whole society N s , in selected former times. Consequently, N f is given by 15 where floor : ð Þ maps a real number to an integer number, while rand is a random number lies between. 0; 1 ½ The number of male spiders N m is calculated based on N f and N s as follows 55 The complete population S, composed by N s elements, are divided in two subgroups F and M. The group f assembles the groups the male members . . . ; s N ¼ m Nm g: Assignation of fitness. Each spider in the population S is quantified based on its fitness value and weight. The weight w i assigned to each spider qualifies the spider i of the population. The weight of each spider is assessed based on the following equation 15 Modeling of the vibrations. In the colony, the information among members are encoded based on small vibrations. Such vibrations are employed to initiate the spider and they are related to spider weight and the distance between spiders. The model of vibration process can be described by where i and j denote the indices of spider individuals, d i;j is the distance from spider j and i defined in terms of the Euclidean norm as 55 Initialization of population. As it is already obvious, the SSO algorithm is iterative and requires a randomic initialization of the population of males and females. The iterative procedure is started with definition of the N spider locations and the set S. The location of the female spider f i (or male m i ) contains the parameters values that must be optimized. These values are comprised inside a range of predefined upper and lower bounds, p high j and p low j , respectively, respecting a uniform and random distribution within this range. These relations are described by 15 where i ¼ 1; 2; . . . ; N f , j ¼ 1; 2; . . . ; n, k ¼ 1; 2; . . . ; N m , and f i;j (m i;j ) represents the j'th parameter of the i'th female (male) spider position.
Cooperative operator Female cooperative operator. Female spiders are attracted or not by other spiders. This is defined by the consistency of the vibrations emitted by the spider over the communal net. The attraction movement is activated if r m , a random number uniformly distributed in the range [0, 1], is smaller than a threshold PF. If this is satisfied, the attraction movement is produced based on the following formula 46 Otherwise, a repulsion movement is generated as where b, a, d, and rand : ð Þ are created randomly within [0, 1], while t represents the iteration number. The individuals s b and s c represent the nearest member to i that holds a higher weight and the best individual of the entire population S, respectively.
Male cooperative operator. The biological features of the social cooperation determine the classification of a male population as dominant D ð Þ or nondominant ND ð Þ, taking as reference their position relatively to the median individual. In terms of size and weight, the D spiders present better fitness than the ND spiders. Additionally, the D males are attracted by the nearest female spiders inside the communal web. The male individual is called a dominant D ð Þ member when its weight value is bigger than the median value for the males, while the nondominant ND ð Þ male is that member, which has weight less than the median value. The position change of male spider can be modeled using the following formula 46 where w Nf þm denotes the median male member, s f is the closest female individual to the male individual i, and P Nm h¼1 m k h : w Nf þh P Nm h¼1 w Nf þh À m k i represents the mean weight in the male population M.
Mating operator. The mating phenomenon in the colony of social spiders is performed by female male dominant individuals. If the dominant male m g spider g 2 D ð Þidentifies a set E g of female individuals inside a range r e , it mates, constituting a new brood s new that is created taking into account the components of the set T g , that is, this new generation is given by the union E g [ m g . The radius r e gives a region that is related to the search area being calculated by 15 The probability of a spider, in the mating technique, having an impact on each member of the new brood is defined by the weight of the related spider. Bigger weights increase the probability to affect the new product. The Roulette method can be used to measure the influence probability P si of the individuals as 46,47 where i 2 T g . After shaping the new spider, the new candidate s wo should be compared to the worst spider s new , in terms of their weights (where w wo ¼ min l2 1;2;...N ð Þ w l ð Þ. In case of higher value, the new spider will become the worst spider.
If not, the colony will stay unchanged. When the worst spider is substituted by the new one, the new spider assumes the index and the gender of the replaced one. So, the whole population S continues with the original rate between male and female individuals. A flowchart describing the SSO algorithm can be seen in Figure 3.

Particle swarm optimization-based optimization super-twisting sliding mode control
The PSO was widely method category of swarm intelligence for solving optimization problems and find the local and global solution first come in by Kennedy and Eberhart in 1995, 16 the basic PSO algorithm depends on three steps (generating particles positions and velocities, velocity update, and position update). This algorithm is taken from the conduct of some animals, such as birds and fish. 11,14 The velocity of the particle in each iteration is computed by 56,57 where the weights w, C 1 , and C 2 are, respectively, the inertia, the self-confidence, and the swarm confidence. The suitable value range (C 1 and C 2 ) is between (1-2), but the setting of value 2 is the most suitable in many problems. The function "rand" generates random numbers with zero mean and the inertia weight can be given by where k is the current number of iterations, k max is the maximum number of iteration, w max and w min are the maximum and minimum weights, respectively. The appropriate value of w min is 0.4, while that for w max is 0.9. The position updated by 56,57 where X k i and X kþ1 i represent the current and updated values, respectively, containing the STSMC design parameters c, k, and w, which are required to be tuned. The PSO-based STSMC scheme for the 2-DOF robot manipulator system is depicted in Figure 4.
The PSO algorithm tries to run the manipulator system controlled by STSMC many times until finding the optimal value of the cost function and finishing the algorithm. Then, this set of optimal design parameters is addressed to the proposed controller. The objective function f considered for the evaluation of every particle during the search of the better value is based on the minimization of the following criterion

Simulation results
The computer results for the STSMC are presented for the tracking control of the robot manipulator system based on an SSO and PSO algorithms. The effectiveness of STSMC and the performance of optimization techniques are verified using computer simulation within MATLAB environment. Figure 5 shows the trace of fitness function over the iteration of both PSO and SSO techniques for each manipulator joint. It is clear from the figure that the PSO technique gives better optimization performance than the SSO technique for manipulator controlled by STSMC. Figure 6 shows the behavior of the best design parameters c j , w j , and k j with respect to iteration in the case of SSO and PSO algorithms, where j ¼ 1; 2. The optimal values of design parameters at the end of each optimization process are listed in Table 2. These optimal values are set in the proposed controller and, hereafter, the controller can be termed as "optimal super twisting SMC."    1 (a, b), and angular velocity and, the angular position and velocity of joint 2 (c, d) and its reference trajectory based on optimal STSMC. Figure 8 shows the control signal of joint 1 (a), joint 2 (b) and sliding surface signal in joint 1 (c), joint 2 (d).
Next, the performance of STSMC based on PSO and SSO algorithms under uncertainty in parameters has been investigated. In this scenario, a change by 8% ratio of nominal value in moment of inertias (I 1 and I 2 ) has been allowed. Figures 9 and 10 show the angular positions (and velocities) of manipulator joints and the actuating torques of both joints, respectively.
The performances of STSMC based on SSO and PSO techniques are numerically reported in Table 3. This table indicates that the PSO-based STSMC is better than that based on SSO algorithm in terms of transient and robustness characteristics.
Real-time implementation of optimal super-twisting sliding mode control for pelican manipulator Figure 11 shows the hardware setup for practical implementation of proposed optimal versions of STSMC. The overall hardware setup consists of the following elements: Pelican-type robot manipulator, NI-6212 interfacing device, the personal computer (PC), and drive circuits.
The experiment setup has been carried out on manufactured Pelican-type manipulator. The manipulator is a 2-DOF and it consists of two arms moving on a vertical plane. The total length of arm links, when they are aligned in straight line, is 0.52 m long and these rigid links are tailored from 6061 aluminum sheet. The joints of rigid arms are directly connected to drive motors via revolute joints.  The control operation is achieved through software, which is called "Laboratory Virtual Instrument Engineering Workbench" or LabVIEW. The LabVIEW has a facility to interface with MATLAB, where the interface document within LabVIEW environment permits the user to define calls to a MATLAB file. The algorithm of STSMC has been coded inside MATLAB function, which is called by the LabVIEW programing software via interfacing nodes. The sampling period for executing the control algorithm has been set at 2.5 ms since this sampling period is fast enough to approximate continuous control signals produced by executed continuous-time strategy. The control  signals generated by LabVIEW-based super-twisting sliding mode controller is exported to the environment via the national instrument device NI-USB-6212. The control signals are transferred to motor drives via I/O analogue ports of NI-USB-6212 data acquisition card (DAC). The information of feedback signals are acquired by the PC (Lab-VIEW package) via I/O digital and analogue port of DAC.
The actuating motors used in the real-time implementation are from Parker Compumotor of type DM1200-A and DM1015-B for the shoulder joint and elbow joint, respectively. These actuating motors are high torque without gear reduction and they are operated in "torque mode"; that is, they work as torque sources and they are commanded with analog voltages for requested torques. The motor at shoulder joint (DM1200-A) can develop a maximum torque of 150 Nm, while the elbow motor (DM1015-B) delivers maximum torque up to 15 Nm. Based on data sheet of applied motors, their resolutions are 1,024,000 steps/rev, that is, the accuracy of both motors reaches 0.0069.
The data information of position for both joints (shoulder and elbow joints) based on mounted encoders are acquired within the environment of LabVIEW programming format and they are exported as to MATLAB environment for the purpose of plotting. Figures 12 and 13 show the experimental position behavior of q 1 and q 2 subjected to sinusoidal reference input. However, this scenario has been implemented based on normal condition. To evaluate the performances of both optimal controllers, the root Figure 10. The control signal of (a) joint 1 and (b) joint 2 based on PSO and SSO methods with 8% uncertainty in I 1 and I 2 . PSO: particle swarm optimization; SSO: social spider optimization.  mean squared error (RMSE) is used as a measuring index for evaluation. Based on shoulder joint information (Figure 11), the RMSE for PSO-based controller is calculated to be 0.012 rad, while that for SSO-based controller is given by 0.019 rad. On the other hand, the same calculation of RMSE is repeated for elbow joint information based on Figure 12. The RMSE value of q 2 for PSO-based controller is found to be 0.015, while the RMSE value is equal to 0.021 based on SSO-based STSMC. This indicates that better improvement of performance can be obtained by PSO technique than that given by SSO technique. Moreover, the experimental results showed that the response of q 1 and q 2 is faster in case of PSO-based controller than those based on SSO-based controller.

Conclusion
In this article, an STSMC has been developed for tracking control of robot manipulator. The design procedure of STSMC is developed and the asymptotic stability is proved and discussed in detail. Instead of relying on the trial and error method to determine the optimal design parameters of the STSMC algorithm, a modern optimization technique based on SSO and PSO tuneris to find the optimal design parameters of the proposed controller. A comparative study between SSO and PSO techniques is made toward better dynamic performance and the computer simulation showed that dynamic performance of STSMC based on PSO is better than that based on SSO. Also, PSO-based STSMC  of manipulator has better robustness characteristics than that based on SSO technique. The conclusions based on numerical simulation have been validated by conducting experimental results, which showed the superior of using PSO technique to the SSO algorithm in terms of control performance. The work can be extended to include the observer or adaptation mechanism to account for unmeasured states or uncertainty. The other suggestion is to conduct the proposed scheme in this study for other robotic applications, such as wheeled mobile robot and underwater and flying robots. 45,58,59

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.