can program tell if SISO or MIMO

Hello. I have a task to check if a transfer function is SISO or MIMO. How can this be done in MATLAB.
I have tried issiso() but this tell me that the transfer function is alwasy SISO.
Is there a function that can tell me if a system is SIOS or MIMO for the transfer function?
I am new with MATLAB and i havent had any luck finding anything for this so far.

2 Comments

What’s the transfer function?
What Toolboxes are you using?
G1 = tf([2 0], [1 2]);
G2 = tf([1 -1], [1 6 15]);
sys = series(G1,G2);
issiso(sys)
ans = logical
1
This is what i am using.
For toolboxes not sure. If there is a way i just need to be pointed in the direct.

Sign in to comment.

 Accepted Answer

In the case of transfer functions represented in tf() notation, you can look at size() of the function.
This might not work if the code needs to internally convert to tf to some other representation, such as can happen if you do some operations on tf that have I/O delays in them.
G1 = tf([2 0], [1 2]);
G2 = tf([1 -1], [1 6 15]);
sys = series(G1,G2)
sys = 2 s^2 - 2 s ----------------------- s^3 + 8 s^2 + 27 s + 30 Continuous-time transfer function.
sys1 = [G1,G2]
sys1 = From input 1 to output: 2 s ----- s + 2 From input 2 to output: s - 1 -------------- s^2 + 6 s + 15 Continuous-time transfer function.
sys2 = [G1; G2]
sys2 = From input to output... 2 s 1: ----- s + 2 s - 1 2: -------------- s^2 + 6 s + 15 Continuous-time transfer function.
isequal(size(sys), [1 1])
ans = logical
1
isequal(size(sys1), [1 1])
ans = logical
0
isequal(size(sys2), [1 1])
ans = logical
0

1 Comment

Brilliant. That clears things up so much. The part i was missing was from input to output.

Sign in to comment.

More Answers (1)

Your code looks correct for determining whether or not a system is SISO
G1 = tf([2 0], [1 2]);
G2 = tf([1 -1], [1 6 15]);
sys = series(G1,G2)
sys = 2 s^2 - 2 s ----------------------- s^3 + 8 s^2 + 27 s + 30 Continuous-time transfer function.
issiso(sys)
ans = logical
1

1 Comment

Yes, issiso() seems to be working
G1 = tf([2 0], [1 2]);
G2 = tf([1 -1], [1 6 15]);
sys = series(G1,G2)
sys = 2 s^2 - 2 s ----------------------- s^3 + 8 s^2 + 27 s + 30 Continuous-time transfer function.
sys1 = [G1,G2]
sys1 = From input 1 to output: 2 s ----- s + 2 From input 2 to output: s - 1 -------------- s^2 + 6 s + 15 Continuous-time transfer function.
sys2 = [G1; G2]
sys2 = From input to output... 2 s 1: ----- s + 2 s - 1 2: -------------- s^2 + 6 s + 15 Continuous-time transfer function.
issiso(sys)
ans = logical
1
issiso(sys1)
ans = logical
0
issiso(sys2)
ans = logical
0

Sign in to comment.

Categories

Find more on Control System Toolbox in Help Center and File Exchange

Products

Asked:

on 10 Dec 2022

Commented:

on 11 Dec 2022

Community Treasure Hunt

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

Start Hunting!