HOME JOURNALS CONTACT

Journal of Software Engineering

Year: 2015 | Volume: 9 | Issue: 4 | Page No.: 848-857
DOI: 10.3923/jse.2015.848.857
A Fetal ECG Extraction System Based on Blind Extraction Method
Xiyao Hua and Boni Su

Abstract: Fetal ECG monitoring is an important measure to protect perinatal health. A improved blind extraction method is proposed. By setting a time period range, it solves generalized eigenvalues and eigenvectors of the matrix within the set range and adaptively search for the best latency and blind extraction vector. This algorithm is simple and easy online process. A fetal ECG monitoring software system is also designed and implemented based. NET three-tier architecture. The monitoring system includes basic patient data management, extraction of fetal ECG, ECG save and print functions. The real clinical data test shows that the system can extract a clear fetal electrocardiogram and lays the foundation for the future development of the fetal ECG monitoring equipment.

Fulltext PDF Fulltext HTML

How to cite this article
Xiyao Hua and Boni Su, 2015. A Fetal ECG Extraction System Based on Blind Extraction Method. Journal of Software Engineering, 9: 848-857.

Keywords: NET three-tier architecture, Fetal electrocardiogram, blind extraction and second-order statistics

INTRODUCTION

Extracted fetal ECG signals from maternal abdominal mixed signal is a very complex signal processing problem. Fetal ECG signal is interferenced by a lot of noises such as the mother ECG signal, myoelectricity interference, noise, power frequency, baseline drift, etc. It’s not easy to extract clear fetal ECG. Currently independent component analysis (Wang, 2010) is one of the most effective technologies to extract fetal ECG. Assuming sources is statistical independent and ignored the time lag that the source signal transmitted to the sensor, also assuming that each sensor is received by the linear mixture of different source signal, then building instantaneous linear mixed model to extract the source signals. The source signal sequence is uncertainty extraction by this way; it is need to judge the fetal ECG by professional. It is not appropriate for the development of the fetal guardianship instrument (Cai and Ji, 2009).

Independent component analysis extracts all of the source signals; this needs a lot of calculation (Yang et al., 2010). But in the actual application, the only need to extract the fetal ECG signals; it could save a lot of computation time and suitable for the project need (Ma, 2011). Blind extraction methods have attracted widespread attention in recent years. Blind extraction (Chen et al., 2010) is a method only extracted the interest signal from mixed observation signal, generally using fourth-order statistics and second order statistics of the signal and need to know some transcendental characteristics of the signal, such as time structure, scope of kurtosis, etc. Compared with four order statistics, the second order statistics calculation is smaller, so its application is widely.

Barros and Cichocki (2001) suggested extracting the source signal with time strict from the observation signal and minimizing the Mean Square Error (MSE) of the signal. But the extraction performance of the algorithm is sensitive to estimation error of time delay. Extracted fetal ECG is often mixed with a lot of noise, researchers have proposed different improved objective function and the majority of the proposed method does not take into consideration of the noise (Zhang and Ye, 2005). But the influence of noise is not to be ignored in the actual blind extraction. So the blind extraction method which considers the noise is fit for the actual situation.

In this study, to developed a blind extraction algorithm based on second order statistics (Li and Yi, 2008), considering noise impact, minimize relative ratio to establish the objective function. Using Visual Studio 2013 and C # language development tools designed a fetal ECG extraction software system (Chen et al., 2011).

FETAL ECG EXTRACTION ALGORITHM

Objective function is put forward: Suppose s(k) = [S1(k), S2(k),…, Sn(k)]T is n source signal vector, s(k) = [x1(k), x2(k),…, xm(k)]T is m observation signal vector, then this mixed process can be expressed as x(k) = As(k)+β(k), here A is mxn mixed matrix and β(k) is mx1 vector for the noise. Suppose the source signals and noise is independent, source signal is statistical independence, when m≥n, the matrix A is row full rank, so there is w column vector for fetal ECG signal and wT As(k) = s1(k), at this time y(k) = wT x(k) = wT As (k)+ wTβ(k) = si(k)+r(k) r(k) = wTβ(k) is the noise component. From assumption, we know r(k) and si(k) are independent. Fetal ECG signal cycle is τ sample points, considering the periodic difference ε(k) = y(k)-y(k-t), t is the delay time sample points, y(k) and y(k-t) is the extracted source signals at the time of k and k-t, respectively, because the fetal ECG is periodic signal, so there is si(k) = si(k-τ). Consider the following two conditions: (1) The delay time is t = τ ε(k) = y(k)-y(k-τ) = si(k)+r(k)-si(k-τ)-r(k-τ) = r(k)-r(k-τ). The variance of the periodic difference is , (2) The delay time is t≠τ ε(k) = y(k)-y(k-t) = r si(k) +r(k)-si(k-t)r(k-t). Then at this time, the variance of the periodic difference is Var[ε(k)] = Var[si(k)-si(k-t)]]+2σ2n. Apparently, Var[ε(k)t≠τ>Var[ε(k)t = τ, it is visible in the time of delay of fetal ECG period τ period difference variance is the smallest.

For the different vector ware comparable and makes the fetal ECG signal and mother ECG signal in the same order of magnitude, consider the standardization of indicators:

(1)

Consider the standardization of indicators as the objective function of searching optimal w to extract the fetal ECG signal and minimize the objective function (1), when (1) obtain the minimum to find out the best blind extraction of vector.

Derived objective function: The objective function (1) is reduced as:

(2)

Minimize Eq. 2 is equivalent to maximize the objective function:

(3)

y(k) = wTx(k), Then:

E[y(k)2] = E[y(k) y(k)T] = wTE{xxT} w = wT Aw

Make y(k)y(k-t) as symmetric form, then:

Make:

then:

when t is fixed, maximum J(w, t) is transformed into solving generalized eigenvalue problem of B on A, according to the theory of generalized eigenvalue, when W is generalized eigenvector corresponding to the largest generalized eigenvalue, J(w, t) have the maximum value.

SIMULATION EXPERIMENT AND RESULT ANALYSIS

In order to verify the performance of the algorithm, used data from the literature (De Lathauwer, 2012) to conduct simulation. The data is 8 channel ECG data measured from the pregnant woman surface, the data is shown in Fig. 1, the sampling frequency is 250 Hz, acquisition time is 10 sec, data points is 2500 points. The first five channels are pregnant women abdominal signal; the other three channels are pregnant women breasts signal. Observe the ECG waveform, it can be seen that the fetal heart rate is faster than the mother’s heartbeat but the intensity of the fetal ECG is weaker than mother ECG in this study, the objective function is established according to the relative ratio and make the different source signals in the same order of magnitude.

Autocorrelation function performance analysis: In blind extraction by using the second order statistics of the fetal ECG, we need to estimate the fetal ECG period, Barros proposed calculated observation signal autocorrelation function to estimate fetal ECG period in the literature (Li and Yi, 2008), this is because that the autocorrelation function of the fetal ECG is the biggest for a specific delay period and other signal correlation is very small, so make the fetal ECG period as the optimal delay of autocorrelation matrix which is inevitable to extract fetal ECG only.

Seen from the ECG waveform shown in Fig. 1, the first channel of the fetal ECG is the most clear, set the delay with t = 1:220 and calculate the first channel signal autocorrelation function, as shown in Fig. 2, autocorrelation function is the biggest strong at t = 0, this is because any signal correlation with its own must be the biggest in addition, autocorrelation function have two peaks between 0-220, one is maximize autocorrelation of the fetal ECG, the other is maximize autocorrelation of mother ECG autocorrelation and fetal ECG period structure is different with his mother. Calculate the first maximum points of autocorrelation function in Fig. 2, the sampling points are 112 and this is the period of fetal heart rate.

Fig. 1:ECG wave measured form pregnant women body surface

Fig. 2:Autocorrelation function variation of first channel observation signal

Based on this feature, most blind extraction algorithm select the maximum point of autocorrelation function as best time delay and established objective function to blind extract fetal ECG in the second order statistics based on fixed delay function (3-9). In practical application, the limitation of this method is very obvious, first of all, choosing appropriate observation signal to solve the signal autocorrelation function is not convenient, for real-time processing, this method is not obviously applicable; Secondly, through this method select the best delay, its extraction effect is easily influenced by the limitation of time delay estimation, once delay estimation is error, it will cause the extraction results less clear, even it can’t extract the fetal ECG. In order to improve robustness of algorithm of time delay, this study search the optimal delay of autocorrelation matrix dynamically using a delay range 80-220 during the algorithm implemented, according to the previous analysis, the main eigenvalues of the autocorrelation matrix will achieve the maximum in the optimal delay time points (fetal ECG cycle) necessarily, so it is certain to search the best blind extraction vector and the extraction performance of algorithm is stable and reliable, it meets the demand of practical engineering.

FETAL ECG EXTRACTION AND THE SIMULATION RESULTS

Running the algorithm proposed in this study, the change of main characteristic value in the scope of the delay of autocorrelation matrix B is shown in Fig. 3 and the main characteristic value appeared a maximum value near to 120; the results are consistent to the fetal ECG estimation period.

Seen from Fig. 3, there is a nonlinear decline trend in the change of the characteristic value, the existence of the trend will cause certain error for processing precision and affect the accuracy of the searching of optimal delay time, so it need to remove the trend, moving average filtering method is very effective to suppress random noise and keep sharp edge, the use of the 3 point moving average filter here.

After moving average filter, the gradient trend is shown in Fig. 4, then subtract trend from the original information, after removing the trend, the change of the eigenvalues is shown in Fig. 5, this is actually equivalent to the effect of high-pass filter, after filtering processing, highlighted the peak value, in addition to the trend and improve the calculation precision of peaks.

Fig. 3:Main autocorrelation matrix variations under different delay

Fig. 4:Trend after the moving average filtering

Fig. 5:Eigenvalue variations after filter

Then calculate the maximum peak point and corresponding delay time is fetal ECG period, the corresponding main feature vector is best blind extraction vector of extracted ECG and the extracted fetal ECG is shown in Fig. 6.

FETAL ECG EXTRACTION SOFTWARE SYSTEM IMPLEMENTATION

To further validate the algorithm for extracting fetal ECG proposed effectiveness and practicality, we use the Visual Studio 2013 development platform, C# language to design a fetal ECG monitoring software system. The system is based on. NET three-tier architecture, including the presentation layer, business logic and data access layer, shown in Fig. 7. Using a layered architecture design not only improve code reuse rate, reduce the coupling between the layers, but also improve the software’s scalability and security.

FETAL ECG MONITORING SYSTEM FUNCTIONAL MODULES

The system includes basic patient information management, fetal ECG monitoring and system maintenance and other modules (Fig. 8).

Fig. 6:Fetal electrocardiograms (ECG)

Fig. 7:Tree-tier architecture

Fig. 8:System function modules

•  The basic patient data management module includes: Patient inserting, modifying and deleting
The fetal ECG module includes: Extraction of fetal ECG, ECG waveform display, as well as ECG save and print functions
System maintenance module includes: Database backup and restore, data export/import and users management

DATABASE DESIGN

Database is used to save multi-channel mixing maternal and fetal ECG data, the patient’s information and system user’s data. These data provide the basis for future maternal ECG analysis and review.

•  The patient information table (tb_Patients) includes id, name, age, height, weight, date of hospitalization, home address, wards number and medical history records
User table (tb_Users) includes id, username and password fields
ECG table (tb_Fecg) is used to save the multi-channel mix maternal and fetal ECG data

SYSTEM FUNCTIONAL MODULES

Presentation layer: The presentation layer uses WinForm to provide users with interface, including user login, patient data management, fetal ECG, user management, data import/export and database backup/restore.

Business logic layer: Business logic layer obtains user requests from the presentation layer and then calls the data access layer to access data, complete the core business. This layer takes the form of DLL library. Software development process uses object-oriented methods. The model layer includes user, patient and FECG three entities classes.

Data access layer: Data access layer provide data access services for business logic layer to access the database. Entity classes encapsulate four classes including UserDAL, PatientDAL, FecgDAL and DBHelper. The first three classes are used to achieve CRUD (create, read, update, delete) operations. DBHelper class is a static class to operate database, encapsulates four static methods including ExecuteNonQuery, ExecuteScalar, ExecuteReader and ExecuteDataTable.

Utility layer: Utility layer mainly include some tools and methods in the form of class libraries to improve code reuse rate, including the Matrix class (matrix operations class), Fecg Extraction method (Fetal ECG extraction algorithm).

For arithmetic operations convenient, this study implements a matrix computation class. Matrix class encapsulates the following methods: MakeUnitMatrix, MakeOneMatrix (initials the square matrix), GetColVector (Gets the specified column vectors), Add (additions) and Subtract (subtraction), multiply (multiplication), Dot (seeking column vector inner product) and transpose (transposed) and other matrix operations.

SYSTEM TEST

We use real clinical data for system testing (De Lathauwer, 2012). Fetal ECG extraction using the proposed algorithm to obtain ECG waveform diagram as shown in the software. Fetal electrocardiogram can clearly see from Fig. 9.

Fig. 9:Extraction of fetal electrocardiogram

CONCLUSION

Fetal ECG data can provide a reliable basis for perinatal health care. The Fetal ECG extraction algorithm is essential to develop clinical fetal ECG monitoring system. The proposed algorithm can adaptively search autocorrelation matrix optimum in the dynamic range and select the maximum corresponding eigenvectors as blind extraction vector. Power method is used to calculate the eigenvalue and eigenvector which can greatly save the computation time; also it is easy to the online processing. The fetal ECG extraction system based on this algorithm is developed to realize the basic patient data management, extraction fetal ECG, electrocardiogram save and print functions. Using. NET three-tier architecture can further improve the code reuse rate and scalability. We will further improve the software system to make it combined with the hardware data acquisition and real-time processing in the future.

ACKNOWLEDGMENTS

This study is partially supported by the NSFC (No. 61162018); Institute of Xiyu Culture of Xinjiang Production and Construction Corps college humanities and social science research base, Tarim University Research Fund financed (XY1408); Tarim University Master Fund project funding (TDZKSS201414); Tarim university research projects in higher education (2013034).

REFERENCES

  • Wang, L., 2010. Research of blind source separation algorithm based on independent component analysis. Master's Thesis, Lanzhou University of Technology, Lanzhou, USA.


  • Cai, K.B. and Z.H. Ji, 2009. Extracting a fetal electrocardiogram based on independent component analysis. J. Chongqing Univ. (Nat. Sci. Edn.), 32: 332-336.
    Direct Link    


  • Yang, Y.M., C.H. Guo, Z.W. Shi and Z.Q. Xia, 2010. A new algorithm for blind extraction of time-correlated fetal electrocardiogram signals. J. Dalian Univ. Technol., 50: 137-140.
    Direct Link    


  • Ma, M., 2011. The performance comparison of Fetal ECG blind extraction algorithm. Proceedings of the 2011 Asia-Pacific Youth Conference of Youth, August 4-6, 2011, Hangzhou, China, pp: 267-268.


  • Chen, S., Y. Shen and K. Xu, 2010. Fetal electrocardiogram extraction from instantaneous noisy mixtures. J. Data Acquisit. Process., 25: 228-230.
    Direct Link    


  • Barros, A.K. and A. Cichocki, 2001. Extraction of specific signals with temporal structure. Neural Comput., 13: 1995-2003.
    CrossRef    


  • Zhang, Z.L. and Y. Ye, 2005. Extended Barros's extraction algorithm with its application in fetal ECG extraction. Proceedings of the International Conference on Neural Networks and Brain, Volume 2, October 13-15, 2005, Beijing, China, pp: 1077-1080.


  • Li, Y. and Z. Yi, 2008. An algorithm for extracting fetal electrocardiogram. Neurocomputing, 71: 1538-1542.
    CrossRef    


  • Chen, S., Y. Shen and K. Xu, 2011. A two-stage blind extraction algorithm for fetal electrocardiogram. J. Circ. Syst., 16: 125-130.
    Direct Link    


  • De Lathauwer, L., 2012. Block Component Analysis: A New Concept for Blind Source Separation. In: Latent Variable Analysis and Signal Separation, Theis, F., A. Cichocki, A. Yeredor and M. Zibulevsky (Eds.). Springer, New York, pp: 1-8

  • © Science Alert. All Rights Reserved