A simple method to tune PID gains
Hello!
I'm trying to control the UR10 model via sockets with python. I'm just sending trough the topic "/gazebo/default/UR10/joint_cmd" some position.target messages to the PID controller that is included in Gazebo. It works but it would work much better with a well-tuned PID controller. Someone knows a simple method to tune a PID controller in gazebo?
Thanks in advance!
Asked by Formigola on 2015-03-30 17:51:06 UTC
Answers
Tuning a PID controller in gazebo is not different from tuning any other PID controller... and that is not easy. there are some rule of thumbs Ziegler Nichols method and look under How do the PID parameters affect system dynamics? but the last time I did it i used trial and error. If you where to go all in you could make a neural network to uptimise the gains... I plan on using this approach on a robot i am building.
Short answer: There is no simple way of tuning a PID controller.
Asked by Tytteboevsen on 2015-05-20 13:31:49 UTC
Comments
Perhaps begin by trial-and-error tuning with only P-control (set I and D to zero). Note that this alone will probably be inadequate, due to steady-state error: because, if the error is zeroed out, then the P-control effect (proportional to error) will be zero and the system will deviate again to settle at some equilibrium offset away from the command reference. Of course, if your system oscillates, you probably want to reduce the P-gain.
A little I-control can then be judiciously added to gradually move the system away from this equilibrium, toward zero error. (I-control has traditionally been known as "automatic reset" in some circles, since it effectively "resets" the original set point to counteract the steady-state error.)
Add some D-control (effectively, viscous braking) to stabilize the system.
Of course, these three effects interact. So, rinse and repeat as needed. You'll probably have to back off your original P-control once you've added I and D.
It's up to you if a little damped oscillation is an acceptable trade-off for fast response.
Asked by klaatu on 2016-07-08 15:06:32 UTC
Comments