Test-bed
A test bed can be setup using C. The data set used for testing in this module was a subset of the MIT-BIH Noise Stress test available online at www.physionet.org. To evaluate sensitivity to noise, one can read different noise level recordings; here, we analyze three in particular from the Physionet Noise Stress Test tool, selecting 3 different Signal to Noise Ratios (SNR): 24 dB, 18 dB, and 0 dB.
First, download all of the compilers and specialized libraries for gathering ECG data, initialize storage spaces, processing signals stored in a certain format, formatting outputs for consistency and re-use in other algorithms, etc. This is all contained in the WFDB library toolkit. Then, download a specific heart rate file of your choice from the Physionet database and run one of the C programs containing one of the available algorithms under the physiological signal processing header. These algorithms are designed to output a Physionet-compatible annotation file. This annotation file can then be processed manually by running the instantaneous heart rate algorithm (ihr). Using this setup also allows one to save the output of the algorithm as a regular annotation file. This ensures that in the future, the setup could be used to read annotation files and save them directly onto a memory storage unit for processing elsewhere.
The test here constructed consists of running each one of the three algorithms on 3 different data files from the noise stress test. The annotations are compared to reference annotations available on the Physionet-website. Using Physionet’s “bxb” program, one can compare the annotations beat by beat. The bxb program outputs the two key parameters of interest in the analysis of heart beat detection: Sensitivity and Positive Predictivity.
Sensitivity (Se) = TP/(TP+MB)
Positive Predictivity (+P) = TP/(TP+FP)
TP: number of true positive detections.
MB: number of false negatives or missed beats
FP: number of false positives; the system detected a beat where the reference annotation showed no beat.
Results
Table 1
| Noisy Signal with 0dB SNR | Noisy Signal with 18dB SNR | Noisy Signal with 24dB SNR | Non-Noisy Signal | |||||
| SQRS | WQRS | SQRS | WQRS | SQRS | WQRS | SQRS | WQRS | |
| QRS Sensitivity: | 54.91% | 99.53% | 92.80% | 100.00% | 97.70% | 100.00% | 96.55% | 99.97% |
| QRS Positive Predictivity: | 77.75% | 57.68% | 95.18% | 98.46% | 98.63% | 99.64% | 99.76% | 99.27% |
As can be seen from Table 1, the WQRS algorithm is overall more robust and tolerant to noise than the SQRS algorithm, particularly in the Sensitivity ratio. To note, however, is the situation that occurs to WQRS at 0dB noise, wherein the SQRS actually obtains a better Positive Predictivity ratio. This indicates that the WQRS formula is particularly adept at correctly noting beats and rarely misses beats, but is less capable of avoiding false positives at high noise levels. However, the WQRS also suppresses information in the ECG signal that we do not need i.e. the P and T waves which also lends to the filters effectiveness. Given that the overall spread from the other noise levels favors WQRS more, it seems best to side with WQRS for most applications.