A method for on-line estimation of viscosity of coal water slurry

By combining multimodal data processing of electrical impedance spectroscopy and ultrasonic spectroscopy, and utilizing a Transformer encoder and cross-modal cross-attention mechanism, the real-time and accuracy issues of water-coal slurry viscosity measurement were solved, achieving high-precision online monitoring.

CN122631485APending Publication Date: 2026-08-25NANJING UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610709630.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-21
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing water-coal slurry viscosity measurement technologies suffer from problems such as sampling lag, sensor wear, high maintenance costs, intermittent measurement, lack of adaptive capabilities, and insufficient utilization of spectral data, making it impossible to achieve high-precision, real-time online monitoring.

Method used

Using electrical impedance spectrum, ultrasonic amplitude attenuation spectrum, and phase shift spectrum as multimodal inputs, a CNN is used to achieve local weighted fusion of temperature and spectral features. A Transformer encoder is used to extract long-range dependencies between spectra, and a cross-modal cross-attention mechanism is introduced to perform deep interaction between impedance and ultrasonic information. Finally, high-precision estimation of the viscosity of coal-water slurry is achieved through multi-task joint prediction.

Benefits of technology

It achieves high-precision and high-reliability real-time monitoring of coal-water slurry viscosity, reduces root mean square error and mean absolute error, and improves the robustness and real-time feedback capability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122631485A_ABST
    Figure CN122631485A_ABST
Patent Text Reader

Abstract

A method for online estimation of the viscosity of coal-water slurry, characterized by the following steps: (a) reading in real-time monitored multimodal data, i.e., the temperature-resistivity spectrum R(f) of the coal-water slurry. i )+jX(f i ), i = 1, 2, ..., N f Ultrasonic amplitude attenuation spectrum A(f) i ), i = 1, 2, ..., M f and phase shift spectrum θ(f i ), i = 1, 2, ..., M f (b) Data preprocessing, (c) Temperature-weighted fusion and deep feature extraction in two branches, (d) Cross-modal cross-attention fusion, and (e) Feature refinement and multi-task joint prediction, achieving high-precision online real-time viscosity estimation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial process detection and control technology, specifically to an online method for estimating the viscosity of coal-water slurry.

[0002] Coal-water slurry, a non-Newtonian fluid composed of pulverized coal, water, and additives, directly affects pipeline transport resistance, atomization quality, and gasifier combustion efficiency due to its viscosity characteristics. Excessively high viscosity leads to a sharp increase in pumping power and a higher risk of pipeline blockage; conversely, excessively low viscosity easily causes coal particle settling and stratification, affecting combustion stability and gasification efficiency. Because the viscosity of coal-water slurry exhibits a strong non-linear dependence on temperature and is influenced by multiple factors such as coal particle concentration, particle size distribution, and shear rate, achieving high-precision online viscosity monitoring over a wide temperature range has always been a technical challenge in coal chemical process control. Background Technology

[0003] Existing water-coal slurry viscosity measurement technologies are mainly divided into three categories:

[0004] The first category is offline laboratory testing. This method uses traditional equipment such as a rotational viscometer, where a spring-driven rotor rotates in the coal slurry, and a speed sensor monitors elastic deformation to estimate viscosity. While this method offers high accuracy, it suffers from significant sampling lag, cannot provide real-time feedback, and relies on manual operation. This introduces uncertainties regarding timeliness and operator skill, making it difficult to meet closed-loop control requirements.

[0005] The second category is online contact measurement. The "Online Viscosity Monitoring System for Coal-Water Slurry" proposed by Wang Qiuxiang et al. represents a technological advancement in this area. This system uses a PLC-controlled sampler for automatic sampling, directly measures the slurry viscosity using an industrial online viscosity analyzer (finished equipment), and transmits the data to a DCS system for real-time monitoring. While this method automates the sampling process and addresses the timeliness issue of laboratory analysis to some extent, it still relies on the principle of contact physical measurement. The sensor probe is immersed in high-concentration coal slurry for extended periods, making it susceptible to wear, adhesion, and scaling from coal particles, resulting in high maintenance costs. Furthermore, the system still requires periodic sampling-measurement-rinsing cycles (approximately every 30 minutes), leading to intermittent measurement blind spots. Additionally, as an industrial finished product, the analyzer lacks adaptability to the complex conditions of coal-water slurry.

[0006] The third category is indirect soft measurement methods. The "Online Monitoring Method for Coal Slurry Viscosity" proposed by Li Chao et al. uses a Long Short-Term Memory (LSTM) network to fuse macroscopic process variables such as agitator voltage, current, coal slurry density, rotation speed, and geometric parameters to establish a nonlinear mapping relationship from time-series characteristics to viscosity, and optimizes model parameters through online incremental learning. This method requires no additional sensors and can achieve near real-time prediction using existing DCS system measurement points, alleviating the lag problem of offline analysis to some extent. However, this method has the following limitations: First, its input features are all low-frequency macroscopic process parameters (sampling period of 15 minutes), lacking direct perception of the microscopic physical properties inside the coal slurry. When the coal quality changes abruptly or the additive ratio changes, the statistical correlation between electrical parameters and viscosity may fail. Second, while LSTM is suitable for time-series modeling, it is difficult to capture the spatial correlation characteristics within spectral data and cannot utilize physical field data containing rich information on the dispersion state of coal particles, such as electrical impedance spectra and ultrasonic attenuation spectra. Third, the single-task output structure lacks fault tolerance, and cannot guarantee prediction reliability when a certain feature channel is abnormal.

[0007] To address the shortcomings of existing technologies, this invention proposes an online viscosity estimation method for coal-water slurry based on CNN temperature fusion and Transformer cross-modal interaction. This method uses electrical impedance spectrum, ultrasonic amplitude attenuation spectrum, and phase shift spectrum as multimodal inputs. A CNN is used to achieve local weighted fusion of temperature and spectral features. A Transformer encoder is used to extract long-range dependencies between spectra, and a cross-modal cross-attention mechanism is introduced to achieve deep interaction between impedance and ultrasonic information. Finally, multi-task joint prediction improves the robustness of the system, achieving high-precision and high-reliability online monitoring of coal-water slurry viscosity.

[0008] References

[0009] [1] Shaanxi Changqing Energy Chemical Co., Ltd. An online monitoring system for the viscosity of coal-water slurry: 202322099974.7 [P]. 2024-04-05.

[0010] [2] Shanghai Yigongtongzhi Information Technology Co., Ltd. A method for online monitoring of coal slurry viscosity: 202510960540.2[P]. 2025-10-17. Summary of the Invention

[0011] Purpose of the invention

[0012] A novel online method for estimating the viscosity of coal-water slurry is proposed. Based on real-time monitoring of multimodal data such as coal-water slurry temperature, electrical impedance spectrum, ultrasonic amplitude attenuation spectrum, and phase shift spectrum, the method achieves high-precision, real-time estimation of coal-water slurry viscosity through feature expansion and further extraction and fusion.

[0013] Technical solution

[0014] A method for online estimation of the viscosity of coal-water slurry includes the following steps:

[0015] (a) Read in the real-time monitoring multimodal data, i.e., coal-water slurry temperature Electrical impedance spectrum R(f) i )+jX(f i ), i = 1, 2, ..., N f Ultrasonic amplitude attenuation spectrum A(f) i ), i = 1, 2, ..., M f and phase shift spectrum θ(f i ), i = 1, 2, ..., M f ;

[0016] (b) Data preprocessing;

[0017] (c) Perform temperature-weighted fusion and depth feature extraction in two branches;

[0018] (d) Cross-modal cross-attention fusion;

[0019] (e) Feature refinement and multi-task joint prediction;

[0020] The feature is that, in step (1) (b) of the data preprocessing, for impedance data, the real part, imaginary part, and temperature of the impedance at each frequency point are standardized, and then the feature matrix (4×N) is reconstructed. f ), as the initial feature F z_i For ultrasound data, the ultrasound amplitude, phase, and temperature at each frequency point are standardized, and then the feature matrix (4×M) corresponding to all frequency points is reconstructed. f ), as the initial feature F u_i (2) In step (c), temperature-weighted fusion and depth feature extraction are performed in two branches. One branch is the impedance processing branch, which processes the initial feature F. z_i The input is fed into the impedance-temperature fusion module, and the output is the temperature-weighted depth feature F of the impedance branch. z_t The data is then input into the Transformer encoder to obtain the global dependency modeling features F. z_g (3) In step (c), the temperature-weighted fusion and depth feature extraction are performed in two branches. The other branch is the ultrasonic processing branch, which will process the initial feature F. u_i The input is fed into the ultrasonic temperature fusion module, and the output is the temperature-weighted depth feature F of the ultrasonic branch. u_t The data is then input into the Transformer encoder to obtain the global dependency modeling features F. u_g (4) In step (d) of cross-modal attention fusion, the features F of the two branches are combined. z_g and Fu_g Cross-attention fusion is performed to obtain the fused impedance characteristic F. z_g and ultrasound features F′ u_g (5) In step (e) feature refinement and multi-task joint prediction, for the impedance feature F′ z_g and ultrasound features F′ u_g The refined feature F is obtained by using the attention pooling mechanism. z_f and F u_f The features are concatenated to form a one-dimensional joint feature vector F. fuse The data is input into a multilayer perceptron (MLP), which ultimately outputs a real-time estimate of the viscosity of the coal-water slurry. Simultaneously, the unfused impedance branch features and ultrasound branch features are also input into the multilayer sensor, utilizing its output auxiliary estimates. and End-to-end training is performed using a weighted loss function. See [link / reference]. Figure 1 As shown.

[0021] According to the above-described online viscosity estimation method for coal-water slurry, the characteristic feature is that, in step (b), data preprocessing constructs initial features for the impedance branch and the ultrasonic branch respectively, such as... Figure 2 As shown, (1) a four-dimensional tensor is constructed using impedance data. The real part of the impedance at each frequency point virtual part Temperature sequence at corresponding frequency points The channels are interleaved and cascaded, arranged in [R, T] z X, T z ], where B is the batch size; (2) Construct a four-dimensional tensor using ultrasonic data. global average temperature The copy is expanded into a vector with the same dimensions as the ultrasound spectrum. Then, the ultrasonic amplitude attenuation spectrum at each frequency point. With phase shift spectrum The channels are interleaved and cascaded, arranged in the manner of [A, T]. u ,θ,T u ], where B is the batch size.

[0022] According to the above-described online viscosity estimation method for coal-water slurry, the characteristic feature is that the impedance-temperature fusion module in step (c) adopts a CNN architecture, such as... Figure 3 As shown, (1) using the four-dimensional tensor F in step (b) z_iAs input; (2) Processed by the first two-dimensional convolutional layer, the convolutional kernel size (K) is 2×3, the stride (S) is (2, 1), the padding (P) is (0, 1), the number of output channels is C / 4, and the real part-temperature pairs and the imaginary part-temperature pairs are extracted respectively, and the output dimension is (B, C / 4, 2, N). f (3) After being processed by the GELU activation function and layer normalization (LayerNorm); (4) Processed by the second two-dimensional convolutional layer with a kernel size of 2×3, a stride of (1, 1), padding of (0, 1), and an output channel number of C / 2, the separated features are fused into a unified representation with an output dimension of (B, C / 2, 1, N). f Similarly, after GELU activation and layer normalization; (4) through a one-dimensional convolutional layer with a kernel size of 3, a stride of 1, padding of 1, and C output channels, the temperature-weighted impedance feature matrix is ​​obtained. After dimensional transformation, it becomes (B, N) f (C) Then add it to the learnable position embedding and perform Dropout regularization; (5) then add F z_t The input is fed into a multi-layer Transformer encoder, each layer containing a multi-head attention (MHA) mechanism and a feedforward neural network (FNN) to extract long-range dependencies between spectra and output deep features.

[0023] According to the above-described online viscosity estimation method for coal-water slurry, the characteristic feature is that the ultrasonic temperature fusion module in step (c) adopts a CNN architecture, such as... Figure 4 As shown, (1) using the four-dimensional tensor F in step (b) u_i As input; (2) Processed by the first two-dimensional convolutional layer, the convolutional kernel size is 2×5, the stride is (2,2), the padding is (0,2), the number of output channels is C / 4, and the output dimension is (B,C / 4,2,M). f / 2), then after GELU activation function and layer normalization; (3) processed by the second two-dimensional convolutional layer, the convolution kernel size is 2×5, the stride is (2,2), the padding is (0,2), the number of output channels is C / 2, and the output dimension is (B,C / 2,1,M). f / 4), similarly activated by the GELU function and normalized by the layer; (4) processed by a one-dimensional convolutional layer with a kernel size of 5, a stride of 2, padding of 2, and an output channel number of C, reducing the frequency dimension from M f / 4 compressed to N f The temperature-weighted ultrasonic feature matrix was obtained. After dimensional transformation, it becomes (B, N) f(C) Then add it to the learnable position embedding and perform Dropout regularization; (5) then add F u_t The input is fed into a multi-layer Transformer encoder, each layer containing a multi-head self-attention mechanism and a feedforward network, to extract long-range dependencies between spectra and output deep features.

[0024] According to the above-described online viscosity estimation method for coal-water slurry, the characteristic is that in step (d), the Transformer output features F of the two branches are... z_g and F u_g Input is fed into a multi-layer cross-attention Transformer module, and each layer of the module performs: (1) with F z_g As a query (Q), F u_g As keys (K) and values ​​(V), calculate cross-attention and update impedance branch characteristics; (2) with F u_g As a query, F z_g As keys and values, cross-attention is calculated to update the ultrasound branch features; (3) after each is normalized and fed forward, the outputs are used to realize intermodal information interaction and obtain the fused feature F′. z_g and F′ u_g .like Figure 5 As shown in the figure, Softmax is a function calculated by the following formula:

[0025]

[0026] According to the above-described online viscosity estimation method for coal-water slurry, the characteristic feature is that, in step (e), F′ is... z_g and F′ u_g Attention pooling is performed separately, and the importance weights of frequency points are obtained through learnable parameters q. This is applied to N. f Weighted summation of dimensions, such as Figure 6 As shown, F′ z_g Compressed into one-dimensional feature vectors F′ u_g Compress to

[0027] According to the above-described online viscosity estimation method for coal-water slurry, the characteristic feature is that, in step (e), a multi-task prediction network is constructed, such as... Figure 1 As shown: (1) Fusion prediction branch: F z_f and F u_f The features are concatenated to form a one-dimensional joint feature vector. Viscosity estimate output by multilayer sensor (2) Impedance-independent prediction branch: Before cross-attention fusion, from the Transformer output F z_gAfter attention pooling and layer normalization, we obtain The viscosity estimate is output by an independent multilayer sensor based on impedance. (3) Independent Ultrasound Prediction Branch: Similarly, from the Transformer output F u_g After attention pooling and layer normalization, we obtain The viscosity estimate is output by an independent multilayer sensor based on impedance.

[0028] The method for online viscosity estimation of coal-water slurry described above is characterized by employing a weighted loss function for end-to-end training.

[0029]

[0030] in, To integrate predicted losses, As an auxiliary loss for impedance branch, The ultrasonic branch is used as the auxiliary loss, ω1, ω2 and ω3 are weight coefficients, and y is the true value of viscosity. The network parameters of the CNN temperature fusion module, Transformer encoder, cross attention module and three prediction branches are optimized simultaneously through the backpropagation algorithm, so that the impedance branch and ultrasonic branch can learn modality-specific features independently while cooperating to optimize the fused representation.

[0031] The online viscosity estimation method for coal-water slurry described above is characterized by employing the AdamW optimization algorithm during training, with an initial learning rate set to 10. -4 The weight decay factor is set to 10. -4 An early stopping mechanism is used to prevent overfitting, and training is terminated when the validation set loss does not decrease for 30 consecutive cycles.

[0032] The online viscosity estimation method for coal-water slurry described above is characterized by using test set data to evaluate the trained model. The evaluation metrics used include mean absolute error (MAE), mean square error (RMSE), and coefficient of determination (R²). 2 Its expression is as follows:

[0033]

[0034] Among them, y i For the true value, This is an estimated value. is the mean of the true values, and N is the sample size.

[0035] Beneficial effects

[0036] A coal-water slurry viscosity detection system was used for real-time monitoring at the industrial site, collecting a total of 1215 sets of monitoring data. The viscosity standard values ​​of the coal slurry samples taken online during these monitoring sessions were used as labels to construct a sample set. The last 10% of the data, i.e., 122 data samples, was retained as the test set, while all other samples were used as the training set. Five-fold cross-validation was performed, and the model with the smallest validation loss was selected as the final model.

[0037] The following methods were compared: (1) Random Forest (RF); (2) Support Vector Machine (SVM); (3) the complete impedance branch training network (ESI-Net) described above; (4) the complete ultrasound branch training network (UA-Net) described above; (5) the method of this invention (ESI-UA-Net). All methods were trained on the above training set and their performance was evaluated and compared on the test set. The evaluation metrics included root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²). 2 The results are shown in Table 1.

[0038] Table 1 Comparison of the impact of network model structure on the prediction results of coal-water slurry viscosity

[0039]

[0040] Experimental results show that the proposed ESI-UA-Net method outperforms the comparison methods in all evaluation metrics. Compared with Random Forest, RMSE is reduced by 34.4% and MAE by 41.0%; compared with Support Vector Machine, RMSE is reduced by 11.6% and MAE by 17.8%, and R... 2 The performance was improved by 57.1%; compared with the single-modal ESI-Net and UA-Net, the RMSE was reduced by 12.0% and 11.9%, respectively, and the MAE was reduced by 9.6% and 16.5%, respectively. 2 All improved by 57.1%. The above results verify the advantages of multimodal collaborative modeling achieved by the present invention through CNN temperature fusion, Transformer encoder, cross-modal cross-attention mechanism and multi-task joint prediction, which can provide a high-precision and robust real-time viscosity monitoring method for closed-loop control of coal-water slurry preparation and gasification process. Attached Figure Description

[0041] Figure 1 This is a schematic diagram of the overall network architecture of the online viscosity estimation method for coal-water slurry of the present invention;

[0042] Figure 2 A schematic diagram illustrating the data reconstruction method based on the initial characteristics of the impedance branch and the ultrasound branch;

[0043] Figure 3A schematic diagram of the temperature fusion module and Transformer encoder for impedance branching;

[0044] Figure 4 A schematic diagram of the temperature fusion module and Transformer encoder for the ultrasonic branch;

[0045] Figure 5 This is a schematic diagram of the cross-modal attention Transformer module;

[0046] Figure 6 This is a schematic diagram of feature refinement based on attention pooling; Detailed Implementation

[0047] The present invention will be further described in detail below with reference to specific embodiments. The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0048] An online viscosity estimation method for coal-water slurry was implemented, including the following steps: (a) Reading in real-time monitored multimodal data, namely coal-water slurry temperature, electrical impedance spectrum, ultrasonic amplitude attenuation spectrum, and phase shift spectrum, with specific parameters as follows:

[0049] Electrical impedance spectrum: Measurement frequency range 0.1~500Hz, total N f =30 frequency points, obtain the real part of the impedance R(f) at each frequency point i ) and the imaginary part X(f) i Ultrasonic spectrum: Measurement frequency range 0.5~120kHz, total M f =240 frequency points, obtain the amplitude attenuation A(f) at each frequency point i ) and phase shift θ(f i Temperature: During impedance spectroscopy measurement, the corresponding temperature value is recorded simultaneously when impedance data is acquired at each frequency point, i.e., the temperature. N t =30, impedance branch uses the temperature T corresponding to each frequency point. z The ultrasonic branch uses a global average temperature t u As a temperature compensation feature.

[0050] (b) Data preprocessing: For impedance data, the real part R and imaginary part X of the impedance at each frequency point are compared with the corresponding temperature T. z Z-score normalization is performed separately, along the channel dimension [R, T] z X, T z Interleaved cascades construct a four-dimensional tensor For ultrasound data, the global average temperature t u Copy and expand to The normalized amplitude attenuation spectrum A and phase shift spectrum θ are compared with the channel dimension in [A, T]. u ,θ,Tu Interleaved cascades construct a four-dimensional tensor

[0051] (c) Perform temperature-weighted fusion and depth feature extraction in two branches:

[0052] For the impedance branch, F z_i The input impedance temperature fusion module: (1) The first layer has a 2×3 two-dimensional convolution kernel with a stride of (2, 1) and padding of (0, 1), and the number of output channels is C / 4 = 16. This layer extracts local features of the real part-temperature and the imaginary part-temperature respectively, and the output dimension is (B, 16, 2, 30), which is then activated by GELU and normalized by the layer; (2) The second layer has a 2×3 two-dimensional convolution kernel with a stride of (1, 1) and padding of (0, 1), and the number of output channels is C / 2 = 32. The separated features are fused into a unified representation, and the output dimension is (B, 32, 1, 30); (3) The third layer has a 3-dimensional one-dimensional convolution kernel with a stride of 1 and padding of 1, and the number of output channels is C = 64, which yields the temperature-weighted impedance feature matrix. After transforming the dimension to (B, 30, 64), it is added to the learnable position embedding and then regularized by Dropout (ratio of 0.1); (4) The above output is input into a 4-layer Transformer encoder (attention head number is 2, multilayer perceptron dimension scaling ratio is 4.0) to extract the long-range dependencies between spectra and output deep features.

[0053] For ultrasound branches, F u_i Input the ultrasonic temperature fusion module: (1) The first layer of two-dimensional convolution kernel size is 2×5, stride is (2,2), padding is (0,2), and the number of output channels is C / 4=16. This layer performs local feature extraction on amplitude-temperature and phase-temperature respectively, and the output dimension is (B, 16,2,120). Then it is activated by GELU and normalized by the layer; (2) The second layer of two-dimensional convolution kernel size is 2×5, stride is (2,2), padding is (0,2), the number of output channels is C / 2=32, and the output dimension is (B,32,1,60); (3) The third layer of one-dimensional convolution kernel size is 5, stride is 2, padding is 2, the number of output channels is C=64, and the frequency dimension is compressed from 60 to 30 to obtain the temperature-weighted ultrasonic feature matrix. After transforming the dimension to (B, 30, 64), it is added to the learnable location embedding and then regularized by Dropout (ratio of 0.1); (4) Similarly, the above output is input into a 4-layer Transformer encoder (attention heads are 2, and the multilayer perceptron dimension scaling ratio is 4.0) to output deep features.

[0054] (d) Cross-modal cross-attention fusion: Integrating F... z_g and Fu_g Input a 2-layer cross-attention Transformer module. Each layer of the module performs: (1) with F z_g For query, F u_g For the key and value, calculate the scaled dot product cross attention and update the impedance branch features; (2) with F u_g For query, F z_g For the key and value, calculate the scaled dot product cross attention, update the ultrasound branch features (3), and output the fused features F′ after each layer normalization and feedforward network. z_g and F′ u_g .

[0055] (e) Feature Refinement and Multi-Task Joint Prediction: For F′ z_g and F′ u_g Attention pooling is performed separately, specifically using learnable parameters. As a query, F′ z_g or F′ u_g Calculate cross-attention for key values ​​to obtain attention weights, and then apply this to N. f =Weighted summation of 30 frequency points, F′ z_g Compressed into one-dimensional feature vectors F′ u_g compression Then, multi-task joint prediction is performed, (1) fusion prediction branch: F z_f With F u_f The fusion feature is based on channel splicing. After passing through two MLP layers (first layer: 128→64, activated by GELU and Dropout 0.2; second layer: 64→1), the viscosity estimate is output. (2) Impedance-independent prediction branch: From the Transformer output F z_g After pre-attention pooling and layer normalization, we obtain Auxiliary estimates output by independent MLP (3) Ultrasound-independent predictive branch: Similarly, from F u_g After pre-attention pooling and layer normalization, we obtain Auxiliary estimates output by independent MLP

[0056] The expression for calculating the feature value at each location of the two-dimensional convolutional layer described above is as follows:

[0057]

[0058] Where F outThis represents the feature value extracted by the convolution kernel at a certain location in the output feature map, where C represents the number of channels in the input feature map, and W represents the feature value extracted by the convolution kernel at a certain location in the output feature map. k and H k K represents the width and height of the convolution kernel, respectively. i This represents a two-dimensional convolution kernel matrix, corresponding to the convolution kernel of the i-th input channel. Let f represent the feature map of the i-th input channel, and f represent the neuron activation function. The normalization layer uses a layer normalization method, and the expression for calculating the feature value at each position is as follows:

[0059]

[0060] in F represents the normalized eigenvalues. h,w,c γ represents the feature value of the feature map output by the convolutional layer at height h, width w, and channel c. c and β c This represents the learnable scaling factor and bias, corresponding to the c-th channel; taking impedance feature refinement as an example, the calculation expression for attention pooling is as follows:

[0061]

[0062]

[0063] Where k i v i For F′ z_g The keys and values ​​after linear transformation, d k =64 is the dimension of the key.

[0064] The weighted loss function described above:

[0065]

[0066] Where ω1, ω2, and ω3 are all 1.0, and each loss term represents MSE. End-to-end training is performed using the AdamW optimizer with an initial learning rate of 10. -4 Weight decay 10 -4 The batch size is 16, and the maximum number of training epochs is 200. During training, after each training epoch, the loss function value and related evaluation metrics are calculated using the validation set data. The training strategy is dynamically adjusted based on the validation set performance. An early stopping mechanism is used to prevent overfitting; training is terminated when the validation set loss does not decrease for 30 consecutive epochs. Five-fold cross-validation is performed on the training set, and the model with the smallest validation loss is selected as the final model.

[0067] The AdamW algorithm described above is a widely used deep learning optimization algorithm. AdamW is an improved version of the Adam optimizer, decoupling weight decay from gradient updates and directly applying L2 regularization to the parameters, thus avoiding coupling effects with adaptive learning rate estimation. Its update process is as follows: First, gradient calculation is performed, and its expression is as follows:

[0068]

[0069] Where t is the current iteration step, and g t Let θ be the gradient at step t, and θ be the model parameters. Let be the loss function. Then, first-order and second-order moment estimations are performed, followed by bias correction. The calculation expressions are as follows:

[0070] m t =β1m t-1 +(1-β1)g t

[0071]

[0072] Where m t and v t These represent the first-order moment estimate and the second-order moment estimate of the gradient, respectively. and It is for m t and v t The bias correction is applied, with β1 and β2 representing the estimated exponential decay rate, set to 0.9 and 0.999, respectively. Finally, the parameters are updated, and their calculation expression is as follows:

[0073]

[0074] Where α is the initial learning rate and ε is the numerical stability constant, typically taken as 10. -8 To prevent the denominator from being zero, λ is the weight decay coefficient.

Claims

1. A method for online estimation of the viscosity of coal-water slurry, comprising the following steps: (a) Read in the real-time monitoring multimodal data, i.e., coal-water slurry temperature Electrical impedance spectrum R(f) i )+jX(f i ), i = 1, 2, ..., N f Ultrasonic amplitude attenuation spectrum A(f) i ), i = 1, 2, ..., M f and phase shift spectrum θ(f i ), i = 1, 2, ..., M f ; (b) Data preprocessing; (c) Perform temperature-weighted fusion and depth feature extraction in two branches; (d) Cross-modal cross-attention fusion; (e) Feature refinement and multi-task joint prediction; The feature is that, in step (1) (b) of the data preprocessing, for impedance data, the real part, imaginary part, and temperature of the impedance at each frequency point are standardized, and then the feature matrix (4×N) is reconstructed. f ), as the initial feature F z_i For ultrasound data, the ultrasound amplitude, phase, and temperature at each frequency point are standardized, and then the feature matrix (4×M) corresponding to all frequency points is reconstructed. f ), as the initial feature F u_i (2) In step (c), temperature-weighted fusion and depth feature extraction are performed in two branches. One branch is the impedance processing branch, which processes the initial feature F. z_i The input is fed into the impedance-temperature fusion module, and the output is the temperature-weighted depth feature F of the impedance branch. z_t The data is then input into the Transformer encoder to obtain the global dependency modeling features F. z_g (3) In step (c), the temperature-weighted fusion and depth feature extraction are performed in two branches. The other branch is the ultrasonic processing branch, which will process the initial feature F. u_i The input is fed into the ultrasonic temperature fusion module, and the output is the temperature-weighted depth feature F of the ultrasonic branch. u_t The data is then input into the Transformer encoder to obtain the global dependency modeling features F. u_g (4) In step (d) of cross-modal attention fusion, the features F of the two branches are combined. z_g and F u_g Cross-attention fusion is performed to obtain the fused impedance feature F′. z_g and ultrasound features F′ u_g (5) In step (e) feature refinement and multi-task joint prediction, for the impedance feature F′ z_g and ultrasound features F′ u_g The refined feature F is obtained by using the attention pooling mechanism. z_f and F u_f The features are concatenated to form a one-dimensional joint feature vector F. fuse The data is input into a multilayer perceptron (MLP), which ultimately outputs a real-time estimate of the viscosity of the coal-water slurry. Simultaneously, the unfused impedance branch features and ultrasound branch features are also input into the multilayer sensor, utilizing its output auxiliary estimates. and End-to-end training is performed using a weighted loss function.

2. The online viscosity estimation method for coal-water slurry according to claim 1, characterized in that, Step (b) Data preprocessing: Initial features are constructed for the impedance branch and the ultrasound branch respectively. (1) A four-dimensional tensor is constructed using the impedance data. The real part of the impedance at each frequency point virtual part Temperature sequence at corresponding frequency points The channels are interleaved and cascaded, arranged in [R, T] z X, T z ], where B is the batch size; (2) Construct a four-dimensional tensor using ultrasonic data. global average temperature The copy is expanded into a vector with the same dimensions as the ultrasound spectrum. Then, the ultrasonic amplitude attenuation spectrum at each frequency point. With phase shift spectrum The channels are interleaved and cascaded, arranged in the manner of [A, T]. u ,θ,T u ], where B is the batch size.

3. The online viscosity estimation method for coal-water slurry according to claim 1, characterized in that, The impedance-temperature fusion module in step (c) adopts a CNN architecture, (1) using the four-dimensional tensor F in step (b). z_i As input; (2) Processed by the first two-dimensional convolutional layer, the convolutional kernel size (K) is 2×3, the stride (S) is (2, 1), the padding (P) is (0, 1), the number of output channels is C / 4, and the real part-temperature pairs and the imaginary part-temperature pairs are extracted respectively, and the output dimension is (B, C / 4, 2, N). f (3) After being processed by the GELU activation function and layer normalization (LayerNorm), the two-dimensional convolutional layer is used to process the features. The kernel size is 2×3, the stride is (1, 1), the padding is (0, 1), and the number of output channels is C / 2. The separated features are fused into a unified representation, and the output dimension is (B, C / 2, 1, N). f Similarly, after GELU activation and layer normalization; (4) through a one-dimensional convolutional layer with a kernel size of 3, a stride of 1, padding of 1, and C output channels, the temperature-weighted impedance feature matrix is ​​obtained. After dimensional transformation, it becomes (B, N) f (C) Then add it to the learnable position embedding and perform Dropout regularization; (5) then add F z_t The input is fed into a multi-layer Transformer encoder, each layer containing a multi-head attention (MHA) mechanism and a feedforward neural network (FNN) to extract long-range dependencies between spectra and output deep features.

4. The online viscosity estimation method for coal-water slurry according to claim 1, characterized in that, The ultrasonic temperature fusion module in step (c) adopts a CNN architecture, (1) using the four-dimensional tensor F in step (b). u_i As input; (2) Processed by the first two-dimensional convolutional layer, the convolutional kernel size is 2×5, the stride is (2,2), the padding is (0,2), the number of output channels is C / 4, and the output dimension is (B,C / 4,2,M). f / 2), then activated by the GELU function and normalized by the layer; (3) Processed by a second two-dimensional convolutional layer with a kernel size of 2×5, a stride of (2, 2), padding of (0, 2), an output channel count of C / 2, and an output dimension of (B, C / 2, 1, M). f / 4), similarly activated by the GELU function and normalized by the layer; (4) processed by a one-dimensional convolutional layer with a kernel size of 5, a stride of 2, padding of 2, and an output channel number of C, reducing the frequency dimension from M f / 4 compressed to N f The temperature-weighted ultrasonic feature matrix was obtained. After dimensional transformation, it becomes (B, N) f (C) Then add it to the learnable position embedding and perform Dropout regularization; (5) then add F u_t The input is fed into a multi-layer Transformer encoder, each layer containing a multi-head self-attention mechanism and a feedforward network, to extract long-range dependencies between spectra and output deep features.

5. The online viscosity estimation method for coal-water slurry according to claim 1, characterized in that, Step (d) converts the Transformer output features F of the two branches. z_g and F u_g Input is fed into a multi-layer cross-attention Transformer module, and each layer of the module performs: (1) with F z_g As a query (Q), F u_g As keys (K) and values ​​(V), calculate cross-attention and update impedance branch characteristics; (2) With F u_g As a query, F z_g As keys and values, calculate cross-attention and update ultrasound branch features; (3) After each modality is normalized and fed forward, the output is processed to achieve intermodal information exchange and obtain the fused feature F′. z_g and F′ u_g .

6. The online viscosity estimation method for coal-water slurry according to claim 1, characterized in that, In step (e), F′ z_g and F′ u_g Attention pooling is performed separately, and the importance weights of frequency points are obtained through learnable parameters q. This is applied to N. f Weighted summation of dimensions, F′ z_g Compressed into one-dimensional feature vectors F′ u_g Compress to 7. The online viscosity estimation method for coal-water slurry according to claim 1, characterized in that, Step (e) constructs a multi-task prediction network: (1) fuses the prediction branches: F z_f and F u_f The features are concatenated to form a one-dimensional joint feature vector. Viscosity estimate output by multilayer sensor (2) Impedance-independent prediction branch: Before cross-attention fusion, from the Transformer output F z_g After attention pooling and layer normalization, we obtain The viscosity estimate is output by an independent multilayer sensor based on impedance. (3) Independent Ultrasound Prediction Branch: Similarly, from the Transformer output F u_g After attention pooling and layer normalization, we obtain The viscosity estimate is output by an independent multilayer sensor based on impedance.

8. The online viscosity estimation method for coal-water slurry according to claim 1, characterized in that, End-to-end training is performed using a weighted loss function: in, To integrate predicted losses, As an auxiliary loss for impedance branch, The ultrasonic branch is used as the auxiliary loss, ω1, ω2 and ω3 are weight coefficients, and y is the true value of viscosity. The network parameters of the CNN temperature fusion module, Transformer encoder, cross attention module and three prediction branches are optimized simultaneously through the backpropagation algorithm, so that the impedance branch and ultrasonic branch can learn modality-specific features independently while cooperating to optimize the fused representation.

9. The online viscosity estimation method for coal-water slurry according to claim 1, characterized in that, The AdamW optimization algorithm was used during training, with an initial learning rate set to 10. -4 The weight decay factor is set to 10. -4 An early stopping mechanism is used to prevent overfitting, and training is terminated when the validation set loss does not decrease for 30 consecutive cycles.

10. The online viscosity estimation method for coal-water slurry according to claim 1, characterized in that, The trained model was evaluated using test set data, and the evaluation metrics included mean absolute error (MAE), mean squared error (RMSE), and coefficient of determination (R²). 2 Its expression is as follows: Among them, y i For the true value, This is an estimated value. is the mean of the true values, and N is the sample size.

Citation Information

Patent Citations

  • On-line monitoring system for viscosity of coal water slurry

    CN220729947U