Lock-in detection
How modulating a signal and then extracting only its component at the reference frequency lets a lock-in amplifier measure tiny signals buried in noise.
What it is
Lock-in detection, also called phase-sensitive detection, is a technique for measuring very small signals in the presence of much larger noise. The experiment is arranged so that the signal of interest varies at a known reference frequency, for example by chopping a light beam or modulating a voltage. A lock-in amplifier then multiplies the measured signal by the reference and averages the result, which keeps only the part of the signal at that frequency and phase, and rejects almost everything else. Signals of nanovolts can be recovered from noise a million times larger.
It answers questions such as: How large is this weak optical, electrical, magnetic or thermal response? What is its amplitude and its phase relative to the stimulus? How does it change with frequency or with another variable? Lock-in detection is a basic tool in spectroscopy, scanning probe microscopy, impedance and transport measurements, photodetection, magnetometry, thermal and acoustic experiments and many sensors.
Fundamentals
Noise and the idea of modulation
Many instruments suffer from 1/f noise, which dominates at low frequency, and from drift and pickup at the mains frequency (50 or 60 Hz). Moving the signal to a higher frequency where noise is lower, and then detecting it in a very narrow band, greatly improves the signal-to-noise ratio. The lock-in acts as an extremely narrow band-pass filter centered on the reference frequency, whose width can be fractions of a hertz and which tracks the reference automatically.
Phase-sensitive detection
Suppose the input is Vs cos(ωr t + θ) and the reference is cos(ωr t). The lock-in multiplies them in a mixer:
Vs cos(ωr t + θ) · cos(ωr t) = (Vs/2) [cos θ + cos(2ωr t + θ)]
A low-pass filter removes the 2ωr term, leaving a DC output proportional to Vs cos θ. Noise at other frequencies mixes to frequencies away from DC and is removed by the filter. A dual-phase lock-in also multiplies by a 90°-shifted reference (sine) to obtain the quadrature component Vs sin θ, so that
X = Vs cos θ, Y = Vs sin θ, R = √(X2 + Y2) = Vs, θ = arctan(Y/X)
give the in-phase and quadrature components, amplitude and phase. Therefore the result does not depend on the phase between the signal and the reference, and the phase itself is a useful measurement (for example, separating resistive and capacitive responses).
Time constant, filter and bandwidth
The low-pass filter has time constant τ and roll-off of 6 to 24 dB per octave (one to four poles). The equivalent noise bandwidth is Δf ≈ 1/(4τ) for a single-pole filter (and 5/(64τ) for four poles at 24 dB/oct, so narrower for the same τ). A longer τ reduces noise as 1/√τ but slows the response, so the settling time (about 5τ for a one-pole filter, or several times τ for steeper filters) must be waited out after each change in the experiment, for instance, before recording a point in a sweep. The noise of the measurement is approximately en √Δf, where en is the input noise density in V/√Hz.
Digital and analog lock-ins
Modern lock-ins digitize the input with a fast analog-to-digital converter and perform the mixing, filtering and reference generation digitally (DSP or FPGA), covering from millihertz to hundreds of megahertz, with dynamic reserve of more than 100 dB. Dynamic reserve is the ratio of the largest noise (or interfering signal) that can be tolerated to the full-scale signal without overload, which is important, since a large unwanted signal at another frequency can saturate the input amplifier even if the filter would remove it. Input stages offer voltage and current inputs, differential or single-ended, with low-noise preamplifiers and notch filters at the mains frequency.
Harmonic detection and applications
A lock-in can detect at harmonics (nfr), which is useful for derivative spectroscopy (wavelength modulation spectroscopy gives the first and second derivative of an absorption line in tunable diode laser sensing), for nonlinear responses (the second harmonic of a voltage measuring nonlinear conductance, or the third harmonic for thermal conductivity in the 3ω method), and for scanning probe techniques such as Kelvin probe and piezoresponse force microscopy. Other uses include optical chopping with photodetectors, AC resistance and Hall measurements, differential conductance dI/dV in tunneling, and AC susceptibility. Boxcar averagers handle pulsed signals, while lock-in handles continuous modulation.
Typical applications and limits
Limits include the need for a modulated signal (a static signal needs a chopper or a modulation scheme), sensitivity to reference jitter and phase drift, pickup of modulation-related artifacts (such as electrical crosstalk from the modulator that gives a false signal), and trade-offs between speed and noise. The measured signal is also affected by the frequency response of the sensor and cables, which causes phase shifts that must be calibrated.
Basic operation
- Modulate the experiment. Chop the light, apply an AC excitation or modulate a parameter at a frequency away from 50/60 Hz and their harmonics and from 1/f noise (often 100 Hz–10 kHz).
- Provide the reference. Use the modulator’s reference output, or an internal oscillator that also drives the excitation.
- Connect the input. Use shielded cables, appropriate input mode (voltage or current, differential or single-ended) and grounding.
- Set sensitivity and dynamic reserve. Adjust the gain so that the signal is on scale without overload, with the overload indicator off.
- Adjust the phase. Use auto-phase, or rotate the phase so that the signal is in X and Y is near zero.
- Choose time constant and roll-off. Pick τ for the required noise and speed, and wait at least five time constants before reading.
- Record. Read X, Y, R and θ while sweeping the variable of interest.
- Collect the output. You obtain amplitude and phase versus the swept variable; noise estimation and artifact checks are covered in the video.
Good practice
- Choose a quiet reference frequency. Avoid mains harmonics and resonances.
- Wait for settling. Reading too early distorts sweeps.
- Check for overload. Never trust data with the overload light on.
- Test for artifacts. Block the signal path and confirm the output drops to the noise floor.
- Minimize pickup. Use shielding, twisted pairs and a single ground point.
- Observe electrical and optical safety. Use proper insulation with high-voltage excitation, and wear laser eyewear when chopping laser beams.
Key terms
- Reference frequency — the modulation frequency at which the signal is detected.
- In-phase (X) and quadrature (Y) — signal components aligned with and 90° from the reference.
- Time constant (τ) — the response time of the output low-pass filter.
- Equivalent noise bandwidth — the effective bandwidth of the detection filter.
- Dynamic reserve — the ratio of tolerable interfering signal to the full-scale signal.
- Harmonic detection — detection at an integer multiple of the reference frequency.
- Phase-sensitive detection — detection that depends on the phase relative to a reference.
Video coming soon
About five minutes on Lock-in detection: how it works in detail, how the data is acquired, and how it is analyzed.
More in 2.10 Engineering Testing and Measurement
- Modal and vibration analysis
- Fatigue and fracture testing
- Non-destructive testing (ultrasonic, radiographic, eddy current, acoustic emission, infrared thermography, magnetic particle, dye penetrant)
- Digital image correlation
- Strain gauge measurement
- Wind tunnel testing
- Particle image velocimetry
- Laser Doppler velocimetry
- Hot-wire anemometry
- Structural health monitoring
- Condition monitoring
- Vector network analysis (RF)
- Antenna measurement
- Optical fiber characterization
- Lock-in detection
