Design and Simulation of an Inverted Pendulum PID Control System Using Scilab Xcos

Authors

  • Kennenth Hartono Politeknik Elektronika Negeri Surabaya Author
  • Riza Zaki Affifuddin Author
  • Muhamad Nabil Anandiansyah Author
  • Nobby Bagus Muliawan, S.Tr.T., M.Tr.T Author

Keywords:

Control systems education, Inverted pendulum, open-source practicum, PID control, Scilab Xcos, Ziegler-Nichols tuning

Abstract

The inverted pendulum is a naturally unstable, under-actuated nonlinear mechanical system widely used as a benchmark in control theory. This paper presents the mathematical modeling and Scilab Xcos simulation of a Proportional-Integral-Derivative (PID) control system for an inverted pendulum. The methodology encompasses mathematical modeling using Free Body Diagram (FBD) analysis and Newton’s Second Law, followed by simulation in the open-source Scilab Xcos environment. The PID controller is tuned starting from a Ziegler-Nichols estimate and then refined manually against the simulated response. Simulation tests were conducted with initial angles of 0.1 rad, 0.5 rad, and 1.0 rad using nominal system parameters (pendulum mass  = 1 kg, pendulum length  = 0.5 m, viscous damping  = 0.25 N·m·s/rad). The results indicate that the resulting gains,  = 30,  = 2.5, and  = 20, successfully stabilize the system, exhibiting underdamped characteristics where larger initial angles produce greater overshoot. Because the model is built entirely in the free, open-source Scilab Xcos environment, the resulting platform is intended as a low-cost model for control systems laboratory practicum. Physical hardware implementation using an ESP32 microcontroller and an extension to a Linear Quadratic Regulator (LQR) for multi-variable (cart position and pendulum angle) control, together with an explicit performance comparison against the PID design presented here, are identified as future work.

Downloads

Download data is not yet available.

Downloads

Published

2026-10-30

How to Cite

Design and Simulation of an Inverted Pendulum PID Control System Using Scilab Xcos. (2026). Journal of Applied Mechanics, Mechatronics, and Energy Systems, 1(1), 25-30. https://journals.pens.ac.id/jammes/article/view/124