control.describing_function_plot

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

Plot a Nyquist plot with a describing function for a nonlinear system.

This function generates a Nyquist plot for a closed loop system consisting of a linear system with a static nonlinear function 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
  • data (DescribingFunctionData) – A describing function response data object created by describing_function_response().

  • H (LTI system) – Linear time-invariant (LTI) system (state space, transfer function, or FRD)

  • F (static nonlinear function) – A static nonlinearity, either a scalar function or a single-input, single-output, static input/output system.

  • A (list) – List of amplitudes to be used for the describing function plot.

  • omega (list, 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.

  • refine (bool, 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

  • label (str, optional) – Formatting string used to label intersection points on the Nyquist plot. Defaults to “%5.2g @ %-5.2g”. Set to None to omit labels.

Returns

lines – Arrray of Line2D objects for 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 styem. The second element of the array is a list of lines (typically only one) for the describing function curve.

Return type

1D array of Line2D

Examples

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