It's always advisable to set derivative to zero unless proven to be needed.
I don't like this kind of grossly incorrect generalizations. When PID controller is used as a generic control component without conversion (e.g. integrating, taking derivatives) of inputs and outputs, what terms are needed depend on what is being measured and what is being controlled. So the roles, mental expectations of what P or I or D do are not actually fixed!
Thanks for the detailed comments. I was also thinking yesterday that driving a motor speed to achieve a position is indeed an integrating process, since the speed of the motor is integrated to give the position of the output shaft. Controlling an integrating process with a PID controller is challenging and does require a different approach to tuning. I totally agree with you there.
Fortunately, not many processes are pure integrators like that. Liquid level in a tank is another one, where the tank level is the integrated value of the flows in and out.
That said, you do often need some integral action even on an integrating system, since the accumulated integral action produces an offset or bias on the controller output. Without integral action you need to manually set the bias on the controller output. For example, if your normalized PID output runs from 0 - 100% and you are controlling motor speed on a positioner, then you might bias it so that 50% output corresponds to zero speed, 0% corresponds to max reverse, and 100% corresponds to max forward. Or you would express the PID algorithm in absolute engineering units, where the error is expressed in millimeters of deviation and the controller output is expressed in revolutions per minute (or something). But doing this causes every control loop to have different scaling and it becomes harder to apply rules of thumb to the magnitude of the tuning constants. Consequently PID loops often normalize their inputs and outputs in a range from 0 to 1 (0% to 100%) to fit the range of the associated A to D and D to A converters.
Coming back to the opening point about generalizations. I have been tuning process control loops in the chemical process space (flows, levels, pressures, temperatures, etc.) for about 40 years, and I would say in over 90% of cases the D term has been set to zero. If a generalization is something that is true most of the time, then in the process engineering space my comment fits. Where you can take me to task is that there are many other domains where PID control is used, in mechanical and electrical systems, for example. And in those domains, derivative action may be much more relevant.
So, you got me. Point taken.
Hi,
There is a good rationale for using the D part. It's almost like you are giving the system an advanced look into the future so it knows where it is heading even before it gets there.
I am sure you know that a 'slope' is an increase or decrease in some quantity that keeps changing over time. That's almost always (maybe always) used in conjunction with a coefficient. For a simplified example:
y=m*t+b
Here the 'm' is the slope. Having the slope involved with the value of 'y' it gives us a sort of glimpse into the future about where 'y' will be after the next increment of time 't'. That gives the rest of the system a little more knowledge about how the control will work. 'm' is not usually a constant though because it changes over time. Once the system starts to stabilize, 'm' becomes a lower value, and thus has less and less influence on the system final value.
I think a really good example, although a little too complicated to discuss here maybe (or maybe not), is a buck circuit where we measure the current in the inductor. That's like measuring the derivative. If we use that information, we can control the output even faster than just measuring the output voltage, which of course is mandatory with a regular buck circuit.
The advantage is in a system that would otherwise have objectionable overshoot if we tried to control it faster (a very typical control theory problem). Since the system has a sort of advanced knowledge of what will happen next, it can almost 'foresee' the overshoot before it happens because the derivative is a high value at that point, and if it was already a low value it would 'know' that the overshoot will not be that bad so less dv/dt compensation would be required. That allows it to use that to help to prevent the overshoot from happening or at least not as bad as it would have been.
Not all systems are going to need this because a lot of them can be controlled without objectionable overshoot, such as in overdamped systems. There's no problem there so the D part probably would not do anything or would actually cause more overshoot.
That's more or less theory of the control of systems which allows us mostly to understand the workings of systems, but a more practical way to adjust the coefficients uses fuzzy logic. There's a good article on it on the web somewhere but I'd have to find it again. A search should turn something good up though. Probably something like, "Using fuzzy logic to adjust a PID control system".