1 Introduction

Heat treatment process is one of the wood modification methods used to modify the properties of wood (Younsi et al. 2010). Heat treatment has been widely applied to improve the dimensional stability and the biological durability of wood and wood products (Korkut and Hiziroglu 2009). The purpose of heat treatment is to decrease equilibrium moisture content, reduce shrinking–swelling characteristics, increase weather resistance of final products (Yildiz et al. 2006; Kocaefe et al. 2008). Heat treated wood has a decorative and attractive dark color, better decay resistance and thermal insulation properties (Esteves and Pereira 2009; Li et al. 2011). Heat treatment of wood is an environmentally friendly alternative method for wood preservation, while wood preservation is generally performed by chemical treatment using poisonous chemicals that likely affect the human health and environment negatively (Esteves and Pereira 2009; Li et al. 2011). Due to these advantages, heat-treated wood can be used for several purposes, for example for garden, kitchen and sauna furniture, floors, ceilings, inner and outer bricks, doors and windows, furniture, solid wood based materials, wooden boats etc. (Yildiz et al. 2006; Gunduz et al. 2011).

When wood is subjected to heat treatment, several chemical, physical, and mechanical permanent changes occur in the wood structure depending on temperature (Esteves and Pereira 2009). The temperature plays a bigger role than the duration of heating for many properties of heat treated wood (González-Peña et al. 2009). The temperature and duration for heat treatment generally vary from 120 to 250 °C and from 15 min to 24 h, respectively (Bakar et al. 2013).

There are many heat treatment parameters (such as exposure period, temperature, heating medium, wood moisture content, and atmospheric pressure) influencing the properties of wood, and these parameters interact with each other (Korkut and Hiziroglu 2009). Therefore, determination of the optimal conditions to achieve the best wood properties is difficult. However, optimization of the treatment parameters is necessary. The modeling can be used to determine optimum treatment parameters in the process of thermal modification of wood. Thus, the number of comprehensive experimental studies required for investigation of the effect of all parameters and variables of heat treatment on properties of wood can be decreased.

Some studies involving computational modeling of high temperature heat treatment of wood have recently been conducted (Kocaefe et al. 2006, 2007; Younsi et al. 2006a, b, c, 2007; Kadem et al. 2011). Artificial neural networks (ANNs) are one of the most powerful modeling techniques among alternative computer-aided data mining approaches and can be faster, cheaper, and more adaptable than the statistical or numerical methods (Ceylan 2008). ANNs have played an important role in solving problems in the different fields of engineering, and can also be used to model complex non-linear and multivariable relationships between heat treatment parameters. Modeling with ANN has been widely used in the field of wood science by several researchers (Ozsahin 2013). However, the use of ANNs to evaluate the effect of heat treatment on dimensional stability and weight loss of wood and wood products is a new concept.

ANNs can learn directly from the examples without any prior knowledge and formula of the nature of the handled problem and use for modeling in cases of complicated, undefined and nonlinear relationships between input and output parameters (Choudhury et al. 2012; Ozsahin 2013). ANNs, as one of the most attractive branches in artificial intelligence, are now being used for a wide variety of engineering applications such as prediction, optimization, classification, pattern recognition and data processing due to its ability to learn, generalize, perform parallel processes and tolerate failures, as well as due to its superior qualities (Yildirim et al. 2011).

Collection of data, determination of input/output parameters and analysis, and pre-processing of the data are the initial phase in ANN modeling. Training of ANN and testing of trained ANN are the central phase. During training, the values of weights and biases of the network are iteratively adjusted to minimize the network performance function (error function). The training process is repeated until the error rate is minimized or reaches an acceptable level (Beale et al. 2010). Finally, the trained ANN (having the optimized values of weights and biases) is tested using the unseen data sets to evaluate its performance. If the network performance is high, the weights and the biases of the network are stored. Once the network is trained/learned, it can be used to predict the outcomes of different input sets (Yildirim et al. 2011).

A typical multilayer feedforward backpropagation neural network, which is most commonly used in engineering applications, is a system composed of a number of small individual interconnected processing units (nodes), usually called neurons, which are organized in successive layers. No connection (communication links) exists between neurons of the same layer in a feedforward backpropagation neural network. Each of the connections has an associated numerical value known as a ‘‘weight” that determines the nature and strength of the influence between the interconnected neurons. An ANN model generally contains one input layer, one or more hidden layers, and one output layer. The input layer is the first layer and is responsible for receiving incoming data to the ANN and to deliver these to the hidden layer(s). The hidden layer(s) processes the information coming from the input layer and sends these to the output layer. The output layer processes the information coming from the hidden layer(s) and generates the output, and sends these to the outer world (Özşahin 2012).

The neurons are interconnected using weight factors (w ij ). The task of an artificial neuron (j) is simple and consists of receiving input signals (x i ) weighted by connection weights (w ij ) from the neurons in the preceding layer (Fig. 1). The sum of these weighted signals and the bias of the layer (θ j ) provides the neuron’s total or net input (net j ). Output value (y j ) is computed through applying an activation function (f(.)) to net j and y j becomes the input value of each neuron of the next layer. This process is summarized in Eqs. (1) and (2). The basic structure of an artificial neuron model and a multi-layered ANN architecture is illustrated in Fig. 1 (Ozsahin 2013).

Fig. 1
figure 1

General functioning of an artificial neuron and schematic description of a multi-layered ANN architecture

$$ne{t_j}=\sum\limits_{i=1}^n {{x_i}{w_{ij}} - {\theta _j}}$$
(1)
$${y_j}=f(ne{t_j})$$
(2)

The optimum number of hidden layer(s) and number of neurons in each layer, namely network architectures, are problem specific and obtained by trial and error method. If too few neurons in the hidden layer(s) are used, the network will be unable to model a complicated data set, resulting in a poor fit. On the contrary, if the number of neurons is too many, the network will not converge to the goal error, resulting in over fitting (over-generalization) (Ozsahin 2013). It is difficult to determine the most appropriate ANN, even for an experienced user (Ma et al. 2012).

The goal of this study was to develop an artificial neural network (ANN) model for predicting and modeling the effects of conditions of heat treatment process such as exposure period and temperature on specific gravity and equilibrium moisture content of heat treated Uludag fir (Abies bornmülleriana Mattf.) and hornbeam (Carpinus betulus L.) wood.

2 Experimental

2.1 Material

Data used in this study were provided from previous studies by Aydemir (2007) and Gündüz et al. (2008). According to the authors, Uludag fir (Abies bornmülleriana Mattf.) and hornbeam (Carpinus betulus L.) wood species were used according to Turkish standards TS 2470 (ISO 3129:2012) (TSE 1976a) and TS 4176 (ISO 4471:1982) (TSE 1984). The samples used in this study were obtained from sapwood area of the single log of each wood species to avoid any anatomical differences. All samples [20 × 20 × 30 mm³ (L × R × T)] were conditioned at a temperature of 20 ± 1 °C and a relative humidity of 65 ± 1% until they reached equilibrium moisture content prior to heat treatment. Heat treatment was applied to the samples under atmospheric pressure for nine combinations of three different temperatures (170, 190, and 210 °C) and three different exposure times (4, 8, and 12 h). Ten samples for each combination of temperatures and exposure times and ten samples for control group (200 samples for each Uludag fir and hornbeam species) were used to determine specific gravity and equilibrium moisture content values. Specific gravity and equilibrium moisture content values of heat treated samples at 20 °C and relative humidity conditions of 35, 50, 65, 80, and 90%, were determined according to TS 2471 (ISO 13061-1:2014) (TSE 1976b), TS 2472 (ISO 13061-2:2014) (TSE 1976c) and TS 53 (ISO 3129:2012) (TSE 1981).

2.2 ANN analysis

The software developed creating scripts with MATLAB codes and functions related to neural networks was used for the formation, training and optimization of ANNs. The data (90 samples) was randomly divided into two groups: the training set and testing set, consisting of 66.6 and 33.3% of the data, respectively. The different data groups were constituted from the data. The training and testing sets used in the prediction model are shown in Tables 1 and 2. To determine the optimum network architecture and parameters, the trial and error method was applied. Several different ANN structures, parameters and data set were tested thousands of times with the developed software until the difference (error) between the experimental and the ANN predicted outputs reached an acceptable level. The models were tested using the testing data selected from the experimental results that were not used during the learning processes. Thus, the most sensitive (appropriate) ANN result was targeted. The mean square error (MSE) was used as the performance function for ANN models. MSE was computed according to the following equation.

Table 1 Training data set and prediction model results
Table 2 Testing data set and prediction model results
$${MSE}=\frac{1}{N}\sum\limits_{i=1}^N {{{\left( {{t_i} - t{d_i}} \right)}^2}}$$
(3)

where t i and td i denote the targeted and predicted values of data i, respectively; and N represents the total number of measurements.

The data should be normalized to achieve the best generalization potential and performance of ANN models. Therefore, training and testing data sets were normalized using their minimum and maximum values within the range of [−1, 1] due to the use of the hyperbolic tangent sigmoid function as the activation function in the models. The limit of f(x) when x tends to infinity is +1 and the limit of f(x) when x tends to negative infinity is −1, and the function is defined as follows.

$${f(x)}=\frac{2}{{1+{e^{( - 2x)}}}} - 1$$
(4)

where f(x) is the output value of the neuron, x is the input value of the neuron.

The prediction performance of each model was measured and compared for each case using statistical and graphical comparisons. The prediction performances (validity and accuracy) of the ANN models were evaluated using the mean absolute percentage error (MAPE), the root mean square error (RMSE) and coefficients of determination (R2). The MAPE, RMSE and R2 values were calculated using Eqs. (5), (6) and (7), respectively. The lower MAPE and RMSE values represent the more accurate estimation results. The higher R2 values represent the greater similarities (or better agreement) between targeted and predicted outputs.

$${MAPE}=\frac{1}{N}\left( {\sum\limits_{i=1}^N {\left[ {\left| {\frac{{{t_i} - t{d_i}}}{{{t_i}}}} \right|} \right]} } \right) \times 100$$
(5)
$${RMSE}=\sqrt {\frac{1}{N}\sum\limits_{i=1}^N {{{\left( {{t_i} - t{d_i}} \right)}^2}} }$$
(6)
$${{R}^{2}}=1 - \frac{{\sum\nolimits_{i=1}^N {{{({t_i} - t{d_i})}^2}} }}{{\sum\nolimits_{i=1}^N {{{({t_i} - \bar t)}^2}} }}$$
(7)

where \(\bar t\) is the average of predicted values.

To improve prediction performance of network models, it was decided to use a separate artificial neural network for each output parameter. In the developed ANNs, the input parameters consist of four input nodes in the input layers representing wood species, heat treatment temperature (ºC), duration of heat treatment (exposure period) (h) and relative humidity (%). The output node of each ANN network represents the output parameters called equilibrium moisture content (EMC) (%) and specific gravity (SG) (g/cm3) separately. Both the networks which have the best MAPE, RMSE and R2 values for SG and EMC characteristics are composed of two hidden layers. These hidden layers of SG and EMC networks consist of four–four and three–eight neurons, respectively. These ANN structures (Fig. 2) were chosen as the prediction models for modeling the effects of conditions of heat treatment process on equilibrium moisture content and specific gravity at different relative humidity levels of heat treated Uludag fir and hornbeam wood.

Fig. 2
figure 2

ANN architectures of the prediction models

These ANNs developed are mathematically logical and defined. The number of neurons in the hidden layer(s) cannot be increased without limit. To be able to define a network, mathematically, the number of data available for training must be higher than the number of connections of the network (Sha and Edwards 2007). In the proposed EMC and SG prediction models, the numbers of the connections were 56 and 45, respectively which was lower than the number of data available for training (60 data).

The total number of connections for the ANN prediction models was calculated according to the following equation:

$${TC}=({N_i}{ }+1)\,x\,{N_{h1}}+({N_{h1}}+1)\,x\,{N_{h2}}+({N_{h2}}+1)\,x\,{N_o}$$
(8)

where TC is total number of connections, and N i , N h and N o are the number of inputs, neurons in the hidden layer(s) and outputs, respectively.

In this study, feed forward and back propagation multilayer ANNs were used. In the proposed network models, hyperbolic tangent sigmoid transfer function in the hidden layers and linear transfer function in the output layer as the activation function were preferred. The Levenberg Marquardt algorithm (trainlm) was used as the training algorithm. The gradient descent with a momentum back propagation algorithm (traingdm) was used as the learning rule.

3 Results and discussion

Training of the ANNs was terminated after 60 and 32 cycles for the equilibrium moisture content (EMC) and specific gravity (SG) prediction models, respectively, because targeted MSE value (0.0005) was reached. Evolution of the error during the iterative processes for the models is shown in Fig. 3.

Fig. 3
figure 3

Variations of the MSE at each iteration for a EMC and b SG

Graphical and statistical comparisons were used to evaluate the performance of the proposed ANN models. It was confirmed that the ANN models generated satisfactory and consistent results when compared with the experimental measurements. The measured values, predicted values, percentage error ratio, and the MAPE and RMSE values of the equilibrium moisture content (EMC) and specific gravity (SG) parameters for training and testing data sets are given in Tables 1 and 2. When the tables are examined, the values predicted (calculated) by utilizing the ANN prediction models seem to be very close to the real data.

Figures 4 and 5 show the correlation figures between the measured values and the values predicted by the developed ANN models for the equilibrium moisture content (EMC) and specific gravity (SG) characteristics. Figures 6 and 7 compare the experimental results and outcomes of the ANN prediction models for the EMC and SG characteristics. As shown in the figures, it is clear that the results are very close to each other.

Fig. 4
figure 4

Regression models of the training set for a EMC and b SG

Fig. 5
figure 5

Regression models of the testing set for a EMC and b SG

Fig. 6
figure 6

Comparison of the measured and predicted values of the training set for a EMC and b SG

Fig. 7
figure 7

Comparison of the measured and predicted values of the testing set for a EMC and b SG

The mean absolute percentage errors were 3.21 and 0.63% for the equilibrium moisture content (EMC) and specific gravity (SG), respectively in the testing phase. It is clear from Tables 1 and 2 that the maximum absolute percentage errors did not exceed 8.56% for EMC and 2.26% for SG in the training and testing phase. These levels of error and the results of graphic comparisons demonstrate that the prediction models effectively generate satisfactory results and have a sufficient accuracy and reliability rate for the modeling of the EMC and SG characteristics of the heat treated wood.

The trained ANN models can provide (calculate) the intermediate values for the optimization studies. In this optimization study, wood species and relative humidity were fixed as Uludag fir and 65%, respectively, and temperature (ºC) and exposure period (h) were changed. The intermediate equilibrium moisture content (EMC) and specific gravity (SG) values not obtained from the experimental study were determined by the ANN prediction models for different temperatures and exposure periods, and are shown in Fig. 8. The optimization of EMC and SG values based on temperatures and exposure periods of the heat treated wood can be carried out through an analysis of responses of the models.

Fig. 8
figure 8

Effect of temperature and exposure period on a EMC and b SG of heat treated Uludag fir wood

As can be seen from Fig. 8, it was found that after heat treatment process, specific gravity and equilibrium moisture contents (EMC) of wood decreased. Similar results were reported by several researchers (Metsä-Kortelainen et al. 2006; Akyildiz and Ates 2008; Esteves and Pereira 2009; Dos Santos et al. 2014).

Several explanations were reported for reduction in EMC by researchers. Researchers pointed out less water absorption after heat treatment as a result of decreased hydroxyl groups, (Jämsä and Viitaniemi 2001) and/or decreased accessibility of hydroxyl groups to water molecules due to the increased cellulose crystallinity (Wikberg and Maunu 2004; Bhuiyan and Hirai 2005; Boonstra and Tjeerdsma 2006). The polycondensation reactions in lignin also contributed to the decrease of equilibrium moisture content (Tjeerdsma and Militz 2005; Boonstra and Tjeerdsma 2006).

Researchers have reported that after heat treatment process, cellulose crystallinity significantly increases due to rearrangement or reorientation of cellulose molecules within quasicrystalline regions (Bhuiyan et al. 2000).

Reduction of specific gravity is mainly related to mass losses during the heat treatment process (Metsä-Kortelainen et al. 2006; Akyildiz and Ates 2008; Esteves and Pereira 2009; Dos Santos et al. 2014).

Cellulose is less affected than hemicellulose by the heat treatments due to its crystalline nature but hemicellulose is the first structural compound to be thermally affected during the heat treatment. Hemicellulose degradation process starts by deacetylation, resulting in released acetic acid and acts as a depolymerization catalyst that further increases polysaccharide decomposition (Tjeerdsma et al. 1998; Sivonen et al. 2002; Nuopponen et al. 2005; Esteves and Pereira 2009).

4 Conclusion

In this study, the accuracy of the prediction of the developed ANN models achieved at least 91.4 and 97.7% success rate for the equilibrium moisture content (EMC) and specific gravity (SG), respectively, even in the testing group. Considering the complex and nonlinear relationships between the input and output parameters, highly encouraging and satisfactory results are obtained by the models.

Figures 4 and 5 show the scattered diagram of the measured (targeted) values and the predicted (calculated) values of the proposed ANN prediction models for the EMC and SG parameters. The results show that the models have a very high coefficient of determination (R2) between the calculated and targeted EMC and SG values. The values of R2 in the testing set for the EMC and SG characteristics of the heat treated wood are 0.990 and 0.999, respectively. These values support the applicability (validity) of the proposed EMC and SG prediction models.

The prediction performances of the developed models will be higher when logs which have similar properties to those used in this study are used for prediction of EMC and SG characteristics. ANN models can be improved by increasing the number of stands, logs and samples to be applicable for all logs obtained from both Uludag fir (Abies bornmülleriana Mattf.) and hornbeam (Carpinus betulus L.) wood.

In this study, the well-trained ANN model has been proved to be a sufficient and successful tool for modeling the effects of conditions of heat treatment process on EMC and SG characteristics of heat treated Uludag fir (Abies bornmülleriana Mattf.) and hornbeam (Carpinus betulus L.) wood. The results of the research indicated that the developed ANN models can be used to determine EMC and SG values of these wood species to be heat treated at any temperature (between 170 and 210 °C) and exposure period (between 4 and 12 h) for any relative humidity (between 35 and 90%) without the need of experimental study that requires much time and high testing cost.