FastHilbertTransform
Advanced Analysis Library Only
AnalysisLibErrType FastHilbertTransform (double array[], ssize_t 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.
- Compute the Fourier transform X(f) of the input signal x(t).
- Set the DC component of X(f) equal to zero.
- If the input sequence is even size, set the Nyquist component to zero.
- Multiply the positive harmonics by –j
- Multiply the negative harmonics by j.
- Call the new sequence H, which is of the form,
H(f) = –j * sgn(f) * X(f) - 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 | ssize_t | 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. |
Additional Information
Library: Advanced Analysis Library
Include file: analysis.h
LabWindows/CVI compatibility: LabWindows/CVI 5.5 and later