Find system rise time with matlab

Click For Summary

Discussion Overview

The discussion revolves around finding the rise time of a system (from 10% to 90%) using MATLAB code. It includes aspects of homework assistance and technical clarification regarding the implementation of the code.

Discussion Character

  • Homework-related, Technical explanation

Main Points Raised

  • One participant presents a MATLAB code snippet intended to calculate the rise time of a system using the transfer function.
  • Another participant questions the assumption that 10% and 90% of the rise correspond to fixed values of 0.1 and 0.9, suggesting that this may not hold for systems that settle to values other than 1.
  • A later reply acknowledges the previous point and asks for alternative methods to determine the rise time.
  • Another suggestion is made to use the built-in MATLAB function "stepinfo()" as a potential solution for calculating rise time.

Areas of Agreement / Disagreement

Participants express disagreement regarding the assumption that rise percentages correspond to fixed numerical values. There is no consensus on the correct approach to calculate rise time, and multiple viewpoints are presented.

Contextual Notes

The discussion highlights limitations in the initial code regarding assumptions about system behavior and the need for clarification on how to handle systems that do not settle to a value of 1.

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
 

Similar threads

  • · Replies 12 ·
Replies
12
Views
3K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
14K
Replies
3
Views
4K
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K