Antepartum Fetal Monitoring through a Wearable System and a Mobile Application

Prenatal monitoring of Fetal Heart Rate (FHR) is crucial for the prevention of fetal pathologies and unfavorable deliveries. However, the most commonly used Cardiotocographic exam can be performed only in hospital-like structures and requires the supervision of expert personnel. For this reason, a wearable system able to continuously monitor FHR would be a noticeable step towards a personalized and remote pregnancy care. Thanks to textile electrodes, miniaturized electronics, and smart devices like smartphones and tablets, we developed a wearable integrated system for everyday fetal monitoring during the last weeks of pregnancy. Pregnant women at home can use it without the need for any external support by clinicians. The transmission of FHR to a specialized medical center allows its remote analysis, exploiting advanced algorithms running on high-performance hardware able to obtain the best classification of the fetal condition. The system has been tested on a limited set of pregnant women whose fetal electrocardiogram recordings were acquired and classified, yielding an overall score for both accuracy and sensitivity over 90%. This novel approach can open a new perspective on the continuous monitoring of fetus development by enhancing the performance of regular examinations, making treatments really personalized, and reducing hospitalization or ambulatory visits.


Introduction
In the last two decades, research has been very active in developing wearable devices and systems for medical-oriented applications, often aimed at continuously monitoring patients in their environment and during daily life activities.The need is a sustainable health system that can manage acute care (in hospital or emergency departments), and care of outpatients (mainly chronic), including healthy citizens during their normal life, in order to prevent possible diseases by means of tele-monitoring [1].
Until the most recent developments in Information and Communication Technologies (ICT), some limitations in connections and transmission rates allowed only collecting and sending few parameters in real-time, but nowadays it is possible to realize continuous surveillance of physiological signals.Thanks to the introduction of new miniaturized sensors and devices, together with the improvements in wireless transmission, the remote management of chronic diseases has become a reality, and studies prove that patients are willing to adopt it [2].
Nowadays, the switch to domiciliary care for non-critical medical issues is seen in many health care areas as a way to achieve better control over chronic diseases and consequently delay the occurrence of any complications, avoid unneeded hospitalizations, and reduce pressure over national budgets [3].Many exploitations of structured tele-monitoring systems have already been carried out in patients with heart failure [4,5].The CarelinkTM Network, for example, has been introduced by Medtronic to improve the management of patients suffering from heart failure that undergo treatments based on Implantable Cardioverter Devices (ICD) [6].The literature shows that whenever ICDs are coupled with a remote monitoring service, not only it is possible to earlier detect any problem concerning the devices themselves, but also the therapy may be better optimized and individualized for each patient [7].Even research projects investigating new treatments that pose significant threats to outpatients' health are increasingly relying on a real-time telemonitoring of clinical parameters for immediate processing and early detection of abnormal or hazardous conditions [8].
Furthermore, the great comfort of subjects in wearing miniaturized sensors, along with an increasing general health care policy of prevention, have promoted remote monitoring applications also in the healthy population.Recently, wearable systems have been adopted to monitor healthy subjects acting in extreme environments [9], performing highly risky activities such as firefighting [10], doing physical training [11], or wellness exercises [12].A boost in this direction is given by the appearance of new textile materials that allow embedding low-cost wearable sensors and computing devices in standard duty outfits.Sensorized garments combined with tele-monitoring services may therefore be applied also to healthy people for detecting signals in subjects while they are engaged in their daily activities with the aim of preventing or anticipating the occurrence of unusual or pathological conditions.
Pregnancy and fetal states may also effectively resort to tele-monitoring.Although pregnancy in itself is not a pathology, the fetal condition should be monitored as often as possible in order to prevent unfavorable outcomes.The literature shows that pregnant women could highly benefit by a remote monitoring service that is particularly effective for those patients and also helps in achieving a more efficient use of the health care [13,14].This is because the reduction of in-or out-stays for patients only undergoing routine examinations mitigates the shortages of beds in hospitals and reduces any related management costs.Therefore, it is desirable to design and implement wearable systems that allow the effective monitoring of pregnant women in different life conditions and evaluate both possible acute effects (emergency, risky conditions for the fetus), or non-acute effects related to unhealthy lifestyles.These factors, though not immediately life-threatening, may be the cause of pathologies in the long term.
The potential market for these systems is enormous.The number of deliveries in Italy is nearly 500.000every year and the public healthcare system foresees a minimum of 3 monitoring sessions for each pregnancy.However, a single exam in the last quarter is often not enough to completely assess the situation and take appropriate decisions.So the number of monitoring sessions in Italy can be higher than 1.5 M per year.
The most common exam for evaluating the fetal wellbeing is Cardiotocographic (CTG) monitoring, which consists of measuring Fetal Heart Rate (FHR) and mother uterine contractions.In fact, fetal wellness is very strongly related with heart functioning, which makes measuring the FHR so important.CTG technology is based on a doppler ultrasound probe placed on the maternal abdomen and can only be accomplished in hospital-like structures, since it requires the supervision of expert personnel.Recognition of the echoes generated by the opening and closing of the cardiac valves of the fetus allows for the measuring of the position of the beats in time and therefore the computing of the FHR.
In the last twenty years, advances in CTG analysis have improved the quality of FHR feature extraction in order to obtain reliable indications of disease development.Great contributions arrived from advanced processing methods that provided novel parameters that were able to discriminate fetal states and healthy vs. disease groups [15,16].These encouraging results pushed even more the research efforts to explore novel solutions towards FHR monitoring.Even if CTG is the most used technology, it still remains an indirect way to measure the fetal heartbeat.More importantly, it does not allow continuous FHR recordings, since data can only be collected at some certain fixed times, possibly separated by tenths of days if not by months.
For this reason, we started the Telefetalcare project [17], which aims to design and realize a wearable fetal tele-monitoring system that is able to collect FHR throughout the last period of the pregnancy.Its key point is the integration of a specific technology (i.e., wearable sensors and electronics) with consumer ICT devices (i.e., smartphones and tablets) and remote, high-level signal processing, data mining, and clinical decision support systems.Available methods of machine learning and artificial intelligence, applied to FHR, can be employed to improve diagnosis and prediction in pregnancy healthcare processes [18].Furthermore, the large amount of available data already classified in CTG analysis, both in normal and pathological fetuses, ensures a robust (solid) clinical reference for the development of a new monitoring system [19].In fact, rich clinical classified and annotated databases can be used as a knowledge source to generate reliable decision support systems.These approaches can open a new perspective on the continuous monitoring of fetal development: further information can be extracted by introducing novel analysis tools, which are more sensitive to fetal states both in healthy and stress conditions, by increasing the length, frequency, and quality of monitoring session.
Telefetalcare provides the opportunity to enlarge the time window of fetal and maternal data collection.It can enhance the performances of regular examinations, make treatments really personalized, and reduce the effort needed when a constant supervision is required.

Overview of the System
The system we are presenting here is the evolution of Telefetalcare [17], a project started in 2010 and aimed at developing a new pregnancy-wearable monitoring system, suited for domiciliary use.Although many different techniques are currently used to monitor FHR in the clinical practice (CTG, abdominal ECG, fetal scalp ECG, MECG, etc.), the primary need of realizing a wearable non-invasive and low-cost device encouraged the choice of measuring the abdominal Electrocardiogram (ECG).
Two major difficulties arise when using this technique: first, the separation of the maternal and the Fetal ECG (FECG) is compulsory, because they are both revealed through electrodes; second, the presence of the "vernix caseosa" during the 29th-31st weeks of the pregnancy makes it almost impossible to measure the FECG.The first problem has been solved through the use of multiple ECG leads and intelligent signal processing, as reported in the following, while the second still remains and limits the use of the system to the last weeks of pregnancy (32)(33)(34)(35)(36)(37)(38)(39)(40)(41)(42).
Moreover, when it comes to acquiring ECG signals, one of the problems faced by patients, as they start monitoring themselves, originates from their inability to properly position the electrodes.This happens because standard Ag/AgCl electrodes need to be correctly positioned and attached one-by-one using gel and glue, which is a challenging task for inexperienced users, such as pregnant women at home.For these reasons, we decided to design a wearable bodysuit provided with ECG textile electrodes specifically placed to measure abdominal FECG.
The Telefetalcare system encompasses a wearable unit, a compact electronic box for data preprocessing/transmission, and a smartphone/tablet that sends signals over the network to a remote diagnostic center and receives their results.The functional diagram of the whole system is shown in Figure 1.

The Wearable Unit
The wearable outfit consists of an elastic bodysuit made of cotton and Lycra TM that is provided with electrodes made of conductive textile fibers that are directly intertwined in the garment.The adoption of a wearable garment makes the use of the system a lot simpler, because the pregnant woman just has to wear it without bothering about its fitting or properly attaching and deploying the electrodes.Thus, an elastic garment was fabricated that was able to fit different body sizes while preserving the relative positions of the electrodes.
The sensing contacts are made of silver yarns directly sewn within the bodysuit whose elastic properties ensure suitable contact with the patient skin.Since textile electrodes rely on polarized and capacitive coupling with the skin, the need to use conductive gel is also avoided.
The combined mother and fetus ECG signals are obtained by measuring the differential voltage between each of the 8 abdominal electrodes and the reference one.Of course, a critical decision affecting Telefetalcare entailed choosing the right number and the position of the electrodes on the garment.The driving goal has been to select a pattern that is able to properly sample the mother abdomen independently of the position of the fetus in the uterus.A decision to limit the lead number to 8 was mainly imposed for technical reasons.First of all, each lead requires a separate circuit for analog processing, and the adoption of a larger number of leads (i.e., 16 or 32) would have significantly increased the dimension and the power consumption of the portable electronics.Moreover, increasing the lead number would also have dramatically increased the amount of data to be processed and transmitted, possibly causing data loss problems over the wireless link used by the portable electronic to communicate with the smartphone.Thus, even though a larger number of leads would have improved the performance of the device, resulting in enhanced reliability in FECG extraction, 8 leads plus a reference one were deemed to be a good compromise (9 textile electrodes).
The placement of the sensors on the bodysuit has been carefully investigated in the previous prototypes of the system, because the main goal of their placement was to maximize the FECG signal with respect to the maternal one.Several configurations were tested in order to identify the best solution.In all of them, the position of the electrodes was limited to the garment surface, privileging those spots that were not particularly subject to movement artifacts.
The configuration shown in Figure 2a was used during the first experiments.The reference electrode is positioned on the right side of the maternal chest, while the remaining ones are placed just below the abdomen.This configuration was initially selected for the high level of the ECG signal (i.e., >300 mV pp).However, the presence of an electrode (i.e., the reference one) very close to the maternal heart caused the appearance of a strong maternal component in the recordings, which was very difficult to remove in the subsequent FECG extraction phase.Thus, the configuration shown in Figure 2b) was then chosen where the reference electrode is placed on the navel and the remaining 8 ones are placed around it with radial symmetry.The overall amplitude of the signal is lower, but the SNR between Fetal and Mother ECGs is good enough to allow more efficient FECG extraction and Fetal QRS peak detection.

The Wearable Unit
The wearable outfit consists of an elastic bodysuit made of cotton and Lycra TM that is provided with electrodes made of conductive textile fibers that are directly intertwined in the garment.The adoption of a wearable garment makes the use of the system a lot simpler, because the pregnant woman just has to wear it without bothering about its fitting or properly attaching and deploying the electrodes.Thus, an elastic garment was fabricated that was able to fit different body sizes while preserving the relative positions of the electrodes.
The sensing contacts are made of silver yarns directly sewn within the bodysuit whose elastic properties ensure suitable contact with the patient skin.Since textile electrodes rely on polarized and capacitive coupling with the skin, the need to use conductive gel is also avoided.
The combined mother and fetus ECG signals are obtained by measuring the differential voltage between each of the 8 abdominal electrodes and the reference one.Of course, a critical decision affecting Telefetalcare entailed choosing the right number and the position of the electrodes on the garment.The driving goal has been to select a pattern that is able to properly sample the mother abdomen independently of the position of the fetus in the uterus.A decision to limit the lead number to 8 was mainly imposed for technical reasons.First of all, each lead requires a separate circuit for analog processing, and the adoption of a larger number of leads (i.e., 16 or 32) would have significantly increased the dimension and the power consumption of the portable electronics.Moreover, increasing the lead number would also have dramatically increased the amount of data to be processed and transmitted, possibly causing data loss problems over the wireless link used by the portable electronic to communicate with the smartphone.Thus, even though a larger number of leads would have improved the performance of the device, resulting in enhanced reliability in FECG extraction, 8 leads plus a reference one were deemed to be a good compromise (9 textile electrodes).
The placement of the sensors on the bodysuit has been carefully investigated in the previous prototypes of the system, because the main goal of their placement was to maximize the FECG signal with respect to the maternal one.Several configurations were tested in order to identify the best solution.In all of them, the position of the electrodes was limited to the garment surface, privileging those spots that were not particularly subject to movement artifacts.
The configuration shown in Figure 2a was used during the first experiments.The reference electrode is positioned on the right side of the maternal chest, while the remaining ones are placed just below the abdomen.This configuration was initially selected for the high level of the ECG signal (i.e., >300 mV pp).However, the presence of an electrode (i.e., the reference one) very close to the maternal heart caused the appearance of a strong maternal component in the recordings, which was very difficult to remove in the subsequent FECG extraction phase.Thus, the configuration shown in Figure 2b) was then chosen where the reference electrode is placed on the navel and the remaining 8 ones are placed around it with radial symmetry.The overall amplitude of the signal is lower, but the SNR between Fetal and Mother ECGs is good enough to allow more efficient FECG extraction and Fetal QRS peak detection.Figure 3 shows the last version of the bodysuit from the textile electrode's side, which is in contact with the maternal abdomen.These electrodes do not need the use of conductive gel and can adhere to the abdomen skin thanks to the elasticity of the bodysuit.

The Electronic Box
ECG signal conditioning, A/D conversion, and wireless transmission to the smartphone using a Bluetooth (BT) link are all carried out by means of an electronic box connected to the bodysuit through standard ECG cables, as shown in Figure 4.The box was specifically designed and realized through a 3D printer, in order to contain the two small boards devoted, respectively, to analog and digital circuits.Figure 3 shows the last version of the bodysuit from the textile electrode's side, which is in contact with the maternal abdomen.These electrodes do not need the use of conductive gel and can adhere to the abdomen skin thanks to the elasticity of the bodysuit.Figure 3 shows the last version of the bodysuit from the textile electrode's side, which is in contact with the maternal abdomen.These electrodes do not need the use of conductive gel and can adhere to the abdomen skin thanks to the elasticity of the bodysuit.

The Electronic Box
ECG signal conditioning, A/D conversion, and wireless transmission to the smartphone using a Bluetooth (BT) link are all carried out by means of an electronic box connected to the bodysuit through standard ECG cables, as shown in Figure 4.The box was specifically designed and realized through a 3D printer, in order to contain the two small boards devoted, respectively, to analog and digital circuits.

The Electronic Box
ECG signal conditioning, A/D conversion, and wireless transmission to the smartphone using a Bluetooth (BT) link are all carried out by means of an electronic box connected to the bodysuit through standard ECG cables, as shown in Figure 4.The box was specifically designed and realized through a 3D printer, in order to contain the two small boards devoted, respectively, to analog and digital circuits.
The analog circuit for signal pre-processing operates a bandpass filter in the frequency range of 0.05-128 Hz with a controllable gain.Signal amplification was mandatory in order to exploit the full dynamic range of the Analog to Digital Converter (ADC) (i.e., 0-3.3 V), since the mother QRS peak has a range of 100 uV-1 mV, and the fetal QRS peak recorded on the abdomen has an amplitude of only 1-100 uV.Thus, the circuit was designed with a gain of approximately 2000, in order to avoid ADC saturation in case of baseline wander due to artifacts.
The analog circuit for signal pre-processing operates a bandpass filter in the frequency range of 0.05-128 Hz with a controllable gain.Signal amplification was mandatory in order to exploit the full dynamic range of the Analog to Digital Converter (ADC) (i.e., 0-3.3 V), since the mother QRS peak has a range of 100 uV-1 mV, and the fetal QRS peak recorded on the abdomen has an amplitude of only 1-100 uV.Thus, the circuit was designed with a gain of approximately 2000, in order to avoid ADC saturation in case of baseline wander due to artifacts.The FECG recorded on the abdomen has a bandwidth in the range 0.05-100 Hz, which is compatible with a sampling rate at 256 Hz imposed by constraints of the BT transmission link.In fact, the 8 channels are all sent in real time to the device, since no high-level processing takes place on the hardware device, and further increasing the sampling frequency might have caused data loss problems due to the saturation of the BT link.Data are digitally converted by a 16 bit ADC.We decided to use a 16 bit ADC because of the very low amplitude of abdominal ECG recordings.A 12 bit ADC was actually tested in an earlier prototype, but it did not provide the required signal resolution.
The first experiments were accomplished using pre-existing boards dedicated to the acquisition of electro-encephalography signals.Each of those boards supported two differential leads and was based on the chips INA118U, which includes an instrumentation amplifier, and TLC274, which has 4 operational amplifiers.Both chips are produced by Texas Instruments.The original circuit layout was not modified, but the passive components (i.e., resistors and capacitors) were changed to achieve the required bandpass range (i.e., 0.05-128 Hz) and an amplification gain of 2000.
In order to reduce the power consumption and the overall circuit dimension, a new board was designed from scratch and built based on the chips INA333 and OPA2333 also from Texas Instruments, which have much lower current profiles.Moreover, a significant difference with the preliminary board consisted in introducing a driven-leg circuit into the new one.This circuit takes the signal from the inputs, sums and negatively amplifies it, and finally reintroduces the result into the patient leg with the aim of improving the performance in terms of noise rejection and signal quality.This allows a significant reduction of the alternating current interference.
A different board was used to digitally sample the signal and send the data stream through a BT link to the external device.This board may receive up to 8 analog inputs from the analog preprocessing boards, and a 16 bit ADC with 50 µV voltage resolution samples each channel at 256 Hz.The microprocessor ARM TR711FR2 manufactured by STMicroelectronics oversees the entire functioning of the circuit.The board is powered by a 3.6 V Li-Ion rechargeable battery, similar to those used for powering mobile phones, which is also used to power up the preprocessing analog boards and guarantees up to 6 h of life.
A button controls switching on and off the entire device, and a LED is provided, which shines red when the device is powered-on and turns green during data transmission.
A further improvement of the electronics has recently been introduced by Torti et al. [20], extracting FECG on a FPGA device, which enormously decreases the amount of data transmitted via the BT connection, as explained in the next section of the paper.Unfortunately, this new approach requires a complete redesign of the electronics, and it will be included in the next release of the system.The FECG recorded on the abdomen has a bandwidth in the range 0.05-100 Hz, which is compatible with a sampling rate at 256 Hz imposed by constraints of the BT transmission link.In fact, the 8 channels are all sent in real time to the device, since no high-level processing takes place on the hardware device, and further increasing the sampling frequency might have caused data loss problems due to the saturation of the BT link.Data are digitally converted by a 16 bit ADC.We decided to use a 16 bit ADC because of the very low amplitude of abdominal ECG recordings.A 12 bit ADC was actually tested in an earlier prototype, but it did not provide the required signal resolution.
The first experiments were accomplished using pre-existing boards dedicated to the acquisition of electro-encephalography signals.Each of those boards supported two differential leads and was based on the chips INA118U, which includes an instrumentation amplifier, and TLC274, which has 4 operational amplifiers.Both chips are produced by Texas Instruments.The original circuit layout was not modified, but the passive components (i.e., resistors and capacitors) were changed to achieve the required bandpass range (i.e., 0.05-128 Hz) and an amplification gain of 2000.
In order to reduce the power consumption and the overall circuit dimension, a new board was designed from scratch and built based on the chips INA333 and OPA2333 also from Texas Instruments, which have much lower current profiles.Moreover, a significant difference with the preliminary board consisted in introducing a driven-leg circuit into the new one.This circuit takes the signal from the inputs, sums and negatively amplifies it, and finally reintroduces the result into the patient leg with the aim of improving the performance in terms of noise rejection and signal quality.This allows a significant reduction of the alternating current interference.
A different board was used to digitally sample the signal and send the data stream through a BT link to the external device.This board may receive up to 8 analog inputs from the analog preprocessing boards, and a 16 bit ADC with 50 µV voltage resolution samples each channel at 256 Hz.The microprocessor ARM TR711FR2 manufactured by STMicroelectronics oversees the entire functioning of the circuit.The board is powered by a 3.6 V Li-Ion rechargeable battery, similar to those used for powering mobile phones, which is also used to power up the preprocessing analog boards and guarantees up to 6 h of life.
A button controls switching on and off the entire device, and a LED is provided, which shines red when the device is powered-on and turns green during data transmission.
A further improvement of the electronics has recently been introduced by Torti et al. [20], extracting FECG on a FPGA device, which enormously decreases the amount of data transmitted via the BT connection, as explained in the next section of the paper.Unfortunately, this new approach requires a complete redesign of the electronics, and it will be included in the next release of the system.

FECG Extraction
In Abdominal FECG (AECG) recordings, the information source is FECG even though Maternal ECG (MECG) and a broad spectrum of different noises (AC interference, movement artifacts, baseline wander, electrode contact) are superimposed on it.Among disturbing noise sources, the most significant is MECG.Fetal QRS (FQRS) might be up to 10 times smaller than Maternal QRS (MQRS), thus with a very low SNR.This implies that P and T fetal ECG waves could not be reliably detected, and the only event from FECG that could be extracted after serious pre-processing is the FQRS.In addition, the classical information used in antenatal monitoring consists of FHR time series, built by identifying R-R intervals in FECG (or an equivalent as in the case of CTG).
However, in our case, FECG might not be present in some of the 8 ECG leads, depending on the position of the fetus in uterus.Thus, the FECG extraction algorithm should be able to detect when FQRS detection is successful and, in those cases, to recognize which one of the 8 ECG leads sources is the best FECG.Both noise removal and selection of the best FECG channel are extremely complex tasks to accomplish.
The extraction of Fetal ECG in the current system is performed off-line.It is organized in different steps to satisfy the following specifications: it must be (i) automatic, (ii) easy to be implemented, and (iii) working with a limited number of ECG leads (8 in our system).
Literature proposes a vast number of algorithms for Fetal and Maternal QRS identification, MECG suppression, and FECG extraction.The two main families of algorithms for FECG extraction are (i) methods based on Blind Source Separation and Independent Component Analysis [21] and (ii) methods removing maternal QRS after an averaging and subtracting procedure [22,23].Although we explored both solutions, a method belonging to the second family is implemented in the actual release of the system.The algorithm consists of a modified and upgraded version of the Martens algorithm [24,25].
Before the algorithm application, it is necessary to submit Abdominal ECG (AECG) signals to five-step preprocessing: (e).Computation of the difference between X 50FILj and X MAj : Y j signals significantly enhance the high frequency components belonging to both fetal and maternal QRSs.

Detection of MECG
The algorithm starts with the localization of Maternal QRSs (adapted from [24]).QRS enhancement is based on Principal Component Analysis (PCA).The input is Γ, a [8xN] data matrix containing the eight Y j signals, each of the N samples, and the output is the first principal component C, representing the linear combination that yields maximum variance.Inter-signal correlation will be large for ECG related components, as it will be small in case of noise.Since FECG is not always present in the 8 channels, the signal C almost suppresses the FECG component.
C is divided into windows of 1 s, in order to be sure that at least a maternal QRS is contained in each window, and the absolute max (AMax) is computed in each window and temporally located.At this point, by taking a 100 ms window centered in AMax as single temporary MQRS template, the crosscorrelation between this MQRS template and the 1 s window is computed.The peak of crosscorrelation identifies the beginning of MQRS.MQRS peak is detected and located by finding the maximum within the next 100 ms after the crosscorrelation peak.Thus, by considering all windows, we obtain an array t(k) containing the time locations of MQRSs.
The algorithm then goes back to the Y j signals to extract the running MQRS template in each channel (Temp MQRSj ).

Construction of MQRS Template
For each Y j signal, a window of 100 ms centered in each t(k) is set (W MQRSj (k)).A running template Temp MQRSj (k) is then obtained by averaging ten W MQRSj (k) windows preceding the actual k in the Y j signal.The current MQRS is removed by subtracting, from the Y j signal, the Temp MQRSj (k) template, scaled by a value a j (k), which minimizes mean square difference between the current QRS and the template.
After averaging and MQRS template subtraction, we obtain 8 possible FECG signals:

Extraction of FHR Series
The extraction of FQRS from the F j s follows the same procedure applied for MQRS, except the enhancement based on PCA method, because fetal ECG is often visible in a small number (2 or 3) of abdominal leads only.Thus, no information is available about the presence of FQRSs in all 8 F j s.For this reason, FQRS detection is accomplished in all channels, despite what has been described for MQRS.
Detection of FQRS complexes on the F j s is obtained by dividing each F j in consecutive windows of 0.5 s, finding the absolute peak in each window and considering 60 ms around it as a temporary FQRS template.The crosscorrelation between this FQRS template and the 0.5 s window is computed.As for MQRS, the crosscorrelation peak identifies the beginning of FQRS.FQRS peak is detected and located by finding the maximum within the next 60 ms after the crosscorrelation peak.
This procedure gives 8 arrays tf j (k) containing the time locations of detected FQRSs (equivalent to R-R series).Fetal R-R interval extraction is unreliable, or fetal ECG is not detectable, when inter beat distance shows values that are far from expected and/or noisy.
In order to determine if one or more tf j (k)s is reliable, we compute a Quality parameter, as explained in the next paragraph.Figure 5 shows a chunk of a Y j signal (j = 3) with the detection of both MQRS and FQRS.).

Construction of MQRS Template
For each signal, a window of 100 ms centered in each t(k) is set ( ( )).A running template ( ) is then obtained by averaging ten ( ) windows preceding the actual k in the signal.The current MQRS is removed by subtracting, from the signal, the ( ) template, scaled by a value ( ), which minimizes mean square difference between the current QRS and the template.
After averaging and MQRS template subtraction, we obtain 8 possible FECG signals:

Extraction of FHR Series
The extraction of FQRS from the Fjs follows the same procedure applied for MQRS, except the enhancement based on PCA method, because fetal ECG is often visible in a small number (2 or 3) of abdominal leads only.Thus, no information is available about the presence of FQRSs in all 8 Fjs.For this reason, FQRS detection is accomplished in all channels, despite what has been described for MQRS.
Detection of FQRS complexes on the Fjs is obtained by dividing each Fj in consecutive windows of 0.5 s, finding the absolute peak in each window and considering 60 ms around it as a temporary FQRS template.The crosscorrelation between this FQRS template and the 0.5 s window is computed.As for MQRS, the crosscorrelation peak identifies the beginning of FQRS.FQRS peak is detected and located by finding the maximum within the next 60 ms after the crosscorrelation peak.
This procedure gives 8 arrays tfj(k) containing the time locations of detected FQRSs (equivalent to R-R series).Fetal R-R interval extraction is unreliable, or fetal ECG is not detectable, when inter beat distance shows values that are far from expected and/or noisy.
In order to determine if one or more tfj(k)s is reliable, we compute a Quality parameter, as explained in the next paragraph.Figure 5 shows a chunk of a signal ( = 3) with the detection of both MQRS and FQRS.The quality parameter [17] ranks fetal QRS detection according to the reliability level of the inter beat distance.
RR j (i) = t f j (i + 1) − t f j (i) The 8 Fetal RR series are ordered on the basis of the q j index from the lowest to the highest.Low q j values indicate good performances and allow selecting the lead (over the available 8's) with the best detection performance and the best fetal inter beat distance.
Figure 6 shows two examples of quality index.
The computation of the q j parameter, ranking the quality of extracted FECG and FHR, ends the algorithm application.The quality parameter [17] ranks fetal QRS detection according to the reliability level of the inter beat distance.
The 8 Fetal RR series are ordered on the basis of the qj index from the lowest to the highest.Low qj values indicate good performances and allow selecting the lead (over the available 8's) with the best detection performance and the best fetal inter beat distance.
Figure 6 shows two examples of quality index.

= ( ( + 1) − ( ) )
The computation of the qj parameter, ranking the quality of extracted FECG and FHR, ends the algorithm application.

FECG Extraction through Field Programmable Gate Array (FPGA)
As reported in the previous subsection, an alternative technological approach to FECG extraction has been already designed and tested in our laboratory.The solution implemented by Torti et al. [20] explores the development of a special purpose custom computational unit performing fetal signal extraction to achieve lower power consumption and faster processing times in view of a potential final Application Specific Integrated Circuit (ASIC) implementation.
In this case the FPGA-based FECG extraction unit exploits a well-known blind source separation technique called Infomax [26].It is one of the best methods in terms of reliability and documentation for implementing FECG extraction on a dedicated hardware circuit.The work in [20] describes the corresponding algorithm implementation; it produces eight different signals, which should be classified in order to correctly point out the channels related to mother (maternal signal), to fetus signal, or to noise.In addition, the classification is automatically performed and relies on a series of filter banks capable of highlighting the QRS complex, followed by different K-means instances.The architecture has been designed and implemented on an Altera Stratix V device.It is a high-end FPGA that provides the necessary hardware resources featuring relatively low power consumption.This architecture has been tested on a database made up of 343 real tracks.The results reported in [20] show that the developed architecture is real time compliant with a power consumption of about 0.5 W. In terms of elaboration speed, the proposed implementation outperforms the other solutions in the literature based on PIC, DSP and FPGA.In particular, the proposed architecture elaborates 4 s of recording in less than 30 ms.Moreover, the FPGA resource consumption of this architecture is low; therefore, it is possible to implement other functionalities, such as data encryption for the separated tracks.On the other hand, it is also possible to lower the power consumption by adopting a less performant device, such as an Altera Cyclone V device.

FECG Extraction through Field Programmable Gate Array (FPGA)
As reported in the previous subsection, an alternative technological approach to FECG extraction has been already designed and tested in our laboratory.The solution implemented by Torti et al. [20] explores the development of a special purpose custom computational unit performing fetal signal extraction to achieve lower power consumption and faster processing times in view of a potential final Application Specific Integrated Circuit (ASIC) implementation.
In this case the FPGA-based FECG extraction unit exploits a well-known blind source separation technique called Infomax [26].It is one of the best methods in terms of reliability and documentation for implementing FECG extraction on a dedicated hardware circuit.The work in [20] describes the corresponding algorithm implementation; it produces eight different signals, which should be classified in order to correctly point out the channels related to mother (maternal signal), to fetus signal, or to noise.In addition, the classification is automatically performed and relies on a series of filter banks capable of highlighting the QRS complex, followed by different K-means instances.The architecture has been designed and implemented on an Altera Stratix V device.It is a high-end FPGA that provides the necessary hardware resources featuring relatively low power consumption.This architecture has been tested on a database made up of 343 real tracks.The results reported in [20] show that the developed architecture is real time compliant with a power consumption of about 0.5 W. In terms of elaboration speed, the proposed implementation outperforms the other solutions in the literature based on PIC, DSP and FPGA.In particular, the proposed architecture elaborates 4 s of recording in less than 30 ms.Moreover, the FPGA resource consumption of this architecture is low; therefore, it is possible to implement other functionalities, such as data encryption for the separated tracks.On the other hand, it is also possible to lower the power consumption by adopting a less performant device, such as an Altera Cyclone V device.
This new solution implies a re-design of the electronics of the whole system, and it will be included in the next release of our system.

The Remote Monitoring Service
A fundamental element for an architecture delivering remote monitoring services is represented by the mobile device, which acts as a networking endpoint for the hardware device capturing signals.
In fact, the combination of those two devices implements a remote station that may be deployed anywhere, including the patient's domicile.That station is able to capture physiological signals and send them in real time to the hospital center where they may be perused by the staff.For our project, we decided to use a commercial smartphone as the mobile device due to its low cost compared to its high-end computational capability.Moreover, the patient is expected to already own a smartphone and be comfortable with it, further reducing the economic impact of the intervention.Finally, through the use of the smartphone the patient may acquire and send data virtually anytime and anywhere, with no additional requirement other than the availability of network coverage by the phone carrier to which she is already subscribed.The smartphone operates according to a store and forward paradigm, so that, whenever any problem is experienced with the carrier, unsent data are never lost.Instead, they will be cached in the internal smartphone memory waiting to be transparently transmitted as soon as the network connectivity is recovered.To implement the mobile app, we chose the Android TM platform because of its widespread availability on a large number of different devices with various capabilities.Furthermore, the open source approach adopted by Android TM makes available a large knowledge body about its internals that is shared among enthusiast developers.
In Figure 7, we portray the architecture of the mobile app, which is modeled after a multi agent paradigm [27] and was devised based on our experience in developing similar projects [28,29].The modularity of that framework supports the rapid prototyping of telemedicine services through the reuse of its components, thereby simplifying the switch to different medical contexts.This new solution implies a re-design of the electronics of the whole system, and it will be included in the next release of our system.

The Remote Monitoring Service
A fundamental element for an architecture delivering remote monitoring services is represented by the mobile device, which acts as a networking endpoint for the hardware device capturing signals.
In fact, the combination of those two devices implements a remote station that may be deployed anywhere, including the patient's domicile.That station is able to capture physiological signals and send them in real time to the hospital center where they may be perused by the staff.For our project, we decided to use a commercial smartphone as the mobile device due to its low cost compared to its high-end computational capability.Moreover, the patient is expected to already own a smartphone and be comfortable with it, further reducing the economic impact of the intervention.Finally, through the use of the smartphone the patient may acquire and send data virtually anytime and anywhere, with no additional requirement other than the availability of network coverage by the phone carrier to which she is already subscribed.The smartphone operates according to a store and forward paradigm, so that, whenever any problem is experienced with the carrier, unsent data are never lost.Instead, they will be cached in the internal smartphone memory waiting to be transparently transmitted as soon as the network connectivity is recovered.To implement the mobile app, we chose the Android TM platform because of its widespread availability on a large number of different devices with various capabilities.Furthermore, the open source approach adopted by Android TM makes available a large knowledge body about its internals that is shared among enthusiast developers.
In Figure 7, we portray the architecture of the mobile app, which is modeled after a multi agent paradigm [27] and was devised based on our experience in developing similar projects [28,29].The modularity of that framework supports the rapid prototyping of telemedicine services through the reuse of its components, thereby simplifying the switch to different medical contexts.As it transpires from the figure, the whole architecture is centered on Data Types, which is the core component supporting the store and forward paradigm.Data are saved either exploiting the Sqlite3 database or as plain text files.In our case, data representing patient information, such as demographic data, as well as any note written by the patient herself and concerning the specific details of the acquisition to be shared with the clinic staff, are stored exploiting the Sqlite3 relational structure.Sampled values are stored instead, exploiting the file paradigm that is more efficient for long time series.Data Types interacts then with the Synchronization module that implements the twoway data link with the clinic server.As it transpires from the figure, the whole architecture is centered on Data Types, which is the core component supporting the store and forward paradigm.Data are saved either exploiting the Sqlite3 database or as plain text files.In our case, data representing patient information, such as demographic data, as well as any note written by the patient herself and concerning the specific details of the acquisition to be shared with the clinic staff, are stored exploiting the Sqlite3 relational structure.Sampled values are stored instead, exploiting the file paradigm that is more efficient for long time series.Data Types interacts then with the Synchronization module that implements the two-way data link with the clinic server.
The Synchronization module exchanges data with the clinic server implementing the retry and error recovery policy.This component has been successfully exploited and validated in different areas of remote monitoring involving home patients [30,31].Two additional modules in the architecture are represented by the Manual Input and Automatic Input.The former allows the use of the touch-screen for manually entering data, while the latter exploits BT for connecting with an external device.Finally, a set of Plugins are used to customize the behaviour according to a specific domain, prompting the user for input or providing specialized views over data for the chosen application (i.e., Patient Diary or Local Views).In our case, those implement the remote control for the hardware capturing device and display data to the user as shown in Figure 8, which includes a plain ECG signal.The Synchronization module exchanges data with the clinic server implementing the retry and error recovery policy.This component has been successfully exploited and validated in different areas of remote monitoring involving home patients [30,31].Two additional modules in the architecture are represented by the Manual Input and Automatic Input.The former allows the use of the touch-screen for manually entering data, while the latter exploits BT for connecting with an external device.Finally, a set of Plugins are used to customize the behaviour according to a specific domain, prompting the user for input or providing specialized views over data for the chosen application (i.e., Patient Diary or Local Views).In our case, those implement the remote control for the hardware capturing device and display data to the user as shown in Figure 8, which includes a plain ECG signal.At the clinic site, a server is located acting as a backend and including a synchronization engine that collects all the signal traces sent by the various patients through their apps.The server also implements the logic for extracting the FHR from the combined signals acquired and an interface for their perusal.Its operation is modeled as follows.It stores into the patient's Personal Health Record (PHR) the incoming 8 tracks that are sent after a successful recording stamped with the date-time of their acquisition.Any recording then undergoes a processing pipeline composed of three stages.The first stage includes a filter suppressing the noise superimposed to the recording, as well as the mother ECG signal, in order to emphasize the fetal component.The second pipeline stage selects the most interesting track out of the 8 available ones on which FHR will be measured, while the third one eventually accomplishes the actual FHR measurement.
The server functionality is exposed through a web application that is accessed by the doctors overseeing the service.That app includes the usual facilities for selecting patients and navigating across the sessions recorded for each one of them.Once a session is selected, the application displays the 8 tracks, as well as the computed FHR for visual inspection.All tracks may also be exported for further analysis using specialized software tools.

Results
The new prototype was tested on five voluntary pregnant women at the 37th week of gestation during everyday life conditions.They all gave us the informed consent for this testing phase.

Garment
All subjects reported easiness of wearing the elastic bodysuit and great comfort during the recording sessions.The abdominal ECG was recorded while subjects were sitting on a chair and At the clinic site, a server is located acting as a backend and including a synchronization engine that collects all the signal traces sent by the various patients through their apps.The server also implements the logic for extracting the FHR from the combined signals acquired and an interface for their perusal.Its operation is modeled as follows.It stores into the patient's Personal Health Record (PHR) the incoming 8 tracks that are sent after a successful recording stamped with the date-time of their acquisition.Any recording then undergoes a processing pipeline composed of three stages.The first stage includes a filter suppressing the noise superimposed to the recording, as well as the mother ECG signal, in order to emphasize the fetal component.The second pipeline stage selects the most interesting track out of the 8 available ones on which FHR will be measured, while the third one eventually accomplishes the actual FHR measurement.
The server functionality is exposed through a web application that is accessed by the doctors overseeing the service.That app includes the usual facilities for selecting patients and navigating across the sessions recorded for each one of them.Once a session is selected, the application displays the 8 tracks, as well as the computed FHR for visual inspection.All tracks may also be exported for further analysis using specialized software tools.

Results
The new prototype was tested on five voluntary pregnant women at the 37th week of gestation during everyday life conditions.They all gave us the informed consent for this testing phase.

Garment
All subjects reported easiness of wearing the elastic bodysuit and great comfort during the recording sessions.The abdominal ECG was recorded while subjects were sitting on a chair and reading a book.We collected more than 10 h of abdominal ECG in different sessions.The average duration of each tracing was 30 min ± 4 min.
All women had a normal course of pregnancy, and we verified "a posteriori" that they had a physiological delivery and the newborns were healthy.
In order to prepare for signal acquisition, it was only required that the subject connected the leads coming out of the sensorized garment to the electronic box, which is dedicated to analog preprocessing, analog-to-digital conversion, and digital processing.She should also turn on the smartphone, activate the Telefetalcare app installed on it, and check that the two components were successfully paired and data transmission over the BT wireless link started.

Electronics
An essential prerequisite of our solution was the reduction of any cost related to its deployment and management.To achieve this goal, we decided to devoid the electronic box acting as the signal-capturing device of any display, on the basis that smartphones already have screens smart enough to serve for that purpose.Furthermore, mobile devices make also available the primitives for easily programming their windowing system to achieve an effective user interaction through simple touch gestures.Thus, the mobile device besides offering the possibility of remotely sending the acquired signals is also used as the control unit of the hardware device.The use of BT technology allows pairing the hardware device with a wide range of receivers.Besides mobile devices, also laptops, hubs, or docking stations could be able to pair with it inasmuch they are endowed with a suitable application.
Once the mobile terminal was successfully connected through the BT link to the hardware device, the patient started the acquisition and observed in real time on its screen the signals being acquired.This feature is particularly useful, since it gives immediate feedback to the patient about the proper operation of the system.Thus, if a patient experiences any problem with one of the channels, possibly due to a lead that is not properly connected and has become noisy, the acquisition may be stopped, the lead may be repositioned, and the acquisition may be started again.

Transmission
We opted for a deferred transmission, in which the mobile terminal acts according to a store-and-forward paradigm saving a track of variable length growing at a rate of nearly 256 kBytes for every minute of sampling.When, according to the directions given by the health care staff, the expected length was achieved (usually 30 min), the patient could stop the acquisition and select whether to send that acquisition to the center, keep it locally, or discard it altogether.

Signal Quality
The quality of the electrocardiographic recordings was then compared to other commercial devices, showing good results and flat band response in the frequency range 0.1-100 Hz, as reported in [11].During the tests, data coming from the abdominal ECG leads of the wearable garment were preprocessed and transmitted to a laptop through BT connection.A graphical user interface was developed to display signals in real time; also, on the laptop that was used to test the algorithms for the extraction of FECG from abdominal recordings, the fetal QRS and the signal classification according to the quality index were identified.

Performance of Classifiers
The performance of the actual FECG extraction algorithm was evaluated on real data acquired using Telefetalcare, achieving reliable results.
For each recording, accuracy (AC) and sensitivity (SE) of fetal and maternal QRS detection were quantified.An expert clinician evaluated the 1st-ranked traces with q value < 0.1s (according to the defined quality parameter) by counting the number of (i) QRS correctly detected (TP), (ii) missed QRS (FN), and (iii) QRS wrongly detected (FP).
AC and SE were computed in the following way: AC = TP TP + FN + FP SE = TP TP + FN Classification accuracy = correct predictions/total predictions × 100.For maternal QRS detection, we obtained an overall accuracy AC = 98.52% and sensitivity SE = 99.5%.For fetal QRS detection, overall AC = 91.26%and SE = 92.94%.The FHR time series were then analyzed at the medical center (University of Naples Federico II) using the software we developed (2CTG2) and the most recent algorithms for the multiparametric analysis [32] and classification [18].All subjects showed parameters belonging to the normal ranges, as we selected healthy pregnant women.
In this testing phase, we did not ask pregnant women who were at risk or had known fetal pathology to participate.For this reason, we do not report results on the classification of fetal conditions.The large amount of data obtained from the application of classification parameters to Fetal Heart Rate data from CTG recordings confirmed their ability in the fetal state classification [33].These results were used to design the processing architecture.
The next step of our project will be to use the system in collaboration with the Obstetrics Clinic and to record tracings from a large population of pregnant women, comprising subjects at risk or with a known fetal pathology, in order to check the classifying algorithms and to generate warnings and alarms through our mobile application.

Discussion
In the past decade, there have been many attempts to exploit wearable monitoring systems to provide better care for patients.As a result, no convincing evidence emerged that these systems provide a cost effective solution to the problem of promptly detecting any situation that requires medical action [34].As suggested in [35], the main reason for that is not due to intrinsic technical failures or limitations but to the underestimation of the organizational issues involved for their adoption.This becomes a sensible topic, since the majority of remote monitoring efforts have been addressing the treatment of patients affected by chronic diseases with the aim of promptly detecting any symptom calling for an action in order to avoid or decrease the onset of complications.
While there is a great potential for remote monitoring in this area [36], the long term perspective of chronic diseases, mainly involving elderly patients, poses a higher burden on the organization side.With respect to this, there is a lack of guidelines for the implementation of long term home tele-health solutions, as well as no consensus on specific clinical indicators universally trusted by clinicians drawing on data that may be automatically acquired or directly provided by patients.Those aspects, combined with the failure to account for a broader evaluation context also encompassing legal, ethical, organizational, and practical aspects, are delaying the mainstream adoption of home monitoring system for chronic patients [37].
In this context pregnancy, although it does not represent a chronic disease, can be considered like a time-bounded chronic risky condition, and home-monitoring pregnant women involves the same organizational problems as monitoring chronic patients.However, if remote monitoring is conceived of as a whole "service" comprising wearable devices for collecting signals, electronics for transmitting data, and suitable software and algorithms for analyzing data supporting the clinician specialist to take decisions on the basis of the analyzed data, the likelihood of achieving a successful "tele-monitoring" system increases enormously.
The paper describes the design and development of an end-to-end system for monitoring FHR during pregnancy.The whole system relies on a wearable sensorized garment for acquiring abdominal FECG recordings, a telemedicine module to send data to a clinic center, and a clinic server equipped with software applications able to perform an advanced quantitative analysis of the FHR variability signal through non-linear and soft computing algorithms to obtain the best classification of the fetal condition.The remote wearable device can be used by pregnant women at home without the need for external support by clinicians.
On the technical side, a recent work by Jezewski et al. [38] demonstrated the equivalence of abdominal FECG and Doppler Ultrasound (CTG) methods, in terms of ability of clinical parameters to distinguish between normal and pathological fetuses.This fact supports the remote use of advanced signal processing methods already developed for CTG analysis antepartum in the clinical center deputed to the tele-monitoring service [13].Moreover, a recent review paper on telemonitoring in obstetrics [39] shows "the added value, for both mother and child, of telemonitoring used in prenatal follow-up program" and suggests that it can be recommended for pregnant women at risk.
Our system, within a limited set of pregnant women, demonstrated both accuracy in measuring and extracting FHR and comfort for the patients, who can check the fetal condition while staying at home by means of a low cost wearable device and a reliable telemedicine service.

Figure 1 .
Figure 1.The Functional Diagram of the Telefetalcare System.

Figure 1 .
Figure 1.The Functional Diagram of the Telefetalcare System.

Figure 2 .
Figure 2. Relative positioning of the electrodes on the mother abdomen (above) and their configuration on the elastic bodysuit (below).

Figure 3 .
Figure 3.The new version of the bodysuit, viewed from the internal side.

Figure 2 .
Figure 2. Relative positioning of the electrodes on the mother abdomen (above) and their configuration on the elastic bodysuit (below).

Technologies 2018, 6 , 16 Figure 2 .
Figure 2. Relative positioning of the electrodes on the mother abdomen (above) and their configuration on the elastic bodysuit (below).

Figure 3 .
Figure 3.The new version of the bodysuit, viewed from the internal side.

Figure 3 .
Figure 3.The new version of the bodysuit, viewed from the internal side.

Figure 4 .
Figure 4.The block diagram of the hardware capturing device (left) and its box (right).

Figure 4 .
Figure 4.The block diagram of the hardware capturing device (left) and its box (right).
(a).AECG recordings submitted to a 50 Hz digital FIR notch filter.It removes 50 Hz power-line interference, in a very sharp and selective way.Surrounding frequency components are preserved (better than a notch analog filter).(b).Baseline wander and high frequency noise removal from the output signal at step 1 through a FIR pass-band filter (3 to 80 Hz).(c).Resampling of all 8 signals at 1000 Hz (T = 1 ms) in order to obtain the X 50FILj signals (j = 1 . . .8) (d).X 50FILj signals submitted to a low-pass filter, moving-average, order 30 (like a moving window of 30 ms, with cutoff frequency 15 Hz), and results stored as X MAj signals.

Figure 5 .
Figure 5. Maternal and Fetal ECG after the pre-processing phase (Y j = X 50FILj − X MAj , j = 3), in which MQRSs (red diamonds) and FQRS (black dots) are recognized and stored as t(k) and tf j (k), respectively.

Figure 6 .
Figure 6.Two examples of quality index computation in FECG signals.Left panel show a reliable lead, and right panel refers to a lead in which the FQRS and F interbeat estimation were unreliable.

Figure 6 .
Figure 6.Two examples of quality index computation in FECG signals.Left panel show a reliable lead, and right panel refers to a lead in which the FQRS and F interbeat estimation were unreliable.

Figure 7 .
Figure 7.The computational architecture of the remote monitoring service used by Telefetalcare.

Figure 7 .
Figure 7.The computational architecture of the remote monitoring service used by Telefetalcare.

Figure 8 .
Figure 8.A snaphot of the mobile device while it is capturing a plain ECG.

Figure 8 .
Figure 8.A snaphot of the mobile device while it is capturing a plain ECG.