Smart Detection of Faults in Beers Using Near-Infrared Spectroscopy, a Low-Cost Electronic Nose and Artificial Intelligence
Abstract
:1. Introduction
2. Materials and Methods
2.1. Samples Description
2.2. Near-Infrared Measurements
2.3. Electronic Nose Measurements
2.4. Alcohol and pH Measurements
2.5. Statistical Analysis and Machine Learning Modelling
3. Results
4. Discussion
4.1. Near-Infrared Spectroscopy (NIR)
4.2. Low-Cost e-Nose and Beer Chemometrics
4.3. Supervised Machine Learning Classification Models and Deployment
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Spedding, G.; Aiken, T. Sensory analysis as a tool for beer quality assessment with an emphasis on its use for microbial control in the brewery. In Brewing Microbiology; Elsevier: Amsterdam, The Netherlands, 2015; pp. 375–404. [Google Scholar]
- Amerine, M.A.; Pangborn, R.M.; Roessler, E.B. Principles of Sensory Evaluation of Food; Elsevier: Amsterdam, The Netherlands, 2013. [Google Scholar]
- Lawless, H.T. Quantitative Sensory Analysis: Psychophysics, Models and Intelligent Design; Wiley: Hoboken, NJ, USA, 2013. [Google Scholar]
- Ristic, R.; Danner, L.; Johnson, T.; Meiselman, H.; Hoek, A.; Jiranek, V.; Bastian, S. Wine-related aromas for different seasons and occasions: Hedonic and emotional responses of wine consumers from Australia, UK and USA. Food Qual. Prefer. 2019, 71, 250–260. [Google Scholar] [CrossRef]
- Ragazzo-Sanchez, J.; Chalier, P.; Chevalier-Lucia, D.; Calderon-Santoyo, M.; Ghommidh, C. Off-flavours detection in alcoholic beverages by electronic nose coupled to GC. Sens. Actuators B Chem. 2009, 140, 29–34. [Google Scholar] [CrossRef]
- Díaz, A.; Ventura, F.; Galceran, M.T. Identification of 2, 3-butanedione (diacetyl) as the compound causing odor events at trace levels in the Llobregat River and Barcelona’s treated water (Spain). J. Chromatogr. A 2004, 1034, 175–182. [Google Scholar] [CrossRef] [PubMed]
- Miller, G.H. Whisky Science: A Condensed Distillation; Springer: Berlin/Heidelberg, Germany, 2019. [Google Scholar]
- Barnes, T. The complete beer fault guide v. 1.4. January 2011. Available online: https://londonamateurbrewers.co.uk/wp-content/uploads/2015/05/Complete_Beer_Fault_Guide.pdf (accessed on 10 June 2021).
- Cravero, M.C.; Bonello, F.; Pazo Alvarez, M.d.C.; Tsolakis, C.; Borsa, D. The sensory evaluation of 2, 4, 6-trichloroanisole in wines. J. Inst. Brew. 2015, 121, 411–417. [Google Scholar] [CrossRef]
- Wray, E. Common faults in beer. In The Craft Brewing Handbook; Elsevier: Amsterdam, The Netherlands, 2020; pp. 217–246. [Google Scholar]
- Mander, L.; Liu, H.-W. Comprehensive Natural Products II: Chemistry and Biology; Elsevier: Amsterdam, The Netherlands, 2010; Volume 1. [Google Scholar]
- Pomeroy, R.D.; Cruse, H. Hydrogen sulfide odor threshold. J. Am. Water Work. Assoc. 1969, 61, 677. [Google Scholar] [CrossRef]
- World Health Organization. WHO Guidelines for Drinking Water Quality, 2nd ed.; WHO: Geneva, Switzerland, 1996. [Google Scholar]
- Viejo, C.G.; Fuentes, S.; Howell, K.; Torrico, D.; Dunshea, F.R. Robotics and computer vision techniques combined with non-invasive consumer biometrics to assess quality traits from beer foamability using machine learning: A potential for artificial intelligence applications. Food Control 2018, 92, 72–79. [Google Scholar] [CrossRef]
- Viejo, C.G.; Fuentes, S. Beer Aroma and Quality Traits Assessment Using Artificial Intelligence. Fermentation 2020, 6, 56. [Google Scholar] [CrossRef]
- Wilson, C.; Threapleton, L. Application of artificial intelligence for predicting beer flavours from chemical analysis. In Proceedings of the 29th European Brewery Convention Congress, Dublin, Ireland, 17–22 May 2003; pp. 17–22. [Google Scholar]
- Geilings, B. Using Artificial Intelligence to Positively Impact the Beer Brewing Process. Bachelor’s Thesis, Haaga-Helia University of Applied Sciences, Helsinki, Finland, 2021. [Google Scholar]
- Viejo, C.G.; Fuentes, S.; Li, G.; Collmann, R.; Condé, B.; Torrico, D. Development of a robotic pourer constructed with ubiquitous materials, open hardware and sensors to assess beer foam quality using computer vision and pattern recognition algorithms: RoboBEER. Food Res. Int. 2016, 89, 504–513. [Google Scholar] [CrossRef]
- Gonzalez Viejo, C.; Fuentes, S.; Torrico, D.; Howell, K.; Dunshea, F.R. Assessment of beer quality based on foamability and chemical composition using computer vision algorithms, near infrared spectroscopy and machine learning algorithms. J. Sci. Food Agric. 2018, 98, 618–627. [Google Scholar] [CrossRef]
- Vann, L.; Layfield, J.B.; Sheppard, J.D. The application of near-infrared spectroscopy in beer fermentation for online monitoring of critical process parameters and their integration into a novel feedforward control strategy. J. Inst. Brew. 2017, 123, 347–360. [Google Scholar] [CrossRef] [Green Version]
- Fox, G. The brewing industry and the opportunities for real-time quality analysis using infrared spectroscopy. Appl. Sci. 2020, 10, 616. [Google Scholar] [CrossRef] [Green Version]
- Gonzalez Viejo, C.; Fuentes, S. Low-Cost Methods to Assess Beer Quality Using Artificial Intelligence Involving Robotics, an Electronic Nose, and Machine Learning. Fermentation 2020, 6, 104. [Google Scholar] [CrossRef]
- Voss, H.G.J.; Mendes Júnior, J.J.A.; Farinelli, M.E.; Stevan, S.L. A Prototype to Detect the Alcohol Content of Beers Based on an Electronic Nose. Sensors 2019, 19, 2646. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Ghasemi-Varnamkhasti, M.; Mohtasebi, S.; Rodriguez-Mendez, M.; Lozano, J.; Razavi, S.; Ahmadi, H. Potential application of electronic nose technology in brewery. Trends Food Sci. Technol. 2011, 22, 165–174. [Google Scholar] [CrossRef]
- Viejo, C.G.; Torrico, D.D.; Dunshea, F.R.; Fuentes, S. Development of Artificial Neural Network Models to Assess Beer Acceptability Based on Sensory Properties Using a Robotic Pourer: A Comparative Model Approach to Achieve an Artificial Intelligence System. Beverages 2019, 5, 33. [Google Scholar] [CrossRef] [Green Version]
- Santos, J.P.; Lozano, J. Real time detection of beer defects with a hand held electronic nose. In Proceedings of the 2015 10th Spanish Conference on Electron Devices (CDE), Madrid, Spain, 11–13 February 2015; pp. 1–4. [Google Scholar]
- Sanaeifar, A.; ZakiDizaji, H.; Jafari, A.; de la Guardia, M. Early detection of contamination and defect in foodstuffs by electronic nose: A review. TrAC Trends Anal. Chem. 2017, 97, 257–271. [Google Scholar] [CrossRef]
- Pornpanomchai, C.; Suthamsmai, N. Beer classification by electronic nose. In Proceedings of the 2008 International Conference on Wavelet Analysis and Pattern Recognition, Hong Kong, China, 30–31 August 2008; pp. 333–338. [Google Scholar]
- Gonzalez Viejo, C.; Fuentes, S.; Godbole, A.; Widdicombe, B.; Unnithan, R.R. Development of a low-cost e-nose to assess aroma profiles: An artificial intelligence application to assess beer quality. Sens. Actuators B Chem. 2020, 308, 127688. [Google Scholar] [CrossRef]
- Gonzalez Viejo, C.; Tongson, E.; Fuentes, S. Integrating a Low-Cost Electronic Nose and Machine Learning Modelling to Assess Coffee Aroma Profile and Intensity. Sensors 2021, 21, 2016. [Google Scholar] [CrossRef] [PubMed]
- Perez, C. Big Data and Deep Learning. Examples with Matlab; Lulu Press, Inc: Morrisville, NC, USA, 2020. [Google Scholar]
- Gonzalez Viejo, C.; Torrico, D.D.; Dunshea, F.R.; Fuentes, S. Emerging Technologies Based on Artificial Intelligence to Assess the Quality and Consumer Preference of Beverages. Beverages 2019, 5, 62. [Google Scholar] [CrossRef] [Green Version]
- Smyth, H.; Cozzolino, D.; Cynkar, W.; Dambergs, R.; Sefton, M.; Gishen, M. Near infrared spectroscopy as a rapid tool to measure volatile aroma compounds in Riesling wine: Possibilities and limits. Anal. Bioanal. Chem. 2008, 390, 1911–1916. [Google Scholar] [CrossRef]
- Ferrer-Gallego, R.; Hernández-Hierro, J.M.; Rivas-Gonzalo, J.C.; Escribano-Bailón, M.T. Evaluation of sensory parameters of grapes using near infrared spectroscopy. J. Food Eng. 2013, 118, 333–339. [Google Scholar] [CrossRef]
- Burns, D.A.; Ciurczak, E.W. Handbook of Near-Infrared Analysis; CRC press: Boca Raton, FL, USA, 2007. [Google Scholar]
- Osborne, B.G.; Fearn, T.; Hindle, P.H. Practical NIR Spectroscopy with Applications in Food and Beverage Analysis; Longman Scientific and Technical: London, UK, 1993. [Google Scholar]
- Brenner, M.; Khan, A.; Bernstein, L. Formation and Retention of Free H2S and of Free Volatile Thiols during Beer Fermentation. In Proceedings of the Annual Meeting-American Society of Brewing Chemists, St. Paul, MN, USA, 1 December 1975; pp. 82–93. [Google Scholar]
- Fuentes, S.; Summerson, V.; Gonzalez Viejo, C.; Tongson, E.; Lipovetzky, N.; Wilkinson, K.L.; Szeto, C.; Unnithan, R.R. Assessment of Smoke Contamination in Grapevine Berries and Taint in Wines Due to Bushfires Using a Low-Cost E-Nose and an Artificial Intelligence Approach. Sensors 2020, 20, 5108. [Google Scholar] [CrossRef] [PubMed]
- Pesselman, R.L.; Meshbesher, T.M.; Floyd, S.D.; Langer, S.H. Electrogenerative oxidation of ethanol to acetaldehyde. Chem. Eng. Commun. 1985, 38, 265–273. [Google Scholar] [CrossRef]
- Gomes, M.M.; Sakamoto, I.K.; Rabelo, C.A.B.S.; Silva, E.L.; Varesche, M.B.A. Statistical optimization of methane production from brewery spent grain: Interaction effects of temperature and substrate concentration. J. Environ. Manag. 2021, 288, 112363. [Google Scholar] [CrossRef] [PubMed]
- Violino, S.; Figorilli, S.; Costa, C.; Pallottino, F. Internet of beer: A review on smart technologies from mash to pint. Foods 2020, 9, 950. [Google Scholar] [CrossRef]
- Betts, B. Brewing up: A technology revolution. Eng. Technol. 2016, 11, 54–57. [Google Scholar] [CrossRef]
Common Name | Chemical Compound | Aroma/Flavor | Origin | Contamination Stage | Detection Threshold in Water (mg L−1) | Typical Concentration in Beer (mg L−1) | Spoilage Concentration in Beer (mg L−1) | References |
---|---|---|---|---|---|---|---|---|
Diacetyl | 2,3-butanediole | Butter | Low levels of valine in wort Microbial contamination | Wort | 5 × 10−4 | 8 × 10−3–0.60 | 0.25 | [5,6,7,8] |
TCA * | 2,4,6-trichloroanisole | Must taint/ Moldy | Contaminated ingredients or other material (packaging) | Ageing Storage | 3 × 10−8–200 × 10−8 | Absent | 0.02 | [5,7,9] |
Acetic acid | Acetic acid | Sour/Vinegar/ Tangy | Spoilage bacteria Wild yeast | Fermentation Conditioning | 0.10 | 30–200 | 60.0–120.0 | [7,8,10] |
Lactic acid | Lactic acid | Sour/Sour milk/Tart | Spoilage bacteria | Mashing Secondary fermentation | 0.04 | 0.20–1.50 | 140 | [8,10] |
H2S | Hydrogen sulfide | Rotten eggs | Raw material Yeast contamination | Fermentation | 1 × 10−5–10 × 10−5 | ≤1 × 10−3 | 4 × 10−3 | [8,10,11,12] |
DMS | Dimethyl sulfide | Sweet corn/ Onion/Rotten vegetables | Microbial contamination | Wort boiling/cooling | 3.3 × 10−7 | 0.01–0.15 | 0.40 | [8,10] |
Papery | Trans-2-nonenal | Cardboard/ Oxidized | Oxidation Staling | Fermentation Storage | 8 × 10−8 | < 5 × 10−5 | 4 × 10−4 | [8,10] |
Isovaleric acid | Isovaleric acid | Cheesy/Rancid/ Sweaty feet | Old/Oxidized hops Process faults | Boiling Ageing | 4.9 × 10−4 | ≤ 0.20 | 1.00 | [7,8,10] |
Earthy | 2-Ethyl fenchol | Soil/Compost/ Moldy | Microbial contamination | Packaging | 5 × 10−3 ** | Absent | 5 × 10−3 | [8] |
Acetaldehyde | Acetaldehyde | Green apple/ Bready/Grass | Staling Microbial contamination Poor yeast health | Fermentation Storage | 2.5 × 10−5–6.5 × 10−5 | 2.00–15.0 | 20.0 | [7,8] |
Butyric | Butyric acid | Baby vomit/ Putrid/Rancid butter | Microbial contamination Ageing | Wort production Packaging/Storage | 2.4 × 10−3 | 0.50–1.50 | 3.00 | [7,8] |
Caprylic | Caprylic acid | Goat/Soap/ Sweaty | Microbial contamination Yeast breakdown | Maturation | 0.013 ** | 2.00–8.00 | 10.0 | [7,8] |
Mercaptan | Ethanethiol | Drains/Sewer | Autolysis Poor yeast health | Fermentation Ageing | 1.7 × 10−6 ** | 0.00–5 × 10−3 | 1 × 10−3 | [7,8] |
Spicy | Eugenol | Clove | Microbial contamination Wild yeast Oxidation | Ageing | 7.1 × 10−7 | 0.01–0.03 | 0.40 | [7,8] |
Metallic | Ferrous sulfate | Metal/Blood/ Coin/Iron | Water sources Non-passivated vessels | Any brewing stage | 1.00–1.50 ** | ≤ 0.50 | 1.00 | [8] |
Grainy | Isobutyraldehyde | Cereal husks/ Green malt/ Raw grain | Excessive run-off Insufficient boiling | Wort boiling | 4.9 × 10−7 | 1 × 10−3–0.02 | 1.00–2.50 | [7,8] |
Indole | Indole | Farm/Barnyard/ Fecal/Pig-like | Microbial contamination | Fermentation | 5 × 10−3 ** | < 5 × 10−3 | 0.01–0.02 | [8] |
Light-struck | 2-Methyl-2-butene-1-thiol | Fecal/Skunky/ Sulfury | Clear or green bottles | Storage | 4 × 10−6 ** | 1 × 10−6–5 × 10−6 | 5.00–30.00 | [8] |
Bromophenol * | Bromophenol | Inky/Museum-like/Old electronics | Process/Equipment faults Contaminated raw material | Any brewing stage | 3 × 10−9 | Absent | 1.3 × 10−3 | [7,8] |
Catty * | p-Methane-8-thiol-3-one | Oxidized/tomcat urine | Hops Contaminated raw material | Ageing Packaging | 1.5 × 10−5 ** | Absent | 1.5 × 10−5 | [8] |
Plastic * | Styrene | Burning plastic/ Chemical | Brewing equipment and packaging material contamination | Any brewing stage | 0.02 | Absent | 0.02 | [8,13] |
Number | Fault | Flavor/Aroma * | Concentration (Low; mg L−1) | Concentration (High; mg L−1) |
---|---|---|---|---|
1 | Acetaldehyde | Green apple, cut grass | 19.5 | 45.0 |
2 | Acetic Acid | Vinegar | 156 | 360 |
3 | Butyric Acid | Putrid, baby vomit | 3.25 | 7.50 |
4 | Caprylic Acid | Soapy, wax, fatty | 13.7 | 31.5 |
5 | Contamination (Acetic Acid + Diacetyl) | Sour, buttery | 156 | 361 |
6 | Dimethyl Sulfide | Cooked vegetables | 0.17 | 0.40 |
7 | Diacetyl (2,3-Butanediol) | Butter, butterscotch | 0.26 | 0.60 |
8 | Earthy (2-Ethyl fenchol) | Soil | 6.5 × 10−3 | 0.02 |
9 | Isobutyraldehyde | Grainy, husk, nut | 1.63 | 3.75 |
10 | Indole | Farm, barnyard | 0.24 | 0.55 |
11 | Isovaleric Acid | Cheese, sweaty socks, old hops | 2.60 | 6.00 |
12 | Lactic Acid | Sour milk | 173.33 | 400 |
13 | Light-struck (3-Methyl-2-butene-1-thiol) | Skunky, toffee, coffee | 2.6 × 10−4 | 6x10−4 |
14 | Mercaptan (Ethanethiol) | Sewer, drains | 1.6 × 10−3 | 3.8 × 10−3 |
15 | Ferrous Sulfate | Metallic, blood | 1.63 | 3.75 |
16 | Trans-2-nonenal | Papery, cardboard, oxidized | 8.7 × 10−4 | 2 × 10−3 |
17 | Eugenol | Cloves, spicy | 0.05 | 0.12 |
18 | Hydrogen Sulfide | Rotten Eggs | 0.03 | 0.07 |
Stage | Samples | Accuracy | Error | Performance (MSE) |
---|---|---|---|---|
Model 1: Near-infrared inputs | ||||
Training | 239 | 100% | 0.0% | <0.001 |
Testing | 103 | 85.4% | 14.6% | 0.08 |
Overall | 342 | 95.6% | 4.4% | - |
Model 2: Electronic nose inputs | ||||
Training | 239 | 98.5% | 1.5% | 0.01 |
Testing | 103 | 87.7% | 12.3% | 0.08 |
Overall | 342 | 95.3% | 4.7% | - |
Stage | Samples | Accuracy | Error | Performance (MSE) |
---|---|---|---|---|
Model 3: Near-infrared inputs—Low concentration | ||||
Training | 126 | 100% | 0.0% | <0.001 |
Testing | 54 | 96.3% | 3.7% | 0.003 |
Overall | 180 | 98.9% | 1.1% | - |
Model 4: Near-infrared inputs—High concentration | ||||
Training | 126 | 100% | 0.0% | <0.001 |
Testing | 54 | 94.4% | 5.6% | 0.005 |
Overall | 180 | 98.3% | 1.7% | - |
Stage | Samples | Accuracy | Error | Performance (MSE) |
---|---|---|---|---|
Model 5: Electronic nose inputs—Low concentration | ||||
Training | 420 | 99.8% | 0.2% | <0.001 |
Testing | 180 | 90.0% | 10.0% | 0.009 |
Overall | 600 | 96.8% | 3.2% | - |
Model 6: Electronic nose inputs—High concentration | ||||
Training | 420 | 100% | 0.0% | <0.001 |
Testing | 180 | 87.2% | 12.8% | 0.011 |
Overall | 600 | 96.2% | 3.8% | - |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Gonzalez Viejo, C.; Fuentes, S.; Hernandez-Brenes, C. Smart Detection of Faults in Beers Using Near-Infrared Spectroscopy, a Low-Cost Electronic Nose and Artificial Intelligence. Fermentation 2021, 7, 117. https://doi.org/10.3390/fermentation7030117
Gonzalez Viejo C, Fuentes S, Hernandez-Brenes C. Smart Detection of Faults in Beers Using Near-Infrared Spectroscopy, a Low-Cost Electronic Nose and Artificial Intelligence. Fermentation. 2021; 7(3):117. https://doi.org/10.3390/fermentation7030117
Chicago/Turabian StyleGonzalez Viejo, Claudia, Sigfredo Fuentes, and Carmen Hernandez-Brenes. 2021. "Smart Detection of Faults in Beers Using Near-Infrared Spectroscopy, a Low-Cost Electronic Nose and Artificial Intelligence" Fermentation 7, no. 3: 117. https://doi.org/10.3390/fermentation7030117
APA StyleGonzalez Viejo, C., Fuentes, S., & Hernandez-Brenes, C. (2021). Smart Detection of Faults in Beers Using Near-Infrared Spectroscopy, a Low-Cost Electronic Nose and Artificial Intelligence. Fermentation, 7(3), 117. https://doi.org/10.3390/fermentation7030117