I would like to evaluate frequency of some unstable periodic signal coming from a detector:
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:
Spectrum with last 512 points
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;
plot(freq,10*log10(psdx));