The linear quadratic regular (LQR) is a method for solving ๐น๏ธ Optimal Control for a problem that satisfies certain constraints. Specifically, we assume:
- Linear system dynamics:
. - Quadratic stage cost (time-independent):
, with PSD and PD . - Quadratic terminal cost:
, with PSD .
Putting this together, our objective is to optimize
such that
To solve this problem, we call upon principles from the ๐ Bellman Equation and ๐งจ Dynamic Programming. First, rewriting the goal using the bellman equation, with value function
As with other dynamic programming approaches, we'll recursively solve this problem, starting from
The middle matrix is PSD since the sum above is non-negative, and also
Since
and ending with
Continuous Time
We can apply the same principles to continuous time systems, where states follow
and the value function is
With the constraints detailed above, our objective is to optimize
such that
Hamilton-Jacobi-Bellman Equation
Before assuming the LQR constraints, we can first derive a more general form of the solution. Assuming some
where we apply ๐ค Taylor Expansion around
and after applying chain rule and rearranging, we arrive at
This PDE is called the Hamilton-Jacobi-Bellman (HJB) equation.
Riccati Differential Equation
While the HJB equation may be difficult to solve generally, it does have a closed-form solution for the LQR problem. Incorporating the constraints, our HJB equation becomes
with
Similar to the discrete-time solution, we'll look for a
Thus, we have
which is called the Riccati differential equation (RDE). This can be solved backwards in time to find
While it's common to solve the Riccati equation numerically, there is a way to solve it analytically with a auxiliary matrix differential equation,
and defining
we can solve for
and compute
Infinite Horizon
Finally, we can apply LQR to the infinite horizon setting, where
Note that there is no terminal cost,
Forward Riccati Differential Equation
We must first reframe our solution to solve forward in time, instead of backward. Generally, for the Riccati differential equation above, let
so that
with
and the optimal control is
Algebraic Riccati Equation
Observe that the forward RDE has a term with
Thus, the steady state limit
which we call the Algebraic Riccati Equation (ARE).
The value function is thus
and the optimal control is
Observe that
Lastly, this feedback law guarantees