Electronic Noses Applications in Beer Technology

This chapter describes and explains in detail the electronic noses (e-noses) as devices composed of an array of sensors that measure chemical volatile compounds and apply classification or regression algorithms. Then, it reviews the most significant applications of such devices in beer technology, with examples about defect detection, hop classification, or beer classification, among others. After the review, the chapter illustrates two applications from the authors, one about beer classification and another about beer defect detection. Finally, after a comparison with other analytical techniques, the chapter ends with a summary, conclusions, and the compelling future of the e-noses applied to beer technology.


Introduction
Among the alcoholic beverages, beer is one of the most consumed in the world [1]. Because of such a big market, beer safety and the repeatability of its organoleptic qualities are very important for the manufacturers. For this reason, several techniques are used in the beer industry; they assess these aspects by analyzing the chemical composition or by human panels. One of the most difficult analyses is the chemical species of the beer headspace (HS). The headspace contains multitude of volatile organic compounds (VOC) that determine the organoleptic qualities or VOCs that are markers of spoilage, toxins, or flavor instability. For example, beer evolution can be marked by the presence of oxidative species such as aldehydes produced from alcohol oxidation [2]; contamination by bacteria can be marked by the presence of diketones such as diacetyl [3]; or toxic species such as nitrosamines [4] that can be generated during the malt production. Furthermore, the analysis is hindered by the high amount of CO 2 in the beer so usually, there is a required degasification process. The analysis of the volatile chemical species not only applies to the final product but also to the ingredients (hops, malt, etc) as the quality and characteristics of the components have a determinant effect on the final product. All these analyses (human and chemical) are complex so they are done in batches and are costly in time and money. However, an early detection or continuous monitoring by means of a fast analysis can avoid wastage and save money and time. An e-nose is a technology that could able to analyze and extract the chemical information of the beer organic volatile compounds and correlate their organoleptic qualities. The aim of this chapter is to bring in the innovative and promising technology of e-noses in the traditional beer industry. With this intention, there is, first, an introduction to e-nose technology where the different parts are described in detail. Then, several examples of its use are enumerated and some of them are explained. In addition, there is a brief comparison with other techniques to highlight the advantages and the scope of its use. Finally, there are the conclusions and future trends.

Electronic noses
An e-nose is a device that tries to imitate the structure and functionality of the human nose, and both of them are intended to be used in similar applications. Figure 1 shows this similarity in the way they work: the first step in both is the interaction between volatile compounds (usually a complex mixture) with the appropriate receptors: olfactory receptors in the biological nose and a sensor array in the case of the e-nose. There is an overlapping in sensitivities so one odorant receptor responds to multiple odorants and one odorant can be detected by several odorant receptors. The next step in both is the storage of these signals in the brain or in a database of a pattern recognition machine (learning stage) for further identification of one of the odors that is learned (classification stage).
Pre-1920 work on machine olfaction was prevented by the absence of any suitable electronic instrumentation. In 1920, Zwaardemaker and Hogewind suggested that odors could be detected by measuring the electrical charge developed on a fine spray of water that contained the odorant in solution, but they were unable to develop this into a useful instrument [5].
The first real report of an experimental instrument was published by Hartman and colleagues who described an electrochemical sensor consisting of a polished metal wire microelectrode in contact with the surface of a porous rod saturated with a dilute electrolyte [6,7]. By using various combinations of metal electrodes, electrolytes, and applied potentials, a system of several sensors was made to operate simultaneously. In essence, the sensors used in this work were examples of amperometric electrochemical gas sensors. The instrument they developed comprised an array of eight different electrochemical cells and gave different patterns of response for different odorant samples, although in this work, they made no serious attempt to process the patterns which they generated even though computers were becoming available.
At about the same time, Moncrieff was working on the same problem but using a different approach. He employed a single thermistor (temperature-sensitive resistor) coated with a number of different materials, including poly(vinyl chloride), gelatin, and vegetable fat, to monitor odors [8]. He recognized that the coatings he used were non-specific, and he postulated that if an array of six thermistors with six different coatings were constructed, then the resulting instrument would be able to discriminate between a large number of different smells. In 1965, two other groups published early studies of e-noses: Buck et al. made use of the modulation of conductivity [9], while Drawnieks and Trotter used the modulation of the contact potential to monitor odors [10]. However, the concept of an e-nose as an intelligent system composed of an array of chemical sensors for odor identification did not emerge until nearly 20 years later, following publications by Persaud and Dodd in 1982 at Warwick University, UK [11] and by Ikegami in 1985 and1987 at the Hitachi Research Laboratory in Japan [12,13]. By this time, developments in electronics, sensors, and computing came together to reach a stage where an e-nose had become a genuine possibility. The term "e-nose" first appeared in the literature around the late 1980s [14]. Then, in 1991, a session of a NATO advanced workshop on chemosensory information processing was dedicated to the topic of artificial olfaction.
An accepted definition of an e-nose given by Gardner in 1994 is "an instrument which comprises an array of electronic chemical sensors with partial specificity and an appropriate pattern recognition system, capable of recognizing simple or complex odours" [15]. This definition restricts the term e-nose to those types of sensor array systems that are specifically used to sense odorous molecules in an analogous manner to the human nose. However, the architecture of an e-nose has much in common with multi-sensor systems designed for the detection and quantification of individual components in a simple gas or vapor mixture [16]. An e-nose generally consists of an aroma extraction system, a sensor array, a control and measurement system, and a pattern recognition method [17]. A block diagram of the typical structure of an e-nose can be observed in Figure 2.
The sampling method or aroma extraction system carries the aromatic volatile compounds from the samples to the sensor cell. Different sampling techniques can be used in e-noses [18]: static or dynamic HS, purge and trap (P&T), and solid-phase micro-extraction (SPME) are the most common techniques.
A gas sensor is a device that is capable of converting the concentration of chemical compounds into electric signals and responds to the concentration of specific particles in gases or liquids [19]. Chemical sensors can be based on electrical, thermal, mass, or optical transducer principles. Several examples of chemical sensors used in e-noses are conducting polymers [20], quartz resonators [21], and surface acoustic wave (SAW) [22] and semiconductor devices [23]. The e-nose device has the advantage of low cost and portability for making in situ and online measurements.
The instrumentation and control system includes the electronic circuits needed for the measurements of sensors signals (e.g., interface circuits, signal conditioning, and analog-to-digital (A/D) or digital-to-analog (D/A) converters).
The goal of an e-nose is to identify an odorant sample and perhaps to estimate its concentration by means of a signal processing and pattern recognition system. However, those two steps may be subdivided into the following steps [24]: preprocessing, feature extraction, prediction or classification, and decision-making.
It is necessary to create a database of expected odorants by presenting the samples to the sensors. Preprocessing techniques try to compensate sensor drift, compress the transient response of the sensors, and reduce variations from sample to sample. Typical techniques include manipulation of baselines, response normalization, and compression of sensor transients.
Feature extraction has two different purposes: first, to reduce the dimensionality of the measurement space and second, to extract information relevant for pattern recognition. It is generally performed with linear transformations such as the classical principal component analysis (PCA) and linear discriminant analysis (LDA). PCA is a powerful, linear, unsupervised, and non-parametric pattern recognition technique that has been used by many researchers to reduce the dimensionality of the pattern space leading to better visualization of data clustering. This method expresses the response vectors by using linear combinations of orthogonal vectors along a new set of axes and is sometimes referred to as vector decomposition, and it usually helps to display multivariate data in a plot of two or three dimensions. PCA finds projection of maximum variance and is the most widely used linear feature-extraction technique [24]. But it is not optimized for classification tasks since it ignores the identity (class label) of the odor examples in the database. LDA, on the contrary, tries to find projections that maximize the distance between examples from different odorants and minimize the distance between examples of the same class [25,26]. Finally, the classification task is usually performed by artificial neural networks (ANNs). An ANN is a mathematical algorithm that has the same function as that of the human brain in the biological sense of smell. The typical structure of an ANN is a network with two or more layers of neurons that are connected with synaptic weights-real number multipliers that connect the output of neurons to the inputs of neurons in the next layer [25][26][27]. During training, the ANN tries to learn the patterns of the different odorants by adapting the weights in order to obtain the desired output. After training, when an unidentified sample is presented, the ANN calculates the output of each layer and assigns the class label that provides the best response. In some cases, an undetermined class is used to determine the unknown sample that does not belong to any of the learned classes in the database [28].
The application of the human sense of smell as an odorant instrument is limited for different reasons: it is strongly subjective, gets tired easily, and in some cases, it is difficult to interpret. Consequently, there is considerable need for an instrument that could mimic the human sense of smell but without those limitations in order to be used as industrial applications. In this sense, e-noses could be used in areas like food, automobile, environmental industry, and medicine for different tasks like: pollution control and air-quality monitoring, control of industrial processes, detection of illnesses by exhaled breath, and safety aspects.
E-nose instruments are attractive in different fields due to several reasons: the fast assessment of samples, a qualitative and quantitative representation, and the use of low-cost and smallsize sensors, appropriate for production processes. A considerable number of applications of e-noses have been reported for sensing applications. A broad list of e-nose reviews can be found in the literature that are structured and focused on mass spectrometry-based e-noses [29], biomedical and health care applications [30], agriculture and forestry applications [31], microbial quality control of food products [32] and food industry [33], pharmaceutical applications [34] developing chemical sensor arrays [35], etc.

E-nose applications in beer
E-noses have been applied to the whole production chain of beer, from the main ingredients (barley, hops, and yeasts) going through the different processes (mainly fermentation) to the final product. In this sense, the discrimination between beers and other beverages is the one that has more applications with enoses. In the following lines, an overview of the different applications of e-noses in breweries is given although it does not pretend to be exhaustive. A brief review of the applications of e-nose technology in breweries can be found in Ref. [36].
A classification of beer ingredients has been studied with these systems. Hops classification was performed in Ref. [37]. Using a commercial e-nose (FOX 2000), discrimination of different malt types could be done [38].
Fermentation monitoring, usually by measuring alcohol content, has been addressed by some authors [39,40]. A recent review of e-nose applications on alcoholic beverage fermentation is found in Ref. [40].
Other common applications are detection of defects such as dimethyl sulfide detection [41] and 1-hexanol, ethyl acetate, oct-1-en-3-ol and diacetyl [42]. Related to this is the work in Ref. [43] that studies the influence of the fungicide triadimefon on the quality of beer using an e-nose, e-tongue, high-performance liquid chromatography (HPLC), and a sensory panel.
Other authors [44] used a hand-held e-nose to detect different amounts of intentionally added ethyl acetate and acetaldehyde to commercial beer. In Ref. [45], discrimination among beers with some defects (diacetyl or dimethylsulfide) was performed using an MOS-based e-nose.
But by far the most common application is beer discrimination among other beers or among other alcoholic beverages. The first work about e-nose applied to beer is the paper by Aishima [46]. He used an e-nose composed of six Taguchi metal-oxide (MOX) gas sensors to discriminate among several alcoholic beverages. Also, in the 1990s, an e-nose based on conducting polymers was used to classify different types of beers and identify certain off-flavors [47]. In Ref. [48], an e-nose based on quartz crystal balance (QCB) and MOSX sensors was used in conjunction with a chromatographic column to discriminate among eight brands of beer. Other authors used an MOX-based e-nose to classify several alcoholic beverages and studied the ethanol influence in the response to the system [49]. In Ref. [50], an MOX-based e-nose was also used to differentiate among beverages, including beer, and in Refs. [51,52], an MOX-based e-nose was used to classify commercial beers. Li [53] used an MS-based e-nose to discriminate among beers with different characteristics. Zhou discriminated among 12 commercial beers and other products with a 3 MOX sensor-based e-nose [54]. Siadat used an MOX-based e-nose to differentiate among alcoholic and non-alcoholic beer [55]. Vera [56] used an MS e-nose to discriminate among several beers from different breweries. Recently, Liu used a combined e-nose and electronic tongue system to correlate the information with a sensory panel for five commercial beers [57]. A SAW-based e-nose to discriminate volatile compounds, liquors, and perfumes can be found in [58].
Beer-aging experiments in commercial (lager and ale beers) industries under different storage conditions are shown in Refs. [59,63,64]. A review of e-noses with some information for beer classification and ageing is shown in Ref. [60].
Another application, far from the above cited, is the example of Thepudom et al. [61], who employed an optical e-nose to investigate alcohol decay in breath after drinking beer. Table 1 summarizes the applications of e-noses in beer with information about the technology, number of sensors, and data processing algorithms.

Detailed examples of applications in the beer field
In this part of the chapter, the development of a portable e-nose designed and optimized for beer discrimination is presented. The device is validated by doing two different measurements: draft beer discrimination and off-odor detection. The main features of the designed e-nose [65] are portable, low size, autonomous, low cost, and easy to use. The designed e-nose (Figure 3a) is equipped with wireless communication capable of forming a network of e-noses for distributed measurements [66] (Figure 3b). It has been designed to work with resistive sensors, headspace as the sampling method, and a portable instrumentation and control system; it includes rechargeable batteries, touch screen, and IEEE 802.11 transceiver for wireless communication (Figure 4).
It consists of two gas inlets that are switched through a three-way electrovalve whose output is connected to the sensors cell that contains the micro-sensor array. One of the gas inlets has a carbon filter and is intended to provide clean air as the reference baseline. Downstream are located   the temperature sensor and the pump. The whole system is controlled by a digital signal controller ( Figure 5). The sensor resistances are measured by A/D circuits, and their heating consists of pulse width modulation (PWM) outputs. An LCD touchscreen shows the measurements that allow the manual control of parameters such as pump, heater, power, or the electrovalve.
Rechargeable batteries give about 8 h of autonomy to the e-nose. Wireless communications are provided by a Wifi transceiver. A network could be established with a host computer for remote operation. The sensors cell and board are designed for micro-sensors in a TO-5 or TO-8 12 leads package but it is easily adaptable to other packages and sensors. The system can measure up to four resistive sensors and provides independent heating for each one. The instrument is controlled by a program developed in Labview™. The program displays and controls the measurement parameters and generates the response database. Algorithms for both online and off-line pattern recognition techniques have been developed in Matlab™ and integrated in the program through Mathscripts. External classification using a web server can also be performed [67].
The control program displays and controls the main measurement parameters (temperature, sensor resistance, temperature, valve status, battery status, and pump power) and automatically generates the response database. The program user interface is shown in Figure 6.
After measurements are made, data processing methods are applied to the data. PCA and ANN have been implemented in Matlab™ for data processing. PCA applies a linear transformation to the data, and this results in a new space of variables called principal components [24]. The number of variables is reduced from the number of sensors 4 to 2 or 3 variables in order to show it in a plot and see the discrimination capability of the array. Next, a classifier is used to give a response to a typical problem of prediction of unknown samples. The most used classifiers are based in ANN. In these experiments, two types of ANNs were used for The FF-BP networks had three layers, an input layer with a number of neurons equal to the sensors of the e-nose (four), a hidden layer with a variable number of neurons that went from 10 to 25, and finally an output layer with a neuron for each class of the classification problem.
The PNN were also composed of three layers [26], the input layer with a number of neurons equal to the sensors of the e-nose (four), a hidden layer of neurons with radial basis transfer functions that had neurons equal to the training set, and finally an output competitive layer with a neuron for each class of the classification problem. The structure of this type of neural network can be seen in Figure 7.
To validate the performance of the network [26], leave one out (LOO) cross-validation was applied to the networks. In LOO, the network is trained with all the data except one data point and then the data left out is used to evaluate the performance of the network. This is repeated for each data point, leaving, in each iteration, one data point out. The performance is the assembled errors that are made [68,27].

Beer discrimination
The main aim of this experiment was to check the discrimination capability of the proposed system. In this sense, the task of classifying different draft beers was attempted. Different commercial draft beers (Blomberg Blanca, Blomberg Rubia, Blomberg Dubbel, Marwan, Cerex, Jacha Jigo Jiguera, Ballut Rubia, and Ballut Negra) were purchased in specialized shops and kept to the moment of measurements. Before that, a degasification process based on magnetic agitation for 20 min was performed. Next, 10 mL of each sample was taken and kept at 12°C with a thermal bath in order to generate a stable headspace for each sample. A total number of 128 measurements (16 replicates per beer) were performed. The measurement cycle was for a duration of 10 min: 1 min of adsorption (air passes through the samples) and 9 min of desorption (air directly passes through the sensors). The air rate flow was 150 mL/min, constant in every measurement. Once a second, measurements of the parameters (sensors resistance, relative humidity, ambient temperature, air rate flow, and battery voltage) were taken and stored in a file. Commercial sensors of e2V SGX sensortech based on tin oxide MOS sensors were used. The operation temperatures of the sensors were optimized for beer discrimination, and its range was among 350 and 450°C. Once the measurements were performed, data were stored in a hard disk for data processing. A periodic calibration made with 10% of Ethanol in water is usually performed for compensating sensor drift. In this case, it is not necessary because of the short time spent doing the measurements. No variation in the sensors response to reference air is observed during the measurement period.
Data obtained from measurements were processed using PCA. The first three principal components were shown in Figure 8. This plot shows an almost complete separation among the eight classes of beer. The ellipses show 80% of the variance of the classes, some partial overlapping between Marwan and Cerex, and other neighbor classes can be observed. The variance explained by each principal component is in brackets.
To confirm these results, a classification with three different classifiers based on artificial intelligence was performed. Three different classifiers were used: feedforward neural network with backpropagation algorithm, probabilistic neural networks, and fuzzy logic (FL) classifiers. Both FF-BP and PNN employed eight neurons at the output layer corresponding with the eight brands of craft beers. In the case of the fuzzy logic-based classifier, a total of eight fuzzy rules (corresponding with the eight brands of beers) is built over each sensor output on the 128-sample knowledge database. Each of these rules is optimized in the training stage to maximize both acceptance and rejection scores of the unknown samples. First-order crossvalidation (leave one out) was used for validation because a great number of measurements were not available.
The confusion matrix obtained in the validation of the classifiers is shown in Table 2, in which the system classifies (in columns) the real samples (rows). The success rate obtained in the classification, defined as the rate between the number of samples correctly classified over the total number of measurements, was 87.5% for FF-BP network, 92.96% for the PNN, and 89.84% for FL-based classifier. Results confirm that the PNN classifier presents the best performance in the classification of these beer samples.

Beer defects detection
Another experiment was made with the same prototype. In this case, two aromatic defects in beer (acetaldehyde and ethyl acetate), at a level between the organoleptic threshold and five times this quantity, were measured. Acetaldehyde threshold is 25 ppm and ethyl acetate is 21 ppm [69,70]. The lager beer from cans was magnetically stirred (350 rpm, 20 min) to degas before the measurement procedure. Glass vials of 22 mL were filled with 10 mL of the sample and they were kept at 18 ± 1°C. A minimum of 10 replicates for each compound were measured.  Once the measurements have been made and the raw data is stored, data processing is performed. Figures 9 and 10 show the 3D plot of a PCA made to the measurements for the ethyl acetate and acetaldehyde samples. The blank samples are clearly separated from the samples with the two compounds but the two defective types of samples (with the different compounds) seem to overlap a bit.
Results are confirmed with a non-linear classification method. PNN networks, which obtained the best performance in previous experiments, were trained to classify samples according to their defects. The percentages of cases correctly classified in the LOO validation were 83 and 91% for ethyl acetate and acetaldehyde, respectively. While all the samples at five times the threshold concentration values were correctly classified, there were some errors in the lower concentration samples; for ethyl acetate, the network confounded some blank samples with concentration of 1 T and also concentrations of 1 T with concentrations of 2 T; for acetaldehyde, only 2 samples of T concentrations and 5 T concentrations were confounded by the PNN.
A qualitative classification of the beers according to the defect (at all the concentrations levels) can be seen in Figure 11. The PCA shows that the beer samples with ethyl acetate, the beer samples with acetaldehyde, and the beer samples without defects (blank) are separated with only a small overlap among the classes.
For this qualitative classification problem, the PNN analysis gave a 94% success rate in the validation, regardless of the overlap seen in the PCA plot.   These classification results could be improved by several strategies. Better classification algorithms could be applied to the data. Also, the data could be less noisy by using better systems that keep temperature or flows more controlled.

Comparison with other techniques
There are several traditional chemical methods like titration, gravimetric analysis, international bitterness units (IBUs), alcohol measurement, extract, calories, pH, high-performance liquid chromatography, or new methods like capillary electrophoretic method [70] to characterize the beer but few methods are used to analyze the volatile compounds of its headspace as the e-nose does. Techniques such as gas chromatography (GC), soft ionization techniques, or human sensory panels are among them. Each one has its own characteristics and when deciding what method to use, one should select the one more appropriate for its interest and the task at hand.
Human panels record the experience of beer tasting by several senses, and they use the most complex of them, the scent, to detect the volatile organic compounds that emanate from beer [71]. However, human panels are subject to variability not only within different panels but also with itself over time. They need to be trained to become experts which is time-consuming and expensive. Due to VOCs matrix interaction and physiological singularities, the correlation between the chemical analysis and the scents is not clear and not always straightforward [72] so human panelists are usually mandatory.
Traditional gas chromatography has been widely used for beer analysis, detecting singular VOCs. There are very different ways to gather, separate, and detect the volatile compounds [73]. GC has been used successfully to detect diacetyl, pentanedione, acetoin, and acetaldehyde during the fermentation process, showing the evolution of these VOCs [74]. GC monitors the concentration of singular compounds and requires time-consuming analysis to extend the analysis to the many volatile compounds that the beer headspace has. The process is slower, more expensive, and more complex, making it very difficult to operate in a continuous way.
GC-olfactometry combines both the human panel and gas chromatography by placing a human panel as a detector at the end of the chromatograph. In this way, the system can detect individual aromas and correlate them with the physiological sensation they provide. In [75], the compounds from Challenger and Saaz hops were analyzed and correlated with several olfactory descriptors in pellets and they analyzed the evolution after the brewing process. This technique allows the evaluation of the scent as perceived by humans but the analysis is costly and time-consuming.
Soft ionization techniques, selected ion flow tube mass spectrometry (SIFT-MS), or proton transfer reaction time-of-flight (PTR-ToF) allow fast analysis of the samples in a continuous fashion. For example, PTR-ToF has been used to monitor the fermentation process of different yeasts pointing to the different VOCs released [76], and SIFT-MS has been used to determine the aldehyde content of malt as a biomarker to identify each variety [77]. PTR-ToF usually lacks on precision in identifying the individual VOCs, and SIFT-MS has lower sensitivity.
Both methods are fast and can be used as online monitoring devices but they are cumbersome and expensive compared to the potential of e-noses.

Conclusions and future trends
Monitoring or fast analysis of the chemical composition of the beers in all steps of the production and consumption chain is of capital importance for the beer industry. Rapid detection of problems like contamination, spoiled ingredients, or flavor instability can save time, money, or prevent health problems. The traditional chemical beer analyses are done in batches; in contrast, the e-noses are a good instrument to use in online analyses. Although e-noses are not as accurate as traditional analysis, they work very well in controlled environments like the ones of the beer industry or in laboratory. In these controlled environments, differential analysis can be easily made and interesting results can be obtained like the ones presented in this chapter.
For more complex applications or scenarios, there is still a need for better sensors with better characteristics such as reproducibility, repeatability, and selectivity. There is also a need for the standardization of these sensors and methods to increase reproducibility of analysis so studies can easily be transferred from one device to another. But the sensor technology is blooming and multitude of research groups and enterprises are working on their improvement. New materials like carbon nanotubes, nanostructured metal oxides, or graphene materials are offering very interesting and improved sensor capabilities. To complement the sensor, new algorithms are being developed in deep learning or semi-supervised learning that would reach soon the e-nose technology and take advantage of those improved sensor characteristics. New commercial sensors are being miniaturized more and more and will be able to be deployed in small power consumption devices as wearables or mobile devices that will integrate in the Internet of things.
There are a multitude of possible applications, from the analysis of the ingredients to mobile applications for the final consumer. To name a few, there are several interesting possibilities that could be used in the analysis of ingredients, to detect spoilage, or to store scent profiles year after year. They could be used for the online monitoring of the fermentation process and by applying closed loop control to it. They could be used as storage monitoring, ensuring that the product reaches the final consumer in optimal conditions. The final consumer could use these new small sensors in wearable devices and apply them in food safety, detecting contaminants before consuming them. The e-nose presents endless and very interesting potential applications.