Reputation: 131
I want to synthesize a H_infinity control system and I want to define it in the form of general control configuration like this form. at first I define relations of blocks with each other:
s=tf('s');
w_1=makeweight(100,10,0.5); % Weight for performance
w2_2=eye(2); % Weight for avoiding over qualify
w3=0;
G=[(0.806*s+0.264)/(s^2+1.15*s+0.202) -
(15*s+1.42)/(s^3+12.8*s^2+13.6*s+2.36);
(1.95*s^2+2.12*s+0.49)/(s^3+9.15*s^2+9.39*s+1.62)
(7.14*s^2+25.8*s+9.35)/(s^4+20.8*s^3+116.4*s^2+111.6*s+18.8)]; % a 2*2 Plant
systemnames='G w_1 w2_2 w3';
inputvar='[u1;u2]';
outputvar='[w_1;w2_2;w3;u1-G]';
input_to_G='[u2]';
input_to_w_1='[u1-G]';
input_to_w2_2='[u2]';
sysoutname='P';
sysic;
After creation of P the function in below will be used to synthesize the control system:
[k1,cl1,Gam1,Info1]=hinfsyn(P,1,1);
But the code faces this error: Error using sysic (line 175) There are an inconsistent number of signals in '+u1-G' portion of OUTPUTVAR.
How the error could be solved and is there a standard method to visualize defined blockes in the code in the form of control system block diagrams?
Upvotes: 0
Views: 422
Reputation: 10762
If G
is 2x2 then u1
must be 2x1 for u1-G
to make sense. But this is being fed into w_1
which is only 1x1. Hence there's a dimension problem, and sysic
is showing that. How to fix that will depend on the block diagram you are actually trying to create.
It's also not clear why you are using W3 at all, as you aren't connecting it to anything.
There's no tool for creating a visualization of the individual components showing how they are connected. You could create a model yourself using Simulink, where each component would be represented by using the LTI System block, see Import LTI Model Objects into Simulink for an example.
Upvotes: 1