---
title: "Lock-In Amplifier Interactive Lab | Sandbox Physics"
description: "How can a periodic signal smaller than the noise still be measured? A lock-in multiplies the input by a known rhythm, then averages."
canonical_url: "https://sandboxphysics.com/labs/lock-in-amplifier/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/lock-in-amplifier/"
last_modified: "2026-10-29"
---

IN13 · Keep the rhythm

# Lock-In Amplifier

**How can a periodic signal smaller than the noise still be measured?** A lock-in multiplies the input by a known rhythm, then averages. A signal in step leaves a steady component; rapidly changing noise tends to cancel. Longer averaging narrows the noise band but delays changes. Interference at the same rhythm remains.

Turn the reference dial and follow two filtered channels. Compare waiting times on the same noisy capture, then try beats and coherent interference.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Turn the reference knob on the instrument. The two channels keep signals in step with that reference.

Reference frequency$32\,\mathrm{Hz}$ Reference phase$0\,\mathrm{deg}$ Time constant per pole$0.2\,\mathrm{s}$ Signal detuning$0\,\mathrm{Hz}$

A default acquisition is loaded.

Source, noise, input range and filter

Cascaded RC poles Signal RMS voltage$0.003$ Signal starting phase / degrees$30$ White noise density$0.0006$ Coherent interferer RMS voltage$0$ Interferer starting phase / degrees$90$ ADC bipolar range / V$0.2$ Random seed$186$

Voltages are RMS for sinusoids. Noise density is in volts per square root hertz, white up to the sampled Nyquist frequency. Changing frequency or range needs a new known-standard calibration.

$$
u_X=\sqrt{2}v\cos\theta,\quad u_Y=-\sqrt{2}v\sin\theta
$$

Model assumptions

RMS-scaled dual-phase detection with recorded cosine references, an 18-bit symmetric ADC at 1024 samples/s and cascaded held-input RC filters. A separate known sine calibrates gain, offset and phase at the saved reference frequency and range. The fixed input delay leaves an additional phase on detuned tones. No PLL dynamics, synchronous notch filter, source loading, analog anti-alias circuit or commercial performance is modeled. White noise is defined below sampled Nyquist; deterministic tones stay below it. Magnitude is positively biased near the noise floor. Same-frequency coherent interference is inseparable from the target. Saved outputs come only from saved ADC codes, reference samples and calibration. Pulse speed is schematic; the apparatus uses planar wiring.

Simulated ADC observations

## Two averages from the same noisy samples

Saved acquisition

In-phase output $2.60\,\mathrm{mV}$

Quadrature output $1.50\,\mathrm{mV}$

Output magnitude $3.00\,\mathrm{mV}$

Output phase at record end $30.0^{\circ}$

Bandwidth, calibration and saved metadata

The current controls preview a new setup. Saved traces retain their original phase, clock, range, filter, seed and independently acquired standard. X and Y are instantaneous filtered RMS-scaled components at the last sample. A detuned component keeps rotating; this phase is not a fixed recovered signal phase. The average magnitude of noise is positive. Last-second scatter includes drift and beats and is not a confidence interval.

$$
H(z)=\left(\frac{1-a}{1-az^{-1}}\right)^p,\quad a=e^{-1/(f_s\tau)}
$$

Model and primary source

A teaching instrument with an 18-bit symmetric ADC at 1024 samples/s, a fixed gain and delay, and ideal recorded quadrature references. Each low-pass pole uses the exact held-input RC recursion from zero initial state. This is not an SR850 firmware emulation. All plotted samples are retained observations; no synchronous notch filter, PLL dynamics, source loading, analog anti-alias circuit or commercial accuracy is modeled. Deterministic tones stay below Nyquist; sampled white noise is defined within that band. A scalar phase calibration is valid at its saved reference frequency; detuned tones retain the additional delay at their offset. Coherent same-frequency interference adds to the target and cannot be separated by this reference alone. Wire pulses encode instantaneous voltage; their speed is schematic.

[SRS SR850 manual, Rev. 2.0 (01/2009), pp. 3-1–3-3, 3-11–3-12, 3-19–3-20, 3-27–3-28](https://thinksrs.com/downloads/PDFs/Manuals/SR850m.pdf)

Physics tutorial

## A reference turns an oscillation into a slow voltage

**Background** The pickup sends a small periodic voltage mixed with broadband noise. Two multipliers compare it with a known reference and its quarter-cycle companion.

**Why it matters** Increasing gain amplifies noise too. Choosing a narrow band around the reference can reveal the periodic component.

Start with the essentials

- **Focus question**: How can a periodic signal smaller than the noise still be measured?
- **One-sentence intuition**: A component in step with the reference leaves a steady product that survives averaging.

### Core mathematical model

#### RMS-scaled quadratures

$$
X=V_{\rm rms}\cos(\phi_s-\phi_r),\qquad Y=V_{\rm rms}\sin(\phi_s-\phi_r)
$$

For a settled same-frequency sinusoid, the cosine reference and negative-sine reference produce two signed components. A leading signal gives positive quadrature.

#### Each sampled low-pass stage

$$
y_n=ay_{n-1}+(1-a)u_n,\qquad a=e^{-1/(f_s\tau)}
$$

The sample rate and time constant determine the pole. Several identical stages reduce noise further and take longer to respond.

#### Discrete noise bandwidth

$$
B_{\rm ENBW}=\frac{f_s}{2}\sum_{n=0}^{\infty}h_n^2
$$

The impulse response of the actual sampled filter determines its one-sided noise bandwidth. This differs from its half-power frequency.

### Common difficulties

#### Averaging limits

**Typical misconception** Longer averaging removes every unwanted signal.

**Better mental model** It attenuates components away from the reference. A coherent component at the same frequency remains, and genuine changes are delayed.

#### Magnitude bias

**Typical misconception** A positive magnitude proves a periodic signal.

**Better mental model** Magnitude is nonnegative, so noise gives a positive average too. Compare signed quadratures and their stability.

### Run the experiment

1. 01

   #### Turn the physical reference knob

   Drag the green phase knob, then save a capture.

   **What to observe:** The components rotate between the two channels. Their combined magnitude stays nearly fixed for a clean same-frequency input.

2. 02

   #### Compare the same noisy input

   Choose Buried signal and inspect the solid and dashed outputs.

   **What to observe:** The dashed curves use a shorter time constant on the identical raw samples. They react faster and fluctuate more.

3. 03

   #### Detune the signal

   Choose A slow beat.

   **What to observe:** The output rotates continuously. Its final phase describes one recorded instant, not a fixed source phase.

4. 04

   #### Check the limits

   Compare Coherent impostor and Noise alone.

   **What to observe:** A coherent interferer survives averaging. Noise alone also has a positive average magnitude.

5. 05

   #### Recalibrate a new range

   Change input range, acquire the known standard, then save a new capture.

   **What to observe:** The new acquisition freezes that separate standard. Older records and exports retain their original calibration.

Physical conclusion

Keep both quadratures, the raw input and the reference; distinguish a steady result from a detuned beat.

## Related experiments and articles

How physics instruments measure · Reading path

### How physics instruments measure

Articles on this path that use this experiment, followed by the other experiments they suggest.

1. [Article **How a lock-in amplifier finds a signal buried in noise**](https://sandboxphysics.com/stories/instruments/lock-in-amplifier/)

Fields & matter · Starter path

## From a field to an electron microscope

Map an electric field and steer a charged particle. Then find the electron's wavelength and use electron beams to see a crystal and a surface.

[Start here → **Make an Electric Field Visible** Move the probe around a dipole and check that the field always points downhill on the potential landscape. Observe · 8 min](https://sandboxphysics.com/labs/electric-field/)

1. [1 Make an Electric Field Visible](https://sandboxphysics.com/labs/electric-field/)
2. [2 A Charge Bending through Fields](https://sandboxphysics.com/labs/charged-particle/)
3. [3 Electron Wavelength & Voltage](https://sandboxphysics.com/labs/electron-wavelength/)
4. [4 Electron Diffraction & Reciprocal Space](https://sandboxphysics.com/labs/electron-diffraction/)
5. [5 TEM Bright Field, Dark Field & SAED](https://sandboxphysics.com/labs/tem-mode-selector/)
6. [6 SEM Secondary-Electron Topography](https://sandboxphysics.com/labs/sem-topography/)

[View the full path →](https://sandboxphysics.com/topics/fields-and-matter/#starter-path)
