Combined error signal in Ramsey spectroscopy of clock transitions