# Confusion in PID loop for the case of zero error? I am already studying PID control and some how to some extent I have understood it except one main confusion. When the difference between reference input $$\r(t)\$$ and current output value $$\y(t)\$$ is zero, $$\e(t)\$$ will be zero and hence $$\u(t)\$$ will also be zero, so how will then the plant act or work when its input $$\u(t)\$$ is zero?

• No error, so no need to correct or adjust control. – StainlessSteelRat Oct 15 '19 at 15:30
• @StainlessSteelRat - not true, the output needs to be maintained. For example a heater still needs to be driven when the target temperature is reached. – Kevin White Oct 15 '19 at 21:15
• The output of an integrator is not necessarily zero even if the input is zero. – Kevin White Oct 15 '19 at 21:16
• @KevinWhite Yes. The output setting (whatever it is) stays as it is because it is at the set point, or no error, so no need to correct or adjust control. – StainlessSteelRat Oct 15 '19 at 21:44
• The whole point of the integrator is that it provides a constant output when its input is zero. That constant output need not (and usually is not) equal to zero. An integrator in the forward path, whether it's in the plant or the controller, ensures that the steady state error will be zero in response to a step input. – Chu Oct 15 '19 at 21:55

No, e(t) being zero does not imply that u(t) is also zero. It only implies that the output of the "P" process is zero.

Remember, the "I" and "D" processes have memory — they depend on the past behavior of e(t). u(t) is zero only if the sum of all three processes is zero.

• As far as "I" process concerned,it can have memory since it integrates past values but how "D" process can have memory of past when it is used for future?? – engr Oct 15 '19 at 16:48
• @engr: The D term is used to "predict the future" in a sense, but it is calculated entirely on past values -- in particular, the difference between the present value and previous value(s). – Dave Tweed Oct 15 '19 at 17:18
• @engr The D term is simply the velocity with a gain on it. It should be clear (I hope) that you can be in some position with zero velocity, or you can cross zero position with a large velocity. – Graham Oct 16 '19 at 13:23
• @engr BTW, the classical PID description of the D term "predicting the future" (as Dave says), whilst true, doesn't always help. A better description IMO is that the D term is friction. We all understand friction, right? Like physical friction, the faster the system moves, the more the D term pushes back to try to slow you down. – Graham Oct 16 '19 at 13:24
• @Graham: I think "Damping" is an even better term (which coincidentally starts with "d"). The term "friction" is often used to describe resistance which is independent of velocity, but "damping" implies velocity-sensitive resistance. – supercat Oct 16 '19 at 15:58

There can be a couple of scenarios.

Consider a system $$\\frac{1}{s (s+1)}\$$. A PI controller is $$\\frac{0.9 s+0.27}{s}\$$. In steady state after the controller has made $$\y=r\$$, the error $$\e\$$ and its integral are both zero. In this case when $$\e=0\$$ then $$\u=0\$$. If there is a nonzero input going to this system, the output will keep on increasing.

For a system such as$$\\frac{1}{s+1}\$$ and PI controller $$\\frac{1. s+2.0006}{s}\$$, the error goes to zero in steady state, but the integral of the error does not. This gets multiplied by 2.0006 and is the control input that maintains the output at the reference value.

The computations below are done in Mathematica. The plots below show the error signals. Both go to zero. However the integral of the one on the left is also zero. The integral of the one on the right is not zero but around 0.5 Take a motor control PID for example. The motor (once running) will have small load perturbations that will cause it to overshoot or undershoot the zero error case, so then the system will react and cause the motor to slightly overshoot in the opposite direction.

If you were to zoom in on a graph of the error, it would be little zig zags across the zero error line. Assuming that it's been tuned properly.

Also u(t) doesn't go to zero when the error is near zero. u(t) goes to the value that makes the error near zero.