A Mattress-Integrated ECG System for Home Detection of Obstructive Sleep Apnea Through HRV Analysis Using Wavelet Transform and XGBoost Classification - Fitrieyatul Hikmah, Nada; Setiawan, Rachmad; Amalia, Rima; Syulthoni, Zain Budi; Nugroho, Dwi Oktavianto Wahyu; Syakir, Mu’afa Ali (Department of Electromedical Engineering, POLTEKKES KEMENKES SURABAYA, 2025)
Obstructive Sleep Apnea (OSA) is a potentially life-threatening sleep disorder that often remains undiagnosed due to the complexity of conventional diagnostic methods such as polysomnography (PSG). Currently, there is a lack of accessible, non-invasive diagnostic solutions suitable for home use. This study proposes a novel approach to automate OSA detection using single-lead electrocardiogram (ECG) signals acquired through non-contact conductive fabric electrodes embedded in a mattress, enabling unobtrusive monitoring during sleep. The main contributions of the proposed study are a mattress-embedded contactless ECG monitoring system eliminating the discomfort of traditional electrodes, and an advanced signal processing framework integrating wavelet decomposition with machine learning for precise OSA identification. ECG signals from 35 subjects (30 male, 5 females, aged 27-63 years) diagnosed with OSA were obtained from the PhysioNet Apnea-ECG database, originally sampled at 100 Hz and up-sampled to 250 Hz for consistency with experimental recordings from healthy volunteers tested in various sleep positions. Signals were recorded non-invasively during sleep in various body positions and processed using the Discrete Wavelet Transform (DWT) up to the third level of decomposition. The processing of ECG signals involved Heart Rate Variability (HRV) analysis, which was applied to extract information in the time domain, frequency domain, and non-linear properties. By analyzing HRV on the respiratory sinus arrhythmia spectrum, the respiration signal was obtained from ECG-derived respiration (EDR). Feature selection was performed using ANOVA, resulting in a set of key features including respiratory rate, SD2, SDNN, LF/HF ratio, and pNN50. These features were classified using the XGBoost algorithm to determine the presence of OSA. The proposed system achieved a detection accuracy of 96.7%, demonstrating its potential for reliable home-based OSA diagnosis. This method improves comfort through non-contact sensing and supports early intervention by delivering timely alerts for high-risk patients