5.32. PID¶

Purpose
To achieve a certain set value by adjusting a controlled variable of a hydraulic component, based on the difference between the input value and the set value.
Procedure
The Proportional, Integrate, Differentiate (PID) component computes for each sample period Δt the error ε between an input signal x[n] and a set value xset:
\(\varepsilon[n]=x[n]-x_{s e t}\) |
Where n denotes the present sample. The output signal is computed by Proportioning: |
\(y_{p}[n]=c_{p} \varepsilon[n]\) |
Integrating: |
\(y_{i}[n]=y_{i}[n-1]+\frac{c_{p}}{c_{i}} \varepsilon[n] \Delta t\) |
or Differentiating the error: |
\(y_{d}[n]=c_{p} c_{d} \frac{\varepsilon[n]-\varepsilon[n-1]}{\Delta t}\) |
where cp is the “gain” (whose units are determined by the units of the output signal), ci is the “integration time” (time units), cd is the “differentiation time” (time units), Δt is the sample time-step and [n-1] denotes the previous sample. The above equations can be combined to give an output signal, which is either: |
Proportional (P): |
\(y=y_{p}+c_{0}\) |
where c0 is an offset value (Bias). |
Proportional and Integrated (PI): |
\(y=y_{p}+y_{i}\) |
or Proportional, Integrated and Differentiated (PID): |
(5.32.1)¶\[y = y_{p} + y_{i} + y_{d}\]
|
Parameters
Parameter |
input |
unit |
range |
default |
remarks |
---|---|---|---|---|---|
Initial setpoint |
real |
Can be overruled by 2nd input channel |
|||
Accuracy of recorded value |
real |
See remarks |
|||
Sample time interval |
real |
[s] |
See remarks |
||
Type of control |
P/ PI/ PID |
||||
Gain |
real |
||||
Integration time constant |
real |
[s] |
|||
Differentiation time constant |
real |
[s] |
|||
Offset value (bias) |
real |
only if ‘Type of Control” = P |
|||
Initial value of integrator |
real |
only if ‘Type of Control” = PI or PID Can be overruled by 3rd input channel |
|||
Lower bound |
real |
||||
Upper bound |
real |
||||
Ramp value CTRL_UP |
real |
max. positive change per second |
|||
Ramp value CTRL_DOWN |
real |
max. negative change per second |
Remarks
The Sample time interval is used to decrease the resolution of the input signal. A PLC-controller can have a different sample time than the simulation time.
If the difference between the measured (recorded) value and setpoint is smaller than the accuracy, the error is set to zero.
The PID component allows an ‘upper bound’ and a ‘lower bound’ to be imposed on the output signal.
When the output value “hits” the upper or lower bound the control system can not follow the error anymore and has no possibility to feed back to the system. If this situation remains long enough the integrator fills with a large value, which inhibits timely reaction if the error value changes direction (sign). To prevent this, a simple anti-reset windup provision is implemented. This provision suspends the accumulating of the error during the time that the output value violates the lower or upper bound.
Furthermore, a maximum allowable ‘ramp value’ can also be specified to control the rate of change of the output.
The integrating part can be initialised with a non-zero value. This can be used to adjust the PID controller to the hydraulic steady state (see examples).
In the steady state, the error should be equal to zero. This ensures that the entire system is in a true steady state.
Figure 4: PID operation |
It is the user’s responsibility to choose, and so that the output signal can be used by the controlled hydraulic component. For instance, if a valve is the controlled hydraulic component then the PID output signal must have a lower bound of 0 and an upper bound of 1.
Component Messages
Message |
Explanation |
---|---|
Integrator must be less than upper bound |
Input validation |
Integrator must be greater than lower bound |
Input validation |
Offset must be less than upper bound |
Input validation |
Offset must be greater than lower bound |
Input validation |
Discrepancy with setpoint value and measured value |
|
ERROR: Discrepancy with setpoint value more than 25 % |
The control system and hydraulic system must be in equilibrium for the steady state, see remarks |
Target below lowerbound, anti-reset windup provision activated |
Informative |
Target above lowerbound, anti-reset windup prov. de-activated |
Informative |
Target above upperbound, anti-reset windup provision activated |
Informative |
Target below upperbound, anti-reset windup prov. de-activated |
Informative |
Examples
The following example shows the use of the PID controller:
