View Single Post
  #7   Spotlight this post!  
Unread 26-02-2005, 17:38
jzampier's Avatar
jzampier jzampier is offline
Finger Lakes Regional Staff
AKA: Jeffrey Zampieron
no team (-)
Team Role: Engineer
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Rochester
Posts: 74
jzampier is on a distinguished road
Send a message via AIM to jzampier
Re: PI Like Control with Pots

for an arm I'd avoid PID control. Usually you can get away with just P control and
you will avoid oscillatory problems that like to creep up with PI control.

The way P control works is very simple.
Take the actual postition of the arm (call it y) (from the pot) and subtract it from
the desired position of the arm. (call it r) (from your joystick/whatever).
This is your error signal value. e = r - y

Assuming your pots are calibrated so zero on the arm is in the appropriate location...
(if not add/subtract a fudge factor to y or r as needed)...

Multiple that error value by a constant... (called P
probably between 1 and 2) which is
determined experimentally...
and output that value + 127 to the motor.

output = 127 + ( P * e )

note that depending on directions of movement, e may be negative
and as such P may need to be negative if you are going the wrong direction.

Should work like a charm.
Matt Leese and I had a P controller working with 340's arm last sunday.
(Although I wanted a PD cause i thought it would be faster and more damped)

Man was it cool to push on the arm and watch it go back to where it was before.
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour.
Sit with a pretty girl for an hour,
and it seems like a minute. THAT'S relativity." -Einstein

----
First Resume: (If I can remember)
2001 NJ Regional
2001 Championship
2002 NYC Regional
2003 OH Regional
2003 Championship
2004 OH Regional
2005 Finger Lakes Regional
2006 Finger Lakes Regional (yes!)

Last edited by jzampier : 26-02-2005 at 17:43.