Empirical Mode Decomposition animation
Version 2.0 (9.81 KB) by
Mohammad Mahdi Abedi
It illustrates the process of EMD
This MATLAB script provides a step-by-step, animated visualization of the Empirical Mode Decomposition (EMD) algorithm. It is designed as an educational tool to help intuitively understand the "sifting" process, see how Intrinsic Mode Functions (IMFs) are extracted in real-time, and learn how to filter signals by reconstructing them without specific IMFs.
EMD is a powerful, fully data-driven signal processing technique designed to analyze non-linear and non-stationary signals.
How Does the Algorithm Work? To extract an IMF, the algorithm uses an iterative procedure known as sifting. This code animates the following steps:
- Identify Max and Min: Finds all local maxima and local minima in the current signal.
- Create Envelopes: Connects the maxima to create an upper envelope, and the minima to create a lower envelope using cubic spline interpolation.
- Calculate the Mean: Calculates the average line between the upper and lower envelopes.
- Subtract: Subtracts this mean from the signal to isolate the higher-frequency oscillations.
The sifting process loops repeatedly on the same component. To prevent over-sifting (which turns meaningful signals into meaningless noise), the algorithm needs a rule to know when to stop and finalize the current IMF.
This code implements a Standard Deviation (SD) stopping criterion. After every single sifting iteration, the code calculates the normalized squared difference (Standard Deviation) between the signal before the sifting step and the signal after the sifting step. Once the SD drops below a defined threshold (default set to 0.3), it means the signal has stabilized into a true IMF. The sifting stops, the IMF is saved, and the algorithm moves on to extract the next IMF from the remaining data.
Cite As
Mohammad Mahdi Abedi (2026). Empirical Mode Decomposition animation (https://uk.mathworks.com/matlabcentral/fileexchange/55448-empirical-mode-decomposition-animation), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2015a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Graphics > 2-D and 3-D Plots > Animation >
Find more on Animation in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
