A method in detecting of a vital sign comprising at least one of a heart rate and a respiratory rate of a subject is provided, the method comprising: transmitting (902) a radio frequency signal towards the subject; receiving (904) a reflected signal from the subject, wherein the transmitted signal is reflected by the subject and Doppler-shifted due to at least one of the heart rate and the respiratory rate to form the reflected signal; mixing (906) the reflected signal with a first reference signal; providing (908) a vital sign carrying signal based on the mixing to a first input of a phase or frequency comparator (146; 246); generating (910) an adjustable second reference signal and providing the reference signal to a second input of the phase or frequency comparator (146; 246); generating (912) an output signal by the phase or frequency comparator (146; 246); and varying (914) at least one of a phase and a frequency of the adjustable second reference signal based on the output signal to track a phase or frequency of the vital sign carrying signal.