LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Numerical integration confusion

I have some confusion on the numerical integration.  I have sinusoidal data from an accelerometer and want to double integrate to get displacement.  From my understanding the integral of sin X should be -Cos X, but there seems to be some other factor creeping into this.  Am I just doing something wrong here?   The files give the input data, a snippet of the code and the output I get when I run the snippet.

Download All
0 Kudos
Message 1 of 2
(2,405 Views)

Mitch_cottrell,

 

Your data has a DC offset and it also gets integrated, producing the ramp and quadratic effects you see. Look at XY Graph on the first image you posted. The positive peaks exceed 0.01 while the negative peaks never reach -0.01.  Therefore at DC offset of about 0.001-0.002 appears to exist.

 

Also your data set does not include an exact integer number of cycles of the sinusoidal signal. The partial cycle also adds to (or subtracts from) the offset.

 

Subtracting the mean of the dataset before integrating will help.

 

Lynn

0 Kudos
Message 2 of 2
(2,396 Views)