fixed PID controller (setpoint variable bug)