Hi Usually when a lock-in amplifier is introduced to students, it is done when the input signal is a harmonic function and the reference is one as well. This is a nice concept, and it is easy to see how a DC-term propotional to the (desired) incident amplitude can be obtained. My question is, say my input signal is a square wave. Then I can decompose it into a Fourier series. I was wondering how to get a DC-term containing the incident amplitude out via phase sensitive detection in this case. What I would say is that I can decompose the input signal and reference into their respective Fourier series. They will have the same harmonics. Then I would mix them, and this would give me a DC-component for each harmonic in the Fourier expansion. Is this the explanation? Best, Niles.