control.describing_function_plotļƒ

control.describing_function_plot(data, *args, **kwargs)[source]ļƒ

Nyquist plot with describing function for a nonlinear system.

This function generates a Nyquist plot for a closed loop system consisting of a linear system with a nonlinearity in the feedback path.

The function may be called in one of two forms:

describing_function_plot(response[, options])

describing_function_plot(H, F, A[, omega[, options]])

In the first form, the response should be generated using the describing_function_response function. In the second form, that function is called internally, with the listed arguments.

Parameters
dataDescribingFunctionResponse

A describing function response data object created by describing_function_response.

HLTI system

Linear time-invariant (LTI) system (state space, transfer function, or FRD).

Fnonlinear function

Nonlinearity in the feedback path, either a scalar function or a single-input, single-output, static input/output system.

Alist

List of amplitudes to be used for the describing function plot.

omegalist, optional

List of frequencies to be used for the linear system Nyquist curve. If not specified (or None), frequencies are computed automatically based on the properties of the linear system.

refinebool, optional

If True (default), refine the location of the intersection of the Nyquist curve for the linear system and the describing function to determine the intersection point.

labelstr or array_like of str, optional

If present, replace automatically generated label with the given label.

point_labelstr, optional

Formatting string used to label intersection points on the Nyquist plot. Defaults to ā€œ%5.2g @ %-5.2gā€. Set to None to omit labels.

axmatplotlib.axes.Axes, optional

The matplotlib axes to draw the figure on. If not specified and the current figure has a single axes, that axes is used. Otherwise, a new figure is created.

titlestr, optional

Set the title of the plot. Defaults to plot type and system name(s).

warn_nyquistbool, optional

Set to True to turn on warnings generated by nyquist_plot or False to turn off warnings. If not set (or set to None), warnings are turned off if omega is specified, otherwise they are turned on.

**kwargsmatplotlib.pyplot.plot keyword properties, optional

Additional keywords passed to matplotlib to specify line properties for Nyquist curve.

Returns
cpltControlPlot object

Object containing the data that were plotted. See ControlPlot for more detailed information.

cplt.linesarray of matplotlib.lines.Line2D

Array containing information on each line in the plot. The first element of the array is a list of lines (typically only one) for the Nyquist plot of the linear I/O system. The second element of the array is a list of lines (typically only one) for the describing function curve.

cplt.axes2D array of matplotlib.axes.Axes

Axes for each subplot.

cplt.figurematplotlib.figure.Figure

Figure containing the plot.

Examples

>>> H_simple = ct.tf([8], [1, 2, 2, 1])
>>> F_saturation = ct.saturation_nonlinearity(1)
>>> amp = np.linspace(1, 4, 10)
>>> cplt = ct.describing_function_plot(H_simple, F_saturation, amp)