# Fast Hilbert Transform (G Dataflow)

Computes the fast Hilbert transform of a sequence.

## x

The input signal.

## error in

Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

Default: No error

## Hilbert{x}

The fast Hilbert transform of the input sequence.

## error out

Error information. The node produces this output according to standard error behavior.

## Algorithm for Computing the Fast Hilbert Transform

The Hilbert transform of a function x(t) is defined as

$h\left(t\right)=H\left\{x\left(t\right)\right\}=\frac{1}{\pi }{\int }_{-\infty }^{\infty }\frac{x\left(\tau \right)}{t-\tau }d\tau$

Using Fourier identities, you can show the Fourier transform of the Hilbert transform of x(t) is

$h\left(t\right)⇔H\left(f\right)=-j\mathrm{sgn}\left(f\right)X\left(f\right)$

where $x\left(t\right)⇔X\left(f\right)$ is a Fourier transform pair and

$\mathrm{sgn}\left(f\right)=\left\{\begin{array}{c}\begin{array}{cc}1& f>0\end{array}\\ \begin{array}{c}\begin{array}{cc}0& f=0\end{array}\\ \begin{array}{cc}\begin{array}{c}-1\end{array}& f<0\end{array}\end{array}\end{array}$
.

## Performing the Discrete Implementation of the Hilbert Transform

This node performs the discrete implementation of the Hilbert transform with the aid of the FFT routines based upon the $h\left(t\right)⇔H\left(f\right)$ Fourier transform pair by taking the following steps:

1. Fourier transform the input sequence X.
Y = F{X}

2. Set the DC component to zero.
Y0 = 0.0

3. If the sequence Y is an even size, set the Nyquist component to zero.
YNyq = 0

4. Multiply the positive harmonics by -j.
5. Multiply the negative harmonics by j. Call the new sequence H, which is of the formHk = -jsgn(k)Yk
6. Inverse Fourier transform H to obtain the Hilbert transform of the input sequence.

The output sequence Y = Inverse FFT [X] is complex and it is returned in one complex array: Y = (Yre,Yim).

Note

Because this node sets the DC and Nyquist components to zero when the number of elements in the input sequence is even, you cannot always recover the original signal with an inverse Hilbert transform. The Hilbert transform works well with bandpass limited signals, which exclude the DC and the Nyquist components.

## Applications of Hilbert Transform

You can use the Hilbert transform to accomplish the following tasks:

• Extract instantaneous phase information and obtain the single-sideband spectra
• Obtain the envelope of an oscillating signal
• Detect echoes
• Reduce sampling rates

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported