Dear All, I put the data from the output of FFT into a power spectrum, and there is a bias in the data, changing sample speed and number or samples there always seems to be a ratio between low and high frequencies in the data. I am not sure if this is correct with FFT, I expected to see changes independently on the low and high frequencies. Should I try some sort of filter pre FFT? The output is always biased to the left of the spectrum sloping down to the right, most of the time the largest numbers is in the left most position Thanks
FFT output bias
Started by ●August 26, 2011
Reply by ●August 26, 20112011-08-26
>Dear All, > >I put the data from the output of FFT into a power spectrum, and there isa>bias in the data, changing sample speed and number or samples therealways>seems to be a ratio between low and high frequencies in the data. > >I am not sure if this is correct with FFT, I expected to see changes >independently on the low and high frequencies. > >Should I try some sort of filter pre FFT? > >The output is always biased to the left of the spectrum sloping down tothe>right, most of the time the largest numbers is in the left most position > >Thanks > > >I am sampling at 100ms intervals and using 2048 samples
Reply by ●August 26, 20112011-08-26
On Aug 27, 7:26�am, "tinkerz" <nwoodhamuk@n_o_s_p_a_m.googlemail.com> wrote:> Dear All, > > I put the data from the output of FFT into a power spectrum, and there is a > bias in the data, changing sample speed and number or samples there always > seems to be a ratio between low and high frequencies in the data. > > I am not sure if this is correct with FFT, I expected to see changes > independently on the low and high frequencies. > > Should I try some sort of filter pre FFT? > > The output is always biased to the left of the spectrum sloping down to the > right, most of the time the largest numbers is in the left most position > > Thankscan you repeat please in English? Output of an FFT into a Power spectrum? The periodogram from an FFT is the approximation to a continuous time power spetrum. Just take mag^2/N. Of course you will need to window the data and average the FFTs to get an accurate result. Hardy
Reply by ●August 26, 20112011-08-26
I probably have not coded the output correctly Power Spectral Density (PSD) I have just added the two outputs and squared them for every frequency output. that maybe my error, what is the correct way to make FFT output into Power Spectral Density (PSD) Thanks
Reply by ●August 27, 20112011-08-27
Reply by ●August 27, 20112011-08-27
On Sat, 27 Aug 2011 05:45:57 -0500, "tinkerz" <nwoodhamuk@n_o_s_p_a_m.googlemail.com> wrote:>Still trying find someone who can consult me on this, ant suggestions of >where to go > >thanksHow did you test your FFT to assure that it is working correctly? What happens when you provide a sine wave at the input at various frequencies? Eric Jacobsen http://www.ericjacobsen.org http://www.dsprelated.com/blogs-1//Eric_Jacobsen.php
Reply by ●August 27, 20112011-08-27
C# code from the the internet, I assumed it works My code for Power spectral density is from wiki FLowpower+=(Math.Pow(data[index],2)*index)+(Math.Pow(data[index+1],2)*index); This may be the problem, I would like power at each frequency and the total power. to compare the power of the lower half to the upper half
Reply by ●August 27, 20112011-08-27
On Sat, 27 Aug 2011 10:36:55 -0500, "tinkerz" <nwoodhamuk@n_o_s_p_a_m.googlemail.com> wrote:>C# code from the the internet, I assumed it works > >My code for Power spectral density is from wiki > >FLowpower+=(Math.Pow(data[index],2)*index)+(Math.Pow(data[index+1],2)*index); > >This may be the problem, I would like power at each frequency and the total >power. > >to compare the power of the lower half to the upper halfYou can test the FFT and your integration of it by giving it signals with known spectra and comparing the results. e.g., sine waves at various frequencies, combinations thereof, etc. You should be able to isolate whether the FFT is the problem or something else. Eric Jacobsen http://www.ericjacobsen.org http://www.dsprelated.com/blogs-1//Eric_Jacobsen.php
Reply by ●August 27, 20112011-08-27
Reply by ●August 27, 20112011-08-27