Go to Post Is that severed hand legal? I think it's a COTS assembly from previous years. - Taylor [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 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,533
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
  #2   Spotlight this post!  
Unread 06-02-2013, 08:26
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,533
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
Re: Shooter Sampling Rate and Counter Averaging

Ether - I'm not sure why you deleted your posts. The first one pointing to the paper helped me. Once upon a time when you first put that out I planned to throw it in excel and show my controls members how it worked. I did that last night, and with a couple tweaks found solutions that work with my 128 count encoder for both 3500 and 7500 with resolutions of +/- 2 and 4 rpm each at 10ms loop timing.

-Edit: Just saw your update that said there was a problem with your calculations. I look forward to the update so I can recheck my numbers.
Reply With Quote
  #3   Spotlight this post!  
Unread 06-02-2013, 10:31
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Shooter Sampling Rate and Counter Averaging

Quote:
Originally Posted by Tom Line View Post
Ether - I'm not sure why you deleted your posts. The first one pointing to the paper helped me. Once upon a time when you first put that out I planned to throw it in excel and show my controls members how it worked. I did that last night, and with a couple tweaks found solutions that work with my 128 count encoder for both 3500 and 7500 with resolutions of +/- 2 and 4 rpm each at 10ms loop timing.

-Edit: Just saw your update that said there was a problem with your calculations. I look forward to the update so I can recheck my numbers.
Hi Tom,

I'm working on it. Short story: I believe the calculations as shown are correct for a given true rpm but: small variations of the true rpm around the given value can cause the jitter pattern to change and affect the jitter you would actually see in real life. I took the paper down because I did not explain this clearly and didn't want to mislead. I need to provide more graphs and explain them better.


Reply With Quote
  #4   Spotlight this post!  
Unread 06-02-2013, 10:58
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,533
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
Re: Shooter Sampling Rate and Counter Averaging

Quote:
Originally Posted by Ether View Post
Hi Tom,

I'm working on it. Short story: I believe the calculations as shown are correct for a given true rpm but: small variations of the true rpm around the given value can cause the jitter pattern to change and affect the jitter you would actually see in real life. I took the paper down because I did not explain this clearly and didn't want to mislead. I need to provide more graphs and explain them better.


Ok. If it's only a question of small variations then I'm not terribly worried. When I compare our plan this year with the setup we used last year, there is an order of magnitude improvement in jitter.
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


All times are GMT -5. The time now is 22:59.

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