Robust Adaptive Super-twisting Sliding Mode Stability Control for Underactuated Rotary Inverted Pendulum with Experimental Validation

—In this paper, an adaptive proportional-integral-derivative (PID) sliding mode control method combined with super-twisting algorithm is designed for the stabilization control of rotary inverted pendulum system in the appearance of exterior perturbation. The state-space model of rotary inverted pendulum in the presence of exterior disturbance is obtained. Then, the super-twisting PID sliding mode controller is designed for finite time stability control of this underactuated control system. The upper bounds of perturbation are presumed to be unknown; accordingly, the adaptive control procedure is taken to approximate the uncertain bound of the external disturbances. The stability control of rotary inverted pendulum system is proved by means of the Lyapunov stability theory. In order to validate accuracy and efficiency of the recommended control technique, some simulation outcomes are prepared and compared with other existing method. Moreover, experimental results are implemented to show the success of the proposed method.


INTRODUCTION
Rotary inverted pendulum (RIP) system is considered as an underactuated system which has been established by Furuta with the help of his college at first [1][2][3][4][5]. This system consists of a rotary arm and a pendulum linked at the end of the arm. The arm can move in the horizontal plane as well as pendulum has movement in the vertical plane [6][7][8][9]. Various types of physical systems such as human's arm motion, control of position and attitude of aircrafts, and robot system have been originated from the model of RIP system [10][11][12]. For this reason, stability and control of RIP system is still in consideration [13][14][15][16]. Hence, the control problem of RIP system is divided into two subsystems. In the first subsystem, the stability of position and angular velocity relevant to the arm of RIP system is investigated. In addition, in the second subsystem, the main goal of control is the balancing of pendulum to be stand up-right [17][18][19][20]. Therefore, some control methods including proportional-integral-derivative (PID), linear quadratic regulator (LQR), linear quadratic Gaussian (LQG), sliding mode control (SMC), adaptive control, fuzzy logic and neural network techniques have been applied for both stability and balancing control of RIP systems [21][22][23][24][25]. In [26], LOR and LQG methods based on the fuzzy logic control 1 Corresponding author: Saleh Mobayen (mobayens@yuntech.edu.tw) technique has been proposed aimed at stability control of double-RIP system under perturbation. Besides, these methods are compared with the classical LOR and LQG techniques which confirm better performance of the proposed methods. In [27], an LQR control scheme decoupled PID control technique is designed in order to stability and balancing control of RIP systems. In [28], a robust LQR controller is presented based on the adaptive fuzzy logic control technique mixed with neural network in the target of stability and balancing control of RIP system. In [29], an observer for inverted pendulum system is designed based on the adaptive technique using auxiliary variable. On the other hand, an auxiliary observer is used for approximation of the external disturbance and an adaptive observer is applied for estimation of states and uncertain parameters. In [30], an adaptive integral SMC technique is designed for the wheeled inverted pendulum system in the presence of external disturbance and parametric uncertainty. In addition, this method forces that the state of the system is converged to the origin in the finite time. In [31], the dynamic model of double inverted pendulum combined with crane system is presented. Then, an adaptive SMC (ASMC) scheme is proposed for stability and tracking control of derived system using Lyapunov and LaSalle's theory [32][33][34][35]. In [36], three methods, i.e., second-order SMC, proportional-derivative SMC and ASMC are designed for the Furuta inverted pendulum system.
According to the above-mentioned discussion about the stability control of RIP system, it can be inferred that rare researches have paid attention to the finite-time stability control of underactuated RIP system in the presence of external disturbance using adaptive supper-twisting PID-SMC method. In this paper, firstly, a PID-SMC-based super-twisting method is used for finite-time stability control of RIP system in the existence of known bounded disturbances. Whereas upper bound of perturbation is unknow, PID-ASMC mixed supertwisting technique is proposed for the estimation if the upper bound of disturbance which is entered to the RIP system. Thus, the key novelties of this paper can be listed as follows: -Design of PID-SMC combined super-twisting algorithm for finite-time stability control of RIP system under known bounded perturbation; -Proposing of PID-ASMC for stability control of RIP system with unknown bounded external disturbance; -Finite-time reachability of the proposed PID-switching surface by means of Lyapunov theory concept.
The rest of this paper is formed as follows: in Sect. II, model description of the RIP system is expressed. The state-space form of RIP system in the existence of disturbance is obtained in Sect. III. In Sect. IV, PID-ASMC strategy based on supertwisting method is presented. Simulation outcomes are provided in Sect. V. The fundamental conclusion of the paper is reported in Sect. VI.

MATHEMATICAL MODEL DESCRIPTION
The schematic configuration of rotary inverted pendulum system is depicted in Fig.1. Consider 1 and 2 are the angular displacement of arm and angular displacement of pendulum, respectively. The terms 1 , 1 and 1 are the mass, length and distance to the center of arm. Also, 2 , 2 and 2 denote the mass, length and distance to the center of pendulum, correspondingly. (1) where = [ 1 , 2 ] . The terms , , and are the mass, Coriolis and Centripetal, gravitational and torque matrixes, respectively, which are given as follow: where 1 , 2 , and 1 are the moment of the inertia of arm, moment of the inertia of pendulum, gravitational acceleration and applied torque, respectively. Moreover, we define 2 2 = (2 2 ), 2 2 = (2 2 ) and 2 = ( 2 ).
Consider that Eq. (1) is rewritten as follow: where −1 is the inversion of matrix . After simplification and substituting Eqs. (4), (5) 21 22 ] where 11 , 12 , 21 and 22 are the elements of matrix −1 and 11 , 12 , 21 and 22 denote the components of the matrix . Now, by multiplying the matrices and doing some simplifications, we have

PROBLEM DESCRIPTION AND ASSUMPTION
In this section, the dynamical model of rotary inverted pendulum system is presented in the state-space form in the appearance of external disturbances. Afterward, the required assumption is studied.
as the state-space variable and external disturbance vectors, respectively. The dynamic model (9)-(10) is expressed in the state-space form with external disturbances as 4. ADAPTIVE SUPER-TWISTING PID SLIDING MODE CONTROL In this part, the stability control of rotary inverted pendulum is investigated using super-twisting PID sliding mode control technique. For this reason, the PID sliding surface is defined as where is the positive constant. Taking time derivative of (17), it yields Substituting Eqs. (11)-(14) into (18), we have After some simplification, we can get Now, the super-twisting PID sliding mode controller is defined as with 1 and 2 as the positive constants.
The objective of the following theorem is the finite time stability of the rotary inverted pendulum in the presence of external disturbance with known bounds.
Theorem 1: Assume that the dynamical equation of rotary inverted pendulum be as (11)- (14) and the PID sliding surface and control input are designed as (17) and (21). Then, the finitetime convergence of the planned sliding surface to the origin is proved and the stability control of the system is performed.
Taking derivative of (24) with respect to time and using (20), it can obtain ̇( ) = ( )[( 1 + 3 1 + 4 4 ) 2 ( ) After some simplification, we have Considering Assumption 1 and doing some mathematical operations, it yields 2 is a positive expression; so, it can be removed, therefore we have where considering the Lyapunov function (24), we obtain Hence, based on the above equation, the PID sliding surface is converged to the origin in the finite time using the supertwisting controller. □ Remark 1: The adaptive control technique is an effective method for aproximatation of the upper bounds of exterior perturbation which is unknown in practical and actual applications. Thus, in the following theorem, an adaptivetunning scheme is applied to estimate the upper bound of external disturbance. For this purpose, the estimation errors are defined as where 1 ( ) and 2 ( ) are the estimated values of 1 and 2 . The adaptive laws can be offered as where 1 and 2 are the positive constants and 1 and 2 are achieved by the following equations: while 1 and 2 signify the positive constants. Thus, the control input is designed as Theorem 2: For the rotary inverted pendulum system (11)- (14) under known external disturbance which holds Assumption 1, the control inputs (37)-(39) are designed based on the sliding surface (17) and adaptive laws (33)- (36). Thus, the sliding surface is converged to the origin as well as the stability control of the underactuated system is fulfilled.
Proof: Form the candidate Lyapunov function as follow: ( ) = 0.5 ( ) 2 + 0.5 1 1 2 ( ) + 0.5 2 2 2 ( ) Using the control laws (37)-(39), it gets According to Assumption 1, we have From Eqs. (31) and (32) and removing the similar terms, we can obtain where by simplification, it yields Now, consider the following inequalities [37]: Substituting (47) and (48) into (46), the following equation is resulted where by removing the same expressions, it leads to Hence, we obtain ̇( ) ≤ 0. Therefore, it is demonstrated that the proposed sliding surface converges to the origin. The proof is finished. □

a. simulation results.
In this part, the simulation results for RIP system are performed based on the adaptive super-twisting PID-SMC technique as shown in Fig.1. The constant parameters of RIP system and the design values are given in Table 1 and Table 2, respectively.   The simulation results based on the proposed method are compred with the method of [1] in two parts. The proosed PD sliding surface in [1] is defined as ( ) = 1 1 ( ) + 2 3 ( ) + 3 2 ( ) + 4 4 ( ). At first, simulation results are obtained with the known upper bound of external disturbances. The finite time stablity of rotary inverted pendulum system applying the super-twisting PID-SMC law is observed in Fig.3 and Fig.4. In Fig.3, the angular position and velocity of arm of RIP system are illustrated. Fig.4 shows the time histories of angular position and velocity of inverted pendulum. Time responses of the sliding surfaces under known bound perturbation are presented in Fig. 5. The applied torque of the system which is gained by the super-twisting PID-SMC is shown in Fig.6. From these figures, it can be observed that not only the proposed method has quick response respect to the method of [1], but also the transient performnace of the recomende method is much better than method of [1]. Now, it is persumed that the upper bound of external disturbance is unknown. So, the simulation results are reimplemented using the adaptive control technique. The stability control of RIP system based on the adaptive supertwisitng PID sliding mode controller is shown in Fig.7 and Fig.8. Also, time trajectory of reachability of sliding surface to origin is depicted in Fig.9. Time response of the applied torque based on the adaptive super-twisting PID-SMC is displayed in Fig.10. From this figure, it can be seen that the chttering phenomenon has been improved in comparison with the method of [1]. At last, the adapation laws related to the approximation of upper bound of external disturbances are illustrated in Fig.11. Acording to these figures and comparisions, it can be seen that the recommended method based on the adptive super-twisting PID-SMC presents the fast and better transient response in comparison with method of [1].

. Experimental results
In this part, some experimental outcomes are implemented on a real electro-mechanical engineering control system which is developed by TeraSoft company in Future Technology Research Center in National Yunlin University of Science and Technology. The components of this system are shown in Fig.12. Moreover, this system has support package in MATLAB as Embedded coder toolbox which supports the Texas instruments C2000 Processors. In addition, block diagram of the platform is depicted in Fig.13. The laboratory environment for implementation of the suggested method on real RIP system is shown in Fig.14.
The applied voltage for motor in the control of the RIP system is calculated as the following equation: where and are the motor armature resistance and motor torque constants.
After implementing the suggested method on the RIP system, the following results are obtained. Time responses of the position and angular velocities of the arm and pendulum are shown in Fig.15 and Fig.16, respectively. It can be seen that the position of arm is stabilized near 0.7 degree which is equal to 0.012 radian. In addition, the position of the pendulum is converged to zero (around 3.11 degree). So, the positions of the arm and pendulum are stabilized to a region near the origin. In Fig.17, time trajectory of the applied voltage in DC motor is displayed. Hence, the validation of the suggested method is proved.

CONCLUSION
In this paper, the dynamical model of the rotary inverted pendulum system was studied in the form of state-space model. The finite time stability of the rotary inverted pendulum system under known bounded external disturbance was accomplished based on the PID sliding mode control combined with supertwisting algorithm. Whereas the upper bound of perturbation was assumed to be unknown and the adaptive-tuning control scheme was designed to estimate the unknown bounds. In addition, the Lyapunov stability theory was used to attest the stability control of underactuated rotary inverted pendulum based on the adaptive super-twisting PID sliding mode control technique. As well, simulation results were provided based on the recommended method. The simulation results were compared with another method which was confirmed the proficiency and effectiveness of the suggested technique in comparison with the other method. Furthermore, experimental results on real RIP were provided to demonstrate the effectiveness of the proposed method. Conflict of interest statement: The authors declare no conflict of interest in preparing this article. Funding Acknowledgement: This research received no specific grant from any funding agency in the public, commercial, or not-for-profit sectors. Data Availability Statement: The data that support the findings of this study are available within the article.