#### Abstract

Thresholding function is an important part of the wavelet threshold denoising method, which can influence the signal denoising effect significantly. However, some defects are present in the existing methods, such as function discontinuity, fixed bias, and parameters determined by trial and error. In order to solve these problems, a new wavelet thresholding function based on hyperbolic tangent function is proposed in this paper. Firstly, the basic properties of hyperbolic tangent function are analyzed. Then, a new thresholding function with a shape parameter is presented based on hyperbolic tangent function. The continuity, monotonicity, and high-order differentiability of the new function are theoretically proven. Finally, in order to determine the final form of the new function, a shape parameter optimization strategy based on artificial fish swarm algorithm is given in this paper. Mean square error is adopted to construct the objective function, and the optimal shape parameter is achieved by iterative search. At the end of the paper, a simulation experiment is provided to verify the effectiveness of the new function. In the experiment, two benchmark signals are used as test signals. Simulation results show that the proposed function can achieve better denoising effect than the classical hard and soft thresholding functions under different signal types and noise intensities.

#### 1. 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–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–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.

#### 2. Description of the New Thresholding Function

##### 2.1. Introduction of Hyperbolic Tangent Function

Hyperbolic tangent function () is defined as (see Figure 1):

The properties of hyperbolic tangent function are as follows.Domain and range: the domain of the function is (, ), and its range is .Continuity: is a continuous function in its domain.Monotonicity: is a monotone increasing function in its domain.Parity: is an odd function in its domain.Asymptote: has two horizontal asymptotes, namely, and .Differentiability: is differentiable in its domain, and its derivative is deduced as follows: where is an even function in its domain and obtains its maximum at .

##### 2.2. 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 is the shape parameter of the thresholding function, 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 , 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.

Theorem 1. * is a continuous function in the domain of .*

*Proof. *WhenSo,WhenThus,Considering (5) and (7), we obtain .

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.

Theorem 3. * is a monotonous function in the domain of .*

*Proof. *When So,Considering , we can obtain

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 .

Thus, is a monotonic nondecreasing 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.

Theorem 5. * is a high-order differentiable function in the domain of and , respectively.*

*Proof. *WhenThus, 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 .

That is, is a high-order differentiable function in the domain of and , respectively.

Proof is completed.

*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.

#### 3. 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.

##### 3.2. 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 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.

##### 3.3. Algorithm Initialization

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

##### 3.4. 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 is a random function in the range .

If , the AF satisfies the condition of moving forward and it moves towards as follows:where 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 times, it still did not achieve the condition of moving forward, AF is forced to move one step according to the following equation:

###### 3.4.2. 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 is the total number of AF and 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.4.3. Following Behavior

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:

##### 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.

##### 3.6. 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.

##### 3.7. 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.

##### 3.8. 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.(4)Iteration number .(5)Judge whether the maximum iteration number is reached. If reached, output the bulletin and the corresponding AF. Otherwise, go to step .

Flowchart of shape parameter optimization strategy based on AFSA is shown in Figure 3.

#### 4. 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.

###### 4.1.1. 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.

###### 4.1.2. 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.

###### 4.1.3. 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.

Two classic benchmark signals, namely, Bumps signal and Doppler signal, are used as test signals. Two strengths of white Gaussian noise, that is, and , are added to the test signals in the experiments. The steps of shape parameter optimization strategy are provided in Figure 3. The optimization algorithm is run 100 times. The optimal shape parameters of different signals are obtained as in Table 2. Their iteration curves are shown in Figure 4.

**(a)**Bumps,

**(b)**Bumps,

**(c)**Doppler,

**(d)**Doppler,##### 4.2. 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 , the denoising effect of two test signals is shown in Figures 5 and 6. In the figures, NS expresses the noisy signals, OS represents the original signals, DS is the denoising signals using the new thresholding function,* New* represents the effect index of the new thresholding function,* Hard* is the effect index of hard thresholding function, and* Soft* expresses the effect index of soft thresholding function.

**(a)**

**(b)**

**(a)**

**(b)**

In order to exclude the effect of noise intensity, experiment is retested with white Gaussian noise (see Figures 7 and 8).

**(a)**

**(b)**

**(a)**

**(b)**

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 () is provided under 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.

**(a)**

**(b)**

**(a)**

**(b)**

##### 4.3. 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 , 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 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.

#### 5. 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 high-order 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.

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.