I have designed following circuit of a zero-crossing detector, which is supposed to amplify small sine wave signal and convert it to (digital) square wave. It uses one single supply op amp for amplification and one comparator for converting to logic levels.
Initially, I started simulating this circuit with 1mV p-p input signal with no phase shift. In this case it works fine, output of the comparator is a nice square wave with 50% duty cycle.
Then I introduced a phase shift of 90 deg, via the Phi parameter of the V2 supply. Immediately, I noticed some unexpected behavior. The duty cycle of the square wave increased to about 51.8% - that means almost 4% difference between length of positive and negative pulse. After some investigation, I found that the amplified sine wave shifted a bit towards zero and is not perfecly centered around Vbias anymore. It shifted about 0.3 mV (6% of amplitude).
Any idea, why introducing a phase shift at the input caused voltage shift of the amplified sine wave?