We now turn to the Wavelet Packet 1-D tool to analyze a synthetic signal that is the sum of two linear chirps.
From the MATLAB® prompt, type wavemenu.
The Wavelet Toolbox Main Menu appears.
The sumlichr signal is loaded into the Wavelet Packet 1-D tool.
The available entropy types are listed below.
Nonnormalized entropy involving the logarithm of the squared value of each signal sample — or, more formally,
The number of samples for which the absolute value of the signal exceeds a threshold ε.
The concentration in l p norm with 1 ≤ p.
The logarithm of "energy," defined as the sum over all samples:
SURE (Stein's Unbiased Risk Estimate)
A threshold-based method in which the threshold equals
where n is the number of samples in the signal.
An entropy type criterion you define in a file.
Note Many capabilities are available using the command area on the right of the Wavelet Packet 1-D window.
Because there are so many ways to reconstruct the original signal from the wavelet packet decomposition tree, we select the best tree before attempting to compress the signal.
After a pause for computation, the Wavelet Packet 1-D tool displays the best tree. Use the top and bottom sliders to spread nodes apart and pan over to particular areas of the tree, respectively.
Observe that, for this analysis, the best tree and the initial tree are almost the same. One branch at the far right of the tree was eliminated.
The leftmost graph shows how the threshold (vertical yellow dotted line) has been chosen automatically (1.482) to balance the number of zeros in the compressed signal (blue curve that increases as the threshold increases) with the amount of energy retained in the compressed signal (purple curve that decreases as the threshold increases).
This threshold means that any signal element whose value is less than 1.482 will be set to zero when we perform the compression.
Threshold controls are located to the right (see the red box in the figure above). Note that the automatic threshold of 1.482 results in a retained energy of only 81.49%. This may cause unacceptable amounts of distortion, especially in the peak values of the oscillating signal. Depending on your design criteria, you may want to choose a threshold that retains more of the original signal's energy.
The value 0.8938 is a number that we have discovered through trial and error yields more satisfactory results for this analysis.
After a pause, the Wavelet Packet 1-D Compression window displays new information.
Note that, as we have reduced the threshold from 1.482 to 0.8938,
The vertical yellow dotted line has shifted to the left.
The retained energy has increased from 81.49% to 90.96%.
The number of zeros (equivalent to the amount of compression) has decreased from 81.55% to 75.28%.
The Wavelet Packet 1-D tool compresses the signal using the thresholding criterion we selected.
The original (red) and compressed (yellow) signals are displayed superimposed. Visual inspection suggests the compression quality is quite good.
Looking more closely at the compressed signal, we can see that the number of zeros in the wavelet packets representation of the compressed signal is about 75.3%, and the retained energy about 91%.
If you try to compress the same signal using wavelets with exactly the same parameters, only 89% of the signal energy is retained, and only 59% of the wavelet coefficients set to zero. This illustrates the superiority of wavelet packets for performing compression, at least on certain signals.
You can demonstrate this to yourself by returning to the main Wavelet Packet 1-D window, computing the wavelet tree, and then repeating the compression.
We now use the Wavelet Packet 1-D tool to analyze a noisy chirp signal. This analysis illustrates the use of Stein's Unbiased Estimate of Risk (SURE) as a principle for selecting a threshold to be used for de-noising.
This technique calls for setting the threshold T to
where n is the length of the signal.
A more thorough discussion of the SURE criterion appears in Choosing the Optimal Decomposition. For now, suffice it to say that this method works well if your signal is normalized in such a way that the data fit the model x(t) = f(t) + e(t), where e(t) is a Gaussian white noise with zero mean and unit variance.
If you've already started the Wavelet Packet 1-D tool and it is active on your computer's desktop, skip ahead to step 3.