Abstract
OBJECTIVE: Accurate detection of inspiratory onset and offset in the diaphragm electromyographic signal (EMGdi) is clinically relevant to assess patient-ventilator interaction in COPD patients undergoing non-invasive ventilation (NIV). Manual annotations are time-consuming and subject to inter-observer variability, highlighting the need for reliable automatic methods. METHOD: We developed a fully automatic algorithm to detect EMGdi activity cycles and their onset/offset timing in overnight NIV recordings. Four ECG suppression approaches were combined with root mean square (RMS) and fixed sample entropy (fSE) envelopes, and a novel bias correction strategy based on inspiratory-to-basal signal-to-noise ratio (I2BSNR) was introduced. Performance was compared with double-blind annotations from two independent experts. RESULTS: In a cohort of 10 severe COPD patients (9212 annotated cycles), the best configuration (adaptive filtering with fSE exponential envelope) achieved F[Formula: see text], with onset bias -28 ms (SD 270 ms) and offset bias + 120 ms (SD 292 ms). We show that fSE-based envelopes consistently outperform RMS in onset/offset detection, and that I2BSNR-based correction reduces systematic bias to within accepted clinical timing windows. CONCLUSIONS: The proposed method provides accurate and robust onset/offset detection of EMGdi during NIV in COPD patients. This enables reliable quantification of patient-ventilator asynchronies such as ineffective efforts and delayed cycling, offering direct clinical value for optimizing nightly ventilator settings in severe COPD. Clinical and Impact: Reliable detection of patient inspiratory activity offers a practical tool to guide real-time ventilator adjustments and reduce patient-ventilator asynchronies.