Simulation and Comparison Between Controls for Two-Wheeled Self-Balancing Robot
Analyzing PID and LQR Controllers in Matlab/simulink

Project Information
- Keywords:Self-Balancing Robot, PID, LQR, Control Systems, MATLAB/SIMULINK
- Team:
- Ranish Devkota, Gokarna Baskota, Sadanand Paneru, Shuruchi Yadav
Project Overview
This project addresses the challenge of balancing an inverted pendulum using a two-wheeled self-balancing robot. It explores various control strategies, including PID and LQR, through MATLAB/Simulink simulations along with the feasibility with studying the motor current responses since aggressive control might resulting on damages of motor due to heat resulting from surge of current in coil.
Methodology



- Mathematical Modeling: The mechanical system was modeled as an inverted pendulum on a cart, reducing degrees of freedom for analysis.
- DC Motor Response: Modeled using characteristics like 6V input, 0.7Ω resistance, and back EMF (0.08 V/rpm). Current and speed responses were analyzed to ensure feasibility.


Motor Analysis
Motor Specifications:
- Input Voltage: 6V
- Armature Resistance: 0.7Ω
- Back EMF Constant: 0.08 V/rpm
The motor's response was critical in assessing the feasibility of different control strategies. Current and speed characteristics were observed under various disturbances.








Results
PID Controllers: PID stabilized the robot but resulted in continuous motion to compensate for disturbances. Contrastingly, Agressive pid capable of stabilizing the position in closed confinement, however suffers from high transient motor current which might be fatal.
LQR Controller: Achieved superior performance with lower energy consumption and smoother motor response. Current spikes were reduced, and the system remained stable under varying disturbances.
Conclusion
The LQR controller demonstrated optimal performance, balancing the robot efficiently with minimal energy usage. Future work includes real-world validation and noise reduction for enhanced robustness.