Chapter 6 Applied Instructions a) The PID algorithm includes the forward action and the reverse action. Whether the action is the forward one or the reverse one depends on the setting of PID_DIR . The PID algorithm is as follows. ( ) dt t dE K dt t E K t E K MV D 0 + + = ∫ I P ) ( * ) ( t E(t)S represents the derivative value of E(t), and ( ) S 1 t E represents the integral value of ( ) t E . Control diagram: S represents the derivative action, and is defined as (Current E(t)-previous E(t))/Sampling time. 1/S represents the integral action, and is defined as (Previous integral value+Error value) Ч Sampling time. G(S) represents the plant. The instruction PID is inside the dotted line.
The symbols: MV : Output value ( ) t E : Error value Forward action ( ) SV PV t E − = Reverse action ( ) PV SV t E − = P K : Proportional gain PV : Process value SV : Target value D K : Derivative gain I K : Integral gain Suggestion: 1. Owing to the fact that the instruction PID can be used in a lot of controlled environments, users have to choose the control function appropriately. For example, to prevent the improper control from occurring, PID_MODE can not be used in the motor controlled environment when it is set to 1. 2.
When users tune the parameters K P , K I , and K D ( PID_MODE is set to 0 or 2), they have to tune the K P first (according to the experience), and then set set the K I and the K D to 0. When users can handle the control, they can increase the K I and the K D , as illustrated in example four below. When the K P is 100, it means that the proportional gain is 100%. That is, the error value is increased by a factor of one. When the proportional gain is less than 100%, the error value is decreased. When th proportional gain is larger than 100%, the error value is increased.
6-177 Action direction PID algorithm Forward action E(t )=PV(t )-SV(t ) Reverse action E(t )=SV(t )-PV(t ) 1/S 1/K I + + + 1/K P - + S K D G(s)