I would like to evaluate frequency of some unstable periodic signal coming from a detector:

signal started period zoom

The signal is registered continuously and may or may not be present (i.e. be periodic). The frequency and amplitude of the periodic signal can change but stays in some certain range. The shape of the periodic signal is more or less the same as shown on the second image. It may sometimes have distortions of higher amplitude and frequency.

I need to check 1) if there is a periodic signal and 2) what frequency it has.

Is there any good way to do it?

Edit 1:

I am not sure if FFT is reliable in this case. What do you think?

Frequency spectrum for all data points:

enter image description here

Spectrum with last 512 points

enter image description here

The spectra were calculated using Octave (online) based on example from Matlab site

N = 512; % length(all_data)
x = all_data(1:N);
Fs = N;
xdft = fft(x);
xdft = xdft(1:N/2+1);
psdx = (1/(Fs*N)).*abs(xdft).^2;
psdx(2:end-1) = 2*psdx(2:end-1);
freq = 0:Fs/length(x):Fs/2;
  • 1
    $\begingroup$ try to fourier transform it and see if there is a stronger harmonic or it has different contributions of the same amplitude $\endgroup$
    – J L
    Commented Jan 17, 2013 at 9:49
  • $\begingroup$ Yes, that was my first idea too, but it doesn't look so good (see updated question). I could probably get better spectrum knowing signal frequency range... $\endgroup$
    – Andy
    Commented Jan 17, 2013 at 10:43
  • 1
    $\begingroup$ There seem to be some frequency components in the range 20-60 on your first plot. You could try a bit of frequency domain averaging to see if it makes them any clearer. $\endgroup$
    – twistor59
    Commented Jan 17, 2013 at 12:53
  • $\begingroup$ Lookup "peridogram" $\endgroup$
    – daaxix
    Commented Jan 18, 2013 at 20:34

1 Answer 1


Yes, Fourier transforming the data is certainly the best way of finding what the frequency of the periodic signal is.

I'm not sure what the units of the y axis are on your graph above - it looks like the might be in dB. Change the scale to linear (not logarithmic) and you should see much, much clearer indications of what the frequency is (if it exists).

Finally, you might also benefit from multiplying your raw data by a window function before the Fourier transform (see this: http://en.wikipedia.org/wiki/Window_function). I'm not exactly sure how sensitive your results will be to it, but it's worth examining quickly at least. Doing so basically reduces the effects of not having an infinitely long data set to do the transform with.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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