Acessibilidade / Reportar erro

The lock-in amplifier: what is it for? how to build one?

Abstract

A short description of the lock-in technique gives an idea of the working principle of these useful devices, that are spreadly used in weak signals detection, but rarely treated in introductory courses. Simple and cheap circuits, that may be easily assembled by the student are suggested, as a practical approach to this powerful technique.

Keywords:
Lock-in; phase-sensitive detector; signal recovery


1. Introduction

The progress of technology and science in recent decades has increasingly been accompanied by an effort to improve the accuracy of the measurements, and this has led the experimenter to seek new methods to reduce the causes of error.

The Lock-In Amplifier (LIA) is an instrument (it would perhaps be more accurate to say a method of manipulating signals) which in recent years has conquered practically all sectors where high precision in measurement is required, but it still rarely appears in didactic texts [1[1] P.A. Temple, Am. J. Phys. 43, 801 (1975)., 2[2] R. Wolfson, Am. J. Phys. 59, 569 (1991).].

For this reason, it seemed useful to offer here an essential description of this technique, which is in many cases irreplaceable, also showing, through simple examples of circuits that anyone can build on their own, how it is not so difficult to use it.

This article is aimed at two categories of readers: on the one hand (Sections 2 2. Signals and Their Fourier Series Decomposition A signal is any physical quantity that can be used to transfer information: depending on the characteristics to be highlighted, one can distinguish between analog or digital, periodic or aperiodic signals. The examples that can be done are numerous: acoustic signals (pressure waves), optical signals (intensity of illumination, succession of light and dark intervals, direction of the polarization plane), electrical signals (modulation in current, in voltage, in frequency). To remain in the context of electrical voltage signals only, without losing generality, since it is always possible to convert a signal of another type into an electrical potential difference, we can distinguish between analog signals in direct voltage, also called DC signals, or continuously variable over time, also called AC signals, and signals which assume instead only discrete voltage values (typically two), called digital signals. For digital signals what carries the information is the sequence of discrete values (usually two), information that is not lost if these values are affected by a small error, at least as long as the signal detector is able to distinguish between the two different values. For analog signals, the information is instead largely contained in the form of the signal, which can be more easily distorted by the presence of a disturbing signal (noise). The “noise” can therefore be defined as a signal, not originating from the source we are interested in, which overlaps what we want to reveal, sometimes completely obscuring it: in this case we speak of too small a value of the signal/noise ratio (S/N). To see the question a little better, however, the signal must be characterized not only in terms of amplitude, but also in terms of frequency. That is, its dependence on time must be taken into consideration. Let us first consider a periodic signal, that is, one that repeats itself after a certain time interval T, called period (an aperiodic signal can always be seen as a periodic signal with an infinite period). A simple signal of this type is the sinusoidal one: V⁢(t)=VM⁢sin⁢ω⁢t, where VM is the amplitude and ω=2⁢π/T the angular frequency (ω=2⁢π⁢f, where f is the frequency). Since mathematical analysis allows us to decompose a periodic function of any type into a sum of a (finite or infinite) number of sinusoidal terms of suitable amplitudes and frequencies (Fourier’s theorem), we can always think of any signal as constituted by superposition of its sinusoidal components. A diagram showing the frequency on the abscissa and the amplitude of the Fourier components on the ordinate is called the signal spectrum. For example, the spectrum of a signal that faithfully reproduces the sound of a tuning fork will essentially consist of a line centered on the fundamental frequency of the tuning fork, while a signal produced by my voice that reads these lines will have a much more complicated spectrum, with a fairly large distribution. extended on the audible frequencies. If we record our voice and the sound of the tuning fork at the same time, the resulting signal is the sum of the two, and we can alternatively consider one or the other as noise. If now we want to “clean” the signal of the tuning fork from the “noise” of our voice we would have to remove all the lower and higher frequency components than the mechanical resonance of the tuning fork, that is, we would have to pass the signal through a pass-band filter. Conversely, if we want to eliminate the sound of the tuning fork, now seen as noise, from the recording, we have to pass the signal through a stop-band filter, which removes only the fundamental frequency of the tuning fork, leaving the sound of our voice practically intact. > 7 7. The Synchronous Switch as a Multiplier for Square Wave We can re-examine the operation of the first circuit by thinking of the diverter as a multiplier of the V signal for a square wave with an amplitude oscillating between 0 and 1 (i.e. for a VR signal that is zero in one half-period and one in the other half-period). A generic periodic signal, with period T=2⁢π/ωR can be decomposed into a Fourier series as: (4) V ⁢ ( t ) = a 0 + ∑ n = 1 ∞ a n ⁢ ( sinn ⁢ ω R ⁢ t + ϕ n ) In the case of the square wave considered by us, a0=1/2, the even coefficients are all zero and the odd ones are an=2/π⁢n. So VR can be written: (5) V R ⁢ ( t ) = 1 2 + 2 π ⁢ ( sin ⁢ ω R ⁢ t + 1 3 ⁢ sin3 ⁢ ω R ⁢ t + 1 5 ⁢ sin5 ⁢ ω R ⁢ t + … ) and the signal V1⁢(t) product of VS⁢(t) and VR⁢(t) becomes: (6) V 1 ⁢ ( t ) = V S ⁢ M 2 ⁢ sin ⁢ ω S ⁢ t + 2 π ⁢ ( sin ⁢ ω S ⁢ t ⁢ sin ⁢ ω R ⁢ t + 1 3 ⁢ sin ⁢ ω S ⁢ t ⁢ sin3 ⁢ ω R ⁢ t + … ) . If here too we impose that the reference signal VR is synchronous with VS, that is ωR=ωS=ωo, in (6) there remains only a term independent of time (or “zero frequency”), the one originating in the product between VS and the fundamental component of VR. This term is the only one that survives after the low-pass filter and we get again the result given by (1), if we also consider a possible phase shift Φ between VS and VR. If we now suppose that the noise VN added to VS has a DC componentVOS, that is, both VN+VS=VOS+VN⁢(t)+VSM⁢sin⁡ω0⁢t (VOS is called offset, or “zero frequency component”), then this component reappears added to the output: (7) ⟨ V 1 ⟩ = 1 2 ⁢ V O ⁢ S + 1 π ⁢ V S ⁢ M ⁢ cos ⁢ ϕ Furthermore, it can be seen from (6) that all odd harmonics (2⁢n-1)⁢ω0 of VS also contribute to ⟨V1⟩, and the bandpass of the lock-in, i.e. the spectrum of the signal measured by ⟨V1⟩, is the one described in Figure 5. Figure 5 Pass band of a lock-in with square wave reference. The width Δ⁢ω of the pass-bands centered at ω0,3⁢ω0,5⁢ω0,… is fixed by the time constant RC of the low pass filter: Δ⁢ω=2/RC. This means that the noise components in VN with pulsation ωi such that |ωi-n⁢ω0|<1/RC, with n odd, cause a modulation of the DC voltage ⟨V1⟩ at the output, and therefore reappear as noise, albeit with a spectrum translated to low-frequency. The lock-in with a square wave multiplier can ultimately be seen as a parallel of infinite lock-ins with a sine wave multiplier, each of which has as its reference signal an odd harmonic of the signal to be detected, of linearly decreasing amplitude with the order of the harmonic. Since the value of the RC time constant of the low pass filter is limited only by the need to obtain reasonable response times τ for the lock-in (τ≈5 RC is the time taken by the output voltage to reach values practically equal to the final ones, starting from the instant in which the amplitude of the VS signal is changed), it is possible to use RC values that are quite large compared to 1/ω0 and thus obtain for the quality factor Q=ω0/Δ⁢ω values of the order of 105. For example, if f=2⁢π/ωo≈10 kHz, it is enough to set RC = 10 s to obtain Q≈105. So far we have considered multiplying VS by a square wave that oscillates between the values 0 and 1 (this is in fact the result of the synchronous switch), but we can also think of multiplying it by a square wave that oscillates between -1 and +1 (using for example an amplifier with gain that switches between -1 and +1 at each half-period). In this case we have in relation (4) ao=0 and an=4/π⁢n, and the square wave is described by: (8) V R ⁢ ( t ) = 4 π ⁢ [ sin ⁢ ω R ⁢ t + 1 3 ⁢ sin ⁢ 3 ⁢ ω R ⁢ t + 1 5 ⁢ sin ⁢ 5 ⁢ ω R ⁢ t + … ] , and the mean value of the product V1⁢(t)=VS⁢(t)⁢VR⁢(t) becomes: (9) ⟨ V 1 ⟩ = 2 π ⁢ V S ⁢ M ⁢ cos ⁡ ϕ This consideration shows us how the circuit can be modified to obtain the elimination of the zero-frequency band, so as to clean the signal from the unwanted “offset” voltage Vos. ) to beginners in electronics who are only interested in knowing what a LIA is and what it is used for, and on the other hand (8 8. The Synchronous Filter Another circuit, which is similar to those examined so far, is the “synchronous filter”, schematically represented in Figure 6. Figure 6 Synchronous filter. Here the reference signal VR is again a square wave, synchronous with the signal to be detected VS, which drives a diverter between two equal capacities: the sum VS+VN, of signal and noise, is integrated separately in the two half-periods by two low-pass filters with the same time constant RC. If VR and VS are in phase, after a certain time, which is proportional to RC, the two capacitors will be charged respectively to the voltages +(2/π)⁢VSM and -(2/π)⁢VSM, corresponding to the average value of VS over each half-period. The output signal will therefore be a square wave with zero mean, synchronous with VS, and of peak-to-peak amplitude proportional to the signal to be detected: V1⁢p⁢p=(4/π)⁢VSM. The noise is substantially averaged to zero as in the previous schemes. The usefulness of this circuit, which is often used together with the lock-in, is better understood if we consider that when one needs to detect a small signal hidden by noise, it is necessary to introduce a very strong amplification, and this presents some drawbacks that can be eliminated precisely by using a synchronous filter. The drawbacks are essentially two: (1) the real amplifiers have a DC voltage at the output even with a null signal at the input (offset), (2) the real amplifiers have a linear zone of finite amplitude, i.e. with too high gains higher signals at the input are cut off (saturation). The signal to be detected can be much smaller than the offset, and therefore if a single amplifier with high gain is used, saturation can also be obtained due to the effect of the offset alone. To overcome this problem, instead of a single amplifier with large gain, several amplifiers in cascade AC coupled, each with limited gain, are usually adopted, and such that the product of the gains of the individual stages provides the desired amplification. In this way, the offset introduced by each stage is cut and is therefore not amplified by the subsequent stages (Figure 7a). Figure 7 Three lock-in amplifier block diagrams. In this configuration, the problem of AC noise still remains, which, amplified more and more at each stage, can still produce saturation in the last stage. In diagram 7b this drawback is eliminated, by filtering the AC noise with the lock-in at the output of the pre-amplifier; however, since the second stage must be DC coupled (the lock-in output is a direct voltage), if it has a very high gain it introduces a large offset that can no longer be separated from the signal. In the diagram of Figure 7c, which uses a synchronous filter after the preamplifier, the noise is filtered, and an AC signal remains, which can still be greatly amplified by the second stage, before being detected by the lock-in, without producing saturation and without offset problems. A last DC stage can further amplify the signal at the lock-in output. This is a configuration that is often adopted in commercial lock-ins. 9 9. Some Practical Schemes Now that we have analyzed the essential characteristics that our lock-in must have (Figure 7c), we can try to build a relatively simple one. Let’s start by considering an amplifier that multiplies the input signal by ±1 in sync with the reference signal. If we use an operational amp to build this amplifier, the simplest scheme at our disposal is the one shown in Figure 8a. Figure 8 Lock-in scheme; a: amplifier with gain ± 1; b: active low-pass filter. This diagram, if the operational amplifier (OA) is considered ideal, it works as an inverting amplifier with the switch closed and as a non-inverting amplifier with the switch open. (In an ideal OA, the open-loop amplifications ± A of the non-inverting and inverting channel can be assumed to be infinite, and the bias currents to be zero.) For the low-pass filter we can adopt an active filter scheme like the one shown in Figure 8a,b which introduces a DC gain at the output. In fact, for this circuit, the transfer function is: (10) V ⁢ ( j ⁢ ω ) = V u V i = - R 0 R i ⁢ 1 1 + j ⁢ ω ⁢ V ⁢ R 0 ⁢ C where -(Ro/Ri) is the DC gain, and ft=1/(2⁢π⁢Ro⁢C) is the cutoff frequency. We now need to build a switch that is VR controlled. The simplest type of electronic switch1 is the one made up of MOSFET transistors and which is marketed under the name of analog-switch: it can be schematized as a variable resistor that is driven by a voltage signal sent to the control electrode (gate), and has a resistance of the order of a few tens of ohms if closed, and a few MΩ if open. It is a very fast switch: the typical switching time is in fact of the order of a microsecond. A problem that may arise with this device is the crosstalk effect (interference) between the command signal and the signal transmitted by the switch. This can be significantly reduced by using optical coupling, i.e. by using a photo-transistor driven by a LED diode. Finally, we show how the single-throw single-pole switch (Figure 9-left) used in Figure 6 for the synchronous filter can be obtained, using two single on/off switches (Figure 9-right) with a common pole controlled in push-pull mode. Figure 9 Scheme for obtaining a single-throw single-pole switch using two on/off switches. In the synchronous filter, to reduce the offset due to the asymmetry of the spikes induced by the control signal VR (square wave), it is advisable to connect the switches to ground (as in Figure 9, instead of as in Figure 6). Ultimately, a practical scheme to create the circuit schematized as blocks in Figure 7c, can be the one shown in detail in Figure 10. Figure 10 Complete schematic of a lock-in. The dashed boxes identify the different blocks. a: preamplifier; b: synchronous filter; c: AC amplifier; d: multiplier; e: low pass filter and DC amplifier; f: double comparator to drive the synchronous filter and the multiplier. Some comments on the values that have been adopted for the active and passive components in the example of Figure 10. Only 6 easily available and inexpensive ICs are used: IC1 and IC2 are low noise OA, IC4 and IC5 are dual OA, IC3 is a quadruple analog switch (of which only three switches are used: two in the block b and one in the block d; in the fourth one, input, output and control are placed to ground) and IC6 a common comparator (with the open collector output closed on a load towards V+). With the gains of preamplifier, AC amplifier and DC amplifier set respectively at 100 (=10 MΩ/100 kΩ), 100 (=100 MΩ/100 kΩ) and 10 (=100 MΩ/1 MΩ), you get an overall gain of 100,000 with which you can easily detect input signals with an amplitude between 1 μV and 50 μV. The circuit described here is not suitable for accurately detecting smaller signals that become comparable with the noise introduced by the effect of the crosstalk spikes. If you want to detect even larger signals (for example up to 5 mV), to avoid saturation conditions, it is better to reduce the gain of the DC amplifiers. (G = 10) and AC(G = 1), leaving the preamplifier gain unchanged. In the diagram in Figure 10, RC filters with time constants suitable for a working frequency f = 30 Hz were used (to avoid mains interference at 50 Hz and higher harmonics): the synchronous filter was calculated for Q≈10 (RC = 0.1 s, Q = πRCf), and the low-pass filter has been sized to provide a time constant RC = 10 s, corresponding to a Q=1000 at the working frequency. The larger time constant between the two is the one that fixes the response time of the instrument to variations in the amplitude of the input signal: a response time of the order of a few seconds is suitable for most uses. The scheme proposed in Figure 10 works correctly for frequencies between a few Hertz and a few hundred Hertz: the lower limit is set by the smallest time constant, which must respect the inequality RC ≫ 1/(2πf), in order to maintain the phase shifts negligible. The upper limit, on the other hand, depends on the turn-on delay times of the switches and on the effect of the spikes produced by the switching: both effects are more noticeable as the frequency increases. The circuit must be calibrated by zeroing the offset at the output of the final amplifier with the input of the preamplifier shorted to ground: in this way both the effect of the IC3 and IC5 offsets and the DC contribution due to the asymmetry of the spikes are eliminated Calibration and linearity check can be more easily performed by adopting a capacitive divider to inject the sinusoidal signal, used as a reference, attenuated by a factor C1/(C1+C2) = 105 at the input, according to the scheme shown in Figure 11a. Figure 11 a: Capacitive attenuator for calibration, b: Block diagram for the detection of the “zeroing” signal of a bridge. A typical application is finally shown in Figure 11: the detection of the residual signal at the balance of a bridge. Since the simple lock-in scheme described here has a single-ended input, it is advisable to power the bridge through a transformer (for example with a unitary turn ratio) and ground one of the two outputs of the bridge. In this way it is no longer necessary to use a differential preamplifier with a high common-mode rejection value at the bridge output, and as a reference signal you can simply use the transformer power supply voltage. ) to electronics enthusiasts who, unwilling or unable to face the high costs of the commercial models of this instrument, want to try to build one that combines the merits of a decent “performance” with that of a negligible cost.

2. Signals and Their Fourier Series Decomposition

A signal is any physical quantity that can be used to transfer information: depending on the characteristics to be highlighted, one can distinguish between analog or digital, periodic or aperiodic signals.

The examples that can be done are numerous: acoustic signals (pressure waves), optical signals (intensity of illumination, succession of light and dark intervals, direction of the polarization plane), electrical signals (modulation in current, in voltage, in frequency).

To remain in the context of electrical voltage signals only, without losing generality, since it is always possible to convert a signal of another type into an electrical potential difference, we can distinguish between analog signals in direct voltage, also called DC signals, or continuously variable over time, also called AC signals, and signals which assume instead only discrete voltage values (typically two), called digital signals.

For digital signals what carries the information is the sequence of discrete values (usually two), information that is not lost if these values are affected by a small error, at least as long as the signal detector is able to distinguish between the two different values.

For analog signals, the information is instead largely contained in the form of the signal, which can be more easily distorted by the presence of a disturbing signal (noise).

The “noise” can therefore be defined as a signal, not originating from the source we are interested in, which overlaps what we want to reveal, sometimes completely obscuring it: in this case we speak of too small a value of the signal/noise ratio (S/N).

To see the question a little better, however, the signal must be characterized not only in terms of amplitude, but also in terms of frequency. That is, its dependence on time must be taken into consideration.

Let us first consider a periodic signal, that is, one that repeats itself after a certain time interval T, called period (an aperiodic signal can always be seen as a periodic signal with an infinite period). A simple signal of this type is the sinusoidal one: V(t)=VMsinωt, where VM is the amplitude and ω=2π/T the angular frequency (ω=2πf, where f is the frequency).

Since mathematical analysis allows us to decompose a periodic function of any type into a sum of a (finite or infinite) number of sinusoidal terms of suitable amplitudes and frequencies (Fourier’s theorem), we can always think of any signal as constituted by superposition of its sinusoidal components.

A diagram showing the frequency on the abscissa and the amplitude of the Fourier components on the ordinate is called the signal spectrum. For example, the spectrum of a signal that faithfully reproduces the sound of a tuning fork will essentially consist of a line centered on the fundamental frequency of the tuning fork, while a signal produced by my voice that reads these lines will have a much more complicated spectrum, with a fairly large distribution. extended on the audible frequencies.

If we record our voice and the sound of the tuning fork at the same time, the resulting signal is the sum of the two, and we can alternatively consider one or the other as noise. If now we want to “clean” the signal of the tuning fork from the “noise” of our voice we would have to remove all the lower and higher frequency components than the mechanical resonance of the tuning fork, that is, we would have to pass the signal through a pass-band filter. Conversely, if we want to eliminate the sound of the tuning fork, now seen as noise, from the recording, we have to pass the signal through a stop-band filter, which removes only the fundamental frequency of the tuning fork, leaving the sound of our voice practically intact.

3. Traditional Filters and Their Limits

A filter is an electrical circuit that has a frequency-dependent transfer function W(ω). By transfer function we mean the signal ratio between the output signal Vo and the input signal Vi.

The somewhat vague term “signal ratio” used here does suggest a ratio between the amplitudes, which does not take into account the phase relationship between input and output. To be more precise, one should use the signals description in complex notation, and then the ratio between the amplitudes corresponds to the modulus of W(ω).

If the filter consists only of passive components (resistors, capacitances and inductances) the transfer function module has normally values between zero and one, i.e. it can only attenuate the signal. If you also use active components (amplifiers) in the filter you can have W(ω) > 1.

A real passive filter can be described approximately by the corresponding ideal filter in which W(ω) assumes only 0 and 1 values: in this case the frequency range in which W(ω)=1, is defined as the passband, and the frequency range in which W(ω)=0 is named stopband.

The real passive filters are approximated by the corresponding ideal filter by setting W=0 in the frequency region where W(ω)<1/2=0.7 and W=1 in the frequency region where W(ω)>1/2, that is, the transition region between large and small attenuations is approximated with a vertical segment. The transition frequency ωt between the two regions, that is, the one for which we have W(ωt)=1/2, is named cutoff frequency.

Based on the shape of W(ω), the low-pass, high-pass, passband and stopband filters can be distinguished (Figure 1).

Figure 1
Real (blue) and ideal(red) transfer function for the four main filters.

Again in this schematization of the passband and stopband filters we can define as quality factor the ratio Q=f0/(f2f1) between the center frequency f0 and the bandwidth defined by the difference f2f1 between the two cut-off frequencies. It is obvious that, the higher the Q, the more selective the filter, both in transmitting only the signal around f0, and in eliminating only the signal around f0.

Ideal selective filters have zero bandwidth, that is Q=, and the shape of their transfer function is a vertical segment centered on ω0.

If we then have a weak purely sinusoidal signal, which is masked by a high noise distributed over a wide frequency range, and we want to accurately measure the amplitude of the signal, we can try to use a band-pass filter tuned to the frequency to be detected, with a very high Q. For Q the amplitude of the residual noise, i.e. the noise at frequencies lower and higher than that of the signal, tends to zero at the filter output, so that the weak signal can be amplified and detected.

In practice, however, the maximum value of the quality factor that can be conveniently used is limited by various causes. One of the main problems that arise is that of stability: if the band becomes very narrow, a small shift in the central frequency (due to the sensitivity of the components to external factors, such as temperature, aging …), or a small variation in the frequency of the signal than the one the filter is tuned to, make the signal disappear at the output. Typically, things get complicated for Q>100, which means that the filter is unable to eliminate the noise components whose frequencies are less than 1% from the signal frequency.

4. A Particular Filter: The Lock-In

An alternative solution to the problem just illustrated can be represented by a particular filter which has the characteristic of being “locked” to the signal to be detected. This is the so-called “lock-in” or also Phase Sensitive Detector (PSD).

Let’s say immediately that in order to use the phase sensitivity detector it is necessary to have a reference signal that has exactly the same frequency as the signal to be detected. A reference signal that responds to this characteristic is more readily available than it may seem at first glance. In fact, the weak signal to be detected often arises as a response of a physical system to an excitation signal: when this response is synchronous, as happens in most cases, the excitation signal can be used as a reference signal in the lock-in.

Furthermore, at the lock-in output, the sinusoidal signal supplied to the input, more or less cleared of the noise, is not reproduced, as for the tuned filter, but it produces a DC voltage whose amplitude is proportional to the amplitude of the signal to be detected. However, this too is not an important limit, because the information sought is not contained in the form of the signal but in its amplitude.

The essential advantage of the lock-in is that it allows to easily obtain an elimination of noise components that are less than one part in 100,000 in frequency from the signal, i.e. it is possible to obtain Q of the order of 105 even at very low frequencies, where traditional tuned filters become very expensive and ineffective. In the lock-in, the effects of the instability of the values of the circuit parameters (due to temperature variations, aging …) are negligible: what can be slightly modified is in fact only the Q value but not the tuning of the filter.

5. A Lock-In Made of a Synchronous Switch + a Low-Pass Filter

Let us first consider a purely sinusoidal signal VS(t)=VSM sin(ω0t) of pulsation ω0, whose amplitude VSM is to be accurately revealed. We also suppose that this “weak” signal is masked by a noise VN whose frequency spectrum, distributed over a wide band, has components whose amplitude is much greater than the amplitude of the signal to be detected: in this case we say that the noise “masks” the signal, or that the “signal to noise ratio” is very small.

A “noisy” signal can therefore be seen as the overlap VS+VN of a “pure” signal VS and the “noise” VN.

As indicated in the diagram of Figure 2, we apply the sum signal VS+VN to the input of a low-pass RC filter, through a switch D which is controlled, by means of a suitable reference signal VR synchronous with VS, so that D is closed on the signal during the positive half-wave of VS and shorted to ground during the negative one.

Figure 2
The lock-in with synchronous switch ω showing a non-harmonic movement.

The shape of the signal before (VS+VN) and after the switch (V1) is schematized in Figure 3a, where the shape of the VS signal has also been highlighted, which is actually hidden by the noise. After the filter, the average voltage value is V1=VSM/π because the average value of VN is zero, assuming that the noise has no synchronous components with VS. In essence, this is true if the noise VN is negligible at low frequency, that is, if the average is carried out over a time that greatly exceeds the reciprocal of the lowest frequency.

Figure 3
Signal and noise before and after the synchronous two-way switch.

If the switch is controlled, always in synchrony with VS, but with a certain delay t1, (i.e. with a phase shift Φ=ω0t1) with respect to VS, the noise is still averaged to zero, but the output voltage V1 depends not only on the amplitude VSM, but also on the phase shift Φ. The situation can be represented as in Figure 3b, and the average value provided by the low-pass filter is easily obtained, as an integral over a single half-period, given that in the other half-period the signal is zero:

(1) V 1 = 1 T t 1 t 1 + T / 2 V S M sin ω 0 t d t = V S M T | - cos ω 0 t ω 0 | t 1 t 1 + T / 2 = V S M T cos ϕ

It is therefore evident that, in order for our signal to be revealed, it must be cos Φ0, or Φ(±π/2), because otherwise V1 is canceled regardless of the VSM value.

The phase shift must be constant, if you want to avoid any variation in the output voltage that is not due to VSM variations, that is, if you want the output voltage to be a faithful measure of the amplitude of the signal to be detected only.

If, on the other hand, we already know that the signal has a constant amplitude VSM, and we are interested in its phase relationship with the reference signal VR, the equation (1) shows that the output signal from the synchronous filter precisely provides a measure of the phase shift Φ, and this explains the name “Phase Sensitive Detector” (PSD): if the amplitude of the VSM signal is constant, the voltage at the output is just a sinusoidal function of the phase shift between VS and VR.

6. A Lock-In Made of a Multiplier + a Low-Pass Filter

Let us now analyze another circuit, the one schematized in Figure 4. Here the block marked by a × which replaces the synchronous switch of the previous scheme, is a multiplier, that is a device that supplies to the output V1(t) a voltage proportional to the product of the voltages VS(t) and VR(t) present at the two inputs: V1(t)=kVS(t)×VR(t). Often, in multipliers made up of integrated circuits, the factor k is 1/10, but here we choose for simplicity k=1.

Figure 4
The lock-in with multiplier.

Suppose that VS(t) and VR(t) are two sinusoidal functions: VS(t)=VSMsinωSt and VR(t)=VRMsinωRt. Then the following relationship holds:

(2) V 1 ( t ) = V S M V R M sin ω S t sin ω R t = V SM V RM cos ( ω S - ω R ) t - cos ( ω S + ω R ) 2

where Werner’s trigonometric formulas were exploited.

It can be seen that the signal V1, at the output of the multiplier, has two components whose frequencies are respectively the sum and difference of the frequencies of the two input signals.

In the case in which ωS=ωR=ω0, and there is a phase shift Φ between the input signals, we obtain instead:

V 1 ( t ) = V S M V R M 2 [ cos ϕ - cos ( 2 ω 0 t + ϕ ) ]

Now instead of the difference frequency component there is a DC voltage component (“zero frequency”) which depends on the phase shift, while the sum frequency component is the second harmonic of ω0. At the output of the low-pass filter, sized so that it is 2ω01/RC, we have:

(3) V 1 = ( V SM V RM / 2 ) cos Φ .

In the relationship (3) we find the same dependence on Φ that occurs in (1), and in addition here the lock-in output also depends on the VRM amplitude of the reference signal. Here it is not enough to ensure stability to the phase relationship between VS and VR, but also the amplitude of the reference sinusoid must be stable, if V1 is to depend only on the value of VSM.

7. The Synchronous Switch as a Multiplier for Square Wave

We can re-examine the operation of the first circuit by thinking of the diverter as a multiplier of the V signal for a square wave with an amplitude oscillating between 0 and 1 (i.e. for a VR signal that is zero in one half-period and one in the other half-period).

A generic periodic signal, with period T=2π/ωR can be decomposed into a Fourier series as:

(4) V ( t ) = a 0 + n = 1 a n ( sinn ω R t + ϕ n )

In the case of the square wave considered by us, a0=1/2, the even coefficients are all zero and the odd ones are an=2/πn. So VR can be written:

(5) V R ( t ) = 1 2 + 2 π ( sin ω R t + 1 3 sin3 ω R t + 1 5 sin5 ω R t + )

and the signal V1(t) product of VS(t) and VR(t) becomes:

(6) V 1 ( t ) = V S M 2 sin ω S t + 2 π ( sin ω S t sin ω R t + 1 3 sin ω S t sin3 ω R t + ) .

If here too we impose that the reference signal VR is synchronous with VS, that is ωR=ωS=ωo, in (6) there remains only a term independent of time (or “zero frequency”), the one originating in the product between VS and the fundamental component of VR. This term is the only one that survives after the low-pass filter and we get again the result given by (1), if we also consider a possible phase shift Φ between VS and VR.

If we now suppose that the noise VN added to VS has a DC componentVOS, that is, both VN+VS=VOS+VN(t)+VSMsinω0t (VOS is called offset, or “zero frequency component”), then this component reappears added to the output:

(7) V 1 = 1 2 V O S + 1 π V S M cos ϕ

Furthermore, it can be seen from (6) that all odd harmonics (2n-1)ω0 of VS also contribute to V1, and the bandpass of the lock-in, i.e. the spectrum of the signal measured by V1, is the one described in Figure 5.

Figure 5
Pass band of a lock-in with square wave reference.

The width Δω of the pass-bands centered at ω0,3ω0,5ω0, is fixed by the time constant RC of the low pass filter: Δω=2/RC. This means that the noise components in VN with pulsation ωi such that |ωi-nω0|<1/RC, with n odd, cause a modulation of the DC voltage V1 at the output, and therefore reappear as noise, albeit with a spectrum translated to low-frequency.

The lock-in with a square wave multiplier can ultimately be seen as a parallel of infinite lock-ins with a sine wave multiplier, each of which has as its reference signal an odd harmonic of the signal to be detected, of linearly decreasing amplitude with the order of the harmonic.

Since the value of the RC time constant of the low pass filter is limited only by the need to obtain reasonable response times τ for the lock-in (τ5 RC is the time taken by the output voltage to reach values practically equal to the final ones, starting from the instant in which the amplitude of the VS signal is changed), it is possible to use RC values that are quite large compared to 1/ω0 and thus obtain for the quality factor Q=ω0/Δω values of the order of 105. For example, if f=2π/ωo10 kHz, it is enough to set RC = 10 s to obtain Q105.

So far we have considered multiplying VS by a square wave that oscillates between the values 0 and 1 (this is in fact the result of the synchronous switch), but we can also think of multiplying it by a square wave that oscillates between -1 and +1 (using for example an amplifier with gain that switches between -1 and +1 at each half-period). In this case we have in relation (4) ao=0 and an=4/πn, and the square wave is described by:

(8) V R ( t ) = 4 π [ sin ω R t + 1 3 sin 3 ω R t + 1 5 sin 5 ω R t + ] ,

and the mean value of the product V1(t)=VS(t)VR(t) becomes:

(9) V 1 = 2 π V S M cos ϕ

This consideration shows us how the circuit can be modified to obtain the elimination of the zero-frequency band, so as to clean the signal from the unwanted “offset” voltage Vos.

8. The Synchronous Filter

Another circuit, which is similar to those examined so far, is the “synchronous filter”, schematically represented in Figure 6.

Figure 6
Synchronous filter.

Here the reference signal VR is again a square wave, synchronous with the signal to be detected VS, which drives a diverter between two equal capacities: the sum VS+VN, of signal and noise, is integrated separately in the two half-periods by two low-pass filters with the same time constant RC.

If VR and VS are in phase, after a certain time, which is proportional to RC, the two capacitors will be charged respectively to the voltages +(2/π)VSM and -(2/π)VSM, corresponding to the average value of VS over each half-period.

The output signal will therefore be a square wave with zero mean, synchronous with VS, and of peak-to-peak amplitude proportional to the signal to be detected: V1pp=(4/π)VSM. The noise is substantially averaged to zero as in the previous schemes.

The usefulness of this circuit, which is often used together with the lock-in, is better understood if we consider that when one needs to detect a small signal hidden by noise, it is necessary to introduce a very strong amplification, and this presents some drawbacks that can be eliminated precisely by using a synchronous filter.

The drawbacks are essentially two: (1) the real amplifiers have a DC voltage at the output even with a null signal at the input (offset), (2) the real amplifiers have a linear zone of finite amplitude, i.e. with too high gains higher signals at the input are cut off (saturation). The signal to be detected can be much smaller than the offset, and therefore if a single amplifier with high gain is used, saturation can also be obtained due to the effect of the offset alone.

To overcome this problem, instead of a single amplifier with large gain, several amplifiers in cascade AC coupled, each with limited gain, are usually adopted, and such that the product of the gains of the individual stages provides the desired amplification. In this way, the offset introduced by each stage is cut and is therefore not amplified by the subsequent stages (Figure 7a).

Figure 7
Three lock-in amplifier block diagrams.

In this configuration, the problem of AC noise still remains, which, amplified more and more at each stage, can still produce saturation in the last stage. In diagram 7b this drawback is eliminated, by filtering the AC noise with the lock-in at the output of the pre-amplifier; however, since the second stage must be DC coupled (the lock-in output is a direct voltage), if it has a very high gain it introduces a large offset that can no longer be separated from the signal.

In the diagram of Figure 7c, which uses a synchronous filter after the preamplifier, the noise is filtered, and an AC signal remains, which can still be greatly amplified by the second stage, before being detected by the lock-in, without producing saturation and without offset problems. A last DC stage can further amplify the signal at the lock-in output. This is a configuration that is often adopted in commercial lock-ins.

9. Some Practical Schemes

Now that we have analyzed the essential characteristics that our lock-in must have (Figure 7c), we can try to build a relatively simple one.

Let’s start by considering an amplifier that multiplies the input signal by ±1 in sync with the reference signal. If we use an operational amp to build this amplifier, the simplest scheme at our disposal is the one shown in Figure 8a.

Figure 8
Lock-in scheme; a: amplifier with gain ± 1; b: active low-pass filter.

This diagram, if the operational amplifier (OA) is considered ideal, it works as an inverting amplifier with the switch closed and as a non-inverting amplifier with the switch open. (In an ideal OA, the open-loop amplifications ± A of the non-inverting and inverting channel can be assumed to be infinite, and the bias currents to be zero.)

For the low-pass filter we can adopt an active filter scheme like the one shown in Figure 8a,b which introduces a DC gain at the output. In fact, for this circuit, the transfer function is:

(10) V ( j ω ) = V u V i = - R 0 R i 1 1 + j ω V R 0 C

where -(Ro/Ri) is the DC gain, and ft=1/(2πRoC) is the cutoff frequency.

We now need to build a switch that is VR controlled. The simplest type of electronic switch1 1 There are various models of Analog Switches, usually with double or quadruple switches, for example CD4016, DG201, LF11201, SW201, HI201. is the one made up of MOSFET transistors and which is marketed under the name of analog-switch: it can be schematized as a variable resistor that is driven by a voltage signal sent to the control electrode (gate), and has a resistance of the order of a few tens of ohms if closed, and a few MΩ if open. It is a very fast switch: the typical switching time is in fact of the order of a microsecond.

A problem that may arise with this device is the crosstalk effect (interference) between the command signal and the signal transmitted by the switch. This can be significantly reduced by using optical coupling, i.e. by using a photo-transistor driven by a LED diode.

Finally, we show how the single-throw single-pole switch (Figure 9-left) used in Figure 6 for the synchronous filter can be obtained, using two single on/off switches (Figure 9-right) with a common pole controlled in push-pull mode.

Figure 9
Scheme for obtaining a single-throw single-pole switch using two on/off switches.

In the synchronous filter, to reduce the offset due to the asymmetry of the spikes induced by the control signal VR (square wave), it is advisable to connect the switches to ground (as in Figure 9, instead of as in Figure 6).

Ultimately, a practical scheme to create the circuit schematized as blocks in Figure 7c, can be the one shown in detail in Figure 10.

Figure 10
Complete schematic of a lock-in. The dashed boxes identify the different blocks. a: preamplifier; b: synchronous filter; c: AC amplifier; d: multiplier; e: low pass filter and DC amplifier; f: double comparator to drive the synchronous filter and the multiplier.

Some comments on the values that have been adopted for the active and passive components in the example of Figure 10.

Only 6 easily available and inexpensive ICs are used: IC1 and IC2 are low noise OA, IC4 and IC5 are dual OA, IC3 is a quadruple analog switch (of which only three switches are used: two in the block b and one in the block d; in the fourth one, input, output and control are placed to ground) and IC6 a common comparator (with the open collector output closed on a load towards V+).

With the gains of preamplifier, AC amplifier and DC amplifier set respectively at 100 (=10 MΩ/100 kΩ), 100 (=100 MΩ/100 kΩ) and 10 (=100 MΩ/1 MΩ), you get an overall gain of 100,000 with which you can easily detect input signals with an amplitude between 1 μV and 50 μV. The circuit described here is not suitable for accurately detecting smaller signals that become comparable with the noise introduced by the effect of the crosstalk spikes.

If you want to detect even larger signals (for example up to 5 mV), to avoid saturation conditions, it is better to reduce the gain of the DC amplifiers. (G = 10) and AC(G = 1), leaving the preamplifier gain unchanged.

In the diagram in Figure 10, RC filters with time constants suitable for a working frequency f = 30 Hz were used (to avoid mains interference at 50 Hz and higher harmonics): the synchronous filter was calculated for Q10 (RC = 0.1 s, Q = πRCf), and the low-pass filter has been sized to provide a time constant RC = 10 s, corresponding to a Q=1000 at the working frequency.

The larger time constant between the two is the one that fixes the response time of the instrument to variations in the amplitude of the input signal: a response time of the order of a few seconds is suitable for most uses.

The scheme proposed in Figure 10 works correctly for frequencies between a few Hertz and a few hundred Hertz: the lower limit is set by the smallest time constant, which must respect the inequality RC 1/(2πf), in order to maintain the phase shifts negligible. The upper limit, on the other hand, depends on the turn-on delay times of the switches and on the effect of the spikes produced by the switching: both effects are more noticeable as the frequency increases.

The circuit must be calibrated by zeroing the offset at the output of the final amplifier with the input of the preamplifier shorted to ground: in this way both the effect of the IC3 and IC5 offsets and the DC contribution due to the asymmetry of the spikes are eliminated

Calibration and linearity check can be more easily performed by adopting a capacitive divider to inject the sinusoidal signal, used as a reference, attenuated by a factor C1/(C1+C2) = 105 at the input, according to the scheme shown in Figure 11a.

Figure 11
a: Capacitive attenuator for calibration, b: Block diagram for the detection of the “zeroing” signal of a bridge.

A typical application is finally shown in Figure 11: the detection of the residual signal at the balance of a bridge.

Since the simple lock-in scheme described here has a single-ended input, it is advisable to power the bridge through a transformer (for example with a unitary turn ratio) and ground one of the two outputs of the bridge. In this way it is no longer necessary to use a differential preamplifier with a high common-mode rejection value at the bridge output, and as a reference signal you can simply use the transformer power supply voltage.

10. Conclusions

We presented here a general introduction describing the lock-in amplifier technique, and some examples to guide students in their first steps with LIA, using simple components in order to make their task easier; however, modern integrated circuits offer also more powerful ICs that implements the scheme shown in Figure 4.

For example the AD630 chip [3[3] https://www.analog.com/en/products/ad630.html
https://www.analog.com/en/products/ad630...
], which contains both the comparator with the analog switch and the output buffer that provides the sum of the two signals (VS and VR), may be used [4[4] https://physicsopenlab.org/2019/08/20/lock-in-amplifier/
https://physicsopenlab.org/2019/08/20/lo...
]. More suggestions may be found in Torzo [5[5] https://giacomotorzo.academia.edu/research#papers
https://giacomotorzo.academia.edu/resear...
], Sengupta [6[6] S.K. Sengupta, J.M. Farnham and J.E. Whitten, J. Chem. Ed. 82, 1399 (2005).], Maya [7[7] P. Maya, B. Calvo, M.T. Sanz-Pascual and J. Osorio, Electronics 8, 1413 (2019).], Yang [8[8] W. Yang, Am. J. Phys. 78, 909 (2010).], and reference therein, while useful simulation using LabView may be found in Trieu [9[9] P.Q. Trieu and N.A. Duc, VNU Journal of Science: Mathematics – Physics 24, 239 (2008).].

References

  • 1
    There are various models of Analog Switches, usually with double or quadruple switches, for example CD4016, DG201, LF11201, SW201, HI201.

Publication Dates

  • Publication in this collection
    29 Apr 2022
  • Date of issue
    2022

History

  • Received
    28 Feb 2022
  • Reviewed
    13 Mar 2022
  • Accepted
    18 Mar 2022
Sociedade Brasileira de Física Caixa Postal 66328, 05389-970 São Paulo SP - Brazil - São Paulo - SP - Brazil
E-mail: marcio@sbfisica.org.br