Go to Post Ok, so you are going to use a robot to hold all of those rivets together? - gblake [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 05-02-2013, 18:46
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,517
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Shooter Sampling Rate and Counter Averaging

I'd like confirmation that my understanding of how the different methods of getting rates from encoders work.

The 'getrate' command from the encoder VI only looks at period between the last two ticks. This results in a very noisy measurement if you are using a high-count encoder. Low count encoders that still count at least once per sampling period work best with this.

The 'counter' VI, using the # of samples to average mode outputs an average of all the samples. This should be better than a team calculating their own because this method shouldn't have jitter because it measures the periods from edge to edge. The drawback is that you'll have to make a comprise on how many samples you average. One choice of sample size won't be the absolute 'perfect' choice.

Calculating your own. This has the benefit of being more accurate as you get more samples, however you will have jitter because you may be part way between ticks when it executes and calculates. (counts from last cycle / time from last cycle).

So say I'm using a 3500 rpm shooter. That's 58.3 rps. Using a 128 count counter, that's 7466.7 counts per second, or 7.5 counts per millisecond. If I put it into a timed loop of 5 milliseconds, I will get around 35 counts per period. So if I were to use the counter VI and pick a samples-to-average of 25, I should have a pretty accurate rate calculation at 3500 RPM.

If I were to calculate my own using the microsecond RT timer, then my jitter would be around 1/35, or approximately 2.8% (worst case).

Am I thinking through this correctly?
Reply With Quote
 


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


All times are GMT -5. The time now is 12:16.

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