About PID Loop Analyzer

PID Loop Analyzer is a software tool designed to help you optimally tune your control loops with very little process disruption.  You perform an open loop bump test on your production loop and provide the test data to PID Loop Analyzer, and it models your process and suggests PID tuning parameters based on Lambda tuning rules.   It allows you to select safe settings from aggressive to conservative.  Do you want quarter decay response instead?  No problem!  You can now tune your loops using Z&N’s Ultimate method without putting your production processes into sustained oscillation!  (Procedure described later.)  The first and most difficult step is getting process data into PID Loop Analyzer.

PID Loop Analyzer allows you to input process data in two ways, both of which require you to perform an open loop bump test.  Method one requires you to capture the bump test electronically in Comma Separated Variable (CSV) or Tab Seperated Variable (TSV) format and paste it into PID Loop Analyzer.  Method two requires you to observe the bump test; document a few parameters, and key them into PID Loop Analyzer.

Method One

Capturing CSV Data

Some control systems allow users to export historical data in CSV or TSV format. For example, Honeywell’s Experion control system allows users to capture trend data (data visible in the trend chart) in TSV format (method). Other control systems require users to use third party software tools to capture data.   I really like OPC Data Logger.  It is easy to use, very inexpensive, and will archive data in CSV format. You can even get a demonstration version that you must restart after thirty minutes, but thirty minutes is plenty of time to perform a bump test on most loops.  Just configure the data logger to capture a point’s output and process variable.  Then perform the bump test and stop the data logger.  Note: you can type brief notes or leave header information in the CSV file.  PID Loop Analyzer ignores superfluous data.

Entering CSV Data into PID Loop Analyzer

Click the Enter Data button located at the top left corner of the window; then select CSV Data to open the following dialog box:

screen capture

Paste your CSV bump test into the textbox.  Set “Interval” to the rate at which your data logger captured data, ideally 1 second.  Set “OP Column” to indicate which column the controller’s output data is in.  Set “PV Column” to indicate which column the process variable data is in.  Set “Controller LRV” to the controller’s lower range value and “Controller URV” to the controller’s upper range value. Lastly, select the model type: First Order Plus Dead Time (FOPDT) or Integrating. Click “OK.”  If everything is in fact “OK,” you will be presented with a trend of your data, a model of your process, recommended PID tuning parameters, and a trend showing how your controller will respond to a setpoint step change.  An example follows. 

screen capture

Note that you can provide one or several bumps in the data.  The application will average process nonlinearities.  The left trend area is your process model.  The green trace is your process data.  The yellow trace is the model, and the white trace is the controller output.  You can tweak the model by manipulating the parameters under the trend.  The model goodness of fit (R2) is displayed at the top right corner of the model trend area.  (One is a perfect fit.)  You are now ready to analyze your PID loop and experiment with different PID tuning settings, without experimenting with your production process.

Method Two (FOPDT)

Collecting Parameter Data

You will closely observe and document certain parameters while performing an open loop bump test.  You will document the following data:

Note that you can document the first five parameters before performing the step test.

Entering Parameter Data into PID Loop Analyzer

Click the Enter Data button in the upper left corner of the application window; then click FOPDT Parameters.  You will be presented with the following dialog box.

screen capture

Enter data into the appropriate fields and click “OK.”  You will be presented with a model of your process, recommended PID tuning parameters, and a trend showing how your controller will respond to a set point step change.  An example follows.

screen capture

The left trend area is your process model.  The yellow trace is the model, and the white trace is the controller output.  You can tweak the model by clicking the same Enter Data button then FOPDT Parameters and adjusting your original input.  You are now ready to analyze your PID loop and experiment with different PID tuning settings without experimenting with your production process.

Method Two (Integrating)

Collecting Parameter Data

You will perform an open loop bump test. The test will produce a process response characteristic of an integrating process; the process variable will be changing at one rate before the step change and a different rate after the step change. An example follows:

screen capture

Determine and document the following values. Most trend packages have tools such as scooters that will facilitate data gathering.

After you collect the data, click the Enter Data button in the upper left corner of the application window; then click Integrating Parameters. You will be presented with a dialog box. Following is an example of a bump test with example date, a dialog box with the example data inserted, and the resulting model.

screen capture

screen capture

Enter data into the appropriate fields and click “OK.” You will be presented with a model of your process, recommended PID tuning parameters, and a trend showing how your controller will respond to a set point step change. An example follows.

screen capture

The left trend area is your process model. The yellow trace is the model, and the white trace is the controller output. You can tweak the model by clicking the same Enter Data button then Integrating Parameters and adjusting your original input. You are now ready to analyze your PID loop and experiment with different PID tuning settings without experimenting with your production process.

Getting Data Out of PID Loop Analyzer

Once you finish analyzing your control loop, click the Enter Data button again and select Copy to Clipboard. Open your favorite text editor and paste (Ctrl V) PID Loop Analyzer's report into it. The report contains fields to document the loop number and old PID tuning constants, and it documents the new PID tuning constants and process dynamics. An example follows:

PID Loop Analyzer Report
http://dexautomation.com/la/

Loop Number:
Original P:
Original I:
Original D:

New P: 0.718 Gain
New I: 9.6 Repeats per Minute
New D: 0 Minutes

Process Information
Dead Time: 2 Seconds
Process Gain: 0.9 EUs per %OP (0.6 %Span per %OP)
Time Constant: 6.25 Seconds

PID Loop Analyzer and the Ultimate Method

Use PID Loop Analyzer to determine a control loop's Ultimate Gain (Ku) and Ultimate Period (Pu).  The Ultimate Gain is the controller gain at which the process variable cycles at a constant amplitude.  The Ultimate Period is the time it takes the process variable to complete one cycle.

Use either of PID Loop Analyzer’s methods to model your process.  In the “Tuning Rules” panel, select “Trial and Error.”  Doing so gives you access to the controller’s tuning parameters.

screen capture

Set I and D to zero.  Start increasing the controller’s P value (gain) and continue increasing it until the green trace (PV) cycles at a constant amplitude.

screen capture

Document the controller's gain as Ku.  In this case, Ku is 1.31.  Determine the period of the cycling process variable and document it as Pu.  From the 90 second hash mark to the 180 second hash mark, the PV cycles 4.5 times.  Therefore, (180 – 90)/4.5 = 20 seconds per cycle.  We need Pu in minutes, so 20/60 = .333 minutes per cycle.  Use the appropriate formula from the following table to calculate tuning constants.

Proportional and Integral (PI) Controller

Gain (Kc)

Kc = 0.45 * Ku

Integral (repeats per minute)

Ri = 1.2 / Pu

Proportional, Integral, and Derivative (PID) Controller

Gain (Kc)

Kc = 0.6 * Ku

Integral (repeats per minute)

Ri = 2 / Pu

Derivative

Td = Pu / 8

Gain (Kc) = 0.45 * 1.31 = 0.5895

Integral = 1.2 / 0.333 = 3.6

Test the new settings in the controller.

screen capture

I will automate this procedure soon and hide the gory details from the user, but for now have fun doing the Ultimate Method by hand.