![]()
| Percent_Scaling | BOOLEAN | TRUE | Percentage scaling or No Scaling |
| AuSPoSp | PORTS_LIB.analog_signal | (n = 1) | IN | Auto Setpoint speed (-/s) | |
| Out | PORTS_LIB.analog_signal | (n = 1) | OUT | output | |
| PV | PORTS_LIB.analog_signal | (n = 1) | IN | Process Value | |
| PosR | PORTS_LIB.analog_signal | (n = 1) | IN | PosR | |
| SP | PORTS_LIB.analog_signal | (n = 1) | IN | Set Point | |
| TR_S | PORTS_LIB.bool_signal | (n = 1) | IN | Tracking mode set |
| AtOutH | REAL | 100 | Max range of output value | ||
| AtOutL | REAL | 0 | Min range of output value | ||
| Kd | REAL | 0.5 | Differential gain for derivative action | ||
| Kp | REAL | 1 | Gain for PID | ||
| Out_init | REAL | 0 | Initial Output | ||
| PMaxRan | REAL | 320 | Max range of process value | ||
| PMinRan | REAL | 0 | Min range of process value | ||
| RA | BOOLEAN | FALSE | Reverse Action enabled | ||
| Td | REAL | 0 | Derivative time for PID (ms) | ms | |
| Ti | REAL | 100000 | Integration time for PID (ms) | ms | |
| gamma | REAL | 0.1 | Ratio between the time constant for the antiwindup and the integration time (0..1) | 0..1 |
| AtSP | REAL | Active SetPoint | |||
| AtSPoSp | REAL | Active Set Point Speed | |||
| Kd_eff | REAL | ||||
| Out_over | REAL | Overshoot of Output | |||
| Outc | REAL | output before limitation | |||
| PVScaled | REAL | Process Value Scaled | |||
| SPR | REAL | Set Point Request | |||
| SPScaled | REAL | Setpoint Value Scaled | |||
| SPoDeSp | REAL | Setpoint Increase speed (-/s) | -/s | ||
| SPoInSp | REAL | Setpoint Increase speed (-/s) | -/s | ||
| TermD | REAL | Derivative Action | |||
| TermI | REAL | Integral Action | |||
| TermP | REAL | Integral Action | |||
| dev | REAL | deviation : error PV-SP | |||
| dev_filt | REAL | Process Value Scaled and filtered | |||
| sense | REAL | control setting, Reverse action |
The Base_PID component represents a control structure PI with implementation of reverse action. The controller has two working states available:
Regulation: The output signal
is driven by the PID function.
Tracking: The output signal is
set equal to the position request.
The two input signals to the controller are the setpoint and the controlled process variable:
PV.signal[1]
SP.signal[1]
The process input signal is normalized as a function of the maximum and minimum range of the process value defined by the user, and also the active setpoint signal:

The active setpoint is calculated as a function of the active setpoint speed:
![]()
An error signal, 'dev', is defined as the difference between these two normalized values.
![]()
The feedback into the integrator to avoid saturation is
![]()
The integral part of the output is calculated from

where:
����������� �
is the 'dev' variable calculated previously
�����������
is the gain of the integral action
�����������
is the time of integral action
�����������
�is the relation
between the time of integral action and the time constant of anti-windup
The proportional action is proportional to the error between the normalized setpoint and the normalized input signal from the process.
![]()
Differential action is implemented as follows:
![]()
where:
�is a differential term
that modiffies the value of the proportional gain.
The unlimited output is the sum of the proportional output, the integral output and the derivative output.
![]()
The variable 'sense' can be a positive number or a negative number. When 'sense'>0, the controller is direct-acting. In this case, the controller output decreases if the controlled variable increases. A typical case of direct-acting control is the temperature control of heat exchanger, i.e. if the outlet temperature increases, the controller closes the vapor inlet valve to reduce the heating power.
If 'sense'<0, the controller is inverse-acting, and the controller output increases if the controlled variable increases. A typical case is a level control where, if the level of liquid in a tank increases due to an increase of the inlet flow, the controller must increase the position of the tank exit valve to re-establish the level.
For more information, see http://j2eeps.cern.ch/wikis/display/EN/Controller+%28PID%29.