wpdec

Wavelet packet decomposition 1-D

Syntax

``tobj = wpdec(x,n,wname)``
``tobj = wpdec(x,n,wname,etype,p)``

Description

````tobj = wpdec(x,n,wname)` returns a wavelet packet tree object `tobj` corresponding to the wavelet packet decomposition of the vector `x` at level `n`, using Shannon entropy and the wavelet specified by `wname` (see `wfilters` for more information). ```

example

````tobj = wpdec(x,n,wname,etype,p)` uses the entropy type specified by `etype`. `p` is an optional parameter depending on the value of `etype`. Note`tobj = wpdec(x,n,wname)` is equivalent to ```tobj = wpdec(x,n,wname,"shannon")```. ```

Examples

collapse all

`load noisdopp`

Decompose the signal at level 3 with `db1` wavelet packets using Shannon entropy.

`wpt = wpdec(noisdopp,3,"db1","shannon");`

Plot the wavelet packet tree.

`plot(wpt)`

Input Arguments

collapse all

Input data, specified as a real-valued numeric vector.

Data Types: `double`

Decomposition level, specified as a positive integer.

Data Types: `double`

Wavelet used in the wavelet packet decomposition, specified as a character vector or string scalar. The wavelet is from one of the following wavelet families: Best-localized Daubechies, Beylkin, Coiflets, Daubechies, Fejér-Korovkin, Haar, Han linear-phase moments, Morris minimum-bandwidth, Symlets, Vaidyanathan, Discrete Meyer, Biorthogonal, and Reverse Biorthogonal. See `wfilters` for the wavelets available in each family.

Entropy type, specified as one of the following:

Entropy Type (`T`)

Threshold Parameter (`p`)

`"shannon"`

`p` is not used.

`"log energy"`

`p` is not used.

`"threshold"``0 ≤ p`

`p` is the threshold.

`"sure"``0 ≤ p`

`p` is the threshold.

`"norm"``1 ≤ p`

`p` is the power.

`"user"`String

`p` contains the file name of your own entropy function, with a single input `x`.

"FunName"No constraints on `p`

FunName is any string other than the previous entropy types listed.

FunName contains the file name of your own entropy function, with `x` as input and `p` as an additional parameter to your entropy function.

`etype` and the threshold parameter `p` together define the entropy criterion. For more information, see Entropy.

Note

The `"user"` option is historical and kept for compatibility, but it is obsoleted by the last option described in the table above. The FunName option does the same as the `"user"` option and in addition gives the possibility to pass a parameter to your own entropy function.

Threshold parameter, specified by a real number or a string. `p` and the entropy type `etype` together define the entropy criterion.

collapse all

Wavelet Packet Decomposition

The wavelet packet method is a generalization of wavelet decomposition that offers a richer signal analysis. Wavelet packet atoms are waveforms indexed by three naturally interpreted parameters: position and scale as in wavelet decomposition, and frequency.

For a given orthogonal wavelet function, a library of wavelet packets bases is generated. Each of these bases offers a particular way of coding signals, preserving global energy and reconstructing exact features. The wavelet packets can then be used for numerous expansions of a given signal.

Simple and efficient algorithms exist for both wavelet packets decomposition and optimal decomposition selection. Adaptive filtering algorithms with direct applications in optimal signal coding and data compression can then be produced.

In the orthogonal wavelet decomposition procedure, the generic step splits the approximation coefficients into two parts. After splitting we obtain a vector of approximation coefficients and a vector of detail coefficients, both at a coarser scale. The information lost between two successive approximations is captured in the detail coefficients. The next step consists in splitting the new approximation coefficient vector; successive details are never re-analyzed.

In the corresponding wavelet packets situation, each detail coefficient vector is also decomposed into two parts using the same approach as in approximation vector splitting. This offers the richest analysis: the complete binary tree is produced in the one-dimensional case or a quaternary tree in the two-dimensional case.

Entropy

Functionals satisfying an additive-type property are well suited for efficient searching of binary-tree structures and the fundamental splitting property of the wavelet packets decomposition. Classical entropy-based criteria match these conditions and describe information-related properties for an accurate representation of a given signal. Entropy is a common concept in many fields, mainly in signal processing.

The following lists different entropy criteria. Many others are available and can be easily integrated. In the expressions, s is the signal and (si)i the coefficients of s in an orthonormal basis.

The entropy E must be an additive cost function such that E(0) = 0 and

`$E\left(s\right)={\sum }_{i}E\left({s}_{i}\right).$`

• The (nonnormalized) Shannon entropy.

`$E1\left({s}_{i}\right)=-{s}_{i}^{2}\mathrm{log}\left({s}_{i}^{2}\right),$`

so

`$E1\left(s\right)=-{\sum }_{i}{s}_{i}^{2}\mathrm{log}\left({s}_{i}^{2}\right),$`

with the convention 0 log(0) = 0.

• The concentration in lp norm entropy with 1 ≤ p.

`$E2\left({s}_{i}\right)={|{s}_{i}|}^{p},$`

so

`$E2\left(s\right)={\sum }_{i}{|{s}_{i}|}^{p}={‖s‖}_{p}^{p}.$`
• The "log energy" entropy.

`$E3\left({s}_{i}\right)=\mathrm{log}\left({s}_{i}^{2}\right),$`

so

`$E3\left(s\right)={\sum }_{i}\mathrm{log}\left({s}_{i}^{2}\right),$`

with the convention log(0) = 0.

• The threshold entropy.

$E4\left({s}_{i}\right)=1$ if $|{s}_{i}|>p$ and 0 elsewhere, so E4(s) = # {i such that $|{s}_{i}|>p$} is the number of time instants when the signal is greater than a threshold p.

• The "SURE" entropy.

where n is the length of the signal.

Algorithms

The algorithm used for the wavelet packets decomposition follows the same line as the wavelet decomposition process (see `dwt` and `wavedec` for more information).

References

[1] Coifman, R.R., and M.V. Wickerhauser. “Entropy-Based Algorithms for Best Basis Selection.” IEEE Transactions on Information Theory 38, no. 2 (March 1992): 713–18. https://doi.org/10.1109/18.119732.

[2] Meyer, Yves. Les ondelettes. Algorithmes et applications, Colin Ed., Paris, 2nd edition, 1994. (English translation: Wavelets: Algorithms and Applications, SIAM).

[3] Wickerhauser, M.V. "INRIA lectures on wavelet packet algorithms." Proceedings ondelettes et paquets d'ondes, 17–21 June 1991, Rocquencourt, France, pp. 31–99.

[4] Wickerhauser, Mladen Victor. Adapted Wavelet Analysis from Theory to Software. Wellesley, MA: A.K. Peters, 1994.

Version History

Introduced before R2006a