control.frd

control.frd(frdata, omega[, dt])[source]

Construct a frequency response data (FRD) model.

A frequency response data model stores the (measured) frequency response of a system. This factory function can be called in different ways:

frd(frdata, omega)

Create an frd model with the given response data, in the form of complex response vector, at matching frequencies omega [in rad/s].

frd(sys, omega)

Convert an LTI system into an frd model with data at frequencies omega.

Parameters
frdataarray_like or LTI system

Complex vector with the system response or an LTI system that can be used to compute the frequency response at a list of frequencies.

sysStateSpace or TransferFunction

A linear system that will be evaluated for frequency response data.

omegaarray_like

Vector of frequencies at which the response is evaluated.

dtfloat, True, or None

System timebase.

smoothbool, optional

If True, create an interpolation function that allows the frequency response to be computed at any frequency within the range of frequencies give in omega. If False (default), frequency response can only be obtained at the frequencies specified in omega.

Returns
sysFrequencyResponseData

New frequency response data system.

Other Parameters
inputs, outputsstr, or list of str, optional

List of strings that name the individual signals of the transformed system. If not given, the inputs and outputs are the same as the original system.

input_prefix, output_prefixstring, optional

Set the prefix for input and output signals. Defaults = ‘u’, ‘y’.

namestring, optional

Set the name of the system. If unspecified and the system is sampled from an existing system, the new system name is determined by adding the prefix and suffix strings in config.defaults['iosys.sampled_system_name_prefix'] and config.defaults['iosys.sampled_system_name_suffix'], with the default being to add the suffix ‘$sampled’. Otherwise, a generic name ‘sys[id]’ is generated with a unique integer id

Examples

>>> # Create from measurements
>>> response = [1.0, 1.0, 0.5]
>>> omega = [1, 10, 100]
>>> F = ct.frd(response, omega)
>>> G = ct.tf([1], [1, 1])
>>> omega = [1, 10, 100]
>>> F = ct.frd(G, omega)