Stepinfo provides wrong rise time using [0, 0.63] limits for non minimum phase systems
4 ビュー (過去 30 日間)
古いコメントを表示
When using Stepinfo for 63% rise time (ie [0, 0.63]) interval, it ignores the first portion of time for non minimum systems. Stepinfo looks for the first time the output > 0 the lower limit. However, the non minimum phase goes negative first then crosses to positive. Stepinfo starts the rise time at this zero crossing instead of at time 0
0 件のコメント
回答 (2 件)
Sam Chak
2025 年 2 月 10 日
編集済み: Sam Chak
2025 年 2 月 10 日
Rise time is a non-standard performance measure. By default, in MATLAB, rise time is defined as the duration required to rise from 10% to 90% of the transition from the initial value to the final value. Therefore, movement towards the negative side in non-minimum phase systems is not technically considered 'rising.' If your definition of rise time for non-minimum phase systems extends from the start to 63% of the final value, you will need to perform the calculation independently.
G = tf([-1 2], [1 2 2])
stepinfo(G)
step(G), grid on
[y, t] = step(G);
idx = find(abs(y - 0.63) <= 1e-2);
tr = t(idx(1));
xline(tr, '--', sprintf('User-defined Rise Time: %.3f sec', tr), 'color', '#7F7F7F', 'LabelVerticalAlignment', 'bottom')
yline(0.63, '--', sprintf('63%%'), 'color', '#7F7F7F', 'LabelVerticalAlignment', 'bottom')
2 件のコメント
Paul
2025 年 2 月 10 日
Interesting that the doc page for stepinfo defines an input called 'RiseTimeLimits' under syntax but uses a different input called 'RiseTimeThreshold' in this example. And then the Inputs section doesn't actually define the Name of that Name-Value pair.
Sam Chak
2025 年 2 月 10 日
Here is another approach to estimating the user-defined rise time: by defining the 'RiseTimeLimits' and identifying the time when the output crosses zero for the second time.
G = tf([-1 2], [1 2 2])
S = stepinfo(G, 'RiseTimeLimits', [0 0.63]) % from 0% to 63%
step(G), grid on, hold on
[y, t] = step(G);
idx = find(abs(y - 0) <= 1e-2)
% 2nd Zero-crossing Time
t0 = t(idx(2))
% User-defined Rise Time
tr = t0 + S.RiseTime
plot(t(idx(2)), 0, 'ro')
xline(t0, '--', sprintf('2nd Zero-crossing Time: %.3f sec', t0), 'color', '#7F7F7F', 'LabelVerticalAlignment', 'bottom')
xline(tr, '--', sprintf('User-defined Rise Time: %.3f sec', tr), 'color', '#7F7F7F', 'LabelVerticalAlignment', 'bottom')
yline(0.63, '--', sprintf('63%%'), 'color', '#7F7F7F', 'LabelVerticalAlignment', 'bottom')
3 件のコメント
Sam Chak
2025 年 2 月 10 日
Like many other software products, MATLAB is not without its flaws and relies on user feedback for improvements. The development team typically considers user input; however, for non-critical issues, it may take several releases to implement updates. You can also contact MathWorks to suggest enhancements for specific features. Click this link:
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!