Tracking loop arranged for offset compensation, the tracking loop comprising : - an error signal generation block arranged for receiving an input signals obtained by scanning an array of position sensing elements, said input signal being a periodic functions of an input phase ( θ i ) and impaired with offset from one or more of said position sensing elements, and a feedback signals which is a periodic functions of an output phase ( θ o ) and for generating with a phase detector from said input signal and said feedback signals a phase error signal indicative of an error between said input phase and said output phase, - means to combine said phase error signal with an offset compensation signal ( Ê ), yielding an offset compensated phase error signal, - a loop filter arranged to receive said offset compensated phase error signal and to derive from said offset compensated phase error signal said output phase ( θ o ) - an offset compensation block arranged for receiving said output phase ( θ o ) and for determining said offset compensation signal ( Ê ), said offset compensation signal being a periodic function of said output phase and being an estimation of an error contribution (E) to said phase error signal caused by said offset from said one or more of said position sensing elements, said error contribution (E) in said phase error signal given by : E = V 0 + V 1 cos θ o + V 2 sin θ o where V 0 is a coefficient representing an overall offset of the phase detector and V 1 and V 2 are coefficients accounting for said offset from the one or more of said position sensing elements, and said offset compensation signal Ê given by E ^ = V ^ 0 + V ^ 1 cos θ o + V ^ 2 sin θ o wherein V̂ 0 , V̂ 1 and V̂ 2 are estimations of said V 0 , V 1 and V 2 . - an error signal generation block arranged for receiving an input signals obtained by scanning an array of position sensing elements, said input signal being a periodic functions of an input phase ( θ i ) and impaired with offset from one or more of said position sensing elements, and a feedback signals which is a periodic functions of an output phase ( θ o ) and for generating with a phase detector from said input signal and said feedback signals a phase error signal indicative of an error between said input phase and said output phase, - means to combine said phase error signal with an offset compensation signal ( Ê ), yielding an offset compensated phase error signal, - a loop filter arranged to receive said offset compensated phase error signal and to derive from said offset compensated phase error signal said output phase ( θ o ) - an offset compensation block arranged for receiving said output phase ( θ o ) and for determining said offset compensation signal ( Ê ), said offset compensation signal being a periodic function of said output phase and being an estimation of an error contribution (E) to said phase error signal caused by said offset from said one or more of said position sensing elements, said error contribution (E) in said phase error signal given by : E = V 0 + V 1 cos θ o + V 2 sin θ o where V 0 is a coefficient representing an overall offset of the phase detector and V 1 and V 2 are coefficients accounting for said offset from the one or more of said position sensing elements, and said offset compensation signal Ê given by E ^ = V ^ 0 + V ^ 1 cos θ o + V ^ 2 sin θ o wherein V̂ 0 , V̂ 1 and V̂ 2 are estimations of said V 0 , V 1 and V 2 . where V 0 is a coefficient representing an overall offset of the phase detector and V 1 and V 2 are coefficients accounting for said offset from the one or more of said position sensing elements, and said offset compensation signal Ê given by E ^ = V ^ 0 + V ^ 1 cos θ o + V ^ 2 sin θ o wherein V̂ 0 , V̂ 1 and V̂ 2 are estimations of said V 0 , V 1 and V 2 . <EOS>