View Single Post
  #1   Spotlight this post!  
Unread 26-02-2008, 01:53
LieAfterLie's Avatar
LieAfterLie LieAfterLie is offline
Registered User
FRC #2028
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Hampton, VA
Posts: 35
LieAfterLie is an unknown quantity at this point
PID Without Direction - How?

I would like to know what the best ways to implement a pid control are when your feedback doesn't include direction. All you have is a setpoint and an interrupt count - you don't know which direction the wheel was spinning when each interrupt was generated, just how many times/how fast it's going.

Obviously you have to assume that the count is in one direction or the other, either in the ISR counter or in the control itself, but this assumption can be taken from a lot of places, such as the direction of the setpoint.

If you do this, without any precautions, then whenever the wheel happens to be spinning backwards faster than the current setpoint is telling it to go forward, the assumption that the wheel is going forward will cause an attempt at correction and end up sending a continuous full reverse signal. (until the setpoint changes to reverse and the direction assumption becomes right)

What are your ideas on the best way to retain full control at slow speeds and still detect/prevent false direction assumption?

I was thinking about a combination of different sources to detect a wrong direction assumption, such as setpoint direction and a sudden change in error and a high D term output and (hopefully not necessary) unchanging extreme total output.

Any ideas or links would be very appreciated, I think this is a very interesting problem and I'm curious about different ways and the best way for us to fix it.

I'm sure other teams have had to get around this somehow, with the gear tooth sensors this year not telling direction.
__________________
SEMPER UBI SUB UBI