Living Tree Moisture Content Detection Method Based on Intelligent UHF RFID Sensors and OS-PELM

Moisture content (MC) detection plays a vital role in the monitoring and management of living trees. Its measurement accuracy is of great significance to the progress of the forestry informatization industry. Targeting the drawbacks of high energy consumption, low practicability, and poor sustainability in the current field of living tree MC detection, this work designs and implements an ultra-high-frequency radio frequency identification (UHF RFID) sensor system based on a deep learning model, with the main goals of non-destructive testing and high-efficiency recognition. The proposed MC diagnostic system includes two passive tags which should be mounted on the trunk and one remote data processing terminal. First, the UHF reader collects information from the living trees in the forest; then, an improved online sequential parallel extreme learning machine algorithm (OS-PELM) is proposed and trained to establish a specific MC prediction model. This mechanism could self-adjust its neuron network structure according to the features of the data input. The experimental results show that, for the entire living tree dataset, the MC prediction model based on the OS-PELM algorithm can identify the MC level with a root-mean-square error (RMSE) of no more than 0.055 within a measurement range of 1.2 m. Compared with the results predicted by other algorithms, the mean absolute error (MAE) and RMSE are 0.0225 and 0.0254, respectively, which are better than the ELM and OS-ELM algorithms. Comparisons also prove that the prediction model has the advantages of high precision, strong robustness, and broad applicability. Therefore, the designed MC detection system fully meets the demand of forestry Artificial Intelligence of Things.


Introduction
In recent years, the smart utilization and protection of forest resources have become increasingly important. How to efficiently manage forest wealth is a common topic of study all over the world. Currently, making full use of living trees for the terrestrial ecosystem carbon cycle, industrial material production, wildlife habitats, and so on, are the main directions of forestry research [1]. From the microscopic point of view, the standing tree is a complex porous medium composed of wood, gas, and water within a certain structure. In particular, water is inseparable from the various physiological activities of living trees [2]. Therefore, it is necessary to regularly monitor the moisture content (MC) in trees at different growth stages to study and estimate the health status of each tree, providing a practical basis for the diagnosis of wood decay and tree irrigation. As a result, the real-time and accurate measurement of living tree MC is of great significance to the effective development of forestry informatization engineering.
There are several existing techniques for detecting the MC level of woods. The ovendrying method requires the sample to be taken back to the laboratory, and then the MC can be obtained only after complicated calculation processing. This method is quite timeconsuming and laborious, and it has generally been used in calibrations [3]. The traditional

•
System architecture: A non-destructive, sustainable, and passive UHF RFID sensor for living tree MC detection has been designed, tested, and evaluated. • Machine learning model: The neuron network structure of the existing sequential extreme learning machine is optimized, the idea of multiple hidden layers is introduced, and an advanced OS-PELM is proposed. • MC prediction: Based on the OS-PELM algorithm, an MC prediction model for living trees is established, and its performance is proved by multi-dimensional experiments to be fully in line with the modern forestry informatization industry. • Application feasibility: The design constraints of the proposed MC detection system are discussed, and its generalization ability is analyzed from the perspective of different measuring distances and MC levels.
The rest of this article is organized as follows. Section 2 introduces the related work in the field of UHF RFID wood MC detection. Section 3 presents the sensor system design and predictive model construction, including the selection of sensor tags and the operational principle of proposed algorithm. Section 4 describes the collected dataset and compares the inference performance of the OS-PELM model to demonstrate its superiority and stability. Finally, Section 5 summarizes the whole work.

Related Work
Various technical means for real-time detection of wood MC, and using UHF RFID technology for non-destructive testing in the IoT industry, have been proposed by scholars, which have a certain reference value for this article.

Related Literature on Wood MC Detection
In [12], Anton Fuchs et al. introduced a measurement principle for online wood moisture determination based on capacitive sensing and tested it using a laboratory prototype in a drying chamber. The experimental results show that the proposed scheme can be used to perform the preliminary detection of moisture, but the industrialization of the proposed method may still need verification. In [13], the authors proposed a capacitive multi-wavelength sensor for the gradient sensing of wood MC. By extending and modifying the previous research results, the change in positive MC gradient could be determined, which improved the accuracy of the traditional capacitive sensor. Tamme et al. proposed a new polarization-type moisture meter in [14], which improved the calibration method of the traditional resistance-type wood moisture meter. The essence of the resistance method is to use the relationship between water content and direct current conductance to measure the MC. It can also be used to detect the wood drying stage and determine the season of growing plants. The resistance method and the dielectric constant method are more flexible and are commonly used in practical measurement; however, they all need to be inserted into the trunk to a certain depth, which must cause considerable damage to the living tree. Moreover, the resistance method is only suitable for measuring target wood with an MC between 5% and 30%, as the accuracy of this detection method would decrease sharply beyond this range. Although many technical proposals are currently adopted for the MC detection of living wood, the problems of high cost, low applicability, and high energy consumption have not been reasonably resolved.

Related Literature on UHF RFID
In recent years, the development of passive UHF RFID has resulted in a new method for cost-efficient wireless communication. This technique does not require bulky silicon chips, instead using electromagnetic signatures to encode data, reducing the cost of RFID tags [15]. In addition, it has the characteristics of backscatter transmission and non-insertion detection, which provides an innovative solution for humidity-sensing research in various areas. In [16], Joan Melià-Seguí et al. deployed multiple RFID tags inside a car to measure the RSSI and RF phases. They found the sensitivity of the RSSI and RF phases to the water, and creatively applied RFID technology to humidity detection in the interior space of cars. Pichorim et al. demonstrated that RFID chips have the ability to detect soil wetness, and they carried out a preliminary experiment to certify this [17], but they did not build a complete MC prediction model. Rafael V. et al. proposed a sensing system for monitoring soil moisture by using UHF RFID tags buried in the soil, and they established an MC prediction model based on neural networks. The experimental results proved the feasibility of their idea [18]. However, due to the insufficient generality and robustness of the neural network model, their research results still have room for improvement. At present, there are few traditional algorithms proposed to solve the problem of MC retrieval using the information obtained from RFID sensors [19,20].
Thus far, existing studies have demonstrated the application prospects of UHF RFID technology in the field of MC detection. However, to the best of our knowledge, there is no relevant research report using this method to detect the MC of living wood. This article focuses on moisture monitoring sensors to provide a state-of-the-art solution for the development of Internet of Things in forestry.

Materials and Methods
This section introduces the MC prediction system, including an efficient machine learning model. It is divided into several parts: sensing principle, system structure, OS-PELM algorithm design, and implementation scheme.

Sensor Description
The operational object of this MC detection mechanism is an UHF RFID system capable of receiving tag signals, including devices such as RFID tags, an antenna, and a reader, as shown in Figure 1. In addition to reliably verifying the ID number of each tag, the reader accurately returns an RSSI value of the backscatter signal. The system also includes a computing terminal responsible for processing the signal information and analyzing the MC condition. Note that the practical MC level of living wood is calibrated by a MD914 high-precision wood moisture meter in the testing stage [21]. At the same time, the nearby air humidity, the DBH of the wood, the distance between tags, and the reader's antenna are collected and recorded as supplementary parameters to construct a deep learning prediction dataset as accurately as possible.
This section introduces the MC prediction system, including an efficient machine learning model. It is divided into several parts: sensing principle, system structure, OS-PELM algorithm design, and implementation scheme.

Sensor Description
The operational object of this MC detection mechanism is an UHF RFID system capable of receiving tag signals, including devices such as RFID tags, an antenna, and a reader, as shown in Figure 1. In addition to reliably verifying the ID number of each tag, the reader accurately returns an RSSI value of the backscatter signal. The system also includes a computing terminal responsible for processing the signal information and analyzing the MC condition. Note that the practical MC level of living wood is calibrated by a MD914 high-precision wood moisture meter in the testing stage [21]. At the same time, the nearby air humidity, the DBH of the wood, the distance between tags, and the reader's antenna are collected and recorded as supplementary parameters to construct a deep learning prediction dataset as accurately as possible. Here, the reader adopted was the off-the-shelf UHF RKF918, a full-featured micro reader which can work in the frequency band of 840-960 MHz. The UHF-R200 module equips a multi-tag anti-collision architecture and supports the EPC Gen2 protocol [22]. It can read and write RFID tags up to 20 m. The antenna used in the experiment was a RYT-280 8.5 dBi circularly polarized antenna, which adopts a dual-feed circularly polarized design to meet the requirements of small size, high gain, and low voltage standing wave ratio.
In order to improve the testing efficiency of this measuring scheme in practical application scenarios, we selected six types of the most common UHF RFID tags in the academic field [23], as shown in Figure 2. The sensitivity of these tags to the reading distance and wood MC was examined and compared through the following procedures in advance. The groups of six different tags are numbered as label 1 to label 6, in sequence. Each sample has two paired tags, one for reference and the other for real sensing: the sensing tag should be placed on the opposite side of the trunk, far from antenna, while the close-by control tag is used for comparison, directly facing the reader. When the radio wave travels through the wood, it declines based on some related factors (especially the Figure 1. Structure of the moisture content monitoring system. The system includes an UHF RFID reader and antenna, computing terminal, multiple sets of measuring tags, and different measured woods.
Here, the reader adopted was the off-the-shelf UHF RKF918, a full-featured micro reader which can work in the frequency band of 840-960 MHz. The UHF-R200 module equips a multi-tag anti-collision architecture and supports the EPC Gen2 protocol [22]. It can read and write RFID tags up to 20 m. The antenna used in the experiment was a RYT-280 8.5 dBi circularly polarized antenna, which adopts a dual-feed circularly polarized design to meet the requirements of small size, high gain, and low voltage standing wave ratio.
In order to improve the testing efficiency of this measuring scheme in practical application scenarios, we selected six types of the most common UHF RFID tags in the academic field [23], as shown in Figure 2. The sensitivity of these tags to the reading distance and wood MC was examined and compared through the following procedures in advance. The groups of six different tags are numbered as label 1 to label 6, in sequence. Each sample has two paired tags, one for reference and the other for real sensing: the sensing tag should be placed on the opposite side of the trunk, far from antenna, while the close-by control tag is used for comparison, directly facing the reader. When the radio wave travels through the wood, it declines based on some related factors (especially the water content), so the RSSI values of two tags should differ greatly, making full use of their interaction relationship.
In order to confirm the discrimination of RSSI values received by the reader, a custom antenna is temporary placed one meter away from each group. The corresponding measurement results are shown in Figure 3.  In order to confirm the discrimination of RSSI values received by the reader, a custom antenna is temporary placed one meter away from each group. The corresponding measurement results are shown in Figure 3. For using the RSSI value to establish an MC prediction model more accurately, it is required that the changes in numerical value should be more sensitive to the distance between the antenna and tags. That is, the measured RSSI value of the sensing tag and the control tag should have a larger disparity. It is apparent that tag 1 is the most sensitive RFID during the signal propagation process (the difference between the measured value and the average control value is 19 dBm). Therefore, the proposed MC diagnosis sensor is implemented by the square four-corner label, as shown in Figure 4. The tag uses transparent polyvinyl chloride as a waterproof coating and can be attached on the trunk safely. water content), so the RSSI values of two tags should differ greatly, making full use of their interaction relationship. In order to confirm the discrimination of RSSI values received by the reader, a custom antenna is temporary placed one meter away from each group. The corresponding measurement results are shown in Figure 3. For using the RSSI value to establish an MC prediction model more accurately, it is required that the changes in numerical value should be more sensitive to the distance between the antenna and tags. That is, the measured RSSI value of the sensing tag and the control tag should have a larger disparity. It is apparent that tag 1 is the most sensitive RFID during the signal propagation process (the difference between the measured value and the average control value is 19 dBm). Therefore, the proposed MC diagnosis sensor is implemented by the square four-corner label, as shown in Figure 4. The tag uses transparent polyvinyl chloride as a waterproof coating and can be attached on the trunk safely. For using the RSSI value to establish an MC prediction model more accurately, it is required that the changes in numerical value should be more sensitive to the distance between the antenna and tags. That is, the measured RSSI value of the sensing tag and the control tag should have a larger disparity. It is apparent that tag 1 is the most sensitive RFID during the signal propagation process (the difference between the measured value and the average control value is 19 dBm). Therefore, the proposed MC diagnosis sensor is implemented by the square four-corner label, as shown in Figure 4. The tag uses transparent polyvinyl chloride as a waterproof coating and can be attached on the trunk safely.

UHF RFID Technology
The sensing process of UHF RFID technology includes two main parts: one is the signal transmission between the tag chip and the reader, and the other is the information communication between the RFID reader and the processing computer. As shown in Figure 5, the communication process between the UHF RFID tag and the reader adopts the backscatter modulation technique: it basically uses the influence of the sensing object's variation in the backscattering signal characteristics of the RFID system to sense the change in the target state [24]. The RFID reader can provide some important information coefficients used as sensing parameters in wood MC detection scenarios, such as RSSI, Phase, and Doppler frequency shift. The RSSI from a tag is determined by a number of factors, including the tag design, its distance to the reader, and the environment (i.e., the presence of objects affecting the signal propagation). It is relatively easier to obtain the RSSI in a complex forest environment, and to reflect the characteristics of the transmission medium between the tag and reader [25].
Based on free space, polarization matching, no loss, and port matching, the signal power received by the receiving UHF RFID antenna is: The meanings of the parameters are shown below, in Table 1.

UHF RFID Technology
The sensing process of UHF RFID technology includes two main parts: one is the signal transmission between the tag chip and the reader, and the other is the information communication between the RFID reader and the processing computer. As shown in Figure 5, the communication process between the UHF RFID tag and the reader adopts the backscatter modulation technique: it basically uses the influence of the sensing object's variation in the backscattering signal characteristics of the RFID system to sense the change in the target state [24].

UHF RFID Technology
The sensing process of UHF RFID technology includes two main parts: one is the signal transmission between the tag chip and the reader, and the other is the information communication between the RFID reader and the processing computer. As shown in Figure 5, the communication process between the UHF RFID tag and the reader adopts the backscatter modulation technique: it basically uses the influence of the sensing object's variation in the backscattering signal characteristics of the RFID system to sense the change in the target state [24]. The RFID reader can provide some important information coefficients used as sensing parameters in wood MC detection scenarios, such as RSSI, Phase, and Doppler frequency shift. The RSSI from a tag is determined by a number of factors, including the tag design, its distance to the reader, and the environment (i.e., the presence of objects affecting the signal propagation). It is relatively easier to obtain the RSSI in a complex forest environment, and to reflect the characteristics of the transmission medium between the tag and reader [25].
Based on free space, polarization matching, no loss, and port matching, the signal power received by the receiving UHF RFID antenna is: The meanings of the parameters are shown below, in Table 1. The RFID reader can provide some important information coefficients used as sensing parameters in wood MC detection scenarios, such as RSSI, Phase, and Doppler frequency shift. The RSSI from a tag is determined by a number of factors, including the tag design, its distance to the reader, and the environment (i.e., the presence of objects affecting the signal propagation). It is relatively easier to obtain the RSSI in a complex forest environment, and to reflect the characteristics of the transmission medium between the tag and reader [25].
Based on free space, polarization matching, no loss, and port matching, the signal power received by the receiving UHF RFID antenna is: The meanings of the parameters are shown below, in Table 1.  According to Equation (1), after determining P r , G tag , P tx , and G tx , the maximum readable distance, dm, of the tag is: In the actual process of applying the RFID sensing system, the backscattered power of the tag is an important parameter. Additionally, based on Equation (1), the backscattered power received by the reader can be calculated by the following equation [26]: The transmission power of the reference signal in the free space is used as the theoretical reference of this paper, and a prediction scheme is proposed according to Equation (3). The magnitude of the backscattered power P tag-back depends on several factors: when the tag is fixed in the practical working site, all parameters except ∆ can be considered as constant. In this study, the coefficient ∆ reflects the change in the dielectric properties of the transmission medium between the tag and the reader, which is mainly affected by the moisture content of the wood. Therefore, RSSI can be used to infer the MC level of living wood.

Online Sequential Parallel Extreme Learning Machine
The extreme learning machine (ELM) is an important branch of the single hidden layer feedforward neural network, in which the parameters of input weights and hidden layer bias can be initialized randomly, and only the output weights need to be optimized [27,28]. The parallel extreme learning machine (PELM) is proposed on the basis of ELM, and the advantage is that the input layer is simultaneously mapped to various hidden layers with different activation functions, which can concurrently learn the heterogeneous features from the inputs. Figure 6 shows the structure of the proposed OS-PELM model. The algorithm has the following three advantages:

•
In the input layer, two single hidden layers and a single-layer feedforward neural network can transmit information simultaneously.

•
The original input information in the middle can also be directly fed to the output layer, which enhances the linear data processing.

•
Neurons with the property of online sequential learning are introduced. The current prediction is largely dependent on the features of the current training data, while the former data are discarded gradually after the last learning period.  The OS-PELM learning process is basically divided into two parts: one is the initial phase, in which initial output weights could be obtained through a small number of samples; the other is the online learning phase, where the data blocks should be imported into the network in order, and the output weights can then be updated. Here, we consider N arbitrary samples {(xt, yt), t = 1, 2, …, N}, where xt = [x1t, x2t, x3t, …, xnt] T ∈ R n refers to the n-dimensional feature vector of the t-th sample, and yt is the output vector of the t-th sample. The weights between the input layer and two parallel hidden layers are defined as ρ and φ; b1 and b2 refer to the biases of hidden layers; β1 and β2 are the output weights between the hidden layers and output layer; and ω is a matrix that has the weight values directly connecting the input layer and output layer. h(·), g(·) and f(·) represent the activation functions of the hidden layers and output layer, respectively. Note that the input data are divided into two groups (x1-xm) and (xm+1-xn), which correspond to the system-dependent parameters (the distance from reader to tag, RSSI value of the control tag, and RSSI value of the sensing tag) and environment-dependent parameters (DBH and the air humidity). The aim is to analyze the MC attributes of living trees more accurately based on the features of different kinds of parameters. Then, the output yT of OS-PELM is as follows: Here, for strict calculation purposes, x 1 m and x m+1 n are expanded to n dimensions with zero filling in the blanks. Thus, Equation (7) can be rewritten as: where the calculation rules of H and G are as follows: The OS-PELM learning process is basically divided into two parts: one is the initial phase, in which initial output weights could be obtained through a small number of samples; the other is the online learning phase, where the data blocks should be imported into the network in order, and the output weights can then be updated. Here, we consider . , x nt ] T ∈ R n refers to the n-dimensional feature vector of the t-th sample, and y t is the output vector of the t-th sample. The weights between the input layer and two parallel hidden layers are defined as ρ and ϕ; b 1 and b 2 refer to the biases of hidden layers; β 1 and β 2 are the output weights between the hidden layers and output layer; and ω is a matrix that has the weight values directly connecting the input layer and output layer. h(·), g(·) and f (·) represent the activation functions of the hidden layers and output layer, respectively. Note that the input data are divided into two groups (x 1 -x m ) and (x m+1 -x n ), which correspond to the system-dependent parameters (the distance from reader to tag, RSSI value of the control tag, and RSSI value of the sensing tag) and environment-dependent parameters (DBH and the air humidity). The aim is to analyze the MC attributes of living trees more accurately based on the features of different kinds of parameters. Then, the output y T of OS-PELM is as follows: Here, for strict calculation purposes, x m 1 and x n m+1 are expanded to n dimensions with zero filling in the blanks. Thus, Equation (7) can be rewritten as: where the calculation rules of H and G are as follows: In addition, the objective function of PELM is equivalent to the optimization problem of ELM. The output weight β can be determined by the least-norm least-squares solution.
After entering the online learning stage, in the k + 1-th (k = 0, 1, . . . ) learning stage, the newly arrived N k+1 samples are input into the proposed model, and β (k+1) should be recalculated as: where the determination of F k+1 is as follows:

Structural Optimization of OS-PELM
Nevertheless, the OS-PELM architecture still has some shortcomings: due to the online sequence module, the pre-given network structure may no longer be able to achieve the expected prediction accuracy. Therefore, an optimization skill is introduced as described below.
When OS-PELM is in the online learning stage, the hidden layer neurons are divided or merged according to their contribution to the prediction results, and the network structure is adjusted to highlight the time effectiveness of the training network and ensure its stability and accuracy. Here, the degree of contribution is defined as: where C i and C j represent the degrees of two hidden layer neurons, respectively. β i and β j are the output weights of the i-th and j-th neurons. λ i and λ j are the output values. Whenever the degree of a neuron exceeds the highest threshold (C Hth ) or jumps below the lowest threshold (C Lth ), this original neuron is split into several new neurons or merged with other nearby neurons. For the weights between the input layer and the two parallel hidden layers, ρ and ϕ, the bias of hidden layers, b, and the output weights between hidden layers and the output layer, β, specific adjustment rules are set, as follows: (20) Here, the input weights of divided neurons remain the same as before, and the output parameters must be multiplied by a variation factor Ω. Meanwhile, the merged neurons are removed and the previous neuron's output weight β should be as shown in Equation (22): Note that β delete , β original , and β new are the output weights of the deleted neuron, the original neighboring neuron, and the newly merged neuron, respectively. In summary, the whole working procedure of OS-PELM is given in Algorithm 1.

Algorithm 1 Proposed OS-PELM
, two hidden layer node number Z1, Z2, thresholds C Hth , C Lth . Output: The actual predicted value Y T . 1: Initialize: Randomly generate weights ρ, ϕ, ω, biases b 1t , b 2t . 2: Calculate the initial output weight matrix β (0) by using Equations (9) (17) and (18). 6: if one neuron needs to be divided then 7: Calculate new neurons' parameters by Equations (19)-(21); 8: else if one neuron needs to be merged 9: Calculate new neuron' output weight by Equation (22); 10: end if 11: Predict: Adjustment has been completed. Actual prediction should be carried on with the next data during the same month. However, when a new time point comes, the algorithm needs to be recycled from line 5. 12: END

Proposed Scheme
The establishment of the entire model is shown in Figure 7. The basic principle of the MC prediction model based on deep learning is to map the input features (RSSI, measuring distance, air humidity, and DBH) to the output-specific MC value. We aim to employ an appropriate intelligent model to find the optimal computational mechanism for the MC prediction scheme. Considering the time-varying characteristics of the receiving signal parameters and environmental conditions, we develop a novel online sequence learning algorithm, which can learn and update the model from the newly received data without tedious retraining. Only then can the diagnostic system meet the needs of real-time UHF RFID sensing. For our proposed OS-PELM algorithm, the strategy of online network structure adjustment is adopted, which greatly improves the generalization ability of the prediction model and effectively reduces the occurrence of overfitting. RSSI values of different living woods are read through the UHF RFID sensors, and the DBH, distance, air humidity, and real MC values of the trees, as measured by standard instruments, are used as input parameters. These datasets are taken as the offline training samples. After the preprocessing, these datasets are used to train the OS-PELM algorithm, in order to obtain the optimal final prediction model. Finally, the diagnostic model is applied to predict the MC level of a living tree, and the effectiveness of this proposed mechanism is verified by comparisons with diverse methods.

Results and Discussion
In this section, we introduce the experimental scenario and the data acquisition process. We also thoroughly evaluate and validate the proposed wood MC detection system. Figure 8a shows the equipment distribution of the laboratory test scenario. Two labels are attached to the reverse side of the wood sample and placed at the same height. The two practical installed control and measuring labels are shown in Figure 8b. The aim of the control tag is to obtain a raw RSSI value free of moisture and wood medium effects, which can be used as a benchmark to facilitate the classification of the experimental samples during measurement. The computing terminal is configured with 2.66 GHz CPU, 16 GB RAM and the Windows 10 system.

Experimental Scenario and Implementation
As for the examination in the dynamic living tree scenario, we selected different kinds of standing trees for repeated measurements in the experimental forestry farm of Nanjing Forestry University from 20 October to 30 December 2021, as shown in Figure 9a. As above, each pair of RSSI values was recorded 100 times continuously within 100 s, and the average number was taken for the subsequent computation of numerical data. In the meantime, the straight-line distance between the reader and tags, the real MC value of the trunk measured by the MD914, as shown in Figure 9b, the DBH of the trunk, and the air humidity were all stored as the model training dataset. All parameters mentioned were collected periodically at 15 min intervals. For our proposed OS-PELM algorithm, the strategy of online network structure adjustment is adopted, which greatly improves the generalization ability of the prediction model and effectively reduces the occurrence of overfitting. RSSI values of different living woods are read through the UHF RFID sensors, and the DBH, distance, air humidity, and real MC values of the trees, as measured by standard instruments, are used as input parameters. These datasets are taken as the offline training samples. After the preprocessing, these datasets are used to train the OS-PELM algorithm, in order to obtain the optimal final prediction model. Finally, the diagnostic model is applied to predict the MC level of a living tree, and the effectiveness of this proposed mechanism is verified by comparisons with diverse methods.

Results and Discussion
In this section, we introduce the experimental scenario and the data acquisition process. We also thoroughly evaluate and validate the proposed wood MC detection system. Figure 8a shows the equipment distribution of the laboratory test scenario. Two labels are attached to the reverse side of the wood sample and placed at the same height. The two practical installed control and measuring labels are shown in Figure 8b. The aim of the control tag is to obtain a raw RSSI value free of moisture and wood medium effects, which can be used as a benchmark to facilitate the classification of the experimental samples during measurement. The computing terminal is configured with 2.66 GHz CPU, 16 GB RAM and the Windows 10 system.

Experimental Scenario and Implementation
As for the examination in the dynamic living tree scenario, we selected different kinds of standing trees for repeated measurements in the experimental forestry farm of Nanjing Forestry University from 20 October to 30 December 2021, as shown in Figure 9a. As above, each pair of RSSI values was recorded 100 times continuously within 100 s, and the average number was taken for the subsequent computation of numerical data. In the meantime, the straight-line distance between the reader and tags, the real MC value of the trunk measured by the MD914, as shown in Figure 9b, the DBH of the trunk, and the air humidity were all stored as the model training dataset. All parameters mentioned were collected periodically at 15 min intervals.  Figure 10 shows two RSSI numerical curves with a varying distance from tag to reader, which was tested in the lab. Red values are the results of the control label (without moisture interference), while black values are those of the measurement label (penetrating through the wood). Compared with the control value, the presence of the trunk severely affects the backscattered radio signal propagation, and this effect becomes more obvious with the increase in transmission distance. The value of RSSI fluctuates during measurement, and the figure only lists the median of several groups of RSSI measurement values. Nonetheless, the RSSI variation exhibits a complex correlation with distance, which requires in-depth analysis by an advanced methodology.   Figure 10 shows two RSSI numerical curves with a varying distance from tag to reader, which was tested in the lab. Red values are the results of the control label (without moisture interference), while black values are those of the measurement label (penetrating through the wood). Compared with the control value, the presence of the trunk severely affects the backscattered radio signal propagation, and this effect becomes more obvious with the increase in transmission distance. The value of RSSI fluctuates during measurement, and the figure only lists the median of several groups of RSSI measurement values. Nonetheless, the RSSI variation exhibits a complex correlation with distance, which requires in-depth analysis by an advanced methodology.  Figure 10 shows two RSSI numerical curves with a varying distance from tag to reader, which was tested in the lab. Red values are the results of the control label (without moisture interference), while black values are those of the measurement label (penetrating through the wood). Compared with the control value, the presence of the trunk severely affects the backscattered radio signal propagation, and this effect becomes more obvious with the increase in transmission distance. The value of RSSI fluctuates during measurement, and the figure only lists the median of several groups of RSSI measurement values. Nonetheless, the RSSI variation exhibits a complex correlation with distance, which requires in-depth analysis by an advanced methodology.  Table 2 presents the details of several parameters, in some cases as examples. Since the RSSI value is unstable during actual measurement, this instability is reflected in the fluctuation of the RSSI value upward and downward by 1 dBm. The values listed in the table are the averages of 100 consecutive measurements within 60 s. As can be seen from Table 2, for the same wood specimen, a change in the MC causes variation in the RSSI. When the MC increases from 14.8% to 25.6%, its average RSSI value changes from −10.05 dBm to −13.21 dBm. Additionally, the measuring distance also causes fluctuation in the RSSI: if the distance is improved by 0.2 m, the average RSSI changes from −18.88 dBm to −27.34 dBm. Moreover, the DBH and air humidity also have an influence on RFID signal transmission. If the MC level (around 15%) and the measurement distance (0.3 m) are basically the same, the RSSI measuring values of two samples under different DBH and air humidity are −10 dBm and −8 dBm, respectively. The change in this value is subtle, but it shows potential for building predictive models with it.  Table 2 presents the details of several parameters, in some cases as examples. Since the RSSI value is unstable during actual measurement, this instability is reflected in the fluctuation of the RSSI value upward and downward by 1 dBm. The values listed in the table are the averages of 100 consecutive measurements within 60 s. As can be seen from Table 2, for the same wood specimen, a change in the MC causes variation in the RSSI. When the MC increases from 14.8% to 25.6%, its average RSSI value changes from −10.05 dBm to −13.21 dBm. Additionally, the measuring distance also causes fluctuation in the RSSI: if the distance is improved by 0.2 m, the average RSSI changes from −18.88 dBm to −27.34 dBm. Moreover, the DBH and air humidity also have an influence on RFID signal transmission. If the MC level (around 15%) and the measurement distance (0.3 m) are basically the same, the RSSI measuring values of two samples under different DBH and air humidity are −10 dBm and −8 dBm, respectively. The change in this value is subtle, but it shows potential for building predictive models with it.
As a result of the above findings, we can infer that these data features all provide insights into the wood MC measurements. However, the correlation between the influences of the various measurements changes in different scenarios. Therefore, an intelligent prediction model based on a machine learning algorithm is desirable for the accurate measurement of wood MC.

Machine Learning Results
It should be noted that the RSSI values used in all experiments below are the average of 100 consecutive readings within 60 s. To verify the performance of the proposed diagnostic system, sample woods with moisture contents of 5%, 10%, 15%, 20%, 25%, 30%, 35%, 40%, and 45% (margin of error was ±1%), are obtained in the laboratory. In addition, the basis for determining the MC level in the dataset and the sample manufacturing method are processed with reference to our previous work [29], and a total of 1000 sets of sample data are obtained from the laboratory. These groups are randomly divided into three parts according to the ratio of 2:6:2, namely 200 groups of initialization sets, 600 groups of training sets, and 200 groups of testing sets. The MC identification results of the target wood by the OS-PELM algorithm, the ELM algorithm, and the OS-ELM algorithm are computed and compared. Here, the ELM algorithm and OS-ELM algorithm are condensed versions of the OS-PELM algorithm, lacking the online sequence data updating and parallel neuron adjustment, respectively.
Note that to improve the robustness of the model and achieve high prediction accuracy, all original data sets should be normalized to values within [0, 1]: where x min and x max are the minimum and maximum values of the input data of a certain period, and x* and x i are the data obtained after normalization and the original input data, respectively. Meanwhile, the hidden layer functions h(·), g(·), and f (·) are selected with ReLU, Leaky ReLU, and Maxout. Z1 and Z2 are first set to 10 and 18. C Hth is twice the average contribution degree, and C Lth is a minimum of {0.05, 1/(Z1 + Z2)}. In the setting of the hidden layer nodes of the extreme learning machine, in order to prevent the occurrence of overfitting and underfitting, a large number of experiments were carried out and the model topology adjusted, following which the number of hidden layer nodes of the extreme learning machine was set to 64.
The prediction results of three methods were calculated and are displayed in Figure 11. For the experiments using nine different sample boxwoods with an MC range from 5% to 45%, the prediction performance of the OS-PELM means is significantly better than the outcomes of the ELM and OS-ELM algorithms. In addition, the average error between the diagnosis output and the ground truth is lower than 4.4%. Hence, the laboratory detecting system shows a high precision and adequate data stability. outcomes of the ELM and OS-ELM algorithms. In addition, the average error between the diagnosis output and the ground truth is lower than 4.4%. Hence, the laboratory detecting system shows a high precision and adequate data stability. To verify the reliability of the proposed system for MC detection in living woods, the corresponding data from sample trees (metasequoia, poplar, pine, and beech) in the artificial forest station were collected for analysis, with MC levels of 45.9%, 26.1%, 34.7%, and 40.4%. The comparative experimental results are shown below in Figure 12. The system still shows good diagnostic performance for the online dynamic data, and the relative error bar indicates that the detection accuracy is higher than 97.1%. It is apparent that the OS-PELM can accurately identify the MC status for both coniferous and broadleaved woods, which proves that this diagnostic model has strong generalization ability and good robustness. To verify the reliability of the proposed system for MC detection in living woods, the corresponding data from sample trees (metasequoia, poplar, pine, and beech) in the artificial forest station were collected for analysis, with MC levels of 45.9%, 26.1%, 34.7%, and 40.4%. The comparative experimental results are shown below in Figure 12. The system still shows good diagnostic performance for the online dynamic data, and the relative error bar indicates that the detection accuracy is higher than 97.1%. It is apparent that the OS-PELM can accurately identify the MC status for both coniferous and broadleaved woods, which proves that this diagnostic model has strong generalization ability and good robustness. outcomes of the ELM and OS-ELM algorithms. In addition, the average error between the diagnosis output and the ground truth is lower than 4.4%. Hence, the laboratory detecting system shows a high precision and adequate data stability. To verify the reliability of the proposed system for MC detection in living woods, the corresponding data from sample trees (metasequoia, poplar, pine, and beech) in the artificial forest station were collected for analysis, with MC levels of 45.9%, 26.1%, 34.7%, and 40.4%. The comparative experimental results are shown below in Figure 12. The system still shows good diagnostic performance for the online dynamic data, and the relative error bar indicates that the detection accuracy is higher than 97.1%. It is apparent that the OS-PELM can accurately identify the MC status for both coniferous and broadleaved woods, which proves that this diagnostic model has strong generalization ability and good robustness.

Performance Evaluation
Here, the mean absolute error (MAE), root-mean-square error (RMSE), and goodness of fit (R 2 coefficient of determination) are chosen as the evaluation criteria for the experimental results. MAE and RMSE can be calculated by the following formulas: where h(x i ) represents the actual value of the i-th group of data, and y i represents the predicted value in the i-th group. Goodness of fit refers to the degree of fit of the regression line to the observed values, and the statistic to measure the goodness of fit is the coefficient of determination R 2 . The value range of R 2 is [0, 1]. The closer the value of R 2 is to 1, the better the fit of the regression model to the observed values; the closer the value of R 2 is to 0, the worse the fit of the model to the observed values. Then, we conducted evaluation dataset construction on the standing pine for 24 h. All of the relevant parameters were collected, and the three mechanisms operated 25 times each, as shown in Figure 13. For every test, the prediction accuracy of OS-PELM is higher than that of the other two algorithms. Moreover, the MAE and RMSE of the OS-PELM algorithm for MC prediction do not exceed 0.1, and the R 2 coefficient is maintained above 0.9, which strongly proves the accuracy and reliability of the method.
OS-ELM adds an adaptive online learning stage to the ELM algorithm, so the prediction accuracy is higher, and the learning rate is faster, but the improvement is not noticeable. Due to the double hidden layer structure, the OS-PELM model can better deal with the input data features. Meanwhile, it adopts the strategy of online network adjustment, which greatly improves the efficiency and stability. For the same dataset, a specific performance comparison of the three MC prediction models is given in Table 3.

Performance Evaluation
Here, the mean absolute error (MAE), root-mean-square error (RMSE), and goodness of fit (R 2 coefficient of determination) are chosen as the evaluation criteria for the experimental results. MAE and RMSE can be calculated by the following formulas: where h(xi) represents the actual value of the i-th group of data, and yi represents the predicted value in the i-th group. Goodness of fit refers to the degree of fit of the regression line to the observed values, and the statistic to measure the goodness of fit is the coefficient of determination R 2 . The value range of R 2 is [0, 1]. The closer the value of R 2 is to 1, the better the fit of the regression model to the observed values; the closer the value of R 2 is to 0, the worse the fit of the model to the observed values. Then, we conducted evaluation dataset construction on the standing pine for 24 h. All of the relevant parameters were collected, and the three mechanisms operated 25 times each, as shown in Figure 13. For every test, the prediction accuracy of OS-PELM is higher than that of the other two algorithms. Moreover, the MAE and RMSE of the OS-PELM algorithm for MC prediction do not exceed 0.1, and the R 2 coefficient is maintained above 0.9, which strongly proves the accuracy and reliability of the method. OS-ELM adds an adaptive online learning stage to the ELM algorithm, so the prediction accuracy is higher, and the learning rate is faster, but the improvement is not noticeable. Due to the double hidden layer structure, the OS-PELM model can better deal with the input data features. Meanwhile, it adopts the strategy of online network adjustment, which greatly improves the efficiency and stability. For the same dataset, a specific performance comparison of the three MC prediction models is given in Table 3.  It can be seen that the MAE of our proposed wood MC prediction model is 0.0225, which is much lower than the 0.048 and 0.0488 for the other two models, respectively, and the RMSE is 0.0254, which is nearly half of the other two algorithms' results. The R 2 coefficient of the three prediction methods increased from 0.8086 to 0.9612, which matches the added function modules. For the analysis of training time, due to the structure of multiple hidden layers, OS-PELM runs slightly longer than the other two models, but this does not affect its detection effectiveness.

Robustness Analysis
In order to evaluate the robustness of the proposed wood MC diagnostic system, we carried out a comparative experiment on the variation in interval distance between the reader antenna and the testing wood. The subjects of the experiment included wood with a defined moisture content prepared in the laboratory and standing wood outdoors. The evaluation indicators still used RMSE and R 2 . We deployed the antenna and RF tags based on the above steps to ensure that the tags and antenna were placed on the same horizontal line. Then, we selected three types of sample wood with different MC levels (approximately 10%, 25%, and 40%) to test the prediction performance.
The corresponding results are shown in Figure 14a. As the distance between the antenna and trunk increases, the prediction accuracy decreases, especially when the distance exceeds 0.4 m. The main reason is that the proportion of RF signals that can be transmitted through the wood is reduced. When the interval distance is within 1 m range, the RMSE of the proposed OS-PELM prediction model is less than 0.04.
In addition, we selected one standing cypress (0.22 m DBH) and took its three MC values (31.5%, 38.0%, and 40.5%) as the objects of comparison to verify the applicability of the proposed system. The results are displayed in Figure 14b. For the cypress samples, significant detection accuracy within a 0.5 m range was obtained. For the trees with larger DBH, higher-quality RSSI signals should be obtained in a closer range. On the other hand, when the distance exceeds 0.5 m, a considerable part of the RF signal would be diluted by environmental factors, seriously affecting the prediction results. Meanwhile, the two results also indicate that the living tree MC could be diagnosed accurately under certain measurement settings.
In order to further verify the proposed algorithm, we compared the performance of the above three algorithms again based on the standing cypress data. Figure 15 reveals that the prediction accuracy of the three models decreases rapidly when the distance increases, but OS-PELM is apparently more stable and reliable. In particular, when the distance is 0.8 m, its RMSE can be controlled at 0.03, while the results of ELM and OS-ELM are as high as 0.06, far exceeding the upper error limit of MC measurement. Therefore, the proposed MC prediction model is highly efficient and effective.

Comparison with Similar Processing Methods
To evaluate the overall performance of the UHF RFID living tree MC diagnostic system, we used four other noted data processing algorithms to deal with the previous experiment results: (1) Differential evolution algorithm-based OSELM (DE-OSELM) [30]. Here, DE is used to solve the problem of input weight and the random selection of the hidden layer bias. Sigmoid is chosen as the activation function, the number of neurons in the hidden layers is 25, and the size of the dataset to be learned in each step is 40. (2) Information perception weight and error prediction-based OSELM (WE-OSELM) [31]. This model improves the forgetfulness factor and weighted error compensation coefficient to enhance the prediction accuracy. The number of neurons in the hidden layer is 200, the adjacent area of input data width is 6, and the activation function is also Sigmoid. (3) Gravitation search algorithm-based PELM (GSA-PELM) [32]. Here, GSA is used to optimize the hidden layer threshold and input weight of the PELM model. The number of neurons in the hidden layer is 42, and its parameter optimization range is [−1, 1]. (4) Online least square PELM (OLSPELM) [33]. The weights and thresholds of this model are determined by two least squares methods, the maximum neuron number in each hidden layer is set as 50, and the input and output attributes of data are both normalized to [0.01, 1]. Then, the detection accuracy of each method on the testing set is recorded, and the results are compared in Figure 16. mately 10%, 25%, and 40%) to test the prediction performance.
The corresponding results are shown in Figure 14a. As the distance between the antenna and trunk increases, the prediction accuracy decreases, especially when the distance exceeds 0.4 m. The main reason is that the proportion of RF signals that can be transmitted through the wood is reduced. When the interval distance is within 1 m range, the RMSE of the proposed OS-PELM prediction model is less than 0.04. In addition, we selected one standing cypress (0.22 m DBH) and took its three MC values (31.5%, 38.0%, and 40.5%) as the objects of comparison to verify the applicability of the proposed system. The results are displayed in Figure 14b. For the cypress samples, significant detection accuracy within a 0.5 m range was obtained. For the trees with larger DBH, higher-quality RSSI signals should be obtained in a closer range. On the other hand, when the distance exceeds 0.5 m, a considerable part of the RF signal would be diluted by environmental factors, seriously affecting the prediction results. Meanwhile, the two results also indicate that the living tree MC could be diagnosed accurately under certain measurement settings.
In order to further verify the proposed algorithm, we compared the performance of the above three algorithms again based on the standing cypress data. Figure 15 reveals that the prediction accuracy of the three models decreases rapidly when the distance increases, but OS-PELM is apparently more stable and reliable. In particular, when the distance is 0.8 m, its RMSE can be controlled at 0.03, while the results of ELM and OS-ELM are as high as 0.06, far exceeding the upper error limit of MC measurement. Therefore, the proposed MC prediction model is highly efficient and effective. We adopted the dataset of standing cypress with four MC levels, with the reader antenna placed 0.4 m away from the trunk. As the results show, the RMSE of our proposed model is consistently lower than 0.0275, being at least one order of magnitude more accurate than other models. Additionally, the histogram value is smooth and steady, and does not change observably with the MC status. Therefore, the generalization ability and prediction accuracy of the OS-PELM model are much better than those of the other four models.
In order to further verify the proposed algorithm, we compared the performance of the above three algorithms again based on the standing cypress data. Figure 15 reveals that the prediction accuracy of the three models decreases rapidly when the distance increases, but OS-PELM is apparently more stable and reliable. In particular, when the distance is 0.8 m, its RMSE can be controlled at 0.03, while the results of ELM and OS-ELM are as high as 0.06, far exceeding the upper error limit of MC measurement. Therefore, the proposed MC prediction model is highly efficient and effective. Figure 15. The interval distance vs. the performance indicators of the three models. Figure 15. The interval distance vs. the performance indicators of the three models.

Comparison with Similar Processing Methods
To evaluate the overall performance of the UHF RFID living tree MC diagnostic system, we used four other noted data processing algorithms to deal with the previous experiment results: (1) Differential evolution algorithm-based OSELM (DE-OSELM) [30]. Here, DE is used to solve the problem of input weight and the random selection of the hidden layer bias. Sigmoid is chosen as the activation function, the number of neurons in the hidden layers is 25, and the size of the dataset to be learned in each step is 40. (2) Information perception weight and error prediction-based OSELM (WE-OSELM) [31]. This model improves the forgetfulness factor and weighted error compensation coefficient to enhance the prediction accuracy. The number of neurons in the hidden layer is 200, the adjacent area of input data width is 6, and the activation function is also Sigmoid.
(3) Gravitation search algorithm-based PELM (GSA-PELM) [32]. Here, GSA is used to optimize the hidden layer threshold and input weight of the PELM model. The number of neurons in the hidden layer is 42, and its parameter optimization range is [−1, 1]. (4) Online least square PELM (OLSPELM) [33]. The weights and thresholds of this model are determined by two least squares methods, the maximum neuron number in each hidden layer is set as 50, and the input and output attributes of data are both normalized to [0.01, 1]. Then, the detection accuracy of each method on the testing set is recorded, and the results are compared in Figure 16. We adopted the dataset of standing cypress with four MC levels, with the reader antenna placed 0.4 m away from the trunk. As the results show, the RMSE of our proposed model is consistently lower than 0.0275, being at least one order of magnitude more accurate than other models. Additionally, the histogram value is smooth and steady, and does not change observably with the MC status. Therefore, the generalization ability and prediction accuracy of the OS-PELM model are much better than those of the other four models.

Conclusions
In this article, we propose an ultra-low-cost MC sensor prototype based on standard UHF RFID tags. First, in the hardware structure design, we select the most suitable measurement shape by comparing the RSSI performances of various tag shapes. Then, a data Figure 16. For four samples of cypress trees with different moisture contents (31.5%, 38.0%, 40.5%, and 46.9%), the prediction accuracy of the five methods was evaluated.

Conclusions
In this article, we propose an ultra-low-cost MC sensor prototype based on standard UHF RFID tags. First, in the hardware structure design, we select the most suitable measurement shape by comparing the RSSI performances of various tag shapes. Then, a data acquisition system is built efficiently, and the RSSI values and other corresponding environmental parameters are collected by fixed-cycle operations. After that, for the improvement of the existing recognition mechanism, an OS-PELM architecture is proposed to optimize the network structure of the hidden layers, adopting the strategy of online neuron adjustment to regulate the model parameters. The experimental results on the standing tree show that the MAE between the predicted value and the ground truth is 0.0224, the RMSE is 0.0254, and the R 2 coefficient is 0.9612. Comparative experiments indicate that the performance of our model is better than that of the DE-OSELM, WE-OSELM, GSA-PELM, and OLSPELM models. Hence, it is proved that the proposed MC diagnostic system is accurate and robust in terms of monitoring performance and is suitable for use in the practical Internet of Things industry.
The UHF RFID technology can provide innovative solutions to some of the problems encountered in forestry measurements. Our further research aim is to detect the distribution of moisture content inside the trunk with high accuracy by arranging multiple RFID tags.
Author Contributions: Conceptualization, Y.W. and C.Z.; methodology, W.L.; software, C.Z.; validation, Y.W., C.Z., and W.L.; data curation, C.Z.; writing-original draft preparation, C.Z.; writingreview and editing, Y.W.; supervision, W.L.; project administration, Y.W. All authors have read and agreed to the published version of the manuscript. Data Availability Statement: All data generated or presented in this study are available upon request from the corresponding author. Furthermore, the models and code used during the study cannot be shared at this time as the data also form part of an ongoing study.