Skip to content

Commit bb4ff1e

Browse files
committed
address remaining @sawyerbfuller review comments
1 parent 59e7314 commit bb4ff1e

3 files changed

Lines changed: 41 additions & 5 deletions

File tree

control/lti.py

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,43 @@ def __init__(self, inputs=1, outputs=1, states=None, name=None, **kwargs):
4242
def __call__(self, x, squeeze=None, warn_infinite=True):
4343
"""Evaluate system transfer function at point in complex plane.
4444
45-
See `StateSpace.__call__` and `TransferFunction.__call__` for details.
45+
Returns the value of the system's transfer function at a point `x`
46+
in the complex plane, where `x` is `s` for continuous-time systems
47+
and `z` for discrete-time systems.
48+
49+
By default, a (complex) scalar will be returned for SISO systems
50+
and a p x m array will be return for MIMO systems with m inputs and
51+
p outputs. This can be changed using the `squeeze` keyword.
52+
53+
To evaluate at a frequency `omega` in radians per second,
54+
enter ``x = omega * 1j`` for continuous-time systems,
55+
``x = exp(1j * omega * dt)`` for discrete-time systems, or
56+
use the `~LTI.frequency_response` method.
57+
58+
Parameters
59+
----------
60+
x : complex or complex 1D array_like
61+
Complex value(s) at which transfer function will be evaluated.
62+
squeeze : bool, optional
63+
Squeeze output, as described below. Default value can be set
64+
using `config.defaults['control.squeeze_frequency_response']`.
65+
warn_infinite : bool, optional
66+
If set to False, turn off divide by zero warning.
67+
68+
Returns
69+
-------
70+
fresp : complex ndarray
71+
The value of the system transfer function at `x`. If the system
72+
is SISO and `squeeze` is not True, the shape of the array matches
73+
the shape of `x`. If the system is not SISO or `squeeze` is
74+
False, the first two dimensions of the array are indices for the
75+
output and input and the remaining dimensions match `x`. If
76+
`squeeze` is True then single-dimensional axes are removed.
77+
78+
Notes
79+
-----
80+
See `FrequencyResponseData`.__call__`, `StateSpace.__call__`,
81+
`TransferFunction.__call__` for class-specific details.
4682
4783
"""
4884
raise NotImplementedError("not implemented in subclass")
@@ -117,7 +153,7 @@ def frequency_response(self, omega=None, squeeze=None):
117153

118154
def dcgain(self):
119155
"""Return the zero-frequency (DC) gain."""
120-
return NotImplemented
156+
raise NotImplementedError("dcgain not defined for subclass")
121157

122158
def _dcgain(self, warn_infinite):
123159
zeroresp = self(0 if self.isctime() else 1,
@@ -443,8 +479,7 @@ def evalfr(sys, x, squeeze=None):
443479
444480
See Also
445481
--------
446-
StateSpace.__call__, TransferFunction.__call__, frequency_response, \
447-
bode_plot
482+
LTI.__call__, frequency_response, bode_plot
448483
449484
Notes
450485
-----

control/statesp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1735,7 +1735,7 @@ def ss(*args, **kwargs):
17351735
17361736
See Also
17371737
--------
1738-
tf, ss2tf, tf2ss, zpk
1738+
StateSpace, nlsys, tf, ss2tf, tf2ss, zpk
17391739
17401740
Notes
17411741
-----

doc/xferfcn.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ domain properties of a linear systems:
3838
frequency_response
3939
phase_crossover_frequencies
4040
singular_values_response
41+
stability_margins
4142
tfdata
4243

4344
These functions work on both state space and transfer function models.

0 commit comments

Comments
 (0)