1919
2020__all__ = ['issiso' , 'timebase' , 'common_timebase' , 'timebaseEqual' ,
2121 'isdtime' , 'isctime' , 'pole' , 'zero' , 'damp' , 'evalfr' ,
22- 'freqresp' , 'dcgain' ]
22+ 'frequency_response' , ' freqresp' , 'dcgain' ]
2323
2424class LTI :
2525 """LTI is a parent class to linear time-invariant (LTI) system objects.
@@ -172,16 +172,16 @@ def frequency_response(self, omega, squeeze=None):
172172
173173 Reports the frequency response of the system,
174174
175- G(j*omega) = mag* exp(j*phase)
175+ G(j*omega) = mag * exp(j*phase)
176176
177- for continuous time systems. For discrete time systems, the response is
178- evaluated around the unit circle such that
177+ for continuous time systems. For discrete time systems, the response
178+ is evaluated around the unit circle such that
179179
180- G(exp(j*omega*dt)) = mag* exp(j*phase).
180+ G(exp(j*omega*dt)) = mag * exp(j*phase).
181181
182182 In general the system may be multiple input, multiple output (MIMO),
183- where `m = self.ninputs` number of inputs and `p = self.noutputs` number
184- of outputs.
183+ where `m = self.ninputs` number of inputs and `p = self.noutputs`
184+ number of outputs.
185185
186186 Parameters
187187 ----------
@@ -203,15 +203,15 @@ def frequency_response(self, omega, squeeze=None):
203203
204204 mag, phase, omega = response
205205
206- where ``mag`` is the magnitude (absolute value, not dB or log10)
207- of the system frequency response, ``phase`` is the wrapped phase
208- in radians of the system frequency response, and ``omega`` is the
209- (sorted) frequencies at which the response was evaluated. If the
210- system is SISO and squeeze is not True, ``mag `` and ``phase`` are
211- 1D, indexed by frequency. If the system is not SISO or squeeze is
212- False, the array is 3D, indexed by the output, input, and
213- frequency. If ``squeeze`` is True then single-dimensional axes
214- are removed.
206+ where ``mag`` is the magnitude (absolute value, not dB or
207+ log10) of the system frequency response, ``phase`` is the wrapped
208+ phase in radians of the system frequency response, and ``omega``
209+ is the (sorted) frequencies at which the response was evaluated.
210+ If the system is SISO and squeeze is not True, ``magnitude `` and
211+ ``phase`` are 1D, indexed by frequency. If the system is not SISO
212+ or squeeze is False, the array is 3D, indexed by the output,
213+ input, and frequency. If ``squeeze`` is True then
214+ single-dimensional axes are removed.
215215
216216 """
217217 omega = np .sort (np .array (omega , ndmin = 1 ))
@@ -597,7 +597,7 @@ def evalfr(sys, x, squeeze=None):
597597 """
598598 return sys .__call__ (x , squeeze = squeeze )
599599
600- def freqresp (sys , omega , squeeze = None ):
600+ def frequency_response (sys , omega , squeeze = None ):
601601 """Frequency response of an LTI system at multiple angular frequencies.
602602
603603 In general the system may be multiple input, multiple output (MIMO), where
@@ -671,6 +671,10 @@ def freqresp(sys, omega, squeeze=None):
671671 return sys .frequency_response (omega , squeeze = squeeze )
672672
673673
674+ # Alternative name (legacy)
675+ freqresp = frequency_response
676+
677+
674678def dcgain (sys ):
675679 """Return the zero-frequency (or DC) gain of the given system
676680
0 commit comments