Hilbert Transform and Applications
Hilbert Transform and Applications
Hilbert Transform and Applications
12
Hilbert Transform and Applications
Yi-Wen Liu
National Tsing Hua University
Taiwan
1. Introduction
Hilbert transform finds a companion function y(t) for a real function x (t) so that z(t) = x (t) +
iy(t) can be analytically extended from the real line t R to upper half of the complex plane.
In the field of signal processing, Hilbert transform can be computed in a few steps:
First, calculate the Fourier transform of the given signal x (t). Second, reject the negative
frequencies. Finally, calculate the inverse Fourier transform, and the result will be a
complex-valued signal where the real and the imaginary parts form a Hilbert-transform pair.
When x (t) is narrow-banded, |z(t)| can be regarded as a slow-varying envelope of x (t)
while the phase derivative t [tan1 (y/x )] is an instantaneous frequency. Thus, Hilbert
transform can be interpreted as a way to represent a narrow-band signal in terms of amplitude
and frequency modulation. The transform is therefore useful for diverse purposes such as
latency analysis in neuro-physiological signals (Recio-Spinoso et al., 2011; van Drongelen,
2007), design of bizarre stimuli for psychoacoustic experiments (Smith et al., 2002), speech
data compression for communication (Potamianos & Maragos, 1994), regularization of
convergence problems in multi-channel acoustic echo cancellation (Liu & Smith, 2002), and
signal processing for auditory prostheses (Nie et al., 2006).
The rest of this review chapter is organized as follows: Sec. 2 reviews the mathematical
definition of Hilbert transform and various ways to calculate it. Secs. 3 and 4 review
applications of Hilbert transform in two major areas: Signal processing and system
identification. The chapter concludes with remarks on the historical development of Hilbert
transform in Sec. 6.
www.intechopen.com
(1)
292
2
Fourier Transform
Applications
Will-be-set-by-IN-TECH
which states that real part of the extended function is equal to the original given function f ( x )
on the real line. The companion function g( x ) is called the Hilbert transform of f ( x ).
This simple example brings forth a few questions. First, is analytic extension always possible
for reasonably smooth f ( x )? If so, is the companion function g( x ) unique, in the sense that
Eq. (1) would hold? The answer to the second question is a definite No, because any f c ( x ) =
f ( x ) + i { g( x ) + g0 } also satisfies Eq. (1), where g0 is an arbitrary constant. Therefore, the
original simple quest needs to be refined as follows.
2.1 Hilbert transform as a boundary-value problem
To establish the uniqueness of the companion function, we first note that any analytic
function f ext (z) = f R (z) + i f I (z) defined on the complex plane z = x + iy must satisfy
Cauchy-Riemann equations,
fR
f
= I,
x
y
f
fI
= R.
x
y
Consequently, both f R and f I satisfy Laplaces equation,
2 FR
2 FR
+
= 0,
x2
y2
(2)
2 FI
2 FI
+
=0
2
x
y2
(3)
over the region where f ext (z) is analytic. Conventionally, by requiring f ext (z) to be analytic in
the upper half-plane, the quest of finding the Hilbert transform for any given function f ( x )
can be formulated as a boundary value problem (Scott, 1970). By specifying the boundary
conditions that
f R ( x, 0) = f ( x ), and that
f R ( x, y) = 0 as x or y ,
f R ( x, y) can be uniquely determined by solving Laplaces equation (Eq. 2) in the upper half
plane. Then, through Cauchy-Riemann equations, f I ( x, y) can be calculated in the entire
upper half plane and in particular on its boundary the x-axis (Scott, 1970). Thus g( x ) =
FI ( x, 0) is the Hilbert transform of the given function f ( x ).
2.2 Calculation through improper integrals
The boundary-value-problem formulation is missing for a reason it does not tell us how to compute
the Hilbert transform.
www.intechopen.com
2933
Hilbert
Transform
and Applications
Hilbert Transform
and Applications
Hilbert transform is commonly introduced and defined through an improper integral [e.g.,
(Hahn, 1996)]:
!
1
1
g( x ) =
f (u)
du.
(4)
xu
Here, note that the convolution kernel function h( x ) = 1/x is singular at x = 0. Therefore,
the integral in Eq. 4 is improper in the sense of Cauchys principal value:
"! x ! #
g( x ) = lim
+
f (u) h( x u)du.
(5)
0
x +
To be convinced that Eq. 4 indeed produces the Hilbert transform, we need to think about
the effects of Hilbert transform in the frequency domain. First, for any frequency k, note that
the Hilbert transform of f k ( x ) = cos(kx ) is gk ( x ) = sin(kx ). So, we can understand Hilbert
transform as a phase shifter which gives every sinusoidal function 90 degrees of phase shift.
Therefore, in the frequency domain, we have
G (k) = F (k) (i sgn(k)) ,
(6)
where G (k ) and F (k) are the Fourier transform of g( x ) and f ( x ), respectively, and sgn( x ) is
the sign function (i.e., sgn(k) = 1 if k > 0 and sgn(k) = 1 if k < 0.) Therefore, if we think
of H (k) = i sgn(k) as the transfer function of a phase-shift kernel h( x ), the kernel can be
written as the inverse Fourier transform of the transfer function; that is,
h( x ) =
1
H (k)eikx dk.
2
(7)
Note that H (k) = i for k > 0 and H (k) = i for k < 0. Therefore, H (k)s first derivative with
respect to k is
H
= 2i(k),
(8)
k
where (k) is the Dirac delta function. Since the operator /k in the frequency domain
corresponds to multiplication by ix in the space domain, we can take the inverse Fourier
transform on both sides of Eq. 8 and obtain the following,
"
#
!
1
i
ix h( x ) = 2i
(k)eikx dk =
.
(9)
2
Dividing both sides by ix, we conclude that the convolution kernel h( x ) = 1/x.
2.3 The notion of Hilbert transform pairs
The phase-shifter interpretation of Hilbert transform leads to the fact that if f ( x )s Hilbert
transform is g( x ), then g( x )s Hilbert transform is f ( x ); in this sense, f ( x ) and g( x ) form a
Hilbert transform pair.
This symmetric property can be understood as follows. Note that the H 2 (k) = 1 for all k
since H (k) = i. This means that if we take the Hilbert transform twice, the result would be
the original function with a negative sign.
www.intechopen.com
294
4
Fourier Transform
Applications
Will-be-set-by-IN-TECH
This makes sense because Hilbert transform introduces a 90-degree phase shift to all simple
harmonics. Therefore, Hilbert transform repeated twice introduces a 180-degree phase shift
to all simple harmonics, which means multiplication of the original function by 1.
A table of commonly used Hilbert transform pairs can be found in the Appendix of Hahn
(1996) for applications in signal processing. A thorough 80-page table of Hilbert transform
pairs can be found in the Appendix of King (2009b) and transform pairs are also plotted in a
20-page atlas.
2.4 The convolution kernel h( x ) as the Hilbert transform of ( x )
We now introduce another way to derive the convolution kernel of Hilbert transform. To
begin, note that Eq. 5 essentially states that Hilbert transform is a filtering process which is
characterized by its impulse response h( x ). Therefore, h( x ) must be regarded as the Hilbert
transform of the impulse function ( x ). Then, it is of our interest to check that
f c ( x ) = ( x ) + ih( x )
can be regarded as an analytic function in the sense of Eq. 1. To see it, consider a family of
complex analytic functions f (z) = i/ (z + i ) parametrized by a variable > 0. Since the
only singularity of f (z) is at z = i, f (z) is analytic in the entire upper half plane. Therefore,
the real part and imaginary part of f (z) form a Hilbert transform pair on the real line x R.
With a little algebra, the real and imaginary parts can be written as
f (x) =
i
= f R ( x ) + i f I ( x ),
( x + i )
where
f R (x) =
( x2 + 2 )
f I (x) =
x
( x2 + 2 )
and
(10)
$
Now we let approach zero and observe f R ( x ) and f I ( x ). Note that f R ( x )dx = 1
regardless of the value of , and that f R (0) = 1/ approaches infinity as 0. So we
can claim that
lim f R ( x ) = ( x ).
(11)
0
(12)
From the arguments above, we can be convinced that the Hilbert transform of ( x ) is indeed
1/x, for f c ( x ) = ( x ) + i (1/x ) is equal to the limit function of f ( x ) as 0 (Scott, 1970).
www.intechopen.com
2955
Hilbert
Transform
and Applications
Hilbert Transform
and Applications
T is the sampling period. In this section, we denote the sampled waveform as x [n] = x (nT ),
using the square brackets [] to indicate that the signal is sampled in discrete time. So the
discrete-time Fourier transform (DTFT) is defined as follows:2
X ( j ) =
x [n]e jn .
n=
Note that X ( j ) is periodic at every 2 in the frequency domain.3 Next, we show how Hilbert
transform can be defined in discrete time.
3.1 The discrete-time Hilbert transform and Hilbert transformers
Recall that the Hilbert transform introduce a 90-degree phase shift to all sinusoidal
components. In the discrete-time periodic-frequency domain, the transfer function of Hilbert
transform is specified as follows,
%
j, 0 < <
(13)
H ( j ) =
j,
< < 0
The convolution kernel for H ( j ) can be calculated through inverse Fourier transform
(Oppenheim & Schafer, 2010):
h[n] =
1
H ( j )e jn d
2
%
2
2 sin (n)
, n = 0
0,
n=0
(14)
(15)
Note that h[n] has a infinite support from n = to . In practice, the entire function can
not be stored digitally. To circumvent this difficulty, we now discuss two major methods for
calculating the discrete-time Hilbert transform.
3.1.1 The MATLAB approach
www.intechopen.com
296
6
Fourier Transform
Applications
Will-be-set-by-IN-TECH
That the three steps above can work is a consequence of the fact that, if xi [n] is the discrete
Hilbert transform of xr [n], the Fourier transform of xr [n] + jxi [n] vanishes for all negative
frequencies < < 0. This can be verified by inspecting the definition given in Eq. 13.
Remarks: Perhaps because of MATLABs popularity and easiness to use, many have allegedly
mis-regard the returned vector X=hilbert(Xr) as the Hilbert transform of Xr. One must be
aware of these deviations from the conventional definition to avoid unnecessary confusion.
3.1.2 Hilbert transform as a filter design problem
This part is adapted from Sec. 12.4.3 of Oppenheim & Schafer (2010)
www.intechopen.com
2977
Hilbert
Transform
and Applications
Hilbert Transform
and Applications
Transmitting sd [n] = s[6n] is more efficient than transmitting sr [n] because the sampling rate
is lowered.
To reconstruct sr [n] from sd [n], we can do the following:
%
Expand sd [n] by a factor of 6; i.e., construct se [n] =
sd [n/6],
0,
if n = 0, 6, 12, ...
otherwise.
A cochlear implant device consists of up to tens of electrodes which are inserted as an array to
the cochlea to stimulate auditory nerves by electrical currents (Zeng et al., 2008). Each channel
(electrode) represents an acoustic frequency band; the amount of currents sent to an electrode
should faithfully reflect how acoustic energy entering through the ear microphone varies in
time in the corresponding frequency band. Typically, acoustic waveforms are processed with
a bank of filters and the resulting envelopes control the electrical currents sent to individual
electrodes.
In this application scenario, a Hilbert transformer has been found useful for envelope
extraction. This can be understood by noting that the Hilbert transform produces a sin(t) for
every cos(t). For a narrow-band signal s R (t), we can factor it as a product of slow-varying
envelope A(t) and fast-varying fine structure f (t):
s R (t) = A(t) f (t) = A(t) cos[(t)]
where d(t)/dt can be regarded as an instantaneous frequency of the signal. It can be shown
that, if A(t) varies sufficiently slowly, the Hilbert transform produces approximately s I (t) =
A(t) sin[(t)]. Then, the envelope A(t) can simply be estimated by taking the root of sum of
squares:
&
A(t)
(16)
Clinically, encoding the currents based on A(t) provides clear speech perception for
cochlear-implant users (Nie et al., 2006). Moreover, auditory pitch information can be
extracted by taking the time-derivation of (t), which can be determined by the relative phase
between s I and s R :
#
"
s I (t)
.
(t) = tan1
s R (t)
Pitch is arguably the utmost important feature for music perception as well as understanding
tonal languages. Here, we see Hilbert transform can serve as an efficient computation tool to
extract it.
www.intechopen.com
298
8
Fourier Transform
Applications
Will-be-set-by-IN-TECH
(17)
(18)
It turns out that, for any given magnitude response, the uniqueness of phase response can be
established if the transfer function satisfies a minimum-phase criterion; the criterion requires
6
www.intechopen.com
Hilbert
Transform
and Applications
Hilbert Transform
and Applications
2999
that all zeros and poles of the transfer function H (s) to be located in the left-half plane. This
criterion ensures that all the singularities of log H (s) are located in the left-half plane so the
real and imaginary parts of log H (s) become a Hilbert transform pair. Otherwise, any transfer
function can be uniquely factorized as a product of a minimum-phase function M ( j ) and
an all-pass function P( j ). It is noteworthy that the system whose transfer function is M( j )
has the minimal energy delay among all linear time-invariant systems of the same magnitude
response. Further readings are recommended in Chapter 5 and 12 of Oppenheim & Schafer
(2010).
6. Acknowledgement
This work is supported by Taiwans National Science Council through research grant
No. 100-2221-E-007-011.
7. References
Hahn, S. L. (1996). Hilbert Transforms in Signal Processing, Artech House, Inc., Norwood, MA,
USA.
Hardy, G. H. (1932). On hilbert transforms, Quart. J. Math. (Oxford) 3: 102112.
King, F. W. (2009a). Hilbert Transforms, Vol. 1, Cambridge University Press, Cambridge, UK.
King, F. W. (2009b). Hilbert Transforms, Vol. 2, Cambridge University Press, Cambridge, UK.
www.intechopen.com
300
10
Fourier Transform
Applications
Will-be-set-by-IN-TECH
Liu, Y.-W. & Smith, J. O. (2002). Perceptually similar orthogonal sounds and applications to
multichannel acoustic echo canceling, Proc. Audio Eng. Soc. 22nd Int. Conf., Espoo,
Finland.
Nie, K., Barco, A. & Zeng, F.-G. (2006). Spectral and temporal cues in cochlear implant speech
perception, Ear Hear. 27: 208217.
Oppenheim, A. V. & Schafer, R. W. (2010). Discrete-Time Signal Processing, 3rd Edition, Pearson,
Boston.
Potamianos, A. & Maragos, P. (1994). A comparison of the energy operator and the hilbert
transform approach to signal and speech demodulation, Signal Processing 37(1): 95
120.
Recio-Spinoso, A., Fan, Y.-H. & Ruggero, M. (2011). Basilar-membrane responses to
broadband noise modeled using linear filters with rational transfer functions,
Biomedical Engineering, IEEE Transactions on 58(5): 1456 1465.
Scott, A. (1970). Active and Nonlinear Wave Propagation in Electronics, Wiley-Interscience, New
York.
Smith, Z. M., Delgutte, B. & Oxenham, A. J. (2002). Chimaeric sounds reveal dichotomies in
auditory perception, Nature 416: 8790.
van Drongelen, W. (2007). Signal Processing for Neuroscientists: Introduction to the analysis of
physiological signals, Academic Press, London.
Zeng, F.-G., Rebscher, S., Harrison, W., Sun, X. & Feng, H. (2008). Cochlear implants: System
design, integration, and evaluation, IEEE Rev. Biomed. Eng. 1: 115142.
www.intechopen.com