1
$\begingroup$

I have a clearly 4Hz periodic signal (see image below). However when I apply a fourier transform, there is no peak at 4Hz. Also, when I do a power spectrum density (using Matlab's pwelch algorithm), there is no peak at 4Hz.

My original signal is sampled at 5ms, and is 141 bins (705ms) long.

Why is this & which alogithm will detect the 4Hz peak?

Thanksenter image description here

$\endgroup$
  • $\begingroup$ Period of signal doesn't mean maximum frequency energy. $\endgroup$ – KKS Feb 10 '16 at 3:20
  • 1
    $\begingroup$ is the raw data (STA) generated somehow? or is it measured? do you have the MATLAB code and can you post it somewhere? i actually question this result. it's not quite, but nearly 3 complete cycles. the FFT bins that are at multiples of 3, like $X[3], X[6], X[9]...$ (actually with indices of 1 greater because stupid MATLAB does not know how to count from 0 ) should all have higher amplitude than the others. if this was the whole FFT output (or the magnitude of it), i would also expect to see it reflected on the right. $\endgroup$ – robert bristow-johnson Feb 10 '16 at 4:45
  • 1
    $\begingroup$ You time axis indicates a period of 250 seconds(!). So the associated frequency is not 4Hz but 0.004 Hz. So pretty surely you got your units messed up at least somewhere. And it's quite likely that it also messed up the frequency spectrum calculation. So please show the code that generated these plots and the data set too. $\endgroup$ – Jazzmaniac Feb 10 '16 at 11:38
2
$\begingroup$

An FFT doesn't necessarily show a fundamental periodicity, but instead spectral periodicities, which might be higher harmonics (or overtones) of the periodicity that you might perceive visually.

Also, some spectral peaks can be hidden under (the windowing artifacts of) a relatively large enough DC offset. If you subtract the mean of the data before doing the FFT, these frequency peaks might show up more clearly.

$\endgroup$
  • $\begingroup$ yes, removing DC did the trick. thnx! $\endgroup$ – DankMasterDan Mar 1 '16 at 18:36
0
$\begingroup$

From the axis label time period seems to be 250 s, so the frequency is 0.004 Hz which is very close to DC, in that case you are seeing the right thing. If the axis label is in ms then you may try -

  1. Take the mean of the signal and apply FFT, that way it will show the frequencies close to DC without getting buried under DC or 1/f noise
  2. Check if your FFT sampling rate is same as the signal's sampling rate
$\endgroup$
  • $\begingroup$ sorry @Ashikur, the x-label was a mistake, it should have said 'Time (ms)'. The periodicity is indeed at 4Hz. $\endgroup$ – DankMasterDan Feb 10 '16 at 15:35
  • $\begingroup$ Also, I understand why a DC offset would make a large peak at the 0 frequency, but why would it create 1/f noise? $\endgroup$ – DankMasterDan Feb 10 '16 at 15:36
  • $\begingroup$ A slightly offset sampled Sinc looks like 1/f noise, and a finite length FFT includes a default rectangular (if not other) window, whose transform is a Sinc. $\endgroup$ – hotpaw2 Feb 10 '16 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.