How does the step function work?

2 ビュー (過去 30 日間)
Arcadius
Arcadius 2022 年 4 月 10 日
コメント済み: Star Strider 2022 年 4 月 10 日
Hello, I am trying to figure out how the 'step' function work. I have a transfer function:
num = [-5.21];
den = [1 6 73];
G = tf(num, den);
Getting the inverse laplace of this transfer function manually, I get:
y(t)=((-5.21)/8)*exp(-3t)*sin(8t)
When I use the 'step' function the final steady state in the graph is -0.0714, when the final steady state of the inverse laplace approaches 0. There are great differences too in the graphs as the one worked manually it shows that the oscillation first peaks at -0.39 while matlab shows the first oscillation first peaks at -0.09. Where did I go wrong? I would greatly appreciate an answer. Thanks!
Matlab:
Matlab graph of the TF
Desmos:
Response of the TF

採用された回答

Star Strider
Star Strider 2022 年 4 月 10 日
You forgot to actually use the Heaviside unit step function as an input!
num = [-5.21];
den = [1 6 73];
G = tf(num, den)
G = -5.21 -------------- s^2 + 6 s + 73 Continuous-time transfer function.
syms s t
H = num / poly2sym(den,s) * laplace(heaviside(t))
H = 
h = ilaplace(H)
h = 
figure
hfp = fplot(h, [0 2]);
grid
EndVal = hfp.YData(end)
EndVal = -0.0716
So the step result is correct!
.
  2 件のコメント
Arcadius
Arcadius 2022 年 4 月 10 日
That was right, thank you :)
Star Strider
Star Strider 2022 年 4 月 10 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by