How to Identify Roast Defects in Coffee Beans Based on the Volatile Compound Profile

The aim of this study was to detect and identify the volatile compounds in coffee that was obtained in defect roast processes versus standard roasting and to determine the type and strength of the correlations between the roast defects and the volatile compound profile in roasted coffee beans. In order to achieve this goal, the process of coffee bean roasting was set to produce an underdeveloped coffee defect, an overdeveloped coffee defect, and defectless coffee. The “Typica” variety of Arabica coffee beans was used in this study. The study material originated from a plantation that is located at an altitude of 1400–2000 m a.s.l. in Huehuetenango Department, Guatemala. The analyses were carried out with the use of gas chromatography/mass spectrometry (GC–MS) and an electronic nose. This study revealed a correlation between the identified groups of volatile compounds and the following coffee roasting parameters: the time to the first crack, the drying time, and the mean temperatures of the coffee beans and the heating air. The electronic nose helped to identify the roast defects.


Introduction
Coffee is one of the most popular beverages in the world. Coffee consumption is steadily increasing, and its average monthly price, which was estimated at USD 1.9517 per pound in November 2021, is also rising constantly [1]. The leading coffee producers include Brazil (3,804,000 t), Vietnam (1,740,000 t), Indonesia (717,000 t), and Colombia (858,000 t). In turn, the USA (1,618,900 t), the EU (2,415,000 t), Brazil (1,344,000 t), and Japan (443,200 t) are the largest coffee consumers [1].
Coffee has a very distinctive aroma due to its content of volatile compounds. The concentration of VOCs (volatile organic compounds) may change depending on the temperature that is used during the coffee roasting process [2,3]. The size of the ground particles grassy and devoid of the caramelized sugars that are present during the roasting process. This defect usually occurs in the light roast process, which is carried out at a slightly insufficient temperature. It sometimes occurs in the production of light roast coffee beans. The overdeveloped coffee defect is the opposite of underdeveloped coffee. It is a result of treatment with a slightly excessive temperature, as in the case of the Vienna or French roasting styles. There is a slight difference between a darker roast (Vienna, French) and the overdeveloped coffee. In both cases, the beans will look dark and greasy, sometimes even nearly black, but the flavor of the coffee that is brewed from overdeveloped beans will be burnt and bitter with smoky and coal notes [21]. Scorched coffee is produced when the charge temperature, i.e., the starting temperature, is too high and the speed of the drum is too slow. In such a case, dark, burnt stains appear on the coffee bean surface, and the coffee may taste oily, smoky, and reminiscent of roasted poultry [21].
The aim of this study was to determine and identify the volatile compounds that are generated in the process of defective coffee roasting. In order to achieve this goal, coffee beans were roasted in conditions causing the most common roast defects, i.e., insufficient and excessive temperatures. Thus, coffee underdevelopment and overdevelopment defects were achieved. Additionally, the beans from the same batch were roasted in appropriate conditions, yielding a comparative material, i.e., coffee that was roasted according to common standards. This study was conducted with the use of mass spectrometry with gas chromatography (GC-MS) and an electronic nose. The information obtained in this way will allow the indication of the major volatile compounds as a marker of a given roasting defect.

Analysis of Volatile Compounds in Green Coffee
The analysis of the volatile compounds that were contained in the green coffee beans was carried out separately from the analysis of the roasted coffee due to the different nature of the material, which was not subjected to the roasting process and did not contain volatile compounds that are typical of roasted coffee beans [15,22]. Lower numbers of volatile compounds were determined in the green coffee beans in comparison with the roasted beans due to the lack of compounds that were generated during the roasting process, which determined the final aroma of the coffee. This is consistent with the results of similar studies [23,24]. Green coffee beans only have a basic VOC composition compared to roasted beans. While over 1000 volatile compounds are typically detected in roasted coffee, only approximately 200 VOCs are identified in green beans. These compounds, and other aroma molecules, are mainly generated during the roasting process from the non-volatile precursors that are present in green coffee beans, e.g., polysaccharides, lipids, proteins, and free amino acids [25]. Table 1 presents 18 volatile compounds that were identified in the green coffee beans. The volatile compounds were classified into groups of chemical compounds, which were present in the following amounts: alcohols-12.5%, acids-5%, ketones-1.4%, azines-4.3%, esters-47.1%, amines-4.6%, terpenes-11.4%, hydrocarbons-11.8%, others-1.9%, and furans, aldehydes, and pyranes-0%. The group of volatile compounds that were contained in the green coffee was represented predominantly by esters, while unidentified substances accounted for the lowest percentage. No furans were identified in the green coffee that was analyzed in the present study, but this group of compounds was detected in the roasted coffee beans. Similar findings were reported by Fowble et al. (2019). In their study, the concentration of furans was 25-fold lower in green coffee than in roasted coffee [13]. In turn, furfuryl alcohol, which is a derivative of furans, was detected in this study. The differences in the determination results may be related to varietal differences or the coffee cultivation conditions [26]. Fowble et al. analyzed Coffea arabica green beans from Antigua, Colombia. Propane, 2-methyl-1-nitro accounted for the largest proportion (33.57%) among the volatile compounds in the analyzed green coffee. The other most abundant compounds were 4.5-difluoroacetate isomer (11.79%) and 2-furanmethanol, acetate (6.43%). In total, these three main compounds accounted for approximately 50% of VOCs in the green coffee.
Fluorine compounds are among the compounds that were found. The presence of fluorine compounds in coffee is also confirmed by the results of the studies that were conducted by by Wolska et al. [27]. Fluorine is naturally present in soil and water. Hence, its compounds may be present in coffee beans, as in the case of tea leaves [28]. The determination of the volatile, the semi-volatile, and the non-volatile contaminants, including fluorine volatile compounds, in coffee, tea, oil, and cocoa was also determined by Revel'skii et al. [29].  Table 2 shows 36 volatile compounds that were identified in the underdeveloped and the overdeveloped coffee. The volatile compounds were classified into relevant chemical groups, and their percentage is presented in Figure 1. Nine groups of compounds were distinguished, with a dominance of azines (underdeveloped: 45.65%, standard: 35.04%, and overdeveloped: 42.88%). A substantial amount was also determined in the case of aldehydes (underdeveloped: 15.96%, standard: 15.12%, and overdeveloped: 16.06%) and acids (underdeveloped 11.87%, standard 16.96%, and overdeveloped 10.75%). The analysis of the volatile fraction in the coffee beans that were roasted at the standard temperature and time identified 29 different compounds. In turn, the coffee that was roasted for a longer period of time (underdeveloped) exhibited the presence of 25 compounds, and 24 volatile compounds were identified in the coffee beans that were roasted more intensively for a shorter period of time (standard and overdeveloped).    Several compounds that are frequently present in roasted products were detected in the volatile fraction. These include furans, which are generated as by-products of sucrose degradation, pyrazine, which is derived from protein degradation, and pyridines, resulting from trigonelline degradation. These phenomena occur during the storage and the processing of coffee beans [30]. Heat-induced volatile compounds (furans, pyrazines, and pyridines) are more closely associated with the composition of roasted coffee aromas than esters, which are abundant in green coffee. One of the volatile substances was pyrimidine, 4,6-dimethyl-, whose content was 12.93% in the underdeveloped coffee and 10.11% and 11.31% in the standard and overdeveloped coffee, respectively. Another compound was 2-furanmethanol, which is otherwise known as furfuryl alcohol (underdeveloped coffee: 9.76%, standard coffee: 8.17%, and overdeveloped coffee 13.69%). This furan is a product of the Maillard reaction [31]. Considerable amounts of 2-furancarboxaldehyde, 5-methyl-, which is known as 5-methylfurfural, were detected as well. This product of the Maillard reaction gives food products the flavor of almonds, burnt sugar, and caramel. It represents the group of furans and aldehydes [32]. Its content was 7.12% in the underdeveloped coffee beans, 5.92% in the standard coffee beans, and 6.28% in the overdeveloped beans. Particular attention should also be paid to pyridine (underdeveloped: 9.89%, standard: 6.33%, and overdeveloped: 11.03%), which gives coffee its characteristic aroma. The presence of 2-furanmethanol acetate, which is otherwise known as furfuryl acetate (underdeveloped: 10.42%, standard: 6.54%, and overdeveloped: 10.75%) was detected as well. It gives the products a sweet and fruity aroma. Additionally, 2-acetolnyl-3-cyano-2,3-dimethylcyclobutane-1-carboxylic acid was found to be present in a substantial amount (9.91%) in the standard roasted coffee only. A compound that was identified during the analysis (pregnane-3,11,20,21-tetrol, cyclic 20,21-(butyl boronate), (3α,5β,11β,20R)) is a compound that is commonly found in plants.

Analysis of Volatile Compounds in Roasted Coffee
The same compound has also been identified by, among others, Ahmed et al., 2022 [33]; Gopu et al., 2021 [34]; and Aroosa et al., 2019 [35]. The term "volatile organic compounds" (VOCs) refers to the organic compounds that are present in the atmosphere as gases but can also be liquids or solids under normal conditions of temperature and pressure. The compound was not detected in the green coffee beans; however, thermal treatment caused its appearance in a volatile form and, therefore, it was adsorbed on the fiber, and was detected in the chromatographic analysis. Figure 2a shows the projection of the variables on planes PC1 (59.39%) and PC2 (38.28%), which describe the dependencies at 97.67%. Figure 2a shows a positive correlation between the time to the first crack, the average air temperature, the average coffee temperature, and the drying time and the percentage amounts of alcohols and furans. The correlation between these coffee roasting parameters and the content of aldehydes was negative. The chemical compounds and the roasting parameters that are located on the negative side of the main component PC2 distinguish the overdeveloped and the standard coffee from the underdeveloped variant. The first main component PC1 differentiates the standard and overdeveloped samples significantly. This actually suggests that the consumer may not perceive the flavors of the overdeveloped, the underdeveloped, and the standard roast coffee infusions as similar [36,37]. Figure 3a shows the projection of variables (maximum electronic nose responses) on the PC1 (59.55%) and PC2 (39.16%) planes, which describe the dependencies at 98.71%,which is a very high level. The PC3 component represents 1.29%. The analysis revealed a positive correlation between the response of the electronic nose sensors TGS2620, TGS2600, and TGS2610, as well as TGS2612 and TGS2611, and the key roasting process parameters, i.e., the air and the coffee bean temperature. It also showed a negative correlation between the time to the first crack and the drying time and the TGS2603, AMS-MLV-P2, and TGS2602 sensor responses.

Statistical Analysis
In this case, the responses of the electronic nose, which reacts to the intensity of the interactions of the volatile substances (odor level) [22], that are located in the area that is delineated by the two circles have a strong impact on the possibility of the indication of the roasting mode, especially in the case of the "standard" roast. The projection of the cases on the PC1 and PC2 planes (Figure 3b) shows that the two main components distinguish between the roasting styles; hence, the Agrinose is a suitable tool for the rapid identification of defective "overdeveloped" and "underdeveloped" roasting processes versus the correct "standard" roast. Our previous studies demonstrated the suitability of the enose for the identification of the regions of coffee origin and the content of pyridine in coffee [5,22]. The chemical compounds that are located in the area that is delineated by the two circles have a strong effect on the possibility of the indication of the coffee roasting method [5,15]. Amines, azines, ketones, and aldehydes are characteristic for the "underdeveloped" roast, whereas alcohols, furans, the drying time, the time to the first crack, the average air temperature, and the average coffee temperature describe the "overdeveloped" roast type. The "standard" roast mode is described by the content of acids, esters, and pyranes.
The chemical compounds and the roasting parameters that are located on the negative side of the main component PC2 distinguish the overdeveloped and the standard coffee from the underdeveloped variant. The first main component PC1 differentiates the standard and overdeveloped samples significantly. This actually suggests that the consumer may not perceive the flavors of the overdeveloped, the underdeveloped, and the standard roast coffee infusions as similar [36,37]. Figure 3a shows the projection of variables (maximum electronic nose responses) on the PC1 (59.55%) and PC2 (39.16%) planes, which describe the dependencies at 98.71%,which is a very high level. The PC3 component represents 1.29%. The analysis revealed a positive correlation between the response of the electronic nose sensors TGS2620, TGS2600, and TGS2610, as well as TGS2612 and TGS2611, and the key roasting process parameters, i.e., the air and the coffee bean temperature. It also showed a negative correlation between the time to the first crack and the drying time and the TGS2603, AMS-MLV-P2, and TGS2602 sensor responses.

Materials
The "Typica" variety of Arabica coffee beans was used in this study (See Supplementary Materials). It is cultivated in many regions of the world, but the coffee beans from Central America are of the highest quality. It is believed that the best "Typica" coffee beans are obtained from plantations located at altitudes exceeding 1600 m a.s.l. It has been observed that Central American coffee varieties that are grown in mountainous regions close to the Caribbean (Huehuetenango and Coban) or the Pacific (San Marcos) have a fruitier flavor and higher acidity. The "Typica" variety grown in Guatemala is well adapted to colder conditions and has moderate nutritional requirements, but is particularly sensitive to coffee leaf rust, coffee cherry disease, and pests. The first harvest is carried out from December to April in the fourth cultivation year. The harvested fruits are treated with the wet method to enhance their acidity and then they are dried in the sun. The SCA (Specialty Coffee Association) coffee roast level should be moderately light. The beans that are treated in this way have a floral-citrus, chocolate, or slightly nutty aroma, as well as pleasant and delicate acidity [38]. The content of the chemical and aromatic compounds contained in the green beans of this coffee variety was determined before the start of the roasting process.

Roasting Procedure
The coffee beans were roasted in a Rovigo Caffee roaster (Lublin, Poland). The beans were roasted in a Coffed SR 5 roaster equipped with a double-walled drum, as well as coffee and exhaust temperature sensors (Coffee Roasters, Piła, Poland). It offered the possibility of controlling the drum rotation speed and the combustion fan speed, air flow, and the burner power. Hence, it was possible to plot three curves as a function of time, namely the temperature in the roaster, the temperature of the coffee beans during roasting, and the increase in the temperature of the beans referred to as ROR (rate of rise). To achieve optimal and reproducible roasting conditions in the Coffed SR 5 roaster, each batch of beans represented a full load (5 kg). The coffee beans were roasted in three repetitions in for the same conditions. The following three modes of roasting the beans were used: roasting at an initial temperature of 240 °C to produce an overdevelopment defect, standard roasting at an initial temperature of 220 °C to obtain medium light beans, and roasting at an initial temperature of 210 °C to achieve an underdevelopment defect [39]. The process In this case, the responses of the electronic nose, which reacts to the intensity of the interactions of the volatile substances (odor level) [22], that are located in the area that is delineated by the two circles have a strong impact on the possibility of the indication of the roasting mode, especially in the case of the "standard" roast. The projection of the cases on the PC1 and PC2 planes (Figure 3b) shows that the two main components distinguish between the roasting styles; hence, the Agrinose is a suitable tool for the rapid identification of defective "overdeveloped" and "underdeveloped" roasting processes versus the correct "standard" roast. Our previous studies demonstrated the suitability of the e-nose for the identification of the regions of coffee origin and the content of pyridine in coffee [5,22].

Materials
The "Typica" variety of Arabica coffee beans was used in this study (See Supplementary Materials). It is cultivated in many regions of the world, but the coffee beans from Central America are of the highest quality. It is believed that the best "Typica" coffee beans are obtained from plantations located at altitudes exceeding 1600 m a.s.l. It has been observed that Central American coffee varieties that are grown in mountainous regions close to the Caribbean (Huehuetenango and Coban) or the Pacific (San Marcos) have a fruitier flavor and higher acidity. The "Typica" variety grown in Guatemala is well adapted to colder conditions and has moderate nutritional requirements, but is particularly sensitive to coffee leaf rust, coffee cherry disease, and pests. The first harvest is carried out from December to April in the fourth cultivation year. The harvested fruits are treated with the wet method to enhance their acidity and then they are dried in the sun. The SCA (Specialty Coffee Association) coffee roast level should be moderately light. The beans that are treated in this way have a floral-citrus, chocolate, or slightly nutty aroma, as well as pleasant and delicate acidity [38]. The content of the chemical and aromatic compounds contained in the green beans of this coffee variety was determined before the start of the roasting process.

Roasting Procedure
The coffee beans were roasted in a Rovigo Caffee roaster (Lublin, Poland). The beans were roasted in a Coffed SR 5 roaster equipped with a double-walled drum, as well as coffee and exhaust temperature sensors (Coffee Roasters, Piła, Poland). It offered the possibility of controlling the drum rotation speed and the combustion fan speed, air flow, and the burner power. Hence, it was possible to plot three curves as a function of time, namely the temperature in the roaster, the temperature of the coffee beans during roasting, and the increase in the temperature of the beans referred to as ROR (rate of rise). To achieve optimal and reproducible roasting conditions in the Coffed SR 5 roaster, each batch of beans represented a full load (5 kg). The coffee beans were roasted in three repetitions in for the same conditions. The following three modes of roasting the beans were used: roasting at an initial temperature of 240 • C to produce an overdevelopment defect, standard roasting at an initial temperature of 220 • C to obtain medium light beans, and roasting at an initial temperature of 210 • C to achieve an underdevelopment defect [39]. The process conditions for each type of roasting technique were recorded, and the temperature profiles of the air and coffee beans as a function of time are shown in Figure 4.  At the start of the roasting process, cold coffee beans enter the roaster that is set at a very high temperature of over 240 °C (curves 1, 3, and 5). Curves 2, 4, and 6, represent the temperature of a hot probe inside the roaster, which absorbs the thermal energy of hot air. The probe inside the roaster indicates 180 °C for the procedure of the underdeveloped roast, 200 °C for the standard roast procedure, and 240 °C for the procedure of the overdeveloped roast. At this stage, the cold beans absorb thermal energy, and the hot probe inside the roaster cools. This is represented by an initial drop on the curve, which lasts until the beans and the probe reach the same temperature. It is visible for the underdeveloped defect on curve 2 after 0.5 min, for the standard roasting on curve 4 after 1 min, and for the overdeveloped defect after 1.5 min. Afterwards, the beans and the probe reach the same temperature, and they will then rise in sync with each other. Once it is reached, this equilibrium is known as the "turning point".

Electronic Nose
An Agrinose device, which was designed and constructed at the Institute of Agrophysics of the Polish Academy of Sciences in Lublin, was used to determine the volatile compound profile [5,40,41]. It has a matrix of eight different MOS gas sensors (TGS2600-general air contaminants, hydrogen, and carbon monoxide; TGS2602-ammonia, hydrogen sulfide, high sensitivity to VOC, and odorous gases; TGS2603-odors generated from spoiled foods; TGS2610-LP gas and butane; TGS2611-natural gas and methane; TGS2612-methane, propane, and butane; TGS2620-solvent vapors, volatile vapors and alcohol; AS-MLV-P2-CO, butane, methane, ethanol and hydrogen, which are specifically designed for volatile organic compounds). Based on the sensor response, three parameters characterizing the individual VOCs can be defined. These include the follow- At the start of the roasting process, cold coffee beans enter the roaster that is set at a very high temperature of over 240 • C (curves 1, 3, and 5). Curves 2, 4, and 6, represent the temperature of a hot probe inside the roaster, which absorbs the thermal energy of hot air. The probe inside the roaster indicates 180 • C for the procedure of the underdeveloped roast, 200 • C for the standard roast procedure, and 240 • C for the procedure of the overdeveloped roast. At this stage, the cold beans absorb thermal energy, and the hot probe inside the roaster cools. This is represented by an initial drop on the curve, which lasts until the beans and the probe reach the same temperature. It is visible for the underdeveloped defect on curve 2 after 0.5 min, for the standard roasting on curve 4 after 1 min, and for the overdeveloped defect after 1.5 min. Afterwards, the beans and the probe reach the same temperature, and they will then rise in sync with each other. Once it is reached, this equilibrium is known as the "turning point".

Electronic Nose
An Agrinose device, which was designed and constructed at the Institute of Agrophysics of the Polish Academy of Sciences in Lublin, was used to determine the volatile compound profile [5,40,41]. It has a matrix of eight different MOS gas sensors (TGS2600general air contaminants, hydrogen, and carbon monoxide; TGS2602-ammonia, hydrogen sulfide, high sensitivity to VOC, and odorous gases; TGS2603-odors generated from spoiled foods; TGS2610-LP gas and butane; TGS2611-natural gas and methane; TGS2612-methane, propane, and butane; TGS2620-solvent vapors, volatile vapors and alcohol; AS-MLV-P2-CO, butane, methane, ethanol and hydrogen, which are specifically designed for volatile organic compounds). Based on the sensor response, three parameters characterizing the individual VOCs can be defined. These include the following: maximum sensor response ∆R/R max , response time t IM , which is measured from the start of the analysis to the achievement of the maximum sensor response, and cleaning time t CL , i.e., the time of removal of the odor from the sensor, which is measured from the end of the analysis to half of the ∆R/R max value. The established parameters depended on the type of the volatile substances and the intensity of the emission of compounds contained in the odor profile [42,43].

GC-MSAnalysis
A Trace GC Ultra gas chromatograph (ThermoFisher Scientific, Waltham, MA, USA) coupled with an ITQ 1100 mass spectrometer (ThermoFisher Scientific, Waltham, MA, USA) was used to carry out the GC-MS analysis in accordance with a procedure described in other studies [5,22]. The SPME 50/30 µm Divinylbenzene/Carboxen/Polydimethylsiloxane (DVB/CAR/PDMS), Stableflex (2 cm) 24 Ga (Sigma Aldrich, Poznań, Poland) fiber was used for the chromatographic analyses. The fiber with the adsorbent was placed for 30 min in the measuring chamber, which contained VOC-emitting coffee beans (250 g) at the same temperature (22 • C), which was monitored during all measurements. Next, the fiber was transferred to the GC injector for 5 min to desorb the VOCs. A Zebron ZB-5Msplus Capillary GC 30 m × 0.25 mm × 0.25 µm capillary column was used in the analyses. The injection temperature was 60 • C for 5 min. Then, it was increased from 60 to 250 • C at a rate of 5 • C/min and from 250 • C to 270 • C at a rate of 10 • C/min. The final temperature was maintained for 5 min. The helium flow rate was kept constant at 2.2 mL/min. The temperature of the ion source transfer line was 280 • C. The electron ionization (EI+) mode with electron energy of 70 eV was applied. The mass spectrometer acquired data in the full scan mode (scan ranges: . Each variant of the experiment was performed in three repetitions. For the identification of the compounds, the Wiley 138 library was used for the highest quality of matching. The procedure was also described in other publications by the authors of the present study [22].

Statistical Analysis
Statistica software (version 12.0, StatSoft Inc., Tulsa, OK, USA) was used for the statistical analyses. Principal component analysis (PCA), analysis of variance, and the determination of correlations were performed at a significance level of α = 0.05. The principal component analysis was employed to determine the relationships between the maximum responses of the chemically sensitive sensors and the volatile compounds emitted from the coffee varieties in the two roasting methods [22,44]. The PCA data matrix for the statistical analysis of the results of the chromatographic tests had 13 columns (names of the volatile compounds) and 9 rows (type of coffee and type of roast). In turn, the PCA data matrix for the statistical analysis of the results provided by the electronic nose had 12 columns (type of sensors) and 9 rows (max responses-∆R/Rmax). The input matrix was scaled automatically. The optimal number of principal components obtained in the analysis was determined based on the Cattel criterion.

Conclusions
The roast defects that are produced in processes that are carried out with differing parameters, i.e., the initial air temperature and the time to the first crack, were difficult to identify with the methods that are used in roasteries. The color of the underdeveloped beans did not differ from that achieved in the typical light smoking styles (light, light cinnamon), and the color of the overdeveloped beans did not differ from the dark roasted beans (Vienna or French roasting). The use of the Agrinose and the chemometric methods facilitated the identification of the volatile compound profile and the intensity of the aroma of the roast-defect coffee. The analysis of the volatile compounds in the roasted coffee beans helped to identify the compounds that distinguish the roast defects. Properly roasted coffee is characterized by a substantially higher percentage of esters and acids than that in overdeveloped and underdeveloped coffee. Overdeveloped coffees have a considerably higher amount of alcohols (15%) and furans (12%). In turn, underdeveloped coffees have the highest content of aldehydes (16%) and azines (46%). The statistical analysis of the Agrinose sensor responses facilitated the identification of the defects. The projection on the PC1 plane clearly differentiated between the overdevelopment and underdevelopment defects, and the projection on the PC2 plane discriminated between the properly roasted coffee and both of the roast defects.