How to Use PD2I Tuning

Use PD2I tuning to get the best performance out of your Alicat flow or pressure controller

You can adjust the PID settings of your Alicat mass flow controller or pressure controller to change how it responds to the setpoints you command. Before you get started, learn what PID tuning is and how each variable (P, D and I) affects the performance of your controller.

Please choose one of the tuning methods below.

How to tune your Alicat controller using serial commands and Flow Vision SC

  1. Ensure that your controller is connected serially.
    1. These instructions assume a Unit ID of A. If your controller’s Unit ID is not A, substitute the correct letter of your Unit ID. If your controller is in streaming mode, do not type the leading ‘a’ in the instructions below.
    2. In this tutorial, we will be using the [Unit ID]S# command to give the controller setpoints. In addition, we will assume a 2 SLPM full scale mass flow controller (MC-2SLPM-D). Therefore, our command for a full scale setpoint will be AS2. Likewise, the commands for 1 SLPM or 0.4 SLPM would be AS1 and AS0.4, respectively. Replace the setpoint value with what your setup requires.
    3. In this tutorial, <CR> will be used to prompt you to send a serial command. (You may also be more familiar seeing this as: <ENTER> or <enter>, meaning the same thing).
  2. Set PID loop type to PD2I.
    1. There are multiple ways to perform this action. The simplest is from the front panel of your Alicat device.
      1. From the front panel of your device, go to: MENU > CONTROL > ADV CONTROL > LOOP SETUP > LOOP TYPE. This is the menu map for Alicat’s latest firmware. If you find your menu is different, please consult your manual or one of our application engineers.
      2. Select PD2I Control and press SET.
    2. To perform this serially, first read the value of register 85: type AR85<CR>.
      1. If the value of register 85 is 0, 16384 or 32768, your controller’s PID loop type is set to PD/PDF. Add 2 to this value, and then type AW85=[new value]<CR>.
      2. If the value of register 85 is 2, 16386 or 32770, your controller’s PID loop type is already set to PD2I.
  3. Set all PID variables to P=200, D=10, I=100.
    1. Record your controller’s existing PID settings.
      1. Read the current P value: type ar21<CR>.
      2. Read the current D value: type ar22<CR>.
      3. Read the current I value: type ar23<CR>.
    2. Set the P variable in register 21 to 200: type aw21=200<CR>.
    3. Set the D variable in register 22 to 10: type aw22=10<CR>.
    4. Set the I variable in register 23 to 100: type aw23=100<CR>.
  4. Determine the best P value.
    1. Ensure that your controller is connected to a gas source of the appropriate pressure and flow capacity. Start with a 0 setpoint: type AS0<CR>.
    2. Command a 25%, 75%, and 100% setpoint (AS0.5, AS1.5<CR>, AS2<CR>), and observe the flow readings.
    3. If you observe any oscillations, increase P by 100: type AW21=[old value+100]<CR>. Start again at step a. If you find that increasing P increases the oscillations, skip this step and move on to step d.
    4. If there is un-damped oscillation, subtract 10 from the P variable in register 21: type AW21=[old value-10]<CR>. Repeat this step until the flow rate approaches the setpoint with no overshoot or oscillations. Do not worry about the speed of convergence.  At this point, the tuning might look like this.
  5. Determine the best I value.
    1. Ensure that your controller is still connected as in step 4 and start from a 0 setpoint: type AS0<CR>.
    2. Command a 25%, 75%, and 100% setpoint (AS0.5<CR>, AS1.5<CR>, AS2<CR>), and observe the flow readings.
    3. To increase the speed of convergence, add 50 to the I variable in register 23: type AW23=[old value+50]<CR>. Start again at step a.
    4. If, after increasing I, you observe overshooting and oscillations, return I to the previous value.
    5. If the flow reading matches your setpoint, and converges at a speed you as happy with, continue to the next step.
  6. Determine the best D value.
    1. For nearly every tuning scenario, the optimal D value is 10 and does not require any change. If your current tuning is sufficient, move on to step 7.
    2. Ensure that your controller is still connected as in step 4 and start from a 0 setpoint: type AS0<CR>.
    3. Command a 25%, 75%, and 100% setpoint (AS0.5<CR><CR>, AS1.5<CR>, AS2<CR>), and observe the flow readings.
    4. If you observe oscillation around the setpoint, add 10 to the D variable in register 22: type AW22=[old value+10]<CR>. Start again at step b. If flow readings are stable, continue to step 7. Do not exceed a value of 50 in the D register.  If it looks like you would need to, return to step 4, and start again.
  7. Validate the final tuning.
    1. To properly balance off speed of response and stability, it may be necessary to repeat steps 4, 5 and 6 above several times.
    2. If you cannot dampen out oscillations through tuning, there may be mechanical interference from other parts of your system.
    3. Your final tuning should look something like this.

This can be done through Flow Vision SC by entering the new values into the respective boxes on the instrument panel.

 

How to tune your Alicat controller from the front panel using an oscilloscope

  1. Set PID loop type to PD2I.
    1. From the front panel of your device, go to: MENU > CONTROL > ADV CONTROL > LOOP SETUP > LOOP TYPE. This is the menu map for Alicat’s latest firmware. If you find your menu is different, please consult your manual or one of our application engineers.
    2. Select PD/PDF Control and press SET.
  2. Set your PID variables to P=200, D=10, I=100.
    1. Go to: MENU > CONTROL > ADV CONTROL > LOOP SETUP > LOOP GAINS. Before you make any changes to your P and D values, be sure to record your controller’s existing settings.
    2. Press P, change your P gain to 200, and press SET.
    3. In a similar fashion, change your D gain to 10, and your I gain to 100.
  3. Determine the best P value.
    1. Ensure that your controller is connected to a gas source of the appropriate pressure and flow capacity. Start with a 0 setpoint.
    2. Command a 25%, 75%, and 100% setpoint and observe the flow readings.
    3. If you observe any oscillations, increase P by 100. Start again at step a. If you find that increasing P increases the oscillations, skip this step and move on to step d.
    4. If there is un-damped oscillation, subtract 10 from the P. Repeat this step until the flow rate approaches the setpoint with no overshoot or oscillations. Do not worry about the speed of convergence.  At this point, the tuning might look like this.
  4. Determine the best I value.
    1. Ensure that your is still connected as in step 4 and start from a 0 setpoint.
    2. Command a 25%, 75%, and 100% setpoint, and observe the flow readings.
    3. To increase the speed of convergence, add 50 to the I variable. Start again at step a.
    4. If, after increasing I, you observe overshooting and oscillations, return I to the previous value.
    5. If the flow reading matches your setpoint, and converges at a speed you as happy with, continue to the next step.
  5. Determine the best D value.
    1. For nearly every tuning scenario, the optimal D value is 10 and does not require any change. If your current tuning is sufficient, move on to step 6.
    2. Ensure that your controller is still connected as in step 4 and start from a 0 setpoint.
    3. Command a 25%, 75%, and 100% setpoint, and observe the flow readings.
    4. If you observe oscillation around the setpoint, add 10 to the D variable. Start again at step b. If flow readings are stable, continue to step 6. Do not exceed a value of 50 in the D register.  If it looks like you would need to, return to step 3, and start again.
  6. Validate the final tuning.
    1. To properly balance off speed of response and stability, it may be necessary to repeat steps 3, 4 and 5 above several times.
    2. If you cannot dampen out oscillations through tuning, there may be mechanical interference from other parts of your system.
    3. Your final tuning should look something like this.

Learn more

WordPress Video Lightbox Plugin