control.matlab.bode
- control.matlab.bode(syslist[, omega, dB, Hz, deg, ...])[source]
Bode plot of the frequency response.
Plots a bode gain and phase diagram.
- Parameters
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 sys arguments may also be interspersed with format strings. A frequency argument (array_like) may also be added, some examples:
>>> bode(sys, w) # one system, freq vector >>> bode(sys1, sys2, ..., sysN) # several systems >>> bode(sys1, sys2, ..., sysN, w) >>> bode(sys1, 'plotstyle1', ..., sysN, 'plotstyleN') # + plot formats
omega (freq_range) – Range of frequencies in rad/s
dB (boolean) – If True, plot result in dB
Hz (boolean) – If True, plot frequency in Hz (omega must be provided in rad/sec)
deg (boolean) – If True, return phase in degrees (else radians)
plot (boolean) – If True, plot magnitude and phase
Examples
>>> from control.matlab import ss, bode
>>> sys = ss([[1, -2], [3, -4]], [[5], [7]], [[6, 8]], 9) >>> mag, phase, omega = bode(sys)
Todo
Document these use cases
>>> bode(sys, w)
>>> bode(sys1, sys2, ..., sysN)
>>> bode(sys1, sys2, ..., sysN, w)
>>> bode(sys1, 'plotstyle1', ..., sysN, 'plotstyleN')