필터 지우기
필터 지우기

Why do state space and its equivalent transfer function models yield different step responses?

조회 수: 9 (최근 30일)
I have written a MATLAB code to build a transfer function by interconnecting dynamic blocks. When I run the m-file, I get different step responses from the state-space model and its transfer function equivalent. The system is SISO type. May you advise?
Here is the code:
G_1 = tf([160], [1]); G_2 = tf([1], [1 1 0]); H = tf([1 0], [1]);
G_1.InputName = 'e'; G_1.OutputName = 'gain_out';
G_2.InputName = 'p_in'; G_2.OutputName = 'output';
H.InputName = 'output'; H.OutputName = 'sense_out';
sum1 = sumblk('e = input - output'); sum2 = sumblk('p_in = gain_out - sense_out');
sys_ss = connect(G_1, G_2, H, sum1, sum2, 'input', 'output');
[num den] = ss2tf(sys_ss.A, sys_ss.B, sys_ss.C, sys_ss.D); sys_tf = tf(num, den);
step(sys_ss), grid on; figure; step(sys_tf), grid on;

채택된 답변

Carla
Carla 2015년 2월 25일
Hi there,
Examine the state-space model sys_ss:
>> sys_ss
Note that it has a non-unity E matrix. This happens because your H, a pure derivative, is improper. The connect command represents that block as a two-state ss with a non-unity E matrix - a descriptor ss. When connect builds the interconnected system, it preserves those states, so it yields a descriptor system.
And that means that your call to ss2tf, which only uses A,B,C, and D, is missing part of the dynamics of the system. sys_tf doesn't represent the same dynamics as sys_ss.
This is one of the reasons that ss2tf is not a great command to use when converting from ss to tf form. Try this instead:
>> sys_tf = tf(sys_ss)
This time when you plot the step responses, they match up. Also, tf removes those two extra states.
You can also reduce and simplify sys_ss into explicit form (E = 1) using the 'explicit' option of the ss command:
>> sys_ss_ex = ss(sys_ss,'explicit')
Now all of the system dynamics are described by A,B,C, and D.
For more information about explicit and descriptor state-space models, see the reference page for ss.
>> doc ss
Hope this helps!

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Time and Frequency Domain Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by