Numerical values of system characteristics in time domain¶
This example shows how to obtain numerical values of step response characteristics such as rise time, steady-state time, and overshoot using stepinfo
. You can use similar methods with lsim
to obtain system response characteristics for arbitrary input data or initial conditions.
Before you begin, connect the ControlSystems.jl
.
import Pkg
Pkg.add("ControlSystems")
using ControlSystems
s = tf('s');
H = tf([8, 18, 32],[1, 6, 14, 24]);
data = stepinfo(step(H))
The output is a structure containing the values of the step response characteristics. To access these values or to use them in other calculations, use a point record. For example, data.overshoot
is the overshoot value.
data.overshoot
To see how other characteristics are labelled in the structure StepInfo
, run the following code box. It will bring up a brief help.
?stepinfo
Calculate the time required for the step characteristic H to settle within 0.5% of its final value.
data = stepinfo(step(H), settling_th = 0.005)
t05 = data.settlingtime
By default, stepinfo
defines the steady-state time as the time required for the output signal to settle within 2% of its final value. Specifying a more stringent "time tube" value of 0.005 will increase the value of settlingtime
.
Conclusion¶
In this demo example, we have looked at a functional for analysing the numerical characteristics of system responses in the time domain.