Numerical values of system characteristics in the 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 characteristics of the system's response to arbitrary input data or initial conditions.
Before you start, connect the package 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 use them in other calculations, use dot notation. For example, data.overshoot
— this is the overshoot value.
data.overshoot
To see how other characteristics are assigned in the structure StepInfo
, run the following cell with the code. She calls for a quick reference.
?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 stricter "time tube" value of 0.005 leads to an increase in the value settlingtime
.
Conclusion
In this demo example, we examined the functionality for analyzing the numerical characteristics of the system's responses in the time domain.