Abstract:The essence of anaerobic fermentation (AF) is the cultivation process of microorganisms, and the carbon-nitrogen ratio (C/N) is an important factor that affects the production of biogas. To quickly detect the C/N for the AF feedstocks, such as the pretreated corn stover, the mixture of corn stover and feces, a rapid detection model was constructed based on near infrared spectroscopy (NIRS) combined with partial least squares (PLS) regression. To further improve the detection accuracy and efficiency of the model, the genetic simulated annealing interval partial least squares algorithm (GSA-iPLS) and double genetic simulated annealing partial least squares algorithm (DGSA-PLS) based on genetic simulated annealing algorithm (GSA) were proposed for selecting the efficient spectral regions and characteristic wavelength points for NIRS, respectively. Totally 1844 wavelength points of the whole spectrum were selected by GSA-iPLS, and 641 wavelength variables were obtained, and 628 wavelength variables were obtained after the characteristic wavelength points were optimized by DGSA-PLS. The coefficients of multiple determination for prediction (R2p), root mean squared error of prediction (RMSEP) and residual predictive deviation (RPD) in DGSA-PLS regressive model were 0.920, 7.178 and 3.805, respectively. Compared with the whole spectrum model, the RMSEP was decreased by 15.87% in the DGSA-PLS model. It was shown that the number of wavelengths was significantly decreased after the optimization, and the performance of regressive model was obviously higher than that of the whole wavelengths. The research improved the adaptability of the prediction model based on optimizing sensitive wavelength variables for C/N, which provided a new way for directly rapid and accurate measurement of the C/N of AF feedstock.