MATLAB Answers

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

119 views (last 30 days)
Flavio Clarizia on 25 Feb 2020
Edited: Flavio Clarizia on 28 Feb 2020
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?
##### 0 CommentsShowHide -1 older comments

Sign in to comment.

### Accepted Answer

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 CommentsShowHide 2 older comments
Flavio Clarizia on 28 Feb 2020
Thank you for answering. I will try.

Sign in to comment.

### Community Treasure Hunt

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

Start Hunting!