From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Perform 1d linear convolution without any subVI's

I want to perform 1d convolution without using any pre-defined Convolution VI's.I have been able to do it succesfully using zero-padding but now i want to implement it via basic method of shifting the array,then multiplying and summing.I have tried a lot but probably lost my way while performing shifting and multiplication and getting incorrect results.Pls suggest a way out to shift and multiply those arrays to perform convolution.

0 Kudos
Message 1 of 5
(2,996 Views)

SInce LabVIEW ships wit convolution tools, this is a pure exercise and I recommend to try to complete it yourself. Looking at your code, you need to take a few LabVIEW tutorials first,  because mostall of what you just did makes no sense at all.

 

Learn about autoindexing. Think why you thought you needed a "build array" creating a 2D from a 1D array without changing the total number of elements) before summing, etc. etc. Maybe learn about shift registers.

0 Kudos
Message 2 of 5
(2,985 Views)

Hi ps,

 

why don't you start with reading Wikipedia on convolution and then try to implement the basic formula given there?

This should be pretty easy… 🙂

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 5
(2,983 Views)

GerdW wrote:

why don't you start with reading Wikipedia on convolution and then try to implement the basic formula given there?

This should be pretty easy… 🙂


Since he talks about shifting and multiplying, I assume the poster is familiar with the math. what is lacking are the LabVIEW skills.

 

It was also mentioned that it works with "zoeropadding", which also makes no sense, because there is much more to it than just that.

0 Kudos
Message 4 of 5
(2,977 Views)

Here is the convolution code of one my very old example that gives the same result as the stock covolution.vi (within ~1e-15).

 

Try to understand it. 😉 There are many ways to do this, of course.

 

Message 5 of 5
(2,954 Views)