State Space Model for Single Inverted Pendulum System

Resource Overview

State Space Model for Single Inverted Pendulum System with LQR Control Implementation

Detailed Documentation

The state space model of the single inverted pendulum serves as a classic research object in control theory. By establishing its mathematical model, we can analyze the system's dynamic characteristics and design controllers. The inverted pendulum system is inherently nonlinear, but typically undergoes linearization around the equilibrium point to derive the state space representation. The state variables generally include pendulum angle, angular velocity, cart position, and cart velocity. In MATLAB implementation, these states are typically organized as a column vector x = [θ, θ̇, x, ẋ]ᵀ for controller design.

LQR (Linear Quadratic Regulator) is a commonly used method for controlling inverted pendulums. It obtains the optimal feedback gain matrix by solving the Riccati equation, regulating the system states to the equilibrium position. The advantage of LQR lies in its ability to simultaneously consider the cost of system states and control inputs, achieving different control effects by adjusting the weighting matrices. The key to stable control resides in selecting appropriate Q and R matrices, which directly affect system response speed and energy consumption. In practical implementation, the lqr() function in MATLAB can be used to compute the optimal gain matrix K based on the system matrices A, B and weighting matrices Q, R.

Practical applications must also consider model errors, sensor noise, and actuator saturation issues. Through proper controller parameter design, the single inverted pendulum can quickly recover balance after disturbances, demonstrating the effectiveness of state space methods and LQR control. Simulation typically involves implementing the state feedback law u = -Kx and integrating the system dynamics using numerical methods like ode45 to verify controller performance under various conditions.