control.singular_values_plot
- control.singular_values_plot(data, omega=None, *fmt, plot=None, omega_limits=None, omega_num=None, title=None, legend_loc='center right', **kwargs)[source]
Plot the singular values for a system.
Plot the singular values as a function of frequency for a system or list of systems. If multiple systems are plotted, each system in the list is plotted in a different color.
- Parameters
data (list of FrequencyResponseData) – List of
FrequencyResponseData
objects. For backward compatibility, a list of LTI systems can also be given.omega (array_like) – List of frequencies in rad/sec over to plot over.
*fmt (
matplotlib.pyplot.plot()
format string, optional) – Passed to matplotlib as the format string for all lines in the plot. The omega parameter must be present (use omega=None if needed).dB (bool) – If True, plot result in dB. Default is False.
Hz (bool) – If True, plot frequency in Hz (omega must be provided in rad/sec). Default value (False) set by config.defaults[‘freqplot.Hz’].
legend_loc (str, optional) – For plots with multiple lines, a legend will be included in the given location. Default is ‘center right’. Use False to supress.
**kwargs (
matplotlib.pyplot.plot()
keyword properties, optional) – Additional keywords passed to matplotlib to specify line properties.grid (bool) – If True, plot grid lines on gain and phase plots. Default is set by config.defaults[‘freqplot.grid’].
omega_limits (array_like of two values) – Set limits for plotted frequency range. If Hz=True the limits are in Hz otherwise in rad/s.
omega_num (int) – Number of samples to use for the frequeny range. Defaults to config.defaults[‘freqplot.number_of_samples’]. Ignore if data is not a list of systems.
plot (bool, optional) – (legacy) If given, singular_values_plot returns the legacy return values of magnitude, phase, and frequency. If False, just return the values with no plot.
rcParams (dict) – Override the default parameters used for generating plots. Default is set up config.default[‘freqplot.rcParams’].
- Returns
lines (array of Line2D) – 1-D array of Line2D objects. The size of the array matches the number of systems and the value of the array is a list of Line2D objects for that system.
mag (ndarray (or list of ndarray if len(data) > 1))) – If plot=False, magnitude of the response (deprecated).
phase (ndarray (or list of ndarray if len(data) > 1))) – If plot=False, phase in radians of the response (deprecated).
omega (ndarray (or list of ndarray if len(data) > 1))) – If plot=False, frequency in rad/sec (deprecated).