Find system rise time with matlab

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 12K views
erezb84
Messages
43
Reaction score
0

Homework Statement


I need to find a system rise time (from 10% to 90%) using matlab.
Is this code right?

The Attempt at a Solution



Code:
sys = tf(num, den);
y= step(sys, t);
tr1 = max(find(y<0.1));
tr2 = min(find(y>0.9));
rise_time = t(tr2) - t(tr2);

Is this seems to be right?
 
Physics news on Phys.org
No. What makes you think that 10% of the rise is always 0.1 and that 90% of the rise is always 0.9? Have you considered a system whose step response settles to a negative value such as
num = [1 0 -1];
den = [1 4 6 4];
?
What if it doesn't settle to 1?
 
Yes.. You are right...
Any ideas how can i do it?
 
erezb84 said:
Yes.. You are right...
Any ideas how can i do it?

Have you tried the built-in function "stepinfo()"?

http://www.mathworks.com/help/toolbox/ident/ref/stepinfo.html