Linear Quadratic Regulator (LQR)

The linear quadratic regulator (LQR) controller is a well established and widespread optimal controller which acts on a linear system x˙=Ax+Bu and an objective which is specified by a quadratic, instantaneous cost function J=xTQx+uTRu with the symmetric and positive definite matrices Q=QT0 and R=RT0. This allows for reducing the Hamilton-Jacobi-Bellman (HJB) equation, whose solution is the optimal cost-to-go, from which the optimal policy can be inferred, to the algebraic Riccati equation

SA+ATSSBR1BTS+Q=0

for which good numerical solvers exist to find the optimal cost-to-go matrix S. The optimal policy obtained is

u(x)=R1BTSx=Kx.

In order to use an LQR controller for stabilizing the double pendulum on the top, the dynamics have to be linearised around the top position xd=[π,0,0,0] and ud=[0,0]:

A=f(x,u)x|x=xd,u=ud,B=f(x,u)u|x=xd,u=ud

and the state and actuation have to be expressed in relative coordinates x~=xxd, u~=uud.

Region of Attraction (RoA)

For dynamical systems, the Region of Attraction (RoA) B around a fixed point x describes the set of initial states for which xx as t. Direct computation of this set is often not possible. However, it can be estimated by considering the sublevel set of a Lyapunov function V(x) [1]. When using LQR to stabilize the system around x, the cost-to-go can serve as a quadratic Lyapunov function [2]. In this case, the estimated RoA can be written as:

Best={x|xTSxρ}

Where ρ is a scalar that can be estimated using either probabilistic [3] or optimization based methods [4].

For further reading we refer to these lecture notes [2].

References