Coal type identification and quality prediction integrated whole moisture rapid detection method and system
By constructing a rapid full moisture detection method that integrates coal type identification and quality prediction, and utilizing the majority voting arbitration mechanism of XGBoost, ROCKET, and SVM classification models as well as long short-term memory networks, the problems of long detection cycle and insufficient accuracy in existing technologies are solved. This method enables rapid and accurate detection of coal type identification and full moisture, meeting the online detection needs of industrial sites.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUNAN UNIV OF SCI & TECH
- Filing Date
- 2026-05-18
- Publication Date
- 2026-07-31
AI Technical Summary
Existing coal quality testing technologies are insufficient in terms of speed and accuracy, making it difficult to meet the needs of industrial sites for coal type identification and online, real-time detection of total moisture content. In particular, traditional methods have long testing cycles, and microwave and near-infrared methods are easily affected by changes in coal type, particle size differences, and density fluctuations.
A rapid method for detecting total moisture content by integrating coal type identification and quality prediction is adopted. By constructing and training an integrated coal type identification model and a time series prediction model, and utilizing the majority voting arbitration mechanism of XGBoost, ROCKET and SVM classification models, combined with a long short-term memory network, the method can analyze the short-term quality change sequence of coal samples in the early stage of drying, identify the coal type and predict the total moisture content.
It enables rapid detection of coal type and total moisture content, reducing detection time to minutes. It can meet the online and real-time acquisition needs of industrial sites, improve the accuracy and stability of detection, and reduce the impact of noise and parameter sensitivity.
Smart Images

Figure CN122221002B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of coal quality testing technology, and in particular to a rapid full moisture detection method and system that integrates coal type identification and quality prediction. Background Technology
[0002] With the development of coal quality testing technology, various technical approaches have emerged for measuring moisture in coal. Common methods include drying loss-in-weight method, neutron method, conductivity method, capacitance method, microwave method, and near-infrared spectroscopy. These different methods exhibit significant differences in measurement mechanism, applicable scenarios, detection speed, and online processing capabilities.
[0003] The loss on drying method calculates the moisture content by heating and drying a coal sample under specified temperature and atmosphere, and then calculating the difference in mass before and after drying. While this method offers high accuracy and stable results, and is often used as a reference method, its testing cycle can take several hours, making it unsuitable for rapid or online testing in industrial settings.
[0004] The neutron method utilizes the slowing property of fast neutrons in hydrogen-containing media to invert the moisture content of coal samples by detecting the slowed neutron response signal, enabling non-contact online measurement. However, the measurement results of this method are easily affected by the organic hydrogen components in the coal, and the neutron source poses radiation safety risks, requiring strict protection and regulatory measures, which limits its widespread application.
[0005] The conductivity method indirectly reflects the moisture content of a coal sample by detecting changes in its conductivity or resistivity; the capacitance method is based on the change in dielectric constant caused by changes in the moisture content of the coal sample, and inverses the moisture content through electrical signals. Both of these methods are simple in structure and have a fast response, but their measurement stability is poor and they are easily affected by factors such as coal sample particle size, bulk density, electrode contact state, and ambient temperature, resulting in insufficient accuracy.
[0006] The microwave method utilizes the influence of moisture in coal on electromagnetic characteristics such as amplitude attenuation and phase change during microwave propagation to achieve quantitative moisture measurement. It has advantages such as being non-contact, having a fast response, and being suitable for online detection. However, its measurement accuracy is quite sensitive to changes in coal seam thickness, coal sample particle size, and density, requiring the use of complex compensation models, and its reliability decreases under conditions of large fluctuations in coal quality.
[0007] Near-infrared spectroscopy (NIRS) analyzes the moisture content of coal samples based on changes in absorption and reflection characteristics in the near-infrared band, combined with a chemometric model. It is characterized by its speed, non-destructive nature, and ease of online application. However, this method is highly dependent on the sample surface condition, particle size distribution, and the robustness of the calibration model. When the coal type or quality changes, the model is prone to failure, requiring frequent recalibration.
[0008] In actual coal production, traditional laboratory methods, such as the loss on drying method, are accurate but severely outdated. While rapid detection technologies such as microwave and near-infrared spectroscopy have some online potential, they are generally affected by factors such as coal type, particle size differences, and density fluctuations, and are highly dependent on mature and stable calibration models. Summary of the Invention
[0009] To address the shortcomings of existing technologies, this invention provides a rapid method and system for detecting total moisture content in coal that integrates coal type identification and quality prediction. By analyzing the quality changes during the coal heating process, the quality of the coal after complete drying can be estimated, thereby achieving rapid measurement of total moisture content in the coal.
[0010] To solve the above-mentioned technical problems, the technical solution proposed by this invention is as follows:
[0011] A rapid method for detecting total moisture content in coal, integrating coal type identification and quality prediction, includes the following steps:
[0012] Construct and train an integrated model for coal type identification and a time series prediction model for rapid detection of total moisture in coal. The time series prediction model is based on a long short-term memory network.
[0013] Obtain the short-term mass change sequence of the coal sample to be tested during the initial stage of drying;
[0014] The short-term quality change sequence is input into the coal type identification ensemble model, which outputs the coal type category.
[0015] Based on the coal type, a corresponding time series prediction model is selected as the target prediction model; the short-term quality change sequence of the coal sample to be tested is input into the target prediction model, and the predicted value of total moisture in the coal is output, which is the predicted content of total moisture in the coal.
[0016] The coal type identification ensemble model is obtained by integrating the XGBoost classification model, the ROCKET classification model, and the SVM classification model through a majority voting arbitration mechanism.
[0017] A further improvement to the above technical solution is as follows:
[0018] Preferably, before the detection begins, multiple training coal samples of known coal types are obtained. Each training coal sample is heated until completely dry, and the true value of total moisture is calculated based on the mass difference before and after drying. A short-term mass change sequence in the early stage of drying is also collected. A coal type identification ensemble model and a time series prediction model corresponding to different coal types are trained using the data.
[0019] Preferably, the coal type identification ensemble model is trained in the following manner:
[0020] When training the coal type identification ensemble model, XGBoost, ROCKET, and SVM classification models are trained separately. XGBoost uses a gradient boosting decision tree framework, introduces a regularization term into the objective function, and optimizes it using second-order Taylor expansion. ROCKET transforms the time series through random convolution kernels, extracts max pooling and positive proportion features, and uses a ridge regression classifier for classification. SVM uses a radial basis function kernel function, constructs multiple binary classifiers, and achieves multi-class classification through voting.
[0021] Preferably, when training the time series prediction model, prediction models based on long short-term memory networks are constructed for anthracite, bituminous coal and lignite respectively. Each model uses multi-layer LSTM layers to extract time series features and connects fully connected layers for nonlinear mapping. The short-term quality sequence at the beginning of drying is used as input, and the true value of total moisture after complete drying is used as the output target. The backpropagation algorithm is used to train until convergence.
[0022] Preferably, the majority voting arbitration mechanism specifically includes:
[0023] The short-term quality change sequence was input in parallel into the SVM classification model and the ROCKET classification model to obtain two preliminary discrimination results.
[0024] If the two preliminary judgment results are consistent, then the result is directly output as the coal type category;
[0025] If the two preliminary judgment results are inconsistent, the short-term quality change sequence is input into the XGBoost classification model, which acts as an arbitrator, for re-prediction, and the output of the XGBoost classification model is used as the final coal type category.
[0026] Preferably, the time series prediction model includes a multi-layer LSTM network, a Dropout layer, and two fully connected layers;
[0027] The multilayer LSTM network is used to extract the temporal correlation features of the input sequence;
[0028] The Dropout layer is used to reduce the risk of overfitting during the fully connected mapping stage;
[0029] The two fully connected layers are used to nonlinearly map the hidden state output by the LSTM network to the target output dimension.
[0030] This invention also provides a rapid full-moisture detection system integrating coal type identification and quality prediction, used to implement the above-mentioned detection method, comprising:
[0031] The data acquisition module is used to acquire the short-term mass change sequence of the coal sample during the initial drying stage;
[0032] The coal type identification module has an embedded pre-trained coal type identification ensemble model, which is used to output the coal type category based on the input short-term quality change sequence.
[0033] The model selection module is used to select the corresponding target prediction model from multiple time series prediction models according to the coal type.
[0034] The moisture prediction module contains multiple time series prediction models, each corresponding to a different coal type, and is used to output the predicted total moisture content of the coal based on the input short-term quality change sequence.
[0035] Preferably, the coal type identification module includes:
[0036] The first classifier unit is equipped with an SVM classification model;
[0037] The second classifier unit is equipped with the ROCKET classification model;
[0038] Arbitrator unit, equipped with XGBoost classification model;
[0039] The voting arbitration unit is used to execute the majority voting arbitration mechanism: when the outputs of the first classifier unit and the second classifier unit are consistent, the result is output directly; when they are inconsistent, the output of the arbitrator unit is used as the final coal type category.
[0040] The rapid full moisture detection method and system integrating coal type identification and quality prediction provided by this invention has the following advantages compared with the prior art:
[0041] (1) The coal type identification and quality prediction integrated rapid detection method and system of the present invention only needs to obtain the short-term quality change sequence of the coal sample in the early stage of drying to complete the coal type identification and full moisture prediction, without waiting for the coal sample to dry to constant weight. Compared with the traditional constant weight method which requires several hours of detection cycle, the present invention shortens the detection time to minutes or even less, which can meet the needs of industrial sites for online, rapid and real-time acquisition of coal quality parameters, and provide timely data support for production process control and coal trade settlement.
[0042] (2) The rapid full moisture detection method and system integrating coal type identification and quality prediction of the present invention adopts a divide-and-conquer strategy of "identification first, prediction later". First, the coal type (anthracite, bituminous coal, lignite) is accurately identified through an integrated classification model, and then a long short-term memory network prediction model specifically trained for that coal type is invoked. Different coal types have significantly different drying kinetic characteristics, and it is difficult to take into account all coal types if a single prediction model is used. The present invention, by modeling by coal type, enables the prediction model to fully learn the moisture extraction rules of specific coal types, which significantly improves the accuracy of full moisture prediction.
[0043] (3) The coal type identification and quality prediction integrated rapid full moisture detection method and system of the present invention integrates three complementary classification algorithms: XGBoost is good at handling structured features and nonlinear threshold relationships, ROCKET can effectively capture local morphological patterns and short-term dynamic differences in time series through random convolution kernels, and SVM has excellent small sample classification boundary discrimination ability in high-dimensional space. The integration of the three effectively reduces the risk of misjudgment caused by noise, sample distribution changes or parameter sensitivity of a single model. The proposed majority voting arbitration mechanism takes "consensus first, disagreement arbitration" as its core: when the prediction results of SVM and ROCKET are consistent, the consensus conclusion is directly output to avoid redundant calculation; when the two predictions are inconsistent, XGBoost is started as an arbitrator for secondary arbitration. This mechanism significantly improves the recognition reliability of boundary samples and difficult-to-classify samples while ensuring classification efficiency, and enhances the stability of the model in actual industrial environment.
[0044] (4) The coal type identification and quality prediction integrated rapid full moisture detection method and system of the present invention adopts a long short-term memory network to construct a time series prediction model. The gating mechanism of LSTM can effectively capture the long-term dependencies and dynamic evolution laws in the quality change sequence. By combining the multi-layer LSTM structure and Dropout regularization, the model has a strong nonlinear fitting ability while effectively suppressing the risk of overfitting and ensuring the generalization performance of the model. Attached Figure Description
[0045] Figure 1 This is a flowchart of the training phase of the present invention.
[0046] Figure 2 This is a flowchart of the detection stage of the present invention.
[0047] Figure 3 This is a flowchart of the coal type identification process of the present invention. Detailed Implementation
[0048] The following provides a detailed description of specific embodiments of the present invention. It should be understood that the specific embodiments described herein are for illustrative and explanatory purposes only and are not intended to limit the scope of the invention.
[0049] like Figures 1 to 3 As shown, the rapid total moisture detection method integrating coal type identification and quality prediction of the present invention includes the following steps:
[0050] Step S1: Construct and train an integrated model for coal type identification.
[0051] The coal types include anthracite, bituminous coal, and lignite. Before testing, multiple training coal samples of known coal types are acquired. Each training sample is heated until completely dry, and the true total moisture content is calculated based on the mass difference before and after drying. Mass data for the first N time steps of the initial drying process are collected to form a short-term mass change sequence. The collected raw short-term mass change sequence is preprocessed to obtain a matrix of sample data. , This refers to the mass of the coal sample to be tested, recorded every 30 seconds after the start of heating and drying. In this example, t=20. The sequence of coal sample mass changes in the first ten minutes after the start of heating and drying is obtained; then, an integrated model for coal type identification is trained using the data.
[0052] The coal type identification ensemble model is obtained by integrating the XGBoost classification model, the ROCKET classification model, and the SVM classification model through a majority voting arbitration mechanism.
[0053] Specifically, the following steps are included:
[0054] S1-1, Constructing an ensemble model: Combining the structural characteristics of the input short-term quality change sequence with the advantages of each algorithm: XGBoost excels at handling structured features and nonlinear threshold relationships, effectively utilizing gradient changes and segmented features in the quality loss sequence; ROCKET performs high-dimensional feature transformation on the time series through a large number of random convolution kernels, capturing local morphological patterns and short-term dynamic differences; SVM excels at constructing maximum margin decision boundaries in high-dimensional space, exhibiting good discriminative ability for small samples and boundary samples.
[0055] (1) XGBoost classification model.
[0056] XGBoost (eXtreme Gradient Boosting) is an improved machine learning classification algorithm based on Gradient Boosting Decision Tree (GBDT). Its improvement lies in explicitly introducing regularization terms related to the number of leaf nodes and output scores into the objective function, thereby constraining model complexity and improving generalization ability. Simultaneously, it employs a second-order Taylor expansion of the loss function to approximate the optimization process, achieving faster convergence and higher estimation accuracy.
[0057] During use, input matrix As the XGBoost classification model passes through each decision tree, each tree outputs a predicted score corresponding to each class. By summing the predicted scores for all classes from these trees, we obtain the prediction matrix Z of the boosting tree model. Z={ }, The total predicted score for the j-th category is given in this embodiment, where j = 1, 2, and 3, corresponding to the three coal types: anthracite, bituminous coal, and lignite, respectively.
[0058] The softmax function is used to map the prediction results of the boosting tree to the probability of each type of coal. The predicted probability of each of the three types of coal is calculated, and the category with the highest probability is taken as the final prediction result.
[0059] The training process is based on Classification and Regression Tree (CART), and the model uses a regression tree. CART assumes the decision tree is a binary tree, where the internal node features only take the values "yes" or "no," the left branch is the branch with a value of "yes," and the right branch is the opposite. The generation of the decision tree is a recursive process of constructing a binary decision tree, and the node judgment uses the minimization criterion of squared error. The specific algorithm is as follows:
[0060] By selecting the optimal splitting variable j and splitting point s, the dataset is divided into two subsets. and The output value of the subset and Take the corresponding area The average value; the optimal partition is determined by minimizing the formula:
[0061] (1)
[0062] in, For the first The true total water content of each sample; For the first The feature vector of each sample, i.e., the short-term quality change sequence in the early stage of drying.
[0063] The optimal partitioning process is recursively applied to the two sub-regions after partitioning until the stopping condition is met, ultimately generating a regression tree.
[0064] Boosting Tree is an iterative decision tree algorithm that constructs a set of weak decision trees and sums the results of multiple decision trees as the final prediction output. It first learns a regression tree, then subtracts the predicted value from the actual value to obtain the residual. This residual is then used as a learning target, i.e., as the output feature, to learn the next regression tree. This process is iterated until a stopping condition is met.
[0065] GBDT is a generalization and extension of the boosting tree concept. It utilizes the negative gradient of the loss function as a measure of the residuals of the current model, that is, replacing the residuals in the boosting tree with the negative gradient of the loss function, which can adapt to a variety of loss functions.
[0066] The XGBoost (eXtreme Gradient Boosting) used in this invention is an optimization of Gradient Boosting Decision Tree (GBDT). Its improvement is that a regularization term related to the number of leaf nodes and the output score is explicitly introduced into the objective function, thereby constraining the model complexity and improving the generalization ability.
[0067] XGBoost objective function for:
[0068] (2)
[0069] in, For the sample size, Let i be the judgment result for the i-th sample. Let be the true total water content of the i-th sample; The loss function; For the first The predicted results for each tree, For the number of trees, This is the model regularization term.
[0070] (3)
[0071] in, For the regularization term of this decision tree, Represents a decision tree, This represents the number of leaf nodes in the decision tree. This represents the weight value corresponding to each leaf node. and These are two adjustable parameters.
[0072] The XGBoost computational optimization process is as follows: First, perform a second-order Taylor expansion on the loss function to remove constant terms and obtain the optimized objective function; Second, expand the regularization term, remove constant terms, and optimize the regularization term; Third, merge the coefficients of the first-order and second-order terms to obtain the final objective function. Define the sum of the first-order gradients and the sum of the second-order gradients at each leaf node, transforming the objective function into an expression only about the leaf weights, allowing direct solution for the optimal weights.
[0073] (2) ROCKET classification model.
[0074] ROCKET (RandOm Convolutional KErnel Transform) is a time series classification algorithm based on random convolutional kernels. The core idea of ROCKET is to transform time series data by generating a large number of random convolutional kernels, extract discriminative features from them, and finally use a linear classifier to complete the classification task.
[0075] First, the input time series is transformed using the generated convolutional kernels to produce rich feature maps. The feature matrix for each coal type obtained after convolution is j=1, 2, 3, which correspond to the three coal types of anthracite, bituminous coal and lignite, respectively.
[0076] Subsequently, for each feature matrix Two core features are extracted: Max Pooling and Proportion of Positive Values (PPV), which form a new high-dimensional input matrix.
[0077] Finally, ROCKET inputs the generated feature matrix into three binary ridge regression classifiers for classification prediction. After passing through the three ridge regression classifiers, the predicted scores for the sample belonging to anthracite, bituminous coal, and lignite, respectively, can be obtained. , , The category corresponding to the highest of the three predicted scores is ROCKET's coal type identification result.
[0078] During training, the ridge regression loss function adds an L2 norm penalty term to the least squares method, and its expression is:
[0079] (4)
[0080] in, Let be the loss function for ridge regression. The number of training samples. For the intercept term, These are the regression coefficients; For the first The first sample 1 eigenvalue, =(1, 2, 3, …, p), The characteristic quantity is the length of the short-term quality change sequence in the initial stage of drying. It is the regularization coefficient, used to control the strength of the penalty term. The larger the value, the stronger the penalty on the coefficient; the smaller the value of the coefficient, the stronger the penalty.
[0081] To find the optimal coefficients, we need to differentiate the loss function L(β) of ridge regression and set the derivative to zero. For ridge regression, this yields the following normal equation:
[0082] (5)
[0083] Where Φ is the design matrix, y is the regularization coefficient, I is the identity matrix, β is the parameter vector, and y is the response variable vector.
[0084] Solving the above normal equation yields the parameter estimates for the ridge regression. The choice of cross-validation has a significant impact on the model's predictive performance. Therefore, choosing a suitable cross-validation method is crucial. The values are then used to obtain the final model parameters.
[0085] (3) SVM classification model.
[0086] Support Vector Machine (SVM) is a classic supervised learning algorithm widely used in pattern recognition and data classification tasks. Its core idea is to find an optimal hyperplane that maximizes the margin between samples of different classes in the feature space, thereby achieving sample classification.
[0087] First, calculate the eigenvectors. The RBF kernel values of all support vectors are used; then, these kernel values are input into three binary classifiers to calculate binary decision functions, with each classifier outputting a decision value; finally, class determination is performed, and voting is conducted based on the decision values for each binary classifier. ,like If so, it is predicted as a category. ,for Cast a vote; if If so, it is predicted as a category. ,for Cast a vote and calculate the results for each category. Votes In this embodiment, , , The values are 1, 2, and 3, corresponding to the three coal types: anthracite, bituminous coal, and lignite, respectively. The final predicted category is the category with the most votes.
[0088] During training, for linearly separable problems, the goal is to find a hyperplane that separates the two classes of samples with the largest margin. For linearly inseparable problems, SVM introduces a kernel function to map the samples in the original low-dimensional feature space to a higher-dimensional feature space, making the samples linearly separable in this higher-dimensional space. Then, the corresponding quadratic programming problem is solved to obtain the classifier parameters.
[0089] S1-2, majority voting arbitration mechanism.
[0090] To further improve the identification accuracy and interpretability and stability of model output in coal type classification tasks, this invention designs a Majority Voting Arbitration (MVA) mechanism. This mechanism prioritizes consensus and arbitrates disagreements. When model predictions are consistent, it directly outputs a consensus conclusion to reduce unnecessary complex inferences. When model predictions conflict, an arbitrator with stronger integrated discriminative capabilities is introduced for secondary adjudication, thereby reducing the risk of misjudgment by a single model and improving the reliability of the final decision. Based on this arbitration mechanism, this invention constructs an ensemble classification model composed of SVM, ROCKET, and XGBoost, the process of which is as follows: Figure 3 Specifically:
[0091] First, the input of raw sample data begins. The samples enter the system as feature vectors, containing key attribute information characterizing coal type differences. Normalization (or standardization) is performed during preprocessing, mapping each dimension of the features to a relatively consistent numerical scale. This enhances the model's comparability and generalization ability regarding features and effectively suppresses the interference of outlier dimensions on the classification boundary. Subsequently, the normalized sample data is input in parallel into the SVM classification model and the ROCKET classification model to obtain two independent preliminary discrimination results. The two models are complementary in mechanism: SVM leans towards robust geometric discrimination, while ROCKET leans towards pattern recognition after feature transformation.
[0092] After obtaining the predicted labels from both models, the process enters the arbitration decision node proposed in this invention, which is a crucial step in the entire composite model. First, the prediction results of SVM and ROCKET are compared for consistency: if the two predictions are consistent, it indicates that different modeling mechanisms have reached the same conclusion on this sample, and the result can be considered to have high confidence and stability. At this point, the system follows the consensus-first principle and directly outputs the consistent label as the final coal type category. If the two predictions are inconsistent, it indicates that the sample may be located near the category boundary, there may be noise interference, or insufficient feature representation, etc. Disagreements between models mean increased decision uncertainty. At this point, the disagreement arbitration procedure is initiated: the sample is input into the XGBoost classification model, which acts as the arbitrator, for re-prediction.
[0093] As a representative method of gradient boosting trees, XGBoost possesses strong nonlinear fitting and feature interaction modeling capabilities. It can form finer-grained partitions in complex feature spaces and aggregate multiple weak learners through iterative boosting to improve discriminative performance. Therefore, introducing XGBoost as the final result in divergence scenarios can effectively integrate the multi-dimensional feature information of samples and provide a more robust final judgment for boundary samples or difficult-to-classify samples.
[0094] The three technologies are highly complementary in terms of feature representation and decision-making mechanisms. Therefore, this invention integrates them into a new ensemble classification model to reduce the risk of misjudgment caused by noise, changes in sample distribution, or parameter sensitivity of a single model.
[0095] S1-3, Model hyperparameter optimization based on grid search.
[0096] Hyperparameters are parameters that need to be manually set before model training. Hyperparameters are not automatically learned during model training but need to be optimized through specific search strategies. Therefore, the appropriate selection of hyperparameters is crucial for improving the predictive performance and generalization ability of the model. To obtain the optimal combination of model parameters, this invention employs grid search and cross-validation methods to optimize the model hyperparameters.
[0097] Grid search is a commonly used hyperparameter tuning method. Its basic idea is to construct a parameter grid in a predefined parameter space, train the model for each candidate parameter combination, and compare their performance using model evaluation metrics to select the optimal parameter combination. Cross-validation divides the training data into multiple subsets and repeatedly trains and validates the model under different data partitions, thereby reducing the impact of randomness in data partitioning and improving the stability of model performance evaluation. Specifically, this invention uses cross-validation, dividing the training data into 5 subsets. Each time, 4 subsets are used for model training, and the remaining subset is used for model validation. Finally, the average of the 5 validation results is taken as the model performance evaluation metric.
[0098] In the XGBoost model, `objective` specifies the objective function; in this invention, it is set to `multi:softmax` to achieve multi-class classification. `num_class` represents the number of classes, which is set to 3 in this invention. `eta` is the learning rate, used to control the model update step size. `max_depth` represents the maximum depth of the tree, used to control model complexity. `subsample` represents the random sampling ratio of training samples, which helps improve the model's generalization ability. `gamma` represents the minimum loss decrease required for node splitting, used to suppress overfitting. `eval_metric` is the model evaluation metric; in this invention, `mlogloss` is used to measure the prediction performance of the multi-class classification task. Its key hyperparameters are shown in Table 1.
[0099] Table 1 Hyperparameters of the XGBoost model
[0100]
[0101] In the ROCKET model, NUM_KERNELS represents the number of random convolutional kernels, which is set to 1000 in this invention to extract rich feature information from the time series; kernel_length represents the range of convolutional kernel length, which is set to 7-11 in this invention to capture local temporal features at different scales; weight_dist specifies the initial distribution of the convolutional kernel weights, which adopts a standard normal distribution and is centered to enhance feature representation; bias_dist represents the range of values for the convolutional kernel bias term, which is set to [-1,1] in this invention to improve the diversity of convolutional responses; feature_per_kernel represents the number of features extracted by each convolutional kernel, which is set to 2 in this invention, i.e., the ratio of the maximum value to the positive value; alpha is the regularization coefficient of the ridge classifier, which is set to 1.0 in this invention to control model complexity and improve generalization ability. Its key hyperparameters are shown in Table 2.
[0102] Table 2 Hyperparameters of the ROCKET model
[0103]
[0104] In the SVM model, `svm_type` specifies the type of support vector machine; in this invention, it is set to `C_SVC` for multi-class classification tasks. `kernel_type` represents the kernel function type; in this invention, the radial basis function (RBF) is selected. `gamma` is the kernel function parameter; in this invention, it is set to 0.0078 to control the influence range of a single sample on the decision boundary. `eps` is the stopping accuracy condition for model training; in this invention, it is set to... C is the penalty coefficient, which is set to 128 in this invention to balance the relationship between maximizing the classification margin and the misclassification penalty; shrinking indicates whether to use a shrinking heuristic to speed up the solution process, which is enabled in this invention. Its key hyperparameters are shown in Table 3.
[0105] Table 3 Hyperparameters of the SVM model
[0106]
[0107] Step S2: Design a time series prediction model for rapid detection of total moisture in coal.
[0108] LSTM, as a typical recurrent neural network structure, has strong capabilities in extracting temporal features and nonlinear mapping. It can effectively model the dependencies between consecutive time points in sequence data, making it suitable for time series prediction tasks. The prediction process of LSTM (Long Short-Term Memory Network) processes the sequence data through a gating mechanism, and finally outputs the hidden state, which is the final prediction result.
[0109] like Figure 3 As shown, a Long Short-Term Memory (LSTM) network is used as the core to extract deep temporal features from the input time series, and multi-step prediction is achieved through fully connected mapping. The construction and training of time series prediction models corresponding to different coal types specifically includes the following steps:
[0110] S2-1, Construct a time series forecasting model.
[0111] First, the short-term quality change sequence of the training coal sample in the early stage of drying is input into a multi-layer LSTM network. The dynamic changes and long-term dependencies in the time dimension are modeled through recurrent units to obtain the hidden state feature sequence.
[0112] Subsequently, the model extracts the hidden state from the last time step of the LSTM output sequence as the high-level temporal representation required for future time-series prediction. To reduce the risk of overfitting and enhance the model's generalization ability, two layers of Dropout (regularization) are introduced in the fully connected mapping stage.
[0113] Next, the hidden features are nonlinearly mapped using two fully connected layers. The feature dimension is first compressed to half its original size, and then mapped to a preset output dimension. This model combines the temporal feature extraction capabilities of LSTM with the expressive power of fully connected layers, and can effectively characterize the nonlinear variation patterns in complex time series.
[0114] The LSTM layer is primarily used to extract temporal correlation features from the input sequence. For the input training matrix, the model first inputs it into a three-layer LSTM network. After recursive calculation using memory units and gating mechanisms, the hidden state sequence corresponding to each time step is obtained, expressed as: (6)
[0115] in, This represents the hidden state sequence corresponding to the sample. , … This represents the hidden states of the LSTM units recorded in the input matrix during training, from time step 1 to time step t. In this embodiment, the dimension of each hidden state is 200; the parameter t equals 20. LSTM filters and updates historical information through forget gates, input gates, and output gates, thereby effectively capturing long-term dependencies in the time series. To achieve multi-step prediction, the model extracts the hidden state of the last time step from the hidden state sequence output by the LSTM layer. This state encodes all the historical information of the input sequence. Then, after two layers of Dropout and two layers of fully connected networks, the... The result is mapped to the final total water content prediction (scalar). This model combines the time-series feature extraction capabilities of LSTM with the expressive power of fully connected layers, enabling it to effectively extract nonlinear variation patterns in complex time series.
[0116] Ultimately, the time series prediction model outputs the predicted total moisture content in the coal for this sample. The formula is as follows:
[0117] (7)
[0118] Here, FC represents a fully connected layer mapping.
[0119] S2-2, Hyperparameter settings for time series forecasting model.
[0120] Based on the characteristics of the model structure, the network structure parameters and training parameters of the time series prediction model are set uniformly.
[0121] Regarding network structure parameters, the input sequence length is set to 1; the output sequence length is set to 1. The input feature dimension is set to 20, meaning there are 20 input features; the output feature dimension is set to 1, indicating that the model ultimately outputs a predicted value for one target variable. The LSTM hidden layer dimension is set to 200, and the number of network layers is set to 3 to enhance the model's ability to extract complex temporal features.
[0122] For training parameter settings, the batch size was set to 1, and the number of training epochs was set to 100. To prevent overfitting during training, an early stopping mechanism was introduced, with a tolerance period of 50 epochs. This means that if the validation set error does not improve effectively within 50 consecutive epochs, model training is stopped, and the model parameters at the optimal validation performance are retained. The optimizer learning rate was set to 0.0005 to improve the convergence stability of the model in the later stages of training. The RMSE loss function was chosen to measure the degree of deviation between the predicted and true values.
[0123] In addition, the model's dropout parameter was set to 0.0001 to reduce the risk of overfitting during neural network training; the ReLU activation function was used to enhance the model's nonlinear expressive power. The hyperparameters of the LSTM model are shown in Table 4.
[0124] Table 4 Hyperparameters of the LSTM model
[0125]
[0126] S2-3, using training coal samples of known coal types, different samples are used for training to obtain time series prediction models of total moisture content in anthracite, bituminous coal, and lignite.
[0127] Step S3: Obtain the short-term mass change sequence of the coal sample to be tested during the initial drying stage.
[0128] The coal sample to be tested was placed in a fully automated moisture analyzer and heated and dried according to a standardized drying procedure. From the start of drying, the mass data of the coal sample was continuously recorded at fixed sampling intervals, and short-term mass change sequences were collected during the initial stage of drying.
[0129] Preprocessing of the acquired raw short-time quality change sequences:
[0130] Outlier handling: The 3σ criterion or box plot method is used to identify and remove abnormal quality points caused by vibration, noise, etc., and missing values are filled by linear interpolation.
[0131] Feature construction: In addition to the original mass value, derived features such as mass difference (first derivative) and relative weight loss rate can be constructed to enhance the model's ability to characterize drying kinetics.
[0132] Normalization: Using min-max normalization or Z-score normalization, all features are mapped to a uniform numerical range, eliminating the influence of dimensions.
[0133] The short-time quality change sequence obtained after preprocessing is denoted as the input matrix.
[0134] Step S4: Input the short-time quality change sequence into the trained coal type identification ensemble model and output the coal type category.
[0135] Coal moisture quality variation data is essentially a time series, and due to the complex and diverse physical structure of coal itself, a single model often cannot guarantee the stability and accuracy of its classification task. Therefore, this step adopts a multi-model fusion strategy, integrating the complementary advantages of different models to improve the robustness and generalization ability of coal type identification.
[0136] Step S5: Select the corresponding time series prediction model as the target prediction model according to the coal type; input the short-term quality change sequence of the coal sample to be tested into the target prediction model, and output the predicted value of total moisture in the coal, which is the predicted content of total moisture in the coal.
[0137] This invention also discloses a rapid full-moisture detection system integrating coal type identification and quality prediction, used to implement the above-mentioned method. This system can be deployed in a fully automated moisture analyzer or as a standalone coal quality analysis module. The system includes the following modules:
[0138] (1) Data acquisition module: used to acquire the short-term mass change sequence of the coal sample to be tested in the early stage of drying.
[0139] Electrically connected to the weighing sensor and timer of the fully automatic moisture analyzer, this module collects coal sample mass data in real time at a preset sampling frequency after the drying process begins, and buffers the data according to a set input sequence length to form a short-term mass change sequence. The module also includes a data preprocessing subunit for performing outlier removal, interpolation imputation, feature construction, and normalization operations.
[0140] (2) Coal type identification module: The pre-trained coal type identification ensemble model is embedded to output the coal type category based on the input short-term quality change sequence.
[0141] Internally, it contains a pre-trained ensemble model for coal type identification. This model comprises three classifier units that are computed in parallel:
[0142] First classifier unit: Deployed with an SVM classification model;
[0143] Second classifier unit: Deployed with the ROCKET classification model;
[0144] Arbitrator unit: Deployed with an XGBoost classification model.
[0145] It also includes a voting arbitration unit for executing a majority voting arbitration mechanism. This module receives the sequence output from the data acquisition module and outputs coal type codes, such as 1-anthracite, 2-bituminous coal, 3-lignite.
[0146] (3) Model selection module: used to select the corresponding target prediction model from the time series prediction models according to the coal type.
[0147] This is a logic switch unit or lookup table, with its input connected to the output of the coal type identification module and its output connected to the moisture prediction module. Based on the received coal type code, it selects the corresponding LSTM prediction model from the model library and connects the model's input interface to the output channel of the data acquisition module.
[0148] (4) Moisture prediction module: used to output the predicted total moisture content in coal based on the input short-term quality change sequence.
[0149] Internally, three independently trained time-series prediction models are embedded, corresponding to anthracite, bituminous coal, and lignite, respectively. The selected model receives short-term mass change sequences, performs forward propagation calculations, and outputs a total moisture prediction value. This prediction value can be sent to the display unit or the data output interface.
[0150] The detection system of this invention places the coal sample to be tested into a fully automatic moisture analyzer and starts the detection program. The data acquisition module automatically records the quality data at the initial stage of drying, and after preprocessing, sends it to the coal type identification module. The coal type identification module outputs the coal type category within milliseconds, the model selection module randomly selects the corresponding LSTM prediction model, and the moisture prediction module outputs the total moisture value within seconds.
[0151] Experimental verification:
[0152] The total moisture test of coal samples is set up according to the national standard method, requiring temperature-controlled drying at 105-110℃ and constant weight, and takes about 2 hours to test a single sample. However, by using a coal total moisture prediction model to predict the moisture content of coal samples, the testing time can be shortened to 10 minutes, greatly improving work efficiency.
[0153] To evaluate the accuracy, stability, and applicability of total moisture analysis algorithm models in coal quality analysis through systematic comparison, and to verify the feasibility and reliability of the algorithm models in actual coal sample total moisture testing, the models were deployed on a 5E-MW6513 moisture analyzer manufactured by a certain instrument company for relevant verification.
[0154] Regarding model training and deployment, the training phase is primarily completed within the PyCharm development environment, utilizing the PyTorch deep learning framework for network construction, parameter training, and model optimization. During deployment, Visual Studio is used as the engineering development platform, combined with the PyTorch official C++ deployment library LibTorch to implement model invocation. By loading its dynamic link library and model parameter files, on-site inference computation can be completed. Considering that industrial instruments typically lack high-performance dedicated graphics cards in their on-site hardware configurations, a CPU version of LibTorch is used for deployment to meet practical application requirements.
[0155] Three 5E-MW6513 moisture meters were used for testing. Each coal sample was tested once on a different moisture meter, for a total of three tests. The accuracy, stability and applicability of the algorithm model were analyzed by comparing the data.
[0156] (1) Coal type identification results
[0157] First, the accuracy of coal type identification using the method of this invention is evaluated. Table 5 shows a comparison of the accuracy evaluation metrics of the coal type identification method of this invention with those of using the SVM model, Rocket model, and XGBoost model separately.
[0158] Table 5 Comparison of Evaluation Indicators for Coal Type Identification Accuracy
[0159]
[0160] (2) Results of total moisture test of anthracite
[0161] The test coal sample was anthracite, and the moisture content was tested once on each of the three moisture meters, for a total of three tests. The data are shown in Table 6.
[0162] Table 6 Test data for anthracite
[0163]
[0164] (3) Results of total moisture test of bituminous coal
[0165] The test coal sample was selected as bituminous coal, and the moisture content was tested once on each of the three moisture meters, for a total of three tests. The test data are shown in Table 7.
[0166] Table 7 Test data for bituminous coal
[0167]
[0168] (4) Results of total moisture test of lignite
[0169] The test coal sample was selected as lignite, and the moisture content was tested once on each of the three moisture meters, for a total of three tests. The test data are shown in Table 8.
[0170] Table 8 Test data for lignite
[0171]
[0172] (5) Overall data analysis
[0173] A horizontal comparison of the core indicators is shown in Table 9.
[0174] Table 9 Horizontal Comparison of Core Indicators
[0175]
[0176] As shown in Table 5, the coal type identification method proposed in this invention performs best, significantly outperforming the use of a single mainstream data classification model. Tables 6-9 show that the comprehensive moisture detection method integrating coal type identification and quality prediction exhibits varying applicability across different coal types, performing better in anthracite and bituminous coal samples, but relatively poorly in lignite samples. Overall, the method of this invention significantly reduces testing time, validating the feasibility and engineering application prospects of rapid detection of total moisture in coal.
[0177] The above embodiments are merely preferred examples of the present invention and are not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Therefore, any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention should fall within the protection scope of the present invention.
Claims
1. A coal kind identification and quality prediction integrated rapid detection method of total moisture, characterized in that, Includes the following steps: Construct and train an integrated model for coal type identification and a time series prediction model for rapid detection of total moisture in coal. The time series prediction model is based on a long short-term memory network. The coal sample to be tested was placed in a fully automatic moisture analyzer and heated and dried according to a standardized drying process. From the start of drying, the mass data of the coal sample was continuously recorded at fixed sampling intervals, and the short-term mass change sequence in the early stage of drying was collected. The short-term quality change sequence is input into the coal type identification ensemble model, which outputs the coal type category. Based on the coal type, a corresponding time series prediction model is selected as the target prediction model; the short-term quality change sequence of the coal sample to be tested is input into the target prediction model, and the predicted value of total moisture in the coal is output, which is the predicted content of total moisture in the coal. The coal type identification ensemble model is obtained by integrating the XGBoost classification model, the ROCKET classification model, and the SVM classification model through a majority voting arbitration mechanism. The specific process by which the majority voting arbitration mechanism constructs an ensemble classification model consisting of SVM, ROCKET, and XGBoost is as follows: First, the raw sample data is input into the system in the form of feature vectors. The feature vectors contain key attribute information that characterizes the differences in coal types. In the preprocessing, a normalization operation is performed to map each dimension of the features to a consistent numerical scale. Then, the normalized sample data is input in parallel into the SVM classification model and the ROCKET classification model to obtain two independent preliminary discrimination results. After obtaining the predicted labels from the two models, an arbitration decision node is established. First, the prediction results of SVM and ROCKET are compared for consistency: if the two predictions are consistent, it means that different modeling mechanisms have reached the same conclusion on this sample. Following the consensus priority principle, the consistent label is output as the final coal type category; if the two predictions are inconsistent, the disagreement arbitration procedure is initiated, and the sample is input into the XGBoost classification model, which acts as the arbitrator, for re-prediction.
2. The integrated coal kind identification and quality prediction rapid moisture detection method according to claim 1, characterized in that, Before the testing begins, training coal samples of multiple known coal types are obtained. Each training coal sample is heated until completely dry, and the true value of total moisture is calculated based on the mass difference before and after drying. Short-term mass change sequences during the initial drying stage are also collected. A coal type identification ensemble model and time series prediction models corresponding to different coal types are trained using the data.
3. The rapid full moisture detection method integrating coal type identification and quality prediction according to claim 2, characterized in that, The coal type identification ensemble model was trained in the following manner: When training the coal type identification ensemble model, XGBoost, ROCKET, and SVM classification models are trained separately. XGBoost uses a gradient boosting decision tree framework, introduces a regularization term into the objective function, and optimizes it using second-order Taylor expansion. ROCKET transforms the time series through random convolution kernels, extracts max pooling and positive proportion features, and uses a ridge regression classifier for classification. SVM uses a radial basis function kernel function, constructs multiple binary classifiers, and achieves multi-class classification through voting.
4. The rapid full moisture detection method integrating coal type identification and quality prediction according to claim 3, characterized in that, When training the time series prediction model, prediction models based on long short-term memory networks are constructed for anthracite, bituminous coal and lignite respectively. Each model uses multi-layer LSTM layers to extract time series features and connects fully connected layers for nonlinear mapping. The short-term quality sequence at the beginning of drying is used as input, and the true value of total moisture after complete drying is used as the output target. The backpropagation algorithm is used to train until convergence.
5. The rapid full moisture detection method integrating coal type identification and quality prediction according to claim 4, characterized in that, The majority voting arbitration mechanism is as follows: The short-term quality change sequence was input in parallel into the SVM classification model and the ROCKET classification model to obtain two preliminary discrimination results. If the two preliminary judgment results are consistent, then the result is directly output as the coal type category; If the two preliminary judgment results are inconsistent, the short-term quality change sequence is input into the XGBoost classification model, which acts as an arbitrator, for re-prediction, and the output of the XGBoost classification model is used as the final coal type category.
6. The integrated coal kind identification and quality prediction rapid moisture detection method according to claim 5, characterized in that, The time series prediction model includes a multi-layer LSTM network, a Dropout layer, and a two-layer fully connected network. The multilayer LSTM network is used to extract the temporal correlation features of the input sequence; The Dropout layer is used to reduce the risk of overfitting during the fully connected mapping stage; The two fully connected layers are used to nonlinearly map the hidden state output by the LSTM network to the target output dimension.
7. A coal kind identification and quality prediction integrated fast moisture detection system, characterized in that, The detection method for implementing claim 5 or 6 includes: The data acquisition module is used to acquire the short-term mass change sequence of the coal sample during the initial drying stage; The coal type identification module has an embedded pre-trained coal type identification ensemble model, which is used to output the coal type category based on the input short-term quality change sequence. The model selection module is used to select the corresponding target prediction model from multiple time series prediction models according to the coal type. The moisture prediction module contains multiple time series prediction models, each corresponding to a different coal type, and is used to output the predicted total moisture content of the coal based on the input short-term quality change sequence.
8. The integrated coal identification and quality prediction rapid moisture detection system of claim 7, wherein, The coal type identification module includes: The first classifier unit is equipped with an SVM classification model; The second classifier unit is equipped with the ROCKET classification model; Arbitrator unit, equipped with XGBoost classification model; The voting arbitration unit is used to execute the majority voting arbitration mechanism: when the outputs of the first classifier unit and the second classifier unit are consistent, the result is output directly; when they are inconsistent, the output of the arbitrator unit is used as the final coal type category.