【问题标题】:Interpolating measured sine wave using python使用python插值测量的正弦波
【发布时间】:2021-06-04 05:26:09
【问题描述】:

我从 DSO 获得了 2 个采样正弦波作为测量值。 DSO 的采样率为 160 GSa/s,我的信号为 60 GHz。我需要找到两个正弦波之间的相位差。两者频率相同。然而,采样率不足以准确地确定相位。有什么方法可以对测量的信号进行插值,得到更好的正弦波,然后计算相位差?

【问题讨论】:

    标签: python signal-processing interpolation sampling phase


    【解决方案1】:

    您可以fit to sine functions,但对于相位差(delta phi=2pi 频率 delta t),检测和比较过零(分别为可能的恒定偏移)就足够了,可以通过插值从您的系列片段中找到,例如

    w=6.38    # some radian frequency
    t = np.linspace(0, 0.5)   # time interval containing ONE zero-crossing
    delta_phi=0.1   # some phase difference
    x = np.sin(w*t-delta_phi)    # x(t)
    f = interpolate.interp1d(x, t)     # interpolate t(x), default is linear 
    delta_t = f(0)    # zero-crossing time referred to t=0
    delta_phi_detected= w*delta_t
    

    您需要关联两个相邻的信号过零。

    或者,您可以通过随时间 T 收敛到 (T/2)cos(delta_phi) 的信号和数值积分相乘来获得平均值,如果两个信号的平均值为零。

    【讨论】:

      猜你喜欢
      • 2019-09-18
      • 1970-01-01
      • 2018-06-11
      • 2021-10-08
      • 1970-01-01
      • 1970-01-01
      • 2015-02-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多