假设我使用以下 python 代码生成啁啾信号:
t = np.linspace(0, 10, 512)
f0 = 2
f1 = 5
fs = 2*f1
w = chirp(t, f0=f0, f1=f1, t1=10, method='linear')
result = rfft(w)
phase = np.zeros(257)
mag = np.zeros(257)
for binnum in range(len(result)):
mag[binnum] = abs(result[binnum])
phase[binnum] = np.arctan2(result[binnum].imag, result[binnum].real)
plt.plot(fs * np.linspace(0, 0.5, 257),np.unwrap(phase))
plt.show()
plt.plot(fs * np.linspace(0, 0.5, 257),mag)
plt.show()
相图是:
幅度图是:

但它与这里描述的有很大不同。
好吧,看看相位图,我可以看到从 0 到 0.8 的抛物线。幅度绝对不是一个常数。
我做错了什么或误解了什么?
提前致谢。