Better tachometer control with PID algorithm