@@ -35,8 +35,8 @@ class FrequencyResponseData(LTI):
3535
3636 The FrequencyResponseData (FRD) class is used to represent systems in
3737 frequency response data form. It can be created manually using the
38- class constructor, using the :func:~~ control.frd` factory function
39- (preferred), or via the :func:`~control.frequency_response` function.
38+ class constructor, using the :func:`~ control.frd` factory function or
39+ via the :func:`~control.frequency_response` function.
4040
4141 Parameters
4242 ----------
@@ -67,6 +67,28 @@ class constructor, using the :func:~~control.frd` factory function
6767 frequency point.
6868 dt : float, True, or None
6969 System timebase.
70+ squeeze : bool
71+ By default, if a system is single-input, single-output (SISO) then
72+ the outputs (and inputs) are returned as a 1D array (indexed by
73+ frequency) and if a system is multi-input or multi-output, then the
74+ outputs are returned as a 2D array (indexed by output and
75+ frequency) or a 3D array (indexed by output, trace, and frequency).
76+ If ``squeeze=True``, access to the output response will remove
77+ single-dimensional entries from the shape of the inputs and outputs
78+ even if the system is not SISO. If ``squeeze=False``, the output is
79+ returned as a 3D array (indexed by the output, input, and
80+ frequency) even if the system is SISO. The default value can be set
81+ using config.defaults['control.squeeze_frequency_response'].
82+ ninputs, noutputs, nstates : int
83+ Number of inputs, outputs, and states of the underlying system.
84+ input_labels, output_labels : array of str
85+ Names for the input and output variables.
86+ sysname : str, optional
87+ Name of the system. For data generated using
88+ :func:`~control.frequency_response`, stores the name of the system
89+ that created the data.
90+ title : str, optional
91+ Set the title to use when plotting.
7092
7193 See Also
7294 --------
@@ -259,24 +281,72 @@ def __init__(self, *args, **kwargs):
259281
260282 @property
261283 def magnitude (self ):
284+ """Magnitude of the frequency response.
285+
286+ Magnitude of the frequency response, indexed by either the output
287+ and frequency (if only a single input is given) or the output,
288+ input, and frequency (for multi-input systems). See
289+ :attr:`FrequencyResponseData.squeeze` for a description of how this
290+ can be modified using the `squeeze` keyword.
291+
292+ Input and output signal names can be used to index the data in
293+ place of integer offsets.
294+
295+ :type: 1D, 2D, or 3D array
296+
297+ """
262298 return NamedSignal (
263299 np .abs (self .fresp ), self .output_labels , self .input_labels )
264300
265301 @property
266302 def phase (self ):
303+ """Phase of the frequency response.
304+
305+ Phase of the frequency response in radians/sec, indexed by either
306+ the output and frequency (if only a single input is given) or the
307+ output, input, and frequency (for multi-input systems). See
308+ :attr:`FrequencyResponseData.squeeze` for a description of how this
309+ can be modified using the `squeeze` keyword.
310+
311+ Input and output signal names can be used to index the data in
312+ place of integer offsets.
313+
314+ :type: 1D, 2D, or 3D array
315+
316+ """
267317 return NamedSignal (
268318 np .angle (self .fresp ), self .output_labels , self .input_labels )
269319
270320 @property
271321 def frequency (self ):
322+ """Frequencies at which the response is evaluated.
323+
324+ :type: 1D array
325+
326+ """
272327 return self .omega
273328
274329 @property
275330 def response (self ):
331+ """Complex value of the frequency response.
332+
333+ Value of the frequency response as a complex number, indexed by
334+ either the output and frequency (if only a single input is given)
335+ or the output, input, and frequency (for multi-input systems). See
336+ :attr:`FrequencyResponseData.squeeze` for a description of how this
337+ can be modified using the `squeeze` keyword.
338+
339+ Input and output signal names can be used to index the data in
340+ place of integer offsets.
341+
342+ :type: 1D, 2D, or 3D array
343+
344+ """
276345 return NamedSignal (
277346 self .fresp , self .output_labels , self .input_labels )
278347
279348 def __str__ (self ):
349+
280350 """String representation of the transfer function."""
281351
282352 mimo = self .ninputs > 1 or self .noutputs > 1
0 commit comments