control.matlab.bode
- control.matlab.bode(sys[, omega, dB, Hz, deg, ...])[source]
Bode plot of the frequency response.
Plots a bode gain and phase diagram.
- Parameters:
- sysLTI, or list of LTI
System for which the Bode response is plotted and give. Optionally a list of systems can be entered, or several systems can be specified (i.e. several parameters). The
sysarguments may also be interspersed with format strings. A frequency argument (array_like) may also be added (see Examples).- omegaarray
Range of frequencies in rad/s.
- dBboolean
If True, plot result in dB.
- Hzboolean
If True, plot frequency in Hz (omega must be provided in rad/sec).
- degboolean
If True, return phase in degrees (else radians).
- plotboolean
If True, plot magnitude and phase.
- Returns:
- mag, phase, omegaarray
Magnitude, phase, and frequencies represented in the Bode plot.
Examples
>>> from control.matlab import ss, bode
>>> sys = ss([[1, -2], [3, -4]], [[5], [7]], [[6, 8]], 9) >>> mag, phase, omega = bode(sys) >>> bode(sys, w) # one system, freq vector >>> bode(sys1, sys2, ..., sysN) # several systems >>> bode(sys1, sys2, ..., sysN, w) >>> bode(sys1, 'plotstyle1', ..., sysN, 'plotstyleN')