LQR Control for the Inverted Pendulum on a Cart: Full-State Design

Added:

Nonlinear Control and the Limits of Local Linearization

While the Linear Quadratic Regulator (LQR) is highly effective for stabilizing an inverted pendulum, its validity is strictly local. It relies on a linearized approximation around the upright equilibrium, meaning it cannot handle large deviations, parameter uncertainties, or the swing-up phase from the downward position. To address these limitations, control theorists advocate for Nonlinear Control techniques, such as Sliding Mode Control (SMC) or Lyapunov-based designs. Unlike LQR, these methods do not simplify the system's dynamics through linearization. Instead, they directly command the inherent non-linearities of the physical system. This provides global stability guarantees, robust performance under external disturbances, and the capacity to manage the entire motion profile—including the swing-up phase—which LQR cannot achieve on its own.

State-space representation of dynamical systems, including state vectors, input vectors, and system matrices (A, B, C, D).
Linearization of non-linear physical systems using Taylor series expansion and Jacobian matrices around an equilibrium point.
Fundamental linear algebra concepts, specifically eigenvalues, eigenvectors, and the definition of quadratic forms used in objective functions.
Basic feedback control concepts, including closed-loop stability, pole placement, and the general state-feedback control law (u = -Kx).
Design of state estimators (such as Luenberger Observers or Kalman Filters) for situations where the full state vector is not directly measurable, leading to Linear-Quadratic-Gaussian (LQG) control.
Swing-up control strategies for the inverted pendulum, which combine non-linear energy-based control to raise the pendulum with LQR to stabilize it at the top.
Model Predictive Control (MPC) to handle physical constraints, such as the finite length of the cart track and actuator saturation limits.
Robust control methods (like H-infinity control) to ensure stability in the presence of model uncertainties, friction, and external disturbances.
243.5K views3.7Klikes13:03@EigensteveOriginal Release: 2017-01-29

The Linear Quadratic Regulator (LQR) is an optimal full-state feedback control method that automatically determines the best pole placement by minimizing a quadratic cost function J = ∫(XᵀQX + UᵀRU)dt, where Q penalizes state deviations and R penalizes control effort; in MATLAB, it is implemented with the single command K = lqr(A,B,Q,R), which computes the optimal gain matrix K that stabilizes the system while balancing convergence speed against actuation costs.