# LabVIEW

cancel
Showing results 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:

Message 1 of 7
(392 Views)

## Re: Discrete wavelet transform. Mother wavelet. Wavelet Haar

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:

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

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:

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:

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

## Re: Discrete wavelet transform. Mother wavelet. Wavelet Haar

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.

Message 3 of 7
(298 Views)

## Re: Discrete wavelet transform. Mother wavelet. Wavelet Haar

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

Message 4 of 7
(262 Views)

## Re: Discrete wavelet transform. Mother wavelet. Wavelet Haar

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

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.

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
(234 Views)

## Re: Discrete wavelet transform. Mother wavelet. Wavelet Haar

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

Message 6 of 7
(166 Views)

## Re: Discrete wavelet transform. Mother wavelet. Wavelet Haar

@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:

which is obtained with following snippet:

To get full series just use next array elements:

and you will get this:

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...

Message 7 of 7
(147 Views)