Abstract:
Balancing an inverted pendulum mounted on a two-wheeled cart presents a challenging
nonlinear control problem due to its inherent open-loop instability and
the coupled dynamics of the cart and pendulum. Furthermore, the system is
underactuated and includes nonlinearities in both mechanical and electrical domains.
The system investigated in this work is a two-degree-of-freedom platform
where both the cart and the pendulum are free to rotate, each contributing to the
instability. The cart itself cannot balance without continuous wheel actuation,
while the pendulum adds an additional unstable mode, making the configuration
similar to a simplified double-pendulum system, but in a more uncontrolled environment
as it must operate on ground that is not perfectly smooth and flat,
experiencing wheel slip and mechanical dead zones. This study examines whether
effective stabilization can be achieved under a low sensor sampling rate and control
rate of 200 Hz, which is intentionally selected to allow implementation on a
low-cost microcontroller (STM32F103). Such constraints limit the bandwidth of
the controller and increase sensitivity to measurement noise. Furthermore, they
introduce processing limitations due to limited CPU power. Similar work presented
in the literature uses sample rates beyond 500 Hz for simple control and
over 1 kHz for advanced optimal or robust controller implementation. Advanced
optimal control strategies were implemented with a 200 Hz sample and control
rate, including a Linear Quadratic Regulator (LQR) combined with a Kalman
state estimator, and incremental PI motor controllers are utilized to maintain
stability. Despite low sampling rates and the use of the cheapest available IMU
( $1.50 USD), the proposed approach achieves reliable balancing and smooth recovery
from disturbances. In this study, velocity estimation near the operating
point of the implemented system is challenging due to the zero responses at the
operating point, particularly under low sample rates. The Kalman estimator compensates
for these limitations by fusing encoder, accelerometer, and gyro data.