Coal sampling method based on near infrared spectroscopy

The coal quality parameters are predicted by near-infrared spectroscopy and U-Net model, combined with weighing data, and dynamically adjust the sampling plan, the problem of low efficiency of existing coal sampling methods is solved, and efficient and accurate coal sampling results are achieved .

CN119131323APending Publication Date: 2024-12-13CHINA CERTIFICATION & INSPECTION (GROUP) CO LTD HEBEI BRANCH

Patent Information

Application Number
CN202411254014.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing coal sampling methods are inefficient and difficult to calculate the precision in real time, resulting in inaccurate sampling results and difficult to dynamically adjust.

Method used

The coal sampling method based on near-infrared spectroscopy is adopted, and the coal quality parameters are predicted using the U-Net model, the sampling precision is calculated based on the weighing data, and the sampling process is dynamically optimized by adaptively adjusting the sampling scheme.

Benefits of technology

It improves the coal sampling efficiency and the accuracy of sampling results, ensures that the sampling precision meets the requirements, and reduces errors and manual interventions during the sampling process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131323A_ABST
    Figure CN119131323A_ABST
Patent Text Reader

Abstract

The invention discloses a coal sampling method based on near infrared spectroscopy, and belongs to the field of coal quality detection.The coal sampling method comprises the steps that a near infrared spectrogram and coal quality parameters of a coal sample are obtained, a data set S1 is constructed, preprocessing is carried out, and a data set S2 is obtained; a U-Net network model is constructed; training a U-Net network model by using the data set S2; the method comprises the following steps: acquiring coal samples initially collected on a sampling site, crushing and grouping to obtain multiple groups of subsamples; adopting a near infrared spectrometer to measure the near infrared spectrogram of each subsample as input, and utilizing the trained U-Net network model to predict corresponding coal quality parameters; performing cross grouping, pairing and weighing on each group of subsamples, and calculating the relative deviation of the weight difference of each pair of coal samples; calculating the sampling precision according to the relative deviation of the weight difference and the predicted coal quality parameters; and comparing the calculated sampling precision with the target precision, and adjusting the sampling scheme to obtain a coal sampling result. Aiming at the low coal sampling efficiency in the prior art, the sampling efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of coal quality detection, and more specifically, to a coal sampling method based on near-infrared spectroscopy. Background Art

[0002] Coal is an important basic energy source and industrial raw material in my country. In order to ensure the quality of coal in the circulation field, it is necessary to accurately test and control the quality of commercial coal. Coal sampling is the first step in the entire coal quality testing process, and its scientificity and representativeness directly affect the accuracy of subsequent coal quality analysis results. At present, my country's commercial coal sampling mainly adopts manual sampling methods, which are implemented in accordance with GB / T 475-2008 "Manual Sampling Methods for Commercial Coal Samples".

[0003] The standard stipulates that before starting manual sampling of coal, the sampling precision needs to be determined based on the coal quality characteristic parameters (generally dry basis ash content). After that, the number of sampling units and unit sub-samples are determined according to the procedures specified in the standard, and then sampling is carried out by continuous sampling or intermittent sampling. In order to ensure that the sampling results meet the precision requirements, the standard requires the use of double or multiple sampling methods during the sampling process, and samples are prepared and sent for inspection separately, and then the sampling precision is calculated by statistical methods. However, this sampling method that first assesses precision has many shortcomings in actual coal trade and is difficult to strictly implement.

[0004] The ideal commercial coal sampling method is to be able to calculate the precision in real time and dynamically adjust the sampling plan accordingly, but there are no relevant reports yet. In recent years, rapid coal quality analysis technologies such as near-infrared spectroscopy, laser-induced breakdown spectroscopy, and X-ray fluorescence spectroscopy have continued to develop. Among them, near-infrared spectroscopy has high accuracy in laboratory coal sample analysis, but the accuracy of on-site analysis is still not ideal; laser-induced breakdown spectroscopy can quickly determine coal quality parameters, but the equipment is expensive and requires sample pretreatment; X-ray fluorescence spectroscopy can accurately analyze the ash-forming elements in coal, and combined with near-infrared spectroscopy, it can achieve rapid detection of calorific value, ash content, etc., but there are still limitations such as expensive equipment, sample pretreatment, and difficulty in on-site application. Contents of invention

[0005] 1. Technical issues to be solved

[0006] In response to the problem of low coal sampling efficiency in the prior art, the present application provides a coal sampling method based on near-infrared spectroscopy, which uses a trained U-Net model to predict coal quality parameters from the collected near-infrared spectra of coal samples, calculates the sampling precision based on the prediction results and weighing data, and dynamically adjusts the sampling scheme by comparing with the target precision, thereby improving the sampling efficiency.

[0007] 2. Technical solution

[0008] The purpose of this application is achieved through the following technical solutions.

[0009] The present application provides a coal sampling method based on near-infrared spectroscopy, comprising: obtaining a near-infrared spectrum and coal quality parameters of a coal sample, and constructing a data set S1; wherein the coal quality parameters include moisture, ash, volatile matter and calorific value; preprocessing the data set S1 to obtain a data set S2; constructing a U-Net network model; training the U-Net network model using the data set S2; obtaining coal samples initially collected at a sampling site, crushing and grouping them, and obtaining multiple groups of sub-samples; using a near-infrared spectrometer to measure the near-infrared spectrum of each sub-sample as input, and using the trained U-Net network model to predict the corresponding coal quality parameters; cross-grouping and pairing each group of sub-samples for weighing, and calculating the relative deviation of the weight difference of each pair of coal samples; calculating the sampling precision according to the relative deviation of the weight difference and the predicted coal quality parameters; comparing the calculated sampling precision with the target precision, adjusting the sampling scheme, and obtaining the coal sampling result according to the adjusted sampling scheme.

[0010] Specifically, an end-to-end coal quality parameter prediction model is constructed based on the U-Net semantic segmentation network; the input is a near-infrared spectrum, and the encoder extracts multi-scale spectral features, and the decoder gradually restores the original resolution; the jump connection transmits detail information between the encoding and decoding layers to ensure the precision of the prediction results; the model output is a coal quality parameter map consistent with the resolution of the spectrum, and each pixel represents the parameter value at the corresponding position. The collected sub-sample spectrum is input into the trained U-Net model to predict the corresponding coal quality parameter map; the prediction results are post-processed (such as average pooling and threshold segmentation) to obtain the predicted values ​​of coal quality parameters of each sub-sample; the rapid prediction based on the spectrum provides timely feedback for the subsequent sampling precision calculation. The sub-samples are paired and cross-weighed to calculate the relative deviation of the weight difference of the paired sub-samples; the relative deviation reflects the uniformity between the sub-samples and is an important indicator for evaluating the representativeness of the sampling. The sampling precision is calculated according to the statistical method based on the relative deviation of the sub-sample weight difference and the predicted coal quality parameters; the actual sampling precision is compared with the preset target value to determine whether the sampling plan needs to be adjusted; the precision comparison result reflects the reliability of the current sampling plan and is the basis for dynamic optimization. If the actual sampling precision meets the requirements, the sampling is completed with the current plan; otherwise, the adaptive adjustment mechanism is activated; the theoretical minimum sub-sample weight is calculated by detecting the nominal particle size of the coal sample, and the actual sampling volume is increased according to a certain proportion; the sampling plan is updated repeatedly until the precision meets the requirements or the weight adjustment upper limit is reached; the adaptive adjustment realizes closed-loop optimization control of the sampling process, which improves efficiency while ensuring sampling quality.

[0011] Furthermore, the data set S1 is preprocessed to obtain the data set S2, including: using the Savitzky-Golay algorithm to perform the second-order derivative of each wavelength point of the near-infrared spectrum to obtain the second-order derivative spectrum; the second-order derivative processing can amplify the subtle features of the spectrum and highlight the coal quality differences between different coal samples; setting the SG convolution smoothing parameters, including the number of smoothing points is 5-15 points, and the polynomial order is 2-3 orders; using the number of smoothing points as the window width, sliding the window on the second-order derivative spectrum, using the polynomial to perform least squares fitting on the data in the window, and replacing the original value with the fitting value of the window center point to achieve the spectrum. Smoothing and denoising; SG convolution smoothing can effectively remove high-frequency noise in the second-order derivative spectrum and improve the signal-to-noise ratio; data enhancement is performed on the smoothed second-order derivative spectrum and the corresponding coal quality parameters to obtain data set S2; data enhancement methods such as rotation, translation, scaling, and flipping are used to reasonably set enhancement parameters according to the characteristics of spectral data, and more spectrum-coal quality parameter pairs are generated without changing the main characteristics of the spectrum to expand the data set; data enhancement processing can effectively alleviate the problem of insufficient samples and improve the generalization ability of the model; the second-order derivative spectrum and the corresponding coal quality parameters after data enhancement constitute data set S2.

[0012] Specifically, preprocessing the original near-infrared spectrum-coal quality parameter data set (S1) is a very critical step. Through reasonable data preprocessing operations, the signal-to-noise ratio of spectral data can be effectively improved, the coal quality characteristics can be highlighted, and a good foundation can be laid for subsequent modeling. Savitzky-Golay (SG) second-order derivative calculation: The SG algorithm is used to perform a second-order derivative on each wavelength point of the near-infrared spectrum to obtain the corresponding second-order derivative spectrum; the SG derivative is a smoothing derivative method based on sliding window polynomial fitting, which can effectively reduce the influence of noise in spectral data; the second-order derivative can amplify the characteristic information in the spectrum, such as absorption peaks, inflection points, etc., to further highlight the differences in coal quality parameters. The SG derivative calculation formula is: where f(x) is the original spectrum, f"(x i ) is the second-order derivative spectrum, x i is the i-th wavelength point, h is the wavelength interval, m is the half width of the sliding window, c k The coefficients of the fitting polynomial; by adjusting the sliding window width and the order of the fitting polynomial, the smoothing effect and the degree of feature retention can be balanced. SG convolution smoothing: After obtaining the second-order derivative spectrum, SG convolution is further used to smooth it; SG convolution smoothing is a filtering method based on local polynomial regression, which can remove high-frequency noise while retaining useful signals. The mathematical expression of SG convolution smoothing is: Among them, x i is the input sequence (i.e. the second derivative spectrum), y iis the smoothed output sequence, m is the half width of the sliding window, c k is a convolution coefficient; the convolution coefficient c k It can be pre-calculated based on the least squares analytical solution of the polynomial fitting and stored as a convolution kernel. By optimizing the convolution kernel width and the polynomial order, a balance can be achieved between denoising and conformal preservation to improve the quality of spectral data.

[0013] Furthermore, after obtaining the data set S2, the method further includes: using a five-fold cross-validation method to divide the data set S2 into five subsets: randomly dividing the data set S2 into five non-overlapping subsets of similar size, numbered s 21 ,s 22 ,s 23 ,s 24 ,s 25 ; Each subset contains one fifth of the samples in the dataset S2, including both spectral data and corresponding coal quality parameters; traverse the subsets, perform cross-validation, and use the subset s 2i As the test set; use the remaining four subsets as the training set and validation set, where the number of samples in the validation set is half of the test set; use the training set and validation set to train the model, and use the test set to evaluate the model performance; record the evaluation indicators of the model on the test set, such as precision, recall rate, F1 value, etc.; take the arithmetic mean of the average performance indicators of the five cross-validations as the overall performance evaluation result of the model on the data set S2. The average performance indicator can fully reflect the prediction ability and generalization ability of the model and reduce the random impact of sample division.

[0014] Furthermore, the second-order derivative spectrum is subjected to SG convolution smoothing, including: setting SG convolution smoothing parameters, including the number of smoothing points and the polynomial order; the number of smoothing points is an odd number between 5 and 15, such as 7, 9, 11, etc. The larger the number of smoothing points, the higher the degree of smoothing; the polynomial order is 2-3, and a second-order or third-order polynomial is selected to fit the window data; the number of smoothing points is used as the window width, and the window is slid from left to right on the spectrum, moving one data point at a time; for each window, the wavelength of its center point and the corresponding absorbance value are extracted; the wavelength of the center point of the window is used as the independent variable and the absorbance value is used as the dependent variable, and the least squares method is used for fitting using the set polynomial order; polynomial fitting can better retain the shape characteristics of the spectrum while smoothing; the polynomial fitting value of the center point of the window is used as the new absorbance value of the point to replace the original value; after all data points are replaced, the second-order derivative spectrum after SG smoothing is obtained; after spectral smoothing and denoising, high-frequency noise is effectively suppressed and the spectral signal-to-noise ratio is improved.

[0015] Furthermore, a U-Net network model is constructed, including: constructing a U-Net network model including an encoder, a decoder and a regression output layer; the encoder includes multiple convolution blocks, each of which includes two convolution layers, and a 3x3 convolution kernel is used to perform convolution operations on the input feature map, and a ReLU activation function is used to introduce nonlinearity; a maximum pooling layer is used, and a 2x2 pooling kernel is used to downsample the feature map after convolution; the encoder reduces the size of the feature map layer by layer by repeating convolution and downsampling operations to extract the multi-scale features of the spectral data; the decoder includes multiple upsampling modules, each of which includes a The algorithm consists of a transposed convolution layer, which uses a 2x2 convolution kernel to upsample the feature map output by the encoder and doubles the size of the feature map. A splicing layer splices the feature map after the transposed convolution with the feature map of the corresponding layer of the encoder according to the channel dimension to achieve feature fusion. Two convolution layers use a 3x3 convolution kernel to convolve the spliced ​​feature map and use the ReLU activation function. The decoder restores the size of the feature map layer by layer and integrates local and global features by repeated upsampling, splicing, and convolution operations. The regression output layer contains multiple fully connected layers, which are used to predict moisture, ash, volatile matter, and calorific value in coal quality parameters.

[0016] Furthermore, the U-Net model was trained using the dataset S2, including: initializing the U-Net model parameters, setting the Adam optimizer, MAE loss function, a learning rate of 0.03, and 70 Epochs and other training parameters; batch reading spectrum-coal quality parameter pairs from the training set of the dataset S2, inputting them into the U-Net model for forward propagation, and calculating the MAE loss function; performing backpropagation according to the loss function, using the Adam optimizer to update the weight parameters of the U-Net model, and minimizing the MAE loss function; using the validation set of the dataset S2 to evaluate the model performance, recording evaluation indicators such as MAE, and adjusting the model structure or hyperparameters according to the evaluation results; until the training of the set Epoch is completed, a trained U-Net coal quality parameter prediction model is obtained.

[0017] Further, each group of sub-samples is cross-grouped and paired for weighing, and the relative deviation of the weight difference of each pair of coal samples is calculated; the multiple groups of sub-samples collected are numbered in sequence and cross-grouped, and the sub-samples with even numbers are divided into one group, and the sub-samples with odd numbers are divided into another group; for each group of sub-samples after grouping, two adjacent sub-samples are paired in sequence to form multiple pairs of paired sub-samples; the weight of each pair of paired sub-samples is weighed using an analytical balance, and the weight difference of each pair of paired sub-samples is calculated to obtain weight difference data; based on the obtained weight difference data, the relative deviation of the weight difference of each pair of paired sub-samples is calculated to obtain relative deviation data;

[0018]

[0019] Furthermore, the sampling precision is calculated based on the relative deviation of the weight difference and the predicted coal quality parameters, including: selecting one or more coal quality parameters from moisture, ash, volatile matter and calorific value, combining the predicted coal quality parameter values ​​of each sub-sample and the obtained relative deviation data, and calculating the sampling precision of each coal quality parameter according to the method of Appendix C.1.2.2 of GB / T475-2008: calculating the relative deviation of the predicted coal quality parameter values ​​for each pair of paired sub-samples; calculating the root mean square of the relative deviations of the coal quality parameters of all paired sub-samples as the sampling precision of the coal quality parameter.

[0020] Furthermore, the calculated sampling precision is compared with the target precision, and the sampling scheme is adjusted, including: comparing the calculated sampling precision with the preset target precision, if the sampling precision is less than or equal to the target precision, outputting the final coal sampling result; if the sampling precision is greater than the target precision, detecting the nominal maximum particle size d of the coal at the sampling site, and calculating the corresponding minimum sub-sample weight ma according to the formula ma=0.06d, where ma represents the minimum sub-sample mass and d represents the nominal maximum particle size detected; adjusting the sub-sample weight to the minimum sub-sample weight maxp%, and adjusting the weight according to the adjusted weight. Collect new sub-samples; input the newly collected sub-samples into the trained U-Net model to predict coal quality parameters, cross-add the predicted results to the original data set, and recalculate the sampling precision: if the recalculated sampling precision is less than or equal to the target precision, output the final coal sampling result; if the recalculated sampling precision is greater than the target precision, and the sub-sample weight is less than N times the initial value, return to execute the sub-sample adjustment step; if the recalculated sampling precision is greater than the target precision, and the sub-sample weight is greater than N times the initial value, sample according to the current sub-sample weight until sampling is completed, and output the final coal sampling result;

[0021] Specifically, the values ​​of parameters P and N are crucial to balancing sampling accuracy and efficiency. P determines the increase in sub-sample weight during each round of adjustment, while N limits the maximum multiple of sub-sample weight adjustment. Their values ​​need to be reasonably determined based on sufficient experiments, taking into account factors such as coal quality conditions, sampling tools, and time costs. Based on general experience and existing research in coal sampling, the recommended value ranges for P and N can be preliminarily given as follows: Sub-sample weight adjustment range P: recommended value range: 110% to 150%; typical value: 120%, that is, an increase of 20% on the basis of the minimum theoretical sub-sample weight. Upper limit N of sample weight adjustment: recommended value range: 2-5; typical value: 3, that is, the maximum sub-sample weight can be adjusted to 3 times the initial value; the determination of the value range is mainly based on the following considerations: if the N value is too small (such as <2), the upper limit of the sub-sample weight adjustment is low, and it is difficult to meet the precision requirements by increasing the sampling volume when facing large fluctuations in coal quality and high particle size; if the N value is too large (such as >5), the maximum adjustment range of the sub-sample weight is too large, which will increase the sampling workload on the one hand, and may also introduce new errors due to local over-sampling on the other hand. Therefore, taking 3 times the initial sub-sample weight as the upper limit of adjustment not only provides flexibility in dealing with complex sampling conditions, but also avoids the disadvantages of blind over-sampling.

[0022] 3. Beneficial effects

[0023] Compared with the prior art, the advantages of this application are:

[0024] The use of near-infrared spectroscopy technology to achieve rapid and non-destructive determination of coal quality parameters has replaced traditional chemical analysis methods. By obtaining the near-infrared spectrum of the coal sample and using the pre-trained U-Net deep learning model to predict the coal quality parameters of the spectrum, the moisture, ash, volatile matter and calorific value parameters of the coal sample can be obtained in a short time, avoiding the tedious and time-consuming chemical analysis process and greatly improving the efficiency of coal quality parameter determination.

[0025] The deep learning method was used to construct a spectrum-coal quality parameter prediction model, which fully exploited the coal quality information contained in the near-infrared spectrum data. By preprocessing and enhancing the acquired spectrum-coal quality parameter data set, and using the advanced U-Net network model for training and optimization, a high-performance coal quality parameter prediction model was constructed. The model can automatically extract coal quality features from spectral data and make accurate regression predictions for each coal quality parameter, thus improving the accuracy of coal quality parameter determination.

[0026] The introduction of the group cross-pair weighing method realizes the quantitative evaluation of the precision of the sampling process. The multiple groups of coal samples collected were cross-grouped and weighed in pairs. By calculating the relative deviation of the weight difference of the paired coal samples, the precision data reflecting the repeatability of the sampling process was obtained. Combined with the near-infrared prediction results of the coal samples, the sampling precision of each coal quality parameter was calculated according to the formula, and the precision of the sampling process was quantitatively evaluated.

[0027] The calculated sampling precision is compared with the preset target precision. When the precision does not meet the requirements, the sampling plan is dynamically adjusted by increasing the sub-sample weight, resampling, etc., and the precision is recalculated. This adaptive adjustment process continues until the sampling precision meets the requirements or the sub-sample weight reaches the upper limit, thus ensuring that the sampling process always meets the precision requirements and improving the reliability of the sampling results. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 Schematic diagram of the sampling process for this application;

[0029] Figure 2 This is the Unet network structure diagram of the present application. DETAILED DESCRIPTION

[0030] The present application is described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0031] Figure 1 The present application provides a sampling process diagram of a coal sampling method based on near-infrared spectroscopy, comprising: obtaining a near-infrared spectrum and coal quality parameters of a coal sample to construct a data set S1; wherein the coal quality parameters include moisture, ash, volatile matter and calorific value; preprocessing the data set S1 to obtain a data set S2; constructing a U-Net network model; training the U-Net network model using the data set S2; obtaining the coal samples initially collected at the sampling site, crushing and grouping them to obtain multiple groups of sub-samples; using a near-infrared spectrometer to measure the near-infrared spectrum of each sub-sample as input, and using the trained U-Net network model to predict the corresponding coal quality parameters; cross-grouping and pairing each group of sub-samples for weighing, and calculating the relative deviation of the weight difference of each pair of coal samples; calculating the sampling precision based on the relative deviation of the weight difference and the predicted coal quality parameters; comparing the calculated sampling precision with the target precision, adjusting the sampling scheme, and obtaining the coal sampling result based on the adjusted sampling scheme.

[0032] Take a certain variety of anthracite produced in Ordos, Inner Mongolia as an example.

[0033] In order to obtain the data set required for establishing the coal quality parameter prediction model, 530 original coal samples were collected during daily coal inspection work. The collected coal samples were crushed and ground to 0.2 mm to meet the sample preparation requirements for near-infrared spectroscopy and laboratory chemical analysis. The MicroNIR Pro portable near-infrared spectrometer produced by VIAVI was used to collect spectra of the prepared 530 coal samples. The wavelength measurement range of the spectrometer is 900nm-1700nm, the spectral resolution is 6.24nm, and the spectral absorption values ​​at 125 wavelength points are collected in the entire wavelength range. The near-infrared spectral data of each coal sample is obtained through the acquisition software provided by the spectrometer.

[0034] In order to obtain accurate industrial analysis parameters of 530 coal samples, a qualified third-party laboratory was commissioned to conduct chemical analysis on all samples. The determination of the three parameters of moisture, ash and volatile matter was strictly carried out in accordance with the air-dried basis moisture determination method, ash determination method and volatile matter determination method specified in the national standard GB / T212-2008 "Industrial Analysis Method of Coal". The determination of calorific value parameters was strictly carried out in accordance with the calorific value determination method based on calorimeter specified in the national standard GB / T213-2008 "Method for Determination of Calorific Value of Coal". Through chemical analysis, the moisture, ash, volatile matter and calorific value parameters of each coal sample were obtained. Finally, the near-infrared spectral data of 530 coal samples were integrated with the corresponding industrial analysis parameters to construct the coal quality data set S1. Data set S1 contains the near-infrared spectrum (spectral absorption value) of each coal sample and its corresponding four coal quality parameters of moisture, ash, volatile matter and calorific value, which is the basis for the subsequent establishment of the coal quality parameter prediction model.

[0035] Considering that the near-infrared spectroscopy measurement process is easily disturbed by random noise such as light source noise, instrument system errors, measurement environment changes and other factors, in order to reduce the impact of these factors on the coal quality dataset S1, data preprocessing is required. First, the second-order derivative method is used to process the spectrum of each coal sample in the dataset S1.

[0036] Second-order derivative processing, assuming that the original spectral data is x(n), where n is the index of the wavelength point, n=1, 2, ..., 125. Use the central difference method to perform the second-order derivative of x(n), and the calculation formula is: x"(n)=[x(n+1)-2x(n)+x(n-1)] / Δλ^2, where x"(n) is the second-order derivative of the spectrum x(n), and Δλ is the wavelength interval between two adjacent wavelength points. In this embodiment, Δλ=6.24nm. The above-mentioned second-order derivative formula is applied to each coal sample spectrum in the data set S1 in turn to obtain the second-order derivative spectral data x"(n). The second-order derivative processing amplifies the detailed features of the spectral data and makes the coal quality characteristic information more prominent. But at the same time, the noise in the spectral data is also amplified and needs further smoothing.

[0037] SG smoothing uses the Savitzky-Golay convolution smoothing method to smooth the second-order derivative spectral data x" (n). The steps of SG smoothing are as follows: select the smoothing window width w and the polynomial fitting order p. Usually, w is an odd number and p is an integer between 2 and 6. In this embodiment, w=7 and p=3. For each wavelength point n on the spectrum, w data points in a local window with a width of w and centered on it are selected, and are recorded as [x" (n-3), x" (n-2), ..., x" (n), ..., x" (n+2), x" (n+3)]. In the local window, a p-order polynomial is used to perform least squares fitting on the w data points. The p+1 polynomial coefficients obtained by fitting are recorded as a0, a1, ..., ap. The value of the fitted polynomial at the center point n is used as the smoothed spectral data value x”s(n), that is: x”s(n)=a0+a1*(0)+a2*(0^2)+...+ap*(0^p)=a0; the sliding window is repeated for each wavelength point of the spectrum x”(n) to obtain the complete smoothed spectral data x”s(n). After SG smoothing, the high-frequency noise components in the spectral data are effectively removed, while useful signals such as spectral absorption peaks and valleys reflecting the characteristics of coal quality are retained. The smoothed second-order derivative spectral data x”s(n) is used as the input data of the coal quality parameter prediction model, providing high-quality characteristic information for subsequent modeling. The second-order derivative and SG smoothing processing are performed on all coal sample spectra in the data set S1 in turn, and finally the preprocessed coal quality data set S2 is obtained. Compared with the original data set S1, the spectral data noise in S2 is suppressed, and the coal quality characteristic information is more obvious, providing higher quality input data for subsequent modeling.

[0038] In order to make full use of the limited coal quality data, the five-fold cross validation method is used to divide the data set S2 and evaluate the model. Assume that the preprocessed coal quality data set S2 has a total of N samples, each sample contains 128-dimensional near-infrared spectral data and 4 corresponding coal quality parameters (moisture, ash, volatile matter, calorific value). The data set S2 is randomly divided into five subsets S2_1, S2_2, ..., S2_5, each subset contains N / 5 samples.

[0039] The specific steps of five-fold cross validation are as follows: for i=1, 2, ..., 5: select subset S2_i as the test set test_set_i; merge the remaining four subsets S2_j (j≠i) into the training validation set train_val_set_i; randomly select data with a sample size of N / 10 from train_val_set_i as the validation set val_set_i; use the remaining samples in train_val_set_i as the training set train_set_i; use train_set_i to train the model, adjust the hyperparameters through val_set_i, and evaluate the model performance on test_set_i.

[0040] Through the above steps, the five-fold cross validation makes each sample in the data set S2 have a chance to be selected into the test set, thus obtaining five groups of model performance evaluation results. The five groups of results are averaged to obtain the final performance index of the model. This method of multiple cross-testing reduces the random influence of data set division and makes the model performance evaluation more comprehensive and reliable. In order to match the dimension of the coal sample near-infrared spectrum data with the number of nodes in the model input layer, the spectrum data needs to be filled. The specific steps are as follows: extract the near-infrared spectrum data spectrum of the sample, with a dimension of 125; add 3 zero values ​​at the end of the spectrum to expand it to a 128-dimensional filled_spectrum; replace the original spectrum with filled_spectrum. Through the above cycle, the 125-dimensional spectrum data of each coal sample in the data set S2 is filled and expanded to 128 dimensions, corresponding to the number of nodes in the model input layer. When filling, adding zero values ​​at the end of the original spectrum data does not affect the original spectrum information and meets the dimensional requirements of the model input.

[0041] like Figure 2 As shown, the U-Net network model in this embodiment consists of three parts: encoder, decoder and regression head. Encoder: 5 convolution modules, each module contains: 2 convolution layers, using ReLU activation function; 1 maximum pooling layer for downsampling (the last module has no pooling layer); the feature dimension is gradually downsampled from 128 to 8. Decoder: 4 convolution modules, each module contains: 2 convolution layers, using ReLU activation function; 1 transposed convolution layer for upsampling; feature splicing: splicing the output of the current layer of the decoder with the output of the corresponding layer of the encoder; the feature dimension is gradually upsampled from 8 to 128. Regression head: fully connected layer, used to predict the values ​​of moisture, ash, volatile matter and calorific value; through the encoder, the model extracts the feature information of the near-infrared spectrum; the decoder gradually restores the feature size, and integrates features of different scales through feature splicing; the regression head predicts coal quality parameters based on the features.

[0042] The preprocessed near-infrared spectral data and its corresponding coal quality parameter labels are input into the U-Net model for training. The hyperparameters of the training process are set as follows: optimizer: Adam optimizer; loss function: mean absolute error (MAE); number of training rounds: 70; learning rate: 0.03; a set of test set samples are collected under the same environmental conditions, and the trained model is used to predict the test set. The predicted value output by the model is the detection value of the coal quality parameter.

[0043] In the prior art, most of the traditional machine learning algorithms such as random forest, support vector machine, partial least squares are used to achieve quantitative analysis of coal quality parameters. To prove the effectiveness of the Unet model, the experiment compared three quantitative analysis models: support vector regression (SVR), partial least squares regression (PLSR) and random forest (RF). As shown in Table 1, the model proposed in the present invention achieves the best results under the three evaluation indicators compared with the mainstream traditional machine learning, and the correlation coefficients of moisture, ash, volatile matter and calorific value are 0.8480, 0.9041, 0.7226 and 0.8045 respectively.

[0044] This trained model was used as a precision model for field assessment of manual sampling.

[0045] Table 1 Comparison of prediction results of different models

[0046]

[0047] On-site sampling precision assessment part, on-site conditions: the assessment particle size is ≤50mm, the mass is 5000 tons, and the 70-ton wagon of this sampling unit transports about 70 carriages. The initial sampling plan, at the sampling site, according to the requirements of GB / T475-2008 commercial coal sample manual sampling method, the initial sampling plan is formulated to calculate the number of sub-samples to be collected 135 and the sub-sample weight 3.0kg. The sampling plan plans to collect 2 sub-samples from each carriage, and a total of 140 sub-samples are collected. The expected sampling precision (taking dry ash as an example, the precision is 1%). Take 20 sub-samples continuously according to the initial plan. For each sub-sample, two samples are taken at the same sampling location at the same time. One sample is bagged and sealed normally and kept for subsequent sample preparation. The second sample is crushed on site. For each sub-sample obtained for crushing, use a vehicle-mounted mortar crusher to crush it to 0.2mm. Use NIRS to measure the crushed sample, and measure it continuously for 10 times to obtain 10 spectra. After the determination is completed, the crushed sample is returned to the coal pile or coal flow. The obtained spectrum is input into the mobile app model to obtain the ash, volatile matter, and calorific value of 10 groups of sub-samples. The average value of these 10 groups of values ​​is taken as the predicted value. The predicted values ​​of the initial 20 sub-samples are obtained. Take the ash content as an example in Table 2.

[0048] Table 2 Ash determination results

[0049] Serial number 1 2 3 4 5 6 7 8 9 10 average value 1 4.45 4.92 4.50 5.72 4.54 6.84 6.39 4.49 5.87 5.07 5.28 2 6.94 5.64 6.80 5.59 4.44 4.85 4.91 5.56 5.04 6.29 5.61 3 4.79 5.23 6.54 6.75 6.90 5.16 4.56 6.21 6.18 4.00 5.63 4 6.78 5.54 5.62 4.73 6.05 4.24 6.33 6.94 4.93 6.63 5.78 5 4.54 4.86 5.27 5.54 5.51 4.17 5.87 4.68 4.71 4.79 4.99 6 5.02 6.43 4.88 5.73 5.78 6.54 6.30 6.74 6.58 5.49 5.95 7 6.47 6.20 4.82 6.64 6.74 5.42 5.73 5.75 6.92 4.90 5.96 8 4.43 4.49 5.35 5.38 4.00 6.95 6.14 5.19 6.00 6.65 5.46 9 5.37 4.97 5.86 6.87 4.93 4.69 6.08 5.04 5.00 4.93 5.37 10 4.20 4.92 4.03 4.97 6.09 4.62 6.27 6.63 5.59 5.42 5.27 11 6.39 4.34 4.17 4.95 5.89 5.70 5.50 6.25 5.71 6.83 5.57 12 6.06 6.13 4.90 5.81 4.29 6.98 4.96 6.56 5.13 6.11 5.69 13 4.86 4.78 5.98 5.60 6.58 6.86 6.98 5.96 5.40 6.10 5.91 14 5.92 4.11 4.13 4.12 6.64 6.44 4.09 5.41 5.62 5.76 5.22 15 5.07 4.05 5.23 5.25 6.45 6.84 6.28 4.32 4.94 4.62 5.31 16 5.53 5.93 6.33 6.72 6.40 5.86 4.72 5.98 4.88 6.62 5.90 17 5.69 4.37 4.89 4.84 6.57 4.86 6.13 4.68 5.27 4.46 5.18 18 6.17 4.63 6.94 5.45 6.24 6.21 4.49 4.69 5.06 4.94 5.48 19 4.67 5.85 4.36 5.52 4.25 4.45 4.33 5.61 5.80 6.73 5.16 20 6.96 5.22 4.83 5.01 4.61 6.09 6.88 5.01 5.35 6.86 5.

[0050] For the calculation of initial precision, the initial 20 sub-samples were numbered sequentially and cross-grouped, with even numbers in one group and odd numbers in another group, to obtain 10 pairs of quality analysis data. The initial sampling precision was calculated using the method in Appendix C.1.2.2 of GB / T475-2008, with ash content as the quality parameter. See Table 3.

[0051] Table 3 Initial sampling precision

[0052]

[0053]

[0054] Dynamic adjustment of the sampling scheme, comparing the initial precision with the precision expectation. If the initial precision does not meet the precision expectation, immediately detect the nominal maximum particle size, increase the sub-sample weight to the minimum sub-sample weight corresponding to 1.2 times the nominal maximum particle size, and continue to take 2 sub-samples. Measure NIRS for the newly obtained sub-samples, and obtain the prediction results through the model. Cross-add the newly obtained prediction results to the data group and recalculate the sampling precision. If the precision expectation is still not met, repeat until the sampling precision requirement is met. However, when the sub-sample weight reaches twice the initial plan, if the calculated precision still does not meet the expectation, the sub-sample weight will not be increased. Continue sampling according to this sub-sample weight, and still iterate the precision once for every two additional sub-samples. If the upper limit of sampling precision is greater than the expected precision, continue sampling, and calculate the precision once for every two additional sub-samples. If the upper limit of precision is ≤ the expected precision at a certain time, restore the sampling parameters set by the initial sampling scheme. Repeat the above process until the sampling is completed.

[0055] The invention of the present application and its implementation methods are described schematically above. The description is not restrictive. Without departing from the spirit or basic features of the present application, the present application can be implemented in other specific forms. What is shown in the accompanying drawings is only one of the implementation methods of the invention of the present application. The actual structure is not limited to this. Any figure mark in the claims should not limit the claims involved. Therefore, if a person of ordinary skill in the art is inspired by it, without departing from the purpose of the present invention, a structural method and an embodiment similar to the technical solution are designed without creativity, which should all fall within the scope of protection of this patent. In addition, the word "including" does not exclude other elements or steps, and the word "one" before the element does not exclude the inclusion of "multiple" elements. The multiple elements stated in the product claim can also be implemented by one element through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.

Claims

1. A coal sampling method based on near infrared spectroscopy, comprising: Obtain near infrared spectra and coal quality parameters of coal samples to construct data set S1; wherein the coal quality parameters include moisture, ash, volatile matter and calorific value; Preprocess the data set S1 to obtain the data set S2; Build a U-Net network model; use the data set S2 to train the U-Net network model; Obtain the coal samples initially collected at the sampling site, crush and group them, and obtain multiple groups of sub-samples; The near infrared spectra of each sub-sample measured by near infrared spectrometer are used as input, and the corresponding coal quality parameters are predicted using the trained U-Net network model. Weigh each group of sub-samples in a cross-grouped manner and calculate the relative deviation of the weight difference of each pair of coal samples; Calculate sampling precision based on the relative deviation of weight difference and predicted coal quality parameters; The calculated sampling precision is compared with the target precision, the sampling plan is adjusted, and the coal sampling results are obtained according to the adjusted sampling plan.

2. The coal sampling method based on near infrared spectroscopy according to claim 1, characterized in that: Preprocess the data set S1 to obtain data set S2, including: The Savitzky-Golay algorithm is used to perform the second-order derivative of each wavelength point of the near-infrared spectrum to obtain the second-order derivative spectrum. Perform SG convolution smoothing on the second-order derivative spectrum; The smoothed second-order derivative spectra and the corresponding coal quality parameters are enhanced to obtain data set S2.

3. The coal sampling method based on near infrared spectroscopy according to claim 2 is characterized in that: After obtaining the data set S2, it also includes: The five-fold cross-validation method was used to divide the dataset S2 into five subsets; Traverse the subsets, perform cross-validation, and take the arithmetic mean of the average performance indicators of five cross-validations as the overall performance evaluation result of the model on dataset S2.

4. The coal sampling method based on near infrared spectroscopy according to claim 2 is characterized in that: The second-order derivative spectrum is smoothed by SG convolution, including: Set the SG convolution smoothing parameters, including the number of smoothing points and the polynomial order; The number of smoothing points is used as the window width, and the window is slid on the second-order derivative spectrum. The data in the window are fitted with a polynomial using the least squares method. The original value is replaced by the fitted value at the center of the window to perform spectral smoothing and denoising.

5. The coal sampling method based on near infrared spectroscopy according to claim 4 is characterized in that: Build the U-Net network model, including: Build a U-Net network model including encoder, decoder and regression output layer; The encoder contains multiple convolution blocks, each of which contains two convolution layers with ReLU activation functions and a maximum pooling layer. It extracts multi-scale features of the spectrum through downsampling and reduces the size of the feature map layer by layer. The decoder contains multiple upsampling modules, each of which contains a transposed convolution layer, a concatenation layer, and two convolution layers with ReLU activation functions. The transposed convolution layer upsamples the feature map. The concatenation layer concatenates the feature map of the corresponding layer of the encoder with the upsampled feature map by channel. The convolution layer extracts the information of the concatenated feature map, and the decoder restores the feature map size layer by layer. The regression output layer contains multiple fully connected layers, which are used to predict the moisture, ash, volatile matter and calorific value of coal quality parameters.

6. The coal sampling method based on near infrared spectroscopy according to claim 5 is characterized in that: The U-Net model is trained using the dataset S2, including: Initialize U-Net model parameters and training parameters, including MAE loss function, learning rate and number of training times; Obtain spectrum-coal quality parameter pairs from dataset S2, input them into the U-Net model for forward propagation, and calculate the MAE loss function; Back propagation is performed according to the loss function, and the Adam optimizer is used to update the weight parameters of the U-Net model to minimize the MAE loss function.

7. The coal sampling method based on near infrared spectroscopy according to claim 6 is characterized in that: Weigh each group of sub-samples in a cross-grouped manner and calculate the relative deviation of the weight difference of each pair of coal samples; The collected multiple groups of sub-samples are numbered in sequence and cross-grouped, with the sub-samples with even numbers being grouped into one group and the sub-samples with odd numbers being grouped into another group; For each group of sub-samples after grouping, two adjacent sub-samples are paired in sequence to form multiple pairs of paired sub-samples; Get the weight of each pair of paired samples, calculate the weight difference of each pair of paired samples, and get the weight difference data m i ; According to the weight difference data, the relative deviation of the weight difference of each pair of paired samples is calculated to obtain the relative deviation data RSD: in, represents the average weight difference of paired sub-samples; n represents the number of paired sub-samples; i represents the sequence number of paired sub-samples; mi represents the weight difference of the ith paired sub-sample pair.

8. The coal sampling method based on near infrared spectroscopy according to claim 7 is characterized in that: The sampling precision is calculated based on the relative deviation of the weight difference and the predicted coal quality parameters, including: According to the predicted coal quality parameter values ​​and relative deviation data s of each sub-sample: Among them, d represents the numerical difference of coal quality parameters of each paired sub-sample; n represents the number of paired sub-samples; Calculate the sampling precision s of each coal quality parameter.

9. The coal sampling method based on near infrared spectroscopy according to claim 8, characterized in that: Compare the calculated sampling precision with the target precision and adjust the sampling plan, including: The calculated sampling precision is compared with the preset target precision. If the sampling precision is less than or equal to the target precision, the final coal sampling result is output; If the sampling precision is greater than the target precision, the nominal maximum particle size d of the coal at the sampling site is detected, and the corresponding minimum sub-sample weight ma is calculated according to the formula ma=0.06d, where ma represents the minimum sub-sample mass and d represents the nominal maximum particle size detected; The sub-sample weight is adjusted to the minimum sub-sample weight maxp%, and a new sub-sample is collected according to the adjusted weight; The newly collected sub-samples are input into the trained U-Net model to predict coal quality parameters, the prediction results are cross-added to the original data set, and the sampling precision is recalculated: If the recalculated sampling precision is less than or equal to the target precision, the final coal sampling result is output; If the recalculated sampling precision is greater than the target precision and the sub-sample weight is less than N times the initial value, return to the sub-sample adjustment step; If the recalculated sampling precision is greater than the target precision and the sub-sample weight is greater than N times the initial value, sampling is carried out according to the current sub-sample weight until sampling is completed and the final coal sampling result is output.

Citation Information

Patent Citations

  • Method and system for rapidly measuring coal moisture content based on convolutional neural network

    CN116844658A

  • Coal quality parameter rapid detection method based on multi-output U-Net

    CN118130391A

Cited By

  • Multi-quality parameter cooperative detection method and system based on near infrared spectrum

    CN120142228A

  • Multi-quality parameter collaborative detection method and system based on near-infrared spectroscopy

    CN120142228B

  • Coal quality detection method and device based on multispectral fusion and working condition self-correction

    CN121762480A