MATLAB Code of fetal ECG extraction using wavelet analysis

(3 customer reviews)



reference paper :

Wu, Shuicai, et al. “Research of fetal ECG extraction using wavelet analysis and adaptive filtering.” Computers in biology and medicine 43.10 (2013): 1622-1627.


ََabstract :

Extracting clean fetal electrocardiogram (ECG) signals is very important in fetal monitoring. In this paper, we proposed a new method for fetal ECG extraction based on wavelet analysis, the least mean square  (LMS) adaptive filtering algorithm, and the spatially selective noise filtration (SSNF) algorithm.
First, abdominal signals and thoracic signals were processed by a stationary wavelet transform (SWT), and the wavelet coefficients at each scale were obtained. For each scale, the detail coefficients were processed by the LMS algorithm. The coefficient of the abdominal signal was taken as the original input of the LMS adaptive filtering system, and the coefficient of the thoracic signal as the reference input. Then, correlations of the processed wavelet coefficients were computed. The threshold was set and noise components were removed with the SSNF algorithm. Finally, the processed wavelet coefficients were reconstructed by inverse SWT to obtain fetal ECG. Twenty cases of simulated data and 12 cases of clinical data were used. Experimental results showed that the proposed method outperforms the LMS algorithm:
(1) it shows improvement in case of superposition R-peaks of fetal ECG and maternal ECG; (2) noise disturbance is eliminated by incorporating the SSNF algorithm and the extracted waveform is more stable; and (3) the performance is proven quantitatively by SNR calculation. The results indicated that the proposed algorithm can be used for extracting fetal ECG from abdominal signals.


Fetal electrocardiogram (ECG) waveform analysis is performed with the measurement of electrical activity from the fetal heart and has developed over the last 3 decades. It provides information about the physiological state of the fetus that can help clinicians to make appropriate and timely decisions during labor. Fetal pathological characteristics can be detected by analysis of ECG waveform during the pregnancy period, and fetus mortality rate can be greatly reduced [1]. Besides, compared with heart sound and heartbeat, ECG varies more quickly and sensitively to the abnormality. Therefore, extraction of clean fetal ECG has vital significance for fetal monitoring [2].
Fetal ECG is generally extracted from maternal abdominal signals in the clinic (hereafter, we use “abdominal” for “maternal abdominal”, and “thoracic” for “maternal thoracic”). However, fetal ECG signals are faint and mixed with several other sources of disturbance [3]. In addition to maternal muscular noise and power line disturbance, the strongest disturbance is maternal ECG which is 5 to 10 times stronger than fetal ECG. Furthermore, much of fetal ECG coincides with maternal ECG both in the time domain and frequency domain. Consequently, extracting fetal ECG from the cutaneous potential recording of a pregnant woman is a very challenging task.

3 reviews for MATLAB Code of fetal ECG extraction using wavelet analysis

  1. blank


    Very good and useful

  2. blank


    Great project. Just what I wanted.

  3. blank


    Is the code explained in-depth? What’s the difficulty level?

    • blank

      global MATLAB

      Thank you for your comment
      There is a paper in the folder of this code.
      It explains the algorithm in detail.

      This code is not difficult. It depends on your experience in programming.


Add a review