from Stability Test of 2-D Face of an Interval Matrix by Yang Xiao
The program can test the stability of 2-D face of an interval matrix.

Stability_2D_Face_Matrix.m
% The program can test the stability of 2-D face of an interval matrix. 
% Copyright (C) Yang XIAO, Beijing Jiaotong University, Aug.2, 2007, E-Mail: yxiao@bjtu.edu.cn.
%
% By relying on a two-dimensional (2-D) face test, Ref [1,2] obtained a necessary and sufficient
% condition for the robust Hurwitz and Schur stability of interval matrices. Ref [1,2] revealed that
% it is impossible that there are some isolated unstable points in the parameter space of the matrix
% family, so the stability of exposed 2-D faces of an interval matrix guarantees stability of the matrix
% family. This program provides the examples to demonstrate the applicability of the robust stability 
% test of interval matrices in Ref [1, 2].
% Remarks: 
% (1) The 2-D face of an interval matrix is Hurwitz stable, if and only if the maximum real part of 
%the eigenvalues of the 2-D face of the interval matrix is smaller than 0 [1]. 
% (2) An interval matrix is Hurwitz stable, if and only if all the 2-D faces of the interval matrix
% is Hurwitz stable.
% (3) The 2-D face of an interval matrix is Schur stable, if and only if the maximum absolute of the
% eigenvalues of all the 2-D faces of the interval matrix is smaller than 1 [1].
% (4) An interval matrix is Schur stable, if and only if all the 2-D face of the interval matrix is Schur stable.
% (5) To determine the stability of interval matrix, needs to test all the 2-D faces of matrices.
% Ref: 
% [1] Yang Xiao; Unbehauen, R., Robust Hurwitz and Schur stability test for interval matrices, 
% Proceedings of the 39th IEEE Conference on Decision and Control, 2000. Volume 5, Page(s):4209 C 4214
% [2]  XIAO Yang, Stability Analysis of Multidimensional Systems, Shanghai Science and Technology Press, Shanghai, 2003.
% The paper [1] can be downloaded from Web site of IEEE Explore.

%continuous systems: 
%Example 1:stable
%a=[-2.478 0 0;0 -.0518 2.;0 -.7115 -.0026]
%a=[-1.4471 0 0;0 -.0194 3.437;0 -.7115 -.0012]
%c=[-2.478 0 0;0 -.0194 3.437;0 -.7115 -.0012]
%b=[-1.4471 0 0;0 -.0518 2.;0 -.7115 -.0026]
%-----------------------------------------------
%Example 2:unstable
%a=[-1.5 -12.06 -.06 0;-.25 -.03 1 .5;.25 -4 -1.03 0;0 .5 0 -4]
%c=[-.5 -12.06 -.06 0;-.25 -.03 1 .5;.25 -4 -1.03 0;0 .5 0 -1]
%c=[-.5 -12.06 -.06 0;-.25 -.03 1 .5;.25 -4 -1.03 0;0 .5 0 -4]
%b=[-1.5 -12.06 -.06 0;-.25 -.03 1 .5;.25 -4 -1.03 0;0 .5 0 -1]
%-----------------------------------------------
%Example 3:unstable
%a=[-3 4 4 -1;-4 -4 -4 1;-5 2 -5 -1;-1 0 1 -4]
%b=[-2 5 6 1.5;-3 -3 -3 2;-4 3 -4 0;.1 1 2 -2.5]
%c=[-3 5 6 1.5;-3 -3 -3 2;-4 3 -4 0;.1 1 2 -2.5]
%Example 4:unstable
%a=[-8 4 4 -6;-5 -6.9 -4 1;-6 2 -8.7 -1;-3.4 0 4 -4.9]
%b=[-2 7.7 6.8 -2;-1 -2 -1 2.2;-4 5.5 -2 4;0 3 5.6 -3]
%c=[-8 7.7 6.8 -2;-1 -2 -1 2.2;-4 5.5 -2 4;0 3 5.6 -3]
%Example 5:unstable
a=[-1 0 1;0 -1 -1;0 1 .1]
%a=[-1 0 1;0 -1 1;-1 0 .1]
b=[-1 0 1;0 -1 0;-1 0 .1]
c=[-1 0 0;0 -1 1;0 -1 .1]
%c=[-1 0 -1;0 -1 -1;1 1 .1]
%--------------------------
%a=[0 1 -1;-1 0 -1;1 1 -1]
%b=[0 1 1;-1 0 -1;-1 1 -1]
%c=[0 1 1;-1 0 1;-1 -1 -1]
%I=eye(3);
%x=[1 1 1];
%y=[1 1 1];
%a=[0 1 -x;-1 0 -y;x' y' -I]
%x=[1 1 1];
%y=[-1 -1 1];
%b=[0 1 -x;-1 0 -y;x' y' -I]
%x=[-1 -1 1];
%y=[1 1 1];
%c=[0 1 -x;-1 0 -y;x' y' -I]
%--------------------------
%Example 6:
%a=[0 3 1;-1 1 0;-1 -4 -2]
%b=[0 3 1;-1 -1 0;-1 -4 -2]
%c=[0 3 1;-1 -1 0;-1 0 -2]
%-----------------------------------------------
%discrete systems:
%Example 1:unstable
%a=[-.5 -.5 .5;1 0 0;0 1 0]
%b=[-.5 -.5 -.5;1 0 0;0 1 0]
%c=[.5 -.5 -.5;1 0 0;0 1 0]
% unstable
%c=[.5 -.5 -.5;1 0 0;0 1 0]
%b=[-.5 -.5 -.5;1 0 0;0 1 0]
%N=3
%-----------------------------------------------
%Example 2:unstable
%a=[-2.125 -1.5 0 .333;1 0 0 0;0 1 0 0;0 0 1 0]
%b=[2.125  -1.5 0 .333;1 0 0 0;0 1 0 0;0 0 1 0]
%c=[-2.13 -1.5 0 .333;1 0 0 0;0 1 0 0;0 0 1 0]
%-----------------------------------------------
%Example 3:stable
%a=[-1.85 -.86;1 0]
%b=[-1.9 -.91;1 0]
%c=[-1.9 -.86;1 0]
%c=[-1.89 -.91;1 0]
%a=[-a1 -a2 ... -aN;1 0 ...0;0 1 ...0;0 ...0 1]
%p=[1 a1 ... aN] 
%Example 4:unstable
%a=[1 -.3785 -.5 .5;1 0 0 0;0 1 0 0;0 0 1 0]
%b=[0 -.3785 -.5 .5;1 0 0 0;0 1 0 0;0 0 1 0]
%c=[.5 -.3785 -.5 .5;1 0 0 0;0 1 0 0;0 0 1 0]
% unstable
%a=[.38 -.3785 -.5 .5;1 0 0 0;0 1 0 0;0 0 1 0]
%b=[0 -.3785 -.5 .5;1 0 0 0;0 1 0 0;0 0 1 0]
%c=[-.38 -.3785 -.5 .5;1 0 0 0;0 1 0 0;0 0 1 0]
%a=[1 0 .3785 .5 -.5]
%b=[1 -1 .3785 .5 -.5]
%Example 4:stable
%a=[.75 -.4 .223 .0336 .0302;1 0 0 0 0;0 1 0 0 0;0 0 1 0 0;0 0 0 1 0]
%b=[.65 -.8 .173 -.1664 -.0198;1 0 0 0 0;0 1 0 0 0;0 0 1 0 0;0 0 0 1 0]
%Example 5:stable
%a=[-1.1 -1.21 -.291;1 0 0;0 1 0]
%b=[-2 -1.53 -.416;1 0 0;0 1 0]
%c=[-1.1 -1.53 -.416;1 0 0;0 1 0]
%c=[-1.1 -1.21 -.416;1 0 0;0 1 0]
%b=[-2 -1.48 -.416;1 0 0;0 1 0]
%c=[-2 -1.53 -.356;1 0 0;0 1 0] 
%Example 6:stable
%a=[.0235 .01   .0045 .2246 .3471
%   .0678 .1371 .4856 .1246 .0111
%   .0001 .0413 .1765 .1789 .3128
%   .0115 .3465 .2264 .0412 .0039
%   .1234 .0345 .0179 .3567 .1183]
%b=[.0628 .03   .0056 .4458 .4582
%   .1    .1469 .5987 .2785 .0162
%   .0001 .0807 .1854 .2047 .425
%   .0123 .3532 .3552 .063  .0145
%   .2446 .0547 .0263 .4814 .1234]
%Example 7:stable
%a=[-.5 .1;-.3 -.4]
%b=[.5 .8;.2 .5]
%Example 6:stable
%a=[-.8 .05;.05 0]
%b=[0 .35;.35 .8]
% stable
%a=[.7 -.2;.45 -.1]
%b=[.7 .45;.45 .2]
%-------------------
%a=[.6 .1;.7 .5]
%b=[.6 .4;.4 .3]
%a=[.6 .1;.4 .3]
%b=[.6 .4;.7 .5]
%--This may be counterexample for [A,B] is stable, iff eig(A*B)<1. 
% unstable
%a=[.5 -.6;-.6 .5]
%b=[.4 -.6;-.6 .4]
%c=[.5 -.4;-.4 .5]
%a=[.5 -.6;.4 .5]
%b=[.5 -.4;.6 .5]
%-------------------
% unstable
%a=[33/24 15/24;-35/24 -13/24]
%b=[-13/24 35/24;-15/24 33/24]
%c=[-13/24 15/24;-35/24 -13/24]
%c=[33/24 35/24;-15/24 33/24]
% stable
%a=[.1 .6;.1 .9]
%b=[.2 .1;.3 .3]
%a=[.4 .4;1 .2]
%b=[.4 .4;.1 .9]
%c=[.4 .4;.1 .2]
%b=[.4 .4;1 .9]
%--------------------------
% unstable
%a=[1.2 -1.1 .4;1 0 0;0 1 0]
%b=[1.5 -1.01 .5;1 0 0;0 1 0]
%c=[-1.525 -1.2 -.5;1 0 0;0 1 0]
%b=[-1.225 -1.11 -.4;1 0 0;0 1 0]
%--------------------------------
ra=max(real(eig(a)))
rb=max(real(eig(b)))
rc=max(real(eig(c)))
M=50
zmax=-1;
xmax=0;
ymax=0;
for i=1:M+1
x(i)=(i-1)/M;
c0=x(i)*a+(1-x(i))*b;
for j=1:M+1
y(j)=(j-1)/M;
c1=y(j)*c0+(1-y(j))*c;
z(i,j)=max(real(eig(c1)));
%zi(i,j)=max(imag(eig(c1)));
%z(i,j)=max(real(eig(c1)));
%z(i,j)=max(abs(eig(c1)));
if z(i,j)>zmax
zmax=z(i,j);
xmax=x(i);
ymax=y(j);
end
end
end
fprintf('display the real part of the eigenvalues of the 2-D face of the given nterval matrix\n')
mesh(x,y,z)
%plot(z,zi)
zmax  % the maximum real part of the eigenvalues of the 2-D face
xmax  % the x coordinate of the maximum eigenvalue 
ymax  % the y coordinate of the maximum eigenvalue
if zmax>0
fprintf('The 2-D face of interval matrix is not Hurwitz stable')
else
    fprintf('The 2-D face of interval matrix is Hurwitz stable')
end 
zlabel('the real part of the eigenvalues of the 2-D face');
xlabel('x-direction');
ylabel('y-direction');

Contact us at files@mathworks.com