Why does signal still contain a large number of spikes after FFT
49 views (last 30 days)
Show older comments
I have perform FFT on my signal but due to the dc offset my amplitude peaks at 0 hz so i use x = x - mean(x) to remove the dc offset before fft but this time round after fft although I can see the difference but it still contains a lot of spikes. It is as if the signal has yet to go through FFT. Is there a reason for this ?
0 Comments
Accepted Answer
dpb
on 7 Oct 2016
Well, if your original signal is full of a large number of frequency components, the spectrum will be, too. This looks like a few dominants with a large number of what may be sidebands and harmonics/subharmonics. You might see what a dB scale (log) looks like instead of just linear.
What is the signal? Knowing something of the system might let somebody here expound at depth; ya' never knows, but there's a "veritable plethora" of backgrounds/experience.
One issue that could be a problem depending -- was the data collected with analog anti-aliasing filters or some other way to ensure sampling was fast enough to avoid aliasing? If there were components in the original signal higher than or very near the Nyquist, they will fold back into the computed frequency range. If that is the case, once the data are sampled, there's no way to remove that source of contamination.
13 Comments
dpb
on 13 Oct 2016
Remember that for spectral analysis, besides the rate the consistency of that rate is important, too...sampling at 1 kHz a few fractions of a msec owing to OS task-swapping or garbage collection or whatever is a significant error in terms of the sample interval.
More Answers (2)
Image Analyst
on 8 Oct 2016
What are you listening to? It looks like white noise. Is it? If so, I would not be surprised to see basically random energy in any of the wavelengths, which is what I see in your FFT. Like dpb said, we need to know what sound you expect your signal to be, and what you expect the noise to be, to best figure out what kind of filter you need to separate the two.
7 Comments
dpb
on 9 Oct 2016
The code itself looks ok; it's the data-collection that is the issue as you've now recognized it seems. I'll simply note the "richness" of the FFT is simply dependent upon what the input content is; there are going to be as many peaks as there are discernible frequency components in the input signal; probably the examples in texts you've looked at were selected precisely to illustrate some principles from "clean" systems that had well-defined peaks of given frequencies.
In your particular case here, the system undoubtedly is very rich in energy content from the process and then by drastically under-sampling as your collection process did, that compounded the problem immensely by all of those various actual frequencies getting folded into the spectrum over a number of different times and so it ended up looking essentially as white noise as IA noted.
See Also
Categories
Find more on Sonar and Spatial Audio in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!