Simulator of Foetal Phonocardiographic Recordings and Foetal Heart Rate Calculator

Nowadays, the classic diagnostic method to monitor general foetus well-being using the foetal heart rate conditions, ultrasonic cardiotography, is called into question. A valuable alternative is foetal phonocardiography, a passive and low-cost recording of foetal heart sounds. This paper presents a software which generates synthetic foetal phonocardiographic recordings simulating different recording conditions (by modifying noise level). From a real foetal phonocardiographic recording this software calculates the foetal heart rate. The software was developed using information picked from the literature especially for identifying the waveforms and characteristics of foetal and maternal heart sounds, and the different noises involved in real phonocardiographic recordings. Considering the possibility to simulate different recording situations and physiological or pathological foetal conditions just by modifying some parameters, this simulator software can be useful for testing different foetal-heart-rate extraction algorithms, like the authors’ one. In this paper are presented the different postulates used for developing this software.


Introduction
Monitoring the variations in foetal heart rate (FHR) provides up-to-date information about the general foetus well-being. Currently the routine clinical tool for recording the FHR is Doppler Ultrasonographic Cardiotography (CTG). The measurement is based on the Doppler principle detecting the movement of the heart wall by the frequency change of the reflected ultrasound beam [1].
However, some limitations are still related to this technique. It is quite expensive, some pathologies and anomalies of cardiac functionalities are not detectable (it considers only the movements of the outer surface, consequently it does not provide any information about the inner part of the heart) and there is no strong evidence that a long application of ultrasounds is harmless for the foetus.
Furthermore, nowadays telemedicine takes an important role in our lifestyle, for this purpose the devices used by patients should be easy to use and low-cost what's not the case of the CTG technique [1,2].
FMCG requires complex and expensive devices for data acquisition [3] so it is not suitable for everyday use. Recent advances in fECG extraction techniques have made fECG a good low-cost alternative but in the case of extracting the foetal heart rate (FHR) alone the fECG is not the best choice because placing electrodes on the mother abdomen is time consuming and not easy for the mother [3].
According to the literature, fPCG, due to its cheapness, passiveness and usability appears as the best alternative for CTG [1,3,4,5]. Further, with this technique we can detect abnormalities, that we cannot detect with the three formerly methods mentioned, such as "heart murmur", split effect extra systole [1,4,5]. The preliminary evaluation done by Baskaran and Sivalingam [6] has shown, for example, that there are significant differences in the characteristics of waveforms corresponding to foetal heart sounds between intrauterine growth retarded and normal fetuses in antenatal period. The PCG technique performs a recording of UC by means of a usual pressure transducer and a passive (no energy beam transmitted to the fetus), fully non-invasive and low-cost acoustic recording of foetal heart sounds (FHS). This signal can be captured by placing a small acoustic sensor on the mother's abdomen without the use of gen and, if appropriately recorded, it is a very useful sensitive sig-nal in providing clinical indications [4].
However, the acoustic signals extracted from the mother's abdomen is heavily contaminated by noise that raises serious signal processing issues for determining the FHR. The major fPCG noise sources include [3][4][5]: • Acoustic noise produced by fetal movement • Acoustic noise produced by contraction of mother's uterus • Maternal digestive sounds • Movements of measuring sensor during recording • External noise • Maternal respiratory and heart sounds.

Simulation software
In the fPCG-monitoring area, due to the highlighted difficulties in sounds recognizing and their processing, a simulator, capable to simulate different foetal conditions, can be useful as a teaching tool for demonstration to medical students. Moreover, few fPCG-recording databases exist so, the programmer have few data to test their FHR-extraction algorithms, a simulator could help them to improve their algorithms. A fPCG simulator was implemented in 2012 [5], and the software presented in this paper uses the same base.
As it is precisely described in section 2, the software processing can be cut into two parts, Fetal Heart Sounds (FHS) Simulation and Noise Simulation. By setting up some parameters, the user is able to simulate different gestational ages, or different recording conditions.

FHR Extraction algorithm
As soon as the simulator has been designed the authors have implemented an FHR-extraction algorithm. Firstly, the algorithm has been tested on simulated fPCG signals and then on real fPCG signals, collected from different databases [3,5,7,8]. The program has been developed using the algorithm for FHR-estimation of Ruffo M., Cesarelli M., Romano M., Bifulco P. and Fratini A. as a model. This algorithm is still in early stages, none comparisons with results obtained on ECG (the reference) has been carried out yet.

2.
Application description and functionalities

Material
The two distinctive algorithms have been merged into a MATLAB standalone application.
Either the simulator algorithm model and the FHR calculator algorithm have been implemented using: The compiler used for the standalone applications was the MATLAB Compiler Toolbox.

58
Journal of Biomimetics, Biomaterials and Biomedical Engineering Vol. 39

General description
First of all, we have to know that for the fetuses we can detect two heart sounds, respectively named S1 and S2 (for first and second heart sounds). They respectively match with the closure of the mitral & tricuspid valves and the closure of the pulmonary valves respectively. The standalone application is composed of 2 mains parts: • First, a fPCG simulator signal allowing to generate fPCG signals by setting up different parameters (Sampling frequency, initial fetal heart rate and mother heart rate, week of pregnancy, noise setup). The significance of these parameters is explained in the 2.1 subsection. • On the other hand, from a fPCG signals (real or synthetic) the software is able to detect S1, calculate FHR from this S1 detection and plot the FHR. In this software is included fPCG signals collected from 3 Physionet databases: If the signal that the user wants to analyze is not in those databases, the signal can be picked up from the user's computer.

Fetal PCG simulation
Actually, fPCG signal can be expressed like: where x(t) is the composite signal consisting of Fetal Heart Sounds (FHS) signal, s(t), combined with noise, n(t).

Fetal Heart Sounds Simulation
The FHS signal can be modelled as a sum of almost periodically recurring deterministic "wavelets". In this model, FHS signals were simulated by a sequence of frames, each of them includes the couple of S1 and S2 which were modelled by two Gaussian-modulated sinusoidal pulses. The centre frequencies of the Gaussian pulses simulating S1 and S2 (respectively F1 and F2) were chosen according to the results of the pilot study done by M. Cesarelli and his team [5] and depending on the Gestation Week (WG) (see figure 3). S1S2 Ratio (S1S2R) was set according to the pilot study (see table 2) and according to the literature S1-S2 inter-distance (SSID) in ms is set as a function of the FHR value: Tab. 1. Parameters estimated by the pilot study [5].

%AS1 12%
Each frame of the FHS simulated signal has to correspond to a heart cycle, in theory its length should be variable according to the variability of heart rate, but in the algorithm its length was computed as the inverse of the FHR value, while the FHR value changes the length of the frame changes, and the initial FHR value is chosen by the user. The maximum signal amplitude was conventionally set equal to 1, considered corresponding to the saturation value of the generic fPCG device. According to the results of a pilot study S1 amplitudes were not fixed but they were considered variable around an average value (heuristically chosen equal to 0.7). Therefore, S1 amplitude was in the range 0.7 +/-%AS1 where %AS1 described the maximum variation in percentage from the average value (see Tab 1). S2 amplitude was computed as product of S1 amplitude and S1S2R.

Noise Simulation
In Like for the FHS, mS1-mS2 inter-distance (mSSID) in ms is a function of the MHR value: mSSID = 0.2 * (60,000 / mhr) + 160 ms (3) In any cases, mHS separation is possible in frequency domain, because it is charac-terized by a lower frequency range than FHS.

Environment noise and Mother-Fetus-movement noise
According to the literature, Noise due to vibrations created by maternal body organs (due to maternal digestion, respiratory muscular movements) and by foetal movements (MFN) have low amplitude with main frequency spectrum components from 0 Hz to 25 Hz while noise due to unwanted sounds from the environment (EN) is of high frequency (100 Hz -20 000 Hz) with higher amplitude. MFN and EN were simulated by passing a white noise through respectively a fifth order Butterworth low-pass filter with cut-off frequency limit of 25Hz and a fifth order Butterworth high-pass filter with a cut-off frequency limit of 100 Hz.

Simulated generic noise of fPCG recording device
The last noise simulated is a white Gaussian noise (WGN) with zero mean which simulates the generic noise of the fPCG device.

Fetal Heart Rate Calculation
The foetal heart rate calculation algorithm of this software is based on S1 detection by means of a threshold. S1 Peak detection is done on several steps: • S1 peak detection is not done on the fPCG signal directly. First of all, the fPCG signal analyzed is low-pass filtered in order to keep the envelope signal only. We can call this low-pass filtered fPCG signal: fPCGf. When the fPCG signal is displayed on the software, the peak time positions are signaled as red crosses (see it in section 3 results and discussion).

Results
The user can set the parameters on the right (Sampling frequency, Initial fetal and mother heart rates, Week of pregnancy, different noise amplitude). On the screen, the simulated signal is displayed with red crosses that signal the time peak positions estimated by the FHR-calculator. At the bottom, on the left, the spectral density is displayed while the calculated FHR is displayed at the bottom on the right, see Fig. 2. Fig. 2. Screenshot of the fPCG simulation part of the software.

Journal of Biomimetics, Biomaterials and Biomedical Engineering Vol. 39 61
The user can choose a signal from the databases available on the top. Then the signal and the Fetal Heart Rate will be automatically displayed. If the signal that the user wants to analyze is not available from the databases implemented in the app, he can select it from his computer by clicking on "Load File". The signal will be automatically displayed, but to calculate and display the Fetal Heart Rate, the user has to click on "Calculate Tachogram", see Fig. 3. Fig. 3. Screenshot of the FHR-Calculator part of the software. Figure 4 shows the the fPCG signals in the spectral domain of a fetus at different gestation ages (34 and 40). There is a noticable frequency shift, which is a key factor to consider when creating the fHR-Calculator. Fig. 4. Frequency spectra of fPCG signals in 34th (upper) and 40th (lower) week of gestation.

Discussion and Conclusion
This software can't be considered as the final accomplishment, some improvements must be done for this purpose.

a) fPCG Simulation
None tests have been carried out to validate how good is this generating model. To test it, the authors should have showed 10 seconds of two fPCG signals to a group of doctors. One would be a real recording, and the other one a signal simulated by this software. Then the doctors would have to choose between both signal which one is the real fPCG signal. With the results, a contingency table would be built to have statistical data.
The model could be improved by modifying the Fetal Heart Sounds shapes if the user wants to simulate a pathological state of the fetus.

b) FHR Calculator
As told before, none tests have been done on this part too. To validate those results, they should be compared to the results obtained by the cardiotography technique which still is the reference. When we have a look, on the time positions signalized by the red crosses when we plot the signal analyzed, we can see that the precision of this algorithms could be improved. One trail could be to find a more adequate way to calculate the threshold at each loop.