Next Article in Journal
Research on the Flow and Heat Transfer Characteristics of a Molten Salt Globe Valve Based on an Electromagnetic Induction Heating System
Previous Article in Journal
Machine Learning-Assisted Output Optimization of Non-Resonant Motors
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Coordinated Trajectory Tracking and Self-Balancing Control for Unmanned Bicycle Robot Against Disturbances

1
School of Mechanical Engineering, Beijing Institute of Technology, Beijing 100081, China
2
School of Mechanical & Automotive Engineering, South China University of Technology, Guangzhou 510641, China
*
Author to whom correspondence should be addressed.
Actuators 2026, 15(1), 49; https://doi.org/10.3390/act15010049
Submission received: 5 December 2025 / Revised: 31 December 2025 / Accepted: 7 January 2026 / Published: 13 January 2026
(This article belongs to the Section Control Systems)

Abstract

Trajectory tracking and self-balancing capacity is crucial for an unmanned bicycle robot (UBR) applied in off-road trails and narrow space. However, self-balancing is hard to be guaranteed once the steering angle manipulates for the tracking task, both of which are closely linked to the steering angle, especially for the UBR without auxiliary mechanism. In this paper, we introduce a double closed-loop framework in which the outer loop controller plans the desired speed and heading angle to track the reference trajectory, and the inner loop controller track the desired signals obtained from the outer loop to maintain balance. To be specific, a saturated velocity planner is developed to realize fast convergence of tracking error considering the kinematic constraints in the outer loop. A fuzzy sliding model controller (FSMC) is designed to attenuate the chattering effect via adapting its control gain in the inner loop, and a radial basis function neural network (RBFNN) approximator is also integrated into the framework to enhance the adaptability and robustness against bounded disturbances. The feasibility and effectiveness of the proposed control framework and approaches are validated based on the Matlab and Gazebo environment. In particular, the UBR can follow the testing route with lateral deviation less than 0.5 m in the presence of lateral winds and physical parameter measurement error, and comparative simulation results highlighted the superiority of the proposed control scheme.

1. Introduction

Unmanned bicycle robots (UBRs) have attracted significant attention for detection, transport, and first response domains while reducing the exposure of human to threats and dangers. Due to the three-dimensional spatial rolling of the two wheels and the self-stability in specific speed range, the bicycle combines agility and maneuverability property. To exploit such property superiority, motion control of the UBR needs to be urgently captured, which brings a challenging avenue for actuation mechanism, self-balancing, and trajectory tracking control.
Due to the lack of direct torque in the rolling direction, several mechanisms have been designed which are different in various aspects such as the number and/or types of actuators. The most well-known mechanism is the flywheel, which can directly generate a rolling torque when accelerating [1]. To generate larger rolling torque and improve the loading capacity, some scholars have adopted twin control moment gyros (CMGs) with opposing arrangement [2], which can generate superimposed rolling torque and offset vertical torque [3]. The earliest engineering application of such an idea can be traced back to 1903 when the Irish mechanical engineer Louis Brennan invented the single-track train by placing two large CMGs opposite each other in the carriage, and rotated them through electrical devices. The train weighing 22 tons successfully maintained balance while carrying more than 40 people. Furthermore, some added a heavy pendulum to the vehicle body, which can swing in the roll direction to maintain balance by adjusting the center of mass like cyclist [4,5]. However, the weight of the additional device is about 25% of the vehicle weight and deterioration in the maneuverability cannot be ignored [6]. Recently, Japan Honda company proposes a riding assistance system with rear-wheel-swing mechanism, which enables balance at extremely low speeds [7]. However, this special mechanism equipped with a four-bar linkage remains heavy and insecure. To ensure safety and low cost, this paper studies the UBR without any auxiliary mechanism.
Different controllers have been proposed to deal with the complex and nonlinear UBR dynamics. For instance, a non-singular terminal sliding mode controller, capable of realizing finite-time convergence of the roll angle was proposed in [8]. For the MIMO System, reference [9] adopts integral sliding mode control with an improved reaching law, which can reduce chattering and smooth the control input. Reference [10] proposes a scheme that does not adjust the SMC structure or rely on nonlinear sliding manifolds. By optimizing the control law through disturbance estimation, this scheme mitigates chattering while ensuring system stability. Zhang [11] proposed a variable-gain LQR to keep balance while the speed is changing. In [12], a novel command-filtered adaptive control scheme for uncertain nonlinear systems with unknown external disturbances was proposed. This scheme adopts an asymmetric Bouc–Wen model to characterize the hysteretic nonlinearity, which significantly improves the accuracy. Kim [13] designed a GPR-based data-driven state feedback controller to achieve reference tracking of nonlinear discrete-time system. Considering the adverse effects by sensor error and actuator fault, an active fault-tolerant control based on the integration of SMC, fault detection, and fault estimation visa residual signals was proposed in [14]. Li [15] proposed a cascaded PID control method, which enhances the response speed and control precision. Xu [16] designed a variable universe fuzzy exponential rate reaching law sliding mode controller. Choi [17] proposed a controller using a deep reinforcement learning algorithm, which creates reward functions and neural networks, enabling UBR to maintain balance and reach the desired position through instructions. Kumar [18] derived a reduced-order method to enhance capacity of resisting disturbance. Sun [19] proposed an adaptive law, which estimates high-order dynamics to avoid robust terms, and the accuracy of compensation and position was improved. Most controllers depend on the simplified dynamic model which accuracy limits their performance. Therefore, some scholars directly identify balance state points from the dynamic phase diagram. Yu [20] revealed the inherent dynamics and balance characteristic of UBR and the potential application in self-balancing, drifting, and other aspects through the Steady-State Manifold theory.
Some trajectory tracking controller have been designed based on Ackerman kinematic model. Zhou [21] employed the Pure Pursuit (PP) algorithm with an appropriate look-ahead distance for prompt tracking of the desired trajectory. Yu [22] proposed an integrated tracking algorithm, which employs the PP algorithm when the positional deviation exceeds a threshold and switches to the Model Predictive Control within the threshold. He [23] designed a Gaussian process approach to adapt the control gains and hyperparameters through a learning algorithm for trajectory tracking. Yi [24] designed the expected trajectory of the internal subsystem and completed the tracking task of the external subsystem based on the Gaussian process regression model predictive control method. For a class of underactuated systems, Fang [25] proposed a variable-gain controller with online trajectory that satisfies the output constraints, and integrated proportional–integral regulator into the trajectory to ensure the precise convergence of the actuated output.
To coordinate trajectory tracking and self-balancing with bounded disturbance, this study proposes a double closed-loop control framework for UBRs, in which a saturation function-based velocity planner and an FSMC-based balance controller combined with RBFNN-based approximator are designed. Compared to the existing stability control methods for UBRs, the contribution of this study can be marked as the following significant points.
  • A dynamic equilibrium model with system uncertain term is constructed to ensure physical interpretability, in which external lateral wind disturbance and internal parameter measurement error are incorporated.
  • A double closed-loop framework, composed of planner, controller and approximator, is proposed for coordinating trajectory tracking and self-balancing control, which considerably reduces the design complexity of control system.
  • A virtual and visualized bicycle simulation validation platform is developed in Gazebo to intuitively demonstrate the effectiveness and advantages of the proposed approach with the uncertain system.
The paper is organized as follows: Section 2 presents the dynamic and kinematic models of the UBR, as well as the natural wind model. Section 3 addresses the design of the double closed-loop controller composed of RBFNN approximator, FSMC, and saturated velocity planner. In Section 4, the simulation results are illustrated. Finally, conclusions are drawn in Section 5.

2. System Modeling of UBR

In this section, the kinematic and dynamic models of the UBR, as well as the description of the lateral wind disturbance, are respectively presented.

2.1. Kinematic Model

It is impractical to establish a fully accurate and comprehensive bicycle model. Therefore, the following assumptions are firstly given, focused on the scenarios of light load, low speed, flat road, straight-line and small steering angle motion,:
(1)
The deformation caused by the suspension is neglected. The UBR is divided into four rigid bodies: the front wheel, the rear wheel, the fork, and the frame.
(2)
Tire deformation is ignored. The wheels are in point contact with the ground, where the contact points of the front and rear wheels with the ground are denoted as P f and P r , respectively.
(3)
It is assumed that neither lateral nor longitudinal slip occurs in the wheels. Therefore, nonholonomic constraint exists at the wheel–ground contact points.
(4)
The wheels remain in contact with the ground and the ground is horizontal. Hence, the pitching motion is not considered.
To charactize the motion of the UBR, two coordinate frames are introduced; see Figure 1. The axes X and Y of the ground fixed frame span the horizontal plane and its Z axis gives the vertical direction. The vehicle body is rotated around the line P r P t with the roll angle θ . Thus, the x and z axes span the plane of the vehicle body and the y axis is vertical to the plane. The origin of the frame is located at the center of mass O c . Ignoring longitudinal slip and lateral deviation of the wheels, the vehicle rotates around instantaneous steering center point O with speed v, steering angle δ s , and steering radius r, where O r and O f denote the center of the rear and front wheels, respectively. Due to the fork not being vertical to the ground, the fork–ground intersection point P t deviates from the line P r , P f with lateral offset L t sin δ s . The offset of a standard bicycle is small enough to be ignored in kinematic modeling, yet it should be included in dynamic modeling due to the caster effect.
During the sample time d t , the distance traveled by the vehicle is d s and the change in the heading direction is d ϕ . It yields
d s d t = r d ϕ d t
where the turn radius r can be derived by geometric relationship:
r = L a tan α = L b tan δ s
Combining Equations (1) and (2), the heading angular acceleration can be obtained:
ϕ ˙ = tan δ s L b d s d t = v tan δ s L b
The speeds of the UBR in the ground fixed coordinate frame is
v x = v cos ϕ v y = v sin ϕ
Byassociating Equations (3) and (4), the kinematic model can be obtained as follows:
x ˙ = v cos ϕ y ˙ = v sin ϕ ϕ ˙ = v tan δ s L b
This equation can represent the position and heading angle of the UBR at any time.
The speed of central mass O c is v c , and v c x and v c y are the components of v c along the x and y axis, respectively. Due to the frame being rigid, the equality v c x = v and relationships between v c , v c y and v can be obtained as follows:
v c = r c ϕ ˙ = L a L b tan δ s sin α v
v c y = v c sin α = L a tan δ s L b v .
v c y and its corresponding acceleration generate inertial forces along the y axis will be discussed in the next section.

2.2. Dynamic Model

It can be known that the UBR is subject to gravity F g , support forces F n f and F n r , and inertial force F i . Since the UBR always performs the variable speeds motion, the vehicle body coordinate frame is non-inertial at transient state; thus, it is necessary to introduce inertial force to analyze the balance. Meanwhile, Newton’s laws are also applicable in this frame. According to the principle of torque balance, the equilibrium dynamic model can be obtained as follows:
( I + m h 2 ) θ ¨ = F g h sin θ + F n f L t sin δ s + F i h cos θ
where all terms are vectors and their directions follow the right-hand rule. I is the UBR’s moment of inertia along the x axis. According to the parallel axis theorem, the moment of inertia along the line P r P t is I + m h 2 .
To clear understanding these torque, each torque term of the equation is specifically analyzed as follows:
(1)
The first term is the gravitational torque, where F g = m g .
F g h sin θ = m g h sin θ
(2)
The second term is the drag torque. As shown in Figure 1, the support forces are vertical to the ground and F n f can be easily derived: F n f = L a L b m g . Then, the drag torque is
F n f L t sin δ s = m g L a L t sin δ s L b
(3)
The third term is the inertial torque. The inertial force F i is the sum of the inertial centrifugal force m v 2 r due to circular motion and the inertial force m d v c y d t caused by centripetal acceleration. This term is an important factor for balance. Then, follows that
F i = m d v c y d t + v 2 r = m L a v sec 2 δ s L b δ s ˙ + L a tan δ s L b v ˙ + v 2 L b tan δ s
Substituting Equations (9)–(11) into (8) obtains
( I + m h 2 ) θ ¨ = m g h sin θ + m g L a L t sin δ s L b + m h cos θ L a v sec 2 δ s L b δ s ˙ + L a tan δ s L b v ˙ + v 2 L b tan δ s
When the UBR is in straight-line or small-angle steering motion, the θ and δ S are small. Therefore, Equation (12) can be simplified as follows:
( I + m h 2 ) θ ¨ m g h θ + m g L a L t δ s L b + m h L a v L b δ ˙ s + L a v ˙ L b δ s + v 2 L b δ s
Due to the fork angle λ , the relationship between the steering bar angle δ and the front-wheel steering angle δ s is
δ s = δ sin λ
Substituting the above expression into (13) leads to
( I + m h 2 ) θ ¨ = m g h θ + m g L a L t sin λ L b δ + m h L a v sin λ L b δ ˙ + L a v ˙ sin λ L b δ + v 2 sin λ L b δ

2.3. Natural Wind Modeling

The external disturbance of natural wind cannot be ignored during the relatively big lateral area of UBR, especially when the wind force is strong. Natural wind has the characteristics of suddenness, persistence, periodicity, and uncertainty. Refer to the description of the wind in [26], the model can be achieved through the following methods.
The basic wind speed with a stable constant C is designed as follows:
V a = C 0 t t a
The gust wind speed is designed as follows:
V b = 0 t t b 1 , t t b 2 V max 1 2 1 cos 2 π t t b 1 t b 1 t b 1 < t < t b 2
where V max 1 is the peak of the gust, t b 1 is the start time, and t b 2 is the end time.
The gradual increase or decrease in the wind force can be described by the asymptotic wind speed:
V c = 0 0 t t c 0 , t > t c 2 V max 2 t t c 0 t c 1 t c 0 t c 0 < t < t c 1 V max 2 t c 1 t t c 2
where V max 2 is the peak speed, t c 0 is the start time, t c 1 is a time at a location, and t c 2 is the end time.
The irregularity of the wind speed change can be described as follows:
V d = V max 3 Rand ( 1 , 1 ) cos ( ω t )
where V max 3 is the peak speed. Rand ( 1 , 1 ) generates random numbers that are uniformly distributed between −1 and 1. ω represents the average frequency.
The total wind speed is
V w = V a + V b + V c + V d
Wind force can be expressed as
F W = 0.5 ρ S V w 2
where ρ denotes the density of air, the value is 1.29 kg / m 3 , and S is the lateral windward area.

3. Double Closed-Loop Control System Design

In this section, we propose a double closed-loop control scheme for coordinating trajectory tracking and self-balancing of the UBR, as depicted in Figure 2.
Specifically, the outer control loop includes the saturated velocity planner based on the hyperbolic tangent function, which eliminates tracking errors and enhances stability under the saturation constraints of longitudinal velocity and yaw rate. Through inverse kinematic, the desired speeds can be transformed to roll angle and taken into the inner balance control loop, which integrates the RBFNN approximator and FSMC. By designing an appropriate fuzzy rule, FSMC adapts the exponential rate reaching law coefficient to attenuate the chattering effect. The RBFNN approximator can identify and compensate for the disturbance term to further improve adaptability and robustness of the control system.

3.1. Sliding Mode Control Law Design

The lateral wind force can generate a torque F w h . Therefore, the dynamic model with the disturbance term can be formulated as follows:
( I + m h 2 ) θ ¨ = m g h θ + m g L a L t sin λ L b δ + m h L a v sin λ L b δ ˙ + L a v ˙ sin λ L b δ + v 2 sin λ L b δ + F w h
To track the desired roll angle θ d from the outer loop, the tracking error of the roll angle is formulated:
e = θ d θ e ˙ = θ ˙ d θ ˙ e ¨ = θ ¨ d θ ¨
Since the system is second-order, the sliding surface functions are defined as
s = c e + e ˙ s ˙ = c e ˙ + e ¨
where c must satisfy the Hurwitz condition, i.e., c > 0 .
Substituting Equations (23) and (24) into (22), the expression of s ˙ can be obtained as follows:
s ˙ = c e ˙ + θ ¨ d 1 I + m h 2 m g h θ + m g L a L t sin λ L b δ + m h L a v sin λ L b δ ˙ + L a v ˙ sin λ L b δ + v 2 sin λ L b δ F w h I + m h 2
To proof the stability of the controller, a Lyapunov function is selected as
V = 1 2 s 2 V ˙ = s s ˙
To satisfy s s ˙ < 0 , the sliding mode control law u is obtained by putting the exponential rate reaching law ( s ˙ = n sgn s k s ) into Equation (25):
δ ˙ = L b ( I + m h 2 ) L a m h v sin λ { c e ˙ + θ ¨ d 1 I + m h 2 m g h θ + m g L a L t sin λ L b δ + m h δ sin λ L b L a v ˙ + v 2 F w h I + m h 2 + n sgn s + k s }
Since the lateral wind force F w is unknown, the sliding mode control law is
u = δ ˙ = L b ( I + m h 2 ) L a m h v sin λ { c e ˙ + θ ¨ d 1 I + m h 2 m g h θ + m g L a L t sin λ L b δ + m h δ sin λ L b L a v ˙ + v 2 + n sgn s + k s }
Then, substituting Equations (25) and (28) into (26) yields the following expression:
V ˙ = s s ˙ = s ( n sgn s k s F w h I + m h 2 ) = n | s | k s 2 F w h I + m h 2 s n | s | 0
where n denotes the upper bound of the disturbance, it needs to be sufficiently large, but a large upper bound will cause chattering. Since F w may be negative due to changes in wind direction and k > 0 , condition n | F w | h I + m h 2 must be satisfied to ensure the above inequality.
Based on the above analysis, the Lyapunov function V is positive definite and V ˙ is negative definite. According to the LaSalle invariance principle, the control system is asymptotically stable. As t , s 0 and the convergence rate of s depends on n.

3.2. RBFNN Approximator Design

The sliding mode control law (27) neglects the disturbance F w h . We define the following disturbance term f to simplify the control law:
f = 1 I + m h 2 m g h θ + m g L a L t sin λ L b δ + m h δ sin λ L b L a v ˙ + v 2 + F w h I + m h 2
where f is uncertain under varying wind conditions and physical measurement error.
Substituting Equation (30) into (27) yields control law:
u = L b ( I + m h 2 ) L a v sin λ · m h c e ˙ + θ ¨ d f + n sgn s + k s
To reduce its impact on self-balancing control, it employs the RBFNN to approximate the disturbance term f. The algorithm of this network is as follows:
h j = exp x c j 2 2 b j 2
f = W * T h ( x ) + ε
where x is the input vector, f is the output, i represents the i-th input of the network input layer, and j is the j-th input of the network hidden layer, h = [ h j ] T is the output of the Gaussian basis function, W * is the ideal network weight, ε is the network approximation error, and ε ε n , c j and b j are, respectively, the center coordinates and width parameters of the Gaussian function.
Disturbances ultimately result in changes in θ and δ . Therefore, the network input is set as x = [ θ , δ ] , and the network output is
f ^ ( x ) = W ^ T h ( x )
where W ^ is the network weight designed by the adaptive law (35).
The obtained approximation term f ^ replaces f in the control law u (31), and the new control law is
u = δ ˙ = L b ( I + m h 2 ) L a m h v sin λ c e ˙ + θ ¨ d f ^ + n sgn s + k s
Substituting Equations (30) and (35) into (25), we get
s ˙ = f + f ^ η sgn s k s = f ˜ η sgn s k s
where
f ˜ = f f ^ = W * T h ( x ) + ε W ^ T h ( x ) = W ˜ T h ( x ) + ε , W ˜ = W * W ^ .
Define the Lyapunov function as ( γ > 0 ), as follows:
L = 1 2 s 2 + 1 2 γ W ˜ T W ˜
From Equations (35) and (36), the following can be obtained:
L ˙ = s s ˙ + γ W ˜ T W ˜ ˙ = s ( f ˜ n sgn s k s ) γ W ˜ T W ^ ˙ = s ( W ˜ T h ( x ) ε n sgn s k s ) γ W ˜ T W ^ ˙ = W ˜ T s h ( x ) + γ W ^ ˙ s ( ε + n sgn s + k s )
The adaptive law is taken as
W ^ ˙ = 1 γ s h ( x )
Substituting the adaptive law (39) into the Lyapunov function, we obtain
L ˙ = ε s n | s | k s 2
Since the approximation error ε is very small, ε ε n and k > 0 , it is necessary to satisfy n ε n to ensure L ˙ 0 . The control system is asymptotically stable according to the LaSalle invariance principle.

3.3. FSMC Design

The inequality (29) indicates that the condition n | F w | h I + m h 2 is necessary. However, a large n will cause chattering, since n sgn s corresponds to the constant rate reaching term in the exponential reaching law. Given that the disturbance | F w | h I + m h 2 is time-varying, n also needs to be adjusted accordingly. To ensure the system rapidly reaches the sliding mode surface while reducing chattering, fuzzy control is introduced to update parameter n, and the fuzzy rules are designed based on experience as follows:
IF s · s ˙ > 0 , n should be increased IF s · s ˙ < 0 , n should be decreased
According to the fuzzy rule, the input variable is taken as s · s ˙ , and the output variable is taken as the switching gain parameter Δ n . The definition of the input and output fuzzy is as follows:
s s ˙ = { N B N M Z O P M P B } Δ n = { N B N M Z O P M P B }
where N B is negative big, N M is negative medium, Z O is zero, P M is positive medium, and P B is positive big.
The membership functions of both input and output variables use triangular, Z-shaped and S-shaped functions, respectively, as shown in Figure 3.
The fuzzy rules is designed as follows:
R 1 : IF s s ˙ is PB THEN Δ K is PB R 2 : IF s s ˙ is PM THEN Δ K is PM R 3 : IF s s ˙ is ZO THEN Δ K is ZO R 4 : IF s s ˙ is NM THEN Δ K is NM R 5 : IF s s ˙ is NB THEN Δ K is NB
The upper bound of the switching gain parameter n is estimated using the integral method:
n ^ = G 0 t Δ n d t
where G is a proportional coefficient.

3.4. Saturated Velocity Planner Design

The state vector of the reference trajectory is [ x r , y r , ϕ r ] , and the actual state vector of the UBR obtained from the kinematic model is [ x , y , ϕ ] . Therefore, the tracking error vector can be expressed as [ e x , e y , e ϕ ] = [ x r x , y r y , ϕ r ϕ ] . The longitudinal, lateral, and yaw angle error can be further obtained:
e 1 = e x cos ϕ + e y sin ϕ e 2 = e y cos ϕ e x sin ϕ e 3 = e ϕ
And the saturated velocity planner [27] is designed as follows:
v d = v r cos e 3 + λ 1 tanh e 1 ω d = ω r + λ 2 v r e 2 sin e 3 1 + e 1 2 + e 2 2 e 3 + λ 3 tanh e 3
where sin e 3 / e 3 = 0 1 cos z · e 3 d z , v r = x ˙ r cos ϕ r + y ˙ r sin ϕ r and ω r = ϕ ˙ r are the reference forward velocity and angular velocity of the trajectory, respectively. λ 1 , λ 2 and λ 3 are the positive design parameters.
Consider the following Lyapunov function as
V 1 = λ 2 2 log ( 1 + e 1 2 + e 2 2 ) + 1 2 e 3 2
Differentiating (47) with respect to time results in
V 1 ˙ = λ 2 ( e 1 e 1 ˙ + e 2 e 2 ˙ ) 1 + e 1 2 + e 2 2 + e 3 e 3 ˙
Differentiating (45) and incorporating the nonholonomic constraint x ˙ sin ϕ y ˙ cos ϕ = 0 yields
e ˙ 1 = ω e 2 v + v r cos e 3 , e ˙ 2 = ω e 1 + v r sin e 3 , e ˙ 3 = ω r ω .
Substituting (46) and (49) into (48) yields the following result:
V ˙ 1 = λ 1 λ 2 e 1 tanh e 1 1 + e 1 2 + e 2 2 λ 3 e 3 tanh e 3 .
Considering the property of the hyperbolic tangent function, for any e 1 and e 3 , we have e 1 tanh e 1 0 and e 3 tanh e 3 0 . Therefore, for any initial error, it follows that V ˙ 1 0 and lim t | e 1 ( t ) | + | e 2 ( t ) | + | e 3 ( t ) | = 0 . Furthermore, according to Equation (45), we obtain lim t | e x ( t ) | + | e y ( t ) | + | e φ ( t ) | = 0 .
Moreover, considering | tanh ( · ) | < 1 , e 2 1 + e 1 2 + e 2 2 < 1 and sin e 3 e 3 < 1 , according to Equation (46) and the properties of inequalities, we have
| v d |   | v r cos e 3 | + | λ 1 tanh e 1 | < | v r | + λ 1 , | ω d |   | ω r | + λ 2 v r e 2 sin e 3 ( 1 + e 1 2 + e 2 2 ) e 3 + | λ 3 tanh e 3 | < | ω r | + λ 2 | v r | + λ 3 .
It can be seen from Equation (51) that by selecting different λ 1 , λ 2 , and λ 3 , v d and ω d can have different ranges, thereby making the system meet the corresponding speed constraint.
To sum up, the double closed-loop control system can be realized by the following steps:
In the first step, the tracking error [ e 1 , e 2 , e 3 ] is obtained from Equation (45). Then, the forward velocity v d and angular velocity ω d required for tracking the trajectory can be obtained from the saturated velocity planner (46).
In the second step, the desired roll angle θ d is obtained through inverse kinematic:
θ d = arctan v d w d g
In the third step, θ d is taken into the inner loop to realize the balance control.
The fourth step is to obtain actual state vector [ x , y , ϕ ] through the kinematic model (5) and take it to the outer loop to achieve closed-loop control.
Through the four steps, we build the double closed-loop control system to realize precise trajectory tracking and self-balancing simultaneously.

4. Results and Discussions

In this section, we train the parameters and structure of the RBF neural network and then verify the above controller in Matlab-Simulink and ROS-Gazebo environment. Specifically, the study employs Matlab R2023b, ROS Noetic, and Gazebo 11.15 with the ROS-Gazebo environment deployed on the Ubuntu 20.04 system.

4.1. RBF Neural Network Train

The physical parameters of the UBR are shown in Table 1. The location of the central mass is uniform random to simulate measurement error. Under normal trail condition, L t is small, so its influence can be neglected.
The simulation results of wind speed are presented in Figure 4, with the relevant parameters set as follows: C = 3.4 m / s , V max 1 = 3.0 m / s , V max 2 = 2.0 m / s , V max 3 = 2.0 m / s , t a = 140 s , t b 1 = 2 s , t b 2 = 140 s , t c 0 = 6 s , t c 1 = 50 s , t c 2 = 140 s , w = 2 π , and S = 0.4 m 2 . The grade of wind varies from Level 1 to Level 5.
During the train process, the inputs are the roll angle θ and the steering angle δ , and the output is the value of function f. We use 1000 random data as train samples with the input range [−1.5, 1.5] and 500 random data as test samples. Since the actual inputs of the RBFNN are e and e ˙ , the random input range of the test samples is set to [−1, 1]. Furthermore, COG’s height h and wind force F w are also random to express the uncertainty. The training results are shown in Figure 5, Figure 6 and Figure 7.
It can be seen from Figure 5 that the mean square error (MSE) is 0.0117741 when the number of hidden layer neurons is 300. But the MSE only decreases by 0.001162 when the number is 450. Hence, we set the number of hidden layer neurons as 300 to avoid increasing the complexity of the network and ensure a good approximation effect. The structure of the RBFNN is 2-300-1 with the parameter b j = 0.65 after training and optimization. The column size of matrix c j is 2 × 300 related to the number of hidden layer neurons. It can be seen from Figure 7 that the optimized RBFNN has a good approximation effect on the test samples with errors distributed between [−0.4, 0.4].

4.2. Matlab/Simulink

From the stability proofs of the FSMC in the above section, the ranges and implications of the control parameters have been derived. Specifically, these constraints include c > 0 and n | F w | h I + m h 2 , where n denotes the upper bound of the disturbance and must be selected as a sufficiently large value. However, a excessively large upper bound will cause chattering. Therefore, the control parameters of the FSMC should be carefully tuned in accordance with these constraints.
Moreover, with the forward velocity set as constant, λ 1 is taken as an extremely small value to make v d almost equal to v r based on the saturation constraints (51). In addition, λ 3 must be adjusted cautiously to maintain maneuverability while avoiding rollover caused by overly rapid heading adjustments. The final control parameters are shown in Table 2.
The reference trajectory data is provided by the Beijing Institute of Technology racing team, which includes straight segments and various curves. Fix the speed to v = 2.0 m / s and simulation step size to 0.01 s .
As illustrated in Figure 8, the UBR achieves precise tracking of the reference trajectory and always locates the outer side of the curves. As the reference path point in each computation cycle is chosen as the closest point ahead of the current rear wheel–ground contact point, a minor tracking delay is unavoidable, and this issue can be alleviated by decreasing the interval between reference path points. Specifically, Figure 9 shows that the trend of lateral deviation is similar to the curvature and their peak times are the same. The reason for the lag phenomenon is that the desired roll angle, the input to the balance control loop, is not a control quantity directly generated by the actuator, which causes the steering angle to rotate in the opposite direction to generate corresponding inertial force and, then, obtain desired roll angle. The phenomenon is also called “left-turn first-right”. Although the lag cannot be avoided, the peak lateral deviation remains within 0.4 m and the peak yaw angle deviation does not exceed 4.5°. Therefore, the controller is effective in complex tracking scenario.
As can be seen from Figure 10, the trend of the steering angle and the roll angle is similar while their directions are opposite, indicating the coupling between these two variables. The simulation results of SMC and the proposed control law are compared under the same control parameters. It is known that both the chattering amplitude and frequency of the roll angle and handlebar angle are significantly reduced under the proposed law. Specifically, the chattering amplitude of the roll angle is constrained within 1°, the effect of which can be neglected. Meanwhile, the chattering amplitude of the handlebar angle is reduced by nearly 20°.
The chattering frequency originates from the high-frequency random wind V d . In the case of the SMC, such wind disturbance induces high-frequency fluctuations in the handlebar angle, which further lead the roll angle to chatter. In contrast, the proposed law is capable of approximating and compensating for the wind, thereby reducing the impact effectively.
The chattering amplitude is associated with the control parameter n. In the SMC, the coefficient n of the n sgn ( s ) term is fixed, which tends to cause large amplitude when the system state crosses the sliding surface. By contrast, the proposed law incorporates a fuzzy control to adaptively adjust this coefficient, thus effectively attenuating the chattering amplitude. What is more, the handlebar angle still rapidly varies due to the ignored steering dynamics. To address this, a low-pass filter is incorporated in the Gazebo simulation to smooth the angle output, which can approximately simulate the effect of steering dynamics.
In summary, the roll angle is stably maintained within ±4.2°, and the lateral tracking deviation is maintained within 0.4 m, within the disturbances of wind and system parameter uncertainties. Therefore, it can be concluded that the UBR remains stable and balanced throughout the entire trajectory tracking process under the regulation of the proposed double closed-loop cooperative control scheme.

4.3. ROS/Gazebo

Gazebo is a 3D dynamic simulator, enabling accurate and efficient simulation of UBR with physical properties. It offers high-fidelity physical simulations, sensor models, as well as user-friendly and program-friendly interaction interfaces [28].
First, a URDF file to describe the UBR is built, which contains precise physical information such as mass, inertia matrix, centroid position and so on. Inaccurate physical parameters could lead to unpredictable mistakes in simulation; thus, we adopted the open-source model from reference [29] and configured the controller based on it. The model is mainly made up of links and joints, while a joint connects two links through a parent–child relationship. The URDF model is shown in Figure 11.
After establishing the URDF model, it is necessary to configure motor controllers for driving the joints. The rear wheel rotation joint uses a velocity controller called “JointVelocityController”, while the front fork steering joint employs a position controller called “JointPositionController”. The underlying layer of these controllers employs the PID algorithm. Proper adjustment of the PID parameters is necessary for smooth joint movements, but it is quite complicated. To simplify this process, we smooth the control command instead. As shown in Equation (53), we first integrate the control output and then filter it. α is the smoothing coefficient, with 0 < α < 1 . The closer α is to 1, the smoother the result, but the slower the response. In the experiment, α is set to 0.92. Finally, we describe the control type of each joint in the “yaml” file.
δ = δ [ t 1 ] + δ ˙ d T δ [ t ] = α δ [ t 1 ] + ( 1 α ) δ
We used C++ 17 and Python 3.0 language to develop the nodes and topics for trajectory tracking and balance control of the UBR.
In this simulation, due to different physical parameters, the controller parameter λ 3 is modified to 2 while other parameters remain unchanged. The direction of the wind force is also set to be lateral at the centroid position. We use ros_bag tool to record the simulation results. The simulation video can be found at the following link: https://www.youtube.com/watch?v=-90zBuK3bcY (accessed on 31 December 2025).
By comparing the simulation results of Matlab and Gazebo as shown in Figure 12, the amplitude of lateral deviation in the Gazebo simulation has increased by 0.2 m and the yaw deviation has increased by 6°. In Figure 13, the amplitude of roll angle has increased by 2° and the handlebar angle has decreased by 5° since the Matlab does not consider steering dynamics. Such results are still within acceptable range, and the simulations in Gazebo prove the feasibility of the proposed control law.

4.4. Discussions

Considering the future deployment of this control law on a real UBR, the potential challenges and corresponding countermeasures are summarized as follows:
  • In Gazebo simulation, the precise position coordinates and roll angle can be directly obtained. However, the collected data are inevitably affected by noise and accuracy in real UBR. Therefore, it is necessary to use RTK technology to achieve centimeter-level location accuracy, and integrate the IMU with Kalman filter to obtain precise roll data.
  • It is different in the response speed and torque limitations of the actuator motor between the real world and the simulation, as well as the mechanical damping and stiffness. Therefore, it is essential to select motors and adjust control parameters to compensate for the differences.
  • A real UBR needs sufficient computing power to ensure real-time performance. For this purpose, the NVIDIA Jetson Orin NX equipped with the ROS system can be adopted. This main controller unit can not only provide adequate computing power, but also conveniently transplant simulation codes to the real UBR.

5. Conclusions

This study investigated coordinated self-balancing and trajectory tracking control of UBR against disturbances. We design RBFNN approximator to compensate disturbance term, and a fuzzy control is introduced to update the switching gain parameter of traditional SMC. The balance controller is integrated with a saturated velocity planner to construct a double closed-loop control system. Experimental validation performed in MatlabSimulink and ROS-Gazebo environments confirmed the effectiveness and superiority of the proposed control scheme. Future research is directed toward integrating obstacle detection into the collision avoidance and autonomous navigation of the UBR.

Author Contributions

Methodology, J.L.; Validation, J.L., C.D. and X.L.; Formal analysis, L.Y.; Investigation, J.L. and X.L.; Writing—original draft, J.L.; Writing—review & editing, C.D. and L.Y.; Visualization, J.L.; Supervision, Q.L. and L.Y.; Project administration, X.L. and L.Y.; Funding acquisition, Q.L. and L.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This work was funded by Open Foundation of National Key Laboratory of Multi-perch Vehicle Propulsion Systems (QDXT-NY-202407-08).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Li, T.; Luo, P.; Gan, S.; Li, A. Balance and motion control of momentum wheeled bicycles. J. Hunan Inst. Eng. (Nat. Sci. Ed.) 2025, 35, 1–8. [Google Scholar]
  2. Wang, B.; Chen, Z.; Zheng, Q.; Liu, X.; Zhao, M.; Liang, B. Observer-Based Disturbance Estimation and Optimal Allocation for the Roll Control of an Unmanned Motorcycle with Control Moment Gyros. In Proceedings of the IECON 2023—49th Annual Conference of the IEEE Industrial Electronics Society, Singapore, 16–20 October 2023; pp. 1–6. [Google Scholar]
  3. Zheng, X.; Zhu, X.; Chen, Z.; Sun, Y.; Liang, B.; Wang, T. Dynamic modeling of an unmanned motorcycle and combined balance control with both steering and double CMGs. Mech. Mach. Theory 2022, 169, 104643. [Google Scholar] [CrossRef]
  4. Efraim, H.; Basri, R. Sensorless Unmanned Bicycle Robot. In Proceedings of the 2022 International Conference on Electrical, Computer, Communications and Mechatronics Engineering (ICECCME), Malé, Maldives, 16–18 November 2022; pp. 1–6. [Google Scholar]
  5. Wang, B.; Deng, Y.; Chen, Z.; Liang, B. Equilibrium compensation based control: A universal control scheme for systems with mismatched disturbances and sensor errors. IEEE Trans. Ind. Electron. 2023, 71, 9590–9600. [Google Scholar] [CrossRef]
  6. Araki, M.; Akimoto, K.; Takenaka, T. Study of riding assist control enabling self-standing in stationary state. SAE Int. J. Veh. Dyn. Stab. NVH 2018, 3, 47–56. [Google Scholar] [CrossRef]
  7. Sumioka, T.; Akimoto, K.; Tsujimura, T.; Takayanagi, S.; Fukushima, K.; Nose, T. Rider cooperative control of rear-wheel-swing motorcycle based on divergent component of motion. IEEE Robot. Autom. Lett. 2023, 9, 223–230. [Google Scholar] [CrossRef]
  8. Huang, Y.; Ren, Y.; Zhuang, W.; Luo, Z.; Liang, Z.; Hou, D. Research on Adaptive Non-singular Terminal Sliding Mode Balance Control for Unmanned Bicycles. Meas. Control Technol. 2024, 43, 37–48+75. [Google Scholar]
  9. Irfan, S.; Zhao, L.; Ullah, S.; Javaid, U.; Iqbal, J. Differentiator- and Observer-Based Feedback Linearized Advanced Nonlinear Control Strategies for an Unmanned Aerial Vehicle System. Drones 2024, 8, 527. [Google Scholar] [CrossRef]
  10. Ramesh, S.; Seo, D.; Drakunov, S. Correction: Sliding Mode Control with Chattering Reduction (American Institute of Aeronautics and Astronautics Inc., AIAA). In Proceedings of the AIAA Science and Technology Forum and Exposition, AIAA SciTech Forum 2025, Orlando, FL, USA, 6–10 January 2025. [Google Scholar]
  11. Yongli, Z.; Liu, Y.; Yi, G. Model Analysis of Unmanned Bicycle and Variable Gain LQR Control. In Proceedings of the 2020 IEEE 9th Joint International Information Technology and Artificial Intelligence Conference (ITAIC), Chongqing, China, 11–13 December 2020; Volume 9, pp. 1196–1200. [Google Scholar]
  12. Zhang, Y.; Yao, Q.; Luo, B.; Chen, N. Robust control of uncertain asymmetric hysteretic nonlinear systems with adaptive neural network disturbance observer. Appl. Soft Comput. 2024, 167, 112387. [Google Scholar] [CrossRef]
  13. Kim, H.; Chang, H. Model Reference Gaussian Process Regression: Data-Driven State Feedback Controller. IEEE Access 2023, 11, 134374–134381. [Google Scholar] [CrossRef]
  14. Alizadeh, M.; Ramezani, A.; Saadatinezhad, H. Fault Tolerant Control in an Unmanned Bicycle Robot via Sliding Mode Theory. Intell. Syst. Robot. (Engl. Ed.) 2022, 4, 139–152. [Google Scholar] [CrossRef]
  15. Li, F. Research on self-balancing unmanned bicycle based on cascade PID control. In Proceedings of the 2021 IEEE 2nd International Conference on Information Technology, Big Data and Artificial Intelligence (ICIBA), Chongqing, China, 17–19 December 2021; Volume 2, pp. 442–446. [Google Scholar]
  16. Xu, Z.; Fan, L.; Zhang, Y.; Li, H. Obstacle avoidance control of the unmanned bicycle based on variable universe fuzzy exponential rate reaching law sliding mode control. In Proceedings of the 2021 8th International Conference on Information, Cybernetics, and Computational Social Systems (ICCSS), Beijing, China, 10–12 December 2021; pp. 115–120. [Google Scholar]
  17. Choi, S.; Le, T.P.; Nguyen, Q.D.; Layek, M.A.; Lee, S.; Chung, T. Toward Self-Driving Bicycles Using State-of-the-Art Deep Reinforcement Learning Algorithms. Symmetry 2019, 11, 290. [Google Scholar] [CrossRef]
  18. Kumar, S.S.; Kumar, A. Modeliranje smanjenog reda i kontrola balansiranja biciklističkog robota. FME Trans. 2021, 49, 919–934. [Google Scholar] [CrossRef]
  19. Yang, T.; Zhang, M.; Sun, W.; Sun, N. Fully-Actuated System Approach-Based Neuroadaptive Control for Underactuated Robots with State Estimation and Delay. IEEE Trans. Cybern. 2025, 55, 3234–3250. [Google Scholar] [CrossRef] [PubMed]
  20. Tian, Y.; Chen, Z.; Deng, Y.; Wang, B.; Liang, B. Steady-State Manifold of Riderless Motorcycles. In Proceedings of the 2022 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Kyoto, Japan, 23–27 October 2022; pp. 3491–3496. [Google Scholar]
  21. Zhou, X.; Shi, X.; Huang, J. Closed-Loop Control for Self-Balancing and Steering of Non-Coaxial Two-Wheeled Robots. Comput. Meas. Control 2023, 31, 140–148. [Google Scholar]
  22. Yu, Y.; Zhao, M. An Improved Path Following Algorithm for Autonomous Bicycle. J. Huazhong Univ. Sci. Technol. (Nat. Sci. Ed.) 2015, 43, 345–350. [Google Scholar]
  23. He, K.; Deng, Y.; Wang, G.; Sun, X.; Sun, Y.; Chen, Z. Learning-Based Trajectory Tracking and Balance Control for Bicycle Robots with a Pendulum: A Gaussian Process Approach. IEEE/ASME Trans. Mechatron. 2022, 27, 634–644. [Google Scholar] [CrossRef]
  24. Chen, K.; Yi, J.; Song, D. Gaussian-Process-Based Control of Underactuated Balance Robots with Guaranteed Performance. IEEE Trans. Robot. 2023, 39, 572–589. [Google Scholar] [CrossRef]
  25. Zhao, Y.; Lu, B.; Fang, Y.; Zhi, J. Variable-Gain Coupling Online Trajectory for Underactuated Mechanical Systems with Unactuated Output Constraints. IEEE Trans. Ind. Electron. 2025, 72, 11865–11874. [Google Scholar] [CrossRef]
  26. Yuan, R.; Zhang, Y.; Geng, L.; Li, X. Robust control of two-wheeled bicycle robot under wind disturbance. In Proceedings of the 2024 2nd Asia Conference on Electronics Engineering (ACEE), Singapore, 19–21 April 2024; pp. 23–29. [Google Scholar]
  27. Yang, L.; Yue, M.; Liu, Y.; Guo, L. RBFNN based terminal sliding mode adaptive control for electric ground vehicles after tire blowout on expressway. Appl. Soft Comput. 2020, 92, 106304. [Google Scholar] [CrossRef]
  28. Zhang, B.; Liu, P. Control and benchmarking of a 7-DOF robotic arm using Gazebo and ROS. PeerJ Comput. Sci. 2021, 7, e383. [Google Scholar] [CrossRef]
  29. Yeh, T.J.; Lin, T.C.; Chen, A.C.B. Robust Balancing and Trajectory Control of a Self-Driving Bicycle. IEEE Trans. Control Syst. Technol. 2024, 32, 2410–2417. [Google Scholar] [CrossRef]
Figure 1. Schematic diagram of the UBR.
Figure 1. Schematic diagram of the UBR.
Actuators 15 00049 g001
Figure 2. Double closed-loop control block diagram.
Figure 2. Double closed-loop control block diagram.
Actuators 15 00049 g002
Figure 3. The membership function curves of the input and output variables.
Figure 3. The membership function curves of the input and output variables.
Actuators 15 00049 g003
Figure 4. Wind speed and grade division.
Figure 4. Wind speed and grade division.
Actuators 15 00049 g004
Figure 5. The curve of the mean square error (MSE) and the number of hidden layer neurons.
Figure 5. The curve of the mean square error (MSE) and the number of hidden layer neurons.
Actuators 15 00049 g005
Figure 6. The curve of the train and test samples.
Figure 6. The curve of the train and test samples.
Actuators 15 00049 g006
Figure 7. The curve of the approximate results and error.
Figure 7. The curve of the approximate results and error.
Actuators 15 00049 g007
Figure 8. Desired versus UBR trajectory.
Figure 8. Desired versus UBR trajectory.
Actuators 15 00049 g008
Figure 9. Numerical simulation of (a) lateral deviation and (b) yaw angle deviation.
Figure 9. Numerical simulation of (a) lateral deviation and (b) yaw angle deviation.
Actuators 15 00049 g009
Figure 10. Numerical simulation of (a) roll angle and (b) handlebar angle.
Figure 10. Numerical simulation of (a) roll angle and (b) handlebar angle.
Actuators 15 00049 g010
Figure 11. UBR model in Gazebo.
Figure 11. UBR model in Gazebo.
Actuators 15 00049 g011
Figure 12. Comparative simulation experiment of (a) lateral deviation and (b) yaw angle deviation.
Figure 12. Comparative simulation experiment of (a) lateral deviation and (b) yaw angle deviation.
Actuators 15 00049 g012
Figure 13. Comparative simulation experiment of (a) roll angle and (b) handlebar angle.
Figure 13. Comparative simulation experiment of (a) roll angle and (b) handlebar angle.
Actuators 15 00049 g013
Table 1. Structural parameters of the UBR.
Table 1. Structural parameters of the UBR.
Parameter NameSymbolSize (Unit)
Massm165 (kg)
Front fork angle λ 72°
Wheelbase L b 1.37 (m)
COG to rear axis L a 0.80∼0.85 (m)
COG’s heighth0.50∼0.52 (m)
The moment of inertiaI11 (kg·m2)
Acceleration of gravityg 9.8 (m/s2)
Table 2. Control parameters.
Table 2. Control parameters.
Controller NameSymbolValue
Planner λ 1 0.000001
λ 2 1.0
λ 3 3.0
FSMCc 50.0
k 20.0
n 10.0
G 0.7
RBFNN γ 20.0
b j 0.3
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.

Share and Cite

MDPI and ACS Style

Liu, J.; Dong, C.; Lu, X.; Liu, Q.; Yang, L. Coordinated Trajectory Tracking and Self-Balancing Control for Unmanned Bicycle Robot Against Disturbances. Actuators 2026, 15, 49. https://doi.org/10.3390/act15010049

AMA Style

Liu J, Dong C, Lu X, Liu Q, Yang L. Coordinated Trajectory Tracking and Self-Balancing Control for Unmanned Bicycle Robot Against Disturbances. Actuators. 2026; 15(1):49. https://doi.org/10.3390/act15010049

Chicago/Turabian Style

Liu, Jinghao, Chengcheng Dong, Xiaoying Lu, Qiaobin Liu, and Lu Yang. 2026. "Coordinated Trajectory Tracking and Self-Balancing Control for Unmanned Bicycle Robot Against Disturbances" Actuators 15, no. 1: 49. https://doi.org/10.3390/act15010049

APA Style

Liu, J., Dong, C., Lu, X., Liu, Q., & Yang, L. (2026). Coordinated Trajectory Tracking and Self-Balancing Control for Unmanned Bicycle Robot Against Disturbances. Actuators, 15(1), 49. https://doi.org/10.3390/act15010049

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop