0% found this document useful (0 votes)
80 views6 pages

Discrete Hilbert Transform

Uploaded by

GustavoSouza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views6 pages

Discrete Hilbert Transform

Uploaded by

GustavoSouza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Volume 49, Number 4, 2008 485

Discrete Hilbert Transform. Numeric


Algorithms
Gheorghe TODORAN, Rodica HOLONEC and Ciprian IAKAB
Abstract - The Hilbert and Fourier transforms are tools used for signal analysis in the time/frequency
domains. The Hilbert transform is applied to casual continuous signals. The majority of the practical
signals are discrete signals and they are limited in time. It appeared therefore the need to create numeric
algorithms for the Hilbert transform. Such an algorithm is a numeric operator, named the Discrete Hilbert
Transform. This paper makes a brief presentation of known algorithms and proposes an algorithm derived
from the properties of the analytic complex signal. The methods for time and frequency calculus are also
presented.

1. INTRODUCTION spectrum in order to avoid the aliasing process


– the Nyquist condition.
Signals can be classified into two classes: The discrete signal will be analyzed on a
analytic signals (for instance x(t ) = A sin ωt ), computer system, which implies its
and experimental signals (measured signals). digitization (the digital signal is the discrete
The last category represents real signals and is signal converted in binary format, accordingly
of great importance in applications. to the adopted analog/numeric conversion; in
An experimental signal represents a signal most of the cases, the signal acquisition
observed during a limited interval of time. It is hardware also does the digitization of the
a sample of the original signal, which signal samples). The resulted digital signal has
characterizes a physical process of interest. the greatest importance in numeric analysis
The experimental signal can be a operations.
continuous time signal (analogical), or a Some other remarks need to be made.
digital signal (discrete). Since the sampled signal has a limited length,
The practical limitations of the systems it needs to either (1) have a infinite frequency
used to analyze analogical signals impose that spectrum, or (2) be a periodic signal. In case
the experimental analogical signals had a (1), the sampling doesn’t respect the Nyquist
limited frequency band [1],[2]. condition. Or, in case (2) we choose to
If the original signal doesn’t have a represent the signal as a periodic one, with an
limited band, a low-pass filtration needs to be extended period. In both cases, the digital
applied in order to obtain the experimental signal cannot exactly represent the original
signal which will be analyzed. physical process.
The rule also applies to sampled signals, In the case of the Hilbert transform, it’s a
which need to have a limited frequency band known fact that the signal x(t) needs to be
too. causal (that is x(t)=0, for t < 0). The sampled
As a result, before acquisition, the signal x[n] is in this case a non-periodic
experimental analogical signal will be low- sequence, real and causal.
pass filtered. In such a case, we can talk of a discrete
The acquisition frequency needs to be two Hilbert transform applied to the sequence x[n].
times the biggest frequency of the signal’s The complex analytic signal associated to
the x[n] sequence has the spectrum different

© 2008 – Mediamira Science Publisher. All rights reserved.


486 ACTA ELECTROTEHNICA

from zero only for the interval of positive  1


frequencies. x (t ) = x(t ) ∗ . (4)
πt
When x(t) is a periodic signal, x[n] is a
periodic sequence and we cannot talk of The above relation allows the calculus of

causality (the periodic term implies the the spectral density of x (t ) :
sequence extension from − ∞ to + ∞ ). A  ⎧ 1⎫
calculus algorithm for the Discrete Hilbert Xˆ ( jω ) = F{x(t)} = F{x (t)}⋅ F ⎨ ⎬ (5)
Transform in this case imposes the condition ⎩π t ⎭
that the Discrete Fourier Transform of the Or
complex analytic sequence to be equal to zero
⎧ 1⎫
in the interval of negative frequencies. And of Xˆ ( jω ) = X ( jω ) ⋅ F ⎨ ⎬ (6)
course, for positive frequencies, the spectrum ⎩π t ⎭
of the analytic sequence to be two times the Since:
spectrum of the signal x[n]. In this case, the
Hilbert transform can be used with all its ⎧ 1⎫
F ⎨ ⎬ = − j sgn (ω )
known advantages regarding the causal ⎩π t ⎭
signals. It results:
The next paragraphs present the methods 
for calculating the Discrete Hilbert Transform. X ( jω ) = X ( jω )[− j sgn ω ] (7)
Or:
2. HILBERT TRANSFORM IN  ⎧− j X ( jω ), ω > 0
CONTINUOUS TIME X ( jω ) = ⎨ (8)
⎩ j X ( jω ), ω < 0
To start, we present first the theory of the As a result, the spectral density function
Hilbert transform, definitions, properties [2], of the x(t) signal’s conjugate is obtained by
[10]. changing the phase of the spectral density for
Let’s consider a real measurement signal: X ( jω ) by ± π/2.
x(t ) ∈ L ( 2 ) (1) It results:
( 2)
Where L is the signal class with integral

{
H {x (t) } = x (t ) = F -1 Xˆ ( jω ) }(9)
square.
The Hilbert transform of the signal x(t) is: The inverse Hilbert transform is defined
in relation (3). We can write:
1 ∞ x (τ )
xˆ (t ) = H {x(t )} = v ⋅ p ∫ dτ (2) 
x (t ) = H -1{x (t ) } = −H {x̂ (t) } (10)
π −∞ t − τ

∞ x(τ ) ⎡ t −ε x(τ ) ∞ x (τ ) ⎤ , Taking into account relation (8) it results:


v.p. ∫ dt = lim ⎢ ∫ dτ + ∫ dτ ⎥
−∞ t − τ ε →0
⎣ −∞ t − τ t +ε t − τ
⎦ { }
⎧⎪ F -1 jXˆ(jωj ,ω > 0
x(t) = − H {xˆ (t) } = ⎨
where v.p. represents the functional named
principal value.
{ 
}
⎪⎩ F -1 − jX(jωj , ω < 0
(11)

x (t ) is improper named the conjugate of
x(t). The analytic signal
 
We also have x (t ) ∈ L (2) .
 Having the pairs x (t) and x (t ) = H { x (t) }
x(t) is the inverse Hilbert transform of x (t ) : we build the analytic signal z (t) :
 
-1  1 ∞ x (t ) z (t ) = x (t ) + j x (t ) (12)
x(t ) = H {x (t )} = − v. p.∫ dτ (3)
π −∞ t − τ
We observe that:
 
Let’s observe that x (t ) is determined by Z ( jω ) = F { z (t) } = X (jω) + j X (jω) (13)
1
the convolution of x(t) with the signal : Referring to relation (7) we obtain:
πt
Volume 49, Number 4, 2008 487

Z ( jω ) = X ( jω ) + j [ − j sgn ω ] X ( jω ) = Which shows that the sample


(13.a)
= X ( jω )[1 + sgn ω ] = 2 X ( jω ) u (ω ) X [ N − k ] = X [ − k ] has a correspondent
where u (ω) is the unit step function. sample of the spectral density, with the
It’s useful to observe that: negative frequency X (− kω 0 ) .
1 For N – even, the samples
X ( jω ) = [ Z ( jω ) + Z ∗ (− jω )] (14)
2 ⎧ ⎡ N ⎤⎫
 ⎨ X [1], X [2],..., x ⎢ − 1⎥ ⎬
X ( jω ) =
1
2j
[
Z ( j ω ) − Z ∗ ( − jω ) ] (15) ⎩ ⎣2 ⎦⎭
are named „positive harmonics”, while the
samples:
3. DISCRETE HILBERT TRANSFORM. ⎧ N N ⎫
CALCULUS ALGORITHMS. ⎨ X [ + 1], X [ + 2],..., X [ N − 2], X [ N − 1]⎬ ≡
⎩ 2 2 ⎭
⎧ ⎡ ⎛N ⎞⎤ ⎡ ⎛N ⎞⎤ ⎫
Definitions ≡ ⎨X ⎢ − ⎜ 2 − 1⎟ ⎥ , X ⎢ − ⎜ 2 − 2 ⎟ ⎥ ,..., X [−2], X [−1]⎬
⎩ ⎣ ⎝ ⎠⎦ ⎣ ⎝ ⎠⎦ ⎭
Having the signal x(t) defined on the time
interval [0, tN], using a sampling period Te, we are named „negative harmonics”.
obtain the discrete signal x[n] : For N – odd, the samples

x[n ] = x ( nTe ), n ∈ 0, N − 1 (16) ⎧ ⎡ N − 1⎤ ⎫


⎨ X [1], X [2],..., x ⎢ ⎬
⎩ ⎣ 2 ⎥⎦ ⎭
tN
Where: Te = . are called „positive harmonics”, while the
N
samples:
The sampling frequency fe is chosen so
f ⎧ N +1 N +1 ⎫
⎨X [ ], X [ + 1],..., X [ N − 2], X [ N − 1]⎬ ≡
that the frequency e is greater or equal to ⎩ 2 2 ⎭
2
⎧ ⎡ ⎛ N − 1 ⎞⎤ ⎡ ⎛ N − 1 ⎞⎤ ⎫
the least significant frequency from the ≡ ⎨X ⎢− ⎜ 2 ⎟⎥ , X ⎢ − ⎜ 2 − 1⎟ ⎥ ,..., X [ −2], X [ −1]⎬
spectrum of x(t). We consider the discrete ⎩ ⎣ ⎝ ⎠⎦ ⎣ ⎝ ⎠⎦ ⎭
f 2π are called „negative harmonics”.
frequency step f0 = e , ω0 = fe
The X[0] component is the continuous
N N
respectively. ⎡N ⎤
component, while the X ⎢ ⎥ (N - even) is the
The discrete Fourier transform (DFT) is: ⎣2⎦
N-1 2π Nyquist component. It is found when the

-jnk
TFD{x([n]} = X[k] = x[n]e N , k ∈ 0,N − 1 (17) number of samples, N, is even – a situation
n =0
frequently found because DFT is implemented
And the inverse discrete Fourier transform using an algorithm for which N is even. Also,
DFT-1 is: ⎡N ⎤
N-1 2π The X ⎢ ⎥ component is the continuous one.
1 jnk ⎣2⎦
TFD {X [[k ]} = x[n] =
−1
N ∑ X [k]e
k =0
N , k ∈ 0,N − 1
Similarly to relation (10), the discrete
(18) Hilbert transform is defined:

H {x [n ]} = x [n ] = TFD −1 { X [k ] }

The sample of the spectral density (20)
corresponding to frequency kω 0 is determined
Where for N – even:
with the relation:
⎧ N
X ( j k ω 0 ) = Te X [k ] ⎪⎪ − jX [k ], k = 1, − 1 , N even
ˆ
X [k ] = ⎨ 2 (21a)
where X(jω) is the Fourier transform in ⎪ jX [k ], k = N + 1, N − 1 , N even
continuous time. ⎪⎩ 2
On the other hand:
X [k ]* = X [ N − k ] = X [ −k ]. (19)
488 ACTA ELECTROTEHNICA

We observe that the continuous and 3.1. The inverse discrete Fourier
Nyquist components are excluded (for k = 0 transform algorithm
N Is based on relations (20) – (21.a) :
and k = ).
2 1) We determine the discrete Fourier
While for N - odd: transform of the numeric sequence x [n]:
⎧ N −1 X [k ] = TFD{x[n]}
⎪⎪ − jX [k ], k = 1, , N odd
2
Xˆ [k ] = ⎨ (21b) 2) We set the continuous component to zero:
⎪ jX [k ], k = N + 1 X[0]=0
, N − 1 , N odd
⎪⎩ 2
3) If the length N of sequence X[k] is even,
Where the continuous component is excluded. we set the Nyquist component to zero:
⎡N ⎤
Calculus Algorithms X⎢ ⎥ =0
⎣2⎦
Relation (20) can be written:
 4) The sequences X[k],
x[n ] = H {x[n ]} = TFD −1 {− jS [k ] X [k ]} N N −1
k ∈ 1, − 1 , N even ; or k = 1, , N odd .
(22) 2 2
Where: (positive harmonics) are multiplied by –j.
5) The sequences
⎧ N
⎪1, k = 1, − 1, N even N
X[k], k ∈ +1, N −1, N even; or k =1,
N +1
, N −1 , N odd
⎪ 2 2 2
⎪ N (23a) (negative harmonics) are multiplied by +j.
S [k ] = ⎨0, k = 0, k = N even
⎪ 2 6) We calculate the discrete Hilbert transform
⎪ N using relation (20) .
⎪ −1 k = + 1, N − 1 , N even
⎩ 2
3.2. Windowing the positive and negative
And for N - even frequencies algorithm
⎧ N −1 Is obtained by applying a window to the
⎪1, k = 1, , N odd
⎪⎪ 2 positive and negative spectral components,
S [k ] = ⎨0, k = 0, N odd (23b) except for the continuous and the Nyquist
⎪ components. This algorithm is based on
⎪ −1 k = N + 1 , N − 1 , N odd relations (22) – (24):
⎪⎩ 2 1) N is chosen, the number of sampling
S[k] is a window which filters the interest points.
components of the Hilbert transform. 2) S[k] is determined, using relation (24.b).
Observations: 3) The discrete Fourier transform of the
The sequence S [k ] can be obtained: numeric sequence x[n] is calculated:
1) Using the function: X [k ] = TFD{x[n]}
⎧ 2π ⎫ 4) We determine
S [k ] = sgn ⎨sin k ⎬ ; k = 0, N − 1 (24a)
⎩ N ⎭
Xˆ [k ] = − jS [k ] X [k ]
2) Or the function [10]:
5) And then we determine
N 
S [k] = sgn[k]sgn[ − 2] (24b) x[n ] = H {x[n ]} = TFD −1 { − jS [k ] X [k ]}
2
This algorithm is, at first view, similar
The following methods of calculating the
with the previous one, except for the last two
discrete Hilbert transform result:
steps.
Volume 49, Number 4, 2008 489

3.3. The convolution algorithm The discrete Fourier transform of the z[n]
1) We determine signal is:
Z [k ] = TFD{z[n ]} (32)
s[n ] = TFD −1 {− jS [k ]} (25)
Looking at (13 c) it can be written:
2) It results:
 N
x[n] = x[n] ⊗ s[n] (26) Z [k ] = 2TFD{x[n ]} = 2 X [k ], k = 1, − 1 , N even
2
That is: or:
N −1
 N −1
x[n ] = ∑ x[m ]s[n − m] (27) k = 1, , N odd (32 a)
m =0 2
In [10], s[n] has this expression: The window sequence R[k] is introduced:
2 ⎛π n ⎞ ⎛π n ⎞ ⎧
s[n ] = sin 2 ⎜ ⎟ cot⎜ ⎟ , for N even (28) ⎪0, k = 0
N ⎝ 2 ⎠ ⎝ N ⎠

And s[n] equal to zero for n= 0, 2,4,... . ⎪ N
R[k ] = ⎨ 2, k = 1, − 1 , N even (33 a)
While ⎪ 2
⎛ ⎞ ⎪ N
1⎜ π n cos(π n ) ⎟ ⎪0, k = , N − 1
s[n ] = ⎜ cot ( ) − for N odd (29) ⎩ 2
N⎜ N π n ⎟⎟ Or:
sin( )
⎝ N ⎠

And s[n] doesn’t become equal to zero for n ⎪0, k =0
even or odd. Let’s note that ⎪
⎪ N −1
s[ N − k ] = − s[n ], n = 1, N − 1 . R[ k ] = ⎨ 2, k = 1, , N odd (33 b)
⎪ 2
This algorithm seems to be computed in a ⎪ N +1
shorter time. In fact, it requires a longer time ⎪0, k = , N −1
⎩ 2
than the algorithms that use the discrete
Fourier transform. This is explained by the It can be observed that:
fact that for DFT were developed fast calculus R[k ] = S [k ]( S [k ] + 1) (33 c)
algorithms (FFT -Fast Fourier Transform). In a more compact form it can be written:
Observation
In literature we meet the relation: Z [k ] = R[k ] X [k ], k = 1, N − 1 (34)
s[n ] = TFD −1 {S [k ]} (30) This relation results:
 z[n ] = TFD −1 {R[k ] X [k ]} (35)
And then x[n] is calculated using this
relation: Where DFT-1 has the meaning of the inverse
N −1 complex Fourier transform. It results that:

x[n] = − j ∑ x[m] ~s [n − m] = − jx[n] ⊗ ~s [n]
m =0
(31.a) x[n ] = Re{z[n ]} (36)
And:
3.4. Windowing the positive frequencies xˆ[n ] = THD{x[n ]} = Im{z[n ]} (37)
algorithm Relations (31), (37) are leading to an
We now propose a new algorithm for algorithm which allows calculating the
calculating the discrete Hilbert transform. discrete Hilbert transform.
Similarly to relation (12) the discrete Observation: The relation (35) can also be
complex analytic signal is defined (also called written as:
complex analytic sequence):
z[n ] = x[n ] + j xˆ[n ] (31)
490 ACTA ELECTROTEHNICA

1 M 2π
N well as time are important issues, this
∑ Z [k ] e
jnk
z[ n ] = N
, M= − 1, algorithm could represent an advantage.
N k =1 2
(38)
N −1
for N even and M = , for N odd . ACKNOWLEDGEMENT
2
The relation (38) doesn’t have a practical This paper presents research results of the
use since the numeric signal analysis CNCSIS Program-No.1556/20007. The
environments already have instruments for scientific responsibility is assumed by the
computing the DFT – ( FFT ). As a result, it is author.
preferred the algorithm expressed by the
relations (31) – (32). REFERENCES
1. David G. Long, Ph.D. Comments on Hilbert
4. INVERSE DISCRETE HILBERT Transform Based Signal Analysis. MERS
TRANSFORM Technical Report # MERS 04-001.
2. Marple, S.L., "Computing the discrete-time analytic
Is determined using the relation: signal via FFT," IEEE Transactions on Signal
  Processing, Vol. 47, No.9 (September 1999),
H −1 {x[n]} = −H{x[n]} (39) pp.2600-2603.
If N, the sequence length is odd and the 3. Oppenheim, A.V., and R.W. Schafer, Discrete-Time
Signal Processing, 2nded., Prentice-Hall, 1998.
continuous component is missing we can 4. Bracewell, R., The Fourier Transform and Its
write: Applications, McGraw-Hill, 1965.

H −1 {x[n]} = x[n] (40) 5. Feldman, M., "Non-linear system vibration analysis
using Hilbert Transform - I. Free Vibration
If N is even, while the continuous Analysis Method 'FREEVIB'", Mechanical Systems
component is different from zero or if N is and Signal Processing (1994) 8(2), 119-127.
6. Sanjit K. Mitra Digital Signal Procesing. A
odd, that is we have the Nyquist component, Computer-Based Approach. McGraw-Hill
then relation (40) is not strictly true any more. International edition 2006. ISBN 007-124467-0.
Algorithms of the inverse discrete Hilbert 7. J.S. Bendat: The Hilbert Transform and
transform similar to those presented above for Applications to Correlation Measurements,
the direct discrete Hilbert transform result. Bruel&Kjaer, 1985, BT0008.
8. N. Thrane: The Hilbert Transform, Technical
Review No. 3 1984, Bruel&Kjaer, BV 0015.
5. RESULTS AND CONCLUSIONS 9. M. Simon and G.R. Tomlinson. Use of the Hilbert
transform in modal analysis of linear and non-
This paper briefly presents known linear structures. Journal of Sound and Vibration
algorithms for calculating the Hilbert (1984) 96(4), pp.421-436.
10. Claerbout, J.F., Fundamentals of Geophysical Data
transform and proposes and algorithm based Processing, McGraw-Hill, 1976, pp.59-62.
on the properties of the complex analytic 11. [10] Mathias Johansson. The Hilbert Transform.
signal. The methods of computation in time Master Thesis. Mathematics/Applied mathematics.
and frequency domains are presented. For Vaxjo University.
applications where the hard/soft throughput as

You might also like