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:


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


1 Answer 1


Don’t unwrap phase as bounded, but unwrap it as always increasing (or delta(ph)>=0).

  • $\begingroup$ I am using numpy.unwrap and matlab and GNU Octave unwrap. Should I implement a different unwrap? $\endgroup$
    – togo_la
    Aug 24, 2022 at 18:20
  • 1
    $\begingroup$ 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$. $\endgroup$ Sep 24, 2022 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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