Research Article

Smart cooking optimization: Machine learning modeling of soaking and cooking dynamics in rice and legumes

Jinendrika Anushi Weliwita1,*https://orcid.org/0000-0003-2359-8095, Sanjeeva Witharana2https://orcid.org/0000-0001-9230-1537, Saleimah Alyammahi1https://orcid.org/0000-0003-2208-1799
Author Information & Copyright
1Department of Engineering Technology and Science, Higher Colleges of Technology, Fujairah 4114, United Arab Emirates
2Department of Mechanical Engineering, University of Moratuwa, Moratuwa 10400, Sri Lanka
*Corresponding author Jinendrika Anushi Weliwita, Tel: +971-2-206-9481, E-mail: jweliwita@hct.ac.ae

Citation: Weliwita JA, Witharana S, Alyammahi S. Smart cooking optimization: Machine learning modeling of soaking and cooking dynamics in rice and legumes. Food Sci. Preserv., 33(4), 586-598 (2026)

Copyright © The Korean Society of Food Preservation. This is an Open Access article distributed under the terms of the Creative Commons Attribution Non-Commercial License (http://creativecommons.org/licenses/by-nc/4.0) which permits unrestricted non-commercial use, distribution, and reproduction in any medium, provided the original work is properly cited.

Received: Nov 04, 2025; Revised: Jan 02, 2026; Accepted: Jan 30, 2026

Published Online: Aug 31, 2026

Abstract

Efficient hydration and cooking of grains and legumes are essential for reducing energy consumption and improving the quality of cooked products. This study presents an experimental and machine learning framework to model and optimize the hydration cooking relationship in long grain and short grain rice, chickpeas, and mung beans. All experiments were conducted in triplicate (n = 3), and results are reported as mean ± standard deviation. Soaking experiments were performed at 25-55°C for up to 8 h, and moisture uptake was quantified using gravimetric analysis. The Peleg model successfully described hydration kinetics across all grain types and soaking temperatures, yielding coefficients of determination (R2) ranging from 0.96 to 0.99. Cooking trials quantified cooking time and energy consumption, while external datasets were incorporated to improve model generalization. A multilayer feedforward neural network was implemented and trained to predict cooking time and energy requirements from soaking temperature, duration, and moisture fraction. The model achieved strong predictive performance on external validation datasets (R2 = 0.94, MAE = 1.8 min), while internal test results yielded R2 values of 0.98 for cooking time and 0.97 for energy consumption. Cooking time was reduced by up to 40 ± 3%, and energy consumption decreased by approximately 18-22%, depending on grain type. Statistical analysis confirmed that the effects of soaking temperature on hydration, cooking time, and energy consumption were significant (p < 0.05). Optimized hydration also promoted uniform moisture distribution and minimized grain fracturing and splitting. The integration of experimental kinetics and machine learning prediction provides a robust foundation for intelligent cooking process design and demonstrates a pathway toward AI enabled smart cookers with adaptive temperature and energy control.

Keywords: hydration kinetics; grain and legume hydration; machine learning prediction; soaking; smart cooking; soaking optimization

1. Introduction

Rice is cultivated in over 100 countries and is the primary staple for more than half of the world’s population, and legumes such as beans and peas are rich in protein and minerals and serve as critical nutritional sources in developing regions (Fukagawa and Ziska, 2019; Munthali et al., 2022). Legumes are inexpensive protein sources and very crucial in developing countries. Despite their nutritional and economic importance, prolonged cooking times and high energy demands remain major barriers to more frequent consumption, particularly in low and middle income households where fuel costs can represent a significant portion of disposable income (Munthali et al., 2022). Improving the cooking process through pretreatments can significantly improve convenience and thus increase legume consumption (Ogundele et al., 2022). On the other hand, rice dominates diets and industry in many countries. Soaking and cooking of grains are required to transform dry seeds into edible form and hence, understanding the hydration and cooking dynamics of these is crucial to optimize process planning, reduce energy use, and safeguard quality Although white rice generally cooks more rapidly than most legumes, parboiled and brown rice varieties still require considerable thermal energy due to structural barriers that limit water diffusion. When soaking, water diffuses into the grain and disperses into starch granules and protein matrices, which facilitates gelatinization of starch and denaturation of proteins upon heating. These phenomena change the seed structure and allow kinetic models to capture the moisture uptake behavior (Bender et al., 2024; Fabbri and Crosby, 2016). In recent years, both classical and experimental approaches have been applied to attain the complex kinetics of water uptake and cooking.

Pre soaking legumes and rice kernels has widely practiced to accelerate cooking Soaking bean varieties for 12 h shortened cooking times by about 20 to 38% (Munthali et al., 2022). Soaking prior to cooking facilitates starch gelatinization and protein denaturation, thereby reducing both cooking time and energy consumption (Yanni et al., 2023). Furthermore, soaking can greatly reduce energy requirements during cooking. However, the soaking medium greatly affects the structure of the grain. This observation is consistent with studies showing that water absorbed during soaking accelerates starch gelatinization and protein softening during cooking and hence speeding up the overall process (Fabbri and Crosby, 2016). The softening of the texture during soaking speeds up cooking and leads to reduction in cooking time. Controlling the soaking of pulses is crucial as it affects subsequent processing steps and the final product quality (Bender et al., 2024). Hence, soaking is a remedy that can considerably reduce rice and legume cooking time and energy costs, so predictive models of soaking and cooking kinetics are also valuable for industry.

It has been depicted that soaking rice kernels for 15 to 60 min reduces cooking time from approximately 20 to 10 min and enhances kernel size (Hirannaiah et al., 2001). Soaking temperature and duration strongly influence hydration rate, hardness, and yield, with optimal conditions around 75°C for basmati and 80°C for non basmati rice (Sharma et al., 2024). These optimal soaking temperatures reported in the literature correspond to controlled hot soaking conditions, whereas the present study restricts soaking experiments to a moderate temperature range of 25-55°C. Moreover the bran and husk act as diffusion barriers (Li and Chen, 2024). In particular the outer husk has been identified as a primary barrier to water intake and significantly slowing moisture diffusion into the grain (Thakur and Gupta, 2006).

Rice shows a strong inverse correlation between initial grain moisture and total boiling duration, confirming that hydration significantly decreases energy consumption (Herath et al., 2016). Modeling of the whole cooking process of local rice types has incorporated heat and mass transfer dynamics and further studies have investigated moisture transport behavior during rice cooking, supporting systematic insight into diffusion controlled water migration and gelatinization (Jayamini et al., 2021).

A wide range of kinetic models have been utilized in past studies to describe water absorption behavior during soaking. Among these, Peleg (1988) proposed a two parameter empirical equation that has become one of the most extensively applied models for sorption kinetics (Peleg, 1988). Application of Peleg’s model to split chickpea soaking experiments reached good agreement with experimental data with R2 ≈ 0.98, confirming faster initial uptake at higher temperatures (Johnny et al., 2015). In contrast, a spherical diffusion model developed for chickpea hydration demonstrated that the effective moisture diffusivity increased with temperature and confirmed the temperature dependent acceleration of water migration during soaking (Bidkhori and Mohammadpour, 2021). Similar research carried out with mung beans observed that the effective moisture diffusivity increased with time and temperature (Sharanagat et al., 2016). Temperature dependent diffusivities usually obey Arrhenius type behavior (Kumar et al., 2020). Although several researchers evaluated alternative models (Bidkhori and Mohammadpour, 2021; Kumar et al., 2020; Sharma et al., 2024), Peleg’s model provided the best fit at lower temperatures and hence remains the reference standard in food hydration research.

However, traditional established models lack the ability to capture nonlinear effects influenced by variations in grain geometry and composition. As an advancement, neural networks are excellent tools to model complex, dynamic, and nonlinear food process systems (Aghbashlo et al., 2015). Feed forward backpropagation networks have been used to predict chickpea hydration ratios from soaking time and temperature (Kumar et al., 2020). Artificial neural networks coupled with response surface methodology have been trained to predict infrared heated cowpea properties such as water absorption and pectin solubility (Ogundele et al., 2022). In rice parboiling, a neural network has been developed to predict moisture ratio, yield, and whiteness, achieving R2 = 0.97. These examples illustrate that AI based models efficiently estimate the nonlinear mapping between process parameters and outcomes and hence can considerably advance predictive accuracy for rice and legume hydration and cooking. However, although extensive research has been carried out in both hydration kinetics and cooking performance, few studies integrate the soaking and cooking phases into a combined predictive framework. Moreover, thorough comparisons between empirical and AI based models for predicting the entire soaking-cooking continuum are still scarce. Nonthermal technologies such as ultrasound, high pressure, and plasma have shown potential to accelerate hydration (Alsalman and Ramaswamy, 2020; Bender et al., 2024) yet they are still to be incorporated into predictive frameworks.

This study addresses these gaps by combining classical Peleg type empirical modeling with artificial neural network based prediction to describe and forecast water uptake, cooking time, and energy consumption across both rice and legume species. We integrate experimental kinetics with AI predictions to offer a pathway toward data driven, energy efficient cooking design. This study aims to (i) model hydration kinetics of selected rice and legume varieties using the Peleg model, and (ii) develop an artificial neural network to predict cooking time and energy consumption from soaking conditions, providing a data driven basis for energy efficient smart cooking systems.

2. Materials and methods

Four staple food materials were used in this study: long grain rice (Basmati, raw), short grain rice (Japonica, raw), chickpeas, and mung beans. The parboiled rice used in this study represents a commercially available medium grain product; varietal differences among parboiled rice types were not explicitly resolved. All experiments were conducted in triplicate (n = 3), and results are reported as mean ± standard deviation (SD). A schematic overview of the methodological workflow is provided in Table 1.

Table 1. Schematic overview of the experimental and modeling workflow used in this study
Step no. Process description
1 Experiment setup and sample preparation
2 Soaking experiment and hydration kinetics
3 Cooking trials
4 Data preprocessing
5 ANN modeling and external validation
6 Uncertainty and cross validation analysis
7 Embedded implementation
Download Excel Table
2.1. Experiment set up and data collection

All samples were purchased from local commercial retailers in the UAE and manually cleaned to remove foreign matter. Prior to experimentation, samples were equilibrated to a uniform initial moisture fraction of 0.12 by storage in airtight containers at 25°C for 24 h.

All moisture calculations were performed on a dry weight basis, using the dry mass Wd as the reference. Samples were maintained in airtight containers at controlled room temperature (25°C) to minimize moisture variation due to ambient humidity. All experimental measurements, including moisture fraction, cooking time, and energy consumption, were performed in triplicate (n = 3) and are reported as mean ± SD.

Each experimental condition (grain type, soaking temperature, and soaking duration) was evaluated using three independent replicates.

2.2. Soaking/hydration experiments

A mass of 20.0 ± 0.1 g of each sample (mean ± SD, n = 3) was placed in 250 mL glass beakers containing 200 mL of distilled water (1:10 w/v). Beakers were immersed in a thermostatically controlled water bath (Memmert WNB14, Germany) set at 25, 35, 45, or 55 ± 0.2°C. Samples were withdrawn at 0, 3, 5, 10, 30, 60, 120, 240, and 480 min, blotted gently with filter paper to remove surface water, and weighed on an analytical balance.

Moisture fraction Mt at any given time t, with Wt, W0 as the sample weight at t and 0 was calculated as

M t = W t W 0 W d W 0 .

Initial moisture is set as 0.12 (corresponding to 12% moisture content on a wet basis), and equilibrium moisture was approached for long t. All measurements were conducted in triplicate and calculated the averages for further analysis. The hydration data were tabulated as time (min), moisture ratio, temperature (°C), and grain type for further modeling.

2.3. Peleg modeling of hydration kinetics

The Peleg (1988) model is employed to determine the hydration kinetics for each sample and the Peleg’s constants were determined for each sample and temperature using nonlinear regression with Levenberg Marquardt algorithm.

Subsequently, for the cooking experiments, the soaked samples were gently dried at room temperature to remove surface adhered water and to ensure consistent handling conditions prior to cooking. The samples were then placed in water at ratios of 1:3 for rice and 1:4 for legumes. Cooking was considered complete based on a compressibility criterion consistent with AACCI Method 66 50.01, where at least 90% of the grains were compressible between two glass plates without exhibiting a hard core. The corresponding cooking time was recorded at this endpoint, and energy consumption was calculated accordingly. Each experiment was conducted in triplicate to validate experiments. Peleg model parameters (k1 and k2) were estimated using nonlinear regression based on averaged experimental data from triplicate measurements. Therefore, variability is reflected in the experimental data rather than in the fitted parameters.

The soaking temperature, soaking time, initial and final moisture fractions, cooking time, and energy consumption were entered in a dataset for four grain type and each for four different soaking temperatures in different intervals. Data were preprocessed using Pandas and NumPy libraries in Python version 3.11. The dataset was split into 70% training, 15% validation and 15% independent test sets. Training data set was stratified to preserve a balance between rice and legume samples and temperature and soaking duration. Energy consumption during cooking was calculated by multiplying the rated electrical power of the cooker by the measured cooking time, assuming constant power operation, and expressed in kilojoules (kJ).

2.4. Modeling soaking cooking behavior using ANN

A supervised artificial neural network (ANN) was developed to predict cooking time and energy consumption from soaking parameters. The model inputs included food type, variety, soaking temperature, soaking time, initial moisture fraction, and final moisture fraction. The network architecture consisted of fully connected layers with ReLU activations and dropout regularization, and training was performed using the Adam optimizer. All input data were scaled, and early stopping with learning rate scheduling was applied to ensure stable convergence. SHAP analysis indicated that the final moisture fraction was the most influential variable, contributing approximately 45% to cooking time predictions, followed by soaking temperature (35%) and soaking time (20%). Model performance was evaluated using the coefficient of determination and root mean square error. On the independent test set, the trained ANN achieved R2 values of 0.98 for cooking time and 0.97 for energy consumption, indicating strong agreement between predicted and measured values.

External validation was performed using independent datasets from previous legume soaking studies (Bello et al., 2004; Bidkhori et al., 2021; Costa et al., 2018; Johnny et al., 2015; Kaur et al., 2022; Miano et al., 2018; Sharma et al., 2024), covering soaking durations from 0 to 600 min and temperatures between 20 and 60°C. Under these conditions, the ANN maintained strong predictive performance, achieving R2 values of 0.94 for cooking time and 0.91 for energy consumption. To further assess model robustness, fivefold cross validation was conducted, with each fold using 80% of the data for training and 20% for testing, and randomized data splits to minimize sampling bias. A refined ANN architecture was implemented, comprising two hidden layers with 64 neurons each, along with batch normalization, L2 regularization, and dropout to prevent overfitting. All folds were trained using identical scaling parameters to maintain consistency across training and evaluation stages.

Uncertainty analysis was conducted using Monte Carlo resampling with 1000 iterations, in which input features were perturbed within ± 2% of their measured values. Each perturbed input set was evaluated using the trained ANN to generate distributions of predicted cooking time and energy consumption for each sample. All statistical analyses were performed using Python, employing NumPy, scikit learn, SciPy, Matplotlib, and Seaborn libraries.

The trained ANN was converted into a lightweight TensorFlow Lite format to evaluate its suitability for real time execution on low cost microcontrollers. A conceptual smart cooker control architecture was then developed, in which simulated real time sensor inputs including water temperature, grain temperature, steam humidity, and grain weight were normalized using the same scaling parameters applied during training. These processed inputs were supplied to the embedded ANN to estimate the remaining cooking time and energy demand directly on device, without reliance on cloud computation. The predicted outputs were fed into a feedback controller that dynamically adjusted heater power through pulse width modulation (PWM), enabling a transition from conventional fixed power boiling to an adaptive, energy efficient heating strategy suitable for future smart cooking appliances.

2.5. Statistical analysis

All experiments were conducted in triplicate (n = 3), and results are presented as mean ± SD. Statistical analysis was performed to evaluate the effects of soaking temperature, soaking time, and grain type on hydration, cooking time, and energy consumption. One way and two way analysis of variance (ANOVA) were used where appropriate, followed by Tukey’s post hoc test for multiple comparisons. A significance probability of p < 0.05 was considered statistically significant. All statistical analyses were performed using Python programming.

3. Results and discussion

3.1. Hydration kinetics during soaking

The moisture uptake during soaking exhibited an asymptotic, hyperbolic trend characteristic of diffusion controlled hydration processes. All reported experimental values represent the mean of three independent replicates, and variability is expressed as standard deviation. As shown in Fig. 1, the Peleg model can fit the moisture uptake profile for all types for the soaking temperatures ranging from 25°C to 55°C. With increasing soak temperature, water absorption increased significantly. This is reflected in reduced rate constant at higher temperatures, which implicates faster initial diffusion. For example, Japonica rice soaked at 55°C reached a moisture fraction of 0.58 in 480 min when compared to 25°C, that gives 0.48. These trends verify that thermal energy supports disturbing grain surface walls and facilitates water intake. Moreover, moisture diffusion coefficients ranged between 1.8 × 10−9 and 3.2 × 10−9 m2/s, and it is in agreement with literature on hydrated cereal systems (Alsalman et al., 2020; Bello et al., 2004). The fitted Peleg constants (k1, k2) for all grain types and soaking temperatures are summarized in Table 2. The Peleg model parameters demonstrate clear temperature dependence across all grain types. Increasing soaking temperature generally reduced k1 values, indicating faster initial hydration rates, while k2 values remained within a narrow range, reflecting similar equilibrium moisture behavior. The fitted equilibrium moisture fractions were consistent with experimentally observed saturation levels, confirming the suitability of the Peleg model for describing hydration kinetics of both rice and legumes.

kjfp-33-4-586-g1
Fig. 1. Experimental hydration kinetics and Peleg model fitting for Basmati rice (A), Japonica rice (B), parboiled rice (C), chickpea (D), whole mung bean (E), split mung bean (F) at soaking temperatures of 25, 35, 45, and 55°C. Symbols represent the experimental moisture fractions, while solid lines represent the corresponding Peleg model predictions. All values are mean ± SD (n = 3). Error bars are smaller than the symbols where not visible. The solid curves represent the fitted Peleg model obtained by nonlinear least squares regression. Moisture fraction was calculated on a dry weight basis.
Download Original Figure
Table 2. Estimated Peleg model parameters (k1 and k2) and moisture characteristics of six grain and legume varieties at different soaking temperatures
Grain / variety Temperature (°C) k11) k2 Initial moisture fraction (M0)2) Equilibrium moisture fraction (M)
Basmati rice 25 189.24 1.726 0.097 0.583 ± 0.0043)ab4)
35 212.19 1.618 0.102 0.576 ± 0.005a
45 213.27 1.508 0.097 0.598 ± 0.003b
55 240.68 1.553 0.117 0.593 ± 0.004b
Japonica rice 25 213.71 1.673 0.106 0.577 ± 0.005a
35 192.71 1.622 0.104 0.620 ± 0.006c
45 261.56 1.564 0.116 0.605 ± 0.004b
55 212.90 1.760 0.111 0.637 ± 0.005c
Parboiled rice (medium grain) 25 204.81 1.671 0.119 0.613 ± 0.005a
35 203.17 1.615 0.112 0.594 ± 0.004b
45 147.18 1.955 0.102 0.568 ± 0.005c
55 301.22 1.473 0.131 0.592 ± 0.004b
Chickpea 25 165.88 1.812 0.076 0.524 ± 0.004a
35 153.53 1.833 0.061 0.538 ± 0.005a
45 274.82 1.604 0.116 0.583 ± 0.004b
55 227.02 1.789 0.092 0.534 ± 0.004a
Mung bean (split) 25 160.61 1.606 0.098 0.626 ± 0.004a
35 326.80 1.451 0.146 0.598 ± 0.004b
45 239.81 1.679 0.119 0.581 ± 0.005c
55 175.31 1.729 0.099 0.584 ± 0.004c
Mung bean (whole) 25 241.97 1.792 0.126 0.565 ± 0.004a
35 220.90 1.619 0.116 0.587 ± 0.005b
45 188.24 1.805 0.117 0.559 ± 0.004a
55 205.50 1.644 0.112 0.590 ± 0.005b

1) The parameters k1 and k2 were obtained by fitting the Peleg model to the experimental soaking data for each grain/variety and soaking temperature.

2) M0 denotes the initial moisture fraction before soaking, and M denotes the equilibrium moisture fraction at the end of soaking.

3) Values are mean ± SD (n = 3).

4) Within each grain/variety, values in the same column followed by different superscript letters (a-c) are significantly different among soaking temperatures (p < 0.05).

Download Excel Table

Peleg parameters were obtained by nonlinear regression using averaged triplicate measurements. Therefore, variability is represented in the experimental hydration data used for fitting rather than in the fitted parameter estimates.

Soaking grains has a noticeable impact on cooking time and energy demand. As hydration increased, cooking is faster and hence more energy efficient. Fig. 2A depicts the relationship of final moisture fraction and cooking time for different varieties, where higher moisture fractions correspond to significantly reduced cooking times. Energy consumption trends in Fig. 2B also depict that cooking energy decreased consistently with increasing soaking temperature. A logarithmic scale was used to clearly distinguish energy consumption trends among grain types with differing absolute energy demands. The average decrease in cooking time, calculated from experimental measurements across all rice varieties, was 40% when the soaking temperature increased from 45 to 55°C, while a corresponding reduction of 33% was observed for chickpeas.

kjfp-33-4-586-g2
Fig. 2. Relationship between hydration and cooking performance of rice and legumes. (A), Relationship between final moisture fraction and cooking time for Basmati rice, Japonica rice, parboiled rice, chickpea, whole mung bean, and split mung bean; (B), Mean cooking energy consumption of the corresponding grains and legumes after soaking at different temperatures. All values are mean ± SD (n = 3). Error bars represent the standard deviation. Different lowercase letters at 55°C indicate statistically significant differences in cooking energy among grain and legume types (one way ANOVA followed by Tukey’s HSD test, p < 0.05). Moisture fraction was calculated on a dry weight basis.
Download Original Figure

Regression analysis showed a strong negative correlation between soaking temperature and cooking time and hence the findings represent the role of soaking in softening structural barriers and enabling more efficient heat transfer and starch gelatinization during cooking (Shafaei, 2014). ANOVA showed that soaking temperature significantly affected moisture uptake, cooking time, and energy consumption (p < 0.05). Different soaking temperatures produced statistically significant differences based on Tukey’s post hoc test.

3.2. AI based prediction of cooking performance

Supervised ANN predicted cooking time and energy from soaking parameters with high accuracy using dense layers, dropout, and early stopped Adam optimization. The mean absolute error for both training and validation sets showed a sharp decline during the initial 20 epochs, indicating instant convergence. The validation MAE stabilized after approximately 60 epochs, reaching values below 0.03 in normalized units, indicating effective generalization without overfitting.

Fig. 3 shows the predicted versus actual cooking times and actual energy values across the combined validation samples of rice and legumes. The predictions track measured values accurately and that confirms reliable modeling of both cooking duration and energy demand and further closely follow the ideal diagonal, indicating excellent agreement and minimal bias.

kjfp-33-4-586-g3
Fig. 3. Performance of the artificial neural network (ANN) model for predicting cooking characteristics. (A), Predicted versus actual cooking time; (B), Predicted versus actual cooking energy consumption for the validation dataset. The dashed red line represents the line of perfect agreement between predicted and actual values. The validation dataset consisted of independent samples not used during model training. ANN, artificial neural network; MAE, mean absolute error; RMSE, root mean square error; R2, coefficient of determination; kJ, kilojoule.
Download Original Figure

The ANN model predicted a consistent decrease in cooking time with increasing soaking duration and soaking temperature for both Basmati rice and chickpeas. These trends are following the improved moisture uptake observed during the hydration process, that facilitates heat transfer and accelerates the softening of the food matrix during cooking. The results further show that the developed ANN model successfully captures the coupled effects of hydration kinetics and thermal processing, providing reliable predictions across a range of soaking conditions.

SHAP analysis shows that final moisture fraction is the most significant input with 45% followed by soaking temperature 35% and time 20%. Interaction effects from grain type and variety were present but secondary. These results confirm that the model fits data accurately and hence support its reliability for intelligent control in cooking applications. Fig. 4 illustrates the mean SHAP values for each input feature in predicting cooking time and energy demand. Food type exhibits the highest global importance across the dataset, reflecting inherent structural differences between grain categories rather than the influence of controllable soaking parameters. Moisture parameters followed next, consistent with their thermodynamic significance in heat and mass transfer. Soaking temperature had relatively low influence, likely due to its indirect impact being captured via moisture evolution.

kjfp-33-4-586-g4
Fig. 4. Global SHAP feature importance for the artificial neural network model. (A), Mean absolute SHAP values for predicting cooking time; (B), Mean absolute SHAP values for predicting cooking energy consumption. SHAP, SHapley Additive exPlanations; Higher mean absolute SHAP values indicate a greater contribution of the corresponding input variable to the model predictions. FoodCode and VarietyCode denote the encoded food type and variety, respectively; SoakTime_min, soaking time (min); SoakTemp_C, soaking temperature (°C); MoistureFrac_Init, initial moisture fraction; MoistureFrac_Final, final moisture fraction.
Download Original Figure

The trained model is tested on an independent dataset compiled from published experimental studies, with temperature vary in the range from 20 to 60°C and soak duration from 0 to 600 min. Fig. 5A shows a positive coupling between predicted and observed variables, where ANN achieved an R2 value of 0.944 and deviations remaining within approximately ± 5% of experimental measurements across the range tested. This shows that the model generalizes the thermal response of hydrated grains, when applied to literature data. Predictions of cooking energy exhibited medium variability and that is expected owing to other uncontrolled factors that affects heat consumption in different experimental setups.

kjfp-33-4-586-g5
Fig. 5. ANN model validation (A) and correlation analysis (B) for cooking time prediction. Pearson correlation coefficients are shown in the heatmap, with darker colors indicating stronger positive correlations.
Download Original Figure

Fig. 5B shows the correlation heatmap for soaking conditions with cooking performance and how ANN predictions align with experimental results. Soaking temperature and soaking duration exhibit negative correlations with cooking time and cooking energy, and this confirms that improved hydration reduces thermal resistance and speeds cooking. Final moisture fraction demonstrates a moderate positive correlation with cooking metrics due to increased thermal load when more water is absorbed. Table 3 below shows the cross validation analysis results, that demonstrates the network attained stable and accurate predictions across all folds, indicating consistent learning behavior without overfitting. For cooking time, the ANN achieved high predictive accuracy where mean MAE of 2.24 min and a mean R2 of 0.973. Five fold cross validation confirmed the robustness of the ANN model, with low variability in MAE and consistently high R2 values across all folds, demonstrating reliable predictive performance and strong generalization capability.

Table 3. Five fold cross validation performance of the artificial neural network (ANN) model for predicting cooking time and cooking energy
Fold MAE (min)1) R2 MAE (kJ) R2
1 1.78 0.961 161.36 0.932
2 1.85 0.967 162.49 0.951
3 2.29 0.970 165.78 0.955
4 2.42 0.982 192.33 0.956
5 2.88 0.983 223.75 0.960
Mean ± SD2) 2.24 ± 0.45 0.973 ± 0.010 181.14 ± 27.00 0.951 ± 0.011

1) MAE, mean absolute error; SD, standard deviation; R2, coefficient of determination.

2) Results are presented for each validation fold together with the overall mean ± SD obtained from five fold cross validation.

Download Excel Table

Monte Carlo uncertainty analysis confirmed the stability of the ANN model under input uncertainty. The prediction distributions remained well constrained, indicating robust model behavior and reliable performance for real time smart cooking applications. Qualitative observations obtained using a PentaView™ Celestron digital compound light microscope revealed progressive structural changes within the rice grain during soaking. The unsoaked grain surface appeared rough and opaque, while the cross section exhibited a dense endosperm structure with limited translucency. After soaking at 45°C for 20 min, the grain surface appeared smoother and more hydrated, and the cross section showed increased translucency and a more uniform internal appearance. These changes indicate the onset of moisture diffusion into the endosperm and are uniform with the hydration trends detected from the kinetic analysis. No major structural fractures or damage were observed during this early stage of hydration.

3.3. Performance of the AI integrated smart cooker

The proposed smart cooker architecture combines sensing, data preprocessing, artificial neural network prediction, control logic, and a user interface to support intelligent cooking management. As illustrated in Fig. 6, measurements obtained from the sensing module are preprocessed and normalized before being supplied to the trained artificial neural network. The model predicts the remaining cooking time and cooking energy demand, and these predictions are transmitted to the control logic, which regulates heater power through pulse width modulation while continuously updating the user interface.

kjfp-33-4-586-g6
Fig. 6. Architecture of the AI integrated smart cooker incorporating sensing, data preprocessing, ANN based prediction, adaptive control, and user interface modules. Sensor measurements are preprocessed and supplied to the ANN model to predict the remaining cooking time and energy demand. The predicted outputs are used by the control logic to adjust the heater through PWM control while providing real time feedback to the user interface. PWM, pulse width modulation; SSR, solid state relay.
Download Original Figure

The performance of the proposed cooking strategy was evaluated by simulation using representative samples of Basmati rice, Kabuli chickpea, and mung bean. The trained artificial neural network generated predictions of cooking time and energy demand that were used to construct adaptive heating schedules. As hydration progressed and thermal resistance decreased, heater power was gradually reduced during the later stages of cooking. As shown in Fig. 7A, the adaptive heating strategy reduced the estimated cooking energy consumption by approximately 18% to 22% compared with conventional constant heating. The largest reductions were observed for chickpea and mung bean because of their longer cooking durations, whereas Basmati rice exhibited smaller energy savings owing to its shorter cooking time. The prediction capability of the model was further assessed by updating the estimated remaining cooking time throughout the cooking process. As shown in Fig. 7B, the predicted remaining cooking time progressively converged on the measured remaining cooking time for all three representative food types, indicating stable prediction performance during cooking. Preliminary linear regression models produced lower prediction accuracy than the ANN, confirming that nonlinear relationships between hydration behaviour and thermal processing are better represented by the proposed model. Overall, the simulation results depict that the proposed framework provides an effective approach for adaptive cooking control and energy efficient thermal processing.

kjfp-33-4-586-g7
Fig. 7. Performance of the AI integrated smart cooker for three representative food types. (A), Comparison of adaptive heating power profiles generated by the ANN controller with conventional constant heating for Basmati rice, Kabuli chickpea, and mung bean; (B), Predicted and actual remaining cooking time during the cooking process for the corresponding food types. The shaded regions in panel (A) represent the estimated energy savings achieved by adaptive heating relative to constant heating. Panel (B) compares the ANN predicted remaining cooking time with the corresponding measured values during cooking.
Download Original Figure

4. Conclusions

This study developed an artificial intelligence embedded framework for optimizing the soaking and cooking of rice and legumes by integrating hydration kinetics with artificial neural network prediction. Experimental hydration behavior was described using the Peleg model, showing that increasing soaking temperature accelerated water absorption and increased equilibrium moisture content, leading to reductions in cooking time of up to 40% for rice and approximately 30% for legumes, together with approximately 20% lower cooking energy compared with minimal soaking conditions. The ANN model, developed using soaking temperature, soaking time, food type, variety, and moisture content as input variables, predicted cooking time and energy consumption with coefficients of determination (R2) of 0.98 and 0.97, respectively, while independent validation yielded R2 values of 0.944 for cooking time and 0.935 for energy. Fivefold cross validation generated mean R2 values of 0.973 and 0.951 for cooking time and energy prediction, respectively, indicating consistent model performance across different data partitions. The developed predictive framework provides a quantitative basis for adaptive cooking control and energy efficient thermal processing of cereals and legumes. Development of a smart cooker prototype incorporating the trained ANN model and embedded control hardware is currently underway to enable experimental validation of real time prediction and adaptive heating under practical cooking conditions.

Acknowledgements

The authors gratefully acknowledge the Higher Colleges of Technology, UAE, for laboratory facilities and support and seed grant in 2020 for laboratory setup.

Conflict of interests

The authors declare no potential conflicts of interest.

Author contributions

Conceptualization: Weliwita JA, Witharana S. Methodology: Weliwita JA, Witharana S. Formal analysis: Weliwita JA. Validation: Witharana S, Alyammahi S. Writing - original draft: Weliwita JA. Writing - review & editing: Witharana S, Alyammahi S.

Ethics approval

This article does not require IRB/IACUC approval because there are no human and animal participants.

Funding

None.

ORCID

Jinendrika Anushi Weliwita (First & Corresponding author) https://orcid.org/0000-0003-2359-8095

Sanjeeva Witharana https://orcid.org/0000-0001-9230-1537

Saleimah Alyammahi https://orcid.org/0000-0003-2208-1799

References

1.

Aghbashlo M, Hosseinpour S, Mujumdar A. Application of artificial neural networks (ANNs) in drying technology: A comprehensive review. Dry Technol. 33:1399-1462 2015;

2.

Alsalman FB, Ramaswamy H. Reduction in soaking time and anti nutritional factors by high pressure processing of chickpeas. J Food Sci Technol. 57:2572-2585 2020;

3.

Bello M, Tolaba M, Suarez C. Factors affecting water uptake of rice grain during soaking. LWT-Food Sci Technol. 37:811-816 2004;

4.

Bender D, Yamsaengsung R, Waziiroh E, Schönlechner R, Jäger H. Effect of ultrasound assisted soaking on the hydration kinetics and physicochemical properties of chickpeas. Int J Food Sci Technol. 59:2221-2235 2024;

5.

Bidkhori P, Mohammadpour Karizaki V. Diffusion and kinetic modeling of water absorption process during soaking and cooking of chickpea. Legume Sci. 4:e116 2021;

6.

Costa R, Fusco F, Gândara J. Mass transfer dynamics in soaking of chickpea. J Food Eng. 227:42-50 2018;

7.

Fabbri A, Crosby G. A review of the impact of preparation and cooking on the nutritional quality of vegetables and legumes. Int J Gastron Food Sci. 3:2-11 2016;

8.

Fukagawa N, Ziska L. Rice: Importance for global nutrition. J Nutr Sci Vitaminol. 65:S2-S3 2019;

9.

Herath I, Weliwita J, Senanayake S, Witharana S. Effect of moisture content on cooking time of rice. Paper presented at the MIES Conference. Colombo, Sri Lanka. p. 247-250 2016;

10.

Hirannaiah B, Bhashyam M, Ali S. An improved cooking quality test for Basmati rice. J Food Sci Technol. 38:116-119 2001;

11.

Jayamini HPA, Weliwita JA, Narayana M, Witharana S, Hettiarachchi NK. Study of moisture transport in rice cooking. MERCon. 2021; Moratuwa, Sri Lanka. p. 476-481 2021;

12.

Johnny S, Razavi M, Khodaei D. Hydration kinetics and physical properties of split chickpea as affected by soaking temperature and time. J Food Sci Technol. 52:8377-8382 2015;

13.

Kaur R, Prasad K. Elucidation of chickpea hydration, effect of soaking temperature, and extent of germination. J Food Sci. 87:2197-2210 2022;

14.

Kumar Y, Singh L, Sharanagat V, Tarafdar A. Artificial neural network (ANNs) and mathematical modeling of hydration of green chickpea. Inf Process Agric. 7:75-86 2020;

15.

Li XF, Chen SH. Impact of pressure and temperature on the hydration resistance of rice. LWT. 209:116759 2024;

16.

Miano A, Sabadoti V, Augusto P. Enhancing the hydration process of common beans by ultrasound and high temperatures. J Food Eng. 225:53-61 2018;

17.

Munthali J, Nkhata S, Masamba K, Mguntha T, Fungo R, Chirwa R. Soaking beans for 12 h reduces split percent and cooking time regardless of type of water used for cooking. Heliyon. 8:e10561 2022;

18.

Ogundele OM, Akintola AT, Fasogbon BM, Adebo OA. Machine learning predictive model for evaluating the cooking characteristics of moisture conditioned and infrared heated cowpea. Sci Rep. 12:9245 2022;

19.

Peleg M. An empirical model for the description of moisture sorption curves. J Food Sci. 53:1217 1988;

20.

Salehi Mobarakeh H, Mohtasebi S, Rafiee S. Prediction of parboiled rice quality indices using artificial neural networks. J Food Process Preserv. 41:e13207 2017;

21.

Shafaei SM. Analysis of water absorption of bean and chickpea during soaking using Peleg model. J Saudi Soc Agric Sci. 15:135-144 2014;

22.

Sharanagat V, Kansal V, Kumar K. Modeling the effect of temperature on the hydration kinetics of whole moong grain. J Saudi Soc Agric Sci. 17:268-274 2016;

23.

Sharma S, Semwal A, Raj T, Wadikar D. Hydration behavior and kinetic studies of paddy cultivars: Optimization of process variables for improved physical, milling, and textural properties. J Food Sci Technol. 61:1662-1674 2024;

24.

Thakur A, Gupta A. Water absorption characteristics of paddy, brown rice and husk during soaking. J Food Eng. 75:252-257 2006;

25.

Yanni A, Iakovidou S, Vasilikopoulou E, Karathanos V. Legumes: A vehicle for transition to sustainability. Nutrients. 16:98 2023;

Transition to Article Processing Charges (APCs)


Please be advised that, effective January 1, 2027, Food Science and Preservation (FSP) will transition from the current publication charge system to an Article Processing Charge (APC) system.

The APCs will be applied as follows:

  • Korean-language manuscripts: KRW 600,000 per manuscript
  • English-language manuscripts: KRW 300,000 per manuscript
  • Manuscripts submitted by authors outside Korea: USD 300 per manuscript
  • Fast-track manuscripts: An additional expedited review fee of KRW 300,000 (USD 300 for manuscripts submitted by authors outside Korea)
  • Invited English-language review articles: Exempt from all APCs

The new APC policy will apply to manuscripts submitted on or after January 1, 2027. Manuscripts submitted by December 31, 2026 will remain subject to the current publication charge policy.

For further details, please refer to the Article Processing Charges (APCs) Guidelines.

Thank you for your understanding and cooperation.

Food Science and Preservation (FSP)


I don't want to open this window for a day.

Call for Papers: FSP 2026 Special Topic



I don't want to open this window for a day.