Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Averaging and Storing GRIP Values w/ C++ (http://www.chiefdelphi.com/forums/showthread.php?t=143079)

Alex Walsh 02-02-2016 10:22 PM

Averaging and Storing GRIP Values w/ C++
 
Our team is having trouble deciding the best way to average out the readings we get from NetworkTables and storing those as accurate variables to move our robot about in autonomous. Any teams have success with this yet?

axton900 02-05-2016 02:30 PM

Our team is also wondering the same!

KJaget 02-05-2016 03:52 PM

Re: Averaging and Storing GRIP Values w/ C++
 
For filtering, the typical go-to in control systems is a Kalman filter. That's also almost certainly complete overkill for this - a simple low-pass filter is very likely good enough and quite easy to program : e.g. http://www.earlevel.com/main/2012/12...e-pole-filter/.

As has been mentioned in other threads, the feedback from networktables probably isn't low-latency enough to do closed-loop control on. Instead, you'd grab a value from NT and use it as the set-point for another control system which has better feedback (e.g. encoders & PID or whatever). Once you arrive at the set-point, resample the NT value to see how far off you are. Again adjust this error using the feedback control system. Rinse and repeat. At some point your error will be close enough and you're where you need to be based on the NT values.

I suppose you could also adjust on the fly - that is, update setpoints periodically from NT even while you're still on the move, assuming the control system can handle this.


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

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