*2.6. Implementation Details*

For the purpose of experimental assessment of our method, the adaptive ECG sampling algorithm was implemented in C++ on a Windows-based PC platform, however, due to moderate complexity, it may be easily transferred to a portable or wearable device with floating-point arithmetic. Heartbeat detection and wave delineation procedures were used without modification from the firmware of Ascard 6 bedside interpretive electrocardiograph. The accuracy of wave delineation is not critical due to a smooth shape of aMRF. Apart from the cardiology-oriented procedures, second contribution to the computational complexity comes from the translation of uniform to non-uniform representation. The use of cubic splines-based interpolation instead Aldroubi iterative algorithm reduces the calculation costs.

The finite impulse response (FIR) filter with 6 dB/octave (i.e., 20 dB/decade) slope has been used for low-pass anti-alias filtering of discrete uniform ECG. Unlike a regular design where the number of taps weighting the sequence of delayed input samples is fixed, we used a tunable fractional-delay filter. Respective theory and literature review are presented in [38] or [39], and such filters are also available in a recent Matlab toolbox and available as FPGA implementations [40]. As the result of exploring different design variants, we selected the filter order *N* = 10 which was the best compromise between cut-off frequency tuning range, phase flateness degree, and computational cost. Anti-alias filtering is

directly followed by signal resampling. This procedure uses regular cubic splines interpolation, which is known as optimally matching two differently sampled signals and avoids discontinuities in the sampling rate function.

The sampling interval information (see Equation (4a), Figure 4) was collectively used for all simultaneous leads. Its value was quantized to 6 bits, yielding *P* = 64 possible values linearly assigned to durations of sampling interval so as *ls* = *Ts* + *<sup>p</sup>* <sup>64</sup> (*Tm* − *Ts*) i.e., between 2 ms and 10 ms with a 0.125 ms step (or between 2 ms and 20 ms with a 0.281 ms step).
