LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Integration of an acceleration signal using a circular array is not giving the correct answer

Hi,

 

I am trying to read an acceleration signal from a DAQ and then perfrom the time integration in order to obtain the speed and then displacement. I seem not to be able to perfrom the correct integration. i have been trying all the different types of integration blocks in labview. none of them seem to be giving the correct answer.

i have tried debugging the problem by feeding in a 1 HZ sinusoid from a voltage signal generator. although the integration did not show the cosine pattern and neither the correct amplitude.

 

i hope if someone has come accross this problem could offer some help. i feel down to earth not being able to perfrom even the simplest integration process.

 

please also check attached VI if that helps.

0 Kudos
Message 1 of 12
(2,667 Views)

Hi Ali,

 

you may try this:

check.png

 

Best regards,
GerdW


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

Many thanks, i will give it a go. would you be able to post the dot VI file please?

 

Regards

 

0 Kudos
Message 3 of 12
(2,659 Views)

It's a snippet - and very easy to recode, so I didn't save it…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 12
(2,657 Views)

No worries, thank you so much

 

0 Kudos
Message 5 of 12
(2,655 Views)

I have designed pretty much the same code as you have suggested, it sounds close, but unfortunately it didnt do it as expected. i am running with 4V peak to peak at 2 HZ using a sine wave as an acceleration signal.

 

 

 

 

 

0 Kudos
Message 6 of 12
(2,649 Views)

Hi Ali,

 

please attach a VI with data embedded (by making all values default)!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 12
(2,630 Views)

HI GerdW,

 

thanks for your reply. I have attached the code.

instead of the Input AI0 input, you could just use a sine wave of 10 Hz with any amplitude as long as you know what the integration would so you can compare.

 

I really have tried all the possible integration blocks in labview, i have no idear why my integration is not working.

 

Kind Regars

Ali

0 Kudos
Message 8 of 12
(2,624 Views)

Hi Ali,

 

what's wrong with the VI?

test_summation_integral_sigma.png

Everything as expected.

 

What else do you expect?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 12
(2,615 Views)

Hi Gerd,

 

Thanks for your patience. there absolutely is no problem with your code.

 

my problem is that i am reading continuously from a sensor and i want to perfrom the integral on the run continuously. unfortunately the way i am doing it according to the previous code that i have attached doesnt seem to do the integration properly. I tried to integrate a sine wave coming from an external generator with known attributes. unfortunately with the way the code is, it does perfrom the correct integration which should be a perfect cosine signal of same frequency. i believe this is happening to me due to the  way i am filling and empteying the buffer  as it is being reset to zero at every iteration of the outer loop.

 

i hope i will figure this integration problem soon.

 

Regards

 

Ali

0 Kudos
Message 10 of 12
(2,586 Views)