# Is the Hilbert transform computable “losslessly”?

The Hilbert transform is a procedure that can be used to perform a 90° phase shift on a signal.

Is the computation of (a discretized) Hilbert transform a "lossless" process? I.e. it merely phase shifts the signal, but does not alter it in any other way.

The reason for asking is that the following picture here looks like it introduces slight variation in the Hilbert transformed signal.

• do you mean "exactly" instead of losslessly ? Or do you mean is it an invertable transform (which is)... – Fat32 Dec 23 '15 at 17:36
• I think lossless is a good word here. "Without (data) losses". – mavavilj Dec 23 '15 at 17:56
• I still think that "approximate" or "inexact" is a more proper term than "lossy" in case of a practical realization of an ideal transformation. – Fat32 Dec 23 '15 at 22:51
• gotta define what "data" is, too. we use "lossy" for all sorts of things, like reduction in gain. does a known gain of 1/2 (- 3 dB) mean that it's "lossy"? – robert bristow-johnson Dec 24 '15 at 4:00

## 2 Answers

The loss you are seeing is due to the use of a finite length rectangular window. If your signal is long enough that you can ignore the Hilbert filter transients at the both ends of the window (e.g. if it is infinite in length or so long that you don't care about the ends below some noise floor), then the process won't have the particular visible losses that your example points out.

• What are Hilbert filter transients? – mavavilj Dec 23 '15 at 20:14
• The transients you get when you apply any filter to a signal. – Peter K. Dec 23 '15 at 21:32
• Any filtering, including a Hilbert transform process, implemented using a tapped-delay line will have invalid beginning transient output samples while the delay line is filling up with valid input samples. Likewise, the filter will have invalid final output samples as the delay line is emptying its valid final input samples. – Richard Lyons Dec 25 '15 at 11:26

Theoretically, the Hilbert operator $\mathcal{H}$ is lossless in the sense that $\mathcal{H}^4 = \mathcal{I}$ (it is an anti-involution). Numerically, this can be verified on the following zero-mean odd-sized signal: four applications (using Matlab's hilbert.m function) on the original signal yield the same signal, up to minimal numerical errors (bottom plot). Honestly, I could not verify that for even-sized data. I can leave that for after xmas, or somebody clever on SE.DSP can help.

What you observe is an loss in interpretability: the $\pi/2$ shift property that turns cosines into sines works in the continuous case, on "infinite size" functions. The interpretation differs on sampled (rectangular) windowed data.

• The gain of Hilbert transform is 0 at Nyquist frequency, so it is lossy for an even-periodic signal if the signal has a non-zero Nyquist frequency component. Odd-periodic signals do not have a Nyquist frequency component and the only thing the Hilbert transform nulls is a non-zero zero-frequency (DC) component, if that exists. – Olli Niemitalo Dec 25 '15 at 11:08
• Excellent you saved my xmas – Laurent Duval Dec 25 '15 at 11:18
• it's also 0 at DC. i guess that would also have to be lossy (pretty hard to undo multiplying by 0). – robert bristow-johnson Jan 23 '16 at 22:13