Guaranteeing Stability of a NCS with a Decentralized State Feedback Controller - Example

This example shows how to find a statefeedback control law with fast convergence.

Contents

ovrapx='JNF';
drpmdl = 'explicit';
lyap = 'pardep';

Define the Network Control System

The plant is a decentralized controller which is given as

$$ \dot{x}_1= A_1x_1 +B_1pu_1 + A_{c1}x_2 + B_{c1}u_2 $$

$$ \dot{x}_2= A_2x_2 +B_2pu_2 + A_{c2}x_1 + B_{c2}u_1 $$

with feedback

$$ u_1 = K_1x_1 $$

$$ u_2 = K_2x_2. $$

The subsystem matrices are given as

A1=[0.6  -4.2;
    0.1  -2.1];
B1=[0.7   1.9;
    0     1];

K1= [1.94 -1.40;
   -0.56 -0.86];

A2=[-3.2  0.2;
    5.3  -0.2];
B2=[0.8;
   -0.4];
K2 = [1.36 0.81];

and the coupling matrices are given as

Ac1 = [0.1   2.1;
       0.01   0];
Ac2 = [0     0;
       0  -0.03];

Bc1 = [-0.02;
       -0.01];
Bc2=[0 0;
     0 0];

We can express this as one system with the expression

$$ \dot{x}= Ax +Bu $$

$$ u= Kx$$

where

A=[A1 Ac1;
   Ac2 A2];
B=[B1 Bc1;
   Bc2 B2];
K= [K1  zeros(2);
    0 0    K2];
%plotting options
gamma=0;

hnom=1;
hStep=0.04;

tauStep=0.04;
taumax=1;
taumin=0;

% %%
% tau=taumin;
% hmax=hnom;
% hmin=hnom;
% %StabReg_lower = [h tau];
% lastStable = 0;
% while tau >=taumin && tau <= taumax && tau <=hmin
%     ncs1 = dncs(A,B,K,[hmin hmax],[taumin tau],0,drpmdl);
%     [stable, K] = isNcsStable(ncs1,lyap,gamma,ovrapx);
%     if stable == 1
%         figure(1);
%         plot(hmin,tau,'g.','Markersize',15)
%         plot(hmax,tau,'g.','Markersize',15)
%         title('h_{mati}, \tau_{mad}  Tradeoff Plot')
%         xlabel('h_{mati}');
%         ylabel('\tau_{mad}');
%         hold on;
%         figure(1);
%         %StabReg_lower(end+1,:)=[h tau];
%         hmin = hmin - hStep;
%         hmax = hmax + hStep;
%     elseif stable == 0
%         title('h_{mati}, \tau_{mad}  Tradeoff Plot')
%         xlabel('h_{mati}');
%         ylabel('\tau_{mad}');
%         plot(hmin,tau,'rx')
%         plot(hmax,tau,'rx')
%         hold on;
%         figure(1);
%         if lastStable == 1
%             tau = tau + tauStep;
%         else
%            hmin = hmin + hStep;
%            hmax = hmax - hStep;
%         end
%     end
%     lastStable = stable;
% end
%
% disp('Tradeoff plot COMPLETE!!!')