Preprint
Article

This version is not peer-reviewed.

Modified Dual Hierarchical Terminal Sliding Mode Control Design for Two-Wheeled Self-Balancing Robot

A peer-reviewed article of this preprint also exists.

Submitted:

09 June 2025

Posted:

11 June 2025

You are already at the latest version

Abstract
A modified dual hierarchical terminal sliding mode control (MDHTSMC) strategy is developed in this study for the control of a two-wheeled self-balancing robot (TWSBR). The control framework incorporates individually designed sliding surfaces within a structured dual-layer hierarchy, enabling explicit prediction of convergence time. To overcome the system’s underactuation characteristics, a hierarchical structure is embedded into the dual terminal sliding mode control law. Additionally, the proposed approach mitigates the chattering effect and enhances the system’s selfbalancing capabilities. Numerical simulations are conducted to verify the controller’s effectiveness and to confirm the theoretical results.
Keywords: 
;  ;  

1. Introduction

The rapid development of computing, electronics, and manufacturing technologies has substantially advanced the field of mobile robotics, enabling their integration into numerous practical scenarios. These robotic systems are capable of replacing human operators in dangerous or inaccessible environments, including post-disaster rescue missions, nuclear facility maintenance, and military reconnaissance, thereby enhancing operational safety [1]. Furthermore, mobile robots play a vital role in space exploration, underwater investigation, assistive care, rehabilitation, smart transportation, and entertainment, making them increasingly indispensable in modern society [2].
The concept of the two-wheeled self-balancing robot (TWSBR) was first introduced in the late 1980s by Professor Kazuo Yamato of the Automation Department at Tokyo Telecom University, Japan, as shown in Figure 1(a). This robotic configuration presents distinct benefits when compared to conventional multi-wheeled mobile robots, including compactness and dynamic balancing capabilities, positioning it as a promising alternative in a wide range of application scenarios [3].
The TWSBR’s two wheels are arranged coaxially, enabling zero-radius turning capabilities [4]. The robot continuously maintains dynamic balance, enabling it to withstand interference and impacts that could topple statically stable robots [5]. Furthermore, its vertical orientation minimizes its spatial footprint, making it ideal for crowded and narrow indoor environments [6]. Additionally, this configuration enables the robot to function within a larger operational area, enhancing its interaction with humans [7]. These advantages have accelerated the development of TWSBRs in transportation, entertainment, and service sectors in recent years. Prominent examples include the "Segway" (Figure 1(b)) [8,9] and the "uBot" (Figure 1(c)) [10,11], among others.
Sliding Mode Control (SMC), introduced by V.I. Utkin in the 1970s, was designed to address uncertainties and disturbances and is now extensively utilized in industrial automation. The fundamental form of SMC, known as first-order Sliding Mode Control, manages simple nonlinear systems by introducing a single sliding surface, with the primary objective of guiding the system state onto this surface and maintaining sliding motion. Gao et al. study the application of SMC to a two-wheeled self-balancing robot (TWSBR), comparing it with a full state feedback controller (LQR) and demonstrating that SMC provides superior control performance for TWSBR [12]. Jmel et al. design a robust SMC for TWSBR tracking under tilt and disturbance conditions, utilizing continuous approximations near the switching surface to minimize chattering [13]. Ghahremani et al. compare the performance of cascade control with SMC for a TWSBR system [14]. Arani et al. demonstrate that SMC offers superior transient performance and noise immunity compared to LQR [15]. Sinha et al. detail the development of a robust SMC for TWSBR, where a continuous function approximates the discontinuous function, thereby achieving smoother control [16]. Yih et al. propose an SMC scheme for low-speed TWSBR speed control, demonstrating superior performance over linear optimal control in the presence of external disturbances and parameter variations [17]. Wang et al. examine the self-balancing control of TWSBR using PD and SMC, highlighting the advantages of SMC in dynamic performance, steady-state accuracy, and oscillation suppression [18]. Yang et al. present an SMC strategy that addresses matched and mismatched uncertainties in TWSBR systems by employing predefined nonlinear uncertainty bounds and reduced-order sliding mode dynamics to minimize conservatism [19]. Fukushima et al. propose an SMC method to transform a mobile robot with a wheeled arm into an inverted pendulum mode, accounting for the initial robot velocity during the transformation within a confined space. The SMC method for TWSBR is enhanced by deriving an invariant set that guarantees convergence of the system state to the origin [20]. Finally, Durdevic et al. propose a switching controller to stabilize an open-loop unstable TWSBR system with significant backlash characteristics, providing smoother performance [21].
Terminal Sliding Mode Control (TSMC), a variation of SMC, incorporates a terminal sliding surface to achieve a faster and smoother sliding motion in the control system’s terminal phase. TSMC reduces terminal-phase oscillations and instability by incorporating additional control terms into the sliding surface design, ensuring a smoother control response. Irfan et al. compare various linear and nonlinear feedback control techniques for a two-wheeled self-balancing robot (TWSBR), including LQR, SMC with feedback linearization, ISMC, and TSMC [22]. Zheng et al. propose a hierarchical fast TSMC method for TWSBR on uneven terrain, which effectively maintains balance, tracks desired speeds, suppresses disturbances, and minimizes vibrations [23].
Hierarchical Sliding Mode Control (HSMC) decomposes the control task of a complex system into multiple subtasks, with sliding mode controllers implemented at different hierarchical levels to ensure stability. Each subtask is controlled by a dedicated sliding mode controller. Hou et al. propose a method that combines HSMC with a nonlinear disturbance observer for TWSBR trajectory tracking. The system is divided into two subsystems to address coupling issues, employing an improved convergence law to control the system and suppress chattering [24]. Ping et al. propose HSMC for TWSBR, demonstrating rapid and accurate speed tracking and self-balancing performance, with robustness against partial parameter variations and external disturbances [25]. Chen et al. introduce HSMC incorporating a disturbance estimation (PE) technique for TWSBR, effectively addressing coupling effects and disturbances. The PE technique estimates system uncertainties online, thereby enhancing control performance and robustness [26].
The main contributions of this paper are as follows:
  • A hierarchical sliding mode control (HSMC) scheme is combined with terminal sliding mode control (TSMC) to address the underactuated control problem of the two-wheeled self-balancing robot (TWSBR), resulting in a dual-terminal sliding mode control (DTSMC) law. Furthermore, a modified dual hierarchical terminal sliding mode control (MDHTSMC) scheme is designed based on the duality concept, with stability rigorously verified through Lyapunov theory.
  • A modified dual hierarchical terminal sliding mode control (MDHTSMC) scheme is proposed for the TWSBR nonlinear system, accounting for disturbances and uncertainties. Using Lyapunov theory, finite-time convergence on the newly defined MDHTSMC surface is proven, and the arrival and sliding times are explicitly calculated.
  • The Jellyfish Search Optimization (JSO) algorithm is employed to minimize the integral of the time-weighted absolute error (ITAE) by adjusting the x and θ parameters of the TWSBR, achieving optimal control parameters. These parameters are subsequently fine-tuned for enhanced optimization.
The remainder of the paper is structured as follows: Section 2 presents the mathematical model of the TWSBR. Section 3 introduces the DHTSMC, discusses its finite-time convergence, and provides the DHTSMC scheme with additional design parameters to derive the MHDTSMC. This section also develops the MDHTSMC design to stabilize the underactuated TWSBR system. Section 4 presents the simulation results, and finally, the conclusions are drawn in Section 5.

2. Preliminary

2.1. Dynamic Models

This section outlines the derivation of the dynamic equations governing the two-wheeled self-balancing robot (TWSBR). The dynamic model is developed based on Newtonian mechanics and vector methods, taking into account the forces and torques acting on the left and right wheels, along with the chassis, as equilibrium conditions. Figure 2 illustrates the forces and torques applied to the TWSBR, while Table 1 defines the related parameters and variables. A comprehensive derivation can be found in the literature [27,28]. The derivation here has been reorganized to enhance clarity and facilitate understanding.
Assuming no slip occurs between the wheels and the ground, the equations describing the balance of motion for the left and right wheels are expressed as follows:
J w θ ¨ L = T L H L R , M w x ¨ L = f d L F L + H L ,
J w θ ¨ R = T R H R R , M w x ¨ R = f d R F R + H R ,
Where J w denotes the wheel’s moment of inertia with respect to the y-axis.
The force equilibrium equations, derived from the components of the balancing forces along the x-axis and the moments about the centre of the wheel axle, are expressed as follows:
m l cos θ · θ ¨ + m l θ ˙ 2 sin θ m x ¨ = F p , m l 2 θ ¨ + m l cos θ · x ¨ m g l sin θ = M p ,
Where F p represents the interaction force between the pendulum and the chassis along the x-axis, and M p denotes the interaction moment between the pendulum and the chassis around the y-axis.
The equations for force equilibrium, derived from the forces exerted on the chassis along the x-axis and the moments about the z-axis, are formulated as follows:
M x ¨ = F L + F R + F p , J c θ ¨ = M p
Where J c denotes the moment of inertia of the chassis around the y-axis.
The equation derived from the equilibrium of moments acting on the chassis and pendulum about the z-axis is expressed as follows:
J v φ ¨ = D 2 F L F R ,
Where J v represents the moment of inertia of both the chassis and pendulum around the z-axis.
Utilizing the aforementioned five equilibrium equations, and acknowledging that v = x ˙ , the dynamic equations for the TWSBR are formulated as follows:
φ ¨ = D 2 R J φ T L T R + D 2 J φ f d L f d R ,
v ˙ = 1 Ω J θ m l θ ˙ 2 sin θ m 2 l 2 g sin θ cos θ + J θ Ω R T L + T R + J θ Ω f d L + f d R ,
θ ¨ = 1 Ω M x m g l sin θ m 2 l 2 θ ˙ 2 sin θ cos θ m l cos θ Ω R T L + T R m l cos θ Ω f d L + f d R ,
where
J φ = J v + D 2 2 M w + J w R 2 , M x = M + m + 2 M w + J w R 2 , J θ = J p + J c = m l 2 + J c , Ω = M x J θ m 2 l 2 cos 2 θ
Since
Ω = M x J θ m 2 l 2 cos 2 θ = M + m + 2 M w + J w R 2 × m l 2 + J c m 2 l 2 cos 2 θ ,
it can be concluded that Ω is positive for all θ R .
Furthermore, by defining T w = T L T R and T v = T L + T R , the original system can be decomposed into two independent subsystems: rotational and longitudinal dynamics. Through the implementation of a control strategy to form a closed-loop system, sliding mode controllers (SMCs) effectively attenuate disturbances affecting the left and right wheels, denoted as f d L and f d R , respectively. Consequently, this approach results in a reduced-order dynamic model that facilitates the design of the TWSBR control system, as presented below:
φ ¨ = D 2 R J φ T w ,
v ˙ = 1 Ω J θ m l θ ˙ 2 sin θ m 2 l 2 g sin θ cos θ + J θ Ω R T v
θ ¨ = 1 Ω M x m g l sin θ m 2 l 2 θ ˙ 2 sin θ cos θ m l cos θ Ω R T v

2.2. Actuated and Underactuated Subsystems

The dynamics of the two-wheeled self-balancing robot (TWSBR) represent an underactuated system, characterized by two torque inputs controlling three degrees of freedom. Owing to the robot’s distinctive physical properties, its overall dynamics can be decoupled into two subsystems. The first subsystem, denoted as the φ subsystem, involves the initial dynamic equation with T w = T L T R as its fully actuated control input. The second subsystem, referred to as the { v , θ } subsystem, comprises the remaining two dynamic equations, where T v = T L + T R functions as the underactuated control input.
By exploiting the robustness to parameter variations and disturbance rejection offered by variable structure control, sliding mode control (SMC) is employed to design the control inputs T v and T w . It is assumed that the reference trajectories x d , φ d ( t ) , and θ d ( t ) are bounded and twice continuously differentiable. Generally, these conditions are readily satisfied for x d and φ d ( t ) . Regarding θ d ( t ) , as previously discussed, it is influenced by the system dynamics and rolling friction. Practically, when high-order body dynamics are neglected, the conditions of boundedness and continuous differentiability for θ d ( t ) hold, enabling the achievement of the control objectives. Accordingly, the control strategy is devised to ensure that the rotational angle φ precisely tracks its desired trajectory φ d while maintaining the robot body in a stable upright posture.

2.2.1. φ -subsystem

The φ -subsystem corresponds to Eq. (9) of the dynamics, which is reformulated as follows:
φ ¨ = D 2 R J φ T w
It is evident that this subsystem is fully actuated and can be decoupled from the remaining components of the overall system.

2.2.2. { v , θ } -subsystem

The { v , θ } -subsystem, represented by Eq. (10) and Eq. (11), can be reformulated as follows:
v ˙ = 1 Ω J θ m l θ ˙ 2 sin θ m 2 l 2 g sin θ cos θ + J θ Ω R T v θ ¨ = 1 Ω M x m g l sin θ m 2 l 2 θ ˙ 2 sin θ cos θ m l cos θ Ω R T v
This subsystem is underactuated, requiring at least two variables, v and θ , to be controlled using only a single control input signal, T v . Compared to the fully actuated subsystem, controlling this underactuated subsystem is considerably more challenging and critical. Consequently, this study focuses solely on the { v , θ } -subsystem.

3. Modified Dual Hierarchical Terminal SMC

3.1. Dynamic Model

To begin, examine two second-order nonlinear systems, each with two inputs and two outputs, structured as follows:
x ˙ 1 = x 2 x ˙ 2 = f 1 ( x , t ) + g 1 ( x , t ) + b 1 ( x , t ) u 1 x ˙ 3 = x 4 x ˙ 4 = f 2 ( x , t ) + g 2 ( x , t ) + b 2 ( x , t ) u 2
where x = x 1 , x 2 , x 3 , x 4 T represents the system state vector; f ( x , t ) and b ( x , t ) 0 are smooth nonlinear functions of x and t; u i ( i = 1 , 2 ) denotes the system input; g i ( x , t ) ( i = 1 , 2 ) is a bounded nonlinear function satisfying g i ( x , t ) l i , where l i > 0 ( i = 1 , 2 ) , representing uncertainties and disturbances.

3.2. Hierarchical Terminal Sliding Mode Control (HTSMC)

For the two second-order systems described in Eq. (14), two terminal sliding surfaces for TSMC are defined as follows:
s 1 = x 2 + λ 1 | x 1 | α 1 , s 2 = x 4 + λ 2 | x 3 | α 2 ,
where λ 1 , λ 2 , α 1 , and α 2 are positive design parameters. The equivalent control rate is applied to eliminate the terminal sliding dynamics on the sliding surface, ensuring s ˙ 1 = 0 and s ˙ 2 = 0 .
For the first subsystem:
u e q 1 = f 1 ( x , t ) + g 1 ( x , t ) + λ 1 α 1 x 1 α 1 1 x 2 b 1 ( x , t )
For the second subsystem:
u e q 2 = f 2 ( x , t ) + g 2 ( x , t ) + λ 2 α 2 x 3 α 2 1 x 4 b 2 ( x , t )
where, u s w denotes the switching control component of the terminal sliding mode controller. For simplicity, the symbol t is generally omitted in this paper and will only appear when time dependence is explicitly involved, such as in the desired sliding mode surface s ( t ) , which is often abbreviated as s . The second-level terminal sliding surface is then defined as:
S = c 1 s 1 + c 2 s 2
where c 1 and c 2 are terminal sliding-mode parameters that may either be constant or vary according to different conditions. Next, the switching control law is derived following the Lyapunov stability theorem. The Lyapunov energy function is defined as:
V ( t ) = 1 2 S 2
Differentiating V ( t ) with respect to time t yields:
V ˙ = S S ˙ = S c 1 s ˙ 1 + c 2 s ˙ 2 = S c 1 λ 1 α 1 x 1 α 1 1 x ˙ 1 + x ˙ 2 + c 2 λ 2 α 2 x 3 α 2 1 x ˙ 3 + x ˙ 4 = S c 1 λ 1 α 1 x 1 α 1 1 x 2 + f 1 + b 1 ( u e q 1 + u e q 2 + u s w ) + g 1 + c 2 λ 2 α 2 x 3 α 2 1 x 4 + f 2 + b 2 ( u e q 1 + u e q 2 + u s w ) + g 2 = S c 1 b 1 ( u e q 2 + u s w ) + c 2 b 2 ( u e q 1 + u s w ) + c 1 g 1 + c 2 g 2 = S ( c 2 b 2 u e q 1 + c 1 b 1 u e q 2 ) + u s w ( c 2 b 2 + c 1 b 1 ) + c 1 g 1 + c 2 g 2
Let u s w c 2 b 2 + c 1 b 1 + c 2 b 2 u e q 1 + c 1 b 1 u e q 2 = η sgn ( S ) k S , where η and k are positive constants.
Then:
u s w = ( c 1 b 1 + c 2 b 2 ) 1 c 2 b 2 u e q 1 + c 1 b 1 u e q 2 + η sgn ( S ) + k S
The switching control law u s w and the overall control law u for the control system are defined as follows:
u s w = c 2 b 2 c 1 b 1 + c 2 b 2 u e q 1 c 1 b 1 c 1 b 1 + c 2 b 2 u e q 2 η * sgn ( S ) k * S
u = u e q 1 + u e q 2 + u s w = u e q 1 + u e q 2 c 2 b 2 c 1 b 1 + c 2 b 2 u e q 1 c 1 b 1 c 1 b 1 + c 2 b 2 u e q 2 η * sgn ( S ) k * S = c 1 b 1 c 1 b 1 + c 2 b 2 u e q 1 + c 2 b 2 c 1 b 1 + c 2 b 2 u e q 2 η * sgn ( S ) k * S
where η * = c 1 b 1 + c 2 b 2 1 η and k * = c 1 b 1 + c 2 b 2 1 k .
Remark 1.
For the HTSMC system of the TWSBR, the convergence proof of the first and second sliding surfaces is fundamentally the same as the convergence process for MDHTSMC (see the proofs of Theorems 3 and 4 below); hence, a detailed analysis is not provided here, for more comprehensive information, please refer to the literature [31].

3.3. Dual Hierarchical Terminal SMC (DHTSMC)

For the system described in Eq. (14), the desired DHTSMC surface is constructed as follows:
s = s 1 , s 2 T
where
s 1 = x 2 + x 1 α sgn x 1 + x 1 3 x 3 s 2 = x 4 + x 3 α sgn x 3 + x 3 3 + x 1
where sgn ( x ) denotes the sign function, and α is a positive scalar.
Two lemmas are introduced to facilitate the derivation of finite-time convergence for the DHTSM controller.
Lemma 1.
According to the work in [29], suppose the continuous function V is positive definite and fulfills the following condition:
V ˙ d V β for all t t 0 , where V t 0 0 ,
where d is a positive constant and 0 < β < 1 . Under these circumstances, the function V will reach zero starting from any initial time t 0 , and the finite convergence time t r can be computed as:
t r t 0 + V 1 β t 0 d ( 1 β )
Lemma 2.
Consider a second-order dynamic system represented by:
x ˙ 1 = x 1 α sgn x 1 x 1 3 + x 2 x ˙ 2 = x 2 α sgn x 3 x 2 3 x 1 ,
The function V = x 1 2 + x 2 2 2 is selected to determine the finite convergence time as discussed in [29].
t s t 0 + 2 V t 0 1 α 2 1 α
where the meanings of t s , t 0 , and α remain consistent with those in Lemma 1. By incorporating the scalar d into Eq. (27), the system dynamics are modified as follows:
x ˙ 1 = d x 1 α sgn x 1 x 1 3 + x 2 x ˙ 2 = d x 2 α sgn x 2 x 2 3 x 1 ,
with the convergence time now being:
t s t 0 + 2 V t 0 1 α 2 d ( 1 α ) .
To stabilize the second-order system depicted in Eq. (14), the DHTSM control inputs are designed according to the subsequent theorem:
Theorem 1.
DHTSM Controller Design.
The states of system (14) will reach the origin along the surface s = 0 within finite time if the control inputs are defined as follows:
u 1 = b 1 1 ( x ) f 1 ( x ) + α | x 1 | α 1 x 2 + 3 x 1 2 x 2 x 4 + k 1 sgn ( s 1 ) u 2 = b 2 1 ( x ) f 2 ( x ) + α | x 3 | α 1 x 4 + 3 x 3 2 x 4 + x 2 + k 2 sgn ( s 2 ) ,
where k i = l i + η i for i = 1 , 2 and η i > 0 is a positive scalar constant.
Proof. 
For the system expressed in (14) and the sliding surface defined in (24), the control inputs are designed using the equivalent control approach combined with the sliding mode reaching condition, as proposed in [30]. The resulting control law is formulated as follows:
u 1 = u e q 1 + u s w 1 u 2 = u e q 2 + u s w 2
where
u e q 1 = b 1 1 ( x ) f 1 ( x ) + α | x 1 | α 1 x 2 + 3 x 1 2 x 2 x 4 u e q 2 = b 2 1 ( x ) f 2 ( x ) + α | x 3 | α 1 x 4 + 3 x 3 2 x 4 + x 2 .
where, u e q 1 and u e q 2 are the equivalent control inputs ensuring s ˙ 1 = 0 and s ˙ 2 = 0 when u i = u e q i for i = 1 , 2 . The switching control inputs u s w i = b i 1 k i sgn ( s i ) for i = 1 , 2 , can be used to satisfy the finite-time reaching conditions of the sliding mode surface.
Consider the Lyapunov function V = 1 2 s T s , which results in:
V ˙ = s T s ˙ = s 1 s ˙ 1 + s 2 s ˙ 2 = s 1 f 1 ( x ) + g 1 ( x ) + b 1 ( x ) u 1 + α | x 1 | α 1 x 2 + 3 x 1 2 x 2 x 4 + s 2 f 2 ( x ) + g 2 ( x ) + b 2 ( x ) u 2 + α | x 3 | α 1 x 4 + 3 x 3 2 x 4 + x 2 .
Substituting the control inputs from Eq. (31) into Eq. (34), we obtain:
V ˙ = s 1 k 1 sgn ( s 1 ) + g 1 ( x ) + s 2 k 2 sgn ( s 2 ) + g 2 ( x ) = η 1 s 1 sgn ( s 1 ) η 2 s 2 sgn ( s 2 ) + g 1 ( x ) s 1 l 1 s 1 sgn ( s 1 ) + g 2 ( x ) s 2 l 2 s 2 sgn ( s 2 ) = η 1 s 1 η 2 s 2 + g 1 ( x ) s 1 l 1 s 1 + g 2 ( x ) s 2 l 2 s 2 min ( η 1 , η 2 ) s 1 + s 2 min ( η 1 , η 2 ) s T s 1 2 2 min ( η 1 , η 2 ) V 1 2 0 .
Consequently, the system defined by Eq. (14) converges to the designated sliding surface given in Eq. (25), with the convergence time determined based on finite-time stability theory. Once the sliding condition s = 0 is satisfied, the system dynamics reduce to the following form:
x ˙ 1 = x 1 α sgn ( x 1 ) x 1 3 + x 3 x ˙ 3 = x 3 α sgn ( x 3 ) x 3 3 x 1 .
The overall convergence time can be partitioned into two distinct phases: the reaching phase and the sliding phase, depending on the relationship between the system states and the DHTSM surface. Based on Lemma 2, the total finite-time convergence duration t f can be estimated as follows:
t f = t 0 + 2 V 1 2 ( t 0 ) min ( η 1 , η 2 ) t r + 2 V ^ ( t r ) 1 α 2 1 α t s < ,
where V ^ = x 1 2 + x 3 2 2 is the Lyapunov function selected for the reduced system in Eq. (36). Here, t r and t s represent the reaching time and the sliding time, respectively.
This concludes the proof.
Building upon Theorem 1, the parameters of the sliding surface are designed to improve the system’s performance during the reaching phase. Moreover, the modified approach provides enhanced flexibility in the controller design. Consider the system governed by Eq. (14), with the sliding surface defined as s = s 1 , s 2 T according to the following expressions:
s 1 = x 2 + γ x 1 α sgn ( x 1 ) + x 1 3 λ x 3 s 2 = x 4 + γ x 3 α sgn ( x 3 ) + x 3 3 + λ x 1 ,
where γ is a positive constant, and λ R is a design parameter. Accordingly, the modified DHTSM control inputs are defined in the following theorem.
Theorem 2.
Modified DHTSM Controller (MDHTSMC) Design.
The second-order system described by Eq. (14) will reach the specified sliding surface s = 0 , as defined in Eq. (31), within a finite time. Once on the sliding surface, the system states will converge to the origin along s = 0 in finite time, provided that the control inputs are designed as follows:
u 1 = b 1 1 ( x ) f 1 ( x ) + γ α x 1 α 1 x 2 + 3 γ x 1 2 x 2 λ x 4 + k 1 sgn ( s 1 ) u 2 = b 2 1 ( x ) f 2 ( x ) + γ α x 3 α 1 x 4 + 3 γ x 3 2 x 4 + λ x 2 + k 2 sgn ( s 2 )
where k i = l i + η i for i = 1 , 2 , and η i > 0 is a positive scalar value. The overall finite convergence time is given by:
t f = t 0 + 2 V 1 2 ( t 0 ) min ( η 1 , η 2 ) t r + 2 V ^ ( t r ) 1 α 2 γ ( 1 α ) t s < ,
where V ^ = x 1 2 + x 3 2 2 is the Lyapunov function for the reduced system. Here, t r denotes the reaching time, and t s signifies the sliding time.
Proof. 
The proof follows a procedure analogous to that of Theorem 1 and is therefore omitted here.
Within the MDHTSM control framework, the system’s behaviour during both the reaching and sliding phases can be enhanced by appropriately tuning the parameters λ and γ . Since the initial state x ( t 0 ) is predetermined, the value of V ( t 0 ) is directly influenced by λ , which in turn affects the distance between V ( t 0 ) and V ( t r ) . Generally, V ( t r ) corresponds to the state at time t r , where V = s T s = 0 holds for all t t r . The parameter η governs the reaching speed and can be adjusted to regulate the reaching time. Consequently, λ and η jointly control the reaching phase dynamics, whereas γ determines the convergence rate during the sliding phase.

3.4. MDHTSM Controller Design for TWSBR

When the control input u 1 is set equal to u 2 in system (14), the system becomes underactuated due to having fewer control inputs than degrees of freedom. Underactuated systems are widely encountered and studied in both scientific research and engineering practice, as they enable a reduction in actuator count, leading to decreased system mass and enhanced energy efficiency. By adopting a hierarchical sliding mode framework, the proposed MDHTSM control scheme can robustly stabilise such systems [30]. The hierarchical MDHTSM controller is formulated as follows:
Theorem 3.
Consider the following underactuated nonlinear model representing the dynamics of a two-wheeled self-balancing robot (TWSBR):
x ˙ 1 = x 2 x ˙ 2 = f 1 ( x ) + g 1 ( x ) + b 1 ( x ) u x ˙ 3 = x 4 x ˙ 4 = f 2 ( x ) + g 2 ( x ) + b 2 ( x ) u
where the variables satisfy the same assumptions as those outlined in system (14). The corresponding sliding mode surfaces are defined as follows:
S = c 1 s 1 + c 2 s 2 ,
where c 1 and c 2 are positive design parameters, and s 1 and s 2 are defined in Eq. (38). Applying the equivalent control design method yields the corresponding equivalent control inputs.
For the previously described system, the desired MDHTSM surface can be constructed as follows:
s = s 1 , s 2 T ,
where the terms s 1 and s 2 are defined as:
s 1 = x 2 + γ x 1 α sgn ( x 1 ) + x 1 3 λ x 3 , s 2 = x 4 + γ x 3 α sgn ( x 3 ) + x 3 3 + λ x 1 ,
where sgn ( x ) denotes the sign function, and α is a positive constant. For brevity, the time variable t is omitted throughout this paper unless explicitly required in the derivation. Accordingly, the desired sliding mode surface s ( t ) is abbreviated as s .
Two lemmas are employed to facilitate the proof of finite-time convergence properties of the MDHTSM controller.
The equivalent control inputs u e q 1 and u e q 2 are expressed as follows:
u e q 1 = b 1 1 ( x ) f 1 ( x ) + γ α x 1 α 1 x 2 + 3 γ x 1 2 x 2 λ x 4 , u e q 2 = b 2 1 ( x ) f 2 ( x ) + γ α x 3 α 1 x 4 + 3 γ x 3 2 x 4 + λ x 2
The control law u for stabilizing the underactuated system (40) is formulated as:
u = c 1 b 1 ( x ) + c 2 b 2 ( x ) 1 c 1 b 1 ( x ) u e q 1 + c 2 b 2 ( x ) u e q 2 η u sgn ( S ) k u S ,
This guarantees that the underactuated system described by (40) attains stability within the anticipated finite time.
Proof. 
Consider the Lyapunov function candidate V = 1 2 S 2 and take its time derivative as follows:
V ˙ = S S ˙ = S c 1 s ˙ 1 + c 2 s ˙ 2 = S ( c 1 f 1 ( x ) + g 1 ( x ) + b 1 ( x ) u + γ α | x 1 | α 1 x 2 + 3 γ x 1 2 x 2 λ x 4 + c 2 f 2 ( x ) + g 2 ( x ) + b 2 ( x ) u + γ α | x 3 | α 1 x 4 + 3 γ x 3 2 x 4 + λ x 2 ) = S ( c 1 f 1 ( x ) + g 1 ( x ) + γ α | x 1 | α 1 x 2 + 3 γ x 1 2 x 2 λ x 4 + c 2 f 2 ( x ) + g 2 ( x ) + γ α | x 3 | α 1 x 4 + 3 γ x 3 2 x 4 + λ x 2 + ( c 1 b 1 ( x ) + c 2 b 2 ( x ) ) u ) .
Substituting the control input from Eq. (45) into Eq. (46) results in:
V ˙ = S ( c 1 f 1 ( x ) + g 1 ( x ) + γ α | x 1 | α 1 x 2 + 3 γ x 1 2 x 2 λ x 4 + c 2 f 2 ( x ) + g 2 ( x ) + γ α | x 3 | α 1 x 4 + 3 γ x 3 2 x 4 + λ x 2 + c 1 b 1 ( x ) u e q 1 + c 2 b 2 ( x ) u e q 2 η u sign ( S ) k u S ) = S c 1 g 1 ( x ) + c 2 g 2 ( x ) η u sign ( S ) k u S η u | c 1 g 1 ( x ) + c 2 g 2 ( x ) | | S | k u S 2 .
Define D M = sup t 0 c 1 g 1 ( x ) + c 2 g 2 ( x ) . If η u > D M , then
V ˙ k u S 2 | S | · η u c 1 g 1 + c 2 g 2 k u S 2 ( η u D M ) | S | < 0 .
Hence, the second-level sliding surface is stable.
Given that g i ( x ) < l i , selecting a sufficiently large η u ensures the reaching condition of the surface S. The stability proof for the sliding mode surfaces s 1 and s 2 follows the approach outlined in [31] and is therefore omitted here.
This concludes the proof.
It is essential to establish the asymptotic stability of the first-level sliding surfaces for various control systems.
Theorem 4.
Consider a class of underactuated systems possessing a stable equilibrium point. Define the sliding surfaces as in Eqs. (41), (42), and (43), and implement the control law given in (45). If both s 1 and its derivative s ˙ 1 are bounded, i.e., s 1 L and s ˙ 1 L , and the parameter η satisfies η > D M , then the first-level sliding surfaces s 1 and s 2 are guaranteed to be asymptotically stable.
Proof. 
Integrating both sides of Eq. (48) yields
0 t V ˙ d τ = 0 t η u D M | S | k u S 2 d τ .
Then,
V ( t ) V ( 0 ) = 0 t η u D M | S | k u S 2 d τ .
We can observe that
V ( t ) = 1 2 S 2 = V ( 0 ) 0 η u D M | S | + k u S 2 d τ V ( 0 ) < .
Thus, S L , i.e.,
sup t 0 | S | = S < .
From the above inequality, it follows that
V ˙ = S S ˙ η u D M | S | k u S 2 < .
This shows that S ˙ L , i.e.,
sup t 0 | S ˙ | = S ˙ < .
Given that sup t 0 | s 1 | = s 1 < and sup t 0 | s ˙ 1 | = s ˙ 1 < , we obtain from Eq. (41) that s 2 L and s ˙ 2 L , i.e.,
sup t 0 | s 2 | = s 2 < , sup t 0 | s ˙ 2 | = s ˙ 2 < .
From the HSMC derivation, it is evident that the values of c 1 and c 2 do not impact system stability as long as η u > D M . Consequently, the following sliding surfaces can be defined:
S 1 = c 1 s 1 + β s 2 , S 2 = c 2 s 1 + β s 2 ,
where c 1 and c 2 are arbitrary positive constants, with c 1 c 2 . Therefore, S 1 S 2 . Assuming that > 0 S 1 2 d τ > 0 S 2 2 d τ 0 , we have:
0 0 S 1 2 d τ = 0 c 1 2 s 1 2 + 2 c 1 β s 1 s 2 + β 2 s 2 2 d τ < , 0 0 S 2 2 d τ = 0 c 2 2 s 1 2 + 2 c 2 β s 1 s 2 + β 2 s 2 2 d τ < .
Therefore,
0 < 0 S 1 2 S 2 2 d τ = 0 c 1 2 c 2 2 s 1 2 + 2 c 1 c 2 β s 1 s 2 d τ < .
0 S 1 2 S 2 2 d τ = 0 c 1 2 c 2 2 s 1 2 + 2 c 1 c 2 β s 1 s 2 d τ = 0 c 1 2 c 2 2 s 1 2 + 2 c 1 c 2 s 1 S 1 c 1 s 1 d τ = 0 c 1 c 2 2 s 1 2 d τ + 0 2 c 1 c 2 s 1 S 1 d τ > 0 .
From Eq. (51), we obtain
0 1 2 S 2 = V ( 0 ) 0 η u D M | S | + k u S 2 d τ .
Furthermore,
0 η u D M | S | + k u S 2 d τ = 0 η u D M | S | d τ + 0 k u S 2 d τ V ( 0 ) < .
Since η u > D M and k u > 0 , we have 0 η u D M | S | d τ 0 and 0 k u S 2 d τ 0 . If the sum of two positive terms is finite, then each must also be finite. Therefore, we have 0 η u D M 0 | S | d τ = S 1 < , i.e., S L 1 . Hence, from Eq. (59),
0 c 1 c 2 2 s 1 2 d τ < 0 2 c 1 c 2 s 1 S 1 d τ 2 0 c 1 c 2 s 1 S 1 d τ 2 c 1 c 2 0 s 1 | S 1 | d τ = 2 c 1 c 2 · s 1 S 1 1 < .
Thus,
0 s 1 2 d τ < ,
and similarly,
0 s 2 2 d τ < .
From Eqs. (63) and (64), it can be concluded that s 1 L 2 and s 2 L 2 (square integrable). Given that s 1 L , s ˙ 1 L , s 2 L , and s ˙ 2 L , it follows from Barbalat’s lemma that lim t s 1 = 0 and lim t s 2 = 0 .
In conclusion, the sliding surfaces s 1 and s 2 of the first-level subsystems are not only stable but also asymptotically stable.
Remark 2.
Theorem 4 applies to underactuated systems possessing a stable equilibrium point. Therefore, the boundedness conditions s 1 L and s ˙ 1 L are naturally fulfilled.

4. Simulation Result

The formula (13) for its v , θ subsystem is rewritten as in formula (40). The state variable is selected as x = ( x , x ˙ , θ , θ ˙ ) , as follows:
f 1 ( x ) = 1 Ω J θ m l θ ˙ 2 sin θ m 2 l 2 g sin θ cos θ b 1 ( x ) = J θ Ω R f 2 ( x ) = 1 Ω M x m g l sin θ m 2 l 2 θ ˙ 2 sin θ cos θ b 2 ( x ) = m l cos θ Ω R
where x represents the displacement of the TWSBR and θ denotes the pitch angle of the robot. The parameters of the TWSBR are as follows: m = 0.25 kg , M = 0.5 kg , M w = 0.3 kg , R = 0.0325 m , l = 0.03 m , J w = 1.5 × 10 4 kg · m 2 , J c = 1 × 10 4 kg · m 2 , J p = m l 2 , g = 9.8 m / s 2 .
This paper utilizes MATLAB/Simulink for simulation, employs a fixed-step solver, and sets the simulation time to 0.01 seconds. The initial condition of the system is given by the state vector x 0 = [ 0.2 , 0.1 , 0.1 , 0.1 ] , where the initial values of the state variables are θ ( 0 ) = 0.2 , θ ˙ ( 0 ) = 0.1 , x ( 0 ) = 0.1 , and x ˙ ( 0 ) = 0.1 . The control objective is to ensure that as t , each state variable x i converges to 0, for i = 1 , 2 , 3 , 4 .

4.1. Optimization Algorithm

The Jellyfish Search Optimization (JSO) algorithm, proposed by Saremi, Mirjalili, and colleagues in 2020, is a nature-inspired optimization method. This algorithm emulates the foraging behavior of jellyfish in the ocean, utilizing water currents and random motions to locate food sources through a cooperative group strategy. The JSO algorithm mathematically models the movement and position updates of jellyfish, enabling it to effectively solve complex optimization problems. Its main advantages include a straightforward structure, ease of implementation, and robust global optimization capabilities in high-dimensional and complex search spaces. As a result, the JSO algorithm has been extensively applied in various fields such as engineering design, parameter tuning, and path planning.
The Integral of Time-weighted Absolute Error (ITAE) criterion is widely used to assess control system performance, emphasizing the minimization of long-term error. The ITAE performance index is defined as follows:
I T A E = 0 t | e ( t ) | d t
Where e ( t ) denotes the error signal at time t. This criterion integrates the absolute error weighted by time, thereby assigning greater significance to errors that persist for extended durations. The typical objective in controller design is to minimise this integral, thereby improving system performance.
Given that the proposed sliding mode control method involves numerous parameters, many of which require manual tuning, an optimization algorithm is employed for parameter adjustment. The objective function is defined as
f = I T A E ( θ ) + I T A E ( x ) .
In the JSO optimization algorithm, when tuning the parameters of various sliding mode controllers, a population size of 20 and 300 iterations were selected. These values are generally determined through experimental or empirical methods to achieve an optimal balance between computational efficiency and algorithmic performance, preventing both overfitting and underfitting. The parameter bounds for the sliding mode controller within the optimization process are set to [ 0 , 5 ] . Considering that the motor employed is a micro-reduction DC motor with a rated torque of only 0.6 N · m , and that the total torque of the two motors is 1.2 N · m , the control input is constrained within the range [ 2 , 2 ] .
The three controllers were optimised using the JSO algorithm. The parameters of the optimised controllers, rounded to four significant figures, are as follows:
The optimized parameters of HSMC (See Appendix A.1 for details) are:
η * = 0.3702 , k * = 3.720 , λ 1 = 4.573 , λ 2 = 0.3215 , c 1 = 3.983 , c 2 = 0.02035
The optimized parameters of HTSMC are:
η * = 0.6037 , k * = 1.435 , λ 1 = 0.4865 , λ 2 = 0.06401 , α 1 = 2.490 , α 2 = 1.188 , c 1 = 3.641 , c 2 = 6.554 × 10 4
The optimized parameters of MDHTSMC are:
η u = 0.03835 , k u = 4.800 , α = 1.089 , γ = 4.996 , λ = 6.951 × 10 5 , c 1 = 4.878 , c 2 = 0.2363
As shown in Figure 3, following the optimization of the three controllers (JSO-HSMC, JSO-HTSMC, and JSO-MDHTSMC), the fitness curves demonstrate the effectiveness of the JSO algorithm in terms of convergence speed and result stability. Specifically, the JSO-MDHTSMC controller exhibits the lowest fitness value, indicating superior performance on the optimization objective, whereas the JSO-HSMC and JSO-HTSMC controllers have higher fitness values, reflecting relatively lower optimization effectiveness. Overall, the JSO algorithm efficiently identifies a stable optimal solution within a high-dimensional, complex search space, particularly for the JSO-MDHTSMC controller.
Through a systematic analysis of the state response, control input, and sliding surface of the TWSBR under HSMC (Figure 4), HTSMC (Figure 5), and MDHTSMC (Figure 6), significant differences in the performance of each control strategy are evident. HSMC is capable of achieving basic system stability; however, due to the inherent chattering problem, the system exhibits significant oscillations and large control input fluctuations when dealing with uncertainty and interference, making it challenging to fully eliminate dynamic errors. In contrast, HTSMC significantly reduces the oscillation amplitude and chattering phenomenon in the control input, demonstrating higher control accuracy and robustness, thereby enabling stable system operation near the sliding surface. Nevertheless, both HSMC and HTSMC exhibit steady-state errors in the pitch angle ( θ ). MDHTSMC, on the other hand, exhibits rapid convergence and high system stability, effectively suppresses initial oscillations, and maintains the sliding surface near zero, verifying the effectiveness and robustness of the control strategy while simultaneously eliminating the steady-state error in the pitch angle ( θ ). In summary, MDHTSMC not only eliminates the steady-state error in the pitch angle ( θ ) but also exhibits superior control performance, making it the most effective control strategy among the three methods.
Remark 3.
As observed in Figure 3, HSMC and HTSMC exhibit higher fitness values, primarily because the pitch angle (θ) retains a certain steady-state error in the optimization solution, resulting in a higher fitness value that cannot be minimized further. Figure 4 and Figure 5 further confirm this observation, validating our hypothesis that this issue is attributed to multiple factors, including modeling inaccuracies, external interference, and omitted friction.

4.2. Parameters Tuning

Based on the preceding analysis and figures, to achieve optimal results, we have fine-tuned the aforementioned parameters accordingly. The parameters after fine-tuning are as follows:
The optimized parameters of HSMC are:
η * = 5 , k * = 3 , λ 1 = 0.5 , λ 2 = 0.5 , c 1 = 4 , c 2 = 0.1
The optimized parameters of HTSMC are:
η * = 5 , k * = 2 , λ 1 = 0.01 , λ 2 = 0.01 , α 1 = 1 , α 2 = 1 , c 1 = 1 , c 2 = 0.1
The optimized parameters of MDHTSMC are:
η u = 5 , k u = 3 , α = 1.1 , γ = 4 , λ = 0.001 , c 1 = 4 , c 2 = 0.2
To more effectively demonstrate the superiority of our proposed method, we conducted two primary simulation cases:
  • the performance of each sliding mode controller under ideal, disturbance-free conditions; and
  • the performance of each sliding mode controller in the presence of disturbances d u = 0.2 s i n ( 5 t ) .

4.2.1. Case 1: Ideal State

In the absence of external interference, it is evident from Figure 7 that under HSMC, the system state and control input exhibit pronounced high-frequency oscillations. The sliding surface is slow to stabilize near the zero point, resulting in significant chattering, which may damage the actuator. From Figure 8, although HTSMC exhibits significant initial peaks, it demonstrates good overall convergence speed and stability. Once the system enters the sliding mode state, the chattering is reduced, and the sliding surface stabilizes rapidly, though the initial peak may still pose challenges in certain applications. In contrast, Figure 9 indicates that MDHTSMC offers superior control performance. The high-frequency oscillations in the system state diminish rapidly, the control input is smooth and stable, and the sliding surface quickly converges to zero and remains stable, demonstrating significant advantages in enhancing system stability.

4.2.2. Case 2: With Disturbance

Under disturbance conditions, as shown in Figure 10, the performance of HSMC remains largely unchanged compared to non-disturbance conditions, particularly in terms of chattering suppression and stability maintenance. However, this reveals its inadequate control performance under high-frequency chattering. This shortcoming underscores the advantages of alternative sliding mode control techniques, such as MDHTSMC and HTSMC, which excel in suppressing disturbances and maintaining system stability. Specifically, as shown in Figure 11, HTSMC preserves its robustness and stability under disturbances and swiftly recovers stability in complex environments, making it well-suited for applications demanding stringent disturbance suppression. However, HTSMC does show a noticeable initial peak but compensates with a commendable convergence speed and stability. MDHTSMC demonstrates strong disturbance suppression capabilities, as shown in Figure 12. Although the initial oscillation amplitude of the pitch angular velocity ( θ ˙ ) slightly increases when subjected to disturbance, the system quickly stabilizes and converges to the desired state, further confirming its excellent ability to maintain system stability.
Remark 4.
Although we adjusted the system parameters, due to inaccurate mathematical modeling, neglecting frictional resistance, external disturbances, and the strong coupling inherent in the TWSBR, HSMC and HTSMC cannot ensure that all state variables of the system converge to zero, particularly the pitch angle (θ), which exhibits a small steady-state error. However, MDHTSMC can ensure that all state variables of the TWSBR are close to zero.
In summary, there are significant differences in the performance of each sliding mode controller between disturbed and undisturbed conditions. Under disturbance conditions, HSMC can achieve fundamental system stability, but the chattering issue becomes more pronounced. HTSMC demonstrates good convergence and stability under disturbance, maintaining high robustness and quickly restoring system stability, making it suitable for scenarios with strict disturbance requirements, although it exhibits a pronounced initial peak. MDHTSMC shows excellent performance under disturbance and can quickly converge to a stable state. Although the initial oscillation amplitude of the pitch angular velocity ( θ ˙ ) increases under disturbance, the system rapidly stabilizes and maintains the sliding mode surface close to zero, further demonstrating its excellent ability to sustain system stability in complex environments. Therefore, MDHTSMC is significantly superior to HSMC and HTSMC in terms of disturbance rejection capability and stability.

5. Conclusions

In this paper, a MDHTSMC scheme was proposed for the TWSBR. The proposed MDHTSMC successfully integrates individual sliding surfaces through a specially designed structure, ensuring finite-time convergence of the tracking error. The underactuation challenge inherent in TWSBR was effectively addressed by implementing a hierarchical control approach within the dual terminal sliding mode framework. Moreover, the proposed control strategy demonstrated significant suppression of chattering, enhancing the stability and performance of the TWSBR during self-balancing tasks. The efficacy and efficiency of the proposed method were validated through rigorous simulation results, which confirmed the theoretical analysis and highlighted the potential of MDHTSMC for advanced control applications in underactuated robotic systems.

Author Contributions

Conceptualization, Zhang Huaqiang and Norzalilah Mohamad Nor; methodology, Zhang Huaqiang; software, Zhang Huaqiang; validation, Zhang Huaqiang, Norzalilah Mohamad Nor and Siti Nur Hanisah Umar; formal analysis, Zhang Huaqiang; investigation, Zhang Huaqiang; resources, Zhang Huaqiang; data curation, Zhang Huaqiang; writing—original draft preparation, Zhang Huaqiang; writing—review and editing, Zhang Huaqiang; visualization, Zhang Huaqiang; supervision, Norzalilah Mohamad Nor; project administration, Norzalilah Mohamad Nor; funding acquisition, not applicable. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data that support the findings of this study are available from the corresponding author upon reasonable request.

Acknowledgments

The authors would like to thank the Department of Mechanical Engineering, Universiti Sains Malaysia, for providing technical support and laboratory resources during this research.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
TWSBR Two-Wheeled Self-Balancing Robot
SMC Sliding Mode Control
TSMC Terminal Sliding Mode Control
HSMC Hierarchical Sliding Mode Control
HTSMC Hierarchical Terminal Sliding Mode Control
DHTSMC Dual Hierarchical Terminal Sliding Mode Control
MDHTSMC Modified Dual Hierarchical Terminal Sliding Mode Control
JSO Jellyfish Search Optimization
ITAE Integral of Time-weighted Absolute Error
LQR Linear Quadratic Regulator
PD Proportional-Derivative

References

  1. S. Zhang, J. Yao, Y. Wang, Z. Liu, Y. Xu, and Y. Zhao, “Design and motion analysis of reconfigurable wheel-legged mobile robot,” Defence Technology, vol. 18, no. 6, pp. 1023–1040, 2022. [CrossRef]
  2. F. Rubio, F. Valero, and C. Llopis-Albert, “A review of mobile robots: Concepts, methods, theoretical framework, and applications,” Int. J. Adv. Robot. Syst., vol. 16, no. 2, p. 01–22, 2019. [CrossRef]
  3. Y. Olmez, G. O. Koca, and Z. H. Akpolat, “Clonal selection algorithm based control for two-wheeled self-balancing mobile robot,” Simulation modelling practice and theory: International journal of the Federation of European Simulation Societies, no. 118, p. 118, 2022. [CrossRef]
  4. Y. Guo, J. Guo, L. Liu, Y. Liu, and J. Leng, “Bioinspired multimodal soft robot driven by a single dielectric elastomer actuator and two flexible electroadhesive feet,” Extreme Mech. Lett., vol. 53, p. 101720, 2022. [CrossRef]
  5. M. B. Khan, T. Chuthong, C. D. Do, M. Thor, P. Billeschou, J. C. Larsen, and P. Manoonpong, “icrawl: an inchworm-inspired crawling robot,” IEEE Access, vol. 8, pp. 200 655–200 668, 2020. [CrossRef]
  6. P. Wang, Q. Tang, T. Sun, and R. Dong, “Research on stability of the four-wheeled robot for emergency obstacle avoidance on the slope,” Recent Pat. Eng., vol. 15, no. 5, p. 15, 2021. [CrossRef]
  7. F. Nker, “Proportional controlled moment of gyroscope for two-wheeled self-balancing robot,” J. Vib. Control, 2021.
  8. D. Voth, “Segway to the future [autonomous mobile robot],” IEEE Intell. Syst., vol. 20, no. 3, pp. 5–8, 2005. [CrossRef]
  9. A. Delgado-Spíndola, R. Campa, E. Bugarin, and I. Soto, “Design and real-time implementation of a nonlinear regulation controller for the rmp-100 segway twip,” Mechatronics, vol. 79, pp. 102 668–, 2021. [CrossRef]
  10. J. Zhao, X. Cui, Y. Zhu, and S. Tang, “A new self-reconfigurable modular robotic system ubot: Multi-mode locomotion and self-reconfiguration,” in 2011 IEEE International Conference on Robotics and Automation. IEEE, 2011, pp. 1020–1025. [CrossRef]
  11. X. Cui, Y. Zhu, J. Zhao, S. Piao, and E. Yang, “Bio-inspired locomotion control for ubot self-reconfigurable modular robot,” in 2023 International Conference on Control, Automation and Diagnosis (ICCAD). IEEE, 2023, pp. 01–06. [CrossRef]
  12. D. Y. Gao, P. W. Han, D. S. Zhang, and Y. J. Lu, “Study of sliding mode control in self-balancing two-wheeled inverted car,” Appl. Mech. Mater., vol. 241, pp. 2000–2003, 2013.
  13. I. Jmel, H. Dimassi, S. Hadj-Said, and F. M’Sahli, “Sliding mode control for two wheeled inverted pendulum under terrain inclination and disturbances,” in 2021 9th International Conference on Systems and Control (ICSC). IEEE, 2021, pp. 467–471. [CrossRef]
  14. A. Ghahremani and A. K. Khalaji, “Simultaneous regulation and velocity tracking control of a two-wheeled self-balancing robot,” in 2023 International Conference on Control, Automation and Diagnosis (ICCAD). IEEE, 2023, pp. 1–6. [CrossRef]
  15. M. S. Arani, H. E. Orimi, W.-F. Xie, and H. Hong, “Comparison of sliding mode controller and state feedback controller having linear quadratic regulator (lqr) on a two-wheel inverted pendulum robot: Design and experiments,” 2018. [CrossRef]
  16. A. Sinha, P. Prasoon, P. K. Bharadwaj, and A. C. Ranasinghe, “Nonlinear autonomous control of a two-wheeled inverted pendulum mobile robot based on sliding mode,” in 2015 International Conference on Computational Intelligence and Networks. IEEE, 2015, pp. 52–57. [CrossRef]
  17. C.-C. Yih, “Sliding-mode velocity control of a two-wheeled self-balancing vehicle,” Asian J. Control, vol. 16, no. 6, pp. 1880–1890, 2014. [CrossRef]
  18. L. Wang and J. Lei, “Research on self-balancing control for upright vehicle with two wheels based on sliding mode control,” in 2017 International Conference on Computer Technology, Electronics and Communication (ICCTEC). IEEE, 2017, pp. 1192–1195. [CrossRef]
  19. Y. Yang, X. Yan, K. Sirlantzis, and G. Howells, “Regular form-based sliding mode control design on a two-wheeled inverted pendulum,” Int. J. Model. Identif. Control, vol. 37, no. 3/4, pp. 312–320, 2021. [CrossRef]
  20. H. Fukushima, K. Muro, and F. Matsuno, “Sliding-mode control for transformation to an inverted pendulum mode of a mobile robot with wheel-arms,” IEEE Trans. Ind. Electron., vol. 62, no. 7, pp. 4257–4266, 2014. [CrossRef]
  21. P. Durdevic and Z. Yang, “Hybrid control of a two-wheeled automatic-balancing robot with backlash feature,” in 2013 IEEE International Symposium on Safety, Security, and Rescue Robotics (SSRR). IEEE, 2013, pp. 1–6. [CrossRef]
  22. S. Irfan, A. Mehmood, M. T. Razzaq, and J. Iqbal, “Advanced sliding mode control techniques for inverted pendulum: Modelling and simulation,” Engineering science and technology, an international journal, vol. 21, no. 4, pp. 753–759, 2018.
  23. N. Zheng, Y. Zhang, Y. Guo, and X. Zhang, “Hierarchical fast terminal sliding mode control for a self-balancing two-wheeled robot on uneven terrains,” in 2017 36th Chinese Control Conference (CCC). IEEE, 2017, pp. 4762–4767. [CrossRef]
  24. M. Hou, X. Zhang, D. Chen, and Z. Xu, “Hierarchical sliding mode control combined with nonlinear disturbance observer for wheeled inverted pendulum robot trajectory tracking,” Appl. Sci. (Basel), vol. 13, no. 7, p. 4350, 2023. [CrossRef]
  25. H. Ping, W. Hai, L. Linfeng, K. Huifang, Y. Ming, J. Canghua, et al., “A novel hierarchical sliding mode control strategy for a two-wheeled self-balancing vehicle,” in 2017 36th Chinese Control Conference (CCC). IEEE, 2017, pp. 3731–3736. [CrossRef]
  26. L. Chen, H. Wang, Y. Huang, Z. Ping, M. Yu, X. Zheng, et al., “Robust hierarchical sliding mode control of a two-wheeled self-balancing vehicle using perturbation estimation,” Mech. Syst. Signal Process., vol. 139, p. 106584, 2020. [CrossRef]
  27. K. D. Do and G. Seet, “Motion control of a two-wheeled mobile vehicle with an inverted pendulum,” J. Intell. Robot. Syst., vol. 60, no. 3-4, pp. 577–605, 2010. [CrossRef]
  28. F. Grasser, A. D’arrigo, S. Colombi, and A. C. Rufer, “Joe: A mobile, inverted pendulum,” IEEE Trans. Ind. Electron., vol. 49, no. 1, pp. 107–114, 2002. [CrossRef]
  29. E. Moulay and W. Perruquetti, “Finite time stability and stabilization of a class of continuous systems,” J. Math. Anal. Appl., vol. 323, no. 2, pp. 1430–1443, 2006. [CrossRef]
  30. A. Levant, “Sliding order and sliding accuracy in sliding mode control,” Int. J. Control, vol. 58, no. 6, pp. 1247–1263, 1993. [CrossRef]
  31. W. Wang, J. Yi, D. Zhao, and D. Liu, “Design of a stable sliding-mode controller for a class of second-order underactuated systems,” IEE Proc. Contr. Theory Appl., vol. 151, no. 6, pp. 683–690, 2004. [CrossRef]
Figure 1. Different types of TWSBR robots: (a) The concept, (b) Segway, (c) uBot.
Figure 1. Different types of TWSBR robots: (a) The concept, (b) Segway, (c) uBot.
Preprints 162936 g001
Figure 2. Math model of TWSBR: (a) TWSBR, (b) Left wheel, (c) Right wheel.
Figure 2. Math model of TWSBR: (a) TWSBR, (b) Left wheel, (c) Right wheel.
Preprints 162936 g002
Figure 3. Fitness graph of JSO optimization algorithm
Figure 3. Fitness graph of JSO optimization algorithm
Preprints 162936 g003
Figure 4. Performance of HSMC under JSO optimization algorithm
Figure 4. Performance of HSMC under JSO optimization algorithm
Preprints 162936 g004
Figure 5. Performance of HTSMC under JSO optimization algorithm.
Figure 5. Performance of HTSMC under JSO optimization algorithm.
Preprints 162936 g005
Figure 6. Performance of MDHTSMC under JSO optimization algorithm.
Figure 6. Performance of MDHTSMC under JSO optimization algorithm.
Preprints 162936 g006
Figure 7. Performance of HSMC at ideal state.
Figure 7. Performance of HSMC at ideal state.
Preprints 162936 g007
Figure 8. Performance of HTSMC at ideal state.
Figure 8. Performance of HTSMC at ideal state.
Preprints 162936 g008
Figure 9. Performance of MDHTSMC at ideal state.
Figure 9. Performance of MDHTSMC at ideal state.
Preprints 162936 g009
Figure 10. Performance of HSMC with d u = 0.2 s i n ( 5 t )
Figure 10. Performance of HSMC with d u = 0.2 s i n ( 5 t )
Preprints 162936 g010
Figure 11. Performance of HTSMC with d u = 0.2 s i n ( 5 t )
Figure 11. Performance of HTSMC with d u = 0.2 s i n ( 5 t )
Preprints 162936 g011
Figure 12. Performance of MDHTSMC with d u = 0.2 s i n ( 5 t )
Figure 12. Performance of MDHTSMC with d u = 0.2 s i n ( 5 t )
Preprints 162936 g012
Table 1. The vehicle parameters and variables.
Table 1. The vehicle parameters and variables.
Notation Definition
T L , T R Torques acting on the left and right wheels provided by wheel motors
F L , F R Interacting forces between the left and right wheels and the chassis
H L , H R Friction forces acting on the left and right wheels
f d L , f d R External forces acting on the left and right wheels
θ L , θ R Rotational angles of the left and right wheels
x L , x R Displacements of the left and right wheels along the x-axis
θ Tilt angle of the vehicle body
φ Rotational angle of the vehicle
x Displacement of the vehicle along the direction of the longitudinal velocity
v Longitudinal velocity of the vehicle
m Mass of the inverted pendulum
M Mass of the chassis
M w Mass of the wheels
R Radius of the wheels
l Distance between the body center of gravity and the wheel axis
D Distance between the two wheels along the axle center
x c , y c Current position of the vehicle on the x y plane
F p Interacting force between the pendulum and the chassis on the x-axis
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated