Wood chip type and moisture content detection method, system and equipment and storage medium
By using multi-wavelength light signal values to construct a prediction model and selecting the best lighting conditions in wood chip detection, the time-consuming and labor-intensive, limited measurement range and high cost of existing wood moisture content detection methods are solved, and the detection effect of high precision and stability is achieved.
Patent Information
- Application Number
- CN202510112342.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-27
AI Technical Summary
The existing wood moisture content detection methods are time-consuming and labor-intensive, limited measurement range and high cost, making it difficult to achieve high-precision and stability online detection.
By obtaining the optical signal values of black and yellow wood chip samples at different wavelengths, calculate the identification threshold parameters and parameter k values, divide the moisture content intervals, and build a prediction model, selecting the best lighting conditions to improve detection accuracy and stability.
High-precision detection of wood chip moisture content is achieved, the detection cost is reduced, the detection speed and stability is improved, and the sawdust samples in different moisture content ranges are adapted.
Smart Images

Figure CN120043980A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of wood chip detection, and particularly to a method, system, device and storage medium for detecting wood chip type and moisture content. Background Art
[0002] Moisture content is a key property of wood, which has a significant impact on the physical properties of wood (such as flexural strength, density, and thermal conductivity), processing performance, and the quality of the final product. Wood chips, as common residues in the wood processing process, have been widely used in many fields such as papermaking and board manufacturing due to their retention of the high-quality characteristics of the original pulpwood. However, wood chips have a certain hygroscopicity in the dry state, which causes the moisture content to change easily during the transportation process in the technological process, thereby affecting the product quality. Therefore, it is crucial to adjust chemical supplies and process parameters in a timely manner to match the moisture content of wood chips. At the same time, during the preparation and storage stages of wood chips, it is also necessary to strictly control the humidity to avoid raw material mildew and economic losses caused by excessive humidity.
[0003] Currently, the detection methods for wood moisture content are mainly divided into four categories:
[0004] (1) Observation method: This method relies on visual and tactile observation of the state of wood chips to preliminarily judge its moisture content. Although simple and intuitive, it requires the operator to have certain experience and needs to be verified in combination with other methods.
[0005] (2) Drying method: According to national standards, the moisture content is calculated by measuring the wet weight and dry weight of the sample. This method has high detection accuracy, but it is time-consuming and laborious to operate and is not suitable for on-line monitoring.
[0006] (3) Microwave detection technology: The moisture content of wood chips is measured by transmitting and receiving microwave signals. This technology can achieve non-contact, fast, and on-line detection, but it has high requirements for calibration samples and limited measurement range. Its accuracy and stability are the main challenges for current popularization and application.
[0007] (4) Near-infrared spectroscopy method: By performing full-spectrum or multi-wavelength spectral scanning and combining calibration experiments, a mathematical relationship model between moisture content and near-infrared spectrum is established to predict the moisture content of wood. This method also has the advantages of non-contact, fast speed, and suitability for on-line detection. Although full-spectrum measurement has high accuracy, it is costly; while multi-wavelength measurement is low-cost and easy to promote, the overall measurement accuracy and stability of the near-infrared spectroscopy method are still the main obstacles to its wide application.
[0008] In view of this, the present application proposes a method, system, device and storage medium for detecting wood chip type and moisture content, which can improve the measurement accuracy and stability of the moisture content of wood chips. Summary of the Invention
[0009] To solve the problems of time-consuming, laborious, limited measurement range and high cost in the existing wood moisture content detection methods, this application provides a method, system, device and storage medium for detecting wood chip type and moisture content to solve the above technical defect problems.
[0010] According to the first aspect of this application, a method for detecting wood chip type and moisture content is proposed. The method includes the following steps:
[0011] S1. Respectively obtain the average optical signal values of black wood chip samples and yellow wood chip samples at the first wavelength and the second wavelength, and calculate the discrimination threshold parameter μ based on the average optical signal values;
[0012] S2. Obtain the moisture content reference values of black wood chip samples and yellow wood chip samples, measure the reference optical signal and the optical signal values of each black wood chip sample and yellow wood chip sample at the third wavelength, the fourth wavelength, the fifth wavelength and the sixth wavelength, and calculate the parameter k value of each black wood chip sample and yellow wood chip sample based on the reference optical signal and the optical signal values;
[0013] And divide the moisture content into different intervals according to the moisture content reference values and the parameter k values, and construct a wood chip moisture content prediction model for each interval;
[0014] S3. Calculate the predicted root mean square error of the wood chip moisture content prediction model established under each light condition, and select the light condition with the minimum predicted root mean square error value as the optimal light condition. Set the wood chip moisture content prediction model established under the optimal light condition as the main model, and set the wood chip moisture content prediction models established under other light conditions as conversion models;
[0015] S4. Determine the wood chip type of the sample to be measured through the discrimination threshold parameter μ in step S1, obtain the current environmental illuminance value. If the environmental illuminance value meets the optimal light condition, use the main model to detect the moisture content of the sample to be measured, otherwise use the conversion model to detect the moisture content of the sample to be measured.
[0016] Preferably, the first wavelength is 650nm, the second wavelength is 400nm, the third wavelength is 1300nm, the fourth wavelength is 1450nm, the fifth wavelength is 1818nm, and the sixth wavelength is 1940nm.
[0017] Further preferably, in step S1, the discrimination threshold parameter μ is calculated based on the average optical signal values, and the calculation expression is:
[0018]
[0019] In the formula, is the average value of the optical signal values of multiple yellow wood chip samples at the 650nm wavelength, is the average value of the optical signal values of multiple yellow wood chip samples at a wavelength of 400 nm, is the average value of the optical signal values of multiple black wood chip samples at a wavelength of 650 nm, is the average value of the optical signal values of multiple black wood chip samples at a wavelength of 400 nm
[0020] Further preferably, in step S2, the parameter k value of each black wood chip sample and yellow wood chip sample is calculated according to the reference optical signal and the optical signal value, and the calculation expression is:
[0021]
[0022] where w ref is the reference optical signal, w 1300 is the optical signal value of each black wood chip sample or yellow wood chip sample at a wavelength of 1300 nm, w 1450 is the optical signal value of each black wood chip sample or yellow wood chip sample at a wavelength of 1450 nm, w 1818 is the optical signal value of each black wood chip sample or yellow wood chip sample at a wavelength of 1818 nm, w 1940 is the optical signal value of each black wood chip sample or yellow wood chip sample at a wavelength of 1940 nm;
[0023] In step S2, a wood chip moisture content prediction model is constructed for each interval. Among them, the calculation expression of the segmented moisture content prediction model is:
[0024]
[0025] where a 1 、a 2 …a n and b 1 、b 2 …b n are the regression coefficients of the non-linear moisture content prediction model of the n-segment moisture content reference values respectively, and y 1 、y 2 …y n 、y n+1 are the break points of the n-segment moisture content reference values respectively.
[0026] Further preferably, in step S3, the predicted root mean square error of the wood chip moisture content prediction model established under each lighting condition is calculated. Among them, the calculation expression of the predicted root mean square error is:
[0027]
[0028] where RMSEP is the predicted root mean square error, n is the number of modeling samples, and y 预测,iis the predicted value of the i-th sample in the modeling sample, y 参考,i is the reference value of the i-th sample in the modeling sample.
[0029] Further preferably, in step S3, the wood chip moisture content prediction model established under the best light conditions is set as the main model, and the expression is:
[0030]
[0031] In the formula, y 最佳光照 is the moisture content under the best light conditions, and a and b are the regression coefficients of the wood chip moisture content prediction model;
[0032] The wood chip moisture content prediction model established under other light conditions is a conversion model, and the expression is:
[0033]
[0034] In the formula, y ot h er is the moisture content under other light conditions, F and e are the conversion matrix parameters, and a and b are the regression coefficients of the wood chip moisture content prediction model.
[0035] Preferably, in a wood chip type and moisture content detection method proposed in the present application, the optical signal value is the energy value, reflectivity or absorbance of light; in step S4, if the measured environmental illuminance value p = 515 ± 5 LUX, it is the best light condition, where p represents the environmental illuminance value and LUX represents the illuminance unit.
[0036] In a second aspect, the present application proposes a wood chip type and moisture content detection system, and the system includes:
[0037] A discrimination threshold parameter acquisition module configured to respectively acquire the average optical signal values of black wood chip samples and yellow wood chip samples at the first wavelength and the second wavelength, and calculate and obtain the discrimination threshold parameter μ according to the average optical signal values;
[0038] A prediction model establishment module configured to acquire the moisture content reference values of black wood chip samples and yellow wood chip samples, measure the reference optical signal and the optical signal values of each black wood chip sample and yellow wood chip sample at the third wavelength, the fourth wavelength, the fifth wavelength and the sixth wavelength, and calculate and obtain the parameter k value of each sample according to the reference optical signal and the optical signal values;
[0039] And divide the moisture content into different intervals according to the moisture content reference values and the parameter k values, and construct a wood chip moisture content prediction model for each interval;
[0040] A prediction model selection module is configured to calculate the root mean square error of prediction of the wood chip moisture content prediction models established under each lighting condition, and select the lighting condition with the minimum root mean square error of prediction value as the optimal lighting condition. The wood chip moisture content prediction model established under the optimal lighting condition is set as the main model, and the wood chip moisture content prediction models established under other lighting conditions are set as conversion models;
[0041] A detection output module is configured to determine the type of wood chips of the sample to be tested through the discrimination threshold parameter μ in the discrimination threshold parameter acquisition module, obtain the current ambient illumination value. If the ambient illumination value meets the optimal lighting condition, the main model is used to detect the moisture content of the sample to be tested; otherwise, the conversion model is used to detect the moisture content of the sample to be tested.
[0042] In a third aspect, the present application proposes a terminal device, including a processor, a memory, and a computer program stored in the memory. The computer program is executed by the processor to implement the wood chip type and moisture content detection method as described in any one of the above.
[0043] In a fourth aspect, the present application proposes a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the wood chip type and moisture content detection method as described in any one of the above is implemented.
[0044] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0045] (1) Distinguish black wood chips and yellow wood chips. Based on the optical signal values (which can be energy values, reflectance, or absorbance, etc.) measured at two visible light wavelengths (650nm and 400nm), according to the criterion, that is, the threshold μ value of the discrimination parameter automatically distinguish two types of wood chips, black and yellow.
[0046] (2) Flexible moisture content prediction models: Calculate the parameter k value using the optical signal values at multiple wavelengths (such as 1300nm, 1450nm, 1818nm, and 1940nm), and combine with the moisture content reference value to divide the moisture content into different intervals and construct corresponding prediction models, improving the accuracy of moisture content detection and being able to adapt to wood chip samples in different moisture content intervals.
[0047] (3) Adaptive to light conditions: By calculating the root mean square error of prediction of the wood chip moisture content prediction models established under different light conditions, select the light condition with the minimum error as the optimal light condition, and establish the main model under the optimal light condition (i.e., the 515 LUX light condition). Obtain the optimal measurement model under the 515 LUX light condition, denoted as the instrument main model. Combine the conversion model calculation method, that is, through the calculation of the optical signal conversion matrix parameters F and e, obtain the conversion models under other light conditions. When the light condition changes, call the corresponding light condition model to obtain high-precision measurement results. That is, when the illuminometer measures a change in the light condition, calculate the measured value after model conversion based on the imported conversion model parameters F and e under different light conditions, and improve the measurement accuracy and stability of the wood chip moisture content by reducing the influence of the change in the light condition.
[0048] (4) Cost reduction: The instrument for identifying two-color wood chips and detecting moisture content constructed by the present invention only uses 6 characteristic wavelengths, has a simple structure, can reduce costs, and the qualitative and quantitative models established based on a few characteristic wavelengths can improve the measurement speed, stability, and accuracy. Brief Description of the Drawings
[0049] By reading the detailed description of the non-restrictive embodiments with reference to the following drawings, other features, objectives, and advantages of the present application will become more obvious:
[0050] Figure 1 is a flowchart of the method for detecting the type and moisture content of wood chips according to the present invention;
[0051] Figure 2 is a flowchart of the implementation method of the detection part according to the present invention;
[0052] Figure 3 is a diagram of a yellow wood chip sample;
[0053] Figure 4 is a diagram of a black wood chip sample;
[0054] Figure 5 is a distribution diagram of the light energy values of the calibration set yellow wood chip samples and black wood chip samples at wavelengths of 650 nm and 400 nm;
[0055] Figure 6 is a distribution diagram of the ratio of the light energy values of the test set yellow wood chip samples and black wood chip samples at wavelengths of 650 nm and 400 nm;
[0056] Figure 7 is a structural diagram of the wood chip type and moisture content detection system according to the present invention;
[0057] Figure 8 is a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. Detailed implementation manners
[0058] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related invention, rather than limiting the invention. Additionally, it should be noted that for the convenience of description, only the parts related to the invention are shown in the drawings.
[0059] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the drawings and embodiments.
[0060] The present invention provides a method, system, device and storage medium for detecting the type and moisture content of wood chips. Figure 1 The flowchart of the method for detecting the type and moisture content of wood chips according to the present invention is shown, as Figure 1 shown, the method includes the following steps:
[0061] S1. Respectively obtain the average optical signal values of the black wood chip sample and the yellow wood chip sample at the first wavelength and the second wavelength, and calculate the discrimination threshold parameter μ based on the average optical signal values;
[0062] S2. Obtain the moisture content reference values of the black wood chip sample and the yellow wood chip sample, measure the reference optical signal and the optical signal values of each black wood chip sample and yellow wood chip sample at the third wavelength, the fourth wavelength, the fifth wavelength and the sixth wavelength, and calculate the parameter k value of each black wood chip sample and yellow wood chip sample based on the reference optical signal and the optical signal values;
[0063] And divide the moisture content into different intervals according to the moisture content reference values and the parameter k values, and construct a wood chip moisture content prediction model for each interval;
[0064] S3. Calculate the predicted root mean square error of the wood chip moisture content prediction model established under each lighting condition, and select the lighting condition with the minimum predicted root mean square error value as the optimal lighting condition, set the wood chip moisture content prediction model established under the optimal lighting condition as the main model, and set the wood chip moisture content prediction models established under other lighting conditions as conversion models;
[0065] S4. Determine the type of wood chips of the sample to be tested through the discrimination threshold parameter μ in step S1, obtain the current environmental illuminance value, if the environmental illuminance value meets the optimal lighting condition, use the main model to detect the moisture content of the sample to be tested, otherwise use the conversion model to detect the moisture content of the sample to be tested.
[0066] In a specific embodiment, a method for detecting the type and moisture content of wood chips provided by the present invention includes a calibration part and a detection part. The calibration part obtains important model parameters through calibration experiments for the detection part. After setting the important model parameters obtained from the calibration experiments in the detection part, the results are analyzed, calculated, and displayed according to the detection process.
[0067] Among them, the calibration part includes 3 calibration experiments.
[0068] Calibration experiment 1: The purpose is to obtain the discrimination threshold parameter μ for automatically discriminating two types of wood chips, black wood chips and yellow wood chips. That is, through the calibration experiment, the discrimination threshold parameter μ is obtained for the detection part to automatically discriminate black and yellow wood chips. The μ value is the average of the optical signal values obtained for black and yellow wood chips in the calibration experiment. The method for obtaining the μ value through the calibration experiment is as follows: Select 3 or more black wood chip samples and 3 or more yellow wood chip samples, measure the optical signal values of each sample at wavelengths of 650 nm and 400 nm, and calculate the discrimination threshold parameter μ for discriminating black and yellow wood chips through formula (1).
[0069]
[0070] Among them, is the average of the optical signal values measured at a wavelength of 650 nm for multiple yellow wood chip samples, is the average of the optical signal values measured at a wavelength of 400 nm for multiple yellow wood chip samples, is the average of the optical signal values measured at a wavelength of 650 nm for multiple black wood chip samples, is the average of the optical signal values measured at a wavelength of 400 nm for multiple black wood chip samples. The so-called optical signal can be the energy value of light, reflectivity, absorbance, and related calculated values, etc.
[0071] Calibration experiment 2: The purpose is to obtain a piecewise non-linear prediction model to improve the detection accuracy. Through calibration experiments on a large number of wood chip samples with different moisture contents, the value range of the calculated value k for different moisture content ranges is obtained. According to the value range of the parameter k obtained from the calibration experiment, it can be used to preliminarily determine the moisture content range of unknown samples, and then it can be used to select the non-linear moisture content prediction model for this moisture content range. The method for this calibration experiment is as follows: First, prepare a large number of wood chip samples with different moisture contents, and obtain the reference value of the moisture content of the wood chip samples through the drying method. Then, measure the reference optical signal w ref , and measure the optical signal values of each sample at 4 wavelengths (1300 nm, 1450 nm, 1818 nm, 1940 nm), which are respectively recorded as w 1300 , w 1450 , w 1818 , w 1940The optical signal mentioned above can be the energy value of light, reflectivity, absorbance, and their related calculated values, etc. The parameter k value of each sample is calculated through formula (2).
[0072]
[0073] According to the distribution of the reference values of the sample moisture content in the calibration experiment, by dividing the reference value segments, the value range of the k value corresponding to the reference value segments is obtained. For an unknown sample, based on the k value of the sample, its moisture content range can be initially determined. According to the initially determined moisture content range, the corresponding segmented non-linear moisture content prediction model is selected to predict its moisture content. The modeling method of this segmented non-linear prediction model is that in this calibration experiment, the samples are segmented according to the reference values of the moisture content, and a segmented non-linear moisture content prediction model, that is, formula (3), is established based on the partial least squares method or the multiple linear regression method.
[0074]
[0075] Among them, a 1 、a 2 …a n and b 1 、b 2 …b n are the regression coefficients of the non-linear moisture content prediction models for n segments of the reference values of the moisture content respectively, and y 1 、y 2 …y n 、y n+1 are the break points of n segments of the reference values of the moisture content respectively.
[0076] Calibration experiment 3: The purpose is to obtain the optimal lighting conditions for detection, as well as the optical signal conversion model between other lighting conditions and the optimal lighting conditions, and establish a high-precision measurement model under different lighting conditions. That is, through a large number of calibration experiments on samples with known reference values of moisture content under different lighting conditions, the main model for detection under the optimal lighting conditions and the conversion models under other lighting measurement conditions are obtained to reduce the influence of lighting conditions and improve the prediction accuracy and stability of the sawdust moisture content prediction model. The calibration experiment method is as follows: First, a large number of sawdust samples with different moisture contents are prepared, and the reference value y 参考 of the sample moisture content is obtained through the drying method. Under different lighting conditions, the optical signals of 4 wavelengths (1300nm, 1450nm, 1818nm, 1940nm) are measured and recorded as w 1300 、w 1450 、w 1818 、w 1940 , as well as the reference optical signal w ref . The optical signal mentioned above can be the energy value of light, reflectivity, absorbance, and their related calculated values, etc. With The calculated value is the independent x variable. Through partial least squares or multiple linear regression, a mathematical relationship model between y and the x variable under different lighting conditions is established, that is, the sawdust moisture content prediction model y 参考 = a * x + b, where a and b in this model are regression coefficients. The root mean square error of prediction (RMSEP) of the moisture content prediction model (i.e., y 预测 = a * x + b) established under different lighting conditions is used as a parameter to evaluate the model accuracy. The lighting condition with the minimum root mean square error of prediction value is the optimal lighting condition for sawdust moisture content detection. The calculation method of the root mean square error of prediction is formula (4). 预测 where n is the number of modeling samples, y
[0077]
[0078] is the predicted value of the i-th sample in the modeling samples, and y 预测,i is the reference value of the i-th sample in the modeling samples. 参考,i
[0079] The prediction model under this optimal lighting condition is set as the main model, that is, formula (5). The prediction models under other lighting conditions are conversion models, that is, formula (6).
[0080]
[0081] Among them, in the conversion model, the conversion matrix parameters F and e are obtained through calculation. The calculation methods of parameters F and e are as follows:
[0082] Let the optical signal obtained under the optimal lighting condition be the main instrument signal, and the optical signals obtained under other lighting conditions be the slave instrument signals. The said optical signal can be the energy value of light, reflectivity, absorbance, and their related calculated values, etc. Let the area of the slave instrument signal associated with the i-th wavelength point in the main instrument signal be denoted as Z i , Z i is the spectral matrix of 2k + 1 points from i - k to i + k in the slave instrument signal, that is, formula (7), where k is a parameter of the conversion model.
[0083] Z i = [X ss,i-k , X ss,i-k+1 , …, X ss,i+k-1 , X ss,i+k (7)
[0084] The i-th column vector of the main instrument signal is denoted as X ms,i , where i = 1, 2, …, p. Here, p is the number of column vectors of the main instrument signal. Its transfer model is formula (8).
[0085] X ms,i = Zi b i + e i (8)
[0086] Among them, b i is the regression coefficient, and e i is the residual vector.
[0087] The regression coefficient b i can be obtained by partial least squares regression method or multiple linear regression method. From b i i.e., (b 1 , b 2 , b 3 , …, b p ) forms a diagonal matrix, and this diagonal matrix is the transformation matrix F, i.e., formula (9).
[0088] F = diag(b 1 , b 2 , b 3 , …, b p ) (9)
[0089] For the spectral X unknown of an unknown sample from the instrument, the transformed spectrum X t
[0090] X t = X unknown * F + e i (10)
[0091] F and ei in formula (10) are respectively the F and e obtained in formula (6).
[0092] Figure 2 shows the flowchart of the implementation method of the detection part of the present invention. As Figure 2 shown, the implementation method of the detection part includes the following steps:
[0093] Step 1: System initialization, including detection and correction of instrument states such as system self-check, dark current test, wavelength calibration, etc.
[0094] Step 2: Detection of the illuminance of ambient light, and record the illuminance value as p. Detection of the reference light signal, and the reference light is the light signal value obtained from a standard whiteboard, and record the detected value of the reference light signal as w ref .
[0095] Step 3: Acquisition of light signals at wavelengths of 400 nm, 650 nm, 1300 nm, 1450 nm, 1818 nm, and 1940 nm, which are respectively recorded as w 400 , w 650 , w 1300 , w 1450 , w1818 , w 1940 , and these optical signal values can be light intensity values, reflectivity, or absorbance.
[0096] Step Four: Based on the two wavelengths of visible light, 650 nm and 400 nm, identify wood chips of two colors, black and yellow. The discrimination method is that 650 nm is used as the measurement wavelength, 400 nm is used as the reference wavelength, and the ratio of the optical signal values measured at the two wavelengths is calculated, that is where w 650 is the optical signal value measured at the 650 nm wavelength (such as energy value, reflectivity, absorbance, etc.), and w 400 is the optical signal value measured at the 400 nm wavelength (such as energy value, reflectivity, absorbance, etc.). If it is marked as a yellow wood chip sample, otherwise it is a black wood chip sample. Among them, the μ value is obtained through calibration experiment 1, and the μ value is the average of the optical signal calculation values of black and yellow wood chips obtained through calibration experiment 1.
[0097] Step Five: Based on the calculated value parameter k of the optical signals at 4 wavelengths (1300 nm, 1450 nm, 1818 nm, 1940 nm), preliminarily determine the moisture content range of the wood chip sample, where the parameter k value is obtained through calibration experiment 2.
[0098] Step Six: According to the measured illuminance value p, select the high-precision measurement model within the optimal moisture content range. The method is that if p = 515 ± 5 LUX is measured, it is the optimal illumination condition for detection, and this optimal illumination condition is obtained through calibration experiment 3. Select the main model of the instrument, that is
[0099]
[0100] where the model parameters a and b are obtained through calibration experiment 3.
[0101] If the measured p value is not within the range of 515 ± 5 LUX, then select the model transfer parameters F and e under other corresponding illumination conditions to calculate the moisture content. The moisture content formula is
[0102]
[0103] where a and b are respectively a and b in formula (11),
[0104] Step Seven: Display the detection parameters such as the type of wood chip sample (the result obtained from Step Four), the moisture content (calculated from formula (11) or formula (12)), the illuminance, and the optical signal values at 6 wavelengths (such as reflectivity, etc.).
[0105] Example 1
[0106] I. Known sample calibration experiment 1: Used to establish a classification model for yellow and black wood chips
[0107] Figure 3 Pictures of yellow wood chip samples are shown, Figure 4 and pictures of black wood chip samples are shown. The discrimination threshold parameter μ value is determined through the calibration experiment for the classification of the two types of samples. 57 calibration set samples and test set samples of yellow wood chips are prepared, and 60 calibration set samples and test set samples of black wood chips are prepared. The distribution diagrams of the light energy values measured for the calibration set samples of the two colors of wood chips at wavelengths of 650 nm and 400 nm are as Figure 5 shown. In this calibration experiment, the discrimination parameter has a threshold μ value of 21.6531 after calculation.
[0108] II. Unknown sample test set: Used to verify the model of calibration experiment 1 and test the classification effect of yellow and black wood chips
[0109] In this embodiment, there are 57 unknown samples of yellow wood chips, i.e., test set samples, and 60 unknown samples of black wood chips, i.e., test set samples. The distribution of the discrimination parameter calculated for the test set samples is as Figure 6 shown. It can be seen from the figure that in this embodiment, all samples are based on this discrimination parameter and its threshold μ value of 21.6531, that is, the recognition rate of the two colors of wood chip samples is 100%.
[0110] Embodiment II
[0111] Known sample calibration experiment 2: Used to establish a segmented moisture content prediction model
[0112] Through the calibration experiment, the calculated value k is obtained for the preliminary determination of the moisture content range of wood chip samples, and a multiple regression model for different moisture content ranges is obtained for predicting unknown samples.
[0113] In the calibration experiment of black wood chip samples, 60 samples with different moisture contents are prepared. The moisture content reference values are calculated by the drying method. The multi-wavelength reflectance values of each sample are tested under 5 kinds of light conditions (light intensities are 0 LUX, 225 LUX, 445 LUX, 515 LUX, 165 LUX) respectively. 258 test samples of the 4-wavelength (1300 nm, 1450 nm, 1818 nm, 1940 nm) optical signals (reflectance) of samples with a moisture content below 30% are obtained for multiple linear regression analysis.
[0114] In the calibration experiment of yellow sawdust samples, 50 samples with different moisture contents were prepared. The reference moisture content values were calculated by the drying method. The multi-wavelength reflectance values of each sample were measured under 6 kinds of light conditions (illuminances were 0 LUX, 225 LUX, 445 LUX, 515 LUX, 335 LUX, and 165 LUX) respectively. 269 test samples of the 4-wavelength (1300 nm, 1450 nm, 1818 nm, 1940 nm) optical signals (reflectance) of the samples with an effective moisture content below 30% were obtained under 6 kinds of light conditions for multiple linear regression analysis.
[0115] The distribution of the reflectance k values of samples in different moisture content ranges is listed in Table 1. For an unknown sample, according to the calculated k value of the sample, its moisture content range can be initially determined, and thus a multivariate calibration model corresponding to the moisture content range can be selected for predicting the moisture content.
[0116] In this embodiment, for the calibration experiments of two kinds of sawdust samples, under the light condition of 515 LUX, the measurement models and their accuracy parameters in different moisture content ranges are listed in Table 2, where RMSEP represents the root mean square error value predicted in the calibration experiment, and the correlation coefficient represents the correlation between the predicted value and the reference value in the calibration experiment.
[0117] Table 1 Distribution of the calculated k values of the 4-wavelength reflectance of two kinds of sawdust samples
[0118]
[0119] Table 2 Measurement models and their accuracy parameters of two kinds of sawdust samples under the light condition of 515 LUX
[0120]
[0121] Example 3
[0122] Known sample calibration experiment 3: Used to establish a conversion model for different light conditions
[0123] Through the calibration experiment, the model transfer relationship under different light conditions, that is, the conversion model, is obtained. The model parameters are F and e, and thus a multivariate calibration model y after model transfer can be established other , which is used to predict the moisture content of sawdust under different light conditions and can improve the prediction accuracy.
[0124] For black sawdust samples, the transfer relationship is determined through the light calibration experiment. 45 samples with different moisture contents are prepared, and the reference moisture content values are obtained by the drying method. Under 6 kinds of light conditions, the 4-wavelength optical signal values (reflectance) of the 45 samples are measured respectively. Taking the calculated value as the Z i value, so in this embodiment, only Z 1A variable, with the model parameter k = 1. The optical signal obtained under the optimal light condition of 515 ± 5 LUX is the main model, and the optical signals obtained under other light conditions are the subordinate models. The transfer models and their prediction parameters under each light condition are established by selecting the conversion set samples and the prediction set samples, as listed in Table 3.
[0125] Similarly, for the yellow sawdust samples, the transfer relationship is determined through the light calibration experiment. 40 samples with different moisture contents are prepared, and the reference moisture content values are calculated by the drying method. Under 6 light conditions, the 4-wavelength optical signal values (reflectivity) of the 40 samples are measured respectively. Taking The calculated value as the Z i value. Therefore, in this example, only Z 1 A variable, with the model parameter k = 1. The optical signal obtained under the optimal light condition of 515 ± 5 LUX is the main model, and the optical signals obtained under other light conditions are the subordinate models. The transfer models and their prediction parameters under each light condition are established by selecting the conversion set samples and the prediction set samples, as listed in Table 4.
[0126] Table 3 Model transfer and its prediction parameters for black sawdust samples
[0127]
[0128] Table 4 Model transfer and its prediction parameters for yellow sawdust samples
[0129]
[0130] Example 4
[0131] Prediction of the moisture content of unknown samples under non-optimal light measurement conditions
[0132] Randomly collect 7 black sawdust test set samples. The reference moisture content values of the samples are calculated by the drying method. Under the light condition of 335 LUX, 4-wavelength light reflectance signals are obtained. Using the method of the present invention, the corresponding light transfer model parameters are selected, F = 1.0252, e i = 0.0017. According to the distribution of the parameter k values of the test set samples, a segmented measurement model is selected (refer to Table 2), and its prediction parameters are as listed in Table 5. The root mean square error of the test set prediction is 0.7445%, and the correlation coefficient is 0.9973.
[0133] Table 5 Prediction parameters for black sawdust test set samples
[0134]
[0135] Randomly collect 7 yellow sawdust test set samples. The reference value of the moisture content of the samples is calculated by the drying method. Under the light condition of 335 LUX, obtain the light reflectance signals of 4 wavelengths. Adopt the method of the present invention, select the corresponding light transfer model parameters, F = 1.0202, e i = 0.0095. According to the k-value distribution of the test set samples, select the segmented measurement model (refer to Table 2), and its prediction parameters are listed in Table 6. The root mean square error of the test set prediction is 0.8052%, and the correlation coefficient is 0.9976.
[0136] Table 6 Prediction parameters of yellow sawdust test set samples
[0137]
[0138] Further refer to Figure 7 , as an implementation of the above method, in the second aspect, the present application provides an embodiment of the structure diagram of a sawdust type and moisture content detection system 700, and this system can be specifically applied to various electronic devices. This system 700 includes the following modules:
[0139] The discrimination threshold parameter acquisition module 710 is configured to respectively acquire the average light signal values of black sawdust samples and yellow sawdust samples at the first wavelength and the second wavelength, and calculate and obtain the discrimination threshold parameter μ according to the average light signal values;
[0140] The prediction model establishment module 720 is configured to acquire the reference moisture content values of black sawdust samples and yellow sawdust samples, measure the reference light signal and the light signal values of each black sawdust sample and yellow sawdust sample at the third wavelength, the fourth wavelength, the fifth wavelength and the sixth wavelength, and calculate and obtain the parameter k value of each sample according to the reference light signal and the light signal values;
[0141] And divide the moisture content into different intervals according to the reference moisture content value and the parameter k value, and construct a sawdust moisture content prediction model for each interval;
[0142] The prediction model selection module 730 is configured to calculate the root mean square error of the sawdust moisture content prediction model established under each light condition, and select the light condition with the minimum root mean square error value of the prediction as the best light condition, set the sawdust moisture content prediction model established under the best light condition as the main model, and set the sawdust moisture content prediction models established under other light conditions as the conversion models;
[0143] The detection output module 740 is configured to determine the sawdust type of the sample to be tested through the discrimination threshold parameter μ in the discrimination threshold parameter acquisition module, acquire the current environmental illuminance value, if the environmental illuminance value meets the best light condition, then use the main model to detect the moisture content of the sample to be tested, otherwise use the conversion model to detect the moisture content of the sample to be tested.
[0144] In a third aspect, the present application provides a terminal device, including a processor, a memory, and a computer program stored in the memory. The computer program is executed by the processor to implement the wood chip type and moisture content detection method as described in any one of the above.
[0145] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the wood chip type and moisture content detection method as described in any one of the above.
[0146] Reference is now made to Figure 8 , which shows a schematic structural diagram of a computer system 800 of an electronic device suitable for implementing the embodiments of the present application. Figure 8 The electronic device shown is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0147] As Figure 8 shown, the computer system 800 includes a central processing unit (CPU) 801 which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage section 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the computer system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0148] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a liquid crystal display (LCD) etc. and a speaker etc.; a storage section 808 including a hard disk etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as required. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as required so that a computer program read therefrom can be installed into the storage section 808 as required.
[0149] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product that includes a computer program carried on a computer-readable medium, the computer program including program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above functions defined in the methods of the present application are performed.
[0150] It should be noted that the computer-readable storage medium described in the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. And in the present application, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable storage medium other than the computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination of the above.
[0151] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., by connecting through the Internet using an Internet service provider).
[0152] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks can occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0153] The above description is only a preferred embodiment of this application and an explanation of the technical principles applied. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, technical solutions formed by mutually replacing the above features with (but not limited to) technical features having similar functions disclosed in this application.
Claims
1. A method for detecting sawdust type and moisture content, characterized in that: The method comprises the following steps: S1, respectively obtaining the average light signal values of the black sawdust sample and the yellow sawdust sample at the first wavelength and the second wavelength, and calculating the identification threshold parameter μ according to the average light signal values; S2, obtaining a moisture content reference value of the black sawdust sample and the yellow sawdust sample, measuring a reference light signal and a light signal value of each of the black sawdust sample and the yellow sawdust sample at a third wavelength, a fourth wavelength, a fifth wavelength, and a sixth wavelength, and calculating a parameter k value of each of the black sawdust sample and the yellow sawdust sample according to the reference light signal and the light signal value; and dividing the moisture content into different intervals according to the moisture content reference value and the parameter k value, and constructing a sawdust moisture content prediction model for each interval; S3, calculating the predicted root mean square error of the sawdust moisture content prediction model established under each lighting condition, and selecting the lighting condition with the smallest predicted root mean square error value as the optimal lighting condition, setting the sawdust moisture content prediction model established under the optimal lighting condition as the main model, and setting the sawdust moisture content prediction model established under other lighting conditions as the conversion model; S4. Determine the sawdust type of the sample to be tested by the identification threshold parameter μ in step S1, obtain the current ambient light illumination value, and if the ambient light illumination value meets the optimal lighting condition, use the main model to detect the moisture content of the sample to be tested, otherwise use the conversion model to detect the moisture content of the sample to be tested.
2. The method for detecting sawdust type and moisture content according to claim 1, characterized in that: The first wavelength is 650 nm, the second wavelength is 400 nm, the third wavelength is 1300 nm, the fourth wavelength is 1450 nm, the fifth wavelength is 1818 nm, and the sixth wavelength is 1940 nm.
3. The method for detecting sawdust type and moisture content according to claim 2, characterized in that: In step S1, the discrimination threshold parameter μ is calculated according to the average optical signal value, and the calculation expression is: In the formula, is the average value of the light signal values of the plurality of yellow sawdust samples at a wavelength of 650 nm, is the average value of the light signal values of the plurality of yellow sawdust samples at a wavelength of 400 nm, is the average value of the optical signal values of the plurality of black sawdust samples at a wavelength of 650 nm, It is the average value of the light signal values of the plurality of black sawdust samples at a wavelength of 400 nm.
4. The method for detecting sawdust type and moisture content according to claim 2, characterized in that: In step S2, the parameter k value of each of the black sawdust sample and the yellow sawdust sample is calculated based on the reference light signal and the light signal value, and the calculation expression is: In the formula, w ref is the reference optical signal, w 1300 is the optical signal value of each black sawdust sample or yellow sawdust sample at a wavelength of 1300 nm, w 1450 is the optical signal value of each black sawdust sample or yellow sawdust sample at a wavelength of 1450nm, w 1818 is the optical signal value of each black sawdust sample or yellow sawdust sample at a wavelength of 1818 nm, w 1940 is the light signal value of each of the black sawdust sample or the yellow sawdust sample at a wavelength of 1940 nm; In step S2, a sawdust moisture content prediction model is constructed for each interval, wherein the calculation expression of the segmented moisture content prediction model is: In the formula, a1, a2…a n and b1, b2…b n are the regression coefficients of the nonlinear moisture content prediction model of the moisture content reference value of n segments, y1, y2…y n ,y n+1 are the discontinuity points of the n-segment moisture content reference value.
5. The method for detecting sawdust type and moisture content according to claim 1, characterized in that: In step S3, the root mean square error of the sawdust moisture content prediction model established under each lighting condition is calculated, wherein the calculation expression of the root mean square error is: In the formula, RMSEP is the root mean square error of prediction, n is the number of modeling samples, and y 预测,i is the predicted value of the i-th sample in the modeling sample, y 参考,i is the reference value of the i-th sample in the modeling sample.
6. The method for detecting sawdust type and moisture content according to claim 2, characterized in that: In step S3, the sawdust moisture content prediction model established under the optimal lighting conditions is set as the main model, and the expression is: In the formula, y 最佳光照 is the moisture content under the optimal lighting conditions, a and b are the regression coefficients of the sawdust moisture content prediction model; The sawdust moisture content prediction model established under other lighting conditions is a conversion model, and the expression is: In the formula, y other is the moisture content under other lighting conditions, F and e are conversion matrix parameters, and a and b are regression coefficients of the sawdust moisture content prediction model.
7. The method for detecting sawdust type and moisture content according to claim 1, characterized in that: The light signal value is the energy value, reflectivity or absorbance of the light; in step S4, if the measured ambient light illumination value p=515±5LUX, it is the optimal lighting condition, where p represents the ambient light illumination value and LUX represents the illumination unit.
8. A sawdust type and moisture content detection system, characterized in that: The system comprises: The identification threshold parameter acquisition module is configured to respectively obtain the average light signal values of the black sawdust sample and the yellow sawdust sample at the first wavelength and the second wavelength, and calculate the identification threshold parameter μ according to the average light signal values; A prediction model building module is configured to obtain a moisture content reference value of a black sawdust sample and a yellow sawdust sample, measure a reference light signal and a light signal value of each of the black sawdust sample and the yellow sawdust sample at a third wavelength, a fourth wavelength, a fifth wavelength, and a sixth wavelength, and calculate a parameter k value of each sample according to the reference light signal and the light signal value; and dividing the moisture content into different intervals according to the moisture content reference value and the parameter k value, and constructing a sawdust moisture content prediction model for each interval; A prediction model selection module is configured to calculate the prediction root mean square error of the sawdust moisture content prediction model established under each lighting condition, and select the lighting condition with the smallest prediction root mean square error value as the optimal lighting condition, set the sawdust moisture content prediction model established under the optimal lighting condition as the main model, and set the sawdust moisture content prediction model established under other lighting conditions as the conversion model; The detection output module is configured to determine the sawdust type of the sample to be tested through the identification threshold parameter μ in the identification threshold parameter acquisition module, obtain the current ambient light illumination value, and if the ambient light illumination value meets the optimal lighting condition, use the main model to detect the moisture content of the sample to be tested, otherwise use the conversion model to detect the moisture content of the sample to be tested.
9. A terminal device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory, wherein the computer program is executed by the processor to implement the method for detecting the type and moisture content of sawdust according to any one of claims 1 to 7.
10. A computer-readable storage medium, wherein a computer program is stored in the medium, and when the computer program is executed by a processor, the method for detecting the type and moisture content of sawdust according to any one of claims 1 to 7 is implemented.