|
|
|
![]() |
|
|||||||
|
||||||||
Plot of encoder noise. The red line is the right wheels with the config timer encoder block and the white line is the left wheels without this block. The scale is y axis is FPS and x is time
06-20-2014 08:49 AM
notmattlythgoe
How many samples did you set the FPGA to average?
06-20-2014 09:04 AM
ayeckleyIs this with the bot on the ground, or supported on blocks? If there is no load on the drivetrain then this seems pretty normal. We've been able to attribute this to backlash and the accompanying rattle within the drivetrain. With a "real" load the measurement should be more well-behaved since the masses are 10x-100x larger and the backlash-induced rattle goes away. Overdamping of the measurement (by cranking up the number of averages) brings it's own set of problems.
06-20-2014 09:12 AM
Bpk9p4This was on blocks. I am using 50 for the config timer. I have not tried it on the ground yet but plan on doing that this weekend. Thanks for the advice
06-20-2014 09:41 AM
notmattlythgoe
|
This was on blocks. I am using 50 for the config timer. I have not tried it on the ground yet but plan on doing that this weekend. Thanks for the advice
|
06-20-2014 01:56 PM
notmattlythgoe
06-20-2014 02:09 PM
Tom BottiglieriWhat is the "config timer encoder block"?
06-20-2014 02:21 PM
notmattlythgoe
06-20-2014 03:01 PM
Ether
06-20-2014 03:02 PM
Aren Siekmeier|
I believe its the setting that sets how many samples you want the FPGA to average when it reports the encoder rate. In java it would be the setSamplesToAverage() method for the Encoder class.
|
06-20-2014 03:24 PM
notmattlythgoe
|
I was asking the OP, but that's OK. What exact model encoder were you spinning at 7K RPM ? And how were you decoding it ?
|
06-20-2014 04:29 PM
Ether|
We are using these... ...we were decoding in 4x with 10 samples being averaged ...the more information the better... |
06-20-2014 05:39 PM
notmattlythgoe
|
Agreed :-) So:
What is the complete part number of the part you're using (including CPR, bearing type, etc)? Were you reading counts from the FPGA and dividing by elapsed time, or reading the rate from the FPGA? Please post code if you have it. @jhersh: (if you are following this thread) would there be any advantage, tolerance-wise, to change the sample size to an even multiple of 4 (say 12 or 8) so that the averaging would always take place over an integer number of cycles? |
06-20-2014 06:35 PM
EtherWelcome to RLaB. New users type `help INTRO'
RLaB version 2.1.05 Copyright (C) 1992-97 Ian Searle
RLaB comes with ABSOLUTELY NO WARRANTY; for details type `help warranty'
This is free software, and you are welcome to redistribute it under
certain conditions; type `help conditions' for details
>
> format(5);
>
> CPR = 120 # cycles per rev (single channel)
120
>
> EPRS = 2*CPR # edges per rev (single channel)
240
>
> EPRQ = 2*EPRS # edges per rev quadrature (both channels)
480
>
> RPEQ = 1/EPRQ # angular distance (revs) between cross-channel edges
0.0020833
>
> per = 261/40e6 # FPGA sampling period, seconds
6.525e-006
>
> RPS = RPEQ/per # maximum revs per sec
319.28
>
> RPM = RPS*60 # maximum RPM (revs per minute)
19157
>
> # angular distance (revs) between cross-channel edges
> # with "typical" tolerance:
>
> RPEQ_TYP = (90-10)/90*RPEQ
0.0018519
>
> RPM_TYP = RPEQ_TYP/per*60
17029
>
>
> # angular distance (revs) between cross-channel edges with "max" tolerance:
>
> RPEQ_MAX = (90-60)/90*RPEQ
0.00069444
>
> RPM_MAX = RPEQ_MAX/per*60
6385.7
>
>
> # RPM with no tolerance, typical tolerance, and max tolerance:
> RPM
19157
> RPM_TYP
17029
> RPM_MAX
6385.7
>
>
06-20-2014 06:40 PM
notmattlythgoe
|
Your S4 is less than half the CPR of the OP's and has ball bearings. So the two are not comparable. What works for you won't necessarily work for the OP.
At 7K RPM you are exceeding the speed the FPGA could handle if your S4 were at max tolerance for quadrature phase error: Code:
Welcome to RLaB. New users type `help INTRO'
RLaB version 2.1.05 Copyright (C) 1992-97 Ian Searle
RLaB comes with ABSOLUTELY NO WARRANTY; for details type `help warranty'
This is free software, and you are welcome to redistribute it under
certain conditions; type `help conditions' for details
>
> format(5);
>
> CPR = 120 # cycles per rev (single channel)
120
>
> EPRS = 2*CPR # edges per rev (single channel)
240
>
> EPRQ = 2*EPRS # edges per rev quadrature (both channels)
480
>
> RPEQ = 1/EPRQ # angular distance (revs) between cross-channel edges
0.0020833
>
> per = 261/40e6 # FPGA sampling period, seconds
6.525e-006
>
> RPS = RPEQ/per # maximum revs per sec
319.28
>
> RPM = RPS*60 # maximum RPM (revs per minute)
19157
>
> # angular distance (revs) between cross-channel edges
> # with "typical" tolerance:
>
> RPEQ_TYP = (90-10)/90*RPEQ
0.0018519
>
> RPM_TYP = RPEQ_TYP/per*60
17029
>
>
> # angular distance (revs) between cross-channel edges with "max" tolerance:
>
> RPEQ_MAX = (90-60)/90*RPEQ
0.00069444
>
> RPM_MAX = RPEQ_MAX/per*60
6385.7
>
>
> # RPM with no tolerance, typical tolerance, and max tolerance:
> RPM
19157
> RPM_TYP
17029
> RPM_MAX
6385.7
>
>
|
06-21-2014 05:11 PM
Ether|
After thinking about it more we weren't at 7k rpm the encoder was reporting a rate of 7k.
|
06-23-2014 08:05 AM
notmattlythgoe
08-21-2014 05:29 PM
jhersh|
@jhersh: (if you are following this thread) would there be any advantage, tolerance-wise, to change the sample size to an even multiple of 4 (say 12 or 8) so that the averaging would always take place over an integer number of cycles?
|
08-22-2014 01:24 PM
Ether|
...we were decoding in 4x with 10 samples being averaged.
|
08-22-2014 01:46 PM
notmattlythgoe
|
@notmattlythgoe:
if you are still following this thread, you might want to try 8 or 12 samples instead of 10 (see jhersh's post). |