Tuning the PID

To tune a PID system, there are two basic approaches; manual tuning and simulation. While simulation has a definite appeal, creating sufficiently accurate simulations is not a trivial task and well beyond the scope of this application note. Therefore, a manual tuning procedure is the only procedure that will be presented here.

There are several strategies for manual tuning of PID controllers. The following is a simple technique that usually produces reasonably stable results.

Note: Different fans, ducting and power supply voltages will affect PID tuning. To determine the production values for Kp, Ki and Kd, tune multiple systems (different fans, power supplies, ducting) to establish a range for each of the constants and then chose values that will remain within the specification over the range of systems.

To tune the project, three 10k potentiometers were added to the design and connected to RC2, RC3 and RC4. Originally, they drove the Kp, Ki and Kd constants of the PID. After tuning, it was discovered that the Kd constant is not needed and, therefore, has no effect on the stability of the system. At that point, RC2 was redefined at the target speed. The lack of effect from the Kd constant is likely due to the uni-directional drive of the PWM, which can increase the speed. However, slowing is due to inertia and the load on the fan, so the derivative term does not have a means of actively slowing the speed of the fan. Subsequent discussions with a co-worker with experience in fan design indicated that the manufacturers of digitally controlled fans do not use the derivative term either.