# FastHilbertTransform

Advanced Analysis Library Only

AnalysisLibErrType FastHilbertTransform (double array[], int numberOfElements);

## Purpose

Computes the Fast Hilbert Transform of the input sequence x.

The following equation defines FastHilbertTransform:

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

H(f) = –j*sgn(f)*X(f)

where X(f) is the Fourier transform of the input signal x(t) and,

This function performs the discrete implementation of the Hilbert transform with the aid of the FFT routines by taking the following steps.

1. Compute the Fourier transform X(f) of the input signal x(t).
2. Set the DC component of X(f) equal to zero.
3. If the input sequence is even size, set the Nyquist component to zero.
4. Multiply the positive harmonics by –j
5. Multiply the negative harmonics by j.
6. Call the new sequence H, which is of the form,

   H(f) = –j * sgn(f) * X(f)

7. Inverse Fourier transform H to obtain the Hilbert transform of X.

You can use the Hilbert transform to extract instantaneous phase information, obtain the envelope of an oscillating signal, obtain single-sideband spectra, detect echoes, and reduce sampling rates.

| Note Because the function sets the DC and Nyquist components to zero when the number of elements in the 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.

## Parameters

Input
Name | Type | Description
numberOfElements | integer | The number of elements in the input array. Default Value: 1024
Output
Name | Type | Description
array | double [] | On input, the array used to compute the Hilbert transform. On output, the Hilbert transform. This operation is performed in place, meaning the values in this array are overwritten.

## Return Value

Name | Type | Description
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants.