I have simulated a PID controller with an input parameter that affects the output, and set Kp=0.2, Kp=0.5, Kd=0 which seemed to work best the values I expect in reality. However one thing I could not figure out is the intuition of how the controller starts when the error is 0. I, for example, my target is 2, the output is 2, and the input variable is, say, 4 - the controller would setthe next input to be 0 - although 4 is a perfect value.

Is there some way that is theoretically sound to make the first steps of the algorithm take into account some "initial guess" and not go way off at the beginning of the process?

有帮助吗?

解决方案

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

In practice, you may simply want to use the PID controller a few times and see what value the integral typically takes, and use that as the starting value.

If you have some additional information, such as knowing that the correct output is y for an input of x, then 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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top