LQR Controller Design for Single Inverted Pendulum
- Login to Download
- 1 Credits
Resource Overview
Detailed Documentation
Design of LQR Controller for Single Inverted Pendulum
The inverted pendulum represents a classic balancing problem in control theory, widely used to validate control algorithm effectiveness. LQR (Linear Quadratic Regulator) is an optimal control method based on state feedback that effectively achieves stability control for inverted pendulum systems.
System Modeling First, we need to establish the dynamic model of the inverted pendulum, typically derived using Lagrange equations or Newtonian mechanics to obtain nonlinear differential equations. Since LQR applies to linear systems, the model must be linearized around the equilibrium point to obtain state-space representation, including state variables such as pendulum angle, angular velocity, cart position, and velocity.
LQR Design The core of LQR design lies in selecting appropriate state weighting matrix (Q) and control weighting matrix (R), then solving the Riccati equation to obtain the optimal feedback gain matrix K. Weight selection requires balancing control performance against energy consumption - for example, larger Q values can accelerate system response but may lead to larger control inputs. The MATLAB implementation typically involves using the algebraic Riccati equation solver.
MATLAB Implementation In MATLAB, engineers can utilize the built-in `lqr` function to directly compute the feedback gain matrix. The function syntax is typically K = lqr(A,B,Q,R), where A and B are system matrices from the linearized state-space model. Combined with Simulink, users can build simulation models to verify control performance. Through parameter tuning, one can observe performance indicators like settling time and overshoot to optimize control behavior. The implementation often includes real-time plotting of state variables to visualize system response.
Applications and Extensions The LQR control method for single inverted pendulum can be extended to multiple inverted pendulums or other underactuated systems. This approach also provides foundation for learning nonlinear control techniques such as fuzzy control and sliding mode control. The code structure can be modularized for easy adaptation to more complex systems.
- Login to Download
- 1 Credits