Commercial counterboard for 10 ns software correlator for ...€¦ · Commercial counterboard for...

11
Commercial counterboard for 10 ns software correlator for photon and fluorescence correlation spectroscopy Matteo Molteni and Fabio Ferri Citation: Review of Scientific Instruments 87, 113108 (2016); doi: 10.1063/1.4966983 View online: http://dx.doi.org/10.1063/1.4966983 View Table of Contents: http://scitation.aip.org/content/aip/journal/rsi/87/11?ver=pdfcov Published by the AIP Publishing Articles you may be interested in Note: Design of a full photon-timing recorder down to 1-ns resolution for fluorescence fluctuation measurements Rev. Sci. Instrum. 86, 106108 (2015); 10.1063/1.4933336 Note: A 4 ns hardware photon correlator based on a general-purpose field-programmable gate array development board implemented in a compact setup for fluorescence correlation spectroscopy Rev. Sci. Instrum. 83, 096105 (2012); 10.1063/1.4753994 Using fluorescence lifetime for discriminating detector afterpulsing in fluorescence-correlation spectroscopy Rev. Sci. Instrum. 76, 033102 (2005); 10.1063/1.1863399 25 ns software correlator for photon and fluorescence correlation spectroscopy Rev. Sci. Instrum. 74, 1135 (2003); 10.1063/1.1525876 APL Photonics Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 193.206.161.49 On: Wed, 16 Nov 2016 15:12:29

Transcript of Commercial counterboard for 10 ns software correlator for ...€¦ · Commercial counterboard for...

Page 1: Commercial counterboard for 10 ns software correlator for ...€¦ · Commercial counterboard for 10 ns software correlator for photon and fluorescence correlation spectroscopy Matteo

Commercial counterboard for 10 ns software correlator for photon and fluorescencecorrelation spectroscopyMatteo Molteni and Fabio Ferri Citation: Review of Scientific Instruments 87, 113108 (2016); doi: 10.1063/1.4966983 View online: http://dx.doi.org/10.1063/1.4966983 View Table of Contents: http://scitation.aip.org/content/aip/journal/rsi/87/11?ver=pdfcov Published by the AIP Publishing Articles you may be interested in Note: Design of a full photon-timing recorder down to 1-ns resolution for fluorescence fluctuationmeasurements Rev. Sci. Instrum. 86, 106108 (2015); 10.1063/1.4933336 Note: A 4 ns hardware photon correlator based on a general-purpose field-programmable gate arraydevelopment board implemented in a compact setup for fluorescence correlation spectroscopy Rev. Sci. Instrum. 83, 096105 (2012); 10.1063/1.4753994 Using fluorescence lifetime for discriminating detector afterpulsing in fluorescence-correlation spectroscopy Rev. Sci. Instrum. 76, 033102 (2005); 10.1063/1.1863399 25 ns software correlator for photon and fluorescence correlation spectroscopy Rev. Sci. Instrum. 74, 1135 (2003); 10.1063/1.1525876 APL Photonics

Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 193.206.161.49 On: Wed, 16 Nov

2016 15:12:29

Page 2: Commercial counterboard for 10 ns software correlator for ...€¦ · Commercial counterboard for 10 ns software correlator for photon and fluorescence correlation spectroscopy Matteo

REVIEW OF SCIENTIFIC INSTRUMENTS 87, 113108 (2016)

Commercial counterboard for 10 ns software correlator for photonand fluorescence correlation spectroscopy

Matteo Molteni and Fabio Ferria)

Dipartimento di Scienza e Alta Tecnologia and To.Sca.Lab, Università dell’Insubria, Via Valleggio 11,22100 Como, Italy

(Received 28 June 2016; accepted 21 October 2016; published online 16 November 2016)

A 10 ns time resolution, multi-tau software correlator, capable of computing simultaneous autocorre-lation (A-A, B-B) and cross (A-B) correlation functions at count rates up to ∼10 MHz, with no dataloss, has been developed in LabVIEW and C++ by using the National Instrument timer/counterboard(NI PCIe-6612) and a fast Personal Computer (PC) (Intel Core i7-4790 Processor 3.60 GHz ). Thecorrelator works by using two algorithms: for large lag times (τ & 1 µs), a classical time-modescheme, based on the measure of the number of pulses per time interval, is used; differently, forτ . 1 µs a photon-mode (PM) scheme is adopted and the correlation function is retrieved from thesequence of the photon arrival times. Single auto- and cross-correlation functions can be processedonline in full real time up to count rates of ∼1.8 MHz and ∼1.2 MHz, respectively. Two autocor-relation (A-A, B-B) and a cross correlation (A-B) functions can be simultaneously processed in fullreal time only up to count rates of ∼750 kHz. At higher count rates, the online processing takes placein a delayed modality, but with no data loss. When tested with simulated correlation data and latexspheres solutions, the overall performances of the correlator appear to be comparable with those ofcommercial hardware correlators, but with several nontrivial advantages related to its flexibility, lowcost, and easy adaptability to future developments of PC and data acquisition technology. Publishedby AIP Publishing. [http://dx.doi.org/10.1063/1.4966983]

I. INTRODUCTION

Photon correlation spectroscopy (PCS)1 and FluorescenceCorrelation Spectroscopy (FCS)2,3 are powerful optical tech-niques commonly used in physics, biophysics, and chemistryfor studying systems that exhibit relaxation dynamics over awide range of correlation times, from nano-seconds to sec-onds, or greater. They work by measuring the temporal auto-or cross-correlation function of the light intensity scatteredor emitted by the sample. Such a task is traditionally accom-plished in real time by using hardware digital correlators, i.e.,powerful Application Specific Integration Circuitry (ASIC)devices that are designed for that particular task and arecommercially available, but at a very high cost. Recently, withthe advent of modern Field Programmable Gate Arrays (FP-GAs), several custom made hardware FPGA-correlators havebeen developed,4–7 with performances similar or even superiorto ASIC-correlators, but at a lower cost and higher flexibility. Athird possibility is represented by software correlators, wherethe only used hardware component is a counter/timer board,and the correlation function is computed completely by thesoftware. Software correlators are definitely much more flex-ible than hardware correlators (in terms of statistical data anal-ysis and adaptability to future technological developments),but in spite of a remarkable growth experienced over the lastdecade,8,9,11–15 are still not as fast and performing as hardwarecorrelators.

a)Author to whom correspondence should be addressed. Electronic mail:[email protected]

In this article, based on our previous work,8,9 we presenta new software correlator that uses the National Instrumenttimer/counterboard (NI PCIe-6612), capable of performingauto- and cross-correlation functions with a minimum sampl-ing time of 10 ns, up to count rates ∼10 MHz, with no dataloss. To our knowledge, this is the first time that a softwarecorrelator based on a low-cost commercial board is capable ofattaining such a high time resolution at so high count rates,working completely online, without necessity of any batchanalysis.

II. TIME MODE AND PHOTON MODE SCHEMES

Our correlator works by computing the correlation func-tion with two different procedures16 called Time Mode (TM)and Photon Mode (PM). In the TM mode, the number ofpulses Ni falling within adjacent gate time intervals of width∆tTM is counted and the count-rate auto-correlation function iscomputed as8

GTMµ (τk) ≡ ⟨µiµi+k⟩ = lim

M→+∞

1M

Mi=1

µiµi+k, (1)

where µi = Ni/∆tTM is the average count rate detected at timeti over ∆tTM and τk = k ∆tTM is the discrete lag time. The inte-gration over∆tTM leads to the so-called “triangular averaging,”according to which Eq. (1) represents a smoothed version ofthe true correlation function (the one obtained when∆tTM → 0,see Refs. 8 and 9) and its level of accuracy depends on theratio αTM = τ/∆tTM. As shown in Ref. 8, such an accuracyis a decreasing function of αTM and always better than 10−3,provided that αTM ≥ 7.

0034-6748/2016/87(11)/113108/10/$30.00 87, 113108-1 Published by AIP Publishing. Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 193.206.161.49 On: Wed, 16 Nov

2016 15:12:29

Page 3: Commercial counterboard for 10 ns software correlator for ...€¦ · Commercial counterboard for 10 ns software correlator for photon and fluorescence correlation spectroscopy Matteo

113108-2 M. Molteni and F. Ferri Rev. Sci. Instrum. 87, 113108 (2016)

When the count rate or the gate time ∆tTM is so small that⟨N⟩ ≤ 1, the use of a TM scheme becomes highly inefficientand is no longer convenient with respect to the PM proce-dure.9,16 The latter one works by computing the conditionalprobability Pc(Nk, τk | N0,0) of having any Nk ≥ 1 counts overan interval∆tPM centered around the lag time τk = k ∆tPM afterthe occurrence of any N0 ≥ 1 counts at the starting time τk = 0.Thus, the count rate auto-correlation function GPM

µ (τk) can bewritten in terms of Pc as9,10

GPMµ (τk) = ⟨n⟩ Pc(Nk, τk | N0,0)/∆tPM, (2)

where ⟨n⟩ is the count rate of the incoming pulses. Note that inthis case the time resolution of the system is set by the interval∆tPM, which corresponds to the bin width used for computingGPM

µ (τk). Thus similarly to what happens for the TM mode, theintegration over the finite interval ∆tPM leads to the so-called“rectangular averaging,” according to which Eq. (2) representsa smoothed version of the true correlation function (the oneobtained when ∆tPM → 0, see Ref. 9) and its level of accuracydepends on the ratio αPM = τ/∆tPM. As shown in Ref. 9, suchan accuracy is a decreasing function of αPM and always betterthan 10−3, provided that αPM ≥ 5.

Equations (1) and (2) are un-normalized ideal auto-corre-lation functions. When the measuring time T is finite, theystill represent the best TM and PM correlation estimators, withthe sum appearing in Eq. (1) computed over a finite numberM = T/∆tTM of gate times and the conditional probability Pc

appearing in Eq. (2) estimated by using a finite number ofpulses ∼ ⟨n⟩T . Their normalized versions were obtained withtwo different procedures. For the PM scheme, we used thestandard normalization method, whereas for the TM scheme,we adopted the so-called “symmetric normalization.”17 Theyread

gPM2 (τk) = GPM

µ (τk)/⟨n⟩2, (a)

gTM2 (τk) = GTM

µ (τk)/[⟨n0⟩ ⟨nτ⟩], (b), (3)

where ⟨n⟩ is the average count rate estimated over the timeinterval [0, T], ⟨n0⟩ is the average count rate estimated over theinterval [0, T − τ], and ⟨nτ⟩ is the average count rate estimatedover the interval [τ, T]. In this way the correlation functionsare normalized so that g2(τk → ∞) = 1. Note that since thesymmetrical normalization is much more efficient in reducingthe noise associated to the correlation estimators only when thelag times are very large and comparable with the measuringtime T ,17 we have used it only for the TM scheme.

The generalization of Eqs. (1)-(3) to cross correlationfunctions is straightforward. The TM cross correlation func-tion A-B between signals A and B is formally identical toEq. (1), i.e., GTM

A−B(τk) =µAi µ

Bi+k

�, where µA

i = N Ai /∆tTM is

the average count rate of signal A detected at time ti over∆tTM and µB

i = NBi /∆tTM is the average count rate of signal

B detected at time ti + τk. Similarly, the PM cross correlationfunction A-B is formally identical to Eq. (2), i.e., GPM

A−B(τk)= ⟨nA⟩ Pc(NB

k, τk | N A

0 ,0)/∆tPM, where ⟨nA⟩ is the count rateof the incoming pulses A and Pc denotes the probability ofhaving any NB

k≥ 1 counts of signal B at the lag time τk

= k ∆tPM after the occurrence of any N A0 ≥ 1 counts of signal

A at the starting time τk = 0. Similarly to the case of auto-correlation functions, the normalized versions of the crosscorrelation estimators are computed as

gPM2,A−B(τk) = GPM

A−B(τk)/[⟨nA⟩ ⟨nB⟩], (a)

gTM2,A−B(τk) = GTM

A−B(τk)/[nA

0

� nBτ

�], (b), (4)

where for the PM scheme ⟨nA⟩ and ⟨nB⟩ are the average countrates of signals A and B estimated over the time interval[0, T], respectively. Differently, for the TM scheme,

nA

0

�is

the average count rate of signal A estimated over the timeinterval [0, T − τ] and

nBτ

�is the average count rate of signals

B estimated over the time interval [τ, T].

III. MULTI-TAU SCHEME

In order to cover many decades in lag-times (from ns to s)with relatively small computational times, modern correlatorsadopt the so called multi-tau scheme.18 In this scheme the lagtimes are grouped in stages of linear correlators whose integra-tion times∆ts increase as a pseudo-geometrical progression sothat8

τk,s = k∆ts k = 0,1,2, . . . , p − 1, (a)∆ts = ms

∆t0 s = 0,1,2, . . . , S − 1, (b) , (5)

where s is the stage index, k the shift index inside each stage,m the binning ratio between adjacent stages m = ∆ts+1/∆ts, Sthe number of stages, and ∆t0 is the shortest integration time.Each stage s of Eq. (5) represents a linear correlator made ofp channels, whose correlation function is computed accordingto either Eq. (1) or Eq. (2), and the overall correlogram is thenobtained by combining all the linear correlators. This is doneby discarding the first p/m lag times of each linear correlator(except the first one with s = 0) and merging all the others upto a maximum lag time τmax = (p − 1)mS−1∆t0. The choice ofp and m determines the accuracy of Eqs. (1) and (2), whichdepend on the ratio α = τ/∆t. Since the lowest lag time ofeach s− correlator is τmin = (p/m)∆ts (see Ref. 8), it turnsout that the ratio between τmin and ∆ts is s-independent, beinggiven by τmin/∆ts = p/m. Thus, for a given required accuracy,p/m is constrained to α = p/m . The actual values of p andm are chosen according to speed performances that can varydepending on working conditions (see Sec. V).

Summarizing, the multi-tau scheme ensures the recoveryof the correlation function with a high computational effi-ciency and high signal to noise ratio, without renouncing toa high accuracy.18

IV. CORRELATOR ARCHITECTURE

The software correlator developed in this work uses theNational Instrument PCIe-6612 counter/timer board, whichis equipped with 32-bit, 8 input channels and operates at amaximum frequency of 100 MHz. The board is controlled bya home made LabVIEW_2010 (with DAQmx drivers) code,which allows the simultaneous retrieving of the TM and PMcorrelograms.

Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 193.206.161.49 On: Wed, 16 Nov

2016 15:12:29

Page 4: Commercial counterboard for 10 ns software correlator for ...€¦ · Commercial counterboard for 10 ns software correlator for photon and fluorescence correlation spectroscopy Matteo

113108-3 M. Molteni and F. Ferri Rev. Sci. Instrum. 87, 113108 (2016)

FIG. 1. Scheme of the correlator architecture for one channel: the pulses out from the Photon Counting Unit are filtered by the dead time circuit and acquiredby the PCIe-6612 board, which produces two buffered outputs: the integrated TM counts and integrated PM arrival times. These outputs are fed to the TM andPM “FIFO queues” and asynchronously processed in real time by the TM and PM correlator cycles, whose merged correlograms produce the final correlationfunction g2(τ).

With respect to our previews work in Ref. 9, the main(hardware) difference is the use of the new counter/timer boardPCIe-6612 instead of the old board PCI-6602. Beside beingslightly faster (100 MHz instead of 80 MHz), the new boardhas several crucial advantages with respect to the old one: (i) itworks on a PCIe bus, which is a high-speed, high-throughputserial bus much more performing than the old PCI bus, (ii) itis equipped with a much larger on board memory (127 32-bitsamples instead of 3), and (iii) the number of Direct MemoryAccess (DMA) channels for data transfer is much higher (8instead of 3), which makes possible the computation of thePM and TM correlograms up to 4 channels. All these featuresmake the acquisition data procedure much more efficient andfree of errors, even in critical situations occurring during thePM acquisition (see below).

The correlation architecture (relative to a single channel)is sketched in Fig. 1. The pulse stream out from the photoncounting unit is passed through a τd ≥ 50 ns dead time cir-cuitry and continuously acquired with the counter/timer board,which handle the pulses according to the TM and PM operationmodes.

In the TM mode, a clock signal of a relatively long period∆tTM

0 (multiple of the 10 ns board clock available on the board)is sent to the gate port of the TM counter, whereas the sequenceof incoming pulses is fed to the input port of the counter. Inthis way the TM counter counts the number of pulses fallingwithin adjacent continuous gate intervals of width ∆tTM

0 andits output is a buffered sequence of integrated counts, i.e., thetotal number of pulses counted since the first gate time. TheTM correlogram is computed by using the multi-tau schemedescribed by Eq. (3) and adopting, for each linear correlator,the same algorithm reported in Ref. 8. However, differentlyfrom Ref. 8 where the entire code and all the computationswere done in LabVIEW, in this work we used LabVIEW onlyfor handling data acquisition and user interface, whereas thecore computational task of the correlator (that is, rotation,update, and multiplication of the shift register associated tothe correlogram, see Ref. 8) was carried out by means of acall to a Dynamic Link Library (DLL) written in C++ (Visualstudio 2010 platform). The use of the DLL was convenientbecause this task is typically applied to very large arrays (size∼105) and, consequently, the time required for calling the DLLwas greatly compensated by the higher efficiency of the C++code.

In the PM mode the incoming pulses are sent to the gateport of the PM counter, whereas the input port is fed with theboard clock signal ∆tPM

0 = 10 ns. In this configuration the PMcounter measures the elapsed time between successive pulseswith a temporal resolution equal to ∆tPM

0 and its output is asequence of the integrated times, i.e., the times elapsed sincethe arrival of the first pulse. The PM correlogram is computedby using a single linear correlator of pPM channels so thatτPM

max = (pPM − 1)∆tPM0 and by adopting the algorithm described

in the Appendix. Note that, differently from the TM case, thePM correlator has been totally developed in LabVIEW for thereasons described in the Appendix.

The TM and PM counters work simultaneously, but asyn-chronously with respect to each other. The functioning of theTM correlator is rather simple because the gate port is clockedat a constant rate and the data transfer takes place synchro-nously with the TM clock, independently of the count rate.Differently, the functioning of the PM correlator is somewhatmore critical because its gate port is connected to the incomingpulse stream. Thus, the PM counter works asynchronouslywith the PM clock signal and the “instantaneous” frequencyat which the gate port is clocked might be remarkably high(when the pulses arrive in bursts) and any two consecutivepulses arriving at a distance closer than 50 ns provoke an errorthat stops the PM acquisition. This is an intrinsic limitation ofthe PCIe-6612 board that was tackled by introducing betweenthe photon counting unit and the counterboard, a τd ≥ 50 nsdead time circuit (see Fig. 1). Thus, the maximum count rateof the incoming photons cannot be larger than 1/τd ∼ 20 MHzand we have checked that, by using the Hardware Simulator(HS) described in Sec. V, the correlator is capable of workingproperly up to a maximum count rate of ⟨n⟩max ∼ 10 MHz.Clearly, at such high count rates, dead time effects introduce anonnegligible bias in the recovered correlation function, butas shown in Refs. 19 and 21, this bias consists mainly in areduction of the correlation amplitude without (except for lagtimes of the order of the dead time) any substantial change ofits shape (see also Sec. VI).

Once the two buffered outputs are available from thecounter/timer board, they are written into the so-called TMand PM “FIFO queues.” These are two software First-InputFirst-Output (FIFO) buffers that use the large RAM memoryavailable on the PC and allow an efficient way to log datafrom the board to the PC. The data loaded in the queues are

Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 193.206.161.49 On: Wed, 16 Nov

2016 15:12:29

Page 5: Commercial counterboard for 10 ns software correlator for ...€¦ · Commercial counterboard for 10 ns software correlator for photon and fluorescence correlation spectroscopy Matteo

113108-4 M. Molteni and F. Ferri Rev. Sci. Instrum. 87, 113108 (2016)

then read by the two independent TM and PM “correlatorcycles,” and the computation of the correlograms takes placesimultaneously, but asynchronously with respect to each otherand with respect to the acquisition.

As a final comment, it is worth noting that thanks tothe TM and PM “FIFO queues,” the requirements that thecorrelator must work in real time can be somewhat relaxed.Indeed, the full real time condition requires that, for the TMcorrelator, the processing time δtTM

proc per gate time must besmaller than ∆tTM

0 , while for the PM correlator, the process-ing time/pulse δtPM

proc must be smaller than the average pulsearrival time τarr = 1/ ⟨n⟩. When these conditions are not totallyfulfilled, unprocessed data are accumulated in the two queuesand, provided that their backlogs do not exceed the queues size,the processing can be finished at the end of the measurement.Thus, the use of the queues guarantees that the correlation canstill be computed online with no data loss. This delayed onlinedata analysis (whose features will be quantified in Sec. VII)was not present in our previous work.9

V. TESTING AND BENCHMARKING

The correlator was tested by using the HardwareSimulator (HS) developed in Refs. 19 and 20. The HS is aninstrument capable of delivering controllable and reproducibletrains of TTL pulses with a minimum generation clock time∆tgen = 50 ns. The pulses’ trains can be generated overtwo independent channels, with any arbitrary correlationfunction and with features reflecting either the detector defects(dead time, after pulse, dark count, etc.) or the detectiongeometry (number of coherence areas, homodyne/heterodynedetection).

In all the tests, the multi-tau parameters pTM and mTM

of the TM correlator were set so to have an accuracy betterthan 10−3, or equivalently p/m ≥ 7. With these constraints,we found that the minimum computation times were obtainedwith pTM = 28 and mTM = 4, attaining processing times pergate interval δtTM

proc that, for single auto- (A-A), cross- (A-B) or triple- (A-A, B-B, A-B) correlation functions wereapproximately

(δtTM

proc

)A−A∼ 60 ns,

(δtTM

proc

)A−B∼ 75 ns, and(

δtTMproc

)A−A,B−B,A−B

∼ 90 ns. Note that these processing timesare independent of the count rates of the incoming pulses andtheir correlation time. Thus, the gate time ∆tTM

0 was fixed to∆tTM

0 = 100 ns, so that the TM correlator would always work infull real time. Finally, the parameter STM was chosen accordingto the maximum lag-time τTM

max to be computed in the correlationfunction [see Eq. (5)].

For the PM correlator, the minimum lag-time was al-ways set equal to the minimum PM clock time, i.e., ∆tPM

0= 10 ns. Given the constraint that τPM

max = (pPM − 1)∆tPM0 must

be equal (or almost equal) to the minimum usable TM lag-time (τ0)min = (pTM/mTM)∆tTM

0 = 700 ns of the first TM stage,we found that the minimum processing time per pulse wasattained when using a single linear correlator (instead ofa multi-tau scheme) with pPM = 70 channels. Under theseconditions, as explained in the Appendix, the PM correlatorcould work at a speed that, for count rates ⟨n⟩ . 5 MHz,was only slightly increasing with ⟨n⟩, with typical processing

times per pulse of(δtPM

proc

)A−A∼ 0.40–0.60 µs,

(δtPM

proc

)A−B

∼ 0.7–1.0 µs, and(δtTM

proc

)A−A,B−B,A−B

∼ 1.2–1.5 µs.In conclusion, the TM and PM correlators could work

simultaneously in full real time up to ⟨n⟩ ∼ 1.8 MHz for singleauto-correlation functions (A-A), ⟨n⟩ ∼ 1.2 MHz for singlecross correlation functions (A-B), and ⟨n⟩ ∼ 750 kHz for tripleautocorrelation and cross correlation functions (A-A, B-B, andA-B).

In the first test, we show how the software correlator worksin the case of two typical auto-correlations characterized bya single exponential decay time τc = 10−4 s (Fig. 2). Thepulses’ stream was generated at two nominal count rates of ⟨n1⟩= 100 kHz and ⟨n2⟩ = 2.0 MHz, but because of the combinedeffects of dead time (due to the τd = 65 ns dead time circuit)and pile-up (due to the HS clock time at ∆tgen = 50 ns), theeffective average count rates were ⟨n1⟩ ∼ 0.98 kHz and ⟨n2⟩∼ 1.6 MHz. The measuring times were T1 = 100 s and T2= 10 s, the photodetector was supposed to be ideal (no af-terpulse, no dark count), and the detection was well inside asingle coherence area. The number of TM stages was STM =

10, corresponding to a maximum lag time τTMmax = 0.7 s. Un-

der these working conditions, the PM processing times/pulsewere fairly similar

(δtPM

proc

)A−A∼ 0.53 µs < (τarr)2 = 0.63 µs,

so that at both count rates the PM (and TM as well) correlatorswere working in full real time. The merged PM (circles) andTM (squares) normalized correlation functions (Eqs. (3) and(4)) are shown in Fig. 2(a) together with a single exponentialdecay function

g2(τ) = B + β · exp(−τ/τc), (6)

which was used for fitting the data at lag times τ ≥ 0.2− 0.4 µs, so to avoid artifacts introduced by dead time ef-fects21 clearly evident for the data at a high count rate. Fromthe fitting of the data at a low count rate, we recovered B1= 1.0005 ± 1 × 10−4, (τc)1 = (0.997 × 10−4 ± 1 × 10−7) s, andβ1 = 0.9723 ± 4 × 10−4, in excellent agreement with expectedvalues (B = 1, τc = 10−4 s, and β = 1). Thus in this case, dead

FIG. 2. (a) Normalized intensity auto-correlation functions for two differentcount rates obtained by merging PM (circles) and TM (squares) correlogramsand corresponding fits (solid lines) to Eq. (6). The data were generated byusing the hardware simulator (see text) at two (effective) count rates of ⟨n1⟩∼ 0.98 kHz (red symbols) and ⟨n2⟩∼ 1.6 MHz (blue symbols). The measur-ing times were T1= 100 s and T2= 10 s. (b) Relative deviations between dataand fits. (c) Example of the binning procedure carried out on all the channelsof the PM correlator for removing the strong correlation peaks deriving fromthe HS generation clock at ∆tgen= 50 ns.

Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 193.206.161.49 On: Wed, 16 Nov

2016 15:12:29

Page 6: Commercial counterboard for 10 ns software correlator for ...€¦ · Commercial counterboard for 10 ns software correlator for photon and fluorescence correlation spectroscopy Matteo

113108-5 M. Molteni and F. Ferri Rev. Sci. Instrum. 87, 113108 (2016)

time effects were fairly negligible, as also witnessed by thenon-systematic residuals in Fig. 2(b). Conversely, from fittingthe data at a high count rate, we recovered B2 = 1.0002 ± 1× 10−4, (τc)2 = (0.986 × 10−4 ± 1 × 10−7) s, and β2 = 0.6584± 2 × 10−4 showing that, as expected,21 the main effect ofdead time is a remarkable reduction of the amplitude β butonly a slight change of the shape of g2(τ). Consequently, therecovery of τc was still fairly accurate (−1.4% error) and theresiduals only slightly systematic. It should be pointed out thatthe lag times of the PM correlator appearing in Fig. 2(a) aresampled at an interval of 50 ns instead of ∆tPM

0 = 10 ns. Thisis because the channels of the PM correlator sampled at 10 nshave been binned and averaged in group of 5 so to remove thestrong correlation peaks deriving from the HS generation clockat ∆tgen = 50 ns. Original (open circles) and binned-average(solid circles) data relative to the data taken at the high countrate are shown in Fig. 2(c).

The second test was aimed to verify the capability of ourcorrelator to compute simultaneously two auto-correlationsand a cross correlation at the same time for two input channels(A and B), a feature that can be very useful for the char-acterization of single molecule dynamics and interactions inapplications like fluorescence correlation spectroscopy.3 Thetwo pulse streams were generated with the HS from the sameoptical signal (nominal count rate ⟨n⟩ = 1.2 MHz and a singleexponential decay correlation with τc = 10−4 s), but acquiredwith two detectors affected by the same 150 ns dead timeand different after pulses probabilities. Because of these de-fects, the effective count rates were ⟨nA⟩ = 1.1 MHz and ⟨nB⟩= 0.91 MHz. The two autocorrelation functions (A-A and B-B) and the cross correlation function (A-B), are shown inFig. 3(a). For the sake of clarity, the B-B and A-B curveshave been shifted downwards by an offset of 0.5 and 1.0,respectively. The PM processing time was δtPM

proc ∼ 1.2 µs> τarr = 1 µs. Thus all the three correlations were carried outin full real time for the TM correlator and in a delayed onlineanalysis for the PM correlator (overall processing time of

FIG. 3. (a) Normalized intensity autocorrelation and cross correlation func-tions obtained by merging PM (solid symbols) and TM (open symbols)correlograms and fit (solid line) of the cross correlation to Eq. (6). Pulsestreams were generated with the hardware simulator from the same opticalsignal (nominal count rate ⟨n⟩= 1.2 MHz) but acquired with different de-tectors, whose defects (dead time and after pulses) do not show up in crosscorrelation. The measuring time wasT = 10 s. For the sake of clarity, B-B andthe A-B data are shifted by a −0.5 and −1.0 offset, respectively; (b) relativedeviations between data and fit.

∼12 s instead of 10 s). The after-pulse peaks and the dead timeeffects well visible in the two autocorrelations disappear in thecross correlation, which was satisfactorily fitted (solid line)with Eq. (6), obtaining B = 1.0004 ± 1 × 10−4, τc = (0.940× 10−4 ± 2 × 10−7) s and β = 0.4967 ± 3 × 10−4. As for thehigh count rate data of Fig. 2, the main effect of the deadtime was a drastic reduction of the amplitude β and a biasintroduced in the shape of g2(τ), which was higher than the oneof Fig. 2. Correspondingly the recovery of τc was less accurate(−6% error) and the residuals of Fig. 3(b) showed the highersystematic deviations.

VI. EXPERIMENT

The correct functioning of the correlator on real sampleswas tested by using a home made DLS apparatus, in whichthe sample, a dilute dispersion of latex spheres contained ina standard 10 mm square cuvette, is shined with the beamof a frequency doubled ∼100 mW Nd:YAG laser operatingat λ = 532 nm. The laser (Coherent, mod. Compass 315M-100) was characterized by single transversal mode TEM00,with a beam divergence of ∼2.2 mrad, and the sample cell wasplaced at a distance of ∼80 cm. The light scattered at 90◦ wascollected with a mono-mode fiber (OZ Optics mod. LPC-01-532-3.5/125) whose output was coupled to either a standardsingle photon counting unit (Hamamatsu, mod. H6180) orto a “pseudo” cross correlation detector (ALV Langen, mod.ALV/SO-SIPD), which eliminates detector defects. The parti-cles were calibrated polystyrene spheres from Termo-FisherScientific, Inc., dispersed in Milli-Q filtered water at roomtemperature (T = 22 ± 0.1 ◦C). All the measurements werecarried out with the same correlator parameters, i.e., ∆tTM

0= 100 ns, ∆tPM

0 = 10 ns, pTM = 28, mTM = 4, and pPM = 70.In the first test, we compared the correlograms recovered

with our correlator with the one obtained by using a typicalcommercial hardware correlator, such as the model Flex2k-12 × 12 from correlator.com. The sample was a dispersion ofd = 70 ± 3 nm diameter particles at a volume fraction concen-tration φ ∼ 10−4, the detector was the standard single photoncounting unit from Hamamatsu, and the measuring time wasT = 100 s. The pulse stream, filtered with a τd = 65 ns deadtime circuit, was first processed by the Flex correlator and,right after, by our software correlator. Figure 4(a) reports thecorrelograms recovered with the Flex correlator (solid sym-bols) and our correlator (open symbols) for two different countrates ⟨n⟩ = 100 and 900 kHz. As one can notice, the twocorrelograms are perfectly matched for all lag times τ ≥ 2 µs,but even at smaller τ’s in the range 80 ns ≤ τ ≤ 2 µs whereafter pulse effects dominate and the statistical reproducibilityof the correlation function is dampened due to shot noise,the two curves are fairly similar, reproducing consistently thesame peak patterns. The four data sets with τ ≥ 2 µs wereaccurately fitted by Eq. (6), with no systematic residuals (seepanel b), obtaining τc = (1.60 × 10−4 ± 1 × 10−6) s. As known,the decay time depends on the scattering angle θ and on theparticle diffusion coefficient D through the relation1

τc =1

2Dq2 , (7) Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 193.206.161.49 On: Wed, 16 Nov

2016 15:12:29

Page 7: Commercial counterboard for 10 ns software correlator for ...€¦ · Commercial counterboard for 10 ns software correlator for photon and fluorescence correlation spectroscopy Matteo

113108-6 M. Molteni and F. Ferri Rev. Sci. Instrum. 87, 113108 (2016)

FIG. 4. (a) Normalized intensity auto-correlation function for a dilute so-lution of 70 nm polystyrene spheres, taken at two different count rates[100 KHz (top) and 900 KHz (bottom)], with the Flex correlator (solidsymbols) and our software correlator (open symbols). Scattering angle θ= 90◦ and the measuring time T = 100 s. Solid lines represent the fits of thedata (τ ≥ 2 µs) to Eq. (6). (b) Relative deviations between data and fit. (c)The four auto-correlation functions after correction for dead time.

where q is the magnitude of the scattering wavevector, q= (4π/λ) n sin(θ/2) with n being the refraction index of themedium. Thus, by using Eq. (7), together with the classicalEinstein Stokes relation

D =kB T

6πη(d/2) (8)

is possible to determine the particle diameter d. In Eq. (8), kB,T and η, are the Boltzmann constant, the absolute tempera-ture and the solvent viscosity, respectively. From the data ofFig. 4(a), we recovered a particle diameter d = 70.5 ± 0.4 nm,in excellent agreement with the expected certified value. Theeffect of the 65 ns dead time circuit shows up only as a reduc-tion of the amplitude β, which increases with increasing thecount rate. As shown in Ref. 21, this effect produces only negli-gible distortions on the shape of g2(τ) (thus nonaffecting therecovered decay time) and can be corrected, provided that thetrue value of β (retrievable from low count rate measurements)is known. Indeed, upon this correction, all the four data sets arenicely superimposed, as shown in panel (c).

In the second test, we investigated the capability of ourcorrelator to recover the correct correlation function when theapparatus works under different heterodyne conditions. Forthis purpose we injected a small variable fraction of the laserbeam power into the mono-mode fiber that collects the scat-tered light and changed the overall laser power. In this way, wewere able to tune the mixing efficiency of the heterodyne signalwithout changing the count rate at the detector, which was setto ⟨n⟩ ≈ 80 kHz. In this test we used d = 22 ± 2 nm particlesat φ ∼ 10−3 and collected light with the same Hamamatsudetector for a measuring time T = 100 s.

Figure 5 reports the correlograms obtained for sevendifferent heterodyne conditions, spanning a zero-interceptvalues from ∼1 to ∼2. The solid lines in Fig. 6(a) are the bestfits of the data (τ ≥ 2 µs) to the equation

g2(τ) = B + β

(1 + α)2g1(τ) + α2

(1 + α)2 |g1(τ)|2, (9)

FIG. 5. (a) Normalized intensity auto-correlation function for a dilute so-lution of 22 nm polystyrene spheres, taken with seven different heterodyneconditions. The count rate was kept constant at ⟨n⟩∼ 80 kHz. Solid linesrepresent the best fits of the data (τ ≥ 2 µs) to Eq. (9). (b) Relative deviationsbetween data and fit.

where g1(τ) = exp(−τ/2τc) is the field correlation function,whereas α = ⟨I1⟩ / ⟨I0⟩ represents the mixing efficiency of theheterodyne signal. Forα ≪ 1 the first (heterodyne) term insidethe square parenthesis is the dominant one, and g2(τ) decaysas g1(τ), with a decay time equal to 2τc. Conversely, for α≫ 1 the second (homodyne) term dominates, and g2(τ) decaysas |g1(τ)|2, with a decay time equal to τc. Under the latterconditions, Eq. (9) coincides with Eq. (6).

The data of Fig. 5(a) were fitted with Eq. (9) by leavingB, α, and τc as floating parameters and fixing β to the valueβ = 0.965 found by fitting the first data set [top curve inFig. 5(a)] with Eq. (6). All the curves were nicely fitted [seeresiduals plots, Fig. 5(b)] and from the fitting we recoveredquite similar values for τc varying between 0.996 and 0.979× 10−4 s and values for α varying from ∼0.01 to 0.9. Byapplying again Eqs. (5) and (6), we recovered the particlesdiameters d that, as shown in Fig. 5(c), were all quite similarwith ⟨d⟩ = 22.0 ± 0.2 nm, in excellent agreement with theexpected certified value (horizontal dashed line).

The third test was aimed at ascertaining the correlatorcapability of computing auto- and cross-correlation functionof the same optical signal. For this purpose, we used asdetector the “pseudo” cross correlation detector (ALV Langen,mod. ALV/SO-SIPD), which works by splitting the incominglight into two almost equal intensity signals, and detectingeach signal with different independent single photon countingunits. In this way by cross correlating the two pulse streams,any defect associated to the detectors (afterpulse and deadtime) can be removed. For this test we used d = 40 ± 1.8 nmdiameter particles at φ ∼ 2 × 10−3 and accumulated statisticsfor a measuring time T = 100 s. The count rates for thetwo channels were ⟨nA⟩ = 100 kHz and ⟨nB⟩ = 73 kHz, andall the correlator settings were identical to the ones usedin Figs. 4 and 5. Figure 6 shows the two autocorrelationfunctions (A-A and B-B) taken with our correlator (red andblue squares) and compares the cross correlation function (A-B) computed with our correlator (green circles) with respect tothe cross correlation function (A-B) computed with the Flex-correlator (orange triangles). For the sake of clarity, the two

Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 193.206.161.49 On: Wed, 16 Nov

2016 15:12:29

Page 8: Commercial counterboard for 10 ns software correlator for ...€¦ · Commercial counterboard for 10 ns software correlator for photon and fluorescence correlation spectroscopy Matteo

113108-7 M. Molteni and F. Ferri Rev. Sci. Instrum. 87, 113108 (2016)

FIG. 6. (a) Normalized intensity auto-correlation (A-A and B-B, opensquares) and cross correlation (A-B, open circles) functions for a dilutesolution of 40 nm polystyrene spheres, taken with our correlator and withthe Flex-correlator (solid triangles). Light detection was carried out by usingthe “pseudo” cross correlation detector ALV/SO-SIPD and the count rates forthe two channels were ⟨nA⟩= 100 kHz and ⟨nB⟩= 73 kHz. For the sake ofclarity, the two auto-correlation functions have been shifted upwards by anoffset of 0.5. Dashed lines passing through the auto-correlation functions area guide for the eye. Solid line passing through the cross correlation functionrepresents the best fit of our software correlogram to Eq. (6); (b) relativedeviations between data and fit.

autocorrelation functions have been shifted upwards by anoffset of 0.5. As expected, the after-pulse peaks and the deadtime effects well visible in the two autocorrelations disappearin the cross correlation that, although somewhat noisier atlow lag times, overlaps quite nicely to the one recoveredwith the Flex-correlator. Upon fitting with Eq. (6) the crosscorrelation data obtained with our correlator, we recoveredB = 1.001 ± 2 × 10−3, β = 0.946 ± 0.006, and τc = (0.89× 10−4 ± 2 × 10−6) s, which corresponds, via Eqs. (5) and (6),to d = 43 ± 1 nm. This value is slightly larger than expected,but in excellent agreement with the one recovered by fittingthe correlogram obtained from the Flex-correlator, for whichagain d = 43 ± 1 nm.

Finally, we present an example of the flexibility offeredby our software correlator that, whenever convenient, allowsan easy implementation of a batch data analysis. In the batchmodality, the data stream is divided into batches of proper(but non-necessarily equal) time length, for each batch the(normalized) correlogram is computed, and the correlationfunction is recovered in real time by performing an iterativetime-length weighted average of the various correlograms.When the batch time is much longer than the decay time,this modality offers two important advantages over the stan-dard one: (i) it allows to estimate the statistical error barsassociated with the correlation function and (ii) allows tofilter the data by eliminating possible transient spikes dueto presence of residual impurities (that we will call “dust”)momentarily intercepting the laser beam. The latter feature isparticularly important when the particles to be tested cannot beassimilated to perfect rigid spheres and their gyration radiusis relatively large, i.e., Rg & 100–500 nm. In this cases, inorder to prevent that rotational or internal motions affect themeasured correlation function,1 DLS measurements have to becarried out at small q−vectors (q Rg < 1) or correspondingly

FIG. 7. (a) Sketch of the dust discriminator and batch analysis protocol.The average count rates ⟨n⟩ (blue solid symbols), averaged over a 20 msperiod, are monitored as a function of time and compared with the threshold⟨n⟩max= 270 KHz (horizontal line). Only the points, that, together with their±10 nearest neighbors, are below threshold, are accepted (open red squareswith error bars) and passed to the TM correlator for the batch analysis;(b) correlation functions computed from the raw data (solid blue squares)and from the dust discriminator batch analysis (open red squares) togetherwith their single exponential decay fittings (continuous lines) for a dilute so-lution of d = 300 nm latex spheres scattering at q = 2.1 µm−1 (θ = 11.50◦, λ= 632.8 nm in water); (c) relative deviations between data and fits.

at small angles (θ < (λ/Rg)/2πn) where the presence of dustis very disturbing. In Fig. 7 we report an example of sucha “dust discriminator” applied to the count stream from adilute aqueous solution of d = 300 nm polystyrene spheresscattering at θ = 11.50◦. For this experiment we used a homemade classical light scattering instrument developed long timeago at the University of California, Santa Barbara by the groupof Cannell22 and recently donated to our laboratory. The instru-ment operates with a He–Ne laser at λ = 632.8 nm implyingthat q (θ = 11.50◦) = 2.1 µm−1. The scattered light is collectedwithin a few coherence areas, so that the theoretical expectedfractional variance is βth = 0.42 (see Table I in Ref. 22).

Fig. 7(a) shows how the dust discriminator works. Theraw data are acquired in the TM mode with ∆tTM

0 = 200 nsand, while acquisition is running, they are preprocessed inbuffers of 105 counts (corresponding to 20 ms) by monitoringas a function of time the average count rate within each buffer,as shown by the blue solid symbols of Fig. 7(a). Whenever acount rate is higher than a properly selected threshold ⟨n⟩max(indicated by the horizontal line), that buffer together with anumber of its nearest neighbors is discarded. In this way weare sure that not only the dust peak but also its rising an fallingedges would not affect the measurement (for the experimenthere reported we found that a range of ±10 buffers (±200 ms)was enough). On the contrary, when the count rates of a bufferand its ±10 nearest neighbors are all below threshold, thatbuffer is accepted and passed to the TM correlator for theanalysis. A sequence of continuous buffers below threshold

Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 193.206.161.49 On: Wed, 16 Nov

2016 15:12:29

Page 9: Commercial counterboard for 10 ns software correlator for ...€¦ · Commercial counterboard for 10 ns software correlator for photon and fluorescence correlation spectroscopy Matteo

113108-8 M. Molteni and F. Ferri Rev. Sci. Instrum. 87, 113108 (2016)

[open red squares in Fig. 7(a)] defines a “batch,” i.e., a periodof time over which the ith batch correlation function [g2(τ)]ican be computed without discontinuity. The final correlationfunction and its variance are computed as the time-weightedaverages23

g2(τ) =Nbi

∆ti[g2(τ)]i/Nbi

∆ti,

σ2g2(τ) = 1

Nb

Nbi

∆ti {[g2(τ)]i − g2(τ)}2 /

Nbi

∆ti,

,(10)

where Nb is the number of batches and ∆ti the duration timeof the ith batch. Clearly, the results of Eq. (10) depend on thevalue ⟨n⟩max chosen for the discriminator. A value too smallwould damper excessively the signal fluctuations, whereas avalue too high would not filter the extra fluctuations due tothe presence of dust. The optimal value for ⟨n⟩max is the onethat preserves the expected theoretical fractional variance βth

= 0.42 of the signal.The correlation functions computed from the raw data

(solid blue squares) and obtained with the dust discriminator(open red squares) are displayed in Fig. 7(b) together with theirsingle exponential decay (Eq. (6)) fittings (continuous lines).The raw data were acquired for a measuring time T = 30 s atan average count rate ⟨n⟩ = 76 KHz. The dust filtered data,selected by using a threshold count rate ⟨n⟩max= 270 KHz,produced 6 batches whose overall measuring time was T= 26.9 s and the average count rate ⟨n⟩ = 68 KHz.

In spite of the fact that both correlation functions appearto be fairly well fitted with rather small and comparableresiduals (see Fig. 8(c)), the fitting results are quite different.For the “raw” g2(t) we get an amplitude β = 0.581 ± 0.003and the recovered diameter was d = 483 ± 8 nm, whereasfor the “filtered” g2(t) we obtained β = 0.4281 ± 0.003 andd = 289 ± 10 nm. In the latter case both parameters were inexcellent agreement with the expected ones.

VII. DISCUSSION AND CONCLUSIONS

In conclusion, we have shown that, by using the commer-cial National Instrument timer/counterboard NI PCIe-6612, ahome made software developed in LabVIEW anc C++, anda fast Personal Computer (PC) (Intel Core i7-4790 Processor3.60 GHz), it is possible to realize a software multi-tau corre-lator that is quite comparable with the state of the art hardwarecorrelators. The correlation function g2(τ) is recovered byusing two algorithms based on the so-called time-mode (TM)and photon-mode (PM) schemes. The TM scheme works bymeasuring the number of pulses falling within adjacent timeintervals and is used for computing gTM

2 (τ) at large lag times(τ & 1 µs). Conversely, for τ . 1 µs the PM scheme recoversgPM

2 (τ) by measuring the time sequence of the arrival timesbetween photons. TM and PM correlators work in parallel byprocessing the same stream of incoming pulses, and the finalcorrelation function is obtained by merging the two correlo-grams. Auto- and cross-correlation functions can be computedonline with high time resolution (10 ns), at high count rates∼10 MHz, with no data loss. In particular, for single auto- and

cross-correlation functions, the correlator can work in full realtime up to count rates ⟨n⟩ ∼ 1.8 and ∼1.2 MHz, respectively.At higher ⟨n⟩ it works in a delayed online data analysis modal-ity, meaning that the acquisition and the computation of gTM

2 (τ)are carried out in real time, but the computation of gPM

2 (τ) isdelayed by a factor that for a single auto-correlation functionis ∼ ⟨n⟩ /1.8 MHz. For example, at ⟨n⟩ ∼ 4 MHz, there is afactor ∼2.2 between computation and acquisition, meaningthat the time required for computing gPM

2 (τ) is ∼2.2 times theacquisition time. When the correlator is used for computingsimultaneously two auto-correlation functions (A-A and B-B)and the cross correlation function (A-B) of two input signalsA and B, the full real time working condition is attained up tocount rates ⟨n⟩ ∼ 750 kHz.

When compared with other software correlators reportedin the literature,11–15 the performances (in terms of speed andtime resolution) of our correlator appear to be quite competi-tive. For example, the F2Cor correlator developed in Ref. 14can process auto-correlation data at a speed of ∼0.1 µs perpulse (independently of the count rate), thus allowing a full realtime data processing up to ∼10 MHz, in principle at any timeresolution (limited by the acquisition board). In comparison,our correlator appears to be slower, but only if the comparisonis performed at a time resolution .50 to 100 ns. Indeed, at a100 ns time resolution (or higher), our correlator can work inthe TM mode only, with the capacity of computing in full realtime single A-A, A-B, or triple A-A, B-B, and A-B correlationfunctions, in principle at any count rate. This is because theprocessing time/gate interval of the TM correlator is indepen-dent of the count rate and, if the PM correlator is not used, thereis no need of the τd ≥ 50 ns dead time circuit (see Fig. 1). Thusthe highest sustainable count rate is limited by either the useddetector or by the maximum external source frequency accept-able by the NI-PCIe 6612 board, i.e., 80 MHz. Note also that, ifonly a single autocorrelation function has to be computed (A-Aor B-B), the TM correlator can be even faster, processing datain full real time down to a time resolution of ∆tTM

0 = 60 ns.The main limitation of our software correlator is the

mandatory presence of a τd > 50 ns dead time circuit, whichprevents measuring the auto-correlation function at lag timesτ ≤ τd. However, this limitation does not affect the 10 nstime resolution of the correlator because the resolution ofthe PM correlator is always 10 ns for any τd ≤ τ ≤ 0.7 µs.Furthermore, as discussed in Sec. VI, small dead time effectsdo not alter significantly the shape of the auto-correlationfunction [which can be always corrected for, see Fig. 4(c)] andare not present in cross correlation functions that, therefore,can be effectively measured with a time resolution of 10 nsdown to the minimum lag time (see Fig. 6). To this respect, wewould like to mention that in this work we have implementedonly the A-B cross correlation function, not the B-A one whoseimplementation (to be computed simultaneous with A-B) isstraightforward but not priceless in terms of computationalspeed. In this way, whenever allowed, the average of A-B andB-A would provide a cross correlation function with a highersignal-to-noise ratio. We leave this improvement for futurework.

Another important feature of the correlator is its intrinsicflexibility, due to the software elaboration of the data. We

Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 193.206.161.49 On: Wed, 16 Nov

2016 15:12:29

Page 10: Commercial counterboard for 10 ns software correlator for ...€¦ · Commercial counterboard for 10 ns software correlator for photon and fluorescence correlation spectroscopy Matteo

113108-9 M. Molteni and F. Ferri Rev. Sci. Instrum. 87, 113108 (2016)

have shown that it is possible to preprocess the data by elim-inating possible transient spike-like peaks due to presenceof dust particles and analyze the uncontaminated data in abatch modality. In this way it becomes feasible to carry outDLS measurements on large particles, which need to be testedat low angles where, unfortunately, the presence of dust isalmost unavoidable. A by-product of the batch analysis is theestimation of the correlation function error bars, which areoften not taken into account or estimated only a posteriori instandard DLS analysis. Noticeably, all this can be done onlineand in real time.

Furthermore, besides processing the data online, it ispossible to store them on the hard disk and analyze them offline in second time. This provides several advantages, such as(i) processing the data with different multi-tau configurationsand choose the optimal one for the specific case under investi-gation, with the possibility of tuning the accuracies associatedto the “triangular” and “rectangular” averages; (ii) check andoptimize the dust discriminator procedure carried out online;(iii) having access to the entire sequence of the photon arrivaltimes, with the possibility of carrying out sophisticated dataanalysis, such as the computation of higher-order correlationfunctions, which are known to be related to the statisticaluncertainties associated with the different channels of thecorrelation function; (iv) last but not least, the software corre-lator allows an easy implementation of the Photon CountingHistogram (PCH) analysis, which is greatly used in the pro-cessing of FCS24,25 and might offer good perspectives also forthe analysis of PCS data.

Finally, we would like to mention that the 10 ns timeresolution of the correlator is limited by the performances ofthe NI PCIe-6612 board, for which 10 ns is the maximumavailable clock frequency. Thus in principle, by using afaster board would allow us to increase the time resolutionbeyond 10 ns. At the same time, any other general purposeacquisition board that is controlled with LabVIEW can be usedin conjunction with our software correlator, thus extendingits applicability not only to digital signals (such as in PCSor FCS) but also for the analysis of analogic signals acquiredwith standard Analog to Digital Converter (ADC) boards. As afurther comment, we note also that the real time performancesof the correlator are limited by the performances of the PCand by the LabVIEW compiler, which are both expected toimprove in the next future. These are the main advantagesof software over hardware correlators, the fact of beinghighly flexible and intrinsically prone to exploit all the futuredevelopments of PC and data acquisition technology.

ACKNOWLEDGMENTS

We thank David S. Cannell for the donation of the lightscattering instrument used for taking some of the data reportedin this article and for clarifying discussions. We also thankErik Vallazza, Romualdo Santoro, and Gabriele Re Calegarifor helpful discussions and electronic assistance. Mattia Roccoand Joel Karty are thanked for the loan of some of the elec-tronic instrumentation used in this work.

A simplified executable version of the software correlatoris available upon request to F.F.

APPENDIX: PM ALGORITHM

The algorithm followed in the PM correlator for recov-ering the histogram Pc(Nk, τk | N0,0) of having Nk counts attime ti + τk after that Ni counts have occurred at the time ti isbased on following algorithm.

Let us indicate with τPMmax the maximum lag time of the

histogram and with {t1, t2, . . . , tN}q, the qth acquisition databuffer containing the integrated arrival times of N photons(see Fig. 8). Each time ti of this array is processed by firstcomputing all the distances τki = tk − ti(k ≥ i) and discardingall the k for which τki > τPM

max. Then the distances τki (which arepositive integer numbers increasing with k) are histogrammedon a linear histogram made of pPM bins. This operation issimple and fast because each τki value corresponds to the bin tobe increased by one. At the end of this operation the next timeti+1 is handled in the same way, and the procedure continuesiteratively until the time ti∗whose distance from the last arrivaltime is τNi∗ ≤ τPM

max. Then all the times with i > i∗ are carriedover and used as headers of the next (q + 1) data buffer, whichis processed as the previous one. The entire procedure stopswhen the time distance of the last pulse of the current bufferfrom the very first arrived pulse is longer than the desiredmeasuring time T .

This algorithm is extremely simple and therefore, similarto those reported in Refs. 11 and 14, its average processingtime δPM

proc per pulse is expected to be proportional tothe average number of pulses ⟨q⟩ processed in the timeinterval τPM

max, i.e., ⟨q⟩ ∼ ⟨n⟩ τPMmax. However, under our working

conditions (fixed τPMmax = 0.7 µs and ⟨n⟩ ≤ 10 MHz), ⟨q⟩ is

typically a small number, of the order of 1 (at ⟨n⟩ ∼ 1 MHz)or less. Thus, many of the pulses occurring at time ti haveno other pulse falling at a distance τki closer than τPM

maxand the histogram is not updated at that iteration. As aconsequence, δPM

proc does not scale linearly with ⟨q⟩ and isdetermined for a good fraction by all the other tasks thatare carried out by the program (such as data acquisition,queueing and dequeueing data buffers, handling data carry,etc.) that contributes to a constant offset computational time.The final effect is that δPM

proc increases very little with ⟨n⟩ (atfixed τPM

max = 0.7 µs), with processing times that, up to countrates ⟨n⟩ . 5 MHz, are typically

(δtPM

proc

)A−A∼ 0.40–0.60 µs

for a single auto-correlation function (A-A),(δtPM

proc

)A−B

∼ 0.7–1.0 µs for a single cross correlation function (A-B)and(δtTM

proc

)A−A,B−B,A−B

∼ 1.2–1.6 µs for the triple (A-A, B-B, A-B) correlation functions.

As a final comment, we would like to point out that thePM algorithm was implemented in our program as a LabVIEW

FIG. 8. Scheme of the PM algorithm. For each pulse occurring at time ti, allthe pulses falling at distances τki ≤ τPM

max contribute to the histogram, which isincreased by one (at the τki bin) for each distance τki.

Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 193.206.161.49 On: Wed, 16 Nov

2016 15:12:29

Page 11: Commercial counterboard for 10 ns software correlator for ...€¦ · Commercial counterboard for 10 ns software correlator for photon and fluorescence correlation spectroscopy Matteo

113108-10 M. Molteni and F. Ferri Rev. Sci. Instrum. 87, 113108 (2016)

routine and not as a C++ DLL call, as done for the TMalgorithm. This is because, differently from the TM case thathandles arrays of very large size (∼105), in the PM case the sizeof the q-array is very small and a call to a C++ DLL routineis no longer convenient with respect to carrying out the sametask directly in LabVIEW.

1B. J. Berne and R. Pecora, Dynamic Light Scattering (Wiley, New York,1976).

2D. Magde, E. Elson, and W. Webb, Phys. Rev. Lett. 29, 705 (1972).3R. Riegler and E. Elson, Fluorescence Correlation Spectroscopy: Theoryand Applications (Springer, 2001).

4J. Buchholz, J. Wolfgang Krieger, G. Mocsar, B. Kreith, E. Charbon, G.Vamosi, U. Kebschull, and J. Langowski, Opt. Express 20, 17767 (2012).

5S. Kalinin, R. Kühnemuth, H. Vardanyan, and C. A. M. Seidel, Rev. Sci.Instrum. 83, 096105 (2012).

6G. Mocsar, B. Kreith, J. Buchholz, J. W. Krieger, J. Langowski, and G.Vamosi, Rev. Sci. Instrum. 83, 046101 (2012).

7S. Gong, I. Labanca, I. Rech, and M. Ghioni, Rev. Sci. Instrum. 85, 103101(2014).

8D. Magatti and F. Ferri, Appl. Opt. 40, 4011 (2001).9D. Magatti and F. Ferri, Rev. Sci. Instrum. 74, 1135 (2003).

10Eq. (2) of this article differs from Eq. 5 of Ref. 9 for the factor ∆tPM0 ,

which was erroneously missing in Ref. 9. This error had no consequenceson the overall results reported in Ref. 9.

11M. Wahl, I. Gregor, M. Patting, and J. Enderlein, Opt. Express 11, 3583(2003).

12T. A. Laurence, S. Fore, and T. Hauser, Opt. Lett. 31, 829 (2006).13L.-L. Yang, H.-Y. Lee, M.-K. Wang, X.-Y. Lin, K.-H. Hsu, Y.-R. Chang, W.

Fann, and J. D. White, J. Microsc. 234, 302 (2009).14E. Schaub, Opt. Express 20, 2184 (2012).15E. Schaub, Opt. Express 21, 23544 (2013).16J. S. Eid, J. D. Muller, and E. Gratton, Rev. Sci. Instrum. 71, 361 (2000).17K. Schatzel, M. Drewel, and S. Stimac, J. Mod. Opt. 35, 711 (1988).18K. Schatzel, in Dynamic Light Scattering, edited by R. G. W.

Brown (Clarendon, Oxford, 1993), Chap. 2.19M. Molteni, U. M. Weigel, F. Remiro, T. Durduran, and F. Ferri, Opt. Express

22, 28002 (2014).20F. Ferri and D. Magatti, Rev. Sci. Instrum. 74, 4273 (2003).21K. Schatzel, Appl. Phys. B 41, 95 (1986).22H. R. Haller, C. Destor, and D. S. Cannell, Rev. Sci. Instrum. 54, 973

(1983).23P. R. Bevington, Data Reduction and Error Analysis for the Physical Sci-

ences (McGraw-Hill, New York, 1969).24Y. Chen, Y. D. Muller, P. T. C. So, and E. Gratton, Biophys. J. 77, 553 (1999).25Y. D. Muller, Y. Chen, and E. Gratton, Biophys. J. 78, 474 (2000).

Reuse of AIP Publishing content is subject to the terms at: https://publishing.aip.org/authors/rights-and-permissions. Download to IP: 193.206.161.49 On: Wed, 16 Nov

2016 15:12:29