Best practice for calculating phase from a lock in amplifier

Discussion in 'General Electronics Chat' started by jfinephd28, Aug 25, 2015.

  1. jfinephd28

    Thread Starter New Member

    Aug 24, 2015

    I am looking for a reference on the "correct" or "standard" method compute the phase from the X and Y output from a lock in amplifier.

    In general, I believe the X and Y signals are centered around 0 V. This, however, causes issues when computing phase because when only noise is fed to the input, the ratio of Y/X can become very large as the X value jumps back and forth across 0 V. My goal is to mitigate such singularities by subsequently digitizing my X and Y signals and then performing the calculation digitally. Or perhaps digitizing the original input and performing all computations digitally, including X and Y.

    For example, If I add an offset to the X output after I digitize it, and then take the ratio Y/X, it will prevent such large phase swings when there is no signal. The question is "What is the best offset to use?"

    Thanks in advance
  2. crutschow


    Mar 14, 2008
    Generally using a comparator to digitize a noisy AC signal will make the phase deviations worse, so I don't see how that will help. :confused:
    The only way I can see that it might work is if you average a great many of the digital signals before you compute the phase.
  3. jfinephd28

    Thread Starter New Member

    Aug 24, 2015
    Digitizing may introduce more noise but there is added value if you can mitigate the quotient calculation. There has to be a way to do this. In a analog lock in, the phase output rails back and forth because you are basically dividing by zero most of the time. In some digital lock-in amplifiers I have seen this is not the case and I can only assume that they are somehow monitoring or compensating for this issue.
  4. jfinephd28

    Thread Starter New Member

    Aug 24, 2015
  5. DickCappels


    Aug 21, 2008
    The way I did that was to take two measurements, the second measurement with the reference signal shifted 90° out of phase with that of the first. The arc-tangent of the ratio is the phase difference of the incoming signal compared with the reference signal.

    Of course averaging many measurements before taking the ratio helps in the presence of noise.