Control Engineering conver transfer function MIMO to state space

5 visualizaciones (últimos 30 días)
meng fowler
meng fowler el 5 de Dic. de 2020
Respondida: Shashi Kiran el 25 de Sept. de 2024
I have transfer function 2x2 MIMO with 2 inputs 2 outputs and 3 states.
How can i convert the transfer function to state space form using Matlab?

Respuestas (1)

Shashi Kiran
Shashi Kiran el 25 de Sept. de 2024
To convert a 2x2 MIMO transfer function system with two inputs, two outputs, and three states into a state-space representation in MATLAB, you can follow these steps:
  • To create the transfer function matrix for a MIMO system (given the individual transfer functions between the inputs and outputs).
s = tf('s'); % Define the Laplace variable
% Transfer functions from input 1 to outputs
TF11 = (s + 2)/(s^3 + 2*s^2 + 3*s + 4); % Output 1, Input 1
TF21 = (2*s + 1)/(s^3 + s^2 + 2*s + 3); % Output 2, Input 1
% Transfer functions from input 2 to outputs
TF12 = (s + 3)/(s^3 + s^2 + 3*s + 2); % Output 1, Input 2
TF22 = (s + 1)/(s^3 + 2*s^2 + s + 1); % Output 2, Input 2
% Create the MIMO transfer function matrix (2x2 system)
sys_tf = [TF11 TF12; TF21 TF22];
  • Use MATLAB’s 'ss' function to convert the transfer function model to a state-space representation.
% Convert to state-space representation
sys_ss = ss(sys_tf);
% Display the state-space matrices
A = sys_ss.A % Represents the system dynamics.
A = 12×12
-2.0000 -1.5000 -2.0000 0 0 0 0 0 0 0 0 0 2.0000 0 0 0 0 0 0 0 0 0 0 0 0 1.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.0000 -1.0000 -1.5000 0 0 0 0 0 0 0 0 0 2.0000 0 0 0 0 0 0 0 0 0 0 0 0 1.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.0000 -1.5000 -1.0000 0 0 0 0 0 0 0 0 0 2.0000 0 0 0 0 0 0 0 0 0 0 0 0 1.0000 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.0000 -1.0000 -1.0000
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
B = sys_ss.B % Maps the inputs to the states.
B = 12×2
1 0 0 0 0 0 1 0 0 0 0 0 0 2 0 0 0 0 0 2
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
C = sys_ss.C % Maps the states to the outputs.
C = 2×12
0 0.5000 1.0000 0 0 0 0 0.2500 0.7500 0 0 0 0 0 0 0 1.0000 0.5000 0 0 0 0 0.5000 0.5000
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
D = sys_ss.D % Direct input-output relationship
D = 2×2
0 0 0 0
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
Please refer to the following documentations for more details about the functions:
  1. ss:https://www.mathworks.com/help/control/ref/ss.html
  2. tf: https://www.mathworks.com/help/control/ref/tf.html
Hope this helps.

Categorías

Más información sobre Link-Level Simulation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by