Find system rise time with matlab

In summary, the conversation discusses finding a system rise time using MATLAB and the possibility of incorrect results due to assuming specific values for the rise time. The solution suggests using the built-in function "stepinfo()" to accurately calculate the rise time.
  • #1
erezb84
43
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
  • #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?
 
  • #3
Yes.. You are right...
Any ideas how can i do it?
 
  • #4
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
 
  • #5


I would recommend using the built-in function "stepinfo" in Matlab to find the system rise time. This function calculates various performance metrics, including rise time, for a given system. The code would look something like this:

rise_time = stepinfo(sys).RiseTime;

This code is more efficient and reliable compared to manually finding the rise time using the "step" function. Additionally, it is always a good practice to check the accuracy of your results by comparing them with other methods or by using different inputs.
 

1. How do you use MATLAB to find the system rise time?

To find the system rise time using MATLAB, you can use the "stepinfo" function. This function calculates various parameters of a system's step response, including the rise time. You will need to provide the step response data as an input to this function.

2. What is the system rise time?

The system rise time is the time it takes for a system to reach its final steady-state value for the first time after a step input is applied. It is an important parameter in characterizing a system's response to a step input and can help in evaluating the system's performance.

3. How can I plot the step response of a system in MATLAB?

You can use the "step" function in MATLAB to plot the step response of a system. This function takes the system transfer function or state-space model as inputs and generates a plot of the step response. You can then use the "stepinfo" function to find the rise time from this plot.

4. Can I use MATLAB to find the rise time of a non-linear system?

Yes, you can use MATLAB to find the rise time of a non-linear system. However, the "stepinfo" function will only work for linear systems. If you have a non-linear system, you will need to use numerical methods or simulation to find the rise time.

5. How do I interpret the rise time of a system?

The rise time of a system is an indication of how quickly the system responds to a step input. A shorter rise time indicates a faster response, while a longer rise time indicates a slower response. It can also be used to evaluate the stability and performance of a system, as a longer rise time can lead to overshoot or oscillations in the system's response.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
810
  • Engineering and Comp Sci Homework Help
Replies
12
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
13
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
13K
Back
Top