## 2 Methodology
### Proposed Discrete Wavelet Transform (DWT)  
The DWT is a powerful method for denoising ECG and other sensor signals, playing a crucial role in enhancing the accuracy and reliability of recorded data. This is essential for the precise monitoring of physiological parameters, early detection of health anomalies, and overall improvement in user experience in various healthcare applications. Advanced denoising techniques not only mitigate the impact of noise and artifacts but also ensure the integrity of wearable sensor data, facilitating accurate diagnostics, better patient outcomes, and broader adoption of wearable technology in both clinical and non-clinical settings [19; 22]. Noises represent unwanted signals in data acquisition that need to be removed to process signals efficiently, especially in critical situations where the accuracy and clarity of the signal are paramount [22]. Previous studies have employed a variety of signal processing techniques, including the fast Fourier transform (FFT) and moving average filter, to address and mitigate noise in different types of signals such as electrocardiograms (ECG), fiber Bragg grating (FBG) signals, and others. These methods have been pivotal in enhancing the quality and clarity of the captured data by transforming the signals into a frequency domain where noise can be more easily identified and filtered out, as well as by smoothing the signal to reduce random variations. By leveraging these techniques, researchers have been able to significantly improve the accuracy and reliability of signal analysis, thereby advancing the effectiveness of monitoring and diagnostic systems across a wide range of applications. These advancements underscore the ongoing importance of developing robust noise reduction strategies to enhance signal fidelity in both clinical and technological contexts [22; 23]. However, the coarse scale of the Fourier transform posed limitations in effectively removing noise, although it can be utilized to reduce noise in wearable sensor signals such as ECG sensors, glucose sensors, and others. Consequently, in this study, DWT is proposed for the proposed system. The wavelet transformation of an input signal x(t) is stated as follows [19]:  
\[\mathrm{W}a,\mathrm{b}\ =\int_{-\infty}^{\infty}\mathrm{x(t)}\bigg{(}\frac{1}{ \sqrt{a}}\bigg{)}\gamma*\bigg{(}\frac{\mathrm{t-b}}{a}\bigg{)}dt \tag{1}\]where t is time, W\(\alpha\),b is the wavelet transformation of x(t), \(\alpha\) is the dilation parameter, b is the location parameter, \(\gamma*\) (t) is the complex conjugate of the wavelet function. In order to define the DWT, the following assumptions are made. Moreover, the detailed process of DWT is described below [18]. In DWT, critical information is extracted from the sensor signal, and noise is removed from the data. The wavelet transforms separate signals into low and high frequencies to preserve the original data. It accomplishes this by extending and translating the basic wavelet, resulting in several wavelet coefficients. High-pass filters capture the high-frequency details of the signals, while low-pass filters capture the low-frequency information. the nosed signal can be defined as follows [18]:  
\[\mathrm{Sn}=\mathrm{Xn}+\mathrm{Yn} \tag{2}\]  
where n is signal length, S is the noised signal, X is the important signal, and z is the unimportant (noisy) signal. When the noise in the signal is random and discrete, the resulting wavelet coefficients are relatively low after applying the DWT. The low-frequency and high-frequency wavelet coefficients are then filtered using a preset threshold. The remaining coefficients are transformed back using the inverse DWT to reconstruct the original signal. The steps of the DWT noise reduction process are as follows:  
1. Collect the original noisy data. 2. Apply the wavelet transform to the data. 3. Set the level of decomposition for wavelet decomposition. 4. Perform threshold processing. 5. Reconstruct the signal. 6. Finally, the noise in the signal is reduced.