Clear Filters
Clear Filters

Reducing state space order by doing matrix operations

3 views (last 30 days)
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

Accepted Answer

Barkat
Barkat on 1 Aug 2018
Can I do it like the following as well? B=[B(:,1) B(:,3)]; C=[C(1,:);C(2,:);C(7,:);C(11,:)];
  1 Comment
Aquatris
Aquatris on 1 Aug 2018
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;

Sign in to comment.

More Answers (1)

Aquatris
Aquatris on 30 Jul 2018
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 Comment
Aquatris
Aquatris on 30 Jul 2018
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)

Sign in to comment.

Categories

Find more on Dynamic System Models in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!