0

I have simple smooth time signal with different time period. I would like to transfer period over the time to frequency, and to track frequency changing over the time, I would call it Instantaneous frequency?

PF-period frequency (1/T)... any suggestion?

Time period to frequency

ToShare
  • 27
  • 6

3 Answers3

2

You can compute the instantaneous frequency of your data in Matlab as follows:

z = hilbert(x);
N = length(z);
f = angle(z(2:N).*conj(z(1:N-1)))/2/pi;

To get units of Hertz, multiply f by the sample rate.


There are other, similar estimators that do a similar thing. This matlab code can help.

Eric Jacobsen also has a couple of pages here and here.

Peter K.
  • 25,714
  • 9
  • 46
  • 91
John
  • 580
  • 5
  • 8
0

Thanks to all. John your suggestion I think giving good result, this is what I have been expected.

Original signal sampling frequeny is 102400 Hz and duration is 0.63999 seconds.

I did what Johns suggested in Matlab:

data = x; z = hilbert(x); N = length(z); fs=102400; f = angle(z(2:N).*conj(z(1:N-1)))/2/pi*102400; % to get units in Hz

After post processing I get x-axis- like 63999. How to get x axis in seconds like 0.63999?

ToShare
  • 27
  • 6
-1

I think you want to create some sort of spectrogram. The only difference is that the spectrogram contains a full frequency spectrum for every time period, and you want to get just the dominant frequency, but you can run a dominant frequency search (maximum search), and you will get what you want. You have control both of the time and frequency resolution.

tiborsimon
  • 98
  • 5