I have an RC circuit to which I give sinusoids to recover the impedance. When I give the sinusoids alone, the impedance is recovered by dividing the FFT of voltage by FFT of current. But, when I superimpose the sinusoids over a DC value (large compared to the sine), the results are completely different. I have tried detrending the data and considering the FFT from the second point onwards separately, but none of them help. Why does this happen and how might I remove this effect?