# LMIs in Control/pages/Inverse Problem of Optimal Control

LMIs in Control/pages/Inverse Problem of Optimal Control

In some cases, it is needed to solve the inverse problem of optimal control within an LQR framework. In this inverse problem, a given controller matrix needs to be verified for the system by assuring that it is the optimal solution to some LQR optimization problem that is controllable and detectable. In other words: in this inverse problem, the controller is known and the LQR gain matrices are to be calculated such that the controller is the optimal solution.

## The System

The system is a linear time-invariant system, that can be represented in state space as shown below:

{\displaystyle {\begin{aligned}{\dot {x}}&=Ax+Bu,\\z&={\begin{bmatrix}Q^{1/2}&0\\0&R^{1/2}\end{bmatrix}}{\begin{bmatrix}x\\u\end{bmatrix}}\end{aligned}}}

where ${\displaystyle x\in R^{n},y\in R^{l},z\in R^{m}}$ represent the state vector, the measured output vector, and the output vector of interest, respectively, ${\displaystyle w\in R^{p}}$ is the disturbance vector, and ${\displaystyle A,B,C,Q,R}$ are the system matrices of appropriate dimension. To further define: ${\displaystyle x}$ is ${\displaystyle \in R^{n}}$ and is the state vector, ${\displaystyle A}$ is ${\displaystyle \in R^{n*n}}$ and is the state matrix, ${\displaystyle B}$ is ${\displaystyle \in R^{n*r}}$ and is the input matrix, ${\displaystyle w}$ is ${\displaystyle \in R^{r}}$ and is the exogenous input, ${\displaystyle C,Q,R}$ is ${\displaystyle \in R^{m*n}}$ and are the output matrices, and ${\displaystyle y}$ and ${\displaystyle z}$ are ${\displaystyle \in R^{m}}$ and are the output and the output of interest, respectively.

## The Data

The matrices ${\displaystyle A,B,C}$ that define the system, and a given controller ${\displaystyle K}$ for which the inverse problem is to be solved.

## The Optimization Problem

In this LMI, the following cost function is to be minimized for a given controller K by finding an optimal input:

{\displaystyle {\begin{aligned}\int _{0}^{\infty }z^{T}zdt\end{aligned}}}

the solution of the problem can be formulated as a state feedback controller given as:

{\displaystyle {\begin{aligned}K&=-R^{-1}B^{T}P,\\A^{T}P+PA-PBR^{-1}B^{T}P+Q&=0\end{aligned}}}

## The LMI: Inverse Problem of Optimal Control

the inverse problem of optimal control is the following: Given a matrix ${\displaystyle K}$, determine if there exist ${\displaystyle Q\geq 0}$ and ${\displaystyle R>0}$, such that ${\displaystyle (Q,A)}$ is detectable and ${\displaystyle u=Kx}$ is the optimal control for the corresponding LQR problem. Equivalently, we seek ${\displaystyle R>0}$ and ${\displaystyle Q\geq 0}$ such that there exist ${\displaystyle P}$ nonnegative and ${\displaystyle P_{1}}$ positive-definite satisfying

{\displaystyle {\begin{aligned}(A+BK)^{T}P+P(A+BK)+K^{T}RK+Q&=0\\B^{T}P+RK&=0\\A^{T}P_{1}+P_{1}A&

## Conclusion:

If the solution exists, then ${\displaystyle K}$ is the optimal controller for the LQR optimization on the matrices ${\displaystyle Q}$ and ${\displaystyle R}$

## Implementation

This implementation requires Yalmip and Sedumi.

## Related LMIs

1. Multi-Criterion LQG]