Integration in Labview

I have a problem with the integration in labview…

when I integrate a sine curve I get a -cosine but with differents amplitudes…the pictures attacheds are showing the front panel and block diagram.

is it correct? If not…any idea to fix it?

thanks







This looks reasonable.

Notice that the First Integration is always positive. This makes sense since the sum starts out at zero, and after one full cycle, the sum of all the sine values will be zero again. So the first integral is offset up by half its peak/peak value.

Since the First integral is always positive, the Second integral won’t look anything like a sine wave, it will always get bigger.

I wonder if you look up the actual formulae for first integral of a sine this is what you’ll get (hint hint). I’m surprized that this wasn’t the first thing you did (rather than just posting on CD).

I would also think that the resulting magnitudes are a function of frequency, so may need to think about your sample times.

I understand what happens but when I do it on a hp50g calculator the result is different (this is the result that I really want…)

why these results are differents? Should labview integration be equals on the calculator?





To put PhilBot’s comments another way: the antiderivative of sin(x) is cos(x) PLUS an arbitary constant. So cos(x)+1 is just as valid of an antiderivative as cos(x)+0. Your calculator picked one way, labview picks another. to get a unique answer you have to specify an initial condition for the integrator.

to get the answer you are after, you might take the average (mean) value over one cycle and subtract that out.

Can I use this function from LabView to integrate the accelerometer signal to get the velocity? because these signal doesn’t has any period defined.

theoretially yes. practically, it’s fairly difficult. I tried for about a week to get a reliable integrated velocity from this accelerometer and gave up.

You can determine the DC of the integrated signal (velocity for instance) and subtract it from the integrated signal. So, velocity will be INTEGRATED SIGNAL - DC

Though you could try using the trapezoid rule to approximate velocity, you could also use the accumulator.