## 3 Material and Methods
### Proposed CRNN Architecture  
ECG comprises time series data and LSTM is particularly useful for time series and sequential data. The proposed CRNN model can also exploit consecutive QRS with repetitive patterns. Even for a single QRS segment, the use of LSTM is significant for sequential ECG data, comparing it with conventional signal processing-based feature extraction techniques that struggle with complex temporal dependencies. ECG-segmented samples are passed as input to the CNN architecture. Each sample has 94 values, the sample has been reshaped to (1 \(\times\) 94) for passing to the convolutional neural network. This is a one-dimensional data single-column with 94 values, so the input shape for CRNN is (1 \(\times\) 94). The CNN architecture made with the combined LSTM and 1D convolutional layers. The one-dimensional convolutional neural network accepts dimensional data with the shape of 1 \(\times\) 94. There are two LSTM layers the input has passed to the LSTM with hidden unit 128 and the second LSTM layer with hidden unit 64 and the return sequence should be true to obtain a 1D array to pass the next layer. The two consecutive LSTM layers can improve the model's ability to capture complex temporal dependencies in the ECG signal and mitigate the vanishing gradient problem. The low-level features and patterns in the time series data of ECG are learned with the first LSTM layer, and capture higher-level features and dependencies using a second layer. The use of stacked LSTM layers for time series data can potentially increase the performance of the classification task [50; 51]. There are three 1D convolutional layers consecutively, the first convolutional layer consists of 32 filters of kernel size 3, the second convolutional layer consists of 64 filters of kernels of size 5 and the third convolutional layer consists of 32 filters of kernels of size  
Figure 4: Segmentation of ECG signals in different colors shown for three randomly selected subjects: (**a**) 94 samples extracted from ECG-ID database from random subjects; (**b**) 94 samples extracted from MIT-BIH database from random subjects; and (**c**) 94 samples extracted from the NSRDB database from random subjects. Figure 3: (**a**) Raw ECG signal with fiducial points; (**b**) The extracted QRS complex with 45 samples before R-peak and 49 samples after R-peak. 8 with the same padding values and the activation function of ReLU. A dropout layer of 0.5 followed by convolutional layers discards 20% of random features to avoid overfitting. A MaxPool layer has applied after the dropout layer of size is 5 with a stride of 2 and then a flattened layer is added to convert features into a single array. Three layers were fully connected followed by the flattening layer, the FC1 and FC2 units of 256 and 128 with the activation function ReLU and the FC3 unit according to the number of classes with the activation function SoftMax applied for classification. Figure 5 depicts the network's architecture. The first two LSTM layers have learnable parameters of 66,560 and 49,408; the first, second and third convolutional layers have learnable parameters of 6176, 10,304 and 16,416; and the final 2 fully connected dense layers have learnable parameters of 32,896 and 6192. Figure 5 and Table 2 includes a thorough discussion of the 1D-CRNN architecture. The Dense 1 layers is used as a feature layer, and the extracted number of features is 128 because the layer's output shape is 128. These 128 features were concatenated to DWT for classification. The proposed model is based on feature level fusion, not the decision level fusion. The last layer of 1D-CRNN is the output fully connected layer that can classify the person according to the label. For feature level fusion, we removed the fully connected layer, then extracted a feature from the second last layer that contains 128 values, which was used as a feature vector to concatenate with the DWT features. the signals in the frequency domain.