Rise Time, Settling Time, and Other Step-Response Characteristics - MATLAB Stepinfo
Rise Time, Settling Time, and Other Step-Response Characteristics - MATLAB Stepinfo
stepinfo
Rise time, settling time, and other step-response characteristics
Syntax
S = stepinfo(sys)
S = stepinfo(y,t)
S = stepinfo(y,t,yfinal)
Description
S = stepinfo(sys)computes the step-response characteristics for a dynamic system model sys. The example
function returns the characteristics in a structure containing the fields:
• RiseTime — Time it takes for the response to rise from 10% to 90% of the steady-state response.
• SettlingTime — Time it takes for the error |y(t) - y final| between the response y(t) and the steady-
state response y to fall to within 2% of y .
final final
The following figure illustrates some of these quantities on a typical second-order response.
https://www.mathworks.com/help/control/ref/stepinfo.html#responsive_offcanvas 1/8
11/29/2020 Rise time, settling time, and other step-response characteristics - MATLAB stepinfo
S = stepinfo( ___ ,'SettlingTimeThreshold',ST) lets you specify the threshold ST used in the example
definition of settling time. The response has settled when the error |y(t) - yfinal| becomes smaller
than a fraction ST of its peak value. The default value is ST = 0.02 (2%). You can use this syntax with
any of the previous input-argument combinations.
example
S = stepinfo( ___ ,'RiseTimeLimits',RT) lets you specify the lower and upper thresholds used in
the definition of rise time. By default, the rise time is defined as the time the response takes to rise from
10 to 90% of the steady-state value (RT = [0.1 0.9]). The upper threshold RT(2) is also used to
calculate SettlingMin and SettlingMax. These values are the minimum and maximum values of the
response occurring after the response has reached the upper threshold. You can use this syntax with
any of the previous input-argument combinations.
https://www.mathworks.com/help/control/ref/stepinfo.html#responsive_offcanvas 2/8
11/29/2020 Rise time, settling time, and other step-response characteristics - MATLAB stepinfo
The plot shows that the response rises in a few seconds, and then rings down to a steady-state value of about
2.5. Compute the characteristics of this response using stepinfo.
S = stepinfo(sys)
By default, the settling time is the time it takes for y(t ) − y final
to fall below 2% of its peak value, where y(t ) is the
system response at time t and y is the steady-state response. The result S.SettlingTime shows that for
final
sys, this condition occurs after about 28 seconds. The default definition of rise time is the time it takes for the
response to go from 10% of its steady-state value to 90% of that value. S.RiseTime shows that for sys, this rise
occurs in less than 4 seconds. The maximum overshoot is returned in S.Overshoot. For this system, the peak
value S.Peak, which occurs at the time S.PeakTime, overshoots the steady-state value by about 7.5% of the
steady-state value.
For a MIMO system, stepinfo returns a structure array in which each entry
contains the response characteristics of the corresponding I/O channel of the Try This Example
system. For this example, use a two-output, two-input discrete-time system.
Compute the step-response characteristics. View MATLAB Command
https://www.mathworks.com/help/control/ref/stepinfo.html#responsive_offcanvas 3/8
11/29/2020 Rise time, settling time, and other step-response characteristics - MATLAB stepinfo
S = stepinfo(sys)
Access the response characteristics for a particular I/0 channel by indexing into S. For instance, examine the
response characteristics for the response from the first input to the second output of sys, corresponding to
S(2,1).
S(2,1)
To access a particular value, use dot notation. For instance, extract the rise time of the (2,1) channel.
rt21 = S(2,1).RiseTime
rt21 = 0.4000
By default, stepinfo defines settling time as the time it takes for the error
y(t) − y between the response y(t) and the steady-state response y
final final
to Try This Example
come within 2% of yfinal . Also, stepinfo defines the rise time as the time it
takes for the response to rise from 10% of y to 90% of y . You can change
final final
View MATLAB Command
these definitions using SettlingTimeThreshold and RiseTimeThreshold. For
this example, use the system given by:
2
s + 5s + 5
sys = .
4 3
s + 1. 65s + 6. 5s + 2
Compute the time it takes for the error in the response of sys to to reach 0.5% of the steady-state response. To
do so, set SettlingTimeThreshold to 0.5%, or 0.005.
https://www.mathworks.com/help/control/ref/stepinfo.html#responsive_offcanvas 4/8
11/29/2020 Rise time, settling time, and other step-response characteristics - MATLAB stepinfo
S1 = stepinfo(sys,'SettlingTimeThreshold',0.005);
st1 = S1.SettlingTime
st1 = 46.1325
Compute the time it takes the response of sys to rise from 5% to 95% of the steady-state value. To do so, set
RiseTimeThreshold to a vector containing those bounds.
S2 = stepinfo(sys,'RiseTimeThreshold',[0.05 0.95]);
rt2 = S2.RiseTime
rt2 = 4.1690
You can define both settling time and rise time in the same computation.
S3 = stepinfo(sys,'SettlingTimeThreshold',0.005,'RiseTimeThreshold',[0.05 0.95])
load StepInfoData t y
plot(t,y)
https://www.mathworks.com/help/control/ref/stepinfo.html#responsive_offcanvas 5/8
11/29/2020 Rise time, settling time, and other step-response characteristics - MATLAB stepinfo
Compute step-response characteristics from this response data using stepinfo. If you do not specify the steady-
state response value yfinal, then stepinfo assumes that the last value in the response vector y is the steady-
state response.Because there is some noise in the data, the last value in y is likely not the true steady-state
response value. When you know what the steady-state value should be, you can provide it to stepinfo. For this
example, suppose that the steady-state response is 2.4.
S1 = stepinfo(y,t,2.4)
Because of the noise in the data, the default definition of the settling time is too stringent, resulting in an arbitrary
value of almost 20 seconds. To allow for the noise, increase the settling-time threshold from the default 2% to 5%.
S2 = stepinfo(y,t,2.4,'SettlingTimeThreshold',0.05)
https://www.mathworks.com/help/control/ref/stepinfo.html#responsive_offcanvas 6/8
11/29/2020 Rise time, settling time, and other step-response characteristics - MATLAB stepinfo
Dynamic system, specified as a SISO or MIMO dynamic system model. Dynamic systems that you can use
include:
y — Step-response data
vector | array
• For SISO response data, a vector of length Ns, where Ns is the number of samples in the response data.
• For MIMO response data, an Ns-by-Ny-by-Nu array, where Ny is the number of system outputs, and Nu is the
number of system inputs.
t — Time vector
vector
Time vector corresponding to the response data in y, specified as a vector of length Ns.
If you do not provide yfinal, then stepinfo uses the last value in the corresponding channel of y as the steady-
state response value.
Threshold for defining settling time, specified as a scalar value between 0 and 1. By default, stepinfo defines
settling time as the time it takes for the error |y(t) - y | between the response y(t) and the steady-state response
final
y to fall to within 2% of y . To change this definition, set ST to a different value. For instance, to set a
final final
Threshold for defining rise time, specified as a 2-element row vector of nondescending values between 0 and 1.
By default, stepinfo defines rise time as the time it takes for the response to rise from 10% to 90% of the steady-
state value y . To change this definition, set RT to a different value. For instance, to define the rise time as the
final
time it takes for the response to rise from 5% to 95% of the steady-state value, set RT to [0.05 0.95].
S — Step-response characteristics
structure
• RiseTime — Time it takes for the response to rise from 10% to 90% of the steady-state response.
• SettlingTime — Time it takes for the error |y(t) - y final | between the response y(t) and the steady-state
response y to fall to within 2% of y .
final final
For MIMO models or responses data, S is a structure array in which each entry contains the step-response
characteristics of the corresponding I/O channel. For instance, if you provide a 3-input, 3-output model or array of
response data, then S(2,3) contains the characteristics of the response from the third input to the second output.
For an example, see Step-Response Characteristics of MIMO System.
If sys is unstable, then all step-response characteristics are NaN, except for Peak and PeakTime, which are Inf.
See Also
lsiminfo | step
Introduced in R2006a
https://www.mathworks.com/help/control/ref/stepinfo.html#responsive_offcanvas 8/8