HILBERT Function
Constructs a Hilbert transformation.
Usage
result = HILBERT(x [, d])
Input Parameters
x—The array to be transformed. Can be of either floating-point or complex data type, and can contain any number of elements.
d—(optional) A flag to indicate the direction of rotation:
*+1—Shifts the array +90 degrees.
*–1—Shifts the array –90 degrees.
Returned Value
result—A complex data type, the value of which is the Hilbert transform of x, having the same dimensions as x.
Keywords
None.
Discussion
A Hilbert transform is a series of numbers in which all periodic components have been phase-shifted by 90 degrees, which is accomplished by multiplying or dividing by the complex number j = (0.000, 1.000).
A Hilbert series has the interesting property that the correlation between it and its own Hilbert transform is mathematically zero.
 
note
The HILBERT function creates a Hilbert matrix by computing the fast Fourier transform of the data with the PV-WAVE FFT function and shifting the first half of the transform products by +90 degrees and the second half by –90 degrees. The constant elements of the transform are not changed.
The shifted array is then submitted to the PV-WAVE FFT function for the transformation back to the time-domain. Before it is returned, the output is divided by the number of elements in the array to correct for the multiplication effect characteristic of the FFT algorithm.
Example
The results of this example are shown in Figure 3-1: HILBERT Function Example where, (a) is a sine wave and 90-degree phase shifted sine wave; (b) is a random noise plot; and (c) is sandwiched sine waves with random noise and the HILBERT transform of that signal.
!P.multi = [0, 1, 3]
a = FINDGEN(1000)
; Create a sine wave.
sine_wave = SIN(a/(MAX(a)/(2 * !Pi)))
; Plot the sine wave.
PLOT, sine_wave
; Plot the sine wave phase-shifted to the right by 90 degrees.
OPLOT, HILBERT(sine_wave, -1)
; Create an array of random numbers to mimic a noisy signal.
rand = RANDOMN(seed, 1000) * 0.05
; Plot the random numbers.
PLOT, rand
; Sandwich the random data between two sine waves.
sandwich = [sine_wave, rand, sine_wave]
; Plot the two sine waves with the random noise in the middle,
; thereby turning them into a single signal.
PLOT, sandwich, XStyle=1
; Plot the sandwiched wave forms. Note that the sine waves are
; phase-shifted to the right by 90 degrees, while the noise data
; has not shifted at all, but rather has been distorted vertically
; (its amplitude) by effect of two adjacent phase-shifted sine
; waves. This is because sine waves and noise data were set
; up to be a single signal.
OPLOT, HILBERT(sandwich, -1)
 
Figure 3-1: HILBERT Function Example
 
See Also
In the PV‑WAVE Reference: