@@ -199,7 +199,8 @@ def describing_function(
199199
200200
201201def describing_function_plot (
202- H , F , A , omega = None , refine = True , label = "%5.2g @ %-5.2g" , ** kwargs ):
202+ H , F , A , omega = None , refine = True , label = "%5.2g @ %-5.2g" ,
203+ warn = None , ** kwargs ):
203204 """Plot a Nyquist plot with a describing function for a nonlinear system.
204205
205206 This function generates a Nyquist plot for a closed loop system consisting
@@ -220,6 +221,10 @@ def describing_function_plot(
220221 label : str, optional
221222 Formatting string used to label intersection points on the Nyquist
222223 plot. Defaults to "%5.2g @ %-5.2g". Set to `None` to omit labels.
224+ warn : bool, optional
225+ Set to True to turn on warnings generated by `nyquist_plot` or False
226+ to turn off warnings. If not set (or set to None), warnings are
227+ turned off if omega is specified, otherwise they are turned on.
223228
224229 Returns
225230 -------
@@ -240,9 +245,15 @@ def describing_function_plot(
240245 [(3.344008947853124, 1.414213099755523)]
241246
242247 """
248+ # Decide whether to turn on warnings or not
249+ if warn is None :
250+ # Turn warnings on unless omega was specified
251+ warn = omega is None
252+
243253 # Start by drawing a Nyquist curve
244254 count , contour = nyquist_plot (
245- H , omega , plot = True , return_contour = True , ** kwargs )
255+ H , omega , plot = True , return_contour = True ,
256+ warn_encirclements = warn , warn_nyquist = warn , ** kwargs )
246257 H_omega , H_vals = contour .imag , H (contour )
247258
248259 # Compute the describing function
0 commit comments