Society of Robots - Robot Forum

Software => Software => Topic started by: Robot Attack on July 06, 2011, 01:25:21 PM

Title: Servo control algorithm
Post by: Robot Attack on July 06, 2011, 01:25:21 PM
Does anyone know what control algorithm is used by standard hobby servos?

They seem to work extremely well. Is it just standard PID control or something else?

Thanks
Title: Re: Servo control algorithm
Post by: waltr on July 06, 2011, 01:52:18 PM
A hobby servo could be using a few different internal control methods. The older and less expensive servos use analog circuits. The newer 'digital' servos use a u-controller. Both have feed-back loops that probably use PID or just PD.

Links about the servo circuit:
http://www.seattlerobotics.org/encoder/200009/S3003C.html (http://www.seattlerobotics.org/encoder/200009/S3003C.html)
http://www.seattlerobotics.org/encoder/200009/Servos.html (http://www.seattlerobotics.org/encoder/200009/Servos.html)
Title: Re: Servo control algorithm
Post by: rbtying on July 06, 2011, 02:03:51 PM
I think hobby servos use a well tuned proportial control loop - there's not much need for integral or derivative terms.  Of course, I could be wrong - but purely proportional is also the easiest one to implement without a microcontroller, and many analog servos don't seem to have one.
Title: Re: Servo control algorithm
Post by: Robot Attack on July 06, 2011, 03:04:24 PM
Thanks very much for the info. Those links were very helpful.

Looking at the first link, you can change resistors and capacitors to change the gains of the controller. I assume you could then back out the original gains of the controller just by examining the original resistance / capacitance of those components. Is that right?

Thanks
Title: Re: Servo control algorithm
Post by: waltr on July 06, 2011, 03:20:53 PM
The R would only give you the gain the the control amp, not the entire control loop as the motor/gears are part of the loop.

The block diagram doesn't show all the details so it would be difficult to model the entire control response.

A search of the ICs shown will find you the data sheets and maybe some app notes. These will have more info on how the ICs work.