Recall that Hilbert transform is defined as follows:
The form of the above equation can be altered as follows:
It indicates that the Hilbert transform can be viewed as a convolution:
Therefore, we can use a fast algorithm based on the convolution theorem to calculate the Hilbert transform. The algorithm can be expressed as follows:
where fft() denotes the fast Fourier transform operator and ifft() denotes the inverse fast Fourier transform operator.
We know that
where freq is the frequency and sgn(?) is the sign function.
Therefore, the product, , can be computed as a special filtering of the Fourier transform of the input signal. The filtering changes the frequency components by introducing a phase shift of -90 degrees at each positive frequency and a phase shift of 90 degrees at each negative frequency. The amplitudes are left unaltered. By applying an inverse Fourier transform on the product, we can get the Hilbert transform of the input data.
After the Hilbert transform is computed, the analytic signal can be derived from its definition.