Skip to content

Commit 79951a1

Browse files
committed
explanation in docstrings for how time vector T is auto-computed in time response functions
1 parent 512f822 commit 79951a1

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

control/timeresp.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,14 @@ def step_response(sys, T=None, X0=0., input=None, output=None, T_num=None,
463463
LTI system to simulate
464464
465465
T: array-like or number, optional
466-
Time vector, or simulation time duration if a number (time vector is
467-
autocomputed if not given)
466+
Time vector, or simulation time duration if a number. If T is not
467+
provided, an attempt is made to create it automatically from the
468+
dynamics of sys. If sys is continuous-time, the time increment dt
469+
is chosen small enough to show the fastest mode, and the simulation
470+
time period tfinal long enough to show the slowest mode, excluding
471+
poles at the origin. If this results in too many time steps (>5000),
472+
dt is reduced. If sys is discrete-time, only tfinal is computed, and
473+
tfinal is reduced if it requires too many simulation steps.
468474
469475
X0: array-like or number, optional
470476
Initial condition (default = 0)
@@ -545,7 +551,7 @@ def step_info(sys, T=None, T_num=None, SettlingTimeThreshold=0.02,
545551
546552
T: array-like or number, optional
547553
Time vector, or simulation time duration if a number (time vector is
548-
autocomputed if not given)
554+
autocomputed if not given, see :func:`step_response` for more detail)
549555
550556
T_num: number, optional
551557
Number of time steps to use in simulation if T is not provided as an
@@ -635,7 +641,7 @@ def initial_response(sys, T=None, X0=0., input=0, output=None, T_num=None,
635641
636642
T: array-like or number, optional
637643
Time vector, or simulation time duration if a number (time vector is
638-
autocomputed if not given)
644+
autocomputed if not given; see :func:`step_response` for more detail)
639645
640646
X0: array-like or number, optional
641647
Initial condition (default = 0)
@@ -725,7 +731,7 @@ def impulse_response(sys, T=None, X0=0., input=0, output=None, T_num=None,
725731
726732
T: array-like or number, optional
727733
Time vector, or simulation time duration if a number (time vector is
728-
autocomputed if not given)
734+
autocomputed if not given; see :func:`step_response` for more detail)
729735
730736
X0: array-like or number, optional
731737
Initial condition (default = 0)

0 commit comments

Comments
 (0)