Compensation circuit in speed feedback loop