# Robust U-Nets for Fetal R-Peak Identification in Electrocardiography
## 1 Introduction  
Fetal heart rate (FHR) and fetal heart rate variability (FHRV) are crucial indicators derived from fetal heart monitoring (FHM) that help predict potential complications or changes in fetal health, such as intrauterine growth restriction, fetal arrhythmia, and an increased risk of perinatal death [1, 2]. Therefore, the ultimate goal of FHM is to accurately obtain FHR and FHRV, which relies on the precise detection of fetal R-peaks. Non-invasive fetal electrocardiography (NI-FECG) is a promising FHM technique that enables continuous and real-time monitoring by capturing fetal electrocardiographic signals from abdominal electrocardiograms (AECGs) [3]. The AECG signals obtained are a mixture of maternal electrocardiogram (MECG), fetal electrocardiogram (FECG), and various artifacts. The typical method for extracting FHR (and subsequently FHRV) from AECG involves estimating and removing the MECG, leaving a noisy FECG signals, to which existing peak detection algorithms (designed for adult) are used to detect the fetal R-peak locations. Existing peak detection methods face significant limitations when applied to FECG signals due to inherent challenges in morphology, signal overlap, and noise sensitivity. Traditional QRS detection algorithms rely on morphological features such as amplitude, slope, and duration, but these struggle to adapt to fetal signals because of fundamental differences between fetal and adult ECG patterns. Additionally, distortions introduced during FECG extraction further obscure fetal R-peaks, reducing detection reliability. A major complicating factor is the spectral and temporal overlap between maternal and fetal ECG signals, making separation difficult. Since fetal R-peaks (\(\leq\)60 \(\upmu\)V) are much smaller in amplitude than maternal R-peaks (100-150 \(\upmu\)V), they are easily masked within the composite signal [4]. Moreover, extracted FECG signals often exhibit a low SNR, exposing a critical weakness in conventional peak detection methods [5]. Techniques like the Pan-Tompkins Algorithm (PTA), which integrate squared signals over a moving window, are prone to misinterpreting high-frequency noise as QRS complexes, leading to false positives. Previous studies [6; 7; 8] used PTA to detect fetal R-peaks after removing MECG, but the detection accuracy decreased significantly when detecting low signal-to-noise ratio signals. These limitations underscore the need for more robust, fetal-specific detection approaches that account for morphological variability and improve noise resilience. [PERSON] et al. [9] proposed an adjustment to the traditional PTA to better interpret FECG features. Specifically, their method modified the parameters of the traditional PTA to account for the differences in heart rate, QRS complex amplitude, and QRS duration between fetal and adult ECG signals. The modified algorithm incorporates a bandpass filter with a frequency range of 9-27 Hz, an 80 ms moving window, and an R-peak corrector algorithm, thereby enhancing the detection reliability of noisy FECG signals. However, as a modification of the traditional PTA, it does not leverage advanced signal processing or machine learning techniques. Consequently, its ability to learn complex patterns or dynamically adapt to changes in fetal ECG signals is limited. In contrast, the deep-learning-based method proposed in this research aims to address these limitations by proposing a robust deep-learning-based algorithm to effectively extract and learn meaningful features from noisy data (As another research direction, advanced denoising algorithms can be applied before peak detection. The state-of-art algorithms include a diffusion model [10], forward-backward dynamic mode decomposition (FBDMD) method [11], and retentive network [12]), rendering them more reliable for real-time monitoring applications. The U-Net architecture was originally developed for 2D image segmentation tasks and has achieved remarkable success across various applications [13; 14; 15; 16].