Abstract
This paper presents a real-time implementation of an adaptive super-twisting (ASTW) controller. This work deals with the stabilization challenging problems of underactuated mechanical system subject to parametric variations and state- and time-dependent disturbances. Due to the low number of control inputs compared to the number of DOFs, the proposed approach has been designed based on an explicit global change of coordinates. The stability analysis of the resulting closed-loop system was performed based on Lyapunov’s theory. Extensive experimental investigations were conducted on the inertia wheel inverted pendulum (IWIP) to demonstrate the robustness of the proposed solution. These experiments include a real-time comparison with existing control solutions from the literature, providing a detailed analysis of performance, effectiveness, and robustness under various conditions. Quantitative evaluations were carried out based on different performance criteria, highlighting the practical applicability and superiority of the proposed control strategy in real-time scenarios. The results from both numerical simulations and physical experiments demonstrate the controller’s capability to maintain stability and performance despite the presence of disturbances and parametric variations.
Keywords
Introduction
Sliding mode control (SMC) is a well-known robust control widely used for nonlinear systems (Utkin, 1992) due to its robustness against matched uncertainties and disturbances. The first-order SMC is characterized by an undesirable finite frequency and amplitude oscillations around a predefined switching manifold, which is known as the chattering phenomenon. From a practical point of view, the chattering involves high control activity by generating the high-frequency of non-modeled dynamics (Slotine and Li, 1991) and will result in unnecessary/rapid wear of the actuation components (Andrzej, 2000). The high-frequency oscillation can be caused, for instance, by the presence of a parasitic dynamics in series with the control system or by switching time delays. More details regarding the causes of this phenomenon are provided in Yu and Kaynak (2009). To overcome the chattering problem, various solutions include, but not limited to, continuous approximation of the discontinuous control law (Slotine and Li, 1991), observer-based approaches (Bondarev et al., 1985), second-order SMC (Gonzalez et al., 2012), and intelligent approximation algorithms (Nafa et al., 2021). The super-twisting algorithm (STA) introduced in Levant (1993) is a second-order sliding mode controller that is a powerful tool for minimizing the effect of chattering. STA has shown promising results in terms of robustness and fast response. It has the ability to generate a continuous control signal and is appropriate for systems with Lipschitz continuous matched uncertainties/disturbances with bounded gradients (Ramesh-Kumar and Bandyopadhyay, 2014). Various stability analysis techniques based on Lyapunov’s theory have been proposed in the literature to ensure finite-time convergence with an estimation of the convergence time for unperturbed dynamics (Sanchez and Moreno, 2012), systems with perturbations dependent only on time (Levant, 1993), and systems with perturbations depending on both state and time (Castillo et al., 2018).
Several research efforts have been made to address modeling, stability, and control issues of nonlinear second-order underactuated mechanical systems (UMSs) (Krafes et al., 2018). The super-twisting (STW) approach has been widely employed for controlling various UMSs as underactuated crane (Sun et al., 2015), Pendubot (Ramos-Paz et al., 2017), beam-and-ball (Din et al., 2018), and IWIP (Hfaiedh et al., 2020a). Adaptive and variable gain sliding mode approaches are both strategies used in control systems to improve system performance, particularly in dealing with uncertainties and disturbances. In Nafa et al. (2021), an adaptive controller using SMC and a wavelet network (WN) was proposed for a class of second-order UMSs with two degrees of freedom (DOFs). Theoretical and numerical analyses demonstrated that the proposed approach ensures the asymptotic stability and convergence of the closed-loop system. In Lu and Fang (2021), a gain-adapting coupling controller was designed by incorporating several unactuated state-related information into the control law. A real-time comparative study with a proportional–integral–derivative (PID) controller was performed to demonstrate the efficiency of the proposed method. In Hfaiedh and Abdelkrim (2022), another real-time implementation of an adaptive SMC was proposed, where the switching gain was dynamically estimated using adaptive laws. It is based on the approximation of the signum function using a hyperbolic tangent function. The main drawback of this control approach lies in the chattering, which still represents the main issue for the SMC in terms of real-time implementation. Existing works can also be found in the literature, based on adaptive super-twisting (ASTW) control (El-Sousy et al., 2022; Mobayen, 2019; Zhang et al., 2019). Various other control strategies are based on feedback robust integral of the sign of the error (RISE) control (Hfaiedh et al., 2021), third-order discontinuous integral algorithm (Gutierrez-Oribio et al., 2021), interconnection and damping assignment-passivity-based control (IDA-PBC) approaches (Gritli et al., 2017; Hfaiedh et al., 2020b) and passivity-based approaches (Zhai et al., 2022). Other intelligent algorithms used to improve robustness and capture unknown dynamics of underactuated systems with constraints were proposed in Yang et al. (2023; 2021). These algorithms are designed to learn from training and can adapt to changing system dynamics; however, they may require a large amount of data to train and specific hardware architectures to be implemented.
In this study, we focus on the control problem of nonlinear second-order UMSs, while dealing with external disturbances, parametric uncertainties, and perturbations depending on both states and time. The proposed control solution is an ASTW algorithm, based on collocated partial-feedback linearization. It is validated through real-time experiments on the IWIP and compared to the standard STW and other existing methods from the literature including RISE (Hfaiedh et al., 2021) and adaptive SMC (Hfaiedh and Abdelkrim, 2022).
We propose in this work to benefit from the advantages of the STW with the important feature of the adaptation law to guarantee the establishment of a real second-sliding mode. Furthermore, it is worth noting that the proposed controller is appropriate for the case in which the bounds of the uncertainties and perturbations are unknown and cannot be estimated for real applications. It does not require any information regarding the bounds of disturbances and their gradients, except for their existence. To deal with the nonlinear coupling between coordinates, we propose to transform the system into a strict-feedback form in order to decouple the system into (inner nonlinear and linear subsystems). Then, we propose two new desired trajectories, required for the design of the sliding surface. The choice behind the desired trajectory is to ensure the asymptotic stability of the internal dynamics represented by the nonlinear subsystem. The stability analysis of the whole resulting closed-loop system is provided based on Lyapunov’s theory. Moreover, in real-time experiments, control gains need to be calibrated; we proposed a control tuning algorithm to select the adjustable gains in real process.
To validate the proposed approach, numerical simulation and experimental comparative studies were conducted. Three main simulation scenarios are considered. The first one is the nominal case, where the system operates under ideal conditions without any disturbances or uncertainties. In this case, the effect of control parameters has been studied. The second scenario is robustness towards parametric uncertainties, which evaluates the controller’s performance when there are variations in system parameters, and the third one is state- and time-dependent disturbance rejection, assessing the ability of the proposed approach to handle disturbances that vary with both the state and time. In this case, a comparison is conducted with respect to the standard STW controller. In real-time validation, two experiments are performed—one under nominal conditions and the second under external disturbances. In the experiments, the proposed approach is compared with four controllers from the literature namely: SMC, adaptive sliding mode control (ASMC) (Hfaiedh and Abdelkrim, 2022), STW (Hfaiedh et al., 2020a), and RISE (Hfaiedh et al., 2021). The results were also validated by computing various performance indices.
ASTW control has already been used in the literature to control fully actuated systems in Shtessel et al. (2012) and Rajappa et al. (2016). However, it is not straightforwardly applicable to UMSs because of (1) underactuation, which represents a source of dynamic constraints; (2) the complexity and diversity of the nonlinear coupling between coordinates, which differs from one system to another; (3) their nonlinear dynamics; (4) their unstable internal dynamics; and (5) external disturbances and parametric uncertainties. For fully actuated systems, the system can be directly controlled and the control problem is often well-defined; however, for UMSs, the control problem involves designing a controller that can exploit the inherent dynamics of the system to achieve the desired output behavior. Nevertheless, it is possible to indirectly control the coordinates of the internal dynamics using appropriate techniques. Control design is intended to allow such systems to perform complex tasks with fewer actuators. If the aforementioned aspects are not considered in the control design, the system will fail to provide the intended response, which may result in instability or degraded performance of the control system. Moreover, ASTW control has already been used in the literature to control underactuated systems (El-Sousy et al., 2022; Mobayen, 2019). Compared to the proposed approach, Mobayen (2019) introduce an adaptive global SMC approach based on the STW scheme, aimed at stabilizing a specific class of underactuated systems. This method employs a different sliding surface expression and control law expression. Furthermore, El-Sousy et al. (2022) present an adaptive PID SMC technique combined with the STA. However, disturbances dependent on time and state have not been addressed in the above references. In addition, the systems under study differ from the IWIP. In Mobayen (2019), the control law is implemented for a cart-inverted pendulum system, while in El-Sousy et al. (2022), it is applied to a rotating pendulum. Both systems belong to class II of UMSs, as classified in Olfati-Saber (2001). In this work, we focus only on UMSs belonging to class I, which can be transformed into strict-feedback form. The proposed approach can potentially be extended to higher-order UMS, provided that the dynamic model can be expressed in this form. It is worth noting that Hfaiedh and Abdelkrim (2022) proposed a similar transformation to decouple the system. The difference compared to this work lies in both the proposed desired trajectories and control approach. Similarly, for the case of Hfaiedh et al. (2021), which proposed an RISE control with a strict-feedback transformation. However, disturbances depending on time and state had not been addressed in the aforementioned published studies. In this work, we have validated through numerical simulation the effectiveness of ASTW with respect to disturbances depending on time and state. In addition, in the real-time comparative study, we have conducted an additional experimental scenario involving punctual perturbation, different from the operating conditions proposed in Hfaiedh and Abdelkrim (2022) and Hfaiedh et al. (2021).
The rest of this paper is organized as follows. Section “Class I of UMSs” presents a brief background on class I UMSs. Section “Control design” presents a brief review of the STW and ASTW controllers. Section “An illustrative application example” describes the application of the proposed approach to the testbed of the IWIP. Section “Numerical simulation results” discusses the simulation results, and section “Implementation issues and real-time experimental results” presents the implementation issues and real-time experimental results. The conclusion and future directions are summarized in section “Conclusion and future work.”
Class I of UMSs
Using an invertible change of control, UMSs with two DOFs and one control input can be partially linearized by collocated partial-feedback linearization.
Collocated partial-feedback linearization
The Euler–Lagrange equations of motion of a UMS, with
where
where
In this study, we adopted the method of partial-feedback linearization proposed in Spong (1994), where the system (2) is partially linearized.
where
Then, substituting equation (4) in the second equation of equation (2), we obtain
Replacing
After the partial-feedback linearization, the system (3) is represented in the form of two subsystems. The control input
Strict-feedback form
The explicit change of coordinates was determined, which, from the partial-feedback linearization of Spong and Praly (1997), transforms the system (3) into a strict-feedback representation, where the control input appears only in the linear subsystem (Olfati-Saber, 2001). This change in coordinates is expressed as follows
where
where
To sum up step-by-step, the dynamics of equation (2) belongs to the class I of UMSs based on the classification of Olfati-Saber (2001). By changing the control, the dynamics (2) were partially linearized to obtain the normal form (3). Through a global change in coordinates described in equation (8), the system (3) is decoupled and transformed into a strict-feedback representation (9).
In the following section, an ASTW scheme is proposed for a second-order UMS, and the stability analysis is addressed using Lyapunov’s theory.
Control design
After the transformation of the equation of motion (1) into a strict-feedback form, a sliding mode controller was designed in the presence of bounded disturbances for the single-input cascade nonlinear system (9).
A brief background on STW SMC
Consider that the dynamics (9) has the general form
where
where
For stability analysis, let us consider the vector
where
The time derivative of Lyapunov’s function (15) along the solutions of the system (13) leads to the following
where
It is worth noting that
Proposed ASTW controller
The system (9) may be reformulated in the general form
where
where
Suppose that
The function
Assumptions about the unknown and unmodeled parts in the system’s dynamics have already been reported in the literature (Shtessel et al., 2012). Bounded uncertainties can arise from a variety of sources, such as modeling errors, measurement noise, and external disturbances. If the system is subject to bounded perturbations with unknown boundaries, as stated in those assumptions, its inputs or parameters can vary within an unknown range of values. In this case, it is important to develop adaptive-based control strategies using online estimation techniques to handle the uncertainty and ensure stable and satisfactory performance. In addition, the perturbations can depend on both state and time. They are often the most challenging to handle in control systems because they can lead to highly complex and unpredictable system behavior. The effect of the perturbation on the system can also vary depending on the current state of the system as well as how the perturbation changes over time.
In this study, we considered the extension of this controller to the challenging case of class I UMSs described by the form (9), while considering unknown bounds of uncertainties and perturbations. In the next section, the design of the proposed controller is illustrated on a second-order UMS, and the stability analysis is addressed using Lyapunov’s theory.
Considering that the bounds on the uncertainties and perturbations are unknown, and the functions
and the second gain
where
As mentioned in Rajappa et al. (2016), a wrong choice of the parameter
An illustrative application example
UMSs are typically studied on a case-by-case basis. The proposed ASTW control scheme for the general case of a class I UMS is presented in this section. The entire block diagram of the designed approach is shown in Figure 1.

Schematic diagram of the proposed approach.
The inertia wheel inverted pendulum
In this study, an example of a system from class I UMSs, namely the inertia wheel inverted pendulum (IWIP), was considered. This plant is an interesting typical benchmark, because, with a reduced-order model, it inherits the same features of much more complex systems (e.g. human balance support devices (Wojtara et al., 2012), gyrostabilizers, and stabilizers for self-balancing electric motorcycles (Ho and Pham, 2018)). It is characterized by two DOFs and one control input. This system has attracted considerable interest from researchers. It was considered a benchmark for various recent studies, as in Gritli et al. (2017). The system includes an unactuated joint between the frame and pendulum body and an actuated joint between the body and inertia wheel, as illustrated in Figure 2.

Schematic view of the system: the first joint
The mechanical design of the system differs from those presented in Belascuen and Aguilar (2018) and Tavakol Aghaei and Komurcu (2021). However, both operating principle and number of DOFs remain the same. The position of the actuator and the dimension of pendulum were selected to minimize the overall resistance moment (moment of the pendulum
With the actuator positioned close to the center of rotation, the lever arm, which is the perpendicular distance between the force (applied by the actuator) and the pivot point, is reduced. It makes the control design more challenging. A shorter lever arm results in reduced torque generation for a given force applied by the actuator. This limitation may compromise the control system to compensate for disturbances or maintain stability. Moreover, if the actuator were positioned farther from the center of rotation, stabilizing the pendulum would require a higher torque. Yet such adjustments are constrained by the maximum torque capacity of the actuator.
The use of a simplified low-order system with the same features and basic functionality to address the common problems in high-order complex systems can be very useful. Low-order systems require fewer computational resources for simulations and a low cost for real-time experiments. They are often easier to use and understand the major control problems and challenges of high-order systems while enabling experimental validation of the control design at an affordable cost in a laboratory (e.g. case of the IWIP), instead of an excessively high cost in real conditions (e.g. case of underwater vehicles).
The aim of the control problem was to design an ASTW algorithm to solve the stabilization problem of the system in the presence of unknown model uncertainties and external disturbances.
The dynamic model of the system can be computed following the Lagrange method. To this end, the Lagrangian of this system can be expressed by
The application of the Lagrange equation leads to the following dynamic model
where
Summary of the dynamical parameters of the IWIP.
The parameters
Control strategy
Using the method described in equation (9), the global change of coordinates is defined by:
The resulting system is presented as a cascade connection between the linear and nonlinear subsystems Olfati-Saber (2001), where
The time derivative of Lyapunov’s function leads to the following
It can be seen that equation (32) is negative definite by the choice of the desired trajectory (30) that globally asymptotically stabilizes
Let us now reconsider the control laws (10) and (11) for the systems (27–29) with adaptive feedback gains as follows
where the control feedback gains
where
By applying the time derivative of the sliding surface (35), we obtain the expression of the sliding variable dynamics
If we derive the expression of
Computing the time derivative of
Replacing equations (37) and (38) in equation (36) leads to the following system
By rearranging the terms, we obtain the following form
Based on Assumptions 1–3, the control system (40) with equation (33) can be rewritten as follows
where
and accordingly, the system (41) can be rewritten as follows
where
Now, let us consider the following Lyapunov function candidate Shtessel et al. (2012) for the system (45)
where
where the first term is bounded as follows
where
If we assume that
Following the reasoning in Shtessel et al. (2012), it can be shown that the time derivative of
where
The first time derivative of
Numerical simulation results
In this study, the control objective was to stabilize the IWIP around its unstable equilibrium point. Both the STW and ASTW approaches were implemented using MATLAB/SIMULINK software (MathWorks). The following three main simulation scenarios are considered:
In addition, the following initial conditions for the ASTW approach were considered:
Scenario 1: Nominal case
In the first scenario, we considered two case studies. The first case study showed the performance of the proposed ASTW controller for different values of the key parameters

Obtained simulation results for scenario 1 (case 1:
From the results, the best response was obtained for the case of (
In the second case study, we have fixed the gains
The simulation results are presented in Figure 4 which highlights the importance of selecting appropriate parameter values to avoid system instability, illustrated by cases where incorrect parameter choices may lead to instability. The best results were observed for the cases of (

Obtained simulation results for scenario 1 (case 2:
Scenario 2: Robustness towards parametric uncertainties
The second scenario aimed to study the robustness of the proposed control scheme. Indeed, it allows us to check whether the applied control can adapt to uncertainties in the system parameters, which may be due to modeling errors, sensor inaccuracies, frictional forces, or other external factors. We introduced an uncertainty

Obtained simulation results for scenario 2: (a) pendulum angular position; (b) pendulum angular velocity; (c) velocity of the inertia wheel; (d) the control input (torque); (e) the sliding variable; (f) the sliding diagram; (g) the estimated gain
The proposed approach is able to compensate for these introduced additive parametric uncertainties in the dynamic model even for large percentages of
Scenario 3: External disturbances rejection
The main motivation behind the third scenario is to demonstrate the effectiveness of the proposed control scheme when the controlled system is subjected to state- and time-dependent disturbances. The applied disturbing signal for this case is expressed by

Obtained simulation results for scenario 3—external disturbances’ rejection: (a) pendulum angular position; (b) pendulum angular velocity; (c) velocity of the inertia wheel; (d) the control input
However, based on the obtained results, we can notice that the proposed ASTW controller manages to compensate the applied external disturbance and brings back the states around the desired equilibrium point. The introduced external disturbance was compensated by the control action. A noticeable difference can be observed in the zoomed plots of the behavior of the STW and proposed ASTW controllers.
To sum up, the proposed ASTW controller provides better results than the standard STW controller and ensures a better compensation of time- and state-dependent disturbances.
Implementation issues and real-time experimental results
In numerical simulations, the environment is controlled, and uncertainties/ external disturbances can be modeled precisely. In real-time experiments, there are unpredictable and unmodeled disturbances such as friction, sensor noise, and environmental variations that may affect the system and lead to unexpected behavior. Subsequently, real-time validation is performed in order to observe the real behavior and discuss reliable end precise results regarding the performance of the proposed control approach. The experimental setup and some implementation issues are discussed in this section. Two experimental scenarios were conducted to validate the proposed control scheme. In the first scenario, no external disturbance is considered; however, the objective of the second scenario is to test the robustness of the proposed control scheme towards external disturbances. These scenarios tested the proposed controller under different dynamic operating conditions and compared its performance with that of other existing controllers from the literature. The results of each test are presented and discussed in this section.
Description of the experimental setup
Real-time experiments were performed using an experimental testbed of the IWIP, as shown in Figure 7(a), and designed at LIRMM Laboratory (Andary et al., 2009; Haddad et al., 2018; Hfaiedh et al., 2018).

(a) View of the experimental setup of the IWIP and its main components and (b) illustration of the punctual disturbances generator.
The system is equipped with the following:
Conducted experiments
Two experiments were conducted to fairly compare the performance of the proposed ASTW scheme with existing controllers from the literature, including the (1) standard STW, (2) first-order SMC (Hfaiedh and Abdelkrim, 2022), (3) ASMC (Hfaiedh and Abdelkrim, 2022), and (4) RISE (Hfaiedh et al., 2021) controllers. In the first scenario, namely nominal case, no external disturbances were considered. However, in the second case, we considered punctual external disturbances applied to the controlled system.
These disturbances were generated by a pendular system suspended from a fixed support, as illustrated in Figure 7(b). The same initial releasing position of the disturbing mass of the pendular system (e.g.
Performance evaluation criteria
To quantify the relevance of the control algorithms, we proposed computing the following criteria for all the implemented controllers:
The Integral Square Error (ISE)
The Integral Absolute Error (IAE)
where
The input torque–based criterion
where
ISE is a performance metric used in control theory to evaluate the performance of a control system. It measures the square of the difference between the desired value and the actual output of the system and is integrated over a period of time. IAE is also a performance metric computed to measure the cumulative absolute error
The
Parameters’ tuning
To select the adjustable gains in real tuning process, we started with small values to avoid any high and abrupt changes in the control input that may lead to a dangerous behavior or damage in the system’s actuators. Subsequently, to obtain better performances, the parameters were progressively increased and the behavior of the closed-loop system was observed until the expected stabilization is reached. To sum up, the following eight-step algorithm is proposed.
Parameters’ tuning algorithm
Experiment 1: Nominal case
In the first experiment, no external disturbance was considered. The following design parameters were used for the STW control scheme:

Obtained experimental results for scenario 1—nominal case: (a) pendulum angular position; (b) control input; (c) pendulum angular velocity; (d) phase diagram; (e) velocity of the inertia wheel; and (f) voltage control signal.
Experiment 2: External disturbances rejection
In this scenario, external disturbances were applied by the above-mentioned disturbances generator. An external disturbance was introduced at approximately

Obtained experimental results for scenario 2—rejection of punctual external disturbances: (a) pendulum angular position; (b) velocity of the inertia wheel; (c) pendulum angular velocity; and (d) control Input.
It is notable that there are differences in the system’s reactions for different controllers. It can be attributed to variations in the responses of controllers. In addition, the states of the IWIP at the time of disturbance influence how each controller reacts and compensates for this perturbation.
Both the proposed ASTW and the STW controllers reacted better to the applied disturbances than the RISE, ASMC, and SMC approaches and maintain the system around the desired equilibrium point as we can see in the evolution of the states and control signal.
The exerted disturbance induces a high deviation from the desired equilibrium point of the pendulum angle position and velocity in the case of the first-order SMC and ASMC, which results in poor behavior. However, the disturbance is better compensated by the proposed ASTW controller. More oscillations were observed in the standard STW control scheme. An improvement in the robustness of the proposed ASTW controller was observed when the controller compensated for the external punctual disturbance. These results were also confirmed by the proposed performance indices defined in equations (55) and (56) and summarized in Table 2.
Quantification of the performance through different evaluation criteria.
The improvement in the IAE and ISE criteria was recorded in comparison to the standard sliding mode controller. The performance indices of SMC and ASMC are nearly identical. Similar enhancements were obtained for the RISE and STW approaches. Superior results were noted for the proposed ASTW controller. It is evident that both indices were reduced by up to
By comparing the values of the input torque–based criterion across all controllers, we observe that RISE exhibits the lowest energy consumption, followed by ASTW, ASMC, SMC, and finally STW. The obtained metrics validate the benefits of adaptive control laws, showing an improvement of
Conclusion and future work
In this paper, an implementation of a revisited ASTW algorithm is proposed for the case of the IWIP. The methodology involves defining the sliding surface through two necessary desired trajectories derived from transforming the system into a strict-feedback form. The stability of the resulting closed-loop system is rigorously analyzed using Lyapunov’s theory. Numerical simulations under various operating conditions, including nominal scenarios and robustness tests against uncertainties and state-/time-dependent disturbances, convincingly demonstrate the superior performance of the proposed adaptive control approach compared to the conventional STW algorithm. Specifically, the ASTW demonstrates superior performance in terms of disturbance rejection. Furthermore, real-time experimental results and performance-evaluation criteria validate these findings, highlighting its effectiveness in practical applications compared to several existing controllers. The main drawback identified is the energy consumption, which requires improvement, especially for systems with input constraints. Future works may include the extension of the proposed control scheme with a prediction-based optimal gain selection of the STW controller, as well as its generalization to other classes of UMSs.
Footnotes
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.
