# Nutritional Components of Beverage Granules by Near-Infrared Spectroscopy Based on PLS Model

Authors: Yuqi Bi; Dawei Xu; Lihui Yang; Lin Chu; Bo Zhang; Yanting Li
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

The nutritional content of instant beverages sold in the market is uneven. The existing standards and regulatory system are not sound enough, and the phenomenon of the unknown nutritional content of ingredients frequently occurs, which makes the beverage lose its nutritional characteristics, and long-term drinking may cause harm to consumers’ health. Therefore, it is necessary to strengthen the quality and safety supervision of beverage granules and carry out quality and authenticity inspections and evaluations. The purpose of this study is to collect samples of milk tea powder and to detect its protein, total sugar, ash, fat, and moisture content. By analyzing its near-infrared spectral characteristics, the paper establishes the NIR (near-infrared spectrum) rapid detection model and the PLS (partial least square) model of protein and fat in milk powder. The study uses external inspection and cross-validation to judge the reliability of the model. The results showed that the relative error of protein was less than 1.9%, and the relative error of fat was less than 1.5%, which indicated that the model had good predictability. It provides a new strategy for the quality evaluation and formula process identification of milk tea powder. It also provides a strong reference for the improvement of local standards and the formulation of national standards for milk tea powder. The study provides strong data support for illegal businesses to take effective actions to abuse consumer sentiment and take advantage of the regulatory vacuum period.


---

## Body

## 1. Introduction

Nowadays, there are many fake and shoddy products in the beverage granule market, which are mostly made of illegal food industrial raw materials and food additives, and seriously undermine the good market competition order. Taking the milk tea beverage sold in the market as an example, in the process of making milk tea, the strict requirements for raw materials of utensils make it limited in the process of development, coupled with the promotion of urbanization and the acceleration of the pace of life, milk tea powder come into being. This nonbulk dairy product evolved from the traditional liquid milk tea [1]. To reduce costs and make huge profits, some businesses in the market replace milk or milk powder with cheap food fillers or additives such as nondairy creamer and maltodextrin and rely on a large number of trans fatty acids to improve the taste and make the taste better. At the same time, the ambiguity of relevant industry standards makes some illegal businessmen “steal the concept” and give the title of traditional dairy products to milk tea powder solid beverage [2].In terms of the determination of milk tea powder, Callado et al. [3] used Fourier transform infrared spectroscopy to analyze and found that milk tea powder contained not only protein and fatty acid triglyceride but also caffeine. Yue et al. [4] also found that Fourier transform infrared spectroscopy (FTIR) can provide a wide range of information about chemical components and food additives for food quality evaluation. Cama-Moncunill et al. [5] determined the manganese content in two kinds of milk tea powder by flame atomic absorption spectrometry and microwave digestion technology, which not only accelerated the analysis speed but also reduced the harm to the environment. Chen et al. [6] determined the contents of caffeine and catechin in the sample by high-performance liquid chromatography (HPLC) and found that the contents of the two components met the specified standards. Wang et al. [7] used coprecipitation-atomic absorption spectrometry to determine zinc in milk tea powder. Valentini et al. [8] determined the constant and trace elements in milk tea powder by ICP-OES. Pasquini [9] determined calcium and iron in milk tea powder by atomic absorption spectrometry and determined trace elements by microwave digestion-inductively coupled atomic emission spectrometry [10]. De Boer and Bast [11] used three improved methods to study the tea polyphenols in milk tea powder.Milk tea powder, as a new national characteristic dairy product in Chaoyang, has its own characteristics and advantages. However, a large number of previous studies have found that it is very common to mix too much vegetable fat powder, maltodextrin, and other food industry fillers or additives into milk tea powder ingredients, and the nutritional value of milk tea powder has been seriously damaged. It is necessary to evaluate the nutritional components and analyze the spectral characteristics of milk tea powder with different ingredients in the market and establish a special quantitative detection model for milk tea powder. In this study, the samples of common milk tea powder were collected from the market, and the contents of protein, total sugar, ash, fat, and moisture were determined with quality control, and the spectral information of milk tea powder NIR was obtained by desktop and miniature near-infrared spectrometers. The characteristics are analyzed, and the quantitative model is established.The main innovations of this paper are(1)
In this paper, a rapid detection model of nutritional indicators is established based on spectral measurement, and the model has high stability and accuracy(2)
Based on the rapid detection model, the improvement strategy was provided for the quality evaluation of milk tea powder and the improvement of formula process. At the same time, it can also avoid the emergence of inferior products


## 2. Related Work

### 2.1. Principle of Near-Infrared Spectrum Analysis Technology

Near-infrared light has the duality of “wave” and “particle.” The molecular energy transition is mainly divided into fundamental frequency transition (corresponding to the transition of molecular vibrational state between adjacent vibrational energy levels), frequency doubling transition (corresponding to the transition of molecular vibrational state between one or several vibrational energy levels), and combined frequency transition (the simultaneous transition of two or more vibrational States) [12]. Near-infrared absorption spectra mainly come from the transition of molecular vibrational energy levels from the ground state to high energy levels, reflecting the absorption of double and sum frequencies of X-H (such as C-H, N-H, and O-H) vibrations of hydrogen-containing groups. When the infrared monochromatic or composite light emitted from the light source passes through the sample to be measured, one or more molecules of the sample to be measured selectively absorb some characteristic bands of light in the radiation light and change their vibrational energy states. Under the influence of the two modes of bending vibration and stretching vibration, the molecules transition and then produce absorption spectra [13].The near-infrared spectral preprocessing includes a variety of approaches, which includes mean centering, derivative (the first and second derivatives are the most common), Savitzky-Golay, standard normal variate (SNV), multiplicative scatter correction (MSC), Fourier transform (FT), and wavelet transform (WT).After rejecting the outliers, the spectral information was preprocessed by using derivative, Savitzky-Golay, standard normal variate (SNV), and multiplicative scatter correction (MSC). Partial least squares (PLS) analysis was used to analyze the measured conventional element values and the pretreated spectral information. Five conventional nutrient detection models were established, and the prediction models were verified by some data. The best model was selected according to the model correlation coefficient (Rc, Rp) and the root mean square error of cross-validation (RMSECV). The prediction accuracy of the model was evaluated by the root mean square error of prediction (RMSEP), relative analysis error (RPD), and relative standard deviation (RSD).


### 2.2. PLS Equation and Algorithm

Near-infrared spectroscopy is an indirect analytical technique, and its successful application depends on a good quantitative analysis model, so it is very important to establish an accurate quantitative analysis model for the application of near-infrared spectroscopy. In this study, the partial least squares method was used to quantitatively analyze the chemical true value and spectral value of milk tea powder [14].PLS (partial least square) maximizes the covariance betweenX and Y by building the model of X and Y matrix at the same time, fully considering the influence relationship between them and strengthening the corresponding calculation relationship when decomposing to find the latent variable that can best predict Y in X and ensure the best correction model. PLS is an effective combination and presentation of canonical correlation analysis, multiple linear regression analysis, and principal component analysis [15].First, the spectral matrixX and the concentration matrix Y are decomposed:
(1)X=TPT+EX=∑k=1ftanr+Ex,(2)Y=UQT+ET=∑k=1βukqkqkT+ET,whereT represents the score matrix of the spectral matrix X. U represents the score matrix of the concentration matrix Y; P represents the load matrix of the independent variable X matrix, and Q represents the load matrix of dependent variable Y; Ex and Ey, respectively, represent the PLS fitting residual error matrices of X matrix and Y matrix.The linear regression betweenT and U is performed according to the above formula:
(3)U=TB,(4)B=TT′−1TtY.For the prediction of the result, the unknown score matrixT of the unknown spectral matrix X is obtained, and then the unknown Y is further obtained:
(5)Yk=TkBQ.PLS algorithms are mainly divided into PLS1 and PLS2, both of which use the same algorithm. The main difference is that PLS1 only corrects one component at a time, while PLS2 can perform regression correction for multiple components at the same time. For the PLS model developed by selecting multipleY response variables, PLS1 is to simplify the PLS algorithm when only one Y response variable is processed at a time, while PLS2 can process multiple Y variables at the same time, but it will significantly reduce the prediction accuracy [16].


## 2.1. Principle of Near-Infrared Spectrum Analysis Technology

Near-infrared light has the duality of “wave” and “particle.” The molecular energy transition is mainly divided into fundamental frequency transition (corresponding to the transition of molecular vibrational state between adjacent vibrational energy levels), frequency doubling transition (corresponding to the transition of molecular vibrational state between one or several vibrational energy levels), and combined frequency transition (the simultaneous transition of two or more vibrational States) [12]. Near-infrared absorption spectra mainly come from the transition of molecular vibrational energy levels from the ground state to high energy levels, reflecting the absorption of double and sum frequencies of X-H (such as C-H, N-H, and O-H) vibrations of hydrogen-containing groups. When the infrared monochromatic or composite light emitted from the light source passes through the sample to be measured, one or more molecules of the sample to be measured selectively absorb some characteristic bands of light in the radiation light and change their vibrational energy states. Under the influence of the two modes of bending vibration and stretching vibration, the molecules transition and then produce absorption spectra [13].The near-infrared spectral preprocessing includes a variety of approaches, which includes mean centering, derivative (the first and second derivatives are the most common), Savitzky-Golay, standard normal variate (SNV), multiplicative scatter correction (MSC), Fourier transform (FT), and wavelet transform (WT).After rejecting the outliers, the spectral information was preprocessed by using derivative, Savitzky-Golay, standard normal variate (SNV), and multiplicative scatter correction (MSC). Partial least squares (PLS) analysis was used to analyze the measured conventional element values and the pretreated spectral information. Five conventional nutrient detection models were established, and the prediction models were verified by some data. The best model was selected according to the model correlation coefficient (Rc, Rp) and the root mean square error of cross-validation (RMSECV). The prediction accuracy of the model was evaluated by the root mean square error of prediction (RMSEP), relative analysis error (RPD), and relative standard deviation (RSD).


## 2.2. PLS Equation and Algorithm

Near-infrared spectroscopy is an indirect analytical technique, and its successful application depends on a good quantitative analysis model, so it is very important to establish an accurate quantitative analysis model for the application of near-infrared spectroscopy. In this study, the partial least squares method was used to quantitatively analyze the chemical true value and spectral value of milk tea powder [14].PLS (partial least square) maximizes the covariance betweenX and Y by building the model of X and Y matrix at the same time, fully considering the influence relationship between them and strengthening the corresponding calculation relationship when decomposing to find the latent variable that can best predict Y in X and ensure the best correction model. PLS is an effective combination and presentation of canonical correlation analysis, multiple linear regression analysis, and principal component analysis [15].First, the spectral matrixX and the concentration matrix Y are decomposed:
(1)X=TPT+EX=∑k=1ftanr+Ex,(2)Y=UQT+ET=∑k=1βukqkqkT+ET,whereT represents the score matrix of the spectral matrix X. U represents the score matrix of the concentration matrix Y; P represents the load matrix of the independent variable X matrix, and Q represents the load matrix of dependent variable Y; Ex and Ey, respectively, represent the PLS fitting residual error matrices of X matrix and Y matrix.The linear regression betweenT and U is performed according to the above formula:
(3)U=TB,(4)B=TT′−1TtY.For the prediction of the result, the unknown score matrixT of the unknown spectral matrix X is obtained, and then the unknown Y is further obtained:
(5)Yk=TkBQ.PLS algorithms are mainly divided into PLS1 and PLS2, both of which use the same algorithm. The main difference is that PLS1 only corrects one component at a time, while PLS2 can perform regression correction for multiple components at the same time. For the PLS model developed by selecting multipleY response variables, PLS1 is to simplify the PLS algorithm when only one Y response variable is processed at a time, while PLS2 can process multiple Y variables at the same time, but it will significantly reduce the prediction accuracy [16].


## 3. PLS Model Based on Spectral Analysis

### 3.1. Model Evaluation Parameters

(1)
Model correlation coefficientsRc and RpRc (correlation coefficients of calibration) and Rp (correlation coefficients of prediction) represent the accuracy and prediction ability of the model, respectively. The closer to 1, the better the performance of the model.
(2)
RMSECV (root mean square error of cross-validation)(3)
RMSEP (root mean square error of prediction)(6)REMSP=∑i∞Ti−Ti′2m−T¯.The more the RMSEP approaches 0, the stronger the predictive ability of the external predictor set model.In formula (6), Ti is the measured value of the ith sample in the calibration set; Ti′ is the predicted value of the ith sample in the validation set; T is the average of the measured values of all samples; n is the number of samples in the calibration set; and m is the number of samples in the validation set.
(4)
RPD (relative percent deviation)(7)RPD=SDRMSEP.In equation (7), SD is the standard deviation of the validation sample set.IfRPD>3, it shows that the model has good effect and high prediction accuracy, and the established NIR quantitative model can be used for actual detection; if 2<RPD<3, it shows that it is feasible to use the NIR analysis technology for quantitative analysis of the component, but its prediction accuracy needs to be further improved; if RPD<2, it indicates that the current NIR quantitative model is not feasible for detection and analysis.After the spectrum is preprocessed, the parameters are combined to further judge that different optimal main factor numbers are generated under different spectrum preprocessing modes. The optimal number of principal factors corresponds to the number of factors in the model at the minimum RMSECV value. The larger the determination coefficientR2 is, the smaller the standard deviation RMSECV and RMSEP are, which indicates that the calibration effect of the model is better and the prediction accuracy is higher, so the optimal model is selected from multiple models.


### 3.2. Outlier Elimination and Sample Set Division

This study mainly uses Mahalanobis distance, leverage ratio, and studentized residual to conduct outlier test. The calculation formula is as follows:(1)
Mahalanobis Distance. Represents the covariance distance of data, which is used to measure the distance between sample and sample distribution. Formula is(8)d=ti−t¯2cov−1tt¯it−t,where ti is the score vector of the ith sample; t¯ is the average score of all samples; cov is that covariance of the score matrix in the factor analysis of all the spectral set.
(2)
Leverage Ratio. It is used to measure the influence of a sample on the whole sample set, also known as the influence coefficient of the sample, which reflects the diagonal elements of the projection matrix x in the observation matrix. The formula is(9)hi=x1xiTxtx−1.Outliers related to other predictor variables are mainly judged by the hat statistic. If hn is too large, it means that thei sample has too much influence on the model, and it can be judged as an abnormal sample.
(3)
Studentized Residual. Represents the prediction ability of sample concentration. Leverage ratio has a magnifying effect on studentized residual, and its calculation formula is as follows:(10)ri=eiσ1−hin.For a certain samplexi1,x1,y2, at the level of α=0.05, it is judged as abnormal sample:
(11)Fi=rin−p−2r12n−p−1e2−ri2>Fcn,n−p−2.


### 3.3. Screening of Spectral Range

Reverse interval partial least squares (BiPLS) was used to divide the whole spectral band inton subintervals evenly, the PLS model corresponding to the remaining interval was obtained by eliminating one interval each time, and this step was repeated until one subinterval remained. The interval combination corresponding to the optimal partial least squares model in the whole process was the best wavelength interval. When the RMSECV reaches the minimum, the subinterval rejected is the subinterval with the worst performance, and the joint interval at this time is the best modeling interval. In this study, n=6 is taken, that is, the whole band is divided into 6 intervals, and the 5 dividing points after division are 5000cm−1,6000cm−1,7000cm−1,8000cm−1,9000cm−1.The spectral ranges of five conventional nutrients were screened by BiPLS, and the best characteristic bands in the spectral range of 10000~4000cm-1 were obtained by combining the corresponding relationship between bands and groups, as shown in Table 1.Table 1
Spectrum range of each nutrient component.
ComponentSpectral range/cm-1Protein7185~4280; 8454~7779; 10000~9000Total sugar6020~4378; 9015~6830Ash5175~4042; 8278~7898Fat4911~4032; 8464~5681; 10000~9000Moisture7501~4024


## 3.1. Model Evaluation Parameters

(1)
Model correlation coefficientsRc and RpRc (correlation coefficients of calibration) and Rp (correlation coefficients of prediction) represent the accuracy and prediction ability of the model, respectively. The closer to 1, the better the performance of the model.
(2)
RMSECV (root mean square error of cross-validation)(3)
RMSEP (root mean square error of prediction)(6)REMSP=∑i∞Ti−Ti′2m−T¯.The more the RMSEP approaches 0, the stronger the predictive ability of the external predictor set model.In formula (6), Ti is the measured value of the ith sample in the calibration set; Ti′ is the predicted value of the ith sample in the validation set; T is the average of the measured values of all samples; n is the number of samples in the calibration set; and m is the number of samples in the validation set.
(4)
RPD (relative percent deviation)(7)RPD=SDRMSEP.In equation (7), SD is the standard deviation of the validation sample set.IfRPD>3, it shows that the model has good effect and high prediction accuracy, and the established NIR quantitative model can be used for actual detection; if 2<RPD<3, it shows that it is feasible to use the NIR analysis technology for quantitative analysis of the component, but its prediction accuracy needs to be further improved; if RPD<2, it indicates that the current NIR quantitative model is not feasible for detection and analysis.After the spectrum is preprocessed, the parameters are combined to further judge that different optimal main factor numbers are generated under different spectrum preprocessing modes. The optimal number of principal factors corresponds to the number of factors in the model at the minimum RMSECV value. The larger the determination coefficientR2 is, the smaller the standard deviation RMSECV and RMSEP are, which indicates that the calibration effect of the model is better and the prediction accuracy is higher, so the optimal model is selected from multiple models.


## 3.2. Outlier Elimination and Sample Set Division

This study mainly uses Mahalanobis distance, leverage ratio, and studentized residual to conduct outlier test. The calculation formula is as follows:(1)
Mahalanobis Distance. Represents the covariance distance of data, which is used to measure the distance between sample and sample distribution. Formula is(8)d=ti−t¯2cov−1tt¯it−t,where ti is the score vector of the ith sample; t¯ is the average score of all samples; cov is that covariance of the score matrix in the factor analysis of all the spectral set.
(2)
Leverage Ratio. It is used to measure the influence of a sample on the whole sample set, also known as the influence coefficient of the sample, which reflects the diagonal elements of the projection matrix x in the observation matrix. The formula is(9)hi=x1xiTxtx−1.Outliers related to other predictor variables are mainly judged by the hat statistic. If hn is too large, it means that thei sample has too much influence on the model, and it can be judged as an abnormal sample.
(3)
Studentized Residual. Represents the prediction ability of sample concentration. Leverage ratio has a magnifying effect on studentized residual, and its calculation formula is as follows:(10)ri=eiσ1−hin.For a certain samplexi1,x1,y2, at the level of α=0.05, it is judged as abnormal sample:
(11)Fi=rin−p−2r12n−p−1e2−ri2>Fcn,n−p−2.


## 3.3. Screening of Spectral Range

Reverse interval partial least squares (BiPLS) was used to divide the whole spectral band inton subintervals evenly, the PLS model corresponding to the remaining interval was obtained by eliminating one interval each time, and this step was repeated until one subinterval remained. The interval combination corresponding to the optimal partial least squares model in the whole process was the best wavelength interval. When the RMSECV reaches the minimum, the subinterval rejected is the subinterval with the worst performance, and the joint interval at this time is the best modeling interval. In this study, n=6 is taken, that is, the whole band is divided into 6 intervals, and the 5 dividing points after division are 5000cm−1,6000cm−1,7000cm−1,8000cm−1,9000cm−1.The spectral ranges of five conventional nutrients were screened by BiPLS, and the best characteristic bands in the spectral range of 10000~4000cm-1 were obtained by combining the corresponding relationship between bands and groups, as shown in Table 1.Table 1
Spectrum range of each nutrient component.
ComponentSpectral range/cm-1Protein7185~4280; 8454~7779; 10000~9000Total sugar6020~4378; 9015~6830Ash5175~4042; 8278~7898Fat4911~4032; 8464~5681; 10000~9000Moisture7501~4024


## 4. Experiment and Analysis

### 4.1. Experiment Platform

#### 4.1.1. Model of a Desktop Near-Infrared Spectrometer

The desktop near-infrared spectrometer has the characteristics of a wide spectral range (12800~4000 cm-1), a large number of collected data points (3000), and a stable instrument. The obtained spectrum is used for establishing a PLS rapid detection model of five conventional nutrient components. The model parameters of each nutrient component are optimized by selecting and intercepting the characteristic wave band. The model correction parameter Rc and the verification coefficient Rp are more than 0.8, the RPD is more than 2%, the external verification parameter achieves an ideal effect, and the established PLS model is stable and reliable. It shows that the performance of the model is better at the optimal wavelength.


#### 4.1.2. Model of Miniature Near-Infrared Spectrometer

Compared with the desktop NIR spectrometer, the range of the micro NIR spectrometer is smaller (900 ~ 1676nm), and the number of included data points is less (125), but the micro NIR spectrometer is more convenient and is more suitable for rapid field detection. GTiwari can predict the maturity of tomatoes through the portable NIR spectrometer, which is fast and convenient, and the model has good stability. It confirms this view. The correlation coefficient of the PLS model between protein and total sugar was more than 0.8, and the RPD was more than 2% under the best pretreatment mode of full wavelength, indicating that the model had predictive ability. Consider the possibility of optimizing the model, but during the optimization process, it is found that 125 data points are not enough to optimize the model to the ideal level. In the future field rapid prediction or discrimination process, we can try to increase the sample size, change the spectral preprocessing method or scanning conditions, and optimize the model parameters.The near-infrared spectral data of milk tea powder samples contain too much information. To accurately extract the effective information, evaluate the relationship between the component content and the relevant specific wavelength, avoid overfitting, and improve the accuracy of the model, the near-infrared spectral information collected by the desktop NIR spectrometer was evenly divided into six spectral intervals by using the reverse interval partial least squares method (the miniature NIR spectrometer only contains 125 data points, so it is of little significance to intercept the spectrum).


### 4.2. PLS Model for a Characteristic Band of Desktop NIR Spectrometer

Fat, moisture, and AshPLS models are better than others after the second derivative pretreatment. The protein PLS model is the best when the first derivative is combined with SNV pretreatment. The combination of the first derivative and the second derivative makes the total sugar PLS model the best.As is shown in Table2, the PLS models of the five nutrient components were optimized by intercepting the characteristic wavebands. Taking the protein PLS model as an example, the calibration correlation coefficient Rc and validation correlation coefficient Rp increased to 0.9734 and 0.9794. The root means square error RMSECV and RMSEP decreased to 0.7141 and 0.6870, respectively, and the relative analysis error RPD of the protein prediction model increased to 6.798%. In the characteristic band, the correlation between protein content and NIR data was improved, and the prediction ability and stability of the model were also improved. The other four PLS models, such as fat, also obtained similar results through spectral truncation. The optimized models had better predictability and robustness.Table 2
Optimal parameters of the bench-top NIR model for the characteristic band.
IngredientsPretreatmentSpectral range/cm-1Calibration setValidation setRcRMSECVRpRMSEPRPD/%Protein1st+SNV7196~4173, 8862~7364, 11500~89000.97340.71410.97940.68706.798Total sugar1st+2nd6020~4378, 9015~68300.87482.56650.87292.27126.384Ash2nd5175~4042, 8278~78980.85430.77070.87370.75352.721Fat2nd4725~4362, 7529~5671, 11500~89000.80192.14500.82522.00262.332Moisture2nd7501~40240.91500.15970.91740.13413.356


### 4.3. Full Band PLS Model of Miniature NIR Spectrometer

The spectral information of milk tea powder was collected by a portable NIR microspectrometer, and the general model of five conventional nutrients in the whole band of milk tea powder NIR microspectrometer was established. Compared with other models, the NIR spectral information is preprocessed by the second derivative, and the optimal model parameters are obtained by fat and ash. The optimal model parameters are obtained by protein and moisture through the combination of the second derivative and SNV. The parameters of the calibration model for total sugar are optimal, as shown in Table3.Table 3
Optimal parameters of all-band mini-NIR model.
IngredientsPretreatmentSpectral range/nmCalibration setValidation setRcRMSECVRpRMSEPRPD/%Protein2nd+SNV900-16760.94530.94530.91411.34643.468Total sugar1st+2nd900-16760.90672.49830.88683.15772.929Ash2nd900-16760.61591.71280.57261.90251.078Fat2nd900-16760.70722.78760.79952.13822.184Moisture2nd+SNV900-16760.74480.26460.77360.25311.778The protein correlation coefficients were all greater than 0.9, and the RMSECV, RMSEP, and RPD were 0.9453, 1.3464, and 3.468%, respectively. The models were stable and could be used for prediction; total sugar correlation coefficients were 0.9067 and 0.8868, RMSECV, RMSEP, and RPD were 2.4983, 3.1577, and 2.929%, respectively, indicating that the model had the predictive ability. However, the stability and predictability of the model built by the miniature NIR spectrometer are not as good as those of the desktop NIR spectrometer, and the difference between the calibration set and the prediction set is large.TheRc and Rp of ash, fat, and moisture models were all less than 0.8, indicating that the model effect was not ideal. The FatRMSECV and RMSEP were large, and the RPD was more than 2%, indicating that the model could be used for prediction, but the accuracy was not high; moisture and ash RPD<2%, indicating that the moisture and ash models cannot be used for prediction. It is feasible to establish the model by using the miniature NIR spectrometer, but there are only 125 spectral points in the miniature NIR spectrometer, so it is not meant to continue to optimize the model by intercepting the characteristic spectral bands.


### 4.4. PLS Model External Prediction Validation

Another 10 samples that did not participate in the establishment of the model were collected as external prediction samples, and their protein, total sugar, ash, fat, and moisture were determined by the national standard method. The desktop near-infrared spectral data were collected at the same time. The established PLS models were used to predict the nutrient contents of 10 samples that were not involved in the modeling. The chemical true and predicted values are shown in Table4.Table 4
Validation data.
NumberProteinTotal sugarAshFatMoisturePredictActualPredictActualPredictActualPredictActualPredictActual16.046.4850.9651.487.597.9020.7220.803.743.5526.916.7650.6250.088.308.4215.7316.004.174.2636.757.0852.0552.117.387.4218.3218.804.063.9444.955.1056.2657.027.627.9720.5220.404.174.1455.375.5550.2550.46.736.2022.0022.003.713.6667.177.1660.1460.478.178.6621.6421.604.294.2873.703.2064.3663.51.611.7821.8221.603.323.3586.056.2363.6164.012.302.0810.5411.203.273.4497.247.2860.2660.263.523.7714.5414.003.043.18107.487.8559.3660.058.428.1321.7021.603.293.19Milk tea powder moisture of each formula showed no significant difference, as shown in Figure1.Figure 1
Nutrient composition data.Protein and total sugar have a great impact on the nutritional quality of milk tea powder, and their content trend analysis is shown in Figure2.Figure 2
Composition trend diagram.Through paired-samplest test, the t values of protein, total sugar, ash, fat, and moisture were 1.172, 0.920, 0.678, 0.427, and -0.191, respectively, which were all less than the critical value t0.05,27=2.23. The results showed that there was no significant difference between the nutrient contents measured by the national standard method and the predicted values of the optimized PLS model, and the model had a good prediction effect.


## 4.1. Experiment Platform

### 4.1.1. Model of a Desktop Near-Infrared Spectrometer

The desktop near-infrared spectrometer has the characteristics of a wide spectral range (12800~4000 cm-1), a large number of collected data points (3000), and a stable instrument. The obtained spectrum is used for establishing a PLS rapid detection model of five conventional nutrient components. The model parameters of each nutrient component are optimized by selecting and intercepting the characteristic wave band. The model correction parameter Rc and the verification coefficient Rp are more than 0.8, the RPD is more than 2%, the external verification parameter achieves an ideal effect, and the established PLS model is stable and reliable. It shows that the performance of the model is better at the optimal wavelength.


### 4.1.2. Model of Miniature Near-Infrared Spectrometer

Compared with the desktop NIR spectrometer, the range of the micro NIR spectrometer is smaller (900 ~ 1676nm), and the number of included data points is less (125), but the micro NIR spectrometer is more convenient and is more suitable for rapid field detection. GTiwari can predict the maturity of tomatoes through the portable NIR spectrometer, which is fast and convenient, and the model has good stability. It confirms this view. The correlation coefficient of the PLS model between protein and total sugar was more than 0.8, and the RPD was more than 2% under the best pretreatment mode of full wavelength, indicating that the model had predictive ability. Consider the possibility of optimizing the model, but during the optimization process, it is found that 125 data points are not enough to optimize the model to the ideal level. In the future field rapid prediction or discrimination process, we can try to increase the sample size, change the spectral preprocessing method or scanning conditions, and optimize the model parameters.The near-infrared spectral data of milk tea powder samples contain too much information. To accurately extract the effective information, evaluate the relationship between the component content and the relevant specific wavelength, avoid overfitting, and improve the accuracy of the model, the near-infrared spectral information collected by the desktop NIR spectrometer was evenly divided into six spectral intervals by using the reverse interval partial least squares method (the miniature NIR spectrometer only contains 125 data points, so it is of little significance to intercept the spectrum).


## 4.1.1. Model of a Desktop Near-Infrared Spectrometer

The desktop near-infrared spectrometer has the characteristics of a wide spectral range (12800~4000 cm-1), a large number of collected data points (3000), and a stable instrument. The obtained spectrum is used for establishing a PLS rapid detection model of five conventional nutrient components. The model parameters of each nutrient component are optimized by selecting and intercepting the characteristic wave band. The model correction parameter Rc and the verification coefficient Rp are more than 0.8, the RPD is more than 2%, the external verification parameter achieves an ideal effect, and the established PLS model is stable and reliable. It shows that the performance of the model is better at the optimal wavelength.


## 4.1.2. Model of Miniature Near-Infrared Spectrometer

Compared with the desktop NIR spectrometer, the range of the micro NIR spectrometer is smaller (900 ~ 1676nm), and the number of included data points is less (125), but the micro NIR spectrometer is more convenient and is more suitable for rapid field detection. GTiwari can predict the maturity of tomatoes through the portable NIR spectrometer, which is fast and convenient, and the model has good stability. It confirms this view. The correlation coefficient of the PLS model between protein and total sugar was more than 0.8, and the RPD was more than 2% under the best pretreatment mode of full wavelength, indicating that the model had predictive ability. Consider the possibility of optimizing the model, but during the optimization process, it is found that 125 data points are not enough to optimize the model to the ideal level. In the future field rapid prediction or discrimination process, we can try to increase the sample size, change the spectral preprocessing method or scanning conditions, and optimize the model parameters.The near-infrared spectral data of milk tea powder samples contain too much information. To accurately extract the effective information, evaluate the relationship between the component content and the relevant specific wavelength, avoid overfitting, and improve the accuracy of the model, the near-infrared spectral information collected by the desktop NIR spectrometer was evenly divided into six spectral intervals by using the reverse interval partial least squares method (the miniature NIR spectrometer only contains 125 data points, so it is of little significance to intercept the spectrum).


## 4.2. PLS Model for a Characteristic Band of Desktop NIR Spectrometer

Fat, moisture, and AshPLS models are better than others after the second derivative pretreatment. The protein PLS model is the best when the first derivative is combined with SNV pretreatment. The combination of the first derivative and the second derivative makes the total sugar PLS model the best.As is shown in Table2, the PLS models of the five nutrient components were optimized by intercepting the characteristic wavebands. Taking the protein PLS model as an example, the calibration correlation coefficient Rc and validation correlation coefficient Rp increased to 0.9734 and 0.9794. The root means square error RMSECV and RMSEP decreased to 0.7141 and 0.6870, respectively, and the relative analysis error RPD of the protein prediction model increased to 6.798%. In the characteristic band, the correlation between protein content and NIR data was improved, and the prediction ability and stability of the model were also improved. The other four PLS models, such as fat, also obtained similar results through spectral truncation. The optimized models had better predictability and robustness.Table 2
Optimal parameters of the bench-top NIR model for the characteristic band.
IngredientsPretreatmentSpectral range/cm-1Calibration setValidation setRcRMSECVRpRMSEPRPD/%Protein1st+SNV7196~4173, 8862~7364, 11500~89000.97340.71410.97940.68706.798Total sugar1st+2nd6020~4378, 9015~68300.87482.56650.87292.27126.384Ash2nd5175~4042, 8278~78980.85430.77070.87370.75352.721Fat2nd4725~4362, 7529~5671, 11500~89000.80192.14500.82522.00262.332Moisture2nd7501~40240.91500.15970.91740.13413.356


## 4.3. Full Band PLS Model of Miniature NIR Spectrometer

The spectral information of milk tea powder was collected by a portable NIR microspectrometer, and the general model of five conventional nutrients in the whole band of milk tea powder NIR microspectrometer was established. Compared with other models, the NIR spectral information is preprocessed by the second derivative, and the optimal model parameters are obtained by fat and ash. The optimal model parameters are obtained by protein and moisture through the combination of the second derivative and SNV. The parameters of the calibration model for total sugar are optimal, as shown in Table3.Table 3
Optimal parameters of all-band mini-NIR model.
IngredientsPretreatmentSpectral range/nmCalibration setValidation setRcRMSECVRpRMSEPRPD/%Protein2nd+SNV900-16760.94530.94530.91411.34643.468Total sugar1st+2nd900-16760.90672.49830.88683.15772.929Ash2nd900-16760.61591.71280.57261.90251.078Fat2nd900-16760.70722.78760.79952.13822.184Moisture2nd+SNV900-16760.74480.26460.77360.25311.778The protein correlation coefficients were all greater than 0.9, and the RMSECV, RMSEP, and RPD were 0.9453, 1.3464, and 3.468%, respectively. The models were stable and could be used for prediction; total sugar correlation coefficients were 0.9067 and 0.8868, RMSECV, RMSEP, and RPD were 2.4983, 3.1577, and 2.929%, respectively, indicating that the model had the predictive ability. However, the stability and predictability of the model built by the miniature NIR spectrometer are not as good as those of the desktop NIR spectrometer, and the difference between the calibration set and the prediction set is large.TheRc and Rp of ash, fat, and moisture models were all less than 0.8, indicating that the model effect was not ideal. The FatRMSECV and RMSEP were large, and the RPD was more than 2%, indicating that the model could be used for prediction, but the accuracy was not high; moisture and ash RPD<2%, indicating that the moisture and ash models cannot be used for prediction. It is feasible to establish the model by using the miniature NIR spectrometer, but there are only 125 spectral points in the miniature NIR spectrometer, so it is not meant to continue to optimize the model by intercepting the characteristic spectral bands.


## 4.4. PLS Model External Prediction Validation

Another 10 samples that did not participate in the establishment of the model were collected as external prediction samples, and their protein, total sugar, ash, fat, and moisture were determined by the national standard method. The desktop near-infrared spectral data were collected at the same time. The established PLS models were used to predict the nutrient contents of 10 samples that were not involved in the modeling. The chemical true and predicted values are shown in Table4.Table 4
Validation data.
NumberProteinTotal sugarAshFatMoisturePredictActualPredictActualPredictActualPredictActualPredictActual16.046.4850.9651.487.597.9020.7220.803.743.5526.916.7650.6250.088.308.4215.7316.004.174.2636.757.0852.0552.117.387.4218.3218.804.063.9444.955.1056.2657.027.627.9720.5220.404.174.1455.375.5550.2550.46.736.2022.0022.003.713.6667.177.1660.1460.478.178.6621.6421.604.294.2873.703.2064.3663.51.611.7821.8221.603.323.3586.056.2363.6164.012.302.0810.5411.203.273.4497.247.2860.2660.263.523.7714.5414.003.043.18107.487.8559.3660.058.428.1321.7021.603.293.19Milk tea powder moisture of each formula showed no significant difference, as shown in Figure1.Figure 1
Nutrient composition data.Protein and total sugar have a great impact on the nutritional quality of milk tea powder, and their content trend analysis is shown in Figure2.Figure 2
Composition trend diagram.Through paired-samplest test, the t values of protein, total sugar, ash, fat, and moisture were 1.172, 0.920, 0.678, 0.427, and -0.191, respectively, which were all less than the critical value t0.05,27=2.23. The results showed that there was no significant difference between the nutrient contents measured by the national standard method and the predicted values of the optimized PLS model, and the model had a good prediction effect.


## 5. Conclusion

In this paper, the PLS model is used to process the data obtained from near-infrared spectroscopy to study the nutritional components of instant drinks in the market. Main research contents:(1)
Through the determination and analysis of protein, total sugar, ash, fat, and moisture content of milk tea powder, the differences of formula and nutritional components between traditional milk tea powder and modern milk tea powder were analyzed(2)
The quantitative model of milk tea powder based on chemometrics was established and preliminarily verified by two spectral information acquisition ways of the desktop near-infrared spectrometer and miniature portable spectrometerAccording to the analysis of five nutrients, the quantitative model was established. The correlation coefficient of the training set was 0.9754, and the correlation coefficient of the validation set was 0.9181. The model accuracy was high which provides an environment-friendly and effective new method for the prediction of conventional nutritional components and injects a new theory for ensuring the nutritional and health attributes of dairy products with national and regional characteristics.In addition to the partial least squares method, the near-infrared spectroscopy analysis module includes advanced modules such as multiple linear regression (MLR), principal component regression (PCR), genetic algorithm, support vector machine (SVM), and artificial neural network (ANN). This study can explore the feasibility of using other methods to establish models in the future.



---

*Source: 4310395-2022-04-21.xml*