# Overcoming the negative instantaneous frequencies from Hilbert transform

how to avoid negative frequencies that can be obtained from instantaneous frequency estimation using Hilbert transform?

Here is what I am doing:

1. compute analytic signal, X = hilbert(x);
2. from analytic signal, unwrap the instantaneous phase
3. calculate instantaneous frequency from derivation (np.diff) of instantaneous phase

The problem I have is that the instantaneous frequency can contains negative frequencies (e.g. chirp signal).

This issue is also well descriped her:

Negative instantaneous frequency with hilbert transform using scipy hilbert

Hilbert Huang Transform: Negative value in instantaneous frequency

The best solution seems to be descriped here:

Overcoming the negative frequencies - Instantaneous frequency and amplitude estimation using Osculating Circle method

and here:

Instantaneous frequency estimation using Osculating Circle Method

An other matlab code snipped is posted here, but it has no results:

InstantFrequencyOCM​ethod

The question is, how to calculate the velocity vector of the particle and the Osculating Circle method from the analytic signal (in matlab or python)?

Thanks, Tobias

Don’t unwrap phase as bounded, but unwrap it as always increasing (or delta(ph)>=0).
• The instantaneous frequency is the difference in phase of the current sample to the previous sample of the analytic signal. I don't think it's a good idea treat some small negative quantity $-|\Delta \phi|$ as a value close to $2\pi$. Sep 24, 2022 at 5:18