lsim giving wrong results

3 ビュー (過去 30 日間)
Francisco Vasconcelos
Francisco Vasconcelos 2021 年 3 月 6 日
編集済み: Ivo Houtzager 2021 年 3 月 6 日
When using the transfer function bellow with lsim i get wrong results
3.249e08 s^2
---------------------------------------------------------------------------------------
6.365e07 s^4 + 9.476e07 s^3 + 3.484e08 s^2 + 324615 s + 1596
The first image is what I expected (what I get from teh step functions) and the second one is what I get from lsim.
This is the code I used:
T = 50;
t = linspace(0, T, 1000);
u = ones(size(t));
Gs = tf([0,54150000,17043000,324615,1596],[63650000,94760000,348383000,324615,1596]);
lsim(Gs, u, t);
figure;
step(Gs);

採用された回答

Ivo Houtzager
Ivo Houtzager 2021 年 3 月 6 日
編集済み: Ivo Houtzager 2021 年 3 月 6 日
Your end time in seconds do not match between the plots. The lsim simulates only up to 50 seconds which was set by the T variable, while step function simulates up to 12000 seconds (until settled). Set "T = 12000'" instead to match the end time of step function.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDigital Filter Analysis についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by