| Mastitis is a common disease of the dairy cow with high incidence and serious damage,which has hindered the development of dairy farming in China for a long time.The somatic cell count(SCC)of raw milk has been used as the gold standard for mastitis detection and milk quality test in many countries.Therefore,rapid SCC detection is significant for preventing mammary gland infection,diagnosing mastitis,and reducing the incidence of mastitis.The current SCC detection methods had the disadvantages of complicated operation procedures,labor-intensive work,low detection accuracy,or high cost.Several studies showed that milk SCC could be predicted using visible/near-infrared and dielectric spectra.But the mechanism is unclear,the accuracy is low,and there is a lack of a rapid and low-cost detector.Therefore,near-infrared(NIR,833-2500 nm),visible/shortwave near-infrared(Vis SWNIR,633-1122 nm),and dielectric spectra(20-4500 MHz)were used for detecting milk SCC in this study.The effect of different mastitis grades(negative,weakly positive,and positive)on visible/near-infrared spectra and dielectric spectra and corresponding detection mechanisms were analyzed.Milk SCC was quantitatively predicted based on NIR,Vis SWNIR,and dielectric spectra of milk samples with different SCC,and the accuracy of these methods was compared.A rapid and low-cost SCC detector was developed based on dielectric spectra,and the fusion of Vis SWNIR spectra was explored to improve the accuracy of this SCC detector.The main contents and results of this research are listed as follows:(1)The influence of different mastitis grades on visible/near-infrared spectra and dielectric spectra was analyzed,and the corresponding SCC detection mechanisms were studied.For NIR and Vis SWNIR spectra,the absorbance of the negative mastitis sample was lower than that of the weakly positive and positive mastitis samples.The mastitis grades had no obvious effect on the dielectric constantε’below 100 MHz.At the frequency above 100MHz,theε’of the positive mastitis sample was lower than that of the negative and weakly positive mastitis samples.The loss factorε"increases with mastitis grades at a given frequency in the whole frequency range.The SCC detection by NIR spectra was mainly due to the fat,total solids,and electrical conductivity of milk samples.While the SCC detected using Vis SWNIR spectra was based on the SCC and protein of milk samples.The SCC detection with dielectric spectra was mainly due to the effect of mastitis on SCC,fat,protein,total solids,electric conductivity,and p H of milk samples.(2)Study on the SCC prediction based on NIR and Vis SWNIR spectra.The NIR and Vis SWNIR spectra of milk samples with different SCC were collected.After extracting spectral sensitive characteristics of SCC,several quantitative models were established to predict SCC.For NIR spectra,the support vector regression(SVR)models based on principal component analysis and uninformative variable elimination(UVE-SVR)had the best performance.The root mean squared error of prediction set(RMSEP)were both 0.30 log SCC/m L.The correlation coefficient of prediction set(R_p)and residual predictive deviation(RPD)were 0.84 and 0.80 and 1.67 and 1.67,respectively.For Vis SWNIR spectra,the SVR models with recursive feature elimination(RFE-SVR)and full Vis SWNIR spectra(FVS-SVR)could provide the best performance with the RMSEP of 0.25 and 0.26 log SCC/m L,respectively.The R_p and RPD of these two models were 0.89 and 2.24 and 0.89 and 2.15,respectively.Therefore,the NIR spectra can only discriminate low from high SCC,and the Vis SWNIR spectra could achieve better quantitative detection.(3)Study on the SCC prediction using dielectric spectra.The dielectric spectra of milk samples with different SCC were obtained.Based on the dielectric sensitive characteristics of SCC,several quantitative prediction models for SCC were established.The performance of SVR models was significantly better than other models based on different data reduction methods.The optimal model was the SVR model based on full dielectric spectra(FDS)with the RMSEP,R_p,and RPD of 0.20 log SCC/m L,0.90,and 2.32,respectively.(4)Development and validation of the rapid SCC detector based on dielectric spectra.A rapid SCC detector based on dielectric spectra was developed and verified.With a calculation model for relative complex permittivity,a low-cost and portable dielectric spectrometer was developed using the Raspberry Pi as the controller,the mini VNA as the dielectric spectra acquisition module,and the low-cost coaxial probe as the test probe.The dielectric spectra(100-3000 MHz)of milk samples with different SCC were obtained using this dielectric spectrometer,and quantitative SCC prediction models were built.The optimal models were imported into the dielectric spectrometer to develop the SCC detector,and the accuracy was verified.The relative errors of the calculation model for relative complex permittivity were within±5%for theε’andε".The spectrometer had good stability and accuracy at the whole frequency range.The coefficients of variation ofε’andε"were less than 1%and 2%,respectively.The relative errors of the spectrometer forε’andε"were within±3.4%and±6.0%,respectively.With the developed dielectric spectrometer,the optimal models were the RFE-SVR and the Nu SVR model based on FDS(FDS-Nu SVR)with the RMSEP of 0.28 log SCC/m L.Using RFE-SVR and FDS-Nu SVR as models,the RPDs of this SCC detector were2.11 and 2.40,respectively,which indicated that this detector could achieve a better quantitative prediction of SCC.(5)The effect of the fusion of Vis SWNIR spectra on the accuracy of the SCC detector was studied.The dielectric and Vis SWNIR spectra of milk samples were measured using the developed dielectric spectrometer and a self-made Vis SWNIR spectra acquisition device,respectively.After extracting the dielectric and spectral sensitive characteristics,quantitative SCC prediction models were established using dielectric spectra,Vis SWNIR,and these two spectra,respectively.For dielectric spectra,the optimal models were the SVR model based on variable importance in projection and UVE-SVR with the RMSEP of 0.23 and 0.22 log SCC/m L,respectively.For Vis SWNIR spectra,the RMSEP of the optimal models FVS-SVR and RFE-SVR were 0.25 and 0.27 log SCC/m L,respectively.The SVR model with the FDS and FVS spectra had the lowest RMSEP of 0.21 log SCC/m L,which was lower than the 0.22log SCC/m L of optimal model UVE-SVR based on dielectric spectra.The RPD of the two models were 2.47 and 2.37,respectively.The study indicated that the Vis SWNIR spectra could predict SCC better than the NIR spectra,while the dielectric spectra have better prediction performance than the visible/near-infrared spectra.The accuracy of the SCC detector developed using dielectric spectra was good.The fusion of Vis SWNIR spectra could slightly improve the SCC prediction accuracy of the developed detector.This paper provides a theoretical basis for analyzing the SCC based on visible/near-infrared spectra and dielectric spectra and offers technical support for developing low-cost portable and online SCC detectors. |