How do I get the transfer functions in a MIMO transfer matrix in Matlab
24 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:
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?
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.