LQR Optimization problem#
In general, a control optimization problem consists of a cost function, \(\mathcal{J}\), and a dynamical constraint, \(f_k\), that describes how the state evolves over time,
subject to
where \(\ell_k(\cdot, \cdot)\) is the momentary cost function at time \(t\) for a given input \(u_t \in \mathbb{R}^m\) and state \(x_t \in \mathbb{R}^n\). The goal is to find an optimal state feedback law \(u_t^*(x_t)\), that minimizes the cost function \(\mathcal{J}\) given the control sequence \(u^* = \{u_0^*, \ldots, u_{T-1}^*\}\).
Some optimal control problems can be solved using the Dynamic Programming (DP) approach. This method consists of defining a Value function, \(\mathcal{V}_t(x, t)\),
This is the optimal (minimal) cost-to-go from time \(t\) to the terminal time \(T\). In order to initialize the Value function, the terminal boundary condition is defined as \(\mathcal{V}_T(x_T) = \ell_T(x_T)\). Therefore, we can dynamically sweep back through time.
Using the Value function, we can find the optimal control law by finding the argmin of the Value function,
and successively compute the optimal trajectory \(\{x_s^*:T\}\) in a single forward pass,
Linear quadratic program#
Linear Quadratic Regulators (LQR) are a particular class of optimal control problems that are well-structured and can be solved efficiently using quadratic programming. For the LQR problem, the \(\ell_k\) term in Equation (2.1) is defined as
and the terminal cost term,