I have a nonlinear (blackbox) system which gets a singular frequency (f) signal as input:
input = A*sin(2*pi*f) + B
And I get an output signal, which has oscillations + unknown trend that looks like this:
My question is what would be the best way to extract the phase between the two signals? Are there specific methods for extraction of phase in nonlinear systems? In the case of detrending the output, is there a robust method to do it that ensures not altering the phase while detrending?
I hope this is the right place for this question, if not I will take it somewhere else.