https://github.com/kulia/hilbert-huang-transform
Implementation of Hilbert-Huang Transform software for matlab.
https://github.com/kulia/hilbert-huang-transform
Last synced: 5 months ago
JSON representation
Implementation of Hilbert-Huang Transform software for matlab.
- Host: GitHub
- URL: https://github.com/kulia/hilbert-huang-transform
- Owner: kulia
- Created: 2016-12-01T11:58:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-10-03T16:54:03.000Z (almost 8 years ago)
- Last Synced: 2025-10-11T01:15:28.558Z (10 months ago)
- Language: Matlab
- Homepage:
- Size: 341 KB
- Stars: 31
- Watchers: 8
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hilbert-Huang transform
A light version of the Hilbert-Huang Transform for Matlab. This version uses the Normalized Hilbert Transform to define and calculate the amplitude and phase.
## How to use this software?
There are two essential functions to the hht code. It is the `emd(·)` and the `hilbertSpectrum(·)`. The `emd(·)` function decomposes a one-dimensional array down to the fewest monocomponents *c**i*(*t*) and one monotonic function *r*(*t*) that is needed to describe it.
## Example
Lets considering the equation
*v(t)* = sin(*ω0 t*) + 0.5 cos(*ω1 t*2)
It is shown in the figure below

### Empirical Mode Decomposition
As shown in the example code, we can decompose the voltage waveform *v(t)* using
```c
[intrinsicModeFunctions, res] = emd(voltageWaveform);
```
This will decompose the voltage waveform _v(t)_ down to two intrinsic mode functions (IMFs) and a residue so that
_v(t)_ = Σ_ci(t)_ + _r(t)_
where _ci(t)_ is IMF number _i_ and _r(t)_ is the residue. The IMFs and residue of the example waveform are shown in the figure below.

### Hilbert Spectrum
The IMFs can be visualized using a Hilbert Spectrum. In the Hilbert Spectrum shows the instantaneous frequency _f(t)_ the frequency components power (amplitude squared) as a function of time. To use the Hilbert Spectrum function write
```c
medianFilterLength = 0.02 * samplingFrequency;
hilbertSpectrum(intrinsicModeFunctions, samplingFrequency, medianFilterLength)
```
where the `medianFilterLength` is the length of a median filter used to remove artifacts. In this example, the filter length is 2 % of the sampling rate. The figure below shows the Hilbert Spectrum of the example waveform _v(t)_.

# TODO:
- [ ] Argument for fixed EMD
- [ ] Ensure that residue output is correct