# Harmonic Detection Method Based on Parameter Optimization VMD-IWT Combined Noise Reduction
## 2 VMD Parameter Optimization and Wavelet Noise Reduction
### Improved Wavelet Thresholding Denoising  
While parameter-optimized VMD and its mode recognition can effectively eliminate Gaussian white noise, they may not completely remove all types of noise. To address this issue, residual noise is processed using an improved wavelet threshold denoising method. \begin{table}
\begin{tabular}{c c} \hline \hline
**Correlation Coefficient** & **Degree of Correlation** \\ \hline \(0.8<\mid\!\rho\!\mid\leq 1.0\) & extremely relevant \\ \(0.6<\mid\!\rho\!\mid\leq 0.8\) & highly relevant \\ \(0.4<\mid\!\rho\!\mid\leq 0.6\) & moderately relevant \\ \(0.2<\mid\!\rho\!\mid\leq 0.4\) & weakly relevant \\ \(0.0<\mid\!\rho\!\mid\leq 0.2\) & almost irrelevant \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Degree of correlation coefficient. By leveraging both the time-frequency localization capabilities of VMD and the noise reduction properties of wavelet threshold denoising, this approach achieves enhanced signal denoising performance. The efficacy of the wavelet threshold denoising method hinges on the selection of the threshold value and threshold function. Variations in the threshold function reflect differing coefficient estimation methods. Additionally, the magnitude of the threshold critically affects the noise reduction outcomes; only through careful selection of the threshold can significant denoising be achieved without the loss of vital signal components [26]. Traditional wavelet thresholds include both hard and soft threshold functions, which are expressed as follows:  
\[\hat{w}_{jk}=\left\{ \begin{array}{c|c}w_{jk},&\left|w_{jk}\right|\geq\lambda \\ 0,&\left|w_{jk}\right|<\lambda\end{array} \right. \tag{11}\]  
\[\hat{w}_{jk}=\left\{ \begin{array}{c|c}\text{sgn}\Big{(}w_{jk}\Big{)}\cdot \Big{(}\left|w_{jk}\right|-\lambda\Big{)},&\left|w_{jk}\right|\geq\lambda\\ 0,&\left|w_{jk}\right|<\lambda\end{array} \right. \tag{12}\]  
Although hard and soft thresholds are extensively employed in practical applications, they exhibit inherent limitations, including discontinuous breakpoints and signal distortions. To address these issues, this paper introduces a novel method for selecting an improved wavelet threshold function, building upon the traditional wavelet threshold approach to rectify its deficiencies. The expression for the enhanced wavelet threshold is as follows:  
\[\hat{w}_{jk}=\left\{ \begin{array}{c|c}w_{jk},&\left|w_{jk}\right|>\lambda_{2 }\\ \text{sgn}\Big{(}w_{jk}\Big{)}\frac{\lambda_{1}\sqrt{w_{jk}^{2}-\lambda_{1}^{ 2}}}{a\sqrt{\lambda_{2}^{2}-\lambda_{1}^{2}}},&\lambda_{1}\leq\left|w_{jk} \right|\leq\lambda_{1}\\ 0,&\lambda_{1}<\left|w_{jk}\right|\end{array} \right. \tag{13}\]  
where \(\lambda_{1}\) and \(\lambda_{2}\) are thresholds, with \(\lambda_{1}=a\lambda_{2}\), the adjustment parameter '\(a\)' is used to control the slope of the curve between \(\lambda_{1}\) and \(\lambda_{2}\), thus providing better flexibility to the improved threshold function. Specifically, \(\lambda_{1}\) is defined as \(\lambda_{1}=\sigma 2\lg N\), where \(\sigma\), the standard deviation of noise, is calculated as \(\sigma=\text{median}\left(w_{j,k}\right)/0.6745\). Here, \(N\) denotes the signal length, and median (\(\cdot\)) refers to the operation of finding the median. The improved wavelet threshold function, \(w_{jk}\), is continuous at \(\pm\lambda_{1}\) and \(\pm\lambda_{2}\), ensuring continuity within the wavelet domain. This enhancement overcomes the discontinuities inherent in traditional wavelet thresholds. The flexibility of this improved function allows for adaptation to diverse environments through the selection of the tuning parameter \(a\), which ranges from 0 to 1. At lower values of \(a\), the curve between \(\lambda_{1}\) and \(\lambda_{2}\) has a gentler slope, making it more akin to the original threshold. Conversely, higher values of \(a\) increase the slope, aligning it closer to a hard threshold.