Keywords

1 Introduction

The simplicity of ECG waves is what makes them easy to comprehend and understand when compared to other wave signals. From an ordinary heart check-up to the detection of an arrhythmia we need to use the ECG [1]. The disturbance in an ECG due to various noise can cause the wrong diagnosis due to bereavement of information. Some problems that arise in ECG signal measurement are due to noise such as baseline wandering which is also usually accompanied by high-frequency noise components. Baseline wandering can arise due to respiration and sweat that affects the parameters of the electrode such as impedance. High-frequency noise components are caused by movement of the body during the procedure.

Welfare of the fetus is the prime concern in pregnancy. Though the fetal mortality rate [2] has decreased in developed countries, it is still a grave issue in developing and underdeveloped nations. Genetic diseases always pose a large looming threat on the fetus. Congenital malformations, membrane complications, malaria, and pre-eclampsia are some of the disease responsible for fetal deaths. In a study in England and Wales in the year 2007, it was found that congenital anomalies are the second highest cause of infant deaths [3]. Bradycardia [4] has led to the invention of the micropacemaker [5] which when used in a fetus helps forestall the need for exigent removal from its womb in case of any medical emergency.

There are many ways to monitor the fetus using techniques like ultrasound which is based on the usage of sensors. Non-stress test and contraction stress test are also other ways of externally monitoring the state of the fetus. Presumptuous methods like abdECG also help in relatively accurate measurement. Fetal ECG (fECG) is obtained using electrodes which are planted on the head of the fetus. Such a prying procedure is very cumbersome and invasive, which calls for the requisite for procedures that are non-invasive. Observation of the fECG can help in having an insight of ailments and anomalies that could be present in the fetus. One of the latest developments is the use of Raspberry Pi microcontroller to monitor fECG [6]. There is various noise usually present in the ECG that can arise from various sources such as interference of the power line, noise due to contact established between electrodes, electrosurgical noise, instrumentation noise and electromyography (EMG) noise that occurs due to muscle movement in the vicinity of the heart. Since the fetus is present near the abdomen, there is the possibility of much clamor that can occur due to the position and movement of the fetus. The abdomen is in an anterior part of the body which contains important organs like stomach and liver.

The abdominal muscles present abet in the process of breathing as adjunct support. During this process, there is disturbance because of the process of respiration as there is the movement of abdominal muscles present near the electrode. This neighboring signal gets acquired as a part of the reading and is more prominent when compared to the actual signal obtained from the abdomen. The noise created due to these such as high-frequency noise components due to muscle movement and the wandering of the baseline have to be addressed. Electromyography noise arises due to muscle movement that can affect the changes in fECG especially if it occurs adjacent to the heart of the fetus. These noises are inevitable and induce fallacious results. Wandering of the baseline can occur due to improper placement of electrodes and this results in the ECG wave wandering above and below the reference due to variation in amplitude. Some of these disturbances cause the signal to get lost amidst these undesirable perturbations. These problems need to be adhered to as the welfare of the fetus depends on it amidst pregnancy. This demands for elementary methods to deal with it. The paper has been fabricated in the following order: Sect. 2 provides an accord about the literature survey that gives requisite background information. This is followed by Sect. 3 which presents the method with which the problem had been approached. This is followed by Sect. 4 gives a discourse about the results achieved through the Windowed Zero Mean (WZM) method applied in this paper. The Sect. 5 gives the conclusion inferred from this method.

2 Literature Review

For a fetus, especially, the ECG signal is taken from the abdomen of the mother and as seen previously there is a lot of disturbance because of noise and this can lead to a misdiagnosis. The primary reason for this is that the ECG signal masquerades as noise in certain parts of the signal and only upon close observation it is realized that it is not noise but rather indispensable information that is being lost. The usage of such vital information can aid in augmenting the process of diagnosis. Extraction of respiration signal from ECG signal (EDR) is carried out using methods like single lead ECG [7] where EDR is estimated by cubic-spline interpolation; conductive textile electrodes which use the concept of instantaneous frequency estimation [8].

Removal of noise from Surface respiratory EMG signal is also effectuated using methods such as lean mean square widrow adaptive structure [9], butterworth filtering [10] and adaptive filtering [11]. The Heart Rate Variability method is proposed as a more accurate method when using the single lead ECG [7] whereas the conductive textile electrode [8] method indicates a closer alternation with the actual respiration signal. The lean mean square widrow adaptive structure [9] removes noise without the need for additional electrodes. In butterworth filtering method [10], the noise due to the electrode is nullified using a butterworth filter of corner frequency 20 Hz. Recursive least squares algorithm is used in the adaptive filtering method [11] to eliminate Power Line Interference and ECG noise. An EDR extracted signal accommodates plenty of noise and needs to undergo pre-processing in order to obtain a clean ECG. This incites the requisite for unsophisticated methods that need to be devised in order to deal with it. Some of the acclaimed methods that had been used to address this problem of the ECG until now are Empirical Mode Decomposition (EMD) [12] based on Hilbert-Huang transform [13], linear phase filtering [14], moving average filter [15] and discrete wavelet transform [16]. EMD [12] which is based on Huang transform [13] relies purely on data which might be a disadvantage in certain cases where the data alone will not suffice. Summation of Intrinsic mode functions is generated upon decomposition of the EMD [12] which is the motive of the EMD [12] method.

Linear phase filtering method [14] primarily focuses on reduction in the number of computations needed to achieve de-noising of signal and elimination of baseline wandering. This, however, can cause signal distortion as there will be delay variation created due to the propagation of the signal through devices which may lead to deprivation of crucial information. The moving average filter [15] is applied to the ECG and is smoothened using polynomial curve fitting. However, this requires pre-processing which might not be suitable for all cases. Discrete Wavelet Transform [16] is used to choose wavelets and the depth to attain the level of decomposition is also decided. Following this, the wavelet is shrunk using Empirical Bayes posterior median. The problem with a wavelet-based approach is that the accuracy of this method will not suffice and lead to bereavement of information. While all these methods are used to deal with ECG, none of them indicate a method to expel noise in a fECG. The Windowed Zero Mean (WZM) method proposed has ensured that there is no loss of information and uses a relatively lucid approach. Using MATLAB, this method ensures smooth de-noising and reinstatement of the original fECG signal without any compromise on the original signal.

3 Methodology

The current method is used to address the issues stated above such as Electromyography noise and baseline wandering. The procedure on how the method is ingrained is stated in the block diagram present below (Fig. 1). An abdECG signal which consists of N values from x(1) to x(N) is considered as input to the segmentation stage of the block diagram. In the first stage, the signal is segmented and segregated into different windows. The segmented signal comprises of N windows with each window of length n1. So, taking the first window, elements of the signal from x(1) to x(n1) are denoted as W1; the second window, elements of the signal from x(n1 + 1) to x(2 * n1 + 1) are denoted as W2; and so on until the Nth window where elements from x(k * n1 + 1) to x(N) are present. Then, zero mean of each segmented window on using the formula given below is taken to deprive the signal of the undesired deviation of baseline.

Fig. 1.
figure 1

Block diagram of Windowed Zero Mean Method

$$ {\text{X}}\left( {\text{k}} \right) = {\text{W}}\left( {\text{k}} \right) - {\text{mean}}\left( {{\text{W}}_{\text{k}} \left( : \right)} \right) $$
(1)

Here, X(k) [where k is an arbitrary number] is the zero mean value obtained for a window Wk and W(k) is an element in the window. The same is to be done for all the windows before concatenation. The signals after application of zero mean are identified and grouped accordingly from X(1) to X(N). Concatenation of all these segmented windows gives the resultant signal. In the post-processing stage, the signal with elements from X(1) to X(N) is passed through a bandpass filter with lower cut-off frequency 0.5 Hz and higher cut-off frequency 20 Hz to remove the high-frequency noise components. The output signal, X2, now obtained, consists of elements that are free from baseline wandering and high-frequency noise components.

3.1 Pseudo Code

figure a

The database used for testing abdominal and fetal ECG’s is obtained from Physiobank ATM [17, 18]. In the sample signal used, it is observed that the problem of baseline wandering and high-frequency noise constituents are significant and alter the details of the ECG, so it is proven that it is a favored signal to be tried and tested. The analysis of the first signal from the database is depicted. The first lead of the signal is seen in Fig. 2. It has a sampling frequency of 1000 Hz and the amplitude is measured in microvolts.

Fig. 2.
figure 2

abdECG with BW and respiration noise

It is indicated that there are baseline wandering and high-frequency noise components in the signal. Figure 3 depicts a closer view of the signal at that point.

Fig. 3.
figure 3

Narrower view of abdECG indicating BW and respiration noise

In the first stage, the window size that is to be used is contemplated. In an adult, it had been observed that the average time taken to inhale and exhale followed by an involuntary pause is from 4 to 6 s and the number of breaths taken had been around 12–20 per minute [19]. The intake of oxygen during pregnancy that usually increases does not affect the respiration rate. Therefore it is seen that taking a sampling frequency of 1000 Hz construes the use of a large window size such as 1000. This, however, leads to erroneous results as shown in Fig. 4. It is observed that though the signal has undergone zero means, the acclimatized amplitude is still elevated and does not exhibit removal of baseline wander. Similarly, when a very small window size like 10 is used, the inherent original signal is lost and time for execution also is higher.

Fig. 4.
figure 4

Windowed Zero Mean (WZM) Signal with window size = 1000

This advocates the use of a smaller window size like 36 which yields finer results as the baseline wandering had been removed as denoted in Fig. 5.

Fig. 5.
figure 5

Windowed Zero Mean (WZM) Signal with window size = 36

The signal is then segmented into different sets of samples based on the window size chosen. The next stage comprises of application of zero mean in each window of the signal that is segmented. This methodology is used as it ensures localized modification of the signal; most biomedical signals have localized respiration noise as observed above. This leads to the exclusion of baseline wandering. Figure 5 indicates the elimination of baseline wandering obtained using the Windowed Zero Mean (WZM) method discussed in this paper.

A bandpass filter [20] is designed using a FIR filter which secures the input cutoff frequencies. The cutoff frequency used for the bandpass here is in the spectrum of 0.5 Hz to 20 Hz. This ensures eradication of the high-frequency noise components present in the signal. Figure 6 displays the result obtained in the spectrum analyzed.

Fig. 6.
figure 6

Windowed Zero Mean (WZM) Signal after passing through bandpass filter

The final signal after application of WZM method and band pass filter [20] is depicted in Fig. 7. It is noted that there is a drastic change in the signal when compared to the original one in Fig. 2.

Fig. 7.
figure 7

BW and respiration noise removed abdECG after application of WZM method

Thus, it had been ensured that the elimination of the problems such as baseline wandering and high frequency noise component above was achieved. Now the fECG signal is relatively complemented of such disturbances that can lead to misdiagnosis.

4 Results and Discussion

The Physiobank [17, 18] database used is a renowned database for the disparity in the different types of signals that it possesses. The work on abdomen ECG and validation of result had been done with the help of direct abdECG. The data had been formulated from the signal measured from the abdomen and indicates the problem of baseline wandering and electromyography noise. The data analyzed consists of signals that have a duration of 5 min, a sampling frequency of 1000 Hz and amplitude in microvolts. There are five sets of readings in total with each reading comprising of 5 signal channels out of which the first one in each reading is a directly measured signal from the scalp of the fetus.

On inspection, it had been observed that the range of values for the window size is from 34 to 42. While it could be the sampling frequency of the abdECG signals, the window size for each signal for effective elimination of baseline wander had been individually explored and the same had been tabulated in Table 1.

Table 1. Results of signal channels analyzed

Table 1 shows the signals tested from the database and their corresponding results which showcase the elimination of the wandering baseline and removal of the high-frequency noise component in a tabulated form.

Some of the cases with anomalies are in case of the fifth signal channel of R08 recording and the first signal channel of R10 recording (which have been marked) where there is irregular variation after application of the windowed zero mean method.

On analysis of the former, it is noted that there is an abrupt peak as denoted in Fig. 8.

Fig. 8.
figure 8

Original R08 recording Fifth abdECG signal

While it is seen that the ECG signal had been adjusted in Fig. 9 using the WZM method, it had also been observed that it had not been removed entirely; the amplitude, however, had been adjusted, making sure the original state of the ECG signal is not lost.

Fig. 9.
figure 9

BW and respiration noise removed R08 recording Fifth abdECG Signal

The second case is the first signal channel of the R10 recording where there is an uneven distribution of the signals as denoted in Fig. 10.

Fig. 10.
figure 10

Original R10 recording First abdECG Signal

While it is noted that that recovery of the signal had been done, there had also been a loss of signal in the filtered signal as shown in Fig. 11 upon application of zero mean.

Fig. 11.
figure 11

BW and respiration noise removed R10 recording First abdECG Signal

Hence, it had been discerned that there had been the removal of baseline wandering and high-frequency noise component using the WZM method proposed in this paper.

It is also noted that this method using MATLAB is relatively facile as opposed to other methods as it’s time of execution is 3.26 s on an average. The execution time-signal duration ratio is 0.010867. Clinical trials and usage of databases such as MIT-BIH Arrhythmia database can be used for further validation in the future.

5 Conclusion

The high-frequency noise component had been expelled and the problem of baseline wandering had also been addressed. The Windowed Zero Mean method is a much simpler method as opposed to other methods as it does not require a substantial amount of time. Thus, it is a very efficient method as had been proven by assessing the physiobank database. Real-time fECG signals, other signals from the abdomen or parts of the body where such disturbances arise when a recording is taken, as well as other databases can also be used to assess this method. This can help in decipherment and recovery of the ECG signal that is lost as noise. This will aid in the process of fECG measurement for a fetus which can result in proper diagnosis thereby leading to the gratifying welfare of the fetus.

Conflict of interest

The authors disclose that there is no conflict of interest present.