确定一个数据集近似于正弦波 [英] Determining if a dataset approximates a sine wave

查看:260
本文介绍了确定一个数据集近似于正弦波的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可用于确定数据在固定的时间间隔所取的样品是否近似于一个正弦波?的算法

Is there an algorithm that can be used to determine whether a sample of data taken at fixed time intervals approximates a sine wave?

推荐答案

采取傅立叶变换,其将所述数据转换成频率表(搜索fft的,快速傅立叶变换,对一个实现。举例来说, FFTW 的)。如果是静脉窦或余弦,频率表将包含与您正在搜索的频率和一些噪音在其他频率一个非常高的价值。

Take the fourier transform which transforms the data into a frequency table (search for fft, fast fourier transformation, for an implementation. For example, FFTW). If it is a sinus or cosinus, the frequency table will contain one very high value corresponding to the frequency you're searching for and some noise at other frequencies.

另外,比赛的几个sinussen在几个频率并尝试使用交叉相关,以配合他们:你的信号,并且你要适合窦之间的差的平方的总和。您需要在一个范围内,当然频率做到这一点的sinussen。与您需要为此而沿x轴平移所述窦找到相

Alternatively, match several sinussen at several frequencies and try to match them using cross correlation: the sum of squares of the differences between your signal and the sinus you're trying to fit. You would need to do this for sinussen at a range of frequencies of course. And you would need to do this while translating the sinus along the x-axis to find the phase.

这篇关于确定一个数据集近似于正弦波的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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