Identification of Coffee Types Using an Electronic Nose with the Backpropagation Artificial Neural Network

— Coffee is one of the famous plants’ commodities in the world. There are some coffee powders such as Arabica dan Robusta. This study aimed to identify two various coffee powders, Arabica and Robusta based on the blended aroma profiles, employing the backpropagation Artificial Neural Network (ANN). Four taste sensors were employed, namely TGS 2602, 2610, 2611, and 2620, to capture the diverse coffee aroma. These detectors were combined with the aroma sensors having transducers integrated with signal amplifiers or processors, which featured a load of 10 K Ω resistance. Three aroma types were investigated, namely Arabica coffee, Robusta coffee, and without coffee beans. The neural network architecture consisted of four inputs from all sensors, with one hidden layer housing eight neurons. Two neuron outputs were employed for classification, with 70 samples used for training ANN for each type. During the training phase, the developed neural network showed an impressive accuracy rate of 91.90%. TGS 2602 and 2611 sensors showed the most significant differences among the three aroma types. When analyzing ground Robusta coffee, TGS 2602 and 2611 sensors recorded 2.967 volts and 1.263 volts, with a gas concentration of 17.92 ppm and 2441.8 ppm. Similarly, the sensors for ground Arabica coffee displayed 3.384 volts and 1.582 volts with a gas concentration of 20.445 ppm and 3058.5 ppm in both TGS 2602 and 2611, respectively. The implemented ANN with aroma sensor as input successfully identify the coffee powders .


I. INTRODUCTION
Currently, coffee is one of the world's most popular and widely consumed beverages, on par with tea, and its characteristics encompass shape, size, color, taste, and aroma [1], [2].Traditionally, consumers rely on smell to discern the desired types and quality of coffee [3], [4].This subjective approach, which provides only qualitative data, is prone to variability due to factors such as the physical or mental condition of the taster.To address this, an electronic taste sensors system known as an electronic nose (E-nose) has emerged as a valuable tool, offering objective and easy-to-use measurements.E-nose is an automated system capable of detecting and classifying odors, vapors, and gases [5], [6].
This study focuses on coffee blending, employing an advanced E-nose combined with the backpropagation Artificial Neural Network (ANN) for precise espresso-type detection.The evaluation of the results adheres to standards set by SNI Nr-01-3542-2004 [7], [8], with special attention on the quality of the coffee blending outcome.The electronic sensor systems perform the extraction of aroma characteristics in the form of signal patterns using the identification process using E-nose [7], [8].
After processing the identification pattern of E-nose scent sensors using the backpropagation ANN method [9], [10], the types of coffee identified are Robusta and Arabica [11].The backpropagation ANN method classifies the color levels of roasted coffee beans with an accuracy value of up to 97.5% [12].This study aims to identify coffee grounds based on blended aroma using the backpropagation ANN.Four aroma sensors, namely Taguchi Gas Sensor (TGS) 2602, 2610, 2611, and 2620 were used in the study.

II. MATERIALS AND METHOD
The coffee plant has been extensively cultivated worldwide due to its high economical value.The global coffee types include Arabica, Robusta, Liberika, and Excelsa [13].As one of the fourth-largest coffee-producing countries globally, Indonesia focused on developing Arabica and Robusta coffee varieties [14].Figs.1a and b depict the physical form of Arabica and Robusta coffee beans.The physical shape of Arabica appeared flatter and more elongated than Robusta [15].Arabica was traced back as a descendant of the original coffee tree discovered in Ethiopia.This tree produced light and aromatic coffee, representing 70% of the world's coffee production [16].The quality of coffee beans before processing was significantly influenced by the growth region's environmental factors, maturity level, and storage conditions [17].The maturity level of Robusta coffee beans was classified into three categories, namely light, medium, and dark, as shown in Figs.3a, b, and c.The roasting process significantly impacted the physical properties of Robusta coffee beans, with time and temperature playing crucial roles [18].The processing of coffee beans had a substantial influence on the quality of coffee, causing changes in the chemical components.The roasting stage transformed the unstable components into a more complex and stable form [19].
The E-nose system of Taguchi Gas Sensor (TGS) was used in the food and health industries, utilizing sensors such as TGS 2602 for alcohol detection, 2610 for discovering ammonia, 2611 for air contamination observation, and 2620 for identifying alcohol gas and solvent vapors).These four sensors were effectively employed to differentiate between positive and negative urine cancer and visible air samples.The distinctions were based on the radar pattern derived from the readings of the four sensors [20].
The aroma of coffee detected using E-nose proved to be a valuable technology for monitoring and analyzing smell [21].E-nose operated similarly to the human nose, showing the ability to recognize complex characteristic information [22], and when integrated with gas chromatography-mass spectrometry (GC-MS), effective detection of coffee aroma was observed [23].The E-nose system was designed to detect and classify odors, vapors, and gases automatically [5], [24], and efficiently extract characteristics from gas sensor arrays and pattern recognition signals [24].Common pattern recognition techniques for E-nose included Principal Component Analysis (PCA) [25], Linear Discriminant Analysis (LDA) [26], Support Vector Machine (SVM) [27], and ANN [28] [29].
ANN emerged as one of the most widely used techniques in the field of Artificial Intelligence (AI) [30].AI was defined as a machine learning program [31], wherein an ANN comprised neurons and computational elements, often referred to as nodes [32].In agriculture, ANN was successfully applied to detect crops [31], as shown in use to identify the color of chayote cracker dough [33].Additionally, the backpropagation ANN was employed on gambier plants, using 500 leaf image samples, resulting in an impressive accuracy of 93%, 96%, and 97% for area, perimeter, and intensity, respectively [34].Another application involved utilizing a feedforward ANN to determine the roasted coffee level by analyzing the storage length [35].Fig. 4 portrays the block diagram of the system, incorporating four TGS for various gas types.The E-nose sensors TGS 2611, 2620, 2610, and 2602 were used to detect Methane, Alcohol and Solvent Vapors, LPG and Butane, and Hydrogen Sulfide, Ammonia, and VOCs gases, respectively.Arduino Uno was the microcontroller employed to read and process sensor data.The gas sensors reading was displayed using Lab View software and was utilized as input data for the identification process of the coffee types.The identification procedure was achieved through the application of the backpropagation ANN.Sensors were used to detect or measure various parameters by converting magnetic, mechanical, chemical, heat, and light variations into voltage and electric current [36].The aroma sensors contained a transducer with a signal amplifier or processor integrated into the system [37].Therefore, this study utilized a specific type of gas sensor called TGS, as shown in Fig. 5.The E-nose sensors circuit was designed with a 10 KΩ load resistance.Additionally, four aroma sensors were installed within the coffee blending container, as shown in Fig. 9. Fig. 9 shows the physical setup of the test equipment.Part A comprised a 7-inch monitor screen displaying the voltages obtained from the four E-nose sensors.Part B acted as the mechanical holder, accommodating all E-nose sensors of E-nose type.Meanwhile, Part C served as the container used to house the coffee grind results during the testing process.Data obtained from various samples of Robusta, Arabica, and without coffee powder beans were used in the identification process.The test graphical user interface (GUI) constructively displayed the types of coffee powder when the identification data aligned with the specified weights.Table 1 presents the responses of each E-nose sensor, which serves as a dataset for ANN training.The data within the table facilitates the identification of the three distinct types of espressos, namely Robusta, Arabica, and without coffee powder.For the test, 70 coffee powder samples were used for both Robusta and Arabica.The test results were based on the output voltage of E-nose sensors, namely TGS 2602, 2610, 2611, and 2620.The data displayed in Table 1 represented the average output voltage of each E-nose sensor.In Fig. 10, the graph displayed the variations in the average output voltage reading of E-nose sensors.TGS 2620 showed the highest average voltage during the Robusta and Arabica coffee powder detection.Additionally, TGS 2602, 2610, 2611, and 2620 were used for detecting Hydrogen Sulfide, LPG, Methane, and Alcohol gases, respectively.The recorded voltage values for both Robusta and Arabica coffee grounds were used to measure the conductivity of the sensors, which increased proportionally with the gas concentration.This change in conductivity was effectively converted into an output signal, accurately representing the gas concentration through a simple electrical circuit.Impressively, TGS 2620 required only a hearting current of 42 mA.TGS 2602 identified hydrogen sulfide gas, ammonia, and VOCs within a 1 -30 ppm detection range with a voltage reference (vref) set at 5 volts.= 91.90%The response data for each training gas was processed using the backpropagation ANN method, with a consistent structure of 4 input, 8 hidden, and 2 output nodes.The training process incorporated a total of 140 data points, including 70 samples each for the aroma of Robusta, Arabica, and without coffee beans, with a specific target value of [1 0], [0 1], and [0 0], respectively.

IV. CONCLUSION
In conclusion, TGS 2602, 2610, 2611, and 2620 showed remarkable sensitivity to variations in gas elements found in both Robusta and Arabica coffee beans.The key distinguishing factor among the sensors was observed within TGS 2602 and 2611.For ground, Robusta coffee, TGS 2602 and 2611 recorded 2.967 and 1.263 volts, with gas concentrations of 17.92 and 2441.8 ppm.Similarly, for Arabica coffee powder, 3.384 and 1.582 volts were obtained, corresponding to a gas concentration of 20.445 and 3058.5 ppm.The results indicated that the highest sensitivity and fastest response as inputs to ANN were exhibited by TGS 2602 and 2611.This exceptional performance was particularly evident in detecting changes in gas elements within the aroma of Robusta and Arabica coffee powder, surpassing the other two sensors.Based on the confusion matrix testing, the backpropagation ANN was examined using 70 samples, leading to an impressive 91.90% accuracy rate.

Fig. 1 (Fig. 2 (
Fig. 1 (a) Arabica coffee beans and (b) Robusta coffee beansAdditionally, the maturity level of Arabica was categorized into three, namely, light, medium, and dark, as shown in Figs.2a, b, and c.

Fig. 4
Fig. 4 Block Diagram of the System

Fig. 5 E
Fig. 5 E-nose Sensors Schematic Circuit Fig. 6 displayed the backpropagation ANN, which was structured with three layers.The architecture consisted of one input layer with four nerve cells, namely x1, x2, x3, and x4.one hidden layer with eight nerve cells, and two output layers (Y1 and Y2).

Fig. 6
Fig. 6 Artificial Neural Network (ANN) DesignFig.7 presented a comprehensive flowchart detailing the design of the backpropagation ANN used in this study.The construction of the learning process followed the completion of the structure design.This procedure commenced with the creation of the training phase, wherein the input, hidden, and output weight values were obtained.The training process consumed a significant amount of time due to the focus of the system meeting specific targets in the design.To halt the program, two conditions were implemented, namely the use of Epoch and Setting the MSE (Mean Square Error) value.The identification process was conducted, which was closely similar to the training phase.However, the identification

Fig. 8
Fig.8displays a flowchart detailing the entire coffee beans aroma identification process.The mechanical design was completed with a blending capacity of 0.25 kg.

Fig. 8
Fig. 8 Flowchart of the Entire Coffee Beans Aroma Identification Process

Table 2
presents the confusion matrix of each type of coffee.