WOLFRAM|DEMONSTRATIONS PROJECT

Linear Quadratic Regulator Control of an Inverted Pendulum with Friction

The linear quadratic regulator (LQR) method is used to generate a control force that brings an inverted pendulum from an initial condition back to the upright position in an optimal way. The state space
x'(t)=Ax(t)+Bu(t)
is used to represent the dynamics of the system. Static and Coulomb friction forces act as external disturbances. Coulomb friction causes an oscillation of the cart position around the equilibrium position (
x=0
). When only viscous friction is present, LQR brings the pendulum to the upright position since viscous friction is included in the
A
state matrix, while Coulomb friction is included in neither the
A
nor the
B
matrix. A standard friction model is used and is described below. The eigenvalues of the closed-loop state matrix
A-BK
(where
K
is the gain vector generated by LQR) are all located in the left side of the complex plane, showing that the resulting system is stable.