Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

Lock-in measurement technique

(the nal version)

Oleksandr Foyevtsov
Physikalisches Institut, Goethe University, Frankfurt am Main, Germany, foyevtsov@physik.uni-frankfurt.de

November 17, 2011


Abstract The article describes the main principles of the lock-in measurement technique on a specic example. It is shown how the rst derivative of a hypothetical nonlinear voltage-to-current curve may be measured directly by using a lock-in amplier and a DC voltmeter.

Contents
1 A typical problem 2 A modied setup 3 Transforming signals or how we do it 4 How the lock-in does it 5 Phase, absolute value, and two channels 6 Concluding notes Appendix A 2 3 4 8 13 19 20

A typical problem

Let us imagine that we were struggling a lot by preparing a best sample and now we are investigating it by learning its voltage-to-current (V I) characteristics, one of which is shown in Fig. 1(a) by the solid blue line 1 . To be more specic,

Figure 1: A hypothetically measured voltage to current characteristic (a) and its derivative (b). See text for the meaning of the highlighted regions.
let this curve be measured by sending through the sample a direct current (IDC ) generated by a current source and measuring the respective DC voltage drop VDC by a voltmeter. Repeating this step for dierent current values we obtained the
1

The red ellipses denote some regions on the curve, which we will discuss soon.

complete curve. Say, at IDC = 1.0 mA we obtained VDC = 1.0 V . It means that the electrical resistance of our sample to the DC current is 1.0 V /0.001 A = 1000 . But we are careful by saying that the resistance of our sample is 1 k, because it depends on the current value, which is apparent due to a non-linear character of the hypothetically measured V I characteristics. Imagine that we are either clever or curious enough to suspect that there is a physical reason for this curve to be non-linear, and we want to investigate it in details. We also know that quite often a knowledge about the rate of change of some physical quantity 2 may make our conclusions obvious or at least may simplify our analysis. Our next step is quite obvious: just nd the derivative (which we will call dynamical resistance) dVDC /dIDC of the measured V I characteristic shown in Fig. 1(b)! The V I curve measured above consists of discrete points and apparently must be dierentiated numerically, which introduces a discretization error to the derivative curve. Additionally, in practice, every measurements catch also noises in addition to the useful signal. In our example we are lucky: 1.0 mA and 1.0 V are pretty large signals and could be measured easily. Nevertheless, rather often or almost always one deals with very weak signals of the order of V or A or even less. In those cases one sometimes barely sees even the nonlinearity on the initial V I curve and dierentiating such curve is denitely not helpful. But it looks perfect! - one might say. Okay, give it a try. After some more struggling we came to the conclusion that we denitely must develop a technique which would directly measure the desired derivative of our signal. Such method exists. Even more, the measured derivative by such technique may look even better than the conventionally measured V I curve by our simple current source voltmeter setup. Let us start developing a new measurements setup for obtaining such smooth curves like in Fig. 1(b).

A modied setup

Consider the setup shown in Fig. 2. Of course, we did not assemble it just by a chance, but let it be now in our hands and we would like to learn how it works. Here, our sample with its non-linear resistance characteristics is shaded by orange colour. We still have our DC voltmeter shown on the right. We still pass through our sample the direct current IDC (the upper red arrows), which we vary linearly with time (the left top schematic plot). So, here we have everything in place as in our standard setup. But, here is something more. We also pass through the sample a small, in comparison to the maximal value of IDC , alternating current IAC (the lower red arrows) 3 . We have some logical function (), and some apparatus
Imagine how you would feel if a car you are driving does not have a speedometer, but instead has a plot showing you a function of the cars coordinate from the garage versus the driving time! Most probably you would not guess your driving velocity without getting into troubles. 3 Dierent experiments would put dierent restrictions on the amplitude |IAC |. From the electronics point of view there is, however, no direct restriction on the ratio |IAC |/IDC . Nevertheless, smaller AC
2

Figure 2: A modied measurements setup


we called lock-in amplier. While we will discuss these two parts later, let us rst investigate how the presence of two dierent currents inuences the measurements. One should stress that in spite of several new unusual components the scheme in Fig. 2 would measure for us absolutely the same data as in Fig. 1(a). It is so because the DC voltmeter has inside a low-pass RC lter shown in our new scheme. Conveniently, the frequency of the alternating current f is selected to be above the cut o frequency of the voltmeters lter. Hence, the voltmeter would read just the averaged value, the VDC introduced at the beginning.

Transforming signals or how we do it

Let us go back to the highlighted regions in Fig 1(a). Take the region (a) rst. To continue being specic we x the amplitude |IAC | = 0.02 (mA) during our measurements. Within the region (a) we have a tiny IDC and the mentioned IAC summed together, which is shown as a function of time in Fig. 3(a-input) using the complete scale of IDC . The same oscillating current is shown vertically in Fig. 3(atransfer) in bottom right. Here also the upper right plot shows the magnied region (a) of the V I curve from Fig. 1(a). The oscillating current is transferred by this region of the V I curve to the output voltage Vout , which is shown to the left. This voltage, which is seen by both the DC voltmeter and by the lock-in amplier, also
signals are provided by the electronic components with less total distortions and are favorable.

has two components VDC and VAC , which are shown by grey arrows in all gures. The output voltage is also shown in Fig. 3(a-output) using the complete scale of VDC on vertical axis. As we may already expected looking on Fig. 1(a), the value a of the DC voltage in this region VDC is very small (0.77 mV in our example). The a in this region is also small (0.5 mV) due to a very amplitude of the AC voltage VAC at shape of the V I curve in the region (a). For our convenience the exact values of both DC and AC voltages and currents we would read in this region of the V I curve are shown in the Fig. 3(a-transfer). b Let us adjust now the value of IDC = IDC so that (again according to Fig. 1(a) notations) we probe the region (b). We apply here the identical sequence of analysis as we did for the region (a). Namely, we sum two currents which would look like it is shown in Fig. 4(b-input) and in bottom of Fig. 4(b-transfer). We have a closer look on the region (b) of the initial V I characteristic in Fig. 4(b-transfer). The sum of two respectively measured voltages are shown in both magnied and the complete DC voltage scales in Fig. 4(b-transfer) and Fig. 4(b-output) respectively. Eventually, the measured/programmed values of the voltages and currents are given in Fig. 4(b-transfer). In the region (b) the amplitude of the IAC is, as we agreed, the same as before. b But the values of the current sine are lifted up by the IDC components of the total current (Fig. 4(a-input)). The distinct feature of transferring currents to voltages here, as we already noted, is the steepness of the V I curve within the region (b). b This results in a much increased amplitude of the voltage VAC shown in Fig. 4(b4 . As we already know, the voltage V b , output) when compared to the region (a) AC which is seen by the voltmeter has no inuence on its readings, but instead may be b sensed by the lock-in device. Of course, the value of VDC is also increased, which is driven by the V I curve and is read from the DC voltmeter. We also highlighted a third region on the V I curve, the region (c). We use here the identical steps as we already have developed, so the work on checking values and tracing the curves in Fig. 5 is left to the reader. The only relevant thing to c c note is that the value of VDC still traces the value of IDC , which are related by the c | is somewhat reduced in comparison to the region V I curve. The value of |VAC (b), which is proportional to the derivative of the V I curve shown in Fig. 1(b). What we have analyzed in this section is how the time-dependent input current I(t) = IDC (t) + IAC (t) is transferred into the respective time-dependent values of the output voltages V (t) = VDC (t) + VAC (t). We did not measure it yet by our new setup, but the good thing is that we now know how the output voltage looks like. Analytically, or dividing the V I curve not just in three, but in ten or in twenty regions one may precisely obtain the derivative of the V I signal, which is shown in Fig. 1(b). Let us not be verbose, but compare the obtained numbers of i i |IAC | and |VAC | with the values one reads in the respective highlighted regions of
4 a The increase is about 120 times against the voltage |VAC | in the region (a)

Figure 3: Region (a) of the V I curve measured by the new setup.


the derivative curve in Fig. 1(b) (note the scale on the ordinate): Region (a) :
a R(IDC ) = a |VAC | 0.5 (mV ) = = 0.025 103 |IAC | 0.02 (mA) b |VAC | 60 (mV ) = = 3 103 |IAC | 0.02 (mA) c 20 (mV ) |VAC | = = 1 103 |IAC | 0.02 (mA)

Region (b) :

b R(IDC ) =

(1)

Region (c) :

c R(IDC ) =

Figure 4: Region (b) of the V I curve measured by the new setup.


The values of R(I) above exactly follow those in the respective regions of the derivative curve in Fig. 1(b)! Hence, the voltage Vout we read on the outputs of our new measurements setup denitely contains the information about the rate of change of the signal, i.e. its derivative. It is exactly what we needed, but now it only remains to make such analysis much quicker. We will make this much faster and automatic in the next section.

Figure 5: Region (c) of the V I curve measured by the new setup.

How the lock-in does it

For now we may feel happy and we are on the right way, but we still have to construct (or learn how it is already constructed) a device for making our analysis fast and automatic so we can just drink some coee while it is working. Recall the unknown so far logic function () introduced in our new measure-

ments setup in Fig. 2. There it was related somehow to the current IAC . It works together with the AC current source behind our sketch and often is a part of the lock-in amplier. The AC current generated by this source is of a sinusoidal shape and it is centered about zero (the upper plot in Fig. 6). Let our logic function work in such way that it produces two logical voltages on its output VLOW and VHI . Namely, it switches to VHI when the generated current running amplitude is larger than zero |IAC (t)| > 0 and the switch is turned to VLOW in opposite case, i.e. |IAC (t)| < 0 (see the lower plot in Fig. 6, see also Appendix).

Figure 6: A logical function () and its relation to the generated current waveform.
Now, consider the upper part in Table. 1. Here we sketch only the internal parts of the lock-in amplier, which was just a mysterious box in Fig. 2. At the input (i) it sees the input voltage, but we already called it the output voltage from the sample point of view, Vout (t) = VDC (t) + VAC (t). It receives the logical voltage levels from the current source function (). These logic levels will tell the lock-in whether the phase of the AC current is 0 < < or < < 2, and that is all that this logic scheme is used for (see Fig. 10 in Appendix). As we already started being specic, we want to analyze the signals which we had in the region (b) of the V I curve. The time-dependent values of voltage, which we see at (i), has a familiar to us dependence from the previous analysis for the region (b) on V I curve. This dependence is shown in the sub-gure (i) of Table. 1. But now the vertical scale also includes the symmetric negative voltages range. It should be noted that voltage Vout is sensed by a dierence amplier in the input stage of the lock-in (see also Fig. 11 Appendix). It means that the voltage dierence, which we plot in the sub-gure (i) is the voltage drop between the two contacts and we are not concerned about the grounding of the entire setup so far.

The dierence amplier has a typical input impedance of the order of 1011 , which is good for us, since our sample may not have enough current to share it with the measuring equipment. The sensed voltage dierence is then followed one-toone 5 by the dierence amplier to the next stage, but it may give larger current, which probably is required by the next stage. The following stage is a switch controlled by the logic function () as it is shown in the gure. This stage has just two paths which are not equivalent. The rst path A just lets the signal to pass without any changes 6 (see Fig. 12 in Appendix). The other path B inverts this signal or multiplies it by the factor of 1, which is said to work as a unity voltage gain inverting amplier (see Fig. 13 in Appendix). The voltages on these two paths are shown in the sub-gure (ii). Here, the voltages produced by the sample while the phase of the current IAC was in the range 0 < < pass without changes. While those phases pass the other phases, i.e. when < < 2, get inverted around zero. During the period while one of the paths A or B is not connected it just maintains the respective DC voltage level |VDC | either following it or inverting. This DC level is derived from the input signal by ltering out the AC component. Within this second stage the voltages on both pass and invert paths are referenced to the ground of the lock-in device so we have to be careful with its design not to pick up much noises here. We are almost at the very output from the lock-in with our derivative signal! The next, third, stage takes these two signals from the switch-follower-inverter box and just nd their algebraic sum (see Fig. 14 in Appendix). As you may already feel, a brilliant idea is that as we add these two signals together we cancel out the possibly large DC voltage VDC ! As we do this we obtain the time-dependent voltages at (iii), which are just the absolute values of the sine wave VAC at the input, but referenced to zero (see sub-gure (iii) in Table 1). Okay, one may say this is just the same sine wave, which we might have measured with some oscilloscope without the lock-in. It true, the sine is almost the same, but this is a good news. The other distinguished good thing is that we do not have to measure the sine amplitude of 500 (V ) on a large DC signal, say 100 (mV ), which sometimes may turn to be even much dramatic. So, the lock-in may use a scale, say, of 1 (mV ) and easily and precisely measure a signal of 500 (V ) with plenty of accuracy and not measuring 100 (mV ) + 0.5 (mV ). What we nally need to measure the mean value of the rectied sine wave in (iii) is to use a low-pass lter, similar to that we saw in the DC voltmeter. It is shown in the very right part of the lock-in diagram in Table. 1. Now, when the sine appears on the ne scale in the sub-gure (iii) we may easily read its peak voltage b VAC 60 (mV ) or < |VAC | > 38.2 (mV ) when it is smoothed out. It is exactly the same number which we obtained with our analysis made by hands! But now we may obtain hundreds of such values within minutes.
It is said that the voltage gain of this dierence amplier is unity and the power (or current) gain is ideally innity, but in practice is just large enough for the next stage for keeping the voltage levels undisturbed. 6 Here, the path A works also as a unity voltage gain follower, but the voltage it follows to the next stage is referenced to the ground in contrast to the previous stage.
5

10

The voltage Vdif f on the lock-in output terminals corresponds to the rectied and smoothed out AC component VAC of the total voltage Vout seen by the lock-in on its input terminals. After we read this voltage, we may easily use the equation R(IDC ) = Vdif f < |VAC | > = < |IAC | > < |IAC | > (2)

for derivation of the rate of change of the initial function measured by the DC current. Recall that the AC current amplitude |IAC | is set to a constant value during the measurements, so that its averaged value < |IAC | > is a constant value during the measurements.

11

Table 1: Lock-in amplier schematic view and signals inside

12

Phase, absolute value, and two channels

Our new setup is already pretty good. However, we may have also noted that many existing lock-in ampliers have two readings, which may output some x, y, , and r values, while our just constructed lock-in tells us only one value Vdif f . Let us leave these strange values for later and now look on the sample once more. We assumed at the very beginning that the sample is a perfect resistor, though it is non-linear. It means, that the AC current is converted into the AC voltage without any delay. But we know it well, ones a resistor has a bit of inductance the situation must change. This, in turn, means that the current and voltage will not precisely follow each other, but one will be somewhat behind the other. It may be easier to imagine such situation using Fig. 7. Here we sketch the input AC current waveform (upper plot) and a possible output AC voltage waveform (lower plot). The current amplitude is the same as before and the voltage levels (remember that we are very specic) are taken from the region (b) of the V I curve. The two sketched waveforms are shifted one in respect of another. Namely, the voltage along the sample starts rising each cycle a bit later than the current (approx. 60 in our example). The small solid orange circles on top of the voltage waveform are the time coordinates at which the signal will be partitioned by our lock-ins pass-invert switch.

Figure 7: Phase shift


When this signal has passed the pass-invert switch it will have a waveform shown in the upper part of Fig. 8. The respective waveform of such phase-shifted signal just before the low-pass lter of the lock-in amplier (i.e. the voltage in (iii) within the lock-in) is shown in the lower part of Fig. 8. Obviously, due to the initial non-zero phase-shift shown before a part of this wave will lay also below zero. If we would average separately both the positive and the negative branches of this waveform, b b we would read < VAC >pos = 28.6 (mV ) and < VAC >neg = 9.5 (mV ) respec-

13

tively. Evidently that the sum of absolute values of these two numbers r equals to the obtained before value < |VAC | > 38.2 (mV ). One may already formulate that: Whatever the phase shift between the source and the sense signals is the sum of the absolute values of the separately averaged the negative and the positive output waveform brunches r always equals to the simply averaged value of the non-phase shifted signals < |VAC | > The italized text above is quite obvious. Simply saying, we may always access the value < |VAC | > whatever the phase shift is, i.e. < |VAC | >= r. Here, r is one of the four variables we were talking about at the beginning of this section. It is this value which we may read on any existing lock-in amplier. Nevertheless, our lock-in shown in Table 1 will simply mix up and average these two positive and negative values. As a result we will read on its output terminal Vdif f = 19.1 (mV ). But this number seems to be with no use and it messes up all our measurements! Is our lock-in setup wrong? The answer is no, it is not. It is just incomplete and we will see that the obtained value Vdif f = 19.1 (mV ) still makes sense! If we would have a sample, which allows us to adjust the source current to sense voltage phase shift just like a variable resistor. Even if we do not have such a sample laying on our table (although it is not very complicated to construct one) we will make again a mind experiment. Recall the waveform of the signal which we analyzed for the region (b) of the initial V I curve. There with our yet ideal resistive sample we had = 0. The signal we read for this case just before the lock-ins low-pass lter is shown again for our convenience in Fig. 9(a). As we already know that the integrated voltage may be both positive and negative, for this region we may write < VAC >pos = 38.2 (mV ), < VAC >neg = 0.0 (mV ), and r = | < VAC >pos | + | < VAC >neg | = 38.2 (mV ). In the same gure, below the waveform, we also sketch a vector r whose coordinates are given by its length |r| = r and the phase . We also may easily represent r in Cartesian coordinates r = (|r|cos(); |r|sin()), which is also shown in the gure. Hence, if = 0, then r = (r, 0) As we keep increasing the phase shift between the source AC current and the sense AC voltage we will keep partitioning the rectied 7 sine wave. At = 90 we will read a rectied and symmetrically partitioned sine wave, which is shown in Fig. 9(b). Of course, our lock-in setup would integrate such a waveform into zero. This would correspond to rotation of the r by 90 . In this case the coordinates of the r would read (0, r). Let us increase the value of up to 180 and we will mirror our normal rectied sine wave around zero (Fig. 9(c)). This will rotate the hypothetic vector r, whose coordinate will be (r, 0). Eventually, there is also the last rotation in
The use of term rectied may be disappointing here, since it is used to denote an ideal case when = 0. Nevertheless, we are quite condent that the sine wave is really rectied, but due to the rectication not-in-phase parts of it may again become negative. So, let us use this term here with the meaning: half-period of the sine wave is inverted with starting phase = (0; )
7

14

Figure 8: Phase shift


our experiment for = 270 , which is shown in Fig. 9(d). Here we also sketch all the numbers and hope that the gure is self-explanatory.

15

Figure 9: Phase shift

16

The experiment is done and now we may summarize what we have learned in the following list: 0 90 180 270 Vdif f (mV ) 38.2 0.0 38.2 0.0 |r| (mV ) |38.2| + |0.0| = 38.2 |19.1| + | 19.1| = 38.2 |0.0| + | 38.2| = 38.2 |19.1| + | 19.1| = 38.2 |r|cos() (mV ) 38.2 1 = 38.2 38.2 0 = 0.0 38.2 1 = 38.2 38.2 0 = 0.0 |r|sin() (mV ) 38.2 0 = 0.0 38.2 1 = 38.2 38.2 0 = 0.0 38.2 1 = 38.2

Here, the values of we were changing by hands. The values which we measured by our lock-in amplier are shown as Vdif f . The absolute value of r, dened as a sum of the absolute values from negative and positive brunches of the rectied signal, are shown next. The last two columns contain the x and the y components of the vectors r Cartesian coordinates. First important result for us here is that the values of Vdif f are nothing but the x coordinate of r, i.e. Vdif f = x = |r|cos()! This is a good news and we do not have to modify our lock-in. Nevertheless, we are still lacking either the values of y or the values of |r| for the information about r to be complete 8 . The absolute value of r may be obtained by a slight modifying of our lock-in. Namely, using the ideas which we already put in our lock-in, we may construct an additional signal processing branch. This branch would have to take the unltered signal (iii) (see Table. 1) and constantly monitor the sign of this signal. When the sign becomes less than zero, i.e. V(iii) < 0, the signal gets inverted while passing unchanged otherwise. By this additional box followed by a low-pass lter we would recover the ideal rectied waveform, which we would get as if = 0. Hence, this box may introduce an additional output terminal to our lock-in amplier giving values of |r|. At this point, using simple automatic mathematical calculations, we may furnish our lock-in amplier with two independent screens. These screens may show us a desired pair of values, say (x; y) or (r; ) or (x; ) or any other combination. It is exactly what you may nd in any modern commercially available lock-in amplier. So, now we understand the meaning of these two pairs of numbers. In principle, once we have access to the values of |r| we may neglect the phase shift between the source and the sense signals. Using only the values of |r| we may still plot the derivative of the V I curve. Since the period of the reference signal always corresponds to that of the sense signal, it does not matter how much they are shifted, the total absolute value always may be recovered. Of course, the nonideal characteristics of the investigated sample, like inductance or capacitance, may modify not only the phase shift but also the shape of the sense signal. The sensed voltage sine wave may become distorted so may do its average value as well. Such distortions are the sources of errors. These errors may be small and, what is more important, may not depend on the values of the DC signal, the reference frequency or the amplitude of the AC source signal. What is really bad, say untreatable,
Once we have the complete information about r, we may still measure the derivative curve at any value of plus we obtain the value of itself
8

17

is when such phase variations themselves become erratic. In this case even the measured value of |r| will not be of much use, because the one-to-one correspondence of the output integrated value of r to the amplitude of the input AC current becomes less correlated. Hence, a part of the response signal gets averaged together with noises. In real life experiments with nominally resistive loads/samples, however, small variations of phase are alway present. These variations are typically small in comparison to the useful signal, but the larger the loss of correlation between the input and output signals the more noises would penetrate into the readings. Of course, it is the aim of the researcher to achieve the maximum level of the correlation of the input to output signals using this technique.

18

Concluding notes

It seems to be reasonable to note some advantages of the lock-in technique over the other measuring setups. What we usually do in order to get rid of the noises using the DC voltmeters is increasing the signal integration time. Since the noise is a random variation (of the voltage level in this case) in time, making averaging for, say, 1 s we would clean up the readings quite well. After that the obtained value will be closer to its mean value. Actually, we will cut o, or average them to zero, frequencies larger than 1 Hz and pass signals with lower frequency. Unfortunately, the intensity of the noises as a function of frequency increases with decreasing frequency. Even if we will keep increasing the integration time this would not improve much. Another possibility is to put our signal to some higher frequency than 1 Hz expecting smaller noise levels as we did. Then we pull out exactly this frequency while ltering out all the others and nally obtain the desired DC signal of the V I curve. In this case we would like to use a band-pass lter, which will damp frequencies below and above our signal frequency with some acceptance, but pass a band of some width f around our central frequency f0 . The quality factor Q of such setup is dened as the ratio of the pass-band width to the central frequency: Q= f f0 (3)

The larger the Q the better, which means that we allow to pass almost only to our signal and just a bit of other signal. The band-pass lter may be constructed with very good characteristics, but the narrower the band becomes the larger problems we face by presence of tiny instabilities of both frequencies the source one and the pass band ones. It is so unless these parts are not synchronized. When they are, it is almost a lock-amplier. In a lock-in amplier we have an extremely good band-pass lter. It is so due to the fact that we invert a half of the oscillating period signal with frequency f0 at the exactly correct times. Hence, all signals which are DC or have very low frequencies will be zeroed as we have seen above. But in the same way if any higher frequency would happen to be superimposed on our sine signal it will be partitioned by inverting-passing operation. This partitioning will look like a stochastic process for this superimposed frequency. The more periods of the main signal we do so or the more the frequency of this superimposed signal diers from the main signal f0 the smaller contribution of this noise signal becomes. Hence, such invertingpassing operation works as a very good band-pass lter. Even more, we may select the source frequency within a wide range and obtain as good ltering for all of them. Although we measure in such a way the amplitude of the sine component, the V I curve may be easily recovered from the dynamical resistance curve R(IDC ).

19

Appendix A

Figure 10: A general scheme for generating a logical output voltage by comparing the input voltage to desired levels

Figure 11: Instrumental amplier for obtaining dierence between two voltages

20

Figure 12: Voltage follower general scheme

Figure 13: A scheme for inverting a given voltage

Figure 14: A scheme for summing several voltage levels

21

You might also like