Chapter 10 Built-in PID Functions
10 - 21
10.6 Convenient Additional Functions of PID Instructions
This section describes additional functions that can be conveniently used in combination with the PID instructions.
10.6.1 Various PID-based control methods
Commonly used among PID controls are P control, PI control, PD control and PID control. When a certain
feature (mostly stabilization) is required, ID control, I control or D control is often used though they are
somehow more complicated. To implement these various controls, PIDRUN includes functions that allow or
prevent controls by P, I, and D, respectively. In case of P control, the P controller can be configured by
setting _PIDn_Ti and _PIDn_Td to 0. Similary, the ID controller can be obtained by setting _PIDn_Kp to 0
and assigning ID control coefficients to _PIDn_Ti and _PIDn_Td.
One special thing about the PIDRUN instructions is that, in case of ID control, setting _PIDn_Kp to 0
theoretically results in the controller output of 0. (Refer to Expressions 10.3.2 ~ 10.3.5) Actually, however,
PIDRUN, if 0 is input to _PIDn_Kp, internally calculates as MVp = 0 and K_p = 1, thus enabling ID, I control
and D control.
For example, when PI control is required, only _PIDn_Kp and _PIDn_Ti are set and 0 is input to _PIDn_Td.
When ID control is required, _PIDn_Kp is set to 0 and only _PIDn_Ti and _PIDn_Td are set.
10.6.2 Operation and function of anti wind – up
PIDRUN provides 2 Wind-up prevention functions: Anti Wind-up 1 and Anti Wind-up 2. The more basic of
the two, Anti Wind-up 1 operates for all I-related controls - I control, PI control, ID control and PID control -
and cannot be cleared. This operates by limiting Mvi (the integral term results) using _PIDn_MV_max,
_PIDn_MV_min.
Aniti Wind-up 2 is organically connected to MVp (the proportional term results). In case MV reaches
土
(_PIDn_MV_max) on MVp only, regardless of the MVi and MVd values, due to a large system error, Mvi
does not perform a calculation but keeps the previous value. In case the error is large, PV is brought near
SV (operating point) by MVp, not by Mvi or MVd, and then I control is resumed to prevent and excessive
value from being entered into Mvi. The operation of Anti Wind-up 2 can be cleared by the user by setting the
_PIDn_AW2D bit on the common bit area to On. This operates only during PI control or during a control
combining P control and I control, e.g. PID control.
10.6.3 Operation and function of Auto-tuning (AT)
PIDRUN has an AT function that enables to test operate the system though several basic settings and
calculate _PIDn_T_s, _PIDn_K_p, _PIDn_T_i and _PIDn_T_d appropriate for the system. The values of
_PIDn_MV_min, _PIDn_MV_max, _PIDn_AT_HYS_val, and _PIDn_AT_SV should be set before AT.
Based on these values, the AT function sets and operates MV over 3 different times in order, examines the
repeated system state (PV) reaction, measures the time taken for the system state (PV) to reach the AT Set
Value ( (AT_SV) and the vibration level, and accordingly calculates _PIDn_T_s, _PIDn_K_p, _PIDn_T_i and
_PIDn_T_d. To calculate the exact tuning value, please refer to “AT Setting” in1.7.4 for proper AT operation.
Note
Deletion of Previious Data upon Completionof Auto-tuning (AT)
When the AT operation described in 10.6.3 is completed, the new values of _PIDn_T_s, _PIDn_K_p,
_PIDn_T_i and _PIDn_T_d are automatically substituted for the existing values. Note, therefore, that
the previous value of _PIDn_T_s, _PIDn_K_p, _PIDn_T_i and _PIDn_T_d are deleted.