@@ -199,7 +199,8 @@ def describing_function(
199
199
200
200
201
201
def 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 ):
203
204
"""Plot a Nyquist plot with a describing function for a nonlinear system.
204
205
205
206
This function generates a Nyquist plot for a closed loop system consisting
@@ -220,6 +221,10 @@ def describing_function_plot(
220
221
label : str, optional
221
222
Formatting string used to label intersection points on the Nyquist
222
223
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.
223
228
224
229
Returns
225
230
-------
@@ -240,9 +245,15 @@ def describing_function_plot(
240
245
[(3.344008947853124, 1.414213099755523)]
241
246
242
247
"""
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
+
243
253
# Start by drawing a Nyquist curve
244
254
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 )
246
257
H_omega , H_vals = contour .imag , H (contour )
247
258
248
259
# Compute the describing function
0 commit comments