Multiple timescale statistical filter for corrupt RR-series

Interbeat or RR intervals obtained from an electrocardiogram (ECG) signal often exhibit spikes arising from missed or incorrect QRS wave detections. The causes of such errors are varied, but these artifacts can lead to large errors in the calculation of the power spectrum, or other time-frequency measures, and must be filtered out. A filter is presented here, which detects artifacts by keeping track of the statistical properties of the RR-series at three timescales: one global and two local scales. The resulting filter shows good flexibility and adaptive properties to changing statistical properties of the signal. The multiple timescale filter is selective in its action and does not affect any RR intervals other than those adjudged to be erroneous. In the instances in which the filter modifies noisy RR intervals, it produces consistent timestamps for the resulting RR-series, a property that is especially important when the Lomb periodogram is employed for spectral analysis of unevenly spaced data series.