绘图全通滤波器的伯德图

时间:2018-06-12 08:14:16

标签: python filter scipy signals

我正在尝试绘制全通滤波器的Bode图。但是,输出与应有的不同。幅度不应该恒定吗? 我正在使用此公式进行全通过滤: enter image description here

from scipy import signal
import matplotlib.pyplot as plt

sys = signal.TransferFunction([0.5, 1], [1, 0.5])
print("Zeros {}".format(sys.zeros))
print("Poles {}".format(sys.poles))
w, mag, phase = sys.bode()

plt.figure()
plt.title("Mag")
plt.semilogx(w, mag)    # Bode magnitude plot
plt.figure()
plt.title("Phase")
plt.semilogx(w, phase)  # Bode phase plot
plt.show()

输出: Zeros [-2。] 极点[-0.5]

enter image description here

enter image description here

0 个答案:

没有答案
相关问题