• Tidak ada hasil yang ditemukan

View of Development of Electrocardiogram Signal Generator for Fibrillation Detector

N/A
N/A
Protected

Academic year: 2023

Membagikan "View of Development of Electrocardiogram Signal Generator for Fibrillation Detector"

Copied!
16
0
0

Teks penuh

(1)

Journal of Information Technology and Computer Science Volume 7, Number 3, December 2022, pp. 229-244

Journal Homepage: www.jitecs.ub.ac.id

Development of Electrocardiogram Signal Generator for Fibrillation Detector

Ponco Siwindarto*1, Bill Jason2, Adharul Muttaqin3, M. Yogi Nurrohman4, Muhram Muis5, Zainul Abidin6

1,2,3,4,5,5Brawijaya University, Malang

Email: 1ponco@ub.ac.id, 2billjason62@gmail.com, 3adharul@ub.ac.id,

4myogi_nurrohman@student.ub.ac.id, 5muhram8muis@gmail.com, 6zainulabidin@ub.ac.id

*Corresponding Author

Received 18 November 2022; accepted 18 December 2022 Abstract. Fibrillation is one of the abnormalities in the heart where it beats irregularly, which can cause sudden death. Fortunately, these abnormalities can be detected using an electrocardiogram (ECG) fibrillation detector. An ECG can be detected as biopotential body signal that arises as a result of electrical activity of the heart muscle represented by the electrical signals consisting of P, Q, R, S and T waves that carry information about someone’s heart condition through graph pattern. However, a test in humans with the potential for fibrillation is needed to determine whether the fibrillation detector works correctly. Testing this way is ineffective because we cannot predict when and where a person will experience fibrillation. On the other hand, a site called PhysioNet provides various medical records from patients, including ECG signals of normal heartbeats, atrial fibrillations, and ventricular fibrillations. Because of the ineffectiveness of testing a fibrillation detector directly on a living person, this study focused on research to develop an ECG signal generator using microcontroller Arduino Due for reconstructing the heart signal in normal and fibrillated heart conditions collected from the PhysioNet database. The research focused on obtaining an R-peak value and RR interval time that resembled a heart ECG wave. This study compared the reconstructed signal with references from PhysioNet and measured the peak level of R and RR interval time using an oscilloscope to calculate the accuracy of the ECG signal generator. The generated ECG signal during Atrial Fibrillation and Normal Sinus Rhythm has an overall accuracy of 88.65% for the R-peak level and 97.24% for the RR-Interval time.

While Ventricular Fibrillation has been reproduced by achieving amplitude errors of less than 5.63% and 10.22% during first and second samples, respectively.

Keywords: electrocardiogram, fibrillation detector, signal generator, PhysioNet, microcontroller

1 Introduction

Cardiovascular diseases (CVDs) are one of the primary causes of death in the world [1]. Based on statistics from World Health Organization (WHO), every year CVD causes 17.3 million deaths, and it is predicted to grow by 2030 [2]. CVD can occur due to various factors and conditions, one of the causes is fibrillation. Fibrillation which is desynchronized heart contractions, often occurs during a heart attack and cardiac surgery [3]. According to the location of the occurrence, fibrillation can be classified into two, that is Atrial Fibrillation (AF) and Ventricular Fibrillation (VF) [4].

(2)

230 Journal Volume 7, Number 3, December 2022, pp 229-244

AF will not cause death but is at risk for hypertension, diabetes mellitus, heart disease, obesity, and sleep apnea [5]. When AF happens, the atrium will fibrillate, but the ventricles contract normally at a faster speed rate. This condition is usually not life- threatening and easily controlled [6] - [7]. In most cases, the main cause of death is identified as having VF and pulseless ventricular tachycardia (pulseless VT) [4]. In addition, VF can cause sudden fainting and loss of consciousness, cessation of breathing. During VF, the heart muscle does not contract but "vibrates"; so there is no heartbeat (cardiac arrest), and no blood is pumped out of the heart [8] – [9]. If within 6-10 minutes the patient does not get treatment, fibrillation can be life threatening and lead to death [10]. The Fibrillation requires an electrical counter shock to change this life-threatening rhythm to normal heartbeats. Cardiopulmonary resuscitation (CPR) must be applied immediately to maintain a blood supply to the brain until a defibrillator is available, hopefully within a few minutes [11] – [12]. The defibrillator is specially designed to generate a large electric shock as a source of energy in providing treatment for fibrillation sufferers [13].

Fortunately, both abnormalities can be detected using an electrocardiogram (ECG) [14] – [16]. Early detection will help, so that treatment can be carried out immediately and prevent more severe complications. An electrocardiogram (ECG) is a recording of the heart's electrical activity by measuring the potential difference across different points on the skin surface using electrodes [5]. Due to the simplicity of the method, ECG is still the most available and widely used method for heart electrical activity examination [17].

The important features of the waveform are represented by some letters, namely P, Q, R, S, and T. Information about intervals, amplitudes, and morphologies of different P-QRS-T waves is very useful to detect the ventricular arrhythmia [18]. The P wave is generated by activation of the atria, the QRS complex is produced by activation of both ventricles, and the T wave reflects ventricular recovery [19]. when atrial fibrillation occurs the rhythm of the heartbeat will vary so that it can be detected by the RR interval from the EKG sensor measurement [20]. Meanwhile, when ventricular fibrillation occurs, the amplitude of the heart signal will vary, so it can be detected by measuring the R-peak of the signal [21]. This tool is designed in such a way as to reconstruct heart signals when fibrillation occurs so that it is hoped that it can be used for the calibration process of fibrillation early detection devices.

In order to anticipate the consequences of fibrillation, a further study has been conducted to create a device that can detect symptoms when fibrillation occurs and reported in [22]. As reported in [23] [24], previous researches have succeeded to build an ECG signal generator. However, the research results indicates that the device can only produce a Normal Sinus Rhythm (NSR) signal. There is no specific generated signal represents the condition of atrial or ventricular fibrillations. In addition, the research reported in [25] shows that the signal generated on the ECG signal generator is not compared to the signal on PhysioNet. Where PhysioNet is a site that provides a collection of recorded digital recordings of physiological signals, time series, and related data for use by the biomedical research community, one of which is ECG signals [8]. To overcome this problem, an idea of design of an electrocardiogram (ECG) signal

(3)

Ponco Siwindarto et al. , Development of Electrocardiogram Signal Generator ... 231 generator by reconstructing signals from the PhysioNet database was proposed.

PhysioBank currently includes more than 50 collections of cardiopulmonary, neural, and other biomedical signals from healthy subjects and patients with various conditions of major public health implications, including atrial fibrillation and ventricular fibrillation. This research is expected to ease the testing process of a fibrillation detector device which will help to produce accurate results and ultimately minimize the death rate caused by CVDs.

2 Method

The general proposed system can be seen in Fig. 1. This research focuses on developing an ECG signal Generator. The ECG signal generator consists of three main parts: input, processor, and output. A button is used as an input interface for the user to select the desired heart condition out of six options available to be generated. Each time the user pushes the button, the output ECG signal will change to the next condition depending on the current state, either Atrial Fibrillation, Ventricular Fibrillation or Normal Sinus Rhythm. If the user pushes the button and the current state cannot be increased anymore, the state will start from the beginning. The six conditions will change according to Fig. 1. By default, or if the button is not pushed, the program will generate the first heart condition from the list, Atrial Fibrillation (a). Each condition can be found on a PhysioNet feature called PhysioBank ATM to view a graph and detailed data of an ECG signal. An example of selecting a database from the PhysioBank ATM feature is shown in Fig. 2.

The six ECG digital signals collected from PhysioNet are stored directly in the microcontroller program as a list of array numbers, with each value ranging from 0 to 4095 (12-bit). Based on the block diagram of the system, then the ECG signal generator specifications was designed with hardware that met the desired requirements, which can be seen in Fig. 3, while the flowchart of the ECG signal generator algorithm is shown in Fig. 4. The three LED lights will help indicate to the user which signal is being generated.

The microcontroller Arduino Due then generates the selected signal using the built- in Digital to Analog Converter (DAC) of the microcontroller. At this stage, the analog output signal imitates the ECG wave. However, this signal is still strong enough and is not readable by the heart rate sensor from the fibrillation detector. Therefore, a signal conditioning circuit is placed after the DAC signal to scale down and adjust the output signal in the millivolt (mV) range so that it can be used by the next device, which in this case is AD8232. The signal conditioning circuit is made with a gain of 2/222, using two resistors with values of a 220 kΩ resistor for R1 and 2 kΩ for R2. The configuration can be seen in Fig. 5.

The signal output from the ECG signal generator will be connected to AD8232, a heart rate sensor that will act as a fibrillation detector in this system. AD8232 also acts as an amplifier so the ECG signal can be readable by a common commercialized microcontroller.

(4)

232 Journal Volume 7, Number 3, December 2022, pp 229-244

Button Microcontroller (Arduino Due)

Signal Conditioning

CIrcuit

3 LED Indicators

Fibrilation Detector

Osciloscope

Heart Rate Sensor (AD8232) DAC

6 PhysioNet ECG Signals Database

Channel 1

Channel 2

ECG Generator

Input Process Output

Fig. 1. Block diagram of the proposed system Table 1. List Of Heart Conditions To Be Generated

No. Heart

Condition Database Name Record

No. Signal 1 AF (a) MIT-BIH Atrial Fibrillation 08215 ECG2 2 AF (b) MIT-BIH Atrial Fibrillation 06995 ECG1 3 VF (a) MIT-BIH Malignant Ventricular Arrhythmia 418 ECG1 4 VF (b) MIT-BIH Malignant Ventricular Arrhythmia 419 ECG1 5 NSR (a) MIT-BIH Normal Sinus Rhythm 16265 ECG2 6 NSR (b) MIT-BIH Normal Sinus Rhythm 17052 ECG2

Fig. 2. Example of selecting a database from the PhysioBank ATM website

Micocontroller

(Arduino Due) (AD8232)

10 K

2 K 220 K

S1

D1

D2

D3

3.3 V

PD3

PD46

PD48

PD50

DAC1

GND

GND LA

3.3 V

RA RL

Fig. 3. ECG signal generator circuit schematic

(5)

Ponco Siwindarto et al. , Development of Electrocardiogram Signal Generator ... 233

START

Include Library Fibrillation.h Normal Sinus Rhythm.h

Initialization Interrupt Button 1, DAC1,

LED =[Led1, Led2, Led3], DAC1 Resolution = 12 bit, Wave1 = 0;

A

B

if Wave1>=0

&& Wave1<=1?

if Wave1>=2

&& Wave1<=3?

if Button1 Pressed?

Wave1 ++

Generate Atrial Fibrillation DAC1 = Fibrillation Table[Wave1]

Delay = 3400 us

Generate Ventricullar Fibrillation DAC1 = Fibrillation Table[Wave1]

Delay = 3410 us

Generate Normal Sinys Rhythm DAC1 = NSRT Table[Wave1]

Delay = 7821 us

A

if Wave1==0? Atrial Fibrilaltion (a) LED = [0,0,1]

if Wave1==1? Atrial Fibrilaltion (b) LED = [0,1,0]

if Wave1==2? Ventricullar Fibrilaltion (a) LED = [0,1,1]

if Wave1==3? Ventricullar Fibrilaltion (b) LED = [1,0,0]

if Wave1==4? Normal Sinus Rhythm (a) LED = [1,0,1]

if Wave1==5? Normal Sinus Rhythm (b) LED = [1,1,0]

if Wave1==6? Wave 1 = 0

B Yes

No

Yes No

No Yes

Yes

No

No Yes

Yes No

No Yes

Yes

Yes

Yes No

No

No

Fig. 4. ECG signal generator algorithm

In order to measure whether the system works correctly, both data from ECG signal generator and AD8232 will be displayed to an oscilloscope on Channel 1 and Channel 2, respectively. Both channels will help to monitor the output signals before and after detections. Moreover, the accuracy of the ECG signal generator will be measured through oscilloscope Channel 2 by compare it with the reference signal from PhysioNet.

3 Results

In this section, we will discuss how the ECG Signal Generator was evaluated by finding the accuracy of R-peak and RR-Interval from the generated signals. By reading the output data from AD8232 using the oscilloscope on Channel 2, the signal was saved into a picture that consisted of voltage level in the first ten seconds of the signal. It will later be compared to the same signal constructed from the PhysioNet website, specifically from the feature called PhysioBank ATM, to view the graph and detailed data of an ECG signal database.

The reference signal on every evaluation will appear on white background with grid values of 0.2 s/DIV on the horizontal axis and 0.5 mV/DIV on the vertical axis. In contrast, the output signal will appear on black background with grids of 800 ms/DIV on the horizontal axis and 1 V/DIV on the vertical axis. Both signals have a resolution of 12-bit.

Micocontroller (Arduino Due)

R1

R2

Heart Rate Sensor (AD8232) DAC

GND

220 K

2 K

Fig. 5. Signal conditioning circuit configuration

(6)

234 Journal Volume 7, Number 3, December 2022, pp 229-244 To find the accuracy of the R-peak level, during the first 10 seconds voltage level of each R-peak (Vout) was written into a table and the error was calculated by finding its difference with the R-peak reference (Vref) from the PhysioNet website. On the PhysioNet website, the voltage level is still raw and not amplified yet by a heart sensor, so the voltage level for each R-peak reference needs to be amplified by 1100 times to match the characteristic of AD8232 output. For that reason, the value of every Vref on the following tables is the value after amplification. The error then will be converted into a percentage scale to find the average of it.

For the accuracy analysis of RR-Interval (RRI) time, each interval time was written in a table when two nearest R-peaks (RRI out) arise in the exact first ten seconds signal as mentioned before. Error-values were measured by finding their difference with the RR-Interval reference (RRI ref) from the PhysioNet website. The errors were then converted into a percentage scale to find the average of it.

All steps described above will be repeated on every heart condition in Table 1, except for Ventricular Fibrillation (a) and (b) because the R-peak does not occur due to the characteristic of ventricular fibrillation. Therefore, the signal is measured by finding the error five times every two seconds on these two through oscilloscope Channel 2 and comparing it with the reference signal from PhysioNet.

3.1 Atrial Fibrillation Signal (a) Evaluation

The first ECG signal to be reconstructed is Atrial Fibrillation (a). In Fig. 6, the first graph shown is a reference signal taken from the PhysioNet website, under the PhysioBank ATM feature with input MIT-BIH Atrial Fibrillation Database (AFDB) and record number 08215 signal ECG2, while the second graph is the output signal taken from the oscilloscope Channel 2. On these two graphs, it appears that R-peak, when the signal noticeably spikes high on the positive y-axis, occurs 12 times on both signals.

Each voltage level of R-peaks can be seen on Table 2 and the interval time between the two nearest R-peaks (RRI) can be seen on Table 3. From Table 2, the Vref is the R- peak value on the reference signal while Vout from the output signal. It can be concluded that the R-peak value from the generated ECG signal has an average error of 0.091V (13.23%), with the largest error of 0.15V (20%) during the R-peak number 1.

From Table 3, RRIref is the RR-Interval time on the reference signal, while RRIout is from the output signal. It can be concluded that the RR-Interval time from the generated signal has an average error of 0.018s (2.34%), with the largest error of 0.19s (2.39%) during the RRI number 6. In addition, fibrillation can be seen during RRI number 5, which has a longer interval time than the rest.

(A) (B)

Fig. 6. Comparison of Atrial Fibrillation Signal (a) between (A) reference signal (PhysioNet), (B) AD8232 output signal

(7)

Ponco Siwindarto et al. , Development of Electrocardiogram Signal Generator ... 235

Table 2. R-Peak Voltage Measurement on the Atrial Fibrillation Signal (a) R-Peak

No.

Vref (V)

Vout (V)

Error (V)

Error (%) 1 0.750 0.600 0.150 20.00 2 0.690 0.584 0.106 15.36 3 0.690 0.560 0.130 18.84

4 0.635 0.576 0.059 9.29

5 0.680 0.616 0.064 9.41

6 0.725 0.608 0.117 16.14 7 0.695 0.584 0.111 15.97 8 0.685 0.576 0.109 15.91 9 0.645 0.560 0.085 13.18 10 0.615 0.560 0.055 8.94 11 0.675 0.616 0.059 8.74 12 0.585 0.544 0.041 7.01

Average 0.091 13.23

3.2 Atrial Fibrillation Signal (b) Evaluation

The second ECG signal to be reconstructed is Atrial Fibrillation Signal (b). In Fig.

7, the first graph shown is a reference signal taken from the PhysioNet website, under the feature called PhysioBank ATM with input MIT- BIH Atrial Fibrillation Database (AFDB) and record number 06995 signal ECG1, while the second graph is the output signal taken from the oscilloscope Channel 2. On these two graphs, it appears that R- peak, when the signal noticeably spikes high on the positive y-axis, occurs 16 times on both signals.

Each voltage level of R-peaks can be seen on Table 4, and the interval time between the two nearest R-peaks (RRI) can be seen on Table 5. From Table 4, Vref is the R- peak value on the reference signal while Vout from the output signal. It can be concluded that the R-peak value from the generated ECG signal has an average error of 0.059V (8.01%), with the most significant error of 0.159V (18.77%) during the R-peak number 13.

Table 3. RR-Interval (RRI) Time Measurement on the Atrial Fibrillation Signal (a) RRI

No.

RRI ref (s)

RRI out (s)

Error (s)

Error (%)

1 0.804 0.785 0.019 2.36

2 0.744 0.727 0.017 2.28

3 0.728 0.711 0.017 2.34

4 0.724 0.707 0.017 2.35

5 1.212 1.184 0.028 2.31

6 0.796 0.777 0.019 2.39

7 0.728 0.711 0.017 2.34

8 0.716 0.699 0.017 2.37

9 0.72 0.703 0.017 2.36

10 0.728 0.711 0.017 2.34

11 0.732 0.715 0.017 2.32

Average 0.018 2.34

(8)

236 Journal Volume 7, Number 3, December 2022, pp 229-244

(A) (B)

Fig. 7. Comparison of Atrial Fibrillation Signal (b) between (A) reference signal (PhysioNet), (B) AD8232 output signal Table 4. R-Peak Voltage Measurement on the Atrial Fibrillation Signal (b)

R-Peak No.

Vref (V)

Vout (V)

Error (V)

Error (%)

1 0.627 0.688 0.061 9.73

2 0.605 0.592 0.013 2.15

3 0.743 0.704 0.039 5.25

4 0.660 0.760 0.100 15.15

5 0.627 0.704 0.077 12.28

6 0.726 0.688 0.038 5.23

7 0.715 0.704 0.011 1.54

8 0.754 0.704 0.050 6.63

9 0.737 0.704 0.033 4.48

10 0.737 0.664 0.073 9.91

11 0.864 0.744 0.120 13.89

12 0.754 0.728 0.026 3.45

13 0.847 0.688 0.159 18.77

14 0.743 0.672 0.071 9.56

15 0.655 0.720 0.065 9.92

16 0.754 0.752 0.002 0.27

Average 0.059 8.01

From Table 5, RRIref is the RR-Interval time on the reference signal, while RRIout is from the output signal. It can be concluded that the RR-Interval time from the generated signal has an average error of 0.016s (2.36%), with the most significant error of 0.015s (2.4%). Even though no obvious fibrillation occurred in the table, data from RRI number 6 and 7 is an example of subtle fibrillation, in which the interval changes from 0.552s to 0.76s.

(9)

Ponco Siwindarto et al. , Development of Electrocardiogram Signal Generator ... 237 Table 5. RR-Interval (RRI) Time Measurement on the Atrial Fibrillation Signal (b)

RRI No.

RRI ref (s)

RRI out (s)

Error (s)

Error (%)

1 0.636 0.621 0.015 2.36

2 0.716 0.699 0.017 2.37

3 0.628 0.613 0.015 2.39

4 0.716 0.699 0.017 2.37

5 0.624 0.609 0.015 2.40

6 0.552 0.539 0.013 2.36

7 0.76 0.742 0.018 2.37

8 0.716 0.699 0.017 2.37

9 0.728 0.711 0.017 2.34

10 0.752 0.734 0.018 2.39

11 0.584 0.57 0.014 2.40

12 0.704 0.688 0.016 2.27

13 0.668 0.652 0.016 2.40

14 0.532 0.52 0.012 2.26

Average 0.016 2.36

3.3 Ventricular Fibrillation Signal (a)

The third ECG signal to be reconstructed is Ventricular Fibrillation Signal (a). In Fig. 8, the first graph shown is a reference signal taken from the PhysioNet website, under the feature called PhysioBank ATM with input MIT-BIH Malignant Ventricular Arrhythmia Database (VFDB) and record number 418 signal ECG1, while the second graph is the output signal taken from the oscilloscope Channel 2. These two graphs show that R-peak does not occur due to the characteristic of ventricular fibrillation.

Therefore, the signal is measured by finding the error five times every two seconds, which can be seen on Table 6.

From Table 6, Vref is the R-peak value on the reference signal while Vout from the output signal. It can be concluded that the amplitude from the generated ECG signal has an average error of 0.016V (5.63%), with the largest error of 0.036V (9.09%) on the first timestamp.

3.4 Ventricular Fibrillation Signal (b)

The fourth ECG signal to be reconstructed is Ventricular Fibrillation Signal (a). In Fig. 9, the first graph shown is a reference signal taken from the PhysioNet website, under the feature called PhysioBank ATM with input MIT-BIH Malignant Ventricular Arrhythmia Database (VFDB) and record number 419 signal ECG1, while the second graph is the output signal taken from the oscilloscope Channel 2. These two graphs show that R-peak does not occur due to the characteristic of ventricular fibrillation.

Therefore, the signal is measured by finding the error five times every two seconds, which can be seen in Table 7.

From Table 7, Vref is the R-peak value on the reference signal while Vout from the output signal. It can be concluded that the amplitude from the generated ECG signal has an average error of 0.032V (10.22%), with the largest error of 0.132V (23.08%) on the first timestamp.

(10)

238 Journal Volume 7, Number 3, December 2022, pp 229-244 3.5 Normal Sinus Rhythm Signal (a)

The ECG signal to be reconstructed in this section is called Normal Sinus Rhythm Signal (a). In Fig. 10, the first graph shown is a reference signal taken from the PhysioNet website, under the PhysioBank ATM feature with input MIT-BIH Normal Sinus Rhythm Database (NSRDB) and record number 16265 signal ECG2. The second graph is the output signal taken from the oscilloscope Channel 2. On these two graphs, it appears that R-peak, when the signal noticeably spikes high on the positive y-axis, occurs 16 times on both signals.

Each voltage level of R-peaks can be seen on Table 8, and the interval time between the two nearest R-peaks (RRI) can be seen on Table 9. From Table 8, Vref is the R- peak value on the reference signal while Vout from the output signal. It can be concluded that the R-peak from the generated ECG signal has an average error of 0.099V (13.64%), with the largest error of 0.34V (34.14%) during the R-peak number 12.

(A) (B)

Fig. 8. Comparison of Ventricular Fibrillation Signal (a) between (A) reference signal (PhysioNet), (B) AD8232 output signal Table 6. Amplitude Comparison of the Ventricular Fibrillation Signal (a)

Time (second)

Vref (V)

Vout (V)

Error (V)

Error (%)

1 -0.396 -0.360 0.036 9.09

3 -0.330 -0.320 0.01 3.03

5 -0.308 -0.320 0.012 3.90

7 -0.132 -0.120 0.012 9.09

9 -0.330 -0.320 0.01 3.03

Average 0.016 5.63

(A) (B)

Fig. 9. Comparison of Ventricular Fibrillation Signal (b) between (A) reference signal (PhysioNet), (B) AD8232 output signal

(11)

Ponco Siwindarto et al. , Development of Electrocardiogram Signal Generator ... 239 Table 7. Amplitude Comparison of the Ventricular Fibrillation Signal (b)

Time (second)

Vref (V)

Vout (V)

Error (V)

Error (%)

1 0.572 0.440 0.132 23.08

3 -0.154 -0.160 0.006 3.90

5 0.286 0.280 0.006 2.10

7 -0.066 -0.080 0.014 21.21

9 0.242 0.240 0.002 0.83

Average 0.032 10.22

(A) (B)

Fig. 10. Comparison of Normal Sinus Rhythm (a) between (A) reference signal (PhysioNet), (B) AD8232 output signal

From Table 9, RRIref is the RR-Interval time on the reference signal, while RRIout is from the output signal. It can be concluded that the RR-Interval from the generated signal has an average error of 0.021s (3.43%) with the largest error of 0.051s (8.16%) during RRI number 4.

Table 8. R-Peak Voltage Measurement on the Normal Sinus Rhythm Signal (a) R-Peak

No.

Vref (V)

Vout (V)

Error (V)

Error (%)

1 0.688 0.712 0.024 3.49

2 0.490 0.512 0.022 4.49

3 0.512 0.624 0.112 21.88

4 0.600 0.528 0.072 12.00

5 0.886 0.720 0.166 18.74

6 0.864 0.760 0.104 12.04

7 0.941 0.808 0.133 14.13

8 0.710 0.568 0.142 20.00

9 0.534 0.560 0.026 4.87

10 0.468 0.472 0.004 0.85

11 0.732 0.744 0.012 1.64

12 0.996 0.656 0.340 34.14

13 0.600 0.696 0.096 16.00

Average 0.099 13.64

(12)

240 Journal Volume 7, Number 3, December 2022, pp 229-244

(A) (B)

Fig. 11. Comparison of Normal Sinus Rhythm (b) between (A) reference signal (PhysioNet), (B) AD8232 output signal

Table 9. RR-Interval (RRI) Time Measurement on the Normal Sinus Rhythm Signal (a) RRI

No.

RRI ref (s)

RRI out (s)

Error (s)

Error (%)

1 0.602 0.590 0.012 1.99

2 0.609 0.594 0.015 2.46

3 0.602 0.594 0.008 1.33

4 0.625 0.574 0.051 8.16

5 0.609 0.598 0.011 1.81

6 0.625 0.609 0.016 2.56

7 0.594 0.625 0.031 5.22

8 0.602 0.586 0.016 2.66

9 0.617 0.602 0.015 2.43

10 0.617 0.574 0.043 6.97

11 0.648 0.664 0.016 2.47

12 0.625 0.617 0.008 1.28

13 0.617 0.602 0.015 2.43

14 0.625 0.613 0.012 1.92

15 0.648 0.598 0.05 7.72

Average 0.021 3.43

3.6 Normal Sinus Rhythm Signal (b)

The last ECG signal to be reconstructed is called Normal Sinus Rhythm Signal (b).

In Fig. 11, the first graph shown is a reference signal taken from the PhysioNet website, under the PhysioBank ATM feature with input MIT-BIH Normal Sinus Rhythm Database (NSRDB) and record number 17052 signal ECG2. The second graph is the output signal taken from the oscilloscope Channel 2. On these two graphs, it appears that R-peak, when the signal noticeably spikes high on the positive y-axis, occurs 11 times on both signals.

Each voltage level of R-peaks can be seen on Table 10, and the interval time between the two nearest R-peaks (RRI) can be seen on Table 11. From Table 10, Vref is the R-peak on the reference signal, while Vout is from the output signal. It can be concluded that the R-peak from the generated ECG signal has an average error of 0.041V (10.51%), with the largest error of 0.82V (22.91%) during the R-peak number 8.

(13)

Ponco Siwindarto et al. , Development of Electrocardiogram Signal Generator ... 241 Table 10. R-Peak Voltage Measurement on the Normal Sinus Rhythm Signal (b)

R-Peak No.

Vref (V)

Vout (V)

Error (V)

Error (%)

1 0.424 0.448 0.024 5.66

2 0.424 0.456 0.032 7.55

3 0.391 0.424 0.033 8.44

4 0.446 0.432 0.014 3.14

5 0.358 0.288 0.070 19.55

6 0.358 0.328 0.030 8.38

7 0.446 0.352 0.094 21.08

8 0.358 0.440 0.082 22.91

9 0.347 0.336 0.011 3.17

10 0.402 0.464 0.062 15.42

11 0.446 0.408 0.038 8.52

12 0.424 0.448 0.024 5.66

13 0.424 0.456 0.032 7.55

14 0.391 0.424 0.033 8.44

15 0.446 0.432 0.014 3.14

16 0.358 0.288 0.070 19.55

Average 0.041 10.51

From Table 11, RRIref is the RR-Interval time on the reference signal, while RRIout is from the output signal. It can be concluded that the RR-Interval from the generated signal has an average error of 0.026s (2.90%) with the largest error of 0.074s (8.38%) during RRI number 6.

4 Discussion

After evaluating each individually generated signal, in this section, we discuss how the system performs by finding its overall accuracy for R-peak and RR-Interval.

TABLE XII shows that the designed system has an overall error of 11.35% and 2.76%

for the R-peak and RR-Interval time, respectively. By calculating these errors, we determined that the ECG Signal Generator has an overall accuracy of 88.65% for the R-peak level and 97.24% for the RR-Interval time. Since the characteristic of ventricular fibrillation has no R-peak, the data from Ventricular Fibrillation (a) and Ventricular Fibrillation (b) were excluded from the table.

R-peak accuracy of the designed ECG signal generator achieved 88.65%. It is considerably high and could work on a fibrillation detector since R-peak has the characteristic of having a visible shape form and a higher difference in value than the other waveform (P, Q, S, and T). Hence, generating an ECG signal with this accuracy can still produce desirable results.

However, it still needs to be considered when constructing ventricular fibrillation signals, given how it has no R-peak waveform. On the one hand, rapidly and randomly changing waves of the ventricular fibrillation signal become the main challenge in reconstructing such a dense signal. However, this unique appearance will make it easier to detect that fibrillation happens on the ventricle since it is visually different from atrial fibrillation and normal sinus rhythm as well. That being said, the system has proven to reproduce ventricular fibrillation signals by achieving errors less than 5.63% during Ventricular Fibrillation (a) and 10.22% during Ventricular Fibrillation (b) evaluations.

(14)

242 Journal Volume 7, Number 3, December 2022, pp 229-244

Table 11. RR-Interval (RRI) Time Measurement on the Normal Sinus Rhythm Signal (b) RRI

No. RRI ref

(s) RRI out

(s) Error

(s) Error (%)

1 0.898 0.875 0.023 2.56

2 0.891 0.867 0.024 2.69

3 0.859 0.852 0.007 0.81

4 0.867 0.832 0.035 4.04

5 0.906 0.902 0.004 0.44

6 0.883 0.809 0.074 8.38

7 0.914 0.945 0.031 3.39

8 0.914 0.902 0.012 1.31

9 0.891 0.871 0.02 2.24

10 0.883 0.855 0.028 3.17

Average 0.026 2.90

Table 12. Accuracy Evaluation of the Overall System

Output

R-Peak error (%)

RRI error

(%)

R-Peak Accuracy

(%)

RRI Accuracy

(%)

AF (a) 13.23 2.34 86.77 97.66

AF (b) 8.01 2.36 91.99 97.64

NSR (a) 13.64 3.43 86.36 96.57

NSR (b) 10.51 2.90 89.49 97.10

Average 11.35 2.76 88.65 97.24

Based on the research that has been done, the device has a high RRI accuracy, that is reaching 97.24%. This level of accuracy indicates that the designed ECG signal generator has been successful. This is according to the results of the signal time that is issued according to the reference signal time. In addition, the Arduino Due used in this research is able to produce accurate and stable timings.

5 Conclusion and Future work

The ECG signal generator has been successfully developed using Arduino Due with 12-bit DAC resolution and signal conditioning circuit with a gain value of 2/222. the output of the system is used to represent the condition of the heart when experiencing atrial fibrillation, ventricular fibrillation, or normal sinus rhythm. The ECG signal generated during Atrial Fibrillation and Normal Sinus Rhythm has an overall accuracy of 88.65% for the R-peak level and 97.24% for the RR-Interval time. Meanwhile, ventricular fibrillation is characterized by not having an R-peak. The designed system has been shown to reproduce ventricular fibrillation signals by achieving an amplitude error of less than 5.63% during ventricular fibrillation (a) and 10.22% during ventricular fibrillation (b).

There are several ways to improve the ECG signal generator designed for future work. For example, reducing and minimizing noise in the output signal caused by the system will improve the quality of the resulting ECG signal. This will greatly help improve the accuracy of the signal generated and facilitate the early detection process when fibrillation occurs in sufferers. In addition, the DAC module with high resolution

(15)

Ponco Siwindarto et al. , Development of Electrocardiogram Signal Generator ... 243 must also be considered, so that the output signal resembles the original signal from the human heart.

Acknowledgments. The authors wish to thank the PhysioNet for providing dataset as reference.

References

1. S. Mohan, C. Thirumalai and G. Srivastava, "Effective Heart Disease Prediction Using Hybrid Machine Learning Techniques," in IEEE Access, vol. 7, pp. 81542-81554, 2019, doi: 10.1109/ACCESS.2019.2923707.

2. N. Ahmed and Y. Zhu, “Early detection of atrial fibrillation based on ECG signals,”

Bioengineering, vol. 7, no. 1, pp. 1-17, March 2020, https://doi.org/10.3390/bioengineering7010016.

3. J. Grune, M. Yamazoe, and M. Nahrendorf, “Electroimmunology and cardiac arrhythmia,”

Nature Reviews Cardiology, vol. 18, no. 8, pp. 547–564, 2021.

4. S. S. Chugh, K. Reinier, A. Uy-Evanado, H. S. Chugh, D. Elashoff, C. Young, A. Salvucci, and J. Jui, “Prediction of sudden cardiac death manifesting with documented ventricular fibrillation or pulseless ventricular tachycardia,” JACC: Clinical Electrophysiology, vol. 8, no. 4, pp. 411–423, 2022.

5. G. F. Michaud, W.G. Stevenson, Chapter 246: Atrial Fibrillation. In: J. Jameson, A.S.

Fauci, D.L. Kasper, S. L. Hauser, D.L. Longo, J. Loscalzo, “Harrison's Principles of Internal Medicine, 20th Edition,” McGraw Hill, 2018.

6. A. Brian, N. Sabna, G. G. Paulson, “ECG based algorithm for detecting ventricular arrhythmia and atrial fibrillation,” 2017 International Conference on Intelligent Computing and Control Systems (ICICCS), June 2017, pp. 506-511, DOI:

10.1109/ICCONS.2017.8250773.

7. Park, Jong-Sung, and Youngmin Choi. "Stereotactic cardiac radiation to control ventricular tachycardia and fibrillation storm in a patient with apical hypertrophic cardiomyopathy at burnout stage: Case report." Journal of Korean Medical Science 35.27 (2020).

8. Alday, Erick A. Perez, et al. "Classification of 12-lead ecgs: the physionet/computing in cardiology challenge 2020." Physiological measurement 41.12 (2020): 124003.

9. Osman, Junaida, et al. "Sudden Cardiac Death (SCD)–risk stratification and prediction with molecular biomarkers." Journal of biomedical science 26.1 (2019): 1-12.

10. Frolov, Alexander Vladimirovich, et al. "Risk stratification personalised model for prediction of life-threatening ventricular tachyarrhythmias in patients with chronic heart failure." Kardiologia Polska (Polish Heart Journal) 75.7 (2017): 682-688.

11. Lai, Dakun, et al. "Intelligent and efficient detection of life-threatening ventricular arrhythmias in short segments of surface ECG signals." IEEE Sensors Journal 21.13 (2020):

14110-14120.

12. Garg, Rakesh, et al. "Comprehensive cardiopulmonary life support (CCLS) for cardiopulmonary resuscitation by trained paramedics and medics inside the hospital."

Indian Journal of Anaesthesia 61.11 (2017): 883.

13. Ferretti, Jacopo, Licia Di Pietro, and Carmelo De Maria. "Open-source automated external defibrillator." HardwareX 2 (2017): 61-70.

14. Hammad, Mohamed, et al. "Detection of abnormal heart conditions based on characteristics of ECG signals." Measurement 125 (2018): 634-644.

15. Mandala, Satria, and Tham Cai Di. "ECG parameters for malignant ventricular arrhythmias: a comprehensive review." Journal of medical and biological engineering 37.4 (2017): 441-453.

16. Raghunath, Sushravya, et al. "Prediction of mortality from 12-lead electrocardiogram voltage data using a deep neural network." Nature medicine 26.6 (2020): 886-891.

17. L. Maršánová, M. Ronzhina, R. Smíšek, et al, “ECG features and methods for automatic classification of ventricular premature and ischemic heartbeats: A comprehensive experimental study,” Sci Rep 7, 11239, 2017, https://doi.org/10.1038/s41598-017-10942- 6.

(16)

244 Journal Volume 7, Number 3, December 2022, pp 229-244 18. Chen, Xiaohe, Yan Wang, and Lirong Wang. "Arrhythmia recognition and classification

using ECG morphology and segment feature analysis." IEEE/ACM transactions on computational biology and bioinformatics 16.1 (2018): 131-138.

19. Monteiro, Diana A., et al. "Interactive effects of mercury exposure and hypoxia on ECG patterns in two Neotropical freshwater fish species: Matrinxã, Brycon amazonicus and traíra, Hoplias malabaricus." Ecotoxicology 29.4 (2020): 375-388.

20. R. Mabrouki, B. Khaddoumi and M. Sayadi, "Atrial Fibrillation detection on electrocardiogram," 2016 2nd International Conference on Advanced Technologies for Signal and Image Processing (ATSIP), 2016, pp. 268-272, doi:

10.1109/ATSIP.2016.7523112.

21. L. M. B. Alonzo and H. S. Co, "Ensemble Empirical Mode Decomposition of Photoplethysmogram Signals for Assessment of Ventricular Fibrillation," 2018 IEEE 10th International Conference on Humanoid, Nanotechnology, Information Technology,Communication and Control, Environment and Management (HNICEM), 2018, pp. 1-4, doi: 10.1109/HNICEM.2018.8666241.

22. P. Siwindarto, A. B. Dianisma, Z. Abidin, S. S. Mahmadov, “ECG Signal Processing for Early Detection of Atrial and Ventricular Fibrillation Based on RR Interval,” 2020 10th Electrical Power, Electronics, Communications, Controls and Informatics Seminar (EECCIS), August 2020, pp. 142-146, DOI: 10.1109/EECCIS49483.2020.9263454.

23. Kovacs, Peter. "ECG signal generator based on geometrical features." Annales Univ. Sci.

Budapest., Sect. Comp. Vol. 37. No. 2012. 2012.

24. S. C. Yener and R. Mutlu, "A microcontroller-based ECG signal generator design utilizing microcontroller PWM output and experimental ECG data," 2018 Electric Electronics, Computer Science, Biomedical Engineerings' Meeting (EBBT), 2018, pp. 1-4, doi:

10.1109/EBBT.2018.8391465.

25. Ghosh, Samit Kumar, et al. "Detection of atrial fibrillation from single lead ECG signal using multirate cosine filter bank and deep neural network." Journal of medical systems 44.6 (2020): 1-15.

Referensi

Dokumen terkait

The mechanism of sudden cardiac death in patients with WPW is thought to be associated with atrial fibrillation or atrial flutter due to that mechanism.. 10 An incidence of

SURAT KETERANGAN IDENTIFIKASI DAUN ARBENAN..

Penggunaan jenis gasifying agent mempengaruhi kandungan gas yang dimiliki oleh syngas. Misalnya, penggunaan udara bebas menghasilkan senyawa nitrogen yang pekat di

Pemberdayaan adalah mengurangi secara langsung beberapa faktor yang melekat pada keluarga pedagang perempuan miskin yaitu (1) tidak memiliki tempat berjualan yang tetap,

Forward-path gain: the product of gains found by traversing a path from the input node to the output node of the signal-flow graph in the. direction of

In the case of three-phase PWM inverter, it has been shown that a sinusoidal signal plus twenty-five percent third harmonic is the optimum reference signal that results

Puji syukur kepada Tuhan Yang Maha Esa atas berkat, karunia dan rahmatNya sehingga penulis dapat menyusun dan menyelesaikan penelitian yang berjudul “Pengaruh Pengembangan Karir

Sebagai Muslim, selain terus memperdalam pengetahuannya, ia juga ingin dirinya nampak sebagai sosok Muslim. Ia kenakan busana Islami khas Turki sepanjang waktu, bahkan