PID Control Fomula
PID Formula :
[Forward Action]
MVn = MVn-1 + Kp{(En–En-1) + (Ts/Ki)En + (Kd/Ts)(2PVnf-1–PVnf–PV nf-2)}
En = SV – PVnf
[Reverse Action]
MVn = MVn-1 + Kp{(En–En-1) + (Ts/Ki)En –(Kd/Ts)(2PVnf-1–PVnf–PV nf-2)}
En = PVnf– SV
[Filtered Present Value]
PVnf = PVn + α(PVnf-1 – PVn)
En : Currently Sampling Deviation
En-1 : Deviation at an Interval before
Kp : Propotional Integer
Ki : Integral Integer
Kd : Differential Integer
Ts : Sampling Interval
α : Filter Coefficient
MVn : Present manipulation value
MVn-1 : Manipulation value of the preceding sampling cycle
SV : Set Value
PVn : Process value of the present sampling cycle.
PVnf : Process value of the present sampling cycle (after filtering).
PVnf-1 : Process value of the preceding sampling cycle (after filtering).
PVnf-2 : Process value of the sampling cycle two cycles before (after filtering).