View Single Post
  #8   Spotlight this post!  
Unread 28-12-2012, 18:49
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Dealing with low resolution data for speed PID

Kalman Filter

An analogy I have for that is Euler's and Newton's Methods. You've learned in class that these are recursive; the input of the next "iteration" is the output of the current one. That's how the Kalman Filter is; it's recursive. How I would describe it is that it's a "weighted" average between the previous out put and the new data gathered from sensors.

"A priori state" is the state before the measurement has taken place; "a posteriori state" is after the measurement. So, the a priori state is the a posteriori state from the previous iteration and the a posteriori state of the current iteration is the latest "prediction". That prediction, you feed to your PID controller.

How you weigh the average is based on the error of the system; whether your predictions are more accurate than the measurement from sensors determine the weighing factor. Your initial prediction comes from another sensor or input; how I did it was just use the relation between the PWM signal fed into the speed controller VS real RPM. Now, again, I probably butchered that whole idea of the filter, but it worked.

Now, I do not declare I know much about the Kalman filter; I only implemented a rudimentary Kalman filter on the robot. I probably butchered my description, but I'm just trying to help. My implementation at least cleaned up the input significantly.



Read up on papers on the Kalman filter by searching through Google Scholars; it helped tremendously over the wikipedia page.

Read this: it's open access.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.

Last edited by davidthefat : 28-12-2012 at 19:06.