# Fault Diagnosis of Vehicle Gerboxes Based on Adaptive Wavelet Threshold and LT-PCA-NGO-SVM
## 2 Principle of the Method
### Principle of Wavelet Threshold Denoising
#### 2.1.1 Optimization and Improvement of Threshold Function in Wavelet Denoising  
Conventional threshold functions are of two types, namely soft threshold and hard threshold functions. Hard and soft thresholds are described as follows:  
\[w_{T}=\left\{ \begin{array}{c}|w|,\ |w|\ \geq\ T\\ 0,\ |w|<T\end{array} \right. \tag{2}\]\[w_{T}= \begin{cases}sgn(w)(|w|-T),&|w|\geq T\\ 0,&|w|<T\end{cases}  \tag{3}\]  
where \(w\) is the wavelet coefficient of the original signal and \(w_{T}\) is the wavelet coefficient after threshold processing. The calculation formula of threshold \(T\) is as follows [23]:  
\[T_{i}=\frac{\sigma\sqrt{2\text{ln}(n)}}{\text{ln}(i+1)} \tag{4}\]  
Here, \(n\) is the signal length, \(\sigma\) is the standard deviation of the noise, \(T_{i}\) is the threshold value of the \(i\)-th wavelet coefficient, and \(i\) is the number of decomposition layers. When the number of decomposition layers \(i\) is larger, then threshold \(T\) is smaller, which ensures the noise reduction process of the signal. \[\sigma=\frac{median(|w|)}{0.6745} \tag{5}\]  
where \(w\) represents the high-frequency coefficient after the \(i\)-th wavelet transform, and \(0.6745\) is the adjustment coefficient of noise standard deviation. Both threshold functions aim to eliminate wavelet coefficients with small energy values while retaining or reducing those with large energy, offering a straightforward calculation approach. The hard threshold function efficiently filters out considerable weak information, preserving entirely the original information with large energy. However, the utilization of a discontinuous function for setting the threshold leads to pronounced vibrations and jump points in the signal after noise reduction, resulting in inadequate smooth connections between signal points. In contrast, the signal processed by the soft threshold function avoids interruptions and overcomes the shortcomings of the hard threshold. Nevertheless, it introduces a certain deviation in the signal energy across the entire signal scale [24]. Some useful signals are lost in this process, directly impacting the accuracy of the reconstructed signal. To harness the benefits of both hard and soft threshold functions, researchers have proposed an improved threshold function. Experimental verification has shown that this enhanced threshold function effectively removes noise while retaining useful components in the signal, optimizing the denoising outcome. [PERSON] et al. [25] introduced an improvement to the threshold function by incorporating an exponential function based on the soft threshold function. This modification aims to enhance the calculation speed. However, challenges persist in terms of signal compression and deviation caused by the soft threshold function, leading to the direct discarding of wavelet coefficients smaller than the threshold value. Consequently, the retention of low-frequency signals becomes limited. The expression of the threshold function is given as follows:  
\[F_{T}= \begin{cases}sgn(w)\Big{(}|w|-Tb^{a(T-|w|)}\Big{)},&|w|>T\\ 0,|w|\leq T\end{cases}  \tag{6}\]  
[PERSON] et al. [26] proposed a relatively smooth threshold function, aiming to integrate the features of both soft and hard threshold functions comprehensively. While this approach leverages the advantages of both functions, it comes with a limitation in flexibility when adjusting the signal. The expression of the threshold function is given as follows:  
\[F_{T}= \begin{cases}w-\frac{T^{2}}{3w}-\frac{sgn(w)}{3\epsilon^{|w|-T}},&|w|\geq T \\ \frac{w}{3\epsilon^{|w|-T}},&|w|<T\end{cases}  \tag{7}\]Combining the strengths gleaned from various threshold functions, this study introduces a novel and improved threshold function designed to enhance noise reduction effectiveness. The expression of the improved threshold function is as follows:  
\[F_{T}= \begin{cases}sgn(w)\Big{(}|w|-\frac{aT}{e^{(|w|-T)(1-a)}}\Big{)},&|w|\ \geq\ T\\ sgn(w)\frac{1}{2}(1-a)|w|e^{(|w|-T)^{3}},&|w|<T\end{cases}