1 Introduction

Classification of thermally modified wood (TMW) is critical for establishing grading rules and providing guidelines for quality assurance. Distinguishing between the different processing temperatures and identifying the heat treatment level of TMW specimens is essential for reliable inspection and quality control purposes. Different physical, mechanical, and/or chemical characteristics of wood that are affected by the thermal treatment process can be used as quality control criteria for TMW characterization and classification. These characteristics may be measured destructively (e.g., hardness) or non-destructively (e.g., color). Color measurement has been suggested as a potential classification parameter for TMW (Brischke et al. 2007; González-Peña and Hale 2009a; Nasir et al. 2018, submitted; Schnabel et al. 2007; Willems et al. 2015) because it correlated well with thermal treatment intensity (Brischke et al. 2007; González-Peña and Hale 2009a; Schnabel et al. 2007; Willems et al. 2015). While González-Peña and Hale (2009b) stated that color measurement could be used to predict the TMW properties, Johansson and Morén (2006) reported that color measurement is not appropriate for mechanical strength prediction, as color distribution is not homogenous through thermally treated boards. Near-infrared (NIR) spectroscopy has also been used for TMW classification (Bächle et al. 2012; Hinterstoisser et al. 2003; Schwanninger et al. 2004); however, Willems et al. (2015) reported that NIR data are not stable and need frequent calibration. Despite the practical applications and industrial demand for accurate wood classification, far too little attention has been paid to study different nondestructive evaluation (NDE) methods and finding the optimal features and classification models. Thus, any research on evaluating novel NDE methods for reliable, fast, and reproducible TMW classification and characterization is of great importance for material design and quality control purpose.

Stress wave evaluation is a potential NDE method that has been used for wood defect detection (Du et al. 2015; Lin and Wu 2013) and characterization of wood mechanical properties (Yang et al. 2017). The stress wave timer that is equipped with two accelerometers has been used to measure the dynamic modulus of elasticity (Ed) of TMW samples (Del Menezzi et al. 2014; Garcia et al. 2012). The accelerometers measure the time needed for a stress wave generated by a pendulum ball-hammer impact to propagate along the wood sample. Despite the proven effectiveness of stress wave timer experiment on studying TMW mechanical properties, the measured stress wave velocity has not been studied for TMW classification. The stress wave can also be evaluated by an acoustic emission (AE) sensor. Acoustic emission has been extensively used in wood science and engineering applications as a nondestructive evaluation method for wood fracture analysis (Diakhate et al. 2017) and monitoring the wood machining (Nasir and Cool 2018) and drying process (Kim et al. 2005). However, acoustic emission has not been studied for TMW classification for quality control applications and properties characterization for the design of material.

The objective of this paper is to use the stress wave evaluation method for TMW classification. Stress wave analysis was performed using the accelerometer and AE sensor to compare the ability of both methods to differentiate different heat treatment levels (untreated control group, 170 °C, 212 °C and 230 °C) of thermally modified Western hemlock wood. Signal processing was conducted to extract different sensory features for the classification purpose. The selected features were then used to train three different types of neural networks. The hypothesis was that the signal processing and neural network modeling approach from the stress wave analysis could accurately classify different heat treatment levels.

2 Materials and methods

2.1 Test materials

Fifty-six flatsawn and fifty-six quartersawn kiln-dried and defect-free local Western hemlock (Tsuga heterophylla) boards were subjected to the thermowood process. The treatment temperatures used were 170 °C, 212 °C, and 230 °C, with a holding time of 2 h. Each run of treatment included seven boards per sawing pattern (i.e. flatsawn, quartersawn), and fourteen boards per sawing pattern were kept untreated as controls. To meet the statistical requirements, a replicate of each run of treatment was implemented, which resulted in a total of 112 boards. Samples were re-sectioned to prepare specimens for the stress wave test (33 × 48 × 214 mm3). In total, the number of samples per test was 336 (84 samples per treatment). All specimens were then conditioned at 20 ± 3 °C and 65 ± 7% relative humidity (H) until they reached their equilibrium moisture content (Memc). Wood density and moisture content were then measured. Moisture content was measured using a capacitance moisture meter.

2.2 Stress wave experiment

2.2.1 Stress wave timer instrument

A non-destructive stress wave test was applied to calculate the wave velocity and the dynamic modulus of elasticity of the wood samples (Fig. 1). Accordingly, a stress wave timer (Metriguard 239A) was used to display the mechanical stress wave propagation time by measuring the speed of sound generated by a pendulum impact through the wood samples. The time required for a longitudinal stress wave to propagate along the samples was measured using two accelerometers along the propagation path to detect the signal generated by pendulum impact. Ten consecutive stress waves were created, and the time taken for the waves to travel over a distance of 214 mm was averaged and used to calculate the stress wave velocity (v). Then, dynamic modulus of elasticity (Ed) was calculated from the stress wave velocity using the following formula:

Fig. 1
figure 1

Stress wave test setup. The generated elastic wave is detected by the AE sensor and the two accelerometers to measure the time required for the stress-wave to propagate along the sample

$${E_d}={v^{\text{2}}}\rho ,$$
(1)

where Ed is the dynamic modulus of elasticity (Pa), ρ is the wood density (kg/m3), and v is the stress wave velocity (m/sec). Ed and v were used to train the neural networks for TMW classification.

2.2.2 AE signal acquisition and processing

A high-sensitivity wideband differential AE sensor (model D9203B) was placed on the specimens (Fig. 1) to sense the generated stress wave in the wood. It captured the rapid release of localized stress energy caused by the pendulum impact. The analog signal was conditioned using a 0/2/4 preamplifier with a 40 dB gain range and then sent to an A/D converter. Data acquisition was performed using an NI 9223 card and LabVIEW software with a sampling frequency of 1 MHz. The acquired signals (Fig. 2) were then processed in MATLAB. The signal was analyzed in the frequency, time, and time–frequency domain. Fast Fourier transform (FFT) and power spectral density (PSD) analysis were applied to the signal for the frequency domain analysis.

Fig. 2
figure 2

An example of AE signal in time-domain showing the generated stress wave in the wood sample

For the time–frequency domain analysis, discrete wavelet transform was applied to decompose the signal into different levels. In this study, the Daubechies wavelet function (db10) was applied, and the AE signal was decomposed into four levels. The coefficients of the discrete wavelet transform consist of approximation coefficients and detailed coefficients. On the one hand, the approximation coefficients correspond to the general trend of the signal and contain the low-frequency components of the signal. On the other hand, detailed coefficients represent the high-frequency behavior of the signal. Valuable information can be derived from the obtained wavelet tree decomposition. Different extracted features from the approximation and detailed coefficients can be used for the process condition and health monitoring purpose. Details on calculating the approximation and detailed coefficients of the discrete wavelet transform were discussed by Kwak (2006). In this study, the approximation coefficients at the 4th level (CA4) and the detailed coefficients at all the four decomposition levels (CD1, CD2, CD3, and CD4) were calculated. Ten features (Table 1) were extracted from each signal in the time, frequency domain (FFT and PSD analysis), and time–frequency domain (CA4, CD1, CD2, CD3, CD4). In total, 80 features were extracted from each AE signal. These features were fed to the neural networks for TMW classification.

Table 1 Extracted features from the AE signal (x)

2.2.3 Feature selection

When having a small sample size, feeding a neural network with 80 features extracted from the AE sensor might result in a poor performance of the neural network. Because this corresponds to a high dimension dataset, an optimal feature subset should be used to feed the neural networks to obtain efficient performance. Optimal feature selection could be achieved through different approaches. For example, the optimal feature selection could be considered as an optimization problem through linking a heuristic optimization algorithm (genetic algorithm, particle swarm optimization, etc.) with neural networks to find the feature subset that minimizes the network error. Dimensionality reduction methods such as principal component analysis (PCA), neighborhood component analysis, etc. can also be used to find the principal variables and enhance the network performance. Linear discriminant analysis (LDA) was used in this study to find a linear combination of features that discriminate the classes. Unlike the PCA, where the class labels are not considered and the dataset is projected in the directions of maximum variance that might not be useful for the classification, LDA tries to identify the linear combination of features that best describe the multi-class data considering the differences between the classes. Therefore, LDA can project data to a subspace with reduced dimension, where the between-class scatter is maximized and the within-class scatter is minimized. The projected data at different subspace dimension can be fed to a network as the model input. In this case, the network is classifying data with reduced dimension, where the subspace dimension is associated with the largest eigenvalues that can represent the highest-class separation.

2.3 Classification

The type of the classifier can have a significant effect on the classification performance, especially for small size experimental data. In this study, MLP, GMDH, and LVQ neural networks were used to classify the treatment level. The performance of the models can be compared in a multiclass classification problem with four categories including a control level (20 °C) and three levels of treatment temperature (170, 212 and 230 °C). Table 2 shows the treatment temperatures and their corresponding class numbers. The model inputs are v, Ed, which are calculated from the stress wave timer instrument and the extracted features from the captured AE signals. The model performance was evaluated by comparing the accuracy (true classification) of test data for the three studied neural networks. For each model, seventy percent of the data were used for training the network, and the rest was used for testing the model accuracy. The network error was calculated by comparing the model output and target in MATLAB to calculate the confusion matrix and classification accuracy.

Table 2 Treatment temperatures and its corresponding class numbers

2.3.1 MLP neural network

A feed-forward multi-layer perceptron (MLP) network (Fig. 3), one the most common types of neural networks, was used for classification. The architecture of the designed MLP is shown in Fig. 4. Increasing the number of neurons in the hidden layer would increase the number of bias and weight factors that need to be tuned during the learning process, which is challenging for networks being trained with a small sample size. It was determined that using 6 neurons in the first hidden layer minimized the network error, while the number of neurons was equal to the number of classes for the second hidden layer. A hyperbolic tangent sigmoid function was used as the activation function in the hidden layers. Backpropagation was used by applying a gradient descent optimization method to adjust the weight of neurons in the training process.

Fig. 3
figure 3

General structure of a feed-forward MLP neural network

Fig. 4
figure 4

Architecture of the designed MLP neural network showing the number of neurons at different layers and bias (b) and weight factors (w) in each layer of the ANN structure (from MATLAB 2017)

2.3.2 GMDH neural network

Group method of data handling (GMDH) is a family of inductive algorithms applied to different data mining and pattern recognition problems. Due to its inductive and self-organizing nature, GMDH can automatically find its optimal network structure. It is based on sorting out of gradually complicated models and optimal solution selection by applying external criterion. It uses a multilayer network of second-order polynomials, in which, the single output of each quadratic neuron with two inputs (Xi,Xj) is calculated as follows:

$${Z_{ij}}={C_1}+{C_2}{X_i}+{C_3}{X_j}+{C_4}X_{i}^{2}+{C_5}X_{j}^{2}+{C_6}{X_i}{X_j}$$
(2)

The weights of quadratic neurons are tuned during the learning process. If X is defined as an n × m matrix of input data comprising n training samples presented by m features, the GMDH neural network constructs all the possible combinations of input pairs from m variables in the first hidden layer, and each quadratic neuron will then be trained using the least-squares method. To keep a feasible network complexity, neuron selection criterion is applied in each layer using the natural selection idea. Accordingly, the classification accuracy for every quadratic neuron is computed by comparing the polynomial model output and target. Those neurons with the polynomial model fitness function below a predefined error level are retained and other neurons will be discarded. The selection error criterion (ec) is defined as follows:

$${e_c}=\alpha ~{e_{min}}+\left( {1 - \alpha } \right)~{e_{max}},$$
(3)

where emin and emax are the minimum and maximum error obtained in each layer, and α (0 < α < 1) is the selection pressure. A sample GMDH neural network structure with 4 inputs is shown in Fig. 5. As shown in the Figure, the neurons in each layer with the polynomial model error greater than ec are discarded, and the rest is used to make the next hidden layer. In this study, a selection pressure of 0.6 was chosen by trial and error. A limit of a maximum number of layer and maximum neuron number in each layer can be defined to control the complexity of the network. Accordingly, the maximum number of layer and neuron number in each layer were defined as 30 and 100, respectively to have a control on the network evolutionary structure.

Fig. 5
figure 5

A sample architecture of GMDH neural network with four inputs

2.3.3 LVQ neural network

The LVQ neural network that was introduced by Kohonen (2001) is a supervised machine learning method for classification that applies unsupervised data clustering techniques. The first step in using the LVQ neural network is data clustering by using an unsupervised learning method for locating the centers of clusters. The second step is using the class labels for refining the clusters centers and tuning the network to reduce the misclassification rate. The architecture of a sample LVQ neural network is shown in Fig. 6. The neurons in the first hidden layer of the network correspond to the centers of the clusters. This is a competitive layer, where the neurons learn a prototype vector and classify a region of the input space. The Euclidean distance between an input vector x and the neuron weight vector w is then computed. The output of the winning neuron that corresponds to the minimum distance will be equal to 1, while the other neurons’ output will be 0. The weight of the winning neuron was then updated by the so-called LVQ1 method as follows:

Fig. 6
figure 6

LVQ network architecture with 4 neurons in the competitive layer

$${W_m}\left( {t+1} \right)=\left\{ {\begin{array}{*{20}{l}} {{W_m}\left( t \right)+\alpha \left( t \right)[x\left( t \right) - {W_m}\left( t \right)]}&{if\;x\;and\;{W_m}\;belong\;to\;the\;same\;class} \\ {{W_m}\left( t \right) - \alpha \left( t \right)\left[ {x\left( t \right) - {W_m}\left( t \right)} \right]}&{otherwise} \end{array}} \right.$$
(4)

where α (t) is the learning rate (0 < α (t) < 1) and was set to 0.01 in this study. The second hidden layer in the network structure is a linear one for final decision making that transforms the competitive layer’s classes into target classification. In this study, investigating the model revealed that having four neurons in the competitive layer resulted in an optimal model performance.

3 Results and discussion

Table 3 shows the stress wave velocity (v), wood basic density, and dynamic modulus of elasticity (Ed) obtained from stress wave timer under different treatment conditions. As can be seen, v increases with the intensity of thermal treatment. Comparing to untreated wood samples, v was increased by 1.9% for wood samples treated at 230 °C. However, Tukey’s pairwise comparisons showed that the difference between the mean values of v at different treatment temperatures is not statistically significant. Thermal treatment caused a reduction in wood basic density and Ed. The adverse effect of thermal treatment on wood mechanical properties has been reported in the literature (Esteves and Pereira 2009). Similar to the v, the mean values of Ed and wood basic density are not statistically different for all the treatment temperatures. Tukey’s pairwise comparisons showed that there is no significant difference between the Ed of untreated samples and those treated at 170 and 212 °C. The mean values of Ed are also not significantly different for TMW samples at 212 and 230 °C. This can cause between-class confusion when v or Ed is used as a feature for wood classification. Table 4 represents the performance of the three neural network models fed with the features extracted from the stress wave timer experiment. It is shown that the v and the Ed extracted from the stress wave propagation time sensed by the accelerometers are not suitable features for the TMW classification. In this case, a maximum classification accuracy of 28.3% was achieved using the LVQ neural network trained with Ed as the input feature.

Table 3 Tukey’s pairwise comparisons for stress wave velocity, basic density, and wood dynamic modulus of elasticity at different temperature levels (95% confidence level)
Table 4 Neural network accuracy from the stress wave timer test extracted features [stress wave velocity (v) and dynamic modulus of elasticity (Ed)]

The generated stress wave was also captured and analyzed by the AE sensor. Figure 7 illustrates the acquired AE signal from wood samples under different treatment conditions. As can be seen, the signal maximum amplitude decreased by the thermal treatment. Table 5 shows the results of Tukey’s pairwise comparisons on the AE signal maximum amplitude, root mean square (RMS), and energy in the time domain. Statistical analysis revealed that the thermal treatment decreases the amplitude of the mentioned AE signal features and its effect is significant for all the treatment temperatures. The effect of thermal treatment on the acquired AE signal can be explained by the role of treatment temperature on wood microstructure. Esteves and Pereira (2009) reviewed the effect of thermal treatment on wood anatomy and microstructure. They reported that thermal treatment can cause cracks in the wood cell walls. In addition, it can significantly increase the number and size of pores in the wood structure (Gosselink et al. 2004; Hietala et al. 2002). Increasing the wood porosity can affect the sensed AE signal. In fact, the energy of the traveling stress wave generated by pendulum impact can be damped by increasing the wood porosity.

Fig. 7
figure 7

Acquired AE signal from wood specimens treated at 230 °C (a), 212 °C (b), 170 °C (c), and untreated wood samples (d)

Table 5 Tukey’s pairwise comparisons for the acoustic emission (AE) signal maximum, RMS, and energy in the time domain at different temperature levels (95% confidence level)

Comparing to the extracted features of the stress wave timer, AE features corresponded to better model performance. More specifically, the classification accuracy is enhanced when all the 80 extracted AE features are used. In this case, the GMDH neural network accounted for the highest accuracy (74.3%).

The performance of the GMDH neural network for classification of TMW was observed on a confusion matrix in detail. In this case, the highest accuracy belonged to the specimens treated at 230 °C (80.6%), followed by those treated at 212 °C (79.2%). A 20.8% misclassification rate for specimens treated at 212 °C was due to the confusion with those treated at 170 °C. Specimens treated at 170 °C accounted for the least classification accuracy (56.5%) and the highest misclassification rate (43.5%). In this case, there is a high confusion between the samples treated at 170 °C and the control group. Overall, the largest proportion of false positive classification belonged to the samples treated at 170 °C, whereas there was no false positive classification for specimens treated at 230 °C. In comparison with the 74.3% accuracy obtained with the GMDH neural network, the LVQ and MLP neural network were characterized by an accuracy of 66.3% and 50.5%, respectively.

Because the model used a relatively high feature dimension, the performance of the GMDH neural network takes precedence over the other two models. This can be due to the inductive nature of the GMDH algorithm and the fact that its structure is not set in advance but is based on evolutionary principles combined with the natural selection idea for controlling the size and complexity of the network. This gave the GMDH neural network the ability to adapt its network complexity and find the optimal model structure, which resulted in higher classification performance when dealing with high dimensional data sets.

The increase in model performance associated with using AE features (74.3% maximum accuracy) over the stress wave timer features (28.3% maximum accuracy) is still insufficient for practical applications where very high classification accuracy is needed. This is due to the fact that not all 80 extracted features improved the neural network performance. As mentioned, LDA was used in this study for dimensional reduction and to enhance the performance of the neural networks when using AE features (Table 6). Table 6 shows the network performances when the dimension of the AE features is reduced by LDA. As shown in the Table, the best performance of each model was achieved having different subspace dimension. It can be seen that applying LDA to the extracted AE features significantly improved the performance of the network. A high accuracy of 91.1% was obtained from the LVQ neural network, followed by the GMDH (89.1%), and MLP (70.3%) models. The results show that the LVQ and GMDH neural networks outperformed the MLP model. The confusion matrix obtained from the LVQ neural network revealed that classes treated at 230 °C and control group had the highest classification accuracy (96%), whereas the highest misclassification rate (17.9%) belonged to the class treated at 170 °C, which was due to the confusion with the control group and specimens treated at 212 °C. There was no confusion between the control group and specimens treated at 212 °C and 230 °C. In addition, the confusion between the specimens treated at 212 °C and 230 °C was less than that of the specimens treated at 170 °C and the control group.

Table 6 Neural networks accuracy trained by the acoustic emission (AE) features, and the AE features combined with the moisture content with LDA dimensionality reduction (LDA subspace dimension that corresponds to the maximum model performance)

To evaluate the effectiveness of sensory feature fusion, the performance of the LVQ model trained with the AE features, which represented the highest accuracy (Table 6), was compared in different signal domains. The LDA was applied to each of the model inputs, and the optimal subspace dimension corresponding to the maximum model performance was chosen. The highest network performance was achieved in descending order with the features extracted from the wavelet, time, and frequency domain analysis (Table 7). Extracted features from the wavelet domain analysis corresponded to a 83.2% model accuracy, whereas the features extracted from the FFT and PSD analysis resulted in 60.4% and 32.4% model accuracy, respectively. Nevertheless, the maximum network performance was achieved when all the 80 extracted features were combined with LDA.

Table 7 LVQ Neural network accuracy for acoustic emission (AE) features with LDA dimensionality reduction (LDA subspace dimension that corresponds to the maximum model performance) extracted from different domain analysis

While the performance of the models trained with AE sensory features is much better than those trained with accelerometer data (stress wave timer), higher classification performance is still demanded in real industrial applications. Nasir et al. (2018, submitted) obtained an accuracy of 0.970 from TMW classification using wood color parameters. This performance was increased to 0.976 by combining the wood color data and moisture content measured by capacitance moisture meter. Wood moisture content can be easily measured by capacitance moisture meter in practical applications. Although the accuracy of capacitance moisture meter is less than the oven-dry moisture measurement, it can be applied to in-line measurement of moisture content at industrial scale and can be combined with the AE extracted features to enhance the classification accuracy. Table 6 presents the performance of the models trained with the AE features combined with the wood moisture content. As can be seen, the performance of the networks was noticeably increased. Specifically, an accuracy of 98% was obtained from the LVQ neural network, followed by 97.0% and 86.1% accuracy obtained from the GMDH and MLP neural networks, respectively. Confusion matrix analysis revealed that when the AE extracted features are combined with the wood moisture content, there is no false positive classification associated with the specimens treated at 170 °C and the control group. In this case, LVQ neural network represents 100% classification accuracy for all classes except for the specimens treated at 212 °C, which has a 92% classification accuracy.

Both the LVQ and GMDH neural networks provide a robust model with an accuracy that can be used for TMW classification in industrial applications. The poor performance of the MLP neural network in comparison with the LVQ and GMDH neural networks could be related to its higher number of parameters that should be optimized and tuned during the learning process. This can cause an over-fitting issue, especially when dealing with low sample size. For big size dataset, the MLP neural network might show different performance; however, it is desired to achieve the highest classification accuracy by conducting the minimum tests to reduce the cost of experiments. In this case, LVQ and GMDH neural networks seem to be promising models for accurate TMW classification. The results indicated that compared to the features extracted from the accelerometers (stress wave timer instrument), AE features showed better discrimination against the treatment temperature. This can be the topic of further study to use the AE signal for wood characterization and predicting its mechanical and/or physical properties. Since this study was performed on defect-free specimens, it would be important to evaluate the impact defects, such as knots, may have on AE signals and their ability to accurately classify TMW. In addition, the AE signal is highly affected by the wood anatomy and its microstructure such as porosity, internal crack, etc. This study should be expanded by classifying different thermally modified wood species to better understand the effect of wood species and its anatomy on the performance of proposed method for wood classification.

4 Conclusion

In this study, the stress wave generated by pendulum impact was acquired by an AE sensor and a pair of accelerometers for TMW classification. The stress wave velocity and the wood dynamic modulus of elasticity were measured from the stress wave timer experiment. The extracted features were used for classifying Western hemlock wood heat-treated at three different temperatures. Because there were no significant differences between the treatments, classification performance using the stress wave timer data was poor for all three studied neural networks. Interestingly, treatment temperature had a significant impact on the maximum, RMS, and energy of the AE signals. It was hypothesized this could be due to changes in wood porosity during the heat treatment. Consequently, using the extracted AE features was associated with a significantly higher performance of the neural networks, which was further improved when using a dimensionality reduction approach. However, only when using the wood moisture content measured by capacitance method in combination with the AE features a performance of 98% was reached with the LVQ neural network model. This could be an acceptable classification performance in an industrial application.

Throughout the analysis, it was demonstrated that the type of neural network can significantly affect the model performance. For example, the GMDH neural network showed higher performance when dealing with high dimension features, while LVQ was often better in cases having low dimension feature. The performance of the LVQ and the GMDH neural network took precedence over that of the MLP model and were effective in classifying a small size experimental dataset.

Overall, AE sensory features and neural network modeling seemed to be a promising NDE method for TMW classification that can be further investigated on different wood species. The potential of stress wave evaluation by acoustic emission sensory features for TMW classification suggests that it can also be studied for characterization of mechanical and physical properties of TMW.