Revealing interactive scatter plots with Plotly for Python
Revealing interactive scatter plots with Plotly for Python
01/25/2018
Interactive choropleth maps with Plotly for Python
Interactive choropleth maps with Plotly for Python
02/15/2018

Food safety with AOTF NIR technology: detecting lactose in lactose-free milk

detecting lactose in lactose-free milk
Hi everyone and welcome to a new tutorial on near-infrared spectroscopy for food analysis. Today we will show how to detect the difference between lactose-free milk and normal milk.

If you are interested in other tutorial on near-infrared spectroscopy for food analysis, feel free to check our posts on: macadamia, coffee, breadcrumbs, and milk powder.

Lactose intolerance and lactose-free milk


Lactose is a sugar naturally present in regular milk. Lactose intolerance is the condition in which a subjects lacks the enzyme lactase in the small intestine. The lactase is responsible for breaking down the lactose into its constituents glucose and galactose.

That was a bit of a mouthful I know. Said in plain language, if we are lactose intolerant, our digestive system can’t process the milk sugar and that causes unpleasant symptoms as bloating, nausea, gas, etc.

Lactose intolerance is not an allergy (milk allergy is a completely different thing) but can be relieved by avoiding the lactose. Dairy-free products do not contain lactose, but there are option such as lactose-free milk that are produced for lactose intolerants.

Lactose free milk is normally produced by ultra-pasteurization of regular milk and by adding the lactase in it. The lactase breaks down the lactose to make the milk lactose-free.

Enters near-infrared spectroscopy



In this tutorial, we will show how we can detect the presence of milk in lactose-free milk or vice versa. In practice, everything else being equal, we are detecting the presence of lactase (+ glucose and galactose) in lactose-free milk, as opposed to the presence of lactose in regular milk.

We prepared different samples starting with 100% milk, and changing the ratio of milk/lactose-free in ⅛ intervals. That means the first sample was ⅛ milk and ⅞ lactose-free milk, the second sample was 2/8 milk and 6/8 lactose-free milk, and so on.

We used our Brimrose Luminar 5030 AOTF-NIR spectrometer, mounted on a vertical bracket to scan the samples. We took good care to keep the distance of the spectrometer from the surface of the milk samples to be always the same. In this way we minimised sample-to-sample variations.
We collected 50 scans for each sample, scanning from 1100 nm to 2300 nm with intervals of 2 nm. We collected 50 spectra, each spectrum was in turn the average of 20 individual scans (yes, the AOTF technology is very fast!).

For this tutorial we just decided to run a qualitative analysis using Principal Components Analysis (PCA). An introduction to PCA can be found in our previous post, and another application of PCA to food safety is available in another of our posts.

By selecting the first three principal components, which explain most of the variations of the data, we are able to produce a 3D scatter plot of the results.
Each dot in the plot represents an individual scan. They are color coded according to the (known) sample composition. The purpose of this exercise is to see whether and how well the PCA can cluster apart the measurements of different samples. In other words, how are we able to detect the presence of lactose in lactose-free milk?

Well, here we see that even just ⅛ of regular milk in lactose-free milk is detectable. Given the good clustering we argue that we can do even better than that! On top of that, each individual ⅛ step in concentration can be quite clearly distinguished.

We leave you with the Youtube stream of how we did the whole experiment. Hope you enjoy the view and thanks for stopping by!

Instruments & Data Tools

Daniel Pelliccia
Daniel Pelliccia
Physicist and an entrepreneur. Founder and Managing Director at Instruments & Data Tools, specialising in optical design and analytical instrumentation. Founder at Rubens Technologies, the intelligence system for the fresh fruit export industry.