Kalman Filter-Based PID and Nonlinear Counter-Steering for Low-Cost Self-Balancing
DOI:
https://doi.org/10.37256/jeee.5120269976Keywords:
two-wheeled vehicles, self-balancing electric motorcycle, Proportional-Integral Derivative (PID), Inertial Measurement Unit (IMU), Kalman filterAbstract
Two-wheeled vehicles present a significant stability challenge, particularly at low or zero velocity. This paper presents the design, implementation, and validation of a low-cost, open-source self-balancing electric motorcycle prototype that addresses this challenge. The system is based on the inverted pendulum model, employing a Proportional-Integral-Derivative (PID) controller for longitudinal (pitch) stability and a novel counter-steering strategy for lateral (roll) stability. An Inertial Measurement Unit (IMU) provides attitude data, which is processed by a Kalman filter to yield a robust and accurate estimate of the vehicle's tilt angle by effectively fusing noisy accelerometer data and drifting gyroscope data. The entire system is managed by an STM32 microcontroller, demonstrating that advanced control can be implemented on accessible hardware. Experimental results validate the effectiveness of the proposed controller, showing rapid balance recovery within 1–2 s from external disturbances of up to ±5◦ with less than 15% overshoot. This work not only provides a practical implementation of a self-balancing system but also serves as a valuable and replicable platform for further research in intelligent transportation and robotics education.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Chung-Hsing Chao et al.

This work is licensed under a Creative Commons Attribution 4.0 International License.
