@@ -64,38 +64,59 @@ def step(sys, T=None, X0=0., input=0, output=None, return_x=False):
64
64
transpose = True , return_x = return_x )
65
65
return (out [1 ], out [0 ], out [2 ]) if return_x else (out [1 ], out [0 ])
66
66
67
- def stepinfo (sys , T = None , SettlingTimeThreshold = 0.02 ,
67
+
68
+ def stepinfo (sysdata , T = None , yfinal = None , SettlingTimeThreshold = 0.02 ,
68
69
RiseTimeLimits = (0.1 , 0.9 )):
69
- '''
70
+ """
70
71
Step response characteristics (Rise time, Settling Time, Peak and others).
71
72
72
73
Parameters
73
74
----------
74
- sys : StateSpace, or TransferFunction
75
- LTI system to simulate
76
-
77
- T: array-like or number , optional
75
+ sysdata : StateSpace or TransferFunction or array_like
76
+ The system data. Either LTI system to similate (StateSpace,
77
+ TransferFunction), or a time series of step response data.
78
+ T : array_like or float , optional
78
79
Time vector, or simulation time duration if a number (time vector is
79
- autocomputed if not given)
80
-
81
- SettlingTimeThreshold: float value, optional
80
+ autocomputed if not given).
81
+ Required, if sysdata is a time series of response data.
82
+ yfinal : scalar or array_like, optional
83
+ Steady-state response. If not given, sysdata.dcgain() is used for
84
+ systems to simulate and the last value of the the response data is
85
+ used for a given time series of response data. Scalar for SISO,
86
+ (noutputs, ninputs) array_like for MIMO systems.
87
+ SettlingTimeThreshold : float, optional
82
88
Defines the error to compute settling time (default = 0.02)
83
-
84
- RiseTimeLimits: tuple (lower_threshold, upper_theshold)
89
+ RiseTimeLimits : tuple (lower_threshold, upper_theshold)
85
90
Defines the lower and upper threshold for RiseTime computation
86
91
87
92
Returns
88
93
-------
89
- S: a dictionary containing:
90
- RiseTime: Time from 10% to 90% of the steady-state value.
91
- SettlingTime: Time to enter inside a default error of 2%
92
- SettlingMin: Minimum value after RiseTime
93
- SettlingMax: Maximum value after RiseTime
94
- Overshoot: Percentage of the Peak relative to steady value
95
- Undershoot: Percentage of undershoot
96
- Peak: Absolute peak value
97
- PeakTime: time of the Peak
98
- SteadyStateValue: Steady-state value
94
+ S : dict or list of list of dict
95
+ If `sysdata` corresponds to a SISO system, S is a dictionary
96
+ containing:
97
+
98
+ RiseTime:
99
+ Time from 10% to 90% of the steady-state value.
100
+ SettlingTime:
101
+ Time to enter inside a default error of 2%
102
+ SettlingMin:
103
+ Minimum value after RiseTime
104
+ SettlingMax:
105
+ Maximum value after RiseTime
106
+ Overshoot:
107
+ Percentage of the Peak relative to steady value
108
+ Undershoot:
109
+ Percentage of undershoot
110
+ Peak:
111
+ Absolute peak value
112
+ PeakTime:
113
+ time of the Peak
114
+ SteadyStateValue:
115
+ Steady-state value
116
+
117
+ If `sysdata` corresponds to a MIMO system, `S` is a 2D list of dicts.
118
+ To get the step response characteristics from the j-th input to the
119
+ i-th output, access ``S[i][j]``
99
120
100
121
101
122
See Also
@@ -105,11 +126,13 @@ def stepinfo(sys, T=None, SettlingTimeThreshold=0.02,
105
126
Examples
106
127
--------
107
128
>>> S = stepinfo(sys, T)
108
- '''
129
+ """
109
130
from ..timeresp import step_info
110
131
111
132
# Call step_info with MATLAB defaults
112
- S = step_info (sys , T , None , SettlingTimeThreshold , RiseTimeLimits )
133
+ S = step_info (sysdata , T = T , T_num = None , yfinal = yfinal ,
134
+ SettlingTimeThreshold = SettlingTimeThreshold ,
135
+ RiseTimeLimits = RiseTimeLimits )
113
136
114
137
return S
115
138
0 commit comments