Go to Post not national champ.....WORLD CHAMPION - Stephen Kowski [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-01-2009, 07:29
Felipe Sagui Felipe Sagui is offline
Registered User
FRC #1382 (EtepTeam)
Team Role: Mentor
 
Join Date: Apr 2007
Rookie Year: 2007
Location: Brazil
Posts: 25
Felipe Sagui is an unknown quantity at this point
Send a message via MSN to Felipe Sagui
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
Attached Thumbnails
Click image for larger version

Name:	block diagram.JPG
Views:	1656
Size:	24.4 KB
ID:	7210  Click image for larger version

Name:	Front panel.JPG
Views:	882
Size:	69.7 KB
ID:	7211  
__________________
Felipe Cezar Salgado
ETEPTEAM #1382
Reply With Quote
  #2   Spotlight this post!  
Unread 24-01-2009, 08:34
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: Integration in Labview

Quote:
Originally Posted by Felipe Sagui View Post
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.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #3   Spotlight this post!  
Unread 24-01-2009, 13:12
Felipe Sagui Felipe Sagui is offline
Registered User
FRC #1382 (EtepTeam)
Team Role: Mentor
 
Join Date: Apr 2007
Rookie Year: 2007
Location: Brazil
Posts: 25
Felipe Sagui is an unknown quantity at this point
Send a message via MSN to Felipe Sagui
Re: Integration in Labview

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?
Attached Thumbnails
Click image for larger version

Name:	hp50g.JPG
Views:	307
Size:	52.0 KB
ID:	7212  
__________________
Felipe Cezar Salgado
ETEPTEAM #1382
Reply With Quote
  #4   Spotlight this post!  
Unread 24-01-2009, 19:41
drkiraco drkiraco is offline
Registered User
FRC #1747
 
Join Date: Jan 2009
Location: Lafayette IN
Posts: 23
drkiraco will become famous soon enoughdrkiraco will become famous soon enough
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 View Post
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?
Reply With Quote
  #5   Spotlight this post!  
Unread 26-01-2009, 20:14
Felipe Sagui Felipe Sagui is offline
Registered User
FRC #1382 (EtepTeam)
Team Role: Mentor
 
Join Date: Apr 2007
Rookie Year: 2007
Location: Brazil
Posts: 25
Felipe Sagui is an unknown quantity at this point
Send a message via MSN to Felipe Sagui
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.
__________________
Felipe Cezar Salgado
ETEPTEAM #1382
Reply With Quote
  #6   Spotlight this post!  
Unread 26-01-2009, 21:18
drkiraco drkiraco is offline
Registered User
FRC #1747
 
Join Date: Jan 2009
Location: Lafayette IN
Posts: 23
drkiraco will become famous soon enoughdrkiraco will become famous soon enough
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 View Post
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.
Reply With Quote
  #7   Spotlight this post!  
Unread 02-04-2009, 04:28
Raini's Avatar
Raini Raini is offline
Registered User
no team
 
Join Date: Apr 2009
Location: Romania
Posts: 1
Raini is an unknown quantity at this point
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
Reply With Quote
  #8   Spotlight this post!  
Unread 02-04-2009, 21:08
Loubear's Avatar
Loubear Loubear is offline
Registered User
AKA: YLou
FRC #0075 (RoboRaiders)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2006
Location: NJ
Posts: 33
Loubear will become famous soon enoughLoubear will become famous soon enough
Re: Integration in Labview

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


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hardware integration of sensors? ellisk C/C++ 8 12-01-2009 20:56
Accelerometer integration Leav Programming 4 27-01-2006 11:56
CMU Integration Overview???? Mumford 406 Programming 1 09-02-2005 18:17
Autonomous Camera Integration GregC Programming 2 06-02-2005 14:34
Autonomous Camera Integration GregC Programming 1 05-02-2005 18:56


All times are GMT -5. The time now is 20:24.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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