PID loop for AB plc
PID loop for AB plc
(OP)
I have to write a PID algorithim for an AB plc (with out using the pid function) The P term is fine but i am having problems with the integral and derivitve terms any suggestions on how to go about programming these???
RE: PID loop for AB plc
P=Proportional, control response proportional to error.
I=Integral, the control response is proportional to the "area" of error versus time. A simple calculation would be to periodically (e.g. once per second) calculate error, and accumulate the error in a register. The value of the register would represent the product of error and time, giving a representation of integral error.
D=derivative, effectively is the error moving closer or further away from the setpoint. Another way of looking at it is the slope of the control parameter. This could be calulated by measuring the control parameter periodically, and subtracting successive measurements.