State space to transfer function conversion and vice versa
4 次查看(过去 30 天)
显示 更早的评论
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)
0 个评论
回答(1 个)
Sebastian Castro
2016-1-24
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dynamic System Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!