Cascaded, self-calibrated, single-pixel mid-infrared Hadamard transform spectrometer

In this paper, a single-pixel mid-infrared (mid-IR) Hadamard transform spectrometer is developed. The spectrometer’s design, fabrication and experimental results are discussed. The single-pixel mid-IR Hadamard transform spectrometer has dual cascaded encoding regions, 2875 nm to 3500 nm and 3500 nm to 4077 nm, to reduce the travel range required by the moving mask. The encoded wavelength band is determined by the bandpass filter used. A collection optics consisting of a reverse spectrometer is used to collect the encoded signal onto a single-pixel detector with a small sensing area. A 635 nm laser is used as a reference within the spectrometer to calibrate the recovered spectrum with accurate positioning. Our experiments demonstrate that mid-IR spectrums can be accurately recovered in the designed wavelength range. The proposed spectrometer, with dimensions of 200 mm × 200 mm × 84 mm and a weight of 1.8 kg, can be made portable and at low cost, suitable for IR spectroscopy in the field. © 2021 Optical Society of America under the terms of the OSA Open Access Publishing Agreement


Introduction
The mid-infrared (mid-IR) wavelength range, ranging from 2.5 µm to 25 µm, is very useful in infrared (IR) spectroscopy due to its ability to uniquely identify compounds [1]. It can be subdivided into the group frequency region (2.5 µm to 6.9 µm) and the fingerprint region (6.9 µm to 25 µm) [2]. Many diatomic molecules have absorption bands in the group frequency region arising from stretching vibrations, while the fingerprint region contains numerous complex and therefore unique peaks because of the mix of bending vibrations and stretching vibrations. As such, mid-IR spectroscopy has seen wide applications in different fields including environmental monitoring [3], pharmaceutics [4], polymer identification [5], food processing [6] and agriculture [7], among others.
The desire to build a portable mid-IR spectrometer for field uses is hindered by various obstacles. The Fourier transform infrared (FTIR) spectrometer, usually constructed based on a Michelson interferometer design, is a staple in laboratories owing to its broad wavelength sensing range and high resolution [8]. However, it is expensive and challenging to be miniaturized for field uses [9]. The traditional dispersive spectrometer has good performance at a low cost in the visible to near-IR wavelength range (0.4 µm to 1 µm) by virtue of the well-researched and well-developed silicon-based array detector, which has very efficient photon-to-electron conversion in this spectral region. Further in the IR region, however, silicon is blind, and array detectors in IR dispersive spectrometers would require non-silicon-based technologies, such as PbSe, InSb and HgCdTe for the mid-IR wavelengths [10,11]. These array detectors are bulky, expensive, and suffer from poor performance, making them an unappealing option for a portable mid-IR spectrometer as well. Laser-based mid-IR spectroscopic devices have also been demonstrated in literature, but the cost of such systems is exorbitant due to the use of IR lasers [12][13][14].
The Hadamard transform spectrometer is a potential solution to the above issues [15]. Like a FTIR spectrometer, it possesses Fellgett's advantage, which uses multiplexing to boost the signal-to-noise ratio (SNR) [16]. Fellgett's advantage can be achieved in a Hadamard transform spectrometer by using a moving mask to generate a cyclic S-matrix pattern on the spectral plane. The pixels on the pattern can allow or block light from being transmitted to the single-pixel detector. This enables the single-pixel detector to measure multiple wavelengths simultaneously in each reading, improving the SNR. A Hadamard transform spectrometer can take on the optical design of a dispersive spectrometer which makes it relatively robust and cost-effective. Thus, it is a suitable candidate for a portable mid-IR spectrometer.
However, since it is necessary for the cyclic S-matrix encoding mask to move the distance of the dispersed spectrum for a complete encoding, a more dispersed spectrum would require a larger and more costly motor, increasing the cost and dimensions of the system. Furthermore, the position of the mask is required during its movement to recover the spectrum with accurate position. This typically requires an expensive motor stage with positioning control.
In this paper, we propose a new design of Hadamard transform spectrometer. Its encoding range is split into two to reduce the travel range of the mask while preserving the spectral resolution. A reversed spectrometer consisting of an additional set of spherical mirror and grating is used to collect the large dispersion on the mask onto a small detector area. This enables the use of a single-pixel detector with smaller active area which has lower dark current and allows for higher SNR without sacrificing the spectral resolution. Additionally, a novel self-calibration method is implemented with a visible laser to aid the spectrum recovery. These improvements can reduce the size of the motor required to actuate the mask and realize accurate positioning of the spectrum at a low cost. Since the system uses a single-pixel detector in conjunction with a multiplexing encoding scheme, the SNR is increased, improving the performance of an IR spectrometer where array detectors are weak, bulky and expensive. Thus, an IR Hadamard transform spectrometer can be more cost-effective and more compact (and thus more portable), with good performance.

System design
The system is designed to operate in a cascaded manner within the 2875 nm to 4077 nm wavelength range, as this is a section in the group frequency region where stretching vibrations for C-H bond occur [2]. C-H bonds are prevalent in most organic compounds and thus, this range is useful in the identification of compounds such as polymers and gases. The optical design is conducted in Zemax OpticStudio. A layout of the proposed single-pixel mid-IR spectrometer is illustrated in Fig. 1, with the key optical parameters listed in Table 1. Light from a mid-IR source passes through the selected bandpass filter, allowing only the desired wavelength band to enter the fore-optics. The fore-optics uses germanium lenses to collimate and focus the incoming mid-IR light. It is combined with a 635 nm laser (Changchun New Industries PGL-VI-635) using a germanium window. A set of CaF 2 lenses are used to further focus the mid-IR light and the 635 nm laser beam onto the entrance slit for higher optical efficiency. Light that passes through the entrance slit is dispersed onto an encoding mask by the spectrometer. The encoding spectrometer is designed based on the Ebert spectrometer and further optimized by varying the conic constant of the curved surface to reduce the spot width in the direction of dispersion. The resultant full-field spot diagram on the encoding mask is shown in Fig. 2. The maximum spot width is 100 µm with a corresponding slit width of 50 µm. The 635 nm laser is used to calibrate the position of the recovered results. Its 5 th order and 6 th order dispersion share the same location on the mask with the 3175 nm and 3810 nm positions, respectively. This calibration mechanism will be elaborated on subsequently. Beyond the mask, the encoded signal is undispersed by a reversed spectrometer in the collection optics as light within the allowed encoding range is too large to be focused onto a single-pixel detector with just a few lenses. As aberration control is not required in the collection optics, a spherical mirror is used instead. A large dispersion and thus higher spectral resolution can be achieved, while still being able to collect the signal in a single-pixel detector with a small active area. A smaller detector sensing area has the benefit of lower dark current which leads to higher SNR. The undispersed signal is once again split by a germanium window to allow the encoded mid-IR light and the 635 nm laser to be collected by their corresponding single-pixel detectors (Hamamatsu P13243-122MS InAsSb photovoltaic detector and Hamamatsu S12698-04 Si photodiode).   The encoding spectrometer is based on Hadamard transform and the encoding mask utilizes a cyclic S-matrix sequence of order 103, with each pixel width being 110 µm. As such, the designed spectral resolution is approximately 6 nm. The S-matrix consists of a sequence of '1' and '0'. The '1' encoding pixels on the mask allow light upon those pixels to pass through it, while the '0' encoding pixels on the mask block light upon those pixels from being transmitted through it. The cyclic S-matrix and pattern for the position sensor is illustrated in Fig. 3. The designed wavelength range of 2875 nm to 4077 nm is split into two cascaded bands: 2875 nm to 3500 nm and 3500 nm to 4077 nm. Each band covers 103 pixels with the same set of cyclic S-matrix pattern, sharing a pixel at 3500 nm. An additional set of the same pattern is required beyond the pixel at 4077 nm to encode the 3500 nm to 4077 nm band. Implementing a cascaded encoding scheme allows us to reduce the travel range of the mask, allowing for a smaller and less costly motor to actuate it. The minimum required travel range in our design is 11220 µm, roughly half of that required if both bands were encoded in one go. The 5 th order and 6 th order of the 635 nm laser is also encoded in the same way, with the 5 th order superimposed on 3175 nm acting as the calibration for the 2875 nm to 3500 nm band and the 6 th order superimposed on 3810 nm acting as the calibration for the 3500 nm to 4077 nm band. We use bandpass filters from Thorlabs (FB3250-500 and FB3750-500) in our demonstration. To encode one band, a bandpass filter of the desired range is first placed in front of the entrance to the spectrometer fore-optics using a component mount so that it is easily accessible to be swapped manually. A moveable block located in front of the mask is then manually shifted through a small opening in the top cover of the spectrometer to prevent the 635 nm laser located on the other band from passing through the mask. Both the mid-IR band of choice and the 635 nm laser is then encoded simultaneously. This process is then repeated for the next band after swapping the bandpass filter and shifting the moveable block. It should be noted that even though the switching of the bandpass filters and the shifting of the moveable block is manual in our prototype, these processes can easily be motorized and integrated into the system to automatically obtain the spectrums for both bands. It should also be noted that since the encoding pattern is cyclic, the encoding wavelength bands described can be freely altered based on the available bandpass filters, provided the band is restricted to a maximum of 103 pixels within the designed wavelength range of 2875 nm to 4077 nm and includes one of the orders of the 635 nm laser for calibration.
A set of pattern for the position sensor lies above the cyclic S-matrix encoding pattern. This set of pattern is a simple set of repeated opaque and transparent pixels, with each pixel width being 220 µm, double the width of an S-matrix encoding pixel. The start and end of the pattern for the position sensor lies exactly above the start and end of the full S-matrix encoding pattern, but not the entire row of pixels is required. Only a minimum of 52 pixels of the pattern is required to cover at least 103 S-matrix encoding steps. The pattern for the position sensor works with a low-cost encoder module (Hamamatsu P11159-201AS). It produces a two-phase digital signal output that matches the movement of the pattern, allowing us to retrieve the encoding position during the mask movement. The working mechanism of the encoder module is described in Fig. 4. Both the mid-IR spectrum and the 635 nm laser are recovered by inverse Hadamard transform. At the n th encoding position (n = 1, 2, . . . , N), the measured total intensity M(n) at each of the two single-pixel detector is: where S n is the weight of the S-matrix encoding at the n th encoding pattern, and I(j) is the wavelength intensity at the j th pixel. Thus, the above equation can be simplified as: where S is the encoding cyclic S-matrix, M is the measurement matrix, and I is the spectrum of interest. Therefore, the spectrum I can be recovered by: where S −1 is the inverse matrix of S. A total of 103 measurements are recorded in each encoding process. A recovery of the 635 nm laser is conducted first, with the first sequence of matrix S being the first sequence of the 103 S-matrix. Since the motor used does not come with positioning information, we do not know whether the first encoded measurement of the tested wavelength range corresponds exactly with the first sequence of the 103 S-matrix. Thus, the preliminary recovery of the 635 nm laser will allow us to determine the sequence offset. From optical simulations, we find that the 5 th order of the 635 nm laser corresponds to pixel number 49 (also the 3175 nm position). If the initial recovered result shows the 635 nm laser peak at pixel number 52, we know that the sequence offset for S must be 3, and that S must be cyclically shifted forward by 3 positions. Since the laser and the mid-IR spectrum are encoded simultaneously, the sequence offset must apply to the recovery of the mid-IR spectrum as well. Thus, we use the offset cyclic S-matrix to recover a positionally accurate mid-IR spectrum. To further elaborate, we take an S-matrix of order 7 as an example. The equation used in an initial recovery is given as follows: The recovered spectrum shows the 635 nm laser peak at the sixth position, but from optical simulation, we know that the recovered 635 nm laser is supposed to fall on the fourth position. As such, the cyclic S-matrix needs to be offset by two positions for both the 635 nm laser recovery and the mid-IR spectrum recovery, becoming: The offset will allow us to obtain the 635 nm laser back in the fourth position as it should be. The altered cyclic S-matrix is then used to recover the positionally accurate mid-IR spectrum. Therefore, this spectrometer is self-calibrated, whereby it uses the 635 nm laser to figure out the starting position of the moving mask and thus the first sequence in S, which is then used to obtain the mid-IR spectrum with accurate positioning.

Experimental setup
Mechanical design for the system is done in SolidWorks. Figures 5 and 6 present a 3D model and a picture of the system. Its dimensions are 200 mm × 200 mm × 84 mm and weighs 1.8 kg, making it rather compact. The component holders were fabricated by precision machining and blackened to reduce stray light. The reflective optical surfaces were additionally diamond turned to obtain the required surface parameters and finish. They are then coated with gold for higher reflectivity in the mid-IR range. These components are aligned by dowel pins on the baseboard and tightened with screws. A picture of one of the gold-coated optical surfaces is shown in Fig. 7. The slit and mask are fabricated on 0.5 mm thick aluminum oxide wafers, as pictured in Fig. 8. They are fabricated by first coating a layer of aluminum on the wafer, then laser cut to obtain the desired patterns. In Fig. 8(a), the entrance slit size is 50 µm × 1 mm, with six identical slits above and below the entrance slit. The six slits are used as alignment marks. The 635 nm laser illuminating the slits will form an astigmatic image on the alignment marks on the encoding mask ( Fig. 8(b)), allowing us to ensure that the encoding mask is properly aligned and not tilted. After the alignment process, the six slits are covered up with black tape.
A beam structure was designed to ensure the stable movement of the mask. The parameters of the beam structure are shown in Fig. 9(a) and the finite element analysis conducted in Ansys is shown in Fig. 9(b). It has a maximum travel range of 13 mm.
The beam structure was fabricated by wire cutting of brass. The mask is attached to a holder, then mounted onto the beam structure, as shown in Fig. 10(b). It is actuated by a low-cost linear motor (VS-19 Pico Linear Servo) ( Fig. 10(a)). The motor is attached to the beam structure from the underside of the baseboard, as such four legs are required to lift the system off the ground.

Experimental results
We first test the accuracy of the 635 nm laser self-calibration and the spectrometer resolution using a mid-IR laser. The mid-IR laser (Daylight Solutions MIRcat-QT) can be tuned from 3630 nm to 4000 nm at 1 nm interval. All results in this section obtained by our spectrometer are spectrums obtained in a single scan without averaging. As each scan is rather quick, taking around two seconds, more scans can be obtained and averaged in a measurement to improve the results. Some mid-IR laser results are displayed in Fig. 11. From our tests, we are able to confirm the accuracy of the 635 nm laser calibration, as it manages to shift the mid-IR laser peak to the correct location on the spectrum, corresponding to the mid-IR laser output wavelength. Figure 11(d) to 11(f) demonstrates the resolution of our spectrometer. Comparing two adjacent peaks, we gauge that the full-width at half-maximum (FWHM) spectral resolution is around 10 nm. This is expectedly poorer than our designed resolution of 6 nm due to the increased optical aberrations from manual alignment of components in the spectrometer.
Additionally, we characterize the SNR of the spectrometer with the 3698 nm laser spectrum ( Fig. 11(a)). In this case, the expected spectrum is a single-wavelength laser peak, and thus the root mean square (RMS) between the expected spectrum, x i , and the reconstructed spectrum, xˆi, can be used to quantify the level of reconstruction noise, N RMS , as follows [17]: where n is the number of data points in the measurement. The RMS value of the reconstruction noise at 3698 nm is calculated as 0.21, and the highest intensity, x max , of this spectrum is around 2.08. Then, its SNR is quantified in decibels as follows: Thus, the SNR of the spectrometer is estimated at around 10 dB. The SNR is not high, mostly because of the detector noise. In our prototype, we use an off-the-shelf preamplifier that does not seem to be fully compatible with the detector. Hence, we believe that the detector noise can be greatly reduced with custom preamplifier design, which should significantly improve the performance of our proposed spectrometer. We then use a silicon carbide lamp with a parabolic reflector (Boston Electronics IR-Si207) as the IR light source for further testing. The lamp was placed about 15 cm from the entrance of the spectrometer. The 3000 nm to 3500 nm bandpass filter (Thorlabs FB3250-500) was tested first with the 5 th order of the 635 nm laser for calibration, followed by the 3500 nm to 4000 nm bandpass filter (Thorlabs FB3750-500) with the 6 th order of the 635 nm laser for calibration. Based on optical simulation, the 5 th order and 6 th order of the 635 nm laser, which superimposes on 3175 nm and 3810 nm, should fall on pixel number 49 and 55, respectively. The recovered mid-IR spectrums of the lamp and their corresponding 635 nm laser calibration results are shown in Fig. 12. The ends of the blackbody spectrums in Fig. 12(b) and (d) do not show a sharp rise and fall as the transmission of the bandpass filters used have a gradual rise and fall at their respective edge wavelengths.
Some plastic samples were also tested. Since most polymers have absorption peaks around 3500 nm, we use a 3200 nm to 3800 nm bandpass filter (Thorlabs FB3500-500) and the 6 th order of the 635 nm laser for calibration. This is possible because this range is within 103 cyclic S-matrix pixels and can thus be encoded properly as well. The reference spectrum of the lamp is recorded first. The samples are then individually placed between the lamp and the entrance of the spectrometer and tested, as shown in Fig. 13. The plastic samples tested include cling wrap, Ziploc, a glove and a sheet of plastic. From the transmission spectrum of the sample and the  spectrum of the lamp, we can obtain the absorption spectrum using the following equation: where A and T are the absorption spectrum and transmission spectrum of the sample, respectively, and R is the reference transmission spectrum of the lamp.
To verify the absorption spectrums obtained, the plastic samples were also tested with a FTIR spectrometer (Agilent Cary 620 FTIR Microscope). It takes about 20 seconds for the FTIR spectrometer to complete a measurement consisting of 16 scans, with a spectral resolution of 4 cm −1 . Meanwhile, since our spectrometer takes about two seconds for a single scan, more scans can be conducted to average the spectrum for better results. The mid-IR absorption spectrums of the plastic samples taken by the FTIR spectrometer and our spectrometer are displayed in Fig. 14. We can see that the results obtained by our mid-IR spectrometer matches those taken by the FTIR spectrometer, even though the absorption peaks of the plastic sheet and Ziploc may not be distinct. This is likely because the transmission between the two peaks of both plastics have already dropped close to zero, resulting in the absorption spectrum also having a flat top. This can be improved by a better fore-optics design to increase the light collection efficiency into our spectrometer.  Further testing was done with gases using a gas cell with 30 cm path length. The experimental setup for gas testing is shown in Fig. 15. The distance between the lamp and spectrometer is larger than before, resulting in less light input to the spectrometer. As such, we placed several lenses in front of the silicon carbide lamp and also enlarged the entrance slit size to 200 µm × 1 mm to increase the amount of collected light. We use the 2875 nm to 3500 nm encoding region for this test. The individually tested gases are 1% methane, equivalent to 20% of its lower explosive limit (LEL) and 1.05% propane, equivalent to 50% of its LEL. The results are displayed in Fig. 16. The distinct methane absorption peak at around 3320 nm is clear, with its side features visible as well. The absorption spectrum of propane obtained by our spectrometer has three discernible humps, matching the reference data.
Overall, the experimental results prove that our proposed mechanisms work as intended and the spectrometer is able to accurately obtain the spectrums of various samples. With integrated electronics, this compact spectrometer can be made portable for field use.  [18] and (b) single-pixel mid-IR spectrometer absorption spectrum results for 1% methane; (c) absorption spectrum of propane obtained online [19] and (d) single-pixel mid-IR spectrometer absorption spectrum results for 1.05% propane.

Conclusion
In this paper, we report a novel design of a single-pixel Hadamard transform spectrometer. The full wavelength range can be split into several sub-bands to reduce the mask travel range. As such, the size and cost of the motor required to actuate the mask can be reduced as well, allowing for a more compact and cost-effective spectrometer. A collection optics consisting of a reversed spectrometer enables us to collect a large dispersion onto a small detector surface area. Additionally, a self-calibration mechanism can be implemented with a reference laser for accurate spectrum recovery.
In our prototype, the spectrometer is cascaded to work in the 2875 nm to 3500 nm and 3500 nm to 4077 nm wavelength range. Each band has 103 pixels, with a design spectral resolution of around 6 nm. A 635 nm laser is used to implement the self-calibration mechanism. The prototype is demonstrated with a mid-IR laser to illustrate its accuracy in recovering the mid-IR spectrum in the correct position. Further test is done with plastic and gas samples, proving that the spectrometer can accurately obtain their absorption spectrums.
A cascaded, self-calibrated, single-pixel Hadamard transform spectrometer can be useful for field-use IR spectroscopy due to the increase in SNR provided by the multiplexing and single-pixel detector. The cascaded encoding and self-calibration mechanism reduce the size and cost of the system, making it more portable and cost-effective. Since IR spectroscopy, especially mid-IR spectroscopy, is commonly used to identify chemical compounds, the proposed design provides a practical way to miniaturize an IR spectrometer for field use. As such, this might be useful in a wide range of applications, including environmental monitoring, pharmaceutics, polymer identification, food processing and agriculture. Disclosures. The authors declare no conflicts of interest.
Data availability. Data underlying the results presented in this paper are not publicly available at this time but may be obtained from the authors upon reasonable request.