View Single Post
  #8   Spotlight this post!  
Unread 31-01-2008, 17:20
wireties's Avatar
wireties wireties is offline
Principal Engineer
AKA: Keith Buchanan
FRC #1296 (Full Metal Jackets)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Rockwall, TX
Posts: 1,170
wireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond reputewireties has a reputation beyond repute
Send a message via AIM to wireties
Re: PID for velocity control

We measure the period between the pulses from our quadrature encoders (setting up timer 2 as a rolling counter). Then you get more bandwidth on the feedback than you can possibly use. Of course you have to put together a nifty way to do 1/x using integer math to derive the velocity.

The I term is supposed to help the wheel match the target velocity over long periods of time. Its probably not necessary for this application, P and D are more critical. If you do use the I term, it is common to have an I limit so you don't accumulate error (as described in last post). And the I term is typically quite small compared to P and D.

HTH

Last edited by wireties : 31-01-2008 at 17:24.