In Search of an Optimal FIR filter for ECG Delineation

Vessela Krasteva1, Irena Ilieva Jekova1, Todor Stoyanov1, Ramun Schmid2
1Institute of Biophysics and Biomedical Engineering, Bulgarian Academy of Sciences, 2Schiller AG


Abstract

Electrocardiogram (ECG) delineation refers to the process of identifying and localizing main components of the ECG waveform, including the P-wave, QRS-complex, and T-wave, whose accurate measurement is critical to ECG interpretation. Common noise sources, including baseline-wander, power-line interference, muscle and electrode-motion artifacts can distort the ECG waveform, resulting in erroneously detected, missed, early or late detected components. Noise effects are usually reduced by combining ECG waveforms from multiple cardiac cycles with similar characteristics. The resulting representative beat is assumed to be robust representation of cardiac activity, and is therefore often used by algorithms for ECG delineation. In contrast, delineation of individual beats in noisy raw ECG signals is a more challenging task. This study aims to search for an optimal finite impulse response (FIR) filter that reduces the errors of a specific ECG delineation algorithm applied to individual beats. This study optimizes the coefficients of a FIR filter by training the weights of a convolutional layer with linear activation function connected to an existing neural network for 12-lead representative beat delineation. The optimization criterion trains the filter so that the whole measurement system provides minimal binary cross-entropy loss between individual beat delineation of the P-wave, QRS-complex and QT-interval and the corresponding reference measurements on the representative beats by a commercial ECG analysis library (ETM v2.6.0, Schiller AG, Baar, Switzerland). On 20,955 representative and 223,042 individual beats in 12-lead ECG PTB-XL database, the existing ECG delineation algorithm presented time-error (TE) for P-onset (0.03+/-8ms, 3.18+/-12.8ms), P-offset (-0.11+/-7.4ms, 2.76+/-12ms), QRS-onset (0.1+/-3ms, 2.06+/-4.4ms), QRS-offset (-0.37+/-5.1, 0.75+/-10.4ms), T-offset (-0.11+/-9.5, 1.32+/-21.9ms), P-wave true positive rate (97.2%, 95.6%), true negative rate TNR (94.9%, 73.4%). After applying the filter, TE (mean and/or standard deviation) decreased up to 1.5ms (P-onset), 2ms (P-offset), 1.4ms (QRS-onset), 3.7ms (QRS-offset), 2.3ms (T-offset), P-wave TNR increased by 12.6%. Filtering improves delineation of individual beats.