如何在GNU Radio中计算两个信号源之间的相位差

huangapple go评论89阅读模式
英文:

How to calculate the Phase difference between two signal sources in GNU Radio

问题

I am trying to calculate the phase difference between two signals, a sine wave and a cosine wave, using GNU Radio. I am using the following block configuration:
如何在GNU Radio中计算两个信号源之间的相位差

The problem is that I am not getting the desired output in the time sink block. I just see a constant signal with amplitude of 0 not changing over time.

如何在GNU Radio中计算两个信号源之间的相位差

Is my block configuration to calculate the phase difference between the two signals right?

英文:

I am trying to calculate the phase difference between two signals, a sine wave and a cosine wave, using GNU Radio. I am using the following block configuration:
如何在GNU Radio中计算两个信号源之间的相位差

The problem is that I am not getting the desired output in the time sink block. I just see a constant signal with amplitude of 0 not changing over time.

如何在GNU Radio中计算两个信号源之间的相位差

Is my block configuration to calculate the phase difference between the two signals right?

答案1

得分: 1

按照官方块文档中所述,

> 正弦
> - 实值信号类型:振幅·sin(2π·频率/采样率·n) + 偏移量
> - 复值信号类型:振幅·[cos(2π·频率/采样率·n) + 1j·sin(2π·频率/采样率·n)] + 偏移量
>
> 余弦
> - 实值信号类型:振幅·cos(2π·频率/采样率·n) + 偏移量
> - 复值信号类型(与正弦相同):振幅·cos(2π·频率/采样率·n) + 1j·sin(2π·频率/采样率·n) + 偏移量

(重点标记)

所以,这并不奇怪 - 你一直在将exp(j·某事)与其共轭相乘,得到一个常数exp(j·0) = 1,其参数为0。

尝试改变其中一个的初始相位!

英文:

As documented in the official Block documentation,

> Sine
> - Real-valued signal types: Amplitude·sin(2π·Frequency/Sample Rate·n) + Offset
> - Complex-valued signal types: Amplitude·[cos(2π·Frequency/Sample Rate·n) + 1j·sin(2π·Frequency/Sample Rate·n)] + Offset
>
> Cos
> - Real-valued signal types: Amplitude·cos(2π·Frequency/Sample Rate·n) + Offset
> - Complex-valued signal types (identical to Sin): Amplitude·cos(2π·Frequency/Sample Rate·n) + 1j·sin(2π·Frequency/Sample
> Rate·n) + Offset

(emphasis mine)

So, this isn't surprising - you're multiplying exp(j·something) with its own conjugate all the time, getting a constant exp(j·0) = 1, which has argument 0.

Try changing the initial phase of either of these!

huangapple
  • 本文由 发表于 2023年5月17日 20:39:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/76272210.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定