Control of a Rotary Inverted Pendulum (Furuta Pendulum)
Control of a Rotary Inverted Pendulum (Furuta Pendulum)
Problem Statement
Design and implement a robust control system to stabilize an inverted pendulum in the upright position and track motor angle setpoints using a Quanser Qube-Servo 2 platform.
Key Results: Successfully achieved upright stabilization and ± 10° square-wave tracking using an LQR controller and a custom state observer implemented on both Simulink and Arduino hardware.
Quanser Qube-Servo 2 platform
Furuta Pendulum Demo 01
Furuta Pendulum Demo 02
System Dynamics & Modeling
To control the system, I first developed a mathematical model using the nonlinear dynamics of the Furuta Pendulum.
Mathematical Model: The system consists of a horizontal rotary arm and a vertical pendulum. The motion is governed by coupled nonlinear differential equations accounting for inertia (J_r, J_p), damping (D_r, D_p), and motor constants (k_m).
System Identification: Conducted experimental step responses to find the system gain (K) and time constant (tau) for the motor, ensuring the model accurately reflected the physical hardware.
Linearization: For controller design, the system was linearized about two equilibrium points: the stable "pendulum down" position and the unstable "upright" position.
Geometry system for system dynamics
State Estimation & Observer Design
The hardware only provides measurements for the motor and pendulum angles (theta, alpha), but the control laws require angular velocities.
Luenberger Observer/Kalman Filter: Designed and implemented a state estimator to derive the full 4-state vector in real-time.
Signal Processing: Compared the observer performance against a simpler derivative with a Low-Pass Filter (LPF) approach to determine the most efficient estimation method for the Arduino's processing constraints.
LQR Control Implementation
Controller Design: Utilizing a Linear Quadratic Regulator (LQR) approach, I optimized the Q and R weighting matrices to balance tracking performance with control effort (motor voltage).
Simulink/MATLAB: Developed a nonlinear simulation to estimate the "catch range" - the maximum angle from which the pendulum could be successfully recovered.
Arduino/C++: Ported the state-space matrices to C++ for standalone hardware execution.
Swing-up & Catch: Implemented a "triggered subsystem" that enabled the LQR controller only when the pendulum was swung into the up right vicinity.
Results & Performance Analysis
Tracking: The system successfully tracked 0.2 Hz square waves with a 10° magnitude in the motor angle while maintaining the pendulum's vertical stability.
Sampling Rate Sensitivity: Analyzed the limits of the digital implementation by testing various sampling rates. I identified the critical frequency at which the system lost stability, comparing these findings with simulated quantization effects.
Discrete vs. Continuous: Evaluated the performance difference between controllers designed in the continuous-time domain versus those designed directly in discrete-time at various frequencies.
Technical Skills Demonstrated
Tools: MATLAB, Simulink, Arduino (C++), Quanser Qube-Servo 2.
Control Theory: LQR Control, State-Space Representation, Luenberger Observers, PID Tuning, System Identification.
Embedded Systems: Real-time signal processing, discretization of continuous systems, and hardware-in-the-loop (HIL) testing.