# Hilbert transform with strange behavior

I am taking the Hilbert transform of a signal in Matlab and I don't understand part of the result.

Below are the complete signal $$z(t)$$ and phase $$\phi(t)$$, obtained with

phi=unwrap(angle(hilbert(z)))


I noticed a jump around point 400, so I zoomed this region. This is shown below.

Although the signal in this region is very well behaved, the phase has an almost discontinuity. Why?

It is not due to the unwrap command, as we can see below

The data can be found here

• without the delay necessary for causality, a Hilbert filter has a 180° phase discontinuity (from +90° to -90° or the other direction) at DC and at Nyquist. – robert bristow-johnson Aug 30 '19 at 20:17
• @MattL. radians. The size of the jump is very close to $\pi$, which is probably not a coincidence – thedude Aug 30 '19 at 21:09

The phase jumps by $$\pi$$ at exactly the point where the magnitude of the analytic signal has a zero. Note that the phase of any complex signal jumps by $$\pi$$ if its trace moves through the origin of the complex plane. This has nothing to do with the signal being "well behaved" or not.

The figure below shows the magnitude and the (unwrapped) phase of the analytic signal in the region of interest.

• Ah, very interesting. Thank you! – thedude Aug 31 '19 at 15:53

A Hilbert Transformer is an acausal linear time-invariant (LTI) filter. Being LTI it has all of the things an LTI filter has: the output is the convolution of the input against an impulse response. And it has a frequency response with magnitude and phase.

But being acausal, that means that the impulse response begins to respond before the impulse hits the input (i.e. it can see future input). That, of course, is impossible in a real-time system so the impulse response of the Hilbert Transformer is delayed to make it causal. That delay causes a linear trend to the phase component.

The magnitude frequency response of the Hilbert Transformer is 1 (as linear gain) or 0 dB for virtually all frequencies (DC and Nyquist are the exceptions). But without the delay, a Hilbert Transformer shifts the phase for all positive frequencies by -90° (or $$-\frac{\pi}2$$ radians) and all negative frequencies by +90°. That puts a phase discontinuity at 0 Hz (DC). Likewise, you will see the opposite phase discontinuity at Nyquist.

• Robert, all this is true, but I don't see how it answers the question about the phase discontinuity of the given signal (which has - as far as I can see - nothing to do with the properties of an ideal Hilbert transformer). The analytic signal is computed by a frequency domain approximation of a Hilbert transformer. – Matt L. Aug 31 '19 at 15:07