Algorithm for the Representation of Parameter Values of Electrocardiogram

Important parameters that need to be known from the results of cardiac examination using Electrocardiograph is the parameter value of PQRST amplitude peak on each lead. Peak P is associated with Atrium depolarization, QRS waves associated with ventricle depolarization and peak T associate d with ventricle repolarization. The PQRST peak values on each lead to date are still manually calculated using small boxes on the ECG paper. Manual calculations lead to less accurate results and calculated waiting times. Less accuracy can lead to misdiagnosis while waiting times can result in increased disease stage. In this article we have been able to represent the values of PQRST amplitude peak and cardiogram in each cycle on each lead of the electrocardiogram. Continuous signal Electrocardiogram (ECG) examination results, in sampling at certain frequencies to obtain discrete data which is the amplitude as a function of integer numbers (N). The maximum amplitude value of each cycle is peak R. The peak time duration R to peak R (dR) is used as the time period of each cycle. A 1.5dR reversal of RN + 1 reverses the starting point of the cycle (sc) while the 0.5dR duration reversal of RN + 1 will be obtained by the end point of the cycle (ec). The maximum and minimum amplitude values between sc and peak R are peak P and peak Q respectively, while the minimum and maximum values between peak R to ec are peak Q and peak T respectively. Discrete data from Physionet MIT-BIH and bmeuwg are used as data to obtain PQRST peak electrocardiogram parameter values in each cycle.


Introduction
Electrocardiogram (ECG) observation as a result of examination of heart condition is emphasized primarily for peak amplitude of PQRST [1]. Amplitude P for Atrial depolarization, QRS complex for depolarization ventricle and amplitude T for ventricle repolarization [2]. In certain cases, pathologic Q waves indicate left ventricle hyperthrophy, T inverse indicates infarct myocard, and ST segment indicates either Ischemia or Injury [3]. Value determination is generally done by counting small squares as a background on the ECG paper traversed by Electrocardiogram waves, or using a ruler [4]. Electrocardiograph devices of certain brands and classes will display these values on the ECG paper, but are generally limited to Lead II only [1], [5]. Attempts to determine the PQRST amplitude values in some leads have been widely performed by researchers such as [6][7][8]. Figures 1 and 2 illustrate a standard clinical examination cardiogram on ECG paper using a 12-lead electrocardiograph. The examination results of all Electrocardiograph devices are cardiograms, but not all of them are equipped with parameter information values, whereas parameter value information is important. In Figure 1, the cardiogram presentation without the parameter value information (a) when at (b), the cardiogram presentation with limited information of some parameter values. To obtain the parameter values on the other lead (peak amplitude, segment and interval), manual counting is required using a small box on the ECG paper. Manual calculation guidelines in 1 cycle using ECG paper boxes are shown in Figure 2 [9]. Manual calculations take time to prolong the time of diagnosis. heart disease is progresive, so if not immediately done diagnosis enforcement will increase the stage of disease or cause death of the patient.
In this research, PQRST algorithm is used to obtain ECG and cardiogram parameter values from 12-lead discrete data. ECG discrete data obtained from the results of biosignal examination of heart at the frequency of 250 Hz and 1 kHz. The acquisition of ECG parameter values and cardiogram of cardiogram results will no longer be required for manual calculations and ECG paper so that it will speed up the diagnosis. Heart disease is progressive (time-lapse) [10][11], therefore the faster the value of the parameters is known, the faster the action of diagnosis is made. Taking a diagnostic action will prevent the occurrence of higher stage stages or even life safety. This study aims to obtain the values of cardiogram.discrete parameter results of examination of the patient's heart condition by using PQRST algorithm. Discrete data of the examination results are processed using software that has been designed based on PQRST algorithm.

Normal condition parameters
The heart can function as a pump due to contraction and relax ation of the heart muscles [1], [12]. Heart muscle can contract as it passes by Impulse that travels from pacemaker to Purkinje fibre [13]. The existence of an autonomic impulse from a SA node that periodically causes the onset of periodic cycles alternately on Atrium or ventricle [14]. Table 1 shows 1297 the values of the Heart condition parameters and Table 2 shows the wave morphology whil e Figure 3 shows the electrical system of the Heart and the sides of the Heart examined.  Multiple cycle recording is used to calculate frequency, rate rhythm, recognize rhythm type, determine axis or recognize wave morphology. Selection or Determination of one cycle of examination results is used to look at heart abnormalities such as enlargem ent of the space (hypertrophy), Arrithmias (pacemaker disorders), conduction disturbances (disruption of electrical pathways), Coronary Heart Disease (Ischemia, Injury, Infarct), Pre-NSA is faster/via other pathways), and others (hyperkalemia, hypokalemia, hypercalcemia, hypocalcemia due to metabolic disorders, drug effects) [15]. Standard clinical examination uses 12-lead [16] where the wave periodisation consists of wave cycles in the Heart for Lateral, Inferior, Septum and Anterior sides [17].

Research methods
PQRST algorithm is a sequence of stages intended to obtain ECG parameter values from discrete data [18]- [19]. The parameter values are values of amplitude (peak P, peak Q, peak R, peak S and peak T), of segment (PR, ST) duration, of Interval (PR, QS, QT, and ST) duration and heart rate in each cycle. Stages in the PQRST algorithm are presented in  1. Peak Q: lowest amplitude value between Npeak R-80ms s/d Npeak R* 2. Peak P: highest amplitude value between Sc s/d peak Q 3. Peak S: lowest amplitude value between Npeak R s/d Npeak R+150ms* 4. Peak T: highest amplitude value between peak S s/d Ec * [21] In Figure 6, the value of the wave P duration is determined based on the start wave P (Ps, namely the first lowest value before the amplitude peak P and end wave P (Pe), namely the first lowest wave Pafter the amplitude peak P. The value of the wave T duration was determined based on the start wave T (Ts), namely the first lowest value before the amplitude peak T and the last wave T (Te),namel the first lowest value after the amplitude peak T. The determination of the value of the wave GRS duration is made based on the start wave Q (Qs), namely the first highestvalue before the amplitude pak Q and the last wave S (Se), namely the first highest value after the ampltiude peak S.

Results and Discussion
The representation of the results of the data of the patients' examination using the ECGd 12-lead is given in Figure 9 in terms of the cardiogram and the parameter values, respectively. As the proposed method, discrete data from lead II is used as referenc e lead for processing of calculation data. The N integer position that has been obtained for the PQRST peaks in each cycle lead II is also used as the integer N position for the cycle on the other leads. The data value in Figure 9 is the parameter value data for the selected cycle, ie for the peak amplitude (PQRST) parameter, the duration of the segment (PRs and STs) and the interval duration (PRi, STi, QTi and QSi).
The data file in Figure 9 (a) is the discrete data that is sampled with a frequency of 250 Hz so that each N represents 4 ms. Input lead is chosen lead II, the integer range (N) is selected 1 to 1500, the selected chat is lead I. Based on that input, peak R cycle 1 position is located on N363 and peak position R cycle 2 on N539 so the duration of cycle 1 dR) is 176 (N539-N363). The initial position of cycle 1 (Nsc) is N539-1.5 (176)=N275 while the end of cycle 1 (Nec) is N539-0.5 (176)=N451. Amplitude max between N275 to N363 (peak P) is -0.0198 located on N328 and the min amplitude between N275 to N363 (peak Q) is -0.296 located on N355. Amplitude max between N363 to N451 (peak T) is -0.3105 located at N418 and the min amplitude between N363 to N451 (peak S) is -0.8347 located on N369. Figure 9 (b) shows a 12lead cardiogram based on reference lead II.

Conclusion
Software designed in this present research may represent values of amplitude (P, Q, R, S and T), segment (PR, ST) duration, interval (PR,QS, QT, ST) duration and of heart rate in each cycle. Lead I or lead II may be used as reference for the peak R threshold. N position of the amplitude R may be made based on the filtering results of the maximum amplitude value. The duration between RN dan RN+1 (dR) is the Nth cycle where the start cycle (sc) is 1.5xdR and the end cycle (ec) is 0.5xdR. Printout of the examination results using this Electrocardiography (ECGd) may made from ordinary sheet (hvs, cd) so no sheet special for ECG is needed.