{'fraction_non_alphanumeric': 0.026196928635953028, 'fraction_numerical': 0.0036133694670280035, 'mean_word_length': 5.087912087912088, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Real-Time R-Wave Detection Based on Self-Adaptive Differential Threshold Method

R-wave detection is a fundamental step for analyzing and recognizing electrocardiogram (ECG). This paper proposes a real-time R-wave detection method based on self-adaptive differential threshold method. The proposed method is improved based on the traditional differential threshold method. The traditional differential threshold method is to determine the location of R-wave by judging whether the value of the difference of the signal exceeds fixed threshold. We adapt self-adaptive threshold in our paper. Firstly, the ECG signal is differential and square wave is identified. Secondly, threshold is initialized and adjusted, and threshold adjustment consists of two aspects, i.e. amplitude threshold and time threshold. The algorithm can automatically adjust thresholds to adapt to such ECG changes as QRS morphology and heart rate. The ECG data collected by the hardware device were used as a validation set to evaluate the performance of the detection. The experimental result shows average accuracy can reach 99.85%.