关于FFT相位问题 [英] About FFT phase problems

查看:139
本文介绍了关于FFT相位问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我无法理解FFT的运行情况.给定许多正弦点,我需要将它们拟合为正弦函数.也就是说,我需要根据y = A·sin(B·t + C)+ D来了解A,B,C和D.

我打算这样做的方式是通过执行FFT-> D(偏移)是0 Hz时的幅度,B是FFT幅度最大的频率,因此我也可以知道A在那一点.

我将C#(.NET)与Exocortex.DSP.v1库一起使用.我做了自己的图形库.您可以从此处-.gt;下载.exe. http://openelectronicdesigns.com/files/public/myFFT.zip [
问题来了.如果您更改频率,假设频率为10.25Hz,则相位也会更改,这是我不了解的.只有在FFT的1024个点内有完整的周期数时,我才能计算相位.最初,我认为这是因为从最后一个点到初始点的不连续性,这就是为什么我添加了FFT窗口化选项的原因.但这没什么大不同...

有人可以告诉我我在做什么错吗?我认为这可能是一个概念性问题,而不是程序性问题,但是这里有很多聪明人;)

谢谢!

Hi,

I''m having trouble to understand what''s going on with my FFT. Given a number of sinusoidal points, I need to fit them into a sine function. That is, I need to know A, B, C and D from y = A·sin(B·t+C)+D.

The way I intended to do it was by performing the FFT -> D (the offset) would be the amplitude at 0 Hz, B the frequency where the FFT amplitude is maximum, so I can also know A at that point.

I use C# (.NET) together with the Exocortex.DSP.v1 library. I did my own graphic library. You can download the .exe from here -> http://openelectronicdesigns.com/files/public/myFFT.zip[^].

This is just a program to show my problem. I generate a time signal, then calculate the FFT, and represent the complex number in the Complex plot. As you can see when you uncheck the "FFT Windowing" and set the frequency to 10 (10 cycles over 1024 points), you can change the phase, and the phasor at the Complex plot changes according to it. The phase is correct in that case.

Here the problem comes. If you change the frequency, let''s say at 10.25Hz, the phase also changes, and that''s what I don''t understand. I can only calculate the phase when I have a complete number of cycles inside the 1024 points of the FFT. Initially I thought it was because of the discontinuity from the last to the initial point, and that''s why I added the FFT Windowing option. But it makes no major difference...

Anyone could please tell me what am I doing wrong? I think it might be a conceptual problem rather than a programmatic one, but there are lots of intelligent people around here ;)

Thank you!

推荐答案

我现在看到了问题,我是用错误的方式看的.相位和幅度不同的许多正弦之和,这就是为什么以这种方式显示复杂曲线​​的原因...

因此,问题是:假设输入为正弦波,我是否可以对复杂数据进行任何类型的计算以得到A,B,C和D?

谢谢!
I see the problem now, I was watching it from the wrong way... The FFT of a sine with a non complete number of cycles is the sum of lots of sines with different phases and amplitudes, that''s why the complex plot is shown that way...

So, the question is: can I make any kind of calculation with the complex data get A,B,C and D, assuming that the input is a sine wave?

Thanks!


这篇关于关于FFT相位问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆