Thread: PID Loops
View Single Post
  #25   Spotlight this post!  
Unread 13-03-2011, 16:14
PriyankP's Avatar
PriyankP PriyankP is offline
Registered User
FRC #0188 (Woburn Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Toronto, Canada
Posts: 87
PriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud of
Re: PID Loops

Quote:
Originally Posted by Ether View Post
Yaxis is your setpoint and (m*currentPotValue+b) is your process variable.

Adjust the gain "m" and the offset "b" so that your process variable corresponds to your Yaxis output.

Then,

error = setpoint - process_variable;

motor_voltage_command = Kp*error;

Kp is your proportional gain which you tune for the desired response.

So (m*(currentPotValue+b)) should have range of -1 to 1? or it doesn't matter because Kp takes care of that?
__________________
Champs Schedule Highlighter App [CD Thread]

#### XYZ Regional Finalists