Skip to main content
The Review of Scientific Instruments logoLink to The Review of Scientific Instruments
. 2012 Feb 29;83(2):025115. doi: 10.1063/1.3687431

Power spectrum and Allan variance methods for calibrating single-molecule video-tracking instruments

Bob M Lansdorp 1, Omar A Saleh 2,a)
PMCID: PMC3306435  PMID: 22380133

Abstract

Single-molecule manipulation instruments, such as optical traps and magnetic tweezers, frequently use video tracking to measure the position of a force-generating probe. The instruments are calibrated by comparing the measured probe motion to a model of Brownian motion in a harmonic potential well; the results of calibration are estimates of the probe drag, α, and spring constant, κ. Here, we present both time- and frequency-domain methods to accurately and precisely extract α and κ from the probe trajectory. In the frequency domain, we discuss methods to estimate the power spectral density (PSD) from data (including windowing and blocking), and we derive an analytical formula for the PSD which accounts both for aliasing and the filtering intrinsic to video tracking. In the time domain, we focus on the Allan variance (AV): we present a theoretical equation for the AV relevant to typical single-molecule setups and discuss the optimal manner for computing the AV from experimental data using octave-sampled overlapping bins. We show that, when using maximum-likelihood methods to fit to the data, both the PSD and AV approaches can extract α and κ in an unbiased and low-error manner, though the AV approach is simpler and more robust.

INTRODUCTION

Single-molecule manipulation (SMM) instruments, such as the magnetic tweezer (MT), optical trap (OT), or atomic force microscope (AFM), measure properties of single molecules by tethering the molecule to a probe (i.e., a magnetic bead in the MT, a dielectric sphere in the OT, or a cantilever in the AFM), applying force to the probe, and evaluating the molecule's response by measuring the probe's position (Fig. 1). Performing a SMM experiment with accuracy and precision requires calibration of the applied force.

Figure 1.

Figure 1

A schematic representation of a video-tracking SMM instrument. A single molecule of DNA is attached to a magnetic bead on one end and a substrate on the other, and magnets are used to apply a vertical force to the bead. Light from a collimated LED strikes the probe particle and the resulting diffraction pattern can be used to track the bead in three dimensions at 60 Hz using a CCD camera. Although the magnetic tweezer is a commonly used video-tracking instrument, the methods we present in this paper are generally applicable to any video-tracking instrument.

Force calibration is frequently achieved by comparing the noisy probe trajectory to an analytical model derived from the Langevin equation. When probe mass is negligible, the Langevin equation depends on two parameters: the hydrodynamic drag on the probe, α, and the spring constant of the system, κ. Typically, estimates of α and κ are made by comparing P(f), the theoretical power spectral density (PSD) of probe fluctuations found from the Langevin equation, with P˜(f), the discrete PSD calculated from the measured probe position.

In practice, accurately and precisely comparing P(f) and P˜(f) is difficult for three reasons:

  1. Instrument response. The instrument used to measure probe position invariably has a non-uniform frequency response, distorting P˜(f) away from P(f).

  2. Finite sampling distortions.P˜(f) is distorted by the effect of aliasing, in which the estimated power at a given frequency fk contains contributions from all frequencies fk + nfs, where n = …, −1, 0, 1, …, and fs is the sampling frequency. Further, P˜(f) is also distorted by the effects of the finite duration of the measured probe trajectory, which result in spectral leakage in the resulting estimate of the PSD.

  3. Biased fitting. The model/data comparison method itself can bias the estimated parameters, as the typical strategy of least-squares fitting is correct only when the error in the data is normally distributed, which is not the case for the estimated PSD.1

In this article, we present and compare two approaches to low-error, bias-free α and κ estimation that remove or sidestep each of the three difficulties. Both strategies are formulated for a particular instrumental response function corresponding to zero-dead-time video-based tracking of probe position; that is, tracking by imaging the probe at a frame rate fs with the shutter open for a time τ = 1/fs. Our approaches remove all three sources of bias, and do so using either time-domain or frequency-domain analysis procedures; this contrasts with prior work that focused on only some of the sources of bias, and used only frequency-domain methods.1, 2, 3, 4

In the frequency domain, we derive a closed-form expression for the measured probe PSD, PA, B(f), that accounts for both aliasing and the video-tracking instrument response. While approximations to this expression have been made before,5 our expression is exact and, to the best of our knowledge, novel. We show that finite-duration (spectral leakage) effects can be removed by calculating the windowed, blocked PSD, P˜b,w(f), using established discrete Fourier transform (DFT) algorithms.4, 6 Finally, following Nørrelykke and Flyvbjerg,1 we show that bias-free fitting of PA, B to P˜b,w(f) can be achieved using a maximum-likelihood estimate (MLE) algorithm.

Our second strategy is based on a time-domain analysis, the Allan variance (AV). The AV is a two-sample difference measurement7 that is well-known in the frequency-stability literature8, 9 and has recently been introduced to the SMM community.10, 11, 12, 13 Since the AV is a time-domain analysis, neither aliasing nor spectral leakage occur. Further, the calculation of Allan variance intrinsically assumes a finite averaging time that exactly matches the video-tracking instrument function, so no additional correction for the instrument needs to be applied. Thus, AV is well-suited to the problem of determining α and κ, since no corrections must be made for the instrument response, aliasing or spectral leakage. However, using the AV is not completely free of subtleties: we show that obtaining low-error, bias-free parameter estimates requires that the AV is estimated from data using bins that fully overlap, and that range in length by factors of 2. Finally, we point out that biased fitting is also an issue with the AV due to the non-normally distributed noise in AV estimates, and estimating the noise distribution is more involved for the AV than the PSD. To overcome this, we extend the Nørrelykke–Flybjerg strategies1 to the Allan variance, and show that unbiased parameter estimates can be found from an MLE approach that accounts for the actual distribution of Allan variance estimates.

Upon comparing the two strategies, we find that the AV and the PSD, when applied in an optimal manner, can both estimate α and κ with zero-bias and with nearly-identical error. However, use of the AV is conceptually simpler, since fewer corrections need to be applied, and more practical, since the AV compresses the data more efficiently than the PSD. Furthermore, AV does not require the choice of a data compression (blocking) parameter; thus, the AV calculation has less indeterminacy.

POWER SPECTRAL DENSITY

Langevin dynamics and the physical PSD

For micron-scale probe beads trapped by optical or magnetic forces in water, inertial effects can be ignored up to roughly megahertz frequencies,14 and thus are insignificant at typical video-tracking frequencies of approximately 100 Hz. Thus, the bead position x(t) vs. time t obeys the overdamped Langevin equation of motion:

κx+αx˙=FL, (1)

where κ is the spring constant of the system and α = 6πηr is the dissipation of the spherical bead of radius r in a solution of viscosity η, and. FL is the Langevin force, a time-varying stochastic force that, in thermal equilibrium, obeys the fluctuation-dissipation relation 〈FL(t + t0)FL(t)〉 = 2αkBTδ(t0) given thermal energy kBT. The power spectral density of bead motion, P(f), where f is the frequency in hertz, can be calculated by taking the magnitude of the Fourier transform of Eq. 1 to obtain

P(f)=kBT2π2α(fc2+f2), (2)

where fc = κ/2πα. We use two-sided power spectra throughout so that integrating P(f) on the range (− ∞, ∞) results in the equipartition result 〈x2 〉 = kBT/κ.

An analytical expression for the PSD function, accounting for aliasing and the instrument function

The PSD of Eq. 2 corresponds to the true physical motion of the bead; any actual measurement P˜(f) will deviate from P(f) due to the distorting effects of aliasing and the instrumentation. In video-tracking experiments in which the bead position is measured by a camera with a shutter time τs, any motion of the bead that occurs on timescales faster than τs is diminished by the measurement;15 i.e. video tracking introduces a low-pass filter. The low-pass filtering effect of the camera can be quantitatively accounted for: when the illumination is constant over τs, the measured position xi from frame i at time ti corresponds to the average over the interval (ti − τs/2, ti + τs/2):

xi=1τstiτs/2ti+τs/2x(t)dt=[x*Πτs](ti), (3)

which we have written in the second line as the convolution of x(t) with the boxcar function Πτs(t). We define Πτs(t) to have value 1/τs for |t| < τs/2, and to be zero otherwise. The frequency-space equivalent of convolution is simply multiplication of the Fourier transforms of the two convolved functions. Thus, since the Fourier transform of Πτs(t) is sin (πfτs)/(πfτs), the PSD of bead motion including the boxcar response, PB(f), is

PB(f)=P(f)H(f), (4)

where the instrument response H(f) is

H(f)=sin2πfτsπfτs2. (5)

PB(f) only accounts for the effect of instrumental low-pass filtering in distorting the measured PSD; it does not account for the further distortions created by aliasing. The aliasing effect causes the PSD at a particular positive frequency f, with 0 < f < fs/2, to contain the summed power at all frequencies in the series |f + nfs|, where n ∈ {…, −1, 0, 1, …}.5 Thus, the measured PSD accounting for both aliasing and boxcar filtering is given by

PA,B(f)=n=PB(|f+nfs|) (6)

with PB given by Eqs. 4, 5.

In the special case that the sampling frequency is the inverse of the shutter time, fs = 1/τs, the sum in Eq. 6 can be performed analytically:

PA,B(f)=2kBTακ3κ+2αfssin2πffssinhκαfscos2πffscoshκαfs. (7)

Equation 7 can be verified in multiple ways. First, we can use PA, B and the Wiener–Khinchin relation to find the variance of the measured signal in the time domain; the result matches previously predicted results for boxcar-averaged probe positions.5 Second, we can compare PA, B with PA(f), the PSD expression that accounts only for aliasing (and not instrumental low-pass filtering)16:

PA(f)=kBTκfssinhκαfscoshκαfscos2πffs. (8)

PA corresponds to the PSD measured by an instrument with sampling frequency fs, but with an infinitely fast measurement interval (i.e., the boxcar measurement function, Πτ, is replaced by a delta function). We compare PA(f) and PA, B(f) to experimental data in Fig. 2. The data are clearly best-described by PA, B, lending confidence to the expression in Eq. 7.

Figure 2.

Figure 2

Experimental PSD (gray) compared to MLE fits to PA, B (Eq. 7, blue) and PA (Eq. 8, purple). The data trajectory contained 4096 points, and was acquired by 60 Hz video-tracking of a 1 μm diameter bead tethered to a DNA molecule in a magnetic tweezer (see Ribeck (Ref. 28) for experimental procedure). The trace was split into half-overlapping blocks of 512 points and Hann-windowed before PSD calculation. The best-fit parameters from the PA, B fit are κ = 2.46 × 10−4 pN/nm and α = 1.39 × 10−5 pN s/nm.

We further verified the prediction of Eq. 7 through simulation of probe trajectories in the time domain, computation of the PSDs of the simulated trajectories, and comparison to PA, B. We simulated discrete particle trajectories using an algorithm based on the solution to the Smoluchowski equation for a Brownian particle in a harmonic well.17 To account for the averaging effect of the boxcar filter, we simulated discrete points with a short time step of δ < τ, then averaged together consecutive clusters of τ/δ points, thus arriving at a set of discrete positions xi spaced by time τ. We did this for multiple time steps δ = τ/m, with m = 1, 2, 4, 8, 16. Figure 3 shows comparisons of the simulation with both PA, B and PA for both fcfs and fcfs. For m = 1, there is no averaging of the time-domain signal, so the simulated PSDs match PA, as expected. As m increases, the simulated PSDs converge on PA, B. This directly indicates that Eq. 7 correctly accounts for the camera's averaging effect on the measured probe position.

Figure 3.

Figure 3

Plots of PSDs measured from time-domain simulations compared to the analytical PSDs, PA (gray dashed line; Eq. 8) and PA, B (solid black line; Eq. 7). The measured PSDs (colored lines) correspond to averages of 104 simulations. Each simulation contained 1024 points with α = 10−5 pN s/nm and fs = 100 Hz, with each point representing the average of m = 1, 2, 4, 8, 16 simulation time steps, as labeled. The spring constant was set to give (top) fc = 5 Hz, or (bottom) fc = 50 Hz. The insets highlight the convergence of the measured PSD to PA, B with increasing m. We note that the bottom figure has an apparent corner frequency which is due to the low-pass filtering effect of the camera (see Eq. 5).

Estimating the PSD from a time series of data

Spectral leakage and windowing:

Given a set of N discrete measurements of probe position vs. time, an estimate, P˜(f), of the PSD can be made from the discrete Fourier transform . Directly comparing P˜(f) to PA, B(f), (Eq. 7) leads to difficulties due to the finite duration of the measurement: the frequency-domain analysis of the Langevin equation implicitly assumes that the trajectory is infinitely long, while any measurement will naturally be of finite duration. This truncation leads to the phenomenon of spectral leakage, in which some power present in the signal at one frequency shows up at other frequencies. For white noise, spectral leakage has no effect, as neighboring frequencies leak equal and opposite power to each other, resulting in zero net change. However, for limited bandwidth signals (such as the Lorentzian, where the power is focused in the range f < fc), spectral leakage leads to PSD distortions.

Spectral leakage can be minimized by “windowing” the input data.4 In particular, given N measurements of probe position, xj, jε{0, 1, 2, …, N − 1}, at sampling rate fs, the PSD can be estimated from:

P˜w,N=1fsNj=0N1wjxje2πijk/N2, (9)

where wj is the windowing function, which can be chosen from a range of standard functions, all of which taper to zero at the edges of the data trace.18 Here, we use a Hann window, defined by

wj=83sin2πjN. (10)

Application of the window reduces the total power in the PSD in a frequency-independent manner; this is corrected by the leading factor of 8/3.

Blocking:

In the absence of stochastic noise, the windowed PSD P˜w,N would converge on the analytical aliased filtered Lorentzian PA, B. However, a feature of the discrete Fourier transform is that increasing N does not decrease the stochastic noise; instead, it increases the number and density of estimates in frequency space. Moreover, while the noise in xj is normally distributed, the stochastic noise in a single power spectrum is distributed exponentially, complicating least-squares fitting routines that assume normally distributed noise.

The stochastic noise can be decreased and the noise distribution made more normal by compressing the data. Typically, this is done by blocking:1 the data trace is separated into b blocks of length m, the PSD of each block, P˜m, is calculated, and averaged with all others to give the blocked PSD P˜b=P˜m/b. Blocking should be adjusted when also windowing, as application of the window minimizes the contribution of data near the termini of each block. All of the data can be efficiently utilized by following Welch's method6: instead of blocking into non-overlapping bins, b = N/m, the data trace is blocked into half-overlapping bins (Fig. 4), giving b = 2N/m − 1. The windowed PSD of each block, P˜w,m, is calculated, and averaged with all others to give the final blocked, windowed PSD estimate P˜w,b=P˜w,m/b. This insures efficient exploitation of all of the available data while keeping each bin statistically independent of its neighbors.

Figure 4.

Figure 4

Illustration of different manners of binning (“blocking”) data, shown here for an example trace containing N = 12 points split into bins of length m = 4. Non-overlapping sampling corresponds to no sharing of points between bins, and gives 3 bins in this example. This is used in calculation of the “standard” AV, or in non-windowed estimates of the PSD; neither method is optimal, as described in the main text. Half-overlapping sampling use bins that are offset by half the binning interval from each neighbor, giving 5 bins offset by two points in this example. This insures maximal data usage when calculating windowed PSDs, and is known as Welch's method (Ref. 6). Fully-overlapping sampling uses bins offset by a single point from each neighbor, giving 9 bins here. This method is used to calculate the OAV.

The noise distribution in a PSD:

Recently, Nørrelykke and Flyvbjerg1 have pointed out that, even after blocking, the distribution of noise in the estimated PSD is typically still far from normally distributed, but that fitting can proceed in a precise manner by accounting for the actual distribution: averaging b spectra together causes the noise distribution to be the convolution of b exponential distributions, which is a Gamma distribution. In a Gamma distribution, the probability f of observing a certain value x depends on parameters η, θ as

f(x;η,θ)=xη1ex/θθηΓ(η), (11)

where Γ(η) is the gamma function. The two free parameters are the shape parameter η and the scale parameter θ. For a PSD calculated from b blocks, and whose true value is given by PA, B(fk), the probability of observing P˜b,w is proportional to f(P˜b,w;b,PA,B(fk)/b); that is, the shape is η = b and the scale is θ = PA, B(fk)/b. Explicitly using the Gamma distribution allows for the application of bias-free maximum-likelihood estimation.1 We discuss this below (Sec. 4), in conjunction with a similar discussion of fitting to the Allan variance.

ALLAN VARIANCE

Definition of the Allan variance

An alternative to frequency-domain analysis of probe fluctuations is the AV, denoted by σ2(τ). The AV is a time-domain measure: it is half of the ensemble-averaged variance of the difference between two consecutive samples of position,19, 20 where each sample is itself a local average of probe position (Eq. 12). The timescale τ denotes both the time between consecutive samples, and the time over which each sample is averaged. Thus, for a probe position x(t) and integer j, the AV is defined by

σ2(τ)=12(x¯τ,j+1x¯τ,j)2, (12)

where x¯τ,j is given by

x¯τ,j=1ττj12τj+12x(t)dt (13)
=[x*Πτ](jτ). (14)

The identical forms of Eqs. 3, 14 emphasize that the camera measures an average probe position, exactly as called for by the AV. Thus, while the PSD requires special corrections for a boxcar filtering instrument function, the AV does not, simplifying its use in this situation. In situations where data contains dead-time, for example, when the frame-read time of a CCD approaches the frame acquisition time, the AV can compensated by bias correction when the noise sources have known power laws.21, 22 In our experiments using a JAI CV-A10CL camera, the ratio of frame-read time to frame-acquisition time is very small, 3.5μs × 60 Hz ≪ 1, so the instrument function is well-approximated by the boxcar function introduced in Eq. 3.

An analytical expression for the AV of a damped harmonic oscillator

In analogy to Sec. 2B, we derive an analytical expression for the AV for a Brownian probe in a harmonic well. By expanding the product in Eq. 12, we find that the AV is related to the variance and autocorrelation of x¯τ:

σ2(τ)=x¯τ2x¯τ,j+1x¯τ,j, (15)

where we have made use of the stationary nature of the process, so x¯τ,j+12=x¯τ,j2x¯τ2. The Wiener–Khinchin theorem can be used to relate the variance and autocorrelation of x¯τ to its PSD; in turn, given the properties of convolution, the PSD of x¯τ depends on the PSD of x(t) and of Πτ. This allows the AV to be related to P(f), giving:8

σ2(τ)=4sin4(πfτ)P(f)(πfτ)2df. (16)

Using Eq. 2, this integral can be performed to obtain an analytical expression for the AV of an overdamped bead in a harmonic well:

σSMM2(τ)=2kBTακ2τ1+2ακτeκταα2κτe2κτα3α2κτ. (17)

This expression has long been known in the frequency-stability literature,23 but we have rewritten it here in terms of α and κ with special application to SMM experiments. For long times, τ ≫ α/κ, the AV reduces to σSMM2(τ)2kBTα/κ2τ, consistent with previously published approximations.10, 11, 12 The large time limit can be understood by noting that neighboring x¯τ values become uncorrelated for large τ, so the variance arises from the standard error in determining the mean of a normally distributed value, i.e., variance 1/(# of points)1/τ. In the opposite limit, τ ≪ α/κ, we find σ2(τ)2kBTτ/3α; that the variance increases linearly with τ arises from the purely diffusive nature of the probe motion at short times. Thus, a feature of the AV of a damped, Brownian harmonic oscillator is that it increases at short times and decreases at long times (Fig. 5); the location of the intervening peak can be found numerically to be τmax ≈ 1.89 α/κ, i.e., the peak scales with the system's correlation time, α/κ.

Figure 5.

Figure 5

Experimentally derived OAV calculating using bins of octaved lengths (points), or all possible lengths (gray line), compared to the best-MLE-fit to the theoretical prediction (Eq. 17, dashed line). The data were acquired as described in Fig. 2. The best-fit parameters are κ = 2.40 × 10−4 pN/nm and α = 1.38 × 10−5 pN s/nm.

Estimating the AV from a time series of data

Overlapping AV: For a discrete set of measurements of probe positions xj at times tj = jτs for j = 1, …, N, the “standard” AV can be calculated for timescale τ = mτs by computing the mean of successive bins of m points, then taking the mean-squared difference of the resulting N/m − 1 neighboring pairs of bins. So, in particular, the first pair of bins corresponds to the sets of points (1, …, m) and (m + 1, …, 2m), the second pair are points (m + 1, …, 2m) and (2m + 1, …, 3m), and so on, through the Nth point. However, the standard AV is known to not fully utilize the data.24 A superior option is the “overlapping” AV (OAV), which uses every possible m-bin (Fig. 4). In particular, the first OAV pair of bins is (1, …, m) and (m + 1, …, 2m), the second pair is (2, …, m + 1) and (m + 2, …, 2m + 1), and so on, through the Nth point. The standard and overlapping AVs are identical for m = 1 and m = N/2, but elsewhere the OAV more efficiently exploits the available data, and so provides a better estimate of the true AV. The experimentally derived OAV can be computed from25

σ˜m2=12(N2m)(mτc)2k=1N2m(xk+2m2xk+m+xk)2. (18)

We use only the OAV in calculations throughout this article.

Octave sampling: The OAV can be determined for any integer value of the bin size, m = 1, 2, …, N/2 (see Fig. 5). However, upon estimating and plotting the OAV, it is clear that neighboring values of m have a correlated noise, which stems from the nearly-identical sets of points used to calculate the OAV for similar values of m. While calculating all possible m values might be useful for visualizing the data, the noise correlations preclude most fitting algorithms, which assume independent error in the fitted points. Allan pointed out that this issue can be solved by octave sampling,26 i.e., only using bin sizes in powers of 2: m = 1, 2, 4, 8, … up to mN/2. Using bins of 2n ensures a minimal correlation between successive estimates, and improves the results of fitting, as discussed in Sec. 5 and shown in Fig. 7.

Figure 7.

Figure 7

Bias and error in the best-fit parameters α and κ found from MLE fitting of Eq. 17 to simulated AVs. Trajectories were simulated with parameters as described in Fig. 6. From each trajectory, we calculated and fit to both the octave-sampled, overlapping AV (α: • and κ: ■), and the all-τ, overlapping AV, (α: ○ and κ: □). The bias (top) is reported as the median best-fit value across all simulations relative to the true value, while the error (bottom) is reported as the standard deviation in best-fit results relative to the median value. In the bias plots, the gray bar indicates values within ±1% of being unbiased.

Error in the AV estimate: At the root of the AV is the difference x¯j+1x¯j, which is normally distributed with mean zero. Thus, an estimate for the AV (which is a sum of squares of such differences) is Gamma distributed. The estimated blocked and windowed PSD, P˜b,w (Sec. 2C), is also Gamma distributed, and P˜b,w has the same shape factor, η = b, for all frequencies fk. However, the estimated AV does not have a constant shape factor because the number of available differences depends on the bin length m; this is the major complicating factor in working with the AV relative to the PSD.

Generally, the shape factor is given by the number of exponential distributions that are convolved to form the metric (this is why η = b for the PSD). The standard AV for a given m is calculated from N/m − 1 differences; since each difference has a Chi-Square distribution, two of which must be convolved to get an exponential distribution, the shape factor is

ηAV(m)=12Nm1. (19)

As discussed, the OAV more efficiently exploits the available data, meaning that there are more available degrees of freedom per m. Thus, for the OAV, the shape factor of Eq. 19, while nearly correct, is an underestimate. The exact calculation of the available degrees of freedom for the OAV is quite involved, and beyond the scope of this paper; it has been the subject of much discussion in the literature.20, 27 However, we have found that using η from the relatively simple Eq. 19 gives near-identical results to more exact, involved estimates, so we use Eq. 19 in all computations discussed below.

MAXIMUM LIKELIHOOD ESTIMATION

As discussed by Nørrelykke and Flyvbjerg,1 least-squares fitting to the PSD always leads to bias in the best-fit parameters. The bias occurs because of the least-squares assumption that the noise is normally distributed, whereas the noise in the PSD is Gamma-distributed (Sec. 2C). Similarly, the noise in the AV is Gamma distributed (Sec. 3C), so least-squares fitting of AVs will also lead to biases. Although these biases can be analytically corrected,1 an unbiased and more accurate alternate to least-squares fitting is to perform a maximum likelihood estimate (MLE) that accounts for the correct noise distribution in the data.1 The MLE approach stems from the assumption that the optimal parameters will maximize the joint probability pJ=kpk(y˜k;yk(α,κ)), where pk(y˜k;yk(α,κ)) is the probability of measuring a value y˜k given a true value yk that depends on parameters (α, κ). By substituting the Gamma distribution, Eq. 11, for pk, it can be shown that maximizing pJ is equivalent to minimizing the cost function:1

F=kηky˜kyk(α,κ)+lnyk(α,κ), (20)

where ηk is the shape parameter for point k. Eq. 20 applies to both the PSD and AV. For the PSD, the shape factor is constant for all points, and equal to the number of blocks, ηk = b, while the true value is found from Eq. 7 as PA, B(fk, α, κ). For the AV, the shape factor is point-dependent, ηk = ηAV ,where ηAV is defined in Eq. 19. The true value is found from Eq. 17 as σSMM2(τ=kτc,α,κ). In either case, minimization of Eq. 20 with respect to (α, κ) can be carried out relatively efficiently using most numerical analysis software; we use the MLE approach to generate the results described below.

BIAS AND ERRORS IN AV AND PSD FITS

To test and compare the AV and PSD algorithms, we performed a set of simulations of probe trajectories using a variety of input parameters and tested the ability of the algorithms to correctly extract the known parameters. In particular, we simulated video-tracking trajectories using a frequency-space algorithm, as discussed in the Appendix. All trajectories contained N = 4096 points sampled at fs = 100 Hz. The drag was α = 10−5 pN s/nm, as appropriate for a spherical bead of diameter 1 μm in water. We varied the spring constant, κ, between ≈1.4 × 10−5 and ≈6.8 × 10−3 pN/nm; this gave a set of corner frequencies fc that ranged from ≈0.2 to ≈100 Hz. For each spring constant, we simulated 1000 trajectories. Each trajectory was processed according to Secs. 2C, 3C to give estimates of the PSD and AV, and fit using the MLE approach to extract the optimal parameters (α, κ). All numerical work was carried out in Mathematica, with the MLE minimization carried out using the FindMinimum function.

To emphasize the need for windowing in the PSD calculation, we compared the best-fit parameters from PSDs that did or did not use a Hann Window (Fig. 6) for a variety of block lengths m. When windowing, we used half-overlapping samples (blocks), while the unwindowed analysis used non-overlapping samples; so, for example, for blocks of length m = N/4 = 1024, the windowed PSD was calculated from b = 7 blocks, while the unwindowed PSD used b = 4 blocks. Both methods performed similarly in estimating the spring constant, giving unbiased estimates with relatively low noise over a broad range of fc. In contrast, the use of windowing was clearly superior in the estimate of drag: the unwindowed method gave significant bias and increased stochastic error, in the estimate of α, particularly at lower fc. For both parameters, the stochastic error in the windowed estimates decreased as m decreased, with m = N/8 = 512 points or fewer needed to obtain the minimal error. We attribute this to end-effects: using a single block (m = N) and applying a window cause a loss of information near each terminus of the trace, which increases the error. Instead, using many overlapped blocks decreases the information lost at the termini (because the blocks are shorter), while overlapping avoids information loss in the interior of the trace.

Figure 6.

Figure 6

Bias and error in the best-fit parameters α and κ found from MLE fitting of Eq. 7 to simulated PSDs. A total of 1000 simulations of a video-tracking experiment were performed; each simulation contained 4096 points and used α = 10−5 pN s/nm and fs = 100 Hz. The spring constant κ was set to give a range of fc between 0.2 and 100 Hz. Each trajectory was blocked into subsequences of length m, as indicated, and the PSD was calculated either using a Hann window (solid lines) or not (dashed lines). We used half-overlapping blocks (Fig. 4) for the windowed calculation, and non-overlapping blocks for the unwindowed calculation. The bias (top row) is reported as the median best-fit value across all simulations relative to the true value, while the error (bottom row) is reported as the standard deviation in best-fit results relative to the median value. In the bias plots, the gray bar indicates values within ±1% of being unbiased.

The results of the AV analysis (Fig. 7) demonstrate the importance of octave-sampling: we compared the best-fit parameters from AVs estimated using bins of all possible lengths (all-τ), m = 1, 2, 3, …, N/2, and those estimated from octaved bins, m = 1, 2, 4, …, N/2. The octave-sampled method gives bias-free estimates of α and κ across nearly the entire range of fc investigated, while the all-τ approach has a small, but significant, bias in both parameters. More significantly, octave-sampling leads to lower error in the estimated parameters, particularly in α where the noise in the all-τ estimate is roughly three-fold worse. Finally, we were unable to get the all-τ method to consistently converge for the largest two fc values investigated, and so, Fig. 7 shows no all-τ point at fc = 50 or 100 Hz. Generally, numerical minimization routines must be carefully handled to insure convergence. Here, we attribute the difference in the robustness of the octave and all-τ algorithms to the different numbers of points that are fit: whereas the all-τ method uses N/2 points, the octave-sampled AV fits to only log2N points, a vast decrease that increases both the robustness and speed of the minimization procedure.

EXPERIMENTAL RESULTS

To demonstrate the applicability of our AV fitting method to experimental data, we use a magnetic tweezer instrument to stretch double-stranded DNA molecules over a range of forces.28 From each particle trajectory taken at a constant force, we calculate the octave-sampled, overlapping AV, and use MLE fitting of Eq. 17 to estimate αx, αy, αz, κx, κy, and κz. We then compare these parameters to those independently estimated by theories of bead drag or polymer elasticity.

In Figure 8 we plot the drag coefficients αx, αy, αz as a function of the average bead height. As the magnetic force is decreased, the bead height decreases and the drag coefficient of the bead increases due to surface effects, which can be theoretically predicted using the Faxén correction.29 Both αx and αz closely match the expected behavior. We consistently found that αy > αx, which we attribute to the rotational constraints imposed on the magnetic beads by the applied magnetic field. At high force, the fitting routine was unable to accurately determine αz, since the corner frequency of the system approached and exceeded the Nyquist frequency of our camera.

Figure 8.

Figure 8

Experimental results showing the relationship between the measured drag coefficients (αx0: •) ,(αy0: ○) ,(αz0: □), and the bead height above the surface in comparison to the theoretical Faxén' correction (Ref. 29). For all theoretical curves, we use radius R = 530 nm, viscosity η = 0.00115 Ns/m2, and α0 = 6πηR. The bottom panel demonstrates the relationship between the extension of dsDNA and the measured stiffness coefficients (κx: •), (κy: ○), (κz: □) in comparison to the predictions of a model that combines dsDNA's worm-like-chain elasticity (Ref. 30) with the inverted-pendulum model of a magnetic tweezer (Ref. 15). For all analytical worm-like-chain curves, we use persistence length lp = 53 nm, contour length L0 = 1720 nm, and R = 530 nm.

In Figure 8 we also present the experimentally derived κx, κy, κz values as a function of extension. At each measured tether extension L, we can generate three independent predictions for κx, κy, κz by, first, using the worm-like chain model for double-stranded DNA (Ref. 30) to convert L into an estimate of force, F. Then, we use the inverted-pendulum model for magnetic tweezers15 to convert F and L into expected stiffness through the relations: κz = ∂F/∂z, κx = F/L, and κy = F/(L + R). For all predictions, we use a persistence length of 53 nm, consistent with previous measurements,30 and a contour length of 1720 nm. Although we do not correct for bead mistethering,31 we nonetheless find a remarkably good agreement between theory and experiment over a wide range of forces in all six measured parameters.

CONCLUSION

In this article, we have presented two comprehensive and novel strategies for calibrating the spring constant κ and measuring the drag α in a SMM instrument that uses full-frame video tracking to measure probe position. These strategies are based on the AV and PSD. In particular, given N discrete measurements of position xj(t), with jε{0, 1, 2, …, N − 1}, we suggest the following fitting procedure for the PSD:

  1. Divide the trace into half-overlapping bins of length mN/8, resulting in b = 2N/m − 1 bins.

  2. For each bin, multiply xj by a Hann window and calculate a windowed PSD P˜w,m for each bin (Eq. 9).

  3. Average the Power spectra over all bins to obtain a single blocked and windowed P˜b,w.

  4. Minimize the cost function in Eq. 20 using yk = PA, B(α, κ, fk) and yk˜=P˜b,w(fk) to obtain α and κ.

The corresponding recipe for calculating α and κ using an AV fit to the same data is

  1. Calculate the octave-sampled OAV σ˜m2(τ) using Eq. 18.

  2. Calculate the shape factor ηAV(m) from Eq. 19.

  3. Minimize the cost function in Eq. 20 using ηAV(m), yk=σSMM2(τ,α,κ), and y˜k=σ˜m2(τ) to obtain α and κ.

We conclude by comparing the AV and PSD approaches: as can be seen from the results (Figs. 67), both the AV and PSD algorithms are capable of unbiased, low-error parameter estimates of equal quality. Thus to differentiate between the two we focus on ease-of-use, both in terms of general complexity and, in particular, for the numerical minimization required by the MLE algorithm. For both criteria, we find that the AV algorithm outperforms the PSD: In terms of complexity, while both the AV and PSD require fitting with a MLE algorithm rather than least-squares, the PSD approach requires applying multiple corrections, particularly for instrument response, discrete sampling (aliasing), and finite duration of the data (spectral leakage). The AV is not subject to any of these three issues, as the instrument response intrinsic to video tracking exactly matches the assumptions made in calculating the AV, and the PSD finite-sampling effects that manifest in the DFT sum are simply not present in the time-domain AV calculation. Further algorithmic simplicity is achieved by the AV in that no choice of blocking number, b, needs to be made; this is particularly important since we show that the choice of b has a minor, but significant, effect on the fitting results of the PSD.

Numerical minimization of the cost function (Eq. 20) is also more straightforward with the AV because it achieves superior data compression without sacrificing accuracy or precision. The octave-sampled OAV for a data trace of N points contains log2N points, while the estimated PSD (using the maximum bin length that still reduces stochastic error) contains N/8 points. Therefore, the total number of points that must be fit grows linearly with N for the PSD, but only logarithmically with N for the AV. For example, for the N = 4096 traces simulated here, the AV contains 12 points, while the PSD contains 513 points. This means that the MLE cost function (Eq. 20) contains only 12 terms when working with the AV, but contains 513 terms for the PSD. Because of the advantages in simplicity, speed, and robustness of fitting with the AV as compared to the PSD, we suggest that the Allan variance is the ideal calibration method for many SMM instruments.

ACKNOWLEDGMENTS

This work was supported by the NIH under Grant No. 1R21GM079581-01A1, and the NSF under Grant No. PHY-0748564. B.L. acknowledges support from an NSERC PGS-D fellowship. We thank T. M. Squires, D. B. McIntosh, and A. A. M. Saleh for helpful discussions.

APPENDIX: EFFICIENT SIMULATION OF VIDEO-TRACKING TRAJECTORIES IN FREQUENCY SPACE

The efficient simulation of probe trajectories is important as a tool to test calibration algorithms. A typical strategy to simulate particle trajectories is to recast the Langevin equation, Eq. 1, as an equation of probability flux (a Smoluchowski equation), then apply an iterative scheme to generate successive discrete time points in the trajectory.17 The discrete points generated in this way are not a realistic representation of data measured by a video-tracking instrument, as the method implies that the instrument has an infinitely-fast time response. A more correct approach is to generate points with a small time step, then to average groups of points together, thus approximating the averaging effect of the camera. However, this can be quite onerous as it requires the simulation of many more points than are finally desired, particularly when fc approaches fs (see Fig. 3).

There is an alternative approach: since the Fourier transform of a trajectory contains all the information needed to recapitulate the trajectory, it is possible to use PA, B (Eq. 7) as an efficient simulation tool. In particular, we can get an N-point trajectory by simulating N points in the frequency domain that are distributed according to PA, B, then applying an inverse Fourier transform. Here, we briefly describe this approach.

Consider a set of points xj that represent a probe trajectory at N time points tj = jτc = j/fs; we assume N is an even number. We define the Fourier transform of xj to be x^k, which is a complex number and is defined for a set of N frequencies fk = kfs/N, with k = −(N/2) + 1, …, −1, 0, 1, …, N/2. All xj are real numbers, which constrains the allowed values of x^k:

Re(x^k)=Re(x^k),Im(x^k)=Im(x^k),Im(x^0)=Im(x^N/2)=0. (A1)

Thus, it suffices to choose N random values, one each for k = 0 and k = N/2, and two each (one imaginary and one real) for k = 1, …, (N/2) − 1, suggesting the following algorithm:

  1. Use a random number generator to generate a set of N points, qj for j = 0, …, N − 1, that are normally distributed with mean zero and unit variance.

  2. Set the real-only values at zero frequency and the Nyquist frequency by multiplying a random number by the expected value at those frequencies:
    x^0=PA,B(0)q0,x^N/2=PA,B(fs/2)qN/2. (A2)
  3. Set the remaining complex values, x^k for k = 1, …, (N/2) − 1, by using different random numbers for the real and imaginary components. Each is scaled by PA, B, but must be divided by 2 to account for ratio between the expected value of the magnitude and each complex component:
    x^k=12(PA,B(fk)qk+iPA,B(fk)qk+N/2). (A3)
  4. Apply the constraints, Eq. A1, to find x^k for all k.

  5. Calculate xj by applying a discrete inverse Fourier transform to x^k:
    xj=fsNkx^ke2πijk/N. (A4)

References

  1. Nørrelykke S. F. and Flyvbjerg H., Rev. Sci. Instrum. 81, 075103 (2010). 10.1063/1.3455217 [DOI] [PubMed] [Google Scholar]
  2. Wong W. P. and Halvorsen K., Opt. Lett. 34, 277 (2009). 10.1364/OL.34.000277 [DOI] [PubMed] [Google Scholar]
  3. Gosse C. and Croquette V., Biophys. J. 82, 3314 (2002). 10.1016/S0006-3495(02)75672-5 [DOI] [PMC free article] [PubMed] [Google Scholar]
  4. Harris F. J., Proc. IEEE 66, 51 (1978). 10.1109/PROC.1978.10837 [DOI] [Google Scholar]
  5. Wong W. P. and Halvorsen K., Opt. Express 14, 12517 (2006). 10.1364/OE.14.012517 [DOI] [PubMed] [Google Scholar]
  6. Welch P., IEEE Trans. Audio Electroacoust. 15, 70 (1967). 10.1109/TAU.1967.1161901 [DOI] [Google Scholar]
  7. von Neumann J., Ann. Math. Stat. 12, 367 (1941). 10.1214/aoms/1177731677 [DOI] [Google Scholar]
  8. Barnes J. A., Chi A. R., Cutler L. S., Healey D. J., Leeson D. B., McGunigal T. E., Mullen J. A., Smith W. L., Sydnor R. L., Vessot R. F. C., and Winkler G. M. R., IEEE Trans. Instrum. Meas. IM-20, 105 (1971). 10.1109/TIM.1971.5570702 [DOI] [Google Scholar]
  9. Walter T., in Proceedings of the 24th Annual Precise Time and Time Interval (PTTI) Applications and Planning Meeting (National Aeronautics and Space Administration, Goddard Space Flight Center, 1993), Vol. 1, pp. 413–426.
  10. Czerwinski F., Richardson A. C., and Oddershede L. B., Opt. Express 17, 13255 (2009). 10.1364/OE.17.013255 [DOI] [PubMed] [Google Scholar]
  11. Andersson M., Czerwinski F., and Oddershede L. B., J. Opt. 13, 044020 (2011). 10.1088/2040-8978/13/4/044020 [DOI] [Google Scholar]
  12. Otto O., Czerwinski F., Gornall J. L., Stober G., Oddershede L. B., Seidel R., and Keyser U. F., Opt. Express 18, 22722 (2010). 10.1364/OE.18.022722 [DOI] [PubMed] [Google Scholar]
  13. Gibson G. M., Leach J., Keen S., Wright A. J., and Padgett M. J., Opt. Express 16, 14561 (2008). 10.1364/OE.16.014561 [DOI] [PubMed] [Google Scholar]
  14. Lukić B., Jeney S., Tischer C., Kulik A. J., Forró L., and Florin E.-L., Phys. Rev. Lett. 95, 160601 (2005). 10.1103/PhysRevLett.95.160601 [DOI] [PubMed] [Google Scholar]
  15. te Velthuis A. J. W., Kerssemakers J. W. J., Lipfert J., and Dekker N. H., Biophys. J. 99, 1292 (2010). 10.1016/j.bpj.2010.06.008 [DOI] [PMC free article] [PubMed] [Google Scholar]
  16. Berg-Sørensen K. and Flyvbjerg H., Rev. Sci. Instrum. 75, 594 (2004). 10.1063/1.1645654 [DOI] [Google Scholar]
  17. van Kampen N. G., Stochastic Processes in Physics and Chemistry (North Holland, 2007). [Google Scholar]
  18. Castberg R. C., Master's thesis, University of Oslo, 2008. [Google Scholar]
  19. Allan D. W., Proc. IEEE 54, 221 (1966). 10.1109/PROC.1966.4634 [DOI] [Google Scholar]
  20. Riley W. J., Handbook of Frequency Stability Analysis (Hamilton Technical Services, 2007). [Google Scholar]
  21. Lesage P. and Audoin C., IEEE Trans. Instrum. Meas. 28, 6 (1979). 10.1109/TIM.1979.4314752 [DOI] [Google Scholar]
  22. Barnes J. A. and Allan D. W., in Proceedings of the 19th Annual Precise Time and Time Interval (PTTI) Applications and Planning Meeting (National Bureau of Standards, Boulder CO, 1987), pp. 227–234.
  23. van Vliet C. M. and Handel P. H., Physica A: Stat. Mech. Appl. 113, 261 (1982). 10.1016/0378-4371(82)90019-X [DOI] [Google Scholar]
  24. Howe D. A., Allan D. W., and Barnes J. A., in Proceedings of the 35th Annual Frequency Control Symposium, Philadelphia, PA, 1981. 10.1109/FREQ.1981.200541 [DOI]
  25. Walter T., IEEE Trans. Instrum. Meas. 43, 69 (1994). 10.1109/19.286357 [DOI] [Google Scholar]
  26. Allan D. W., Weiss M. A., and Jespersen J. L., in Proceedings of the 45th Annual Symposium on Frequency Control (Institute of Electrical and Electronics Engineers, 1991), pp. 667–678. 10.1109/FREQ.1991.145966 [DOI]
  27. Makdissi A., Vernotte F., and Clercq E., IEEE Trans. Ultrason. Ferroelectr. Freq. Control 57, 1011 (2010). 10.1109/TUFFC.2010.1513 [DOI] [PubMed] [Google Scholar]
  28. Ribeck N. and Saleh O. A., Rev. Sci. Instrum. 79, 094301 (2008). 10.1063/1.2981687 [DOI] [PubMed] [Google Scholar]
  29. Schäffer E., Nørrelykke S. F., and Howard J., Langmuir 23, 3654 (2007). 10.1021/la0622368 [DOI] [PubMed] [Google Scholar]
  30. Bouchiat C., Wang M. D., Allemand J.-F., Strick T., Block S. M., and Croquette V., Biophys. J. 76, 409 (1999). 10.1016/S0006-3495(99)77207-3 [DOI] [PMC free article] [PubMed] [Google Scholar]
  31. Klaue D. and Seidel R., Phys. Rev. Lett. 102, 28302 (2009). 10.1103/PhysRevLett.102.028302 [DOI] [PubMed] [Google Scholar]

Articles from The Review of Scientific Instruments are provided here courtesy of American Institute of Physics

RESOURCES