EPICURE Closed Loop Control Utility
PID
EPICURE Closed Loop Control Utility
PID
Larry Lee
Robert West
Therese Watts
A cryogenics multibus crate contains A/D-D/A modules, actuator controller modules, digital status and control modules, and a temperature resistor module. The EPICURE beamline control system reads data from and writes data to these multibus modules via a C1080 Multibus Interface Module residing in a CAMAC crate and connected to the multibus crate via an interface card. One of the functions provided by the firmware residing in the C1080 module is closed loop control implemented via a classical PID equation. A maximum of 20 different closed loops may be controlled by the C1080 at the same time. The EPICURE Closed Loop Control Utility PID enables a user to control a cryogenic system by monitoring and modifying any particular closed loop in the system.
The Closed Loop Control Utility executes on a VAX node and communicates with a specified C1080 module via the EPICURE CAMAC data acquisition system. The Closed Loop Utility displays the various parameters for a single closed loop. The display is updated every two seconds as new data is obtained from the C1080 module. In addition, the utility allows a user to change selected loop parameters and then write them to the C1080 module to modify the operation of the closed loop. All the parameters for a single loop may be saved to a disk file and then written back to the C1080 at some later time. A user is able to select a multibus (corresponding to a particular C1080 module) and one of the 20 closed loops which may be operating on that multibus.
The user interface of the Closed Loop Utility is implemented using DECforms, which is a software product that can "readily" interface a user application that requires structured, form-based, or menu-based user interfaces. The user has full control of the screens and is not required to learn complex command statements for setting the loop elements. Pop-up menus and help messages are implemented to make the application user-friendly. The user presses the NEXT SCREEN key to access the setting screen in order to modify any of the settable fields.
A screen display is divided into two sections. The upper section is a "header." The lower section is a quadrant with either readable fields or settable fields. Appendix A contains an example of the reading screen display and Appendix B contains an example of the setting screen display.
After the new PID algorithm has been evaluated in a field test by the cryogenics department, the RD/Controls group will provide a standard Epicure Screen Management (ESM) version based upon the recommendations of the persons involved.
When the Closed Loop Utility starts execution, it displays the closed loop which previously was being monitored. The AREA, MULTIBUS, and LOOP fields are used to select a different multibus and control loop operating on that multibus. The MODE field readback displays the mode label that the C1080 module has received for that set of loop parameters.
The arrow keys are used to move the cursor between fields one cell at a time. The cursor may also be moved by defined keys that allow settable field jumping: (1) KP_1 or TAB to move to the next field and (2) KP_4 or F12 to move to the previous field. (Appendix C contains a complete list of the various key functions.) The data field types are (1) set numerical and (2) menu select.
It is important to note that any selection from this list always causes the set of parameters from the disk file to be downloaded to the loop table in the module.
Appendix A contains an example of this screen. There is no movement within this screen. The data fields are of display types (1) read text and (2) read numerical. This screen is displayed when the Closed Loop Utility starts execution. If the setting screen is being displayed, the reading screen is selected by pressing the PREV SCREEN key.
The first quadrant (upper right) encompass the control data. The second quadrant (upper left) and the third (lower left) encompasses the process data. The forth quadrant (lower right) encompasses the loop and process constants. Appendix D describes in detail each of the various fields displayed on this screen. Appendix E describes how the various constants are used in the series Dahlin PID control algorithm which is executed by the C1080 controller.
This screen is updated every two seconds as new data is received from the C1080 module. As a result, the hour-minute-second time display changes in two second increments.
The user activates this screen with the NEXT SCREEN key. Appendix B contains an example of this screen. The arrow keys are used to move the cursor between fields one cell at a time. The cursor may also be moved by defined keys that allow settable field jumping: (1) KP_1 or TAB to move to the next field and (2) KP_4 or F12 to move to the previous field. The data field types are (1) set text, (2) set numerical, and (3) toggle.
The process device name and the control device name are text fields. The loop status can be toggled between OFF and ON by pressing the carriage return. All the other fields are numeric fields.
The user places the cursor over the desired field and then presses the F13 key which erases the field. The user then types in the new data. As many of the fields may be changed as is necessary. The user then places the cursor on the SEND button and presses the carriage return to send the data to the C1080 module. The display is then switched to the reading screen and the cursor is placed in the header. The new readings are displayed when they are received from the module. If the user decides to abort the changing of any parameters, he simply presses the PREV SCREEN key to return to the display of the reading screen.
If a device name has been changed in the set of loop parameters that are to be sent to the C1080 module, the status of the loop is always set to OFF. Such a change is considered to be a major modification to the loop. As with a mode download from the disk file, the intent is to enable the user to examine all the information before starting execution of the loop.
Note that the data displayed on this screen does not update. Whatever was received from the C1080 module immediately prior to the request for this screen is what is displayed for modification. The hour-minute-second time display is the time when the user pressed the NEXT SCREEN key to request the setting screen. It does not update either.
The bottom 2 lines of the screen are reserved for displaying messages. These messages include instructions, error messages and field help text. Place the cursor over a field and press the help key for information regarding that particular field. For information regarding movement between screens or fields, press the HELP key twice while the cursor is in the header screen. For useful equations pertaining to the PID algorithm, press the HELP key twice while the cursor is in the setting screen. The following message strings may be displayed in the process and control sections of the reading screen:
Distribution: normal C. Drennan M.S. 222 R. Sanders M.S. 219 P. Wheelwright M.S. 219
CRYO PID CONTROL EXIT SAVE TO FILE DOWNLOAD FILE COMPARE Download Area: TSX Multibus: 1 Loop: 00 Mode: COOLDOWN ***** title line from the disk file describing this loop's parameters ------------------------------------------------------------------------------ PROCESS: TSXPDEW | CONTROL: TSXEVLOSUC 17:04:38 PSIG | %OPN Reading: - 1.001 | Reading: 49.390 Calculated Setting: 4.999 | Setting: 50.000 Correction: .000 >>> NEW DATA IN THIS LOOP | >>> NEW DATA IN THIS LOOP Dead Band: .249 | Min Step: .999 Max Step: 4.999 Max Error: .000 | Min Pos: .000 Max Pos: 59.999 ------------------------------------------------------------------------------ PROCESS ERRORS: | LOOP CONSTANTS: PROCESS CONSTANTS: | (0) .000 | Kc .000 Kp 1.000 (1) .000 | TI .951 tau0 .300 | TD 1.950 tau1 1.000 Sampling Interval: 10.000 | a .100 tau2 2.000 Status: OFF | q .716 Process Delay 0 ------------------------------------------------------------------------------
CRYO PID CONTROL EXIT SAVE TO FILE DOWNLOAD FILE COMPARE Download Area: TSX Multibus: 1 Loop: 00 Mode: COOLDOWN ------------------------------------------------------------------------------ PID SETTINGS SEND 17:11:44 (NOTE: THIS IS A FREEZE FRAME - THESE READINGS MAY NOT BE THE CURRENT VALUES.) ***** title line from the disk file describing this loop's parameters ------------------------------------------------------------------------------ PROCESS: TSXPDEW PSIG | CONTROL: TSXEVLOSUC %OPN Setting: 4.999 | Setting: 50.000 Dead Band: .249 | Min Step: .999 Max Step: 4.999 Max Error: .000 | Min Pos: .000 Max Pos: 59.999 ------------------------------------------------------------------------------ Sampling Interval: 10.000 | LOOP CONSTANTS: PROCESS CONSTANTS: Status: OFF | Kc .000 Kp 1.000 | TI .951 tau0 .300 | TD 1.950 tau1 1.000 | a .100 tau2 2.000 | q .716 Process Delay 0 ------------------------------------------------------------------------------
KEY NAME USE -------- ___ TAB, KP1........Move to the next field F12, KP4........Move to the previous field F13.............Erase current field F10, CTRL-Z.....EXIT the utility CTRL-W..........Refresh screens RETURN, ENTER, SELECT..........Three interchangeable response keys PREV SCREEN.....Displays reading screen NEXT SCREEN.....Displays setting screen ARROW KEYS......Position the cursor over a character or move between fields, icons and menu choices.
The C1080 Multibus Interface Module implements closed loop control on a system made up of two devices: (1) an input or process device and (2) an output or control device which has some effect upon the process device. A setpoint value is specified which the process device is to achieve and then at which it is to be maintained. This setting value and the current reading value of the process device are input to a PID (Proportional, Integral, Derivative) closed loop algorithm which calculates a new setting value for the control device. After some period of time has elapsed, the new setting of the control device has caused the reading of the process device to change. The PID algorithm is then executed again with the new process reading and a new control setting is again calculated. This sequence is repeated until the difference between the process reading value and the process setpoint is within some tolerance value. How long this convergence takes and how well it occurs, even if it occurs at all, depends on how successful the user has been in tuning the various PID parameters to match the characteristics of the physical system.
The display of the closed loop parameters is divided into four sections: process, control, constants, and errors. (See Appendix A)
This section displays parameters related to the process device, which is the device the user wants set to a particular value and then have maintained at that value. All the numerical values in this section are expressed in the engineering units of the process device.
This section displays parameters related to the control device, which is the device the algorithm is setting in order to cause changes in the process device.
This section displays parameters used either directly or indirectly in the calculations of the PID algorithm.
This section displays the previous (0) and current (1) calculated process error, which is related to the difference between the process setpoint and the process reading. Also included in this section are two parameters related to when the PID algorithm is executed. If the PID closed loop algorithm is to be applied to the system defined by all the specified parameters, the STATUS field is ON. OFF indicates this particular closed loop is not being executed. The SAMPLING INTERVAL specifies the execution interval of this closed loop and is expressed in units of seconds. The smallest time interval possible is 0.001 seconds or 1 ms. However, probably very few meaningful changes in a cryogenic system occur within the time span of a few milliseconds. The maximum time interval possible is 99.999 seconds.
The C1080 Multibus Interface Module implements a series Dahlin PID control algorithm with dead time compensation. The implementation of this algorithm applies the derivative only to the process measurement according to the equation where the LaPlace variable s is approximated by the discrete equation where f is the delay function such that . This implementation also includes a filter parameter to provide a bound on the derivative mode response to the rate of change of the process variable, reducing the adverse effects of noise and the amplitude quantization effects of sampling.
if ( )
where
if tau0 = 0
, resulting in 0 a1 1
if tau1 = 0 or if Kp = 0
, resulting in 0 a1 1
if tau1 = 0
, resulting in 0 a2 1
if tau2 = 0
Note that if the proportional gain Kc is now set to 0, the variable dM is always 0 and hence the controller output never changes.
(5.1)
(6.1)
(7.1)
(8.1)
(5.2)
(6.2)
(7.2)
(8.2)
(6.3)
(7.3)
(8.3)
(5.4)
(6.4)
(7.4)
(8.4)
In this case, the change dM is closely proportional to the difference between the process setpoint R and the process reading C[k].
(6.5)
(7.5)
(8.5)
In this case, the change dM is again closely proportional to the difference between the process setpoint R and the process reading C[k].
Area TSX Multibus 1 Loop 00 Mode COOLDOWN 02-Mar-1993 17:15:55.82 ***** title line from the disk file describing this loop's parameters ------------------------------------------------------------------------------ PROCESS: TSXPDEW TSXPDEW | CONTROL: TSXEVLOSUC TSXEVLOSUC PSIG PSIG | %OPN %OPN MODULE FILE | MODULE FILE Setting: 4.999 4.999 | Setting: 50.000 50.000 Dead Band: .249 .249 | Min Step: .999 .999 Max Error: .000 .000 | Max Step: 4.999 4.999 | Min Pos: .000 .000 | Max Pos: 59.999 59.999 ------------------------------------------------------------------------------ Sampling Interval: 10.000 10.000 ------------------------------------------------------------------------------ LOOP CONSTANTS: | PROCESS CONSTANTS: | Kc .000 .000 | Kp 1.000 1.000 TI .951 .951 | tau0 .300 .300 TD 1.950 1.950 | tau1 1.000 1.000 a .100 .100 | tau2 2.000 2.000 q .716 .716 | Process Delay 0 0 ------------------------------------------------------------------------------