**Larch wood defect definition and microscopic inversion analysis using the ELM near-infrared spectrum optimization along with WOA–SVM**,"

*BioResources*17(1), 682-698.

#### Abstract

Near-infrared spectroscopy is a mature non-destructive testing technique that can be applied effectively to identify and distinguish the structural characteristics of wood from a microscopic perspective. To accurately describe the morphology of wood panels on multiple scales and uncover the mechanisms determining the mechanical properties of wood, the present study was initiated by first defining four regions—the knot, fiber deviation, transition, and clear wood regions. On the surface of solid wood panels, and then a method was presented for inversing the microscopic morphology of larch wood panels based on near-infrared spectral feature extraction and modeling analysis. The experiments revealed that the combinatorial optimization conducted after the extreme learning machine feature band optimization can help effectively extract appropriate near-infrared feature wavelengths, reduce model dimension, and improve model applicability and accuracy. Therefore, the near-infrared models established based on the combination of the whale optimization algorithm and a support vector machine could accurately define and distinguish the four regions on the wood surfaces. Moreover, it was confirmed that the application of NIR spectral features along with the ELM–WOA–SVM algorithm can help optimize the traditional linear description that models the defect morphology as a cone to an accurate nonlinear description and to perform highly accurate nonlinear inversion of panel morphology.

Download PDF

#### Full Article

**Larch Wood Defect Definition and Microscopic Inversion Analysis Using the ELM Near-infrared Spectrum ****Optimization along with WOA–SVM**

Shen Pan, Keqi Wang,* Jinhao Chen, and Yizhuo Zhang

Near-infrared spectroscopy is a mature non-destructive testing technique that can be applied effectively to identify and distinguish the structural characteristics of wood from a microscopic perspective. To accurately describe the morphology of wood panels on multiple scales and uncover the mechanisms determining the mechanical properties of wood, the present study was initiated by first defining four regions—the knot, fiber deviation, transition, and clear wood regions. On the surface of solid wood panels, and then a method was presented for inversing the microscopic morphology of larch wood panels based on near-infrared spectral feature extraction and modeling analysis. The experiments revealed that the combinatorial optimization conducted after the extreme learning machine feature band optimization can help effectively extract appropriate near-infrared feature wavelengths, reduce model dimension, and improve model applicability and accuracy. Therefore, the near-infrared models established based on the combination of the whale optimization algorithm and a support vector machine could accurately define and distinguish the four regions on the wood surfaces. Moreover, it was confirmed that the application of NIR spectral features along with the ELM–WOA–SVM algorithm can help optimize the traditional linear description that models the defect morphology as a cone to an accurate nonlinear description and to perform highly accurate nonlinear inversion of panel morphology.

*DOI: 10.15376/biores.17.1.682-698*

*Keywords: Solid wood panels; Near-infrared spectroscopy; Feature bands; Morphology inversion*

*Contact information: College of Mechanical and Electrical Engineering, Northeast Forestry University, Harbin 150040 China; *Corresponding author: zdhwkq@hotmail.com*

**INTRODUCTION**

Wood is a natural composite material with an irregular growth pattern. Wood grain and defect morphology of a panel can lead to a significant reduction in the panel’s stiffness and strength. Research by Daval *et al. *(2015) shows that an accurate description of the structural characteristics and morphological distribution of defects is of great significance for a better understanding of the mechanical properties of the panel. It can be seen from the work of Hetemäki and Hurmekoski (2016) that the manual identification of defects is labor-intensive and time-consuming. There are two widely applied approaches to overcome this problem and thereby improve production efficiency: near-infrared (NIR) non-destructive wood inspection from a microscopic perspective and finite element modeling of wood using a macroscopic approach. However, the NIR inspection method does not consider panel morphology, and the finite element modeling method is complicated, with low accuracy and long processing times.

NIR spectroscopy is a mature non-destructive testing technique that can effectively identify and distinguish the structural characteristics of wood. In recent years, Belkacemi *et al. *(2016) and Tsuchikawa and Büyüksarı (2015) have applied spectral analysis methods to predict mechanical properties. Isik *et al. *(2011) used the NIR analysis method along with a least squares support-vector machine (SVM) to establish a model for rapidly predicting wood density and mechanical strength and achieved good prediction performance. Olsson *et al. *(2013) proposed the application of laser imaging for measuring fiber angle on solid wood surfaces. They predicted the status of defects in wood, and estimated wood-related mechanical properties. Yuka *et al. *(2018) investigated the effect of density, which is closely related to mechanical properties, on the lateral mechanical performance of wood in the longitudinal direction. The abovementioned studies mainly focused on the mechanical analysis of defect-free samples and defect types, and the analyses were carried out using methods such as spectrum optimization and nonlinear modeling. By conducting micro-mechanical tests, As *et al. *(2018) explored the mechanical properties of birch and oak wood bent at different locations, investigating both the tension and compression sides of the wood. Their study, however, did not clearly define the microstructure of defective panels, thus failing to provide an accurate description of the panel structure or produce mechanical predictions.

Finite element analysis methods that model nonlinear wood using numerical approximations have been applied in numerous studies, focusing on the effects of heterogeneity in the distribution of wood materials under a variety of stress and strain fields. Sarnaghi and van de Kuilen (2019) used the results of finite element analysis to predict the tensile strength of wood with knots. Grazide *et al.* (2018) modeled the bending process of maritime pine wood, and Brunetti *et al. *(2020) predicted the dynamic elastic modulus of beech wood with knots and graded the wood. Li *et al. *(2020) simulated the effect of structural changes on the compressive strength of laminated veneer lumber. Hu *et al.* (2018) proposed multi-surface failure criteria based on microstructures to describe the brittle and ductile failure mechanisms of wood but portrayed the defect as a cone and did not divide the wood into different regions. Hackspiel *et al. *(2014) divided wood into four regions based on the fiber orientation: the knot, fiber deviation, transition, and clear wood regions. They used the finite element method to perform stress modeling on wood with double knots. However, they could not accurately define the transition and fiber deviation regions. NIR spectroscopy can measure the chemical information of substances. On a microscopic level, the relationship between NIR spectral features and mechanical properties can be usually revealed by applying spectral downscaling along with a feature extraction approach and by establishing traditional linear or nonlinear regression models, without describing the wood morphology. For describing macroscopic wood morphology and analyzing mechanical properties, the finite element analysis method can only be used to construct the morphology of the panel regions, and it cannot precisely define the regions or reflect the mechanisms of change in the microstructures.

Based on the region definition theory proposed by Hackspiel *et al*. (2014), in the present study, the region definition method was described using the spectral analysis technique from a microscopic perspective. For redundant spectral information, the extreme learning machine (ELM) combinatorial feature optimization method was applied to extract useful features, and an SVM method applicable for modeling small samples and the whale optimization algorithm (WOA) parameter optimization theory were used to identify and inverse the four regions of defective solid wood panels. The end goal was to describe the structure of solid wood panels more accurately.

**EXPERIMENTAL**

**Materials**

Larch panel samples with a size of 200×50×20 mm^{3} were used in the experiments. Before performing the tests, the samples were conditioned at a relative humidity of 65% and a temperature of 20 °C until reaching an equilibrium moisture content. The spectral acquisition equipment is shown in Fig. 1. A SPECIM FX series industrial hyperspectral camera (Specim, Oulu, Finland) was used. The wavelengths captured ranged from 935.61 nm to 1720.23 nm, with a spectral resolution of 3.45 nm to 3.58 nm and 224 bands.

**Fig. 1. **Spectral acquisition equipment

**Fig. 2. **Schematic diagrams of the regions on a larch panel specimen

**Fig. 3.** Schematic diagram showing ENVI5.3 spectral acquisition

**Fig. 4. **Near-infrared spectral image

The sample and schematic diagrams of the regions are depicted in Fig. 2. According to Lang and Kaliske (2013), the fiber growth direction in the panel gradually changes from being parallel to the panel surface to encircling the defect at an angle to the panel surface. Based on the fiber orientation in the panel, the region where the fiber growth direction is parallel to the X-axis is defined as the clear wood region; the region where the fiber growth direction is parallel to the XY-plane, but at an angle to the X-axis, is defined as the transition region; the region where the fiber growth direction is at an angle to the XY-plane is defined as the fiber deviation region; and a knot is defined as the knot region. Using ENVI 5.3, 240 pixels were randomly extracted from each of four regions, among which 160 pixels were randomly selected as training samples and the remaining 80 as test samples. The acquisition interface for feature point extraction in the regions is shown in Fig. 3, and the spectral image of a pixel is shown in Fig. 4.

**Material Preparation and Near-Infrared (NIR) Spectral Acquisition**

After the spectral acquisition of the larch specimens, the spectral data were preprocessed using the first-order derivative and polynomial smoothing (S–G) methods. The original spectra and the preprocessing results are shown in Figs. 5 through 8. Notably, the first-order derivative and S–G smoothing were applied to highlight the dominant features of the signal, while filtering out the noise.

**Fig. 5.** Spectral data of the clear wood region: (a) original spectrum, (b) first-order derivative, and (c) first-order derivative and polynomial smoothing (S¨CG) methods

**Fig. 8.** Spectral data of the knot region: (a) original spectrum, (b) first-order derivative, and (c) first-order derivative and polynomial smoothing (S¨CG) methods

As observed in Figs. 5 through 8, the first-order derivative and S–G smoothing methods could effectively eliminate the effects of panel particle sizes, surface scattering, and changes in the optical path on the NIR diffuse reflectance spectra. In addition, the NIR spectra of different types of defects were in good agreement. The spectral information of the clear wood region and the defect largely differed from one another, which indicated that the densities of the two regions and their mechanical properties were clearly different, whereas the transition region and the fiber deviation region exhibited similar spectral information, which indicated similar mechanical properties.

The four regions can be accurately identified based on the differences in fiber angle, but it is difficult to determine the boundaries of these regions. Due to the ambiguity in the definition of wood regions and the complexity of wood morphology, different regions overlap with each other, and thus the regions cannot simply be modeled linearly. Therefore, the linear-array push-broom imaging method was adopted in the spectral acquisition process, using which we obtained the spectral information of each pixel in a target region during high-speed imaging. Unlike the point collection method that uses a handheld probe, the linear-array push-broom imaging method considers pixels as units, correlating each pixel with the corresponding spectra in a coordinate system. The pixels exhibiting typical morphological features within the four regions were extracted, excluding the ones with ambiguous features in the intersections between different regions. As a result, the accuracy of the spectral data was effectively improved.

**Methods**

*Extreme learning machine-based spectral feature extraction method*

The greatest advantage of ELM in comparison with traditional neural networks is that its learning speed is faster, and it has a guaranteed learning accuracy. Consequently, it takes less time to optimize 224 sets of spectral data when compared to traditional algorithms.

For a single hidden layer neural network, assume that there are *N *arbitrary samples, as shown in Eqs. 1 and 2,

where *X _{i} *and

*t*are the arbitrary samples.

_{i}Subsequently, a single hidden layer neural network with *L* hidden layer nodes can be expressed as Eq. 3,

where *h(x)* is the activation function, *W _{i} = *[

*wi1, wi2, ⋯, win*]

*is the input weight,*

^{T}*β*is the output weight, and

_{i}*b*is the bias of the

_{i}*i*-th hidden layer unit.

The learning objective of the single hidden layer neural network is to minimize the error of the output, which can be expressed as Eqs. 4 and 5,

where there exists *βi*, *Wi*, and *bi* such that,

which can be expressed in the matrix form shown in Eq. 6,

where *H* is the output of the hidden layer node, *β *is the output weight, and *T* is the desired output, yielding Eq. 7, Eq. 8, and Eq. 9,

*Whale optimization algorithm–support vector machine algorithm*

The WOA–SVM algorithm is a combination of the whale optimization algorithm and the SVM. The WOA was inspired by the behavior of whales in rounding up their prey, and the SVM improves its generalization ability using the Vapnik–Chervonenkis dimension in statistical learning theory and the structural risk minimization principle. Combining WOA with SVM can reduce the complexity of the approximation function while ensuring data accuracy, which is particularly advantageous for solving nonlinear problems with small samples.

As the location of the optimal solution in the search space is unknown a priori, the WOA assumes that the current optimal candidate solution is the target prey or that it is close to optimal. After the optimal search agent is defined, the other search agents will try to update their positions in order to find the optimal search agent. Figure 9 illustrates the basic principle of this approach, applied in a two-dimensional problem, where the position of the search agent can be updated to (*X ^{*}*,

*Y*) based on the position of the current optimal record (

^{*}*X*,

*Y*). This behavior can be expressed by Eqs. 10 and11,

where *t* denotes the current number of iterations, *A* and *C* are the coefficient vectors, *X ^{*}* is the position vector of the best solution obtained thus far,

*X*is the position vector, | | denotes the absolute value, and denotes element-by-element multiplication. If a better solution is available, then

*X*is updated in each iteration. The vectors

^{*}*A*and

*C*are calculated according to Eqs. 12 and 13,

Throughout the entire iteration process,linearly decreases from 2 to 0, while andare random vectors in [0, 1].

**Fig. 9.** Position vector and its possible next position (*X ^{*}* being the best solution obtained thus far)

The search agent can be forced away from the reference whale by using *A* with a random value greater or less than 1. The position of a search agent in the exploration phase can be updated based on a randomly selected search agent, with |*A*| greater than 1 to emphasize the exploration, and by allowing the WOA to perform a global search. The possible positions that can be reached from (*X*, *Y*) to (*X ^{*}*,

*Y*) in a two-dimensional space with 0 less than or equal to

^{*}*A*, which is less than or equal to 1 are shown in Fig. 10. The corresponding mathematical model is shown in Eq. 14,

**Fig. 10. ** New position realized by the bubble net contraction mechanism in the WOA (*X ^{*}* being the best solution obtained thus far)

**Fig. 11.** Process of identifying regions on defective larch panels based on the NIR spectral features along with the ELM–WOA–SVM algorithm

Process of Larch Panel Morphology Definition and Inversion Based on the Extreme Learning Machine-Whale Optimization Algorithm-Support Vector Machine (ELM-WOA-SVM) Algorithm

Panels may have different structural morphologies owing to the free combination of the four wood regions. Therefore, there can be multiple solutions under the same mechanical property index. Based on a front-end numerical analysis model, a multi-regional defect structure optimization method was developed using the NIR spectral features, as well as the ELM–WOA–SVM algorithm. The process of morphology definition and inversion for defective larch panels based on the NIR spectral features and the ELM–WOA–SVM algorithm is shown in Fig. 11.

**RESULTS AND DISCUSSION**

**Extreme Learning Machine (ELM) Feature Extraction and Combinatorial Optimization**

The prediction accuracy of different bands was obtained *via* ELM feature extraction. The combinatorial optimization approach adopted by the ELM ranked the feature bands according to their corresponding prediction accuracy, and the final result with the least input datasets and the highest accuracy was obtained through multiple iterations. The connection weight between the ELM input layer and the hidden layer, as well as the threshold of the hidden layer, can be set randomly, without the need for modification after setting. The connection weight (*β*) between the hidden and output layers does not require iteration adjustment but is determined once by solving the equation set. Such rules help to achieve good model generalization ability and increased computation speed.

**Table 1.** Top 40 Sets of Data Ranked by Spectral Prediction Accuracy

The preprocessed 224 wavelength pixels were taken as extraction objects. The wavelength bands were ranked according to their accuracy in panel region identification, and the results of the spectral influence degree were sorted in a table. The top 40 sets of data, ranked by spectral prediction accuracy, are listed in Table 1. The results of the combinatorial optimization are shown in Fig. 12a. The combinatorial optimization was performed on spectral data sets 1 through 40, and it can be seen from Fig. 12a that the combination of 12 sets of spectral data extracted *via* the ELM method has the highest accuracy.

**Fig. 12. **Combinatorial optimization prediction results: (a) ELM, (b), KF, and (c) SA

**Table 2. **Combinatorial Optimization Results with Different Optimized Features

The combinatorial optimization process not only can retain key information, but it also can effectively filter out redundant information to reduce complexity. As presented in Table 2, the ELM combinatorial optimization effectively reduces the feature dimension, providing the highest prediction accuracy among the three methods.

Whale Optimization Algorithm -Support Vector Machine (WOA-SVM) Algorithm Wood Region Identification

Using the WOA–SVM optimization method, the whale with the smallest fitness value was selected as “the best solution obtained, so far.” Each iteration was updated by a randomly generated *p*-value until the number of iterations was satisfied.

As there were four wood regions to be distinguished, to reduce the classification difficulty, the radial basis function (RBF) kernel function was chosen to map the samples to an infinite-dimensional feature space for classification. The iteration process of the parameter optimization of RBF is shown in Fig. 13. It can be seen from the graph that, after several iterations of optimization, he value of the objective function no longer changes, and the final optimal parameters are determined as kernel parameter (*γ*) equals 0.2056 and penalty parameter (c) equals 228.1693. In accordance with the aforementioned parameters, the optimized spectral features were used for modeling, and identification experiments were conducted for the four wood regions with 320 test samples. The results of the classification after band optimization are compared in Table 3.

**Fig. 13.** Fitness curves

**Table 3. **Comparison of Wood Classification Results

The experimental results show that the WOA–SVM classification method achieved an identification accuracy of 98.75%, 93.75%, 88.75%, and 100% for the knot, fiber deviation, transition regions, and the clear wood regions, respectively, with an average accuracy of 95.31%. As can be seen from the data, the transition, fiber deviation, and clear wood regions had similar NIR features, and the ELM combinatorial optimization along with the WOA-optimized SVM algorithm was able to effectively identify different wood regions, especially the transition region. ELM combinatorial optimization allows the effective identification and inversion of the wood regions with a minimum number of bands, and WOA–SVM enables the effective classification of the wood when the features have multiple inputs. The understanding of irregularly grown defects is significant for the study of wood stiffness and strength, which helps to bring economic benefits to those who produce high-grade and high-yielding wood.

**Nonlinear Panel Morphology Inversion**

As the material properties of wood are highly anisotropic, the influence of fiber orientation on the mechanical properties of wood panels is pronounced. The high variability of the stiffness and strength of wood on a dimensional scale is mainly caused by the fiber deviation near the knots. The lack of information regarding the effects of growth irregularity on the mechanical properties of wood panels urges us to study these defects by experimental measurements and physically based numerical simulations. Wood is a nonlinear material, and the morphology of its defects cannot simply be modeled using regular cones. The density of the transition region and fiber deviation region is also to a certain extent different from that of clear wood. Wood exhibits complex morphological variations between the knot region and clear wood region. Therefore, it is necessary to precisely define the morphology of the four wood regions and their boundaries, establish a nonlinear descriptive model for each region on the panel surface, and grade the wood to make the best use of its properties.

The absence of an accurate description for the morphology of defect-containing panels makes it difficult to study these defects through physically based numerical simulations. Moreover, the method used for the prediction of the mechanical properties of panels can be further improved using linear models. The morphology of wood surfaces revealed *via* nonlinear inversion based on the description of panel surfaces with NIR spectral information are compared in Fig. 14, and the inversion results are shown in Fig. 15.

**Fig. 14.** Comparison of the inversion results of linear modeling and nonlinear modeling