LQ Control
Recap
The theory of optimal control is concerned with operating a dynamic system at minimum cost.
The infinity horizon LQ optimal control problem is formulated as:
$$ \min_{u(t),\,t\in [0,\infty )} J(u)=\min_{u(t),\,t\in [0,\infty )} \int_{t=0}^{\infty } \left(x^T (\tau )Qx(\tau )+u^T (\tau )Ru(\tau )\right)d\tau $$Matrices $Q=Q^T \ge 0,R=R^T >0$ are the design parameters chosen according to the desired performance tradeoff.
Solvability
Necessary conditions to the solution of this problem are related to the reachability and observability of the LTI system
$$ \left\lbrace \begin{array}{ll} \dot{x} (t)=Ax(t)+Bu(t), & x(t)\in {\mathbb{R}}^n \newline y(t)=Cx(t) & \end{array}\right. $$Reachability matrix:
$$ M_R (A,B)=[B AB A^2 B \cdots A^{n-1} B] $$Observability matrix:
$$ M_O (A,C)=\left\lbrack \begin{array}{c} C\newline CA\newline CA^2 \newline \vdots \newline CA^{n-1} \end{array}\right\rbrack $$
|
|
If
$$\rho (M_R )=\rho (M_O )=n$$then the closed-loop system described by the state equation
$$\dot{x} (t)=(A-BK)x(t)$$is asymptotically stable.
If their rank
$$\rho (M_R )=n$$then the optimal solution exists and it’s equal to
$$u^* (t)=-Kx(t)$$$$ K=R^{-1} B^T P $$Where $P=P^T ,P>0$ is the solution to the Algebraic Riccati Equation (ARE)
$$ Q-PBR^{-1} B^T P^T +PA+A^T P=0 $$The infinite horizon LQ optimal control control law $u(t)=-Kx(t)$ is realized through a static state feedback control architecture.

Tuning
Tuning LQ regulators implies choosing the weight matrices Q and R.
Q and R are usually chosen as diagonal matrices, so that for a
system with n states and p control inputs we have n+p parameters to choose. The diagonal values $q_{jj} \ge 0$ and $r_{jj} \ge 0$ are chosen according to the relative importance of each state and control variable.
Q is usually expressed as a multiplication of 2 matrixes (cholesky factorization of Q)
$$ Q=C_q^T C_q $$
|
|
Then, it is possible to find K:
|
|
Example
The double integrator is a common example in control theory. It models the dynamics of a simple mass in along an axis under the effect of a time-varying force input u.

The problem will be divided in 2 parts:
- Calculating K
- Testing
Calculating K
The matrix Q will be fixed, and three cases will be considered by varying the parameter R.
|
|
Testing
At first there is the needing to calculate the system at steady state.

Then it’s possible to plot the results and doing the valuation.
|
|

|
|

|
|
