###### Abstract  
The rapid determination of nitrogen, phosphorus, potassium and other major nutrient elements is an important technical guarantee in the quality control of chemical fertilizers. In this study, a small visible spectrometer and a small near-infrared spectrometer were used to collect spectrum information of 33 different common chemical fertilizers including compound fertilizers, blended fertilizers and controlled-release fertilizers. The 550-950 nm and 1050-1640 nm spectra with stable signals were intercepted as the analysis spectrum, and the competitive adaptive reweighted sampling algorithm (CARS) was used to select 161, 229, and 161 spectral characteristic wavelengths for the three nutrient contents of N, P\({}_{2}\)O\({}_{5}\), and K\({}_{2}\)O respectively. The partial least squares (PLS) and extreme learning machine (ELM) models of N, P\({}_{2}\)O\({}_{5}\), and K\({}_{2}\)O were established based on the 550-950 nm waveband, 1050-1640 nm waveband, full spectrum, and characteristic wavelength, respectively. The coefficient of determination (\(R^{2}\)), root mean square error (RMSE), and residual predictive deviation (RPD) were used to evaluate the effect of the model. With the optimal prediction models, the values of \(R_{p}^{2}\) for N, P\({}_{2}\)O\({}_{5}\), and K\({}_{2}\)O were 0.989, 0.963, 0.981, and for RPD were 9.71, 5.09, 7.29, respectively. The research results show that Vis/NIR spectroscopy can predict the content of nitrogen, phosphorus, and potassium nutrients in fertilizers, and the near-infrared band from 1050 nm to 1640 nm has a better prediction effect. The characteristic wavelength selection reduces the spectral variables by 9/10, and the performance of the model based on the characteristic wavelength is close to that of the full-spectrum model. chemical fertilizer; nitrogen; phosphorus; potassium; visible spectroscopy; near-infrared spectroscopy +
Footnote †: journal: Applied Sciences  
balanced fertilization and improve fertilizer utilization efficiency. Therefore, they are more and more widely used in agricultural production. Inorganic compound fertilizers mainly contain three macronutrient elements: nitrogen (N), phosphorus (P), and potassium (K). The three macronutrient elements have different effects on the growth of plants. Nitrogen is the main nutrient element in plants and the main element that constitutes plant proteins and enzymes. Nitrogen application can not only increase yield, but also increase photosynthesis, leaf area yield, and net assimilation rate [1]. Phosphorus is an important element for plant growth and production, and its content in the plant is about 0.05-0.5% of the total dry weight of the plant. At the whole plant level, phosphorus can stimulate seed germination, increase root and stem development and stem strength, promote the formation of flowers and seeds, and increase crop yields [2]. Potassium is a very active element in plants, generally in the form of K ions, shuttled inside and outside plant cells. Although potassium is not part of the main chemical structure of plants such as proteins, nucleic acids, lipids, peptides, amino acids, etc., it plays many important regulatory roles in the process of enzyme activation, sugar transport, protein synthesis, etc. It can improve crop yield and quality, and is necessary for many plant growth processes [3]. Most chemical fertilizers can apply multiple nutrient elements at the same time, but the percentage of each nutrient element in a single fertilizer is fixed. Therefore, it is necessary to accurately know the specific nutrient element composition of the fertilizer when using it. The inaccurate content of nutrient elements in the fertilizer will directly cause plant growth problems and pollution of the soil environment.