A New Wavelet Thresholding Function Based on Hyperbolic Tangent Function

,


Introduction
Signals are often contaminated by noise during their acquisition, processing, and transmission because of the measurement system error and the environment interference.In order to solve this classical problem, a variety of signal denoising methods, such as median filtering [1], particle filtering [2] and H-infinity filtering [3,4], were proposed.Recently, due to multiresolution and low entropy, wavelet transform has become an effective technology to study signal denoising.Many methods based on wavelet theory were proposed [5][6][7][8], such as wavelet coefficients modulus maxima method, wavelet correlation method, and wavelet threshold method.Among these methods, wavelet threshold denoising has been the most widely used, because of its simple calculation and good effect.Wavelet threshold method was proposed by Donoho and Johnstone, whose main idea is to reconstruct signal on the basis of thresholding coefficients.Therefore, thresholding function is one of the factors that affect the denoising effect.Donoho and Johnstone [8] considered that only a small number of wavelet coefficients were necessary to reconstruct the signal and proposed a classical method, namely, hard thresholding function.In this function, coefficients with absolute values smaller than the threshold were set to zero, and the bigger coefficients remained unchanged.Sanam and Shahnaz [9] supposed that forcedly setting the small coefficients to zero was unreasonable and presented an improved hard thresholding function.In order to make thresholding function continuous, Donoho [10] proposed a soft thresholding function that required the wavelet coefficients to minus the threshold to achieve the new coefficients.Phinyomark et al. [11] modified the soft thresholding function and proposed a thresholding function based on hyperbolic function.By combining the advantages of hard and soft thresholding functions, Sanam and Shahnaz [12] presented a semisoft thresholding function.From the view of fuzzy theory, Shark and Yu [13] used the fuzzy membership function to process the wavelet coefficients between the fixed form threshold and the Stein unbiased risk estimate (SURE) threshold.Jia et al. [14] divided the threshold interval into several subintervals and adopted different thresholding functions in different subintervals.On the basis of analyzing the properties of the sigmoid function, Yi et al. [15] proposed an improved wavelet thresholding function based on sigmoid function.Tang et al. [16] considered that the reconstructed signal would be smoother, if the thresholding function had high-order derivatives.According to this idea, a new function having high-order derivatives was constructed as the thresholding function in [16].
Although the research of wavelet thresholding functions made great development, a few deficiencies still exist.In the classical hard and soft thresholding functions, hard thresholding function is discontinuous and the reconstructed signal may give rise to ringing and pseudo-Gibbs phenomenon.Fixed bias exists between original and estimated wavelet coefficients in soft thresholding function, and it may lead to a big error in the reconstructed signal.The methods provided by [13][14][15][16] can improve the classical methods to some extent, but these new functions introduce new parameters, and there are few references on how to set these parameters.
The goal of this paper is to propose a new thresholding function and solve the problem of new parameters determination.Firstly, a new thresholding function is presented on the basis of hyperbolic tangent function, and the continuity, monotonicity, and high-order differentiability of the new function are proved in theory.Then, artificial fish swarm algorithm (AFSA), which uses mean square error (MSE) as the objective function, is adopted to achieve the optimal shape parameter.At last, the final form of the new function is determined on the basis of the two abovementioned steps.
The remaining parts of the paper are organized as follows.Section 2 proposes the new thresholding function and proves the continuity, monotonicity, and high-order differentiability of the function.A parameter optimization strategy based on AFSA is presented in Section 3. Section 4 provides a simulated experiment using two benchmark signals to verify the effectiveness of the new thresholding function.The conclusion is given in Section 5.

Description of the New Thresholding Function
2.1.Introduction of Hyperbolic Tangent Function.Hyperbolic tangent function (tanh) is defined as (see Figure 1): The properties of hyperbolic tangent function are as follows.
(3) Monotonicity: tanh is a monotone increasing function in its domain.(4) Parity: tanh is an odd function in its domain.
(5) Asymptote: tanh has two horizontal asymptotes, namely,  = 1 and  = −1.(6) Differentiability: tanh is differentiable in its domain, and its derivative is deduced as follows: where (tanh)  is an even function in its domain and obtains its maximum at  = 0.

A New Thresholding Function and Its
Properties.On the basis of analyzing the hyperbolic tangent function, a new thresholding function is proposed in this paper: where  ∈ (0, +∞) is the shape parameter of the thresholding function,  = √2 ln() is universal threshold,  is the average variance of the noise, and N is the signal length.
The new thresholding function can be flexibly adjusted by changing the shape parameter .When  → 0, this function approximately transfers into soft thresholding function.If  → +∞, the new function corresponds to hard thresholding function.Figure 2 illustrates the comparison between soft, hard, and proposed thresholding functions.
The new thresholding function () has the following properties.
Therefore, () is a continuous function at  = .Following above proof line, we can obtain that () is also continuous at  = −.
That is, () is a continuous function in the domain of (−∞, +∞).
Proof is completed.
Remark 2. According to Theorem 1, () is a continuous function in its domain.In signal denoising, this property helps avoid pseudo-Gibbs phenomenon caused by function discontinuity.
That is, () is a monotonous function in the domain of (, +∞).
Following above proof line, we can obtain that () is also a monotonous function in the domain of (−∞, −). When Consider () is a continuous function in the domain of (−∞, +∞).
Proof is completed.
Remark 4. According to Theorem 3, () is a monotonic nondecreasing function in its domain, which ensures that () has the same variation trend of hard and soft thresholding functions.
Thus, () is an elementary function.
According to the property of elementary function, we can obtain that () is a high-order differentiable function in the domain of (, +∞).
Following above proof line, we can obtain that () is also high-order differentiable in the domain of (−∞, −).
Proof is completed.

Mathematical Problems in Engineering
Remark 6.According to Theorem 5, () is the high-order differentiable function in the domain of (−∞, −) and (, +∞) respectively.This advantage can make the reconstructed signal smooth.

A Shape Parameter Optimization Strategy Based on AFSA
3.1.Introduction of AFSA.Shape parameter  helps improve the flexibility of the new thresholding function.However, it also brings a problem on setting .In the existed method, the shape parameter is determined by trial and error, which is subjective and lacks theoretical guidance.In order to solve this problem, AFSA is adopted to achieve the optimal shape parameter.AFSA is proposed by Li et al. [17] in 2002.It is considered as an effective global optimization algorithm that mainly simulates fish schooling behaviors of preying, swarming, and following.Compared with other optimization algorithms [18,19], AFSA has the following advantages.
(1) Swarming behavior can make the algorithm get rid out of the local extremum and obtain global optimal value.(2) Following behavior helps an individual move fast to the optimal value.Therefore, it can improve the optimization speed.(3) After evaluating three behaviors, AFSA automatically selects the optimal behavior.This step assists the algorithm to obtain optimization results efficiently and rapidly.

Objective Function.
The aim of shape parameter optimization is to improve the signal denoising effect.Several indicators are employed to measure the denoising effect, such as MSE, signal-to-noise-ratio (SNR), and smoothness.Given that MSE can accurately reflect the deviation between the reconstructed signal and the original signal, therefore, it is used most widely: where () is the noisy signal, () is the original signal, and  is the length of signal.
When the MSE index is small, it is close between the reconstructed signal and the original signal.In this case, the denoising effect is good.If MSE index is big, the deviation between reconstructed signal and the original signal deviation is large.Here, the denoising effect is poor.
In AFSA, the actual meaning of objective function is food concentration, and it is usually a maximum function.Therefore, the objective function based on MSE is constructed as follows: where MSE() represents the MSE between reconstructed signal and the original signal deviation with shape parameter equal to .
If MSE between the reconstructed signal and the original signal is small, the denoising effect is good.Here, the object function value is big.If MSE is big, the denoising effect is poor, and the object function value is small in this case.

Algorithm Initialization.
Suppose that  is the current position of an artificial fish (AF), fish swarm including P AFes (P is the number of the artificial fish) is randomly generated as ( 1 ⋅ ⋅ ⋅   ). = () is the objective function of X, which represents food concentration of position X.The AF realizes external perception by its vision.Visual represents the visual distance of an AF.
Step is the length of moving step, M is the maximum of preying try number, and W is the crowd factor (0 <  < 1).

Description of AF Behavior
3.4.1.Preying Behavior.Suppose that an AF's current state is   .A new state   is selected randomly in its visual field according to the following equation: where Rand(⋅) is a random function in the range [0, 1].
If (  ) > (  ), the AF satisfies the condition of moving forward and it moves towards   as follows: where  +1  represents the next state of the AF with the current state    and  , = ‖  −   ‖ is the Euclidean distance between   and   .
By contrast, if (  ) ≤ (  ), a new state   is selected according to (14), and then whether the new   satisfies the forward condition or not is judged.If after trying M times, it still did not achieve the condition of moving forward, AF is forced to move one step according to the following equation:

Swarming Behavior.
The current state of the AF is   , and   is the number of individual within its visual distance.The centre position of neighborhood individual can be calculated as follows: where   represents the individual within AF's visual distance.
If (  ) > (  ) and   / <  (where P is the total number of AF and W is the crowd factor), this means that the centre   has the higher food concentration and its surrounding is not crowded.Thereafter, the AF's state at the next iteration is calculated as follows: 3.5.Behavior Selection.In this paper, three biological behaviors of AF are analyzed, namely, preying behavior, swarming behavior, and following behavior.Trial method has been frequently employed to simulate the three behaviors of AF, and the behavior which can obtain the biggest food concentration is selected to be implemented.

Bulletin.
Bulletin is used to record the optimal state of the AF and the optimal value of objective function.Every AF compares its own state with the bulletin after making movements.If the current state of AF is better, then the value on the bulletin will be replaced.

Termination Condition.
There are two different termination methods of AFSA.One method is to set an object function value.When the value is obtained, AFSA finishes.The other method is to set a maximum of iteration number.When this number is reached, the algorithm ends.According to the characteristics of our problem, the second method should be selected.That is because the first method requires a fixed object function value.However, how to determine the suitable value is a difficult problem.

Steps of Shape Parameter Optimization Strategy Based on
AFSA.The steps of shape parameter optimization strategy based on AFSA are provided as follows.
(1) A fish swarm is randomly generated, and algorithm parameters are set including population size , maximum iteration number , visual distance Visual, the moving length Step, the largest try number of preying , and crowding factor .
(2) Preying behavior, swarming behavior, and following behavior are simulated by AF, and the behavior which can obtain the biggest food concentration is implemented.
(3) Objective function value of every AF is calculated as (13).Each AF compares its own state with the bulletin after making movements.If the current state of AF is better, then the value on the bulletin will be replaced.
(5) Judge whether the maximum iteration number  is reached.If reached, output the bulletin and the corresponding AF.Otherwise, go to step (2).
Flowchart of shape parameter optimization strategy based on AFSA is shown in Figure 3.

Simulation Experiment
4.1.Shape Parameter Determination.To verify the denoising effect of the new thresholding function, we must firstly determine the shape parameter.AFSA is adopted to search the optimal shape parameter.The analysis of main parameters in AFSA is given as follows.

Visual Distance (Visual) and Moving Length (Step).
Large Visual is of benefit to quick global optimization.But if Visual is set too large, the optimization process may be premature convergence.Small Step is better for local optimization, while it may decrease the velocity of evolution.

Crowd Factor (W).
If  is set too large, the velocity of evolution will increase, but AFSA has a risk of premature convergence in this case.

Number of AF (P).
When the number of AF is large, the capacity of getting out of local extremum is strong, but computational amount of every iteration will increase.
Based on the analysis above, the parameters in AFSA are set as in Table 1.  2. Their iteration curves are shown in Figure 4.

Denoising Effect Verification of the New Thresholding
Function.In this experiment, the test signals are selected the same as in Section 4.1.Stationary wavelet transform is adopted in this paper [20], wavelet basis adopts sym6 wavelet [21], and wavelet decomposition scale is set to be 3. Universal threshold is selected as the standard threshold.The proposed function is used as thresholding function in the experiment of wavelet threshold denoising.In order to verify the superiority of the proposed function, the classical hard and soft thresholding functions are chosen as comparative functions.The detailed steps of wavelet threshold denoising experiment were given by [8].All the experiments were calculated on the same computer with the CPU frequency of 2 GHz, and Matlab 7.0 is used as the computation software.
In order to measure the denoising effects of different thresholding functions, MSE (equation ( 12)) and SNR are selected as comparative index: When  = 3, the denoising effect of two test signals is shown in Figures 5 and 6.In the figures, NS expresses In order to exclude the effect of noise intensity, experiment is retested with  = 5 white Gaussian noise (see Figures 7 and 8).
In order to prove the superiority of the optimal shape parameter, a comparative experiment between thresholding function with optimal shape parameter and thresholding function with nonoptimal shape parameter ( = 1) is provided under  = 5 white Gaussian noise.The denoising effect of nonoptimal shape parameter is shown in Figure 9.The denoising index of two methods is provided in Figure 10.NSP represents denoising index of thresholding function with nonoptimal shape parameter and OSP represents denoising index of thresholding function with optimal shape parameter.

Results Analysis.
As shown in Figure 4, the parameter optimization method based on AFSA can quickly converge to the optimal objective function value.As it is shown in Figure 5, when  = 3, denoising signal obtained by the proposed method is closer to the original signal than hard and soft thresholding functions for both signals.From Figure 6, we can see that the proposed method can achieve smaller MSE and larger SNR than traditional methods.To avoid the interference of noise intensity, experiment is retested with  = 5 white Gaussian noise.The experiment results are provided in Figures 7 and 8. Comparing Figure 6 with Figure 8, it can be seen that the denoising effect and index of our method are better than hard and soft thresholding functions with both heavy noise and light noise.The results in Figures 9 and 10 show that thresholding function with optimal shape parameter has a better denoising effect than nonoptimal shape parameter.

Conclusion
In order to make up for the deficiency of the existing wavelet thresholding functions, a new thresholding function with a shape parameter based on hyperbolic tangent function is presented.Then, a shape parameter optimization method based on AFSA is proposed on the basis of analyzing the advantage of the AFSA.With the case analysis, some conclusions are summarized as follows.(1) By improving the hyperbolic tangent function, a new thresholding function is presented in this paper.The new function has continuity, monotonicity, and highorder differentiability, which assist the new function to improve the denoising effect.The experiment results show that the proposed function can obtain better denoising effect than the classical hard and soft thresholding functions.
(2) Traditionally, trial and error method is adopted to determine shape parameter.This method depends on expert experience and lacks theoretical guidance.In order to solve this problem, AFSA is presented to search the optimal shape parameter.The experiment results show that AFSA can rapidly obtain the optimal shape parameter.It helps achieve the effective and quick signal denoising.

Figure 3 :
Figure 3: Flowchart of shape parameter optimization strategy based on AFSA.
The current state of the AF is   , and   is the individual with the biggest food concentration within AF's visual distance.If (  ) > (  ) and   / < , then the next state of AF can be computed as follows: Step *   −          −        .(18) 3.4.3.Following Behavior.