# Application of Near-Infrared Spectroscopy for Monitoring and/or Control of Composting Processes
## 4 Near-infrared Spectroscopy  
Near-infrared (NIR) spectroscopy is a commonly used spectroscopic technique dealing with the absorption, emission, and reflection of electromagnetic radiation in a wavelength range from 800 to 2500 nm [40]. It comprises both electronic and vibrational NIR spectroscopy. Furthermore, the NIR wavelength range has been divided into three regions: the first one encompasses the wavelength range from 800 to 1200 nm, forming a visible near-infrared region. Characteristics of this region include high permeability, enabling its application in medicine and agricultural industries. It is also specific due to the appearance of bands, which are consequences of electronic transitions, higher-order overtones, and combinations of fundamental vibrations of the XH bonds (X = C, N, O, S) [41; 42; 43]. The  
Figure 3: Composing technologies (adapted from [PERSON] et al. [31]). second region includes the wavelength range from 1200 to 2000 nm, containing a number of bands arising from the first and second overtones and combination modes. This wavelength range can be used for qualitative and quantitative analyses, but the permeability of the second region is low. The third region (2000-2500 nm) deals with the combination modes and can be used for various purposes, such as investigations about the structure of proteins; however, the third region is characterized by relatively low permeability [40; 44]. Due to fact that NIR spectra are often complex and possess broad overlapping absorption bands, the extraction of useful information from the NIR data set requires the use of chemometrics. Chemometric tools are used for defining the relationship between spectral information and sample properties [41; 45; 46]. Data preprocessing represents the first chemometric step for reliable NIR spectra analysis. Algorithms, such as baseline correction (BL), multiplicative scatter corrections (MSCs), standard normal variate (SNV), Savitzky-Golay (SG), and smoothing (SMTH), help to remove useless information, minimizing deviations caused by different measurement conditions (e.g., light, instrumental drift, light scattering, interferences, etc. ), all in order to achieve the quality of spectral data [47; 48]. The high-dimensionality of NIR spectral data needs to be reduced in order to prepare them for classification analyses [49]. Principal component analysis (PCA) is the most widespread applied multivariate method for data exploration and reduction, with the aim to find potential likenesses and/or disparities within observations and identify clusters or outlines [50]. Furthermore, PCA converts NIR spectra into variables that are not linearly correlated and enables meaningful patterns to be described or predicted from complex spectral prints. PCA is also very useful for the determination of important wavelengths that could contribute to further sample discrimination [48]. In addition to PCA as an exploratory technique, NIR spectra can also be modeled using partial least squares regression (PLS), partial least squares discriminant analysis (PLS-DA), linear discriminant analysis (LDA), and soft independent modeling using class analogy (SIMCA) (Figure 4). These classification algorithms are commonly utilized for classification or sample grouping into clusters according to their similarities or common spectral characteristics [48; 49; 50; 51; 52]. The quantitative characterization of specific compounds in samples can be performed by applying chemometric regression methods. Regression methods analyze the relationship between the NIR spectra (as raw, preprocessed, or as a set of particular wavelengths) and the physical/chemical features of the investigated samples [48; 53]. Partial least squares regression (PLS), principle component regression (PCR), multivariate curve resolution-alternating least squares (MCR-ALS), or parallel factor analysis (PARAFAC) are models applied for quantitative purposes, assuming linear relationship between predictors (independent variables) and predicted (dependent) variables (Figure 4).