在 python 中创建一个 chirp

问题描述 投票:0回答:1

我正在尝试使用以下代码在 python 中创建正弦线性调频,但我的结果看起来不正确。

from scipy.signal import chirp
import numpy as np 
import matplotlib.pyplot as plt 

t = np.linspace(0, 320e-9, 1601); 
x = chirp(t, 2.5e9, 320e-9, 4.5e9, method='linear', phi=-90)

我试过各种频率,但没有一个看起来正常。

enter image description here

python signals chirp
1个回答
0
投票

每纳秒大约有 5 个样本。即使在 2.5 GHz,这也刚好满足奈奎斯特采样率。当频率达到 4.5 GHz 时,奈奎斯特采样率为 9 Sa/ns,采样率将接近 2 倍。

linspace
呼叫中的样本数量增加至少 4 倍,并确保将绘图放大到可以区分信号的各个周期的范围。

© www.soinside.com 2019 - 2024. All rights reserved.