Automatic Detection of Characteristic Waves in Electrocardiogram Lucia Billeci1, Lorenzo Bachi1, Maurizio Varanini1 1Institute of Clinical Physiology, National Research Council of Italy (IFC-CNR), Pisa, Italy Abstract The goal of automatic ECG analysis is to assess the clinical status of the heart system as accurately as possible, and the identification of P and T waves plays a significant role in this matter. This works presents original algorithms for the detection of P and T waves. These algorithms are based on the morphological and temporal characteristics of the electrocardiogram. To test and compare the algorithms’ performance, we considered the QTDB and MIT-BIH Arrhythmia annotated databases. The developed algorithms obtained a good performance for the detection of both peaks. In particular, in both the QTDB and MIT-BITH database the P wave detection algorithm obtained considerably higher performance than those presented in the literature (QTDB: 95.87% vs 89.05%; MIT-BITH: 84.65% vs 83.36% for Lead 1). The T wave detection algorithm, achieved best performance than those in literature in the QTDB (89.05% vs 87.49%) while in the MIT-BITH database results were almost comparable to those reported in the literature. These findings suggest the high potential of the proposed simple algorithms for P and T wave detection in ECG. 1. Introduction A typical ECG consists of a quasi-periodic succession of groups of waves (PQRST) representing the cardiac cycle. The P wave represents the depolarization that spreads from the sino-atrial node throughout the atria, the QRS complex corresponds to the ventricular depolarization, while the T wave corresponds to the ventricular repolarization phase of the heart cycle. The morphology of the P wave provides relevant information concerning intra-atrial conduction, hypertrophic conditions of the atria and atrioventricular conduction. In some pathological conditions the morphology of the T wave may change from beat to beat [1]. The correct identification of P and T waves is extremely important for an appropriate diagnosis of cardiac problems. In particular, accurate P wave detection and recognition of its variations is relevant in clinical diagnosis of supra-ventricular arrhythmia as well as for confirming the presence of ventricular arrhythmia [2]. Moreover, the exact delineation of P wave is required in the identification of atrial fibrillation [3, 4]. On the other side, the detection and delineation of T wave is required for the identification of potentially fatal arrhythmia, myocardial infarction and acute coronary syndrome [5]. The identification of P and T waves is traditionally performed by cardiologists which visually inspect signal morphology. This process is time-consuming and requires expert human resources with specialized education and practice. Therefore, the automatic analysis of ECG for the detection of characteristic waves can be a useful tool for the early detection of cardiac abnormalities and the prevention of their quick progress. Although different automatic approaches have been proposed in literature for the detection of on, off and peak location of P and T wave of the ECG signal [6,7], the results are still unsatisfactory. This is also due to the limited availability of annotated databases on which the algorithms can be trained and tested. Moreover, these methods have often a high computational cost, making them unusable for real-time applications. Furthermore, the performances of these methods are often not comparable because the Authors use different tolerance window in defining True Positive (TP) events. In this paper, we present a novel algorithm which is based on the morphological and temporal characteristics of ECG, for a fast and accurate detection of P and T waves. 2. Methods Two different algorithms were implemented for P wave and T wave detection. These algorithms were applied on the two leads of the selected databases. Since the ability to detect P and T waves critically depends on the correct positioning of R peaks, our algorithms were evaluated considering annotated R peaks. The performance of the P wave and T wave detection algorithms was then determined by comparing the detected fiducial points with the annotation of the P and T wave in the databases. Specifically, the peaks were detected for comparison with