Discrete PID Controller

A discrete PID controller will read the error, calculate and output the control input at a given time interval, at the sample period T. The sample time should be less than the shortest time constant in the system.