# XBeats: A Real-Time Electrocardiogram Monitoring and Analysis System
## 5 Experimental Results and Discussions
### Data Acquisition and Data Transmission  
In this section, we perform a sequence of experiments to validate the resultant sampling rate and the correctness of the digitized ECG data. Consequently, we connect the TechPatient CARDIO V4 heart simulator to the ADS1298 evaluation hardware. This step aims to create a benchmark for our ECG patch when evaluating the ECG patch while acquiring ECG data in real-time. We use the ADS1298 ECG frontend evaluation software built on top of LabVIEW libraries. The initial setup includes generating square signals using a square generator. Following that step, we start to capture the signals using the evaluation software using the ADS1298 development kit. Then use the ECG patch to collect the same signals and compare them to the benchmark signals collected by the evaluation software. In the second step, we use the evaluation software to collect ECG data through the ADS1298 development kit simulated directly from the TechPatient CARDIO V4 heart simulator, as shown in Figure 4. Then we compare collected ECG data by the evaluation software to the ECG data collected by the proposed ECG patch. The signals displayed in Figure 5 represent a full set of 12-lead for a standard ECG test, where Figure 5a shows the ECG limb leads, and Figure 5b shows the ECG chest leads. The data retrieval process was accomplished by selecting from two methods: Read Data Continuous (RDATAC) and Read Data (RDATA). The RDATAC method sets the device to continuously read data without sending any subsequent commands or further configuration. In contrast, the RDATA reads data output from the output register once triggered by the data-ready flag. After a successful data cycle, 216 bits of data are available to read from the output register. The 216 bits (27 bytes) are formatted as follows: 24 status bits + 24 bits of data per channel \(\times\) 8 channels = 216 bits. The low power mode starts at 250 SPS, generating 6750 bytes every second, while the high-resolution mode starts at 500 SPS which generates 13.5 Kbytes every second. Table 2 shows the size of the ECG data acquired and saved on the internal storage attached to the ECG patch. The digitized ECG signals are derived using the formulas illustrated in Table 3. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Sampling Rate** & **250 SPS** & **500 SPS** \\
**Time Interval** & **(Low-Power)** & **(High-Resolution)** \\ \hline
1 s & 6.75 Kilobytte (KB) & 13.5 KB \\
1 min & 405 KB & 810 KB \\
1 h & 24.3 Megabyte (MB) & 48.6 MB \\
24 h & 583.2 MB & 1.1664 Gigabyte (GB) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Collected ECG Data Size over Different Periods. Figure 5: Sample of the collected ECG data using the ADS1298 TI evaluation software using a maximum sampling rate of 500 samples/sec for 4 s: (**a**) Limb leads corresponding to the first group of leads (i.e., I, II, III, aVR, aVL, and aVF); and (**b**) Chest leads corresponding to the second group of leads (i.e., V1, V2, V3, V4, V5, and V6). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Analog Input** & **Derived** & **Polarity** & **Digitally** \\
**Lead** & **Polarity** & **Generated Leads** \\ \hline Channel 1 & V6 = V6 \(-\) WCT & Unipolar & Lead III = Lead II \(-\) Lead I \\ Channel 2 & Lead I = LA (\({}^{1}\)) \(-\) RA (\({}^{2}\)) & Bipolar & aVF = (Lead II \(+\) Lead III)/2 \\ Channel 3 & Lead II = LL (\({}^{3}\)) \(-\) RA & Bipolar & -aVR = (Lead I \(+\) Lead II)/2 \\ Channel 4 & V2 = V2 \(-\) WCT (\({}^{*}\)) & Unipolar & aVL = (Lead I \(-\) Lead III)/2 \\ Channel 5 & V3 = V3 \(-\) WCT (\({}^{*}\)) & Unipolar & \\ Channel 6 & V4 = V4 \(-\) WCT (\({}^{*}\)) & Unipolar & \\ Channel 7 & V5 = V5 \(-\) WCT (\({}^{*}\)) & Unipolar & \\ Channel 8 & V1 = V1 \(-\) WCT (\({}^{*}\)) & Unipolar & \\ \hline \hline \end{tabular} \({}^{(*)}\) WCT = (LA + RA + LL)/3, WCT: Wilson Center Terminal. \({}^{(1)}\) LA: Left Arm Electrode. \({}^{(2)}\) RA: Right Arm Electrode. \({}^{(3)}\) Left Leg Electrode.  
\end{table} 
Table 3: ECG 12-Lead Derivations.