简体   繁体   English

在八度中使用fft进行外推

[英]Extrapolation using fft in octave

Using GNU octave, I'm computing a fft over a piece of signal, then eliminating some frequencies, and finally reconstructing the signal. 使用GNU八度,我正在计算一条信号的fft,然后消除一些频率,最后重建信号。 This give me a nice approximation of the signal ; 这给了我一个很好的信号近似值; but it doesn't give me a way to extrapolate the data. 但这并没有给我一种推断数据的方法。

Suppose basically that I have plotted three periods and a half of 基本上假设我已经绘制了三个周期的一半

f: x -> sin(x) + 0.5*sin(3*x) + 1.2*sin(5*x)

and then added a piece of low amplitude, zero-centered random noise. 然后添加一块低振幅,零中心的随机噪声。 With fft/ifft, I can easily remove most of the noise ; 使用fft / ifft,我可以轻松消除大部分噪音; but then how do I extrapolate 3 more periods of my signal data? 但是我该如何推断信号数据的另外三个周期呢? (other of course that duplicating the signal). (当然还有其他复制信号的功能)。

The math way is easy : you have a decomposition of your function as an infinite sum of sines/cosines, and you just need to extract a partial sum and apply it anywhere. 数学方法很简单:您可以将函数分解为无限的正弦/余弦,而您只需要提取部分和并将其应用到任何地方即可。 But I don't quite get the programmatic way... 但是我不太了解编程方式...

Thanks! 谢谢!

The Discrete Fourier Transform relies on the assumption that your time domain data is periodic, so you can just repeat your time domain data ad nauseam - no explicit extrapolation is necessary. 离散傅立叶变换依赖于以下假设:您的时域数据是周期性的,因此您可以重复进行时域数据,而ad nauseam任何重复-无需显式外推。 Of course this may not give you what you expect if your individual component periods are not exact sub-multiples of the DFT input window duration. 当然,如果您的单个分量周期不是DFT输入窗口持续时间的精确整数倍,那么这可能无法满足您的期望。 This is one reason why we typically apply window functions such as the Hanning Window prior to the transform. 这就是为什么我们通常在变换之前应用诸如Hanning Window之类的窗口功能的原因之一。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM