Rapid Detection of Fertilizer Information Based on Near-Infrared Spectroscopy and Machine Learning and the Design of a Detection Device
Abstract
:1. Introduction
2. Materials and Methods
2.1. Sample Selection and Preparation
2.2. Acquisition of Near-Infrared Spectra
2.3. Spectral Pre-Processing and Feature Selection
2.4. Classification and Regression Prediction Methods for Spectral Data
2.5. Modeling Assessment
2.6. Development of Fertilizer Detection Sensor
2.6.1. Fertilizer Detection Sensor Design and Principle
2.6.2. Signal Conditioning Circuitry
2.6.3. Fertilizer Sensor Stability Analysis
2.6.4. Detection Strategies for Sensors
3. Results and Discussion
3.1. Spectral Pre-Processing and Spectral Characteristics of Four Fertilizer Solutions
3.2. Selection of Effective Characteristic Wavelengths for Near-Infrared Spectral Response Data of Fertilizer Solutions
3.3. Fertilizer Component Classification Prediction Model
3.4. Fertilizer Component Concentration Prediction Model
3.5. Analysis of Characteristic Wavelength Selection and Prediction Modeling of Detection Devices
3.6. Stability Analysis of the Fertilizer Sensor
3.7. Accuracy of Fertilizer Component Type Identification
3.8. Fertilizer Component Concentration Detection Accuracy
4. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Conflicts of Interest
References
- Gao, Z.; Du, S.; Zhong, Y.; Wu, Y.; Zhang, G. Water Fertiliser Integration Development Status and Prospects. China Agric. Inform. 2015, 27, 14–19. [Google Scholar]
- 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. [Google Scholar] [CrossRef]
- Cai, C.; Zheng, P.; Zhang, J. Integrated Monitor System of Water and Fertilizer of Greenhouse Intelligent Irrigation. Jiangsu Agric. Sci. 2017, 45, 164–166. [Google Scholar]
- 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, 87–99. [Google Scholar]
- 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, 42–48. [Google Scholar] [CrossRef]
- 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. [Google Scholar] [CrossRef] [PubMed]
- Chen, F.; Wei, D.; Tang, Y. Virtual Ion Selective Electrode for Online Measurement of Nutrient Solution Components. IEEE Sens. J. 2011, 11, 462–468. [Google Scholar] [CrossRef]
- 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, 737–746. [Google Scholar] [CrossRef]
- 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, D69–D73. [Google Scholar] [CrossRef]
- 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, 47–52. [Google Scholar] [CrossRef]
- 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, 73–77. [Google Scholar]
- 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, 385–406. [Google Scholar] [CrossRef]
- 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. [Google Scholar] [CrossRef]
- 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. [Google Scholar] [CrossRef]
- 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, 1–7. [Google Scholar] [CrossRef]
- 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, 77–84. [Google Scholar] [CrossRef]
- 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, 544–552. [Google Scholar] [CrossRef]
- Yu, C.J.; He, Y.Y.; Quan, T.F. Frequency Spectrum Prediction Method Based on EMD and SVR. Intell. Syst. Des. Appl. 2008, 3, 39–44. [Google Scholar]
- 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. [Google Scholar] [CrossRef]
- 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, 221–229. [Google Scholar]
- 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, 220–230. [Google Scholar]
- 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, 45–52. [Google Scholar] [CrossRef]
- 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, 3092–3098. [Google Scholar]
- 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. [Google Scholar] [CrossRef]
- 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, 127–133. [Google Scholar] [CrossRef]
- 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. [Google Scholar] [CrossRef]
- 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, 238–240. [Google Scholar]
- 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, 465–469. [Google Scholar] [CrossRef]
- 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, 51–58. [Google Scholar]
- 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. [Google Scholar] [CrossRef]
- 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, 139–145. [Google Scholar]
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 |
Fertilizer Type | Wavelength Selection Methods | Modeling | Correction Set | Prediction Set | RPD | ||
---|---|---|---|---|---|---|---|
Rc2 | RMSEC | Rp2 | RMSEP | ||||
K+ K2SO4 | 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− KH2PO4 | 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+ (NH4)2SO4 | 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− (NH4)2HPO4 | 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 |
Nutrient Ion | Characteristic Wavelength Concentration Prediction Model | R2 |
---|---|---|
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 |
Nutrient Ion | Actual Concentration mg/L | Absorbance | Predicted Concentration mg/L | R2 | 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 |
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. |
© 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/).
Share and Cite
Ma, Y.; Wu, Z.; Cheng, Y.; Chen, S.; Li, J. Rapid Detection of Fertilizer Information Based on Near-Infrared Spectroscopy and Machine Learning and the Design of a Detection Device. Agriculture 2024, 14, 1184. https://doi.org/10.3390/agriculture14071184
Ma Y, Wu Z, Cheng Y, Chen S, Li J. Rapid Detection of Fertilizer Information Based on Near-Infrared Spectroscopy and Machine Learning and the Design of a Detection Device. Agriculture. 2024; 14(7):1184. https://doi.org/10.3390/agriculture14071184
Chicago/Turabian StyleMa, Yongzheng, Zhuoyuan Wu, Yingying Cheng, Shihong Chen, and Jianian Li. 2024. "Rapid Detection of Fertilizer Information Based on Near-Infrared Spectroscopy and Machine Learning and the Design of a Detection Device" Agriculture 14, no. 7: 1184. https://doi.org/10.3390/agriculture14071184
APA StyleMa, Y., Wu, Z., Cheng, Y., Chen, S., & Li, J. (2024). Rapid Detection of Fertilizer Information Based on Near-Infrared Spectroscopy and Machine Learning and the Design of a Detection Device. Agriculture, 14(7), 1184. https://doi.org/10.3390/agriculture14071184