Thread: PID Loops
View Single Post
  #13   Spotlight this post!  
Unread 13-03-2011, 17:59
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
"m" and "b" are constants which you need to calculate and set so that the operating range of the process variable corresponds to the desired operating range of the joystick, be it -1 to +1 or 0 to +1 or whatever.




Read this post, then ask if it's not clear.

Am I correct about this:

JoyStickYaxis is +1 (operator input)
currentPotValue is 550 (min is 300 and max is 600)

(m*(currentPotValue+b)) = ( (1/150)*(550-450) )
m is 1/150 and b is -450 so that the number is always between -1 and 1
error = 1 - 0.6666;
MotorOutput = k * 0.3333 and say k is 0.75 then the output becomes 0.25
of course, k needs to be adjusted so the error is as close to 0 as possible and/or the arm doesn't oscillate
Good so far? Or did I make a mistake somewhere?

EDIT: I have a feeling I did something wrong
__________________
Champs Schedule Highlighter App [CD Thread]

#### XYZ Regional Finalists

Last edited by PriyankP : 13-03-2011 at 18:01.