The PID-Record (DESY) Rev. 5
Introduction
The PID record impelemts the PID-algorithm (proportional – integral – differential control) for process regulation. Additional it contains functions for controlling an actuator like a valve or heater.
Parameters
Scan – A regular scanning is important for the regulation process. Anyhow the time which passed by since the last record activation is concidered in calculation of the contribution of P, I and D-terms. I/O event scanning is not supported.
Device – There is no device support.
The most important input and output fields:
Field / Summary / Type / DCT / Initial / Access / Modify / Monitor / PP / In/OutVAL / Setpoint / DOUBLE / No / 0 / Yes / Yes / Yes / Yes / In
STPL / Setpoint Location / INLINK / Yes / <empty> / Yes / Yes / No / No / Link
SMSL / Setpoint Mode / MENU / Yes / Supervisory / Yes / Yes / No / No / In
CVAL / Contr. Value / DOUBLE / No / 0 / Yes / Yes / Yes / No / In
CVL / Cont. Value Location / INLINK / Yes / <empty> / Yes / Yes / No / No / Link
DM / Delta Manipultaion / FLOAT / No / 0 / Yes / No / Yes / No / Out
SOUT / Set to Output / FLOAT / Yes / 0 / Yes / Yes / Yes / Yes / In/Out
OUT / Output Value / FLOAT / No / 0 / Yes / No / Yes / No / Out
VOUT / Valve Display Out (0=closed) / FLOAT / No / 0 / Yes / No / Yes / No / Out
Normally the setpoint is entered into VAL. The controlled value CVAL is taken over the link CVL. In manual mode the operator sets SOUT to the desired output. In automatic mode SOUT is controlled by the pid algorithm. VOUT displays the ammount of valve opening. OUT is the output, which can be read by the analog output record. If STPL is empty, AM can not be set to AUTO.
Fields for Display:
Field / Summary / Type / DCT / Initial / Access / Modify / Monitor / PP / In/OutPREC / Display Precision / SHORT / Yes / 0 / Yes / Yes / No / No / In
EGU / Engeneering Units / STRING / Yes / “” / Yes / Yes / No / No / In
HOPR / Upper Display Range / FLOAT / Yes / 0 / Yes / Yes / No / No / In
LOPR / Lower Display Range / FLOAT / Yes / 0 / Yes / Yes / No / No / In
PREC is used for many fields of the record. Especially those which have a value in EGU units. Others returns with fixed display precision. The pid-parameters for example use 5 digits of precision. HOPR and LOPR are used for to display the controlled value and setpoints. They can be omitted if EGUF and EGUL is specified and the display range
Fields for Locking Mechanism:
Field / Summary / Type / DCT / Initial / Access / Modify / Monitor / PP / In/OutLKEL / Lock Enable Location / INLINK / Yes / <empty> / Yes / Yes / No / No / Link
LKEN / Lock Enable / SHORT / No / 0 / Yes / Yes / No / No / In
LKCL / Lock Closed Location / INLINK / Yes / <empty> / Yes / Yes / No / No / Link
LKCS / Lock to Closed / SHORT / No / 0 / Yes / Yes / No / No / In
LKCM / Lock Closed Mode / MENU / Yes / Lock / Yes / Yes / No / No / In
LKOL / Lock Opened Location / INLINK / Yes / <empty> / Yes / Yes / No / No / Link
LKOP / Lock to Opened / SHORT / No / 0 / Yes / Yes / No / No / In
LKOM / Lock Opened Mode / MENU / Yes / Lock / Yes / Yes / No / No / In
LOCL / Lock Moving Location / INLINK / Yes / <empty> / Yes / Yes / No / No / Link
LOCK / Lock Moving / SHORT / No / 0 / Yes / Yes / No / No / In
LKMM / Lock Moving Mode / MENU / Yes / Lock / Yes / Yes / No / No / In
LCKD / Is Locked / SHORT / No / 0 / Yes / No / Yes / No / Out
LKSV / Locked Severity / MENU / Yes / NO_ALARM / Yes / Yes / No / No / In
NOP / Not Opened / SHORT / No / 0 / Yes / No / Yes / No / Out
NCL / Not Closed / SHORT / No / 0 / Yes / No / Yes / No / Out
Locking can be used to force a valve (or other actuators) into close or open position or can just prevent moving. The links allow to cross-connect valves together so that only one of two can be opened for example. NOP and NCL are the counterparts for the lock-links. The modes serve for the inversion of logic. LKEN and LKEL can be used to en-/disable the whole locking mechanisms for maintainance or depending on operation modes.
Fields for Feedback Mechanism:
Field / Summary / Type / DCT / Initial / Access / Modify / Monitor / PP / In/OutOFBL / Out Feedback Location / INLINK / Yes / <empty> / Yes / Yes / No / No / Link
OFBM / Out Feedback Mode / MENU / Yes / None / Yes / Yes / No / No / In
OFBT / Out Feedback Tracking / SHORT / No / 0 / Yes / No / Yes / No / Out
Feedback is used for to couple multiple PID records when they are controlling the same actuator. The outputs can be combined by a calc record. If OFBM is “none” the mechanism is disabled. If OFBM mode “Auto” is used, when the calc record does MIN or MAX calculation. The feedback mechanism was created for this setup because the output of a contoller which has no intake in the actuator can drift away. When an action from the controller is desired, it takes too much time until the output reaches a value where it takes control over the actuator. The feedback couples the controller output always close to the others.
If a selection record (sel) is used, the mode should be set to “Select”. In contrast to “Auto” in PID manual mode SOUT will be tracked to follow the output of the selected controller. This prevents jumps of the actuator, when the selector is switched to another controller. The mode “Select” works in automatic mode as well as in manual.
Fields for Output Conditioning:
Field / Summary / Type / DCT / Initial / Access / Modify / Monitor / PP / In/OutVDRA / Valve reverse acting / MENU / Yes / No / Yes / Yes / No / No / In
OROC / Output Rate of Change / FLOAT / Yes / 0 / Yes / Yes / Yes / No / In
DRVH / Output High Clamp / FLOAT / Yes / 0 / Yes / Yes / No / No / In
DRVL / Output Low Clamp / FLOAT / Yes / 0 / Yes / Yes / No / No / In
ORHI / Maximum allowed Rate / FLOAT / Yes / 0 / Yes / Yes / No / No / In
JUMP / Jump to desired Out / SHORT / No / 0 / Yes / Yes / Yes / No / In
SHUT / Lock to SHUP / SHORT / No / 0 / Yes / Yes / No / No / In
SHUP / SHUT position / FLOAT / Yes / 0 / Yes / Yes / No / No / In
VDRA can be set to “Reverse” if the actuator closes on high output signal. OROC limits the speed of output changing. The maximum limit for OROC is ORHI. When a valve must be moved or closed fast, by using JUMP (set it to 1) or SHUT (hold it at 1 as long as the valve shall be kept close) it drives with ORHI speed. For ORHI and OROC: 0 means “no limit”. JUMP and SHUT has been established for critical situations when valves are limited by DRVL or OROC for example but must be driven fast.
JUMP disables OROC for a short time. The valve travels with ORHI speed until the desired output value is reached. JUMP can be used in manual as well as in automatic mode. JUMP is reset by the record itself, when the move has ended.
SHUT is more powerful as locking. If SHUT is active, the Valve will travel with ORHI speed to the SHUP (default is 0) defined position. The controller is set to manual mode and marked as locked (LCKD). DRVL/DRVH and other locking is ignored. After setting SHUT to 0 again, the valve will move with OROC speed to the position given by locking or DRVL/DRVH or it will keep the position if nothing of that applies. The record is not set back into automatic mode after beeing locked. The operator or SNL must care about that.
Fields for Archiving and Monitoring:
Field / Summary / Type / DCT / Initial / Access / Modify / Monitor / PP / In/OutADEL / Archive Deadband / FLOAT / Yes / 0 / Yes / Yes / No / No / In
MDEL / Monitor Deadband / FLOAT / Yes / 0 / Yes / Yes / No / No / In
ODEL / DM Deadband / FLOAT / Yes / 0 / Yes / Yes / No / No / In
ODM / Last DM Monitored / FLOAT / No / 0 / Yes / No / No / No / Out
LDAL / Last Deviation Alarmed / FLOAT / No / 0 / Yes / No / No / No / Out
LRAL / Last Rate Alarmed / FLOAT / No / 0 / Yes / No / No / No / Out
ALST / Last Value Archived / DOUBLE / No / 0 / Yes / No / No / No / Out
MLST / Last Value Monitored / DOUBLE / No / 0 / Yes / No / No / No / Out
OOUT / Last Output Monitored / FLOAT / No / 0 / Yes / No / No / No / Out
OSOU / Last SOUT Monitored / FLOAT / No / 0 / Yes / No / No / No / Out
OCVA / Last CVAL Monitored / DOUBLE / No / 0 / Yes / No / No / No / Out
OAM / Last AM Monitored / USHORT / No / 0 / Yes / No / No / No / Out
OSIN / Last SINT Monitored / FLOAT / No / 0 / Yes / No / No / No / Out
OLCK / Last LCKD Monitored / SHORT / No / 0 / Yes / No / No / No / Out
ADEL (for the VAL field) and MDEL (for VAL, CVAL and SINT) work like usually. ODEL is the moitor- and archive deadband for the fields OUT, VOUT, SOUT and DM.
Fields for Alarming:
Field / Summary / Type / DCT / Initial / Access / Modify / Monitor / PP / In/OutDLIM / Deviation Limit / FLOAT / Yes / 0 / Yes / Yes / No / No / In
DLSV / Deviation Severity / MENU / Yes / NO_ALARM / Yes / Yes / No / No / In
DHYS / Deviation Hysteresis / FLOAT / Yes / 0 / Yes / Yes / No / No / In
RLIM / Rate-of-change Limit / FLOAT / Yes / 0 / Yes / Yes / No / No / In
RLSV / ROC-Severity / MENU / Yes / NO_ALARM / Yes / Yes / No / No / In
RHYS / ROC-Hysteresis / FLOAT / Yes / 0 / Yes / Yes / No / No / In
RNUM / ROC-Number of cycles hold / USHORT / Yes / 10 / Yes / Yes / No / No / In
RCNT / ROC-Cycles / USHORT / No / 0 / Yes / No / No / No / Out
ALMM / Alarms in Manual / MENU / Yes / No / Yes / Yes / No / No / In
A deviation alarm is set in automatic mode when CVAL and SINT differ more than DLIM. In manual mode this alam is set when ALMM is “YES” and CVAL and VAL differ more than DLIM. The RATE alarm is set when CVAL changes faster than RLIM. In manual mode the alarm is set only, if ALMM is “YES”. Deviation limits measure in EGU units rate in EGU units per second. RNUM is used to smooth the rate alarming. As a default, 10 record activations are needed to release an alarm when the value changes have calmed down. Additionally *HYS are value-based hysteres.
Fields for the PID-processing:
Field / Summary / Type / DCT / Initial / Access / Modify / Monitor / PP / In/OutINSP / Initial Setpoint / FLOAT / Yes / 0 / Yes / No / No / No / In
SINT / Internal Setpoint / FLOAT / No / 0 / Yes / No / Yes / No / Out
SGAP / Setpoint Gap / FLOAT / Yes / 0 / Yes / Yes / No / No / In
SRAT / Setpoint Rate / FLOAT / Yes / 0 / Yes / Yes / No / No / In
SPHI / Setpoint High Clamp / FLOAT / Yes / 0 / Yes / Yes / No / No / In
SPLO / Setpoint Low Clamp / FLOAT / Yes / 0 / Yes / Yes / No / No / In
SPOF / Setpoint Offset / FLOAT / YES / 0 / Yes / Yes / No / No / In
AM / Auto/Manual / MENU / Yes / Auto / Yes / Yes / Yes / Yes / In/Out
KP / Proportional Gain / FLOAT / Yes / 0 / Yes / Yes / No / No / In
KI / Integral Gain / FLOAT / Yes / 0 / Yes / Yes / No / No / In
KD / Differential Gain / FLOAT / Yes / 0 / Yes / Yes / No / No / In
MDT / Minimum delta-t proc. / FLOAT / Yes / 0 / Yes / Yes / No / No / In
EGUF / Full scale for normalization / FLOAT / Yes / 0 / Yes / Yes / No / No / In
EGUL / Low scale for normalization / FLOAT / Yes / 0 / Yes / Yes / No / No / In
DRA / Direct/Reverse acting process / MENU / Yes / No / Yes / Yes / No / No / In
SEMI / Set Setp to Meas at Init / MENU / Yes / S=M / Yes / Yes / No / No / In
PEMM / Proportional on Error/Meas / MENU / Yes / Error / Yes / Yes / No / No / In
DEMM / Deviation on Error/Meas / MENU / Yes / Error / Yes / Yes / No / No / In
P / Current
P-term / FLOAT / No / 0 / Yes / No / No / No / Out
I / Current
I-term / FLOAT / No / 0 / Yes / No / No / No / Out
D / Current
D-term / FLOAT / No / 0 / Yes / No / No / No / Out
ERR / Current error of regulation / FLOAT / No / 0 / Yes / No / Yes / No / Out
LERR / Last Error / FLOAT / No / 0 / Yes / No / No / No / Out
LMES / Last Measure / FLOAT / No / 0 / Yes / No / No / No / Out
At initialization the initial setpoint INSP is copied to VAL. If STPL is specified and SMSL is “closed_loop” VAL is filled with the link data and SPOF is added to the setpoint. SPHI and SPLO limits the setpoint to an acceptable range. SRAT limits the speed of change of the internal setpoint SINT, which is used by the pid algorithm. SINT is set to CVAL when switching to automatic mode. Then it adapts to VAL with a speed not faster than SRAT. If SRAT is zero it is ignored. DRA defines the direction of loop feedback. If SEMI is “S=M” the setpoint “VAL” is overwritten by CVAL when switching to auto. Use this settings if you want to keep the process running with current values. For a more detailed description of the algorithm see next chapter.
Other Fields:
Field / Summary / Type / DCT / Initial / Access / Modify / Monitor / PP / In/OutDT / Time since last run / FLOAT / No / 0 / Yes / No / No / No / Out
POUT / Previous OUT / FLOAT / No / 0 / Yes / No / No / No / Out
PSOU / Previous SOUT / FLOAT / No / 0 / Yes / No / No / No / Out
OSEN / SOUT Controllable / SHORT / No / 0 / Yes / No / Yes / No / Out
MSEN / AM Controllable / SHORT / No / 0 / Yes / No / Yes / No / Out
CVST / CVL internal Status / SHORT / No / 0 / Yes / No / No / No / Out
DT and MDT are used to prevent unnessesary freqent calculation of the pid loop. OSEN and MSEN serve for making graphic elements (widgets) in displays contollable. If they are zero, the control function should be blocked by the client. Example: If in automatic mode (pid-controlled) the SOUT element should be greyed out (blocked). If the locking mechanism is active AM and SOUT must be greyed. LCKD can be used to show the locking to the operator.
PID Algorithm
Glossary of Terms
· meas process variable measurement value
· setpt controller setpoint
· err difference between measurement and setpoint