Control Engineering conver transfer function MIMO to state space
Afficher commentaires plus anciens
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?
Réponses (1)
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.
B = sys_ss.B % Maps the inputs to the states.
C = sys_ss.C % Maps the states to the outputs.
D = sys_ss.D % Direct input-output relationship
Please refer to the following documentations for more details about the functions:
- ss:https://www.mathworks.com/help/control/ref/ss.html
- tf: https://www.mathworks.com/help/control/ref/tf.html
Hope this helps.
Catégories
En savoir plus sur Get Started with Control System Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!