LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Discrete wavelet transform. Mother wavelet. Wavelet Haar

Hello, please help me connect the discrete wavelet transform, mother wavelet and Haar wavelet to the waveform for outputting information.

The Haar wavelet should be something like this:

photo_2024-04-18_15-04-41.jpg

 

 

Download All
0 Kudos
Message 1 of 5
(223 Views)

Hi!

First of them, the Mother wavelet function is independent from your signal. There are some example available in Example Finder, usually to obtain and display Mother and Scaling Functions the following snippet is used:

wavelet-snippet.png

For the coefficients - it depends are using Discrete or Continuous Wavelet Transform.

You're talking about discrete, but in your VI continuous is used.

The Discrete Wavelet Transform coef returns the approximation coefficients and the detail coefficients from the multi-level discrete wavelet decomposition. This VI concatenates the coefficients into a waveform starting with the approximation coefficients at the largest level followed by the detail coefficients at all levels in descending order. You can use the WA Get Coefficients of Discrete Wavelet Transform VI to read the approximation coefficients or detail coefficients at a specific level. Wire DWT coef to the DWT coef input of the WA Get Coefficients of Discrete Wavelet Transform VI, something like that:

wavelet-snippet-2.png

On the other hand, the Continuous Wavelet Transform coef returns the results the 2D array of the CWT. The element in the ith column and the jth row is the result of the CWT, where scale (a)=i+1, and shift ()=j×time steps. When you use user defined scales to define the scales of the CWT, the element in the ith column and the jth row is the result of the CWT, where scale (a) equals the ith element of user defined scales and shift () equals j×time steps. The squared magnitude of CWT coef is the scalogram, which jointly represents a signal in terms of time and scale. Large scales correspond to low frequencies, and small scales correspond to high frequencies. You also can consider the scalogram as the time-frequency representation of the signal. Use the WA Scalogram Indicator to display the scalogram on an intensity graph, something like that:

wavelet-snippet-4.png

Demo VI in the attachment, hopefully will be helpful for you.

Not sure, why you cutting of just one peak, usually wavelet applied to whole signal, but it depends what exactly you would like to get from Wavelet in your particular case.

Message 2 of 5
(136 Views)

Oh, thank you for such detailed information. I'll try to put together a diagram.
And the teacher told me to do one peak. Well, I'm just trying to complete the tasks assigned to him.

0 Kudos
Message 3 of 5
(129 Views)

Can you tell me how you can derive a digital data table from the mother wavelet?

0 Kudos
Message 4 of 5
(93 Views)

Of you need just values, then an easiest way probaly to use LabVIEW Arrays Indicators to display instead of graphs:

waves.png

But usually the values of Wavelet Mother Functions makes less sense than Filter coefficients. For example, the Daubechies with p=2 is classically described by four coefficients h[-1] = 0,482963; h[0] = 0,836516; h[1] = 0,224144 and h[2] = -0,12941.

Screenshot 2024-04-24 17.53.51.png

The scaling and mother functions are recovered by multiple iterations, therefore you have the "refinements" parameter, which specifies how many levels of lowpass filters to use to calculate the mother wavelet and scaling functions, and this parameter shall be large enough for precise approximation of both.

Message 5 of 5
(65 Views)