## 1.

## Introduction

Time-resolved fluorescence lifetime imaging (FLIM) is widely used in cell-biology research, medical diagnosis, and pharmacological development.^{1, 2, 3} It is based on the measurement of the decay in fluorescence emission across a sample after optical excitation and can be used to quantify physiological parameters, such as pH,
${\mathrm{Ca}}^{2+}$
,
$\mathrm{p}{\mathrm{O}}_{2}$
, etc., in biological samples. The independence of fluorescence lifetimes from probe concentration makes FLIM more favored than its counterpart—fluorescence intensity imaging. As shown in Fig. 1
, a laboratory FLIM experiment usually contains a Ti-sapphire laser, a photomultiplier tube (PMT), a time-correlated single-photon counting (TCSPC) photon-counting card, fluorescence lifetime analysis software, and a PC graphical user interface (GUI). Available FLIM systems provide excellent time resolution and light sensitivity, although they are quite expensive and cumbersome. Commercial applications increasingly demand compact and portable system-on-chip (SOC) FLIM solutions. Thanks to the progress of semiconductor technology, high-accuracy time resolution, high sensitivity, low cost, and compactness can be achieved by exploiting CMOS single-photon avalanche diode (SPAD) arrays with low dark count rate to replace PMTs^{4, 5, 6, 7} and by bump-bonding AlInGaN UV micropixellated light-emitting diodes to replace lasers^{7} in the general direction of lab on chip. The imager can include a CMOS SPAD array with in-pixel digital counters or time-to-digital converters (TDCs)^{6, 7} that allows recording not just the photon counts but also the raw timing data for detailed scientific analysis. The imager also contains Field-programmable gate arrays (FPGAs) allowing data processing. Figure 1 shows the SOC solution suited to lab-on-chip applications, which is intended to replace the system of Fig. 1. For imaging purposes, a remaining challenge is that the excessive computational demands of available lifetime analysis software such as the iterative least-squares method (LSM) or maximum-likelihood-estimation (MLE)^{8} render real-time imaging impossible. A new FLIM algorithm considering the instrument response based on the Laguerre expansion technique^{9} speeds up lifetime calculations, but the computation time increases with imager size. However, in many applications, such as microfluidic mixing^{10} and exploratory biological experiments, it is desirable to monitor the instantaneous biochemical interactions to provide quick feedback to corresponding manipulations. The slow speed of LSM- or MLE-based software analysis tools becomes a bottleneck and has driven the recent development of noniterative, compact, and fast real-time time-domain FLIM systems^{11, 12, 13, 14, 15, 16, 17}
and real-time frequency-domain FLIM algorithms and systems.^{18, 19, 20, 21} In the past, rapid lifetime determination methods (RLD) were thought to be the simplest algorithms^{11} and were used in some previously reported video-rate FLIMs.^{12, 13} In Ref. 12, an optomechanical delay control for RLD was proposed; however, its cumbersome optical setup makes it difficult to image a wide range of fluorophore lifetimes, and an electronically controllable delay would be preferable.^{13} To further achieve compactness for SOC, we can exploit configurable devices such as FPGAs to realize real-time FLIM systems. FPGAs have significantly benefited from the advances of CMOS technology. The latest FPGAs contain over hundreds of millions of transistors and can easily accommodate the output signals from SPAD arrays of growing size. With the ability of configuration, designers can easily reconfigure FPGAs by hardware description language to perform any application-specific logic functions, such as real-time lifetime calculations. We therefore evaluated the possibility of applying RLD either on chip or on FPGA and concluded that RLD can be implemented on FPGA with lookup tables (LUT) of natural logarithmic^{14} or other functions if overlap gating techniques are used.^{14, 15} The delay control of RLD can be easily reconfigured by users, and we expect that the system can benefit greatly from the user-friendly features. However, building a LUT on FPGA covering a wide range of lifetimes is inefficient, and it is desirable to develop more FPGA-friendly algorithms that use only additions. The impact will be huge, especially when a large SPAD array is applied. Moreover, a major drawback of RLD is the requirement to choose a proper time delay between two time gates,^{11, 12, 13, 14} which is quite challenging when specimens with a wide range of lifetimes coexist. We therefore propose a more hardware-friendly algorithm for lifetime calculations based on the imager developed in Ref. 6. In this paper, we first introduce the proposed hardware lifetime calculation algorithm by considering a single-exponential decay for simplicity. Although it is possible to implement multiexponential algorithms in hardware in combination with software calculations,^{17} it is not economic in terms of hardware resources. The single-exponential assumption allows a proper comparison of various fitting algorithms. Moreover, a single-exponential decay model is still useful to contrast different types of fluorophores. For diagnostic applications, obtaining lifetime contrast is probably more important than calculating the absolute values of lifetimes.^{13} The FPGA implementation and Verilog/Matlab modeling of the center-of-mass (CM) method (CMM) will be introduced. The performance of the proposed algorithm will be tested using Fluorescein, Coumarin 6, and 1,8-anilinonaphthalenesulfonate (ANS) in water/methanol.

## 2.

## Theory

## 2.1.

### CM of a Single-Exponential Function

For an object with a continuous distribution of mass density $f\left(\mathbf{r}\right)$ and total mass ${M}_{T}$ , its CM is defined as

## Eq. 1

$$\mathrm{CM}\equiv \frac{\int \mathbf{r}f\left(\mathbf{r}\right)dV}{\int f\left(\mathbf{r}\right)dV}=\frac{\int \mathbf{r}f\left(\mathbf{r}\right)dV}{{M}_{T}}.$$## 2.

^{16}however, it did not describe how to remove background noise in the analog domain. In such applications with low fluorescence emission, background-to-signal ratio will be relatively significant. Compared to Ref. 16, CMM works in the digital domain and allows background noise to be removed much more easily.

## 2.2.

### Error Analysis of CMM

In Ref. 22, it was shown that Eq. 2 is equivalent to MLE when
$M\to \infty $
; therefore, CMM can be viewed as hardware version of MLE. When the ratio of the full width at half maximum (FWHM) of the instrumental response function (IRF) over the lifetime is
$\u2aa11$
, we can assume the fluorescence decay histogram
$f\left(t\right)=A$
$\mathrm{exp}(-t\u2215\tau )$
with
$\tau $
being the lifetime.^{17} For the usual measurement setup in a lab, the FWHM of the IRF is on the order of hundreds of picoseconds; thus, it is reasonable to target lifetimes of
$>500\phantom{\rule{0.3em}{0ex}}\mathrm{ps}$
. With the assumption of single-exponential decay, the lifetime
$\tau $
is related to the decay function as

## Eq. 3

$$\tau \cong \frac{\int \Delta tf\left(t\right)dt}{\int f\left(t\right)dt}=\frac{{\int}_{{t}_{0}}^{{t}_{1}}(t-{t}_{0})f\left(t\right)dt+\cdots +{\int}_{{t}_{M-1}}^{{t}_{M}}(t-{t}_{0})f\left(t\right)dt}{{\int}_{{t}_{0}}^{{t}_{M}}f\left(t\right)dt}\cong \frac{{\int}_{{t}_{0}}^{{t}_{1}}(\frac{{t}_{0}+{t}_{1}}{2}-{t}_{0})f\left(t\right)dt+\cdots +{\int}_{{t}_{M-1}}^{{t}_{M}}(\frac{{t}_{M-1}+{t}_{M}}{2}-{t}_{0})f\left(t\right)dt}{{\int}_{{t}_{0}}^{{t}_{M}}A\phantom{\rule{0.2em}{0ex}}\mathrm{exp}(-t\u2215\tau )dt}=\frac{\sum _{j=0}^{M-1}\Delta {t}_{j}{\int}_{{t}_{j}}^{{t}_{j+1}}f\left(t\right)dt}{{N}_{\mathrm{c}}}=\frac{\sum _{j=0}^{M-1}\Delta {t}_{j}{N}_{j}}{{N}_{\mathrm{c}}}=\frac{\frac{{N}_{\mathrm{c}}}{2}+\sum _{j=0}^{M-1}j{N}_{j}}{{N}_{\mathrm{c}}}h=(\frac{\sum _{j=0}^{M-1}j{N}_{j}}{{N}_{\mathrm{c}}}+\frac{1}{2})h=Rh,$$## Eq. 4

$${N}_{j}=E{N}_{j}+\sigma {N}_{j}={N}_{\mathrm{c}}{x}^{j}(1-x){(1-{x}^{M})}^{-1}+\sigma {N}_{j},$$## Eq. 5

$${\tau}_{\mathrm{CMM}}\cong \frac{\sum _{j=0}^{M-1}\Delta {t}_{j}(E{N}_{j}+\sigma {N}_{j})}{\sum _{j=0}^{M-1}(E{N}_{j}+\sigma {N}_{j})}=\frac{\sum _{j=0}^{M-1}\Delta {t}_{j}E{N}_{j}+\sum _{j=0}^{M-1}\Delta {t}_{j}\sigma {N}_{j}}{\sum _{j=0}^{M-1}E{N}_{j}+\sum _{j=0}^{M-1}\sigma {N}_{j}}=\frac{U+\sigma u}{V+\sigma v}=\frac{U}{V}\frac{1+\sigma u\u2215U}{1+\sigma v\u2215V}=\tau (1+\frac{\Delta \tau}{\tau})(1+\frac{\sigma u}{U}-\frac{\sigma v}{V}),$$## Eq. 6

$$U=\sum _{j=0}^{M-1}\Delta {t}_{j}E{N}_{j},\phantom{\rule{1em}{0ex}}V={N}_{\mathrm{c}},\phantom{\rule{1em}{0ex}}\sigma u=\sum _{j=0}^{M-1}\Delta {t}_{j}\sigma {N}_{j},\phantom{\rule{1em}{0ex}}\sigma v=\sum _{j=0}^{M-1}\sigma {N}_{j}.$$## Eq. 7

$$\Rightarrow \frac{\Delta {\tau}_{\mathrm{CMM}}}{{\tau}_{\mathrm{CMM}}}=\frac{h}{\tau}G\left(x\right)-1,$$## Eq. 9

$$\frac{\sigma {\tau}_{\mathrm{CMM}}}{{\tau}_{\mathrm{CMM}}}=(1+\frac{\Delta \tau}{\tau})(\frac{\sigma u}{U}-\frac{\sigma v}{V})=\frac{h}{\tau}G\left(x\right)(\frac{\sigma u}{U}-\frac{\sigma v}{V}),$$## Eq. 10

$$\frac{\sigma u}{U}-\frac{\sigma v}{V}=\sqrt{\sum _{j=0}^{M-1}\left[{(\frac{\Delta {t}_{j}}{U}-\frac{1}{{N}_{\mathrm{c}}})}^{2}\sigma {N}_{j}^{2}\right]}=\frac{1}{\sqrt{{N}_{\mathrm{c}}}G\left(x\right)}\sqrt{\left(\frac{1-x}{1-{x}^{M}}\right)\sum _{j=0}^{M-1}{[j+\frac{1}{2}-G\left(x\right)]}^{2}{x}^{j}}=\frac{1}{\sqrt{{N}_{\mathrm{c}}}}\frac{\sqrt{P\left(x\right)}}{(1-x)(1-{x}^{M})G\left(x\right)},$$The accuracy of the CMM lifetime estimator is determined by the quantization error in Eq. 3. It is usually predictable and can be calibrated by software,^{17} whereas the precision (normalized standard deviation) mainly comes from Poisson noise and can be improved only through increasing photon count. From Eqs. 2, 3, we can also calibrate the lifetime by

## Eq. 12

$${\tau}_{\mathrm{CMM},\mathrm{Cal}}\cong {\tau}_{\mathrm{CMM}}+\frac{T{\mathrm{e}}^{-Mh\u2215{\tau}_{\mathrm{CMM}}}}{1-{\mathrm{e}}^{-Mh\u2215{\tau}_{\mathrm{CMM}}}}=(R+\frac{M{\mathrm{e}}^{-M\u2215R}}{1-{\mathrm{e}}^{-M\u2215R}})h.$$Figure 3 shows the inverse accuracy and precision curves of Eqs. 7, 9 (for easily transferred to decibels) for $M=1024$ and ${N}_{\mathrm{c}}={2}^{17}$ . The theoretical results marked as solid lines are compared to Monte Carlo simulations marked with crosses, giving good agreement and proving the correctness of Eqs. 7, 9. Theoretical precision curves of 1024-bin MLE, and 2-gate RLD (with gate width ${w}_{\mathrm{g}}=Mh\u22152=512h$ ) are also provided for comparison. From Fig. 3, the optimal window for RLD is from $Mh\u2215\tau =1\u20135$ , whereas that for CMM is from $Mh\u2215\tau =7\u2013100$ . Here, we define a new precision value for CMM as

## Eq. 13

$$\text{Precision}\equiv \frac{{\tau}_{\mathrm{CMM}}}{\sqrt{\sigma {\tau}_{\mathrm{CMM}}^{2}+\Delta {\tau}_{\mathrm{CMM}}^{2}}}.$$In some applications, we need to know the range of lifetimes that a predictor can resolve when the laser repetition rate (LPR) or the measurement window (MW) is fixed. We use the
$F$
value introduced in Ref. 23 to quantify the performance of a lifetime imaging technique. The
$F$
value is defined as
$F={N}_{\mathrm{c}}^{1\u22152}\sigma \tau \u2215\tau $
, where
$\sigma \tau $
is the standard deviation of repeated measurements of the lifetime value
$\tau $
. Figure 4
shows
$F$
curves for 1024-bin CMM, 4096-bin CMM, 1024-bin MLE, 15-bin integration for extraction method (IEM),^{17} and 2-gate RLD in terms of
$\tau $
normalized by measurement window
$(\mathrm{MW}=Mh)$
. The MLE demonstrates the best resolvability range. However, it is not possible to implement it in hardware. For the other three methods, only CMM has a flat optimal
$F$
response. Taking
$\mathrm{LPR}=5\phantom{\rule{0.3em}{0ex}}\mathrm{MHz}$
as an example and assuming the TDC full range is equivalent to the measurement window,
$\mathrm{MW}=200\phantom{\rule{0.3em}{0ex}}\mathrm{ns}$
. If
${N}_{\mathrm{c}}={2}^{17}$
, then the lifetime range with a precision of
$40\phantom{\rule{0.3em}{0ex}}\mathrm{dB}$
$(F\sim 4)$
for 2-gate RLD, 15-bin IEM, 1024-bin CMM, and 1024-bin MLE are 16–200, 12–140, 0.6–30, and
$0.02\u2013320\phantom{\rule{0.3em}{0ex}}\mathrm{ns}$
, respectively. For RLD, the optimal window can be chosen by selecting proper delays, mechanically or electronically.^{12, 13} For CMM and IEM, the optimal window can be easily set on FPGA by choosing a proper
$M$
. In theory, the lower bound of CMM and MLE can be further reduced by increasing
$M$
. However, it is limited by the FWHM of the system IRF, which can be several hundreds of picoseconds, considering jitter contributed by the SPADs, laser, and TDCs. Therefore, increasing
$M$
further for real-time, single-exponential lifetime estimation is not sensible. A comparison summary for the CMM, IEM, RLD, and the MLE algorithms is provided in Table 1
. It clearly shows the merits of the CMM in terms of
$F$
value, lifetime resolvability, and on-chip feasibility. From Fig. 4, the advantage of CMM is that its photon collecting efficiency, for a given precision, is 2.5-fold larger than RLD-2 and IEM. The measurement window should be about
$10\times $
the lifetime (or
$7\times $
with software calibration) to achieve high sensitivity (good photon economy). In this respect, RLD imaging can use a higher laser repetition rate and achieve a better duty cycle at measurement
$\text{window}=1\u20135\tau $
. However, if complete raw arrival time data are needed, the laser repetition rate cannot be too low. Moreover, for most fluorophores, the measurement window is
$>4\tau $
to avoid nonidealities such as bleed through. Although one might argue that for mono-exponential decays the bleed through does not matter too much, but it undermines background correction. This means our CMM detector system has a slightly lower duty-cycle performance in order to maintain the sensitivity. However, our system contains TDCs and can provide both raw data and lifetime data output.

## Table 1

Comparison summary of the CMM, IEM, RLD, and MLE.

Method | Fmin at h (τ) | F<4 resolvability | On-chipfeasibility |
---|---|---|---|

StandardRLD-2 | 1.5at 2.5 | $0.08<\tau \u2215\mathrm{MW}<1$ | Yes/LUT2 |

IEMw/oCalibration^{17} | 1.6at 0.671 | $0.06<\tau \u2215\mathrm{MW}<0.7$ for $M=15$ | Yes |

IEMwithCalibration^{17} | 1.2at 1.67 | $0.03<\tau \u2215\mathrm{MW}<0.7$ for $M=15$ | Yes |

MLE $M=1024$ | 1.0at [0.01–0.5] | $1\times {10}^{-4}<\tau \u2215\mathrm{MW}<1.6$ | No |

CMM
$\mathit{M}=\mathbf{1024}$
| 1.0at [0.01–0.1] | $\mathbf{3}\times {\mathbf{10}}^{-\mathbf{3}}<\mathbf{\tau}\u2215\mathbf{MW}<\mathbf{0.15}$ | Yes |

CMM $M=4096$ | 1.0at [0.003–0.08] | $7\times {10}^{-4}<\tau \u2215\mathrm{MW}<0.15$ | Yes |

## 2.3.

### Error Analysis of CMM with Background Correction

In most practical lifetime analysis tools, background is taken into account by the subtraction of a dc background value ${C}_{0}$ ( $={N}_{\mathrm{b}}\u2215M$ , ${N}_{\mathrm{b}}$ is total background noise within a measurement window of $Mh$ ) from the measured histogram, and along with lifetime calculations, this is done by software. However, for faster real-time imaging it is desirable that a hardware calibration technique can be integrated into the system by generating the required ${C}_{0}$ using the available counts. Figure 5 shows a typical measured histogram (of $1\phantom{\rule{0.3em}{0ex}}\mu \mathrm{M}$ Fluorescein, detailed in Section 4). There always exists a flat response before the peak of the histogram decided by the delay between systems enable signal and laser excitation. A dc value of ${C}_{0}$ can be obtained by averaging the counts of several bins on the flat response. Suppose we have a white background noise response, and we can therefore obtain the background count as ${N}_{\mathrm{b}}=M{C}_{0}$ , from Eq. 5, and by subtracting ${C}_{0}$ from the count in each bin, we have

## Eq. 14

$$\frac{{\tau}_{\mathrm{CMM},\mathrm{corr}}}{h}=\frac{\sum _{j=0}^{M-1}\frac{\Delta {t}_{j}}{h}({N}_{j}-{C}_{0})}{{N}_{\text{total}}-M{C}_{0}}=\frac{\sum _{j=0}^{M-1}(j+\frac{1}{2}){N}_{j}-\frac{M{N}_{\mathrm{b}}}{2}}{{N}_{\mathrm{c}}},$$## 15.

## 3.

## Hardware Implementation Method and Modeling

## 3.1.

### FPGA Implementation Method

We rewrite Eq. 3 as

## Eq. 16

$$\frac{{\tau}_{\mathrm{CMM}}}{h}=\frac{\sum _{i=1}^{{N}_{\mathrm{c}}}{\overline{D}}_{i}}{{N}_{\mathrm{c}}}+\frac{1}{2},$$## Eq. 17

$${N}_{\mathrm{c}}={2}^{L},\phantom{\rule{1em}{0ex}}L\phantom{\rule{1em}{0ex}}\text{is}\phantom{\rule{0.3em}{0ex}}\text{an}\phantom{\rule{0.3em}{0ex}}\text{integer}.$$## Eq. 18

$$\frac{{\tau}_{\mathrm{CMM}}}{h}=\frac{\sum _{i=1}^{{N}_{\mathrm{c}}}{\overline{D}}_{i}+{2}^{L-1}}{{2}^{L}},$$## Eq. 19

$$F=\frac{{N}_{\mathrm{c}}^{1\u22152}\sigma \tau}{\tau}=\frac{{2}^{L\u22152}\sigma \tau}{\tau}=1.0\Rightarrow \frac{\tau}{\sigma \tau}={2}^{L\u22152}\phantom{\rule{1em}{0ex}}\text{or}\phantom{\rule{0.3em}{0ex}}\text{signal-to-noise}\phantom{\rule{0.3em}{0ex}}\text{ratio}\phantom{\rule{0.3em}{0ex}}\left(\mathrm{SNR}\right)\cong 3L\phantom{\rule{0.3em}{0ex}}\left(\mathrm{dB}\right).$$## Eq. 20

$${t}_{\text{update}}=\frac{{2}^{L}}{\mathrm{PCR}}\u2a7d30\phantom{\rule{0.3em}{0ex}}\mathrm{ms},$$^{4, 5, 6, 7}End users can choose a proper $L$ to maintain an acceptable accuracy while keeping the lifetime update rate. All parameters can be set by end users via the GUI considering the image contrast, accuracy, and update speed. Other functions, such as automatic histogram peak finding, imaging filtering, dark area marking, homogeneous lifetime updating, and background correction, can also be implemented on a FPGA. With this arrangement, video-rate lifetime images can be generated and the dynamics of interactions between fluorophores and the microenvironment, such as microfluidic mixing, can be easily observed.

## 3.2.

### SPAD Detection Model and Verilog/Matlab Simulations

Before employing CMM with a SPAD array, we first built a detection model of a SPAD pixel in order to verify the efficiency of the algorithm on the FPGA. Figure 7 shows the diagram for the detection model of a SPAD pixel. The $8\text{-}\text{bit}$ signal coming from a TDC in a SPAD pixel cell can be modeled by a $31\text{-}\text{bit}$ pseudo-random bit sequence (PRBS) generator and a lookup table used for generating a photon-emission probability function. The threshold values ${V}_{\mathrm{th},j}$ are related as

## Eq. 21

$${V}_{\mathrm{th},j+1}-{V}_{\mathrm{th},j}\propto {N}_{j},\phantom{\rule{1em}{0ex}}j=0,\dots ,M-1.$$^{24}The maximum length of the bit sequence is ${2}^{31}-1=2.15\times {10}^{9}$ , which is much larger than the total photon count of usual TCSPC measurements for a single pixel. For comparison to RLD algorithms and for simplicity, we built a lookup table of digital division inside the CMM implementation block; although in practice, there is no need to do so according to Eqs. 16, 17. Taking a single decay function $f\left(t\right)=A\phantom{\rule{0.2em}{0ex}}\mathrm{exp}[-t\u2215\left(21h\right)]$ as an example, if $h$ is of $200\phantom{\rule{0.3em}{0ex}}\mathrm{ps}$ (the full range of the TDC is $256h=51.2\phantom{\rule{0.3em}{0ex}}\mathrm{ns}$ , which is equivalent to a $\mathrm{LPR}=20\phantom{\rule{0.3em}{0ex}}\mathrm{MHz}$ ). The lifetime $\tau =21h=4.2\phantom{\rule{0.3em}{0ex}}\mathrm{ns}$ is much larger than a typical jitter of $300\phantom{\rule{0.3em}{0ex}}\mathrm{ps}$ such that only tail fitting is applied to extract the lifetime without digital deconvolution.

^{17}A measurement window of $M=200$ (44th to 243rd bin) from the peak of the histogram is chosen for lifetime calculations. Figure 8 shows the decay histogram ${N}_{\mathrm{r}}$ obtained by the model and the fitted curve ${N}_{\mathrm{f}}$ by CMM with background correction of Eq. 14 using Verilog. The calculated lifetimes with four extra bits for decimal accuracy obtained by CMM and RLD with/without background correction are listed, respectively. The reduced chi-squared is 1.10 showing a good fit, and Fig. 8 also shows the normalized residual plot of $({N}_{\mathrm{r}}-{N}_{\mathrm{f}})\u2215{N}_{\mathrm{f}}^{1\u22152}$ , which is well distributed, implying that the model is Poisson distributed as in real cases.

The second example is
$f\left(t\right)=A\phantom{\rule{0.2em}{0ex}}\mathrm{exp}[-t\u2215\left(2h\right)]$
, with a lifetime
$\tau =2h=400\phantom{\rule{0.3em}{0ex}}\mathrm{ps}$
at
$\mathrm{LPR}=20\phantom{\rule{0.3em}{0ex}}\mathrm{MHz}$
. We are comparing CMM to other algorithms with
$M=200$
. CMM is not sensitive to the timing jitter. For RLD, it is a challenging task to resolve lifetimes, much less than the effective measurement window (
$\tau \u2aa1200h$
in this case). Thus, we use MLE^{8} instead to calculate the lifetime with software using

## Eq. 22

$$1+{({x}^{-1}-1)}^{-1}-M{({x}^{-M}-1)}^{-1}={N}_{\mathrm{c}}^{-1}\sum _{j=0}^{M-1}(j+1){N}_{j},$$## 4.

## Experimental Results

## 4.1.

### Measurements of Fluorescein and Coumarin 6 Using SPADs

Measurements of the decays of Fluorescein and Coumarin 6 mounted on microcavity slides have been made to test the proposed CMM hardware lifetime calculation algorithm. Table 2 lists the fluorophores under test in terms of solvent, concentration, excitation and emission wavelengths, typical lifetimes provided by the manufacturers, and the calculated lifetimes using CMM, MLE, RLD-2, and Edinburgh Instruments F900 software. Then, $45\phantom{\rule{0.3em}{0ex}}\mu \mathrm{L}$ of each sample was pipetted into a single-cavity ( $15\text{-}\mathrm{mm}$ diam) glass microscope slide (Fisher Scientific, United Kingdom, MNK-140-010A) and sealed with a $0.12\text{-}\mathrm{mm}$ -thick borosilicate glass coverslip (Fisher Scientific, MNJ-300-020T). The LPR (PicoQuant pulsed diode laser with wavelength of $470\phantom{\rule{0.3em}{0ex}}\mathrm{nm}$ ) is $10\phantom{\rule{0.3em}{0ex}}\mathrm{MHz}$ , and the average output power is $0.12\phantom{\rule{0.3em}{0ex}}\mathrm{mW}$ . Fluorescence decay curves were recorded on a time scale of $100\phantom{\rule{0.3em}{0ex}}\mathrm{ns}$ , resolved into 1024 time bins (i.e., $h\sim 0.098\phantom{\rule{0.3em}{0ex}}\mathrm{ns}$ ). With LPR of $10\phantom{\rule{0.3em}{0ex}}\mathrm{MHz}$ , there is no bleed through observed on measured histograms. The fluorescence emission is captured by a SPAD array fabricated in a $0.35\text{-}\mu \mathrm{m}$ CMOS high-voltage process mounted on a daughter board. Figure 5 shows the measured histogram of Fluorescein, and Fig. 11 shows the logarithmic plot for the measured histogram ${N}_{\mathrm{r}}$ , starting from the bin with the peak intensity and the fitted curve ${N}_{\mathrm{f}}$ by CMM with background correction, and also the normalized residual count. The reduced chi-squared is 1.40. The last three rows of Table 2 show the calculated lifetimes with background correction for CMM, MLE, RLD, and Edinburgh Instruments F900 software, respectively. Measurement windows of $5\u201320\u221530\tau $ , $0.5\u201320\u221530\tau $ , $1\u20135\tau $ , and $1\u201320\u221530\tau $ are chosen for CMM, MLE, RLD-2, and F900, respectively. The mean lifetimes of Fluorescein and Coumarin 6 calculated by CMM, are 4.15 and $2.42\phantom{\rule{0.3em}{0ex}}\mathrm{ns}$ , respectively, in good agreement with the data provided by the manufacturers and are also comparable to other algorithms.

## Table 2

Summary of fluorophores used.

Fluorophore | Fluorescein | Coumarin 6 |
---|---|---|

Solvent | Ethanol | Methanol |

Concentration $\left(\mu \mathrm{M}\right)$ | 1 | 1 |

Excitation wavelength (nm) | 495 | 460 |

Peak emission wavelength (nm) | 517 | 505 |

Typical lifetime (ns) | 4.1 | 2.5 |

Calculated lifetime (ns) usingCMM
$\mathit{h}=\mathbf{0.098}\phantom{\rule{0.3em}{0ex}}\mathbf{ns}$
| $\mathbf{4.15}\pm \mathbf{0.15}$ $\mathbf{5}\tau <\mathit{Mh}<\mathbf{20}\tau $ 1 | $\mathbf{2.42}\pm \mathbf{0.08}$ $\mathbf{5}\tau <\mathit{Mh}<\mathbf{30}\tau $ 2 |

Calculated lifetime (ns) usingMLE
$\mathit{h}=\mathbf{0.098}\phantom{\rule{0.3em}{0ex}}\mathbf{ns}$
| $\mathbf{4.2}\pm \mathbf{0.20}$ $\mathbf{0.5}\tau <\mathit{Mh}<\mathbf{20}\tau $ | $\mathbf{2.4}\pm \mathbf{0.1}$ $\mathbf{0.5}\tau <\mathit{Mh}<\mathbf{30}\tau $ |

Calculated lifetime (ns) usingRLD-2
$\mathbf{1}\tau <\mathbf{2}{\mathit{w}}_{\mathit{g}}<\mathbf{5}\tau $
| $\mathbf{4.4}\pm \mathbf{0.08}$ | $\mathbf{2.42}\pm \mathbf{0.05}$ |

Calculated lifetime (ns) usingEdinburgh instruments F900
$\mathit{h}=\mathbf{0.098}\phantom{\rule{0.3em}{0ex}}\mathbf{ns}$
| $\mathbf{4.38}\pm \mathbf{0.06}$ $\mathbf{1}\tau <\mathit{Mh}<\mathbf{20}\tau $ | $\mathbf{2.41}\pm \mathbf{0.03}$ $\mathbf{1}\tau <\mathit{Mh}<\mathbf{30}\tau $ |

## 4.2.

### Measurements of ANS in Water/Methanol Using PMTs

Fluorescent dye ANS is widely used in biological experiments due to its extreme sensitivity to the composition of water/methanol mixtures, showing a drastic variation in lifetime from
$250\phantom{\rule{0.3em}{0ex}}\mathrm{ps}$
in pure water to
$6\phantom{\rule{0.3em}{0ex}}\mathrm{ns}$
in pure methanol.^{25} The excitation light comes from a Ti-sapphire laser (
$\mathrm{LPR}=4.75\phantom{\rule{0.3em}{0ex}}\mathrm{MHz}$
using a pulse picker) with a laser power of
$0.1\phantom{\rule{0.3em}{0ex}}\mathrm{mW}$
. The concentration of ANS is
$1\phantom{\rule{0.3em}{0ex}}\mathrm{mM}$
. The ANS in the water/methanol mixture with a concentration of water of 0, 10, 20, 30, and 100%
$\nu \u2215\nu $
, respectively, is measured by a PMT. Figure 12
shows the measured and fitted fluorescence histograms obtained by the PMT and CMM, respectively. The fluorescence histograms of ANS display a single-exponential decay as stated in the previously reported literature,^{10, 25} making it an ideal probe of solvent composition. The calculated lifetimes in terms of water concentration obtained by CMM, the prediction function in Ref. 10, and Edinburgh Instruments F900 software are listed in Table 3
. They are in a good agreement with one another. The reduced chi-squared is also listed in Table 3.

## Table 3

Comparison of calculated lifetimes of ANS between CMM, prediction function,10 and Edinburgh Instruments F900 software.

Percentage ν∕ν (%) | CMM (ns)/reduced chi-squared | Ref. 10 (ns) | F900 (ns) |
---|---|---|---|

0 | 6.08/1.7 | 5.97 | 6.13 |

10 | 4.87/1.01 | 4.76 | 4.86 |

20 | 3.49/1.10 | 3.38 | 3.47 |

30 | 2.49/1.02 | 2.4 | 2.48 |

100 | 0.28/1.22 | 0.25 | 0.27 |

## 5.

## Conclusion

We have proposed a very simple FLIM algorithm called CMM [Eq. 3] for real-time applications and derived the theoretical error equations [Eqs. 7, 9] for easily obtaining the best recording parameters, such as measurement window, width of a time bin, and bit resolution of the TDC. The method has the potential of using the available photons efficiently, provided that the recording parameters are correctly optimized. For single-exponential lifetime imaging, the algorithm provides the same precision level as the MLE in the optimal window with $F$ of 1.0. An interesting result of our study is that the optimum performance of $F\sim 1.0$ can be obtained at

## Eq. 23

$$10h<\tau <0.1Mh\phantom{\rule{0.3em}{0ex}}(\text{or}\phantom{\rule{0.3em}{0ex}}10h<\tau <0.14Mh,\phantom{\rule{0.6em}{0ex}}\text{with}\phantom{\rule{0.3em}{0ex}}\text{software}\phantom{\rule{0.3em}{0ex}}\text{calibration})$$^{17}the design specifications of in-pixel TDCs can be more relaxed. The FPGA implementation of this FLIM algorithm is proposed for the first time as Eqs. 17, 18. Hardware implementation of CMM with background correction can also be easily implemented on FPGA with Eq. 14. The performance of CMM is successfully tested not only on Verilog/Matlab synthetic data but also on real data collected by CMOS SPAD pixels and PMTs. CMM on the latest developed CMOS SPAD arrays has single-photon sensitivity and provides an efficient way of video-rate FLIM implementations; it is promising for imaging applications.

## Acknowledgments

This work has been supported by the European Community within the Sixth Framework Programme of the Information Science Technologies, Future and Emerging Technologies Open MEGAFRAME project (Contract No. 029217-2, www.megaframe.eu). R.A. was funded by the Biotechnology and Biological Sciences Research Council RASOR Grant No. BB/C511599/1. The measurements have been performed using the COSMIC laboratory facilities with help from Trevor Whittley and David Dryden. The authors express gratitude to them. This publication reflects only the authors’ views. The European Community is not liable for any use that may be made of the information contained herein.