1. Introduction
In recent years, China has made strides in water–fertilizer integration technologies, embracing precision fertilizer application and intelligent irrigation [1]. Despite these advancements, there is still ground to cover before the international forefront is reached. The development of an intelligent water–fertilizer integration system is crucial for achieving precision irrigation [2,3]. This system relies on establishing predictive models for water and fertilizer, integrating advanced technologies for the real-time adjustment of variable irrigation, and ensuring the accurate quantitative management of agricultural products. The accurate online detection of each nutrient component in fertilizer solutions is essential for the precise regulation of water and fertilizers in irrigation [4]. However, online fertilizer detection often encounters challenges from environmental factors, leading to issues such as incomplete nutrient data, reduced accuracy, and slower processing speeds. Therefore, achieving dependable online fertilization detection remains a significant challenge for advancing intelligent control technologies in agricultural management.
Fertilizer component information primarily includes the main nutrients and their concentrations within water–fertilizer mixtures. The main online detection methods for fertilizer components at present, both domestically and internationally, include the EC/pH, ion-selective electrode (ISE), and dielectric property detection methods.
The EC/pH method utilizes sensors’ electrical conductivity and pH to measure overall ionic composition in fertilizer solutions. However, it lacks precision in differentiating individual ion concentrations [5,6]. The ISE method employs specific electrode membranes to precisely measure target ion concentrations and activities [7], but it may encounter cross-sensitivity issues among ions, potentially affecting measurement accuracy [8]. The dielectric property detection method uses capacitive sensors to measure the solution’s relative permittivity, suggesting composition and concentration changes based on variations in dielectric constant. Challenges remain regarding the reliability and stability of frequency prediction techniques.
In addition, near-infrared (NIR) spectroscopy has gained prominence in academia and industry for its ability to selectively absorb light based on functional group characteristics in substances. In recent years, the integration of machine learning methods has revolutionized data analysis, particularly in classification and regression tasks, due to their advanced feature extraction capabilities. Zhi dan Lin et al. undertook a comprehensive spectral scanning and chemical profiling of a substantial volume of soil and fertilizer specimens utilizing visible and near-infrared (VIS/NIR) techniques. Leveraging a genetic algorithm (GA)-based model, precise forecasts were achieved for parameters such as organic matter content (OMC), total nitrogen in soil, as well as nitrogen, phosphorus, and potassium levels in fertilizer [9]. Similarly, Mohammadreza Khanmohammadi et al. employed a chemometric approach amalgamating mid-frequency FTIR spectroscopy with the successive projection algorithm (SPA) for wavelength selection, coupled with a feed-forward back-propagation artificial neural network (BP-ANN) model, to quantify protein content in yogurt samples. The BP-ANN and SPA-BP-ANN methods yielded relative errors (REP) of 7.25 and 3.70, respectively, in predicting the calibration set [10]. Furthermore, Song Le et al. harnessed near-infrared diffuse reflectance spectroscopy to ascertain the composition of compound fertilizers, specifically the content of urea, diurea, and other constituents. Following appropriate preprocessing, partial least squares (PLS) regression achieved initial test coefficients, R2, of 0.9861 and 0.9713, underscoring its efficacy [11].
The research objective of this paper is to propose a fast and non-destructive method for detecting fertilizer component information based on NIR spectroscopy, and to improve the accuracy and robustness of the model via spectral pre-processing and feature extraction. Three different algorithms, i.e., BPNN, PLS, and SVM models, are compared to construct an optimal model for fertilizer component identification and concentration prediction. Based on this theory, a corresponding detection device is developed and integrated with hardware and software systems to achieve fertilizer type identification and rapid online concentration detection.
2. Materials and Methods
2.1. Sample Selection and Preparation
As the main effective nutrients of the N, P, and K fertilizers that are actually applied to agricultural production crops are NH4+, K+, and total phosphorus (PO43−, HPO42−, H2PO4−) [12], in this paper, potassium sulfate (K2SO4, 99%), diammonium hydrogen phosphate ((NH4)2HPO4, 99%), potassium dihydrogen phosphate (KH2PO4, 99%), and ammonium sulfate ((NH4)2SO4, 99%) were purchased from Sinopharm Chemical Reagent Co., Ltd., Shanghai, China. Each fertilizer solution was configured with ten concentration gradients (10–100 mg/L at 10 mg/L intervals) using deionized water, with four samples replicated at each concentration. Finally, all samples were stored at room temperature until measurements were taken. The sample configuration was carried out in the college laboratory.
2.2. Acquisition of Near-Infrared Spectra
The spectral data collection for this study was conducted in the laboratory of Faculty of Environmental Science and Engineering at Kunming University of Science and Technology, using a Cary 5000 NIR spectrophotometer capable of detecting wavelengths from 700 to 2500 nm. The fertilizer solutions under investigation were prepared by adding drops into two-thirds of a quartz cuvette, which was then placed in the instrument’s detection tank. The NIR spectrophotometer scanned absorbance spectral curves of the four standard solutions across the entire wavelength range. Each fertilizer solution was scanned five times, and the resulting spectra were averaged to obtain spectral data comprising 1800 wavelengths, each associated with its own absorbance value. Subsequently, 160 sets of wavelength-absorbance spectral data were generated for the four fertilizer solutions. These datasets were then randomly divided into a calibration set and a prediction set in a 3:1 ratio using a random selection method. These sets were employed for the subsequent qualitative and quantitative modeling analyses of the fertilizer solutions (Figure 1a).
2.3. Spectral Pre-Processing and Feature Selection
To mitigate interference from background noise and other unwanted factors in the measured spectra of fertilizer samples [13], the spectral data must undergo preprocessing before modeling. Savitzky–Golay (S-G) smoothing was employed for this purpose, which involves fitting low-order polynomials to adjacent points using least squares. This technique effectively reduces noise, enhances the signal-to-noise ratio, and preserves the essential characteristics of the spectral data [14].
Moreover, this study collects extensive NIR spectral data, which may contain redundancy, covariance, and overlapping information that can impact model accuracy and robustness [15]. Thus, it becomes essential to extract characteristic wavelengths from the raw spectra. Here, Competitive Adaptive Reweighted Sampling (CARS) was utilized to achieve this. CARS operates on a principle akin to natural selection, where variables with higher regression coefficients are given greater weight during iterative feature selection. This approach ensures that emphasis is placed on variables with stronger predictive power in the model [16].
2.4. Classification and Regression Prediction Methods for Spectral Data
In this paper, three different machine learning algorithms, Partial Least Squares Discriminant Analysis (PLS-DA), Support Vector Machine (SVM), and Back-Propagation Neural Network (BPNN), were adopted to treat the prediction model for the construction of nutrient ion species and determination of their concentrations in the measured fertilizer solution. After comprehensively comparing and analyzing the prediction results of the three methods, an optimal classification and regression prediction model was finally selected based on the model evaluation index.
Partial Least Squares Discriminant Analysis (PLS-DA) can effectively extract useful signals from noise by decomposing the spectral information and the corresponding concentration matrices [11], which improves the signal-to-noise ratio and reduces the multicollinearity problem in the data, and significantly improves the reliability and accuracy of the analyzed data.
Support Vector Machine (SVM) focuses on segmenting two independent regions by finding an optimal separating hyperplane to distinguish between different classes of data points, which is based on maximizing the distance between the data points closest to the hyperplane (i.e., the support vectors) [17]. Not only is this approach applicable to classification tasks, but the same principle has been extended to regression problems, called support vector regression (SVR) [18].
The Back-Propagation Neural Network (BPNN) corrects the network using a back-propagation algorithm that gradually adjusts the network weights and biases to minimize the error between the network output and the desired output. In spectral analysis, BPNN is widely used to identify and quantitatively analyze the spectral data of various substances due to its powerful non-linear mapping ability and self-learning capability. The identification of spectral features of different substances by the calibration network can achieve the fast and accurate identification of unknown samples.
2.5. Modeling Assessment
The performance of the classification model is evaluated by sensitivity, specificity, and accuracy for each category [19]. These are calculated using the following equations:
(1)
(2)
(3)
TP (true positives) refers to the number of samples correctly classified as ‘category 1’; FN (false negatives) refers to the number of samples that belonged to ‘category 1’ but were incorrectly classified as ‘category 0’; TN (true negatives) refers to the number of samples correctly classified as ‘category 0’; and FP (false positives) refers to the number of samples correctly classified as ‘category 0’. FN (false negatives) represents the number of samples that belonged to ‘Category 1’ but were incorrectly classified as ‘Category 0’; TN (true negatives) represents the number of samples that were correctly classified as ‘Category 0’; FP (false positives) represents the number of samples that belonged to ‘Category 0’ but were incorrectly classified as ‘Category 1’. False positives (FP) are the number of samples that belonged to category 0 but were misclassified as category 1. The total number of samples is denoted by N, where n is the total number of different categories.
When assessing the performance of regression models, the coefficient of determination (R2), the root mean square error (RMSE), and the residual prediction deviation (RPD) are commonly used as key indicators of model performance. The value of R² ranges from 0 to 1, and the closer the value of R2 is to 1, the more closely the model predicts the content of nutrient ionic constituents to the actual observations, and the better the fit [20]. Smaller values of RMSEC and RMSEP indicate a smaller deviation between the model predictions and the actual measurements, indicating a higher predictive accuracy of the model [21]. RPD is mainly used to assess the predictive accuracy and overall validity of the model regarding the data. It measures the stability and reliability of the model’s predictive ability, with larger RPD values indicating a better predictive performance of the model [22].
2.6. Development of Fertilizer Detection Sensor
2.6.1. Fertilizer Detection Sensor Design and Principle
To enhance the detection of fertilizer components, a sensor-based device utilizing near-infrared detection principles was developed. The device’s structure is depicted in (Figure 2a); it was designed in a cylindrical format to seamlessly integrate with the fertilizer pipeline. It includes a detector housing, a sensor unit, and a connector for pipeline integration. The sensor features four detection channels, each equipped with components such as LED light-emitting diodes (manufactured by Zhongwei Optoelectronic Technology (Hangzhou) Co., Ltd., ZVISION, Hangzhou, China), quartz glass plates, LED fixed stubs, optoelectronic receiving port bases, and a fertilizer inlet/outlet, as illustrated in (Figure 2b,c). This design ensures robust protection and light control, facilitating precise connection to the delivery line and ensuring the accurate detection of fertilizer solution components.
The detection device designed in this paper is mainly based on the absorbance of the fertilizer solution to be tested. From the Lambert–Beer law, the relationship between absorbance and incident light and transmitted light is as follows:
(4)
where A is the absorbance of the measured solution; I0 is the intensity of incident monochromatic light; It is the intensity of transmitted light.The intensity of incident light and transmitted light in each detection channel are expressed as the output voltage (Vi and Vt) of the two photodetectors. In order to eliminate, as far as possible, the influence of the light in the actual detection environment on the detection results of the device, the photodetector detects and records the ambient light corresponding to the voltage Va once in advance each time before switching on the LED light source for detection. The formula for calculating the absorbance is as follows:
(5)
where A is the absorbance; Vi is the detection voltage value of the photodetector for detecting the incident light intensity of the channel; Vt is the detection voltage value of the photodetector for detecting the transmitted light intensity of the channel.2.6.2. Signal Conditioning Circuitry
To address the challenge of noise interference in photodetector output, a signal conditioning circuit (Figure S1, Supplementary Materials) is employed to convert the weak current signal into a specified voltage signal. The initial step involves an (I–V) conversion circuit utilizing a high-precision operational amplifier, AD825 (U1), and a T-shaped feedback network. This circuit efficiently transforms the current output into a voltage signal. Following this, the gain amplifier circuit, centered around the operational amplifier LF353N (U2) and associated resistive–capacitive components, amplifies the voltage signal’s amplitude post-conversion. The careful selection of components and adjustment of potentiometer RP1 enable a flexible gain adjustment of up to 100 times, ensuring precise regulation of the output voltage signal’s amplitude.
2.6.3. Fertilizer Sensor Stability Analysis
Stability prediction serves as a crucial tool in evaluating the stability of the detection device, as the accuracy of the absorbance measurement hinges directly on the stability of voltage values during the measurement process. To ensure the reliability of the detection device’s output, a comprehensive prediction of voltage stability is imperative, focusing primarily on three key components: LED light source stability, transmitted light detection stability, and ambient light. To achieve this, NH4+ solutions at five concentrations—20, 40, 60, 80, and 100 mg/L—were employed as the test fertilizer solutions. Each test was conducted continuously for 3 h, with the corresponding photodetectors’ output voltage recorded every 15 min.
2.6.4. Detection Strategies for Sensors
This paper proposes a detection method for fertilizer components utilizing detection devices, following a ‘first qualitative, then quantitative’ approach. The method involves sequentially activating four LED light sources of specific wavelengths within the instrument, each illuminating the corresponding detection channel for a precise spectroscopic analysis of the fertilizer solution under examination. As the characteristic wavelengths of light traverse through the fertilizer solution, the photodetectors sequentially receive the transmission signals of each wavelength and convert them into voltage values. These voltage values are further transformed into absorbance values, enabling the identification of the fertilizer type based on the range of absorbance values. Subsequently, the specific absorbance value is utilized in the appropriate concentration detection model to calculate the specific concentration. The implementation of this detection strategy is depicted in Figure 3.
3. Results and Discussion
3.1. Spectral Pre-Processing and Spectral Characteristics of Four Fertilizer Solutions
Figure 4 depicts the absorbance spectra of all four fertilizer solutions across the entire spectral range. The horizontal coordinate corresponds to the NIR wavelength of the fertilizer solution and the vertical coordinate corresponds to the amount of absorbance produced by the NIR light source illuminating the fertilizer solution. Notably, the spectral curves of distinct nutrient ions exhibit discernible discrepancies in peak and trough patterns at specific wavelengths, alongside variations in peak shape, position, and absorption intensity. To discern the spectral nuances of the four fertilizer solutions and extract pivotal information from the spectral data, the Savitzky–Golay (S-G) smoothing method was employed. This preprocessing step forms the groundwork for the subsequent qualitative and quantitative modeling analyses of the four fertilizers under examination. The resulting spectra post S−G preprocessing are illustrated in (Figure 5).
3.2. Selection of Effective Characteristic Wavelengths for Near-Infrared Spectral Response Data of Fertilizer Solutions
Figure S3 (Supplementary Materials) depicts the competitive adaptive reweighted sampling (CARS) algorithm utilized for screening samples of HPO42− fertilizer solution nutrient ions to identify characteristic wavelengths. In Figure S3a, the rapid reduction in the number of selected wavelengths is evident during the initial sampling phase. With the increase in sample size, this reduction gradually decelerates. Concurrently, (RMSECV) exhibits a pattern of initially decreasing and then continuously increasing. The initial decrease signifies the effective removal of irrelevant noise information, while the subsequent increase suggests the potential loss of valid information during the process, as illustrated in Figure S3b. Subsequently, Figure S3c showcases the progression of regression coefficients for each wavelength during feature selection. The blue ‘*’ denotes the optimal sampling point where the lowest RMSECV is achieved, indicating the effectiveness of the selected wavelengths for screening.
The 50 characteristic wavelengths identified by CARS successfully captured the information related to HPO42−. These wavelengths are depicted in the average spectral map shown in Figure 6, primarily concentrated in the vicinity of 980 nm. Detailed feature extractions (Figures S4–S6) for the other three fertilizer solutions are available in the Supplementary Materials. Specifically, the feature wavelengths were concentrated around 1450, 1550, and 1600 nm, with selected feature points identified as 70, 60, and 29, respectively.
By comparing related studies, Lin Zhidan et al. [9] used CARS to select 161, 229, and 161 spectral characteristic wavelengths as the spectral characteristic wavelengths for N, P, and K nutrient contents, respectively. PLS and ELM models were developed. Under the optimal prediction model, R2 was 0.989, 0.963, and 0.981, respectively. The characteristic wavelength bands selected by Sun Di, Li Mengting et al. [23], based on the near mid-infrared spectroscopy and applying the SIPLS method to the total phosphorus content of faucal water in dairy plants, were also 10,400~9600 cm−1 (961~1041 nm), which is similar to the selection of characteristic wavelength points in this paper.
3.3. Fertilizer Component Classification Prediction Model
Three methods, (PLS-DA), (SVM), and (BPNN), as well as a combination of S-G smoothings, were used for the classification-prediction modelling analysis of the nutrient ions of the four fertilizer solutions to be tested. Figure 7 shows the confusion matrices generated by the optimal BPNN, while the other two confusion matrices are presented in Figures S4 and S5 (Supplementary Materials), from which it can be seen that the sensitivities of the K+ samples obtained by the BPNN model are all 100%. Compared to the original spectra, the accuracy of the corrected set of models processed by S-G preprocessing improved from 99.17% to 100%, while that of the predicted set improved significantly, from 87.18% to 98.35%.
Table 1 shows the classification results of all the models, and it can be seen that the three models obtained after S-G pre-processing achieved a better performance in most cases compared to the models under the original spectra, while the BPNN model after S-G pre-processing achieved very high sensitivity to K+, HPO42−, H2PO4−, and NH4+ on both the calibration and prediction datasets, with an accuracy of 98.35%, which are all better than the other models. Zhiwei Jiang et al. developed near-infrared spectroscopy (NIRS) combined with five different types of machine learning methods to better identify botanical and geographical sources of AR. The results showed that SNV + BPNN performed best in plant origin classification, identifying both with more than 90% accuracy [24]. Fei Liu et al. investigated visible and near-infrared (Vis/NIR) spectroscopy combined with a back-propagation neural network (BPNN) to achieve the fast discrimination of instant milk tea. The BPNN prediction results showed a 98.7% recognition rate in the validation set [25].
3.4. Fertilizer Component Concentration Prediction Model
In this study, we used PLSR, SVR, and BPNN for the predictive modelling of nutrient ion concentration in the fertilizer solution and screened the best model. Table 2 shows the evaluation results of the three regression algorithms for predicting the nutrient ion concentrations in the four fertilizer samples based on the wavelengths selected by CARS. For K+, the CARS BPNN model gave the best prediction, with an R2 as high as 0.9879, an RMSEP of 0.3201 mg/L, and an RPD of 8.7947. H2PO4− was also better predicted by the CARS-BPNN model, with an R2 of 0.9592, RMSEP of 0.7160 mg/L, and RPD of 4.2287. For NH4+, the BPNN model obtained better correction (R2: 0.9971 vs. 0.9830) and prediction (R2: 0.9955 vs. 0.9245) results using CARS than using the full spectrum, suggesting that the use of eigenwave lengths is particularly effective for the BPNN algorithm. The CARS BPNN model was the best predictor of HPO42− concentration, with an R2 of 0.9936, RMSEP of 0.0177 mg/L and RPD of 12.6860.
(Figure 8) shows the correlation between the true and predicted values in the BPNN prediction model for the four fertilizer solutions that were tested. It can be clearly seen that the scattered points are concentrated around the y = x line in both the training and test sets, especially for (NH4)2HPO4, indicating a high degree of agreement between the predicted and actual values.
A comprehensive comparison of the performance of the three models in terms of concentration prediction shows that, after optimization using the CARS method, the performance of each model generally achieves a significant improvement, demonstrating the effectiveness of the CARS method in optimizing the performance of regression models. Shen Jengang [26] achieved R2 values of 0.989, 0.963, and 0.981 in the regression model of fertilizer powder after CARS feature extraction in NIR spectra and construction of PLS, ELM, and SVM, while the RMSEP values were 0.910, 1.724, and 1.393, respectively. Wang Xiaoke [27] completed the regression modelling of the elemental content of nitrogen, phosphorus, and potassium in the NIR spectra of fertilizer samples based on PLS, and the R2 was greater than 0.83. Wang Lingling [28] proposed a quantitative analytical method for the determination of total nitrogen content in monoammonium phosphate (MAP) fertilizers using Visible–Near-Infrared (Vis-NIR) spectroscopy and LS-SVM. The results showed that LS-SVM calibration using discrete wavelet transform was the best predictor of total nitrogen content in MAP fertilizers with R2, RMSEP, and RPD values of 0.91, 0.101, and 3.34, respectively.
3.5. Analysis of Characteristic Wavelength Selection and Prediction Modeling of Detection Devices
The analysis reveals that the characteristic wavelengths of the four fertilizer solutions are primarily concentrated around 980, 1450, 1550, and 1600 nm. This concentration suggests that crucial information is prominently expressed at these wavelengths. Consequently, a linear regression analysis was conducted to explore the relationship between concentration and absorbance for each of the four nutrient ions across ten concentration gradients at their respective characteristic wavelengths. The findings indicate a strong correlation between the nutrient ions and their characteristic wavelengths, as depicted in (Figure 9), with R2 values exceeding 0.95. This high degree of fit demonstrates the efficacy of the linear model in predicting absorbance changes based on wavelength, aligning with the fundamental assumptions of linear regression and fulfilling requirements for both speed and accuracy. Thus, these results offer valuable insights for selecting appropriate light sources and designing the structural framework of fertilizer solution component detection devices.
As can be seen in Figure 9, the absorbance ranges of the four nutrient ions at their respective characteristic wavelengths are also significantly different. the maximum value of absorbance A of HPO42− was less than 1; the minimum value of absorbance A of NH4+ was greater than 3.1; the absorbance values of H2PO4− were in the range of 3.02–3.09; the absorbance values of K+ ranged from 1.95 to 2.07. Therefore, when identifying the type of fertilizer to be tested, the fertilizer to be tested can be irradiated by four characteristic wavelengths of 980, 1450, 1550, and 1600 nm in turn, and the absorbance extremes of the nutrient ions at these wavelengths can be used to determine whether or not the fertilizer to be tested contains HPO42−, NH4+, H2PO4−, and K+. The identification of the type of fertilizer is completed.
Based on the relationship between absorbance and concentration of the four ions at their respective characteristic wavelengths, fitting the corresponding linear regression model. As shown in Figure 9, the absorbance of four nutrient ions, HPO42−, NH4+, H2PO4−, and K+, at the characteristic wavelengths of 980, 1450, 1550, and 1600 nm, respectively, showed a linear positive correlation with the concentration. Through linear regression, the prediction model of the concentration of the fertilizer solution and the absorbance at the characteristic wavelengths was established, as shown in Table 3.
3.6. Stability Analysis of the Fertilizer Sensor
In this paper the stability of the fertilizer sensor has also been analyzed in terms of LED irradiance voltage, transmission voltage, and ambient light voltage. The results are shown in Figure 10, the three voltage values of the fertilizer solution at each concentration do not fluctuate much, so it can be assumed that the effect on the stability of the device is small or negligible.
3.7. Accuracy of Fertilizer Component Type Identification
Ten different concentrations of HPO42−, NH4+, H2PO4−, and K+ fertilizer solutions were subjected to testing across four detection channels, with each concentration undergoing five repetitions. During each experiment, the voltages corresponding to the incident and transmitted light received by the photodetectors in the four detection channels were recorded. Subsequently, absorbances A1, A2, A3, and A4 of the four detection channels were calculated using Equation (5), facilitating the judgment of the fertilizer types under examination based on the extremes of absorbance for each nutrient ion at these wavelengths. Ultimately, the accuracy of the fertilizer species identification was determined by tallying the number of correct identifications.
The confusion matrices of the test results are depicted in Figure 11. Notably, (NH4)2HPO4 was correctly identified 48 times, resulting in a species identification accuracy of 96%; (NH4)2SO4 was correctly identified 45 times, with a species identification accuracy of 90%; KH2PO4 was correctly identified 44 times, achieving a species identification accuracy of 88%; K2SO4 was correctly identified 49 times, yielding a species identification accuracy of 98%. From the experimental results, it can be seen that the average accuracy of the fertilizer detection device for four types of fertilizer solution for species identification is 93%, showing a better ability to identify the types of fertilizer solution. Wu Hao et al. [29] designed a sensor based on the dielectric properties of a water-soluble fertilizer, in which the detection accuracy of K2SO4 solution using e-frequency was 97.43%, slightly lower than that of K+ (98%) in this paper, while the detection accuracy of the KH2PO4 solution was 94.8% higher than that of H2PO4− in this paper.
3.8. Fertilizer Component Concentration Detection Accuracy
After identifying the types of fertilizer solutions, the absorbance data obtained from each type were input into the fertilizer concentration prediction model described previously. The measurement results are presented in Table 4, detailing the detected concentrations calculated using the fertilizer solution detection model. The accuracy of the fertilizer concentration detection model was verified by computing the relative error between the actual and measured concentrations, as illustrated in Figure 12.
Figure 12 illustrates the concentration detection errors of the sensor across the four configurations of fertilizer solutions. Notably, for the K+ solution, the maximum relative error does not exceed 6%, indicating a highly desirable detection accuracy. Regarding the detection results of the H2PO4− solution, it is observed that within the low-concentration range below 50 mg/L, the detected concentration closely aligns with the actual concentration, with the lowest relative error recorded at 0.12%. In the higher-concentration range, although the detected concentration tends to slightly surpass the actual concentration, the overall relative error remains within the acceptable range (<±7%), reflecting consistent performance. For the NH4+ solution, the detected values closely mirror the actual values across most concentrations, except for the 40 mg/L concentration, where the relative error peaks at 7.65%. Lastly, the results for HPO42− exhibit excellent agreement, with the detected values almost perfectly matching the actual values.
Li J et al. [30] designed a cylindrical capacitance sensor based on the dielectric properties of fertilizer solutions, with KCL, Ca(H2PO4)2-H2O, and H2NCONH2 as the test object, and the maximum relative error of its sensor concentration detection was 7.26%. Li Yunqing et al. [31] designed a NO3− selective electrode-based detection device, in which the maximum error caused by H2PO4− in the detection of NO3− concentration can reach up to 16%; compared with the sensor designed in this paper, it achieved better results.
4. Conclusions
This paper proposes a rapid detection method using near-infrared spectrophotometry to determine the concentrations of four fertilizer solutions: (NH4)2SO4, K2SO4, (NH4)2HPO4, and KH2PO4.
(1) Firstly, qualitative and quantitative prediction models for fertilizer liquid components were developed using NIR spectroscopy and machine learning algorithms to assess their feasibility. The Back-Propagation Neural Network (BPNN) demonstrated superior qualitative accuracy (98.35%) in identifying all four fertilizer liquids compared to the Partial Least Squares Discriminant Analysis (PLS-DA) model (94.87%) and Support Vector Machine (SVM) model (87.18%). Additionally, the CARS-BPNN model effectively predicted concentrations, achieving RMSE values ranging from 0.01777 to 0.7160.
(2) Subsequently, characteristic wavelengths (980 nm, 1450 nm, 1550 nm, and 1600 nm) were identified through CARS. A four-channel online fertilizer composition testing device was designed using the characteristic wavelength determined by Lambert–Beer’s law (980 nm). The detection strategy prioritized qualitative assessment followed by quantitative analysis, achieving 93% accuracy in identifying the four types of fertilizers. Concentration detection RMSE values ranged from 1.0034 to 2.4947, with errors of less than ±8.0%. The sensor’s detection accuracy slightly trailed behind that of the full-spectrum BPNN prediction results. These findings collectively enhance the feasibility of practical engineering applications.
To broaden the applicability and versatility of the sensors, future research could extend its scope to include a wider range of fertilizer solution types and concentrations. This study lays a promising technological foundation for the development of sensors capable of efficiently, rapidly, and cost-effectively detecting fertilizer solution information. Future developments might focus on integrating full-spectrum fertilizer solution detection sensors with advanced machine learning models to enhance their accuracy and efficiency, despite potential increased costs. Moreover, this technology holds promise for applications in water–fertilizer integration systems, providing critical support for precise variable-rate fertilizer application.
Conceptualization, Y.M. and J.L.; methodology, Z.W. and S.C.; software, Y.M. and S.C.; validation, Y.C. and J.L.; formal analysis, Y.M. and J.L.; investigation, Z.W. and Y.C.; resources, J.L.; data curation, Z.W. and J.L.; writing—original draft preparation, J.L. and Z.W.; writing—review and editing, Y.M. and J.L.; visualization, Y.M.; supervision, J.L.; project administration, Y.M.; funding acquisition, J.L. All authors have read and agreed to the published version of the manuscript.
Not applicable.
The original contributions presented in the study are included in the article/
The authors declare no conflicts of interest.
Footnotes
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Figure 1. Development strategy of NIR fertilizer detection sensors: (a) acquisition and pre-processing of NIR absorption spectra of four fertilizer liquids; (b) determination of characteristic wavelengths and construction of qualitative and quantitative models; (c) design of sensor structures and amplifier circuits; and (d) detection strategy of qualitative analysis followed by quantitative assessment.
Figure 2. Fertilizer detection sensor; (a) overall structure of the sensor; (b) exterior structure of the sensor; (c) internal structure of the sensor; (d) physical drawing of the fertilizer sensor.
Figure 4. Raw spectra of nutrient ions of four fertilizer solutions to be tested.
Figure 5. S-G pretreatment spectra of nutrient ions of four fertilizer solutions to be tested.
Figure 7. Comparison of the original spectra with the confusion matrix of the four-classification prediction set obtained by S-G preprocessing combined with BPNN: (a) raw spectrum; (b) S-G preprocessing.
Figure 8. Correlation between true and predicted values in the BPNN prediction model for four fertilizer solutions to be tested. (a) KH2PO4 quantity contained (b) K2SO4 quantity contained (c) (NH4)2SO quantity contained (d) (NH4)2HPO4 quantity contained.
Figure 9. Fitting curves of concentration and absorbance at characteristic wavelengths of four fertilizers to be tested: (a) HPO4− (980 nm); (b) NH4+ (1450 nm); (c) H2PO4− (1550 nm); (d) K+ (1600 nm).
Figure 10. Stability test of fertilizer detection device: (a) LED irradiation voltage value; (b) transmission voltage value; (c) ambient light voltage value.
Figure 11. Confusion matrix for identifying nutrient ion types in four fertilizer solutions.
Figure 12. The concentration detection error of the sensor for four kinds of configured fertilizer solution.
Comparison of four classification results obtained by S−G preprocessing combined with PLS-DA, SVM, and BPNN modeling, respectively.
Modeling | Correction Set | Prediction Set | |||||||
---|---|---|---|---|---|---|---|---|---|
K+ | H2PO4− | HPO42− | NH4+ | K+ | H2PO4− | HPO42− | NH4+ | ||
Raw-PLS | SENS (%) | 100 | 96.90 | 86.20 | 100 | 100 | 75 | 81.8 | 60 |
SPEC (%) | 100 | 96.7 | 85.8 | 100 | 100 | 67.65 | 83.87 | 100 | |
ACC (%) | 95.87 | 84.62 | |||||||
S-G-PLS | SENS (%) | 100 | 100 | 100 | 100 | 100 | 83.3 | 100 | 100 |
SPEC (%) | 100 | 100 | 100 | 100 | 100 | 93.1 | 100 | 100 | |
ACC (%) | 100 | 94.87 | |||||||
Raw-SVM | SENS (%) | 100 | 93.90 | 96 | 94.10 | 100 | 85.70 | 64.70 | 63.60 |
SPEC (%) | 100 | 96.90 | 85.70 | 100 | 36.40 | 75 | 91.70 | 87.50 | |
ACC (%) | 95.87 | 71.95 | |||||||
S-G-SVM | SENS (%) | 100 | 100 | 100 | 100 | 50 | 100 | 100 | 100 |
SPEC (%) | 100 | 100 | 100 | 100 | 100 | 83.3 | 96.7 | 100 | |
ACC (%) | 100 | 87.18 | |||||||
Raw-BPNN | SENS (%) | 100 | 100 | 96.9 | 100 | 100 | 87.5 | 63.6 | 100 |
SPEC (%) | 100 | 98.85 | 100 | 100 | 100 | 95.8 | 87.9 | 100 | |
ACC (%) | 99.17 | 87.18 | |||||||
S-G-BPNN | SENS (%) | 100 | 100 | 100 | 100 | 100 | 93.3 | 100 | 100 |
SPEC (%) | 100 | 100 | 100 | 100 | 100 | 97.85 | 100 | 100 | |
ACC (%) | 100 | 98.35 |
PLSR, SVR, and BPNN statistics for predicting nutrient ion concentrations in four fertilizer samples using full and eigen spectral modeling.
Fertilizer Type | Wavelength | Modeling | Correction Set | Prediction Set | RPD | ||
---|---|---|---|---|---|---|---|
R c 2 | RMSEC | R p 2 | RMSEP | ||||
K+ | Full | PLSR | 0.9031 | 0.2830 | 0.9029 | 0.8180 | 3.4995 |
SVR | 0.9355 | 0.5867 | 0.7705 | 1.5367 | 6.8459 | ||
BPNN | 0.9829 | 0.2035 | 0.7981 | 0.9307 | 2.3104 | ||
CARS | PLSR | 0.9927 | 0.1878 | 0.9235 | 0.6140 | 4.9311 | |
SVR | 0.9585 | 0.5828 | 0.9550 | 0.8202 | 6.8459 | ||
BPNN | 0.9958 | 0.1848 | 0.9879 | 0.3201 | 8.7947 | ||
H2PO4− | Full | PLSR | 0.9248 | 0.2705 | 0.9038 | 0.8223 | 3.4817 |
SVR | 0.9914 | 0.2667 | 0.7885 | 0.9352 | 2.3370 | ||
BPNN | 0.8022 | 1.9768 | 0.7102 | 2.1008 | 1.4722 | ||
CARS | PLSR | 0.9883 | 0.2372 | 0.9208 | 0.7351 | 3.5614 | |
SVR | 0.9380 | 0.7452 | 0.5356 | 1.6371 | 1.1029 | ||
BPNN | 0.9249 | 0.7409 | 0.9592 | 0.7160 | 4.2287 | ||
NH4+ | Full | PLSR | 0.9895 | 0.0632 | 0.9182 | 0.7102 | 3.5063 |
SVR | 0.9809 | 0.0895 | 0.9346 | 0.6814 | 3.7464 | ||
BPNN | 0.9830 | 0.3780 | 0.9245 | 0.7482 | 3.6503 | ||
CARS | PLSR | 0.9987 | 0.4389 | 0.9520 | 0.4903 | 6.1752 | |
SVR | 0.9962 | 0.0819 | 0.7894 | 0.9803 | 3.1387 | ||
BPNN | 0.9971 | 0.1522 | 0.9955 | 0.2036 | 14.9451 | ||
HPO42− | Full | PLSR | 0.9885 | 0.0431 | 0.9508 | 0.0589 | 5.3663 |
SVR | 0.9982 | 0.0815 | 0.7186 | 3.0436 | 1.0886 | ||
BPNN | 0.9475 | 0.6710 | 0.9529 | 0.5840 | 4.8282 | ||
CARS | PLSR | 0.9998 | 0.0278 | 0.9908 | 0.0374 | 8.8580 | |
SVR | 0.9970 | 0.0849 | 0.9884 | 0.3280 | 5.0983 | ||
BPNN | 0.9962 | 0.1824 | 0.9936 | 0.0177 | 12.6860 |
Predictive models for ion concentrations of the four fertilizer solutions to be tested.
Nutrient Ion | Characteristic Wavelength Concentration Prediction Model | R 2 |
---|---|---|
HPO42− | y = 0.5915 + 0.0004x | 0.9624 |
NH4+ | y = 3.1026 + 0.00006x | 0.9573 |
H2PO4− | y = 3.0936 + 0.0006x | 0.9552 |
K+ | y = 1.9402 + 0.0013x | 0.9560 |
Absorbance and predicted concentration results for four 10–100 mg/L nutrient examples.
Nutrient Ion | Actual Concentration mg/L | Absorbance | Predicted Concentration mg/L | R 2 | RMSE |
---|---|---|---|---|---|
K+ | 10 | 1.954 | 10.26 | 0.9953 | 1.9683 |
20 | 1.966 | 20.19 | |||
30 | 1.977 | 28.31 | |||
40 | 1.991 | 38.98 | |||
50 | 2.003 | 48.53 | |||
60 | 2.020 | 61.49 | |||
70 | 2.033 | 71.61 | |||
80 | 2.049 | 83.56 | |||
90 | 2.057 | 90.20 | |||
100 | 2.065 | 9.12 | |||
H2PO4− | 10 | 3.099 | 9.68 | 0.9959 | 2.4947 |
20 | 3.106 | 21.18 | |||
30 | 3.113 | 32.07 | |||
40 | 3.118 | 40.05 | |||
50 | 3.126 | 53.21 | |||
60 | 3.130 | 64.12 | |||
70 | 3.137 | 71.54 | |||
80 | 3.144 | 83.96 | |||
90 | 3.149 | 92.72 | |||
100 | 3.152 | 98.07 | |||
NH4+ | 10 | 3.103 | 9.52 | 0.9970 | 1.6518 |
20 | 3.104 | 20.62 | |||
30 | 3.105 | 29.87 | |||
40 | 3.105 | 43.06 | |||
50 | 3.106 | 51.09 | |||
60 | 3.106 | 61.33 | |||
70 | 3.107 | 69.82 | |||
80 | 3.108 | 78.09 | |||
90 | 3.108 | 92.78 | |||
100 | 3.109 | 98.29 | |||
HPO42− | 10 | 0.596 | 10.25 | 0.9991 | 1.0034 |
20 | 0.600 | 21.19 | |||
30 | 0.603 | 29.88 | |||
40 | 0.608 | 42.01 | |||
50 | 0.612 | 50.68 | |||
60 | 0.615 | 58.94 | |||
70 | 0.620 | 71.05 | |||
80 | 0.624 | 80.33 | |||
90 | 0.628 | 91.07 | |||
100 | 0.631 | 99.23 |
Supplementary Materials
The following supporting information can be downloaded at:
References
1. Gao, Z.; Du, S.; Zhong, Y.; Wu, Y.; Zhang, G. Water Fertiliser Integration Development Status and Prospects. China Agric. Inform.; 2015; 27, pp. 14-19.
2. Sun, F.; Ma, W.; Li, H.; Wang, S. Research on Water-Fertilizer Integrated Technology Based On Neural Network Prediction and Fuzzy Control. IOP Conf. Ser. Earth Environ. Sci.; 2018; 170, 32168. [DOI: https://dx.doi.org/10.1088/1755-1315/170/3/032168]
3. Cai, C.; Zheng, P.; Zhang, J. Integrated Monitor System of Water and Fertilizer of Greenhouse Intelligent Irrigation. Jiangsu Agric. Sci.; 2017; 45, pp. 164-166.
4. Lu, H.; Wang, T.; Qiao, D.; Sun, J.; Wu, G.; Tian, C.; Yan, F.; Zhen, B. Internet of Things in Irrigated Agriculture: From Irrigation Automation to Smart Irrigation. J. Irrig. Drain.; 2023; 42, pp. 87-99.
5. Song, J.; Xu, L.; He, D.; Tuskagoshi, S.; Kozai, T.; Shinohara, Y. Estimating EC and Ionic EC Contribution Percentage of Nutrient Solution Based on Ionic Activity. Int. J. Agric. Biol. Eng.; 2019; 12, pp. 42-48. [DOI: https://dx.doi.org/10.25165/j.ijabe.20191202.4399]
6. Moon, T.; Ahn, T.I.; Son, J.E. Long Short-Term Memory for a Model-Free Estimation of Macronutrient Ion Concentrations of Root-Zone in Closed-Loop Soilless Cultures. Plant Methods; 2019; 15, 59. [DOI: https://dx.doi.org/10.1186/s13007-019-0443-7] [PubMed: https://www.ncbi.nlm.nih.gov/pubmed/31160918]
7. Chen, F.; Wei, D.; Tang, Y. Virtual Ion Selective Electrode for Online Measurement of Nutrient Solution Components. IEEE Sens. J.; 2011; 11, pp. 462-468. [DOI: https://dx.doi.org/10.1109/JSEN.2010.2060479]
8. Cecconi, F.; Reifsnyder, S.; Ito, Y.; Jimenez, M.; Sobhani, R.; Rosso, D. ISE-Ammonium Sensors in WRRFs: Field Assessment of Their Influencing Factors. Environ. Sci. Water Res. Technol.; 2019; 5, pp. 737-746. [DOI: https://dx.doi.org/10.1039/C8EW00763B]
9. Lin, Z.; Wang, R.; Wang, Y.; Wang, L.; Lu, C.; Liu, Y.; Zhang, Z.; Zhu, L. Accurate and Rapid Detection of Soil and Fertilizer Properties Based on Visible/near-Infrared Spectroscopy. Appl. Opt.; 2018; 57, pp. D69-D73. [DOI: https://dx.doi.org/10.1364/AO.57.000D69]
10. Khanmohammadi, M.; Garmarudi, A.B.; Ghasemi, K.; Garrigues, S.; de la Guardia, M. Artificial Neural Network for Quantitative Determination of Total Protein in Yogurt by Infrared Spectrometry. Microchem. J.; 2009; 91, pp. 47-52. [DOI: https://dx.doi.org/10.1016/j.microc.2008.07.003]
11. Song, L.; Zhang, H.; Ni, X.; Wu, L.; Lin, B.; Yu, L.; Wang, Q.; Wu, Y. Quantitative Analysis of Contents in Compound Fertilizer and Application Research Using Near Infrared Reflectance Spectroscopy. Spectrosc. Spectr. Anal.; 2014; 34, pp. 73-77.
12. Yahaya, S.M.; Mahmud, A.A.; Abdullahi, M.; Haruna, A. Recent Advances in the Chemistry of Nitrogen, Phosphorus and Potassium as Fertilizers in Soil: A Review. Pedosphere; 2023; 33, pp. 385-406. [DOI: https://dx.doi.org/10.1016/j.pedsph.2022.07.012]
13. Bian, X.; Wang, K.; Tan, E.; Diwu, P.; Zhang, F.; Guo, Y. A Selective Ensemble Preprocessing Strategy for Near-Infrared Spectral Quantitative Analysis of Complex Samples. Chemom. Intell. Lab. Syst.; 2020; 197, 103916. [DOI: https://dx.doi.org/10.1016/j.chemolab.2019.103916]
14. Zhang, G.; Hao, H.; Wang, Y.; Jiang, Y.; Shi, J.; Yu, J.; Cui, X.; Li, J.; Zhou, S.; Yu, B. Optimized Adaptive Savitzky-Golay Filtering Algorithm Based on Deep Learning Network for Absorption Spectroscopy. Spectrochim. Acta Part A Mol. Biomol. Spectrosc.; 2021; 263, 120187. [DOI: https://dx.doi.org/10.1016/j.saa.2021.120187]
15. Jiang, H.; Zhang, H.; Chen, Q.; Mei, C.; Liu, G. Identification of Solid State Fermentation Degree with FT-NIR Spectroscopy: Comparison of Wavelength Variable Selection Methods of CARS and SCARS. Spectrochim. Acta Part A Mol. Biomol. Spectrosc.; 2015; 149, pp. 1-7. [DOI: https://dx.doi.org/10.1016/j.saa.2015.04.024]
16. Li, H.; Liang, Y.; Xu, Q.; Cao, D. Key Wavelengths Screening Using Competitive Adaptive Reweighted Sampling Method for Multivariate Calibration. Anal. Chim. Acta; 2009; 648, pp. 77-84. [DOI: https://dx.doi.org/10.1016/j.aca.2009.06.046]
17. Liang, L.; Zhang, T.; Wang, K.; Tang, H.; Yang, X.; Zhu, X.; Duan, Y.; Li, H. Classification of Steel Materials by Laser-Induced Breakdown Spectroscopy Coupled with Support Vector Machines. Appl. Opt.; 2014; 53, pp. 544-552. [DOI: https://dx.doi.org/10.1364/AO.53.000544]
18. Yu, C.J.; He, Y.Y.; Quan, T.F. Frequency Spectrum Prediction Method Based on EMD and SVR. Intell. Syst. Des. Appl.; 2008; 3, pp. 39-44.
19. Li, Q.; Zeng, J.; Lin, L.; Zhang, J.; Zhu, J.; Yao, L.; Wang, S.; Yao, Z.; Wu, Z. Low Risk of Category Misdiagnosis of Rice Syrup Adulteration in Three Botanical Origin Honey by ATR-FTIR and General Model. Food Chem.; 2020; 332, 127356. [DOI: https://dx.doi.org/10.1016/j.foodchem.2020.127356]
20. Li, L.; Ren, T.; Wang, S.; Ming, J.; Liu, Q.; Lu, J. Prediction Models of Winter Oilseed Rape Yield Based on Hyperspectral Data at Pod-Filling Stage. Trans. Chin. Soc. Agric. Mach.; 2017; 48, pp. 221-229.
21. Zhang, Z.; Tai, X.; Yang, N.; Zhang, J.; Huang, X.; Chen, Q. UAV Multispectral Remote Sensing Soil Salinity Inversion Based on Different Fractional Vegetation Coverages. Trans. Chin. Soc. Agric. Mach.; 2022; 53, pp. 220-230.
22. Orrillo, I.; Cruz-Tirado, J.P.; Cardenas, A.; Oruna, M.; Carnero, A.; Barbin, D.F.; Siche, R. Hyperspectral Imaging as a Powerful Tool for Identification of Papaya Seeds in Black Pepper. Food Control; 2019; 101, pp. 45-52. [DOI: https://dx.doi.org/10.1016/j.foodcont.2019.02.036]
23. Sun, D.; Li, M.; Mou, M.; Zhao, R.; Zhang, K. Rapid Determination of Nitrogen and Phosphorus in Dairy Farm Slurry Via Near-Mid Infrared Fusion Spectroscopy Technology. Spectrosc. Spectr. Anal.; 2021; 41, pp. 3092-3098.
24. Jiang, Z.; Jin, K.; Zhong, L.; Zheng, Y.; Shao, Q.; Zhang, A. Near-Infrared Spectroscopy Combined with Machine Learning for Rapid Identification of Atractylodis Rhizoma Decoction Pieces. Ind. Crops Prod.; 2023; 197, 116579. [DOI: https://dx.doi.org/10.1016/j.indcrop.2023.116579]
25. Liu, F.; Ye, X.; He, Y.; Wang, L. Application of Visible/near Infrared Spectroscopy and Chemometric Calibrations for Variety Discrimination of Instant Milk Teas. J. Food Eng.; 2009; 93, pp. 127-133. [DOI: https://dx.doi.org/10.1016/j.jfoodeng.2009.01.004]
26. Shen, J.; Qiao, W.; Chen, H.; Zhou, J.; Liu, F. Application of Visible/Near Infrared Spectrometers to Quickly Detect the Nitrogen, Phosphorus, and Potassium Content of Chemical Fertilizers. Appl. Sci.; 2021; 11, 5103. [DOI: https://dx.doi.org/10.3390/app11115103]
27. Wang, X.; Zhao, C.; Dong, D. High-Throughput Online Measurement of Nutrient Contents in Moving Fertilizers-Based on near Infrared Spectrum and Chemometrics. Jiangsu Agric. Sci.; 2018; 46, pp. 238-240.
28. Wang, L.S.; Wang, R.J.; Lu, C.P.; Wang, J.; Huang, W.; Jian, Q.; Wang, Y.B.; Lin, L.Z.; Song, L.T. Quantitative Analysis of Total Nitrogen Content in Monoammonium Phosphate Fertilizer Using Visible-Near Infrared Spectroscopy and Least Squares Support Vector Machine. J. Appl. Spectrosc.; 2019; 86, pp. 465-469. [DOI: https://dx.doi.org/10.1007/s10812-019-00842-0]
29. Wu, H.; Li, J.; Zhang, J.; Ma, Z.; Waleed, E. Development of Rapid Identification Device for Variety of Macronutrient Water Soluble Fertilizers Based on Dielectric Characteristic Frequency. Trans. Chin. Soc. Agric. Eng. (Trans. CSAE); 2017; 33, pp. 51-58.
30. Li, J.; Gao, Y.; Zeng, J.; Li, X.; Wu, Z.; Wang, G. Online Rapid Detection Method of Fertilizer Solution Information Based on Characteristic Frequency Response Features. Sensors; 2023; 23, 1116. [DOI: https://dx.doi.org/10.3390/s23031116]
31. Li, J.; Li, Y.; Yang, Q.; Lei, L.; Wu, Z. Development of Real-Time Detecting Device for Nitrogen Concentration of Liquid Fertilizer. Trans. Chin. Soc. Agric. Eng.; 2015; 31, pp. 139-145.
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Abstract
The online detection of fertilizer information is pivotal for precise and intelligent variable-rate fertilizer application. However, traditional methods face challenges such as the complex quantification of multiple components and sensor-induced cross-contamination. This study investigates integrating near-infrared principles with machine learning algorithms to identify fertilizer types and concentrations. We utilized near-infrared transmission spectroscopy and applied Partial Least Squares Discriminant Analysis (PLS-DA), Support Vector Machine (SVM), and Back-Propagation Neural Network (BPNN) algorithms to analyze full spectrum data. The BPNN model, using S-G smoothing, demonstrated a superior classification performance for the nutrient ions of four fertilizer solutions: HPO42−, NH4+, H2PO4− and K+. Optimization using the competitive adaptive reweighted sampling (CARS) method yielded BPNN model RMSE values of 0.3201, 0.7160, 0.2036, and 0.0177 for HPO42−, NH4+, H2PO4−, and K+, respectively. Building on this foundation, we designed a four-channel fertilizer detection device based on the Lambert–Beer law, enabling the real-time detection of fertilizer types and concentrations. The test results confirmed the device’s robust stability, achieving 93% accuracy in identifying fertilizer types and concentrations, with RMSE values ranging from 1.0034 to 2.4947, all within ±8.0% error margin. This study addresses the practical requirements for online fertilizer detection in agricultural engineering, laying the groundwork for efficient water–fertilizer integration technology aligned with sustainable development goals.
You have requested "on-the-fly" machine translation of selected content from our databases. This functionality is provided solely for your convenience and is in no way intended to replace human translation. Show full disclaimer
Neither ProQuest nor its licensors make any representations or warranties with respect to the translations. The translations are automatically generated "AS IS" and "AS AVAILABLE" and are not retained in our systems. PROQUEST AND ITS LICENSORS SPECIFICALLY DISCLAIM ANY AND ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES FOR AVAILABILITY, ACCURACY, TIMELINESS, COMPLETENESS, NON-INFRINGMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Your use of the translations is subject to all use restrictions contained in your Electronic Products License Agreement and by using the translation functionality you agree to forgo any and all claims against ProQuest or its licensors for your use of the translation functionality and any output derived there from. Hide full disclaimer