Exploration of Spanish Olive Oil Quality with a Miniaturized Low-Cost\n Fluorescence Sensor and Machine Learning Techniques

Francesca Venturini, Michela Sperti, Umberto Michelucci, Ivo Herzig, Michael Baumgartner, Josep Palau Caballero, Arturo Jiménez, and Marco Agostino DeriuarXiv 2021 · DOI · arXiv

TL;DR

Researchers have developed a "minimalist," portable, and low-cost sensor that uses UV-induced fluorescence and machine learning to classify olive oil quality with up to 100% accuracy. By bypassing the need for expensive laboratory equipment and complex chemical reagents, this technology offers a path toward democratizing quality control and fighting food fraud across the global supply chain.

What Problem Does This Paper Address?

Olive oil is a high-value commodity, but its quality—categorized as Extra Virgin (EVOO), Virgin (VOO), or Lampante (LOO)—is notoriously difficult to verify. Currently, determining quality requires a combination of sophisticated chemical analysis (measuring acidity and peroxide levels) and organoleptic evaluation by trained sensory panels.

These methods are expensive, time-consuming, and restricted to certified laboratories. This lack of accessibility creates a "black box" in the supply chain, making it easier for fraudulent activities, such as adulteration with lower-grade oils, to go undetected. The authors sought to create a tool that is cheap enough for producers to use on-site and accurate enough to replace traditional lab tests.

Methods

The researchers took a "minimalist" approach to both hardware and software:

  • The Sensor: The device uses a 395nm UV LED to excite the oil sample. A miniature spectrometer (STS-Vis) captures the resulting fluorescence at a 90-degree angle to avoid interference from the excitation light. Notably, the design omits traditional optical components like filters or lenses to keep costs low and the footprint small (12.5 cm x 12.5 cm x 5 cm). The entire system is controlled by a Raspberry Pi.
  • Machine Learning: Rather than relying on manual feature engineering, the team tested eight different ML algorithms to classify the spectral data:
  • Support Vector Machines (SVM)
    • Naive Bayes (NB)
    • Multinomial Logistic Regression (MLR)
    • PCA combined with Linear Discriminant Analysis (LDA)
    • Decision Trees (DT)
    • Random Forest (RF)
    • k-Nearest Neighbors (k-NN)
    • Artificial Neural Networks (ANN)

Datasets

The study utilized 27 olive oil samples from the 2019-2020 harvest provided by a Spanish producer (Conde de Benalúa).

  • Composition: 12 EVOO, 8 VOO, and 7 LOO samples.
  • Data Volume: Each sample was measured 20 times, resulting in a dataset of 540 spectra.
  • Features: Each spectrum consists of 1024 values (intensities at different wavelengths).
  • Validation: The data was split into 80% training and 20% validation, with the process repeated 100 times to ensure the results were statistically robust.

Key Insights and Ideas

  • The Power of Pigments: The sensor specifically targets natural fluorescent molecules like chlorophylls and carotenoids. The researchers found that the signal in the 650–750nm range (the "red" end of the spectrum) contains sufficient information to distinguish between quality grades, even without looking at UV-range markers like Vitamin E.
  • Hardware Simplicity vs. Software Intelligence: Traditional spectroscopy often requires high-end optics to clean up signals. This paper demonstrates that machine learning—specifically non-linear models—can compensate for a "minimalist" hardware setup by learning to ignore noise and "inner filter effects" (where the sample re-absorbs its own light).
  • No Pre-processing Required: One of the most significant findings was that models like ANNs and Random Forests achieved near-perfect results using raw, normalized intensity data. This removes a major barrier to real-time deployment, as it eliminates the need for complex data cleaning steps.

Key Results

  • Perfect Accuracy: Both Random Forest (RF) and k-Nearest Neighbors (k-NN) achieved an average classification accuracy of 100%.
  • Neural Network Performance: The best-performing ANN (3 layers, 32 neurons per layer) reached 99% accuracy.
  • Dimensionality Reduction: Using PCA+LDA, the researchers showed that they could achieve 99.9% accuracy using only 30 components—effectively compressing the 1024-pixel spectral data by over 97% without losing predictive power.
  • SVM Underperformance: Interestingly, Support Vector Machines performed the worst (51% accuracy), likely because they are highly sensitive to data pre-processing, which the authors intentionally avoided.

Limitations and Future Work

While the results are impressive, the authors acknowledge several areas for further development:

  • Geographical Diversity: The current dataset is limited to samples from a single producer in Spain. To be truly universal, the models need to be trained on a wider variety of olive cultivars and geographical origins.
  • Adulteration Detection: While the sensor excels at grading pure oils, future work is needed to test its sensitivity in detecting specific "fraud cocktails" (e.g., EVOO mixed with 10% sunflower or pomace oil).
  • Expanded Sensing: The authors suggest that adding a second LED at a lower UV wavelength could capture additional markers related to oxidation and aging, potentially making the sensor even more robust for shelf-life monitoring.

Summary updated

Abstract

Extra virgin olive oil (EVOO) is the highest quality of olive oil and is\ncharacterized by highly beneficial nutritional properties. The large increase\nin both consumption and fraud, for example through adulteration, creates new\nchallenges and an increasing demand for developing new quality assessment\nmethodologies that are easier and cheaper to perform. As of today, the\ndetermination of olive oil quality is performed by producers through chemical\nanalysis and organoleptic evaluation. The chemical analysis requires the\nadvanced equipment and chemical knowledge of certified laboratories, and has\ntherefore a limited accessibility. In this work a minimalist, portable and\nlow-cost sensor is presented, which can perform olive oil quality assessment\nusing fluorescence spectroscopy. The potential of the proposed technology is\nexplored by analyzing several olive oils of different quality levels, EVOO,\nvirgin olive oil (VOO), and lampante olive oil (LOO). The spectral data were\nanalyzed using a large number of machine learning methods, including artificial\nneural networks. The analysis performed in this work demonstrates the\npossibility of performing classification of olive oil in the three mentioned\nclasses with an accuracy of 100$\\%$. These results confirm that this minimalist\nlow-cost sensor has the potential of substituting expensive and complex\nchemical analysis.\n
BibTeX
@misc{venturini2021exploration,
  author = {Francesca Venturini and Michela Sperti and Umberto Michelucci and Ivo Herzig and Michael Baumgartner and Josep Palau Caballero and Arturo Jiménez and and Marco Agostino Deriu},
  title = {{Exploration of Spanish Olive Oil Quality with a Miniaturized Low-Cost\textbackslash\{\}n Fluorescence Sensor and Machine Learning Techniques}},
  year = {2021},
  eprint = {2104.06310},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.06310},
}
Figure