# Hilbert–Huang transform

The Hilbert–Huang transform (HHT) is a way to decompose a signal into so-called intrinsic mode functions (IMF) along with a trend, and obtain instantaneous frequency data. It is designed to work well for data that is nonstationary and nonlinear. In contrast to other common transforms like the Fourier transform, the HHT is an algorithm that can be applied to a data set, rather than a theoretical tool.
The Hilbert–Huang transform (HHT), a NASA designated name, was proposed by Norden E. Huang et al. (1996, 1998, 1999, 2003, 2012). It is the result of the empirical mode decomposition (EMD) and the Hilbert spectral analysis (HSA). The HHT uses the EMD method to decompose a signal into so-called intrinsic mode functions (IMF) with a trend, and applies the HSA method to the IMFs to obtain instantaneous frequency data. Since the signal is decomposed in time domain and the length of the IMFs is the same as the original signal, HHT preserves the characteristics of the varying frequency. This is an important advantage of HHT since a real-world signal usually has multiple causes happening in different time intervals. The HHT provides a new method of analyzing nonstationary and nonlinear time series data.

## Definition
### Empirical mode decomposition

The fundamental part of the HHT is the empirical mode decomposition (EMD) method. Breaking down signals into various components, EMD can be compared with other analysis methods such as Fourier transform and Wavelet transform. Using the EMD method, any complicated data set can be decomposed into a finite and often small number of components. These components form a complete and nearly orthogonal basis for the original signal. In addition, they can be described as intrinsic mode functions (IMF).
Because the first IMF usually carries the most oscillating (high-frequency) components, it can be rejected to remove high-frequency components (e.g., random noise). EMD based smoothing algorithms have been widely used in seismic data processing, where high-quality seismic records are highly demanded.
Without leaving the time domain, EMD is adaptive and highly efficient. Since the decomposition is based on the local characteristic time scale of the data, it can be applied to nonlinear and nonstationary processes.

### Intrinsic mode functions

An intrinsic mode function (IMF) is defined as a function that satisfies the following requirements:
* In the whole data set, the number of extrema and the number of zero-crossings must either be equal or differ at most by one.
* At any point, the mean value of the envelope defined by the local maxima and the envelope defined by the local minima is zero.
It represents a generally simple oscillatory mode as a counterpart to the simple harmonic function. By definition, an IMF is any function with the same number of extrema and zero crossings, whose envelopes are symmetric with respect to zero. This definition guarantees a well-behaved Hilbert transform of the IMF.

### Hilbert spectral analysis

Hilbert spectral analysis (HSA) is a method for examining each IMF's instantaneous frequency as functions of time. The final result is a frequency-time distribution of signal amplitude (or energy), designated as the Hilbert spectrum, which permits the identification of localized features.

## Techniques

The Intrinsic Mode Function (IMF) amplitude and frequency can vary with time and it must satisfy the rule below:
* The number of extremes(local maximums & local minimums) and the number of zero-crossings must either equal or differ at most by one.
* At any point, the mean value of the envelope defined by the local maxima and the envelope defined by the local minima is near zero.

### Empirical mode decomposition

The empirical mode decomposition (EMD) method is a necessary step to reduce any given data into a collection of intrinsic mode functions (IMF) to which the Hilbert spectral analysis can be applied.
IMF represents a simple oscillatory mode as a counterpart to the simple harmonic function, but it is much more general: instead of constant amplitude and frequency in a simple harmonic component, an IMF can have variable amplitude and frequency along the time axis.
The procedure of extracting an IMF is called sifting. The sifting process is as follows:
* Identify all the local extrema in the test data.
* Connect all the local maxima by a cubic spline line as the upper envelope.
* Repeat the procedure for the local minima to produce the lower envelope.
The upper and lower envelopes should cover all the data between them. Their mean is m$_1$. The difference between the data and m$_1$ is the first component h$_1$:
    $X(t)-m_{1}=h_{1}.\,$
Ideally, h$_1$ should satisfy the definition of an IMF, since the construction of h$_1$ described above should have made it symmetric and having all maxima positive and all minima negative. After the first round of sifting, a crest may become a local maximum. New extrema generated in this way actually reveal the proper modes lost in the initial examination. In the subsequent sifting process, h$_1$ can only be treated as a proto-IMF. In the next step, h$_1$ is treated as data:
    $h_{1}-m_{11}=h_{11}.\,$
After repeated sifting up to k times, h$_1$ becomes an IMF, that is
    $h_{1(k-1)}-m_{1k}=h_{1k}.\,$
Then, h$_{1k}$ is designated as the first IMF component of the data:
    $c_{1}=h_{1k}.\,$

### Stoppage criteria of the sifting process

The stoppage criterion determines the number of sifting steps to produce an IMF. Following are the four existing stoppage criterion:

#### Standard deviation

This criterion is proposed by Huang et al. (1998). It is similar to the Cauchy convergence test, and we define a sum of the difference, SD, as
    $SD_{k}=\sum _{t=0}^{T}{\frac {|h_{k-1}(t)-h_{k}(t)|^{2}}{h_{k-1}^{2}(t)}}.\,$
    Then the sifting process stops when SD is smaller than a pre-given value.

#### S Number criterion

This criterion is based on the so-called S-number, which is defined as the number of consecutive siftings for which the number of zero-crossings and extrema are equal or at most differing by one. Specifically, an S-number is pre-selected. The sifting process will stop only if, for S consecutive siftings, the numbers of zero-crossings and extrema stay the same, and are equal or at most differ by one.

#### Threshold method

Proposed by Rilling, Flandrin and Gonçalvés, threshold method set two threshold values to guaranteeing globally small fluctuations in the meanwhile taking in account locally large excursions.

#### Energy difference tracking

Proposed by Cheng, Yu and Yang, energy different tracking method utilized the assumption that the original signal is a composition of orthogonal signals, and calculate the energy based on the assumption. If the result of EMD is not an orthogonal basis of the original signal, the amount of energy will be different from the original energy.
Once a stoppage criterion is selected, the first IMF, c$_1$, can be obtained. Overall, c$_1$ should contain the finest scale or the shortest period component of the signal. We can, then, separate c$_1$ from the rest of the data by $X(t)-c_{1}=r_{1}.\,$ Since the residue, r$_1$, still contains longer period variations in the data, it is treated as the new data and subjected to the same sifting process as described above.
This procedure can be repeated for all the subsequent r$_j$'s, and the result is
    $r_{n-1}-c_{n}=r_{n}.\,$
The sifting process finally stops when the residue, r$_n$, becomes a monotonic function from which no more IMF can be extracted. From the above equations, we can induce that
    $X(t)=\sum _{j=1}^{n}c_{j}+r_{n}.\,$
Thus, a decomposition of the data into n-empirical modes is achieved. The components of the EMD are usually physically meaningful, for the characteristic scales are defined by the physical data. Flandrin et al. (2003) and Wu and Huang (2004) have shown that the EMD is equivalent to a dyadic filter bank.

### Hilbert spectral analysis

Having obtained the intrinsic mode function components, the instantaneous frequency can be computed using the Hilbert transform. After performing the Hilbert transform on each IMF component, the original data can be expressed as the real part, Real, in the following form:
    $X(t)={\text{Real}}{\sum _{j=1}^{n}a_{j}(t)e^{i\int \omega _{j}(t)dt}}.\,$

## Current applications
### Two-Dimensional EMD

In the above examples, all signals are one-dimensional signals, and in the case of two-dimensional signals, the Hilbert-Huang Transform can be applied for image and video processing in the following ways:
* Pseudo-Two-Dimensional EMD (Pseudo-two-dimensional Empirical Mode Decomposition):
    Directly splitting the two-dimensional signal into two sets of one-dimensional signals and applying the Hilbert-Huang Transform separately. After that, rearrange the two signals back into a two-dimensional signal.
    The result can produce excellent patterns, and display local rapid oscillations in long-wavelength waves. However, this method has many drawbacks. The most significant one is the discontinuities, occurring when the two sets of processed Intrinsic Mode Functions (IMFs) are recombined into the original two-dimensional signal. The following methods can be used to address this issue.
* Pseudo-Two-Dimensional EEMD (Pseudo-two-dimensional Ensemble Empirical Mode Decomposition):
    Compared to Pseudo-Two-Dimensional EMD, using EEMD instead of EMD can effectively improve the issue of discontinuity. However, this method has limitations and it's only effective when the time scale is very clear, such as in the case of temperature detection in the North Atlantic. It is not suitable for situations where the time scale of the signal is unclear.
* Genuine Two-Dimensional EMD (Genuine two-dimensional Empirical Mode Decomposition):
    As Genuine Two-Dimensional EMD directly processes two-dimensional signals, it poses some definitional challenges.
      * How to determine the maximum value—should the edges of the image be considered, or should another method be used to define the maximum value?
      * How to choose the progressive manner after identifying the maximum value. While Bézier curves may be effective in one-dimensional signals, they may not be directly applicable to two-dimensional signals.
       Therefore, Nunes et al. used radial basis functions and the Riesz transform to handle Genuine Two-Dimensional EMD. The following is the form of the Riesz transform. For a complex function f on $R^{d}$.
| $R_{j}f(x)=c_{d}\lim _{\epsilon \to 0}\int _{\mathbf {R} ^{d}\backslash B_{\epsilon }(x)}{\frac {(t_{j}-x_{j})f(t)}{|x-t|^{d+1}}}\,dt$ | (1) |
       for j = 1,2,...,d.
       The constant $C_{d}$ is a dimension-normalized constant.
       $c_{d}={\frac {1}{\pi \omega _{d-1}}}={\frac {\Gamma [(d+1)/2]}{\pi ^{(d+1)/2}}}.$
       Linderhed used Genuine Two-Dimensional EMD for image compression. Compared to other compression methods, this approach provides a lower distortion rate. Song and Zhang [2001], Damerval et al. [2005], and Yuan et al. [2008] used Delaunay triangulation to find the upper and lower bounds of the image. Depending on the requirements for defining maxima and selecting different progressive methods, different effects can be obtained.

### Other application

* Improved EMD on ECG signals: Ahmadi et al.[2019] presented an Improved EMD and compared with other types of EMD. Results show the proposed algorithm provides no spurious IMF for these functions and is not placed in an infinite loop. EMD types comparison on ECG(Electrocardiography) signals reveal the improved EMD was an appropriate algorithm to be used for analyzing biological signals.
* Biomedical applications: Huang et al. [1999b] analyzed the pulmonary arterial pressure on conscious and unrestrained rats.
* Neuroscience: Pigorini et al. [2011] analyzed Human EEG response to Transcranial Magnetic Stimulation; Liang et al. [2005] analyzed the visual evoked potentials of macaque performing visual spatial attention task.
* Epidemiology: Cummings et al. [2004] applied the EMD method to extract a 3-year-periodic mode embedded in Dengue Fever outbreak time series recorded in Thailand and assessed the travelling speed of Dengue Fever outbreaks. Yang et al. [2010] applied the EMD method to delineate sub-components of a variety of neuropsychiatric epidemiological time series, including the association between seasonal effect of Google search for depression [2010], association between suicide and air pollution in Taipei City [2011], and association between cold front and incidence of migraine in Taipei city [2011].
* Chemistry and chemical engineering: Phillips et al. [2003] investigated a conformational change in Brownian dynamics and molecular dynamics simulations using a comparative analysis of HHT and wavelet methods. Wiley et al. [2004] used HHT to investigate the effect of reversible digitally filtered molecular dynamics which can enhance or suppress specific frequencies of motion. Montesinos et al. [2002] applied HHT to signals obtained from BWR neuron stability.
* Financial applications: Huang et al. [2003b] applied HHT to nonstationary financial time series and used a weekly mortgage rate data.
* Image processing: Hariharan et al. [2006] applied EMD to image fusion and enhancement. Chang et al. [2009] applied an improved EMD to iris recognition, which reported a 100% faster in computational speed without losing accuracy than the original EMD.
* Atmospheric turbulence: Hong et al. [2010] applied HHT to turbulence data observed in the stable boundary layer to separate turbulent and non-turbulent motions.
* Scaling processes with intermittency correction: Huang et al. [2008] has generalized the HHT into arbitrary order to take the intermittency correction of scaling processes into account, and applied this HHT-based method to hydrodynamic turbulence data collected in laboratory experiment,; daily river discharge,; Lagrangian single particle statistics from direct numerical simulation,; Tan et al., [2014], vorticity field of two dimensional turbulence,; Qiu et al.[2016], two dimensional bacterial turbulence,; Li & Huang [2014], China stock market,; Calif et al. [2013], solar radiation. A source code to realize the arbitrary order Hilbert spectral analysis can be found at .
* Meteorological and atmospheric applications: Salisbury and Wimbush [2002], using Southern Oscillation Index data, applied the HHT technique to determine whether the Sphere of influence data are sufficiently noise free that useful predictions can be made and whether future El Nino southern oscillation events can be predicted from SOI data. Pan et al. [2002] used HHT to analyze satellite scatterometer wind data over the northwestern Pacific and compared the results to vector empirical orthogonal function results.
* Ocean engineering: Schlurmann [2002] introduced the application of HHT to characterize nonlinear water waves from two different perspectives, using laboratory experiments. Veltcheva [2002] applied HHT to wave data from nearshore sea. Larsen et al. [2004] used HHT to characterize the underwater electromagnetic environment and identify transient manmade electromagnetic disturbances.
* Seismic studies: Huang et al. [2001] used HHT to develop a spectral representation of earthquake data. Chen et al. [2002a] used HHT to determine the dispersion curves of seismic surface waves and compared their results to Fourier-based time-frequency analysis. Shen et al. [2003] applied HHT to ground motion and compared the HHT result with the Fourier spectrum.
* Solar physics: Nakariakov et al. [2010] used EMD to demonstrate the triangular shape of quasi-periodic pulsations detected in the hard X-ray and microwave emission generated in solar flares. Barnhart and Eichinger [2010] used HHT to extract the periodic components within sunspot data, including the 11-year Schwabe, 22-year Hale, and ~100-year Gleissberg cycles. They compared their results with traditional Fourier analysis.
* Structural applications: Quek et al. [2003] illustrate the feasibility of the HHT as a signal processing tool for locating an anomaly in the form of a crack, delamination, or stiffness loss in beams and plates based on physically acquired propagating wave signals. Using HHT, Li et al. [2003] analyzed the results of a pseudodynamic test of two rectangular reinforced concrete bridge columns.
* Structural health monitoring: Pines and Salvino [2002] applied HHT in structural health monitoring. Yang et al. [2004] used HHT for damage detection, applying EMD to extract damage spikes due to sudden changes in structural stiffness. Yu et al. [2003] used HHT for fault diagnosis of roller bearings.
* System identification: Chen and Xu [2002] explored the possibility of using HHT to identify the modal damping ratios of a structure with closely spaced modal frequencies and compared their results to FFT. Xu et al. [2003] compared the modal frequencies and damping ratios in various time increments and different winds for one of the tallest composite buildings in the world.
* Speech recognition: Huang and Pan [2006] have used the HHT for speech pitch determination.
* Astroparticle physics : Bellini et al. [2014] (Borexino collaboration), Measurement of the seasonal modulation of the solar neutrino fluxes with Borexino experiment, Phys. Rev. D 89, 112007 2014

## Limitations

Chen and Feng [2003] proposed a technique to improve the HHT procedure. The authors noted that the EMD is limited in distinguishing different components in narrow-band signals. The narrow band may contain either (a) components that have adjacent frequencies or (b) components that are not adjacent in frequency but for which one of the components has a much higher energy intensity than the other components. The improved technique is based on beating-phenomenon waves.
Datig and Schlurmann [2004] conducted a comprehensive study on the performance and limitations of HHT with particular applications to irregular water waves. The authors did extensive investigation into the spline interpolation. The authors discussed using additional points, both forward and backward, to determine better envelopes. They also performed a parametric study on the proposed improvement and showed significant improvement in the overall EMD computations. The authors noted that HHT is capable of differentiating between time-variant components from any given data. Their study also showed that HHT was able to distinguish between riding and carrier waves.
Huang and Wu [2008] reviewed applications of the Hilbert–Huang transformation emphasizing that the HHT theoretical basis is purely empirical, and noting that "one of the main drawbacks of EMD is mode mixing". They also outline outstanding open problems with HHT, which include: End effects of the EMD, Spline problems, Best IMF selection and uniqueness. Although the ensemble EMD (EEMD) may help mitigate the latter.

### End effect

End effect occurs at the beginning and end of the signal because there is no point before the first data point and after the last data point to be considered together. However, in most cases, these endpoints are not the extreme value of the signal. Therefore, when doing the EMD process of the HHT, the extreme envelope will diverge at the endpoints and cause significant errors.
This error distorts the IMF waveform at its endpoints. Furthermore, the error in the decomposition result accumulates through each repetition of the sifting process. When computing the instantaneous frequency and amplitude of IMFs, Fast Fourier Transform (FFT) result may cause Gibbs phenomenon and frequency leakage, leading to information loss.
Here are several methods are proposed to solve the end effect in HHT:

#### 1. Characteristic wave extending method

This method leverages the inherent variation trend of the signal to extend itself, resulting in extensions that closely resemble the characteristics of the original data.
* Waveform matching extension :
    This extension is based on the assumption that similar waveforms repeat themselves within the signal. Therefore, a triangular waveform best matching the signal's boundary is identified within the signal's waveform. Local values within the signal's boundary can then be predicted based on the corresponding local values of the triangular waveform.
* Mirror extending method:
    Many signals exhibit internal repetition patterns. Leveraging this characteristic, the mirror extension method appends mirrored copies of the original signal to its ends. This simple and efficient approach significantly improves the accuracy of Intrinsic Mode Functions (IMFs) for periodic signals. However, it is not suitable for non-periodic signals and can introduce side effects. Several alternative strategies have been proposed to address these limitations

#### 2. Data extending method

design and compute some needed parameters from the original signal for building a particular mathematical model. After that, the model predicts the trend of the two endpoints.
* Support vector regression machine (SVRM) prediction :
    This method utilizes machine learning techniques to tackle the end effect in HHT. Its advantages are adaptive, flexible, highly accurate, and effective for both periodic and non-periodic signals. Although computational complexity can be a concern, disregarding this factor reveals SVRM as a robust and effective solution for mitigating the end effect in HHT.
* Autoregressive (AR) model :
    By formulating the input-output relationship as linear equations with time-varying coefficients, AR modeling enables statistical prediction of the missing values at the signal's endpoints. This method requires minimal computational resources and proves particularly effective for analyzing stationary signals. However, its accuracy diminishes for non-stationary signals, and the selection of an appropriate model order can significantly impact its effectiveness.
* Neural network prediction:
    Leveraging the power of neural network learning, these methods offer a versatile and robust approach to mitigating the end effect in HHT. Various network architectures, including RBF-NN and GRNN , have emerged, demonstrating their ability to capture complex relationships within the signal and learn from large datasets.

### Mode mixing problem

Mode mixing problem happens during the EMD process. A straightforward implementation of the sifting procedure produces mode mixing due to IMF mode rectification. Specific signals may not be separated into the same IMFs every time. This problem makes it hard to implement feature extraction, model training, and pattern recognition since the feature is no longer fixed in one labeling index. Mode mixing problem can be avoided by including an intermittence test during the HHT process.

#### Masking Method

Source:
The masking method improves EMD by allowing for the separation of similar frequency components through the following steps:
* Construction of masking signal:
    Construct masking signal $s(n)$ from the frequency information of the original data, $x(n)$. This masking signal is designed to prevent lower-frequency components from IMFs obtained through EMD.
* Perform EMD with masking signal:
    EMD is again performed on the modified signal x+(n) = x(n) + s(n) to obtain the IMF z+(n), and similarly, on x-(n) = x(n) - s(n) to obtain the IMF z-(n). The IMF is then defined as z(n) = (z+(n) + z-(n))/2 .
* Separation of Components:
    By appropriately choosing the masking signal frequency, components with similar frequencies can be separated. The masking signal prevents mode mixing, allowing EMD to distinguish between closely spaced frequency components.
* Error Minimization:
    The choice of parameters for the masking signal, such as amplitude, will affect the performance of the algorithm.
The optimal choice of amplitude depends on the frequencies Overall, the masking method enhances EMD by providing a means to prevent mode mixing, improving the accuracy and applicability of EMD in signal analysis

#### Ensemble empirical mode decomposition (EEMD)

Source:
EEMD adds finite amplitude white noise to the original signal. After that, decompose the signal into IMFs using EMD. The processing steps of EEMD are developed as follows:
* Add finite amplitude white noise to the original signal.
* Decompose the noisy signal into IMFs using EMD.
* Repeat steps 1 and 2 multiple times to create an ensemble of IMFs.
* Calculate the mean of each IMF across the ensemble to obtain the final IMF components.
The effects of the decomposition using the EEMD are that the added white noise series cancel each other(or fill all the scale space uniformly). The noise also enables the EMD method to be a truly dyadic filter bank for any data, which means that a signal of a similar scale in a noisy data set could be contained in one IMF component, significantly reducing the chance of mode mixing. This approach preserves the physical uniqueness of decomposition and represents a major improvement over the EMD method.

## Comparison with other transforms

| Transform | Fourier | Wavelet | Hilbert |
| Basis | a priori | a priori | adaptive |
| Frequency | convolution: global, uncertainty | convolution: regional, uncertainty | differentiation: local, certainty |
| Presentation | energy-frequency | energy-time-frequency | energy-time-frequency |
| Nonlinear | no | no | yes |
| Non-stationary | no | yes | yes |
| Feature Extraction | no | discrete: no, continuous: yes | yes |
| Theoretical Base | theory complete | theory complete | empirical |