Discrete Hilbert Transform
Discrete Hilbert Transform
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