Threshold de-noising by wavelet transform is very similar to the method that our ears take to de-noise a music signal. We concentrate on the high peaks and try to ignore the low crackling of the white noise. Because DWT coefficients are based on amplitude and location of the signal, we can separate much of the noise from the signal relatively easily.
The DWT will transform a signal into a set of coefficients. The goal, as with most transforms is that these coefficients will be relatively sparse, containing most of the energy into a few peaks. When white noise is introduced into the signal, however, the noise’s wavelet transform will be spread out evenly among the coefficients. The technique of de-noising by thresholding takes the DWT of the signal plus noise, and throws out (makes them zero) coefficients below a certain threshold, leaving the peaks of the signal plus the noise on the peaks. The de-noising has eliminated the places in the signal where only noise exists.
As you can see by the following plots, there is as much noise content in the low amplitude part of the mixed signal as there is in the peaks. Therefore, by eliminating low coefficients, you can cut out noise while retaining the majority of the desired signal.
There are two types of thresholding, soft or hard, shown in the following code for R_denoise.m. The soft thresholding option in the code is on the top and circled in the blue rectangle; the hard thresholding option in the code is on the bottom and circled in the red rectangle.
Soft thresholding allows for the signal to retain more of its smoothness, whereas hard thresholding will allow for greater noise reduction. The following picture shows the results of soft vs. hard thresholding.