Electronic Nose for Monitoring the Flavour of Beers *

The flavour of a beer is determined mainly by its taste and smell, which is generated by about 700 key volatile and non-volatile compounds. Beer flavour is traditionally measured through the use of a combination of conventional analytical tools (e.g., gas chromatography) and organoleptic profiling panels. These methods are not only expensive and time-consuming but also inexact due t o a lack of either sensitivity or quantitative information. In this paper an electronic instrument is described that has been designed to measure the odour of beers and supplement or even replace existing analytical methods. The instrument consists of an array of u p to 12 conducting polymers, each of which has an electrical resistance that has partial sensitivity to the headspace of beer. The signals f rom the sensor array are then conditioned by suitable interface circuitry and processed using a chemometric or neural classifier. The results of the application of multivariate statistical techniques are given. The instrument, or electronic nose, is capable of discriminating between various commercial beers and, more significantly, between standard and artificially-tainted beers. A n industrial version of this instrument is now undergoing trials in a brewery.


Introduction Chemical Senses and Flavour
The sensation of flavour is due to the simultaneous stimulation of all of the chemical senses together with an integration of the signals from the component senses by the higher brain centres.In humans there are three main chemoreceptor systems.These are gustation, or the sense of taste, olfaction, or the sense of smell, and the trigeminal sense.Taste is used mainly to detect non-volatile chemicals which enter the mouth while the sense of smell is used to detect volatile compounds.Receptors for the trigeminal sense are located in mucous membranes and in the skin, they also respond to many volatile chemicals and the trigeminal sense is thought to be especially important in the detection of irritants and chemically reactive species.In the perception of flavour all three chemoreceptor systems are involved but olfaction plays by far the grcatest role with the other two senses contributing much less to the overall perception.
The sensation of smell arises from the stimulation of the olfactory neurones, the receptor cells located high up in the nose in the olfactory epithelium, by the odorant molecules.Odours can be simple or complex, a distinction which is based on the nature of the stimulus and not the quality of the sensation.A simple odour is one which consists of only one type of odorant molecule whereas a complex odour is a mixture of many, possibly many hundreds, of different types of odorant molecule.Simple odours, as defined here, are essentially man-made curiosities because virtually all naturally occurring odours are complex mixtures.Odorants are typically small hydrophobic, organic molecules containing one or two functional groups and with a mass range from 34 to 300 Da.The relationships between the physico-chemical properties of the odorant molecules and the odours have been discussed by several workers172 and whilst it is clear that the size, shape and polar properties of the molecule determine its odour properties the rules which govern this are poorly understood.As a result, classifications of odour type are empirical and the number of distinct odour descriptors required (the dimensionality of the problem), has not been established.
Beer flavour is a complex problem because there are hundreds of compounds present.Some of these are at levels that exceed the sensory threshold ( i e ., down to parts per billion) but are below the detection limit of most gas chromatographs.3Studies of beer flavour show that there are just over 100 separately identifiable flavour elements of which 39 or so are present in most beers with the others less common or flavour faults, i.e., off-flavours.4Of these 39 key flavour notes in beer, 15 can be explained ( e .g ., alcoholic, estery and diacetyl), 20 partly explained (e.g., hoppy, malty and worty) and 10 cannot be explained at all (e.g., spicy, woody and grainy).The situation is further complicated by the fact that the beer flavour is unstable and its odour will change with time as the chemical composition of the beer changes.Beer is prepared commercially by batch processes and it is of concern to ensure consistency from batch to batch and overall product quality.Quality is currently assured in several ways including the use of analytical techniques such as gas chromatography (GC) or GC-mass spectrometry (GC-MS).However, the most important method remains the use of sensory panels of trained individuals who score the product on the basis of a number of flavour descriptors.All of these techniques are slow (i.e., it takes 2-3 d to obtain a result) and rather expensive.In this context the use of an electronic instrument, i.e., an electronic nose, which can assist in the monitoring of beer flavour, is highly attractive.
The mammalian olfactory system makes use of a large number of non-specific receptors which show broad patterns of response.Typically, in the human olfactory epithelium there are about 50 million such receptors.These cells send their signals to secondary cells located in the olfactory bulb.There is a marked convergence at this stage with between 1000 and 20000 primary receptor cells connecting to each secondary cell.This suggests that the secondary cells are involved in processing and integrating the information from many input cells.This suggestion is consistent with the observation that while the primary cells are non-specific in their responses the secondary cells respond to distinct categories of odours.5The secondary cells, in turn, interact with each other and with higher cells.These interactions are reminiscent of those found in the vision system.6In the electronic nose we have attempted to mimic some of the features of the mammalian system by combining an array of non-specific, chemical sensors with suitable data acquisition and processing software.
The sensors in the electronic nose described here are conducting polymer chemoresistors fabricated by the electrochemical deposition of this conducting polymer films across the gap between two thin gold electrodes.Conducting polymer chemoresistors, based on polymers such as poly-(pyrrole) (PPy), have been shown to respond to a wide varicty of gases including inorganic species such as ammonia and hydrogen sulfide7-9 as well as many organic vapours.l@-*2A detailed understanding of the response mechanism is not available although it is generally believed that the adsorbed molecules affect both the inter-chain hopping electronic charge-transfer process and cause physical swelling of the polymer structure.

Experimental Preparation of Odour Sensors
The devices were fabricated by the physical evaporation of pure gold (99.99%) onto alumina tiles (12 x 12 mm), out of which an electrode pattern was etched by conventional ultraviolet (UV) lithography and then a final passivation layer was spin-coated and etched away to leave the areas where the polymer growth was desired.The active area of gold was approximately 1 mm2 per device, and had a 15 pm gap vertically along the centre of the gold pad.Each tile contained three independent devices and electrical contact was made to each of the devices by pads at the top of the tile.Fig. 1 shows a tile containing three electropolymerized areas seen as a black coating.
All electrochemical procedures were carried out using a three-electrode system, controlled by a laboratory-constructed potentiostat.The reference electrode was a saturated calomel electrode (SCE), and all the potentials quoted are relative to this reference.The counter electrode was a large surface area platinum gauze, which was flamed prior to use.
Pyrrole (Py, Aldrich) was purified by passing it through an alumina filled Pasteur pipette, while aniline (AN, Aldrich) and 3-methylthiophene (3MT, Aldrich) were distilled at reduced pressure.All aqueous solutions were prepared using water from a Whatman RO 50 reverse osmosis de-ionizer, with a,.Whatman 'Still Plus' organic removal system.Acetonitrile (CH,CN, Aldrich HPLC grade) was distilled over calcium hydride, and propylene carbonate (PC, Aldrich) was percolated over molecular sieves, then distilled.To prepare the solution for the deposition of poly(ani1ine) (PAN), aniline was added to the background electrolyte and then the solution was acidified with concentrated sulfuric acid until the white precipitate dissolved.
Prior to deposition, the devices were examined using a' low-powered microscope to check for any major mechanical defects, and the resistance of the devices was measured to ensure that there was no electrical shorting.The gold working electrodes on the devices were cleaned prior to polymer deposition by cycling in 2 mol dm-3 sulfuric acid followed by washing with water.The cleaned devices were kept under pure water until required to avoid recontamination of the surface.
The 12 polymer systems used in this work along with their growth conditions are given in Table 1.The polymers were deposited by stepping the potential from 0 V to the required growth potential for a fixed time of 120 s.At the end of this time, the polymer-coated device was either stepped back to 0 V, and the current allowed to decay until it became stable, or the electrode switched to open circuit, thus leaving the polymer at the growth potential.This final step is important because it controls the oxidation state of the polymer and hence the resistance of the final device.After coating, the devices were removed from the growth solution, washed with solvent and allowed to dry.The base resistance of the dry devices was recorded.Full details of the fabrication and electrochemistry of the devices will be given elsewhere.

Instrumentation
Headspace sampling In the design of an electronic nose for monitoring beer flavour it is necessary to use a number of broadly tuned sensing elements combined with suitable multivariate analysis techniques.This principle of using sensor arrays for odour discrimination was originally demonstrated by Persaud and Dodd for a three-sensor system.13Fig. 2 is a schematic diagram of the instrument developed to analyse the static headspace of beer samples.It consists of three separate elements.The chemical hardware consists of a glass vessel (2.0 dm3) to hold the analyte, immersed in a temperature-controlled water-bath set to 30 "C.It was found that this temperature was required to produce an odorous beer headspace from 100 cm3 of the analyte.A motorised fan was installed within the sample vessel to assist uniform mixing.This arrangement is shown in Fig. 3.The sensor head was designed to house four separate tiles, one on each side of the block, with each tile containing three separate polymer devices.This was fabricated using a brass block and poly-(tetrafluoroethylene) as relatively inert materials.Devices were wire bonded on one end and soldered onto metal posts in the block.A perspex disc was incorporated into the sensor head to seal the sensor vessel during testing.
The following procedure was used to sample the beers: first, the sample vessel was lowered into the water-bath.Then 100 cm3 of beer were transferred into the sample vessel, the vessel was sealed and left for 20 min while the liquid and vapour phases of the analyte equilibrated.The lid was then removed from the sensor vessel and the sensor head lowered  tional amplifier (U2A).This constant voltage offset ensures that the current through the precision scaling resistors (R3-R10) and hence through the sensor itself is only related to that set of precision resistors selected through the dual in-line scale switches (S3).At low concentrations, because the action of the conducting polymer sensors is virtually ohmic, we can assume that the voltage generated across the device is linear with conductance.The second stage of the circuit (U2D) is then simply to provide voltage offset nulling (via adjustment of CE2) and scaling of output voltage VA (via adjustment of CE1) during calibration.Hardware calibration takes place through the use of a shorted link in place of the sensor element (across RA and supply common) representing a nominal impedance to the circuit.The null offset potentiometer (CE2) is then adjusted to trim any zero error of output voltage VA.
Standard precision resistors (accurate to 0.1% and possessing good long-term stability), suitable for the selected scale settings are then substituted as the input element, and the gain adjust potentiometer (CE1) is trimmed to scale the output voltage (VA) to be as close to the full dynamic range of the analogue to digital (A/D) input stage as possible without causing saturation.This ensures that the highest resolution of the A/D sub-system is exploited during data acquisition.Two printed-circuit boards were laid out using Orcad SDT IWRacal Redac Redboard, and constructed in such a way that each circuit could process the signals from six polymer sensors (module 2), see Fig. 5.These were assembled in a rack system along with another custom PCB (module 4) to synchronize the signals feeding the DT2811 A/D card in the PC.
Fig. 3 Schematic diagram of the bcer headspace sampling system into the vessel.The resistances were monitored for 10 min after which time the sensor head was removed from the vessel.The vessel was cleaned with water and then blown with a clean air supply for about 2 min to remove any contaminants.The sensor head was subsequently replaced in the clean vessel.The sensars were left to recover for 30 min (maximum 1 h).Therefore, the total sampling time was typically about 40 min.

Interface electronics
The headspace sampling system was followed by the interface electronic circuitry that converts the polymer resistances into a 0-5 V analogue signal suitable for input to a DT2811 data acquisition card in a 286-based PC.The interface electronic circuitry for a single polymer is shown in Fig. 4. The conducting polymer sensor is connected across the input port RA and supply common.The operation of the circuit is based upon the principle that the first stage supplies a constant current to the sensor.This is achieved through the action of the precision voltage reference diode (D2) tied between the output (pin 1) and inverting input (pin 2) of the first opera-

Data acquisition
Data acquisition and processing software routines were written in TURBO PASCAL version 5.5 (8000 lines of code) using pull-down menus.The function of these software routines was to provide data collection and storage, softwar?calibration, response display, chemometric fingerprinting, pre-processing and communications with a local area network.Further facilities incorporated into the data acquisition software include file conversion utilities to allow acquired data to be stored and retrieved in a portable file format (Lotus 1-2-3).

Data Processing
It is convenient to consider the process of pattern recognition to have three stages.14In the first stage the physical world can be represented as a continuum of parameters that are essentially infinite in dimensionality.The sensors describe a representation of that world in terms of R scalar variables.This then becomes the dimensionality of the pattern or sensor space.Secondly, the dimensionality of R is often high and so it is then convenient to reduce the dimensionality while still retaining the discriminatory power for classification purposes.This then becomes the feature space of a lower dimensionality.Finally, the classification space is simply the decision space in which one of K classes has been selected.We can, therefore, consider the pattern recognition problem as a transformation (usually non-linear) from pattern spbce, through feature space, to classification space.By using this description, the response of our sensor array to an odour can be represented as a path followed in R dimensional pattern space, as shown in Fig. 6 in 3D pattern space ( x l , x2, x3).The response parameter is usually defined as a function of the start and finish points, e:g., the change in sensor values.The starting point occurs just at the time when the rig is subjected to the odour and the end point is reached when all sensors have reached steady-state values.In this example the path followed and the speed at which it is travelled, is ignored.The broken line in Fig. 6 illustrates the use of a euclidean distance metric to map out pattern space, being linear this is the simplest metric.In general a point in pattern space is a column vector of sensor responses x = (XI&, .. .) x,, ..., XR)T (1) In our instrument the response vector X corresponds to the time-dependent conductance of the polymeric sensor array.However, we pre-process the scalar terms in the response vector in order to reduce temperature effects.The preprocessed scalar x: is defined as the fractional change in response for each sensor1s maxos, s r,,b,>mino,,,&,> mino<rst,,{x,> (2) x' = where t is time and t,, the time at which steady-state values are achieved.Many distance metrics have been used in the analysis of sensor data, including difference16 (simply the difference in response due to stimulus), relative17 (the ratio of the resistance of the sensor in air to the resistance due to the odour stimulus) and fractional models defined above.18By splitting this distance metric into its constituent scalar components across all channels we can define (3) This normalizing procedure helps reduce concentration errors in a triangular taste test.In terms of the vectorial representation, the response vectors are mapped onto the R -1 dimensional surface of an R-dimensional hypersphere of unit radius, centred at the origin.
It is now possible to define a score 2, as being a standardized normal variate with mean = 0 and variance = 1, where with N,fe\t represents the normalized response components of our unknown odour under test.This assumes that the response scalars N,fe\f come from a normal distribution and are independent.The term p, is the average and or is the adjusted sample standard deviation of the rn samples carried out for each reference beer (as part of a class-conditional database of sensor responses) for sensor Y.The distribution of the scores is by definition the x' distribution, i.e., We can use the computed value to rank the odour patterns to their proximity to known classes and assign a confidence level from standard statistical tables.
In reality, the pattern space X ' is both non-euclidean and non-normal.However, the analysis of two beers in close proximity in pattern space permits us to make a local linear approximation of pattern space and thus employ this simple method.The main disadvantage of the method is that it treats all sensor signals as equal, thus it may be necessary to weight sensors that are known to be more sensitive or reliable by inserting an additional factor in eqn.( 5 ) .
This chemometric fingerprint, or template, method has bcen incorporated into the electronic nose for sensing beer flavours.Fig. 7 summarizes the two elements of this method, first the supervised template learning and class assignment process, and secondly the template matching or predictive classification of unknown test samples.The template learning process must be carried out for all data runs to be used as part of a class conditional database.First, an averaging filter (moving or block average) is applied to improve sensor response continuity.Next a statistical feature extractor then computes the component values of x', or N , through the use of eqns.( 2) and ( 3) for all the sensors.These reference values are then stored in a template file and assigned to one of the known classes.The classification database is then created by defining the classes of the template files, i.e., lager 1.In the work reported here crisp classification functions are used, although fuzzy organoleptic data could also be mapped onto feature space.Finally, an odour of unknown class is sampled and its class is assigned, using the template matching process, to a known class from the class-conditional database previously generated.
The pattern vectors in R-dimensional space can also be analysed using a standard technique in cluster analysis (CA).Firstly, the distances between points are calculated for a euclidean metric and then their proximity is calculated and ranked hierarchically by a similarity index.Finally, the points are linked together by a simple rule applied to their similarity indices.Single linkage uses the nearest distance while complete linkage uses the furthest neighbour.These are the simplest linking methods although a variety of others are available.More details on the application of CA to odour discrimination are given in ref. 19.

Results and Discussion
Fig. 8 shows a plot of the typical percentage changes in conductance of three conducting polymers (polymers labelled 8, 9 and 11 in Table 1) in lager 1 (a standard strength lager), lager 2 (an extra strength lager), ale 1 (a low alcahol beer) and methanol.Batch variability of two of the polymers is shown as well as typical polymer stability via the response to air.Typical responses were of the order of a 1-10% change in the conductance of the beer headspace and a 5-20% change for methanol vapour.Most of the polymers listed in Table 1 gave reproducible stable responses except PPy-TSA-H20 which was the least responsive and P3MT-TEATFB which gave large responses but also showed considerable drift.After allowing the polymers to stabilize, the drift of the sensor baseline conductance in air ranged from 0.1 to 10% per month, but was typically 2%.However, the sensor response [i.e., relative change in conductance as defined by eqn.( 2)] was much more stable (<1% per month), suggesting that the change in sensor conductance with beer is a function of the baseline conductance.This is an encouraging result as the stability of the sensor response space now exceeds that of the conductance space.Typical response times (tg0) of the polymeric sensors were about 250 s, with linear temperature coefficients of resistance of 1 X 10-5 K-1.
A brand test was first carried out by sampling the three dissimilar beers, namely lager 1, lager 2 and ale 1, which should in principle be easy to discriminate.Fig. 9 shows the results of CA using a euclidean metric and a single-linkage procedure.Three distinct clusters (labelled A, B and C) can be seen with no incorrect class assignments.In fact two jack-knife classification planes would give a 100% success rate on this data set.Next a 12-element array was used to analyse five sample headspaces of two similar products, i.e. , lager 1 and lager 3 (lagers of similar alcoholic strength and taste).Fig. 10 shows the dendrogram of the same CA on the X' response vectors as before.Two clusters, labelled A and B, are observed with one sample in each class being wrongly identified.The template matching method confirmed this result by also giving a success rate of only 80%.This is very encouraging as the difference in flavour of the two products is slight (with alcoholic content the same) and the centroid of a set of, for example, five samples is easily discriminated.Moreover, selectivity of this polymer array was found to exceed that based on commercial tin oxide sensors.A measurement was then made of a control lager, i.e., lager 1, and the same lager with a single taint (stale) artificially made.Ten samples of each were taken and there was a success rate of 90% using the template matching method.Fig. 11 shows the cluster graph which again shows the discrimination of the lagers from the normalized vectors, N' (the normalized data gave slightly tighter clusters, A and B).An examination of the points plotted in the figure shows that two control beers and one tainted beer were misclassified.A close examination of the sensor data for these three samples showed that sensor 11 was giving anomalous values and so upsetting the clustering result.This problem could be obviated by a simple sensor validation scheme in which the initial data are checked for outliers, or ameliorated by averaging the results from several samples.The difference between individual sensor responses to tainted and control lagers varied with the largest value of 15% (sensor 1) and an average value of about 4%.As the Euclidean metric, single linkage classification technique is biased towards the larger differences, a value averaged over the five most sensitive sensors may be a more relevant measure and would be about 6%.Thus a calibration period of about 6 months could be expected on this test for a sensor response stability of typically 1% per month.Clearly the drift, and hence the precise calibration period, will be odour specific.However, some advantage may be found in the use of a neural predictive classifier that has been trained upon a data set which contains the effect of long-term systematic drift of the sensor responses.' Finally, an experiment was carried out to ascertain whether intra-batch variation of lager 1 could be detected.Five samples from five batches of cans were analysed but no can batch could be identified at a significant level using the template matching procedure.Again this result is confirmed by examining the cluster graph, see Fig. 12, where all can batches are intermingled.No significant improvement was observed with either the use of non-euclidean metrics or other linkage methods in the CAs.This validates the use of a linear, In conclusion, an instrument based on polymeric chemoresistors and associated pattern recognition techniques has been developed which is capable of discriminating the flavours of various commercial lagers, or identifying certain offflavours in a standard lager.The principle application envisaged is the quality control of beers in breweries.

Fig. 2
Fig. 2 Basic arrangement of the electronic nose

Fig. 6
Fig. 6 sensor space (for details see text) Representation of an odour signal in R-dimensional pattern or

Fig. 7
Fig.7Functional block diagrams of thc template learning and matching procedures

Fig. 8 Fig. 9
Fig. 8 Typical responses of conducting polymers to beer headspaces (the letters denote repeated sensor type)

Fig. 10 Fig. 11 Fig. 12
Fig. 10 Dendrogram of the res onse of a 12 element polymer array to two similar lagers: lager 1 &luster B) and lager 2 (cluster A).Euclidean metric, complete linkage 0.4 I

Table 1
Details of conducting polymers