Effectiveness Of The Developed Extracting Algorithm Biology Essay

Published:

INTRODUCTION

This chapter describes the effectiveness of the developed extracting algorithm and detecting algorithm described in Chapters III and IV. For this purpose, real recorded data from the maternal abdominal skin of healthy pregnant women (36, 37 and 38 weeks of gestation), most of which are corrupted with different levels of noises have been used to test these two new algorithms. The success of the proposed algorithm is crucial to both extract the FECG signal and detect the FHR as well as the MHR in real time when using the g-tec bio-amplifier directly from volunteer pregnant women.

These algorithms are first tested using Matlab 7.4 (Matlab script) and then implemented under Matlab and simulink (Mathworks Inc.). After implementing the algorithms using Matlab 7.4, FECG extraction has been examined with 30 real recorded data and MHR detection has been examined with 20 real recorded data. For the possibility of real-time detection, the algorithms are implemented under Matlab®/Simulink® and simulated for FECG extraction using 20 real recorded data each of 5 seconds duration. FHR detection has been examined as well with 30 real recorded data each of 1 minute duration (described in Section 4.3). Ten of these estimated FECG signals are used to calculate the FHR in order to compare the results with estimated FHR obtained via ultrasound M mode and ICA (Najafabadi 2008). Finally, the FHR detection system is tested in real-time. All the clinical recorded data are explained in Section 3.7.1. All these tests and results are explained in detail in the following sections.

OFF-LINE PROCESSING USING MATLAB 7.4

Lady using a tablet
Lady using a tablet

Professional

Essay Writers

Lady Using Tablet

Get your grade
or your money back

using our Essay Writing Service!

Essay Writing Service

The results presented in this section are obtained by off-line processing the algorithms implemented using Matlab 7.4. All data used are real recorded data which were acquired using three leads from healthy pregnant volunteers in the Medical Center at University Kebangsaan Malaysia (PPUKM). The data are preprocessed, and examples of the three lead recorded data before and after the preprocessing stage are illustrated in Figures 5.1 and 5.2 respectively.

Figure 5. 1 Sample of the 3-lead recorded data before preprocessing

An example of the acquired signals (X1,X2 and X3) from the pregnant abdomen is illustrated in Figure 5.1, as the input of the system, which consists of 3 signals. The first signal (X1) in Figures 5.1(a) is acquired from the upper part from the abdomen (mother signal only) using lead P1. The other signals(X2 and X3) in Figures 5.1(b) and (c) are acquired from the abdomen of the pregnant woman (AECG) using lead P3 and P4 (refer to Figure 3.3), these signals are consist of the MECG mixed with the FECG. Preprocessing stage consists of the removal of the DC signal, baseline wander and the power line interference attenuation should be executed in order to feed these signals to the next stages. Hence these signals are preprocessed and the resulted signals (Y1,Y2 and Y3) are shown in Figures 5.2. Preprocessed signal Y1 is used as a reference for the ANC to extract the FECG, Y2 and Y3 are used as desired signal for the ANC (refer to Figure 4.9).

Figure 5. 2 The recorded signals after preprocessing

Comparison of ANC with ICA

In order to detect the fetal peaks from the AECG signal the FECG signal should be separated, by the extraction algorithm. This algorithm using ANC (described in Chapter IV) is validated using 30 recorded data each of five seconds and compared with the algorithm implementing independent component analysis (ICA).

In this comparison the same preprocessing stage and the same postprocessing stage are applied for the ANC and ICA, where the postprocessing stage consists of the window signal created by MQRSW for removing the maternal residual peaks and 1Hz IIR notch filter. The performances of the algorithms are then evaluated based on their sensitivities and positive predictivities (ANSI/AAMI EC57: 1998) of peak detection in the extracted signal, which will be shown in Table 5.1. Figures 5.3 and 5.4 shows examples of the extracted signals from the same portion of an abdominal signal using ICA and ANC respectively.

Figure 5.3 (a) shows that fetal extracted signal by ICA, is still corrupted with noise. Hence the window signal created by MQRSW in Figure 5.3 (b) is applied for removing the maternal residual peaks followed by 1Hz IIR notch filter. Then the extracted fetal signal after postprocessing stage is shown in Figure 5.3 (c).

Lady using a tablet
Lady using a tablet

Comprehensive

Writing Services

Lady Using Tablet

Plagiarism-free
Always on Time

Marked to Standard

Order Now

Figure 5. 3 (a) Extracted FECG using ICA; (b) window signal, (c) FECG signal after applying removal window signal and 1Hz notch filter

Figure 5.4(a) shows the fetal extracted signal by ANC, where the maternal residual peaks are still among the fetal peaks, hence the same postprocessing stage applied to the ICA is applied also to the ANC. Finally, the extracted fetal signal is shown in Figure 5.4 (c).

In this comparison, the same signal is fed simultaneously to the two algorithms for extracting the FECG signal. These extracted signals are corrupted with different levels of noise as shown in Figures 5.3(a) and 5.4(a). The extracted signal by ICA has higher level of noise than that extracted by ANC. In signals with high level of noise the ANC is more robust in extracting the signal rather than ICA. This comparison also shows the effect of the postprocessing stage as an enhancement technique for attenuating the unwanted components in the FECG signal, as shown in Figures 5.3(c) and 5.4 (c).

Figure 5. 4 (a) Extracted FECG using ANC, (b) window signal and (c) FECG signal after applying removal window signal and 1Hz notch filter

The ANC and ICA methods are evaluated in term of peak detection, using sensitivity and positive predictivity of the fetal peak detection. Table 5.1 shows the performance using ICA and ANC based methods up to the fetal signal extraction stage.

Table 5. 1 Performance of ICA and ANC based methods

Weeks

No. of Signals

ANC method

ICA method

(%)

(%)

(%)

(%)

35

2

79.0(%)

54.5(%)

66.6(%)

48.8(%)

36

13

88.4(%)

77.8(%)

74.8(%)

72.2(%)

37

6

91.1(%)

68.9(%)

79.9(%)

70.1(%)

38

9

84.8(%)

69.6(%)

76.4(%)

65.4(%)

Overall average

87.23(%)

72.09 (%)

75.75(%)

68.18 (%)

The results for FECG extraction from 30 signals are illustrated in Table 5.1, which were acquired from pregnant women (range between 36 to 38 weeks of gestation). The average sensitivity of the ANC based method is 87.23% as compared to 75.75% of the ICA based method. The average positive predictivity of the ANC based method is 72.09% as compared with that of the ICA based method which is 68.18%. It shows that the ANC based method was more successful in detecting the FHR than ICA.

Extraction with scaling window

Figure 5.3 (c) and Figure 5.4 (c) shows the fetal extracted signal by ICA and ANC, where the window signal created by MQRSW is used for removing the maternal residual peaks followed by 1Hz IIR notch filter. In order to demonstrate the other ability of using the window signal for scaling down the maternal residual peaks, other tow examples of fetal signal each of 10 second duration are shown in Figure 5.5 (b) and Figure 5.6 (b), which are extracted by ICA and ANC respectively. The window signal is applied for scaling down the maternal residual peaks by multiplying them by 0.1 this is followed by 1Hz IIR notch filter. This ability can be used to avoid cutting the overlapped peak in order to detect the fetal peak later. This is one of the advantages of this enhancement technique, where the performance of the algorithm will be better.

Figure 5. 5 (a) Extracted FECG using ICA; (b) FECG signal after applying scaling down window signal of MQRSW

Figure 5. 6 (a) Extracted FECG using ANC; (b) FECG signal after applying

scaling down window signal of MQRSW

Maternal Peak Detection Testing

The accuracy of the algorithm to detect the maternal peak was tested by applying it to 20 recorded signals each of one minute long. Examples of the peak detection are illustrated in Figures 5.7 and 5.8, where the algorithm is applied to the signals without using amplitude threshold. The signals show that all the local maxima (circles) and minima (stars) in the signals are detected. The maxima are the maternal peaks.

Figure 5. 7 Detected peaks in AECG signals-1

Figure 5. 8 Detected peaks in AECG signals-2

Table 5.2 summarizes the performance of the detection scheme on the 20 recorded AECG signals (Appendix H). The average Sensitivity () of the algorithm is 99.05 % and its Positive Predictivity () is 99. 79%. There is a lot of noise especially in two of the signals which lead to difficulties in detecting some maternal R peaks.

Table 5. 2 Algorithm performance for maternal R peak detection

Lady using a tablet
Lady using a tablet

This Essay is

a Student's Work

Lady Using Tablet

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

Examples of our work

Weeks of gestation

No. of Signals

ANC method

(%)

(%)

36

4

99.25(%)

100(%)

37

5

99.60(%)

100(%)

38

11

98.72(%)

99.63(%)

Overall average

99.05(%)

99.79 (%)

OFF-LINE PROCESSING using SIMULINK

In the previous section of this chapter, the algorithms were implemented using Matlab 7.4 in order to both ascertain the effectiveness of these developed algorithm and test or compare these algorithms using real recorded data. The final implementations of these algorithms were executed under Matlab®/Simulink® and their result are given in this section.

FECG Extraction

The effectiveness of the FECG extracting algorithm implemented using simulink was examined which was examined with 20 real recorded data each of five seconds duration. The normalized least mean square (NLMS) algorithm (described in Section 2.5.3), was utilized to extract the FECG signal from the AECG signal and compared with the proposed RLS algorithm. Figure 5.9 shows the complete implementation of both algorithms using the same preprocessing stage and the postprocessing stag. The performance of both algorithms was compared in terms of FHR detection as (described in Section 4.2.5). The performances of the algorithms were then evaluated based on their sensitivities and positive predictivities.

Figure 5. 9 FECG extraction using Simulink blocks of RLS & NLMS

Figures 5.10 (a), and 5.11(a) show tow examples of the input preprocessed AECG signals and tow outputs from each of the tow complete algorithms. The outputs in Figures 5.10(b) and (c) are nearly the same, but the output from the algorithm RLS appear to enhance the fetal signal better than the NLMS algorithm as shown in Figures 5.11(b) and (c).

Figure 5. 10 (a) AECG signal, (b) extracted signal by RLS (c) by NLMS of tow

outputs.

Figure 5. 11 (a) AECG signal, (b) extracted signal by RLS (c) by NLMS of tow

outputs.

The obtained results are summarized in Table 5.3. Average values of sensitivity () and positive prediction () of the RLS based method are 88.59% and 82.78%, respectively, compared to 80.44% and 72.09% of the NLMS based method.

Table 5. 3 Performance of RLS and NLMS based methods

Weeks

No. of Signals

RLS method

NLMS method

(%)

(%)

(%)

(%)

36

9

86.22(%)

82.94(%)

81.88(%)

72.94(%)

37

5

92.4(%)

78.8 (%)

74.9(%)

66.7(%)

38

6

89(%)

85.86 (%)

82.9(%)

75.33(%)

Overall average

88.59(%)

82.78 (%)

80.44(%)

72.09(%)

Fetal Peak Detection

The complete RLS algorithm as shown in Figure 5.9 for fetal peak detection is further tested on more data of longer duration. Thirty real recorded data each of 60 second duration are used. The algorithm performance is further improved by applying a peak position correction technique. The precision in the identification of QRS complex peaks is of great importance for calculating FHR. For this purpose, two conditions were used to evaluate the FHR peaks after FHR detection. These are:

The fetal detected peaks were compared with those fetal peaks in the preprocessed AECG signal. If the difference between the locations of the two peaks is two samples or less, the peak was assumed as true, otherwise false.

If it is difficult to compare with those fetal peaks in the preprocessed AECG signal, the fetal detected peaks could be compared with the fetal peaks in the extracted signal.

Figure 5.12 to 4.14 show the AECG signal and the detected peaks from the extracted fetal signal. The labels on the AECG or the fetal extracted signal waveform indicate the true or false peak locations as follows:

T - True detected fetal R peak.

FF - false detected fetal R peak.

OL - overlapped (fetal R peaks detected within the MQRS).

MS - missed fetal R peaks.

The fetal detected peaks (b) of Figure 5.12 were compared with the observed fetal peaks in the preprocessed AECG signal (a) of Figure 5.12 as suggested in condition (i). Most of these peaks are true detected (labeled with T). The false, missed and overlapped peaks are labeled with FF, MS and OL respectively. In Figure 5.12, FF is located at sample number 7, OL at 490 and MS at 1271.

Figure 5. 12 (a) Preprocessed AECG signal (b) detected fetal peaks from the extracted FECG signal

Figure 5. 13 (a) Preprocessed AECG signal (b) detected fetal peaks from the extracted FECG signal

Figure 5.12 replicate Figure 5.13 with some of the tested peak locations labeled in the preprocessed AECG. For example, the fetal peak at location 394 is considered true because it is within 2 samples of the detected peak in Figure 5.13(b) as required by condition (ii).

However, in some signals it is difficult to compare the fetal detected peaks, due to the absence of the fetal peaks in the pre-processed AECG signal. One case is illustrated in Figure 5.14 (c), as the fetal detected peaks are compared to the extracted signal by the ANC before applying postprocessing stage Figure 5.14 (b).

Figure 5. 14 (a) AECG signal; (b) observed fetal peaks in the Extracted signal by ANC, before postprocessing stage; (c) FECG signal after applying postprocessing stage

Figure 5.14 reflects the effectiveness of these developed algorithms, where the fetal signal cannot be observed in the AECG signal Figure 5.14 (a). The extraction algorithm was able to extract the FECG signal, using ANC as shown in Figure 5.14 (b), where the fetal peaks are marked. In Figure 5.14 (c) the signal is postprocessed and the fetal peaks are detected. These detected peaks are compared with the marked peaks in figure 5.14 (b) according the 5.3.2 (ii). Most of the detected peaks are true (T), one peak is false (FF) and one peak is overlapped (OL).

All the 30 signals used for FHR detection were processed according to the above- mentioned conditions as shown in Figures 5.12 to 5.14. The results of these detections are illustrated in Table 5. 4 after applying the peak position correction technique to correct the overlapped peak position described in Section 4.2.7. The overall average of the sensitivity result is 79.76% and the positive predectivity result is 77.49% (Appendix G).

Table 5. 4 Algorithm performance for fetal R peak detection

Weeks of gestation

No. of Signals

ANC method

(%)

(%)

36

12

83.28(%)

80.99(%)

37

8

84.30(%)

82.43(%)

38

10

71.90(%)

69.43(%)

Overall average

79.76(%)

77.49(%)

comparision of FHR with ultrasound measurment

In this section, the results obtained were compared with the previous work done in Najafabadi (2008) which compared the FHR detection using ultrasound with the ICA technique. The ultrasound M mode, which is used in that work to measure the FHR, was done once before each acquired signal so as to use it as a reference. Furthermore, the ICA used short portions of the signals so as to detect the FHR and to compare it with the measured values by ultrasound denoted by usm.

In order to compare the results of the present work on the same signals, the proposed algorithm to detect FHR is applied to the signals of 60 seconds duration. The average of the FHR of each signal was used in this comparison. In addition percentage of error was also calculated. The result is illustrated in Table 5.5.

Table 5. 5 Performance of peak detection algorithm with US and ICA

Signal

No.

Lead system protocols

Measured FHR by Ultrasound

usm

Estimated FHR by ICA algorithm

% Error

Estimated FHR by the proposed algorithm

% Error

36_1

36_2

36_3

F

156

130

138

141

156

133

--

0.0

2.3

--

143

148

146

1.4

4.9

3.5

37_1

37_2

37_3

F

139

128

133

133

138

128

--

0.7

0.0

--

136

132

135

2.3

0.8

1.5

37_1

37_2

37_3

37_4

G

130

139

128

133

133

--

138

128

132

--

0.7

0.0

0.7

135

132

134

138

1.5

0.7

0.7

3.8

The columns in Table 5.5 are described below:

Column one: subject info including pregnancy age in weeks.

Column two: lead system protocol, as desired in Najafabadi (2008).

Column three: the measured average FHR by ultrasound M mode before recording

Column four: the average of ultrasound measured values (usm) in Column 3.

Column five: the estimated FHR by the ICA method for successful detection cases,

Column six: the percentage error between estimated FHR by ICA method and ultrasound.

Column seven: the estimated FHR by the proposed algorithm for 60 seconds.

Column eight: the percentage error between estimated FHR by the proposed algorithm and usm.

(5.1)

As can be seen in the Table 5.5, the result of the estimated FHR by the proposed algorithm from 10 signals each of 60 seconds are compared to the ultrasound estimated FHR and to the ICA estimated FHR from small portion of each signal, the error percentage of the proposed algorithm is (0.7 to 4.9) compared to (0 to 2.3) of ICA. Our results can be compared with the error percentage of previous research, which used the FHR measured by ultrasound fetal monitoring (BIOSIS Co., LTD) as reference for the estimated FHR by the algorithm proposed by Ibrahimy, where the error percentage is (3.31 to 6.63). This comparison shows that the results of estimated FHR by the proposed algorithm, ICA and the algorithm proposed by Ibrahimy are similar.

Real-Time FHR Detection

With the implementation of the algorithms using Simulink blocks through the previous stages, real-time test on pregnant volunteers, using g-tec bio-amplifier connected to a personal computer is performed. For this purpose, three signals (channels) from their abdomen are acquired using three electrodes, a common and a ground, as shown in Figure 3.4.

The recordings were made at the home of the pregnant volunteers while the pregnant women are in supine position. The recording duration ranged between one to five minutes. Some examples of the recorded signals and heart rate traces with different levels of noise are illustrated in Figure 5.15 to 5.17. The heart rate traces of two minutes as in Figure 5.15 represent the MHR and FHR traces for a woman of 36 weeks of gestation. The MHR detection were successful in most cases. The FHR trace is found to be of useful quality except for small portions. The good quality is due to the consistent presence of large fetal signal which resulted from good extraction. The overall average of the sensitivity result is 84.95% and the positive predectivity result is 86.29% for fetal peak detection from the data of the pregnant woman (36 weeks) illustrated in Figure 5.15. The sensitivity result is 98,96% and the positive predectivity result is 99.25% for maternal peak detection.

Figure 5. 15 (a) AECG signal, (b) MHR and (c) FHR traces of good quality (36 weeks)

Table 5.6 Algorithm performance for R peak detection

R Peak detection

ANC method

(%)

(%)

fetal Peak detection

84.95(%)

86.29 (%)

maternal Peak detection

98.96 (%)

99.25 (%)

The AECG signals with a small fetal R peak compared to maternal R peak or unwanted components would produce FHR traces of medium or poor quality. Figure 5.16 is an example with FHR trace, which can be considered of poor quality. This signal is of tow minutes, which is acquired from a pregnant in the 37th week of gestation.

Figure 5. 16 (a) MHR and (b) FHR traces of poor quality (37 weeks)

Another example is illustrated in Figure 5.17. The signal is acquired from a pregnant volunteer in the 38th week of gestation and is five minutes long. This signal is corrupted with noise in some sections of the FHR trace but some information can be still obtained from the other sections. This trace can be considered of medium quality. In general, the percentage of successful MHR is high, while the percentage of successful FHR depends on the success of FECG extraction.

Figure 5. 17 (a) MHR and (b) FHR traces of medium quality (38 weeks)

Discussion

In this work, two new developed algorithms are implemented for FECG signal processing. The first algorithm is the FECG extraction and the second algorithm is the peak detection algorithm. The extraction algorithm is new developed due to the new enhancement technique used to enhance the extracted signal by using the IIR notch filter (alpha = 0.85), and by MQRS window and its window signal for scaling down the maternal residual peaks and adjust them again in order to be shorter than the fetal peaks for enhancing the detection of the fetal peaks. The detection algorithm is also new developed firstly, due to its ability to detect the peak without amplitude threshold, and due to the new enhancement technique for detection by determining the overlapped peaks for correcting the fetal RR interval around every overlapped peak, moreover it is the first detection algorithm that is threshold amplitude free detection without pre-determined peak's threshold comparing with Pan & Tompkins (1985) and Karvounis et al. (2006). It only depends on the normal heart rate (maternal or fetal) and the sampling frequency. The extraction algorithm is based on ANC, RLS technique. For testing the proposed extraction algorithms, it is compared with two other methods ICA and NLMS. The findings obtained from ICA, which are shown in Table 5.1 disclosed that the performance of the proposed algorithm was better than that of ICA. The highest value of sensitivity of the proposed algorithm () was 87.23%, while ICA value was 75.75%. The positive predectivity value () of the proposed algorithm was 72.09 %, whereas the value of ICA was 68.18%. These findings reflect the robustness of the proposed algorithm compared to ICA in extracting more informative fetal signals for fetal QRS.

On the other hand, the results obtained by comparing the proposed algorithm with NLMS algorithm show that the performance of these algorithms was better than those of NLMS. The highest value of the proposed algorithm sensitivity () was 88.59%, while NLMS value was 80.448%. The positive predectivity value () of the proposed algorithm was 82.78%, whereas the value of ICA was 72.09%.

The proposed detection algorithm is based on an amplitude threshold free technique. The algorithm is used to detect the maternal signal peaks as well as the fetal signal peaks. In addition, the results from the detection of peaks from FECG signal were compared with results of the detected peaks of the same signal by using ultrasound.

With regard to maternal peak detection, over 99% ability of the maternal QRS detection is shown in Table 5.2. The primary reason of the error in the maternal QRS detection is the interference due to the noise which leads to difficulties in detecting some maternal R peaks. This result is comparable to the result of the maternal peak detected in real time, where the sensitivity result is 98.96% and the positive predectivity result is 99.25%. Beside that this result can also be compared with the result of maternal peak detection by Ibrahimy Muhammad (2001), which is around 99%.

For the fetal QRS detection, most of the fetal QRS complexes are in general detected with a percentage of 79.76%, as illustrated in Table 5.4. This result is comparable to the result of the fetal peak detected in real time, where the sensitivity result is 84.95% and the positive predectivity result is 86.29% when the FHR traces are of good quality, i.e. the fetal QRS complexes are consistently above the noise level. Beside that this result can also be compared with the result of maternal peak detection by Ibrahimy Muhammad (2001), which is around 83%. The results of the proposed algorithm for measuring the average FHR from 10 signals have also been compared with measurements by an ultrasound mode M machine, in order to asses the reliability of the algorithm. The error rate of the proposed algorithm to the ultrasound measurements is in the range of 0.7 to 4.9%). All the results are illustrated in Table 5.7.

Table 5.7 Algorithm performance for R peak detection

Proposed algorithm for:

(%)

(%)

FECG extraction (Matlab 7.4.)

RLS

87.23(%)

72.09 (%)

ICA

75.75(%)

68.18 (%)

FECG extraction (under Matlab simulink.)

RLS

88.59(%)

82.78 (%)

NLMS

80.44(%)

72.09(%)

Peak detection

Maternal (off-line)

99.05(%)

99.79 (%)

fetal (simulink)

79.76(%)

77.49(%)

Peak detection (R. Time.)

maternal

98,96(%)

99.25(%)

fetal

84.95(%)

86.29(%)

Peak detection (R. Time.) (by Ibrahim )

maternal

Around 99(%)

fetal

Around 83(%)

Percentage of error

(resulting from Comparison with ultrasound)

Developed algorithm

0.7(%)

4.9(%)

ICA

0

2.3(%)

Ibrahimy

3.31(%)

6.63(%)

The limitation of the algorithm for detecting the fetal signal peaks is due to the low level of the SNR. The fetal signal peak, has small values despite enhancement when compared to the main arise sources, such as motion artifact, electrode contact and the maternal signal. Detection difficulty also arises when the fetal signal peak is overlapped with the maternal. Furthermore in the current design of the algorithm, 5 seconds buffer is used for each processing frame. This leads to a few errors when the peaks have to be detected at the end of the frame.

In the effort to emulate real simulation, the chosen recorded test signals include those corrupted with different levels of noise. The algorithm has incorporated a few steps to improve its performance on such signals. These include scaling using the MQRSW, 1 Hz notch filter in the postprocessing stage, search interval without using amplitude threshold and fetal signal peak position correction based on knowledge of the maternal signal peak locations. With these steps, the assessments described in this chapter demonstrate the ability of the algorithm to perform in real time comparable to the widely used ultrasound machine.

SUMMARY

The heart rate measurements previously acquired by off line processing of AECG signals and by real-time processing of directly acquired AECG signals by the proposed algorithm result in the FHR and MHR detection of around 80% and 99% respectively. The algorithm was shown to be better than other similar techniques due to its threshold amplitude free detection, which has to be adjusted previously for the other similar techniques, and comparable results were obtained from the ultrasound machine. Beside that the enhancement technique, introduces the possibility to determine the overlapped QRS complexes and to rescale their amplitude in order to avoid cutting these complexes.