ECG Signal Denoising with EEMD and Genetic Algorithms

GA Genetic Algorithm EEMD Signal Denoising

Project Description

The provided materials detail a methodology and software implementation for filtering noise from Electrocardiogram (ECG) signals. The process is built around the following automated pipeline:

Fig 1: Diagram detailing the whole architecture in italian (since the thesis is in italian)

Fig 1: Diagram detailing the whole architecture in italian (since the thesis is in italian)

  • Signal Decomposition: The noisy ECG signal is decomposed into several Intrinsic Mode Functions (IMFs) that represent different frequency bands of the signal, utilizing either Empirical Mode Decomposition (EMD) or Complete Ensemble EMD (CEEMDAN).
  • IMF Partitioning: The resulting IMFs are divided into two groups: one dominated by useful signal information and one dominated by noise. This separation is achieved by comparing their probability density functions using the Kullback-Leibler divergence.
  • Adaptive Thresholding: A Genetic Algorithm (GA) is used to optimize the parameters for thresholding the noise-dominant IMFs. The algorithm iteratively evaluates candidate thresholding solutions by aiming to maximize the Signal-to-Noise Ratio (SNR) improvement.
  • Signal Reconstruction: Finally, the filtered, noise-reduced IMFs are added back to the original signal-dominant IMFs to reconstruct the clean ECG signal.

The provided Python codebase implements this complete procedure within a SignalCleaner class, seamlessly executing all the above steps sequentially through a main run() method.

Some results

Fig 2: Mean Square Error

Fig 2: Mean Square Error

$$\text{MSE} = \frac{1}{N} \sum_{t=1}^N (\tilde{y}(t)-y(t))^2$$

Fig 3: Percent Root Mean Square Difference

Fig 3: Percent Root Mean Square Difference

$$\text{PRD} = 100\sqrt{\frac{\sum_{t=1}^N (\tilde{y}(t)-y(t))^2 }{\sum_{t=1}^N y^2(t)}}$$

Fig 4: Maximum Absolute Error

Fig 4: Maximum Absolute Error

$$\text{MAE} = \max{|y(t)-\tilde{y}(t)|} $$

Fig 5: Signal to Noise Ratio Improvement

Fig 5: Signal to Noise Ratio Improvement

$$Obj(C,\beta,\rho) = SNR_{imp} = 10\log_{10}\left(\frac{\sum_{t=1}^N(x(t)-y(t))^2 }{ \sum_{t=1}^N(\tilde{y}(t,C,\beta,\rho)-y(t))^2 }\right)$$

Other references

For more details refer to the GitHub repository