Fetal heart rate classification based on time-frequency domain features

: Background: Fetal heart rate(FHR) monitor provides an effective auxiliary diagnosis method for obstetricians, which greatly reduces the misdiagnosis rate.However, sometimes the obstetrician's subjective interpretation is prone to misinterpretation due to different cognition or poor interpretation of the graphics itself. At present, no fetal heart rate monitor can automatically determine the fetal intrauterine state.Based on actual clinical needs, this article mainly studies fetal heart rate signals, designs algorithms to extract feature parameters of fetal heart rate, provides doctors with more accurate and objective quantitative indicators, and reduces the rate of misdiagnosis caused by subjective interpretation. Method: This study uses the CTU-UHB database containing 552 CTG data, and focuses on the analysis of fetal heart rate data. According to the definition of terms in the consensus of electronic fetal heart monitoring experts, the design algorithm extracts the fetal heart rate characteristic parameters based on time domain analysis, such as fetal heart rate baseline, acceleration, deceleration, long variation and short variation, and extracts features based on frequency domain analysis Such as low frequency power, high frequency power, etc. In addition, the approximate entropy of nonlinear parameters is extracted. Then based on the 21 extracted feature parameters, the fetal intrauterine state is classified into two categories, and the training classifier model is established according to the principle of support vector machine. Randomly change the training group (387 cases) many times and enter the test group (165 cases) for prediction. Results: In this paper, the fetal umbilical artery pH value measured after delivery was selected as the FHR signal classification standard, and fetuses with pH greater than 7.05 can improve the classification results.

rate is mainly determined by the doctor's visual judgment, but this depends very much on the doctor's clinical experience, and this subjective judgment will have some errors [4] .
With the rapid development of the field of computer medicine, computer FHR analysis has become the most promising method to solve the defects of visual interpretation.The original computer analysis system is mainly based on the morphological features provided by the FIGO guidelines [5].Among the most famous are: OmniView SisPorto and NST-Expert [6] (no stress test) developed by the University of Porto, Portugal.Both systems use a comprehensive CTG assessment method, including information about the state of the mother.Although these methods can provide doctors with better visual analysis and improve the accuracy of diagnosing hypoxic infants, however, due to the nonlinearity and complexity of fetal dynamics, such visual examinations still cause high The variability between time and even between observers leads to an increase of false positive results in the diagnosis, thereby causing unnecessary gynecology.In recent years, the field of machine learning has developed rapidly, and many researchers have used machine learning algorithms to identify fetal heart rate, thereby accurately diagnosing the state of the fetus.For example, Krupa [7] proposed in 2011 to use the Empirical Mode Decomposition (EMD) algorithm to extract features from the fetal heart rate and classify the extracted features using a support vector machine (SVM). In this method, the Kappa value of thetraining set is 0.923, the Kappa value of the test set is 0.684, and the average classification accuracy of the test set is 81.5%.R. Czabanski et.al, 2012 [8] proposed a computer analysis of fetal heart rate signals by combining weighted fuzzy scoring system with Lagrange support vector machine (LSVM).This method has a test accuracy of 92% and a QI of 88.2%.In addition to traditional machine learning methods, there are also bad researchers who use deep learning neural networks to classify fetal heart rate.Among them, the best performance is the method proposed by Zhao et al. in 2019.This method first converts the fetal heart rate signal into a 2-dimensional recursive graph, and then uses CNN to classify the recursive graph. Finally, the classification result of this method reached 99.29% sensitivity and 98.10% specificity.
Although the deep learning neural network has greatly improved the classification performance, it is still difficult to gain the trust of clinicians due to its poor clinical interpretation.Since SVM has a very good performance in two classification tasks,This research proposes a support vector machine fetal heart rate method based on time-frequency domain features. A total of 21 features are extracted for classification.The next part of the paper includes data processing, feature extraction, support vector machine classification, result analysis and conclusions.

2.Data analysis and preprocessing
This article uses an open source database of fetal CTG signals, which has excluded all known intrauterine growth restriction, intrauterine infection and congenital abnormalities in fetal CTG records during delivery. All CTG records obtained do not exceed 90 minutes, and have general physiological parameters such as the age of the pregnant woman, gestational age (all ≥37 weeks), pregnancy type (including singleton, uncomplicated pregnancy, etc.), and delivery type (Including vaginal delivery and cesarean section) and other related clinical features.The database contains a total of 552 CTG records, each of which contains fetal heart rate signals during labor and uterine contractions, all sampled at 4 Hz.
The original FHR signal is obtained by using the principle of the ultrasound Doppler effect, which inevitably contains noise, or the FHR signal value is missing due to the occasional bad contact between the fetal heart probe and the abdomen.Most of the FHR signals in this data set have consecutive missing fragments of more than 2 minutes. Clinically, the CTG monitoring time should be at least 20 consecutive minutes [9] . In this study, combined with the degree of missing data, it was decided to intercept a 20-minute FHR signal segment with fewer missing values in the data for analysis. The basic idea of the algorithm for intercepting the 20-minute signal segment is: read the full-length fetal heart rate data, design a processing window for judging the data missing rate, the window length is 20 minutes (ie 4800 points), and the sliding step length is 1 minute (ie once Slide 240 points after processing the operation).The signal segment is judged in the processing window. If the proportion of the missing segment is greater than 30% and there is a missing segment that lasts for more than two minutes, then slide the processing window and judge the next 20-minute signal until it is found Until the first qualified signal segment.The final step is less than 1 minute to discard. Intercept the more continuous 20-minute signal segment to prepare for the next preprocessing. Figure.1 is an example of intercepted signals.
After intercepting the 20-minute FHR signal segment with good continuity, for the signal segment with a continuous fetal heart rate of 0 or less than 60 bpm or more than 200 bpm, the segmented cubic Hermite interpolation method is used in the data processing buffer (this study Define its length as 60 points, that is, 15 seconds) to process it. When the FHR signal has a large jump between two sampling points and is unstable, this situation is mostly caused by poor placement of the signal acquisition terminal.In addition, the original data waveform has slight jitter. This study uses the moving average method to smoothly filter it, and the smoothing filter window is 30 (that is, 7.5 seconds). Figure.2 shows an example of the preprocessed fetal heart rate signal, and compared with the original signal.
From the results of FHR signal preprocessing, most of the isolated points have been replaced and interpolated, and the curve becomes smoother; but there are still signal segments with dense missing values that are not fully interpolated, and lower fetal heart rate values appear.

Recognition and extraction of fetal heart rate baseline
The baseline fetal heart rate is a very important reference curve. In clinical practice, it is necessary to identify the baseline position of the fetal heart rate [10]. This study starts with the definition of the fetal heart rate baseline, and identifies and traces the fetal heart rate baseline from the 20-minute continuous FHR signal segment.
The basic idea of the algorithm is: set a data processing buffer of 10 minutes (2400 points), each step is 1 minute ( 240 points), and calculate the baseline value of fetal heart rate in the data processing buffer each time, And output the baseline fetal heart rate change every 1 minute.
Among them, the process of calculating the baseline value of the fetal heart rate is: first assume the FHR threshold interval to determine the FHR fluctuation range without acceleration, deceleration, etc. This study assumes that the fetal heart rate threshold interval is 100 bpm ~ 170 bpm, and the increment is 1 bpm. For all FHR sampling values in the data processing buffer with a fixed length of 10 minutes, traverse the ThreValBuf, and calculate the number of sampling points with FHR fluctuations within a certain threshold±5 bpm , and record and store it. Figure.3 shows the identified baseline fetal heart rate. The black and bold curve in the example is the baseline of the recognized fetal heart rate.

Recognition and extraction of fetal heart rate acceleration and deceleration
This section extracts the characteristic parameters characterized by the acceleration(ACC) of fetal heart rate : acceleration duration, the ratio of acceleration duration to the total length, the number of accelerations and the acceleration area.Extract the characteristic parameters represented by the fetal heart rate deceleration(DEC): deceleration duration, the proportion of deceleration duration, deceleration times and deceleration area.
The algorithm for identifying the acceleration segment is as follows:For the 20-minute FHR signal, if the current FHR value is greater than the FHR baseline value, and the FHR value of the previous sampling point is less than the FHR baseline value, then start counting and record the current sampling point position (AccStartTime) [11] . When it is recognized that the FHR value is less than the fetal heart rate baseline, stop counting; if the maximum value of all sampling points in the counting range is greater than 15 bpm and the cumulative count exceeds 60 points (15s), the counting range is the recognized acceleration section , Record the AccEndTime of the previous sampling point, accumulate the number of accelerations and calculate the acceleration time and its proportion.There are four accelerations as shown in Figure.

4.
Deceleration is more complicated and can be roughly divided into two types: regular and variable. This article does not consider the combined study of contractions signals, so only focuses on identifying fetal heart rate variability. The definition of mutation deceleration and acceleration is exactly the opposite. The deceleration is 15 bpm below the baseline level.
Therefore, the recognition algorithm idea of mutation deceleration is basically the same as that of acceleration recognition, but the discrimination conditions are changed [12] .

Fetal heart rate long variability and short variability feature parameter extraction
Baseline variability of fetal heart rate is divided into long and short variation [ 13 ] .Long variation(LTV) is easier to distinguish, which is equivalent to drawing a horizontal line parallel to the highest and lowest points of the FHR curve. The amplitude difference between the two lines is the amplitude variation of LTV, and the period of LTV is the period of large fluctuation change.
Short variation(STV), generally refers to the amplitude difference between heartbeats. The STV value is the difference between two adjacent RR values. Calculate the instantaneous STV value corresponding to each adjacent sampling point. For the 20-minute FHR signal segment, this article calculates the average STV value as a characteristic parameter. Clinically, when the STV value is less than 3ms, one should be alert to the occurrence of fetal distress. When the STV value is less than 2ms, it means that the fetus has acidosis and is about to die [14] .The LTV recognition algorithm [15] divides the fetal heart rate signal into 1 minute (240 points) blocks, calculates the difference between the maximum and minimum fetal heart rates every minute, and then averages all the differences. Then, according to the LTV value, the proportion of missing variation, small variation, normal variation and significant variation in an FHR signal segment is judged.

Based on frequency domain analysis
Time domain features cannot fully characterize the fetal state, and relevant features need to be extracted from the perspective of frequency domain analysis. In this paper, the burg method is used to calculate the power spectral density (PSD) of the FHR signal based on the auto regressive model (AR). Obtain low-frequency power (LFP) and high-frequency power (HFP) from the power spectrum, and calculate characteristic parameters such as total power (TP) and (LFP/HFP).
Power Spectrum Analysis (PSA) is an important field in the theory and practice of biomedical engineering [16] . It mainly analyzes the periodic fluctuations of signals from the frequency domain.
Heart rate variability is a phenomenon in which sinus rhythm changes periodically within a certain period of time, and it is an important indicator of sympathetic-parasympathetic tone and its balance. Therefore, using PSA to analyze the performance of fetal heart rate variability in the frequency domain reflects the fetal intrauterine state. The power spectrum is affected by the activity state of the fetus, the fetal movement will show an increase in the spectral energy in the high frequency domain, and the breathing movement will also affect the power spectrum. This article refers to the adult heart rate variability analysis method for research and extracts similar characteristic parameters.

Power spectrum estimation and AR model order determination
The purpose of PSA is to describe the distribution of signal energy in the frequency domain based on a finite long time sequence. The power spectrum of a stationary random process is the ARMA model, etc.) [17] . This paper simply compares the difference between the periodogram method, the auto correlation method and the Burg algorithm based on the AR model for power spectrum estimation. Because the Burg method based on the AR parameter model has a better effect (for non-stationary, the focus is on the Burg algorithm for power spectrum estimation. First use the burg function to calculate the reflection coefficient of the FHR sequence in order to determine the order of the AR model, as shown in the Figure.5， when the order of the AR model is about 150, the reflection coefficient value approaches 0, so this article selects an AR model with an order of 150 to estimate the power spectrum to get closer to the true value. Figure.6 is the comparison of three power spectrum analysis methods for FHR sequence.

Power spectrum analysis based on AR model
The AR model has a series of excellent characteristics such as high resolution and good smoothness. In this paper, the burg method is used to estimate the parameters of the AR model, and the power spectrum of the FHR sequence is calculated (the second subgraph in Figure.6).

Fetal heart rate feature parameter summary
In this study, a total of 21 fetal heart rate characteristic parameters were extracted using time domain analysis methods and frequency domain analysis methods.

4.Support Vector Machine Algorithm
SVM is very suitable for small samples, it solves the problem of secondary optimization, and also solves the problem of non-linearity and over-learning of samples, and has good classification and regression capabilities [ 18 ] .The support vector machine classifier maps the data to a high-dimensional space, then constructs an optimal separation hyperplane.Assuming that a linearly separable training data set in the feature space is given: x is the i-th feature vector of the fetal heart rate signal, and i y is the class mark of the signal. The goal of learning is to find a separating hyperplane in the feature space that can classify feature vectors into different classes. The linear separable support vector machine uses the interval maximization or equivalently to solve the corresponding convex quadratic programming problem to learn to obtain the optimal separation hyperplane as: is the normal vector, which determines the direction of the hyperplane; b is the displacement term, which determines the distance between the hyperplane and the origin.The distance from any point x in the sample space to the hyperplane ) ,b w ( can be written as: Assume that the hyperplane ) ,b w ( can correctly classify the training samples, that is, for As shown in the Figure.8, the training sample points closest to the hyperplane make the equal sign of Equation (4) hold. They are called "support vectors".
The sum of the distances from the two heterogeneous support vectors to the hyperplane is We hope to find the parameters w and b that satisfy the constraints in Equation (4) , so that  is the largest, namely Obviously, in order to maximize the interval, you only need to maximize -1 w ,which is equivalent to minimize 2 w .Thus, Equation (6) can be rewritten as This is the basic type of support vector machine.In general, it is to find the partition hyperplane with the strongest generalization ability.

5.Evaluation indicators and Results
This paper selects the Libsvm [19] toolbox as the pattern recognition classifier, which can train reasonable results. The 21 extracted fetal heart rate characteristic parameters are input into the SVM classifier.First, normalize all features, and then randomly select 70% (387 cases) of fetal heart rate data as the training group to train the classification model, and 30% (165 cases) of fetal heart rate data as the test group.    (10)

6.Discussion
In this study, the public data set CTU-UHB is used, and each data contains various indicators of pregnant women. The normal and abnormal state of the fetus is marked by the PH value of the umbilical artery. The data has not been preprocessed, there is a lot of noise, and the data needs to be denoised. The de-noising method adopted in this paper makes the signal significantly improved.the time domain and frequency domain features of fetal heart rate are extracted for classification. The support vector machine method is very friendly to small sample binary classification problems, and the complexity of the calculation depends on the number of support vectors, not the dimensionality of the sample space, which avoids the "curse of dimensionality" in a sense. Compared with other researchers, the feature extraction process is more cumbersome, but it has high sensitivity. As shown in Table.3, we have given the researchers' respective feature extraction and classification methods, and made comparisons. At present, the best performance of classification results is the method of Zhao et al. It first converts the fetal heart rate signal into a 2-dimensional recursive graph, and then uses CNN to classify it.This method is very good for the classification of fetal heart rate, but the clinical interpretation is weak.Other researchers use SVM to classify more, but because of the different features selected, the classification results are also different. This article combines the time domain, frequency domain, and nonlinear features to classify. Due to the small amount of data in the data set and counterexamples, the specificity of the classification results is low.I think that using more features can make the classification results of an uneven data set less biased. Moreover, it provides more possibilities for clinical interpretation, and facilitates doctors to better analyze the pathogenesis.

7.Conclusion
This article briefly explains the clinical importance of modern electronic fetal heart rate monitoring, analyzes the current status and clinical needs of obstetricians in assessing the fetal state based on CTG graphics, and addresses the shortcomings of current electronic fetal heart rate monitoring technology in assessing fetal state , Researched and designed a specific algorithm for extracting fetal heart rate characteristic parameters from 552 intrapartum CTG data.