i would use a PID controller for such things.
http://forums.tigsource.com/index.php?topic=10130.0
(only using the P or PI parts could be enough too. :))