PID controller - intuition when error = 0

I simulated a PID controller with an input parameter that affects the output, and set Kp = 0.2, Kp = 0.5, Kd = 0, which seem to best fit the values ​​that I actually expect. However, one thing that I could not understand was the intuition of how the controller starts when the error is 0. I, for example, my goal is 2, the output is 2, and the input variable, say 4, the controller will set the next input equal to 0 - although 4 is the ideal value.

Is there any way that theoretically sounds so that the first steps of the algorithm take into account some “initial guess” and do not go away at the beginning of the process?

+4
source share
1 answer

The only state in the PID controller is the current value of the integral, and it can be useful to set this value to a nonzero value if you have additional information about a likely steady state error.

In practice, you can simply simply use the PID controller several times and see what value the integral usually takes, and use this as the initial value.

If you have additional information, for example, knowing that the correct output is y for input x, you can invert the formula to find the correct integral as follows:

output = input * Kp + Integral * Ki
 => y = x * Kp + Integral * Ki
 => Integral = ( y - x * Kp) / Ki
+4
source

Source: https://habr.com/ru/post/1525098/


All Articles