@@ -44,7 +44,43 @@ def __init__(self, inputs=1, outputs=1, states=None, name=None, **kwargs):
44
44
def __call__ (self ,x ,squeeze = None ,warn_infinite = True ):
45
45
"""Evaluate system transfer function at point in complex plane.
46
46
47
- See `StateSpace.__call__` and `TransferFunction.__call__` for details.
47
+ Returns the value of the system's transfer function at a point `x`
48
+ in the complex plane, where `x` is `s` for continuous-time systems
49
+ and `z` for discrete-time systems.
50
+
51
+ By default, a (complex) scalar will be returned for SISO systems
52
+ and a p x m array will be return for MIMO systems with m inputs and
53
+ p outputs. This can be changed using the `squeeze` keyword.
54
+
55
+ To evaluate at a frequency `omega` in radians per second,
56
+ enter ``x = omega * 1j`` for continuous-time systems,
57
+ ``x = exp(1j * omega * dt)`` for discrete-time systems, or
58
+ use the `~LTI.frequency_response` method.
59
+
60
+ Parameters
61
+ ----------
62
+ x : complex or complex 1D array_like
63
+ Complex value(s) at which transfer function will be evaluated.
64
+ squeeze : bool, optional
65
+ Squeeze output, as described below. Default value can be set
66
+ using `config.defaults['control.squeeze_frequency_response']`.
67
+ warn_infinite : bool, optional
68
+ If set to False, turn off divide by zero warning.
69
+
70
+ Returns
71
+ -------
72
+ fresp : complex ndarray
73
+ The value of the system transfer function at `x`. If the system
74
+ is SISO and `squeeze` is not True, the shape of the array matches
75
+ the shape of `x`. If the system is not SISO or `squeeze` is
76
+ False, the first two dimensions of the array are indices for the
77
+ output and input and the remaining dimensions match `x`. If
78
+ `squeeze` is True then single-dimensional axes are removed.
79
+
80
+ Notes
81
+ -----
82
+ See `FrequencyResponseData`.__call__`, `StateSpace.__call__`,
83
+ `TransferFunction.__call__` for class-specific details.
48
84
49
85
"""
50
86
raise NotImplementedError ("not implemented in subclass" )
@@ -117,7 +153,7 @@ def frequency_response(self, omega=None, squeeze=None):
117
153
118
154
def dcgain (self ):
119
155
"""Return the zero-frequency (DC) gain."""
120
- return NotImplemented
156
+ raise NotImplementedError ( "dcgain not defined for subclass" )
121
157
122
158
def _dcgain (self ,warn_infinite ):
123
159
zeroresp = self (0 if self .isctime ()else 1 ,
@@ -443,8 +479,7 @@ def evalfr(sys, x, squeeze=None):
443
479
444
480
See Also
445
481
--------
446
- StateSpace.__call__, TransferFunction.__call__, frequency_response,\
447
- bode_plot
482
+ LTI.__call__, frequency_response, bode_plot
448
483
449
484
Notes
450
485
-----