how to get step response for two inputs in for state space model ?

35 Ansichten (letzte 30 Tage)
A=[-0.0060 0.0014 0.0447 -8.8798 -8.0676 0 0;
0.0021 -0.0053 0.0671 3.0804 2.7986 0 0;
0.0038 0.0038 -0.1162 5.6007 5.0884 0 0;
9.1817 8.3716 8.3716 -0.0059 0.2848 0 0;
-8.9651 -8.1741 -8.1741 0.0058 -0.3134 0 0;
-0.317 -0.289 -0.289 0.306 0.278 -0.56 0;
0 0 0 0 0 1 0]
B=[-5.4145 1.8783 3.4150 0 0 0 0;
1.8783 -7.126 5.1226 0 0 0 0;
3.4150 5.1226 -8.8681 0 0 0 0;
0 0 0 -5.4010 5.2736 0 0;
0 0 0 5.2736 -5.8045 0 0;
0 0 0 0 0 0.5596 0;
0 0 0 0 0 0 -1]
C=[0 1 0 0 0 1 0]
D=[0 0 0 0 0 0 0]
sys=ss(A,B,C,D)
step(sys)
  2 Kommentare
Abishek jose
Abishek jose am 5 Mai 2022
what exactly i need is the particular step responses of inputs 2 and 6, that is to be spcific my output matrix C = [ 0 1 0 0 0 1 0 ]. i need matrix c's step response
Jon
Jon am 5 Mai 2022
Bearbeitet: Jon am 5 Mai 2022
Please see my answer below. I think you are confused about the role, of the C matrix.
The output is given by y = Cx + Du where x is the system state and u are the inputs.
Your system, happens to have 7 states and also 7 inputs so maybe it is a little confusing. The C matrix combines the current values of the state into a contribution to the output. If you don't want to use some of the inputs then you need to either remove the corresponding columns from your B and D matrix (see below) and not use those inputs at all, or alternatively set the corresponding columns of the B and D matrix to zeros and keep all 7 inputs.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Jon
Jon am 4 Mai 2022
Bearbeitet: Jon am 4 Mai 2022
Your system has 7 inputs and one output. Your code already plots the step responses to each of the seven inputs as shown in attached screenshot. If you only want the step response to two particular inputs, for example inputs 2 and 5, then you could do something like this:
sys=ss(A,B(:,[2,5]),C,D(:,[2,5]))
step(sys)
The inputs to the system are associated with the columns of the B and D matrix. So as shown above, just use the columns of the B and D matrix that you are interested in.
  2 Kommentare
Abishek jose
Abishek jose am 5 Mai 2022
thank you very much . you are right i am not getting into the track i dont have much knowledge in MATLAB.
oke dont get me... bad i still have one clarifictaion required...
Q) does that mean i should use
sys=ss(A,B(:,[2,6]),C,D(:,[2,6]))
step(sys)
{since I need step response of 2nd and 6th variable}
?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by