MIMO ss2tf, how do I apply it to a 3x3 system?

49 views (last 30 days)
Tamara Sampaio
Tamara Sampaio on 10 Nov 2018
Answered: Aquatris on 11 Nov 2018
Hello, I wish to model a system that consists of two input variables (S0,F) and three outputs (X, S and P). This leads to 6 transfer functions but when I try to use ss2tf, I get the following error:"Index in position 1 exceeds array bounds (must not exceed 1). Error in trabalho_modelagem_biolixiviacao (line 65) FT21=tf(num1(2,1),den1(2,1));"
Here is my code:
G1=ss(matriz_A,matriz_B,matriz_C,matriz_D); %ESPAÇO DE ESTADOS tf(G1)
[num1,den1]=ss2tf (matriz_A,matriz_B,matriz_C,matriz_D,1); [num2,den2]=ss2tf (matriz_A,matriz_B,matriz_C,matriz_D,2);
FT11=tf(num1(1,1),den1(1,1)); FT12=tf(num1(1,2),den1(1,2)); FT13=tf(num1(1,3),den1(1,3)); FT21=tf(num1(2,1),den1(2,1)); FT22=tf(num1(2,2),den1(2,2)); FT23=tf(num1(2,3),den1(2,3));
How do I solve this?

Answers (1)

Aquatris
Aquatris on 11 Nov 2018
You can try using just tf (if you are using one of the newer versions of Matlab)
sys = ss(rand(6),rand(6,3),rand(3,6),0); % MIMO 3x3 ss
sys2 = tf(sys); % same MIMO 3x3 in transfer function form

Categories

Find more on Model Predictive Control Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!