Hartley transform and the use of the Whitened Hartley spectrum as a tool for phase spectral processing

: The Hartley transform is a mathematical transformation which is closely related to the better known Fourier transform. The properties that differentiate the Hartley Transform from its Fourier counterpart are that the forward and the inverse transforms are identical and also that the Hartley transform of a real signal is a real function of frequency. The Whitened Hartley spectrum, which stems from the Hartley transform, is a bounded function that encapsulates the phase content of a signal. The Whitened Hartley spectrum, unlike the Fourier phase spectrum, is a function that does not suffer from discontinuities or wrapping ambiguities. An overview on how the Whitened Hartley spectrum encapsulates the phase content of a signal more ef ﬁ ciently compared with its Fourier counterpart as well as the reason that phase unwrapping is not necessary for the Whitened Hartley spectrum, are provided in this study. Moreover, in this study, the product – convolution relationship, the time-shift property and the power spectral density function of the Hartley transform are presented. Finally, a short-time analysis of the Whitened Hartley spectrum as well as the considerations related to the estimation of the phase spectral content of a signal via the Hartley transform, are elaborated.


Introduction
The Hartley transform, a close relative of the better known Fourier transform, was first introduced in 1942 [1]. Its appealing properties of symmetry (its forward and inverse transforms are identical) and that its transform of a real signal is also a real function of frequency, were seen, at that time, as having useful applications in the area of communications theory [2]. Little was heard of this transform until Bracewell published an account of the discrete Hartley transform followed shortly by another on the fast Hartley transform. Bracewell observed that the real spectrum derived via the Hartley transform from a real signal, contained phase information (as well as magnitude information) and showed that analogue phase measurement was possible with suitable laboratory apparatus [3][4][5][6][7]. Published work related to the Hartley transform in the area of signal processing can be found in [8][9][10][11][12]; the Hartley transform has also found application in diverse areas such as geophysics [13,14], electrical power engineering [15] and pattern recognition [16][17][18].
A real signal could be exactly represented, via the short-time discrete Hartley transform, by two separate frequency domain functions, both real. One, the magnitude spectrum which is identical to that derived via the Fourier transform and represents the squareroot of the power spectral density function of the signal, whereas the second function, rather clumsily called the 'Whitened Hartley spectrum', is a function of phase only [19]; the term 'whitened' has been used since the derivation of the 'Whitened Hartley spectrum' is the result of the 'whitening' process [20]. This latter function, unlike its Fourier counterpart, is bounded and does not suffer from wrapping ambiguities thus avoiding the difficulties introduced by the discontinuities in the discrete phase spectrum when this is derived via the Fourier transform [21]. Thus, the 'Whitened Hartley spectrum' or 'Hartley Phase Spectrum (HPS)' encapsulates the phase content of the signal more efficiently, compared with its Fourier counterpart. Moreover, the HPS has already found useful application in: audio (gunshot) classification [19,22], speech (phoneme) classification [23][24][25] and as a noise robust feature for signal analysis [26]. Please note that the terms 'Whitened Hartley spectrum' and 'HPS' are used in this paper interchangeably since both of them convey the same meaning. Furthermore, the Hartley phase cepstrum, which stems from the HPS, has been applied in: signal localisation [27,28], detection of transient events for power quality [29] and as a tool for improved phase spectral estimation [30,31].
This paper aims to provide a theoretical overview of the Hartley transform, to present its similarities with the Fourier transform as well as its attractive properties compared with its Fourier counterpart. Specifically, in Section 2 the Hartley transform as well as the complementary Hartley transform are defined and its relationship with the Fourier transform is stated. In the same section, the product-convolution and the time-shift properties of the Hartley transform are also explained. In Section 3, the 'Whitened Hartley spectrum' is defined and its properties compared with the Fourier phase spectrum are presented. In Section 4, the short-time analysis of the HPS is described, and finally in Section 5 the time-delay of a signal is evaluated based on the Whitened Hartley spectrum.

Some fundamental definitions
The Hartley transform is an orthogonal transform with cosinusoidal basis functions. It is a close relative of the widely used Fourier transform which is defined as given by the relation Alternatively, (1a) and (1b) can be expressed as and The kernel function of the Fourier transform is the complex exponential, e −jωt , whereas the kernel function of the Hartley transform is the cas(ωt) function. The cas function was introduced by Hartley in 1942 and is defined as cas(ωt) = cos(ωt) + sin(ωt). Hence, the Hartley transform of a function s(t) is defined as where ω is the angular frequency in radians/second. Equivalently, the Hartley transform can be defined using the linear frequency f (units: 1/s) instead of the angular frequency ω. In this case, the 1/ 2p √ coefficient is omitted, that is and The second useful property is that the Hartley transform of a real signal is a real function of frequency. As an example consider the function Fig. 2 Fig. 3, whereas the Fourier transform of s(t) is F(s(t)) = e j1.5v 1 + jv which is a complex function of the angular frequency ω. Furthermore, it can be easily shown, using definitions (2a) and (3a) and the Euler's formula, that the Hartley transform can be expressed in terms of the Fourier transform. Indeed, in case the signal s(t) is real, the Hartley transform is the real part S R (ω) minus the imaginary part S I (ω) of the Fourier transform, that is while the real and the imaginary parts of the Fourier transform is the even and the negative odd components of the Hartley transform, respectively, that is Moreover, it is useful to observe the operation of the Hartley and the Fourier transforms on a complex signal. Let s(t) = x(t) + jy(t), then directly from the linearity property we have Thus, the Hartley transform of a complex signal is a complex function where the real and the imaginary components of the signal in the time-domain map uniquely onto its real and imaginary components in the frequency domain. This may be compared with the case of the Fourier transform, where Generally, in case both the F [x(t)] and the F [y(t)] components of the Fourier spectrum are complex, then it holds and hence the Fourier transform of the complex signal is given by Similarly, for the Hartley transform, based on (5a) and (6) it holds and then (6), in view of (10), becomes

Complementary Hartley transform
It is also useful to define the complementary Hartley (12) Inspection of (3a) and (12) show that Equivalently, the Fourier transform has a complementary function, namely its complex conjugate, which in case function s(t) is real, then

Hartley/Fourier relationship
In addition to the obvious relation (5a), direct relationships between the Hartley and the Fourier transforms can be derived using (2a) and (3a). Expanding the cosine and sine functions of the Hartley transform as sums of complex exponentials we have Equivalently, a Fourier transform expression can be derived in terms of the Hartley transform and its complementary function

Product-convolution relationship
The two relationships in (14) and (15) can now be used in order to derive useful properties for the Hartley transform directly from the corresponding properties known for the Fourier transform. Let s(t) = g(t)*h(t) where '*' denotes the convolution operator. It is known that the Fourier transform of a convolution of two signals equals to the product of the Fourier transforms of these signals, that , and hence from (14) we obtain

Substituting (15) into the above expression for F[g(t)], F[h(t)], F[g(−t)] and F[h(−t)] and then simplifying leads to
This rather inelegant expression, at least when compared with the Fourier equivalent, is generally valid for any pair of signals. However, useful simplifications can be made in (16) when one or both of the two time functions have either even or odd symmetry. Hence, for instance, in case g(t) and/or h(t) is even, then (16) reduces to When a signal may be considered as the product of two other signals, then a similar result to that of (17) is obtained, except that the product of the Hartley transforms is replaced by a convolution. If one of the two time signals has even symmetry, then the result simplifies to The utility of the result in (18) may be appreciated when it is required to apply the Hartley transform to a finite or 'windowed' time signal. Ensuring that the window function, in the time domain, has even symmetry (e.g. a Hamming window) and treating the time-origin as lying at the centre of this window, ensures the result of (18), greatly simplifying frequency domain analysis (see Section 4 for details on implementation).

Time-shift property
First, we remind ourselves of the Fourier time-shift property, that is From (14) we have that From (15) and (19) and by rationalising (20a), it holds (20b)

Power spectral density function
The power spectral density function for a real signal s(t) is defined as where |x| denotes the magnitude of a complex number x.
Equivalently, (21) may also be expressed in Hartley transform terms by substituting (15) into (21), and then simplifying, thus obtaining

Whitened Hartley spectrum
The Hartley spectrum of a real signal contains both spectral magnitude and phase information in a single real frequency domain function. It is useful to consider whether, for the analysis of the signal, it is possible to identify those spectral characteristics of the Hartley spectrum which relate to the Fourier magnitude spectrum and those which relate only to the Fourier phase spectrum. Once again, it is convenient to compare the Fourier and Hartley transforms. Let F[s(t)] = S R (ω) + jS I (ω) which may be rewritten in the form F[s(t)] = M(ω)e jw (ω) where M (v) = S 2 R (v) + S 2 I (v) is the Fourier magnitude spectrum and w(ω) = tan −1 (S I (ω)/S R (ω)) is the conventional Fourier phase spectrum. By considering (5b), the Fourier magnitude spectrum and the Fourier phase spectrum can be expressed in terms of the Hartley transform, thus and The Whitened Hartley spectrum [32,33] or HPS is defined as According to the Euler's formula, we have S R (ω) = M(ω)cos(w(ω)) and S I (ω) = M(ω)sin(w(ω)), and hence by substituting these two relations to (5a) it follows that H[s(t)] = M(ω)(cos(w(ω)) − sin(w(ω))). Consequently, the Whitened Hartley spectrum or HPS may now be written as Thus, considering again the function introduced in Section 2.1, one can calculate using (3a), (23) and (25) that its HPS is given by the following relation

Properties of the Whitened Hartley spectrum
The Whitened Hartley spectrum, V(ω), has a number of interesting and important properties which makes it useful. These are summarised as follows: (1) V(ω) is a bounded function. Indeed, it holds that Specifically, for any value of w(ω), the maximum and minimum values of V(ω) are between + 2 √ , and hence V(ω) can never lie outside this range. This property is particularly useful for speech and audio coding applications [32,33]. It is important to note that a signal may be entirely re-constructed in the time domain knowing the following frequency domain components: w(ω) and M(ω). Specifically, from relation (27) by knowing w(ω) one can evaluate the Whitened Hartley spectrum, V(ω), which conveys the phase spectral information of the signal. If the value of M(ω) is also known, then the Hartley spectrum can be evaluated via (25). In the final step, based on the self-inverse property of the Hartley transform, the time-domain signal can be accurately re-constructed from the aforementioned frequency domain components. As will be analysed in Section 3.2, the advantage of re-constructing a signal based on the Whitened Hartley spectrum instead of the Fourier phase spectrum is that the re-constructed time-domain signal does not have inaccuracies in its calculation because of the wrapping ambiguities of the Fourier phase spectrum [21]. This advantage of the Whitened Hartley spectrum is particularly useful for applications such as speech or audio synthesis.
(2) V(ω) is a continuous function of frequency: This can be deduced by observing the form of (25). If s(t) is a continuous function of time, then the Hartley transform of this function H[s(t)] must be a continuous function of frequency, since it is obtained by performing integration over time. To ensure that V(ω) is everywhere continuous, it is also necessary to show that the magnitude spectrum, M(ω), of the signal s(t) is also continuous over frequency. This may be seen as correct if one realises that the power spectral density function of a continuous signal s(t) must also be a continuous function of frequency since it is derived via the Fourier transform, and therefore the magnitude spectrum M(ω) must also convey this property. The only other consideration is for the case when M(ω) tends to zero. However, in this case, since both H[s (t)] and M(ω) are derived from the real and imaginary components of the complex Fourier transform, then as M(ω) tends to zero, so does H[s(t)], and thus V(ω) tends to a finite number. For example, as one can observe by comparing Fig. 4 with Fig. 5, the HPS of the function s(t) is a continuous function of frequency, whereas the Fourier phase spectrum of the same function exhibits discontinuities. This advantage of the Whitened Hartley spectrum compared with the Fourier phase spectrum is further explained in the following section.

Comparison between the Fourier phase spectrum and the HPS
The advantages of the HPS, compared with its Fourier counterpart, can be further underlined in the view of the discontinuities that appear across the conventional Fourier phase spectrum w(ω) = tan −1 (S I (ω)/S R (ω)). Specifically, the difficulties in processing the phase spectrum of a signal when the conventional Fourier phase spectrum is used, may be summarised in (i) and (ii).
(i) 'Extrinsic' discontinuities in the Fourier phase spectrum: The first difficulty is related to the discontinuities caused because of the inverse tangent function and are called 'extrinsic' discontinuities. The computation of the inverse tangent function results in phase values with range from −π tο π (see Fig. 5); however, this does not necessarily hold to non-synthetic signals. To overcome these ambiguities, appearing as phase 'jumps' across the Fourier phase spectrum, the phase has to be 'unwrapped' [21]. However, these phase 'jumps' are caused either because of, Case (a): 'wrapping' ambiguities or Case (b): rapidly changing phase angles. Conventional 'unwrapping' algorithms though cannot discriminate what causes these 'jumps', and hence they compensate phase 'jumps' which are caused not only because of Case (a) but also because of Case (b). Consequently, the phase content of the signal is distorted since the 'unwrapping' algorithm should compensate only the phase 'jumps' caused because of 'wrapping' ambiguities, that is, because of Case (a). It is important to mention that the effect of 'wrapping' ambiguities is increased considerably in the presence of noise [26]. Note that, an alternative way to implement the Fourier phase spectrum avoiding the 'extrinsic' discontinuities, is to evaluate it via the z-transform however, round-off errors are introduced when the roots of the signal's polynomial are evaluated [34]. (ii) 'Intrinsic' discontinuities in the Fourier phase spectrum: The second difficulty is related to the discontinuities appearing across the Fourier phase spectrum caused because of 'intrinsic' characteristics of the signal. These 'intrinsic' discontinuities appear when both the imaginary and real parts of the Fourier spectrum of the signal cross zero simultaneously ('critical' point), during the phase evaluation process [19,35]. This latter kind of discontinuity causes π 'jumps' in the Fourier phase spectrum as addressed in [34]. The compensation of the 'intrinsic' discontinuities appearing across the Fourier phase spectrum is attained by adding or subtracting π accordingly [35].
Whitened Hartley spectrum and 'extrinsic' discontinuities: As it can be seen from (27), the HPS is a function of the Fourier phase only since it is equal to the subtraction of the sine of the Fourier phase from the cosine of the Fourier phase, and thus it conveys purely Fourier phase information. Hence for the case of the Whitened Hartley spectrum, the signal's phase content is encapsulated to a cosinusoidal waveform, and consequently unlike the Fourier phase spectrum case, the inverse tangent function is not used, therefore 'extrinsic' discontinuities do not exist.
Whitened Hartley spectrum and 'intrinsic' discontinuities: As mentioned, when this category of discontinuities appears across the Fourier phase spectrum, they can be compensated by adding or subtracting π accordingly. On the basis of that, for the Hartley case, the 'intrinsic' discontinuities are compensated in the following way: assume that b represents the phase value at a 'critical' point (i.e. simultaneous cross of zero of the real and the imaginary components), then two cases exist: Case 1: If π has to be 'added' at the 'critical' point b of the Fourier phase spectrum for compensation, then the equivalent expression for the HPS ((26)) is cos(b + π) − sin(b + π) = −(cos(b) − sin(b)) and Case 2: similarly, assuming that π has to be 'subtracted' at the 'critical' point b of the Fourier phase spectrum, then the equivalent expression for the HPS case becomes: cos(b − π) − sin(b − π) = −(cos(b) − sin(b)). Since for both Case 1 and Case 2 the result is −(cos(b) − sin(b)), therefore wherever a 'critical' point is detected in the HPS, then the remainder of the spectrum has to be multiplied by −1 in order to compensate the 'intrinsic' discontinuities. Summarising, in the case where the 'intrinsic' discontinuities have to be compensated from the HPS the steps that have to be followed are: 1. Detection of the 'critical points' across the phase spectrum. 2. Scan of the HPS from the start; wherever a 'critical' point is detected the remainder of this spectrum has to be multiplied by −1. 3. Repeat steps 1 and 2 for all 'critical' points [28,31].
As mentioned in the Introduction, the aforementioned attractive properties of the HPS compared with its Fourier counterpart are inherited to the corresponding cepstrum, called the Hartley phase cepstrum [28,30,31].

Short-time analysis and the Whitened Hartley spectrum
For any practical application, the time signal under analysis must be of finite duration. This phenomenon, usually referred to as 'windowing' [36], is well known in Fourier analysis. Similar considerations apply to the Hartley transform where the finite signal may be considered as an infinite signal under observation through a finite length window. The effect in the frequency domain is, however, less simple. Scrutiny of (18) shows that the way in which the window is employed in the computation is crucial. Only if the local time-axis is taken as zero at the centre of the windowed data, will the corresponding frequency spectrum be represented by a simple convolution of the two spectra [36]. Thus from (18) where s _ (t) is the short-time frame of signal under analysis s(t) and With the even symmetry of the window preserved (i.e. by taking the zero time-axis at the centre of the window), it follows that F[w(t)] = H[w(t)] = W(ω) which is a real, even function of frequency. The magnitude spectrum of the windowed signal is given by Letting F[s(t)] = S R (ω) + jS I (ω), then (29) This expression may be simplified if one can assume that there is zero cross-correlation between the window function and the time signal itself. Under these conditions Thus, it is now possible to define a modified Whitened Hartley (25), (28) and (30) it follows It may be postulated that there exists two further window spectral functions, W a (ω) and W b (ω), such that 0 ≤ a, b ≤ 1 and a + b = 1, so that where The extent to which this function modifies the Whitened Hartley spectrum depends on the features in the magnitude spectrum of the signal and on the spectrum of the window.

Time-delay measurement via the Whitened Hartley spectrum
Consider a signal s(t), and its replica s(t − t) received sometime later (say from an echo or reflection). On the basis of (20b), the Hartley transform of the total signal received, that is, Now let M(ω) be the magnitude spectrum of the signal s(t) and let Q(ω) be the Whitened Hartley spectrum of the signal s(t) + s(t − t).
From the linearity property and the time-shifting property of the Fourier transform, one can calculate that the magnitude spectrum of the received signal s(t) + s(t − t) is 2M(ω). Hence, the Whitened Hartley spectrum (25) of s(t) + s(t − t) equals to where V*(ω) is the complementary Whitened Hartley spectrum of the signal s(t).
There are two cases to consider. The first case is when the signal s(t) is known. In this case, it is possible to re-arrange the signal in order to have even symmetry (in time). In this case (35) reduces to or From (37) it follows that the time-delay between the outgoing signal and the returning signal is represented in the frequency domain by a cosinusoidal function of period 2π/t. This period corresponds to the delay between the outgoing signal and its reflection. Let us consider the signals u(t) = 1, |t| ≤ 5 0, |t| . 5 and its shifted version to the left by t = 4 units, that is, u(t − 4). In Fig. 6, the expression Q(ω)/V(ω) is plotted as a function of frequency ω and as expected from (37), this function is periodic with period 2π/4 or π/2. The second case concerns the situation where the signal s(t) is not known. Here, the exact signal spectrum is also partially unknown since the measured spectrum from the received signal is modified by its delay. In this case, it is necessary to interrogate the function Q(ω) for a dominant cosinusoidal function. Depending on the nature of the original signal, the periodicity of this cosinsoidal function may be identified [28]. The same approach could also be applied in the case where the reflections producing this time-delay are changing (i.e. because of a moving object) since the periodic component can be tracked.

Conclusions
In this paper, an overview of the Hartley transform is presented, the relationship between the Hartley transform and the Fourier transform is provided and the Hartley transform properties are analysed. More importantly, the Whitened Hartley spectrum is defined, its properties for phase spectral estimation are highlighted, its shorttime analysis is provided and its advantages compared with the Fourier phase spectrum are underlined. The properties of the Whitened Hartley spectrum are also demonstrated via an example involving time-delay measurement. Summarising, the Whitened Hartley spectrum is proposed as an alternative to the Fourier phase spectrum for applications related to phase spectral processing. Specifically, the Whitened Hartley spectrum, unlike its Fourier counterpart, does not convey extrinsic discontinuities since it is not using the inverse tangent function, whereas the discontinuities of the signal in the phase spectrum which are caused because of intrinsic characteristics of the signal can be compensated. Finally, it is important to mention that the phase spectrum which is developed via the Whitened Hartley spectrum does not only have important advantages compared with the Fourier phase spectrum but it is also very straightforward in terms of its implementation and processing.