Automatic Contraction Detection Using Uterine Electromyography

: Electrohysterography (EHG) is a promising technique for pregnancy monitoring and preterm risk evaluation. It allows for uterine contraction monitoring as early as the 20th gestational week, and it is a non-invasive technique based on recording the electric signal of the uterine muscle activity from electrodes located in the abdominal surface. In this work, EHG-based contraction detection methodologies are applied using signal envelope features. Automatic contraction detection is an important step for the development of unsupervised pregnancy monitoring systems based on EHG. The exploratory methodologies include wavelet energy, Teager energy, root mean square (RMS), squared RMS, and Hilbert envelope. In this work, two main features were evaluated: contraction detection and its related delineation accuracy. The squared RMS produced the best contraction (97.15 ± 4.66%) and delineation (89.43 ± 8.10%) accuracy and the lowest false positive rate (0.63%). Despite the wavelet energy method having a contraction accuracy (92.28%) below the ﬁrst-rated method, its standard deviation was the second best (6.66%). The average false positive rate ranged between 0.63% and 4.74%—a remarkably low value.


Introduction
The intrauterine pressure (IUP) method and the tocogram (TOCO) have been used for uterine contraction monitoring. Both methods present limitations regarding the assessment of uterine contraction properties and characteristics [1][2][3]. The gold standard for measuring the uterine pressure is the IUP, which provides the best information concerning uterine contractions since it is based on a pressure sensor inserted in the amniotic space. The IUP is not a routine pregnancy monitoring procedure, considering that it can only be used after membrane rupturing. As a consequence, it is mainly used in selected cases, such as when the subject is obese or is already in labor [4,5].
On the other hand, the TOCO technique, based on a strain gauge, is widely used in pregnancy and labor monitoring. The method remains unchanged since the late 1960 s. The TOCO presents a mismatch between amplitude and the strength of the uterine contraction, which leads to decreased predictive value. The TOCO acquisition also poses a problem for subjects with body mass index (BMI) higher than 30 [2]. The technique, which is often used as a uterine contraction frequency meter, is not considered an adequate methodology for routine preterm risk evaluation.
The electrohysterogram (EHG) is an alternative to the TOCO and IUP methods, and it is obtained noninvasively through electrodes placed on the abdominal surface [6][7][8][9]. The EHG has been considered an appropriate tool for long-term pregnancy and childbirth monitoring due to its non-invasive nature. Besides, it is easily obtained and can be used as early as the 20th week of gestation. Although the BMI has been reported as having an imperceptible impact on the EHG, one of its main advantages [10,11], another study [12] reports a fat-induced low-pass filtering effect. The EHG is a signal with increased complexity that often requires the application of advanced signal processing analysis techniques. There are no standards regarding electrode location, acquisition system, or feature analysis parameters [5,13,14]. Research in this field has grown with the introduction of more powerful algorithms enabled by the ever-increasing platforms' computational power. Uterine contractions are present from as early as 20 weeks of gestational age, and they may be detected through maternal perception, TOCO, or EHG. These early pregnancy contractions may have low mechanical impact due to the poorly coordinated uterine cell-to-cell communications, and therefore may be missing in the TOCO and present in the EHG. They are ineffective as far as labor is concerned, but can convey important information in the context of preterm risk evaluation or generally for pregnancy monitoring [15][16][17][18].
As labor approaches, a preparatory process takes place in the uterine muscle, where an increase of cell-to-cell coupling is present [16][17][18]. This translates into more expressive contraction levels due to the synchronicity arising from the structural and functional cell coupling alterations [19]. It stands out that uterine contractions detected through the EHG commonly present an associated energy burst. These energy bursts above the basal activity are used herein as a contraction detector feature.
Several studies have been performed with different contraction detection methodologies in the EHG signal. Khalil et al. [20] used neural networks and wavelet analysis to perform contraction detection and classification for four event classes: Alvarez, Contractions, Foetal Movements and LDBF (Longue Durée Basse Fréquence) [21], with an overall accuracy of 80%. Horoba et al. [22] used a low-pass filter and a root mean square (RMS) computation over a 60 s window to track uterine contractions in the EHG. In this study, 87% of EHG contractions and 96% of the relative TOCO events were regarded as consistent. The same authors [23] outlined the importance of spectral analysis in the development of the EHG research. Chendeb [24] investigated the best wavelet packet tree for EHG components detection. A frequency content criterion was a central parameter. Later, Chendeb et al. [7] used wavelet packets for the same above-mentioned classes as in [20], using as the main criteria its frequential content. Wavelet packet nodes were allocated to the defined EHG contraction classes. A best basis was obtained and shown to outperform the discrete wavelet transform. Multilayer perceptron and support vector machine were used as classification methods, producing a detection rate of over 85%. Muszynski et al. [25] used a nonlinear correlation coefficient between two consecutive horizontally bipolar EHG channels as a contraction delineator. The reported detection rates were 62.5% (full detections), 37.5% (partial detections), and 100% (total detections).
In another work, Rooijakkers et al. [26] compared the IUP estimation using the RMS, the first moment of the spectrogram, and the Teager operator. It was found that the first moment of the spectrogram was the best estimation method, but also the most computationally demanding. The RMS and the Teager operator turned out to be the most computationally efficient, despite not being as accurate as the spectrogram. Furdea et al. [27] used uterine magnetomyographic recordings to delineate contractions through the application of the Hilbert transform along with an affinity propagation clustering technique. Horoba et al. [3] pinpointed the challenges about the uterine contractions detection in the TOCO, which can be related to the same procedure done on the EHG. These authors used four algorithms to determine relevant basal tones and detection levels, which were able to detect above 91% of all the referenced contractions, where less than 7% of the detected contractions were false positives. In one of the referred algorithms, contractions exceeding three minutes were submitted to reanalysis. Zaylaa et al. [13] introduced enhancements on the dynamic cumulative sum (DCS) method, using a data fusion procedure, thus improving contraction detection and segmentation. Peng et al. [28] manually extracted 7136 uterine contractions from the EHG and the same number of non-contractile events, from which a convolutional neural network (CNN) model was obtained. Liu et al. [29] used the EHGs from 20 pregnant women to report that the RMS and selected parameters of wavelet decompositions were significantly higher for uterine contraction events both in labor and non-labor cases.
For the presented work, we assumed that all contractions show an energy burst above the uterine basal signal, resulting in an elevated myometrial activity [17]. It has been demonstrated [30] that at least three different contraction types are present in the EHG, which may be related to different uterine electrophysiologic events, such as delivery triggers. Since the EHG is a non-invasive technique, it can be used for long-term pregnancy monitoring, as part of ambulatory and home-based systems associated with warning labels and automatic clinical reports. The aim of this work is to present and compare five different energy-abased EHG contraction detection methods that can be used in applications that require the input of automatically identified and delineated uterine contractions.

Materials and Methods
A clarification will be made regarding the semantics using power and energy descriptors in this paper. Working with sliding windows to which an operator is applied will produce different variable units. For instance, a sliding window applied over a signal using the RMS operator will produce a standard deviation value for signals with zero mean. If the same window is applied to the squared values of the signal, the result will be a power vector. If a sliding window is applied over this power vector, an energy vector will be obtained. In this work the words "power" and "energy" will be used interchangeably for the sake of simplicity.

Data
The EHG signals used in this work are from the Icelandic 16-electrode EHG database, and are available from PhysioNet [31]. The Icelandic database has 122 recordings from 45 pregnant subjects, several of whom did more than one acquisition session. This database has 4 cases of preterm birth. All the recordings were performed in the third gestational trimester. The data were recorded using 16 electrodes in a 4-by-4 grid [31]. In the present study, a bipolar channel was used. Its main advantage is the reduction of the common mode noise found in maternal electrocardiograms and the signal interference of respiratory movements. The selected bipolar channel was chosen as one that allows for a wider coverage of the uterine muscle: 1-16 or 4-13. The selected arrangement for this study was the channel 4-13, as shown in Figure 1 [32,33]. The data was processed with MATLAB ® version 2019a and the respective Statistics and Machine Learning, Wavelet, and Signal Processing Toolboxes. The pre-processing steps included a sampling frequency rate reduction from the original 200 Hz to 4 Hz, a 20-s signal borders trimming to eliminate onset and offset transients, and a wavelet packet passband filtering between 0.1 and 1 Hz where most of the relevant EHG energy rests [6,18,34]. Sixteen percent of the Icelandic database subjects were selected in order to cover the available range of the gestational weeks recording times: 29 to 41. None of these cases represent labor subjects. A total of 2382 contractions obtained from 20 subjects were scored for the five energy methods.
Appl. Sci. 2020, 10, x 4 of 16 Figure 1. Representation of the Icelandic electrohysterogram (EHG) database channels disposition [31]. The blue arrow is the selected channel for this work.

Data Contraction Detection Methods
As mentioned earlier, the chosen methodology for detecting contractions was to use the associated energy bursts as a feature. These intervals of increased energy have a large variability that should be reduced in order to obtain a smoothed version over which the contraction detection and delineation could be performed. Five different methods were applied: wavelet energy, Teager energy, RMS, squared RMS, and Hilbert envelope, for which a brief description is provided below. For all of these methods except the wavelet energy, a smoothing window length of 70 s was selected upon on the inspection of a substantial number of application cases and evaluating its compliance with the values referred to in the relevant bibliographic references [14,[34][35][36]. Knowing that a contraction duration typically spans from half a minute to several minutes, the selected window length represents an adequate resolution compromise.

Wavelet Energy
The scalogram of ( ) at time and scale ( > 0), ( , ), is the squared modulus of the continuous wavelet transform [5]: where ℎ * ( ) is the complex conjugate of the mother wavelet function, is the time, and ( > 0) is the scale parameter. The time marginal of a time-frequency representation is given by: where is the frequency. In this context, the time marginal represents a wavelet variance estimator of the scalogram. The selected wavelet type in this work was the complex Morlet wavelet (cmor25-1). This mother wavelet has also been found to be an acceptable compromise, regarding bandwidth and length, for the contraction delineation [34].

Teager Energy Operator
The Teager energy operator (TE) [37] is an energy estimator that has been used in the context of EHG processing for IUP calculation [35]. The TE provides a representation similar to the mechanical process of a myometrial contraction [26]. The TE operator, denoted by Φ , is a nonlinear transformation of an input signal ( ). In the continuous-time case, it is given by: In the discrete domain, the TE operator takes the form: where is the sample index in ( ) . A smoothing process is required in order to reduce the transformed signal Φ[ ( )] variance, which is done using a sliding window moving average filter: Figure 1. Representation of the Icelandic electrohysterogram (EHG) database channels disposition [31]. The blue arrow is the selected channel for this work.

Data Contraction Detection Methods
As mentioned earlier, the chosen methodology for detecting contractions was to use the associated energy bursts as a feature. These intervals of increased energy have a large variability that should be reduced in order to obtain a smoothed version over which the contraction detection and delineation could be performed. Five different methods were applied: wavelet energy, Teager energy, RMS, squared RMS, and Hilbert envelope, for which a brief description is provided below. For all of these methods except the wavelet energy, a smoothing window length of 70 s was selected upon on the inspection of a substantial number of application cases and evaluating its compliance with the values referred to in the relevant bibliographic references [14,[34][35][36]. Knowing that a contraction duration typically spans from half a minute to several minutes, the selected window length represents an adequate resolution compromise.

Wavelet Energy
The scalogram of x(s) at time t and scale a (a > 0), SC(t, a), is the squared modulus of the continuous wavelet transform [5]: where h * (s) is the complex conjugate of the mother wavelet function, t is the time, and a (a > 0) is the scale parameter. The time marginal of a time-frequency representation is given by: where f is the frequency. In this context, the time marginal represents a wavelet variance estimator of the scalogram. The selected wavelet type in this work was the complex Morlet wavelet (cmor25-1). This mother wavelet has also been found to be an acceptable compromise, regarding bandwidth and length, for the contraction delineation [34].

Teager Energy Operator
The Teager energy operator (TE) [37] is an energy estimator that has been used in the context of EHG processing for IUP calculation [35]. The TE provides a representation similar to the mechanical process of a myometrial contraction [26]. The TE operator, denoted by Φ, is a nonlinear transformation of an input signal x(t). In the continuous-time case, it is given by: In the discrete domain, the TE operator takes the form: Appl. Sci. 2020, 10, 7014 where n is the sample index in x(t). A smoothing process is required in order to reduce the transformed signal Φ[x(n)] variance, which is done using a sliding window moving average filter: The success of the application of this operator in the EHG for energy estimation will depend on the M value [26].

Root Mean Square
The RMS [22,23] is a statistical concept that measures how far the signal differs from the mean-that is, the standard deviation of the input signal. In EHG, the mean value is zero due to the constant component being removed from the data using a high-pass filter. Therefore, the RMS is obtained by: where x i is the input signal sample, i is the sample number, and n is the number of samples in the window. Typically, the application of the RMS operator to EHG consists of a sliding window operation. The same window length of 70 s was used for the reasons already presented above.

Squared RMS
The Squared RMS of a signal is related to its variance. It must be noted that the used signals have zero mean. It is a power estimation which might contribute to the contraction detection and delineation accuracy by increasing the peak/valley amplitude differential.

Hilbert Envelope
The Hilbert transform [38] returns a complex helical sequence, sometimes called the analytic signal, from a real data sequence. The Hilbert transform is useful in calculating the instantaneous attributes of a time series, especially the amplitude and the instantaneous amplitude and frequency. The instantaneous amplitude is the absolute value of the complex Hilbert transform.
The Hilbert transform is a useful method for performing time-frequency analysis of nonlinear and nonstationary data. Given the Fourier transform of f (t) as S (ω): and considering z(t) as: By replacing Equation (8) into (9) after some mathematical manipulation, the following is obtained: z(t) is called the analytic signal of f (t). The real part of the second term of the right side of (10) is the Hilbert transform of the signal : Being the analytical signal given by: The Hilbert envelope (HE) is the absolute value AS [ f (t)].

Contraction Detection Algorithm
In the EHG signal, the contractions stand out from the basal uterine activity due to the existence of energy bursts. Figure 2 displays the flowchart diagram of the contraction detection algorithm. The first step is to mark the time points for which the EHG exceeds 0.3 mV [30]. Values above this threshold are typically considered artefacts. Subsequently, all the detected contractions containing these time points were discarded.

Visualization and Scoring Methodology
An application tool, the Uterine Inspector (Figure 3) was implemented to simplify the scoring operation. This tool is part of the Uterine Explorer Project [5]. The detected and delineated contractions are represented in all the recorded EHG channels, using the five selected energy methods, in different plots. The extra entries shown in the tool interface represent additional EHG events that will be processed in a future work. This tool turned out to play an important role in the process of the expert visual evaluation of the presented algorithms. Table 1 presents more detailed A 70-s sample-by-sample overlapping sliding window (as mentioned in Section 2.2) operation is performed over the EHG signal using the RMS computing method. This time series is squared in Appl. Sci. 2020, 10, 7014 7 of 14 order to obtain the squared RMS estimation. As far as the TE and the HE are concerned, the smoothing window operates on the respective estimations, and thus acts as a low-pass filter.
The next step is to perform a peak and valley detection over the energy estimations using a prominence criterion of 3% of the obtained differential value. This value was reached upon on a trial-and-error survey. Failing this criterion would render the segment classification as basal uterine activity. This prominence value was optimized by visually analyzing the detector behavior over a batch of EHG contractions. A non-conservative approach was used for the delineation process. It was considered that baseline leakage into the contraction would negatively impact its parameters compared to the other way around. As such, a 50% threshold was applied upon on a previous trial inspection. The contraction onset and offset are defined by 50% of the amplitude swing between the peak value and the respective left and right valley values. Since these threshold criteria are taken relatively to the basal uterine signal floor, no initial calibration is necessary. In the contraction detection algorithm, the first and the last detected contractions are disregarded to account for the possibility of the recording process starting or ending midway through a contractile event.

Visualization and Scoring Methodology
An application tool, the Uterine Inspector (Figure 3) was implemented to simplify the scoring operation. This tool is part of the Uterine Explorer Project [5]. The detected and delineated contractions are represented in all the recorded EHG channels, using the five selected energy methods, in different plots. The extra entries shown in the tool interface represent additional EHG events that will be processed in a future work. This tool turned out to play an important role in the process of the expert visual evaluation of the presented algorithms. Table 1 presents more detailed information about the Uterine Inspector interface.
Appl. Sci. 2020, 10, x 8 of 16 Figure 3. Uterine Inspector application for contraction database management, visualization, and evaluation. This tool was used for the expert scoring of contraction detection. Table 1 provides details about the entries shown in the interface. Table 1. Interpretation of the Uterine Inspector output table (Figure 3).  Figure 4 shows an example of the contraction detection algorithm for bipolar channel 4-13. From  Table 1 provides details about the entries shown in the interface.   For non-stationary signals such as EHG signals, the delineation accuracy is prone to have a certain degree of boundary ambiguity. Unlike the well-characterized electrocardiogram waveform, for which defined scoring rules exist, as far as components characterization and delineation are concerned, the EHG basal activity randomness makes the contraction delineation assessment a difficult task that scorers must face in order to reduce subjectivity. The use of the TOCO as a score reference was excluded in this methodology based on the following considerations: 1) the existing mismatches between TOCO amplitude and the strength of the uterine contractions produces a poor accuracy of the onset and offset of the contractile events, particularly for subjects with high BMI; 2) it has been reported [14] that the sensitivity, positive predictive value, and false positive rate for the individual contractions using TOCO and EHG relative to the IUP are: 54.0%, 84.4%, 15.6% and 94.2%, 87.6%, 12.4%, respectively. This prompted the authors of this work to justify the option of not using the TOCO as a scoring reference. It was considered that, as far as contraction onset and offset delineation are concerned, the inaccuracy of the TOCO would surpass the effect of the relative randomness of the basal uterine activity in the EHG.

Detection Method in the Respective EHG Channel
It is often observed that contractile activity in the EHG is not present in the TOCO due to the limited sensitivity of its mechanical transducer. Surely, the IUP would be the gold standard reference method; however, as previously mentioned it is only used in selected labor cases after membrane rupture.
The option of using an automatic scoring algorithm is currently unrealistic, taking in account that no standards exist, and the relative energy method accuracy may be still a matter of debate due For non-stationary signals such as EHG signals, the delineation accuracy is prone to have a certain degree of boundary ambiguity. Unlike the well-characterized electrocardiogram waveform, for which defined scoring rules exist, as far as components characterization and delineation are concerned, the EHG basal activity randomness makes the contraction delineation assessment a difficult task that scorers must face in order to reduce subjectivity. The use of the TOCO as a score reference was excluded in this methodology based on the following considerations: (1) the existing mismatches between TOCO amplitude and the strength of the uterine contractions produces a poor accuracy of the onset and offset of the contractile events, particularly for subjects with high BMI; (2) it has been reported [14] that the sensitivity, positive predictive value, and false positive rate for the individual contractions using TOCO and EHG relative to the IUP are: 54.0%, 84.4%, 15.6% and 94.2%, 87.6%, 12.4%, respectively. This prompted the authors of this work to justify the option of not using the TOCO as a scoring reference. It was considered that, as far as contraction onset and offset delineation are concerned, the inaccuracy of the TOCO would surpass the effect of the relative randomness of the basal uterine activity in the EHG.
It is often observed that contractile activity in the EHG is not present in the TOCO due to the limited sensitivity of its mechanical transducer. Surely, the IUP would be the gold standard reference method; however, as previously mentioned it is only used in selected labor cases after membrane rupture.
The option of using an automatic scoring algorithm is currently unrealistic, taking in account that no standards exist, and the relative energy method accuracy may be still a matter of debate due to a lack of clear benchmarks. Following the strategy also adopted in other studies, an expert scoring was performed [1,20,24]. In fact, in this context, and lacking the IUP, the visual expert scoring methodology is currently considered a gold standard [8]. Regarding the onset and offset contraction determination, a certain degree of subjectivity is expected to be unavoidable due to the random components of uterine basal activity. The expert used the criteria explained in Table 2. The delineation accuracy only includes two values (50% and 100%). The 0% value was excluded since, if the contraction was identified as such, a minimal degree of delineation is present. Contractions not detected by the energy methods contribute to the false negative rate. Table 2. Criteria for contraction and delineation accuracy.

Classification (%) Definition
Contraction Accuracy 0 Contraction was detected 50 Contraction was partially detected 100 Contraction was not detected Delineation Accuracy 100 Contraction delineation is correct 50 Contraction delineation is partially correct Figure 5 illustrates two contractions with misaligned delineations relative to the baseline average (blue line). The contraction identified as (a) presents a misaligned right side and in contraction (b) both sides are misaligned relative to points 3 and 4. For both cases, a 50% accuracy rate was assigned.
Appl. Sci. 2020, 10, x 10 of 16 the contraction was identified as such, a minimal degree of delineation is present. Contractions not detected by the energy methods contribute to the false negative rate.

Classification (%) Definition
Contraction Accuracy 0 Contraction was detected 50 Contraction was partially detected 100 Contraction was not detected Delineation Accuracy

100
Contraction delineation is correct 50 Contraction delineation is partially correct Figure 5 illustrates two contractions with misaligned delineations relative to the baseline average (blue line). The contraction identified as (a) presents a misaligned right side and in contraction (b) both sides are misaligned relative to points 3 and 4. For both cases, a 50% accuracy rate was assigned. Figure 5. The contraction identified as (a) was ranked with a 50% delineation accuracy rate accounting for the misaligned right-side margin relative to point 2. The same applies to contraction (b), where both sides are misaligned relative to points 3 and 4. Figure 6 shows a case with 100% delineation accuracy, and Figure 7 illustrates an undetected contraction. Figure 5. The contraction identified as (a) was ranked with a 50% delineation accuracy rate accounting for the misaligned right-side margin relative to point 2. The same applies to contraction (b), where both sides are misaligned relative to points 3 and 4. Figure 6 shows a case with 100% delineation accuracy, and Figure 7 illustrates an undetected contraction.

Results
A total of 2382 contractions were scored. For each detection method the mean and standard deviation were determined regarding the contraction and the delineation accuracy. The results are presented in Table 3.

Results
A total of 2382 contractions were scored. For each detection method the mean and standard deviation were determined regarding the contraction and the delineation accuracy. The results are presented in Table 3.

Results
A total of 2382 contractions were scored. For each detection method the mean and standard deviation were determined regarding the contraction and the delineation accuracy. The results are presented in Table 3. The squared RMS got the best score in all three evaluated parameters. The Teager and the Hilbert envelope methods showed the worst performance in all parameters, particularly the false negative rate. Despite the wavelet energy estimator having lower contraction accuracy compared to the RMS, its standard deviation was roughly half that of the RMS. These two operators had similar performances for delineation accuracy.
One should also consider the very low false negative rate presented by the squared RMS estimator followed by the RMS estimator. In all, the false negative rates regarding all estimations presented a remarkably low count.
It could be anticipated that, providing that most of the contraction energy is within the obtained delineation limits, its signal spectral parameters should be well represented-namely, the peaks' locations, a feature widely used in EHG processing. In this regard, Figure 8 shows the wavelet spectrum for a selected contraction with 30% boundary variation between the five different detection methods. As far as spectral analysis is concerned, all the peaks' location estimations overlapped for this case. It is beyond the scope of this report to produce a statistical analysis for this matter, despite its relevance, for example, for classification algorithms based on the spectral peaks' locations. This will be addressed in future work.
The squared RMS got the best score in all three evaluated parameters. The Teager and the Hilbert envelope methods showed the worst performance in all parameters, particularly the false negative rate. Despite the wavelet energy estimator having lower contraction accuracy compared to the RMS, its standard deviation was roughly half that of the RMS. These two operators had similar performances for delineation accuracy.
One should also consider the very low false negative rate presented by the squared RMS estimator followed by the RMS estimator. In all, the false negative rates regarding all estimations presented a remarkably low count.
It could be anticipated that, providing that most of the contraction energy is within the obtained delineation limits, its signal spectral parameters should be well represented-namely, the peaks' locations, a feature widely used in EHG processing. In this regard, Figure 8 shows the wavelet spectrum for a selected contraction with 30% boundary variation between the five different detection methods. As far as spectral analysis is concerned, all the peaks' location estimations overlapped for this case. It is beyond the scope of this report to produce a statistical analysis for this matter, despite its relevance, for example, for classification algorithms based on the spectral peaks' locations. This will be addressed in future work.
The Hilbert envelope method was demonstrated to produce longer contraction estimations, thus being an interesting tool for EHG events such as the LDBF. This is clear in the last plot of Figure 4.

Discussion
The squared RMS produced the best results in all the evaluated parameters. Accounting for the respective standard deviations, the RMS stands below the wavelet energy operator as far as the contraction accuracy is concerned, but outperformed the latter-and all the other estimators-in terms of the delineation accuracy and false negative rate. The false negative rate of the squared RMS stands out as being substantially lower compared to the remaining estimators.
In the EHG framework, contraction detection and delineation are key subjects that may provide important information for long-term pregnancy monitoring and preterm risk evaluation algorithm development. Previous studies regarding preterm risk evaluation used the complete recorded EHG signal, thus overcoming the need for contraction detection [39]. In this case, it should be assumed that the included basal uterine activity does not impact the overall signal parameters, as was considered in a related work [40]. Nevertheless, for classification and clustering studies, it is expected Wavelet Spectrum (Arbitrary Units) Figure 8. Wavelet spectrum for the same contraction, using the five delineation methods. The curve overlap shows that, despite a 30% difference in contraction cut-offs, the energy contents are representative of the event.
The Hilbert envelope method was demonstrated to produce longer contraction estimations, thus being an interesting tool for EHG events such as the LDBF. This is clear in the last plot of Figure 4.

Discussion
The squared RMS produced the best results in all the evaluated parameters. Accounting for the respective standard deviations, the RMS stands below the wavelet energy operator as far as the contraction accuracy is concerned, but outperformed the latter-and all the other estimators-in terms of the delineation accuracy and false negative rate. The false negative rate of the squared RMS stands out as being substantially lower compared to the remaining estimators.
In the EHG framework, contraction detection and delineation are key subjects that may provide important information for long-term pregnancy monitoring and preterm risk evaluation algorithm development. Previous studies regarding preterm risk evaluation used the complete recorded EHG signal, thus overcoming the need for contraction detection [39]. In this case, it should be assumed that the included basal uterine activity does not impact the overall signal parameters, as was considered in a related work [40]. Nevertheless, for classification and clustering studies, it is expected to be required to work on separated contraction events. There has been an increased interest regarding the identification of the different contraction types in the EHG, for which a delineation operation should be performed. Elsewhere, the authors have published an EHG-based uterine contraction clustering analysis by means of the detected contractions using the methodologies presented herein [30]. The spectral properties of the Braxton Hicks [25] and two different types of Alvarez waves were obtained in that study [30].
In various studies, the contraction detection was visually performed, which is a time-consuming task [9,20]. Considering this, automatic contraction detection methodologies are sought as a step forward in the general framework of EHG processing-namely, in preterm risk evaluation, propagation studies, and contraction classification.
The present report describes five different contraction detectors (delineation included) based on the EHG energy bursts-a feature that stands out due to the increased cell-to-cell communication mechanisms leading to extra contractile activity.
The best result was obtained with the squared RMS estimation. Notwithstanding the relatively lower score of the Teager operator, this estimator was shown to be able to delineate long-duration EHG events, a feature that could be explored in future work. All the used estimator algorithms have low computational cost, making them a good choice for mobile platforms, having in mind home-based contraction monitoring.
A closely related study [2] that used an expert visual scoring method and the IUP as a reference reports a sensitivity of 94.2% and a positive predictive value of 87.6%. These results cannot be directly compared to those reported herein, due to the different scoring methodologies and all the subjects in the referred study being in active labor, and thus not in the context of continuous pregnancy monitoring.
In another related study [25], where a nonlinear correlation coefficient was used as a feature for contraction detection, the reported detection rates were 62.5 % (full detections), 37.5% (partial detections), and 100% (total detections). Comparatively, in the present report and selecting the best delineator/detector as the squared RMS, a contraction accuracy of 97.15 ± 4.66% and a delineation accuracy of 89.43 ± 8.10% are featured. The assessment of these comparative results should be made carefully, taking into account the different expert scoring methodologies.
The present work is a contribution to research on automatic contraction detection methodologies. It uses the most evident feature in a uterine contraction event: an energy burst. A layer of complexity is added due to the non-stationary nature of these energy bursts and the basal uterine activity from where they stand out. Unlike electrocardiograms, where predefined components whose wave shape is recognized and for which classification standards already exist, in the EHG case no benchmarks are yet available regarding wave component delineation and features. To summarize, this work presents five different energy burst delineation methods that have been widely used for other biomedical signals. Despite the low computational complexity of the presented methods, this study still fills the gap of the application of these well-known processes, with the advantage that they are fast and stable algorithms. A demand for EHG contraction detectors and delineators methods is forecast. The still-missing standardization rules regarding EHG analysis is a serious challenge in studies of this nature, and it is expected that the ever-increasing reports will eventually lead to some peer-agreed classification rules.