# Instantaneous frequency vs time for a piecewise signal

I sample a signal that consists of a train of pulses which are amplitude and frequency modulated. I would like to generate a plot that is instantaneous frequency vs time. I compute the Hilbert transform from a down-converted signal to obtain the instantaneous phase and the envelope. Then I use the envelope to gate the instantaneous phase.

Therefore, I end up with two plots showing (a) the envelope and (b) the instantaneous phase. To obtain the frequency vs time trace, I need to differentiate the instantaneous phase trace. However, when I do so, the massive edges e.g. at the start of each pulse are dominating the numerical derivative.

What is a viable approach to obtain a frequency vs time plot from this data? Just to detect where pulses are and doing this piecewise did not really work as I have sometimes phase jumps during a pulse (here during the second pulse and the third pulse). For the above signal, I would get a trace that is non-zero only for the first and the last pulse as during the middle two ones the instantaneous phase is not changing.

• Related, and the links within. Commented Nov 13, 2022 at 15:00
• Could you share the signals?
– Royi
Commented Mar 28, 2023 at 14:44
• I think you need to understand how to unwrap phase or how to avoid the need to unwrap phase. Commented Apr 27, 2023 at 18:00
• Here is a pretty good question and answer showing you how to look at it. Commented Apr 27, 2023 at 18:35