Thread: PID Control
View Single Post
  #11   Spotlight this post!  
Unread 08-04-2007, 17:51
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: PID Control

More suggestions for reducing integral wind-up (or my $.02):
  • Only add to it when the motor can actually driver (ie, !disabled_mode)
  • At the end of the loop (before you save the I value), multiply it be a fraction, eg:
    Code:
    static_I = (long)I * 8L / 10
    This means that big values last longer than little ones, but it also decreases the possibility of big values building up. Tweak the 0.8 value.