Instruments & Data Tools: solutions for sensing, imaging, analytics

Instruments & Data Tools is specialising in custom algorithms and instrumentation for spectroscopy and imaging.
We develop solutions for science and industry.

Qualitative analysis of ground coffee with NIR spectrometry

Coffee flavour is a very complicated mix of so many different elements: variety, roasting, grinding and brewing all play a unique part in making your perfect cup of coffee.

A lot of ink has been spent to describe all these factors, and we won’t be able to cover it all here. For those who are interested, you can read a bit more on coffee varieties, roasting and brewing herehere and here.

In this post, we’ll discuss how NIR analysis can be used to distinguish between different types of ground coffee. We’ll discuss a very rough classification of ground coffee, with no pretense to write a complete scientific investigation. Rough as they may be however, our results show that with little knowledge of the coffee samples one can be a fairly good classification that can have many uses. For instance it may provide a way to quickly detect adulteration, composition, degree of roasting and sensory perception of coffees. Sensory analysis is especially attractive: imagine if we could predict the taste of the coffee by measuring NIR spectra of beans or ground coffee blends. Even further, imagine if we could ‘design’ the desired coffee flavour starting from raw beans!

Well, that seems a big leap at the moment, so we set ourselves up for a simpler first step: basic classification ground coffee based on NIR spectra. For that we decided to use ground coffee of consistent quality (especially milling size) which has been already classified based on flavour strength. We chose Aldi Expressi coffee capsules, which comes in several varieties, each defined by an ‘intensity’ scale. Differences across the scale are due to different degree of roasting, and different coffee variety (Arabica and/or Robusta) as well as country of origin.

DISCLAIMER: Instruments & Data Tools did not receive any compensation, nor free samples from Aldi Australia or its parent company. We chose Aldi Expressi coffee capsules due to its large available selection and the possibility to compare NIR data to an external intensity scale. The data and comments provided here are not influenced by Aldi Australia in any way.

NIR analysis of ground coffee

We used NIR analysis to try and answer three simple questions:

1. Can we distinguish the content of different capsules from one another?
2. Can we separate coffees based on caffeine content?
3. Can we distinguish coffees based on chlorogenic acids content?

Question number 3 is especially interesting, as chlorogenic acid plays a role during roasting and influence the bitterness and the acidity of the coffee beverage.

OK, that’s the list of all capsule types we used, along with some information we gathered from Aldi website:

Name Intensity Roast Variety
Tauro 5 Medium Arabica
Renzo 8 Medium-dark Arabica
Reggio 9 Medium-dark NA
La Spezia 11 Dark Arabica + Robusta
Torino 11 Dark Arabica
Abruzzo 12 Dark Arabica + Robusta
Calabrese 13 Dark Arabica + Robusta

NIR analysis was done in the wavelength range was 1100-2300 nm with steps of 2 nm. For each sample we took 10 readings, each reading was the average of 20 scans.

The data collected were reduced by Principal Components Analysis in Python. We chose the first 3 principal components (which we called PC1, PC2, PC3), and plotted the reduced data as a 3D scatter plot (more info in interactive 3D plots in our previous post).

Results

Question 1: Can we distinguish between capsules?

To answer this question we used the full wavelength range for the PCA analysis, and here’s the result. As you can see, the different coffee types tend to cluster apart, where the medium roasts sit at the right hand side of the chart and the dark roasts towards the left hand side. Difference between individual intensity value is also very clear, representing the underlying difference in compositions.

Question 2: Can we distinguish between caffeine content?

Here we used the 1650-1800 nm band, that according to [1] and [2] contains a strong overtone from the caffeine compound. The measurements from the different capsules spread nicely out following increasing caffeine content. The direction of the arrow comes from the well known fact that the darker roasts contain less caffeine than the lighter roasts.

Question 3: Can we distinguish between chlorogenic acids content?

Here we used the 1400-1600 nm band that, according to the same references cited above, should contain strong signal coming from chlorogenic acids. Sure enough we can see that the darker roasts contain increasing amount of chlorogenic acids, giving the coffee a more bitter and pungent taste.

PCA NIR ground coffee

We hope that we enjoyed our little coffee science and would love to hear from anybody interested in using NIR analysis to characterise their coffee blends. Time for a cuppa now…. thanks for stopping by!