CN117744476A - Real-time dosage monitoring method and system for finished product slurry tank - Google Patents
Real-time dosage monitoring method and system for finished product slurry tank Download PDFInfo
- Publication number
- CN117744476A CN117744476A CN202311692864.XA CN202311692864A CN117744476A CN 117744476 A CN117744476 A CN 117744476A CN 202311692864 A CN202311692864 A CN 202311692864A CN 117744476 A CN117744476 A CN 117744476A
- Authority
- CN
- China
- Prior art keywords
- lstm
- blanking speed
- speed
- time
- follows
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 112
- 239000002002 slurry Substances 0.000 title claims abstract description 85
- 238000012544 monitoring process Methods 0.000 title claims abstract description 28
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 81
- 230000008569 process Effects 0.000 claims abstract description 67
- 238000012545 processing Methods 0.000 claims abstract description 33
- 238000012360 testing method Methods 0.000 claims abstract description 14
- 230000000694 effects Effects 0.000 claims abstract description 11
- 239000011159 matrix material Substances 0.000 claims description 92
- 238000007599 discharging Methods 0.000 claims description 42
- 238000001914 filtration Methods 0.000 claims description 37
- 238000012549 training Methods 0.000 claims description 34
- 238000012546 transfer Methods 0.000 claims description 28
- 230000006870 function Effects 0.000 claims description 19
- 238000005259 measurement Methods 0.000 claims description 18
- 230000007704 transition Effects 0.000 claims description 18
- 238000004364 calculation method Methods 0.000 claims description 17
- 238000000605 extraction Methods 0.000 claims description 12
- 238000010606 normalization Methods 0.000 claims description 12
- 238000003860 storage Methods 0.000 claims description 10
- 238000010276 construction Methods 0.000 claims description 8
- 230000007246 mechanism Effects 0.000 claims description 7
- 238000007781 pre-processing Methods 0.000 claims description 7
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 claims description 6
- 230000002596 correlated effect Effects 0.000 claims description 6
- 238000002790 cross-validation Methods 0.000 claims description 6
- 239000003814 drug Substances 0.000 claims description 6
- 238000013507 mapping Methods 0.000 claims description 6
- 238000010200 validation analysis Methods 0.000 claims description 6
- 230000008859 change Effects 0.000 abstract description 6
- WHXSMMKQMYFTQS-UHFFFAOYSA-N Lithium Chemical compound [Li] WHXSMMKQMYFTQS-UHFFFAOYSA-N 0.000 abstract description 3
- 229910052744 lithium Inorganic materials 0.000 abstract description 3
- 238000004513 sizing Methods 0.000 abstract description 2
- 238000005516 engineering process Methods 0.000 description 9
- 230000004044 response Effects 0.000 description 5
- 230000004927 fusion Effects 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 230000005856 abnormality Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 238000011156 evaluation Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000000875 corresponding effect Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000004537 pulping Methods 0.000 description 1
- 238000003908 quality control method Methods 0.000 description 1
- 230000004043 responsiveness Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
A real-time consumption monitoring method and system for a finished product slurry tank belong to the technical field of lithium battery slurry mixing, and solve the problem of how to accurately monitor the real-time consumption of the finished product slurry tank; according to the invention, an LSTM-KF algorithm slurry consumption prediction model is constructed; collecting the consumption of a slurry tank and the blanking speed data of a sensor in the current slurry mixing process, and processing the collected data; an LSTM model for predicting average blanking speed and predicting instantaneous blanking speed by taking the minimized root mean square error as a loss function; testing the time sequence data classification effect and the model fitting condition by adopting test set data; continuously predicting the real-time consumption of the finished slurry tank by adopting a trained LSTM-KF algorithm; compared with the method relying on a preset single model, repeated modeling aiming at different process conditions can be reduced, and the dynamic change of the sizing process can be responded quickly by establishing a regular LSTM prediction model, so that the real-time performance of tracking is improved; and accurately and reliably evaluating the quality of the combined pulp.
Description
Technical Field
The invention belongs to the technical field of lithium battery slurry mixing, and relates to a real-time consumption monitoring method and system for a finished product slurry tank.
Background
In the lithium battery slurry mixing procedure, the precision of each component of the slurry mixing line directly influences the quality of the final slurry. The complex dynamic correlation and interaction exist among the data of the actual usage of the finished pulp tank, the corresponding theoretical usage prediction, the sensor output and the blanking speed in the pulp mixing process. Traditional tracking mainly relies on experience of operators, and auxiliary adjustment is performed by manually counting difference between the two, but accuracy is difficult to ensure, and tracking is not timely enough. Although the on-line measuring equipment such as an automatic flowmeter is applied, the tracking effect on dynamic changes is still poor.
In recent years, data-driven prediction methods have been preliminarily applied, such as time-series neural networks, to model rules. However, the single-model method has limited generalization and is difficult to adapt to different slurry mixing processes. Some state estimation algorithms such as kalman filtering may also be used for data fusion, but the dynamic response to blanking speed is slower. There are a number of deficiencies in current tracking technology. The traditional tracking mechanism depending on the rule of thumb is difficult to respond to the dynamic change of the process in real time; the precision of the existing automatic measurement equipment is limited, and the process of multi-variable complex coupling is difficult to accurately reflect; the prediction technology only depends on a single data driving model, so that the problem of poor generalization exists, and the method is difficult to adapt to different process conditions. In addition, the blanking speed of the independent state estimation algorithm for dynamic response is low, and stable and accurate tracking cannot be achieved. More seriously, the prior art has weak recognition capability on abnormal conditions generally, and effective early warning cannot be carried out.
In conclusion, the accuracy and the stability are difficult to consider in the existing tracking technology, the consideration of the mutual influence among multiple variables is insufficient, the model is repeatedly debugged according to different process requirements, and the reusability is poor. Therefore, a new tracking method needs to be developed, so that the real-time consumption of the finished slurry tank can be accurately monitored, and the accuracy of the slurry mixing formula is ensured.
Disclosure of Invention
The invention aims to solve the technical problem of accurately monitoring the real-time consumption of a finished pulp tank.
The invention solves the technical problems through the following technical scheme:
a real-time dosage monitoring method for a finished product slurry tank comprises the following steps:
step 1, constructing a slurry consumption prediction model based on an LSTM-KF algorithm;
step 2, collecting the consumption of a slurry tank and the blanking speed data of a sensor in the current slurry mixing process, and processing the collected data;
step 3, training, verifying and checking an LSTM-KF algorithm;
and 4, continuously predicting the real-time consumption of the finished slurry tank by adopting a trained LSTM-KF algorithm.
Further, the method for constructing the slurry usage prediction model based on the LSTM-KF algorithm in the step 1 is as follows:
(1) Establishing a transfer process matrix based on a KF algorithm, modeling errors in measurement information of a target by using Gaussian noise, obtaining a Kalman gain by predicting a state noise covariance matrix and measuring the noise covariance matrix, and combining a state prediction vector obtained after transfer with a state vector obtained by a sensor by using the Kalman gain to obtain a state vector and a state estimation noise covariance matrix of a filter;
(2) Establishing an LSTM model, filtering information to be discarded by adopting a forgetting gate, determining new information in the state of a storage unit by an input gate, and determining the output of a current unit by an output gate; after the forward propagation process is finished, updating parameters of the LSTM through backward propagation, repeating the process until the model converges, and enabling the LSTM to achieve the balance between the previous moment input and the new moment input by using a forgetting gate and a mechanism of an input gate and an output gate, so as to establish a mapping relation between data.
Further, the formula of the transfer process matrix is as follows:
X k|k-1 =FX k-1 +w
P k|k-1 =FP k-1 F T +Q
wherein w is disturbance noise, X k|k-1 For state prediction vector, P k|k-1 X is the prediction state noise covariance matrix k-1 Filtering the output state vector for time k-1, P k-1 A covariance matrix is estimated for the state of the filtering output at the moment k-1; f is a transfer matrix, F T The matrix is transposed to the transfer matrix, and Q is a disturbance noise covariance matrix at a constant speed;
let disturbance noise obey 0 as mean value, variance is q Gaussian noise, disturbance noise covariance matrix under uniform velocity, the formula is as follows:
the state transition mode of the target is described by a transition matrix F, and the formula is as follows:
wherein Δt is the measurement interval.
Further, the process of obtaining the state vector and the state estimation noise covariance matrix of the filter by combining the state prediction vector obtained after transfer with the state vector obtained by the sensor by using the Kalman gain is specifically as follows:
The formula of the measurement noise covariance matrix is as follows:
wherein sigma c 2 Variance of the amount of noise, sigma v 2 Measuring the variance of noise for the blanking speed;
by predicting the state noise covariance matrix P k|k-1 And measuring the noise covariance matrix R to obtain Kalman gain as follows:
K=P k|k-1 H T (HP k|k-1 H T +R) -1
wherein the observation matrix is:
using Kalman gain K k The state prediction vector X obtained after transition k|k-1 State vector Z= [ c ] obtained by the sensor k ,v k ]Combining, the state vector and the state estimation noise covariance matrix of the obtained filter are as follows:
X k =X k|k-1 +K k (Z k -HX k|k-1 )
P k =(I-K k H)X k|k-1
wherein X is k And P k As input for the next moment, the dose value is continuously predicted.
Further, the method for filtering the information to be discarded by adopting the forgetting door is as follows:
input x at the current time t And the output h of the last time t-1 The output after forgetting the gate is:
F t =sigmod(W f [h t-1 ,x t ]+b f )
wherein W is f And b f Weight and bias for forget gates;
the method for determining the new information in the state of the storage unit by the input gate comprises the following steps:
output vector i by updating the partial decision value of sigmod t Creating a new candidate value C through the tan h part t Adding to the state, the current state is:
i t =sigmoid(W i [h t-1 ,x t ]+b i )
wherein W is i And b i To input the weight and bias of the gate, W n And b n Weights and biases for the tanh portion;
the method for determining the output of the current unit by the output gate is as follows:
output h of last moment t-1 And x t After processing, output o t And state C at the current time t The final output is obtained by partial multiplication of tanh:
h t =o t tanh(C t )
o t =sigmoid(W o [h t-1 ,x t ]+b 0 )
wherein W is o And b o Is the weight and bias of the input gate.
Further, the process of collecting the consumption of the slurry tank and the sensor blanking speed data in the current slurry mixing process in the step 2 is as follows: the time sequence length of the collected dosage is N, let L i ={c r,k K=1, 2., where, N } is the time series data set of the ith usage in the data set, v i ={v r,k K=1, 2,..n } is the true set of feed rates, where c r,k And v r,k The actual consumption and the actual blanking speed of the sensor are respectively;
the process of processing the collected data is as follows:
from dose time series data set L using sliding window i The extraction length of the Chinese medicine is w L Data, obtained:
I={c r,k ,k=j,j+1,...,W L+j-1 }
the input amount is converted into an average blanking speed by carrying out differential treatment on the amount by using a formula:
considering that the target instantaneous discharging speed is correlated with the expected output average discharging speed in the same time sequence characteristic, when the average discharging speed is predicted, the instantaneous discharging speed is also taken as an input, and the j-th input vector of the LSTM of the average discharging speed is predicted as follows:
From a blanking speed dataset v using a sliding window i Length of extraction w L The discharging speed data is used for obtaining a j-th input vector of an LSTM model for predicting the instantaneous discharging speed, wherein the j-th input vector is as follows:
I V ={v r,k ,k=j,...,W L+j-1 }
normalizing the data to obtain normalized instantaneous blanking speed and average blanking speed time sequence, namely I' L And I' v Wherein the normalization formula is as follows:
the inputs of the constructed LSTM of the predicted average feeding speed and the LSTM of the predicted instantaneous feeding speed are respectively that j ranges from 1 to N:
I′ V,j ={v′ r,k ,k=1,...,W L }
wherein I' represents the normalized dataset, I i Representing a time series data set, I max And I min The sub-table represents the most significant of the feature sequencesSmall values.
Further, the process of training, verifying and checking the LSTM-KF algorithm described in step 3 is as follows: an LSTM model for predicting average blanking speed and predicting instantaneous blanking speed by taking the minimized root mean square error as a loss function; the learning rate uses an Adam optimizer to adjust the self-adaptive learning rate and set the current batch size at the same time; training the LSTM model by adopting training set data, and visually verifying convergence of the model through a loss function; performing five-fold cross validation by adopting validation set data to validate generalization of the model; testing the time sequence data classification effect and the model fitting condition by adopting test set data;
The formula of the loss function is as follows:
wherein L represents root mean square error calculation, N represents length of input vector, v r Indicating the input dosage blanking speed v p And the model predicted blanking speed is represented.
Further, the step of continuously predicting the real-time usage of the finished slurry tank by using the trained LSTM-KF algorithm in the step 4 is as follows:
(1) An input vector is constructed through preprocessing and is input into an LSTM model, and the LSTM model predicts the average blanking speed and the instantaneous blanking speed of the target respectively; after the prediction is completed, performing inverse normalization processing to obtain an average blanking speed predictionAnd instantaneous feed rate prediction value +.>
(2) The uniform motion model used by the KF algorithm filters the blanking speed v at the previous moment f,k-1 Calculating a dosage prediction result at the time k as an average blanking speed between the time k-1 and the time k; similarly, the KF algorithm will be k-1The instant filtering blanking speed is directly used as the instant blanking speed at the moment k;
the calculation formula of the dosage prediction result at the moment k is as follows:
(3) The LSTM-KF algorithm uses the instantaneous blanking speed predicted by LSTMAnd a corrected speed prediction v f,k-1 Obtaining a final blanking speed prediction v through a KF algorithm p,k The calculation formula is as follows:
v p,k =U(v p,k ,v f,k-1 )
(4) Predicting the consumption of the k moment by using the KF algorithm again p,k And a blanking speed v p,k Measuring quantity c at time k m,k Measuring the blanking speed v m,k Combining to obtain final dosage estimation and blanking speed estimation at the moment k, wherein the final dosage estimation and blanking speed estimation at the moment k are respectively as follows:
c f,k =U(c p,k ,c m,k )
v f,k =U(v p,k ,v m,k )
(5) And repeating the steps to realize continuous prediction of the real-time consumption of the finished slurry tank.
A real-time usage monitoring system for a finished slurry tank, comprising: the system comprises a model construction module, a data acquisition and processing module, a model training module and a model application module;
the model construction module is used for constructing a slurry consumption prediction model based on an LSTM-KF algorithm;
the data acquisition and processing module is used for acquiring the consumption of the slurry tank and the blanking speed data of the sensor in the current slurry mixing process and processing the acquired data;
the model training module is used for training, verifying and checking the LSTM-KF algorithm;
the model application module is used for continuously predicting the real-time consumption of the finished slurry tank by adopting a trained LSTM-KF algorithm.
Further, the method for constructing the slurry consumption prediction model based on the LSTM-KF algorithm in the model construction module is as follows:
(1) Establishing a transfer process matrix based on a KF algorithm, modeling errors in measurement information of a target by using Gaussian noise, obtaining a Kalman gain by predicting a state noise covariance matrix and measuring the noise covariance matrix, and combining a state prediction vector obtained after transfer with a state vector obtained by a sensor by using the Kalman gain to obtain a state vector and a state estimation noise covariance matrix of a filter;
(2) Establishing an LSTM model, filtering information to be discarded by adopting a forgetting gate, determining new information in the state of a storage unit by an input gate, and determining the output of a current unit by an output gate; after the forward propagation process is finished, updating parameters of the LSTM through backward propagation, repeating the process until the model converges, and enabling the LSTM to achieve the balance between the previous moment input and the new moment input by using a forgetting gate and a mechanism of an input gate and an output gate, so as to establish a mapping relation between data.
Further, the formula of the transfer process matrix is as follows:
X k|k-1 =FX k-1 +w
P k|k-1 =FP k-1 F T +Q
wherein w is disturbance noise, X k|k-1 For state prediction vector, P k|k-1 X is the prediction state noise covariance matrix k-1 Filtering the output state vector for time k-1, P k-1 A covariance matrix is estimated for the state of the filtering output at the moment k-1; f is a transfer matrix, F T The matrix is transposed to the transfer matrix, and Q is a disturbance noise covariance matrix at a constant speed;
let disturbance noise obey 0 as mean value, variance is q Gaussian noise, disturbance noise covariance matrix under uniform velocity, the formula is as follows:
the state transition mode of the target is described by a transition matrix F, and the formula is as follows:
wherein Δt is the measurement interval.
Further, the process of obtaining the state vector and the state estimation noise covariance matrix of the filter by combining the state prediction vector obtained after transfer with the state vector obtained by the sensor by using the Kalman gain is specifically as follows:
The formula of the measurement noise covariance matrix is as follows:
wherein sigma c 2 Variance of the amount of noise, sigma v 2 Measuring the variance of noise for the blanking speed;
by predicting the state noise covariance matrix P k|k-1 And measuring the noise covariance matrix R to obtain Kalman gain as follows:
K=P k|k-1 H T (HP k|k-1 H T +R) -1
wherein the observation matrix is:
using Kalman gain K k The state prediction vector X obtained after transition k|k-1 State vector Z= [ c ] obtained by the sensor k ,v k ]Combining, the state vector and the state estimation noise covariance matrix of the obtained filter are as follows:
X k =X k|k-1 +K k (Z k -HX k|k-1 )
P k =(I-K k H)X k|k-1
wherein X is k And P k As input for the next moment, the dose value is continuously predicted.
Further, the method for filtering the information to be discarded by adopting the forgetting door is as follows:
input x at the current time t And the output h of the last time t-1 The output after forgetting the gate is:
F t =sigmod(W f [h t-1 ,x t ]+b f )
wherein W is f And b f Weight and bias for forget gates;
the method for determining the new information in the state of the storage unit by the input gate comprises the following steps:
output vector i by updating the partial decision value of sigmod t Creating a new candidate value through the tanh partAdding to the state, the current state is:
i t =sigmoid(W i [h t-1 ,x t ]+b i )
wherein W is i And b i To input the weight and bias of the gate, W n And b n Weights and biases for the tanh portion;
the method for determining the output of the current unit by the output gate is as follows:
output h of last moment t-1 And x t After processing, output o t And state C at the current time t The final output is obtained by partial multiplication of tanh:
h t =o t tanh(C t )
o t =sigmoid(W o [h t-1 ,x t ]+b 0 )
wherein W is o And b o Is the weight and bias of the input gate.
Further, the process of collecting the consumption of the slurry tank and the sensor blanking speed data in the current slurry mixing process in the data collecting and processing module is as follows: the time sequence length of the collected dosage is N, let L i ={c r,k K=1, 2., where, N } is the time series data set of the ith usage in the data set, v i ={v r,k K=1, 2,..n } is the true set of feed rates, where c r,k And v r,k The actual consumption and the actual blanking speed of the sensor are respectively;
the process of processing the collected data is as follows:
from dose time series data set L using sliding window i The extraction length of the Chinese medicine is w L Data, obtained:
I={c r,k ,k=j,j+1,...,W L+j-1 }
the input amount is converted into an average blanking speed by carrying out differential treatment on the amount by using a formula:
considering that the target instantaneous discharging speed is correlated with the expected output average discharging speed in the same time sequence characteristic, when the average discharging speed is predicted, the instantaneous discharging speed is also taken as an input, and the j-th input vector of the LSTM of the average discharging speed is predicted as follows:
From a blanking speed dataset v using a sliding window i Length of extraction w L The discharging speed data is used for obtaining a j-th input vector of an LSTM model for predicting the instantaneous discharging speed, wherein the j-th input vector is as follows:
I V ={v r,k ,k=j,...,W L+j-1 }
normalizing the data to obtain normalized instantaneous blanking speed and average blanking speed time sequence, namely I' L And I' v Wherein the normalization formula is as follows:
the inputs of the constructed LSTM of the predicted average feeding speed and the LSTM of the predicted instantaneous feeding speed are respectively that j ranges from 1 to N:
I′ V,j ={v′ r,k ,k=1,...,W L }
wherein I' represents the normalized dataset, I i Representing a time series data set, I max And I min The table represents the minimum value in each feature sequence.
Further, the process of training, verifying and checking the LSTM-KF algorithm in the model training module is as follows: an LSTM model for predicting average blanking speed and predicting instantaneous blanking speed by taking the minimized root mean square error as a loss function; the learning rate uses an Adam optimizer to adjust the self-adaptive learning rate and set the current batch size at the same time; training the LSTM model by adopting training set data, and visually verifying convergence of the model through a loss function; performing five-fold cross validation by adopting validation set data to validate generalization of the model; testing the time sequence data classification effect and the model fitting condition by adopting test set data;
The formula of the loss function is as follows:
wherein L represents root mean square error calculation, N represents length of input vector, v r Indicating the input dosage blanking speed v p And the model predicted blanking speed is represented.
Further, the steps of continuous prediction of the real-time usage of the finished slurry tank by using the trained LSTM-KF algorithm in the model application module are as follows:
(1) An input vector is constructed through preprocessing and is input into an LSTM model, and the LSTM model predicts the average blanking speed and the instantaneous blanking speed of the target respectively; after the prediction is completed, performing inverse normalization processing to obtain an average blanking speed predictionAnd instantaneous feed rate prediction value +.>
(2) The uniform motion model used by the KF algorithm filters the blanking speed v at the previous moment f,k-1 Calculating a dosage prediction result at the time k as an average blanking speed between the time k-1 and the time k; similarly, the KF algorithm directly uses the k-1 moment filtering blanking speed as the k moment instantaneous blanking speed;
the calculation formula of the dosage prediction result at the moment k is as follows:
(3) The LSTM-KF algorithm uses the instantaneous blanking speed predicted by LSTMAnd a corrected speed prediction v f,k-1 The method comprises the steps of, by means of a KF algorithm, Obtaining the final blanking speed prediction v p,k The calculation formula is as follows:
v p,k =U(v p,k ,v f,k-1 )
(4) Predicting the consumption of the k moment by using the KF algorithm again p,k And a blanking speed v p,k Measuring quantity c at time k m,k Measuring the blanking speed v m,k Combining to obtain final dosage estimation and blanking speed estimation at the moment k, wherein the final dosage estimation and blanking speed estimation at the moment k are respectively as follows:
c f,k =U(c p,k ,c m,k )
v f,k =U(v p,k ,v m,k )
(5) And repeating the steps to realize continuous prediction of the real-time consumption of the finished slurry tank.
A storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method for real-time usage monitoring of a finished slurry tank.
The invention has the advantages that:
according to the technical scheme, the LSTM network is trained and applied to perform mode learning on the history, so that the history can be quickly responded to change; meanwhile, the LSTM prediction output is fused with the Kalman filtering recursion estimation, so that the state estimation is more stable and accurate; compared with the method relying on a preset single model, the method has stronger adaptability, can reduce repeated modeling aiming at different process conditions, can make quick response to dynamic changes of the sizing process by establishing a regular LSTM prediction model, and improves tracking instantaneity. Compared with the prior art, the technical scheme of the invention adopts the fusion of LSTM and Kalman filtering, and can remarkably improve the precision and stability of state estimation; the modeling capability of LSTM on complex time sequence modes and a Kalman filtering recursive estimation algorithm are fully utilized, and the adaptability of the scheme to dynamic changes is enhanced. The scheme provides real-time, accurate and reliable state evaluation, and greatly improves the monitoring level of the slurry mixing quality; the scheme has moderate calculated amount, and can realize real-time on-line monitoring and control of the industrial process through parallelization. By rapidly and accurately identifying the abnormality, the scheme enhances the stability of the slurry mixing process and reduces the quality risk. In conclusion, the scheme obviously improves the controllability of slurry mixing and has important significance for guaranteeing the quality of the battery.
Drawings
FIG. 1 is a flow chart of a method for monitoring real-time usage of a finished slurry tank according to an embodiment of the present invention;
FIG. 2 is a diagram showing a slurry usage prediction model of LSTM-KF algorithm of a real-time usage monitoring method for a finished slurry tank according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described in the following in conjunction with the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The technical scheme of the invention is further described below with reference to the attached drawings and specific embodiments:
example 1
As shown in fig. 1, the real-time usage monitoring method for the finished slurry tank according to the embodiment of the invention comprises the following steps:
1. the slurry consumption prediction model based on the LSTM-KF algorithm is constructed, and comprises the following steps: KF algorithm and LSTM model, concretely as follows:
1.1 KF Algorithm
Let c k-1 For the finished product dosage at time k-1, v k-1 For the blanking speed estimation at the k-1 moment, the state vector of the filtering output at the k-1 moment is X k-1 =[c k-1 ,v k-1 ]Then P k-1 The covariance matrix is estimated for the state of the filtered output at time k-1. X is X k|k-1 =[c k ,v k ]For state prediction vector, P k|k-1 For a state prediction noise covariance matrix, the transfer process can be described as:
X k|k-1 =FX k-1 +w
P k|k-1 =FP k-1 F T +Q
where w is the disturbance noise, representing disturbances in the transfer process. And enabling the transfer noise to obey Gaussian noise with the mean value of 0 and the variance of q, and transferring a noise covariance matrix at a uniform speed, wherein the formula is as follows:
the state transition mode of the target is described by a transition matrix F, and the formula is as follows:
wherein Δt is the measurement interval.
Modeling an error in measurement information of the target by using Gaussian noise, and then measuring a noise covariance matrix as follows:
wherein: is sigma (sigma) c 2 Variance, sigma of dose noise v 2 The variance of the noise is measured for the blanking speed.
By predicting the state noise covariance matrix P k|k-1 And measuring the noise covariance matrix R to obtain Kalman gain as follows:
K=P k|k-1 H T (HP k|k-1 H T +R) -1
wherein the observation matrix is:
the KF algorithm uses the kalman gain K k The state prediction vector X obtained after transition k|k-1 State vector Z= [ c ] obtained by the sensor k ,v k ]Combining, the state vector and the state estimation noise covariance matrix of the obtained filter are as follows:
X k =X k|k-1 +K k (Z k -HX k|k-1 )
P k =(I-K k H)X k|k-1
Wherein X is k And P k As input for the next moment, the dose value is continuously predicted.
1.2, LSTM model
As shown in fig. 2, first, the forget gate filters the information that needs to be discarded. Input x at the current time t And the output h of the last time t-1 The output after forgetting the gate is:
F t =sigmod(W f [h t-1 ,x t ]+b f )
wherein W is f And b f Weight and bias for forget gates.
Next, the input gate determines new information in the memory cell state. Output vector i by updating the partial decision value of sigmod t . Creating a new candidate value through the portion of tanhAdding to the state, the current state is:
i t =sigmoid(W i [h t-1 ,x t ]+b i )
wherein W is i And b i To input the weight and bias of the gate, W n And b n Weights and biases for the tanh part.
Finally, the output gate determines the output of the current cell.Output h of last moment t-1 And x t After processing, output o t And state C at the current time t The final output is obtained by partial multiplication of tanh:
h t =o t tanh(C t )
o t =sigmoid(W o [h t-1 ,x t ]+b 0 )
wherein W is o And b o Weights and biases for the input gates;
after the forward propagation process is completed, the LSTM parameters are updated by back propagation, and the process is repeated until the model converges. LSTM uses a forget gate, input gate and output gate mechanisms to achieve the trade-off between previous time input and new time input, creating a mapping relationship between data.
2. Collecting the consumption of a slurry tank and the blanking speed data of a sensor in the current slurry mixing process, and processing the collected data
At present, the consumption is directly used as input, the expected consumption is used as a label, and the prediction of the consumption is realized. Because the amount of the training set is a limited set and the amount of the training set in the actual scene is an infinite set, the model cannot train all the amounts of the training set, and therefore, higher prediction accuracy is difficult to achieve after the scene or the coordinate system is replaced. LSTM_KF algorithm uses LSTM to respectively predict average blanking speed of target between k-1 time and k timeAnd k instant feeding speed->The current usage is further obtained by calculation.
The time sequence length of the command quantity is N, and L i ={c r,k K=1, 2., where, N } is the time series data set of the ith usage in the data set, v i ={v r,k K=1, 2,..n } is the true set of feed rates, where c r,k And v r,k The actual consumption and the actual blanking speed of the sensor are respectivelyDegree.
The specific data processing process is as follows:
first, a sliding window is used from the usage time series data set L i The extraction length of the Chinese medicine is w L Data, obtained:
I={c r,k ,k=j,j+1,...,W L+j-1 }
the input amount is further subjected to differential processing by using a formula, and the input amount is converted into an average blanking speed:
Considering that the target instantaneous discharging speed is correlated with the expected output average discharging speed in the same time sequence characteristic, when the predicted average discharging speed is obtained by taking the instantaneous discharging speed as input, one-dimensional information can be increased, and the prediction accuracy can be improved. The jth input vector of LSTM that predicts the average blanking speed is:
from a blanking speed dataset v using a sliding window i Length of extraction w L The discharging speed data can obtain the j-th input vector of the LSTM model for predicting the instantaneous discharging speed, which is:
I V ={v r,k ,k=j,...,W L+j-1 }
according to the verification, the size of the sliding window is set to 9 here.
Further, the data are normalized here to obtain normalized instantaneous and average blanking speed time sequences, i.e., I' L And I' v Wherein the normalization formula is as follows:
wherein I' represents normalizedData set, I i Representing a time series data set, I max And I min The table represents the minimum value in each feature sequence.
The inputs of the constructed LSTM of the predicted average feeding speed and the LSTM of the predicted instantaneous feeding speed are respectively that j ranges from 1 to N:
I′ V,j ={v′ r,k ,k=1,...,W L }
3. training, verifying and checking LSTM-KF algorithm
3.1, LSTM-KF algorithm flow
1) The data is subjected to characteristic analysis, prediction is realized by a method based on the average blanking speed and the instantaneous blanking speed, and the problem of poor generalization existing in the existing non-parametric model scheme is solved. The dosage data and the feed rate data are then processed to convert them to the desired characteristics of LSTM.
2) And selecting reasonable structures and loss functions, and respectively training out the LSTM for predicting the average blanking speed and the LSTM for predicting the instantaneous blanking speed through a back propagation algorithm.
3) And preprocessing the coordinate and blanking speed input data, and inputting the data into the LSTM for prediction. Output average blanking speed predictionAnd the filtering blanking speed->In combination, the resulting average feed rate prediction is used to calculate the amount c p,k The method comprises the steps of carrying out a first treatment on the surface of the Output instantaneous feed rate prediction +.>And the filtering blanking speed v f,k-1 Combining to obtain a blanking speed prediction v p,k . Finally, the amount c p,k And blanking speed prediction v p,k In combination with the measurement of the current moment c m,k And v m,k Obtaining the final estimate c f,k And a blanking speed estimation v f,k 。
3.2 model training
The model takes a minimized Root Mean Square Error (RMSE) as a loss function, and the loss function of an LSTM model for predicting an average blanking speed and predicting an instantaneous blanking speed is set as follows:
wherein L represents root mean square error calculation, N represents length of input vector, v r Indicating the input dosage blanking speed v p And the model predicted blanking speed is represented.
Adaptive learning rate adjustment is performed here for learning rate (learning rate) using Adam optimizer. While setting the current batch size (batch size).
Here according to 7:1:2 to divide training set, validation set and test set. Wherein 70% of the data LSTM model is trained to visually verify the convergent effect of the model by loss function. The generalization of the model was verified by performing five-fold cross-validation on 10% of the data. And finally, applying the obtained optimal parameters of the model to the rest 20% of test sets, and checking the time sequence classification effect and the model fitting condition.
4. Continuous prediction of real-time usage of finished slurry tank by trained LSTM-KF algorithm
First, after the existing data length can meet the LSTM requirement, an input vector is constructed through preprocessing and input into the LSTM. And respectively predicting the average blanking speed and the instantaneous blanking speed of the target by using the LSTM model. After the prediction is completed, performing inverse normalization processing on the 2 models to obtain an average blanking speed predictionAnd instantaneous feed rate prediction value +.>
Then, the uniform motion model used by the KF algorithm filters the blanking speed v at the previous moment f,k-1 And calculating the dosage prediction result at the time k as the average blanking speed between the time k-1 and the time k. The LSTM-KF algorithm uses the average blanking speed predicted by LSTM And the blanking speed estimation v at the last moment f,k-1 Calculating the consumption prediction c at the moment k through KF algorithm p,k The feeding speed of the used amount is enabled to be closer to the real feeding speed value, and therefore the prediction accuracy is improved. The amount of use at time k is predicted as:
similarly, the KF algorithm directly uses the k-1 moment filtering blanking speed as the k moment instantaneous blanking speed. The LSTM-KF algorithm uses the instantaneous blanking speed predicted by LSTMAnd a corrected speed prediction v f,k-1 Obtaining a final blanking speed prediction v through a KF algorithm p,k The accuracy of prediction can be improved. The instantaneous discharging speed of the consumption at the moment k is as follows:
v p,k =U(v p,k ,v f,k-1 )
finally, predicting the consumption of the k moment by using the KF algorithm again p,k And a blanking speed v p,k Measuring quantity c at time k m,k Measuring the blanking speed v m,k Combining to obtain final dosage estimation and blanking speed estimation at the moment k, wherein the final dosage estimation and blanking speed estimation at the moment k are respectively as follows:
c f,k =U(c p,k ,c m,k )
v f,k =U(v p,k ,v m,k )
repeating the steps to realize continuous prediction of the dosage.
Example two
A real-time usage monitoring system for a finished slurry tank, comprising: the system comprises a model construction module, a data acquisition and processing module, a model training module and a model application module;
the model construction module is used for constructing a slurry consumption prediction model based on an LSTM-KF algorithm, and the method comprises the following steps:
(1) Let c k-1 For the finished product dosage at time k-1, v k-1 For the blanking speed estimation at the k-1 moment, the state vector of the filtering output at the k-1 moment is X k-1 =[c k-1 ,v k-1 ]Then P k-1 A covariance matrix is estimated for the state of the filtering output at the moment k-1; x is X k|k-1 =[c k ,v k ]For state prediction vector, P k|k-1 For the state prediction noise covariance matrix, the transfer process is described as:
X k|k-1 =FX k-1 +w
P k|k-1 =FP k-1 F T +Q
where w is the disturbance noise, representing disturbances in the transfer process. And enabling the transfer noise to obey Gaussian noise with the mean value of 0 and the variance of q, and transferring a noise covariance matrix at a uniform speed, wherein the formula is as follows:
the state transition mode of the target is described by a transition matrix F, and the formula is as follows:
wherein Δt is the measurement interval;
modeling an error in measurement information of the target by using Gaussian noise, and then measuring a noise covariance matrix as follows:
wherein: is sigma (sigma) c 2 Variance, sigma of dose noise v 2 Measuring the variance of noise for the blanking speed;
by predicting the state noise covariance matrix P k|k-1 And measuring the noise covariance matrix R to obtain Kalman gain as follows:
K=P k|k-1 H T (HP k|k-1 H T +R) -1
wherein the observation matrix is:
the KF algorithm uses the kalman gain K k The state prediction vector X obtained after transition k|k-1 State vector Z= [ c ] obtained by the sensor k ,v k ]Combining, the state vector and the state estimation noise covariance matrix of the obtained filter are as follows:
X k =X k|k-1 +K k (Z k -HX k|k-1 )
P k =(I-K k H)X k|k-1
Wherein X is k And P k As input of the next moment, continuously predicting a dosage value;
(2) Input x at the current time t And the output h of the last time t-1 The output after forgetting the gate is:
F t =sigmod(W f [h t-1 ,x t ]+b f )
wherein W is f And b f Weight and bias for forget gates;
the input gate determines new information in the state of the memory cell, and outputs a vector i by updating a partial determination value of sigmod t Creating a new candidate value through the tanh partAdding to the state, the current state is:
i t =sigmoid(W i [h t-1 ,x t ]+b i )
wherein W is i And b i To input the weight and bias of the gate, W n And b n Weights and biases for the tanh portion;
the output gate determines the output of the current unit, the output h at the last moment t-1 And x t After processing, output o t And state C at the current time t The final output is obtained by partial multiplication of tanh:
h t =o t tanh(C t )
o t =sigmoid(W o [h t-1 ,x t ]+b 0 )
wherein W is o And b o Weights and biases for the input gates;
after the forward propagation process is finished, updating the parameters of the LSTM through backward propagation, and continuously repeating the process until the model converges; LSTM uses a forget gate, input gate and output gate mechanisms to achieve the trade-off between previous time input and new time input, creating a mapping relationship between data.
The data acquisition and processing module is used for acquiring the consumption of the slurry tank and the sensor blanking speed data in the current slurry mixing process, and the time sequence length of the acquired consumption is N, so that L i ={c r,k K=1, 2., where, N } is the time series data set of the ith usage in the data set, v i ={v r,k K=1, 2,..n } is the true set of feed rates, where c r,k And v r,k The real consumption and the real blanking speed of the sensor are respectively obtained, and the acquired data are processed;
the process of processing the collected data is as follows:
from dose time series data set L using sliding window i The extraction length of the Chinese medicine is w L Data, obtained:
I={c r,k ,k=j,j+1,...,W L+j-1 }
the input amount is converted into an average blanking speed by carrying out differential treatment on the amount by using a formula:
considering that the target instantaneous discharging speed is correlated with the expected output average discharging speed in the same time sequence characteristic, when the average discharging speed is predicted, the instantaneous discharging speed is also taken as an input, and the j-th input vector of the LSTM of the average discharging speed is predicted as follows:
from a blanking speed dataset v using a sliding window i Length of extraction w L The discharging speed data is used for obtaining a j-th input vector of an LSTM model for predicting the instantaneous discharging speed, wherein the j-th input vector is as follows:
I V ={v r,k ,k=j,...,W L+j-1 }
normalizing the data to obtain normalized instantaneous blanking speed and average blanking speed time sequence, namely I' L And I' v Wherein the normalization formula is as follows:
the inputs of the constructed LSTM of the predicted average feeding speed and the LSTM of the predicted instantaneous feeding speed are respectively that j ranges from 1 to N:
I′ V,j ={v′ r,k ,k=1,...,W L }
Wherein I' represents the normalized dataset, I i Representing a time series data set, I max And I min The table represents the minimum value in each feature sequence.
The model training module is used for predicting an LSTM model of average blanking speed and instantaneous blanking speed by taking minimized root mean square error as a loss function; the learning rate uses an Adam optimizer to adjust the self-adaptive learning rate and set the current batch size at the same time; training the LSTM model by adopting training set data, and visually verifying the convergence effect of the model through a loss function; performing five-fold cross validation by adopting validation set data to validate generalization of the model; testing the time sequence data classification effect and the model fitting condition by adopting test set data;
the formula for minimizing the root mean square error loss function is as follows:
wherein L represents root mean square error calculation, N represents length of input vector, v r Indicating the input dosage blanking speed v p And the model predicted blanking speed is represented.
The model application module is used for continuously predicting the real-time consumption of the finished slurry tank by adopting a trained LSTM-KF algorithm, and comprises the following steps:
(1) An input vector is constructed through preprocessing and is input into an LSTM model, and the LSTM model predicts the average blanking speed and the instantaneous blanking speed of the target respectively; after the prediction is completed, performing inverse normalization processing to obtain an average blanking speed prediction And instantaneous feed rate prediction value +.>
(2) The uniform motion model used by the KF algorithm filters the blanking speed v at the previous moment f,k-1 Calculating a dosage prediction result at the time k as an average blanking speed between the time k-1 and the time k; similarly, the KF algorithm directly uses the k-1 moment filtering blanking speed as the k moment instantaneous blanking speed;
the calculation formula of the dosage prediction result at the moment k is as follows:
(3) The LSTM-KF algorithm uses the instantaneous blanking speed predicted by LSTMAnd a corrected speed prediction v f,k-1 Obtaining a final blanking speed prediction v through a KF algorithm p,k The calculation formula is as follows:
v p,k =U(v p,k ,v f,k-1 )
(4) Predicting the consumption of the k moment by using the KF algorithm again p,k And a blanking speed v p,k Measuring quantity c at time k m,k Measuring the blanking speed v m,k Combining to obtain final dosage estimation and blanking speed estimation at the moment k, wherein the final dosage estimation and blanking speed estimation at the moment k are respectively as follows:
c f,k =U(c p,k ,c m,k )
v f,k =U(v p,k ,v m,k )
(5) And repeating the steps to realize continuous prediction of the real-time consumption of the finished slurry tank.
Example III
A storage medium having a computer program stored thereon, which when executed by a processor performs the steps of the method for real-time usage monitoring of a finished slurry tank of embodiment one.
The technical scheme of the invention aims at constructing a unified tracking framework integrating learning and estimation algorithms to realize real-time accurate capturing of complex dynamic processes, and aims at solving the problems of insensitive dynamic response, unstable evaluation, poor generalization applicability and the like in tracking. The history is subjected to pattern learning by training and applying an LSTM network, so that the change can be responded quickly; meanwhile, the LSTM prediction output is fused with the Kalman filtering recursion estimation, so that the state estimation is more stable and accurate. Compared with the method relying on a preset single model, the framework has stronger adaptability, can reduce repeated modeling aiming at different process conditions, and is better served for wide intelligent manufacturing application. Generally, the scheme aims to realize an intelligent, accurate and responsive tracking technology so as to adapt to the requirements of quality control of industrial processes and ensure stable output.
Compared with the prior art, the technology has the core innovation of fully combining the advantages of the LSTM prediction algorithm and the Kalman filtering estimation algorithm, and realizing a stronger tracking effect. Specifically, the technology realizes on-line modeling and prediction of a dynamic rule by constructing a unified data driving framework and applying an LSTM network learning history mode, and greatly improves the response blanking speed to change. Meanwhile, the technology carries out information fusion on the predicted output of the LSTM and the state estimation of the Kalman filtering, so that the final state estimation is more accurate and stable. The prediction and filtering are effectively combined, so that the recognition and early warning capability of the abnormality is enhanced, the technical framework has strong reusability, the model construction and adjustment processes aiming at different application scenes are simplified, and real-time online monitoring is realized. Overall, the technology obtains the accuracy and high responsiveness which are difficult to be compatible with the current tracking technology through the collaborative innovation of the algorithm
By establishing a regular LSTM prediction model, the dynamic change of the pulping process can be responded quickly, and the real-time performance of tracking is improved. Compared with the prior art, the method adopts the fusion of LSTM and Kalman filtering, and can remarkably improve the precision and stability of state estimation. The modeling capability of LSTM on complex time sequence modes and a Kalman filtering recursive estimation algorithm are fully utilized, and the adaptability of the scheme to dynamic changes is enhanced. The scheme provides real-time, accurate and reliable state evaluation, and greatly improves the monitoring level of the slurry mixing quality. The scheme has moderate calculated amount, and can realize real-time on-line monitoring and control of the industrial process through parallelization. By rapidly and accurately identifying the abnormality, the scheme enhances the stability of the slurry mixing process and reduces the quality risk. In conclusion, the scheme obviously improves the controllability of slurry mixing and has important significance for guaranteeing the quality of the battery.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (10)
1. The real-time dosage monitoring method for the finished product slurry tank is characterized by comprising the following steps of:
step 1, constructing a slurry consumption prediction model based on an LSTM-KF algorithm, wherein the method comprises the following steps:
(1) Establishing a transfer process matrix based on a KF algorithm, modeling errors in measurement information of a target by using Gaussian noise, obtaining a Kalman gain by predicting a state noise covariance matrix and measuring the noise covariance matrix, and combining a state prediction vector obtained after transfer with a state vector obtained by a sensor by using the Kalman gain to obtain a state vector and a state estimation noise covariance matrix of a filter;
(2) Establishing an LSTM model, filtering information to be discarded by adopting a forgetting gate, determining new information in the state of a storage unit by an input gate, and determining the output of a current unit by an output gate; after the forward propagation process is finished, updating parameters of the LSTM through backward propagation, repeating the process until the model converges, wherein the LSTM uses a forgetting gate, and the mechanism of an input gate and an output gate achieves the trade-off between the previous moment input and the new moment input, and establishes a mapping relation between data;
Step 2, collecting the consumption of a slurry tank and the blanking speed data of a sensor in the current slurry mixing process, and processing the collected data;
step 3, training, verifying and checking an LSTM-KF algorithm;
and 4, continuously predicting the real-time consumption of the finished slurry tank by adopting a trained LSTM-KF algorithm.
2. The method for monitoring the real-time consumption of a finished slurry tank according to claim 1, wherein the formula of the transfer process matrix is as follows:
X k|k-1 =FX k-1 +w
P k|k-1 =FP k-1 F T +Q
wherein w is disturbance noise, X k|k-1 For state prediction vector, P k|k-1 X is the prediction state noise covariance matrix k-1 Filtering the output state vector for time k-1, P k-1 A covariance matrix is estimated for the state of the filtering output at the moment k-1; f is a transfer matrix, F T The matrix is transposed to the transfer matrix, and Q is a disturbance noise covariance matrix at a constant speed;
let disturbance noise obey 0 as mean value, variance is q Gaussian noise, disturbance noise covariance matrix under uniform velocity, the formula is as follows:
the state transition mode of the target is described by a transition matrix F, and the formula is as follows:
wherein Δt is the measurement interval;
the formula of the measurement noise covariance matrix is as follows:
wherein sigma c 2 Variance of the amount of noise, sigma v 2 Measuring the variance of noise for the blanking speed;
By predicting the state noise covariance matrix P k|k-1 And measuring the noise covariance matrix R to obtain Kalman gain as follows:
K=P k|k-1 H T (HP k|k-1 H T +R) -1
wherein the observation matrix is:
using Kalman gain K k The state prediction vector X obtained after transition k|k-1 State vector Z= [ c ] obtained by the sensor k ,v k ]Combining, the state vector and the state estimation noise covariance matrix of the obtained filter are as follows:
X k =X k|k-1 +K k (Z k -HX k|k-1 )
P k =(I-K k H)X k|k-1
wherein X is k And P k As input of the next moment, continuously predicting a dosage value;
the method for filtering the information to be discarded by adopting the forgetting door comprises the following steps:
input x at the current time t And the output h of the last time t-1 The output after forgetting the gate is:
F t =sigmod(W f [h t-1 ,x t ]+b f )
wherein W is f And b f Weight and bias for forget gates;
the method for determining the new information in the state of the storage unit by the input gate comprises the following steps:
output vector i by updating the partial decision value of sigmod t Creating a new candidate value C through the tan h part t Adding to the state, the current state is:
i t =sigmoid(W i [h t-1 ,x t ]+b i )
wherein W is i And b i To input the weight and bias of the gate, W n And b n Weights and biases for the tanh portion;
the method for determining the output of the current unit by the output gate is as follows:
output h of last moment t-1 And x t After processing, output o t And state C at the current time t The final output is obtained by partial multiplication of tanh:
h t =o t tanh(C t )
o t =sigmoid(W o [h t-1 ,x t ]+b 0 )
wherein W is o And b o Is the weight and bias of the input gate.
3. The method for monitoring the real-time consumption of the finished slurry tank according to claim 1, wherein the process of collecting the consumption of the slurry tank and the sensor blanking speed data in the current slurry mixing process in the step 2 is as follows: the time sequence length of the collected dosage is N, let L i ={c r,k K=1, 2., where, N when the ith dose in the datasetInter-sequence data set, v i ={v r,k K=1, 2,..n } is the true set of feed rates, where c r,k And v r,k The actual consumption and the actual blanking speed of the sensor are respectively;
the process of processing the collected data is as follows:
from dose time series data set L using sliding window i The extraction length of the Chinese medicine is w L Data, obtained:
I={c r,k ,k=j,j+1,...,W L+j-1 }
the input amount is converted into an average blanking speed by carrying out differential treatment on the amount by using a formula:
considering that the target instantaneous discharging speed is correlated with the expected output average discharging speed in the same time sequence characteristic, when the average discharging speed is predicted, the instantaneous discharging speed is also taken as an input, and the j-th input vector of the LSTM of the average discharging speed is predicted as follows:
From a blanking speed dataset v using a sliding window i Length of extraction w L The discharging speed data is used for obtaining a j-th input vector of an LSTM model for predicting the instantaneous discharging speed, wherein the j-th input vector is as follows:
I V ={v r,k ,k=j,...,W L+j-1 }
normalizing the data to obtain normalized instantaneous blanking speed and average blanking speed time sequence, namely I' L And I' v Wherein the normalization formula is as follows:
the inputs of the constructed LSTM of the predicted average feeding speed and the LSTM of the predicted instantaneous feeding speed are respectively that j ranges from 1 to N:
I′ V,j ={v′ r,k ,k=1,...,W L }
wherein I' represents the normalized dataset, I i Representing a time series data set, I max And I min The table represents the minimum value in each feature sequence.
4. The method for monitoring real-time usage of a finished slurry tank according to claim 1, wherein the process of training, verifying and checking the LSTM-KF algorithm in step 3 is as follows: an LSTM model for predicting average blanking speed and predicting instantaneous blanking speed by taking the minimized root mean square error as a loss function; the learning rate uses an Adam optimizer to adjust the self-adaptive learning rate and set the current batch size at the same time; training the LSTM model by adopting training set data, and visually verifying convergence of the model through a loss function; performing five-fold cross validation by adopting validation set data to validate generalization of the model; testing the time sequence data classification effect and the model fitting condition by adopting test set data;
The formula of the loss function is as follows:
wherein L represents root mean square error calculation, N represents length of input vector, v r Indicating the input dosage blanking speed v p And the model predicted blanking speed is represented.
5. The method for monitoring the real-time consumption of the finished slurry tank according to claim 1, wherein the step of continuously predicting the real-time consumption of the finished slurry tank by using the trained LSTM-KF algorithm in the step 4 is as follows:
(1) An input vector is constructed through preprocessing and is input into an LSTM model, and the LSTM model predicts the average blanking speed and the instantaneous blanking speed of the target respectively; after the prediction is completed, performing inverse normalization processing to obtain an average blanking speed predictionAnd instantaneous feed rate prediction value +.>
(2) The uniform motion model used by the KF algorithm filters the blanking speed v at the previous moment f,k-1 Calculating a dosage prediction result at the time k as an average blanking speed between the time k-1 and the time k; similarly, the KF algorithm directly uses the k-1 moment filtering blanking speed as the k moment instantaneous blanking speed;
the calculation formula of the dosage prediction result at the moment k is as follows:
(3) The LSTM-KF algorithm uses the instantaneous blanking speed v predicted by LSTM r,k And a corrected speed prediction v f,k-1 Obtaining a final blanking speed prediction v through a KF algorithm p,k The calculation formula is as follows:
v p,k =U(v p,k ,v f,k-1 )
(4) Predicting the consumption of the k moment by using the KF algorithm again p,k And a blanking speed v p,k Measuring quantity c at time k m,k Measuring the blanking speed v m,k Combining to obtain final dosage estimation and blanking speed estimation at the moment k, wherein the final dosage estimation and blanking speed estimation at the moment k are respectively as follows:
c f,k =U(c p,k ,c m,k )
v f,k =U(v p,k ,v m,k )
(5) And repeating the steps to realize continuous prediction of the real-time consumption of the finished slurry tank.
6. A real-time usage monitoring system for a finished slurry tank, comprising: the system comprises a model construction module, a data acquisition and processing module, a model training module and a model application module;
the model construction module is used for constructing a slurry consumption prediction model based on an LSTM-KF algorithm, and the method comprises the following steps:
(1) Establishing a transfer process matrix based on a KF algorithm, modeling errors in measurement information of a target by using Gaussian noise, obtaining a Kalman gain by predicting a state noise covariance matrix and measuring the noise covariance matrix, and combining a state prediction vector obtained after transfer with a state vector obtained by a sensor by using the Kalman gain to obtain a state vector and a state estimation noise covariance matrix of a filter;
(2) Establishing an LSTM model, filtering information to be discarded by adopting a forgetting gate, determining new information in the state of a storage unit by an input gate, and determining the output of a current unit by an output gate; after the forward propagation process is finished, updating parameters of the LSTM through backward propagation, repeating the process until the model converges, wherein the LSTM uses a forgetting gate, and the mechanism of an input gate and an output gate achieves the trade-off between the previous moment input and the new moment input, and establishes a mapping relation between data;
the data acquisition and processing module is used for acquiring the consumption of the slurry tank and the blanking speed data of the sensor in the current slurry mixing process and processing the acquired data;
the model training module is used for training, verifying and checking the LSTM-KF algorithm;
the model application module is used for continuously predicting the real-time consumption of the finished slurry tank by adopting a trained LSTM-KF algorithm.
7. The system for real-time dosage monitoring of a finished slurry tank of claim 6 wherein the transfer process matrix is formulated as follows:
X k|k-1 =FX k-1 +w
P k|k-1 =FP k-1 F T +Q
wherein w is disturbance noise, X k|k-1 For state prediction vector, P k|k-1 X is the prediction state noise covariance matrix k-1 Filtering the output state vector for time k-1, P k-1 A covariance matrix is estimated for the state of the filtering output at the moment k-1; f is a transfer matrix, F T The matrix is transposed to the transfer matrix, and Q is a disturbance noise covariance matrix at a constant speed;
let disturbance noise obey 0 as mean value, variance is q Gaussian noise, disturbance noise covariance matrix under uniform velocity, the formula is as follows:
the state transition mode of the target is described by a transition matrix F, and the formula is as follows:
wherein Δt is the measurement interval;
the formula of the measurement noise covariance matrix is as follows:
wherein sigma c 2 Variance of the amount of noise, sigma v 2 Measuring the variance of noise for the blanking speed;
by predicting the state noise covariance matrix P k|k-1 And measuring the noise covariance matrix R to obtain Kalman gain as follows:
K=P k|k-1 H T (HP k|k-1 H T +R) -1
wherein the observation matrix is:
using Kalman gain K k The state prediction vector X obtained after transition k|k-1 State vector Z= [ c ] obtained by the sensor k ,v k ]Combining, the state vector and the state estimation noise covariance matrix of the obtained filter are as follows:
X k =X k|k-1 +K k (Z k -HX k|k-1 )
P k =(I-K k H)X k|k-1
wherein X is k And P k As input of the next moment, continuously predicting a dosage value;
the method for filtering the information to be discarded by adopting the forgetting door comprises the following steps:
input x at the current time t And the output h of the last time t-1 The output after forgetting the gate is:
F t =sigmod(W f [h t-1 ,x t ]+b f )
Wherein W is f And b f Weight and bias for forget gates;
the method for determining the new information in the state of the storage unit by the input gate comprises the following steps:
output vector i by updating the partial decision value of sigmod t Creating a new candidate value C through the tan h part t Adding to the state, the current state is:
i t =sigmoid(W i [h t-1 ,x t ]+b i )
wherein W is i And b i To input the weight and bias of the gate, W n And b n Weights and biases for the tanh portion;
the method for determining the output of the current unit by the output gate is as follows:
output h of last moment t-1 And x t After processing, output o t And state C at the current time t The final output is obtained by partial multiplication of tanh:
h t =o t tanh(C t )
o t =sigmoid(W o [h t-1 ,x t ]+b 0 )
wherein W is o And b o Is the weight and bias of the input gate.
8. The system for monitoring real-time usage of a finished product slurry tank according to claim 6, wherein the process of collecting the slurry tank usage and the sensor blanking speed data in the current slurry mixing process in the data collecting and processing module is as follows: the time sequence length of the collected dosage is N, let L i ={c r,k K=1, 2., where, N } is the time series data set of the ith usage in the data set, v i ={v r,k K=1, 2,..n } is the true set of feed rates, where c r,k And v r,k The actual consumption and the actual blanking speed of the sensor are respectively;
The process of processing the collected data is as follows:
from dose time series data set L using sliding window i The extraction length of the Chinese medicine is w L Data, obtained:
I={c r,k ,k=j,j+1,...,W L+j-1 }
the input amount is converted into an average blanking speed by carrying out differential treatment on the amount by using a formula:
considering that the target instantaneous discharging speed is correlated with the expected output average discharging speed in the same time sequence characteristic, when the average discharging speed is predicted, the instantaneous discharging speed is also taken as an input, and the j-th input vector of the LSTM of the average discharging speed is predicted as follows:
from a blanking speed dataset v using a sliding window i Length of extraction w L The discharging speed data is used for obtaining a j-th input vector of an LSTM model for predicting the instantaneous discharging speed, wherein the j-th input vector is as follows:
I V ={v r,k ,k=j,...,W L+j-1 }
normalizing the data to obtain normalized instantaneous blanking speed and average blanking speed time sequence, namely I' L And I' v Wherein the normalization formula is as follows:
the inputs of the constructed LSTM of the predicted average feeding speed and the LSTM of the predicted instantaneous feeding speed are respectively that j ranges from 1 to N:
I′ V,j ={v′ r,k ,k=1,...,W L }
wherein I' represents the normalized dataset, I i Representing a time series data set, I max And I min The table represents the minimum value in each feature sequence.
9. The system for real-time usage monitoring of a finished product slurry tank according to claim 6, wherein the process of training, verifying and checking the LSTM-KF algorithm in the model training module is as follows: an LSTM model for predicting average blanking speed and predicting instantaneous blanking speed by taking the minimized root mean square error as a loss function; the learning rate uses an Adam optimizer to adjust the self-adaptive learning rate and set the current batch size at the same time; training the LSTM model by adopting training set data, and visually verifying convergence of the model through a loss function; performing five-fold cross validation by adopting validation set data to validate generalization of the model; testing the time sequence data classification effect and the model fitting condition by adopting test set data;
the formula of the loss function is as follows:
wherein L represents root mean square error calculation, N represents length of input vector, v r Indicating the input dosage blanking speed v p And the model predicted blanking speed is represented.
10. The real-time usage monitoring system of a finished product slurry tank according to claim 6, wherein the step of continuously predicting the real-time usage of the finished product slurry tank by using a trained LSTM-KF algorithm in the model application module comprises the steps of:
(1) An input vector is constructed through preprocessing and is input into an LSTM model, and the LSTM model predicts the average blanking speed and the instantaneous blanking speed of the target respectively; after the prediction is completed, performing inverse normalization processing to obtain an average blanking speed predictionAnd instantaneous feed rate prediction value +.>
(2) The uniform motion model used by the KF algorithm filters the blanking speed v at the previous moment f,k-1 Calculating a dosage prediction result at the time k as an average blanking speed between the time k-1 and the time k; similarly, the KF algorithm directly uses the k-1 moment filtering blanking speed as the k moment instantaneous blanking speed;
the calculation formula of the dosage prediction result at the moment k is as follows:
(3) The LSTM-KF algorithm uses the instantaneous blanking speed predicted by LSTMAnd a corrected speed prediction v f,k-1 Obtaining a final blanking speed prediction v through a KF algorithm p,k The calculation formula is as follows:
v p,k =U(v p,k ,v f,k-1 )
(4) Predicting the consumption of the k moment by using the KF algorithm again p,k And a blanking speed v p,k Measuring quantity c at time k m,k Measuring the blanking speed v m,k Combining to obtain final dosage estimation and blanking speed estimation at the moment k, wherein the final dosage estimation and blanking speed estimation at the moment k are respectively as follows:
c f,k =U(c p,k ,c m,k )
v f,k =U(v p,k ,v m,k )
(5) And repeating the steps to realize continuous prediction of the real-time consumption of the finished slurry tank.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311692864.XA CN117744476A (en) | 2023-12-05 | 2023-12-05 | Real-time dosage monitoring method and system for finished product slurry tank |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311692864.XA CN117744476A (en) | 2023-12-05 | 2023-12-05 | Real-time dosage monitoring method and system for finished product slurry tank |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117744476A true CN117744476A (en) | 2024-03-22 |
Family
ID=90278560
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311692864.XA Pending CN117744476A (en) | 2023-12-05 | 2023-12-05 | Real-time dosage monitoring method and system for finished product slurry tank |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117744476A (en) |
-
2023
- 2023-12-05 CN CN202311692864.XA patent/CN117744476A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105700518B (en) | A kind of industrial process method for diagnosing faults | |
CN111813084B (en) | Mechanical equipment fault diagnosis method based on deep learning | |
CN108090515B (en) | Data fusion-based environment grade evaluation method | |
CN117313029A (en) | Multi-sensor data fusion method based on Kalman filtering parameter extraction and state updating | |
CN113468720B (en) | Service life prediction method for digital-analog linked random degradation equipment | |
CN114015825A (en) | Method for monitoring abnormal state of blast furnace heat load based on attention mechanism | |
CN112163624A (en) | Data abnormity judgment method and system based on deep learning and extreme value theory | |
CN116029604B (en) | Cage-raised meat duck breeding environment regulation and control method based on health comfort level | |
CN107808209B (en) | Wind power plant abnormal data identification method based on weighted kNN distance | |
CN115719294A (en) | Indoor pedestrian flow evacuation control method and system, electronic device and medium | |
CN105654053B (en) | Based on the dynamic oscillation signal parameter discrimination method for improving constraint EKF algorithm | |
CN110298409A (en) | Multi-source data fusion method towards electric power wearable device | |
CN114065335A (en) | Building energy consumption prediction method based on multi-scale convolution cyclic neural network | |
CN113536671A (en) | Lithium battery life prediction method based on LSTM | |
CN117555303A (en) | Real-time control method for dosing pump of sewage treatment plant station based on machine learning | |
CN117744476A (en) | Real-time dosage monitoring method and system for finished product slurry tank | |
CN116880201A (en) | Water network channel state control system based on fuzzy neural network | |
CN108446506B (en) | Uncertain system modeling method based on interval feedback neural network | |
CN116415505A (en) | System fault diagnosis and state prediction method based on SBR-DBN model | |
CN113222268B (en) | Multi-mode reasoning-based tobacco baking quality prediction model establishment method | |
CN115985411A (en) | Soft measurement method for polymer melt index based on Gaussian process regression model | |
CN116128361A (en) | Multistage efficiency calculation method, device, equipment and medium for intelligent reconnaissance system | |
CN115982555A (en) | Sedimentation prediction method based on fuzzy information granulation and dynamic neural network | |
CN113111588B (en) | NO of gas turbine X Emission concentration prediction method and device | |
CN109493065A (en) | A kind of fraudulent trading detection method of Behavior-based control incremental update |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |