Analyzing Milk from the Cow to the Counter

 

NIR spectra comprise broad peaks resulting from molecular vibrations caused by interaction of molecules with light in the region from ~900-2500 nm, with information extracted from these broad peaks for the quantitative determination of chemical composition. In the food industry, the use of NIR spectroscopy allows rapid characterization of samples for fat, protein, moisture, carbohydrates and sugar content, with quantitative results obtained using chemometrics and applicable calibration models for key parameters. In this application note, we focus on the use of NIR reflection spectroscopy to determine the fat content of milk samples.

 

Milk - lait - milchBackground
 

Milk PourAccording to the Food and Agriculture Organization (FAO) of the United Nations, about 85% of worldwide milk production is from cows. Cow’s milk products are labeled and categorized by their fat content, with specific terms for the content levels – whole, reduced fat, skim and so on – varying by country.

Determination of milk fat content (the proportion of milk, by weight, of butterfat1) can be accomplished using separation or spectroscopy techniques. The latter approach is flexible, provides continuous monitoring of samples in process environments, and can be used to validate the separation step (where the high-fat content separates from the rest of the milk) in milk processing. The literature cites thousands of examples of UV-Vis, NIR and other spectroscopic techniques for milk analysis.

 

Experimental Conditions
 

At a food sensors workshop hosted by the MeBioS (Mechatronics, Biostatistics and Sensors) division of the Biosystems Department at KU Leuven University in Belgium, we used an array-based NIR spectrometer, fiber optic accessories and software to prepare samples, collect milk fat data and create calibration files for different milk samples. Using a similar experimental approach, a competing spectrometer manufacturer at the workshop measured protein content in milk samples.


We measured more than 30 raw (unpasteurized) and homogenized (blended) milk samples using the Ocean Optics NIRQuest512 (900-1700 nm) spectrometer, a tungsten halogen light source and 45° reflectance sampling plate with rotating cup from TecnoCientifica. There were 31 samples of raw, high fat content milk and two of homogenized skimmed (low fat content) milk. Each sample was measured twice.
 

 

Table I (Part A). Random Milk Samples with Measured Fat Content

 

Sample Fat content (%) Sample Fat content (%) Sample Fat Content (%)
1 5.43 65 5.81 105 2.77
2 4.59 69 3.77 107 3.25
9 4.20 75 5.23 110 5.98
12 5.19 85 X 118 2.13
17 0.10 89 2.75 119 2.74
22 2.88 92 3.38 121 3.16
23 X 93 2.93 126 4.06
50 5.16 96 2.73 128 2.17
58 5.25 97 1.91 131 3.13
60 5.65 101 2.97 135 2.98

 

Table I (Part B). Random Milk Samples with Measured Fat Content

 

Sample Fat Content (%) Sample Fat Content (%)
137 2.75 210 2.84
150 5.22 211 5.77
155 2.05 212 6.11
180 2.79 214 1.60
185 3.96 215 6.12
191 3.72 218 8.11
203 2.60 221 5.97
205 6.72 238 5.73
206 X 240 5.03
209 5.64 255 6.56

 


Generally, raw milk has higher fat content than skimmed milk, which in most countries describes milk with <1.0% fat content. The data in Table I show the range of fat content measured within our samples. (On a side note, distribution of raw milk is either regulated or prohibited in parts of Europe and North America, with the concerns related less to the high fat content of the milk than to its potential for contamination with harmful bacteria.)

Reflectance spectra of the measured milk samples show relatively consistent spectral features and a clear baseline due to light scattering (Figure 1). From the literature it is known that a first- or second-order Savitsky-Golay filter is a good technique to correct for the light scattering (Figure 2).

 

 

Figure 1. Reflectance spectra (920-1650 nm) of milk samples measured using a NIRQuest512 InGaAs array spectrometer.


Figure 1. Reflectance spectra (920-1650 nm) of milk samples measured using a NIRQuest512 InGaAs array spectrometer.

 

 

 

Figure 2. Application of a second-order Savitsky-Golay derivative of reflectance spectra with a second-order polynomial and window of 63 data points (189 nm).


Figure 2. Application of a second-order Savitsky-Golay derivative of reflectance spectra with a second-order polynomial and window of 63 data points (189 nm).

 

Analyzing the Data
 

Chemometrics is a powerful tool for analyzing complex chemical systems like milk and other foods, and borrows heavily from multivariate statistics, the science of using many observables to predict an unknown parameter when the relationship among the observables is not known. In this instance, we used a Principal Component Analysis (PCA) modeling method to compare our measurements against a standard.

After the baseline effect was removed from our reflection data, we were able to detect the spectral outliers based on PCA of our data (Figure 3).
 

 

Figure 3. Using PCA, spectral outliers – in this case, homogenized skim milk -- can be identified.


Figure 3. Using PCA, spectral outliers – in this case, homogenized skim milk — can be identified.

 

When the Hotelling T2 versus Q residuals plot was applied to the data, Sample 17 and Sample 218 were identified as outliers (Figure 4). Sample 17 is homogenized skim milk and Sample 218 is raw milk with an extremely high fat concentration (8.11%). Both samples were removed from the calibration set for the preparation of a Partial Least Squares Regression (PLSR). PLSR determines sets of spectra (the “components”) that can most effectively explain the variations in the concentration of the analyte.
 

 

Figure 4. PCA is applied to the spectral data to identify outliers.


Figure 4. PCA is applied to the spectral data to identify outliers.

 

We prepared a robust PLSR model with five latent variables (inclusion of additional latent variables does not significantly improve the model). Cross validation of the data yielded a very high R2 = 0.9855 and RMSECV (calibration) of 0.1613% (w/w). We then tested this PLSR model for prediction of the fat content of the unknown milk samples (Figure 5).
 

 

Figure 5. In the measured versus predicted plot for fat content in milk, blue represents the calibration data and red is the cross-validation data.


Figure 5. In the measured versus predicted plot for fat content in milk, blue represents the calibration data and red is the cross-validation data.

 


Validating the Model
 

Our initial set of reflectance spectra (two measurements of 33 samples) was processed to create a calibration model, and then tested against three unknown milk samples for the prediction of fat content. The results were very close to the actual fat content of the milk samples (Table II).

 

Table II. Prediction of Fat Content (% w/w) of Unknown Milk Samples

 
Sample Real value Predicted value Deviation
23 4.36% 4.47% -0.11%
23 4.36% 4.40% -0.04%
85 2.08% 2.15% -0.07%
85 2.08% 2.08% 0.00%
206 6.46% 6.20% 0.26%
206 6.46% 6.32% 0.14%
 

Conclusions
 

NIR spectroscopy is a versatile tool for analyzing the composition of various milk and dairy products, offering the advantages of continuous, real-time measurement and flexibility in configuring setups for use from lab to line.

As our experiment demonstrates, the use of robust calibration models is necessary to obtain quantitative information. Creation of an accurate calibration model starts with representative data that accounts for sample non-uniformity and other variables. With a good calibration model, NIR spectroscopy techniques can be applied to the measurement of critical sample parameters in unknown samples in the field, on a production line or as part of an inbound or outbound QC procedure. The ability to extract such important information from NIR spectroscopy has made it a very important technique for the food and agricultural industries.