Journal of Fuzzy Systems and Control, Vol. 3, No 1, 2025

Trajectories Tracking Control for Rotary Inverted Pendulum using Backstepping Method

Ha-Gia-Bao Pham 1, Huy-Khai Nguyen 2,*, Tran-Quoc-Tuan Nguyen 3,  Van-Dong-Hai Nguyen 4, Ngoc-Quy Dao 5,

Van-Quy-Hai Ngo 6, Thanh-Son Tran 7, Hien-Dat Phan 8, Gia-Huy Chu 9, Hoang-Tien-Phat Huynh 10 

1, 2, 3, 4, 6, 7, 8 Faculty of Electrical and Electronics Engineering, Ho Chi Minh City University of Technology and Education (HCMUTE), Vietnam

5 Faculty of International Training, Ho Chi Minh City University of Technology and Education (HCMUTE), Vietnam

9,10 Faculty of Vehicle and Energy Engineering, Ho Chi Minh City University of Technology and Education (HCMUTE), Vietnam

Email: 1 20151087@student.hcmute.edu.vn, 2 20151381@student.hcmute.edu.vn, 3 21161381@student.hcmute.edu.vn,

4 hainvd@hcmute.edu.vn, 5 19142101@student.hcmute.edu.vn, 6 21151454@student.hcmute.edu.vn,

7 21151158@student.hcmute.edu.vn, 8 21151092@student.hcmute.edu.vn, 9 19145060@student.hcmute.edu.vn,

10 21145233@student.hcmute.edu.vn   

*Corresponding Author

Abstract—Rotary inverted pendulum (RIP) is a fundamental yet challenging benchmark system in control engineering due to its nonlinear dynamics, instability, and underactuated nature. This study addresses the problem of trajectory tracking control for RIP, which is critical for ensuring system stability and accurate motion control in various engineering applications. Simulation results demonstrate that the backstepping approach achieves superior performance in terms of tracking accuracy, robustness, and convergence speed compared to traditional methods. The findings emphasize the effectiveness of backstepping in addressing control challenges in nonlinear systems, offering insights for future research in both theoretical advancements and real-world applications.

Keywords—Rotary Inverted Pendulum; STM32F4; Back-stepping Control

  1. Introduction

RIP is a classic example of a nonlinear and underactuated system [1] that poses significant challenges in control engineering. As a benchmark for evaluating control strategies, it is widely used in both academic research and practical applications. The dynamics of RIP are inherently unstable, making trajectory tracking a complex task that requires sophisticated control techniques [2].

In recent years, various control methods have been proposed to achieve accurate trajectory tracking for this system, including LQR control, fuzzy logic control, and sliding mode control. Among these methods, the backstepping technique has gained prominence due to its systematic design process and capability to handle the nonlinear nature of the system effectively [3]. Backstepping control allows for a step-by-step stabilization of the system by breaking down the control problem into manageable subproblems, ultimately leading to enhanced performance in trajectory tracking tasks [4].

This survey aims to review and analyze the existing literature on trajectory tracking control RIP using the backstepping method. By compiling various approaches, methodologies, and experimental results, this paper provides insights into the effectiveness and applicability of backstepping control in achieving precise trajectory tracking [5]. Furthermore, the challenges and future directions in this area of research are discussed, highlighting the potential for further advancements in control strategies for complex nonlinear systems [6]. The state-of-the-art control strategies for RIP emphasize robustness and precision, yet many approaches face challenges in addressing the nonlinear and unstable dynamics comprehensively. The novelty of this research lies in its focus on backstepping control, which offers a systematic and recursive approach to stabilization and trajectory tracking. Unlike other methods, backstepping provides a structured mechanism to design controllers for nonlinear systems, enabling superior tracking performance under various conditions. The primary contribution of this study is its consolidation of existing work on backstepping control for RIP, providing valuable insights into its theoretical foundations, practical applications, and performance metrics. Furthermore, the paper identifies potential challenges and proposes future directions to enhance control strategies, making it a significant addition to the literature on nonlinear system control.  

  1. Mathematical Model

RIP is illustrated in Fig. 1 consisting of two main links. The first link represents the pendulum, while the second link corresponds to the arm. The angles of the pendulum and arm are denoted by α and β, respectively.

The Motor parameters related to the model are provided in Table 1.

A diagram of a circle with a triangle and a triangle

Description automatically generated

  1. Modeling the system

Total kinetic energy of system is [7]:

(1)

Total potential energy of system is [7]:

(2)

Lagrangian operator is:

(3)

By Euler- Lagrange method, dynamic equations of system are:

(4)

(5)

Solve (4) and (5), the dynamic equations of the pendulum areobtained as:

(6)

(7)

The control signal is converted from the torque of the DC motor to the voltage applied to the DC servo motor using the formula:

(8)

where  

These parameters are listed in Table 1:

  1. Motor parameters

0.1748

0.0529

11.7320

0.0015

0.0198

3.7649e-05

Combining (6), (7), (8), we have the kinetic equations of the RIP: [7]

(9)

Where

System parameters are shown in Table 2:

  1. Parameters of system

No

Para-meter

Description

Unit

Value

1

Mass of pendulum

Kg

0.027

2

Length of pendulum

m

0.328

3

Inertial moment of pendulum

Kg.m

0.0046617

4

Length ofarm

m

0.205

5

Inertial moment of arm

Kg.m

0.0019

6

Gravitation acceleration

m/s2

9.81

7

Friction of arm

NA

0.0017

8

Friction of pendulum

NA

0

We assume that [7]:

Defining the state variables as:

The system in state space equation: [7]

(10)

(11)

where:

From (6) to (9) operators ,  are found and then substituted into (11) to estimate matrix A and B in (12).

   

(12)

  1. Backstepping Controller

In the context of backstepping control, the initial step involves defining a stabilizing variable and ensuring partial stability for the first subsystem through Lyapunov's stability theory. This establishes the groundwork for the recursive design approach.

Step 1: The new control variable is defined as: [7]

(13)

Where  is design constant

(14)

A positive definite Lyapunov function is chosen as follows:

(15)

According to the Lyapunov criteria, an appropriate stabilizing function should be selected to determine the desired value of the virtual input for the first subsystem to satisfy:

(16)

We obtain the stabilizing function:

(17)

Where  is a designed positive constant.

Next, we focus on refining the control law by introducing additional stabilizing variables for the subsequent subsystems, ensuring that the entire system moves toward achieving global stability and overall performance objectives.

Step 2: The corresponding error variable is defined as follows:

(18)

(19)

By substituting equation (10) into equation (18), we obtain:

(20)

By substituting equation (13) into equation (19) , we obtain

(21)

We set:

(22)

So can be rewritten as:

(23)

Analyzing the stability of the system, we find:

(24)

From equation (13) and equation (14), we have:

(25)

Derivative (24):

(26)

By substituting equation (25) into equation (26) into, we obtain:

(27)

To ensure that  is negative definite, the desired dynamics of   can be expressed as:

(28)

Where is designed positive constant

Replacing (13), (18) and (23) into (28),  we have the control law as below:

(29)

where  are chosen by trial-and-error test and listed in Table 3:

  1. Parameters of back-stepping control 

99.1100

95.7100

0.0190

  1. Simulation And Experiment

In this study, backstepping controller is implemented to stabilize and control RIP, which is a nonlinear system characterized by complex dynamics between pendulum and its supporting base. Simulations and experimental trials are conducted to verify feasibility, accuracy, and performance of the controller [8]. Results enable comparisons with alternative control strategies and provide an assessment of their respective advantages and disadvantages under real-world operating conditions [9].

  1. Simulation result:

In the simulation section, we will re-model the system using MATLAB Simulink [10]. We will simulate RIP with the backstepping controller as follow:

  1. The embedded program which is created by MATLAB/Simulink blocks for STM32F4

Description of blocks in Fig. 2:

  1. Block that registers Waijung blockset
  2. Block that registers UART
  3. Block control position of the arm
  4. Block control position of the pendulum
  5. The block transfers signal to control the motor speed and rotation direction when receive output control signal of block the blacksteping control
  6. Backstepping control
  7. Block that collects data and transfers data to the computer

According to Fig. 3 and Fig. 4, the simulated backstepping controller yields fairly good results; although there is still some error in trajectory tracking, it remains a promising signal for proceeding to the experimental implementation of the actual controlle

  1. Trajectory Tracking Simulation

  1. Non-Trajectory Tracking Simulation
  1. Experiment result:

Fig. 5 is the hardware model of RIP used for experimentation [9]:

A close-up of a machine

Description automatically generated

In which:

  1. 1-Pendulum rod.
  2. 2-Arm.
  3. 3-Pendulum encoder (600 P/R).
  4. 4-Nisca NF5475E motor.
  5. 5-Arm encoder (600 P/R).
  6. 6-STM32F407-DISC1 kit.
  7. 7-HI216 bridge.
  8. 8-12V – 5A power supply.
  1. RIP hardware model

Through MATLAB software, the experiments on the real model following the square wave trajectory demonstrated good performance (Fig. 6) with a small error of approximately 1.3 and the signal appearing relatively stable.

Using MATLAB software, the experiments on the real model tracking the zero point showed an error of only 0.5 ( Fig. 7), with the signal being quite stable and responding well. After achieving satisfactory simulation results, we proceeded to test the backstepping controller on the physical model to verify its stability. Initially, we observed that the alpha signal adhered to the trajectory of the square wave, with an acceptable error margin. However, some noise still persists, and we also noted that the signals obtained from the physical experiments exhibit a relatively high degree of similarity [11]. Therefore, we can conclude that the process of system identification from the physical model to the mathematical equations demonstrates a considerable level of reliability. Regarding the zero tracking control, the feedback signal, after a brief period, also successfully tracked zero, although there remains a small, acceptable error [12].  According to the experimental results, we observe that trajectory tracking leads to more stable and optimal control of the model, thereby providing a basis for further development of this algorithm in the future.

  1. Trajectory Tracking Experiment

  1. Zero Point Tracking Experiment
  1. Conclusion

In this paper, we presented a comprehensive survey of trajectory tracking control for RIP using the backstepping method [13]. We analyzed various approaches to stabilizing RIP while effectively tracking desired trajectories. The backstepping technique demonstrates significant advantages in managing the inherent instability of the system [14]. We reviewed multiple control strategies and their performance metrics, highlighting their strengths and weaknesses. Our findings indicate that backstepping control not only enhances system stability but also improves tracking accuracy compared to traditional methods [15]. Future work will focus on refining these control strategies [16] and exploring their applicability in more complex dynamic environments [17].

In addition to the theoretical analysis, we also observed the performance of the backstepping method through simulations and experimental implementations. Simulation results indicate that the backstepping controller significantly reduces trajectory tracking error and ensures faster convergence when compared to traditional control techniques such as PID and LQR [18]. Specifically, the controller exhibits better robustness against external disturbances and system uncertainties, which are common in real-world applications. Experimental results further corroborate these findings, demonstrating that the backstepping method can achieve stable and precise trajectory tracking in practical scenarios. In tests, the RIP system successfully followed predefined trajectories, maintaining stability even in the presence of external perturbations and parameter variations. These results highlight the practical viability of backstepping control for real-time applications. The findings from both simulations and experiments confirm the effectiveness of the backstepping method in trajectory tracking for the RIP. Moving forward, future work will focus on optimizing controller design for improved efficiency and robustness. Additionally, exploring adaptive and learning-based techniques could enhance the backstepping controller’s performance in more dynamic and uncertain environments. These advancements will pave the way for more sophisticated control strategies for nonlinear and underactuated systems in practical applications.

Acknowledgment

This paper belongs to project for students of Ho Chi Minh City University of Technology and Education (HCMUTE) for year 2025. Mr. Ha-Gia-Bao Pham is key person of this project. We also want to give thanks to Ms. Eng. Tran-Minh-Nguyet Nguyen (HCMUTE) due to her supervision for us to complete this project.

References
  1. Đ. V. Chí, et al., “Application of Backstepping Algorithm for Stabilizing the Pendubot System: Simulation and Experimentation," Electronic Journal of Science and Technology in Transportation, pp. 27-37, 2023, https://doi.org/10.58845/jstt.utt.2023.vn.3.4.27-37.
  2. J. Huang et al., "Control of rotary inverted pendulum using model-free backstepping technique," IEEE Access, vol. 7, pp. 96965-96973, 2019,  https://doi.org/10.1109/ACCESS.2019.2930220.
  3. Y.-S. Lu et al., "An improved backstepping design for the control of an underactuated inverted pendulum," Journal of Mechanical Science and Technology, vol. 27, pp. 865-873, 2013. https://doi.org/10.1016/B978-0-12-817582-8.00008-8.
  4. J. Zhou et al., Adaptive backstepping control. Springer. 2008. https://doi.org/10.1007/s12206-013-0203-y.
  5. L. E. Ramos-Velasco et al., "Rotary inverted pendulum: Trajectory tracking via nonlinear control techniques," Kybernetika, vol. 38, pp. 217-232, 2002  https://doi.org/10.1016/0167-6911(94)00039-X | MR 1325676.
  1. A. Jabbar et al., "Nonlinear stabilizing control of a rotary double inverted pendulum: a modified backstepping approach," Transactions of the Institute of Measurement and Control, vol. 39, pp. 1721-1734, 2017, https://doi.org/10.1177/0142331216645174.
  2. M. T. Vo, et al., "Back-stepping control for rotary inverted pendulum," Journal of Technical Education Science, vol. 15, pp. 93-101, 2020, https://jte.edu.vn/index.php/jte/article/view/110.
  3. N. Gupta and L. Dewan, "Modeling and simulation of rotary-rotary planer inverted pendulum," in Journal of Physics: Conference Series, p. 012089, 2019,  https://doi.org/10.1088/1742-6596/1240/1/012089.
  4. V. Sukontanakarn and M. Parnichkun, "Real-time optimal control for rotary inverted pendulum," American journal of applied sciences, vol. 6, p. 1106, 2009, https://doi.org/10.1016/j.aej.2013.11.006.
  5. P.-L. Nguyen et al., "Adaptive Evaluation of LQR Control using Particle Swarm Optimization for Pendubot," Journal of Fuzzy Systems and Control, vol. 2, pp. 58-66, 2024, https://doi.org/10.59247/jfsc.v2i2.203.
  1. A. de Carvalho Junior et al., "Model reference control by recurrent neural network built with paraconsistent neurons for trajectory tracking of a rotary inverted pendulum," Applied Soft Computing, vol. 133, p. 109927, 2023, https://doi.org/10.1016/j.asoc.2022.109927.
  2. I. M. Mehedi et al., "Underactuated rotary inverted pendulum control using robust generalized dynamic inversion," Journal of Vibration and Control, vol. 26, pp. 2210-2220, 2020, https://doi.org/10.1177/1077546320916022.
  3. K. Singh, S. Nema and P. K. Padhy, "Modified PSO based PID sliding mode control for inverted pendulum," 2014 International Conference on Control, Instrumentation, Communication and Computational Technologies (ICCICCT), pp. 722-727, 2014, https://doi.org/10.1109/ICCICCT.2014.6993054.
  4. M. F. Hamza et al., "Current development on using Rotary Inverted Pendulum as a benchmark for testing linear and nonlinear control algorithms," Mechanical Systems and Signal Processing, vol. 116, pp. 347-369, 2019, https://doi.org/10.1016/j.ymssp.2018.06.054.
  5. S. Vaidyanathan and A. T. Azar, "An introduction to backstepping control," in Backstepping Control of Nonlinear Dynamical Systems, pp. 1-32, 2021, https://doi.org/10.1016/B978-0-12-817582-8.00008-8.
  1. A. Stotsky et al., "The use of sliding modes to simplify the backstepping control method," in Proceedings of the 1997 American Control Conference (Cat. No. 97CH36041), pp. 1703-1708, 1997. https://doi.org/10.58845/jstt.utt.2023.vn.3.4.27-37.
  2. N.-C. Tran et al., "LQR Control for Experimental Double Rotary Inverted Pendulum," Journal of Fuzzy Systems and Control, vol. 2, pp. 104-108, 2024, https://doi.org/10.59247/jfsc.v2i2.212.
  3. A. U. Darajat et al., "Trajectory Tracking Control of Four Omni-wheels Robot using PID and Pole Placement State Feedback Controller for Telepresence Robot Applications," International Conference on Advanced Mechatronics, Intelligent Manufacture and Industrial Automation (ICAMIMIA), pp. 336-340, 2023,  https://doi.org/10.1109/ICAMIMIA60881.2023.10427669.

Ha-Gia-Bao Pham, Trajectories Tracking Control for Rotary Inverted Pendulum using Backstepping Method