Fast terminal sliding mode tracking control of nonlinear uncertain mass–spring system with experimental verifications

In this article, a fast terminal sliding mode control technique is used for robust tracking control of a nonlinear uncertain mass–spring system in the existence of external perturbation. This system is considered as a benchmark problem in the flexible joint mechanisms. The joints flexibility in the robotic systems creates one of the most significant sources of parametric uncertainties. The theory of Lyapunov stability is used for the formulation of the proposed control method, and the presence of the sliding around the switching surface is satisfied in the finite time. Simulation results as well as the experimental verifications prove the efficiency and applicability of the suggested approach in the presence of parametric uncertainty, noise, and exterior disturbance.


Introduction
The position control of the nonlinear second-order systems is one of the principal issues in the fields of control engineering, mechanics, and robotics. [1][2][3] Modeling of various industrial systems leads to second-order nonlinear equations. In addition, many complex systems have secondorder nonlinear benchmark structures, which are used to develop new control strategies. 4 In most of the applied problems, besides the nonlinearity of the control system, the parametric uncertainties, external disturbances, and measurement noises also existed, where these factors are studied in the benchmark systems for the development of robust control strategies. 5 To test the novel control techniques, various benchmark control systems, such as inverted pendulum, ball and beam, magnetic levitation, and mass-spring damper, have been employed. The nonlinear mass-spring system is considered as a benchmark problem in the flexible joint mechanisms. 6,7 In the recent years, considerable attention has been paid to the robotic manipulators with joint flexibilities, making it a significant issue. 8 Robotic systems with flexible joints have been developed for safe and compatible interaction to sensitive spaces such as human environments. 9 This class of robotic systems has been employed for the needs of accurate industrial automation. In fact, flexibility of the joints in the robotic manipulators is an important issue in some applications such as space manipulators, 10 surgical robots, 11 human robots, 12 and industrial manipulators. 13 A trajectory tracker based on model-reference adaptive control method has been proposed by Ulrich and Sasiadek 10 for space manipulator with parametric uncertainties and elastic vibrations in the joints. In the study by Xiong et al., 14 a weighted path-planning technique is presented for a lightweight robot, where an interaction is carried out with the environment using the impedance control approach. Flexibility is an undesirable feature in flexible joint mechanisms due to causing serious control problems such as vibration, nonlinearity, coupling, and uncertainty. 15 In the past years, various control strategies such as adaptive control based on Lyapunov theory, 16,17 model predictive control method, 18 switched fuzzy output-feedback control, 19 neural network control, 20 feedforward control, 21 vibration control based on passivity theory, 22 and sliding mode control (SMC) 23 have been investigated for the control/tracking of mass-spring systems.
SMC method is an effective nonlinear control strategy that has been utilized in control of various linear and nonlinear systems. [24][25][26] Sliding mode controllers, due to the fast transient response, simplicity in use, and strong robustness against external disturbances and uncertainties, are applied in various practical systems like automobiles, 27 aircrafts, 28 missile guidance, 29 satellites, 30 cryptosystems, 31 power systems, 32 and robotics manipulators. 33 About the sliding mode controllers, one of the significant drawbacks is that they do not guarantee the robustness in the reaching phase. In fact, robustness of SMCs is related to sliding phase, which they do not have robust performance until they reach to the sliding phase. As a result, the system can become unstable due to external disturbances. 34,35 Moreover, there are some high-frequency oscillations in the form of chattering during the sliding phase, which have damaging effects on the actuators. However, much effort has been made to attain the convergence in the finite time, as well as to eliminate chattering in the SMC controllers. 36,37 The result of these efforts is the development of the Terminal Sliding Mode Control (TSMC) method, which has finite-time convergence tracking error. 38 In addition to stabilization in the finite time, the TSMC technique has a high speed and robustness to the typical SMC, which attracts the attention of many control systems designers. 37,39 However, because of the fractional powers and their derivatives, TSMC suffers from the singularity problem and cannot provide the tracking errors convergence when the system states reach zero. 40,41 To eliminate the constraints of TSMC, another type of controller has been introduced by Yu and Man 42 which is called the Fast Terminal Sliding Mode Control (FTSMC). This type of controller, even when the states of system are not near the equilibrium point, has a fast convergence. In fact, FTSMC provides the strong robustness and fast convergence performance in the transient and steady-state conditions. 43 Therefore, in recent years, the use of this type of controller has attracted many researchers. 44,45 In the study by Erenturk, 46 the optimized PID and sliding mode controllers combined with a grey estimator are developed for the nonlinear two-mass spring system. In the study by Pai,47 for multimode flexible systems, a robust input shaping control scheme is proposed via the neurosliding mode feedback controller. In Mamani et al.'s study, 48 the SMC scheme is employed for the robust position tracking control of a light single-link flexible robotic arm without considering the bounding limits on parametric uncertainties. In the study by Dong and Tang, 49 a SMC by adaptive backstepping approach is proposed for the control of flexible ball screw drives in the presence of exterior disturbances and time-varying parameter uncertainties. In Zouari et al.'s study, 50 the proportional-integral and sliding mode controllers are designed for robotic manipulator with uncertain flexible joint and all parts of manipulator containing actuators are modeled to obtain high performance. The sliding mode-based discrete Fourier transform is presented by Shitole and Sumathi 51 for estimation of single-link flexible manipulators vibration mode. In the study by Zhang et al., 52 an adaptive smooth sliding mode technique for vibration control in modal space is proposed in the flexible manipulators with parallel structure and multiple smart linkages. The SMC method based on passivity theory is investigated by Chenarani and Binazadeh 53 for the control of uncertain nonlinear systems with flexible structure. Rsetam et al. 54 suggested a hierarchical non-singular terminal SMC technique for a single-link robotic arm with flexible joint. The problem of the sliding mode boundary control based on adaptive neural network with radial basis function scheme is studied by Yang and Tan 55 for a flexible single-link manipulator. To the authors' knowledge, heretofore no finite-time control scheme has been considered to use a novel FTSMC method for the robust position tracking control of nonlinear mass-spring system with Coulomb friction, time-variant external disturbance, parametric uncertainty, and measurement noise. The novel FTSMC approach has been employed for the system stability analysis and control system. The controller is designed such that fulfills the presence of the sliding in the vicinity of the switching surface in the finite time according to the Lyapunov stability theorem.
The organization of this article is denoted as follows: the second section depicts the description of the nonlinear uncertain mass-spring system. The third section proposes the fast terminal sliding manifold and the stability analysis of the finite-time FTSMC approach. In the fourth section, the results of simulation on the nonlinear mass-spring system are provided. The fifth section presents experimental verifications on the practical mass-spring system which confirms the efficiency of the suggested method. Finally, conclusions of the study are given in the sixth section.

System modeling and problem definition
The nonlinear mass-spring system can be considered as m€ xðtÞ þ kxðtÞ þ mg sgnð_ xðtÞÞ ¼ ÀkuðtÞ ð1Þ where xðtÞ is the mass position, uðtÞ signifies the system input, k represents the spring coefficient, g indicates the gravitational constant, m specifies the mass value, denotes the friction coefficient, and sgn(.) is the sign function. The parametric uncertainties should be considered in modeling of practical systems, such as robotic manipulators, flexible joint mechanisms, and mobile robots. A robotic manipulator with flexible joint can be used for moving different masses. In our benchmark problem (mass-spring system), the parametric uncertainties in the experimental results have been considered as the variations of cart mass.
Considering the uncertainties and disturbances, the nonlinear mass-spring system (1) in the state-space form can be represented by where f ðx 1 ðtÞ; x 2 ðtÞÞ ¼ À k m x 1 ðtÞ À gsgnðx 2 ðtÞÞ, x 1 ðtÞ and x 2 ðtÞ are the system states, the nonlinear functions Df ðx 1 ðtÞ; x 2 ðtÞÞ and dðtÞ present the parametric uncertainties and external disturbances, respectively. The nonlinear uncertain mass-spring system (2) is expected to follow the reference trajectories x 1d ðtÞ and x 2d ðtÞ with _ x 1d ðtÞ ¼ x 2d ðtÞ.
Lemma 1. Let the positive-definite Lyapunov functional guarantees the following differential inequality for t ! t 0 and V ðt 0 Þ ! 0 56 with a and b as two positive scalars and h (0 < h < 1) as a ratio of two odd positive integers. As a result, V ðtÞ converges to the origin (at least) in the finite time as Main results For the nonlinear uncertain mass-spring system, the sliding surface is described as where c 1 and c 2 (c 2 6 ¼ 0) denote the gain constants. For guaranteeing the convergence of sliding surface (equation (6)) to the origin in the finite time, the fast terminal sliding manifold can be defined by where l and are two positive coefficients, and h (1 > h > 0) is the ratio of two odd positive integers.
In what follows, the finite-time convergence procedure of the recommended fast terminal sliding manifold to the equilibrium is guaranteed and the zero-tracking performance of the system states is fulfilled. Theorem 1. Consider the nonlinear uncertain mass-spring system (equation (2)). The control law of the proposed FTSMC is considered as where g and k are two positive constants and is a coefficient that satisfies Then, in the finite time, the proposed fast terminal sliding manifold (equation (7)) converges to zero, and the states of the nonlinear uncertain system follow the reference desired path.

Simulation results
To prove the theoretical results of the proposed controller, in this section, a mass-spring system is simulated. The massspring system with Coulomb friction is introduced as a benchmark problem in robotic systems with flexible mechanisms. This system can be employed to evaluate different control techniques to make it more effective for other complex flexible structures. The dynamic behavior of the nonlinear mass-spring system shown in Figure 1 can be defined by the following differential equations where x 1 ðtÞ denotes the mass position, x 2 ðtÞ signifies mass velocity, specifies Coulomb friction coefficient (with s for static friction and k for kinetic friction), g represents the gravity constant, m s indicates the spring mass, and m c is the cart mass. The initial conditions are considered as xð0Þ ¼ ½0; 0 T . In these simulations, the following constant parameters are used in the nonlinear mass-spring system m s ¼ 0:260kg; m c ¼ 0:850kg; k ¼ 177N=m; g ¼ 9:8m=s 2 ; s ¼ 0:24; k ¼ 0:11 Because the spring's mass is considerable in comparison with the cart mass, one-third of the spring's mass is added to the cart mass to diminish the effects of unmodeled nonlinear dynamics related to the spring. 57 Moreover, the coefficients of the static and dynamic friction are obtained via experimental test. The external disturbance is presumed as dðtÞ ¼ 5sinðptÞN, which is applied after 20 s. The sampling time is determined as 0.01 s. A sinusoidal input with 1 rad/s frequency and 2 cm amplitude is considered as the desired trajectory. The controller constant coefficients are given as c 1 ¼ 1, c 2 ¼ 0:05, l ¼ 10, k ¼ 2:5, g ¼ 5:5, ' ¼ 1:5, and b ¼ 2. To figure out the proposed controller performance, a comparison with the PID controller has been made. The PID coefficients are determined by trial and error as k p ¼ 7, k i ¼ 30, and k d ¼ 0:1, and the employed controller for comparison purpose is considered as uðtÞ ¼ 7e 1 ðtÞ þ 0:1e 2 ðtÞ þ 30 It is concluded from simulation results that the massspring system state trajectories can successfully track the reference desired path through the proposed method. Figure 2 illustrates the time histories of the position and velocity of mass-spring setup in noise-free condition. As shown in Figure 2, in the presence of the external disturbance, the proposed controller has an acceptable performance rather than the other controller. Figure 3 demonstrates the time responses of the controllers' output and sliding surface. This figure exhibits that the output of the proposed controller has a fruitful performance and less control effort than the result of the PID controller.
To investigate the suggested control robustness, the noise effect and parametric uncertainty are also studied in simulations. For uncertainty term, we have added a coefficient of the Heaviside step function to the cart mass as 1:5Hðt À 20Þ. A Gaussian measurement noise is applied with zero-mean and variance of 0.2, amplitude of 0.001, and sampling time of 0.01 s. Figure 4 shows the position and velocity of mass-spring system in noisy condition. In the first 20 s, the system is only under the measurement noises. The external disturbance is applied after 20 s. It can be concluded from Figure 4 that the suggested FTSMC has   robust performance in noisy condition. Though derivative factor in the PID controller is negligible, the effect of measurement noise on the velocity plot (Figure 4(b)) is quite evident. Figure 5 illustrates the controllers' output and the proposed sliding surface. It can be found from Figure 5 that the output of the proposed controller has small oscillations, which confirms the superiority of the suggested scheme.
In the third part of simulations, to study the proposed controller performance to the parametric uncertainty, measurement noise, and the external disturbance, a sudden change also occurred in the amount of system's mass. At the moment of 20 s, a mass of 1.5 kg has been added to the system. Figures 6 and 7 depict the simulation results for the new condition. As it can be seen in Figure 6, the position and velocity of the mass through the proposed controller have robust behavior versus parametric variation. Furthermore, Figure 7 illustrates the increment in the amplitudes of the control output due to mass change.
As observed above, the obtained results of the simulations show that the proposed FTSMC technique has acceptable robust performance in the presence of the external disturbance, parametric uncertainty, and noisy condition.

Experimental results
In the following, the experimental results of the suggested control technique are presented via Matlab ® [version R2016a] Simulink ® software and Arduino ® hardware support package toolbox. We have performed some experiments on the practical two-mass-spring system built in Department of Electrical Engineering at University of Zanjan. Figure 8 displays the built in two-mass-spring system. In this setup, two potentiometer position sensors measure the positions of carts (masses). One of the carts is considered as the base, which is excited through MG996 R (TowerPro) servomotor.    The Arduino MEGA 2560 board (based on the ATmega2560 microcontroller) has been used in the electronic part of the system. A computer with the specifications Intel ® Core™ i3 2.40 GHz CPU and 3.00 GB RAM is employed to the control system and by considering 0.01 s for control loop sampling time and ode3 (Bogacki-Shampine) solver, control process of this system is completely real-time. The FTSMC and PID controllers are applied to position control of the mass on the reference trajectory as xðtÞ ¼ 0:02sin t. The initial values of position and velocity of the cart (x 1 ð0Þ and x 2 ð0Þ) are zero. To study the robustness performance of the controllers versus the parametric uncertainties, a mass of 1.5 kg has been added to the cart mass after the moment t ¼ 20 s.
The experimental results of position tracking and velocity of the cart mass are indicated in Figure 9. As can be observed in Figure 9(a), the proposed controller has a high accuracy in tracking of the desired path, even in the presence of mass uncertainties. Moreover, the oscillations of mass velocity are shown in Figure 9(b), which represents acceptable response of the suggested controller by considering the measurement noise. Figure 10 demonstrates the outputs of the controllers and sliding surface of the proposed method. As can be seen from Figure 10(a), there are some differences between the control outputs in the simulation and experimental results. The main reason for the mentioned difference after the moment t ¼ 20 s is related to the nonexistence of disturbance in the experimental results. The slight difference in the control outputs between the simulation and experimental results before the moment t ¼ 20 s is because of the   un-modeled nonlinear dynamics in the simulated system. It can be concluded from Figure 10 that the output of the proposed control technique is more smooth than the control output of the other method, which confirms the advantage of the proposed approach.

Conclusions
In this article, the fast terminal SMC approach was investigated for robust tracking control problem of an uncertain nonlinear mass-spring system with parametric uncertainty, noise, and external disturbance. In this way, a new fast terminal sliding surface was presented and an original robust FTSMC procedure for the tracking purpose of the nonlinear uncertain mass-spring system (as a benchmark problem of flexible joint mechanisms) was proposed. Moreover, the convergence of the fast terminal sliding surface in finite time to the origin was studied via Lyapunov stability theorem. Lastly, the effectiveness and success of the recommended method were confirmed via simulation and experimental results on the nonlinear uncertain massspring system. It is worth mentioning that the proposed robust control approach can be employed for more complex higher order uncertain nonlinear systems, such as flexible joint mechanisms.

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.