Method for predicting temperature and humidity of outlet tobacco shreds in drum tobacco shred drying process based on mechanism constraint
By adopting a prediction method based on mechanism guidance during the drum drying process and embedding mechanism constraints into the LSTM model, the problem of difficulty in accurately predicting the temperature and humidity of the outlet cut tobacco in traditional methods is solved, achieving higher prediction accuracy and reliability. .
Patent Information
- Application Number
- CN202411552961.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-01-21
AI Technical Summary
During the traditional drum drying process, it is difficult to accurately predict and control the temperature and humidity of the outlet tobacco, which makes it difficult to ensure the stability and consistency of the drying process, affecting the quality of the final product.
A prediction method based on mechanism guidance is adopted, by collecting data from the drum dryer, using normalization and sliding window partitioning techniques, combined with the long short-term memory neural network (LSTM) model, and embedding mechanism constraints into the model, including monotonic Sexual constraints, approximation constraints and identity constraints are used to optimize model parameters to improve prediction accuracy.
It significantly improves the accuracy and reliability of the temperature and humidity prediction of export cut tobacco, ensures that the prediction results follow physical laws, enhances the interpretability and stability of the model, and reduces the proportion of monotonicity violations.
Smart Images

Figure CN119326164A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of industrial process soft measurement, and in particular relates to a method for predicting the outlet temperature of cut tobacco in a drum drying process based on mechanism constraints. Background Art
[0002] The roller dryer is an indispensable key equipment in the tobacco processing process. Its main function is to dry the tobacco by heating and rotating the roller, so as to achieve uniform moisture content and good flexibility of the tobacco.
[0003] In the process of drying tobacco, the moisture and temperature of tobacco are two important parameters that affect the drying effect. Traditional control methods often rely on experience and simple feedback control, which is difficult to cope with the complex dynamic changes and multi-variable coupling problems in actual production. This not only makes it difficult to ensure the stability and consistency of the drying process, but also may affect the quality of the final product. At the same time, the drum drying process has complex multi-variable coupling characteristics, involving physical and chemical changes in tobacco, such as moisture migration, heat transfer and material conversion.
[0004] Traditional data-driven models face many difficulties in dealing with the nonlinear and time-varying characteristics of these industrial processes. First, data-driven models are prone to overfitting or underfitting problems, which makes it difficult to accurately predict and control key parameters in the tobacco drying process. In addition, the complexity and variability of industrial big data make it difficult for a single data-driven model to cope with complex multivariate coupling problems, thus failing to achieve ideal prediction results. In the actual task of predicting the temperature and humidity of tobacco at the outlet of the tobacco drying process, the above problems often occur simultaneously, posing a great challenge to traditional soft sensors. Summary of the invention
[0005] The present disclosure proposes a method for predicting the temperature and humidity of tobacco at the outlet of a rolling tobacco drying process based on mechanism guidance to solve the above-mentioned technical problems.
[0006] A method for predicting outlet temperature and humidity of a rolling tobacco drying process based on mechanism guidance, the method comprising: collecting data of a roller tobacco drying machine under normal operating conditions as a data set, normalizing the data set using a normalization method, and performing sliding window partitioning on the data set; determining model input and output, determining a model structure, and defining model parameters; embedding mechanism constraints into a data-driven model for model training based on expert prior knowledge, wherein the embedded mechanism constraints include: determining mechanism knowledge, embedding monotonicity constraints, embedding approximate constraints, embedding identity constraints, and obtaining a combined mechanism constraint loss function; training the model using training data, and optimizing and updating the model parameters by minimizing the combined loss function; and performing post-processing operations online according to the prediction results of outlet tobacco temperature and humidity to ensure that the changes in outlet tobacco temperature and humidity meet the monotonicity law.
[0007] In some embodiments, the data collected during normal operation of the drum dryer is used as a data set, the data set is normalized using a normalization method, and the data set is divided into sliding windows, including: collecting the normal operation data of the drum dryer as an original data set, and recording the original training set as , where N1 represents the number of samples in the original training set, The data dimension of each sample in is V, that is, each sample corresponds to V process variables; There are N1 samples in the table corresponding to the normal working state of the drum drying machine. , the original test set is denoted as , where N2 represents the number of samples in the original test set, The data dimension of each sample in is V, that is, each sample corresponds to V process variables; There are N2 samples in the table corresponding to the normal working state of the drum drying machine. ,in, The data dimension of each label in is , that is, each label corresponds to target variables, these samples and labels constitute the original test sample set, denoted as Therefore, the entire drum-dried silk original data set is recorded as ;
[0008] Will Normalize the data to the interval [0,1], and the calculation formula is: , =1,2,…, ; =1,2,…,V, where represents the value of the vth process variable in the i-th training sample of the original training set, , Respectively represent the maximum and minimum values of the vth process variable in all original training samples, It represents the normalized value of the corresponding sample and the corresponding variable in the original training set. After the process variables of the original training set are normalized, the target variable is normalized. The calculation formula is: , =1,2,…, ; =1,2,…, ,in, represents the first training sample in the original training set The value of the target variable, , Respectively represent the first The maximum and minimum values of the target variables, Represents the normalized value of the corresponding label and variable in the original training set; After normalization, the calculation formula is: , =1,2,…, ; =1,2,…,V, where represents the value of the vth process variable in the i-th test sample of the original test set, It represents the normalized value of the corresponding sample and the corresponding variable in the original test set; the same normalization operation is performed on the target variable, and its calculation formula is: , =1,2,…, ; =1,2,…, ,in, represents the first test sample in the original test set The value of the target variable, Represents the normalized value of the corresponding label and variable in the original test set; after normalizing the data set, the normalized original training sample set can be obtained ,in, Indicates that there is The original training sample set consisting of the labels corresponding to the samples; the normalized original test sample set ,in, Indicates that there is The original test sample set consists of the labels corresponding to the samples. The total number of samples in the original data set after normalization is ;
[0009] Use sliding window to normalize , To divide, it is necessary to intercept the time series data through the sliding window to obtain the variable data pair: , where l represents the window size, and the training set is , Indicates that there is The number of samples, each sample contains historical information of l window size, and the dimension of each historical information is ; The label corresponding to the training set is , Indicates that there is labels, and the data dimension of each label is ; The test set is , Indicates that there is The number of samples, each sample contains historical information of l window size, and the dimension of each historical information is ; The label corresponding to the test set is , Indicates that there is labels, and the data dimension of each label is ; By dividing the data set by variable data pairs, we can get the training sample set and the test sample set respectively. , ,in, Zhongyou The variable data pairs constitute the training sample set. Zhongyou The test sample set consists of variable data pairs.
[0010] In some embodiments, determining the model input and output, determining the model structure, and defining the model parameters include:
[0011] The input of the model is ,in, Depend on The number of samples, each sample contains process variables, the output of the model is The target variable for prediction is the temperature and humidity of exported tobacco, and the Long Short-Term Memory (LSTM) neural network is used as the data-driven model. Represents data-driven model parameters.
[0012] In some embodiments, based on expert prior knowledge, the mechanism constraint condition is embedded into the data-driven model for model training, and the embedding mechanism constraint condition includes: determining mechanism knowledge, embedding monotonicity constraint, embedding approximation constraint, embedding identity constraint, and obtaining a combined mechanism constraint loss function, including:
[0013] The monotonic constraint relationship between the outlet tobacco temperature and the hot air temperature is expressed as: ,in, represents the target variable tobacco outlet temperature, The hot air temperature represents the process variable. The monotonic constraint relationship shows that the outlet tobacco temperature and the hot air temperature are in a monotonically increasing relationship. According to the expert's prior knowledge and the mechanism knowledge that the moisture removed from tobacco during tobacco drying is equal to the moisture absorbed by the gas phase, the constant equation for the moisture content of the outlet tobacco can be obtained: , ,in, Indicates the tobacco flow rate, Indicates the hot air flow rate, Indicates the moisture content of imported tobacco. It is expressed as the outlet moisture content of cut tobacco, that is, the humidity of cut tobacco at the outlet. and They represent the hot air inlet humidity and hot air outlet humidity respectively, d represents the cross-sectional diameter of the drying machine drum, which is 1.9m, represents the air density, Indicates hot air speed;
[0014] The mechanism constraints needed in the model training process are clarified, and the mechanism constraints are embedded as penalty terms in the data-driven model loss function for training to ensure that the model training process complies with certain physical laws; according to the monotonic relationship between the outlet tobacco temperature and the hot air temperature, the outlet tobacco temperature and the hot air temperature at different times follow the following monotonic relationship: , if or , if ,in, represents the predicted value of the outlet tobacco temperature at the i-th moment, represents the observed value of the outlet tobacco temperature at the i-1th moment, and Respectively represent the hot air temperature observation data at the i-th moment and the i-1-th moment. Based on this monotonic relationship, the loss function is defined as: ,in, represents the linear rectification activation function, represents the length of the training set time series, that is, the number of training set samples, The loss function penalizes data that violates the monotonicity relationship and has strong constraints on the model training process;
[0015] Define the predicted moisture value of exported tobacco based on expert knowledge The constraint interval , At this time, the function value is 0. At this time, the function value is or ;in, and It is expressed as the absolute difference of the deviation interval, and the form is: ,in, Represents the approximate constraint function, which is embedded into the training loss function of the data-driven model. Based on this approximate constraint relationship, the loss function is defined as: ,in, represents the predicted value of the moisture content of the exported tobacco at the i-th moment;
[0016] Based on the knowledge that the moisture removed from tobacco during tobacco drying is equal to the moisture absorbed by the gas phase, the moisture constant equation of exported tobacco is converted into a physical model equation, which is recorded as: , where the predicted value of outlet tobacco moisture based on the physical model is calculated by given inlet conditions and hot air parameters. ; Embed the physical model into the training loss function of the data-driven model, and define the loss function based on the physical model as: ,in, represents the predicted value of the moisture content of the exported tobacco by the physical model at the i-th moment, The loss function represents the predicted value of the data-driven model Compared with the physical model prediction The mean square error between
[0017] By embedding monotonicity constraints, approximation constraints, and identity constraints into the model for training, the combined mechanism constraint loss function is obtained, which is calculated as follows: ,in, represents the total loss function of the model, , , They are penalty coefficients, which are used to adjust the proportions of different constraints.
[0018] In some embodiments, the step of training the model using the training data and optimizing and updating the model parameters by minimizing the combined loss function includes:
[0019] Before model training, the predicted value matrix of export tobacco temperature and humidity is obtained through physical model calculation, which is expressed as ; Use normalization method and sliding window method to Divided into training set and test set, expressed as: , ,in, and Represents the training set and test set of the predicted values of temperature and humidity of exported cut tobacco after division;
[0020] right and , and Perform concatenation operations to generate new process variable training and test sets, denoted as: , ,in, Represents a splicing operation, and Represents the new process variable training set and test set after splicing;
[0021] Prepare training set data pairs, initialize model parameters, input the concatenated process variables and corresponding target variables (labels) into data pairs into the LSTM model, and use the combination mechanism to constrain the loss function Calculate the current loss and update the model parameters through back propagation. The model parameters are calculated as follows: ,in, is the learning rate, Represents the training loss function Parameters The gradient of Indicates an assignment operation. The calculated new value is assigned to the left ;
[0022] After model training is completed, the optimal model parameters can be obtained. .
[0023] In some embodiments, the online post-processing operation is performed according to the predicted result of the temperature and humidity of the outlet tobacco to ensure that the temperature and humidity changes of the outlet tobacco meet the monotonicity law, including:
[0024] Acquire real-time process variable data from actual industrial sites Input to use the optimal model parameters In the LSTM model, the model output is the predicted value of the outlet tobacco temperature and export tobacco moisture prediction ;
[0025] In the online application stage, the predicted value of outlet tobacco temperature is post-processed and calculated as follows: ,in, It represents the predicted value of the outlet tobacco temperature at the i-th moment after the post-processing operation. This predicted value is obtained by After correction, is the adjustment factor, and finally the predicted value of the temperature and humidity of the exported tobacco after post-processing operation is obtained. And the predicted values of temperature and humidity of exported tobacco .
[0026] Advantages of the present disclosure: First, a loss function guided by mechanism constraints is designed, and the designed loss function integrates mechanism knowledge. Compared with the model without mechanism constraints, the model designed based on mechanism constraints has a lower proportion of monotonicity violations in the prediction results of the test set. Secondly, a post-processing operation is proposed in the model testing stage to gradually correct the predicted value of the temperature and humidity of the outlet tobacco, ensuring that the model follows the monotonic change law between the outlet tobacco temperature and the hot air temperature during the processing; finally, through experimental verification, the model parameters are optimized and adjusted to ensure the interpretability and reliability of the prediction results. The present disclosure realizes the integration of mechanism knowledge into the data-driven model, and based on the post-processing operation in the model testing stage, it ensures that the predicted value of the temperature and humidity of the outlet tobacco after the post-processing operation follows the monotonic change law between the temperature and humidity of the hot air. Compared with the traditional data-driven model, the present disclosure realizes the combination of mechanism knowledge and data-driven methods, and effectively improves the interpretability and reliability of the model.
[0027] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0029] Figure 1 It is a flow chart of the prediction method.
[0030] Figure 2 It is a schematic diagram of constructing a hybrid model of mechanistic data. DETAILED DESCRIPTION
[0031] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0032] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0033] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0034] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0035] The prediction of outlet tobacco temperature and humidity during the drying process of a drum drying machine in a cigarette factory in Zhejiang is used as an example to illustrate: In this embodiment, a total of 8,000 sample data were collected during the drying process, of which 7,000 samples were used as training sets to train the model, and 1,000 samples were used as test sets to test the model. Each sample contained 14 process variables and 2 target variables; the variables were collected by installing sensors at different positions inside the drum.
[0036] like Figure 1 As shown, the prediction methods include:
[0037] Step 1: Data collection and preprocessing: Collect the data of the drum dryer under normal operation as the data set, use the normalization method to normalize the training data, and divide the data set into sliding windows. This step is implemented by the following sub-steps:
[0038] Step 1: Data collection and preprocessing: Collect the data of the drum dryer under normal operation as the data set, use the normalization method to normalize the training data, and divide the data set into sliding windows. This step is implemented by the following sub-steps:
[0039] (1) Collect the normal operation data of the drum drying machine as the original data set, and record the original training set as , where N1 represents the number of samples in the original training set, The data dimension of each sample in is V, that is, each sample corresponds to V process variables; There are N1 samples in the table corresponding to the normal working state of the drum drying machine. ,in, The data dimension of each label in is , that is, each label corresponds to target variables, these samples and labels constitute the original training sample set, denoted as , the original test set is denoted as , where N2 represents the number of samples in the original test set, The data dimension of each sample in is V, that is, each sample corresponds to V process variables; There are N2 samples in the table corresponding to the normal working state of the drum drying machine. ,in, The data dimension of each label in is , that is, each label corresponds to target variables, these samples and labels constitute the original test sample set, denoted as Therefore, the entire drum-dried silk original data set is recorded as In this embodiment, N1 and N2 represent the number of samples in the original training set and the original test set, which are set to 7000 and 1000 respectively. V represents the data dimension of each sample, which is set to 14, i.e., 14 process variables. Represents the data dimension of each label, which is set to 2, that is, the target variables are the outlet tobacco temperature and outlet tobacco humidity respectively.
[0040] (2) Then Normalize the data to the interval [0,1], and the calculation formula is:
[0041] , =1,2,…, ; =1,2,…,V, where represents the value of the vth process variable in the i-th training sample of the original training set, , Respectively represent the maximum and minimum values of the vth process variable in all original training samples, It represents the normalized value of the corresponding sample and corresponding variable in the original training set. After normalizing the process variables of the original training set, the target variable is normalized in the same way. The calculation formula is: , =1,2,…, ; =1,2,…, ,in, represents the first training sample in the original training set The value of the target variable, , Respectively represent the first The maximum and minimum values of the target variables, Represents the normalized value of the corresponding label and variable in the original training set.
[0042] Then After normalization, the calculation formula is:
[0043] , =1,2,…, ; =1,2,…,V, where represents the value of the vth process variable in the i-th test sample of the original test set, It represents the normalized value of the corresponding sample and corresponding variable in the original test set. Similarly, after normalizing the process variables of the original test set, the target variable is also normalized. The calculation formula is:
[0044] , =1,2,…, ; =1,2,…, ,in, represents the first test sample in the original test set The value of the target variable, Represents the normalized value of the corresponding label and variable in the original test set.
[0045] After normalizing the data set, the normalized original training sample set can be obtained ,in, Indicates that there is The original training sample set is composed of the labels corresponding to the samples; the normalized original test sample set can also be obtained ,in, Indicates that there is The original test sample set consists of the labels corresponding to the samples. The total number of samples in the original data set after normalization is In this embodiment, N represents the total number of samples in the original data set, which is set to 8,000.
[0046] (3) Then use the sliding window to normalize , To divide, it is necessary to intercept the time series data through the sliding window and obtain the variable data pairs as follows: , where l represents the window size, and the training set is , Indicates that there is The number of samples, each sample contains historical information of l window size, and the dimension of each historical information is ; The label corresponding to the training set is , Indicates that there is labels, and the data dimension of each label is ; The test set is , Indicates that there is The number of samples, each sample contains historical information of l window size, and the dimension of each historical information is ; The label corresponding to the test set is , Indicates that there is labels, and the data dimension of each label is In this embodiment, l represents the window size, which is set to 2.
[0047] By dividing the data set into variable data pairs, we can get the training sample set and the test sample set respectively. , ,in, Zhongyou The variable data pairs constitute the training sample set. Zhongyou A test sample set consisting of variable data pairs. In this embodiment, The training sample set consists of 6998 variable data pairs. The test sample set consists of 998 variable data pairs.
[0048] Step 2: Define the model: determine the model input and output, determine the model structure, and define the model parameters. This step is implemented by the following sub-steps:
[0049] (1) The input of the model is ,in, Depend on The number of samples, each sample contains process variables, the output of the model is The target variable for prediction, namely the temperature and humidity of exported tobacco, is a Long Short-Term Memory (LSTM) neural network as the data-driven model of the present invention. As a data-driven model parameter. In this embodiment, and They are set to 14 and 2 respectively, that is, the input of the LSTM model is the 14 process variables in the training sample set and the corresponding 2 target variables, and the output of the model is the 2 predicted target variables, which are the predicted value of the outlet tobacco temperature and the predicted value of the outlet tobacco humidity;
[0050] Step 3: Embedding mechanism constraint method: Based on expert prior knowledge, the mechanism constraint conditions are embedded into the data-driven model for model training. The embedding mechanism constraint method includes the following steps: determining mechanism knowledge, embedding monotonicity constraints, embedding approximation constraints, embedding identity constraints, and obtaining a combined mechanism constraint loss function. The specific steps are as follows: Figure 2 As shown, this step is implemented by the following sub-steps:
[0051] (1) Based on the expert prior knowledge, the mechanism knowledge required in the model training process is summarized and analyzed. The relevant mechanism knowledge is as follows: The monotonic constraint relationship between the outlet tobacco temperature and the hot air temperature is expressed as: ,in, Represents the target variable tobacco outlet temperature , Indicates the process variable hot air temperature The monotonic constraint relationship can be obtained that the outlet tobacco temperature and the hot air temperature are in a monotonically increasing relationship. In this embodiment, according to the expert prior knowledge, it can be obtained that the outlet tobacco humidity value is stable at 12 0.2, expressed as , Represents the observed value of exported tobacco, which can be obtained by calculation =11.8, =12.2, therefore, the numerical stability range of the exported tobacco moisture is expressed as Based on the knowledge that the moisture removed from tobacco during tobacco drying is equal to the moisture absorbed by the gas phase, the constant calculation equation for moisture in exported tobacco can be obtained: , ,in, Indicates tobacco flow , Indicates hot air flow , Indicates the moisture content of imported tobacco. It is expressed as the outlet moisture content of cut tobacco, that is, the humidity of cut tobacco at the outlet. and They represent the hot air inlet humidity and hot air outlet humidity respectively, and d represents the cross-sectional diameter of the drying machine drum. , is 1.9m, Indicates air density , Indicates hot air speed .
[0052] (2) The mechanism constraints required in the model training process are clarified, and then the mechanism constraints are embedded as penalty terms in the data-driven model loss function for training to ensure that the model training process also conforms to certain physical laws; according to the monotonic relationship between the outlet tobacco temperature and the hot air temperature, when other conditions except the hot air temperature remain unchanged, the outlet tobacco temperature and the hot air temperature at different times follow the following monotonic relationship: , if or , if ,in, represents the predicted value of the outlet tobacco temperature at the i-th moment, represents the observed value of the outlet tobacco temperature at the i-1th moment, and Respectively represent the hot air temperature observation data at the i-th moment and the i-1-th moment. Based on this monotonic relationship, the loss function is defined as: ,in, represents the linear rectification activation function, Represents the length of the training set time series, that is, the number of training set samples. The loss function penalizes data that violates the monotonicity relationship and has strong constraints on the model training process. In this embodiment, Indicates the number of training set samples, set to 6998;
[0053] (3) Defining the predicted value of moisture content of exported tobacco based on expert knowledge The constraint interval , At this time, the function value is 0. At this time, the function value is or ;in, and It is expressed as the absolute difference of the deviation interval, and the form is:
[0054] ,in, Represents the approximate constraint function, and then embeds the approximate constraint function into the training loss function of the data-driven model. Based on this approximate constraint relationship, the loss function is defined as: ,in, represents the predicted value of the moisture content of the exported tobacco at the i-th moment, The loss function ensures that the output of the neural network is as close to the given stable interval as possible. Predicted values that deviate from the interval will incur losses, thereby guiding the training of the model and reducing the situation where the predicted values deviate from the stable interval.
[0055] (4) Based on the knowledge that the moisture removed from tobacco during the drying process is equal to the moisture absorbed by the gas phase, the moisture constant equation for exported tobacco is converted into a physical model equation, which is expressed as: The physical model of outlet tobacco humidity fully considers the mass and energy exchange between hot air and materials during tobacco drying. The predicted value of outlet tobacco humidity based on the physical model is calculated by given inlet conditions and hot air parameters. ; Then embed the physical model into the training loss function of the data-driven model, and define the loss function based on the physical model as: ,in, represents the predicted value of the moisture content of the tobacco cut at the physical model outlet at the i-th moment, The loss function represents the predicted value of the data-driven model Compared with the physical model prediction The mean square error between the two models introduces the constraints of the physical model into the training of the neural network, making the model more robust and interpretable;
[0056] (5) Next, the loss caused by the prediction error during model training is calculated as , calculated as: ,in, Represents the supervised loss based on pure data drive, which is used to measure the difference between the model prediction value and the true value;
[0057] (6) By embedding monotonicity constraints, approximation constraints, and identity constraints into the model for training, the combined mechanism constraint loss function is obtained, which is calculated as follows: ,in, represents the total loss function of the model, , , are penalty coefficients, which are used to adjust the proportions of different constraints. In this embodiment, , , Set them to 0.1, 0.1, 0.1 respectively;
[0058] Step 4: Model parameter optimization: Use the training data to train the model and optimize and update the model parameters by minimizing the combined loss function.
[0059] (1) Before model training, the predicted value matrix of export tobacco moisture is obtained by physical model calculation, which is expressed as ; Use normalization method and sliding window method to Divided into training set and test set, expressed as: , ,in, and Represents the training set and test set of the predicted value of export tobacco moisture after division.
[0060] (2) Then and , and Perform concatenation operations to generate new process variable training and test sets, denoted as: , ,in, Represents a splicing operation, and Represents the new process variable training set and test set after splicing.
[0061] (3) Prepare training set data pairs, initialize model parameters, input the concatenated process variables and corresponding target variables (labels) into data pairs into the LSTM model, and use the combination mechanism to constrain the loss function. Calculate the current loss and update the model parameters through back propagation. The model parameters are calculated as follows: ,in, is the model parameter of (1) in step 2, is the learning rate, Represents the training loss function Parameters The gradient of Indicates an assignment operation. The calculated new value is assigned to the left , in this embodiment, Set to 0.001.
[0062] (4) Repeat the process of calculating gradients and updating parameters in step 4 (3) until the preset number of training rounds is reached. The model training is completed and the optimal model parameters after training can be obtained. In this embodiment, the number of training rounds is set to 100, the hidden layer size of the model is set to 1, and the number of neurons in each layer is set to 128.
[0063] Step 5: Online prediction of outlet tobacco temperature and humidity based on post-processing: Perform post-processing operations online based on the outlet tobacco temperature prediction results to ensure that the outlet tobacco temperature changes meet the monotonic law. This step is implemented by the following sub-steps:
[0064] (1) Collecting real-time process variable data from actual industrial sites Input to use the optimal model parameters In the LSTM model, the model output is the predicted value of the outlet tobacco temperature and export tobacco moisture prediction ;
[0065] (2) In the original data set, there is a large proportion of data points that do not conform to the monotonic change law of the outlet tobacco temperature and the hot air temperature. In order to solve the problem of mechanism data conflict, the outlet tobacco temperature prediction value is post-processed in the online application stage. The calculation method is as follows:
[0066] ,in, It represents the predicted value of the outlet tobacco temperature at the i-th moment after the post-processing operation. This predicted value is obtained by After correction, is the adjustment factor; the final predicted value of the outlet tobacco temperature after post-processing operation is obtained and export tobacco moisture prediction ;
[0067] Finally, the predicted value of the outlet tobacco temperature after post-processing operation is obtained. and export tobacco moisture prediction ;
[0068] The mechanism constraint prediction model trained by the present disclosure is used to test a test set containing 1000 sample data points. The present disclosure embeds mechanism constraints such as monotonicity constraints and approximate constraints in the LSTM model and combines post-processing operations to compare the LSTM model without any mechanism constraint introduction and the LSTM + mechanism constraint introduction model. The results are shown in the following table:
[0069] Comparison of the proportion of different models violating monotonicity on the test set (%)
[0070]
[0071] From the experimental results in the above table, the method proposed in the present disclosure can significantly reduce the proportion of test set monotonicity violations after prediction. Using the first LSTM model without any mechanism constraint, the proportion of test set monotonicity violations after model prediction is 51.35%. Using the second LSTM model with mechanism constraint, the proportion of test set monotonicity violations after model prediction is 32.56%. Compared with the second best method LSTM+mechanism constraint introduction model, the present disclosure can bring huge performance improvement. This performance improvement is mainly attributed to two aspects: first, the method designed in the present disclosure introduces mechanism knowledge and uses physical laws to guide the training of data-driven models, thereby avoiding the model from being completely dependent on data-driven. Second, the mechanism data hybrid model designed by the present method uses post-processing operations on the predicted values of the test set, which greatly reduces the proportion of test set monotonicity violations. This proves that the method proposed in the present disclosure is feasible and effective.
[0072] Although some specific embodiments of the present disclosure have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.
Claims
1. A mechanism-guided method for predicting outlet temperature and humidity of rolling silk drying process, characterized in that: The method comprises: The data of the drum tofu drying machine under normal operation is collected as a data set, the data set is normalized using a normalization method, and the data set is divided into sliding windows; Determine the model input and output, determine the model structure, and define the model parameters; Based on the expert prior knowledge, the mechanism constraints are embedded into the data-driven model for model training. The embedded mechanism constraints include: determining the mechanism knowledge, embedding the monotonicity constraint, embedding the approximation constraint, embedding the identity constraint, and obtaining the combined mechanism constraint loss function; Use training data to train the model and optimize and update the model parameters by minimizing the combined loss function; Post-processing operations are performed online based on the predicted results of the temperature and humidity of the exported tobacco to ensure that the changes in the temperature and humidity of the exported tobacco meet the monotonicity law.
2. The mechanism-guided method for predicting outlet temperature and humidity of rolling tofu drying process according to claim 1 is characterized in that: The data of the drum tofu drying machine under normal operating conditions are collected as a data set, the data set is normalized using a normalization method, and the data set is divided into sliding windows, including: The normal operation data of the drum drying machine is collected as the original data set, and the original training set is denoted as , where N1 represents the number of samples in the original training set, The data dimension of each sample in is V, that is, each sample corresponds to V process variables; There are N1 samples in the table corresponding to the normal working state of the drum drying machine. , the original test set is denoted as , where N2 represents the number of samples in the original test set, The data dimension of each sample in is V, that is, each sample corresponds to V process variables; There are N2 samples in the table corresponding to the normal working state of the drum drying machine. ,in, The data dimension of each label in is , that is, each label corresponds to target variables, these samples and labels constitute the original test sample set, denoted as Therefore, the entire drum-dried silk original data set is recorded as ; Will Normalize the data to the interval [0,1], and the calculation formula is: , =1,2,…, ; =1,2,…,V, where represents the value of the vth process variable in the i-th training sample of the original training set, , Respectively represent the maximum and minimum values of the vth process variable in all original training samples, It represents the normalized value of the corresponding sample and the corresponding variable in the original training set. After the process variables of the original training set are normalized, the target variable is normalized. The calculation formula is: , =1,2,…, ; =1,2,…, ,in, represents the first training sample in the original training set The value of the target variable, , Respectively represent the first The maximum and minimum values of the target variables, Represents the normalized value of the corresponding label and variable in the original training set; After normalization, the calculation formula is: , =1,2,…, ; =1,2,…,V, where represents the value of the vth process variable in the i-th test sample of the original test set, It represents the normalized value of the corresponding sample and the corresponding variable in the original test set; the same normalization operation is performed on the target variable, and its calculation formula is: , =1,2,…, ; =1,2,…, ,in, represents the first test sample in the original test set The value of the target variable, Represents the normalized value of the corresponding label and variable in the original test set; after normalizing the data set, the normalized original training sample set can be obtained ,in, Indicates that there is The original training sample set consisting of the labels corresponding to the samples; the normalized original test sample set ,in, Indicates that there is The original test sample set consists of the labels corresponding to the samples. The total number of samples in the original data set after normalization is ; Use sliding window to normalize , To divide, it is necessary to intercept the time series data through the sliding window to obtain the variable data pair: , where l represents the window size, and the training set is , Indicates that there is The number of samples, each sample contains historical information of l window size, and the dimension of each historical information is ; The label corresponding to the training set is , Indicates that there is labels, and the data dimension of each label is ; The test set is , Indicates that there is The number of samples, each sample contains historical information of l window size, and the dimension of each historical information is ; The label corresponding to the test set is , Indicates that there is labels, and the data dimension of each label is ; By dividing the data set by variable data pairs, we can get the training sample set and the test sample set respectively. , ,in, Zhongyou The variable data pairs constitute the training sample set. Zhongyou The test sample set consists of variable data pairs.
3. The mechanism-guided method for predicting outlet temperature and humidity of rolling tofu drying process according to claim 2 is characterized in that: The step of determining the model input and output, determining the model structure, and defining the model parameters includes: The input of the model is ,in, Depend on The number of samples, each sample contains process variables, the output of the model is The target variable for prediction is the temperature and humidity of exported tobacco, and the long short-term memory neural network is used as the data-driven model. Represents data-driven model parameters.
4. The mechanism-guided method for predicting outlet temperature and humidity of rolling tofu drying process according to claim 3 is characterized in that: Based on the expert prior knowledge, the mechanism constraint condition is embedded into the data-driven model for model training. The embedded mechanism constraint condition includes: determining the mechanism knowledge, embedding the monotonicity constraint, embedding the approximation constraint, embedding the identity constraint, and obtaining the combined mechanism constraint loss function, including: The monotonic constraint relationship between the outlet tobacco temperature and the hot air temperature is expressed as: ,in, represents the target variable tobacco outlet temperature, The hot air temperature represents the process variable. The monotonic constraint relationship shows that the outlet tobacco temperature and the hot air temperature are in a monotonically increasing relationship. According to the expert's prior knowledge and the mechanism knowledge that the moisture removed from tobacco during tobacco drying is equal to the moisture absorbed by the gas phase, the constant equation for the moisture content of the outlet tobacco can be obtained: , ,in, Indicates the tobacco flow rate, Indicates the hot air flow rate, Indicates the moisture content of imported tobacco. It is expressed as the outlet moisture content of cut tobacco, that is, the humidity of cut tobacco at the outlet. and They represent the hot air inlet humidity and hot air outlet humidity respectively, d represents the cross-sectional diameter of the drying machine drum, which is 1.9m, represents the air density, Indicates hot air speed; The mechanism constraints needed in the model training process are clarified, and the mechanism constraints are embedded as penalty terms in the data-driven model loss function for training to ensure that the model training process complies with certain physical laws; according to the monotonic relationship between the outlet tobacco temperature and the hot air temperature, the outlet tobacco temperature and the hot air temperature at different times follow the following monotonic relationship: , if or , if ,in, represents the predicted value of outlet tobacco temperature at time i, represents the observed value of the outlet tobacco temperature at the i-1th moment, and Respectively represent the hot air temperature observation data at the i-th moment and the i-1-th moment. Based on this monotonic relationship, the loss function is defined as: ,in, represents the linear rectification activation function, represents the length of the training set time series, that is, the number of training set samples, The loss function penalizes data that violates the monotonicity relationship and has strong constraints on the model training process; Define the predicted moisture value of exported tobacco based on expert knowledge The constraint interval , At this time, the function value is 0. At this time, the function value is or ;in, and It is expressed as the absolute difference of the deviation interval, and the form is: ,in, Represents the approximate constraint function, which is embedded into the training loss function of the data-driven model. Based on this approximate constraint relationship, the loss function is defined as: ,in, represents the predicted value of the moisture content of the exported tobacco at the i-th moment; Based on the knowledge that the moisture removed from tobacco during tobacco drying is equal to the moisture absorbed by the gas phase, the moisture constant equation of exported tobacco is converted into a physical model equation, which is recorded as: , where the predicted value of outlet tobacco moisture based on the physical model is calculated by given inlet conditions and hot air parameters. ; Embed the physical model into the training loss function of the data-driven model, and define the loss function based on the physical model as: ,in, represents the predicted value of the moisture content of the exported tobacco by the physical model at the i-th moment, The loss function represents the predicted value of the data-driven model Compared with the physical model prediction The mean square error between By embedding monotonicity constraints, approximation constraints, and identity constraints into the model for training, the combined mechanism constraint loss function is obtained, which is calculated as follows: ,in, represents the total loss function of the model, , , They are penalty coefficients, which are used to adjust the proportions of different constraints.
5. The mechanism-guided method for predicting outlet temperature and humidity of rolling tofu drying process according to claim 4 is characterized in that: The method of training the model using the training data and optimizing and updating the model parameters by minimizing the combined loss function includes: Before model training, the predicted value matrix of export tobacco temperature and humidity is obtained through physical model calculation, which is expressed as ; Use normalization method and sliding window method to Divided into training set and test set, expressed as: , ,in, and Represents the training set and test set of the predicted values of temperature and humidity of exported cut tobacco after division; right and , and Perform concatenation operations to generate new process variable training and test sets, denoted as: , ,in, Represents a splicing operation, and Represents the new process variable training set and test set after splicing; Prepare training set data pairs, initialize model parameters, input the concatenated process variables and corresponding target variables (labels) into data pairs into the LSTM model, and use the combination mechanism to constrain the loss function Calculate the current loss and update the model parameters through back propagation. The model parameters are calculated as follows: ,in, is the learning rate, Represents the training loss function Parameters The gradient of Indicates an assignment operation. The calculated new value is assigned to the left ; After model training is completed, the optimal model parameters can be obtained. .
6. The method according to claim 5, characterized in that The online post-processing operation is performed according to the predicted result of the temperature and humidity of the exported tobacco to ensure that the temperature and humidity changes of the exported tobacco meet the monotonicity law, including: Acquire real-time process variable data from actual industrial sites Input to use the optimal model parameters In the LSTM model, the model outputs the predicted value of the outlet tobacco temperature and export tobacco moisture prediction ; In the online application stage, the predicted value of outlet tobacco temperature is post-processed and calculated as follows: ,in, It represents the predicted value of the outlet tobacco temperature at the i-th moment after the post-processing operation. This predicted value is obtained by calculating the temperature at the i-1th moment. After correction, F is the adjustment factor, and finally the predicted value of the temperature and humidity of the exported tobacco after post-processing operation is obtained. And the predicted values of temperature and humidity of exported tobacco .
Citation Information
Cited By
Coal industry chain multi-modal data grading and AI training method, device and equipment
CN122388963A
Coal industry chain multi-modal data grading and ai training method, device and equipment
CN122388963B