I am trying to design a LQR controller with Integral action (Linear-Quadratic-Integral control) for a below plant. The plant has 4 states, 2 inputs and 4 output. Is it possible to track 4 reference using LQI controller?
$$ A = \left(\begin{matrix}-1.340&0.672&-12.9669&9.775\\-2.070&-3.275&1.707&0\\4.405&0.2345&-4.3911&0\\0&1&0.0713&0\end{matrix}\right) $$
$$ B = \left(\begin{matrix}0&-3.0234\\18.624&24.110\\14.073&-7.060\\0&0\end{matrix}\right) $$
$$ C= \left(\begin{matrix}1&0&0&0\\0&1&0&0\\0&0&1&0\\0&0&0&1\end{matrix}\right) $$
Click here for Controller structure (source- https://bit.ly/2LUpU7X)
The system is Controllable and is open loop stable.
Below is the script which I tried to solve in MATLAB:
A_aug = [A, zeros(4,4); -C, zeros(4,4)];
B_aug = [B; zeros(4,2)];
Q = eye(8);
R = eye(2);
F_aug = -lqr(A_aug,B_aug,Q,R);
k = F_aug(:,1:n);
k_i = F_aug(:,end);
But I was getting this error.
Cannot compute the stabilizing Riccati solution S for the LQR design.
This could be because:
* R is singular,
* [Q N;N' R] needs to be positive definite,
* The E matrix in the state equation is singular.
Best Answer
For linear quadratic integral (LQI) control to work, the augmented system has to be stabilizible. This limitation can be also be found in the Matlab documentation of the LQI function.
A linear time invariant (LTI) system is stabilizible, if all its uncontrollable modes are stable. You can first check with the ctrb function if there are uncontrollable modes:
This script gives the output
so your augmented system has two uncontrollable modes. You can also use the ctrbf function to get a Kalman decomposition, which seperates controllable and uncontrollable portions: it finds a similarity transform $T$ such that
$$ \bar{A}_a = T A_a T^T = \begin{bmatrix} A_{a,uc} & 0 \\ A_{a,21} & A_{a,c} \end{bmatrix} $$
where $A_{a,c}$ is the controllable and $A_{a,uc}$ the uncontrollable portion of your augmented system matrix $A_a$. In code:
which outputs
So $A_{a, uc}$ is (practically, up to numerics) a zero matrix, so the uncontrollable modes are not stable because $A_{a, uc}$ is not a Hurwitz matrix.