Accuracy and Characteristic of Electrocardiographic Signal from Mobile Biomedical Sensor

Based on the Global Burden of Disease and the Institute for Health Metrics and Evaluation 2014-2019, heart disease is the highest cause of death in Indonesia. One way to deal with this disease is through early detection by reading the electrical signals of the heart. Therefore, the technology for recording the electrocardiographic signal is developing rapidly. Recently, there have been many uses of biomedical sensors to record the electrical activity of the heart by utilizing internet facilities and without cables. This study discusses the accuracy and characterization of cardiac signals recorded by the portable KardiaMobile 6L against the Fukuda M.E Cardisuny type C100 clinical electrocardiograph (ECG). The data are taken from 9 patients using both devices simultaneously. ECG signals from the two devices are digitized using web plot digitizer to obtain the RR interval values. The clinical ECG produces 6 ECG signals (as short data). Meanwhile, the KardiaMobile produces ECG signals for 30 seconds (as long data- and five sequential ECG signals can be sampled as short data). Accuracy is done through linear regression, percent difference, and root mean squared error for the heart rate in two devices and RR interval from ECG signals. They provide excellent goodness of fit measures for the linear regression. The percent difference is still in the reliability of the devices. The value of RMSE is very low. Characterization of ECG signals is done by t-test between two array RR interval data from two leads for the same device. Using KardiaMobile, the RR interval value of short data is not significantly different from long data for a subject with normal sinus rhythm. The RR interval value of long data and short data between two leads is not significantly different. Using clinical ECG, the RR interval value of short data between two leads is not significantly different. Therefore, KardiaMobile has an accuracy similar with a clinical electrocardiograph in determining HR and is effective for analyzing dynamic changes based on RR intervals.


Introduction
Ischaemic heart disease and hypertensive heart disease were in number two and number eight from the top ten deadliest diseases in Indonesia.According to WHO data, in 2019, there were 115.94 deaths out of 100,000 population due to heart disease [1].One way to control this non-communicable disease is through early detection by reading the heart's electrical signals.Therefore, technology for recording heart electrical activity is developing rapidly.Cobra4 electrophysiology with standard limb can be used to measure the heart's electrical signals in lead I, the recording results of which can be downloaded in data lines for further analysis [2,3].The next development is the emergence of a device capable of recording the heart's electrical activity by utilizing internet facilities and without using cables, known as the Mobile Biomedical Sensor, such as the KardiaMobile 1L, which records heart signals on lead I to detect irregularities with the heart rhythm (atrial fibrillation, bradycardia, tachycardia), and then KardiaMobile 6L which is also able to detect sinus rhythm with PVC (Premature ventricular contraction), sinus rhythm with SVE (Supraventricular Extrasystole), and sinus rhythm with wide QRS [4].In 2019, KardiaMobile 6L received approval from the FDA (The United States Food and Drug Administration) [4].KardiaMobile determines the heart rate and heart rate condition from data recorded on lead I.However, until now, the 12-lead Electrocardiograph is still used as a clinical standard; this research uses the 12-lead Fukuda M.E Cardisuny type C100.
This research aims to analyse the accuracy and characterization of electrocardiographic signals from a mobile biomedical sensor.We simultaneously measured the patient using a mobile biomedical sensor and a clinical electrocardiograph to obtain two electrocardiograms.Heart rate variability from each electrocardiogram was analysed through the heart rate and RR intervals.For accuracy, the heart rate and RR intervals are tested through linear regression values [5], root mean square error [5], and the percent difference between the two devices.For characteristic of electrocardiographic signal, we determine the average value and standard deviation of the RR interval [6].Then, the t-test value is tested for the RR interval between two leads on the same electrocardiograph.

Basic Theory
An electrocardiogram (ECG) displays a graph of heart electrical activity in potential difference on body surface versus time.The potential difference between two points on the surface of the body is measured using electrodes.This research uses results from standard and augmented limb leads.
We can model the human body as an infinite homogeneous medium to know how an electrocardiogram is made.It assumes that each myocardium cell has the same distance from two electrodes placed on the surface of the body at point A and point B, as shown in Figure 1.
Figure 1.Geometry for calculating a potential difference between two points B and A caused by a dipole moment  [7] The potential difference between two points at   and   positions that have distance  from a dipole moment , can be written as follows.(1) In the electrical activity of the heart,  represents the direction of propagation of depolarization waves in heart muscle cells, and  represents the direction of the limb leads.According to equation (1), the potential difference in the electrocardiographic signal is positive if  is in the direction of , is zero (at baseline) if  is perpendicular to , and is negative if  is in the opposite direction to .ECG has six waves: P, Q, R, S, T, and U.These waves are repeated continuously.The P wave (when the atria are depolarized), the Q wave (when the septum is depolarized), RS waves (when the ventricles are depolarized), the T wave (when the ventricles relax), and U wave (when the Purkinje fibers relax, but U wave always does not appear).The RR interval is the time interval between two consecutive R waves on the ECG, as shown in Figure 2. The RR interval is important in HRV to determine whether the person has heart problems or not.For example, if the values of the RR interval are clearly varied between one another, the person is indicated to be experiencing atrial fibrillation.If the RR interval less than 0.6 second in relax condition, the person is indicated to be experiencing tachycardia.

Figure 2.
Waves formed on the ECG and RR interval [8] This study only considers limb leads using three electrodes placed at RA, LA, and LL.The limb leads view of the heart in the frontal plane, envisioned as a giant circle marked off in degrees, as shown in Figure 3b.The limbs are extensions of the leads so that the potential is measured where the limb joins the body.Vectors connecting the standard limb electrodes for a typical patient are given in Figure 3a.[8] and (b) Frontal plane with a circle marked off in degrees [9] The three potential differences for limb lead I, II and III are: The three potential differences for augmented limb lead aVR, aVL, and aVF are: ECG signals are analyzed based on the time domain through heart rate and RR interval: average, standard deviation, percent difference (PD), and Root Mean Square Error (RMSE).The percent difference equation can be written as follows.
where HRKM and HRC are heart rate from the readings of KardiaMobile and clinical electrocardiogram respectively, RRKM and RRC are RR interval values determined from KardiaMobile and clinical electrocardiogram respectively.Meanwhile, the RMSE equation can be written as follows.
where  is subject-,  is total number of all subjects.
The electrocardiogram is analyzed by comparing two leads on the same device using a t-test.The ttest is carried out by looking at the p-value; if it is less than 0.05, the two data groups are significantly different.The t-test in this research is two tail type.A two-tailed t-test is used to identify the statistical difference between their samples and population.

Methods
The total subjects are nine persons, with six subjects having normal sinus rhythm and three subjects having tachycardia.The categories of these subjects are based on the readings in the KardiaMobile output and confirmed by the doctor's analysis.The subjects consisted of seven men and two women with ages of 18 -71 years.They are not currently using drugs.Measurements were carried out at the PKPN Garut clinic with a Mobile Biomedical Sensor (KardiaMobile 6L) and clinical ECG (Fukuda M.E Cardisuny type C100).The Characteristics of each device are listed Table 1.Two ECG devices record simultaneously on each subject in a relaxed sitting condition.
Data processing is carried out with the help of Web Plot Digitizer for digitizing the graph of electrocardiogram.The rules of the ECG chart paper determine the start and end points for the digitization process.The algorithm used in this digitization process is x step with interpolation with Δt of 0.0001 seconds to be able to track the original data on the graph precisely.Microsoft Excel software obtained the RR interval from the ECG signal digitization results.
The accuracy of the KardiaMobile device is done by comparing the heart rate values recorded from KardiaMobile and clinical ECG through linear regression, percent difference and RMSE.Next, the same thing is done for the RR interval data.The RR interval value for a subject is the average RR interval value of all leads (I, II, aVR, aVL, and aVF) for the subject.A threshold of 3% for percent difference is used in this research since when a person in a certain condition is measured by eight repititions continuously, giving the difference of RR interval about 3%.ECG signal characteristics were analyzed  A comparison of the average RR interval digitized from the KardiaMobile electrocardiogram and clinical ECG is shown in Figure 6, which shows six subjects with a normal RR interval (0.6-1 second) and three subjects with the tachycardia category (<0.6 seconds).From Figure 6a, it can be seen that the RR interval values produced by KardiaMobile and clinical ECG are not much different.It can be seen from Figure 6b that they provide excellent goodness of fit measures for the linear regression of the RR interval (a coefficient of determination,  2 = 0.9938 and slope 0.9728).
A comparison of the heart rate shown in the pdf file from KardiaMobile and the Clinical ECG results paper is shown in Figure 7, which shows six subjects with normal HR (60-100 bpm) and three subjects with tachycardia category (>100 bpm).Figure 7a shows that the heart rate values produced by KardiaMobile and the clinical ECG are not much different.It can be seen from Figure 7b that they provide excellent goodness of fit measures for the linear regression of HR (a coefficient of determination,  2 = 0.9991 and slope 0.9875).Table 2 shows that the difference for almost all subjects is still below 3%, meaning that the RR interval and heart rate produced by KardiaMobile and the clinical ECG are not different.
The RMSE value for the RR interval was calculated using equation 7 with a total of 9 subjects and obtained a result of 0.021.The average difference in the RR interval between the two devices is 0.021 seconds from the range of RR interval values for subjects between 0.48-0.83seconds.The RMSE value for HR was calculated using equation 6 with a total of 9 subjects and obtained a result of 1.202.The average value of the difference in HR readings between the two devices was 1.202 bpm from the heart rate value range of between 72-124 bpm.

Analysis of ECG Signal Characteristics
The KardiaMobile electrocardiogram has around 40 wave patterns (long data), and the clinical ECG only has around five wave patterns (short data).Therefore, we take a sample five wave patterns as short data from KardiaMobile electrocardiogram.Then, comparisons are made on the same device: short data versus long data on the same lead, long data versus long data between leads, short data versus short data between leads.
The RR interval in lead I short data is compared with lead I long data in KardiaMobile.The subject used was subject 1 with normal sinus rhythm.Next, a t-test was carried out for this comparison.It can be seen from Figure 8 that the result of the RR interval from short data and long data is similar.Apart from that, the RR interval is still in the range of 0.6 -1.0 second, and the standard deviation looks small, which means the subject has a normal sinus rhythm.The p-value is 0.334 which means that the RR interval obtained from short data and long data from lead I are indistinguishable.
The RR interval between two long data leads on KardiaMobile is compared with each other.The subject used was subject 1 with normal sinus rhythm.The RR interval between two short data leads on KardiaMobile will be compared with each other.The subjects used were subject 1 with normal sinus rhythm and subject 9 with tachycardia.Next, a t-test was carried out for each comparison.
Figure 9a and 9b shows that the RR interval values for all leads are similar.Apart from that, the RR interval is still in the range of 0.6 -1.0 second, and the standard deviation looks small, which means the subject has a normal sinus rhythm.Figure 10 shows that the RR interval values for all leads are similar, and the RR interval less than 0.6 second means the subject is tachycardia.Figures 10a and 10b come from short data at different times.When recording the short data which produces image 10a, a short standard deviation is seen, indicating that the subject has normal sinus rhythm, but when recording the short data which produces image 10b, a long standard deviation is seen, indicating that the subject has an abnormality, namely arrhythmia.The RR intervals of all leads for the clinical ECG will be compared to each other.The subjects used were subject 1 with normal sinus rhythm and subject 9 with tachycardia.Next, a t-test was carried out for each comparison.It can be seen from Figure 11a that the RR interval values for all leads are similar.Apart from that, the RR interval is still in the range of 0.6 -1.0 second, and the standard deviation looks small, which means the subject has a normal sinus rhythm.Figure 11b shows that the RR interval values for all leads are similar.Apart from that, the RR interval is less than 0.6 second, and the standard deviation looks small in leads I, II, and aVR but looks high in leads aVL and aVF, which means the subject is tachycardia.However, there are abnormalities when seen in lead aVL and aVF.This result is different from KardiaMobile because the short data collection on KardiaMobile is at the same time interval, while clinical records are recorded at different times every two leads.

Conclusions
Accuracy is done through linear regression, percent difference, and root mean squared error (RMSE) for the heart rate (HR) and the RR interval of ECG signals between KardiaMobile 6L and Fukuda M.E Cardisuny type C100.They provide excellent goodness of fit measures for the linear regression of heart rate (a coefficient of determination,  2 = 0.9991, and slope 0.9875).There is also excellent goodness of fit measures for the linear regression of the RR interval (a coefficient of determination,  2 = 0.9938, and slope 0.9728).The percent difference is less than 3% for HR and RR interval for each subject, which is still in the device's reliability.The root mean squared error is 1.202 for HR and 0.021 for RR interval, which is very low.Therefore, KardiaMobile has an accuracy similar with a clinical electrocardiograph in determining HR.
Characterization of ECG signals is done by t-test between two arrays of RR interval data from two leads of the same device.The average RR interval was similar from one lead to another lead for all possible pairs between long data, between short data, also between long and short data from KardiaMobile 6L.The average RR interval was similar from one lead to another lead for all possible pairs between short data from clinical ECG.The average RR interval value shows that subject 1 with normal sinus rhythm is in the range of 0.6 -1.0 s, and subject 9 with tachycardia is less than 0.6 s.A small standard deviation of interval RR in subject 1 indicates that the subject has a normal sinus rhythm, and a large standard deviation in subject 9 indicates an arrhythmia.Therefore, KardiaMobile is effective for analyzing dynamic changes based on RR intervals.

Figure 3 .
Figure 3. Limb leads: (a) Vectors connecting the standard limb electrodes for a typical patient[8] and (b) Frontal plane with a circle marked off in degrees[9]

Figure 4 .Figure 5 .
Figure 4.The digitization graph from lead I on subject 1 for KardiaMobile

Figure 6 .Figure 7 .
Figure 6.(a) Comparison of RR interval values determined from KardiaMobile and clinical ECG and (b) linear regression for RR interval determined from KardiaMobile and clinical ECG

Figure 8 .
Figure 8. Graph of lead I (short and long data) of RR interval from KardiaMobile

Figure 9 .
Figure 9. (a) The RR interval between two leads long data and (b) The RR interval between two leads short data from KardiaMobile for subject 1

Figure 10 .
Figure 10.(a) Graph of short data during normal times of the RR interval from KardiaMobile for subject 9 and (b) graph of short data when an abnormality is recorded in the RR interval on KardiaMobile for subject 9

Figure 11 .
Figure 11.(a) Graph of all lead short data of RR interval from clinical ECG for subject 1 (b) Graph of all lead short data of RR interval from clinical ECG for subject 9

Table 1 .
by comparing the digitized RR interval values for each lead from one ECG device.The t-test is carried out to ensure that the RR interval values of each lead on an electrocardiogram are indistinguishable if each lead records at the same time.Characteristics of each device

Table 2 .
RR interval and heart rate percent difference between readings from KardiaMobile and clinical ECG

Table 3 .
t-test result for comparison between two leads long data and comparison between two leads short data in KardiaMobile subject 1 From the t-test results in Table3, it can be seen that the p-value >> 0.05.So, one lead and another lead are indistinguishable.

Table 4 .
t-test result for comparison between two lead short data in KardiaMobile subject 9From the t-test results in Table4, it shows the p-value >> 0.05.So, one lead and another lead are indistinguishable.

Table 5 .
t-test result for comparison in clinical ECG subject 1 dan subject 9