Thread: PID Issue
View Single Post
  #3   Spotlight this post!  
Unread 29-01-2015, 08:02
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: PID Issue

Quote:
Originally Posted by rclothier View Post
When the gain gets above 0.007, the wheels ramp up directly to full speed (+/- 1); the encoder velocity (process variable) goes to about 250 in/s. Its basically all or nothing.
This makes me think you may have a sign issue in the math. Do not set it on the floor until you check for this or else you might damage something or someone.

Run the test you described above again and compare your axis value and your rate value. Do they have the same sign (i.e. are both positive or both negative?). If they have different signs, your controller will become unstable (i.e. the speed will quickly ramp up to full speed). In this case, you will need to negate the encoder rates, then try again. The controller should become well behaved after that.

One other thing: are you scaling the axis values from -1 to 1 to a value in in/sec?
__________________
-
An ounce of perception is worth a pound of obscure.
Reply With Quote