Whether you are giving your new Alicat mass flow controller a setpoint for the first time or putting a trusted Alicat pressure controller into a new system, your device sometimes may need a few adjustments to achieve the highest degree of control stability. This is done through PID tuning, which adjusts a set of values that control how fast a controller will get to the setpoint and how stable it will be at that setpoint. Alicat sends out controllers with a standard set of PID values that will work for most applications, if no user specific parameters are provided at the time of order. However, as all applications are unique, these PID terms can require some adjustments. The values assigned to each parameter can seem arbitrary and therefore make PID tuning frustrating and seem like random guessing. In this post, we will demystify some of the principles behind PID tuning and offer some tips for tuning in the field.
Proportional, Integral, Derivative
Let’s start with some formal definitions. PID stands for Proportional, Integral, Derivative, the three components of the control algorithm.
Proportional. One of the principle inputs to the valve drive is the proportional error. The proportional error is the difference between the process reading and the set point. This difference is multiplied by the P gain and is added to the summation register. From this, you can see that if there is a large difference between the present reading and the setpoint, the controller will move its valve quickly to try to reach the setpoint. We can think of this as the gas pedal in a car.
Derivative. From calculus, we know that the derivative is the change in x over the change in time (t). In this case, x is our flow rate. The PID loop takes this dx/dt, multiplies it by the D gain and subtracts it from the summation register to create a damping term. In this way, we can think of D as the brake pedal in the car. Here is a link to a video explaining the car analogy of P and D further.
Integral. An integral, in calculus, is the area under a defined curve between two points, usually a start and stop time. In more practical terms, it is the sum of previous readings from time zero, or the sum of errors. While the P and D terms only take into account the present measurement and the one immediately preceding it, the I term uses many previous readings to correct the process value to setpoint. In most Alicat devices, the I term is given a zero value, reducing the tuning to just the P and D terms. In this case the results of the P and D values are incorporated into a summation register, as noted above, which is updated a thousand times a second and eliminates the need for user input to an I term. The summation register is scaled to provide the valve drive command.
PD2I. Our dual valve controllers, the MCD and PCD series, do still use the I term, but they use it differently than in a traditional PID algorithm. We use a special PD2I algorithm created by Alicat that incorporates a predictive function into the algorithm. This is why standard methods of PID tuning will not work for these devices. The PD2I algorithm is more complex, and single-valve controllers typically don’t benefit from it. If you are having trouble with tuning a MCD or PCD device, please give us a call and we can help out!
Achieving Responsive and Stable Valve Control
These definitions are pretty useless if we can’t figure out how to apply them to an application. The most common problem users experience is oscillations about the setpoint. What’s happening is that the P and D terms are overcorrecting. The typical fix is to leave the D term alone and decrease the P term. If the two terms are well balanced, the process variable will converge to setpoint quickly. On the other hand, you can also decrease P too far and send the system back into oscillations, where P and D are again out of balance. The oscilloscope plots in this post show what a properly tuned valve looks like in its response curves.
So, why do controllers sometimes work perfectly well in one set up but not another? For that, we have to look at the application. The trouble spots for tuning often occur when there is a high inlet pressure. This tends to be difficult because they use only a small portion of the valve’s range of motion. With high inlet pressure the valve only has to open slightly to achieve the unit’s full scale flow rate, so there is a limited amount of space to make adjustments. If you can decrease the inlet pressure of the system, the valve has to open more, leaving more room for fine adjustments. Switching gases can also affect the tuning on the device. Argon and Helium, for example, have very different characteristics and may require some P gain adjustments to achieve optimal control.
If you know your operating conditions before ordering, tell us! We can spec out the right size valve and factory set the tuning parameters to fit your set-up before the unit gets to you. This is also why we ask for the inlet and outlet pressures, and the process volume, on all dual-valve PCD and MCD orders. We can replicate these conditions in our calibration lab and send your unit out, ready for use right out of the box
Please contact an Alicat applications engineer (firstname.lastname@example.org or 888-290-6060) to talk about your valve tuning needs. We’ll be happy to help you get the most out of your instrument!