【问题标题】:Simulations of discrete transfer functions with different results具有不同结果的离散传递函数的模拟
【发布时间】:2017-04-23 13:09:04
【问题描述】:

我在两种不同的模式下创建了“相同”的离散传递函数。然后我根据相同的输入模拟它们。

为什么结果不同?两者有什么区别?

代码:

close all;clear;clc;
Ts=0.001;
t = 0:Ts:10;
%input
u=rand(length(t),1);
%1st TF
test_tf=c2d( tf([8 18 32],[1 6 14 24]),Ts );
y=lsim(test_tf,u,t);
%2nd TF
test_d_tf=tf([0.007985 -0.01595 0.007967],[1 -2.994 2.988 -0.994],Ts);
y_d=lsim(test_d_tf,u,t);
%plotting
plot(t,u,'k:',t,y,'b-',t,y_d,'r--');

他们的结果是:

整个模拟区间:

缩放:

【问题讨论】:

    标签: matlab simulation transfer-function


    【解决方案1】:

    我的猜测是因为 tfs 实际上并不相同,它们只是因为格式而看起来:

    >>format long
    >>test_d_tf.Numerator{1}
    ans =
         0   0.007985000000000  -0.015950000000000   0.007967000000000
    >> test_tf.Numerator{1}
    
    ans =
         0   0.007985016651180  -0.015952055311304   0.007967070564278
    

    【讨论】:

      猜你喜欢
      • 2014-05-27
      • 1970-01-01
      • 1970-01-01
      • 2014-06-03
      • 2011-12-25
      • 2018-02-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多