Signal Processing Toolbox Help Desk

hilbert

Purpose

Hilbert transform.

Syntax

Description

y = hilbert(x) returns a complex helical sequence, sometimes called the analytic signal, from a real data sequence. The analytic signal has a real part, which is the original data, and an imaginary part, which contains the Hilbert transform. The imaginary part is a version of the original real sequence with a 90° phase shift. Sines are therefore transformed to cosines and vice versa. The Hilbert transformed series has the same amplitude and frequency content as the original real data and includes phase information that depends on the phase of the original data.

If x is a matrix, y = hilbert(x) operates columnwise on the matrix, finding the Hilbert transform of each column.

The Hilbert transform is useful in calculating instantaneous attributes of a time series, especially the amplitude and frequency. The instantaneous amplitude is the amplitude of the complex Hilbert transform; the instantaneous frequency is the time rate of change of the instantaneous phase angle. For a pure sinusoid, the instantaneous amplitude and frequency are constant. The instantaneous phase, however, is a sawtooth, reflecting the way in which the local phase angle varies linearly over a single cycle. For mixtures of sinusoids, the attributes are short term, or local, averages spanning no more than two or three points.

Reference [1] describes the Kolmogorov method for minimum phase reconstruction, which involves taking the Hilbert transform of the logarithm of the spectrum of a time series. The toolbox function rceps performs this reconstruction.

Algorithm

The analytic signal for a sequence x has a one-sided Fourier transform, that is, negative frequencies are 0. To approximate the analytic signal, hilbert calculates the FFT of the input sequence, replaces those FFT coefficients that correspond to negative frequencies with zeros, and calculates the inverse FFT of the result.

In detail, hilbert uses a four-step algorithm:

  1. It calculates the FFT of the input sequence, storing the result in a vector y. Before transforming, it zero pads the input sequence so its length n is the closest power of two, if necessary. This ensures the most efficient FFT computation.
  2. It creates a vector h whose elements h(i) have the values
  3. It calculates the element-wise product of y and h.
  4. It calculates the inverse FFT of the sequence obtained in step 3 and returns the first n elements of the result.
If the input data x is a matrix, hilbert operates in a similar manner, extending each step above to handle the matrix case.

See Also

fft

One-dimensional fast Fourier transform.

ifft

One-dimensional inverse fast Fourier transform.

rceps

Real cepstrum and minimum phase reconstruction.

References

[1] Claerbout, J.F. Fundamentals of Geophysical Data Processing. New York: McGraw-Hill, 1976. Pgs. 59-62.



[ Previous | Help Desk | Next ]