I'm trying to convert a system from c2d and then from d2c but the results are not the same. Why? There is no delay!

My system is: s^2/s^3+1 My code is:
num=[1 0 0];
den=[1 0 0 1];
sys=tf(num,den)
sysd=c2d(sys,0.3)
sys2=d2c(sysd)
Why is the "sys" different from the "sys2"? Why a system like this 1/(s+1) gives correct results?
num=[1];
den=[1 1];
sys=tf(num,den)
sysd=c2d(sys,0.3)
sys2=d2c(sysd)

 採用された回答

zohar
zohar 2011 年 6 月 23 日
Hi sadel
I execute your code and I got :
Transfer function:
s^2
-------
s^3 + 1
Transfer function:
0.2997 z^2 - 0.6 z + 0.3003
-----------------------------
z^3 - 2.987 z^2 + 3.014 z - 1
Sampling time: 0.3
Transfer function:
s^2 - 6.217e-015 s - 1.066e-014
---------------------------------------
s^3 - 6.106e-015 s^2 - 1.377e-014 s + 1
1.377e-014 is very close to zero !
Isn't it enough ?

3 件のコメント

sadel
sadel 2011 年 6 月 23 日
yes, but how can I make it looks like the first?
Polynomial fitting almost always has round-off error.
sadel
sadel 2011 年 6 月 23 日
There is no way I to fix it? Even if I take the coefficients and round them?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDynamic System Models についてさらに検索

質問済み:

2011 年 6 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by