Optimization of a Coffee Bean Roasting Machine Using Fuzzy Logic and Deep Learning Approaches

Optimization of a Coffee Bean Roasting Machine Using Fuzzy Logic and Deep Learning Approaches

I Putu Hariyadi* Andi Sofyan Anas Bima Romadhon Parada Dian Palevi Bayani Adam Sasaki Mulyana

Faculty of Engineering, Bumigora University, Mataram 83127, Indonesia

Electrical Engineering, Faculty of Engineering, Institut Teknologi Nasional Malang, Malang 65145, Indonesia

Corresponding Author Email: 
putu.hariyadi@universitasbumigora.ac.id
Page: 
4325-4337
|
DOI: 
https://doi.org/10.18280/mmep.121221
Received: 
30 September 2025
|
Revised: 
12 November 2025
|
Accepted: 
17 November 2025
|
Available online: 
31 December 2025
| Citation

© 2025 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).

OPEN ACCESS

Abstract: 

Coffee is a primary commodity in international trade. Post-harvest processing, particularly the roasting stage, plays a critical role in determining the final product attributes, such as flavour, aroma, colour, and bioactive compound content. Precise control during the roasting process is essential to ensure quality consistency, especially at a commercial production scale. This study aims to develop an adaptive control system to achieve a uniform roast level in coffee beans. The implemented method integrates fuzzy logic with a deep learning-based evaluation mechanism. The fuzzy logic functions as the main controller for the roaster, dynamically regulating temperature, time, and heat intensity parameters based on sensor input. Subsequently, a Convolutional Neural Network (CNN) algorithm was employed as an objective evaluation system to classify the roast degree (light, medium, dark) based on images of the coffee beans. The research dataset, comprising 1,600 images of roasted coffee beans, was obtained from Kaggle.com for model training and validation, while the beans roasted by the machine were used as test data. The test results demonstrated highly reliable system performance. The fuzzy controller exhibited robust adaptability across various baking phases, and the CNN model achieved a validation accuracy of 95.83% based on the results of 5-fold cross-validation testing. These findings confirm that the integration of these two technologies successfully creates a closed-loop system capable of producing roasted coffee beans with a high degree of consistency and accuracy. This approach also significantly reduces reliance on manual assessment, which is prone to subjectivity and error.

Keywords: 

CNN, fuzzy logic, coffee roasting, deep learning, coffee bean

1. Introduction

Coffee has emerged as a primary commodity in international trade. Research indicates that 40% of coffee quality is determined at the pre-harvest stage through field processes, 40% is influenced by primary post-harvest processing, and the remaining 20% is determined during storage, distribution, and serving [1]. This underscores that post-harvest processing, particularly the roasting stage, plays a critical role in defining the final attributes of coffee, such as flavor, aroma, color, and bioactive compound content [2, 3]. During roasting, coffee beans undergo complex physicochemical transformations, including Maillard reactions and pyrolysis, which alter moisture content, color, and the formation of volatile and antioxidant compounds [4]. The two key parameters influencing these transformations are temperature and time, where minor deviations (±5℃ or ±1 minute) can significantly alter the bean's sensory profile and chemical composition [5, 6]. Therefore, precise control during roasting is essential for ensuring quality consistency, particularly in commercial-scale production.

Despite its importance, roasting practices in many regions still rely on conventional methods, such as manual roasting in iron pans with constant stirring. According to Majeed et al. [7], this approach is not only inefficient in terms of energy and time but also prone to outcome variability due to its dependence on the operator's subjective skill. Semi-controlled systems, such as gas-fired rotary ovens equipped with basic temperature sensors, have improved temperature consistency. However, the assessment of bean maturity remains reliant on human visual observation, which is influenced by factors such as lighting conditions, operator fatigue, and experience [8-10]. Studies indicate that visual misjudgment can lead to over-roasting or under-roasting, resulting in diminished antioxidant activity and flavor quality [11, 12].

To address these limitations, full-control systems based on fuzzy logic, machine learning, and deep learning technologies have begun to be adopted. This approach provides adaptive capabilities in decision-making and information processing from heterogeneous data sources. A previous study [13] demonstrated that the implementation of Convolutional Neural Network (CNN) achieved up to 98% classification accuracy for coffee bean maturity levels on 600 coffee beans grouped into five distinct ripeness stages. In that study, the test data were obtained through multispectral image acquisition, and a CNN was then employed to extract pattern representations from high-dimensional data.

Meanwhile, the study [14] developed a machine learning-based predictive model to estimate optimal roasting parameters, including the color profile of roasted coffee beans. The model was trained on a dataset integrating key process variables, namely temperature, humidity, and roasting duration. In another work, a study [15] designed a coffee bean roasting machine equipped with a 2 kW heating coil and controlled by fuzzy logic algorithms. This study empirically demonstrated the effectiveness of fuzzy logic in maintaining the roasting process by considering complex variables such as bean mass and temperature fluctuations. In addition, the study [16] designed a fuzzy logic control system for a portable roaster. Evaluation results indicated that the system was capable of regulating roasting temperatures stably and following varying set-points with minimal fluctuation, confirming its reliability in processing materials such as coffee.

However, most of these approaches remain partial: CNNs are applied only for visual classification without integration into real-time control mechanisms, while fuzzy logic still relies on conventional sensor input without image-based feedback to evaluate roasting quality [17, 18]. This separation reveals a significant research gap. Therefore, this study aims to fill this gap by introducing an innovative synergy between fuzzy logic and CNN. In the proposed system, fuzzy logic functions as the primary controller that dynamically regulates process parameters, including drum temperature, roasting duration, and heating intensity. In parallel, the CNN algorithm is integrated to provide objective visual analysis that acts as closed-loop quality feedback. This integration creates a fully closed-loop system that not only controls the roasting process but also continuously verifies its output, with the ultimate goal of producing roasted coffee beans with high and consistent maturity levels.

Based on this research gap, the novelty of this study lies in the development of an intelligent closed-loop roasting system integrating fuzzy logic and CNN within a single unified architecture. Unlike previous fragmented approaches, the proposed system utilizes CNN visual classification outputs as direct feedback to tune fuzzy logic control parameters. This integration enables the system not only to control the process based on conventional sensor conditions but also to autonomously adjust roasting operations based on objective evaluation of the actual roasted beans, thus establishing an adaptive roasting mechanism that has not been implemented in previous research. Furthermore, this approach reduces reliance on manual assessment and enables adaptation to natural variability in coffee beans, such as differences in size, moisture content, and initial chemical composition [19, 20]. The system's advantage is further reinforced by its ability to minimize the degradation of bioactive compounds through dynamically optimized roasting profiles, while maintaining consistency in flavor and aroma, critical aspects for meeting market demand for high-quality premium coffee [21, 22].

The urgency of this research is particularly relevant in the context of Industry 4.0, where AI-based automation forms the backbone of production efficiency. By combining the sophistication of CNNs and fuzzy logic, this system is expected not only to enhance the control accuracy of roasting machines but also to reduce energy waste and operational costs, making it suitable for adoption by small to medium-scale coffee producers. Ultimately, the integration of this technology represents a strategic step toward bridging the gap between traditional practices and digital innovation, thereby strengthening the competitiveness of the coffee industry in the global market.

2. Literature Review

Optimal coffee roasting serves to transform green coffee beans, which initially lack a distinct aroma, into a commercial product with high economic value and superior complexity of flavor and aroma [1]. This transformation is mediated by a series of chemical reactions during roasting, which produce between 800 and 1000 volatile and non-volatile compounds that determine the coffee's sensory profile [23]. Two key reactions in this process are the Maillard reaction and caramelization. The Maillard reaction, which is fundamental and critical, is a chemical process between amino acids and reducing sugars within the coffee beans at specific temperatures (typically 140–165℃) [24]. Unlike caramelization, which solely involves the breakdown of sugars, the Maillard reaction is primarily responsible for creating the characteristic brown color of roasted coffee beans; while also generating most of the flavor and aroma complexity we associate with coffee. Consequently, the Maillard reaction can be considered the core transformation that turns raw beans into a flavor-rich product [25].

The roasting process transforms the coffee beans by developing their three main taste elements: acidity, sweetness, and bitterness. The fundamental objective of this process is to create an optimal balance among these three sensory elements. Different roasting profiles result in different taste emphases [26]. Light roasts tend to preserve or highlight acidity and fruity flavor complexity, whereas medium roasts establish a balance between acidity, sweetness, and body (mouthfeel). Conversely, dark roasts place greater emphasis on bitter intensity and a strong body, while reducing acidity. Failure to control the roasting process results in flavor imbalance, which can manifest as excessively sharp acidity or a dominance of bitter and burnt tastes [27, 28].

Furthermore, the application of proper and controlled roasting techniques aims not only to extract optimal flavor but also to guarantee final product consistency. The use of standardized roasting machines and precise methodologies ensures that each production batch possesses uniform quality and flavor profile [29]. This consistency ultimately provides a predictable and reliable sensory experience for the consumer.

The correct coffee bean roasting process involves controlling three main variables: temperature, heat intensity, and roasting time. Precise control of temperature is crucial as it governs the complex chemical reactions inside the bean responsible for the development of caramel, chocolate, and nutty flavors, as well as the pyrolysis that breaks down bitter substances and develops the characteristic coffee aroma. If the temperature is too low, these reactions will not proceed optimally, resulting in underdeveloped coffee with vegetal or grassy flavors. Conversely, excessively high temperatures can scorch the beans, yielding a dominant burnt and bitter taste, and obliterating the beans' original characteristics. Meanwhile, heat intensity plays a role in regulating the rate of temperature increase [30]. Excessively aggressive heat can char the exterior of the beans while the interior remains under-roasted, whereas overly gentle heat will steam the beans rather than roast them, producing a flat and less clean flavor [31]. In addition, roasting time determines the extent to which these flavor developments occur. A shorter time (light roast) will retain more acidity, fruitiness, and complex origin characteristics. In contrast, a longer time (dark roast) will accentuate a heavier body, dark chocolate flavors, and reduced acidity [32].

Achieving an optimal roasting process necessitates the precise control of the three main variables: temperature, heat intensity, and time. Several studies have developed solutions addressing this. A survey by Ayu et al. [33] designed a 4 kg capacity roasting machine equipped with a temperature control system using a K-type thermocouple. The results demonstrated that the machine was capable of producing coffee beans with a medium to dark roast level within 52 minutes at 180℃, with an average yield of 69.17%. Meanwhile, research by Botha et al. [34] proposed a model-based control strategy for the batch roasting process using a Proportional-Integral (PI) controller with the Internal Model Control (IMC) method. A key finding revealed that the initial 90 seconds of the roasting process could not be effectively controlled due to the presence of dead time and evaporative cooling phenomena. Based on this, a two-stage control strategy was formulated, which refrains from intervention during the first 90 seconds, then applies a secondary loop until the 140th second to ensure temperature profile accuracy, before finally switching to the main loop that controls the derivative of the roast profile. This approach proved capable of consistently replicating flavor profiles, increasing production rates, and simplifying the operation of conventional roasting machines with economical implementation costs.

Although these approaches demonstrate potential in improving temperature control accuracy and producing roasts with a certain degree of consistency, constrain their practical effectiveness. In the study [33], the developed control system still predominantly relies on temperature measurements as a single parameter and, therefore, is unable to detect and correct the dynamic changes in physical characteristics that occur during the roasting process. In other words, the success of the final roasted coffee remains highly dependent on the operator’s manual interpretation of changes in color aroma and crack sound. Meanwhile, the study [34] offers a more systematic model-based control strategy; however, the scope of control remains limited to the manipulation of temperature profiles and does not incorporate a mechanism to evaluate the actual maturity level of the beans. The system implicitly assumes that a given temperature profile will consistently result in the same roasting maturity level. This becomes a major weakness because, in practice, the coffee roasting process is highly non-linear and strongly influenced by variability in moisture content, bean size, varietal type, and origin characteristics. Thus, both approaches still operate within an open-loop architecture that primarily relies on machine parameters alone, and therefore are unable to deliver an adaptive closed-loop system based on real-time evaluation of the actual bean quality during the roasting process.

Additionally, Miskon et al. [35] proposed a Self-Tuned Fuzzy PID (STFPID) control system used to regulate temperature in a laboratory-scale roasting machine. Simulation results indicated that the STFPID significantly reduced overshoot and accelerated settling time compared to a conventional PID, thereby maintaining temperature stability critical for roast quality consistency. The limitation of that study lies in its narrow focus on temperature stabilization as the sole indicator of successful roasting. In addition, the STFPID operates in an open-loop manner with respect to the final product, as it does not incorporate sensors or intelligent systems capable of identifying bean maturity in real time. Consequently, while the system can maintain a stable temperature, it cannot guarantee that such temperature stability consistently corresponds to an optimal roasting profile.

Another study by Kim et al. [36] proposed a real-time monitoring system for the coffee roasting process based on computer vision and deep learning. This system was able to classify coffee bean roast results and quantify real-time bean color changes by analyzing histograms and the Sum of Pixel Grayscale Values (SPGV), where a decrease in SPGV over time reflected the darkening of the beans. Additionally, research by Astuti et al. [37] developed an electronic nose (E-Nose) system equipped with six TGS gas sensors (2600, 2602, 2611, 2612, 2620, and 826) to classify the roast level of Robusta coffee beans based on their aroma profiles. An Artificial Neural Network (ANN) method was integrated into this system to analyze sensor responses corresponding to five roast levels (185℃ to 225℃). The results demonstrated very high classification accuracy through cross-validation: 98.2% for light roast, 98.4% for light-medium, 98.8% for medium, 97.8% for medium-dark, and 95.9% for dark roast. This research proves that the combination of E-Nose and deep learning can be a solution for roasting quality control in the coffee industry.

Even though the computer vision-based approach in study [36] and the integration of an E-Nose with deep learning in study [37] demonstrate very high accuracy in classifying roast levels, both studies still suffer from significant limitations. The vision system and E-Nose developed in these studies function only as evaluation systems or quality monitoring systems for roasted beans, without direct integration into the control mechanism of roasting parameters. In other words, these approaches merely identify the condition of coffee beans after the process has occurred, and therefore still require human operators to manually adjust temperature, flame intensity, or roasting duration. As a result, even though these methods are strong in final quality classification, they cannot provide direct roasting automation, as they do not operate as part of an adaptive control loop that is capable of correcting the process in real time.

Based on the weaknesses identified in previous studies, the approach in this research offers a more comprehensive and constructive contribution by integrating two domains that were previously explored only partially and in isolation. Studies [33-35] focus solely on process control based on machine parameters (temperature, flame, and time), but cannot evaluate the actual bean quality during and after the roasting process. Conversely, studies [36, 37] leverage deep learning and intelligent sensors to identify bean maturity levels, but only function as post-process evaluation systems that are not linked to a control mechanism capable of automatically adjusting parameters. This research addresses both sets of limitations by designing an adaptive control system based on fuzzy logic as the core controller that dynamically manipulates roasting parameters according to sensor responses, and integrating a CNN as an objective evaluator that accurately classifies bean maturity based on visual images of roasted beans. The integration of these two modules creates a closed-loop architecture capable of adjusting parameters based on the actual bean outcome, rather than relying solely on assumed temperature profiles or manual operator input.

3. Research Method

3.1 Data collection and datasets

At this stage, data collection is carried out through two primary steps. First, the determination of hardware and software specifications used in the research is conducted. Second, the acquisition of the roasted coffee bean image dataset and data preparation for CNN model training are performed. The coffee bean dataset is classified into four categories: green bean, light roast, medium roast, and dark roast. The hardware and software specifications can be presented in Table 1.

Table 1. Hardware and software components

Type

Component

Function

Hardware

Raspberry Pi-4

As the main controller

Thermocouple Type K Sensor

As a real-time temperature sensor

Real Time Clock (RTC)

As digital time

Servo Motor

As a flame intensity regulator

Coffee roasting machine

As a coffee bean roasting tool with a capacity of 1 kg

Raspberry Pi-Camera

As a coffee image producer

Arduino Mega 2560

As the main controller for Arduino device

Software

Visual Studio Code

IDE for writing Python code

Arduino IDE

IDE for writing Arduino Code

Google Colab

LeNet model training

The classification system for coffee bean roast levels in this study employs a CNN as the artificial intelligence architecture. The classification process commences with two primary stages: training and predicting, utilizing image data of both roasted and unroasted coffee beans. The dataset comprises images of coffee beans across four primary maturity levels: unroasted, light roast, medium roast, and dark roast. In total, the dataset consists of 1,600 images with a balanced distribution, with each category contributing 400 images. Subsequently, the dataset is partitioned into two subsets: a training subset containing 1,200 images (75%) and a testing subset comprising 400 images (25%). Prior to processing, all images undergo dimensional standardization to a uniform resolution of 224 × 224 pixels. The complete dataset, along with its documentation, is publicly accessible via the following repository: https://s.id/datasetCoffee123.

3.2 Fuzzy logic system design

The coffee roasting process constitutes a critical stage that requires dynamic adjustment and precision in controlling key parameters, namely temperature, time, and heat intensity, to achieve the desired roast profile and ensure batch-to-batch quality consistency [28]. To automate and optimize this process, fuzzy logic is applied to emulate the decision-making capabilities of an experienced roast master. The fuzzy logic system is designed to translate real-time sensor data inputs, such as bean temperature readings and time, into precise control actions for roasting parameters. This system overcomes the limitations of conventional control methods by effectively handling the nonlinear and uncertain nature of the roasting process, thereby maintaining the process along the intended trajectory despite variations in raw material properties or external disturbances. The stages of fuzzy logic implementation consist of fuzzification, inference, and defuzzification.

3.2.1 Fuzzification

The fuzzification stage is a fundamental process in fuzzy logic systems, which functions to transform precise numerical input quantities (crisp inputs) from roasting parameters into fuzzy sets that the inference engine can process [15]. In this study, the input variables undergoing the fuzzification process include Actual Temperature, observed within the range of 160 to 220℃ and categorized into four fuzzy sets, namely Low, Medium, High, and Very High, as well as the Remaining Time in the roasting process, defined over the interval of 0 to 15 minutes with the classifications Very Short, Short, Moderate, and Long. Furthermore, the output variable of the control system is designed to generate two corrective actions: ΔT (Delta Temperature), representing the required magnitude of temperature change with a value range from -10℃ to +10℃, and Heat Intensity, controlled on a scale from 0 to 40. This transformation enables the system to handle continuous input values and measurement uncertainties, thereby allowing control decisions to be made based on the degree of membership within each fuzzy set. The degree of membership for each variable can be illustrated in Figures 1 and 2.

Figure 1. Input member of a function

Figure 2. Output member of the function

3.2.2 Inference

Before making a decision, fuzzy rules are used to control the system logically to connect fuzzy inputs and fuzzy outputs by taking the form of “If-Then” logic [15], as shown in Eq. (1).

if $x_1$ is $a_1 \ldots$ if $x_n$ is $a_n$ then $y$ is $b$                          (1)

Decision making uses the min-max mechanism to produce fuzzy outputs as expressed by Eq. (2).

$\mu_y(y)=\operatorname{Max}\left[\min \left[\mu_{x 1}(\operatorname{input}(i)), \mu_{x 2}(\operatorname{input}(j)), \ldots\right]\right]$                         (2)

3.2.3 Defuzzification

Defuzzification is the process of converting fuzzy outputs into crisp values [15]. The defuzzification method used is the average, expressed in Eq. (3).

$Z_0=\sum_{i=1}^n \frac{\mu\left(Z_i\right) \cdot Z_i}{\mu\left(Z_i\right)}$                         (3)

3.3 CNN model training

3.3.1 Input layer

The training of the CNN model commences at the input layer, which is responsible for receiving raw image data. This layer serves as the foundation that determines the initial dimensions of the data. Its primary function is to accept, organize, and prepare the input data in a format compatible for processing in the subsequent convolutional stages [38]. In contrast to other layers within the CNN, this stage does not perform learnable computations; instead, it acts as a data buffer to ensure the input dimensions and structure conform to the model architecture's requirements [39].

In this study, the input layer receives images of coffee beans that have been roasted using a machine controlled by a fuzzy logic system. The coffee beans produced from this process are classified into three roast levels: light, medium, and dark. Each input image has a fixed resolution of 224 × 224 pixels with three color channels, Red-Green-Blue (RGB), resulting in an input dimension of 224 × 224 × 3 for the model.

3.3.2 Convolutional layer

At this stage, the convolutional layer uses kernel features to extract spatial patterns from an image. Kernel features consist of small matrices containing learned values, which are shifted across the entire input area [40]. At each position, a dot product operation is performed between the filter and the pixel section it overlaps, producing a feature map that indicates the location and strength of a pattern, such as an edge or corner. However, the convolution operation is essentially linear. To enable the network to learn non-linear and complex relationships, the Rectified Linear Unit (ReLU) activation function is applied to each value in the feature map. This function is very efficient because it only changes all negative values to zero and leaves positive values unchanged, thus introducing non-linearity without complicating the computation. The illustration of the operational mechanism of the convolutional layer is presented in Figure 3.

Figure 3. Illustration of a convolutional layer

3.3.3 Pooling layer

This layer serves to reduce computational costs and prevent overfitting by cutting down on the number of parameters. In addition, this layer also increases the model's resilience to small changes in objects, such as shifts or rotations. One popular method is max pooling, which works by taking the highest value from an area (for example, a group of 2 × 2 pixels). By filtering and retaining only the most dominant features, the pooling layer makes the neural network less dependent on the specific location of a feature, which ultimately strengthens the model's generalization power. The operational mechanism of the pooling layer is illustrated in Figure 4.

Figure 4. Illustration of the max-pooling layer

3.3.4 Flatten layer

The flatten layer acts as a connector that transforms data from the convolutional layer to the classification layer. This layer converts feature maps that have multiple dimensions (such as height, width, and number of channels) into a one-dimensional array or vector. This transformation is critical because the fully connected layer, which is responsible for classification, can only process data in vector form, not in multidimensional matrix form.

3.3.5 Fully connected layer

The main task of this layer is to interpret the extracted features and perform classification, with a structural configuration similar to that of a standard ANN. The fully connected connections between neurons and the previous layer enable the network to learn complex nonlinear patterns from all high-level features. In its operation, the fully connected layer also utilizes the ReLU activation function to maintain its non-linearity. The working mechanism of the fully connected layer is illustrated in Figure 5.

Figure 5. Illustration of a fully connected layer

3.3.6 Output layer

The final layer in neural network architecture is responsible for producing definitive prediction results. The neuron configuration in this layer is equivalent to the number of categories to be classified. The activation function applied is task-specific. For binary classification tasks, such as distinguishing between images of cats and dogs, the Sigmoid function is chosen because its output values between 0 and 1 can be considered as the model's confidence level. On the other hand, multi-class classification problems, such as recognizing numbers from 0 to 9, require the Softmax function. The advantage of Softmax lies in its ability to convert output scores into a standardized probability distribution (summing to 1), so that each value represents the probability of each class.

3.4 Architecture of LeNet

The LeNet architecture was a pioneer in CNN and became the foundation for the development of modern CNN, introducing basic patterns that are still relevant today. LeNet consists of seven learning layers arranged in a convolution and subsampling (pooling) pattern, ending with a fully connected layer. The LeNet architecture is shown in Figure 6.

Based on this LeNet architecture, the input layer receives a 32 × 32 pixel grayscale image. Layer C1 performs convolution with six 5 × 5 filters without padding, producing a 28 × 28 × 6 feature map. Each filter learns to detect different patterns, such as edges and corners. The S2 layer performs subsampling with 2 × 2 average pooling, reducing the resolution to 14 × 14 × 6 while making detection more robust against small shifts. The C3 layer applies another convolution with 16 × 5 × 5 filters, producing a 10 × 10 × 16 feature map that captures more complex combinations of features. Layer S4 performs average pooling again, reducing the dimensions to 5 × 5 × 16. Once feature extraction is complete, layer C5 flattens the 5 × 5 × 16 feature map into a 400-element vector and connects it to 120 fully connected neurons. Layer F6 further processes these features with 84 neurons before the output layer finally produces probabilities for 10-digit classes (0-9). In modern implementations, the Softmax function is typically used in the output layer for multi-class classification, although the original version used Euclidean Radial Basis Function units.

Figure 6. Architecture of LeNet

The selection of CNN in this study is grounded on the characteristics of the evaluated data, namely, the visual images of roasted coffee beans. CNNs have been proven to be highly effective methods for automatically extracting visual features, particularly shape, texture, and color distribution patterns that change significantly throughout the roasting process. Several more recent machine learning algorithms (e.g., Vision Transformer/ViT, latest-generation EfficientNet, Swin Transformer, MobileFormer, and others) indeed exhibit excellent performance in principle, but there are two strategic reasons why CNN remains the most appropriate choice for the context of this research.

First, the most dominant changes that occur when the beans enter the roasting phase are surface texture alterations and localized color distribution shifts, rather than global morphological changes. CNNs are inherently more suitable for detecting such localized patterns, whereas state-of-the-art transformer-based architectures require very large datasets to “learn” these visual structures end-to-end without relying on such inductive bias. Second, these more advanced models typically demand significantly higher computational capacity, require large datasets, and have inference latency that is not ideal for a control system that demands rapid responses. CNNs, especially lightweight architectures such as LeNet, can deliver inference within millisecond-scale latency without compromising the parallel execution of the fuzzy-logic-based control system.

3.5 Roasting machine prototype design

The roasting machine prototype was developed by integrating Arduino Mega 2560 as the main controller connected to several critical components. These components include a thermocouple sensor for real-time temperature data acquisition, an RTC module for temporal accuracy, and a servo motor as an actuator to regulate the intensity of the fire. The intelligent control system in this prototype implements fuzzy logic that functions to process sensor data and calculate optimal control parameters. The fuzzy inference process produces two output variables, namely the amount of temperature change (ΔT) and the level of flame intensity required by the roasting machine. These output variables then act as feedback to continuously adjust the roasting process (closed-loop system). When the target roast level is reached, the system automatically transfers the coffee beans to the cooling bin for the final cooling process. Furthermore, CNN is implemented as a quality control mechanism by analyzing images of roasted coffee beans. CNN provides feedback in the form of a percentage of conformity between the roasting results and the classification desired by the user. The design of the fuzzy system implementation in the roasting machine and the CNN evaluation architecture is shown schematically in Figure 7.

Figure 7. Roasting machine of prototype design

4. Result and Discussion

4.1 Coffee machine design results

Fundamentally, coffee roasting apparatuses operate as thermodynamic systems engineered to apply measured thermal energy to transform green coffee beans into a material that has undergone flavor and aroma development, thereby achieving an optimal level of maturity for the grinding process. Essentially, the construction of a coffee roasting machine comprises several primary constituent parts that function synergistically. The core component of this thermal process is a rotating cylindrical drum. This chamber houses the raw material, the green coffee beans. Through its rotational mechanism, the drum serves to agitate the beans continuously, ensuring the creation of a uniform heating profile and a consistent roasting development across all parts of the beans.

The thermal energy required for the roasting process is generated by a burner, positioned beneath the drum, which is typically configured to use gas as its fuel source. Meanwhile, to regulate the temperature within the roasting chamber and simultaneously eliminate chaff (the bean's skin) released during the process, the machine is integrated with a mechanical ventilation system utilizing a fan. Process stability is highly dependent on a control system that encompasses temperature regulation, time management, and adjustments for drum rotation speed and airflow. Other auxiliary components include a hopper as a funnel for holding the raw beans, a cooling tray to rapidly cool the beans post-roasting via air circulation, and an exhaust system (such as an afterburner or scrubber system) to manage the emissions produced. All these components are assembled within a robust machine housing, forming an integrated system that enables the roaster to develop coffee flavor profiles according to specific preferences. The design result of the coffee machine can be presented in Figure 8.

Figure 8. Coffee machine design results

4.2 Results of testing type K thermocouple sensors

Accurate temperature measurement is a critical parameter in the coffee bean roasting process, wherein type K thermocouple sensors are commonly implemented as the primary devices for monitoring real-time temperature values inside the drum. This study aims to evaluate the reliability and temperature reading accuracy of the type K thermocouple sensor by comparing it against a standard thermometer (reference instrument) with higher specifications and precision. This comparative evaluation is intended to quantify the degree of deviation or potential error, thereby determining the extent to which the temperature data from the sensor can be relied upon for process control and product quality consistency.

The testing procedure was conducted through several methodological stages. First, the preparation and calibration stage, wherein the standard thermometer to be used as a reference was first calibrated to ensure its accuracy. The type K thermocouple sensor and the standard thermometer were then installed side-by-side at strategic positions inside the drum of the coffee roasting machine, which was neutralized of coffee beans, to ensure both sensors were exposed to identical heat profiles. Subsequently, the data acquisition stage commenced by operating the roasting machine at several predetermined operational temperature levels. At each stable temperature level, readings from both instruments were recorded simultaneously at 60-second intervals to obtain an adequate dataset. The sensor test results can be presented in Table 2.

Table 2. Thermocouple sensor test results

Time (second)

Temperature

Deviation (℃)

Error (%)

Thermocouple (℃)

Thermometer (℃)

0

32.6

32.4

0.2

0.617

60

64.5

68.8

4.3

6.250

120

77.75

85.2

7.45

8.744

180

90.25

96.6

6.35

6.573

240

102.75

112.9

10.15

8.990

300

113.5

123.6

10.1

8.172

360

122.75

136.1

13.35

9.809

420

132

145.3

13.3

9.153

480

139.25

157.1

17.85

11.362

540

147.25

169.3

22.05

13.024

Average

10.51

8.27

Figure 9 confirmed a positive correlation observed between the increase in the roasting machine's drum temperature and the magnitude of the deviation between the thermocouple and digital thermometer readings. The maximum recorded absolute deviation reached 22.05℃, with an average deviation value across the testing range of 10.51℃. This phenomenon directly correlates with the sensor's error percentage, where the temperature increase is directly proportional to the enlargement of the thermocouple's reading error. The highest identified relative error was 13.024%, while the average relative error was 8.27%. Based on this data, the accuracy level of the thermocouple sensor in reading the temperature inside the drum can be quantified at 91.33%. With this accuracy level, it can be concluded that the sensor possesses sufficient reliability for use in temperature data acquisition, which functions as the input variable for the fuzzy control system.

Figure 9. K-type thermocouple test chart

4.3 Fuzzy logic algorithm test results

The implementation of a fuzzy algorithm in a coffee bean roasting system is primarily aimed at replicating the cognitive capabilities of a professional roaster in making decisions during the process. This algorithm is designed to perform fuzzification, which translates real-time sensor input variables, such as in-drum temperature and roasting duration, into fuzzy sets with linguistic values like "low," "medium," and "high." Subsequently, through an inference engine containing a rule base formulated from expert knowledge, the system maps these input fuzzy sets into an output decision. This output then undergoes a defuzzification process to be converted into a precise and dynamic control action for heating parameters, such as burner intensity and airflow rate, thereby mimicking the adaptive approach employed by a human.

The operational testing phase of the system begins with sample preparation, where green coffee beans with a moisture content below 12% are prepared to ensure consistency in thermal response. The roaster machine is then activated to preheat the drum until it reaches a stable temperature of 180℃. The introduction of the green coffee beans marks the commencement of the drying phase, during which the fuzzy algorithm becomes actively involved in monitoring and regulating the temperature. The system continuously acquires real-time temperature data and performs fuzzy inference calculations to determine the optimal control output. The transition to the Maillard phase occurs automatically based on the logic embedded within the system. This process continues until the system detects the auditory indication of the first crack. At this point, the system switches to the development phase, which is the primary determinant of the final roast level. The duration of this phase is calculated by the fuzzy algorithm based on the desired profile. Immediately upon reaching the target, the coffee beans are discharged from the drum and rapidly cooled on a cooling tray to definitively halt the thermal process, resulting in roasted coffee beans with consistent and controlled characteristics.

Table 3. Fuzzy logic algorithm test results

Input

Output

Thermocouple (℃)

Time (s)

Fire Intensity

ΔT

160

14

40

10

165

13

38

9

170

12

36

8

175

11

34

7

180

10

32

6

185

9

28

4

190

8

25

3

195

7

22

1

200

6

18

0

205

5

15

-2

210

4

12

-4

215

3

8

-6

220

2

5

-8

Table 3 depicts that the system demonstrates responsive performance in controlling roasting parameters. In the initial condition, where the temperature was still low (160℃) with a substantial remaining time (14 minutes), the system responded appropriately by generating a maximum fire intensity output of 40 and the largest positive temperature change of +10℃. This indicates the system's capability to perform aggressive heating to reach the optimal temperature rapidly.

As the input temperature increased, the system progressively reduced the fire intensity and decreased the magnitude of the temperature change, demonstrating adaptive control characteristics. In the intermediate temperature range of 185-200℃, which constitutes the optimal development zone, the system maintained the fire intensity within a range of 18-28 with minimal temperature changes (+1 to +4℃), reflecting a strategy to maintain a stable temperature to optimize the development of coffee bean flavor. This pattern illustrates the system's capability for precision control during the critical development phase.

During the finishing phase, where the temperature had reached high levels (205–220℃) with increasingly limited remaining time, the system consistently switched to a cooling mode by applying negative temperature changes (-2 to -8℃) and continuously decreasing the fire intensity down to 5. This response is critical to prevent over-roasting and burning, while simultaneously preparing for a controlled cooling process. The smooth transition from heating to cooling signifies the successful implementation of the fuzzy rule base in handling the non-linearity of the roasting process.

4.4 CNN testing result

CNN is a deep learning algorithm whose architecture is specifically designed for processing image data. Its capability to automatically extract hierarchical features has proven highly effective for handling various computer vision tasks, such as image classification, semantic segmentation, and object detection. This experiment aims to implement a CNN model to evaluate the results of coffee bean roasting. The model's performance was assessed through an analysis of training accuracy, validation accuracy, training loss, and validation loss metrics. The objective is to validate whether the constructed CNN model can function as an objective evaluation system capable of classifying the roast level of coffee beans, such as light, medium, and dark, thereby ensuring that product quality consistency meets established standards.

The testing procedure commenced with data sample preparation. Green coffee beans were roasted using a 1-kilogram capacity machine integrated with a fuzzy logic control system. For each batch, different roast level setpoints were established. Upon completion of the roasting process, samples of the roasted coffee beans were collected from each batch to serve as test subjects. The output from the CNN system, which is an objective classification of the beans' roast level, was subsequently analyzed. The results of this analysis serve as critical feedback for revising and refining the parameters and rule base of the fuzzy control system in the roasting machine. Consequently, an iterative cycle is formed, continuously enhancing the precision of the roasting process based on objective visual evaluation from the CNN. The training and validation results of the CNN algorithm are presented in Table 4.

Table 4. CNN training accuracy and training loss test results

Epoch

Train Accuracy

Train Loss

Validation Accuracy

Validation Loss

5

0.8751

0.1923

0.9267

0.1978

10

0.9561

0.0780

0.9733

0.0793

15

0.9723

0.0425

0.9733

0.0469

20

0.9665

0.0430

0.9767

0.0509

25

0.9950

0.0247

0.9900

0.0269

30

0.9908

0.0156

0.9867

0.0228

Table 4 shows that the CNN model exhibits a highly positive performance improvement as the number of training epochs increases, as illustrated in Figure 10. An analysis of the accuracy and loss metrics reveals that the model exhibited a significant enhancement in its ability to learn the visual characteristics of coffee beans. Training accuracy consistently increased from 0.8751 at epoch 5 to 0.9908 at epoch 30, while validation accuracy showed a similar upward trend, rising from 0.9267 to 0.9867. This parallel growth pattern between training and validation accuracy indicates that the model did not overfit but instead successfully achieved a strong generalization capability.

Figure 10. CNN testing result

From the perspective of loss values, a stable decrease was observed in both training loss and validation loss. The training loss decreased from 0.1923 to 0.0156, and the validation loss declined from 0.1978 to 0.0228. The minimal discrepancy between the training and validation loss at the conclusion of the training process confirms the model's effectiveness in generalizing visual patterns. The model's performance peak was achieved at epoch 25, with a training accuracy of 0.9950, a validation accuracy of 0.9900, and concomitantly very low loss values.

The consistent validation accuracy rate exceeding 97% after epoch 10 substantiates the viability of the CNN model as an automated evaluation system for coffee bean maturity classification. This reliable visual classification capability supports its integration with a fuzzy control system within the roasting process, where the CNN's classification output can serve as feedback to refine roasting parameters adaptively. Based on the comprehensive analysis, the developed CNN model has fulfilled the criteria for a dependable, objective evaluation system to ensure consistent quality in roasted coffee bean production.

4.5 The 5-fold cross validation

To mitigate potential overfitting, this study applied a 5-fold cross-validation scheme during the model training and evaluation process. In this scheme, the entire dataset consisting of 1,600 images of roasted coffee beans was divided into five equally sized subsets, each containing 320 images, referred to as “folds”. In the first fold iteration (folding-1), the first fold was assigned as the validation set, while the remaining four folds were used as the training set. In the second iteration (folding-2), the second fold was used as the validation set, and the other folds were used for training. This process was repeated until all folds served as the validation set exactly once. Accordingly, each image in the dataset contributed fairly to both the training and validation processes.

This cross-validation approach not only increases the reliability of the model evaluation but also produces a more stable performance estimate, since the measured accuracy, precision, sensitivity, and other evaluation metrics do not depend on a single test subset. The dataset splitting scheme in the cross-validation process is illustrated in Figure 11, which shows how each fold is alternately used as the validation set across the five training iterations. Thus, the risk of bias in test data selection can be minimized, while the model’s generalization capability to unseen data can be assessed in a more objective and representative manner.

Figure 11. Dataset segmentation using 5-fold cross-validation

The training and validation performance across the five data-splitting iterations is presented in Table 5. The average validation accuracy obtained from this 5-fold scheme reached 95.83%, indicating that the model generalizes well across different data partitions and does not exhibit overfitting on any specific portion of the dataset. These findings confirm that the CNN architecture employed in this study is robust and provides stable performance in classifying roasted coffee bean maturity levels.

Table 5. Testing result using 5-fold cross-validation

Fold Number

Loss

Accuracy

Validation Loss

Validation Accuracy

Fold-1

0.0387

0.9744

0.0312

0.9864

Fold-2

0.0521

0.9511

0.0453

0.9620

Fold-3

0.0408

0.9582

0.0337

0.9722

Fold-4

0.0674

0.9075

0.0591

0.9254

Fold-5

0.0499

0.9218

0.0384

0.9453

Average

0.0498

0.9426

0.0415

0.9583

4.6 Analysis of coffee bean roasting results based on CNN algorithm

This test was conducted with the main objective of evaluating the performance of a coffee bean roasting system integrated with a CNN-based deep learning model. The evaluation aimed to verify whether the coffee beans roasted by the machine met the specified maturity standards. Procedurally, the test began with the collection of samples of coffee beans that had undergone the roasting process. Digital images of these samples were then acquired for further processing and prediction by a pre-trained CNN algorithm. The results of this algorithm prediction were objective classifications of the coffee bean maturity level, such as light, medium, or dark roast. This classification served as a quantitative evaluation metric to validate the effectiveness of the fuzzy logic control system embedded in the roasting device. Thus, if the CNN algorithm consistently classifies samples that match the desired standards, it can be concluded that the fuzzy logic control system has been successfully implemented to produce consistent and accurate coffee bean maturity profiles. The CNN evaluation results are shown in Table 6.

Table 6. Evaluation results of roasted coffee bean maturity levels produced by the fuzzy logic-based roasting system using CNN

Capacity

Roasting Time

Result

1 kg

15 minutes

1 kg

14 minutes

Table 5 portrayed that the roasting system integrated with fuzzy logic-based control has demonstrated excellent performance in producing a consistent roasting profile that aligns with the target. In the experiment with a 1 kg capacity and a 15-minute roasting time, the CNN algorithm confirmed the system's success in producing dark roast characteristics with the highest classification accuracy, namely 99.95%. This high accuracy value indicates that the fuzzy control parameters have successfully regulated the temperature profile and roasting duration optimally to achieve a complex and specific maturity level. Furthermore, the system was also capable of producing a medium roast with 93.29% accuracy, although the accuracy for a light roast was relatively lower at 61.57%, suggesting a need for adjustments to the fuzzy rules during the initial roasting phase.

Moreover, the results under a 14-minute roasting time with the same capacity showed the system's highly reliable performance in producing a medium roast with an accuracy reaching 99.01%. This high level of consistency proves that the fuzzy control system possesses a strong adaptive capability to variations in roasting time, while maintaining thermal process stability within the drum. Meanwhile, an additional result showing the classification of a light roast with 93.0% accuracy (p. 2) reinforces the analysis that the system has high reliability for a certain range of roasting profiles, although there remains room for optimization, particularly in enhancing accuracy for the light roast profile under longer roasting conditions.

5. Conclusions

The experimental results unveiled that the developed hybrid control system integrating fuzzy logic and CNN has successfully demonstrated high effectiveness and reliability in automating the coffee roasting process. The system's core achievement lies in its ability to produce consistently high-quality roasted coffee beans that accurately match predefined roast level profiles.

The fuzzy logic controller proved to be highly adaptive in managing the complex, non-linear roasting dynamics. Test results showed the system's responsive performance across different roasting phases - initiating with aggressive heating at low temperatures (fire intensity 40, ΔT +10℃ at 160℃), maintaining precise stability in the critical development zone (fire intensity 18-28, ΔT +1 to +4℃ at 185–200℃), and appropriately transitioning to cooling mode at high temperatures (negative ΔT values at 205–220℃). This dynamic control strategy effectively emulated the decision-making of an experienced roast master.

The CNN-based evaluation system demonstrated outstanding performance in quality assessment, achieving a validation accuracy of 95.83%. This accuracy was obtained through a testing procedure employing 5-fold cross-validation. The validation results indicate that the model exhibits good generalization capability across various data partitions and does not show indications of overfitting.

Furthermore, the evaluation of roasted coffee bean samples produced by the designed roasting machine reveals that the CNN architecture implemented in this study is robust and stable in classifying the roasting maturity levels of coffee beans. The integration of these technologies results in a resilient closed-loop control system, in which visual feedback from the CNN continuously optimizes the parameters used in the fuzzy logic module. Overall, the findings of this study confirm that the synergy between adaptive fuzzy-logic-based control and objective CNN-based quality assessment can significantly enhance roasting consistency and reduce reliance on subjective human judgment.

Despite the promising results, this study is not without limitations. The CNN training dataset was obtained from a limited set of roasting experiments using a specific coffee bean type and a single roasting configuration, which may constrain the model’s generalizability when applied to different bean varieties, processing origins, or industrial-scale roasting environments.

Future research should therefore focus on developing a multi-domain and multi-variety dataset that accommodates a broader spectrum of coffee bean characteristics, including diverse cultivars, moisture levels, and post-harvest processing methods, as well as exploring the integration of lightweight CNN architectures or emerging vision-based architectures such as Vision Transformers on embedded deployment to improve inference speed and model portability.

Acknowledgment

This research was funded by the Ministry of Higher Education, Science, and Technology of Indonesia under the Fundamental Research scheme for the 2025 fiscal year (Contract No.: 129/C3/DT.05.00/PL/2025).

  References

[1] Girma, B., Sualeh, A. (2022). A review of coffee processing methods and their influence on aroma. International Journal of Food Engineering and Technology, 6(1): 7-16. https://doi.org/10.11648/j.ijfet.20220601.12

[2] Das, S. (2021). Review post-harvest processing of coffee: An overview. Coffee Science, 16: e161976. https://doi.org/10.25186/.v16i.1976

[3] da Costa, D.S., Albuquerque, T.G., Costa, H.S., Bragotto, A.P.A. (2023). Thermal contaminants in coffee induced by roasting: A review. International Journal of Environmental Research and Public Health, 20(8): 5586. https://doi.org/10.3390/ijerph20085586

[4] Gamboa-Gómez, C.I., Barragán-Zúñiga, L.J., Guerrero-Romero, F., Martínez-Aguilar, G., et al. (2023). Effects of coffee with different roasting degrees on obesity and related metabolic disorders. Journal of Functional Foods, 111: 105889. https://doi.org/10.1016/j.jff.2023.105889

[5] Abubakar, Y., Sabariana, S., Rasdiansyah, R., Hasni, D. (2021). Sensory characteristic of espresso coffee prepared from Gayo arabica coffee roasted at various times and temperatures. IOP Conference Series: Earth and Environmental Science, 667(1): 012048. https://doi.org/10.1088/1755-1315/667/1/012048

[6] Bastian, F., Hutabarat, O.S., Dirpan, A., Nainu, F., Harapan, H., Emran, T.B., Simal-Gandara, J. (2021). From plantation to cup: Changes in bioactive compounds during coffee processing. Foods, 10(11): 2827. https://doi.org/10.3390/foods10112827

[7] Majeed, F., Raza, A., Munir, A., Hensel, O. (2022). Development and experiments on a batch-type solar roaster—An innovative decentralized system for coffee roasting. Sustainability, 14(4): 2217. https://doi.org/10.3390/su14042217

[8] Chinachan, W., Baur, R.T., Wongchampa, P., Kirasamuthranon, L., Kirasamutranon, K. (2024). Microcontroller-driven temperature control for superior coffee roasting. International Exchange and Innovation Conference on Engineering and Sciences, 10: 812-818. https://doi.org/10.5109/7323354

[9] Santoso, I., Yuanita, E.A., Karomah, R.S. (2024). Application of digital image processing method for roasted coffee bean quality identification: A systematic literature review. African Journal of Food, Agriculture, Nutrition and Development, 24(1): 25264-25287. https://doi.org/10.18697/ajfand.126.23410

[10] Alamsyah, A., Widiyanesti, S., Wulansari, P., Nurhazizah, E., et al. (2023). Blockchain traceability model in the coffee industry. Journal of Open Innovation: Technology, Market, and Complexity, 9(1): 100008. https://doi.org/10.1016/j.joitmc.2023.100008

[11] Nurdin, N., Cebro, I.S., Azhar, A., Hendrawati, H. (2022). Design of natural convection solar dryer for coffee beans with monitoring system based on Internet of Things. Jurnal Polimesin, 2(1): 49-54. https://doi.org/10.30811/jpl.v20i1.2613

[12] Melliyanti, S.N., Afandi, F.A., Giriwono, P.E., Herawati, D. (2023). A meta analysis: The effects of types, roasting degrees and origins on antioxidant properties of coffee. International Journal of Food Science and Technology, 58(6): 2857-2865. https://doi.org/10.1111/ijfs.16431

[13] Tamayo-Monsalve, M.A., Mercado-Ruiz, E., Villa-Pulgarin, J.P., Bravo-Ortiz, M.A., Arteaga-Arteaga, H.B., Mora-Rubio, A. (2022). Coffee maturity classification using convolutional neural networks and transfer learning. IEEE Access, 10: 42971-42982. https://doi.org/10.1109/ACCESS.2022.3166515

[14] Okamura, M., Soga, M., Yamada, Y., Kobata, K., Kaneda, D. (2021). Development and evaluation of roasting degree prediction model of coffee beans by machine learning. Procedia Computer Science, 192: 4602-4608. https://doi.org/10.1016/j.procs.2021.09.238

[15] Klaidaeng, C., Chudjuarjeen, S., Pomsen, C., Charoenwiangnuea, P. (2023). Prediction of roasted coffee bean level from a coffee house-ware using fuzzy logic. In Materials Today: Proceedings. https://doi.org/10.1016/j.matpr.2023.04.524

[16] Saragih, E.P., Pratama, B., Fitri, W.K. (2021). Performance analysis of fuzzy logic controller applied on portable roaster. IOP Conference Series: Earth and Environmental Science, 757(1): 012022. https://doi.org/10.1088/1755-1315/757/1/012022

[17] Šeremet, D., Fabečić, P., Vojvodić Cebin, A., Mandura Jarić, A., Pudić, R., Komes, D. (2022). Antioxidant and sensory assessment of innovative coffee blends of reduced caffeine content. Molecules, 27(2): 448. https://doi.org/10.3390/molecules27020448

[18] Suryana, D.H., Raharja, W.K. (2023). Applying artificial intelligence to classify the maturity level of coffee beans during roasting. International Journal of Engineering, Science and Information Technology, 3(2): 97-105. https://doi.org/10.52088/ijesty.v3i2.461

[19] Wang, X., Wang, Y., Hu, G., Hong, D., Guo, T., Li, J., Li, Z., Qiu, M. (2022). Review on factors affecting coffee volatiles: From seed to cup. Journal of the Science of Food and Agriculture, 102(4): 1341-1352. https://doi.org/10.1002/jsfa.11647

[20] Rusinek, R., Dobrzański Jr, B., Oniszczuk, A., Gawrysiak-Witulska, M. (2022). How to identify roast defects in coffee beans based on the volatile compound profile. Molecules, 27(23): 8530. https://doi.org/10.3390/molecules27238530

[21] Silva, L.D.O., Rosado, C.P., Ferreira, F.D.S., Melengati, J., Terra, S., Teodoro, A.J. (2024). The effect of brewing method and different roasting degree on physicochemical characteristics, total phenolic content and antioxidant activity of Amazonian robusta coffee (Coffea Canephora). Revista de Gestao Social e Ambiental, 18(9): e06197. https://doi.org/10.24857/rgsa.v18n9-139

[22] Cwiková, O., Komprda, T., Šottníková, V., Svoboda, Z., Simonová, J., Slováček, J., Jůzl, M. (2022). Effects of different processing methods of coffee arabica on colour, acrylamide, caffeine, chlorogenic acid, and polyphenol content. Foods, 11(20): 3295. https://doi.org/10.3390/foods11203295

[23] Aprilia, S.A., Wonorahardjo, S., Utomo, Y. (2023). Analysis of flavor in roasted coffee using temperature programmable injection (TPI) at GC/MS method. EKSAKTA: Journal of Sciences and Data Analysis, 4(1): 46-53. https://doi.org/10.20885/eksakta.vol4.iss1.art6

[24] Wang, B., Verhoeven, M., Fogliano, V., Oliviero, T. (2025). Generation of Maillard reaction-derived flavour compounds in coffee analogues by an extrusion-based solid model system. Food Chemistry, 492(Part 3): 145552. https://doi.org/10.1016/j.foodchem.2025.145552

[25] Carcea, M., Danesi, I., De Gara, L., Diretto, G., et al. (2023). Chemical composition and sensory profile of the Italian espresso coffee powder and beverage under different roasting conditions. European Food Research and Technology, 249(5): 1287-1301. https://doi.org/10.1007/s00217-023-04213-0

[26] Grzelczyk, J., Budryn, G., Kołodziejczyk, K., Ziętala, J. (2024). The influence of maceration and flavoring on the composition and health-promoting properties of roasted coffee. Nutrients, 16(17): 2823. https://doi.org/10.3390/nu16172823

[27] Santoso, I., Mustaniroh, S.A., Choirun, A. (2021). Methods for quality coffee roasting degree evaluation: A literature review on risk perspective. IOP Conference Series: Earth and Environmental Science, 924(1): 012058. https://doi.org/10.1088/1755-1315/924/1/012058

[28] Tarigan, E.B., Wardiana, E., Hilmi, Y.S., Komarudin, N.A. (2022). The changes in chemical properties of coffee during roasting: A review. IOP Conference Series: Earth and Environmental Science, 974(1): 012115. https://doi.org/10.1088/1755-1315/974/1/012115

[29] Vezzulli, F., Bertuzzi, T., Rastelli, S., Mulazzi, A., Lambri, M. (2021). Sensory profile of Italian espresso brewed arabica specialty coffee under three roasting profiles with chemical and safety insight on roasted beans. International Journal of Food Science and Technology, 56(12): 6765-6776. https://doi.org/10.1111/ijfs.15380

[30] Anastácio, L.M., Da Silva, M.D.C.S., Debona, D.G., Veloso, T.G.R., et al. (2023). Relationship between physical changes in the coffee bean due to roasting profiles and the sensory attributes of the coffee beverage. European Food Research and Technology, 249(2): 327-339. https://doi.org/10.1007/s00217-022-04118-4

[31] Al-Shemmeri, M., Fryer, P., Farr, R., Lopez-Quiroga, E. (2024). Development of coffee bean porosity and thermophysical properties during roasting. Journal of Food Engineering, 378: 112096. https://doi.org/10.1016/j.jfoodeng.2024.112096

[32] Yusibani, E., Yufita, E., Jalil, Z., Suhendi, E. (2023). The effect of temperature and roasting time on the physical properties of Arabica and Robusta Gayo coffee bean. Journal of Applied Agricultural Science and Technology, 7(2): 100-108. https://doi.org/10.55043/jaast.v7i2.75

[33] Ayu, P.C., Machrizailani, M.R., Rohanah, A., Sinamo, K.N., Sebayang, N.U.W. (2024). Design of coffee roaster with controlled temperature system to maintain the sustainability of coffee roasting process. IOP Conference Series: Earth and Environmental Science, 1302(1): 012116. https://doi.org/10.1088/1755-1315/1302/1/012116

[34] Botha, C.M., van der Merwe, A.F., Uren, K.R. (2024). A model-based control strategy for batch coffee roasting processes using a novel controlled variable. Results in Engineering, 23: 102575. https://doi.org/10.1016/j.rineng.2024.102575

[35] Miskon, M.T., Rahiman, M.H.F., Taib, M.N. (2021). Temperature regulation using self-tuned fuzzy PID controller for a laboratory-scale fluidized bed coffee roaster. In IEEE 9th Conference on Systems, Process and Control (ICSPC 2021), Malacca, Malaysia, pp. 157-161. https://doi.org/10.1109/ICSPC53359.2021.9689115

[36] Kim, Y., Lee, J., Kim, S. (2024). Study of active food processing technology using computer vision and AI in coffee roasting. Food Science and Biotechnology, 33(11): 2543-2550. https://doi.org/10.1007/s10068-023-01507-7

[37] Astuti, S.D., Wicaksono, I.R., Soelistiono, S., Permatasari, P.A.D. (2024). Electronic nose coupled with artificial neural network for classifying of coffee roasting profile. Sensing and Bio-Sensing Research, 43: 100632. https://doi.org/10.1016/j.sbsr.2024.100632.

[38] Rachmad, A., Fuad, M., Rochman, E.M.S. (2023). Convolutional neural network-based classification model of corn leaf disease. Mathematical Modelling of Engineering Problems, 10(2): 530-536. https://doi.org/10.18280/mmep.100220

[39] Taye, M.M. (2023). Theoretical understanding of convolutional neural network: Concepts, architecture, application, future directions. Computation, 11(3): 52. https://doi.org/10.3390/computation11030052

[40] Badr, B.E.A., Altawil, I., Almomani, M., Al-Saadi, M., Alkhurainej, M. (2023). Fault diagnosis of three-phase induction motors using convolutional neural networks. Mathematical Modelling of Engineering Problems, 10(5): 1727-1736. https://doi.org/10.18280/mmep.100523