Close

How to properly tune a PID

A project log for LibreServo

LibreServo is a project with the goal of easily converting any standard size servo into the smartest servo possible.

luisLuis 01/20/2023 at 10:180 Comments

This article comes to summarize the fantastic video that Peter Harrison made a few days ago on YouTube about the simplest and most effective way to tune a PID in a few minutes instead of days. I followed that video to tune the LibreServo PID and the results were amazing.

There are hundreds of guides on the Internet on how to adjust a PID and they can all be summarized in the following simple steps:

They seem like three simple and quick steps, but the reality is that in the end it becomes a sort of trying to guess the constants and after hundreds of tests and hours, if you are lucky, you get a relatively stable PID. It is a rather cumbersome task that rarely achieves a completely satisfactory result.

Let's forget about all that and try to obtain KP and KD mathematically. KI in a dynamic system is not necessary on most occasions and introduces more disadvantages than advantages, so we will forget about it for now. From now on, although I talk about a PID, I am really referring to a PD.

Discussions