Tuning the Parameters

The best way to find the needed PID parameters is from a mathematical model of the system, parameters can then be calculated to get the desired response. Often a detailed mathematical description of the system is unavailable, experimental tuning of the PID parameters has to be performed. Finding the terms for the PID controller can be a challenging task. Good knowledge about the systems properties and the way the different terms work is essential. The optimum behavior on a process change or setpoint change depends on the application at hand. Some processes must not allow overshoot of the process variable from the setpoint. Other processes must minimize the energy consumption in reaching the setpoint. Generally, stability is the strongest requirement. The process must not oscillate for any combinations or setpoints. Furthermore, the stabilizing effect must appear within certain time limits.

Several methods for tuning the PID loop exist. The choice of method will depend largely on whether the process can be taken off-line for tuning or not. Ziegler-Nichols method is a well-known online tuning strategy. The first step in this method is setting the I and D gains to zero, increasing the P gain until a sustained and stable oscillation (as close as possible) is obtained on the output. Then the critical gain Kc and the oscillation period Pc is recorded and the P, I, and D values adjusted accordingly using the table below.

Table 1. Ziegler-Nichols Parameters
Controller Kp Ti Td
P 0.5 * Kc
PD 0.65 * Kc 0.12 * Pc
PI 0.45 * Kc 0.85 * Pc
PID 0.65 * Kc 0.5 * Pc 0.12 * Pc

Further tuning of the parameters is often necessary to optimize the performance of the PID controller.

The reader should note that there are systems where the PID controller will not work very well, or will only work on a small area around a given system state. Non-linear systems can be such, but generally problems often arise with PID control when systems are unstable and the effect of the input depends on the system state.