Topic: P073

PID Tuning

Purpose

PID Tuning is used to Monitor and Tune PID Loops within a process.  The PID Tuning window charts the Loop Variables and allows for Manual or Auto Tune of each Loop.

Note: At least one PID Loop must be configured and the project transferred to the CPU before PID Tuning can be accessed. The tuning graphic shown in this topic is displayed only when connected to the CPU, the offline display will differ slightly.

Accessing PID Tuning

PID Tuning can be accessed by selecting PID Tuning from the Tools Menu of the Main Menu or by selecting PID Tuning from the Monitor & Debug topics of the Application Tools panel.

Right clicking on any PID instruction and selecting PID Tuning from the drop down list will add the selected loop to the PID Tuning window.

Once the PID Tuning window opens, the PID loop selected with the right click menu above should appear; otherwise, select the desired PID loop from the drop down list. Then click the New PID Tune Tab to begin monitoring.

When more than one loop is selected, the PID Tuning window will monitor each loop without losing data when moving between tabs. As a result, a maximum of 5 tabs can be viewed at any one time.

Note: Duplicate PID loop names are not allowed in versions 1.6 or higher of the Productivity Suite Software. The following error window will appear if a duplicate name is attempted.

Major Loop Selected

  1. PID1/PID2 Tabs: The Tabs across the top represent the PID Loop instructions within the ladder code.
  2. Major Loop / Minor Loop: Selectable viewing option when using Cascaded Loops.
  3. SP / PV: SP represents Set Point value and PV represents Process Variablevalue.  Check boxes to show or hide the pens on the graph for the respective Value.
  4. Properties: Click to open the Chart Properties window discussed later in this topic.
  5. OUT / Bias:  OUT represents Output Value and Bias is the percentage Value that is added to the Output to stabilize the process control.  Check boxes to show or hide the pens on the graph for the respective Value.

Online View PID Settings

  1. Online View PID Settings: This section provides editable fields to enter a new value, fields that display the current values, and checkboxes to select if a value entered in the editable fields are to be applied when the Apply Selected Settings button is clicked.

Note: When entering Values in any of the Online View PID Settings fields, the Value must correspond to the Data Type of the Tag used in the field. For example, if the Tag for the field is an Integer, an Integer must also be used for the edit Value. If the wrong Value Type is used, an Invalid Value window like the one shown below will display.


  1. Apply Selected Settings: Writes any and all edits that have the Write Edits checkbox selected.
  1. Clear Charts: Click to Clear all the historic data from the Line Graphs.

Auto Tune Settings

  1. Closed Loop Limit Cycle: Describes the Ziegler-Nichol Closed Loop Tuning method used for this Auto Tuning procedure.

Note: Auto Tuning a PID Loop while connected to your process can cause unexpected results. The Ziegler-Nichol Closed Loop Tuning method is used to drive the control output fully ON to drive the Process Variable (PV) above the configured Set Point (SP) then drive the control output fully OFF until the PV drops below the SP. It repeats this method for three complete cycles to accurately calculate the new P-I-D values for your process. Auto Tune will not drive the Output past the limits set by Output Upper Limit and Output Lower Limit.

  1. PV Deadband: This applies a Deadband (buffer zone) around the value of the Process Variable at the time you initiate the Auto Tune cycle. This value should be larger than the typical noise on the PV input. This is used to help avoid the Auto tune from reacting to the PV noise and miscalculating or moving into the next cycle prematurely.
  1. Initial PV Bump: When you begin the Auto Tuning procedure, the Output will turn ON and remain ON until the Initial PV Bump value is met. At that time it will change direction and begin the three cycle Auto Tune profile.

Note: The Initial PV Bump must generate a value larger than PV Deadband. If the Set Point and Process Variable are close to Zero or to the range limits at the time the Auto Tuning begins, you may experience erratic behavior or a failed Auto Tune.

  1. Auto Tune: Put the PID instruction in Manual Mode and click Start to Start the Auto Tuning Algorithm. Click Stop to Stop the Auto Tuning Algorithm.
  1. PI / PID Radio Button: Tuning methods:
    • PI: (default) Returns Proportional and Integral terms only.
    • PID: Returns Proportional, Integral and Derivative terms.
  1. Status Messages: Once Auto Tune is initiated, any status messages will be displayed here. The following is a list of possible messages displayed:
    • Running: The CPU is performing the PID auto-tune. New P, I and D values have not been calculated at this point.
    • Rejected: The CPU rejected the request to begin auto-tune. This occurs if the PID loop was not enabled and in manual mode, or the CPU was not in Run. The PID loop retains old P, I and D values.
    • Aborted: The user clicked the Stop button before auto-tune completed. The PID loop retains old P, I and D values.
    • Completed: The CPU completed the PID tuning successfully. The PID loop begins using the new calculated values.

Chart Properties

This section discusses, in general, the configuration options available when creating chart pen graphs. For more information, see the Chart Properties topic. When selected, the Chart Properties window, shown below, will open.  

Title Tab

The Chart Properties window opens with the Title Tab selected by default and provides the following settings:

  1. General: Click on the Show Title checkbox to activate the fields. With the checkbox selected, click on the Text field to edit the Chart Title or click on the respective Select button to edit the Font and Color.

Plot Tab

Allows configuration of the Chart Axis and appearance.


Domain Axis Tab: The X-Axis of the chart.  Displays Elapsed Time in 30-second grids.

  1. General: Enter Label Text and click on the respective select button to edit the Font and Color.
  2. Ticks: Show or hide Ticks and their Labels as well as customize with selectable fonts for the Domain Axis.

Range Axis Tab: The Y-Axis of the chart.  Displays the Min/Max range of the Process Variable as configured in the PID Loop.

  1. General: Enter Label Text and click on the respective select button to edit the Fontand Color.
  2. Ticks:  Show or hide Tick Labels and/or Tick Marks as well as customize with selectable fonts for the Range Axis.
  3. Range Tab: Click to open the Range Tab settings to display the Range settings as shown below. From this window leave the Auto-adjust Range checkbox checked to allow Automatic Range Value Adjustments or uncheck the checkbox to manually enter the Minimum and Maximum Range Values.


The Appearance Tab provides options for customizing the graphs boarder thickness and color, background color and vertical or horizontal orientation of the graph. Click on the Select button or the Down arrow to edit the respective option.

Other Tab

The Other Tab provides a Draw Anti-aliased checkbox to minimize distortion of the drawn lines, which is checked by default.  The Select button allows selection of a Background Color for the exterior of the graph.

Note: Under the Other tab, the only feature available is the background paint. All others are not supported by the Productivity Suite software.

Minor Loop Selected

PID Tuning is used to Monitor and Tune PID Loops within a process.  The PID Tuning window shown below charts the Loop Variables when the Minor Loops is selected (Item a) and allows for Manual or Auto Tune of each Loop.

  1. PID1/PID2 Tabs: The Tabs across the top represent the PID Loop instructions within the ladder code.
  2. Major Loop / Minor Loop: Selectable viewing option when using Cascaded Loops.
  3. SP/SP/PV: SP represents Set Point value and PV represents Process Variable value.  Check boxes to show or hide the pens on the graph and color indicators that represent the respective colors of the pens. Minor Loop graphs show the Cascade Setpoint as well as the Auto Mode Setpoint.
  4. Properties: Click to open the Chart Properties window discussed previously in this topic.
  5. OUT / Bias: OUT represents Output Value and Bias is the Percentage Value that is added to the Output to stabilize the Process Control. Check boxes to show or hide the pens on the graph for the respective Value.

 

Online View PID Settings

  1. Online View PID Settings: This section provides editable fields to enter a new value, fields that display the current values, and checkboxes to select if a value entered in the editable fields are to be applied when the Apply Selected Settings button is clicked.

Note: When entering Values in any of the Online View PID Settings fields, only enter Integer Values. If a Float Value is entered, an Invalid Value Error window like the one shown below will display.


  1. Apply Selected Settings: Writes any and all Edits that have the Write Edits checkbox selected.
  1. Clear Charts: Click to Clear all the historic data from the Line Graphs.

Auto Tune Settings

  1. Closed Loop Limit Cycle: Describes the Ziegler-Nichol Closed Loop Tuning method used for this Auto Tuning procedure.

Note: Auto Tuning a PID Loop while connected to your process can cause unexpected results. The Ziegler-Nichol Closed Loop Tuning method is used to drive the control output fully ON to drive the Process Variable (PV) above the configured Set Point (SP) then drive the control output fully OFF until the PV drops below the SP. It repeats this method for three complete cycles to accurately calculate the new P-I-D values for your process. Auto Tune will not drive the Output past the limits set by Output Upper Limit and Output Lower Limit.

  1. PV Deadband: This applies a Deadband (buffer zone) around the value of the Process Variable at the time you initiate the Auto Tune cycle. This value should be larger than the typical noise on the PV input. This is used to help avoid the Auto Tune from reacting to the PV noise and miscalculating or moving into the next cycle prematurely.
  1. Initial PV Bump: When you begin the Auto Tuning procedure the Output will turn ON and remain ON until the InitialPV Bump value is met. At that time it will change direction and begin the three cycle Auto Tune profile.

Note: The Initial PV Bump must generate a value larger than PV Deadband. If theSetpoint andProcess Variable are close to 0 or the range limits at the time the Auto Tuning begins, you may experience erratic behavior or a failed Auto Tune.

  1. Auto Tune: Start the Auto Tuning Algorithm.  The PID instruction must be Enabled but not in Automatic before Auto Tuning will begin.
  1. PI / PID Radio Button: Tuning methods:

    • PI: (default) Returns Proportional and Integral terms only.
    • PID: Returns Proportional, Integral and Derivative terms.

  1. Status Messages: Once Auto Tune is initiated, any status messages will be displayed here. The following is a list of possible messages displayed:
    • Running: The CPU is performing the PID auto-tune. New P, I and D values have not been calculated at this point.
    • Rejected: The CPU rejected the request to begin auto-tune. This occurs if the PID loop was not enabled and in manual mode, or the CPU was not in Run. The PID loop retains old P, I and D values.
    • Aborted: The user clicked the Stop button before auto-tune completed. The PID loop retains old P, I and D values.
    • Completed: The CPU completed the PID tuning successfully. The PID loop begins using the new calculated values.

Auto Tuning Sequence of Events

The following assumes a Forward-acting Loop:

  1. With the Loop in Manual Mode, manually control the Output to get the Process Variable near the typical region of operation and in a steady state if possible.

Note: In order to Auto Tune the PID loop, the loop must be set to Manual Mode. See the PID Loop Instruction section of the Instructions chapter for a more detailed explanation of this mode.

  1. Press the Start button to begin the Auto Tune sequence.
  1. The current PV is copied to the set point.
  2. The Output is driven to either the Output upper limit or Output range max. (whichever value is lesser).
  3. When the PV reaches the value defined by the Initial PV Bump, the Output is driven to either the Output lower limit or Output range min. (whichever value is greater).
  4. When the PV reaches the set point, the Output is driven to either the Output upper limit or Output range max. (whichever value is lesser).
  5. When the PV reaches the set point, the Output is driven to either Output lower limit or Output range min. again (whichever value is greater).
  6. This Output cycling pattern continues for three full cycles.
  7. Once complete, the Auto Tune calculates new values for P, I and D (if selected) and writes them to the appropriate tags.
  8. The Loop is still in Manual Mode so the Output returns to it's value before the Auto Tune started.

Example:

Note: We do not recommend the above settings, they are solely for demonstration purposes only.

Now that the PID loop has been auto tuned, the loop should be placed back into Auto Mode. See the Manual Tuning section below if additional corrections are needed once loop is placed in Auto Mode. The Auto Tuning feature in the CPU runs only at the command of the Process Control engineer. The Auto Tuning therefore does not run continuously during operation (this would be Adaptive Control). Whenever a substantial change in Loop dynamics occurs (mass of process, size of actuator, etc.), you will need to repeat the Auto Tuning.

Manual Tuning

Before manual tuning of the PID loop can occur, the loop must be placed in Auto Mode if not already there. Use the following checklist when switching the loop to Auto Mode for the first time:

Note: In order to Manually Tune the PID loop, the loop must be set to Auto Mode. See the PID Loop Instruction section of the Instructions chapter for a more detailed explanation of this mode.

  1. Monitor the Loop parameters with a Loop trending instrument. We recommend using the PID Tuning window.
  2. Adjust the Gains so the Proportional Gain = 10, Integral Time = 2,147,483,647 (maximum value for this tag data type), and Derivative Time = 0. This minimizes the Integral and Derivative terms, and provides a little Proportional Gain.
  1. Check the Bias Term Tag value. If it is not Zero, then write it to Zero using a Data View or the PID Tuning window.

Once these checklist is complete, the PID loop can now be transitioned to Auto Mode:

  1. You must first Enable the PID Loop instruction, then place it in Auto Mode. (Enable Cascade Mode, only if you are working with a Cascaded Loop).

If the PV and Control Output values begin to oscillate, reduce the Gain values immediately. If the Loop does not stabilize immediately, then transfer the Loop back to Manual Mode and Manually write a safe value to the Control Output. During the Loop Tuning procedure, always be near the Emergency Stop switch that controls power to the Loop actuator in case a shutdown is necessary.

  1. Control Output = (SP – PV) x Proportional Gain + Bias. If the Control Output value changed, the Loop should be getting more energy from the actuator, heater, or other device. Soon the PV should move in the direction of the SP. If the PV does not change, then increase the Proportional Gain until it moves slightly
  1. Now, add a small amount of Integral Gain. Remember that large numbers are small Integral Gains and small numbers are large Integral Gains! After this step, the PV should = SP, or be very close.
  2. Until this point we have only used Proportional and Integral Gains. Now we can Bump the Process (change the SP by 10%), and adjust the Gains so the PV has an optimal response. Refer to the figure below. Adjust the Gains according to what you see on the PID Trend view. The critically-damped response shown gives the fastest PV response without oscillating.

Manual Tuning Procedure

  1. Now you may want to add a little Derivative Gain to further improve the critically-damped response above. Note the Proportional and Integral Gains will be very close to their final values at this point. Adding some Derivative action will allow you to increase the Proportional Gain slightly without causing Loop oscillations. The Derivative action tends to tame the Proportional response slightly, so adjust these Gains together.


Related Topics Link IconRelated Topics