{ } Raw JSON

bundles / scipy latest / scipy / signal / _ltisys / dlti / bode

function

scipy.signal._ltisys:dlti.bode

source: /scipy/signal/_ltisys.py :452

Signature

def   bode ( self w = None n = 100 )

Summary

Calculate Bode magnitude and phase data of a discrete-time system.

Extended Summary

Returns a 3-tuple containing arrays of frequencies [rad/s], magnitude [dB] and phase [deg]. See dbode for details.

Examples

from scipy import signal
import matplotlib.pyplot as plt
Construct the transfer function :math:`H(z) = \frac{1}{z^2 + 2z + 3}` with sampling time 0.5s:
sys = signal.TransferFunction([1], [1, 2, 3], dt=0.5)
Equivalent: signal.dbode(sys)
w, mag, phase = sys.bode()
plt.figure()
plt.semilogx(w, mag)    # Bode magnitude plot
plt.figure()
plt.semilogx(w, phase)  # Bode phase plot
plt.show()
fig-0a8f56e94364c819.png
fig-0d77f006f16a76f0.png

Aliases

  • scipy.signal.dlti.bode