Sei sulla pagina 1di 5

NOTES AND DISCUSSIONS

The downloaded PDF for any Note in this section contains all the Notes in this section.

Comment on Some novel delta-function identities by Charles P. Frahm Am. J. Phys. 51, 826829 1983
Jerrold Franklina
Department of Physics, Temple University, Philadelphia, Pennsylvania 19122-6082

Received 10 January 2010; accepted 29 April 2010 We show that a form for the second partial derivative of 1 / r proposed by Frahm and subsequently used by other workers applies only when averaged over smooth functions. We use dyadic notation to derive a more general form without that restriction. 2010 American Association of Physics Teachers. DOI: 10.1119/1.3431987

In Ref. 1 the equation


i j

1 4 = r 3

ij

r +

3xix j r2 r5

ij

equals 4 r by the denition of the delta function, and the identity is proven. We can express the left-hand side of Eq. 3 as r r = 3 +r r3 r 3 1 = 3 +r r3 r 1 , r3 4

is proposed for the second partial derivative of 1 / r. This result has subsequently been used in more recent papers.25 The purpose of this comment is to show that the derivation of Eq. 1 in Ref. 1 is awed and to present a direct derivation of this second partial derivative. While Ref. 1 uses two indirect methods to deduce Eq. 1 , we employ dyadic notation6 to take the partial derivatives directly. In dyadic notation, the left-hand side of Eq. 1 can be operated on as 1 = r = r r3 r r r3 1 r3 1 , r3 2a

which isolates the term 1 / r3 . Because the function 1 / r3 depends only on r, its gradient must be in the r direction. Thus we can write 1 = rg r , r3 where the scalar function g r is give by g r =r 1 . r3 6 5

We combine Eq. 6 with Eqs. 3 and 4 to nd 2b gr = 2c and then 3r 4 r r 1 4. = r3 r r Substituting Eq. 8 into Eq. 2c , we obtain 3rr I 1 = 3 3 4 rr r . r r r 9 8 4 r r 3 r4 7

I r r3

where I is the unit dyadic. To evaluate the term 1 / r3 , we start with the well known identity r 3 =4 r r . 3

The left-hand side of Eq. 3 contains no vector other than r. Therefore the scalar functions on each side of the equation can have no angular dependence. The identity of Eq. 3 is usually proven by integrating the left-hand side over a volume and applying the divergence theorem. The volume integral over the left-hand side becomes an integral over the bounding surface. Because the integrand has no angular dependence, the integral over the solid angle equals 4 if the volume contains the origin. It equals zero if the volume does not contain the origin. Thus, the right-hand side of Eq. 3
1225 Am. J. Phys. 78 11 , November 2010 http://aapt.org/ajp

In the Cartesian tensor notation in Ref. 1, Eq. 9 would be written as


i j

3xix j r2 1 = r r5

ij

4 x ix j r , r2

10

which differs from Eq. 1 in the delta function term. Objections have been raised about the relevance of xi / r multiplying a delta function2 because xi / r is not well dened in the limit r 0. However the same objection could be raised against the delta function itself, which is also
2010 American Association of Physics Teachers 1225

undened at the origin. As with the delta function, factors of xi / r give a denite result when used in a volume integral, even when multiplied by a delta function. Also, our Eq. 8 shows that the gradient of 1 / r3 could not be written without r with Cartesian component xi / r multiplying the delta function. The ratio xi / r is used in several places in Ref. 1 for innitesimal r. It is inconsistent to preclude xi / r in one place and then use it in another. Where does Ref. 1 lose the xi / r factors multiplying the delta function? Reference 1 arrives at its expression for i j 1 / r by rst using a plausibility argument and then a physicists proof. The plausibility argument depends on the statement: Noting that the mixed second derivatives cannot contain a delta function. The falsity of this statement is demonstrated by our result in Eq. 10 , which shows that the mixed second derivative does contain a delta function, and does not depend on how the rst derivative was taken. The plausibility argument arrives at the form ij instead of xix j / r2 by incorrectly assuming it. The physicists proof in Ref. 1 uses an integral over solid angle to deduce that the form in Eq. 1 is correct. This proof uses the identity d x ix j 4 = R2 3
ij

all solid angle. In this case, either Eq. 1 or Eq. 9 gives the same result 4 p / 3 r for the singular part of E. However, writing E= 3 pr rp 4 p r r3 3 15

is inconsistent mathematically because the delta function term is averaged over solid angle, while the rst term is not. The use of Eq. 9 leads to the mathematically consistent equation7 E= 3 pr rp 4 r3 pr r r . 16

The magnetic eld of a magnetic dipole also involves the gradient of 1 / r3 as can be seen by writing8 B= A= r r3 r r
3

17a

r r3 1 r3 r .

17b

11

= 3

r 3 r r3 r 4

17c

for the integral over the surface of a sphere of innitesimal radius R. In dyadic notation, this identity is rrd = 4 I. 3 12

r r r3

r r r +4

17d

Reference 1 then uses Eq. 11 to show that its form for the delta function term gives a correct integral when multiplied by an arbitrary smooth function and integrated over a sphere with innitesimal radius. This derivation works because a function that is smooth at the origin has a Taylor expansion, which has no angular dependence in the limit of vanishing radius, and because Eq. 11 shows that our form for the delta function term reduces to that of Ref. 1 when averaged over solid angle. However this averaging procedure restricts the applicability of the form in Ref. 1 to smooth functions. For instance, a function such as f p , r = p r r , which is not smooth at the origin, gives a different p result in a volume integral when multiplied by I r instead of rr r . That is, p r p r rr r dV = while 4 p r p r I r dV = I. 3 14 4 8 I+ pp , 15 15 13

For the last step we have used Eq. 3 for the divergence of r / r3 and Eq. 8 for the gradient of 1 / r3. We see that the eld of a magnetic dipole is like that of an electric dipole but r . The singular part has an additional singular term 4 of Eq. 17d , averaged over all solid angle, is given by / 3 r , which is the form given in most textbooks +8 for the singular part of the magnetic eld of a magnetic dipole. In summary, we have shown that the second partial derivative of 1 / r can be found by direct differentiation using dyadic notation. As a mathematical statement, we have shown that Eq. 1 , as proposed by Ref. 1, cannot be used with functions that are not smooth at the origin. The higher derivatives considered in Ref. 1 and Refs. 25 would also be affected by using Eq. 9 rather than Eq. 1 . We do not consider higher derivatives here to keep the paper relatively simple and accessible.
a

Even though it is incorrect, the use of Eq. 1 in most physics applications leads to the correct result because functions used in physics are usually smooth at the origin. For instance, most electromagnetism textbooks derive the singular part of the electric eld of an electric dipole p by applying the divergence theorem, and effectively averaging E over
1226 Am. J. Phys., Vol. 78, No. 11, November 2010

Electronic mail: jerry.f@temple.edu Charles P. Frahm, Some novel delta-function identities, Am. J. Phys. 51 9 , 826829 1983 . 2 Jeffrey M. Bowen, Delta function terms arising from classical pointsource elds, Am. J. Phys. 62, 511515 1994 . 3 Ricardo Estrada and Ram P. Kanwal, The appearance of nonclassical terms in the analysis of point-source elds, Am. J. Phys. 63, 278 1995 . 4 P. T. Leung and G. J. Ni, On the singularities of the electrostatic and magnetostatic dipole elds, Eur. J. Phys. 27, N1N3 2006 . 5 C. Vrejoiu and R. Zus, Singular behaviour of the electromagnetic eld, arXiv:0912.4684. 6 A brief review of dyadic notation is given in J. Franklin, Classical Electromagnetism Pearson Addison-Wesley, San Francisco, 2005 , Sec. 2.4. 7 Reference 6, p. 52. 8 Reference 6, p. 211.
1

Notes and Discussions

1226

Spreadsheet lock-in amplier


Richard Wolfsona and Darcy Mullen
Department of Physics, Middlebury College, Middlebury, Vermont 05753

Received 5 April 2010; accepted 19 May 2010 DOI: 10.1119/1.3450178

I. INTRODUCTION Two decades ago, we presented a simple circuit for a lock-in amplier that students can build during a single laboratory period in an undergraduate electronics course.1 Our motivation was to introduce students to the extraordinary utility and ubiquitousness of the lock-in amplier in physics research. To quote from our earlier paper: The lock-in amplier is an exceptionally useful instrument for extracting signals from noise, even when noise and signal frequencies are close. Lock-in ampliers are widely used in physics research, and for this reason it is important that undergraduate students be exposed to the device. Lock-in ampliers have changed considerably since our paper was published. They have become largely digital instruments with a host of new features. But the basic idea behind lock-in amplication, namely, phase-sensitive detection, remains central to the operation of todays lock-in ampliers. Learning how phase-sensitive detection works and how impressively the technique can pull a signal from overwhelming noise remains a important goal for students in electronics and experimental physics courses. In most years, our Electronics for Scientists course includes a laboratory based on the lock-in circuit described in Ref. 1. In some years there is insufcient time to include this laboratory, and in any case, it is helpful for students to have another approach to understanding lock-in amplication and phase-sensitive detection. Therefore we have developed a lock-in simulation exercise using a simple spreadsheet. Components of the simulated lock-in amplier are analogous to those in the circuit in Ref. 1, so the real laboratory exercise and the simulation are mutually reinforcing. Although others have developed lock-in simulators using spreadsheets or other software,2,3 these function very much like real lock-in ampliers, that is, as black boxes on which students can turn knobs to operate the device. Our spreadsheet lock-in amplier, in contrast, is, like the actual circuit in Ref. 1, something that students build themselves and then study its operation. II. THE REAL LOCK-IN Figure 1 shows the circuit in Ref. 1. Inputs include the signal of interest, noise, and a reference signal. The signal is from a function generator set to about 50 Hz and 1 V peakto-peak amplitude. Any waveform will do, but an asymmetric ramp is particularly distinctive and easily recognized. The noise is a sine wave of about 5 V peak-to-peak, giving a signal-to-noise ratio of 0.2. The noise frequency is set near the signal frequency; we typically start at 70 Hz, but the circuit works even as the noise frequency is tuned through the signal frequency. The reference is a TTL-compatible square wave 05 V , initially at 500 Hz but later increased to 1020 kHz. The signal is chopped by the reference square wave, tagging it with the reference frequency and phase. This chop1227 Am. J. Phys. 78 11 , November 2010 http://aapt.org/ajp

ping is accomplished with an analog switch, which is driven by the TTL-compatible reference waveform. The rst op amp then sums the tagged signal and the untagged noise, as would happen in a real experiment subject to noise. An inverting amplier follows, then another analog switch that alternately selects the inverted and uninverted versions of the noisy signal. This second analog switch is the phasesensitive detector. Because it is switched by the same reference waveform that chopped the input, it alternately passes the noisy signal and the inverted noise without the signal added. Low-pass ltering, which effectively averages over timescales long compared with the reference frequency but short compared with the signal frequency, then eliminates the noise. Thus the output is the original input signal, extracted from noise whose amplitude is much greater than the input signal. III. THE SPREADSHEET LOCK-IN Our spreadsheet lock-in is a close analog of the circuit in Fig. 1. Its rst column contains a few cycles of a waveform analogous to the signal supplied to the actual circuit. The second column contains alternating ones and zeros. Multiplying the rst column by the second is analogous to chopping the signal with the analog switch in the circuit in Fig. 1. The third column is the noise, whose frequency is comparable to the signal frequency but with a much larger amplitude. We sum the noise with the chopped signal, giving the fourth column. Then comes a column that alternates 1 with 1, corresponding to the phase-sensitive detector in Fig. 1. Multiplying the noisy signal by this column gives an output that alternates, at the high reference frequency, between the noisy signal and the inverted noise without the signal added. As in the real circuit, low-pass ltering then yields the signal itself. We simulate the low-pass lter by summing adjacent rows of the phase-sensitive-detector output, then repeating this process once more. One way to understand the operation of a lock-in amplier is to consider that the reference waveform modulates the signal, effectively displacing it in the frequency domain to the much higher reference frequency. In this way the modulated signal and much lower frequency noise are easily separated, and the high-frequency modulation is then eliminated with the low-pass lter. The more widely separated the signal and noise frequencies which may be comparable are from the reference frequency, the more effective is the lock-in amplier. In the spreadsheet lock-in, the reference frequency is established by the alternating 0 and 1 of the chopper and corresponding 1 and 1 of the phase-sensitive detector. A few cycles of the signal are sufcient to demonstrate lock-in operation, and these cycles occupy the length of the spreadsheet columns. Therefore the maximum reference frequency relative to the signal frequency is determined by the column length. In the simulated lock-in, we use columns of 1000 cells so that the columns accommodate 500 cycles of the
2010 American Association of Physics Teachers 1227

phase-sensitive detector summing amplifier chopper noise signal D D S S 10 k + 10 k , 1% + D S 0.1 F 10 k 39 k 10 k , 1% D S

low-pass filter 15 k out

reference (square wave)

Fig. 1. Lock-in amplier circuit used in Ref. 1.

reference frequency. Our signal frequency is chosen so that two to three cycles occupy the column length. Thus the reference frequency is of the order of 200 times the signal frequency. This ratio is similar to the actual circuit in Fig. 1, where we use a 50 Hz signal and a 10 kHz reference. In the real experiment, an initial reference frequency of 500 Hz allows students to see the chopping and phasesensitive detection on their oscilloscopes but is not high enough for a clean extraction of signal from noise. After understanding the reference function, students then move the reference frequency to the 10 kHz range. Similarly, in the spreadsheet exercise, students usually work with 100 cell columns, small enough to resolve chopper and phasesensitive detector action but sufcient to extract a single cycle of the signal from the noise. Those who want more impressive lock-in behavior can then expand their columns. With the 1000-cell-per-column spreadsheet lock-in, we use a signal that comprises several cycles of an asymmetric ramp waveform. We generate the noise by combining three sine waves whose frequencies straddle the signal frequency and whose amplitudes are such that the overall signal-tonoise ratio is well below 0.1. Although we could easily exactly replicate the single sine wave noise that we use in the real circuit experiment, the composite noise looks noisier and is easy to generate in the spreadsheet simulation. The operation of the spreadsheet lock-in is sufciently cleaner that we can use a lower signal-to-noise ratio. Figure 2 shows the signal and noise separately, and Fig. 3 shows the sum of the

chopped signal and noisea curve that, because of the low signal-to-noise ratio, is visually indistinguishable from the noise shown in Fig. 2. Passing the noise-contaminated signal through the phasesensitive detector results in the waveform shown in Fig. 4. Although this waveform looks like two mirror-image versions of the noise see Fig. 2 , the signal is present in the difference between the absolute values of the two waveforms shown. In principle, the signal could be extracted by adding the two waveforms. But in fact these waveforms consist of discrete points separated slightly in time by half a period of the reference waveform that drives the chopper and phasesensitive detector. Therefore a more elaborate ltering scheme is needed to extract the signal. The greatest difference between the spreadsheet lock-in and the real circuit is in this low-pass ltering. Although it would be possible to simulate the circuits simple RC lowpass lter, with its 6-dB-per-octave rolloff, understanding the simulated lter requires knowledge of digital signal processing.4 Digital signal processing is a complicated subject and is beyond the level of most undergraduate electronics courses. The two-stage averaging lter we use instead is easy for students to understand, and they nd that it makes sense in light of the sign alternations occurring in the phasesensitive detector. In principle, a single-stage lter should work, but in practice such a lter would require a much higher reference frequencyso high that the signal and noise waveforms undergo negligible change during one reference cycle. Even with our 1000 cell columns, the change in these waveforms over a reference cycle that is, from one

Fig. 2. The signal and noise waveforms. The different scales make the amplitude of the signal appear to be ten times greater than it actually is compared to the noise amplitude. The overall signal-to-noise ratio is well below 0.1. 1228 Am. J. Phys., Vol. 78, No. 11, November 2010

Fig. 3. The sum of the chopped signal and noise is visually indistinguishable from the noise alone. Notes and Discussions 1228

Fig. 4. The output of the phase-sensitive detector consists of alternating positive and negative values. The former includes the signal, and the latter includes only the noise.

Fig. 6. The output of the second ltering operation is a clean reconstruction of the original ramp signal.

spreadsheet cell to the next one down is too great for a really clean extraction of signal from noise. Nevertheless, as Fig. 5 shows, the signal waveform is recognizable and dominant in the output of the rst stage of ltering. The second ltering stage yields a clean reconstruction of the original signal waveform see Fig. 6 . Figures 26 show the inner workings of our spreadsheet lock-in amplier. Comparison with the oscilloscope photos in Ref. 1 shows the parallels with the waveforms taken at the corresponding points in the actual lock-in circuit shown in Fig. 1. Thus the spreadsheet lock-in described here is a direct analog of an actual lock-in amplier. IV. THE MYSTERY SIGNAL: A PEDAGOGICAL EXERCISE We use the spreadsheet lock-in as an exercise during the week that our electronics course covers signal-processing techniques. This exercise may be done as a stand-alone activity, in conjunction with a hands-on laboratory involving the circuit in Ref. 1 and/or in conjunction with a simple demonstration in which a commercial lock-in amplier extracts from ambient noise the signal from a dim, slowly varying LED as detected by a phototransistor. In any case, we give students instructions for building the spreadsheet lock-in and ask them to try it on one or more signals that

they choose and construct in their spreadsheets rst column. Once students are convinced that their simulated lock-in ampliers are functioning correctly, they email the instructor requesting a mystery signal, which is delivered by email. The mystery signal consists of a spreadsheet containing a single column of values. Students know nothing about the mystery signal except that it has been chopped at an agreed-on reference frequency, usually corresponding to 100 cell columns in the spreadsheet lock-in, and then summed with a much larger noise waveform. As in Fig. 3, the mystery signal is completely buried in noise and is visually undetectable in plots of the spreadsheet columns sent to the students. Usually each student gets a different mystery signal. Students paste the noisy mystery signal into the fourth column of their spreadsheet lock-in simulators, corresponding to the input of their phase-sensitive detector. The output of the second ltering operation is a clean reconstruction of the mystery signal, which becomes the nal plot in the students write-ups of this exercise. V. CONCLUSION The spreadsheet lock-in simulation we have described provides exposure not to the lock-in as the impressive black box that it can be but to the essence of its operation. Used alone or in conjunction with construction of a simple lock-in circuit, the spreadsheet lock-in simulation helps students understand what goes on inside this remarkable instrument. ACKNOWLEDGMENTS The authors thank the many Middlebury College students in the Electronics for Scientists course who made suggestions to improve the authors real and simulated lock-in exercises.
a

Fig. 5. The output of the rst ltering operation. Although not particularly clean, the ramp waveform of the signal clearly dominates. 1229 Am. J. Phys., Vol. 78, No. 11, November 2010

Electronic mail: wolfson@middlebury.edu R. Wolfson, The lock-in amplier: A student experiment, Am. J. Phys. 59, 569572 1991 . 2 T. OHaver, Lock-in amplier, terpconnect.umd.edu/toh/models/ lockin.html . 3 J. L.Guinon, J. Garca-Antn, and V. Prez-Herranz, Simulation of a lock-in amplier by means of the Mathcad symbolic software solver, Anidad 60, 396402 2003 ; see: icee2008hungary.net/download/fullp/ full_papers/full_paper82.pdf . 4 R. G. Lyons, Understanding Digital Signal Processing, 2nd ed. PrenticeHall, Upper Saddle River, NJ, 2004 .
1

Notes and Discussions

1229

Potrebbero piacerti anche