LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does the Daubechies-4 wavelet VI actually work?

Solved!
Go to solution

Hi, 

 

I'm a student currently working on my final year project, of which one of the objectives are to detect peaks of ECG signals (R-peaks) using the Daubechies-4 wavelet transform VI in LabVIEW. I'm current using LabVIEW 2013 student edition (6 months trail), if that makes any difference. 

 

I am quite confused about how the Daubechies-4 wavelet works:

1) How many levels does it decompose the signal into? 

2) Is there a way to set the level of decomposition? 

3) Are filters already applied in the VI or do I actually need to design a filter myself? 

4) What is the main difference between a Db4 PtByPt and a normal Db4 transform in terms of LabVIEW? 

5) Finally, how does the VI actually superimpose the wavelet onto the signal? Does it take the entire signal into consideration or does it take each pulse into consideration when superimposing the wavelet? 

 

Thanks in advance for the answers.

 

Regards,

Derren

0 Kudos
Message 1 of 7
(6,016 Views)

I guess I should also mention that I'm enquiring about the Daubechies Wavelet VI, and not how the wavelet works since I already understand that part.

 

Thanks,

Derren

0 Kudos
Message 2 of 7
(5,988 Views)

Hi Derren,

 

Firstly, can you clarify the exact name of your 'Daubechies-4 wavelet transform VI' and in which pallette you find it in LabVIEW (i.e. which module / toolkit it is from)? It is also possible that the VI you mentioned is not from NI. For example, maybe you inherited that from your senior who was in the project last year.

 

Nevertheless, the closest match I can find is WA Discrete Wavelet Transform VI found under the Advanced Signal Processing toolkit. You can choose db04 in the wavelet terminal. This is a bit different to what you described as the VI can work for different kinds of wavelet, not just Daubechies type. Suppose you will use this, then the answer to your questions are:

 

1) How many levels does it decompose the signal into? 
2) Is there a way to set the level of decomposition?
You can set this by wiring the value to the level terminal of the VI.

 
3) Are filters already applied in the VI or do I actually need to design a filter myself?

Both options are possible. Some commonly used filters are included and you can choose this by wiring the wavelet terminal. You can design your own filter using Wavelet Design Express VI and wire the output to the analysis filters terminal of WA Discrete Wavelet Transform VI.
 
4) What is the main difference between a Db4 PtByPt and a normal Db4 transform in terms of LabVIEW?

I can not find these VI you mentioned. Please clarify.


5) Finally, how does the VI actually superimpose the wavelet onto the signal? Does it take the entire signal into consideration or does it take each pulse into consideration when superimposing the wavelet?

I am not sure if I understand this question correctly. You can open the WA Discrete Wavelet Transform VI to see how it works inside up to the decimation filtering, in which it is protected as a DLL. From what I see it takes the entire signal (modified with the chosen extension) for this main process.

 

 

As a last note, your LabVIEW Student Edition does not include Advanced Signal Processing toolkit, hence you will not find above VIs I mentioned. Try checking with your school if they have purchased Academic license of LabVIEW, which usually includes the toolkit.

 

Hope this clarifies.

 

Regards,

A. Yodha

NI Singapore

0 Kudos
Message 3 of 7
(5,952 Views)

Hi Yodha, 

 

Here's the VI in question: 

 

transform.png

 

As far as I know, this is a part of the default set of VIs given when the LabVIEW 2013 Student Edition was installed. 

 

Thanks and regards, 

Derren

 

0 Kudos
Message 4 of 7
(5,929 Views)

Bump.

 

I really need help with this since I have an urgent deadline to meet.

 

Thanks,

Derren

0 Kudos
Message 5 of 7
(5,895 Views)
Solution
Accepted by topic author parkel42

Hi Derren,

 

I was away for the whole of last week so I only read your reply today.

 

The Wavelet Transform Daubechies4.vi you mentioned is indeed already included in LabVIEW (minimum Full version, which is what Student Edition offers). From what I can see, this is a very simple implementation of the transform than the VI I mentioned in my post above. To better understand how it works, first read up its Help file (use ctrl + h) and then open the VI by double-clicking it to see the block diagram. From there you will see that this VI is basically doing some matrix multiplications of the db4 coefficients to the signal. Given this, we can go back to your questions:

 

1. Level of decomposition

It can be seen from the block diagram that this is coded to be a number such that recursively the signal can not be decomposed further by 2, e.g. signal length of 8 will have 2 iterations. You can change this by simply copying the block diagram from there and customize it in your VI, provided that you know what you are doing.

 

2. Filters

These are already applied in the VI as the coefficients explained in the Help file and as can be seen in the block diagram.

 

3. Difference with its Point-by-Point (PtByPt) version

They function similarly but the computation is done differently. The normal version uses array-based analysis and hence buffer, whereas point-by-point analysis is a newer paradigm where input-analysis-output is done continuously in real-time. This is required for high-speed deterministic real-time systems. If you open the VI you can see that, at the heart of it, it uses the normal wavelet VI for the analsis but enclosed by some functions to handle the point-by-point cases. For much more details, go to LabVIEW Help (ctrl + ?) and read up Point-By-Point Analysis.

 

Lastly, the Wavelet Transform Daubechies4.vi takes the entire signal into consideration as can be seen in its block diagram.

 

Hope this helps.

 

Regards,

Yodha

NI Singapore

Message 6 of 7
(5,851 Views)

Dear all,

I have used the built-in wavelet analysis in LabVIEW( Discrete wavelet Analysis VI), in that case, I have set the mother wavelet type to db04 and levels of decomposition to 3.my intention was to find the 3 details and one approximate but while I am connecting the DWT coefficients to the indicator it generated an array. I don't understand the physical meaning of the array output.

Thank you in Advance!

Regards,

Samuel

0 Kudos
Message 7 of 7
(4,358 Views)