Methods for improving the accuracy of occlusion sensor baselines in an infusion pump are described. An infusion pump includes logic for making an antiratchet decision for determining whether a new administration set was installed after there has been access to the administration set. If so, then new occlusion sensor baselines are established. If not, then the current baselines are maintained. The antiratchet decision logic may depend upon the value of a baseline delta equal to a difference between the upstream sensor signal and the downstream sensor signal. In another aspect, an upstream occlusion sensor baseline is shifted in correspondence with decreases in the upstream sensor signal occurring while a pumping mechanism of the infusion pump is not operating to compensate for sensor signal drift.