Reducing state space order by doing matrix operations

2 ビュー (過去 30 日間)
Barkat
Barkat 2018 年 7 月 27 日
コメント済み: Aquatris 2018 年 8 月 1 日
Dear All
I have (11 by 11) state matrix, three inputs and 9 outputs in the attached MATLAB file. I want to drop the second plant input , first four outputs, output number 6, 7 and 8 , as I dont need these for further operations by using a controller just like an attached example. can anyone please help me in this regard?
A1 = [-0.2506 1.989; -0.08803 -1.167];
B1 = [0 1 0.3;1 0 0];
C1 = [1 0; 0 1];
D1 = [0 0 0;0 0 0];
sys = ss(A1,B1,C1,D1)
If I drop the first input and second output , then use the following command
sys = sys(1,2:3);
This will reduce the size of input and output operations. Similar help is needed for the attached
% code
A = [0 0 0.2616 0 0 0 0 0 0 0.7483 -0.6634;...
0 0 -0.2616 0 0 0 0 0 0 0.6634 0.7483;...
0 0 0 1 0 0 0 0 0 0 0;...
0 0 -8.205 0.1144 -141.7 125.6 0 0 -0.2498 -4.593 -90.72;...
0 0 0 0 0 0 1 0 0 0 0;...
0 0 0 0 0 0 0 1 0 0 0;...
0 0 0 0 0 0 0 0 0 0 0;...
0 0 0 0 0 0 0 0 0 0 0;...
0 0 0 0 0 0 0 0 0 0 0;...
0 0 -0.1448 -0.04184 0.8347 -0.7405 0 0 0.4732 -0.9367 1.141;...
0 0 0.078 0.1954 -0.2402 0.2131 0 0 0.2852 -0.2871 -4.836]
B = [0 0 0;...
0 0 0;...
0 0 0;...
-0.6585 0.3862 0;...
0 0 0;...
0 0 0;...
1 0 0;...
0 1 0;...
0 0 1;...
-0.1434 -0.002274 0;...
-0.001117 -0.07752 0]
C = [ 1 0 0 0 0 0 0 0 0 0 0;...
0 1 0 0 0 0 0 0 0 0 0;...
0 0 1 0 0 0 0 0 0 0 0;...
0 0 0 1 0 0 0 0 0 0 0;...
0 0 0 0 1 0 0 0 0 0 0;...
0 0 0 0 0 1 0 0 0 0 0;...
0 0 0 0 0 0 1 0 0 0 0;...
0 0 0 0 0 0 0 1 0 0 0;...
0 0 0 0 0 0 0 0 1 0 0]
D = [ 0 0 0;...
0 0 0;...
0 0 0;...
0 0 0;...
0 0 0;...
0 0 0;...
0 0 0;...
0 0 0;...
0 0 0];
Thank you

採用された回答

Barkat
Barkat 2018 年 8 月 1 日
Can I do it like the following as well? B=[B(:,1) B(:,3)]; C=[C(1,:);C(2,:);C(7,:);C(11,:)];
  1 件のコメント
Aquatris
Aquatris 2018 年 8 月 1 日
Yes, and you need to adjust the D matrix as well. Your D matrix is all zeroes so Matlab also accepts if you do
D = 0;

サインインしてコメントする。

その他の回答 (1 件)

Aquatris
Aquatris 2018 年 7 月 30 日
Removing 2nd plant input;
B(:,2) = [];
Removing the outputs 1,2,3,4,6,7,8;
C([1 2 3 4 6 7 8],:) = [];.
Adjusting the D matrix;
D(:,2) = [];
D([1 2 3 4 6 7 8],:) = [];
  1 件のコメント
Aquatris
Aquatris 2018 年 7 月 30 日
Alternatively, you can use feedback function and define the indices where you want your controller and system to connect without removing any input or output from your system;
sys = feedback(sys1,sys2,feedin,feedout)

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by