# Time period to Instantaneous frequency

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?

• This is called instantaneous frequency, yes. Is this your question? – Deve Dec 19 '14 at 12:43
• This is how I called it. – ToShare Dec 23 '14 at 9:47

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.

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?

• t = [1:length(f)]/102400;plot(t,f);xlabel('Seconds'); – John Dec 23 '14 at 12:11

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.