 # How to include a metzler matrix (off diagonal terms are non-zero) as LMI constraint in a semi-definite problem?

I want to include a 3x3 metzler matrix (non-negative off-diagonal elements) with the elements W(1,3), W(2,1), W(3,1) and W(3,2) to be zero.

The theorem is provided in the figure:

I want to implement Theorem 1 here. The solution is feasible but constraint (10) in Theorem 1 as provided in the image is violated.

The structure of the W matrix should be Metzler matrix with the additional constraint that the off-diagonal elements of W should be the zero as that of the off-diagonal elements of the matrix A22 (system matrix) which are exactly zero.

The Matlab code is provided below:

%%%%%%%%%%% MATLAB CVX CODE %%%%%%%%%%%%%%%%%

% Design of positive observer x_hat_dot = G x_hat + L y, where G=Metzler;L>>0
%for system dynamics x_dot = A x, y = Cx

clear all
clc

% Parameters
p20=0.0155;p30=1.288e-5;p40=0.0365;p50=0.0105;GP0=1.792;
% Maximum parametric perturbations
p2=p20+0.3p20;p3=p30+0.3p30;p4=p40+0.3p40;p5=p50+0.3p50;
% Minimum parametric perturbations
p22=p20-0.3p20;p33=p30-0.3p30;p44=p40-0.3p40;p55=p50-0.3p50;

% Enter system and output matrices
A220=[-p20 p30 0;0 -p40 p40;0 0 -p50]; % System matrix nominal
A22=[-p2 p3 0;0 -p4 p4;0 0 -p5]; % System matrix max
A22m=[-p22 p33 0;0 -p44 p44;0 0 -p55]; % Syatem matrix min
C=[1 0 0]; % Output matric

% LMI for observer design
cvx_begin sdp
variable P(3,3) diagonal
variable Q(3,3) diagonal
variable V(3)
variable W(3,3)

% LMI constraints
Ass=[QA22m-VC-W];
Ass>=0;
P>=0;
Q>=0;
1e-8 <= V([1 2 3]) <= 1e-6;
1e-8 <= W([2 3 6]) <= 1e-5;
[P*A22+A22’*P A22’Q-C’V’-W’;QA22-VC-W W+W’] <= 0;
cvx_end

P
Q
W
V
G = inv(Q)*W
L = inv(Q)*V

I think
` W(A22 == 0) == 0`
will constrain elements of `W` to be zero for which the corresponding elements of `A22` are zero

As for constraining `W` to be a Metzler matrix, I will use the Wikipedia definition that all non-diagonal elements are non-negative (which is different that what you wrote: “non-zero”). I think that can be achieved by
`vec(W-diag(diag(W))) >= 0`

As far as strict (LMI) inequalities which might be needed for theoretical reasons, you need to be careful using `>=` or `<=` , because that allows non-strict inequality to hold. You might need to include a small positive number (multiple of identity matrix for LMI).
So something like:
`LHS + 1e-5*eye(6) <= 0`

I don’t know what \ge\ge in constraint (10) means, so I will defer addressing that.