WA 1D Discrete Wavelet Transform (Array) VI
- Updated2024-07-30
- 5 minute(s) read
Computes the multi-level discrete wavelet transform (DWT) of signal. This VI returns the approximation coefficients at the largest level and the detail coefficients at all levels for a 1D signal input. This VI returns the approximation coefficients and the detail coefficients at all levels for a 2D signal input. This VI computes the DWT at each level by using the lowpass analysis filters, the highpass analysis filters, and a decimation factor of 2. Wire data to the signal input to determine the polymorphic instance to use or manually select the instance.

Inputs/Outputs
![]() extension specifies the method to use to pad data at the borders of the input signal. The extension length is equal to the length of the wavelet filters. When you select the extension method, make the transition between the input signal and the padded data as smooth as possible because a smooth transition generates fewer large detail coefficients and enhances the efficiency of the signal representation. ![]() signal specifies the input signal. ![]() levels specifies the number of levels in the discrete wavelet analysis. levels must be a positive integer no greater than log2(Ls), where Ls is the length of the 1D signal or the minimum dimensional size of the 2D signal. The default is -1, which indicates that this VI sets levels as the largest integer no greater than log2(Ls). ![]() wavelet specifies the wavelet type to use for the discrete wavelet analysis. The default is db02. The options include two types: orthogonal (Haar, Daubechies (dbxx), Coiflets (coifx), Symmlets (symx)) and biorthogonal (Biorthogonal (biorx_x), including FBI (bior4_4 (FBI))), where x indicates the order of the wavelet. ![]() error in describes error conditions that occur before this node runs. This input provides standard error in functionality. ![]() analysis filters specifies the coefficients of the lowpass analysis filters and the highpass analysis filters for the wavelet you specify. If you specify a value for analysis filters, this VI ignores the settings in the wavelet input. You can use the Wavelet Design Express VI to design the analysis filters and the corresponding synthesis filters.
![]() DWT coef returns the approximation coefficients and the detail coefficients from the multi-level discrete wavelet decomposition. This VI concatenates the coefficients into a array starting with the approximation coefficients at the largest level followed by the detail coefficients at all levels in descending order. ![]() length returns, in a 1D array, the number of approximation and detail coefficients at each level. At a decomposition level of N, length is equal to N+2. The first element of length always is equal to the number of approximation coefficients. The last element of length indicates the total number of raw data samples. The length of the detail coefficients is arranged in descending order. ![]() error out contains error information. This output provides standard error out functionality. |
WA Discrete Wavelet Transform Details
The following illustration shows an example of a three-level discrete wavelet decomposition, where you set the levels input of this VI to 3. The length of the input signal is 16 points.
G1(z) denotes that the signal passes through a highpass filter. G0(z) denotes that the signal passes through a lowpass filter. G1(z) and G0(z) form the analysis filter bank. denotes a decimation on the signal with a factor of 2.
Using information in the previous illustration, you can see that the DWT coef output contains the approximation coefficients of the largest level and the details coefficients of each level. You also can see that the length output of this VI contains the following elements, where the last element is the length of the input signal:
Examples
Refer to the following VIs for examples of using the WA Discrete Wavelet Transform VI:
- Image Compression VI: labview\examples\Wavelet Analysis\WAApplications
- Get and Set Single Level Detail Coefficients VI: labview\examples\Wavelet Analysis\WAGettingStarted
- Wavelet Transform and Reconstruction with Image VI: labview\examples\Wavelet Analysis\WAGettingStarted
- Piece Polynomial Function Approx and Comp VI: labview\examples\Wavelet Analysis\WAGettingStarted
- Multiscale Analysis VI: labview\examples\Wavelet Analysis\WAApplications
- Get and Set Approximation Coefficients VI: labview\examples\Wavelet Analysis\WAGettingStarted
- ECG Compression VI: labview\examples\Wavelet Analysis\WAApplications