Settling time of response.

9 ビュー (過去 30 日間)
shahin sharafi
shahin sharafi 2022 年 9 月 6 日
回答済み: Sam Chak 2022 年 9 月 6 日
Hi
I am going to find the setteling time of response with Matlab directly. This figure is my reponse solved by DDE23. Is there any command that helps me to find the setteled time directly?
Thank you in advance for you help.

回答 (1 件)

Sam Chak
Sam Chak 2022 年 9 月 6 日
I don't know how your DDE system is modeled, but you can probably try something like this to locate the position of the time stamp where Your Settling Time is defined.
k1 = 39.5;
k2 = 6.5;
F = @(t, x) [x(2); ...
- k1*x(1) - k2*x(2)];
x0 = [0.14, 0];
tspan = [0, 15];
[t, x] = ode45(F, tspan, x0);
plot(t, x(:,1), 'linewidth', 1.5), ylim([-0.05 0.15])
% Find index of time-stamp based on 2% criterion
index = find(t > 1 & x > -0.02*x0(1) & x < 0.02*x0(1));
position = index(1)
position = 55
SettlingTime = t(position)
SettlingTime = 1.0096

カテゴリ

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by