Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Is It Just Me or... (http://www.chiefdelphi.com/forums/showthread.php?t=100903)

davidthefat 22-01-2012 17:35

Is It Just Me or...
 
I just want to clear some stuff up. The API says that the timer class return a double that represent microseconds, but in reality, it returns a double that represents seconds. Did they mean that the resolution of the timer is accurate up to the microseconds, but returns it in seconds?

Another thing: do you think a Kalman Filter is overkill? Considering the fact that some people just use the proportional portion of the PID, the noise of the sensor would not matter.

kinganu123 22-01-2012 18:20

yeah, I was confused too last year. I don't remember the answer, but it was either seconds OR milliseconds. The API then was definitely wrong though

Paul Copioli 22-01-2012 18:22

Re: Is It Just Me or...
 
A Kalman filter is complete overkill for FRC. You need a complete understanding, mathematically, of your physical system for a Kalman filter to be effective.

We have never used it for any of our robots in FRC.

Matt H. 22-01-2012 19:28

Re: Is It Just Me or...
 
Quote:

Originally Posted by Paul Copioli (Post 1111402)
You need a complete understanding, mathematically, of your physical system for a Kalman filter to be effective..

This is false. Simplified models of your system can be used in effective Kalman filters provided you add uncertainty from the model.

See this paper which is an overview of the Kalman filter (esp. the section on Filter Parameters and Tuning and the Extended Kalman filter):
http://www.cs.unc.edu/~welch/media/pdf/kalman_intro.pdf

Quote:

Sometimes a relatively simple (poor) process model can produce acceptable results if one “injects” enough uncertainty into the process via the selection of Q [process noise covariance].

That being said, I agree that Kalman filters are generally overkill for FRC.

davidthefat 22-01-2012 20:17

Re: Is It Just Me or...
 
Quote:

Originally Posted by Paul Copioli (Post 1111402)
A Kalman filter is complete overkill for FRC. You need a complete understanding, mathematically, of your physical system for a Kalman filter to be effective.

We have never used it for any of our robots in FRC.

Not to worry on that part.

Paul Copioli 22-01-2012 21:02

Re: Is It Just Me or...
 
Quote:

Originally Posted by Matt H. (Post 1111441)
This is false. Simplified models of your system can be used in effective Kalman filters provided you add uncertainty from the model.

See this paper which is an overview of the Kalman filter (esp. the section on Filter Parameters and Tuning and the Extended Kalman filter):
http://www.cs.unc.edu/~welch/media/pdf/kalman_intro.pdf




That being said, I agree that Kalman filters are generally overkill for FRC.

My point was that even with the extended Kalman filter, you have to have significantly more equations to get an acceptable answer compared to an effectively tuned PID. Kalman filters for simple sensing (encoders + gyro) are ineffective compared to PID due to their overly complicated sets of equations.

When using multiple IMUs and sensing devices, Kalman is the ONLY way to go, but for us I still say ineffective.

ewhitman 23-01-2012 00:50

Re: Is It Just Me or...
 
A Kalman Filter is not a substitute for a PID. It is something you might do in addition to a PID.

A Kalman Filter attempts to accurately estimate the state (position, velocity, etc.) of your system. It is used either when your sensors are inaccurate (always true to some extent) or when you do not have enough sensors to measure your full state directly.

A KF with even a very crude model can provide more accurate state estimates than reading your sensors directly or traditional filtering if the KF is tuned correctly (not necessarily easy to do). A more accurate system model will result in correspondingly more accurate state estimates.

Extended Kalman Filters allow you to use nonlinear models of your system, which is sometimes desirable, but significantly complicates the process.

I would say that a KF is almost always overkill for FRC applications.

A PID is a control strategy, which means it determines actuator commands (usually motor voltage or duty cycle in an FRC context) based on the system state.

davidthefat 23-01-2012 00:54

Re: Is It Just Me or...
 
Quote:

Originally Posted by ewhitman (Post 1111666)
A Kalman Filter is not a substitute for a PID. It is something you might do in addition to a PID.

A Kalman Filter attempts to accurately estimate the state (position, velocity, etc.) of your system. It is used either when your sensors are inaccurate (always true to some extent) or when you do not have enough sensors to measure your full state directly.

A KF with even a very crude model can provide more accurate state estimates than reading your sensors directly or traditional filtering if the KF is tuned correctly (not necessarily easy to do). A more accurate system model will result in correspondingly more accurate state estimates.

Extended Kalman Filters allow you to use nonlinear models of your system, which is sometimes desirable, but significantly complicates the process.

I would say that a KF is almost always overkill for FRC applications.

A PID is a control strategy, which means it determines actuator commands (usually motor voltage or duty cycle in an FRC context) based on the system state.

I know, I know, I have both of them implemented already. I guess my grammar was a bit off. I was using the KF to get a more accurate estimate than trying to rely on the encoders that can be off my about 50 degrees. What I meant was that teams did fine using noisy sensors with just the proportional portion of the PID controller. So if having the I and D components is overkill, a Kalman Filter is way overkill... Eh, it was fun writing those though, a great learning experience.


All times are GMT -5. The time now is 18:39.

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