## Servicios Personalizados

## Articulo

## Indicadores

- Citado por SciELO

## Links relacionados

- Citado por Google
- Similares en SciELO
- Similares en Google

## Bookmark

## Latin American applied research

*versión impresa* ISSN 0327-0793

### Lat. Am. appl. res. v.36 n.3 Bahía Blanca jul./sept. 2006

**Random sampling in high-frequency digital lock-in amplifiers**

**M. O. Sonnaillon, R. Urteaga and F. J. Bonetto**

*Laboratorio de Cavitación y Biotecnología-lnstituto Balseiro Av. Bustillo 9500, San Carlos de Bariloche (8400), Argentina msonnaillon@ing.unrc.edu.ar, urteagar@cab.cnea.gov.ar and bonetto@ib.edu.ar*

*Abstract* — The application of a random sampling scheme in high-frequency digital lock-in amplifiers is proposed. This scheme allows reducing the sampling frequency with reduced aliasing effects. Analytical and numerical analyses that show the advantages and limitations of the proposed scheme are presented. Furthermore, experimental tests that validate the proposal are given. The maximum input-signal frequency of a lock-in amplifier working with the proposed sampling scheme is not limited by the sampling frequency. Instead, the limit is imposed by the quantization of the random time periods and the sample-and-hold device.

*Keywords* — Lock-In Amplifier. Random Sampling. Digital Signal Processing.

**1. INTRODUCTION**

Lock-in amplifiers (LIA) are measurement instruments widely used in science and engineering. They can measure signals in presence of high noise levels. The signal frequency must be locked to a reference, which is used by the lock-in to carry out the measurements.

Traditional LlAs are built with analog electronics, but modern ones use digital signal processors (DSPs) to perform the measurements. When using traditional digital signal processing techniques (*i.e.* uniform sampling), the input signal must be sampled at more than twice the maximum frequency present in the input spectrum in order to avoid aliasing effects, as stated in the Nyquist theorem. This is necessary to perform a fully-digital signal processing, without additional analog pre-processing.

If the frequency of the reference signal is in the range of a few hundred kilohertz, the required sampling frequency can be reached with current technology of analog-to-digital converters (ADCs) and DSPs. However, if the input frequency is higher (more than a few megahertz), the technological limitations of the ADCs and the DSPs make the implementation of a complete digital LIA in this frequency range not practical or at least not economically convenient. The ADC speed limit of commercial high resolution (*i.e.* more than Mbit) ADCs is in the order of a few hundreds of MHz. Furthermore, the computational requirements needed to process at these sample rates are excessively high to be performed with a single DSP device.

Modern LIAs are completely implemented with digital electronics in frequency ranges from DC to 2MHz (Signal Recovery, 2002). A detailed description of a LIA signal processing, working with uniform sampling, can be found in Sonnaillon and Bonetto (2005). For higher frequencies, the sampling rate must be too high; hence commercial high frequency LIA are built with mixed analog and digital electronics (Stanford Research, 1997).

If the samples are taken at random time instants, the sampling frequency can be reduced below the Nyquist frequency without aliasing effects that certainly occur with uniform sampling (Bilinskis and Mikelsons, 1992; Mednieks, 1999). Hence, the ADC speed requirements and DSP processing requirements can be reduced. The sample-and-hold (S/H) device bandwidth and jitter determines the maximum operating frequency. S/H devices are not expensive and set a very high frequency limitation. Commercial S/H devices have maximum frequency limits of up to 15GHz (Rockwell Scientific, 2005).

In this paper the application of a random sampling scheme to digital LIAs is proposed. The scheme is described and validated analytically. The analysis shows its advantages and limitations. Numerical simulations are presented to verify the analytical results. Experimental tests are included in this paper to further validate the proposal.

**II. A BASIC LOCK-IN AMPLIFIER**

A LIA uses a reference signal that can be generated by the same instrument or can be generated externally. In the last, the LIA uses a phase locked loop (PLL) to internally generate a sinusoidal waveform with very low distortion, and with the same frequency and phase of the reference input. A general expression of the internal reference is:

*r*(*t*) = sin(2π *f*_{0}*t*). (1)

The input signal *i*(*t*) is composed by a sinusoidal signal of frequency *f _{0}* added to a generic function that represents noise and the harmonic distortion, called

*n*(

*t*):

*i*(*t*)= *A* sin (2π*f*_{0}*t* + θ) + *n*(*t*). (2)

The LIA amplifies and multiplies the input signal by the in-phase and the quadrature (shifted 90 degrees) components of the reference.

(3) | |

(4) |

where *r _{p}* and

*r*represent the references in phase and quadrature respectively,

_{q}*n*and

_{p}*n*represent the noise functions after the products.

_{q}By filtering out the AC components and keeping only the average value (the DC signal), two signals with estimations of the in-phase and the quadrature components of the input signal are obtained.

(5) |

Low frequency and DC components of the noise function after the products (*n _{p}* and

*n*) introduce error in the estimation defined by Eq. (5). This error depends on the noise spectrum of

_{q}*n*(

*t*) and can be reduced by lowering the cut-off frequency of the output filter. Except in pathological cases when the noise spectrum has a large component too close to the reference frequency, the error is negligible.

Thus, the magnitude and phase of the input signal can be computed:

(6) |

where the atan2(*y*,*x*) function computes the tan^{-1} of *y/x* taking into account the signs of both arguments.

**III. PROPOSED SCHEME**

The proposed sampling scheme is called additive random sampling (Bilinskis and Mikelsons, 1992). The input signal is sampled at random time instants defined by the following equation:

(7) |

where *T _{i}* is a random period, defined by:

*T _{i}* = (

*M + r*) δ (8)

_{i} where δ is the minimum time step, which represents a limitation in the hardware (random time generator). The value of *Mδ* is the minimum sampling interval and depends on the ADC conversion time. The variable *r _{i}* is a random integer number with a uniform probability mass function (PMF) in the interval [0,

*R*]:

(9) |

The sampled input signal has the form:

*i*(*t _{i}*) =

*A*sin (2π

*f*

_{0}

*t*+ θ) +

_{i}*n*(

*t*) (10)

_{i} where *A* is the signal amplitude, *f _{0}* is the signal frequency,

*θ*is its phase with respect to the LIA reference, and

*n*(

*t*) is a generic noise signal. The sampling instant

*t*depends on all the previous random intervals, from

_{i}*T*

_{1}to

*T*).

_{i}A LIA generates digitally two internal signals, the in-phase and the quadrature references:

r(_{p}t) = sin (2π _{i}f_{0}t)_{i} | (11) |

r(_{q}t) = cos (2π _{i}f_{0}t)_{i} |

and multiplies the input by both signals,

(12) | |

(13) |

As the digital processing is performed during a finite time, the generic noise signal can be represented using a Fourier series:

(14) |

where the fundamental frequency *f _{n}* is the reciprocal of the processing time,

*θ*is the phase shift of each component, and the amplitudes are given by

_{k}*a*.

_{k}Using Eq. (14), Eqs. (12) and (13) can be represented by a sum of a DC value and several cosine functions:

(15) |

where the Fourier components *f*_{l}, *f*_{2}, ... correspond to the intermodulation products of the input signal components with the reference signal (*i.e.* 2*f*_{o}, *f*_{o} ± *kf _{n}*).

The LIA must measure the DC value of the signal *p*(*t*) (*D*) and reject all the AC signals. For this reason, the case of a DC value plus a single generic cosine function is considered in this analysis. This cosine function has arbitrary values of frequency *f*, magnitude *B* and phase *ψ*. The results can be extended to the sum of several cosine functions.

The generic signal has a random time shift (*t _{S}*) with respect to the initial sampling time. This random time shift produces a random phase shift () in the cosine function, given by:

(16) |

with a uniform PDF in the interval [-π, π]. Hence, the generic signal is:

(17) |

A simple LIA takes *n* consecutive samples and computes a Moving Average Filter (MAF) for each output component (in-phase and quadrature). This filter is optimum for filtering white noise with a given settling time (Smith, 1999). The MAF outputs are given by:

(18) |

The MAF output is a sequence of averages of the last *n* samples. Hence, in order to simplify the equations, a single average of *n* samples of the generic function *x*(*t _{i}*) is analyzed. This average is defined by:

(19) |

where *t _{k}* are the random sampling instants, which depend on the previous random intervals

*T*. If

_{j}*t*is made zero, from (7) and (8),

_{0}*t*is given by:

_{k}(20) |

In Carrica *et al.* (2001) the same sampling scheme is evaluated for measuring DC signals. However, the minimum time step limitation is not considered. This limitation is significant in high frequency implementations and imposes the maximum frequency limitation. The subsequent analysis follows a similar procedure to the one presented in Carrica *et al.* (2001), and demonstrates that the estimator defined by (19) is unbiased. Replacing (17) and (20) in (19) yields:

(21) |

To demonstrate that (21) is an unbiased estimator of the DC value, the expected value of the output is computed:

(22) |

where is the joint PDF of *o _{n}*. Since the random variables are statistically independent the joint PDF is the product of the individual PDFs (or PMFs):

(23) |

where,

(24) |

resulting,

(25) |

Replacing (21) and (25) in (22), Eq. (26) is obtained. The integral in vanishes for any value of *R*, *δ*, *M* and *n*. Hence, the expected value of the MAF is:

*E*{*o _{n}*} = D. (27)

This result demonstrates that the MAF is an unbiased estimator of the DC value *D*, including the case of the traditional uniform sampling (*R* = 0).

The value of the variance is computed in order to study the performance of the estimation for different values of the parameters *R*, *δ*, *M* and *n*. The variance is defined as:

(30) |

where is given by (28). This equation can be simplified to obtain (29). The normalized variance with respect to *B*^{2}/2 is given by (31). For the case of uniform sampling, (31) is reduced to:

(32) |

When the frequency *f* has integer multiples of the sampling period *M·δ*, the expected square of the error is maximum (aliasing effect).

In the limit case of negligible small time steps (δ→0), (31) is simplified to (33), assuming that *T _{min}=Mδ* is the minimum sampling interval and

*T*is the maximum value of the continuous random variables

_{rnd}=Rδ*T*. This equation is similar to the one obtained in Carrica,

_{k}= r_{k}δ*et al.*(2001).

(26) | |

(28) | |

(29) | |

(31) | |

(33) |

In case of *R* ≠ 0 (random sampling), the aliasing limitation is due to the minimum time step *δ*. When frequency *f* is an integer multiple of *1/δ*, the variance is maximum (aliasing effect). Figure 1 shows the variance for *n*=10, *M*=3, δ=200ns and three different values of *R*. The extension of the maximum working frequency without aliasing is evident in the cases of *R* = 10 and 100. Besides, the integral of the variance gives and idea of the total noise energy in a frequency band for a given value of *n*. This integral between 0 and 5 MHz is equal for the three different values of *R. *With random sampling, the normalized variance can be reduced by incrementing the number of averaged points (*n*). Hence, the noise floor can be reduced as low as is desired. However, the peaks corresponding to *σ _{n}* = 0dB, which represent the spectrum aliasing, cannot be reduced. The increment of the number of averaged points can be achieved with a higher measurement time or higher mean sampling frequency.

With the parameters used in Fig. 1, in order to avoid aliasing effects, the maximum working frequency of the digital LIA cannot exceed 2.5MHz. Hence, the maximum frequency component after the products (3) and (4) is 5MHz. The LIA should have an anti-aliasing filter at the analog input with a cut-off frequency of 2.5MHz in order to filter-out the higher frequency components of *n*(*t*).

Fig. 1: Normalized variance as a function of frequency, a) R=0, b) R=10 and c) R=100.

**IV. ERROR INTRODUCED BY THE SAMPLING JITTER**

The measurements are disturbed if the sampling instants have random jitter. Considering an input signal without noise, the sampling with jitter can be represented as:

*i*(*t _{i}*) =

*A*sin(2π

*f*

_{0}(

*t*) +

_{i}+ j_{i}*θ*) (34)

where *j _{i}* is the sampling jitter. Defining:

*τ _{i}* = 2π

*f*

_{0}

*j*(35)

_{i}equation (34) yields to:

*i*(*t _{i}*) =

*A*sin(2π

*f*

_{0}

*t*+ (

_{i}*τ*)). (36)

_{i}+ θThe products computed by the LIA are:

(37) | |

(38) |

The expected values are of the MAF outputs are:

(39) | |

(40) |

In the evaluation of the expected values, the second terms (AC components) of (37) and (38) are made zero due the integral in the random initial phase (similarly to (26)). Hence, (39) and (40) are simplified to:

(41) | |

(42) |

Two jitter PDFs are considered in the following analysis, resulting in very similar results.

**A. Jitter with uniform PDF**

In case the PDF of the jitter is given by:

(43) |

where Δ is the maximum jitter amplitude. From (41) and (42), the expected values of the in-phase and the quadrature components are:

(44) | |

(45) |

**B. Jitter with normal PDF**

Considering a jitter with normal PDF the results are similar. The normal PDF of the jitter can be described by:

(46) |

where σ^{2} is the jitter variance. From (41) and (42), the expected values of the computed components are:

(47) | |

(48) |

Figure 2 shows the expected measurement error as a function of the normalized amplitude of the jitter with the two considered PDFs with the same variance. The jitter amplitude is normalized with respect to the input signal period. With both PDFs the jitter introduces an error proportional to the square of its amplitude (a second order influence). Thus, if the jitter is small compared with the input signal period, the introduced error can be neglected. Furthermore, it is worth to note that if the amplitude and PDF of the expected jitter is known, the resulting measurements can be corrected.

Fig. 2: Relative error produced by the sampling jitter, a) Uniform PDF. b) Normal PDF. The jitter amplitude is normalized with respect to the fundamental signal period. The variances of both distributions are made equal ( in (43) and (46)).

**V. NUMERICAL SIMULATIONS**

In order to validate the analytical results shown in the previous sections, numerical simulations were performed using a personal computer. The expected values of the MAF output were computed averaging *N* large enough) numerical experiments. The plot depicted in Fig. 3 shows the normalized variance as a function of frequency for the case of uniform sampling. The parameters used in the numerical experiments are *M* = 6, *n* = 10, *δ* = 200ns and *N* = 100. In Fig. 4 the same variables for the case of random sampling (*R* = 10) are shown. The absence of aliasing effect in this frequency range is evidert. However, the aliasing effect is present at higher frequencies, due to the sampling time quantization, as is shown in Fig. 5.

Fig. 3: Normalized variance as a function of frequency for uniform sampling operation (*R* = 0). Aliasing effect is present at *f* = 400, 800 and 1200 kHz. The solid line represents the analytical curve, and the dots represent the numerical experiments.

Fig. 4: Normalized variance as a function of frequency for random sampling operation (*R* = 10). The aliasing effect is absent in this frequency range. The solid line represents the analytical curve, and the dots represent the numerical experiments.

Fig. 5: Normalized variance as a function of frequency for random sampling operation (*R* = 10). The aliasing effect is present at *f* = 5MHz (=1/δ). The solid line represents the analytical curve, and the dots represent the numerical experiments.

The influence of the sampling jitter was also evaluated numerically. Figure 6 shows the normalized error of the estimated mean (computed by the MAF) as a function of the jitter amplitude for a uniform PDF. Figure 7 shows the same error for the case of jitter with normal PDF.

Fig. 6: Normalized error as a function of the jitter amplitude (normalized with respect to the reference period) for jitter with uniform PDF. The solid line represents the analytical curve, and the dots represent the numerical experiments.

Fig. 7: Normalized error as a function of the jitter amplitude (normalized with respect to the reference period) for jitter with normal PDF. The solid line represents the analytical curve, and the dots represent the numerical experiments.

**VI. EXPERIMENTAL VALIDATION**

In order to validate the analytical and numerical results presented in the previous sections, representative experimental results are presented. The digital LIA used for the experimental results is based on a 32-bit DSP and an ADC with a maximum sampling rate of 250ksps. In Sonnaillon *et al.* (2005) the experimental prototype details are given, as well as other experimental tests.

The experimental test was carried out operating the LIA with a fixed reference frequency (100kHz) and varying the input signal between 5kHz and 500kHz in 1kHz steps. At the output, an average of *n* = 250000 samples was used.

The measurement shown in the first plot of Fig. 8 was taken with the LIA working with uniform sampling (125ksps). This sampling scheme produces the expected aliasing effect that is evident in the figure. The LIA cannot differentiate the 100kHz signal with respect to the aliased frequencies (e.g. 25kHz, 150kHz, 225kHz, 125*k*±25 kHz with *k* ∈ *N*_{0}).

Fig. 8: LIA response to a frequency scan. The top plot shows the LIA response working with uniform sampling (125ksps) and the bottom plot shows the response of the LIA working with random sampling (123ksps of mean sampling frequency). The internal reference frequency is 100kHz.

In addition, other minor peaks are present in the figure (-50dB). These are produced by the aliasing of the first harmonic of the input signal, because of a slight distortion in the generated sinusoidal waveform. These peaks are placed at frequencies of (125*k*±25)/2 kHz with *k* ∈ *N*_{0}, *k*≥3.

In the second plot of Fig. 8 the same measurement with the LIA working with the proposed random sampling scheme is shown. The mean sampling frequency is 123kHz. The only frequency that the LIA detects is 100kHz, without aliasing in any frequency of the spectrum. The noise floor, present in all the other frequencies can be reduced by increasing the number of averaged points (*n*).

**VII. CONCLUSIONS**

The application of additive random sampling to digital LIAs was proposed. The analysis presented in this paper shows that this sampling scheme allows reducing the sampling frequency significantly, without aliasing effects. The aliasing reduction is demonstrated analytically, and validated numerically as well as experimentally with a DSP-based prototype.

In addition, it is demonstrated that the maximum frequency limit is determined by the minimum time step of the random time generation. The sample-and-hold device also limits the maximum operating frequency due to its sampling jitter and its analog bandwidth.

The error introduced by the sampling jitter can be neglected if the jitter amplitude is small compared with the measured signal period. Furthermore, if the amplitude and PDF of the expected jitter is known, the resulting measurements can be corrected.

The proposed scheme is suitable for complete digital high-frequency LIAs. The complete digital implementation improves its performance and extends its range of applications with respect to analog implementations.

**REFERENCES**

1. Bilinskis, I. and A. Mikelsons, *Randomized Signal Processing*, Prentice Hall International, USA (1992). [ Links ]

2. Carrica, D., M. Benedetti, and R. Petrocelli, "Random Sampling Applied to the Measurement of a DC Signal Immersed in Noise", *IEEE Trans. Instrum. and Meas.*, **50**, 1319-1323 (2001). [ Links ]

3. Mednieks, I., "Methods for Spectral Analysis of Nonuniformly Sampled Signals", *Proc. 1999 Int. Workshop on Sampling Theory and Appl., SAMPTA'99*, Loen, Norway, 190-193 (1999). [ Links ]

4. Rockwell Scientific, "RTH050 - 15 GHz BW 1 GS/s Dual Track-and-Hold preliminary datasheet" (2005). [ Links ]

5. Signal Recovery, *Model 7280 Wide Bandwidth DSP Lock-In Amplifier User's Manual* (2002). [ Links ]

6. Smith, S.W., *The Scientist and Engineer's Guide to Digital Signal Processing*, 2nd Edition, California Technical Publishing, EEUU. Also in http://www.dspguide.com. (1999). [ Links ]

7. Sonnaillon, M.O. and F.J. Bonetto, "A low cost, high performance, DSP-based Lock-In amplifier capable of measuring multiple frequency sweeps simultaneously", *Review of Scientific Instruments*, **76**, 024703 (2005). [ Links ]

8. Sonnaillon, M.O., R. Urteaga and F.J. Bonetto, "Implementation of a high-frequency digital lock-in amplifier", *Canadian Conference on Electrical and Computer Engineering*, 2005 (CCECE05), May 1-4, 1229-1232 (2005). [ Links ]

9. Stanford Research Systems, *SR844 RF Lock-in Amplifier User's Manual* (1997). [ Links ]

**Received: September 21, 2005. Accepted: April 5, 2006. Recommended by Guest Editors C. De Angelo, J. Figueroa, G. García and J. Solsona.**