Abstract
In this study artificial neural network (ANN) models were developed for predicting the effects of wood species, density, modifying time, and temperature on the equilibrium moisture content (EMC) and swelling of six different thermally modified hardwood species, as previously published by the authors. Lumber of Yellow-poplar (Liriodendron tulipifera), red oak (Quercus borealis), white ash (Fraxinus americana), red maple (Acer rubrum), hickory (Carya glabra), and black cherry (Prunus serotina) were selected. Treatment type, species, temperature, time, and density were used as inputs for the models. Using Keras and Pytorch libraries in Python, different feed forward and back propagation multilayer ANN models were created and tested. The best prediction models, determined based on the errors in training iterations, were selected and used for testing. Based on the performance analysis, the prediction ANN models were accurate, reliable, and effective tools in terms of time and cost-effectiveness, for predicting the EMC and swelling characteristics of thermally modified wood. The multiple-input model was more accurate than the single-input model and it provided a prediction with R2 of 0.9975, 0.92, and MAPE of 1.36, 7.77 for EMC and swelling.
Download PDF
Full Article
Prediction of Equilibrium Moisture Content and Swelling of Thermally Modified Hardwoods by Artificial Neural Networks
Abasali Masoumi,a,* and Brian H. Bond b
In this study artificial neural network (ANN) models were developed for predicting the effects of wood species, density, modifying time, and temperature on the equilibrium moisture content (EMC) and swelling of six different thermally modified hardwood species, as previously published by the authors. Lumber of Yellow-poplar (Liriodendron tulipifera), red oak (Quercus borealis), white ash (Fraxinus americana), red maple (Acer rubrum), hickory (Carya glabra), and black cherry (Prunus serotina) were selected. Treatment type, species, temperature, time, and density were used as inputs for the models. Using Keras and Pytorch libraries in Python, different feed forward and back propagation multilayer ANN models were created and tested. The best prediction models, determined based on the errors in training iterations, were selected and used for testing. Based on the performance analysis, the prediction ANN models were accurate, reliable, and effective tools in terms of time and cost-effectiveness, for predicting the EMC and swelling characteristics of thermally modified wood. The multiple-input model was more accurate than the single-input model and it provided a prediction with R2 of 0.9975, 0.92, and MAPE of 1.36, 7.77 for EMC and swelling.
DOI: 10.15376/biores.19.4.6983-6993
Keywords: Thermally modified wood; EMC, Swelling; ANN
Contact information: a: Ph.D. Candidate, Department of Sustainable Biomaterials, Virginia Polytechnic Institute and State University, Blacksburg, VA, USA; b: Professor and Associate Dean of Extension, Outreach and Engagement, Department of Sustainable Biomaterials, Brooks Forest Products Center, Virginia Polytechnic Institute and State University, Blacksburg, VA 24061, USA;
* Corresponding author: masoumi@vt.edu
INTRODUCTION
The utilization of thermally modified woods (TMW) has gained significant traction as a sustainable material across diverse applications (Espinoza et al. 2015; Bond et al. 2023). Thermal modification (TM), a process involving the controlled heating of wood within the temperature range of 180 to 240 °C, changes its chemical, physical, and mechanical properties (Tjeerdsma and Militz 2005; Esteves and Pereira 2009; Militz and Altgen 2014; Hill et al. 2021). The primary objective of TM is to enhance the dimensional stability of wood, rendering it well-suited for applications in varying moisture conditions, particularly in outdoor applications. The TMW exhibits altered equilibrium moisture content (EMC) and swelling compared to unmodified wood (Masoumi and Bond 2024a).
Notably, hardwoods exhibit distinct chemical and anatomical properties that differ from softwoods and across different plantations (Oladi et al. 2013). The Appalachian region in North America stands out as a hub for several hardwood species, with yellow poplar (YP) emerging as a prominent species, representing 35% of the region’s growth and production (Appalachian Hardwood Species Guide 2023).
Artificial Neural Network (ANN) models are pivotal for deciphering complex scenarios and revealing hidden relationships between input and output variables. This transformative technology, mirroring the human brain’s learning process, excels in pattern recognition, classification, and prediction tasks across various domains such as finance, healthcare, and image recognition (Sen et al. 2023).
The analysis of ANNs encompasses two key facets: architecture and mathematical functions. The architecture involves the arrangement and interconnections of layers and nodes, highlighting the network’s information processing capacity. Simultaneously, mathematical functions, embedded in activation functions and weight adjustments, contribute to the network’s adaptability and learning ability, which is crucial for its predictive prowess. Multilayer Perceptron (MLP) ANN models, particularly notable for their predictive capabilities, have been extensively researched and applied in diverse fields. Their proficiency in discerning complex patterns within data sets makes them adept at handling intricate relationships and non-linear dependencies, surpassing traditional analytical approaches (Sen et al. 2023). The novel deep learning principles have given rise to deep neural networks, capable of handling vast amounts of data and extracting hierarchical features. This dynamic landscape ensures that ANN models remain at the forefront of cutting-edge technological solutions, empowering to explore new frontiers in data analysis and decision-making.
Recent studies have reported the possibility of predicting EMC, swelling, and shrinkage of wood based on factors such as wood species, treatment time, and treatment temperature (Tiryaki et al. 2016; Chen et al. 2022). Chen et al. (2022) reported predicting the EMC and Specific gravity using a back-propagation Neural Network. Additionally, Nasir et al. (2019) reported the possibility of predicting the swelling coefficient and water absorption with the group method of data handling (GMDH) neural network. These studies have used single or few species in making models. However, a model containing a variety of species, particularly hardwoods that have very diverse properties, is lacking in the literature.
This study aimed to develop a single-input (as a more time and cost-effective model) and multiple-input model specifically tailored to predict EMC and swelling in thermally modified hardwood timber of six different types with different densities and anatomy. These species, native to the Appalachian region in North America, have recently gained attention for their potential use in structural applications. In the authors’ previous studies, their physical properties were published. Using key features, such as wood species, density, treatment time, and treatment temperature, the authors sought to contribute to the ongoing exploration of ANN applications in predicting the intricate properties of TMW, thereby enhancing the understanding and utilization of this sustainable material in diverse applications. The model was trained and tested using key features of the given Appalachian species. It is designed to take the features of new species and predict their EMC and swelling properties. The application of these models would be to optimize the process to reach the optimal properties of the process and products (Masoumi and Bond 2024b).
EXPERIMENTAL
Data Collection
The data used in this study was previously published by Masoumi and Bond (2024a) and Masoumi et al. (2024). Test specimens were prepared from randomly selected lumber. The lumber was kiln-dried to 6 to 8% MC prior to modification. Thermal modification of the lumber was conducted in an industrial dry-open vessel thermo-vacuum and the maximum modification temperature, duration, and density of the unmodified and modified lumber is presented in Table 1. Cubes of each treatment type of every species with dimensions of 1 in × 1 in × 1 in (L × R × T) were cut from the lumber. Physical experiments were conducted based on the ASTM D143-22 (2022) standard. Thirty cubes of each species were taken and conditioned by placing them in a climatic chamber in 21 °C and 65% relative humidity (RH), which is equal to 12% RH for 20 days until unmodified specimens reached the equilibrium moisture content, as measurements five days after this time showed no moisture absorption.
After conditioning, the samples were weighed, and their dimensions were measured using a 0.01-g accuracy balance and a 0.01-mm accuracy digital caliper. Samples were then submerged in distilled water for 20 days. Subsequently, samples were left to dry at room temperature for 3 days to avoid cracking and then placed in the oven at a temperature of 103 ± 2 °C for 24 h. After each phase, the weight and dimensions of the samples were measured.
Table 1. Modification Temperature, Time, and Density for Different Wood Species
Artificial Neural Network Models
The authors utilized a dataset comprising 360 data points representing EMC and volumetric swelling of six hardwood species to predict EMC and swelling using a single input and multiple input Multilayer Perceptron (MLP) fully connected Artificial Neural Network implemented in Python 3.11, leveraging Keras and PyTorch. The single input model used one of the parameters as input in every processing set, and multiple input used all of the parameters in a model. In either case, either EMC or Swelling was considered as the output. Keras and PyTorch are two powerful open-source machine-learning libraries. Keras is python-based and is used in deep learning for neural networks. PyTorch is an open-source machine learning library that can be integrated with Python and can debug neural networks easily. The mathematical formula for MLP is given in Eq. 4.
Model architecture
The ANN model consisted of an input layer representing modified and unmodified, wood species, temperature, time, and density, and an output layer of EMC or swelling. The architecture involved an input layer, a hidden layer with ReLU activation (Rectified linear activation function that is the default function that will output the input directly, if it is positive, otherwise prints zero in output), and an output layer. The hidden layer is the layer of neurons that is neither the input nor the output layer and is what makes neural networks deep and enables them to learn complex data. The activation function is used to determine the output of a neuron by calculating the weighted sum of inputs and adds a bias to it. The model, implemented using the Keras and PyTorch deep learning libraries, adapted its input size based on the number of features extracted from the dataset. Various configurations were experimented with, including different architectures (single or multiple inputs, varying hidden layer neurons), optimizers (Adam and SGD), learning rates, epochs, and regularizations (L1, L2, and dropout). The models were assessed based on mean squared error (MSE), MAPE, and R2 values, which are the best criteria for measuring the performance of ANNs (Sen et al. 2023). The ideal model has data with the lowest MSE, MAPE < 10 and R2 above 0.90 and as close as to 1. Ultimately, the best model was chosen for prediction.
Fig. 1. Schematic architecture of A: basic single input; B: Basic multiple input; and C: Multiple input ANN model used in this study
Equations
In these equations, Y is the prediction of the dependent variable; g () represents the activation functions of output neurons; θ is the bias value of output neuron; vj is the weight of the connection between the jth hidden and output neuron; f is the activation functions of hidden neurons; Wij is the weight of connection between the ith input neuron and jth hidden neuron; Xi is the input value of ith independent variable; and βj is the bias value of the jth hidden neuron.
Training and testing
The dataset was split into training and testing sets (80% for training, 20% for testing) using the train_test_split function. The neural network model was trained using mean squared error loss as the loss function and the Adam and SGD, which are the most common optimizers. The training process involved iterating through 1000 epochs (iteration) and updating the model’s parameters to minimize the training loss, which shows how well the model is fitting the training data. Subsequently, the model was validated using the test set to evaluate its ability to predict. Test loss or mean squared error (MSE), R2, and the Mean Absolute Percentage Error (MAPE) were used for evaluation and their mathematical expression are presented in Eqs. 1 to 3. Test Loss or mean square error (MSE) indicates how well the model applies new data. A lower MSE suggests better accuracy. The R2 score represents the proportion of variance in the dependent variable explained by the independent variables. A higher R2 score (closer to 1) indicates better predictive performance. MAPE provides a measure of how far the predicted values are from the actual values as a percentage and should be defined and calculated before printing the data in the coding. In the training process the learning rate was set to lr = 0.0001 to 0.001 and 0.005, for fine-tuning model parameters for optimal performance.
RESULTS AND DISCUSSION
Model Performance Analysis
The data for performance analysis, such as R2, MSE, and MAPE, values of the EMC and swelling parameters, shown in Table 2, indicate that the ANN models were successful. Masoumi and Bond 2024b compared ANN with random forest and gradient boosting regression models and demonstrated that ANN models are more accurate than traditional regression models. Both PyTorch and Keras performed similar accuracy in terms of R2, MSE, and MAPE in both single and multiple-input ANN models. The PyTorch has better flexibility and debugging capabilities to check and ensure the validity of Keras. The models implemented by both Keras and PyTorch provided similar results. The single input model was acceptable just in features of treatment and time (R2 > 0.90 or MAPE < 10) for EMC. However, for swelling, the single input model did not provide as good performance as all R2 values were smaller than 0.90, and MAPE values were higher than 10. Swelling in wood, especially in TMW is affected by multiple features, such as wood species, anatomy, and density, that are unique to each species, modifying time and temperature that changes the physical properties to different extents by changing the chemical and structural properties differently in different species. In the multiple-input model, R2 values were higher than 0.90 and MAPE values were smaller than 10% in predicted data for both EMC and swelling in TM hardwoods by having the R2 and MAPE values of 0.9975, 0.92, and MAPE values of 1.36, 7.77 for EMC and swelling, respectively. Particularly, having R2 value of 0.997 in EMC and MAPE of 1.36 shows very high accuracy of the performance in multiple input models in predicting EMC. An R2 value over 0.90 indicates an excellent correlation between the calculated and predicted data. Moreover, MAPE is a decisive factor for evaluating for prediction performance (Aydin et al. 2015) and 10% is considered a highly accurate prediction.
Table 2. Data for Performance Analysis of Single and Multiple input ANN
The multiple input model performed an acceptable performance in predicting EMC and swelling of wood and the single input model was unable to predict accurately that these results were in close accordance with the findings of Haftkhani et al. (2022), where they modeled the water absorption and swelling of TM fir (Abies sp.) wood and reported the superiority of the multiple input ANN model with R2 and MAPE of 0.996 and 2.8.
Table 3. Experimental Data and Predicted Results
Ozsahin and Murat (2018) developed an ANN model for predicting EMC in TM fir (Abies bornmuelleriana Maff) and hornbeam (Carpinus betulus L.) and reported a MAPE value of 3.21. Additionally, in another study for the same species, Chen et al. (2022) reported R2 values of 0.99 and 0.98. The multiple-input ANN model was shown to be effective and reliable in predicting EMC and swelling. Tiryaki et al. (2016) confirmed predicting volumetric swelling by ANN models using wood species, treatment time, and temperature. Other studies have reported the effectiveness of ANN could predict TMW properties (Nasir et al. 2019).
Fitting effect
Figure 2 shows the correlation between the experimental data values and the values predicted by the developed ANN models. There was a significant correlation between actual and predicted values in testing both in EMC and swelling with R2 0.9975 and 0.92. The same accuracies have been reported by other researchers such as Chen et al. (2022), 0.99, for EMC and Chai et al. (2018) 0.974. Figure 3 shows the training test for EMC and swelling.
Fig. 2. Fitting effect of actual vs predicted values in EMC and swelling
Fig. 3. Loss trend in training test for EMC and swelling
During training, the loss was recorded every 100 epochs, it is essential to observe the loss trend to ensure that the model is converging as the decreasing trend indicates that the model is learning from the data. For EMC, the loss both in training and testing immediately dropped to its lowest value after 20 epochs and kept a constant value toward the end of iterations. However, for swelling it dropped after 200 epochs as the loss was constant in training and testing, and in training the loss was higher than testing because EMC data were more uniform and swelling data were very diverse in all the tested hardwood species.
The ANNs have several advantages over traditional statistical tools, including the ability to model complex, non-linear relationships and handle high-dimensional data. They excel at learning from data, recognizing patterns, and automatically extracting features, reducing the need for manual intervention. ANNs are robust against noisy and incomplete data, can generalize well to unseen data, and benefit from parallel processing capabilities for efficient computation. Their flexibility and versatility make them suitable for a wide range of applications, although they require large datasets, computational resources, and expertise in design and training. This model is implemented and is designed to take the known features of new species and predict their EMC and swelling properties.
CONCLUSIONS
- The PyTorch system was used in this study, as it has better flexibility and debugging capabilities to check and ensure the validity of Keras. The models implemented by both Keras and PyTorch provided similar results.
- The Multiple-input artificial neural network (ANN) model was successful in accurately predicting the equilibrium moisture content (EMC) and swelling using various input features. The ANN learned EMC data faster than swelling data. Hardwoods have different properties that lead to variation in their properties in a modification, making it difficult to predict their properties.
- The single-input model showed less accuracy in predicting the EMC and swelling using just one feature as an input. This implies that multiple features are contributing to the EMC and particularly swelling changes.
- The accuracy of the prediction of the developed ANN models was shown by the R2 values of 0.9975 and 0.92 for EMC and swelling, respectively, which especially for EMC was higher than previously introduced models and for the swelling agrees with models in other studies.
ACKNOWLEDGMENTS
The authors are grateful to the Bingaman Lumber company for providing thermally modified lumber and information regarding the thermal modifying process.
REFERENCES CITED
Appalachian Hardwood Manufacturers, Inc. (2023). “Appalachian hardwood species guide,” (https://www.appalachianwood.org/species/species.htm), Accessed 25 Nov 2023.
ASTM D143-22 (2022). “Standard test methods for small clear specimens of timber,” ASTM International, West Conshohocken, PA, USA. DOI: 10.1520/D0143-22.
Aydin, G., Karakurt, I., and Hamzacebi, C. (2015). “Performance prediction of diamond sawblades using artificial neural network and regression analysis,” Arabian Journal of Science and Engineering 40(7), 2003-2012. DOI: 10.1007/s13369-015-1589-x
Bond, B., Gonzalez, J., Masoumi, A., Xavier Zambrano Balma, F., and Tylor, A. (2023). “Thermally modified wood as a sustainable alternative,” in: PTF BPI 2023, Processing Technologies for the Forest & Biobased Products Industries, Simons Islands, GA, USA, pp. 1-15.
Chai, H., Chen, X., Cai, Y., and Zhao, J. (2018). “Artificial neural network modeling for predicting wood moisture content in high frequency vacuum drying process,” Forests 10(1), article 16. DOI: 10.3390/f10010016
Chen, Y., Wang, W., and Li, N. (2022). “Prediction of the equilibrium moisture content and specific gravity of thermally modified wood via an Aquila optimization algorithm back-propagation neural network model,” BioResources 17(3), 4816-4836. DOI: 10.15376/biores.17.3.4816-4836
Espinoza, O., Buehlmann, U., and Laguarda-Mallo, M. F. (2015). “Thermally modified wood: Marketing strategies of U.S. producers,” BioResources 10(4), 6942-6952. DOI: 10.13576/biores.10.4.6942-6952
Esteves, B. M., and Pereira, H. M. (2009). “Wood modification by heat treatment: A review,” BioResources 4(1), 370-404. DOI: 10.13576/biores.4.1.370-404
Haftkhani, A. R, Abdoli, F., Rashidijouybari, I., and Garcia, R. A. (2022). “Prediction of water absorption and swelling of thermally modified fir wood by artificial neural network models,” European Journal of Wood and Wood Products 80, 1135–1150. DOI: 10.1007/s00107-022-01839-x
Hill, C., Altgen, M., and Rautkari, L. (2021). “Thermal modification of wood—A review: Chemical changes and hygroscopicity,” Journal of Materials Science 56(11), 6581-6614. DOI: 10.1007/s10853-020-05722-z
Masoumi, A., and Bond, B. (2024a). “Dimensional stability and equilibrium moisture content of thermally modified hardwoods,” BioResources 19(1), 1218-1228. DOI: 10.15376/biores.19.1.1218-1228
Masoumi, A., and Bond, B. (2024b). “Machine learning-based prediction of processing time in furniture manufacturing to estimate lead time and pricing,” European Journal of Wood and Wood Products (Submitted)
Masoumi, A., Bond, B., and Zink Sharp, A. (2024). “Kinetics of moisture absorption, swelling and shrinkage of thermally modified hardwoods,” Annual International Conference of Forest Products Society, June 4-6, 2024, Knoxville, TN. DOI: 10.13140/RG.2.2.28417.67687
Militz, H., and Altgen, M. (2014). “Processes and properties of thermally modified wood manufactured in Europe,” ACS Symposium Series 1158, 269-285. DOI: 10.1021/bk-2014-1158.ch016
Nasir, V., Nourian, S., Avramidis, S., and Cool, J. (2019). “Prediction of physical and mechanical properties of thermally modified wood based on color change evaluated by means of “group method of data handling”(GMDH) neural network,” Holzforschung 73(4), 381-392. DOI: 10.1515/hf-2018-0146
Oladi, R., Matini Behzad, H., Sharifi, Z., and Masoumi, A. (2013). “Comparing the wood anatomy of the field elms (Ulmus carpinifolia Borkh.) native to Gorgan and Komijan,” Journal of Forest and Wood Products 66(1), 69-81. DOI: 10.22059/JFWP.2013.35342
Ozsahin, S., and Murat, M. (2018). “Prediction of equilibrium moisture content and specific gravity of heat-treated wood by artificial neural networks,” European Journal of Wood and Wood Products 76, 563-572. DOI: 10.1007/s00107-017-1219-2
Şen, Z. (2023). “Artificial Neural Networks,” in: Shallow and Deep Learning Principles, Springer, Cham, Switzerland, pp. 429-574. DOI: 10.1007/978-3-031-29555-3_7
Tjeerdsma, B. F., and Militz, H. (2005). “Chemical changes in hydrothermal treated wood: FTIR analysis of combined hydrothermal and dry heat-treated wood, Holz als Roh- und Werkstoff 63, 102-111. DOI: 10.1007/s00107-004-0532-8
Tiryaki, S., Bardak, S., Aydin, A., and Nemli, G. (2016). “Analysis of volumetric swelling and shrinkage of heat-treated woods: Experimental and artificial neural network modeling approach,” Maderas Ciencia y Tecnología 18(3), 477-492. DOI: 10.4067/S0718-221X2016005000043
Article submitted: July 1, 2024; Peer review completed: July 17, 2024; Revised version received and accepted: July 18, 2024; Published: August 1, 2024.
DOI: 10.15376/biores.19.4.6983-6993