A Novel Machine Learning Approach to Classify and Detect Atrial Fibrillation Using Optimized Implantable Electrocardiogram Sensor

There are some constraints such as external electrodes, a failure to capture most paroxysmal atrial fibrillation (AFib), low power transfer efficiency (PTE) for 24/7 charging technology, a short period of monitoring, and automatic detection of AFib in conventional electrocardiogram (ECG) sensors. To overcome these constraints, an implantable ECG sensor with a 2-coil inductive link with maximum power transfer efficiency (PTE) is designed to continuously monitor patients and efficiently detect AFib using global covering rule discovery and the minimum description length (MDL) algorithm. Among different combinations of ECG coils, the square spiral-square spiral coil demonstrates the maximum PTE, 56.23%, at the resonant frequency of 13.56 MHz and it is used in the implantable ECG sensor. The QRS complex from ECG signals of twenty-nine AFib patients is detected using different operation methods (DOM). The MDL algorithm is used to group 12 features of heart rate variability (HRV) parameters. The global covering rule discovery is proposed as a novel classification technique of AFib in ECG data. The average classification accuracy was 96.67 ± 7.03, and then the average recall, precision, F1-measures, and an average number of generated rules were 97.08 ± 6.23, 97.08 ± 6.23, 96.57 ± 7.23, and 7.9 ± 0.32, respectively. We found that the NN50, pNN50, and LF parameters can distinguish the AFib patient better than a healthy one. Among these parameters, pNN50 showed that it is greater than 34.75 in 41.38% of patients. The optimized implantable ECG sensor with a maximum PTE of 56.23% along with novel AFib detection and classification methods is suitable for its implementation in future implantable ECG sensors.


I. INTRODUCTION
Arrhythmia is defined as the abnormal rhythm of heartbeat. Atrial fibrillation (AFib) is a type of an arrhythmia that can cause heart problems such as stroke and heart stop. Cardiovascular disease is the leading cause of death in the United The associate editor coordinating the review of this manuscript and approving it for publication was Michele Magno .
States [1]. South Korean patients with AFib are four times as great as the general population at high risk of death [2]. A Holter monitor, which uses electrodes, is utilized to record the heart's rhythm and performance between 24 to 72 hours and the data can be printed whenever the cardiologist needs the data. A cardiologist requests a Holter monitor when a person suddenly faints or has an irregular heartbeat [3]. Conventional Holter monitoring devices have few leads and difficulty to catch AFib [4]. Therefore, an implantable ECG sensor is required to continuously monitor patients and efficiently detect AFib in ECG data.

A. WIRELESS IMPLANTABLE MEDICAL DEVICES (WIMD)
The wireless power transfer (WPT) is a common transfer system for the transmission of energy without a wire in medical devices such as cardiac defibrillators (Pacemaker).
In recent years, there are some concerns over frequency, noise, size, distance, PTE of transmitter, and receiver coils of WPT systems. Implantable ECG sensors requires WPT for the seamless, safe operation, power requirements, long life, and size of the power supply. Traditional WPT coils had low PTE, the WPT system size and distance limitation, the resonant frequency range, and tissue safety. The inductivecoupling and resonance coupling play important roles in WPT systems. WIMD is based on magnetic field induction, and it is increasingly used to monitor human organs. Recent developments in the field of WPT have led to an interest in the WIMD.
Implantable ECG sensor as a WIMD is fast becoming a key device to monitor the heart signals. It is one of the most rapidly implantable devices which is developing to detect cardiovascular diseases such as AFib. Also, it can record the heart conditions for 24/7 and send the heart status to cardiovascular disease specialist. The existing 24-hour Holter monitoring devices have difficulties to catch most of paroxysmal AFib and they need external leads while the WIMDs do not. In addition, they cannot detect and classify the AFib using novel detection algorithms. The size and charging technology of wireless implantable ECG sensors is continuing concern in their design. The issue of PTE of implantable devices with small coils is a major area of interest within the field of the wireless implantable device. In addition, the WIMD causes damage and inflammation of subcutaneous tissue [5]. Despite the number of research for developing and designing WIMDs, a large number of them are not marketed.

B. OPTIMIZATION OF WIRELESS IMPLANTABLE ECG
There are concerns such as the effect of resonant frequency on the human body, the size, the distance, and the type of WPT coils in optimization of WIMD. They are important due to human organ size, the movement of the body and maximum PTE in WIMD.
The PTE is a fundamental parameter for measuring the wireless power transfer [6]. Two parameters including the coupling coefficient and the quality factor (Q-factor) are considered to calculate PTE in the WPT systems, which depends on many factors such as the geometry, and the distance of WPT coils. Different coil types, such as circular [7], spiral square [8], etc., were utilized to obtain the maximum PTE at the specific resonant frequencies. A primary concern in the design of WPT systems is the limitation of coil size which large size of the coil cannot be implemented in medical devices.
Several studies investigating the WPT of the nearfield inducting systems have been carried out using 2-coil [9]- [11], three inductive coils [12] and four ones [13]. Nevertheless, a major problem with the different number of coils is the power delivered to the load (PDL). Among them, 2-coil inductive links had a higher power delivered to the load than the other number of coils for a short distance of the Tx and Rx [12]. Three inductive coils attached to a circuit were optimized and their power transfer was compared with the 4-coil one [12]. The power transferred to the resistance load at a resonant frequency of 13.56 MHz was demonstrated that the 3-coil had more PDL and PTE than 4-coil [12]. S. Khan and G. Choi [13] studied the optimization of fourcoil planar magnetically coupled printed spiral resonators for different geometries including square and circular shapes. They concluded that the circular shape had higher PDL than square one while the PTE of square shape was higher than the circular one. PTE is the most significant parameter for evaluating and comparing the performance of a WPT link for Implantable devices [6]. Although extensive research has been carried out on optimization and simulation of inductive WPT systems, no single study exists to link and optimize the WPT system in wireless implantable ECG along with detection methods of AFib using machine learning approach.
Recently, the deep learning approaches have represented superior performance for the detection of cardiac pathology VOLUME 9, 2021 of AFib symptoms from the features of ECG such as the atrial and ventricular activities. The automated AFib detection systems have been suggested on the combination of either the deep belief network (DBN) with two-stage variational mode decomposition (VMD) [46] or the hierarchical extreme learning machine (H-ELM) with the fraction norm (FN) features [47], extracted from different sub-bands (or modes) in the ECG signals.
The aims of this study are to design and develop a wireless implantable ECG sensor with maximum PTE. Then, we want to utilize a novel machine learning approach to classify and detect the AFib from the transferred data of implantable ECG sensor with maximum PTE. By combining both parts, we get comprehensive implantable device for to continuously monitor patients and efficiently detect AFib in ECG data. In order to 24/7 monitoring of the patient, wireless charging technology is needed to charge the device. Hence, the high-PTE plays an important role in the AFib detection. Also, the type of antenna and coil is important for the communication and sending the signals to the base station. To solve the supply power problem of the implantable ECG, wireless power technology can be a solution. Due to the size limitation of implantable ECG, the type of antenna and coil can be optimized for the maximum PTE. If the ECG signal is weak and noisy due to sending signal problem, it is more difficult to detect the AFib from the Data. Hence, a human implantable ECG sensor is optimized for maximum PTE using different combinations of coil types, which are linked to a resonant L-C circuit. In order to maximize the PTE in wireless ECG sensor for AFib case, a 2-coil inductive wireless ECG coil was optimized at the resonant frequency of 13.56 MHz using six different types of coils including a circular-circular, an elliptical-elliptical, a circular-elliptical, a circular-square spiral, an elliptical-square spiral, and a square spiral-square spiral. The optimized coil with maximum PTE was utilized in the implantable ECG sensor using WPT and the ECG sensor was inserted under chest skin to monitor the ECG signals.
The ECG signals received from optimized ECG coils with maximum PTE were monitored using a patient monitor device or smartphone and they were analyzed using a simple and fast consistent method, DOM, to detect AFib from the NSR using QRS complex. Then, a novel technique, global covering rule discovery, was proposed for classification of the HRV features. The findings of this study can be used in future human implantable wireless ECG sensors with maximum PTE to detect the AFib from the NSR. This paper is divided into five sections. Section II introduces the WPT ECG system. Section III provides the methodology for detection of AFib using DOM and classification of HRV features using global covering rule discovery. Section IV provides the optimization of ECG coils in the WPT simulation. Section V presents the experimental results achieved by different machine learning algorithms. Section VI provides a discussion for the obtained results. Finally, section VII draws conclusions.

II. WPT ECG SYSTEM
The WPT system consists of transmitter (Tx) and receiver (Rx) coils as a magnetic induction [48]. The inductive coupling of WPT consists of Tx and Rx coils. Different number of coils such as 2, 3 and 4 coils are utilized for the induction in the WPT. The magnetic field is induced in the space between Tx and Rx. Fig. 1 shows the schematic of the 2-coil inductive linked to a resonant L-C circuit. The capacitor is added to both transmitter and receiver coils to resonate at the specified frequency. The capacitance, C, is calculated: where L and f are mutual inductances and the resonant frequency, respectively. Subscript Tx and Rx in C denote the capacitors of transmitter and receiver coils, respectively. As can be seen from Fig. 1, C Tx , and C Rx are connected in series and parallel with the resistors R Tx , and R L respectively. The inductance of the transmitter, and receiver coils are defined by L Tx , and L Rx respectively. M TxRx is the mutual inductance coupling of transmitter and receiver coils.

III. DETECTION AND CLASSIFICATION METHOD OF ATRIAL FIBRILLATION A. WAVELET TRANSFORM (WT)
Signal processing is fast becoming a key approach for analyzing signals. WT is a common method for decomposition of signals in signal processing. The WT was utilized for studying the ECG signals in cardiovascular diseases [49]. WT is classified into Continuous Wavelet Transform (CWT) and Discrete Wavelet Transform (DWT). The DWT has been much more effective than CWT for de-noising and decomposing of biomedical signals such as ECG signals at different frequencies. In this paper, we used DWT for the division of the ECG signals.
The wavelet function is a fundamental function of WT analysis. It is selected based on the form of the signal. Daubechies wavelets, such as Db2, Db4, and Db8, were commonly used for decomposition of implantable biomedical signals [50].
Db8 wavelet was used among the wavelets to decompose ECG in various arrhythmias [29]. The signal, y, passes through the low and high series of filters using the DWT method. (2) where g and h are the impulse response for low-and high pass filters, respectively. After passing through the first round of filtering, half of the frequency of signals is eliminated. Then, g and h are subsampled by two for the next round of filtering.
where (y * g) and (y * h) are the complete convolution.

B. DIFFERENCE OPERATION METHOD (DOM)
DOM is a simple and fast consistent method of detecting AFib in ECG signals [51]. The DOM consists of two stages.
In the first stage, the point R in the QRS of EG signals will be detected using the difference equation operation. For the second stage, the other points such as Q and S will be found in the QRS complex. The QRS complex plays an important role for detection of AFib in ECG signals due to a high energy concentration. There are several steps to detect the QRS complex of the ECG signal.
1) The first step: The difference equation is employed to discover the point R in the QRS complex.
where y(n) is the ECG signal, and n is between 0 to N. N is the number of samples in the ECG signal.
2) The second step: The variation of ECG signal at high frequency is eliminated by using any low-pass filter.
3) The third step: The filtered signal at high frequency, y df , is passed through the threshold window, from T 1 = 2MV p to T 2 = 2MV n , to find the final form of the signal. MV p and MV n are the average value of the positive and negative waveform amplitudes, respectively. 4) The fourth step: The R position is found using the y df as defined: The duration of each beat is about 0.6-0.75 seconds with 180-228 samples at a sampling frequency of the 300 Hz. The value of y df greater than zero was considered to derive the R-peak in every interval of the QRS complex. Half of the samples, 90 samples, were selected for the length of the QRS complex intervals.

C. HEART RATE VARIABILITY ANALYSIS (HRV)
HRV is widely used to identify AFib using ECG signals. Studies of arrhythmia show the importance of HRV. R-R intervals play an important role in the analysis of ECG signals using HRV. Two-domain analysis, including time and frequency, was used to investigate the HRV. In this study, timedomain was utilized for analyzing the HRV. The features of RR-interval, HR, RMSSD, and pNN50 were used to analyze the time domain. The mean value and standard deviation of RR-interval; HR was considered as mean RR, Std RR, mean HR and Std HR, respectively.

D. GLOBAL COVERING RULE DISCOVERY
Manual discovery of useful information from different data sets is extremely difficult for the domain experts and it requires care, experience, and time. Automated scientific techniques are employed to discover useful information from the data sets that may grant companies to make appropriate decisions for improving their competitive advantages [52]. Rule discovery (or induction) is one of the important processes that automatically derive useful information in various kinds of data sets. In order to accurately predict the decision of the previously unseen case, the rule discovery constructed the reasoning models, such as rule-based systems, from labeled data sets. The relationship between timeand frequency domains is explained using parameters (or features) which are extracted from HRV analysis. We used a global covering rule discovery algorithm that is a component of LERS (learning from examples using rough sets) system [53], [54].
The algorithm checks if the data are consistent, i.e. If the data are inconsistent, the algorithm computes lower, B * (X ), and upper, B * (X ), approximations of all concepts where B * (X ) and B * (X ) are the set of all samples that can be certainly and possibly classified as the elements of concept X , respectively.
where U = {x 1 , x 2 , . . . , x n } is a non-empty set of samples, B; B ⊆ C is the subset of condition attributes (or features), C = {a 1 , a 2 , . . . , a m }, and [x] B is an equivalence class of relation R which is defined by sample x with respect to B.
The binary relation R on U that is called indiscernibility relation, is defined by: where f (a, x) denotes the value of attribute a for the sample x.

E. ECG SIGNAL DETECTION AND USEFUL PRE-SCREENING RULES FOR AFib
There are random noises in ECG signals for the AFib case. Therefore, it is very cumbersome for the cardiologists to check the ECG signal and diagnose the heart problem using 24-hour Holter monitoring and long-term monitoring. Our novel algorithm helps them to overcome the complications in the interpretation of ECG signal data. Flowchart in Fig. 2 illustrates our novel algorithm for the detection of AFib in ECG signal and classification of features using DOM and global covering rule discovery respectively.

IV. THE OPTIMIZATION OF ECG COILS
The safe frequency range is considered in the WPT simulation to prevent damage to the human body. The IEEE C95.  considered that the frequency range of 3 kHz to 300 GHz was not dangerous for the human under the effect of the electromagnetic field [59]. In addition, the losses in the frequency range of 100 kHz to 200 MHz through the soft tissue, such as skin, were considered negligible. Based on the safe frequency range for the human body, the resonant frequency of 13.56 MHz was considered for the WPT of the coils. The simulations of the WPT coil were performed using ANSYS HFSS software. ANSYS HFSS is utilized to model the WPT systems at high frequency and to simulate their electromagnetic model with circuit elements, such as capacitor, resistor, and inductor, without need to link ANSYS Simplorer.
Tx and Rx coils were modeled at the resonant frequency and the high-frequency electromagnetic field was simulated and analyzed. In addition, S-parameters in Tx and Rx coils were illustrated for both coils versus the frequency (Hz). As can be seen from Table 1, the parameter specification of different types of coils is presented. In our previous paper [60], the cross-section of copper wire was considered a rectangular shape with the same area for both elliptical and circular coils due to considerable computational time for the simulation of the WPT inductive coils. In this study, we developed previous models using a circular cross-section instead of a rectangular one. In addition, the spiral square coil and different combinations of coils were added to the simulations. The spiral square coil had a rectangular wire cross-section with the same area of a circular one. The material of coil wire was considered as a copper for all types of coils.   The Tx and Rx coils are shown using orange and yellow colors, respectively. They are aligned in the center of circular or elliptical coils and the misalignment of coils is not considered in this study. As can be seen from Fig. 3, a lumped port with two ports was selected to link the L-C circuit to the coils. The capacitor of the transmitter and the receiver coils are in the series and the parallel with the coils, respectively. Other types of coils have been similarly modeled to circular-circular coils.
Different combinations of the coils were utilized for the simulation of ECG coils. Six types of 2-coils inductive WPT linked to the L-C circuits were illustrated in Fig. 4. The PTE of the coil is calculated using S-parameter: where the S 21 is the forward voltage gain. The PTE in coils was compared to each other for the same input of the lumped port. The PTE in coils was compared to each other for the same input of the lumped port. Then, the optimized coil with maximum PTE was selected. Finally, the coil type with maximum PTE was considered for the optimization of coil size and distance using the Maximum PTE as the objective function. The air region was considered instead of tissue environment through the optimization of coils and the effect of soft tissues was assumed negligible [61], [62]. The PDL of the coil is calculated using the PTE [12]: where the V in and R L are illustrated in the Figure 1.
As shown in Fig. 5, the magnitude distribution of the H filed is presented at the resonant frequency of 13.56 MHz for a square spiral-square spiral coil. The transmitter and receiver coils were located at a close distance to prevent interference between the coils and the lumped ports.
The effect of frequency on the PTE of the 2-coil inductive was investigated using the S-parameter measurement.   By constraining the size of transmitter and receiver coils, the PTE was optimized via a circular-circular, a circularelliptical, a circular-square spiral, a square spiral-square spiral, an elliptical-elliptical, and an elliptical-square spiral coil using a L-C resonance circuit at resonant frequency of 13.56 MHz. Fig. 7 compares the PTE for six types of ECG coils simulated using ANSYS HFSS software. The maximum and minimum PTE were determined 56.23% and 2.90% for square spiral-square spiral and circular-elliptical coils respectively.
The plot of the transmitter coefficient S RxTx is illustrated in Fig. 8. Fig. 8 shows the optimization of S RxTx versus the distance between antenna and frequency. As can be seen,

A. EFFECT OF R Tx AND R Rx ON THE SCATTERING PARAMETERS (S-PARAMETER)
During the optimization of the antenna, a fixed R L is assumed. However, to maximize the power efficiency of the antenna, the resistance of the transmitter antenna (R Tx ) and the resistance of the receiver antenna (R Rx ) are optimized to find the maximum magnitude of S RxTx for a resonant frequency of 13.56 MHz. As can be seen from Fig. 9 (a), when the R Rx increases for a fixed value of R Tx , the magnitude of S RxTx or PTE is increased. The optimum value for the R Tx is 30 Ohm which the magnitude of S RxTx is maximum. Fig. 9 (b) illustrates when the R Rx increases for a fixed value of R Tx , the efficiency is increased. Therefore, this is no optimal value for R Rx .
The design of square spiral-square spiral antenna consists of two coils resonating at 13.56 MHz as shown in Fig. 10. The lumped ports were placed close to Tx and Rx coils and the effect of distance of lumped ports on the power transfer efficiency (PTE) was investigated. Three distinct distances including 0 mm, 7.5 mm, and 17.5 mm, were simulated using ANSYS HFSS. The obtained results show that the PTE of square spiral-square spiral coil is increased from 56.23% to 63.03%. No significant increase in PTE was found compared with 0 mm distance. The smith chart graph points that the impedance matching is required for the RF coil. Fig.11 illustrates the S-parameter for six types of transmitter and receiver coils.
The S-parameters obtained from the Smith Chart are optimized for different distances between transmitter and receiver coils of square spiral-square spiral with maximum PTE. As shown in Fig. 12, as the distance between T x and R x increases from 0 to 100 mm, the S-parameter becomes narrower.

V. DETECTION OF AFib USING DOM AND MACHINE LEARNING APPROACH
In this section, we will discuss the analysis of ECG data from optimized wireless implantable ECG sensors with maximum PTE, the square spiral-square spiral coil, using the DOM method and global covering rule discovery for the classification of HRV features in AFib patients. The novel algorithm will be embedded in the next generation of the wireless implantable ECG sensors. The analysis of ECG data using DOM and global covering rule discovery are explained in this section. The ECG signals were recored for 29 healthy people (control group) with NSR and an equal number of the NSR patients with AFib problem (study group), which both groups were informed about the research and were approved the ethic forms. The research participants' age can be seen in Table 2.
The ECG data were recorded for 24 hours from patients in Daegu, South Korea. Five minutes were only considered to apply the designed algorithm (DOM with the global covering VOLUME 9, 2021  rule discovery). Fig. 13 shows the wireless implantable ECG sensor, Health Beat TM (See Fig. 13b), with an inductor coil which was inserted under chest skin near the heart. The wireless ECG sensor can be charged and transferred data using CDMA (See Fig. 13a) and frequency identification (RFID) system. ECG monitoring was performed in the hospital. The real-time ECG data (See Fig. 13c) were monitored and analyzed by transmitting to a smart device with embedded software for AFib patients.
The Ethics Committee of Keimyung University supported the experiments. (Approval number: KM-2015-20). The data consisting of HRV parameters were extracted from the ECG signal in order to induce useful pre-screening rules associated with AFib symptoms.  The discretization is an essential process for explaining the AFib symptoms. In this study, we categorized 12 features expressed as quantitative values among HRV parameters using minimum description length (MDL) algorithm [64]. The criteria (i.e., cut-points) for categorizing 12 features is presented in Table 4. For example, ''SDRR'' can be categorized into three intervals based on two reference values: ''SDRR'' ≤ 85.25, 85.25 < ''SDRR'' ≤ 149.55, and ''SDRR'' > 149. 55.
Pre-screening rules were verified using two experiments. In the first experiment, we utilized the overall data to derive rules that could be explained by AFib symptoms. Thus, we investigated the useful parameters to identify AFib symptoms from NSR and compared them with two representative rule induction methods [65], [66], OneR and C4.5 decision tree classifier. In the second experiment, 10-fold cross-validation test was performed to provide the objective performance of the proposed method with two rule induction methods and other four machine learning methods [67]- [69]  such as kNN, logistic regression (LR), multi-layer perceptron (MLP), and support vector machines (SVM) with three kernels such as linear, polynomial, and radial basis function (RBF). It is a widely used technique for testing and evaluating classification performance. The samples were randomly divided into ten subsets using a random seed and nine of them were used as the training set and the remaining one was used as the test set. The procedure is invoked repeatedly ten runs. Then the five evaluation criteria (i.e., Accuracy, Recall, Precision, F-measure, and Kappa coefficient) derived from ten runs are averaged to produce the classification performance on each classifier.
Kappa = Accuracy − Random Accuracy 1 − Random Accuracy (17) TP, TN, FP, and FN represent true positive, true negative, false positive, and false negative respectively. In (17), ''Random Accuracy'' is defined as the sum of the products of reference likelihood and result from likelihood for each class and can be written as: (TP+FP)×(TN+FN)+(FN+TP)×(FP+TP)/N 2 , where N defines the total number of samples.
Cross-validation is one of the procedures which is utilized to assess the machine learning models. It is named as a k-fold cross-validation because it uses a k parameter to divide the limited number of samples. At the cross-validation procedure, the proposed method evaluates new decisions of test samples from a rule set, which is induced by train samples. The best k rules are used for prediction of each test sample using a rule set which is contained rules for each class label with the following procedure: (1) select all the rules which conditions are matched by the test sample, (2) select the best k rules from the candidate rules in step (1), and (3) choose the class of rule with the highest matching degree of rule conditions as the predicted class [70]. The proposed method was implemented and evaluated on the hardware and software platforms: CPU, Intel R CoreTM i7-6700 @ 3.40GHz; RAM, 32.0GB; OS, Windows 10; S/W, IntelliJ IDEA 2019.1.4 (Ultimate Edition) with Python 3.6.8. Six benchmark methods, i.e., OneR, C4.5, kNN(k = 1), LR, MLP, and SVMs (linear, polynomial, and RBF), were evaluated on a version of Weka 3.8.3 [71]. Table 5 shows the pre-screening rules associated with HRV parameters which were extracted from the proposed method. These rules illustrate the sorted rules in descending order according to two evaluation criteria, rule confidence (CONF) and rule support (SUPP). Suppose that a rule is defined as IF X THEN Y. Then, rule support, defined in (18), represents the ratio of samples that satisfy both the condition X and decision Y . Rule confidence, defined in (19), is an indication of how often the rule has been found to be true. The confidence of a rule is the proportion of samples that contain both X and Y .
where || is the cardinality of a set. As can be seen from the experimental results, three important parameters, pNN50, NN50, and LF, were found to distinguish between AFib symptoms and NSR. pNN50 was the most important parameter compared to others, and 41.38% of 58 patients demonstrated that the pNN50 was greater than 34.75.  Table 6 shows the classification rules generated from OneR. The OneR classifier is one of the simplest rule induction algorithms. From all HRV parameters, it selected the one that carries the most information about the outcome of interest and creates two decision rules from this parameter. RMSSD was the most important parameter to distinguish AFib symptoms from NSR. 29 (i.e., 50%) of 58 patients demonstrated that the RMSSD was equal or greater than 101.85, and then its confidence was 0.85. Table 7 shows the classification rules extracted from C4.5 decision tree classifier. Four important parameters, NN50, RMSSD, LF, and mRR, were determined in order to generate the decision tree model to identify AFib symptoms from NSR. Three (No. 2, 4, and 5 in Table 7) were useful prescreening rules associated with AFib.  Table 8 shows the classification performances for the five evaluation criteria after 10-fold cross validation. In Table 8, the average number of rules generated by the proposed method are larger than those derived by OneR and C4.5 decision tree classifiers.
However, we found that the combination of three parameters, pNN50, NN50, and LF, can lead to more accurate classification rules than those used in OneR and C.45 classifiers (See Table 9). The proposed method achieved higher classification accuracy, F-measure, and Kappa coefficient than six benchmark methods.
In order to provide a better understanding, we examined the pairwise comparison between the F-measures of the classifiers; the results are presented in Table 10. The pairwise comparison is the difference between the observed means, i.e., F-measures, in two independent classifiers. A significance value, standard error (SE), and 95% confidence intervals (CI) of the difference were provided.
The significance value, estimated using the t-test, is the probability of obtaining the observed difference between the classifiers if the null hypothesis were true.
The null hypothesis is the hypothesis that the difference is zero. The significance level (or p-value) is calculated with the value t as:  The standard error denotes the difference between the two means of F-measure calculated from i-and j-th classifiers.
where n i and n j denotes the number of test samples used in i-and j-th classifiers during 10-fold cross validation respectively. Then the pooled standard deviation s is as follow: where s 2 i and s 2 j are the standard deviations of F-measure in the two classifiers with the sample size n i and n j . Thus, the significance value is the area of the t distribution with n i + n j -2 degrees of freedom, that falls outside ±t [72]. When the p value is less than 0.05, the conclusion is that the two F-measures are significantly different.
From these results, we showed that the proposed method had significantly better discriminatory power than these benchmark methods.

VI. DISCUSSION
Cardiovascular disease is the most leading cause of death in developing countries. An arrhythmia is one of the most common types of cardiovascular disease. A cardiologist monitors and analyzes the heart condition in arrhythmia patients using 24-h hour Holter monitoring. An analysis of data from Holter (ECG) monitor and the detection of AFib cardiovascular disease are continuing concerns for cardiologists. Wireless implantable devices are being developed to record the data, monitor the patient's condition, and analyze the recorded data. A medical doctor can access the data anytime that is needed using a smartphone and wireless network. A wireless implantable ECG sensor can be utilized to detect AFib for inpatient and outpatient.
There are some important parameters, including size, distance of the inductive coils, and sensor PTE, to be considered for designing implantable medical devices. This paper optimized a human implantable ECG sensor with WPT for maximum PTE. As mentioned in the literature review, the PTE in induced coils was investigated using different types of coils [7], [8], [73].
In our previous work [60], the PTE of the elliptical-circular coil was obtained 1.85% for a distance of 5 mm while we calculated the PTE as 2.90 % for a real wire with circular cross-section at the distance of 0 mm. In addition, we have demonstrated that the PTE of the square spiral coils was greater than the circular ones at the resonant frequency of 13.56 MHz which is consistent with other research [74].
The 4-coil inductance link had higher PTE than the 3-coil one [7]. However, the power delivered to the load resistance of the 3-coil inductive link was lower than the 4-coil [12]. The PTE of the 2-coil inductive WPT is less than the 4-coil one [12]. A WPT system including a 3-coil inductive link was proposed and designed based on the FEM and a hybrid algorithm [75]. The results were compared to 2-and 4-coil resonant systems. The power transfer of the receiver coil was increased in 48% as compared to 2-and 4-coil resonant system [75]. Nevertheless, there is a geometrical size limitation to use the wireless implantable device in the human organ. Hence, the 2-coil inductive WPT has minimum size compared to other coil types. In addition, the PDL of 2-coil inductive WPT is greater than other coils for a short distance [12]. the average of the maximum PTEs of 21% [8] and 85.5% [76] is approximately close to the maximum PTE, 56.23%, of present study.
The PTE was increased when the Tx and Rx coils were moved toward each other. This result agrees with the finding of other research [7], in which the PTE of the 3-coil inductive system decreases with the increase of coil distance. When the distance between the transmitter and receiver coils was increased, the PTE was dropped because of decreasing the coupling coefficient of coils [77]. Hence, the far distance between coils did not work for the wireless transfer system. It can be predicted that the alignment of the coils will not significantly affect the PTE. Table 11 illustrates the comparison of present study with other references. This study analyzed the ECG signal from AFib and NSR patients using the DOM method. The DOM can be utilized in the implantable ECG sensor to detect the AFib from NSR. The pNN50 and NN50 were found the most important parameter to distinguish between AFib symptoms and NSR. The present finding seems to be consistent with [78] which found pNN50 is maximum in the AFib group. However, the finding of the current study does not support the previous research [79], in which low LF/HF was the strongest predictor of AFib. Our novel technique with HRV features has generated the classification accuracy of 96.67%.
The proposed classification technique was compared to advanced arrhythmia classification methods in Table 12.
Our classification technique has generated better results than  The key findings of this study are given as follows: 1) The square spiral-square spiral coil demonstrated that the maximum PTE was 56.23% at 13.56 MHz frequency.
2) The DOM can detect the QRS complex from ECG signal.
3) The rule discovery method is able to induce the classification rules without the removal of the inconsistent samples, e.g., the two samples have identical attribute values but are labeled as belonging to different concepts (i.e., AFib and NSR), in the HRV features by using two rough set approximations, i.e., Eqs. (8) and (9).
4) The proposed model provides more informative and explainable knowledge that could be used to identify AFib symptoms than statistical machine learning methods, in particular, NNs and SVMs, although the classification power of the proposed model is dependent on other data discretization algorithms such as FUSINTER, ChiMerge, Chi2, etc.
5) The 10-fold cross-validation and the pairwise comparison results are provided for comparing the classification power between the proposed and six benchmark models.
There has been little ECG signal data in the ECG database recorded using a human implantable ECG sensor. A further study with more AFib patients considered the ECG signals from a human implantable ECG sensor, will need to be undertaken. The proposed method was considered for the AFib only and there are other types of arrhythmias such as Ventricular tachycardia. Therefore, false-negative can be increased because of other types of arrhythmias. More research is required to detect the effect of other types of arrhythmias. In addition, it would be interesting to determine the effects of noise in the ECG signal that can be misdiagnosed as an abnormal heartbeat.

VII. CONCLUSION
The main aim of this study was to design and develop an implantable ECG sensor with maximum PTE for classifying and detecting the AFib from the transferred data using global covering rule discovery and the MDL algorithm. Hence, for a 2-coil inductive with WPT, which was attached to a L-C circuit, was optimized using six different types of ECG coils at the resonant frequency of 13.56 MHz. The square spiral-square spiral coil can reach a PTE of 56.23% at the resonant frequency of 13.56 MHz. The optimized coil with maximum PTE was used in the implantable ECG sensor and the ECG data were recorded. To classify AFib from NSR, a novel machine learning technique, named as global rule discovery, was used for HRV features. A simple and fast efficient algorithm, named as difference operation method (DOM), was utilized that can detect AFib from the NSR using QRS complex. The ECG signals were recorded using twentynine AFib patients and a control group with NSR.
In this study, we categorized 12 features (excluding ''Sex'') in quantitative values among HRV parameters using MDL algorithm. The classification accuracy was calculated 96.67% with the average number of classification rules of 7.9 ± 0.32. Our results showed that the averaged F-measure of our novel technique was more superior than six benchmark methods such as OneR, C4.5, kNN, LR, MLP, and SVM with three kernels, as well as other reported classification methods using machine learning approaches for detection of AFib using ECG signals. Based on the experimental results, three parameters, pNN50, NN50, and LF, were found to be important for distinguishing between AFib symptoms and NSR. Well-designed and developed implantable ECG sensor with maximum PTE can be a basis for the next generation of human wireless implantable ECG sensors.