One way that engineers have made use of PID in nonlinear systems is through the technique of gain scheduling. The most common reason people experience performance issues with PID control is the fact that incorrect gain parameters are chosen for P, I and D. In the case of nonlinear systems, optimal parameters might change, depending on what “state” the system is in. For example, many systems exhibit different characteristics during warm-up stages, than after they’ve been running for some time. Another example is using different gain parameters once a certain set-point has been reached, because the system responds differently once in steady-state. Gain scheduling is the process of modifying the gain parameters of P, I and D depending on the state of the system. These states can be defined by some time duration, or even by using system inputs. This method works best for systems that have predictable changes in dynamics, so that predetermined gains can be calculated and applied. Gain scheduling gives someone the ability to control a process with nonlinearities by dividing it up into sections that approximate linear characteristics. Each section can then be tuned to a different set of parameters that optimally control the system. Using the PID toolkit in LabVIEW, this is very easy to implement.
Figure 1: PID Gain Scheduling in LabVIEW
Figure 1 demonstrates the use of the PID Gain Schedule.vi to set PID gain parameters for the PID.vi based on the current difference between setpoint and measurement. In this example, a temperature sensor is being measured, and then compared to a user defined setpoint value. The difference between the two values, also known as the error term, is calculated and then sent to the gain scheduler. The scheduler itself is simply an array of PID gains that are indexed based on an input. As the temperature gets closer to the setpoint value, a different set of gain parameters can be used to achieve a better control response. There are many different ways to implement gain scheduling, and this particular way is good for reducing steady-state error by increasing the integral gain, or the I term, once your input has stabilized close to the setpoint.