## 2 Materials and Methods
### Discrete Wavelet Transform (DWT)  
The discrete wavelet transform is a wavelet transform where the wavelets are separately sampled. In this analysis, the original signal is divided into two parts, namely, approximations and details. The estimate \(a\) is the low pass filter where the low-frequency components of the original signal are separated, and the detail \(d\) is the high pass filter where high-frequency components pass. Moreover, the original signal \(x\) is not only isolated in one level, but the approximation \(a\) is also decomposed into much lower level (\(k=3\)) components, known as multiple level decomposition, which is shown in Figure 3.  
The significant difference between CWT and DWT is that CWT operates at every scale up to the maximum value, whereas, in DWT, the range and positions can be preselected and, in that way, the size of the analysis reduces its size and is thereby faster and more precise. Mathematically, for \(j\) scales and \(k\) levels, the approximate information \(f_{a}^{j}(x)\) can be the summation of estimated coefficients \(a_{j,k}\) and the scale function \(\varphi_{j,k}(x)\), as shown in Equation (13). Similarly, the detail information \(f_{d}^{j}(x)\) can also be described as the summation of approximate coefficients \(d_{j,k}\) and the scale function \(\Psi_{jk}(x)\) in Equation (14):  
\[f_{a}^{j}(x)=\sum_{k}a_{j,k}\varphi_{j,k}(x) \tag{13}\]  
Figure 3: Multiple level discrete wavelet analysis. \[f_{d}^{j}(x)=\sum_{k}d_{jk}\Psi_{jk}(x) \tag{14}\]  
A standard means of applying this is via logarithmic discretization of the scale \(s\) and then connecting it to the step size. The step size is the values between the translation parameter \(\tau\). The equation is adapted from Gao & Yan (2010) Gao & Yan (2010) and shown below, where \(Z\) is an integer parameter:  
\[\{ \begin{split}\xi_{s_{0}}^{s=j}&\tau_{\tau=k\tau s_{ 0}^{j}}\;\tau_{0}\
eq 0;\;s_{0}<1\;(jeZ,keZ)\\ \Psi_{jk}(x)&=s_{0}^{-0.5j}\Psi(\frac{x}{s_{0}^{j}}- k\tau_{0})\\ \Psi_{jk}(x)&=2^{-0.5j}\Psi(\frac{x}{2j}-k)\end{split}  \tag{15}\]  
where \(j\) is the scale and \(k\) is the level of the wavelet. Equation (18) is the base wavelet equation. [PERSON] (2017) [PERSON] (2017) assumed \(s_{0}=2\) and \(\tau_{0}=1\); therefore, Equation (19) can be derived and, finally, the discrete wavelet transform is obtained:  
\[W(j,k)=\Big{[}f(x),\Psi_{jk}(x)\Big{]}=2^{-0.5j}\int_{-\infty}^{\infty}f(x) \;\Psi\Big{(}\frac{x}{2j}-k\Big{)}dx \tag{18}\]  
\[f(x)=\sum_{jk}C_{jk}\Psi_{jk}(x) \tag{19}\]  
The Daubechies wavelet uses scalar products with scaling wavelets and signals to calculate moving average and difference. This method allows for obtaining a good range of signal data to compute the median and deviation. Daub4 is the most accepted and straightforward way of analyzing wavelets. If we consider a signal \(x\) constituting \(n\) number of values, then the daub4 transformation creates the mapping \(x\overset{D_{k}}{\rightarrow}(a^{k}|d^{k})\) to its approximation \(a^{k}\) and details \(d^{k}\) sub-signals for \(k\) levels:  
\[a_{m}=x.U_{m}^{k} \tag{20}\]  
\[d_{m}=x.\Psi_{m}^{k} \tag{21}\]  
where each value of \(a_{m}\) and \(d_{m}\) are the scaler products. \(U_{m}^{k}\) is the scaling signal and \(\Psi_{m}^{k}\) is the wavelet at level \(k\)Dewe (2017). Wavelet Packet Analysis  
In DWT, the primary signal is decomposed into an approximation and details, and the approximation is divided into a second-level approximation and features; thus, \(n\) levels of decomposition can be undertaken. In wavelet packet analysis, both the details and the estimate can be decomposed, which means the signal can be encoded in \(2^{n}\) ways. The wavelet packet decomposition tree is shown in Figure 4.  
In the MATLAB toolbox, the entropy-based criterion is used to find the most desirable wavelet decomposition. Wavelet packet transformation provides many bases, and the best tree base can be found by the entropy criterion [48]. Wavelet packets are the general form of orthogonal wavelets.