At AINIA, we collaborated with TROLLI to demonstrate that it is possible to measure and predict protein content in confectionery masses in real time using Near-Infrared (NIR) spectroscopy.
NIR Spectroscopy for Inline Control in Confectionery
The objective was clear: to replace punctual, destructive and slow analytical checks with a non-invasive, accurate, and process-integrated methodology capable of reducing waste, shortening decision times and strengthening final product consistency.
Confectionery Formulation and Quality: Protein, Water and Carbohydrates
The project builds on a well-known industry reality: confectionery formulation is increasingly differentiated by ingredient performance. Accurately determining protein, carbohydrate and water content is critical for nutritional value, process rheology and, ultimately, organoleptic properties. However, conventional techniques—due to sample preparation, specialised personnel, and long turnaround times—limit inline control, deviation reduction and automation. This prompted us to explore an alternative based on NIR spectroscopy (750–2,500 nm), which, supported by the Lambert-Beer law, enables correlation between spectral fingerprints and reference analytical parameters.
NIR Methodology Under Real Plant Conditions
To ensure representativeness, we worked with TROLLI under plant-equivalent conditions. We started from three formulations and varied gelatin (collagen) content from double the baseline to complete removal, covering a wide range of real product matrices. Measurements were taken using an NIR spectrophotometer equipped with an immersion probe and halogen lamp. In parallel, the actual protein value was determined volumetrically by the Chemical Analysis Laboratory at AINIA. Using both datasets—spectra and reference values—we built and refined a predictive model using Partial Least Squares (PLS) regression.
PLS Modelling: High-Accuracy Protein Prediction
The results confirm the viability of the solution. We obtained an NIR predictive model for protein content with a mean cross-validation error of 0.49% over a 0–11% protein range and a coefficient of determination (R²) of 0.975. These indicators reveal high accuracy for fast, non-destructive estimation of a key quality parameter such as protein percentage in confectionery masses. Beyond the metrics, the value lies in what the model enables: continuous process control, early deviation detection and immediate corrective action—translating into reduced waste, greater product stability and faster decision-making.
Real-Time Monitoring and SCADA/MES Integration
The next natural step is inline integration of the NIR system at critical points such as mixing, moulding or drying, connecting it to supervisory and control systems to close the decision loop. Experience shows that model maintenance—with occasional recalibrations following recipe or raw-material changes—ensures long-term robustness and maximises return on investment. Collaboration with TROLLI has been essential to validate the technology under real-world conditions: their process expertise, combined with our analytical and modelling capabilities, has transformed a technological hypothesis into an operational tool with direct impact on production.
From Off-Line Analytics to Data-Driven Process Control
If you manufacture confectionery or any food product where composition defines the process, AINIA can help you measure what matters in real time. We design feasibility studies, develop tailor-made NIR models and support inline implementation so that data becomes action and quality control becomes a competitive advantage.
A Development Within the CANDYSPECT Project
This work forms part of the CANDYSPECT project, focused on researching spectral technologies capable of determining key properties in gummy confectionery. CANDYSPECT is integrated into the flagship project ECOFOOD – “Scientific-technological adaptation of agri-food value chains for a sustainable, ecological and digital transition” (code PAG-010000-2023-15), which drives technological innovation in the food industry towards more digital, efficient and sustainable processes.
The ECOFOOD project is promoted by the Ministry of Industry and Tourism within the framework of the Recovery, Transformation and Resilience Plan, and funded by the European Union – NextGenerationEU.







