Miniaturized NIR Spectroscopy in Food Analysis and Quality Control: Promises, Challenges, and Perspectives

The ongoing miniaturization of spectrometers creates a perfect synergy with the common advantages of near-infrared (NIR) spectroscopy, which together provide particularly significant benefits in the field of food analysis. The combination of portability and direct onsite application with high throughput and a noninvasive way of analysis is a decisive advantage in the food industry, which features a diverse production and supply chain. A miniaturized NIR analytical framework is readily applicable to combat various food safety risks, where compromised quality may result from an accidental or intentional (i.e., food fraud) origin. In this review, the characteristics of miniaturized NIR sensors are discussed in comparison to benchtop laboratory spectrometers regarding their performance, applicability, and optimization of methodology. Miniaturized NIR spectrometers remarkably increase the flexibility of analysis; however, various factors affect the performance of these devices in different analytical scenarios. Currently, it is a focused research direction to perform systematic evaluation studies of the accuracy and reliability of various miniaturized spectrometers that are based on different technologies; e.g., Fourier transform (FT)-NIR, micro-optoelectro-mechanical system (MOEMS)-based Hadamard mask, or linear variable filter (LVF) coupled with an array detector, among others. Progressing technology has been accompanied by innovative data-analysis methods integrated into the package of a micro-NIR analytical framework to improve its accuracy, reliability, and applicability. Advanced calibration methods (e.g., artificial neural networks (ANN) and nonlinear regression) directly improve the performance of miniaturized instruments in challenging analyses, and balance the accuracy of these instruments toward laboratory spectrometers. The quantum-mechanical simulation of NIR spectra reveals the wavenumber regions where the best-correlated spectral information resides and unveils the interactions of the target analyte with the surrounding matrix, ultimately enhancing the information gathered from the NIR spectra. A data-fusion framework offers a combination of spectral information from sensors that operate in different wavelength regions and enables parallelization of spectral pretreatments. This set of methods enables the intelligent design of future NIR analyses using miniaturized instruments, which is critically important for samples with a complex matrix typical of food raw material and shelf products.


Introduction
During the last four decades, near-infrared (NIR) spectroscopy (800-2500 nm; 12,500-4000 cm −1 ) has become one of the most attractive and used methods for food analysis and quality control for the following reasons: it represents a nondestructive analytical tool that allows a fast and simultaneous qualitative and quantitative characterization of a wide variety of samples with regard to their chemical compositions and physical attributes [1][2][3]. NIR spectroscopy is nowadays seen as a critical element to be successfully integrated into the modern system for food monitoring on its path to sustainability [4]. The last decade marked a rapid acceleration in the continuing trend of the miniaturization of Figure 1. The workflow of the multiplanar methodology used for understanding the instrumental performance and increasing the accuracy, flexibility, and applicability of miniaturized NIR spectroscopy.

Modern NIR Instrumentation-Toward Sensor Ultraminiaturization and Integration
Much of the specifics of the analytical framework based on miniaturized NIR spectrometers may be better comprehended by highlighting the decisive differences that exist between a standard laboratory stationary (i.e., benchtop) NIR spectrometer and handheld instruments. The former is nowadays a fully matured instrument that follows a rather uniform construction scheme, in which either a Michelson or a polarization interferometer is used, and the spectrum is acquired based on the Fourier-transform (FT) principle [32]. In contrast, there are numerous optical and engineering principles implemented in the competing portable and miniaturized NIR instruments, constituting the diversity in the operational characteristics, price-per-unit factor, and the ultimate applicability of these devices.

General Design of an FT-NIR Benchtop Spectrometer
A construction scheme of a benchtop NIR spectrometer does not essentially differ from that of a generic instrument for optical absorption spectroscopy [33][34][35]. It comprises a light source, a wavelength selector, and a detector as the main building/functional blocks, which are interconnected by optics for the propagation of the beam. While NIR spectrometers can be straightforwardly configured for transmission measurements, in which case a sample compartment is typically integrated within the spectrometer's casing, a diffuse reflection mode of spectra acquisition is much more popular in analytical applications. This advantage results from the physical principles of NIR spectroscopy (i.e., high permeability of typical organic matter against NIR wavelengths), which make it straightforwardly applicable for obtaining good-quality reflectance spectra of samples without any prior pretreatments, such as dilution in a nonabsorbing medium (e.g., KBr powder), which is necessary for measuring mid-infrared (MIR) spectra, with the cost of a

Modern NIR Instrumentation-Toward Sensor Ultraminiaturization and Integration
Much of the specifics of the analytical framework based on miniaturized NIR spectrometers may be better comprehended by highlighting the decisive differences that exist between a standard laboratory stationary (i.e., benchtop) NIR spectrometer and handheld instruments. The former is nowadays a fully matured instrument that follows a rather uniform construction scheme, in which either a Michelson or a polarization interferometer is used, and the spectrum is acquired based on the Fourier-transform (FT) principle [32]. In contrast, there are numerous optical and engineering principles implemented in the competing portable and miniaturized NIR instruments, constituting the diversity in the operational characteristics, price-per-unit factor, and the ultimate applicability of these devices.

General Design of an FT-NIR Benchtop Spectrometer
A construction scheme of a benchtop NIR spectrometer does not essentially differ from that of a generic instrument for optical absorption spectroscopy [33][34][35]. It comprises a light source, a wavelength selector, and a detector as the main building/functional blocks, which are interconnected by optics for the propagation of the beam. While NIR spectrometers can be straightforwardly configured for transmission measurements, in which case a sample compartment is typically integrated within the spectrometer's casing, a diffuse reflection mode of spectra acquisition is much more popular in analytical applications. This advantage results from the physical principles of NIR spectroscopy (i.e., high permeability of typical organic matter against NIR wavelengths), which make it straightforwardly applicable for obtaining good-quality reflectance spectra of samples without any prior pretreatments, such as dilution in a nonabsorbing medium (e.g., KBr powder), which is necessary for measuring mid-infrared (MIR) spectra, with the cost of a destructive method of analysis. Unlike most other instruments, NIR spectrometers can be readily equipped with fiber probes for remote scanning in diffuse reflectance mode, further adding to the versatility and practical usefulness of NIR spectroscopy.
An NIR spectrometer can be implemented using two different concepts of performing the wavelength selection. In a dispersive spectrometer, at a given time, only a narrow waveband is passed through a monochromator (e.g., a diffraction grating and optical slit system) and subsequently presented to the detector. The motion of the diffraction grating over time selects a consecutively changing waveband (i.e., narrow fragment of the wavelengths), effectively scanning the entire spectral region in which the instrument operates. As mentioned in the introduction, this mode of operation has been made obsolete in benchtop NIR spectroscopy by a superior FT spectrometer [33,34]. In an FT-NIR instrument, the entire measured wavelength region (i.e., broadband) is passed to the detector. Using an interferometer, either a Michelsontype or the less-popular polarization interferometer, an interferogram (i.e., a signal in the time domain) is registered by the detector. The signal in the frequency domain (i.e., the spectrum) is reconstructed from the interferogram through a Fourier transform. The primary benefits of such a solution are the gain in the optical throughput of the spectrometer and a precisely controlled wavelength axis [33]. In contrast to full-scale benchtop spectrometers, miniaturization introduces several difficulties that effectively reduce the advantage of implementing the FT principle in the spectrometer [5]. Certain other solutions, including multichannel devices, are feasible and offer competitive performance and cost-effectiveness. Consequently, the handheld instruments available on the market utilize diverse optical principles and engineering solutions to acquire NIR spectra [5].

Radiation Source
A tungsten halogen incandescent lamp is almost always used as a light source in benchtop NIR spectrometers. With a few exceptions, it is also a standard used in miniaturized devices [14]. The emission profile of this source makes it very well suited for the NIR region, creating a simple, reliable, bright source with very good stability when thermal equilibrium is achieved. The tungsten halogen source is also preferred in miniaturized NIR spectrometers; however, there are additional requirements to make it suitable for such implementation. Energy efficiency and physical dimensions must be optimized, and the thermal stability of the source can become a problem in miniaturized devices due to a limited heat capacity or potential exposure to environmental conditions (e.g., sunlight) during field operation. For example, the insufficient thermal stability of some of earlier designs of otherwise very potent miniaturized instruments was found to negatively affect their analytical performance; as reported in a case study, additional cooling of the entire instrument with a thermocouple eliminated this shortcoming [36]. The effect of source heating on the entire miniaturized spectrometer can be minimized by supplying the source with power only for the duration of the measurement; in some designs, this occurs automatically. Other solutions include a temperature-correction function implemented in spectrometer software, such as that for the MicroNIR 1700 ES instrument. Regardless, it is recommended that the background and dark scan are collected frequently to keep the background profile up to date during measurements.
On the other hand, a light-emitting diode (LED) is a semiconductor source that offers an extremely low power consumption and operating voltage, compactness, and durability, and has an excellent value compared to its cost [37]. However, current technology offers LEDs that emit in a relatively narrow wavelength range that only partially covers the NIR region; for example, a gallium arsenide (GaAs) LED has a bandwidth of only 50 nm with a maximum emission at 870 nm [38]. Consequently, these components are suitable for use in visible/short-wavelength NIR (Vis/SW-NIR) spectrometers, in which compact dimensions and cost-effectiveness of the instrument are crucial (e.g., SCiO) [5].

Wavelength Selector
The wavelength-selection principle and its corresponding implementation in hardware are the most critical characteristics of a spectrometer, and largely determine its overall design and operating parameters [5]. Furthermore, this element manifests the widest diversity among the designs present in the market, making it the most essential for the characterization of a given instrument. Although interferometer-based designs dominate in benchtop spectrometers, implementation of a Michelson interferometer in handheld devices involves considerable trade-offs resulting from difficulties in miniaturizing this complex element [5]. Consequently, it is no longer far superior to other solutions, and so far no uniformly "best" concept for wavelength selection has been established for a miniaturized NIR spectrometer. The currently available portable NIR spectrometers demonstrate far-reaching diversity in this regard, with wavelength selectors ranging from the Fabry-Pérot interferometer and the Hadamard mask to multichannel devices that combine a linear variable filter (LVF) with an array detector. On the other hand, miniaturized dispersive spectrometers have been proved to be competitive; e.g., those implementing a digital micromirror system that avoids the use of movable dispersion grating, and thus are well suited to the regime of miniaturization [5]. Complex wavelength selectors allow the use of single-element detectors, resulting in the most cost-effective combination; the alternative is the integration of an expensive array detector with a fairly simple optical filter. Several known types of wavelength selectors are subject to miniaturization using microelectromechanical system (MEMS) or micro-optoelectro-mechanical system (MOEMS) technology [39]. These optomechanical devices are assembled with silicon using industry-standard technologies for the production of integrated circuits, and their popularization had a particularly important role in the development of miniaturized NIR spectrometers [5].
The principle of the Hadamard transform (HT) as the wavelength-selection approach was implemented in multiple handheld NIR spectrometers [40]. The practical advantages of Hadamard NIR spectrometers were discussed in detail by Fateley and co-workers [41,42]. In its simplest form of the single-encoded HT spectrometer, the light beam is focused on a slit, and after passing through the grating and the associated optics, is encoded by a multiaperture mask (Hadamard mask) and projected onto a single-pixel detector. This optical configuration results in a Hadamard-encoded signal reaching the detector and the spectrum being restored through a Hadamard transform. Theoretically, the advantages of Hadamard spectrometers were demonstrated relatively early, as they shared optical benefits with FT instruments; namely, the multiplex (Felgett), frequency accuracy (Connes), and throughput (Jacquinot) advantages, while HT spectrometers do not extensively rely on moving parts [40]. Importantly, a programmable Hadamard mask proved to be implementable via MOEMS technology, contributing largely to the success of this solution in handheld NIR instruments.
A digital micromirror device (DMD) is a wavelength selector in which an array of microscale mirrors manufactured using MOEMS technology form the wavelengthscanning element. The implementation of a DMD enables the construction of a dispersive spectrometer in which this element is accompanied by a fixed dispersive grating instead of the moving grating characteristic of the canonical optical spectrometer [5]. DMD design also enables the construction of a Hadamard-transform spectrometer ( Figure 2) [43]. In contrast to that obsolete design, a DMD-based spectrometer has no moving macroparts and offers advantages in terms of mechanical robustness, size, and cost-effectiveness of the wavelength selector element itself, while its optical configuration allows the use of an inexpensive single-pixel detector. polychromatic band (i.e., broadband) to be successively divided into several narrower wavelength fragments (i.e., narrow bands). Microfabrication of a programmable Fabry-Pérot interferometer is also feasible using MEMS technology. It is possible to easily reconfigure the spectrometer to work in other spectral ranges as a factory setting; for example, in NIRONE sensors. Furthermore, while not being clearly superior in miniaturized form, the Michelson interferometer has been implemented in a number of compact NIR instruments, including those that achieved considerable commercial success; e.g., NeoSpectra sensors [5]. Notably, a more recent generation of miniaturized FT-NIR spectrometers has emerged; for example, the Hefei SouthNest spectrometer. This design implements a relatively large mir-  The Fabry-Pérot interferometer also acts as a miniaturized wavelength selector [5]. Its scheme of operation is based on two parallel mirrors separated by a constant or variable distance, forming a Fabry-Pérot cavity. The filter is transparent only for resonant wavelengths related to the standing wave effect of the electric field generated in the optical resonator and controlled by the cavity width. Variable filter settings allow incoming polychromatic band (i.e., broadband) to be successively divided into several narrower wavelength fragments (i.e., narrow bands). Microfabrication of a programmable Fabry-Pérot interferometer is also feasible using MEMS technology. It is possible to easily reconfigure the spectrometer to work in other spectral ranges as a factory setting; for example, in NIRONE sensors.
Furthermore, while not being clearly superior in miniaturized form, the Michelson interferometer has been implemented in a number of compact NIR instruments, including those that achieved considerable commercial success; e.g., NeoSpectra sensors [5]. Notably, a more recent generation of miniaturized FT-NIR spectrometers has emerged; for example, the Hefei SouthNest spectrometer. This design implements a relatively large mirror with a diameter of 3 cm in the interferometer, resulting in much improved optical throughput of the spectrometer compared with earlier generations of miniaturized FT-NIR devices. Michelson-interferometer-based sensors offer a wide operational spectral region and superior resolution, comparable to those offered by benchtop FT-NIR spectrometers.
In addition to the above examples, one alternative concept for a spectrometer constitutes an array detector with multiple independent photosensitive elements [5]. While expensive, such a detector only needs to be combined with a relatively simple optical filter to work efficiently as a multichannel spectrometer that measures all wavelengths in the spectrum simultaneously without any scanning principle involved. This solution is particularly beneficial for miniaturized instruments, as it involves no moving parts even at the microscale, a high mechanical resistance, and very compact dimensions. Among the solutions implemented in the current miniaturized NIR instruments, multichannel sensors based on a linear variable filter (LVF) deserve particular attention. An LVF works as a wedge-shaped optical filter with an optical coating of a different thickness, which creates a linear variation in the transparency of the filter at different wavelengths. Designs based on an array detector and an LVF, unlike those based on MOEMS, do not have the high initial investment costs that are characteristic of semiconductor manufacturing. An LVF element is very thin itself, allowing the construction of instruments with a very short path length, further improving the properties of the multichannel spectrometer with high optical performance. Since there is no movement in the operation of the spectrometer, acquisition of a single spectrum is possible with an integration time of less than 10 ns, resulting in the ability to average a large number of spectra in an overall short collection time [5].

Detector
Miniaturized NIR spectrometers are usually equipped with an indium gallium arsenide (InGaAs) or "extended" InGaAs detector, although some instruments also contain silicon (Si) photovoltaic diodes [5,34,44]. The size constraint seen in miniaturized spectrometers limits their optical performance. Therefore, in order to maintain an adequate signal-to-noise (S/N) ratio, the InGaAs detector is more desirable due to its high sensitivity, especially in the range of the longer wavelengths of the NIR region ( Figure 3) [14]. The typical wavelength range for its optimal performance is around 1000-1600 nm (10,000-6250 cm −1 ); however, in practice, several InGaAs-based NIR spectrometers offer good performance at adjacent wavelengths as well. Compared to other types of detectors, InGaAs detectors offer a fast response time, good quantum efficiency, and low dark current, allowing a short scan time while maintaining a good S/N [5]. The extended InGaAs detector is suitable for instruments operating at shorter wavelengths of ca. 1700 nm. However, this type of detector has a lower sensitivity, and may require integrated cooling solutions [44].
Photovoltaic Si detectors maintain a reasonable sensitivity in the wavelength range from the visible region to ca. 1100 nm (9100 cm −1 ), which makes them suitable for costeffective, compact spectrometers operating only in the visible and SW-NIR regions, as presented in Figure 3 [5,44]. Photodiodes used in portable spectrometers require the use of a wavelength-blocking filter to mask the detector from sunlight. The favorable affordability of this type of detector makes it particularly suitable for spectrometers oriented toward the consumer market [5,44].

Other Elements
Optics. NIR spectrometers are compatible with glass optics because this material does not absorb in the visible and most of the NIR region [5,34]. This enables the use of cheap mechanically and chemically resistant optical materials for the construction of portable NIR spectrometers [5,44]. However, the best performance in the long-wavelength part of the NIR region may require high-quality optics made from fused silica; i.e., without O-H impurities. To ensure reliable operation in direct contact with the sample, the optical window at the sample interface made from a scratch-resistant material is preferred. For example, some designs employ sapphire for this role, as it is a mechanically resilient material with the required transparency in the NIR wavelength range. However, it features a rather high refractive index (greater than 1.7 in the visible and NIR regions) that increases optical loss from reflection, making it more suitable for instruments with good optical throughput, such as MicroNIR multichannel spectrometers. Photovoltaic Si detectors maintain a reasonable sensitivity in the wavelength range from the visible region to ca. 1100 nm (9100 cm −1 ), which makes them suitable for costeffective, compact spectrometers operating only in the visible and SW-NIR regions, as presented in Figure 3 [5,44]. Photodiodes used in portable spectrometers require the use of a wavelength-blocking filter to mask the detector from sunlight. The favorable affordability of this type of detector makes it particularly suitable for spectrometers oriented toward the consumer market [5,44].

Other Elements
Optics. NIR spectrometers are compatible with glass optics because this material does not absorb in the visible and most of the NIR region [5,34]. This enables the use of cheap mechanically and chemically resistant optical materials for the construction of portable NIR spectrometers [5,44]. However, the best performance in the long-wavelength part of the NIR region may require high-quality optics made from fused silica; i.e., without O-H impurities. To ensure reliable operation in direct contact with the sample, the optical window at the sample interface made from a scratch-resistant material is preferred. For example, some designs employ sapphire for this role, as it is a mechanically resilient material with the required transparency in the NIR wavelength range. However, it features a rather high refractive index (greater than 1.7 in the visible and NIR regions) that increases optical loss from reflection, making it more suitable for instruments with good optical throughput, such as MicroNIR multichannel spectrometers.
Connectivity, user interface, and power delivery. Modern electronics have achieved high levels of energy efficiency, which is a great advantage for portable spectrometers. These instruments follow one of two power delivery concepts: either the power supply is provided by an external source, or the unit is equipped with its own battery. For many spectrometers, the first solution is practically implemented with a universal serial bus (USB) connection, which is also used for spectrometer control and data transfer (for example, the standard version of the MicroNIR spectrometer). However, this is only possible if the total power consumption of the instrument does not exceed the capacity of the USB interface. In addition, the use of the instrument is limited by a permanent connection to the main computer (PC) via a USB cable. The second solution is needed for completely autonomous spectrometers (e.g., microPHAZIR) and those compatible with smartphone applications (e.g., Tellspec Enterprise sensor and SCiO). With this latest type of device, the data interface for transferring measured spectra and associated data can be maintained via USB as well (e.g., microPHAZIR) or via a cloud service (e.g., Tellspec Enterprise sensor and SCiO).
Closely related to the above, the user control over the instrument can also be achieved in several ways. The fully autonomous instruments feature their own user interface with a display screen and a user-input device (e.g., a keyboard), as in the case of, for example, microPHAZIR. Spectrometers that require continuous external power are typically controlled by a PC-installed application with the data interface and power delivery conveniently handled by a wired USB interface; examples include MicroNIR instruments [5]. Many devices aimed at the consumer market are operated through an application installed on a smartphone with continuous communication with a user device over a wireless connection; i.e., Wi-Fi or a low-power Bluetooth interface.

Brief Overview of Selected Representative Miniaturized NIR Spectrometers
The principle of the Hadamard spectrometer was implemented in one of the first handheld NIR instruments introduced to the wide market by Polychromix, now the intellectual property of Thermo Fisher Scientific Inc. The instrument employed a programmable microscale MEMS-based Hadamard mask, a low-power tungsten lamp source, and an InGaAs single-element detector. These solutions enabled a robust, reliable, and reasonably compact instrument, given its fully autonomous operation. The device was fitted with its own power source-a lithium-ion battery-that was swappable for continued operation, a display screen, and a user interface; i.e., a keyboard.
Several successful products on the market are based on the NIRscan Digital Light Processor (DLP) module from Texas Instruments. This solution is based on a digital micromirror device (DMD) manufactured using MEMS technology, and is available as two evaluation modules (EVMs): a high-performance (HP) EVM with a DLP NIRscan sensor and a mobile sensing (MS) EVM with a DLP NIRscan Nano. The latter, more compact one is primarily suitable for cost-efficient portable spectrometers. It is implemented in the NIR-S-G1 instrument from InnoSpectra [46], available as a customized product from, e.g., SphereOptics [47], Sagitto [48], Allied Scientific [49] and Tellspec [50]. The NIR-S-G1 spectrometer is extremely compact (82 mm × 63 mm × 43 mm; weight less than 145 g); it is equipped with li-ion battery, is operated through a mobile app, and communicates with a smartphone via a power-efficient Bluetooth interface.
A Fabry-Pérot interferometer was implemented by Spectral Engines in a miniaturized NIR spectrometer NIRONE S sensor [51], with several variants preconfigured for different operational wavelength-range, S/N ratio, and resolution parameters (Table 1) while maintaining very compact dimensions (25 × 25 × 17.5 mm; weight 15 g). The implementation of the Fabry-Pérot interferometer created an optical configuration of the sensor suitable for detection in a relatively large area of either the InGaAs or extended InGaAs type. The Sensor X is a compact version of the instrument optimized for cost-effectiveness and ease of production. Notably, the latest advances in Fabry-Pérot interferometer technology show promise for ultraminiaturization. For instance, Hamamatsu recently unveiled a series of ultracompact NIR sensors, differing mostly in their operational spectral regions that, however, are quite narrow and depend on the variant, ranging from 1350 to 2150 nm (7407-4651 cm −1 ) [52].
An alternative approach to a multichannel spectrometer is offered by the VIAVI MicroNIR series of instruments. These devices combine a multielement array detector (InGaAs) coupled with an LVF, enabling a very compact, mechanically robust spectrometer with superior optical performance for its size. Newer versions of the MicroNIR; e.g., the 1700 ES, improve the operational stability over time thanks to a temperature-correction function, effectively recalibrating the detector's response depending on its temperature to mitigate the thermal capacity imposed by the compact dimensions of the device. The standard MicroNIR instrument is powered and controlled via a wired USB connection with a host PC, while the dedicated OnSite-W variant, intended for in-field operation, is equipped with battery power source and a waterproof and dustproof housing [53]. Miniaturized FT-NIR spectrometers equipped with a Michelson interferometer are offered by, e.g., Si-Ware Systems with a NeoSpectra device (Table 1, Figure 4) [54]. Recently, a new generation of FT-NIR minispectrometers appeared. For example, Hefei SouthNest Technology introduced the nanoFTIR NIR spectrometer, which operates in the full NIR range of 800-2600 nm (12,500-3846 cm −1 ) while maintaining a relatively high spectral resolution of 6 nm at 1600 nm. The device has compact dimensions (14.3 × 4.9 × 2.8 cm) and is light (220 g), and can be equipped with an external light source and a fiber-optic probe compliant with the industry standard, making it suitable for online analysis. Furthermore, recently another MEMS-based FT-NIR spectrometer from Hamamatsu appeared, equipped with a large mirror (3 mm diameter) interferometer, enabling a good S/N ratio with a wide spectral range of 1100-250 nm (9090-4000 cm −1 ). On the other hand, regardless of the underlying technology, many of the spectrometers are offered in a specialized variant sold as "turn-key" analyzers to be operated by personnel not trained in spectroscopy. Such analyzers are preconfigured for the intended analyses, with a specialized software suite containing spectra-processing algorithms and precalibrated models for quantitative and qualitative analyses typically performed in a given area of application. For example, several analyzers based on the microPHAZIR spectrometer appeared that are intended to be operated under minimal supervision [55]. Exemplary configurations include, e.g., the microPHAZIR AG Handheld Analyzer, which is intended for animal feed analysis, and is preconfigured to predict major quality parameters and ingredients in these products, such as moisture, protein, fiber, starch, etc., [56]. The other turn-key configurations of the microPHAZIR include, e.g., the microPHAZIR PC analyzer, which is intended for plastics analysis in recycling [57]; the microPHAZIR RX analyzer, which is preconfigured for pharmaceuticals [58]; or the microPHAZIR AS, which fulfills the role of an asbestos analyzer [59]. Mini-NIR analyzers in particular are growing in popularity in the agri-food industry, with several examples of specialized devices; e.g., the NIR4 Farm spectrometer from AB Vista, which is intended for the analysis of feed and forage [60]; as well as analyzers that are preconfigured for grain assessment, such as AURA's Handheld NIR [61] or the X-NIR Analyzer [62]. oriented instruments described above, the much-anticipated NIR sensor fully integrated with a smartphone has remained a vivid concept in the past decade [65]. While the initial prototype revealed highly promising characteristics [66,67], so far, no such solution has appeared on the market. However, more recent advances into ultraminiaturization; e.g., as demonstrated by Hamamatsu MEMS-FPI spectrum sensors [65], suggest that NIR spectrometers integrated with smartphones may become commercially available in the next few years.  In the context of food analysis, attention should be given to specialized, consumeroriented NIR spectrometers designed to accept somewhat limited overall performance with the greatest benefit of cost-effectiveness. These are the necessary trade-offs to fit the instruments into their specific niche of the market, where they are offered as "pocket food analyzers" for use by the general public [63]. The sensor hardware is tailored to provide a sufficient optical performance, while the primary value for the intended operators originates from the associated software. These instruments offer an easy-to-use cloud service, in which the results of the analysis are displayed to the end user in a "black-box", with underlying predictions based on precalibrated models stored in the cloud service. A good example of such a device is the Consumer Physics SCiO NIR microspectrometer [64]. Marketed as the first "pocket" spectrometer, the unit measures 67.7 × 40.2 × 8.8 mm, weighs 35 g, and is intended primarily for everyday consumer assessment of food quality and nutritional value. The necessary economical affordability is achieved by using an LED light source and a simple 12-element Si photodiode detector, with an array of a 4 × 3 configuration, combined with optical filters across each pixel to form a 12-channel spectrometer. However, in this design, noticeable penalties in terms of optical performance were inevitable, manifested primarily in the low number of measured wavelengths. Below-average S/N levels and a narrow wavelength range covering only a fragment of the visible/SW-NIR range (740-1070 nm; 13,514-9346 cm −1 ) seem sufficient for the intended applications of this de-vice, as a number of essential quality parameters of foods can be effectively predicted from these spectra. In connection with the ultraminiaturized, consumer-oriented instruments described above, the much-anticipated NIR sensor fully integrated with a smartphone has remained a vivid concept in the past decade [65]. While the initial prototype revealed highly promising characteristics [66,67], so far, no such solution has appeared on the market. However, more recent advances into ultraminiaturization; e.g., as demonstrated by Hamamatsu MEMS-FPI spectrum sensors [65], suggest that NIR spectrometers integrated with smartphones may become commercially available in the next few years.

Techniques for Spectra Acquisition
Miniaturized spectrometers, in general, can be adopted to perform well in all modes of spectral acquisition established in NIR spectroscopy; i.e., diffuse reflectance ( Figure 5a) and transmittance (Figure 5b), as well as the mode effectively combining both of these; i.e., transflectance ( Figure 5c) [68]. Furthermore, the interactance mode ( Figure 5d) can be distinguished, which is based on a geometrical arrangement of the sensor vs. the sample surface, rather than a distinct optical phenomenon. This configuration reduces optical losses at the path to the sample surface; i.e., a higher portion of the incident beam effectively reaches the sample. Additionally, in the case of the transmittance measurement of materials in which strong scattering occurs (e.g., dense solid samples), a distorted behavior of the NIR beam when propagating through the sample may occur ( Figure 5e). MVA groups various mathematical methods capable of correlating many variables at one time [69]. Every spectral point carries information about the sample, and effectively, the correlation function binds the property of a multicomponent sample with its vibrational spectrum in a many-parameter function. The machine-learning methods in the variants applied in chemistry are commonly known as chemometrics, and these are the main tools for quantitative and discriminant (i.e., qualitative) analysis in applied spectroscopy [69,70]. These methods may be roughly divided into the following categories.
Exploratory data analysis (EDA) groups techniques for data mining (i.e., cluster anal- That being said, most miniaturized NIR spectrometers are factory-configured to operate in diffuse reflectance mode, and some of them are offered with additional accessories for transflectance measurements, as in the case of, e.g., the VIAVI MicroNIR. Typically, spectral acquisition in this mode is performed by using an external reflector and holder designed for maximizing the optical gain of a specific instrument. Such an accessory may be also custom-made; e.g., a gold-plated surface with a geometrical shape tailored to a specific analysis [36]. On the other hand, to perform conventional transmittance measurements, which are preferable for reliability in the analysis of suitable samples such as liquids, miniaturized instruments require an accessory with its own radiation source. A transmittance accessory is therefore less common in miniaturized NIR spectroscopy, but is offered again by, for example, VIAVI, to fit their MicroNIR spectrometer. The interactance principle is typically implemented through a fiber probe accessory. Different architectures of optical probes are possible: either the illumination and collection path use the same light fiber, resulting in a single-fiber probe (SFP) configuration, or two independent fiber probes are dedicated to each beam, resulting in a multiple-fiber probe (MFP) configuration. While intensively used in industrial environments, only certain general-oriented miniaturized NIR spectrometers are solely designed to operate via a fiber probe; e.g., the Hefei SouthNest FT-NIR instrument.
MVA groups various mathematical methods capable of correlating many variables at one time [69]. Every spectral point carries information about the sample, and effectively, the correlation function binds the property of a multicomponent sample with its vibrational spectrum in a many-parameter function. The machine-learning methods in the variants applied in chemistry are commonly known as chemometrics, and these are the main tools for quantitative and discriminant (i.e., qualitative) analysis in applied spectroscopy [69,70]. These methods may be roughly divided into the following categories.
Exploratory data analysis (EDA) groups techniques for data mining (i.e., cluster analysis and principal component analysis (PCA)) used to gain a general overview of the variance in the dataset and explore the statistical properties (i.e., distribution in multivariate space) of high volume, complex data; e.g., sets of spectra.
Pattern-recognition (classification) techniques are used for separation (grouping) of the samples according to the statistical specificity of the sample set. Supervised classification methods include, e.g., linear discriminant analysis (LDA) or support vector machine (SVM) classification [71]. Clustering methods [72]; e.g., hierarchical cluster analysis or k-means clustering, are archetypical unsupervised machine-learning algorithms that are frequently used in the determination of the similarities between samples by grouping unlabelled datasets. Artificial neural networks (ANNs) are very potent supervised methods for performing classifications, particularly in challenging cases; e.g., those affected by instrumental noise and other perturbations.
Regression analysis groups the methods used for quantitative prediction of a sample's properties; e.g., quantification of chemical content (either one or a group of constituents) present in the sample. The most popular techniques include multiple linear regression (MLR), principal component regression (PCR), and partial least-squares regression (PLSR). Nonlinear regression methods (e.g., Gaussian process regression (GPR)) and ANNs can perform very well and improve the analytical performance of miniaturized sensors, in which a lower resolution and spectral region limit the amount of information available for the analysis [31,73].
The statistical parameters of trained classification or regression models need to be evaluated to assess their validity (i.e., ability to describe the variance not only in the calibration set, but also in general population) and predictive performance. The coefficient of determination (R 2 ), root-mean-square of calibration (RMSEC), and root-mean-square error of cross-validation (RMSECV) describe the robustness of the model. The ultimate prediction power of the model is best assessed by evaluating the root-mean-square error of prediction (RMSEP) on the basis of an independent one, or preferably more test sets of samples. Finally, the level of detection (LOD) and level of quantification (LOQ) are essential parameters that indicate a sensor's performance (in a specific analysis) toward low-concentrated constituents, which often receive most focus in certain applications. Furthermore, statistical parameters can be used to directly compared different approaches or various instruments being used; e.g., to describe the performance of the sensing device in different conditions (for example, configuration of the sensing interface). Advancements in chemometrics, or even more broadly understood data science, are naturally beneficial to the applications of miniaturized NIR spectrometers, although this is a generally oriented trend that brings merit to analytical spectroscopy, rather than focused research oriented strictly at providing gains only for miniaturized sensors. Certain aspects of this progress, however, might be linked with proportionally greater benefits offered by this specific technology. Data-fusion concepts are useful to combine spectral information from several sensors operating in narrow wavelength regions, as well as to provide the possibility of performing parallelized spectral pretreatments (Section 5.2). Development and validation of precalibrated models stored in cloud services should be mentioned, where the robustness (i.e., universality) of the models is a critical factor; however, this development remains mostly the proprietary intellectual property of instrument vendors. On the other hand, recent attention in NIR spectroscopy has been increasingly directed toward the application of deep neural networks (i.e., deep learning or "deep chemometrics") for prediction and classification purposes [74][75][76]. However, to date, only scarce literature has appeared that studied the potential benefits of applying deep-learning methods to reinforce the analytical framework of miniaturized NIR sensors [75]. However, it seems plausible that deep networks could provide benefits in processing challenging data sets; e.g., those of complex samples measured by ultraminiaturized NIR spectrometers. On the other hand, recent critical evaluations of the current state of data science related to the applications of miniaturized NIR spectrometers indicate urgent problems yet to be comprehensively studied [77]. Giusanni et al. pointed out the attention to the issue of the possible deterioration of miniaturized sensors over time, and the connected problem of the validity of the respective calibration models. Other concerns expressed in that study included the transferability of the models to future generations of sensors, which seems entirely legitimate as we approach the era in which the effort invested in the training and validation of models may outweigh the unit cost of inexpensive sensors. Furthermore, issues related to the automatization of the data transfer from the instrument to the user device were pointed out as well [77]. Therefore, there appear to be specific challenges and problems to be solved by data scientists and chemometricians that are directly related to the widespread use of miniaturized NIR spectrometers by nonexpert personnel.

Methods for Interpretation of NIR Spectra
While conventional methods of spectral interpretation provide generalized tables of assignments of the NIR bands representative of chemical constituents typically present in foodstuffs ( Table 2; limited to the major classes of chemical compounds only), the identification of specific markers in NIR spectra is much less straightforward than it is, for example, in MIR or Raman spectroscopy [78]. This is the consequence of the intrinsic complexity of NIR spectra and the resulting difficulty in their direct interpretation, which remains a limiting factor regardless of the application. In contrast to MIR and Raman techniques, NIR spectroscopy has been hindered in forming a practically accessible synergy with computational chemistry [79]. In recent years, however, advances in the tools used in computational chemistry have created an opportunity to take a step beyond this barrier [28,[80][81][82].
This led to considerable advances in the applicability of the methods of theoretical chemistry to NIR spectroscopy [83]. The accurate simulation of NIR spectra of reasonably large molecules largely improves our comprehension of NIR spectra, and offers an opportunity to take a step beyond this barrier. Quantum-mechanical simulations of NIR spectra of a variety of compounds are significant from the point of view of physiochemical and analytical spectroscopy. The examples range from basic molecules (alcohols, nitriles, carboxylic acids) [84][85][86][87] to complex molecules with importance in biophysical science (fatty acids, nucleobases) [88,89], materials science and industry [90], and analytical chemistry (vitamins, natural drugs, polyphenols, alkaloids, food adulterants) [91][92][93][94][95]. The simulated NIR spectra largely increase the level of detail in the band assignments compared to the one available in conventional methods of spectral analysis (Table 2). Table 2. Approximate positions of NIR bands of the major classes of chemical compounds commonly present in foodstuffs (excluding water). Reproduced (CC-BY 4.0 license) from [29]. A remarkable potential arises from the growing applicability of anharmonic computations in solving the problems that arise in both basic and analytical NIR spectroscopy [96]. The highly convoluted, overlapping nature of NIR spectra can be successfully dissected in theoretical spectra, as presented in the example of a caffeine molecule ( Figure 6) [93]. The elucidated rich information stemming from numerous NIR bands can subsequently be used to improve the basic understanding of NIR spectroscopy, as well as to advance its applications. In silico simulations of NIR spectra yield highly detailed and accurate chemical interpretations of the NIR bands. This information opens up new possibilities of performing a deep examination of the performance profile of handheld NIR spectrometers (Sections 2.2 and 2.3). The calibration models constructed for different spectrometers capture chemical information on the analyzed constituent in clearly distinct ways, with the benchtop high-resolution spectrometer being able to capture individual vibrational bands much more accurately. This results in consequences to the ability of a spectrometer to acquire fine intensity changes in a specific task. The detailed comprehension of NIR bands from an accurate simulation of the spectra enables the knowledge-based design and optimization of analytical applications of NIR spectroscopy.

Wavenumber in cm
This detailed information on the chemical origin of each NIR band enables new approaches to the support of analytical applications. For example, one may select the best-suited sensor for the intended analysis by assessing its suitability in measuring the characteristic absorption regions of the targeted constituent. Miniaturized NIR spectrometers most often can only measure fragments of the NIR spectrum (Figure 7), and hence, only selective chemical information can be acquired by these devices. An accurate spectral simulation, such as the example for caffeine presented above (Figure 6), enable a full under-standing of which NIR vibrations a specific sensor can acquire, and thus, the best-suited instrument for the targeted analysis can be selected. vibrational bands much more accurately. This results in consequences to the ability of a spectrometer to acquire fine intensity changes in a specific task. The detailed comprehension of NIR bands from an accurate simulation of the spectra enables the knowledgebased design and optimization of analytical applications of NIR spectroscopy. This detailed information on the chemical origin of each NIR band enables new approaches to the support of analytical applications. For example, one may select the bestsuited sensor for the intended analysis by assessing its suitability in measuring the characteristic absorption regions of the targeted constituent. Miniaturized NIR spectrometers most often can only measure fragments of the NIR spectrum (Figure 7), and hence, only selective chemical information can be acquired by these devices. An accurate spectral simulation, such as the example for caffeine presented above (Figure 6), enable a full understanding of which NIR vibrations a specific sensor can acquire, and thus, the best-suited instrument for the targeted analysis can be selected. Furthermore, a detailed interpretation of PLS regression factors becomes possible as well, providing deep insights into the critically important connections between the chemical information present in the sample and the analytical framework [97]. In this way, the interpretation, in a chemical sense, of the meaningful variables in chemometric models becomes possible [98][99][100].
These three essential pillars, each of which takes advantage of a detailed understanding of the chemical information in the processed spectra, enable a "'smart", knowledge-based design and the optimization of an analytical approach in modern miniaturized NIR spectroscopy.
ical information present in the sample and the analytical framework [97]. In this way, the interpretation, in a chemical sense, of the meaningful variables in chemometric models becomes possible [98][99][100].
These three essential pillars, each of which takes advantage of a detailed understanding of the chemical information in the processed spectra, enable a "'smart", knowledgebased design and the optimization of an analytical approach in modern miniaturized NIR spectroscopy. Figure 7. In contrast to benchtop FT-NIR instruments that measure the full NIR wavenumber region, the access of miniaturized NIR spectrometers to chemical information is selective, resulting from only narrow, and at best partially overlapping, fragments of the NIR spectra measured by these sensors. Adopted with the permission of the Royal Society of Chemistry (2017) from [27].

Overview of Applications of Miniaturized NIR Spectrometers in the Agri-Food Sector
NIR spectroscopy is one of the most versatile methods with great utility, and is highly valued as an analytical and quality-control tool for foods [101,102]. Miniaturized NIR spectrometers have particularly rich applications in agricultural and foodstuff areas, as their portability greatly enhances the common conventional strengths of the NIR analytical framework, and the miniaturized instruments meet the challenges and specifics of food-related analysis very well [11]. The complex nature of the food production and delivery chains, as well as the susceptibility of foods to quality loss, promote the need for a flexible analytical tool [103]. Similarly, onsite NIR spectroscopy is an excellent tool for monitoring the quality and growth conditions of crops, and the advent of this technology revolutionized certain aspects of agriculture [104]. For these reasons, mobile NIR Figure 7. In contrast to benchtop FT-NIR instruments that measure the full NIR wavenumber region, the access of miniaturized NIR spectrometers to chemical information is selective, resulting from only narrow, and at best partially overlapping, fragments of the NIR spectra measured by these sensors. Adopted with the permission of the Royal Society of Chemistry (2017) from [27].

Overview of Applications of Miniaturized NIR Spectrometers in the Agri-Food Sector
NIR spectroscopy is one of the most versatile methods with great utility, and is highly valued as an analytical and quality-control tool for foods [101,102]. Miniaturized NIR spectrometers have particularly rich applications in agricultural and foodstuff areas, as their portability greatly enhances the common conventional strengths of the NIR analytical framework, and the miniaturized instruments meet the challenges and specifics of food-related analysis very well [11]. The complex nature of the food production and delivery chains, as well as the susceptibility of foods to quality loss, promote the need for a flexible analytical tool [103]. Similarly, onsite NIR spectroscopy is an excellent tool for monitoring the quality and growth conditions of crops, and the advent of this technology revolutionized certain aspects of agriculture [104]. For these reasons, mobile NIR spectrometers attracted relatively early attention in the area of food analysis [104,105]. Ellis and colleagues previously provided a perspective view on the specific capabilities of portable NIR devices and their applications in food supply chains [106].
The current state of the art of miniaturized NIR spectroscopy in food analysis shows that handheld instruments can be used successfully for a wide variety of problems, but the applicability potential and relative performance may vary from instrument to instrument [73,77,99,100,. In such applications, the instrumental difference can be profoundly manifested. For example, affordable visible/SW-NIR spectrometers can perform well in the analysis of macronutrients, but their applications in other scenarios may be limited [112,118]. This makes it difficult to predict the performance of a given spectrometer without performing systematic feasibility studies. Such attempts have been made, and it should be briefly mentioned that recent studies were aimed at obtaining a wider perspective on the instrumental differences manifested in the ability to acquire the characteristic signal of a specific constituent present in the sample [100]. Most of the recent research has focused on developing effective methods for determining the quality of shelf products. The challenges faced in this scenario result from several factors. Firstly, the chemical variety of foodstuffs, often further complicated by the complex matrix and high moisture content, are of note. Hence, for example, the accessibility to the spectral footprint of food adulterants in a specific spectral region may vary [94]. Next, the physical properties of these products, such as surface texture, may frequently interfere with the analysis. Finally, it is often desirable to perform a nondestructive analysis of an originally packaged product; i.e., the influence of the packaging material needs to be addressed. Consequently, the feasibility of miniaturized NIR spectrometers may greatly vary from case to case. Nevertheless, portable NIR spectroscopy has been introduced with remarkable success in the food industry. Application development remains an active direction of research in this area, and numerous reports appeared in the current literature, as summarized in the following sections.

Milk
Miniaturized NIR spectroscopy finds particularly widespread use in the analysis of dairy products, with a considerable research effort oriented directly at developing analytical methods for the analysis of milk, as evidenced by the recent literature [107][108][109][110][111][112][113][114][115]. Table 3 presents summarized and tabularized key information provided in the reviewed studies. Investigations toward the qualitative assessment of milk have attracted the main attention, where examples of discrimination between organic and conventional milk, authenticity checks and detection of milk adulteration, or discrimination between regular and lactosefree milk directly in the field should be noted. However, studies demonstrating the full capacity of miniaturized NIR spectroscopy to perform rapid quantitative predictions of the key quality parameters of milk, such as fat and protein content or fatty-acid composition, have been conducted as well.   Very often, the prediction performance offered by miniaturized NIR sensors in the established analytical framework was deemed comparable to that of benchtop NIR spectrometers, enabling the real-time monitoring of quality-control parameters of cow milk for each specimen. Furthermore, while primary attention is given here to bovine milk, examples of goat milk analysis can also be found in the recent literature as well [108]. In the area of methodology, it should be pointed out that there has been development toward an effective calibration transfer in order to share calibration models among several portable instruments, which provided decisive gains in efficient in situ analysis at the farm level [110].

Other Dairy Products
Dairy products other than milk also have been extensively examined by miniaturized NIR spectrometers, with numerous feasibility studies and practical applications of the developed methods. In this area, the analysis of cheese quality predominates, while examples of successful examinations of yogurts and milk/dairy powders can be provided in this category as well [116,117], as summarized in Table 4. Notably, good analytical figures of merit were accomplished in these feasibility studies; even in the cases of extremely cost-effective NIR sensors intended for the consumer market; the prediction performance remained acceptable even when cloud-based "black-box" calibration integrated with the consumer-aimed software was used for the analysis. Furthermore, the literature suggests that improved control of the cheese-making process is permissible with miniaturized NIR sensors, as these devices enable the early detection of deviations from the target quality directly in the production process, as well as the aging of cheese. On the other hand, the relevance of the visible/SW-NIR region to provide information correlated with the quality parameters of dairy products emerged from the reviewed studies. This seems to explain why these ultra-cost-effective sensors, which operate in the visible/SW-NIR region as the result of their constructional principles (i.e., Si photodetectors and LED sources), generally present very good performance in these applications when compared to benchtop NIR spectrometers that operate in the conventional NIR spectral range.

Meat
An inspection of the current literature found intensive development of meat analysis using miniaturized NIR spectroscopy (Table 5). Predominantly, attention is drawn toward the rapid, nondestructive analysis of freshness, which is a major concern in the everyday consumption of meat, as well as the authenticity check and the detection of adulteration, following several episodes of the mislabeling of meat that occurred in the past [9,11,13,128].     Notably, it was demonstrated that, in the case of the former concern, the aging day and levels of chemical/microbial indicators (i.e., thiobarbituric acid, volatile basic nitrogen, and bacteria levels) could be successfully analyzed using miniaturized NIR instruments in a rapid manner with no need for destructive sampling procedures [135]. On the other hand, classification of chicken meat by a portable NIR spectrometer while also discriminating between different parts of the chicken could be performed directly in the processing line.
Quantitative predictions often focus on the analysis of the fat content in meat, as well as the microbiological status, or the quantitative prediction of the level of fat adulteration [140]. Furthermore, quantification of a specific type of meat in a ground meat blend; e.g., the beef content in chicken/beef, pork/beef, and chicken/beef/pork blends, was successfully accomplished with miniaturized NIR spectroscopy as well [138]. In a number of investigations, the applicability of miniaturized NIR spectrometers in tackling the challenging problem of the quality control of meat was evaluated not only in comparison with benchtop NIR spectroscopy, but also in comparison with other analytical techniques, including optical spectroscopy (e.g., visible spectroscopy) [142,143].

Fish
Countering seafood mislabeling is receiving increased attention, as numerous cases of food fraud involving fish and seafood products were reported lately [148][149][150]. The scale of the problem can be well highlighted by economic-driven fraud reaching the entire fish supply chain, where on several occasions, a substitution for valuable fish with a cheaper species occurred [148]. Therefore, considerable research efforts have recently been directed at developing effective and reliable miniaturized NIR methods in this area of application. Miniaturized spectrometers were concluded to be feasible to provide accurate discrimination between fish species, as well as to quantitatively predict the main chemical contents in fish flesh; for example, fat composition, protein, or lipids (Table 6).   To reflect state-of-the-art and currently undertaken research directions, Pennisi et al. [157] recently demonstrated highly accurate results using handheld NIR spectrometers for direct screening of a production line of cuttlefish and musky octopus. The authors emphasized the decisive practical gain from using miniaturized NIR instrumentation, with a greatly reduced complexity and the execution of the analysis that make it much more practical for successfully adoption in the challenging conditions commonly found at fish and seafood production sites.

Fruits and Vegetables
Fruits and vegetables are also among the most-studied items in the development of analytical miniaturized NIR spectroscopy, with equal interests in both the food and agriculture sectors. Most often, the aim of the analyses was directed towards the prediction of the quality parameters of fruits and vegetables (Table 7). Several canonical types of analysis were used; i.e., moisture level, protein content, and total sugar content (i.e., BRIX index), as well as the metrics of fruit maturity, content of soluble solid, titratable acidity and ascorbic acid, extractable polyphenols, etc. Often, more than one property of interest could be simultaneously predicted from a single spectrum. Importantly, in most cases, the full feasibility of miniaturized NIR spectrometers to perform those analyses directly under field conditions and/or during fruit ripening was demonstrated. Other than those, the qualitative assessments of relevant properties also included identification of the variety and/or geographical origin, assessment of the refrigerated-storage duration, and authenticity checks. Notably, there were studies demonstrating the potential for rapid discrimination of fraud due to the mislabeling of conventionally produced fruits as organic ones; e.g., in the case of pineapples [150]. A similar potential can be concluded for vegetable analysis, with the example of the examination of spinach leaves in situ, directly on the plant, in which a green color, the texture, and dry matter were detected using a miniaturized NIR instrument [158][159][160][161]. Such a capacity can be effectively used in the optimization process of cultural practices, such as fertilization and irrigation and to assess the quality of a vegetable when harvested.

Beverages and Syrups
Considering the success of miniaturized NIR spectroscopy in predicting critical qualitative and quantitative properties of foods that feature considerable complexity, such as meat, fresh fruits, or vegetables, one should expect that the analysis of beverages or syrups should be within reach of this technology as well. An inspection of the recent literature indicated that miniaturized NIR sensors can provide the rapid assessment of sugar content in such samples in a wide range of concentrations, and in a robust manner ( Table 8). The prediction of other chemical contents, such as polyphenols, amino acids, caffeine, and thea-nine, as well as the quantitative assessment of the adulteration level, could be concluded in the available literature. Differences in the prediction performance of caffeine and theanine when using the two instruments were associated with their sensitivity toward the characteristic absorption bands of these two constituents  Noteworthy classification examples that included discrimination between different beer brands or sake varieties using miniaturized NIR spectroscopy should be mentioned as well [179,180].

Miscellaneous
Other examples of recent food-analysis studies should also be noted that further demonstrated the versatility of miniaturized NIR spectrometers, in which they were successfully applied to qualitative and quantitative analyses in a variety of cases, from whole foods to highly processed products (Table 9). Content analysis included, e.g., carbohydrates, fats and oils, fiber, proteins, and sugar as well as general energetic/nutritional value. Specific chemical constituents could be successfully analyzed; for instance, piperine in black pepper, or insect proteins in fitness bars [73,99]. Detection of adulterants; for example, in palm oil [176], as well as the quantitative analysis of adulteration was feasible using miniaturized NIR spectroscopy. Examples of successful authentication or classification/identification of various food products included the different quality grades and geographical origins of rice, as well as of basic food powders such as sugar, salt, cream, flour, corn, rice, bean, and potato powders [177]. The prediction of other quality parameters of more general nature; e.g., egg storage time assessment, was permissible as well [174]. The GPR method used for the calibration hyphenated enabled the handheld instruments to quantify protein content with a good accuracy; the MicroNIR performed on par with the benchtop instrument, with the Tellspec and SCiO sensors being only moderately inferior, and as evidenced by independent test-set validation; further gains in the prediction performance for consumer-graded "pocket food analyzers" were achieved by data fusion [183] Prediction of egg storage time at room temperature using an ultra-cost-efficient miniaturized NIR spectrometer 30 shell-intact brown poultry eggs SCiO PLSR, ANN The smartphone-connected, ultra-cost-efficient NIR spectrometer was successfully validated in egg storage time assessment; the long-term reliability was optimal when combined with traditional destructive techniques    An inspection of the available literature well demonstrated the versatility and superior utility of miniaturized NIR spectrometers in the diverse realm of food analysis and quality control. On the other hand, attention should be also given to some of the limitations in the applicability of handheld NIR instruments; for example, chlorophyll content could not be accurately predicted in canola seed, as determined by Barthet et al. [186].

Systematic Evaluation of Calibration Methods
In parallel to their revolutionary practical advantages, miniaturized technologies also impose inevitable limitations on the optical/spectral capabilities of the very compact NIR instruments. Spectra measured in narrow wavenumber regions with a relatively low resolution and an often-inferior S/N ratio, as compared with benchtop spectrometers, place a particular need on performing systematic feasibility studies of miniaturized NIR spectrometers in given analytical scenarios. In this case, the evaluation of numerous spectral pretreatments and calibration algorithms, including artificial neural networks (ANNs) and nonlinear regression methods (e.g., Gaussian process regression (GPR)) is recommended to establish the best data-analytical approach for a given sensor in a specific analytical scenario. As demonstrated, this may result in a sizeable improvement in the predictive performance of portable NIR spectrometers, surpassing PLSR with minimal or no penalties to the prediction performance of handheld vs. benchtop spectroscopy in difficult analyses (e.g., moisture analysis in a plant matrix). Advanced calibration enables miniaturized spectrometers to nearly match the performance of benchtop instruments.
As shown by Mayr et al. [31], the analytical performance of miniaturized spectrometers in a challenging scenario of the quantitative analysis of the moisture in chemically complex plant matrices could be significantly improved by carefully evaluating several different spectral pretreatments and calibration methods, which were systematically evaluated for each of the considered benchtop and miniaturized NIR spectrometers. In that study, two benchtop instruments (NIRFlex N-500 and MPA I) and three miniaturized instruments (microPHAZIR, MicroNIR 2200, and MicroNIR 1700 ES) were used, while the analysis of the moisture content was performed for 192 samples of dried plant extracts, consisting of five different plants of different geographical origins harvested at different times over two years. The samples included extracts laced with a drying agent, as well as unpretreated samples that presented a less-stable matrix that was prone to variations in the moisture content. The reference moisture analysis for calibration was performed using an industry standard; i.e., the Karl Fischer titration method. Moisture content is one of the most important quality parameters of numerous food products, including spices, teas, fruits, and vegetables, as well as in herbal medicines. It is decisive for the product stability and shelf life, and requires close monitoring. In the analyzed scenario, for the calibration/prediction procedure, in addition to the standard PLSR method, GPR and ANN models also were constructed for the spectral sets of each instrument. For each spectral set, a systematic evaluation of the best pretreatment combination was conducted as well. The prediction performances of those calibration models were evaluated through the root-mean-square error of prediction (RMSEP) determined for an independent test set ( Table 10). The nonlinear GPR and ANN methods were noted to offer substantially improved performances in the case of poorer quality of the spectra from certain instruments, as well as in the case of the more challenging analysis of unpretreated samples. In this case, the miniaturized spectrometers offered a prediction performance at the level of the benchtop instruments (Table 10). Moreover, the samples in their native states proved to be more difficult to analyze for all evaluated instruments when using PLSR calibration [31]. That study demonstrated the potential of improving the analytical figure of merit of micro-NIR analysis for less-than-ideal data-sets; e.g., resulting from the difficult nature of the analyzed sample (i.e., chemically complex plant matrix) and the reduced quality of the spectra (i.e., narrow spectral region, lower resolution, and poorer S/N ratio typically accepted for the miniaturized spectrometers). This suggested that through systematic evaluation and selection of the data-analytical scheme, the penalty to the accuracy resulting from the hardware miniaturization can be compensated by using GPR or ANN calibration.

NIR Sensor Fusion
Data-fusion methodologies offer considerable potential, effectively combining strengths of different analytical techniques. The opportunities stemming from this concept for food and beverage authentication and quality assessment were discussed in detail by Borràs et al. [196]. However, relatively greater attention was paid to using conventional benchtop NIR spectroscopy as the component of the fused approaches.
For example, an integrated analytical framework using fused physicochemical analyses, benchtop NIR spectroscopy, and melissopalynology (pH, electrical conductivity, and humidity) was recently presented by Bodor et al. [197]. An analytical method was developed to check the authenticity of Hungarian honey, with PCA-LDA models built to classify the different botanical and geographic sources using individual and fused data at a low level (i.e., low-level data fusion). Optimization of the number of principal components (PCs) and external validation were applied to all models. The botanical origin classification models demonstrated >90% and >55% accuracy levels for the melissopalynology and NIR methods when used separately. Improved results were obtained by combining physicochemical, melissopalynology, and NIR techniques, resulting in >99% and >81% accuracy of the botanical and geographic origin classification models developed for the fused data, respectively. Although a benchtop NIR spectrometer was used in that study, a similar method can likely be designed to include miniaturized/portable NIR instruments as well.
On the other hand, a direct improvement of the performance of NIR sensors with mutually exclusive operational spectral regions can be accomplished by data fusion as well. Several cost-effective miniaturized NIR sensors appeared on the market that were specifically intended for food analysis [5][6][7]77]. These devices are potentially very interesting for the small-scale manufacturing of food, which is becoming increasingly popular. Efficient quality control in such production poses considerable difficulties, and the final product quality depends on the supplied ingredients. Miniaturized NIR spectrometers are particularly promising in such scenarios, but often manifest inferior performances compared to benchtop NIR spectrometers; in certain cases, no successful calibration by PLSR could be obtained for some sensors in particularly challenging analyses [31,99]. As discussed in the previous section, advanced calibration methods offer promising potential in such cases. Further gains can be obtained with sensor fusion, which offers a convenient uplift in performance by combining spectra measured in different wavenumber regions for extended access to chemical information for more reliable calibration.
Although still relatively scarce, studies of effective data-fusion strategies that integrated miniaturized NIR spectrometers have begun to attract growing attention in the fields of food and agriculture. In the study of Bec et al. [73], a benchtop (Buchi NIRFlex N-500) and three miniaturized (MicroNIR 1700 ES, Tellspec Enterprise sensor, and SCiO sensor) NIR spectrometers were evaluated and optimized within a calibration framework based on the PLSR and GPR methods for prediction of the protein content in fitness bars containing edible insect material. The analyzed protein content in the calibration series was between 19.3 and 23.0% (Table 11). In the nondestructive analysis of intact bars, the RMSEP values from the PLSR prediction were determined to be 0.611% for the benchtop, and remained in the range of 0.545 to 0.659% for the miniaturized spectrometers. The predictions by GPR models were 0.506% (benchtop) and 0.482-0.580% (miniaturized). When taking into account the milled samples, the corresponding RMSEP values for the PLSR prediction were improved to 0.210% for the benchtop spectrometer, but remained in the inferior range of 0.525-0.571% for the miniaturized devices. However, the RMSEP values for GPR prediction for the miniaturized spectrometers were noticeably improved to 0.230% (MicroNIR 1700 ES), 0.326% (Tellspec), and 0.338% (SCiO). In combination with the PLSR method, the portable instruments showed a significantly lower predictive performance as measured by the RMSEP values determined for the data from an independent test set. Using a nonlinear GPR calibration method significantly improved the accuracy of prediction of the miniaturized spectrometers, with the MicroNIR achieving a performance equal to the stationary instrument, while only a slightly worse performance was achieved by the Tellspec and SCiO sensors. Table 11. The parameters of the regression models constructed for the fused spectral data from the two cost-effective miniaturized NIR spectrometers (Tellspec Enterprise sensor and SCiO sensor) for the analysis of protein content in intact and milled bars. Analyzed protein concentration range: 19.3-23.0 % (w/w). Reproduced (CC-BY 4.0 license) from [73]. A further increase in the reliability of the analysis can be achieved by low-level fusion of the spectra from spectrometers measuring largely different, only partially overlapping fragments of NIR spectrum, such as the SCiO and Tellspec instruments considered in that study ( Figure 8). The Tellspec and SCiO sensors cover highly complementary VIS/SW-NIR and NIR wavelength ranges, with only a narrow overlap of the spectral regions measured by these two devices ( Figure 8). Therefore, an attempt was made to aggregate (i.e., concatenate) the data from these sensors to effectively provide the calibration model with an extended spectral region compared to any of these two spectrometers used separately. In the GPR calibration and test-set validation performed on the fused data (Tellspec + SCiO), the RMSEP values were improved to 0.517% (for intact samples) and 0.295% (for milled samples). Because the Tellspec and SCiO sensors are consumer-oriented devices with superior affordability, it is still a cost-effective and economical option to use them together to increase the accuracy and reliability of an analysis. Fused-sensor NIR spectroscopy, with the combined strengths of multiple miniaturized portable instruments, can be successfully used for rapid, nondestructive analysis of total protein content with better performance than the sensors used separately. successfully used for rapid, nondestructive analysis of total protein content with better performance than the sensors used separately.   Furthermore, Cavallini et al. [198] recently explored a midlevel data-fusion approach for three different NIR spectrometers: SCiO, MicroNIR, and a benchtop instrument (Bruker MPA). Additionally, covariance selection (CovSel) [199] and common dimensions (ComDim) [200] approaches were applied as well to establish a robust approach for distinguishing between fresh and frozen cephalopods. Interestingly, the authors noted that the similarities and differences among the datasets measured by these three instruments reflected their design characteristics.

Intact
The conclusions that might be drawn from the data-fusion studies involving miniaturized NIR sensors suggest that the profound instrumental differences often observed for these devices create a particular opportunity for fusion approaches to provide direct gains in analytical performance.
On the other hand, a different approach to reinforcing an analytical framework using miniaturized NIR spectrometers through a data-fusion approach stems from parallelization of spectra pretreatments. As concluded in numerous case studies, and as outlined in other sections of this review, miniaturized sensors often provide spectra of inferior quality, in various terms, compared to full-scale benchtop instruments. Often, most of the resulting distortions of the spectra (e.g., scattering profile, noise) can be corrected or suppressed by separately applied algorithms. However, a promising alternative is provided by applying the pretreatments in parallel and fusing the resulting datasets for further calibration and prediction. The methodological background of this concept was recently exhaustively presented by Mishra et al. [201]. Given the importance of the pretreatment step in processing the challenging spectral datasets often encountered in agri-food NIR analysis using miniaturized spectrometers, it should be expected that parallelized spectra pretreatment via data fusion will attract increasing attention in the development of analytical methods in the reviewed area of application.

Chemical Interpretation of Calibration Models and Instrumental Differences
With the recently provided availability of in silico simulated NIR spectra, it has become feasible to elucidate in detail the sensor sensitivity to specific chemical information, and thus gain a deeper insight into the critical factors that affect its prediction performance in a given analytical application. Accordingly, the differences in the prediction power of caffeine and L-theanine content in black tea using the microPHAZIR and MicroNIR instruments were analyzed in detail in a recent investigation by Mayr et al. [100]. The authors concluded that the sensitivities of these two miniaturized spectrometers to the characteristic absorption bands of these two components were distinct. This resulted from the observed substantial differences in the way the different NIR instruments recorded the chemical information of caffeine compared to theanine. Handheld spectrometers have shown a limited suitability for assessing theanine, as the meaningful absorption of this constituent falls outside the spectral region measured by these devices. On the contrary, the most characteristic absorption of caffeine is acquired by these handhelds, and as a consequence, their performance in analyzing caffeine content is comparable to that of a benchtop device. These observations suggest that the application of both spectrometers in the analysis of compounds structurally similar to caffeine may be successful, while in the chemicals structurally similar to theanine, it may be challenging for both instruments [100]. Similar conclusions have been drawn from the combined interpretation of the simulated spectrum of piperine and the chemometric models calibrated for the prediction of that chemical in the plant matrix of black pepper from the spectral datasets acquired by the same set of miniaturized spectrometers [99]. The noticeably different spectral regions that these devices measured illustrated a clear distinction between their abilities to acquire the meaningful absorption of a given constituent; in that case, piperine [99].
Another good example of how the comprehension of chemical information can be used in such scenario was provided by the further investigation by Grabska et al. into the patterns unveiled in the above-discussed studies [97]. In that study, the detailed band assignments of piperine offered insights into the correspondence of the PLS factors in the models describing piperine content in black pepper samples. The NIR vibrational contributions of piperine could be roughly established. The analysis using a benchtop spectrometer NIRFlex N-500 ( Figure 9A) and a handheld microPHAZIR ( Figure 9B) was dissected. The narrow spectral region in which the microPHAZIR operates (6266-4173 cm −1 ) was just enough to acquire the most meaningful absorption of piperine, with only weak second overtones and ternary combination bands populating the spectrum above 6150 cm −1 . Firstly, as expected, the structure of the loading plots for all factors indicated a clear correspondence with the absorption features of piperine. Interestingly, exclusion of the region between 5550 and 4950 cm −1 improved the performance of the prediction for the microPHAZIR. Comparing this information with the determined vibrational assignments, one may conclude that the contributions from weak CH combination bands of piperine to the NIR spectrum of black pepper were not acquired to a satisfactory degree by the microPHAZIR. The model constructed for the microPHAZIR required four factors to obtain the maximum predictive performance, while for the dataset from the benchtop spectrometer, the optimal number of factors was three. The structures of the first factors for both cases are quite similar, and these seem to capture the most intense bands of piperine. Note, the structure of the third factor in the case of benchtop spectrometer clearly stands out from the remaining ones, e.g., above 6000 cm −1 and in the region of 5300-4900 cm −1 . At these wavenumbers, one may see, standing out from the rest as well, the contributions from the combination bands involving CH and, to lesser extent, the ring deformation bands of piperine. The presence of the combinations involving ring deformation were also viable in the second factor for the benchtop spectrometer, where a distinct structure was observed near 4750-4500 cm −1 . correspondence with the absorption features of piperine. Interestingly, exclusion of the region between 5550 and 4950 cm -1 improved the performance of the prediction for the microPHAZIR. Comparing this information with the determined vibrational assignments, one may conclude that the contributions from weak CH combination bands of piperine to the NIR spectrum of black pepper were not acquired to a satisfactory degree by the microPHAZIR. The model constructed for the microPHAZIR required four factors to obtain the maximum predictive performance, while for the dataset from the benchtop spectrometer, the optimal number of factors was three. The structures of the first factors for both cases are quite similar, and these seem to capture the most intense bands of piperine. Note, the structure of the third factor in the case of benchtop spectrometer clearly stands out from the remaining ones, e.g., above 6000 cm -1 and in the region of 5300-4900 cm -1 . At these wavenumbers, one may see, standing out from the rest as well, the contributions from the combination bands involving CH and, to lesser extent, the ring deformation bands of piperine. The presence of the combinations involving ring deformation were also viable in the second factor for the benchtop spectrometer, where a distinct structure was observed near 4750-4500 cm -1 . The conclusions drawn in this study indicated that the laboratory spectrometer appeared to be more sensitive to the specific vibrations of piperine in black pepper. As shown, for example, by the factor 3 corresponding to νCH combination bands of piperine that was clearly distinct from the others (i.e., F-1 and F-2). There was also a significant part of the ring-deformation bands that contributed to the second and third factors in the PLSR model calibrated for the spectral set measured by the benchtop NIRFlex N-500 spectrometer. Therefore, in this case, a more accurate association between the distinct chemical information and the particular factors in the regression model was recorded. The conclusions drawn in this study indicated that the laboratory spectrometer appeared to be more sensitive to the specific vibrations of piperine in black pepper. As shown, for example, by the factor 3 corresponding to νCH combination bands of piperine that was clearly distinct from the others (i.e., F-1 and F-2). There was also a significant part of the ring-deformation bands that contributed to the second and third factors in the PLSR model calibrated for the spectral set measured by the benchtop NIRFlex N-500 spectrom-eter. Therefore, in this case, a more accurate association between the distinct chemical information and the particular factors in the regression model was recorded.
In contrast, the factors in the PLSR model constructed for the spectral set from the mi-croPHAZIR appeared to be less specific to individual vibrations of piperine. Consequently, the microPHAZIR was less capable of following fine spectral variations representing intensity changes in the spectrum related to a specific chemical constituent.
It is likely that the poorer spectral resolution of the miniaturized spectrometer also played a role here. It remains to be seen whether this observation can explain, at least in part, the poorer performance of the microPHAZIR spectrometer compared to the laboratory spectrometer in the analysis under discussion (root-mean-square of prediction; i.e., RMSEP of 0.30 and 0.18% w/w, respectively) [97].

Calibration Transfer
A calibration model, regardless of whether the intended problem to solve concerns classification (e.g., food authentication, identification of variety, brand, origin, etc.) or quantification (i.e., prediction of concentration of a targeted constituent, age of product, etc.) is generally valid only if the spectra used for predicting the property of interest is measured by the same spectrometer by which the calibration set was obtained. The critical difference here results from the disparity between two or more instruments with respect to key optical performance parameters such as the operating spectral region, wavelength accuracy, dynamic range, distance between sample and optics, the photometric response of the detector, etc. These differences are very likely to invalidate the prediction model when used with a different instrument, thus necessitating time-consuming calibration and validation for each specific spectrometer. On the other hand, in practical routines, often more than one NIR instrument; e.g., benchtop and miniaturized, or several miniaturized ones, are available at the site. Considerable gains in the efficiency of the analytical framework can be provided by the ability to perform calibration procedure on just one master instrument, which is then subsequently used for predictions from the spectra collected by the other sensors.
Various mathematical algorithms known as calibration-transfer or standardization strategies help convert models or data measured by a particular instrument for use by other instruments [202]. For this purpose, the following frameworks are widely used for eliminating the need for full recalibration: standardization of model coefficients, spectral responses, direct standardization (DS), segmental direct standardization (PDS), and spectral variations at each wavelength [202].
Examples demonstrating the utility value of calibration transfer in food analysis and quality control appeared in literature shortly after the first miniaturized spectrometers were popularized on the market. For example, the aim of the study of Pierna et al. [203] was to assess the possibility of transferring the calibration from the benchtop Foss NIRSystem 6500 instrument to the miniaturized microPHAZIR. In that case, good calibration models were obtained for the various feed properties (fat, fiber, protein, and starch) that were developed on the Foss NIRSystem 6500 on the basis of the spectral database of 9164 samples, and these were subsequently successfully transferred to the handheld spectrometer.
In another example, Zamora-Rojaset et al. [142] evaluated the performance of a miniaturized handheld NIRS instrument for assembling a meat-quality database from a highperformance benchtop NIR spectrometer. The authors showed that large databases of spectra of important samples collected over several years could be successfully transferred to a miniaturized, handheld NIR instrument, which is possibly better suited for in situ analysis on an industrial scale. The successful transfer of the database to the miniaturized NIR instrument provided considerable gains in efficiency and throughput of the analysis, particularly in a large-scale, low-cost online in situ analysis, a scenario that is commonly found in food industries.

Summary of Current Trends and Future Prospects
NIR spectroscopy is a powerful tool for qualitative and quantitative analyses involving different types of samples used in various industries. The canonical advantages of NIR spectroscopy; i.e., nondestructive analysis, high-throughput capacity, cost-effectiveness, and its "green" nature (i.e., no chemical solvent used, no expenditure of the product for the needs of analysis), form a perfect synergy with the novel, miniaturized sensor technology. With the advent of portable spectrometers, decisive enhancement of NIR spectroscopy in its utility in the agri-food sector was offered. The unique value of miniaturized NIR spectroscopy is best manifested in this sector, on which the analysis of complex, chemically and physically diverse samples of natural origin is focused; i.e., raw food materials, whole and highly processed foods, and agricultural crops. Importantly, this technology permits the persistent monitoring of food quality at every stage of its complex production and supply chain, from the farm to the shelf. In these applications, the revolutionary advantage of miniaturized sensors is manifested by the capacity to perform rapid, high-throughput analyses with no need for sample preparation directly onsite.
Accompanying progress in technology, recent breakthroughs in spectral-analysis methods and fundamental science have decisively changed our understanding of NIR spectra and largely expanded the potential for new applications. Comprehension of chemical information enables the interpretation of calibration models, while sensor fusion enhances the availability of the information correlated with food-quality parameters. The progress in data-analytical methods and the fundamental science underlying NIR spectra permit the knowledge-based design and optimization of the analytical application of NIR spectroscopy. These qualities have directly translated to a thriving development of new applications of miniaturized NIR spectroscopy, as it is readily available to combat foodsafety risks resulting from the globalization of the food market. Hence, it has become widely adopted in this critically important sector of public interest.
While immensely successful and widespread, the technology and applications of miniaturized NIR spectroscopy still face certain challenges that should be considered in the future. Unexplored areas such as sensor deterioration and transferability of the models to new generations of instruments have been signaled by recent reviews published in the field. On the other hand, ultraminiaturization and the trend aiming at providing ordinary consumers with a spectrometer in their pocket urge the reinforced reliability of precalibrated models, as well as the user-friendliness and accessibility of cloud-based services that are intended for the processing and analysis of the spectra from such sensors. The reliable and fail-proof operation of NIR spectrometers integrated with smartphones by nonexpert personnel and ordinary consumers would mark the next cornerstone of this technology in food analysis, provided that the outlined challenges are successfully addressed.