View Single Post
  #4   Spotlight this post!  
Unread 01-20-2010, 01:33 PM
Mr. Lim Mr. Lim is offline
Registered User
AKA: Mr. Lim
no team
Team Role: Leadership
 
Join Date: Jan 2004
Rookie Year: 1998
Location: Toronto, Ontario
Posts: 1,125
Mr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond reputeMr. Lim has a reputation beyond repute
Re: Velocity-based PID with the WPILib PIDController Class

Quote:
Originally Posted by Mike Copioli View Post
Without seeing your code I can only speculate based on my experience with PID. It sounds to me like you have a math issue and or a coding issue. If the system becomes unstable(oscillates) when you increase p gain, it usually means that the system is approaching the desired target and then overshooting. In your case the target is velocity. My advice is to not add any other gains until you have confirmed that your target velocity and current velocity are correct. The fact that when you increase P gain your system overshoots tells me that this is the case.
Mike,

I've noticed a few things today:

1) At low speeds, the P response works "fine" - but once our speed goes higher than around 25% of our max, our P term is no longer enought to get us to our SetPoint.

2) As I up our P, the low speeds oscillate, but the higher speeds seem to behave okay

Bongle,

We're going to try and re-tune our PID today. Instead of tuning the P term first, we'll try and see if we can get an I-only loop somewhat working first.

I'm used to tuning the P response first for positional PID loops, but there's definitely a very significant I term when it comes to velocity-based. You have to constantly supply power just to maintain a particular speed.

Hopefully tuning for I first will get us closer.

Thanks for the advice!
__________________
In life, what you give, you keep. What you fail to give, you lose forever...
Reply With Quote