Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Integration in Labview (http://www.chiefdelphi.com/forums/showthread.php?t=72814)

Felipe Sagui 24-01-2009 07:29

Integration in Labview
 
2 Attachment(s)
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

PhilBot 24-01-2009 08:34

Re: Integration in Labview
 
Quote:

Originally Posted by Felipe Sagui (Post 806982)
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.

Felipe Sagui 24-01-2009 13:12

Re: Integration in Labview
 
1 Attachment(s)
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?

drkiraco 24-01-2009 19:41

Re: Integration in Labview
 
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.

Quote:

Originally Posted by Felipe Sagui (Post 807132)
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?


Felipe Sagui 26-01-2009 20:14

Re: Integration in Labview
 
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.

drkiraco 26-01-2009 21:18

Re: Integration in Labview
 
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.

Quote:

Originally Posted by Felipe Sagui (Post 808509)
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.


Raini 02-04-2009 04:28

Re: Integration in Labview
 
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

Loubear 02-04-2009 21:08

Re: Integration in Labview
 
Though you could try using the trapezoid rule to approximate velocity, you could also use the accumulator.


All times are GMT -5. The time now is 08:06.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi