previous page next page reference home emBASIC home page

15.3.1 Regulator functions
15.3.1.1 PID
PID regulator function with a long parameter set:
Y = PID(Y,E,E1;E2,KP,KD,KI,YU,YL,YD,AC)
E is difference (input value)
E1 and E2 are last difference and the one before
KP is proportional factor
KD differential factor
KI integral factor
YU and YL are upper and lower bounds for regulating variable (output)
AC is the accumulator (to be able to clear it)
15.3.1.2 SPID
As above but speed algorithm.
15.3.1.3 PI
As above but PI only
15.3.1.4 SPI
As above but speed algorithm