WA Online Detrend VI
- Updated2023-02-21
- 8 minute(s) read
WA Online Detrend VI
Owning Palette: Online Wavelet Analysis VIs
Requires: Advanced Signal Processing Toolkit
Removes the trend from 1D streaming signals by setting the approximation coefficients to zeros. Wire data to the signal input to determine the polymorphic instance to use or manually select the instance.
![]() | Note Use this VI to remove the trend from streaming signals. For offline wavelet analysis, use the WA Detrend VI. |
WA Online Detrend (Waveform)
![]() |
initialize? specifies whether to initialize the internal state of the block of data to zero. The default is FALSE. When the value is TRUE, this VI initializes the internal state to zero and processes one block of data. When the value is FALSE, this VI initializes the internal states to the final states by using the previous call to this VI instance. To process consecutive blocks of data, set initialize? to TRUE for the first block and FALSE for all other blocks of data. |
||||||||||||
![]() |
signal specifies the input signal. | ||||||||||||
![]() |
threshold frequency specifies the upper frequency limit, in hertz, of the trend that this VI removes from the signal. The threshold frequency determines the wavelet transform level. The wavelet transform level specifies the number of levels in the discrete wavelet analysis, where more levels result in a longer delay when you run this VI. The wavelet transform level is floor(log2[sampling rate/(2*threshold frequency)]). The floor function rounds a value to the nearest integer towards negative infinity. The default is –1, which means this VI sets the threshold frequency as sampling rate/4. | ||||||||||||
![]() |
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. The higher the order, the smoother the wavelet. The orthogonal wavelets are not redundant and are suitable for signal or image denoising and compression. The biorthogonal wavelets usually have the linear phase property and are suitable for signal or image feature extraction. If you want to use other types of wavelets, do not wire this input. Instead, use the Wavelet Design Express VI to design the wavelet you want, bundle the resulting analysis and synthesis filters, and then wire them to the filter banks input. | ||||||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||||||
![]() |
filter banks specifies the analysis filter banks and the synthesis filter banks for the wavelet you specify. If you specify a value for filter banks, 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.
| ||||||||||||
![]() |
detrended signal returns the signal without the trend. | ||||||||||||
![]() |
trend signal returns the residual trend of the signal. | ||||||||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
WA Online Detrend (Array)
![]() |
initialize? specifies whether to initialize the internal state of the block of data to zero. The default is FALSE. When the value is TRUE, this VI initializes the internal state to zero and processes one block of data. When the value is FALSE, this VI initializes the internal states to the final states by using the previous call to this VI instance. To process consecutive blocks of data, set initialize? to TRUE for the first block and FALSE for all other blocks of data. |
||||||||||||
![]() |
signal specifies the input signal. | ||||||||||||
![]() |
threshold frequency specifies the upper frequency limit, in hertz, of the trend that this VI removes from the signal. The threshold frequency determines the wavelet transform level. The wavelet transform level specifies the number of levels in the discrete wavelet analysis, where more levels result in a longer delay when you run this VI. The wavelet transform level is floor(log2[sampling rate/(2*threshold frequency)]). The floor function rounds a value to the nearest integer towards negative infinity. The default is –1, which means this VI sets the threshold frequency as sampling rate/4. | ||||||||||||
![]() |
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. The higher the order, the smoother the wavelet. The orthogonal wavelets are not redundant and are suitable for signal or image denoising and compression. The biorthogonal wavelets usually have the linear phase property and are suitable for signal or image feature extraction. If you want to use other types of wavelets, do not wire this input. Instead, use the Wavelet Design Express VI to design the wavelet you want, bundle the resulting analysis and synthesis filters, and then wire them to the filter banks input. | ||||||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||||||
![]() |
filter banks specifies the analysis filter banks and the synthesis filter banks for the wavelet you specify. If you specify a value for filter banks, 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.
| ||||||||||||
![]() |
sampling rate specifies the sampling rate of signal in hertz. sampling rate must be greater than 0, or this VI sets sampling rate to 1 automatically. The default is 1. | ||||||||||||
![]() |
detrended signal returns the signal without the trend. | ||||||||||||
![]() |
trend signal returns the residual trend of the signal. | ||||||||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Example
Refer to the Online Detrend and Trend Estimation VI in the labview\examples\Wavelet Analysis\WAGettingStarted directory for an example of using the WA Online Detrend VI.