If the best phase measurements are to be achieved, phase-stepping meth
ods need algorithms that are (1) insensitive to the harmonic content o
f the sampled waveform and (2) insensitive to phase-shift miscalibrati
on. A method is proposed that permits the derivation of algorithms tha
t satisfy both requirements, up to any arbitrary order. It is based on
a one-to-one correspondence between an algorithm and a polynomial. Si
mple rules are given to permit the generation of the polynomial that c
orresponds to the algorithm having the prescribed properties. These ru
les deal with the location and multiplicity of the roots of the polyno
mial. As a consequence, it can be calculated from the expansion of the
products of monomials involving the roots. Novel algorithms are propo
sed, e.g., a six-sample one to eliminate the effects of the second har
monic and a 10-sample one to eliminate the effects of harmonics up to
the fourth order. Finally, the general form of a self-calibrating algo
rithm that is insensitive to harmonics up to an arbitrary order is giv
en.