![]() |
Re: High Speed Encoder Problem
Quote:
Does the FMS follow the user's DS, or is it designed to send TeleOp packets at 20ms ? And even if it is designed to send at 20ms (rather than following the user's DS), I guess the problem would still exist, albeit perhaps in a slightly different form, yes? no? still thinking about it. |
Re: High Speed Encoder Problem
At competition the DS packets are still sent by the DS.
FMS only orders the DS to change modes, but the DS has to send that command to the robot. Any slow down in the DS PC will delay packets. One of the checks for slow or lost packets is the CPU utilization on the DS. (If in the Classmate Driver acct. use: CTRL-Shift-Esc -> Performance) A saturated netbook can be a cause of lost and delayed packets. I see that pretty often. |
Re: High Speed Encoder Problem
Quote:
We use C++. There is a configuration variable that sets the periodic rate. If it is zero then the rate will follow the driver station. If it is not zero then the value entered will be the periodic rate. I tell our programmers to ALWAYS set the rate. We have not settled on a value for this year yet. We use a scope to be sure all of our traffic on the CAN bus is complete. This is detailed in other threads as you know. As best I know FMS does not fiddle with this. Last year we used 100 msec and would show up on FMS as a long ping time. A few times the FTA would tell us about it, but it didn't seem to be a problem. I have some photos of the FMS screen showing this. I will try to find them and post here, but this season has been very busy, so don't hold your breath. :-) Maybe we should start a new thread about this? -Hugh |
Re: High Speed Encoder Problem
Quote:
So Hugh's comment about DS packet timing variations caused by Windows scheduling of the DS applies equally at home and at competition. |
Re: High Speed Encoder Problem
Quote:
What is the class.method that you call to set this? Is it available in Java? |
Re: High Speed Encoder Problem
Quote:
EDIT: Here's the link: http://www.chiefdelphi.com/forums/sh...d.php?t=103676 |
Re: High Speed Encoder Problem
Quote:
With our recent encoder issue (sorry I don't know how to link to it)... I tried using the blend, but found that it would introduce latency when it is tuned too high. I prefer this over averaging though, but the real winner is the Kalman filter... that one gave good enough results without the latency. And latency makes it much more difficult to tune the PID. (Especially to someone who has not yet mastered the skill of it yet). |
Re: High Speed Encoder Problem
We have a similar filter in our library but we called it MovingAverage filter. In a sense, it is averaging the last N points.
Code:
/* |
Re: High Speed Encoder Problem
Quote:
As you've shown, it's identical to what was posted earlier. |
Re: High Speed Encoder Problem
You are right, it does carry the history of all pass data points.
|
Re: High Speed Encoder Problem
Here is the Kalman Filter:
Code:
/***********************************************************************************************************/ |
Re: High Speed Encoder Problem
the problem is the time between updates can vary. In our c++ program we execute every 20 to 100 millisec. That means if we were doing the count divided by time there could be a 1-5 range of counts. The best thing to do is get the period of the last cycle. That will be in seconds and will not depend on the cycle time of the calls to the actual program.
For those with good control they used a a custom painted code wheel with one or three cycles to get the longest possible period with the highest quality of timer counts to calculate the speed. |
Re: High Speed Encoder Problem
1 Attachment(s)
Quote:
Wow 20-100 ms... what are you guys processing (video imaging?) ;) Anyhow... it should not matter if you have uneven time delta's as the rate will still work out correctly. Now then our problem is a bit unique in that using the GetDistance() technique... the actual pulses got updated irratically where 1 out of every 3 iterations it would update. I suspect this is because we used 4x setting, and I'll need to test with 1x or 2x to see if this behavior changes. Fortunately, our last years robot produces a fluent rate as I'd expect. In which case dividing by time works really well. Check out this Encoder Test attachment... l1 = left wheels using GetRate(), l2=left wheels using GetDistance(). The r1 and r2 same for the right side. As you can see these are virtually identical, as these units are in RPS. The iteration intervals are around 10-11 ms, but it wouldn't matter what their size is as the rate would still be the same. |
Re: High Speed Encoder Problem
Quote:
We ran into a stroke of luck tonight to find the ROOT cause of a similar problem. This can be best explained like so: Our shooter was not quite aligned for some time, and as it hit those higher speeds the vibrations of the casing were so intense that it cracked the casing around the encoder... the little wheel inside the encoder started to roll around inside its own casing as such where during certain intervals it briefly lost connection and did not deliver the pulse counts. When I say brief, I mean about 3 iterations per 10 where each iteration ran about 10-11ms. We fixed the damage the best we could with electrical tape, and ensured the wheel inside kept constant contact. It was interesting how we found this problem by sheer luck... as we just happened to press against it while I was reading the dump, and saw the numbers looking much better during the period it was touched. Hope this helps. |
| All times are GMT -5. The time now is 05:55. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi