topic Re: Accurate Frequency Determination FFT Analysis in PTC Mathcad
https://community.ptc.com/t5/PTC-Mathcad/Accurate-Frequency-Determination-FFT-Analysis/m-p/448383#M176675
<HTML><HEAD></HEAD><BODY><P>Part of the error comes from sampling, but a lot is from the fact that you do not have an integer number of periods. Your sinusoid is therefore not actually a single frequency. </P><P></P><P>If you want an accurate estimate of the frequency of a simple sinusoid (or even the sum of a few frequencies) you can first get estimates of the frequency, phase, and amplitude from the FT, and then do a least squares fit of a pure sinusoid to the data using the estimated values as guesses. The least squares fit is prone to errors without good guesses, but the estimates from the FT are good enough (at least they have been every time I have done this, and I have been doing it for almost 20 years). See here for an example: <A _jive_internal="true" href="https://community.ptc.com/message/134317#134317">http://communities.ptc.com/message/134317#134317</A></P><P></P><P>As an aside, you can't copyright an algorithm, only the specific coding you used. If you want to protect an algorithm you need to patent it (which you now can't do, even if you were willing to spend the money, because you have disclosed it).</P></BODY></HTML>Sat, 27 Apr 2013 22:32:07 GMTRichardJ2013-04-27T22:32:07ZAccurate Frequency Determination FFT Analysis
https://community.ptc.com/t5/PTC-Mathcad/Accurate-Frequency-Determination-FFT-Analysis/m-p/448381#M176673
Accurate Fast Fourier Transform AnalysisSampling Frequency Paradox and 100 Single Musical Note Frequencies C0 to D8# SummaryWant to be able to analyse accurately sounds of practical frequencies? An algorithm has been found for a much more accurate way to do it.On average it is 1000'sThu, 03 May 2018 17:20:10 GMThttps://community.ptc.com/t5/PTC-Mathcad/Accurate-Frequency-Determination-FFT-Analysis/m-p/448381#M176673Tezza20102018-05-03T17:20:10ZRe: Accurate Frequency Determination FFT Analysis
https://community.ptc.com/t5/PTC-Mathcad/Accurate-Frequency-Determination-FFT-Analysis/m-p/448382#M176674
<HTML><HEAD></HEAD><BODY><P>Interesting idea!</P><P></P><P>How would you execute this idea for a signal that wasn't a pure tone (say a three-note chord?) Run it three times, once for each note?</P><P></P><P>If you changed the starting sample rate, does the accuracy vary? </P><P></P><P>How does the accuracy of the amplitude track? Your signal has an amplitude of 1, yet you report a match to an "exact amplitude" of 22.722.</P><P></P><P>If you vary phase, does it track?</P></BODY></HTML>Thu, 25 Apr 2013 12:36:26 GMThttps://community.ptc.com/t5/PTC-Mathcad/Accurate-Frequency-Determination-FFT-Analysis/m-p/448382#M176674FredKohlhepp2013-04-25T12:36:26ZRe: Accurate Frequency Determination FFT Analysis
https://community.ptc.com/t5/PTC-Mathcad/Accurate-Frequency-Determination-FFT-Analysis/m-p/448383#M176675
<HTML><HEAD></HEAD><BODY><P>Part of the error comes from sampling, but a lot is from the fact that you do not have an integer number of periods. Your sinusoid is therefore not actually a single frequency. </P><P></P><P>If you want an accurate estimate of the frequency of a simple sinusoid (or even the sum of a few frequencies) you can first get estimates of the frequency, phase, and amplitude from the FT, and then do a least squares fit of a pure sinusoid to the data using the estimated values as guesses. The least squares fit is prone to errors without good guesses, but the estimates from the FT are good enough (at least they have been every time I have done this, and I have been doing it for almost 20 years). See here for an example: <A _jive_internal="true" href="https://community.ptc.com/message/134317#134317">http://communities.ptc.com/message/134317#134317</A></P><P></P><P>As an aside, you can't copyright an algorithm, only the specific coding you used. If you want to protect an algorithm you need to patent it (which you now can't do, even if you were willing to spend the money, because you have disclosed it).</P></BODY></HTML>Sat, 27 Apr 2013 22:32:07 GMThttps://community.ptc.com/t5/PTC-Mathcad/Accurate-Frequency-Determination-FFT-Analysis/m-p/448383#M176675RichardJ2013-04-27T22:32:07Z