Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Find system rise time with matlab

  1. Apr 24, 2012 #1
    1. The problem statement, all variables and given/known data
    I need to find a system rise time (from 10% to 90%) using matlab.
    Is this code right?

    3. The attempt at a solution

    Code (Text):
    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?
     
  2. jcsd
  3. Apr 24, 2012 #2
    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?
     
  4. Apr 24, 2012 #3
    Yes.. You are right...
    Any ideas how can i do it?
     
  5. Apr 25, 2012 #4
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook