Hybrid, analog loop, reference compensated by digital loop