Optimization of quantitative detection model for benzoic acid in wheat flour based on CARS variable selection and THz spectroscopy


Food safety has been an issue of common concern in today’s society. Excessive benzoic acid (BA) additives in wheat flour would pose a huge threat to human health. In this paper, terahertz (THz) time-domain spectroscopy was used to detect BA quantitatively, which is a preservative additive in flour. Samples were prepared by grinding, drying, weighing, mixing and performing successively according to the designed concentration gradient (concentration 0.04%, 0.08%, 0.1%, 0.2%, 0.4%, 0.5%, 1%, 1.5%, …, 10%), with the BA concentration ranging from 0.040% to 19.99%. Then the THz Spectra of wheat flour samples with different concentrations of BA were collected. After preprocessing the original terahertz spectra with multiple scattering correction and other methods, Competitive Adaptive Reweighted Sampling (CARS), Genetic Algorithm (GA), Principal Component Analysis (PCA) and Uninformative Variable Elimination (UVE) were used to select effective spectral bands, and then Partial Least Squares (PLS) and Least Square Support Vector Machine (LS-SVM) models were established respectively. It turned out that the absorption peak of BA was at 1.94 THz of terahertz absorption coefficient, which increased with the rise of BA concentration. The results also indicated that better modeling results could be obtained by using CARS method for variable selection. And the established CARS-PCA-LS-SVM model had the best prediction result by combining PCA with CARS, with the correlation coefficient of the prediction (Rp) of 0.9956 and Root Mean Square Error of Prediction (RMSEP) of 0.64%. Hence, it can be concluded that terahertz technology combined with LS-SVM model can well achieve the quantitative detection of BA concentration in flour. Although the model is not universal since samples size is not large enough, the research method provides a basis for the detection of BA additives in flour.

This is a preview of subscription content, log in to check access.

Fig. 2
Fig. 5
Fig. 6


  1. 1.

    G. Bilge, B. Sezer, K.E. Eseller et al., Determination of whey adulteration in milk powder by using laser induced breakdown spectroscopy[J]. Food Chem. 212, 183–188 (2016)

    CAS  Article  Google Scholar 

  2. 2.

    M. Huang, M.S. Kim, S.R. Delwiche et al., Quantitative analysis of melamine in milk powders using near-infrared hyperspectral imaging and band ratio[J]. J. Food Eng. 181, 10–19 (2016)

    CAS  Article  Google Scholar 

  3. 3.

    GB 2760–2014, National health and family planning commission of the People’s Republic of China, 2014.

  4. 4.

    J. Qin, L. Xie, Y. Ying, Determination of tetracycline hydrochloride by terahertz spectroscopy with PLSR model[J]. Food Chem. 170, 415–422 (2015)

    CAS  Article  Google Scholar 

  5. 5.

    S.K. Mathanker, P.R. Weckler, N. Wang, Terahertz (THz) applications in food and agriculture: A review[J]. Transactions of the ASABE 56(3), 1213–1226 (2013)

    Google Scholar 

  6. 6.

    A. Redo-Sanchez, G. Salvatella, R. Galceran et al., Assessment of terahertz spectroscopy to detect antibiotic residues in food and feed matrices[J]. Analyst 136(8), 1733–1738 (2011)

    CAS  Article  Google Scholar 

  7. 7.

    J. Liu, Terahertz spectroscopy and chemometric tools for rapid identification of adulterated dairy product [J]. Opt. Quant. Electron. 49, 1–8 (2017)

    Article  Google Scholar 

  8. 8.

    S. Lu, X. Zhang, Z. Zhang et al., Quantitative measurements of binary amino acids mixtures in yellow foxtail millet by terahertz time domain spectroscopy[J]. Food Chem. 211, 494–501 (2016)

    CAS  Article  Google Scholar 

  9. 9.

    H. Ge, Y. Jiang, F. Lian et al., Quantitative determination of aflatoxin B1 concentration in acetonitrile by chemometric methods using terahertz spectroscopy[J]. Food Chem. 209, 286–292 (2016)

    CAS  Article  Google Scholar 

  10. 10.

    X. Wang, W. Huang, Q. Wang et al., Analysis of Benzoic Acid by Raman Hyperspectral Imaging. J Food science 38(40), 290–295 (2017)

    Google Scholar 

  11. 11.

    W. Yuan, Determination of acesulfame, saccharin sodium, benzoic acid, sorbic acid and dehydroacetic acid in baked food by ultra-high performance liquid chromatography [J]. Health Research 44(04), 681–683 (2015)

    CAS  Google Scholar 

  12. 12.

    I.T. Jolliffe, J. Cadima, Principal component analysis: a review and recent developments[J]. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences 374(2065), 20150202 (2016)

    Article  Google Scholar 

  13. 13.

    L. Jiang, M. Li, C. Li, H. Sun, L. Xu, B. Jin, Y. Liu, Terahertz spectra of L-ascorbic acid and Thiamine hydrochloride studied by terahertz spectroscopy and density functional theory. Journal of Infrared, Millimeter, and Terahertz Waves 35, 871–880 (2014)

    CAS  Article  Google Scholar 

  14. 14.

    L. Duvillaret, F. Garet, J.L. Coutaz, Influence of noise on the characterization of materials by terahertz time-domain spectroscopy[J]. JOSA B 17(3), 452–461 (2000)

    CAS  Article  Google Scholar 

  15. 15.

    T.D. Dorney, R.G. Baraniuk, D.M. Mittleman, Material parameter estimation with terahertz time-domain spectroscopy[J]. JOSA A 18(7), 1562–1571 (2001)

    CAS  Article  Google Scholar 

  16. 16.

    Y.W. Chu, S.S. Tang, S.X. Ma et al., Accuracy and stability improvement for meat species identification using multiplicative scatter correction and laser-induced breakdown spectroscopy[J]. Opt. Express 26(8), 10119–10127 (2018)

    CAS  Article  Google Scholar 

  17. 17.

    F. Ali, S.M. Rasoolimanesh, M. Sarstedt et al., An assessment of the use of partial least squares structural equation modeling (PLS-SEM) in hospitality research[J]. International Journal of Contemporary Hospitality Management 30(1), 514–538 (2018)

    Article  Google Scholar 

  18. 18.

    A. Asfaram, M. Ghaedi, M.H.A. Azqhandi et al., Statistical experimental design, least squares-support vector machine (LS-SVM) and artificial neural network (ANN) methods for modeling the facilitated adsorption of methylene blue dye[J]. Rsc Advances 6(46), 40502–40516 (2016)

    CAS  Article  Google Scholar 

  19. 19.

    W. Deng, R. Yao, H. Zhao et al., A novel intelligent diagnosis method using optimal LS-SVM with improved PSO algorithm[J]. Soft. Comput. 23(7), 2445–2462 (2019)

    Article  Google Scholar 

  20. 20.

    J. Jiang, Q. Tan, W. Li et al., Use of Support Vector Regression Based on Mean Impact Value Model to Identify Active Compounds in a Combination of Curcuma longa L and Glycyrrhiza extracts. J Transactions of Tianjin University 23(3), 237–244 (2017)

    CAS  Article  Google Scholar 

  21. 21.

    H. Yan, Study on organic molecules by terahertz time-domain spectroscopy and theoretical calculations [D] (Graduate University of Chinese Academy of Sciences, Xi’an, 2012)

    Google Scholar 

  22. 22.

    X.W. Liu, X.Y. Cui, X.M. Yu et al., Understanding the thermal stability of human serum proteins with the related near-infrared spectral variables selected by Monte Carlo-uninformative variable elimination[J]. Chin. Chem. Lett. 28(7), 1447–1452 (2017)

    CAS  Article  Google Scholar 

  23. 23.

    M. Qiu, Z. Ming, J. Li et al., Phase-change memory optimization for green cloud with genetic algorithm[J]. IEEE Trans. Comput. 64(12), 3528–3540 (2015)

    Article  Google Scholar 

  24. 24.

    L. Nie, Z. Dai, S. Ma, Enhanced accuracy of near-infrared spectroscopy for traditional Chinese medicine with competitive adaptive reweighted sampling[J]. Anal. Lett. 49(14), 2259–2267 (2016)

    CAS  Article  Google Scholar 

  25. 25.

    Q. Li, Y. Huang, X. Song et al., Moving window smoothing on the ensemble of competitive adaptive reweighted sampling algorithm[J]. Spectrochim. Acta Part A Mol. Biomol. Spectrosc. 214, 129–138 (2019)

    CAS  Article  Google Scholar 

  26. 26.

    W. Chen, J. Zou, F. Wan et al., Application of surface enhanced Raman scattering and competitive adaptive reweighted sampling on detecting furfural dissolved in transformer oil [J]. AIP Adv. 8(3), 035204 (2018)

    Article  Google Scholar 

Download references


The authors gratefully acknowledged the financial support of National 863 Program (SS2012AA101306), “the 12th Five-Year Plan”, Jiangxi Advantageous Science and Technology Innovation Team Construction Plan (20153BCB24002),Collaborative Innovation Center Project of Intelligent Management Technology and Equipment for Southern Mountain Orchards (G.J.G.Z.[2014] No.60), National Natural Science Foundation of China (2002017018). Science and Technology Research Youth Project of Jiangxi Education Department (GJJ 190348); Innovation Fund Project for Doctoral Students of Jiangxi Province (YC2019-B106)

Author information



Corresponding author

Correspondence to Yande Liu.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Hu, J., Liu, Y., He, Y. et al. Optimization of quantitative detection model for benzoic acid in wheat flour based on CARS variable selection and THz spectroscopy. Food Measure (2020). https://doi.org/10.1007/s11694-020-00501-5

Download citation


  • Terahertz spectroscopy
  • LS-SVM
  • CARS
  • Wheat flour
  • Benzoic acid (BA)