Abstract
Optical spectroscopy is an indispensable technique in almost all areas of scientific research and industrial applications. After its acquisition, an optical spectrum is usually further processed using a mathematical algorithm to classify or quantify the measurement results. Here we present the design and realization of a smart photodetector that provides such information directly without the need to explicitly record a spectrum. This is achieved by tailoring the spectral responsivity of the device to a specific purpose. Insensor computation is performed at the lowest possible level of the sensor system hierarchy – the physical level of photon detection – and does not require any external processing of the measurement data. The device can be programmed to cover different types of spectral regression or classification tasks. We present the analysis of spectral mixtures as an example, but the scheme can also be applied to any other algorithm that can be represented by a linear operator. Our prototype physical implementation utilizes an ensemble of optical cavityenhanced MoS_{2} photodetectors with different center wavelengths and individually adjustable peak responsivities. This spectroscopy method represents a significant advance in miniaturized and energyefficient optical sensing.
Similar content being viewed by others
Introduction
With the proliferation of sensing devices in a wide range of portable applications, from environmental monitoring to medical diagnostics and food quality control, the demand for more compact and energyefficient solutions is increasing. Insensor computing is an emerging field that aims to bring computation and data processing capabilities to the edge of a sensing application. It leverages the processing power of computing devices that are directly integrated into the sensors. This approach differs from traditional solutions, where the collected signals are usually transferred to an external, centralized system for further processing. Recently, analogdomain insensor computing has gained momentum^{1,2}. There, the sensory information is processed in its raw, analog format, bypassing the need for analogtodigital conversion. As a result, data processing is faster and more energyefficient, since it eliminates the transfer and conversion steps. For example, the classification of optical images directly during the light detection process has been utilized in several recent works^{3,4,5,6,7,8,9,10}. Similarly, the acquisition of an optical spectrum is not an end in itself, but rather serves to extract certain information about a specimen under examination, whether for classification or quantification purposes.
In optical spectroscopy, reconstructive (or computational) spectrometers^{11,12,13,14,15,16,17,18,19,20} have emerged as a promising alternative to their conventional grating or interferometerbased counterparts. The underlying concept of these instruments is that superpositions of intensities at different wavelengths are recorded, instead of the usual measurement of spectral intensities at individual wavelengths. This can be achieved with an array of filters or, preferably, a photodetector with a variable spectral response. The input spectrum can then be reconstructed from a series of such measurements. These devices do not require bulky and fragile optical components, such as diffraction gratings or moving mirrors, and can therefore be integrated onchip. However, although reconstructive spectrometers offer better scalability than conventional solutions, they require considerable computational resources to reconstruct and analyze the optical spectra. Therefore, to further reduce energy consumption, latency, footprint, and cost, it would be desirable to move the processing of the highly redundant and unstructured sensory data entirely into the photosensors themselves.
The ambition of this work is to realize a photodetector that is able to provide such information without having to resort to any external data processing. To accomplish this, the device’s spectral responsivity is adjusted to match a specific purpose. Insensor computation occurs at the lowest level of the sensor system hierarchy, which is the physical level of photon detection. Our approach aims to improve the capabilities of optical spectroscopy by providing a compressed representation of the relevant information contained in an optical spectrum and represents a significant advance in miniaturized and energyefficient optical sensing.
Results
In Fig. 1, we compare the detection scheme presented in this article to a conventional optical sensing approach. Conventionally (Fig. 1a), incident light is dispersed to produce a spectrum and its corresponding vector representation, p, is recorded. The digitized data are then processed using an external processing unit/computer, which utilizes a statistical or machinelearning algorithm to analyze p and extract the desired information, α_{i}, from the measurement. In contrast, in our insensor computing scheme (Fig. 1b), the same algorithm is implemented in the analog domain on a physical level, resulting in the direct output of the relevant information α_{i} from the detector itself without any need for further external data processing.
Photodetectors as spectral dotproduct devices
At the heart of any optical spectroscopy application are photodetectors, devices that convert light into electrical signals. The most important parameter that governs the behavior of a photodetector is the photoresponsivity \(R={I}_{{{{{{\rm{ph}}}}}}}/P\), the ratio between the generated photocurrent I_{ph} (or photovoltage V_{ph}) and the incident light power P, expressed in A/W (or V/W). On closer look, however, R is not just a constant, but a complicated function \(R(\nu,\, {{{{{\bf{J}}}}}},{{{{{\bf{x}}}}}},\ldots )\) that may depend on a number of variables, such as the frequency of the incident light ν, its polarization J, the spatial position on the device x, and several other parameters, including the power P itself. While the usual engineering practice is to make R as independent of these variables as possible (within a relevant parameter range), here we take the exact opposite approach. The spectral responsivity R(ν) of our photodetector is tailored to serve a specific purpose, and can be freely configured – or programmed – to perform any linear regression or classification task.
In the linear response regime, a photodetector with frequencydependent photoresponsivity R(ν) illuminated with light of the spectrum P(ν) generates a photocurrent
If the spectrum and spectral responsivity are represented in a finitedimensional vector space \({{\mathbb{R}}}^{n}\) by two column vectors^{2} \({{{{{\bf{p}}}}}}={\left({P }({\nu}_{1}),\, {P }({\nu}_{2}),\ldots,{P }({\nu}_{{{{{{\rm{n}}}}}}})\right)}^{{{{{{\rm{T}}}}}}}\) and \({{{{{\bf{r}}}}}}={\left(R({\nu}_{1}),\, R({\nu }_{2}),\ldots,R({\nu }_{{{{{{\rm{n}}}}}}})\right)}^{{{{{{\rm{T}}}}}}}\), respectively, the photoresponse \({I}_{{{{{{\rm{ph}}}}}}}\) can be conveniently written as an inner product, as depicted in Eq. (1). By performing the above operation m times involving different spectral responsivity vectors, a matrixvector multiplication Rp with responsivity matrix \({{{{{\bf{R}}}}}}={\left({{{{{{\bf{r}}}}}}}_{1}^{{{{{{\rm{T}}}}}}},{{{{{{\bf{r}}}}}}}_{2}^{{{{{{\rm{T}}}}}}},\ldots,{{{{{{\bf{r}}}}}}}_{{{{{{\rm{m}}}}}}}^{{{{{{\rm{T}}}}}}}\right)}^{{{{{{\rm{T}}}}}}}\) can also be carried out. Tailoring the spectral response of a photodetector thus allows for the implementation of any linear model on the inner product space \({{\mathbb{R}}}^{n}\). As with computational spectrometers, such a photodetector measures a weighted superposition of spectral intensities at different wavelengths, but with the goal of directly extracting a soughtafter quantity rather than reconstructing the underlying spectrum. While a frequencydependent response can also be achieved by using a customized optical filter in front of a conventional photodetector^{21}, such a simple approach lacks reconfigurability and the ability to achieve negative photoresponses (i.e., a reversed current flow direction) necessary for the implementation of most machine learning algorithms.
Linear model implementation
Linear regression models have proven valuable in various fields, including remote sensing and optical spectroscopy. In remote sensing, linear models can be used to determine land cover, vegetation density, water content, and other environmental parameters. In optical spectroscopy they can be employed to provide quantification of analytes in chemical mixtures. The relationship between the spectral response and the characteristic of interest is modeled using a linear function, where the coefficients of the function represent the weights assigned to each variable. The coefficients are estimated from training data using statistical methods, such as least squares regression. The resulting model can then be used to predict the property of interest for a new sample based on a spectral measurement. The general equation for a linear regression model is
where y is the response variable (such as the concentration of an analyte or the physical property of a material), the vector \({{{{{\bf{p}}}}}}{{{{{\boldsymbol{=}}}}}}{\left({p}_{1},{p}_{2},\ldots,{p}_{{{{{{\rm{n}}}}}}}\right)}^{{{{{{\rm{T}}}}}}}\) contains the predictor variables (which in the case of optical spectroscopy and remote sensing are the spectral intensities at different wavelengths), the vector \({{{{{\boldsymbol{\beta }}}}}}{{{{{\boldsymbol{=}}}}}}{\left({\beta }_{1},{\beta }_{2},\ldots,{\beta }_{{{{{{\rm{n}}}}}}}\right)}^{{{{{{\rm{T}}}}}}}\) contains the regression coefficients (i.e. the weights assigned to each predictor variable), c is an offset, and ε is a random error term (the difference between the predicted and the true response). Based on the formal similarity between Eqs. (1) and (2), it can be concluded that linear models can be implemented in a photodetector’s linear response by equating its spectral responsivity r with the regression vector β. c can be incorporated in the detector output by adding a constant offset current (in many cases it may also be set to zero).
Analysis of spectral mixtures
As an illustrative example, we present the implementation of spectral mixture analysis^{22,23,24}, a powerful technique widely used to extract information from complex spectral data. In fluorescence microscopy, for example, this technique can be employed to separate the signals of different fluorophores with overlapping spectral profiles. It thus allows to obtain quantitative information about the distribution and abundance of multiple fluorophores used to label different cellular structures or molecules in biological imaging. Similarly, it can be employed in Raman spectroscopy to identify and quantify the different chemical components of a sample. The approach works by decomposing an optical spectrum p into a linear combination of the spectra u_{i} of m spectrally distinct components, \({{{{{\bf{p}}}}}}{{{{{\boldsymbol{=}}}}}}{\sum }_{{{{{{\rm{i}}}}}}=1}^{{{{{{\rm{m}}}}}}}{\alpha }_{{{{{{\rm{i}}}}}}}{{{{{{\bf{u}}}}}}}_{{{{{{\rm{i}}}}}}}\), where the coefficients \({\alpha }_{{{{{{\rm{i}}}}}}}\) reflect the proportions of the individual components in the mixture. Let \({{{{{{\bf{u}}}}}}}_{{{{{{\rm{m}}}}}}}\) be the spectral signature of interest, and the remaining m1 spectra are undesired signatures that we assemble into a matrix \({{{{{\bf{U}}}}}}{{{{{\boldsymbol{=}}}}}}\left({{{{{{\bf{u}}}}}}}_{1}{{{{{{\bf{u}}}}}}}_{2}\cdots {{{{{{\bf{u}}}}}}}_{{{{{{\rm{m}}}}}}1}\right)\). As described in the Methods section, a regression operator for \({{{{{{\bf{u}}}}}}}_{{{{{{\rm{m}}}}}}}\) can be derived by proceeding in two steps. First, one eliminates the effects of the undesired spectral contributions by projecting p onto the orthogonal complement of the column space of U. The result is then projected onto u_{m} to obtain an output that is directly proportional to α_{m}. Figure 1c provides a geometrical interpretation of the algorithm. By comparison with Eq. (1) we can deduce the frequencydependent photoresponsivity
A photodetector that possesses a spectral response according to Eq. (3) projects a measured optical spectrum p onto the spectral signature of interest \({{{{{{\bf{u}}}}}}}_{{{{{{\rm{m}}}}}}}\), while simultaneously cancelling the contributions of the other classes. The larger the proportion of \({{{{{{\bf{u}}}}}}}_{{{{{{\rm{m}}}}}}}\) in p, the larger the output current. Equation (3) can be further extended to include constraints (such as e.g. the full additivity condition \({\sum }_{{{{{{\rm{i}}}}}}=1}^{{{{{{\rm{m}}}}}}}{\alpha }_{{{{{{\rm{i}}}}}}}=1\)) that can likewise be implemented in our photodetector, provided they are linear.
To further illustrate the underlying concept, we show in the upper right inset in Fig. 1c an example of an optical spectrum p that is a linear superposition of three spectra \({{{{{{\bf{u}}}}}}}_{1}\), \({{{{{{\bf{u}}}}}}}_{2}\) and \({{{{{{\bf{u}}}}}}}_{3}\) (shown in the other insets). The shapes of the spectra are known, but not how much each of them contributes to the total. We are interested in determining the contribution of \({{{{{{\bf{u}}}}}}}_{3}\). To realize a photodetector that is sensitive to \({{{{{{\bf{u}}}}}}}_{3}\) only, we determine the required photoresponsivity vector r from Eq. (3) and plot the result as red line in Fig. 1d (the Python script is provided in Supplementary Note 1). The outcome is intuitive: \({{{{{{\bf{u}}}}}}}_{3}\) mainly contributes at lower frequencies, while \({{{{{{\bf{u}}}}}}}_{1}\) and \({{{{{{\bf{u}}}}}}}_{2}\) are spectrally broader and also have components at higher frequencies. Due to the progression of r from positive to negative values, the integrated contributions of \({{{{{{\bf{u}}}}}}}_{1}\) and \({{{{{{\bf{u}}}}}}}_{2}\) cancel out, while only \({{{{{{\bf{u}}}}}}}_{3}\) contributes to the net photocurrent \({I}_{{{{{{\rm{ph}}}}}}}\). As shown in Fig. 1d (inset), \({I}_{{{{{{\rm{ph}}}}}}}\) is indeed directly proportional to \({\alpha }_{3}\).
Other commonly used regression models in optical spectroscopy include partial least squares regression (PLS), multiple linear regression (MLR), and principal component regression (PCR). These methods differ from spectral mixture analysis only in the way the regression/responsivity vector is calculated, but can be implemented physically in the very same way. The implementation of linear classifiers is also feasible. Consider the general equation of a binary classifier \(y={\sigma }_{{{{{{\rm{c}}}}}}}\left({{{{{{\bf{w}}}}}}}^{{{{{{\rm{T}}}}}}}{{{{{\bf{p}}}}}}\right)\), where w is the weight vector, \({\sigma }_{{{{{{\rm{c}}}}}}}\) represents a threshold function, and p is the input. By equating the spectral responsivity r with the weight vector w, any binary linear classification algorithm can be realized. The specific shape of r depends on the chosen algorithm (perceptron, naïve Bayes, linear discriminant analysis (LDA), support vector machine (SVM), etc.). The threshold function can be implemented in hardware using external electronics connected to the output of the detector. The specific choice of the regression or classification method depends on the characteristics of the data and the problem at hand.
Sensors equipped with signal processing capabilities that allow them to perform advanced and sophisticated functions beyond the basic measurement and detection capabilities of traditional devices are referred to as^{25} intelligent or smart. This is also the case here, as our photodetector is able to detect desired spectral features and disregard others. The calculation according to Eq. (2) is performed on the lowest possible hierarchy level – the physical level of photon detection – and does not require a spectrometer or any further signal processing to analyze the data. The benefits of such an approach are obvious. Reading out a single electrical signal requires less time, resources, and energy than recording and analyzing the entire spectrum. In fact, the energy consumption of the device is merely due to small leakage currents. The power consumption of the device presented below is estimated to be on the order of 10 nW, which represents a significant improvement over conventional solutions that typically consume at least tens of mW (e.g. Hamamatsu minispectrometer C12666A, 30 mW). The data analysis takes place in realtime and is constrained solely by the physics of the process of photocurrent generation. Furthermore, a large number of such detectors can potentially be arranged in a twodimensional (2D) array to realize a smart imaging system that responds only to objects exhibiting a certain spectral signature.
Prototype implementation using a 2D semiconductor
Our physical implementation of a photodetector with programmable spectral response is based on the use of N optical microcavities with equally spaced center frequencies \({\nu }_{{{{{{\rm{i}}}}}}}\), \(i=1\ldots N\). Each cavity contains a metalsemiconductormetal (MSM) photodetector whose response is strongly enhanced at the resonance frequency. The overall responsivity of such a device can be modelled by \(R(\nu )\approx {\sum }_{{{{{{\rm{i}}}}}}=1}^{{{{{{\rm{N}}}}}}}{a}_{{{{{{\rm{i}}}}}}}g(\nu {\nu }_{{{{{{\rm{i}}}}}}})\), where \(g(\nu )\) is a (Gaussian) line shape function originating from the resonator. The parameters \({a}_{{{{{{\rm{i}}}}}}}\) correspond to the peak responsivities of the respective resonator segments and can be controlled by voltages applied to the MSM elements, allowing an approximation to a desired R(ν) as described in the Methods section. The result is shown in Fig. 1d as black line, where an excellent approximation of the desired responsivity is achieved.
Figure 2a depicts the actual device structure based on a chemical vapor deposition (CVD) grown 2D semiconductor film. For details regarding the fabrication process, refer to the Methods section. The N optical resonators are formed by planar FabryPérot microcavities consisting of a highly reflective metallic bottom mirror, a semitransparent metallic top mirror, and Al_{2}O_{3} buffer layers with different thicknesses \({d}_{{{{{{\rm{i}}}}}}}\), \(i=1\ldots N\). The resonance frequencies of the individual segments are given by \({\nu }_{{{{{{\rm{i}}}}}}}={c}_{0}/(2{n}_{{{{{{\rm{Al}}}}}}2{{{{{\rm{O}}}}}}3}{d}_{{{{{{\rm{i}}}}}}})\), where \({c}_{0}\) is the velocity of light in vacuum and \({n}_{{{{{{\rm{Al}}}}}}2{{{{{\rm{O}}}}}}3}\) is the refractive index of Al_{2}O_{3}. Chemical vapor deposition (CVD)grown MoS_{2} MSM photodetectors are embedded between the mirrors. A 2D semiconductor was chosen as the active material because of its excellent optoelectronic properties^{26,27}, ease of integration into an optical cavity^{28,29,30}, and ease of electrical control of its properties using both gate and bias voltages. The source electrodes are connected together to sum the photocurrents generated by each segment, as shown in Fig. 2b. Each of the drain electrodes is supplied by a separate voltage \({V}_{{{{{{\rm{i}}}}}}}\), \(i=1\ldots N\), to set the photoresponsivity of the respective segment. This allows the programming of an arbitrary photoresponsivity vector r. The bottom mirror also serves as a gate electrode to control the carrier concentrations in the MoS_{2} layer (Fig. 2d). A negative gate bias (\({V}_{{{{{{\rm{G}}}}}}}=\)35 V) was applied in all measurements to fully deplete the MoS_{2} channel from carriers and suppress dark current (see Supplementary Fig. 2a). As previously reported^{31,32,33}, the photoresponse of MoS_{2} photodetectors originates from photogating due to a charge transfer into trap states in the MoS_{2} layer itself and/or its surrounding and shows an approximately linear behavior with bias voltage V_{B} as depicted in Fig. 2d, inset. The peak responsivity at \({V}_{{{{{{\rm{G}}}}}}}=\)35 V and \({V}_{{{{{{\rm{B}}}}}}}=1\) V amounts to ~0.5 A/W. Within the investigated intensity range, the photocurrent demonstrates a linear behavior, with no trap state filling observed (see Supplementary Fig. 2b). This observation validates the applicability of the theory presented above, which relies on the assumption of a linear response.
Programmable spectral response and spectroscopy demonstration
In Fig. 2c we present a microscope image of our prototype device consisting of N = 3 segments with nominal cavity lengths of \({d}_{1}=0.12\) μm, \({d}_{2}=0.14\) μm and \({d}_{3}=0.16\) μm. The corresponding reflectance spectra, depicted in Fig. 3a, confirm the resonant absorption at the design wavelengths. Figure 3b shows the photoresponsivities of each of the three segments. Compared to the reflectance spectra, the photocurrent resonances are broadened and slightly blueshifted. The broadening is due to the cavity’s inhomogeneity caused by the metallic contacts with finite height (while the reflectance is obtained from a μmsized spot in the center of the device, the photocurrent is generated over the entire channel, particularly in the vicinity of the contacts where inhomogeneity is strongest), while the blue shift is attributed to the increase in MoS_{2} absorption at smaller wavelengths^{34,35}. One detector segment exhibits an additional spurious resonance at around 620 nm, likely due to device imperfections and absorption enhancement from the Bexciton resonance. In practice, however, the additional resonance does not significantly affect the functionality of the sensor as it can be compensated by the other two detector segments.
Despite consisting of only three wavelength selective elements, our prototype MoS_{2} photodetector exhibits a certain degree of versatility and can be effectively used in diverse spectroscopy applications within the visible regime. For instance, as shown in the first three graphs of Fig. 4a, the device can potentially approximate the emission spectra of widelyused fluorescent dyes that function as tracers in biology and medicine. The shaded areas in the graphs represent the targeted spectra, while the lines depict the spectral responsivities that can be set through the specific combination and tuning of the three elements. Furthermore, the remaining graphs in Fig. 4a demonstrate the device’s versatility by showcasing the approximation of several generic spectra, some of which exhibit negative response.
Our current device realization is limited by the large bandgap of MoS_{2}, which restricts its response to wavelengths below ~700 nm. Using graphene in place of MoS_{2} could expand the device’s response to longer wavelengths, particularly into the spectroscopically important infrared region^{36,37}. The number of resonators required for optimal performance depends on the field of application. For fluorescence spectroscopy of biological samples, for example, we estimate that a device with about ten wavelengthselective elements (e.g., resonators) would be versatile enough to fully cover the visible spectral range (380–700 nm), considering that the dyes used in this type of application have spectral linewidths that are typically greater than 30 nm (see also Fig. 4a).
To experimentally verify the smart sensing capabilities of our photodetector, we used a white light source along with a set of optical transmission filters to generate spectra \({{{{{{\bf{u}}}}}}}_{1}\), \({{{{{{\bf{u}}}}}}}_{2}\) and p, as shown in Fig. 4b. The intensities of \({{{{{{\bf{u}}}}}}}_{1}\) and \({{{{{{\bf{u}}}}}}}_{2}\) were independently adjusted as described in the Methods section. The spectral response r required to detect the contribution of \({{{{{{\bf{u}}}}}}}_{2}\) and simultaneously cancel \({{{{{{\bf{u}}}}}}}_{1}\) was determined from Eq. (2) and is plotted as black line in Fig. 4c. By scaling the segment responsivities with the factors \({a}_{1}=0.88\), \({a}_{2}=0.0\) and \({a}_{3}=1.0\), we can approximately set the desired spectral response in our device (red line in Fig. 4c). Experimentally, this is achieved by applying bias voltages of \({V}_{{{{{{\rm{B}}}}}}1}=0.7\) V, \({V}_{{{{{{\rm{B}}}}}}2}=0.0\) V and \({V}_{{{{{{\rm{B}}}}}}3}=1.0\) V. If we vary now the intensity of \({{{{{{\bf{u}}}}}}}_{2}\) while keeping \({{{{{{\bf{u}}}}}}}_{1}\) constant, the photocurrent \({I}_{{{{{{\rm{ph}}}}}}}\) increases linearly with optical power as expected (Fig. 4d). On the other hand, if we vary \({{{{{{\bf{u}}}}}}}_{1}\) while keeping \({{{{{{\bf{u}}}}}}}_{2}\) constant, no change in output is observed (Fig. 4e). The photocurrent stems solely from the spectral contribution \({{{{{{\bf{u}}}}}}}_{2}\).
Discussion
In summary, we presented a spectroscopy scheme in which the spectral response of a photodetector is programmed such that the device is able to perform a specific regression or classification task. We used a prototype consisting of three resonant cavityenhanced MoS_{2} photodetectors with individually adjustable peak responsivities to determine the fraction of a component in a spectral mixture. The underlying concept can be applied to any spectroscopic algorithm that can be represented by a linear operator. The current limitations of the device, such as the limited spectral range and deviations from Gaussian spectral line shapes due to the large bandgap of MoS_{2} and its strongly wavelengthdependent absorption spectrum, respectively, can be overcome, for example, by using graphene as the active photodetection material.
In addition to cavityenhanced devices, there are several other physical mechanisms that enable a wavelengthdependent photoresponse. One such mechanism involves utilizing plasmonic resonances. By engineering the geometry and composition of nanostructures, it is possible to achieve strong interactions with specific wavelengths of light, thereby enhancing the photoresponse at those wavelengths^{38}. Another avenue for achieving a wavelengthdependent photoresponse is through the use of materials with inherent wavelengthdependent properties. For example, organic semiconductors and perovskite materials can be tailored to have specific energy band gaps, allowing them to selectively absorb and generate charge carriers in response to different wavelengths of light^{39,40}. By harnessing these physical mechanisms, it should be possible to realize photodetectors with a tailored wavelengthdependent photoresponse.
Finally, our concept is not limited to spectroscopy alone, but can in the future also be applied to smart imaging systems. Current hyperspectral imagers^{41} consist of an array of photosensors and a spectrometer. Both the spectral and spatial domains are combined to form a multidimensional data set that, after data processing, is often reduced to a single number representation per pixel, such as the concentration of a particular chemical compound in a 2D map. The devices are bulky, their price is currently prohibitive for costeffective routine applications, and their size prevents their use in modern portable/wearable devices. To overcome these drawbacks, we propose to process multispectral information in a 2D array of smart detectors, presented here. Such an image sensor in combination with a tailored algorithm can provide spatially resolved information for a specific measure with high speed, low energy consumption and high sensitivity. With its ability to provide realtime analysis and interpretation of spectroscopic signals, it has the potential to be applied in a wide range of industries and scientific fields, from industrial process control to medical diagnostics.
Methods
Spectral mixture analysis
Consider a mixture of m spectrally distinct components, represented by their respective spectra \({{{{{{\bf{u}}}}}}}_{{{{{{\rm{i}}}}}}}\in {{\mathbb{R}}}^{n}\), and let \({{{{{\bf{p}}}}}}\in {{\mathbb{R}}}^{n}\) be a linear combination of these spectra with coefficients \({\alpha }_{{{{{{\rm{i}}}}}}}{\mathbb{\in }}{\mathbb{R}}\),
To obtain a linear operator for a specific component of interest, say \({{{{{{\bf{u}}}}}}}_{{{{{{\rm{m}}}}}}}\), it is necessary to eliminate the effects of interfering signatures represented by the columns of matrix \({{{{{\bf{U}}}}}}\), given by \({{{{{\bf{U}}}}}}{{{{{\boldsymbol{=}}}}}}\left({{{{{{\bf{u}}}}}}}_{1}{{{{{{\bf{u}}}}}}}_{2}\cdots {{{{{{\bf{u}}}}}}}_{{{{{{\rm{m}}}}}}1}\right)\). This can be done by projecting p onto a subspace that is orthogonal to the columns of U, resulting in a vector that contains energy only associated with \({{{{{{\bf{u}}}}}}}_{{{{{{\rm{m}}}}}}}\) and Gaussian noise \({{{{{\mathscr{N}}}}}}(0,{\sigma }_{{{{{{\rm{n}}}}}}}^{2})\). Therefore, we first apply the orthogonal subspace projection (OSP) operator^{22}
where \({{{{{{\bf{U}}}}}}}^{+}\) is the pseudoinverse of U, given by \({{{{{{\bf{U}}}}}}}^{+}{{{{{\boldsymbol{=}}}}}}{({{{{{{\bf{U}}}}}}}^{{{{{{\rm{T}}}}}}}{{{{{\bf{U}}}}}})}^{1}{{{{{{\bf{U}}}}}}}^{{{{{{\rm{T}}}}}}}\), and I is the identity matrix. We then apply the operator \({{{{{{\boldsymbol{\xi }}}}}}}^{{{{{{\rm{T}}}}}}}\) that maximizes the signaltonoiseratio
As shown in ref. ^{22}, the operator that maximizes this quotient is \({{{{{{\boldsymbol{\xi }}}}}}}^{{{{{{\rm{T}}}}}}}{{{{{\boldsymbol{=}}}}}}\kappa {{{{{{\bf{u}}}}}}}_{{{{{{\rm{m}}}}}}}^{{{{{{\rm{T}}}}}}}\), with κ being an arbitrary proportionality factor. Altogether, this leads to the regression vector \({{{{{{\boldsymbol{\xi }}}}}}}^{{{{{{\rm{T}}}}}}}{{{{{{\bf{P}}}}}}}_{{{{{{\boldsymbol{\perp }}}}}}}\), and after substitution for \({{{{{{\boldsymbol{\xi }}}}}}}^{{{{{{\rm{T}}}}}}}\) and \({{{{{{\bf{P}}}}}}}_{{{{{{\boldsymbol{\perp }}}}}}}\), we ultimately arrive at Eq. (3).
Approximation to R(ν)
The parameters \({a}_{{{{{{\rm{i}}}}}}}\) required to approximate a desired R(ν) through a sum of shifted Gaussians \({\sum }_{{{{{{\rm{i}}}}}}=1}^{{{{{{\rm{N}}}}}}}{a}_{{{{{{\rm{i}}}}}}}g(\nu {\nu }_{{{{{{\rm{i}}}}}}})\) can be determined from the linear system Ga = r, where \({{{{{\bf{r}}}}}}={\left(R({\nu }_{1}),\ldots,R({\nu }_{{{{{{\rm{N}}}}}}})\right)}^{{{{{{\rm{T}}}}}}}\) is a vector containing the desired responsivity values at the support points \({\nu }_{{{{{{\rm{i}}}}}}}\) as calculated from Eq. (3), \({{{{{\bf{G}}}}}}=\left({g}_{{{{{{\rm{ki}}}}}}}\right)\in {{\mathbb{R}}}^{{{{{{\rm{N}}}}}}\times {{{{{\rm{N}}}}}}}\) is a matrix with elements \({g}_{{{{{{\rm{ki}}}}}}}={(\sqrt{2\pi }{{{{{\rm{\sigma }}}}}})}^{1}\exp (0.5{\left({\nu }_{{{{{{\rm{k}}}}}}}{\nu }_{{{{{{\rm{i}}}}}}}\right)}^{2}/{{{{{{\rm{\sigma }}}}}}}^{2})\) and \({{{{{\bf{a}}}}}}={\left({a}_{1},\ldots,{a}_{{{{{{\rm{N}}}}}}}\right)}^{{{{{{\rm{T}}}}}}}\).
Device fabrication
The cavity in the resonant photodetectors is formed by silver mirrors separated from the CVDgrown MoS_{2} film by aluminium oxide (Al_{2}O_{3}) layers. The sample was fabricated by the following procedure. All lithography steps were performed by electronbeam lithography using a Raith eLINE system and Allresist PMMA 679.004. The metal deposition was carried out in a Plassys MEB550SL electronbeam evaporation system at a pressure of 3–5 × 10^{−8} mbar. The fabrication starts with the patterning of the Ti/Au gate pads with the subsequent patterning of the bottom resonator mirror, made out of 100 nm thick silver. An 80nmthick Al_{2}O_{3} gate oxide was then deposited using atomic layer deposition. A MoS_{2} film was grown by CVD on sapphire^{42} and then transferred onto the target wafer^{43}. The grown film is continuous over an area of >50 mm^{2} with monolayer thickness and small multilayer MoS_{2} islands. In the next step, rectangular MoS_{2} channels were patterned and subsequently etched using Ar/SF6 plasma. The drain and source contacts were then formed by another EBL process followed by Ti/Au (3/30 nm) deposition. Additional patches were added on the edges of the bottom metal mirror and contact pads to assure the integrity of the electrical contact. The channels were then covered by 80nmthick Al_{2}O_{3} gate oxide which was subsequently etched by wet chemical etching in potassium hydroxide at specific places to achieve the resonators with desired cavity lengths. In the next step, the semitransparent upper resonator mirror was patterned and evaporated using nominally 30 nm of silver and 2 nm of aluminium which serves as a passivation layer to protect silver from oxidation. Finally, the oxide on the contact pads was etched to open the contact pads for wire bonding.
Experimental setup
The optical measurements were carried out with an optical setup, consisting of two beam paths with two different light sources and a lens to focus the light onto the device. Measurements were performed using either an NKT SuperK compact source with an acoustooptic tuneable filter for acquiring the wavelengthdependent photoresponsivities or a whitelight source OSL1 from Thorlabs with a broad spectrum in the visible range. To generate light with optical spectrum p, we split the OSL1 output into two paths using a beam splitter, employed filters from Edmund Optics (46543) and Thorlabs (FL632.83) in both paths to create the two spectra \({{{{{{\bf{u}}}}}}}_{1}\) and \({{{{{{\bf{u}}}}}}}_{2}\), respectively, and recombined the outputs in a second beam splitter. Note that limiting the experiment to only two spectra does not result in any loss of generality. Continuously tuneable neutral density filters with transparency varying from 0.04 to 2.0 OD were used in both paths to individually adjust the \({\alpha }_{1}\) and \({\alpha }_{2}\) contributions. Keithley 2612B source measurement units were used to set the bias voltages and record the photocurrent. Prior to the optical measurements, the electrical performance of the device was verified in a Lakeshore TTPX sample station connected to an Agilent HP 4155 C semiconductor parameter analyzer.
Data availability
The data that support the findings of this study are available from the corresponding author upon request.
Code availability
The code and algorithm in this paper are available from the corresponding author upon request.
References
Zhou, F. & Chai, Y. Nearsensor and insensor computing. Nat. Electron. 3, 664–671 (2020).
Yuan, S. et al. Geometric deep optical sensing. Science 379, eade1220 (2023).
Mennel, L. et al. Ultrafast machine vision with 2D material neural network image sensors. Nature 579, 62–66 (2020).
Ahmed, T. et al. Fully light‐controlled memory and neuromorphic computation in layered black phosphorus. Adv. Mater. 33, 2004207 (2021).
Jang, H. et al. An atomically thin optoelectronic machine vision processor. Adv. Mater. 32, 2002431 (2020).
Wang, C.Y. et al. Gatetunable van der Waals heterostructure for reconfigurable neural network vision sensor. Sci. Adv. 6, eaba6173 (2020).
Zhang, Z. et al. Allinone twodimensional retinomorphic hardware device for motion detection and recognition. Nat. Nanotechnol. 17, 27–32 (2022).
Lee, S., Peng, R., Wu, C. & Li, M. Programmable black phosphorus image sensor for broadband optoelectronic edge computing. Nat. Commun. 13, 1485 (2022).
Mennel, L. et al. A photosensor employing datadriven binning for ultrafast image recognition. Sci. Rep. 12, 14441 (2022).
Dodda, A. et al. Active pixel sensor matrix based on monolayer MoS_{2} phototransistor array. Nat. Mater. (2022).
Yang, Z., AlbrowOwen, T., Cai, W. & Hasan, T. Miniaturization of optical spectrometers. Science 371, eabe0722 (2021).
Pervez, N. K. et al. Photonic crystal spectrometer. Opt. Express 18, 8277–8285 (2010).
Tittl, A. et al. Imagingbased molecular barcoding with pixelated dielectric metasurfaces. Science 360, 1105–1109 (2018).
Bao, J. & Bawendi, M. G. A colloidal quantum dot spectrometer. Nature 523, 67–70 (2015).
Yang, Z. et al. Singlenanowire spectrometers. Science 365, 1017–1020 (2019).
Yuan, S., Naveh, D., Watanabe, K., Taniguchi, T. & Xia, F. A wavelengthscale black phosphorus spectrometer. Nat. Photon. 15, 601–607 (2021).
Hakkel, K. D. et al. Integrated nearinfrared spectral sensing. Nat. Commun. 13, 103 (2022).
Yoon, H. H. et al. Miniaturized spectrometers with a tunable van der Waals junction. Science 378, 296–299 (2022).
Huang, E., Ma, Q. & Liu, Z. Etalon array reconstructive spectrometry. Sci. Rep. 7, 40693 (2016).
Deng, W. et al. Electrically tunable twodimensional heterojunctions for miniaturized nearinfrared spectrometers. Nat. Commun. 13, 4627 (2022).
Nelson, M. P., Aust, J. F., Dobrowolski, J. A., Verly, P. G. & Myrick, M. L. Multivariate optical computation for predictive spectroscopy. Anal. Chem. 70, 73–82 (1998).
Harsanyi, J. C. & Chang, C.I. Hyperspectral image classification and dimensionality reduction: An orthogonal subspace projection approach. IEEE Trans. Geosci. Remote Sens. 32, 779–785 (1994).
Keshava, N. & Mustard, J. F. Spectral unmixing. IEEE Signal Process. Mag. 19, 44–57 (2002).
Quintano, C. et al. Spectral unmixing. Int. J. Remote Sens 33, 5307–5340 (2012).
Yamasaki, H. What are the intelligent sensors. in Handbook of sensors and actuators, Vol. 3, pp. 1–17 (Elsevier Science BV, 1996).
Manzeli, S., Ovchinnikov, D., Pasquier, D., Yazyev, O. V. & Kis, A. 2D transition metal dichalcogenides. Nat. Rev. Mater. 2, 17033 (2017).
Mueller, T. & Malic, E. Exciton physics and device application of twodimensional transition metal dichalcogenide semiconductors. npj 2D Mater. Appl 2, 29 (2018).
Furchi, M. et al. Microcavityintegrated graphene photodetector. Nano Lett. 12, 2773–2777 (2012).
Liu, X. et al. Strong light–matter coupling in twodimensional atomic crystals. Nat. Photon. 9, 30–34 (2015).
Sun, Z. et al. Optical control of roomtemperature valley polaritons. Nat. Photon. 11, 491–496 (2017).
Furchi, M. et al. Mechanisms of photoconductivity in atomically thin MoS_{2}. Nano Lett. 14, 6165–6170 (2014).
Kufer, D. & Konstantatos, G. Highly sensitive, encapsulated MoS_{2} photodetector with gate controllable gain and speed. Nano Lett. 15, 7307–7313 (2015).
LopezSanchez, O. et al. Ultrasensitive photodetectors based on monolayer MoS_{2}. Nat. Nanotechnol. 8, 497–501 (2013).
Zhang, C., Wang, H., Chan, W., Manolatou, C. & Rana, F. Absorption of light by excitons and trions in monolayers of metal dichalcogenide MoS_{2}: Experiments and theory. Phys. Rev. B 89, 205436 (2014).
CastellanosGomez, A. et al. Spatially resolved optical absorption spectroscopy of singleand fewlayer MoS_{2} by hyperspectral imaging. Nanotechnology 27, 115705 (2016).
Sassi, U. et al. Graphenebased midinfrared roomtemperature pyroelectric bolometers with ultrahigh temperature coefficient of resistance. Nat. Commun. 8, 14311 (2017).
Yao, Y. et al. Highresponsivity midinfrared graphene detectors with antennaenhanced photocarrier generation and collection. Nano Lett. 14, 3749–3754 (2014).
Mischok, A. et al. Controlling Tamm plasmons for organic narrowband nearinfrared photodetectors. ACS Photonics 4, 2228–2234 (2017).
Vanderspikken, J., Maes, W. & Vandewal, K. Wavelengthselective organic photodetectors. Adv. Funct. Mater. 31, 2104060 (2021).
Wu, W. et al. Recent progress on wavelengthselective perovskite photodetectors for image sensing. Small Methods 7, 2201499 (2023).
Hyperspectral imaging for food quality analysis and control. (Elsevier, 2010).
Dumcenco, D. et al. Largearea epitaxial monolayer MoS_{2}. ACS Nano 9, 4611–4620 (2015).
Alper, G. et al. Surfaceenergyassisted perfect transfer of centimeterscale monolayer and fewlayer MoS_{2} films onto arbitrary substrates. ACS Nano 8, 11522–11528 (2014).
Acknowledgements
We thank Juraj Darmo for technical assistance and acknowledge financial support by the European Union (grant agreement No. 785219 Graphene Flagship).
Author information
Authors and Affiliations
Contributions
T.M. conceived the device concept and supervised the project. D.K. and D.K.P. fabricated the device, built the experimental setup, carried out the measurements and analyzed the data. T.M. and D.K.P. prepared the manuscript. All authors discussed the results and commented on the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature Communications thanks Zongyin Yang and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. A peer review file is available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Kwak, D., Polyushkin, D.K. & Mueller, T. Insensor computing using a MoS_{2} photodetector with programmable spectral responsivity. Nat Commun 14, 4264 (2023). https://doi.org/10.1038/s4146702340055w
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s4146702340055w
This article is cited by

Bioinspired insensor spectral adaptation for perceiving spectrally distinctive features
Nature Electronics (2024)

Photophysical properties of materials for highspeed photodetection
Nature Reviews Physics (2024)
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.