State space to transfer function conversion and vice versa

18 visualizzazioni (ultimi 30 giorni)
Hi,
So, I have following piece of code. It simulates a simulink file 'model' (which I cannot provide as an attachment), then creates a state space representation of the model which is saved as variable 'sys_ss_inacc_frommodel'. The problem that I am facing is that when I convert this state space representation to TF representation i.e variable 'systf' and then back to state space i.e variable 'sys_ss_acc', the two State space representations are different.
can someone please clarify what mistake I am making here?
clc
io = getlinio(model);
%% Specify the operating point % Use the model initial condition op = operpoint(model);
%% Linearize the model sys_ss_inacc_frommodel = linearize(model,io,op); sys_ss_inacc_frommodel=minreal(sys_ss_inacc_frommodel) %% Plot the resulting linearization
systf=tf(sys_ss_inacc_frommodel)
%creat ss again from systf beause for some reason ss of sys is different. %discuss with reinhold. sys_ss_acc=ss(systf) sys_ss_acc=minreal(sys_ss_acc)

Risposte (1)

Sebastian Castro
Sebastian Castro il 24 Gen 2016
This can happen and is completely expected.
Transfer functions are defined as the relationship between inputs and outputs, whereas state-space models contain two separate relationships: inputs to states and states to outputs.
For this reason, a single transfer function can be expressed as an infinite combination of state-space realizations. While your two state-space models look different, they should contain the same system dynamics.
This is part of the reason why people often convert state-space models into different canonical forms, such as modal, observability, etc. This ensures that you always get the same structure for state-space realizations.
- Sebastian

Categorie

Scopri di più su Get Started with Control System Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by