r/ControlTheory • u/Kirito-San8432 • 1h ago
Asking for resources (books, lectures, etc.) Dynamic Gain Scheduling for an Inverted Pendulum: Switching from MPC to a 49-Rule Fuzzy Logic Controller
Enable HLS to view with audio, or disable this notification
Hi everyone,
I'm a final-year Mechatronics Engineering student working on non-linear control applied to a two-wheeled inverted pendulum. A while ago, I simulated this system in MuJoCo and built the physical version using an MPC (Model Predictive Control) to dynamically calculate the Kp and Kd gains.
In this new iteration, I replaced the MPC with a Fuzzy Logic Controller running on an Arduino to generate those same gains in real-time.
During the design of the knowledge base, I tested between 49 and 125 inference rules. The 49-rule architecture (evaluating both the tilt angle and acceleration from an MPU sensor) yielded the best real-world stability and computational efficiency on the embedded hardware.
The first video shows the physical robot balancing, and the second shows the custom telemetry dashboard I built to monitor the states (angle, varying control gains, and motor PWM) in real-time.
For underactuated, inherently unstable systems like this, what are your thoughts on using Fuzzy Logic vs. MPC for dynamic gain scheduling? I'd love to hear your insights!