# Data Independent Acquisition Based Bi-Directional Deep Networks for Biometric ECG Authentication
## 3 Methodology  
### Data Argumentation Process  
In this research, ECG-ID (ECGID), MIT-BIH Arrhythmia Database (MIT-BIH ECG), STAFF-III, and LT-AF [28; 29; 30; 31] for ECG signals with QRS complex dataset, and AFDB [32], and AHA dataset [33] for ECG signals without the QRS complex from PhysioNet [34], have been performed separately for all candidate models. The signal processing phase can also be determined as data pre-processing in ECG authentication applications. Figure 4 illustrates the framework of data preprocessing phase of proposed methodology where the raw ECG signals with QRS complex are conducted with data argumentation process such as data filtering, R-peak detection and heartbeat segmentation in order to obtain a segmented single heartbeat window before they are fed into proposed deep networks. Similarly, ECG signals without QRS complex are conducted with extended data independent acquisition process where the signals are randomly segmented without having peak detection, and performed auto-correlation technique to transform two dimensional data to be fed into downstreaming process. In data argumentation process, it mainly consists of three core operations, i.e., detrending, noise removal (filtering) [35], and R-peak detection, which is the procedure for annotating the index data points of the corresponding R-peak complex along the signal. Then, the original ECG signal is detrended to yield a better approximation for a specified length of a segment for signal analysis. The nonlinear trend in the signal is also removed by fitting a low-order polynomial to the signal and subtracting it. The polynomial is set to order 6 [36]. Subsequently, a Butterworth bandpass filter in the range of 5 Hz and 15 Hz is applied to eliminate the baseline wander. Baseline wanders are low-frequency noise that occurs during data acquisition in signal processing. This is usually due to perspiration that affects the electrode impedance, respiration, and body movements such as finger movements on the electrode. The detrended signal and filtering process of the original signal can be found as shown in Figure 5. The result of the filtering process is then normalized in the range of 0 and 1 by subtracting from the mean value to balance the contribution for the training phase using (13), (14) \(x\), where \(\bar{x}\) denotes the raw ECG signal and the resulting signal, respectively.  
\[\bar{x}=\frac{x-min(x)}{max(x)-min(x)} \tag{13}\]  
\[\bar{x}=\bar{x}-mean(\bar{x}) \tag{14}\]  
Since the R-peak is the most prominent peak used to identify a heartbeat within a signal, R-peak detection is still necessary using the Pan-Tompkins algorithms [28; 37] for annotating the respective peak points throughout the signal. Thus, every heartbeat in the original signal can be extracted. After annotation of the indices of the R-peak, a suitable number of samples before and after a given R-peak point are then sliced to segment the heartbeat of a signal, which is a vector form. For our fiducial approaches, we consider 125 samples before and after the R peak point to form a heartbeat for the dataset with the QRS complex, and 150 samples for the ECG-ID dataset. The other datasets are also conducted using the same approach depending on their sampling rates, and a sample of a vector that interprets the heartbeat. For each signal for every dataset, approximately 45 to 50 heartbeat segments were withdrawn using 251 samples, whereas 51 heartbeats were extracted using 301 samples from the ECG-ID dataset and other datasets for heartbeat segmentation.