## 3 Results and Discussion  
Electrocardiography (ECG) is a non-invasive method used to assess cardiac health by capturing the heart's electrical activity. Wavelet transformation is a promising technique for analyzing ECG signals, providing insights into heart rate variability (HRV). This study analyzed HRV using wavelet transformation on 60 ECG recordings from the MIT-BIH Normal Sinus Rhythm and Arrhythmia databases. The analysis followed five main steps: locating R peaks, calculating RR intervals, generating spectrograms, extracting frequency bands, and determining the LF/HF ratio using both continuous wavelet transform (CWT) and discrete wavelet transform (DWT). Accurately locating R peaks is crucial, as the RR interval accuracy depends on it. Previous studies showed that the MODWT and MODWPT methods were effective for R peak detection, with MODWPT offering better resolution. Thus, both methods were tested on six randomly selected recordings from both databases (Normal Sinus: 16,265, 16,786, and 19,140; Arrhythmia: 106, 112, and 117) to evaluate their performance. Except for recording no. 117, no significant differences were observed in the R peak localization, RR intervals, and spectrogram plots generated using MODWPT and MODWT for these ECG recordings. This similarity is illustrated in recording no. 16,786 in Figures 9 and 10. The total power and LF/HF ratio of these recordings, computed using  
Figure 8: Extracted frequency components in VLF, LF, and HF bands for record no. 16,265 from the spectrogram. This represents the variation in the magnitude of rr intervals for each band. both the MODWPT and MODWT methods, were nearly equal, except for recording no. 117, as shown in Table 3.  
Figure 11a shows the R peak localization for recording no. 117 using MODWPT and MODWT, respectively, revealing a significant difference in R peak localization from beat 0 to 600. The RR interval vs. beat number plot for MODWPT (Figure 11b) also differs from the MODWT plot (Figure 12b) until the 600 th beat. While the spectrograms from both methods show no significant difference (Figures 11c and 12c), the extracted frequency bands show a large difference in HF band power, confirming that MODWPT provides better resolution in the HF range than MODWT. This is because MODWPT decomposes both LF and HF components at each level, resulting in more filtered sub-frequency components, while MODWT only decomposes LF components. As a result, MODWPT offers better resolution in both LF and HF ranges, whereas MODWT performs better in LF components only. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline Index & \multicolumn{6}{c}{**LF/HF Ratio**} \\ \hline Method & 16,265 & 16,786 & 19,140 & 106 & 112 & 117 \\ \hline MODWPT & 3.188 & 1.869 & 1.682 & 0.103 & 1.032 & 0.424 \\ \hline MODWT & 3.164 & 1.875 & 1.700 & 0.098 & 1.028 & 0.852 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Estimated LF/HF ratio values using MODWPT and MODWT methods. Figure 10: (**a**) Located R peaks. (**b**) RR interval vs. beat no. plot. (**c**) CWT spectrogram for record: 16,786 using MODWT. For recording no. 16,786, MODWPT method and MODWT method do not show any significant difference. Figure 9: (**a**) Located R peaks. (**b**) RR interval vs. beat no. plot. (**c**) CWT spectrogram for record: 16,786 using MODWPT. However, the computational power required for MODWPT's multilevel decomposition leads to longer processing times, and in some cases, the analysis failed due to memory issues. Therefore, the study continued with the MODWT method. For the analysis, the db4 and sym4 wavelets were used, as they resemble the QRS complex. The signals from the MIT-BIH normal sinus dataset were decomposed into five levels using db4, considering levels 2 to 5 for R peak localization. MIT-BIH arrhythmia signals were decomposed into six levels using sym4, with levels 3-6 considered. R peaks correspond to middle frequencies in the ECG signal, and previous studies suggest a sampling frequency of around 50 Hz for QRS peaks, explaining the exclusion of higher frequency levels.