How do I get the transfer functions in a MIMO transfer matrix in Matlab

18 views (last 30 days)
Suppose I have defined the state space matrices A,B,C,D, and with these I define a plant as:
plant = ss(A,B,C,D)
Now, Iave a plant in state space defined as:
Now, suppose that I am considering a MIMO system, so B is a matrix. If I have 4 input and 6 outputs, which are:
and
which are respectively the output and input vector. What I want to do is to obtain the transfer from the first two input to the firat two outputs using Matlab.
For example I am trying to do things like G(1,1) or G(3,4), but I am not sure what I am getting like this. The reason why I am trying to do this is to solve this problem: https://www.mathworks.com/matlabcentral/answers/507057-problem-defining-generalized-plant-in-matlab?s_tid=prof_contriblnk, but I am having some troubles doing this.
Can somebody please help me?

Accepted Answer

Aquatris
Aquatris on 25 Feb 2020
Once you obtain the system model G, you can call any input-output pairs as you like as if you are dealing with matrices.
outputIndex = [1 4 6]; % want to have 1st 4th and 6th output
inputIndex = [2 3]; % want to have the 2nd and 3rd output
sys = plant(outputIndex, inputIndex); % system that has identical
% dynamics to G and has only
% the desired input-output pairs
When you call the plant(i,j) in MATLAB, i represents the output index and j represents the input index.
In your example G(1,1) gives you the dynamics from 1st input to 1st output whereas G(3,4) gives you the dynamics from 4th input to 3rd output. If you want to close the loop using a subset of input-output pairs but still want to have access to all the channels, "feedback()" function gives you the option to define those channels.
  3 Comments
Aquatris
Aquatris on 28 Feb 2020
I have not used the sysic functionality. Thats why I cant say.
However I used hinfsyn function and for that I always create my system with exogenous inputs as first inputs and control input as last, and performance outputs as first outputs and sensor outputs as last, as standard in hinfinity control problem formulation, while putting the system in state space form. Then I define the weights for inputs and outputs as
Win = append(W1,W2,W3,eye(n)) % assuming 3 exogenous input channels and n control inputs
and similarly for outputs (identity for control input and sensor output channels). Once weights are defined, I create the weighted plant model as
P = Wout*sys*Win
Once the weighted plant P is defined, hinfsyn function can be called.
I hope this helps a bit.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!