英文:
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:
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.
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:
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.
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!
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论