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 7
(305 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 7
(218 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 7
(211 Views)

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

0 Kudos
Message 4 of 7
(175 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 7
(147 Views)

Do you have information about the Dispersion of a discrete wavelet image series? I need to do the entire series, the first quarter of the series and the second half of the series of Haar and Morlet wavelet transforms

0 Kudos
Message 6 of 7
(79 Views)

@Kirin_Jindosh wrote:

Do you have information about the Dispersion of a discrete wavelet image series? I need to do the entire series, the first quarter of the series and the second half of the series of Haar and Morlet wavelet transforms


I understand every single word in your question, but I do not fully understand it altogether, especially how Dispersion is applicable to this. Google tells me something about "Dispersion field analysis using discrete wavelet transform", but I'm not sure if this is what you need, and my knowledge of wavelets is not so deep.

 

Anyway, if you are asking about "image" and "quarters" and "series", maybe all you need to demonstrate is the classical coefficients representation of the two-dimensional discrete Haar wavelet transform, like this:

 

Screenshot 2024-05-04 06.53.26.png

which is obtained with following snippet:

WaveletSnippet.png

To get full series just use next array elements:

wavelet2.png

and you will get this:

Screenshot 2024-05-04 07.34.40.png

and so on (you can replace this image with your data and add all desired levels). 

 

With Morlet's DWT is a little bit more complicated, because Morlet cannot be discretized so easily, because Morlet is a pure continuous wavelet.

In NI Signal Processing Toolkit I don't see Morlet in the list, but I think if you will try to apply it in python, like this:

 

 

wavelet = pywt.DiscreteContinuousWavelet('morl')
data = pywt.wavedec(S, wavelet)

 

 

you will get an error.

 

Maybe you can use other discrete wavelets with a 'Morlet'-like design. May be Malvar-Wilson wavelets will help, but I'm not really sure about your needs...

Download All
0 Kudos
Message 7 of 7
(60 Views)