A fermentation process soft measurement modeling method based on a time series diagram network
By combining the Graph Long Short-Term Memory (LSTM) algorithm based on temporal graph networks with Graph Convolutional Networks (GCN) and LSTM, the problem of the lack of online sensors in the fermentation process is solved, and high-accuracy prediction and precise measurement of the quality of key products in the fermentation process are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV OF TECH
- Filing Date
- 2022-05-15
- Publication Date
- 2026-06-23
Smart Images

Figure CN115482877B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of soft measurement of fermentation process, and particularly relates to a soft measurement modeling method for fermentation process based on a time series diagram network. BACKGROUND
[0002] The fermentation process is a process in which a biological participates and generates a target product under suitable fermentation conditions such as pH value, temperature and stirring, and is widely present in various industrial processes. The fermentation process has inherent strong nonlinearity and complexity of mechanism process. The theoretical modeling and process control of the fermentation process have great difficulties, especially the lack of suitable online sensors for online analysis of key product quality, such as the key product quality in a penicillin fermentation process, which can only be analyzed in an offline manner occasionally, which greatly limits the control and optimization of the fermentation process.
[0003] With the data-driven modeling method showing great advantages in industrial processes, and in order to overcome the difficulty in analyzing the key product quality, more and more people use the data-driven modeling method to estimate the key product quality from other online measurable variables. The fermentation process has strong nonlinearity between product quality and operating variables, so the data-driven modeling method based on the fermentation process is mainly divided into statistical methods, shallow machine learning methods and deep learning methods. Among them, the statistical methods mainly include principal component analysis (PCA) and partial least squares (PLS). The shallow machine learning method refers to the traditional machine learning model other than deep learning, including shallow artificial neural network (ANN), support vector machine (SVM) and Gaussian process model (GPM). Deep learning mainly includes various deep neural networks with more than three layers, such as long short-term memory (LSTM), and deep neural networks have been proved to be able to approximate any nonlinear system and are widely used in process modeling.
[0004] Recently, as a branch of deep learning, graph neural network (GNN) has shown superior performance in many fields. As a variant of traditional GNN, graph convolution network (GCN) has strong representation ability by performing convolution operation on structural data. SUMMARY
[0005] In view of the above-mentioned problems in the prior art, the purpose of this invention is to provide a soft measurement modeling method for fermentation process based on time series graph networks, which can improve the prediction effect of key product quality in fermentation process.
[0006] This invention provides the following technical solution: a soft sensor modeling method for fermentation processes based on time-series graph networks, the method comprising the following steps:
[0007] (1) Data acquisition and integration
[0008] The InPenSim simulation platform was used to obtain the penicillin fermentation process under different working conditions, and the data were divided, collected and integrated in batches of one hour.
[0009] (2) Data selection
[0010] The data is selected based on the Granger Causality Test (GC Test), redundant and useless data are removed, and a causal graph between variables is constructed.
[0011] (3) Modeling training
[0012] A Graph Long Short-Term Memory (GraphLSTM) algorithm model is constructed for a soft measurement modeling method of fermentation process based on time-series graph networks. The input of the model is the causal connection matrix between selected and retained data and variables. Then, the GraphLSTM model is used to learn and train the integrated data.
[0013] (4) Model Prediction
[0014] The trained GraphLSTM model was used to predict the product outlet concentration in the penicillin fermentation process, and the prediction results are presented.
[0015] Furthermore, the process of step (1) is as follows:
[0016] Step 1.1: Set up the InPenSim simulation process and obtain the output data of 36 variables of the simulation platform.
[0017] Step 1.2: Divide the data into training set, validation set and test set according to a ratio of 3:2:1.
[0018] Step 1.3: Due to the significant differences in data among different variables, it is necessary to standardize the data to facilitate model processing and calculation. The specific formula is shown below:
[0019]
[0020] Where X' is the standardized data, X is the unstandardized original data, μ is the mean of the data, and σ is the standard deviation of the data.
[0021] Furthermore, the process of step (2) is as follows:
[0022] Step 2.1: Selecting data variables using Granger causality testing. First, two different autoregressive models can be established to evaluate Granger causality:
[0023]
[0024]
[0025] Among them, a 1i,l (i = 1, 2) and b 11,l These are the coefficients of the autoregressive model; ε 1(t) and ε 1(2)(t) These represent the prediction errors of the complete model and the simplified model, respectively; p is the order of the autoregressive model, i.e., the time lag involved in the model; J is the total number of process variables, x j(t) (j=3,4,...,J) represents the observed value of the j-th variable at the t-th sampling time point.
[0026] Step 2.2: Make the null hypothesis H0:F X2→X1 =0 and alternative hypothesis H1:F X2→X1 >0. If the null hypothesis is rejected, the F-test implies that there is Granger causality between X2 and X1. This hypothesis can be tested using the F-statistic defined as follows:
[0027]
[0028] Where R0 and R1 are the sum of squared residuals of the two models in formula (2), N is the sample size, and p is the confidence boundary. If the statistic is greater than the critical value derived from the F distribution, the null hypothesis is rejected.
[0029] Step 2.3: Sort the variables according to the p-value of Granger causality test to complete the variable selection process.
[0030] Step 2.4: Establish causal relationships between variables based on the p-values of the Granger causality test.
[0031] Furthermore, the process of step (3) is as follows:
[0032] Step 3.1: GraphLSTM is a fermentation process effluent concentration prediction model built upon relevant algorithms. GraphLSTM is primarily based on Graph Convolutional Networks (GCN) and Long Short-Term Memory (LSTM). GCN is an algorithm that convolves data in non-Euclidean space. GCN can be represented as:
[0033]
[0034] Where H is the feature vector of the current layer, X in Let W represent the input data, W be the weight matrix, and σ(.) be the activation function. Let represent the input adjacency matrix, where Denotes the convolution kernel, D = ∑ J A ij Let A be the degree matrix of the adjacency matrix A.
[0035] For sequence modeling, the main innovation of LSTM is that it essentially acts as an accumulator of state information. t This unit is accessed, written to, and cleared by several parameterized control gates. Whenever new data is input, its information is accumulated in the unit if the input gate is activated. Furthermore, if the forget gate F... t If enabled, the previous cell state C t-1 It may be "forgotten" in the process. The latest unit output C t Whether it is propagated to the final state H t Also from output gate O t Control. The main equations of LSTM are shown below, where Representing the Hadama product:
[0036]
[0037] I t F represents the result of the input gate. t C represents the result of forgetting the door. t Represents the result of a memory unit at the current moment, O t H represents the result of the output gate. t W represents the output of the module at the current moment. hi W ci W hf W cf W hc W ho W co and B i B f B c B o These represent the trainable convolutional kernel and the trainable bias, respectively.
[0038] Step 3.2: A major drawback of LSTM in processing spatiotemporal data is that it uses fully connected layers in the input-to-state and state-to-state transitions, without encoding spatial information. To overcome this problem, a significant feature of Graph Length Short-Term Memory (GraphLSTM) is that the data X and the adjacency matrix A are input into the model together. GraphLSTM encodes the process data through the inputs of its node neighbors and past states. The formula for GraphLSTM is shown below:
[0039]
[0040] GCN(X,A) represents the graph convolution operation, and the other variables are the same as those in LSTM.
[0041] Step 3.3: Train the GraphLSTM using the training data, select hyperparameters for the GraphLSTM using the validation data, and finally obtain the trained GraphLSTM model.
[0042] Furthermore, the process of step (4) is as follows:
[0043] Step 4.1: Input the test data into the trained GraphLSTM model. Use the mean squared error (RMSE) as the evaluation metric, calculated as follows:
[0044]
[0045] in, Represents real data, y i This represents the model's output, and n represents the number of samples in the test set. Generally, the smaller the RMSE, the closer the model's predictions are to the true values, meaning the model's prediction performance is better.
[0046] The beneficial effects of this invention are mainly reflected in the following aspects: This invention proposes a soft measurement modeling method for fermentation processes based on time-series graph networks, which improves the prediction accuracy of key product quality in fermentation processes; This method utilizes graph convolutional networks and long short-term memory to extract data in both time and space dimensions, increasing the generalization ability of the model; This method can accurately measure the quality of key products in different fermentation processes. Attached Figure Description
[0047] Fig. 1 This is a diagram of the GraphLSTM layer structure of the present invention;
[0048] Fig. 2 This is a model framework diagram of the present invention;
[0049] Fig. 3 This is a comparison chart of the predicted results and the actual results of an embodiment of the present invention; Detailed Implementation
[0050] The present invention will now be further described with reference to the accompanying drawings.
[0051] Reference Figs. 1-3 A soft sensor modeling method for fermentation processes based on time-series graph networks, the method comprising the following steps:
[0052] (1) Obtain the penicillin fermentation process dataset
[0053] Step 1.1: Set up the InPenSim simulation platform, perform variable measurement once every 0.2 hours, and set up 6 different working conditions to finally obtain 6×36×1100 data points for 36 variables at 1100 time points under 6 working conditions.
[0054] Step 1.2: Divide the data into three parts according to the partitioning criteria: 3×6×1100, 2×36×1100, and 1×36×1100, which are the training set, validation set, and test set, respectively.
[0055] Step 1.3: Process each data point according to the standardized formula.
[0056] (2) Data selection for the penicillin fermentation process dataset was performed as follows:
[0057] Step 2.1: Calculate the p-value of each variable with respect to the penicillin concentration variable using the Granger causality test formula.
[0058] Step 2.2: Filter the variables based on the p-value, retaining the first 7 variables with p < 0.05: hot and cold water flow rates R. W Volume V V Volumetric weight V W CO2 concentration in exhaust gas E CO2 CO2 rise rate R CO2 O2 concentration in exhaust gas E O2 and the rate of increase of O2 R O2 .
[0059] Step 2.3: Calculate the p-values between each pair of the 7 variables. Two variables with p < 0.05 are considered to have a causal relationship, and a causal graph is constructed.
[0060] (3) Train the GraphLSTM model, as follows:
[0061] Step 3.1: Input the training set into the model to obtain the model's first prediction.
[0062] Step 3.2: Adjust the model parameters based on the difference between the predicted and output values to reduce the difference between the predicted and actual values.
[0063] Step 3.3: Input the validation set into the model and obtain the model's output results for the validation set.
[0064] Step 3.4: Based on the model's output on the validation set, reset and tune the model's hyperparameters.
[0065] Step 3.5: Repeat steps 3.1 to 3.4 until the difference between the model's predicted value and the true value is within the allowable error range.
[0066] (4) Test the model using test data, as follows:
[0067] Step 4.1: Input the training data into the trained model and LSTM to obtain the prediction values of GraphLSTM and LSTM on the test set, respectively.
[0068] Step 4.2: Calculate the RMSE between the predicted and actual values on the test set to evaluate the performance of GraphLSTM and LSTM. The evaluation results are shown in the table.
[0069] Table 1 Comparison of RMSE between GraphLSTM and LSTM
[0070]
[0071] The comparison results above show that the present invention is superior to traditional prediction models in predicting the quality of key products in the penicillin fermentation process.
[0072] This method proposes a soft sensor modeling approach for the fermentation process based on Graph Short-Term Memory (GraphLSTM) time-series graph networks. GraphLSTM takes all variables in the fermentation process as input to predict key product quality. Furthermore, GraphLSTM uses a Generative Network (GCN) structure in both the input-to-state and state-to-state transitions to build long-term dependencies based on variable relationships. Finally, a fully connected layer establishes a mapping relationship between the data and the target variables to obtain the predicted key product quality results.
[0073] The method of this invention adopts a soft measurement modeling method for fermentation process based on time-series graph networks, which improves the prediction effect of key product quality in fermentation process and has universality and versatility.
[0074] The embodiments described in this specification are merely examples of implementations of the inventive concept. The scope of protection of this invention should not be considered as limited to the specific forms stated in the embodiments. The scope of protection of this invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.
Claims
1. A soft sensor modeling method for fermentation processes based on time-series graph networks, characterized in that, The method includes the following steps: 1) Data acquisition and integration: The penicillin fermentation process under different working conditions was obtained using the simulation platform InPenSim, and the data was divided, collected and integrated in batches of one hour; the data was divided into training set, validation set and test set according to a ratio of 3:2:
1. 2) Data selection: The p-value of each variable with respect to the penicillin concentration variable was calculated according to the Granger causality test formula; the variables were screened according to the p-values, and the first 7 variables with p < 0.05 were retained; the p-values between each pair of the 7 variables were calculated, and the two variables with p < 0.05 were considered to have a causal relationship, and a causal graph was constructed. 3) Modeling training: A GraphLSTM algorithm model for soft sensing modeling of fermentation processes based on temporal graph networks is constructed. The input of the model is the causal connection matrix between selected and retained data and variables. Then, the GraphLSTM model is used to learn and train the integrated data. The GraphLSTM model is built based on Graph Convolutional Network (GCN) and Long Short-Term Memory (LSTM). The GraphLSTM uses the GCN structure in both the input-to-state and state-to-state transitions. 4) Model prediction: The trained GraphLSTM model was used to predict the product outlet concentration in the penicillin fermentation process, and the prediction results are presented.
2. The soft sensor modeling method for fermentation processes based on time-series graph networks as described in claim 1, characterized in that, The process of step 1) is as follows: Step 1.1) Set up the InPenSim simulation process and obtain the output data of the simulation platform variables; Step 1.2) Divide the output data into a training set, a validation set, and a test set; Step 1.3) Due to the significant differences in data among different feature variables, it is necessary to standardize the data to facilitate model processing and calculation. The specific formula is shown below: (1); in, The data is standardized, X is the original data without standardization, μ is the mean of the data, and σ is the standard deviation of the data.
3. The soft sensor modeling method for fermentation processes based on time-series graph networks as described in claim 2, characterized in that, The process of step 2) is as follows: Step 2.1) Use Granger causality testing to select data variables. First, establish two different autoregressive models to evaluate Granger causality: (2); Among them, a 1i,l (i = 1, 2) and b 11,l The number of the autoregressive model is 1 ≤ 1 ≤ p; ε 1(t) and ε 1(2)(t) These represent the prediction errors of the complete model and the simplified model, respectively; p is the order of the autoregressive model, i.e., the time lag involved in the model; J is the total number of process variables, x j(t) (j = 3, 4, ..., J) represents the observed value of the j-th variable at the t-th sampling time point; Step 2.2) Make the null hypothesis H0:F X2→X1 = 0 and alternative hypothesis H1:F X2→X1 > 0; If the null hypothesis is rejected, the F-test implies that there is Granger causality between X2 and X1; the F-statistic, defined as follows, is used to test this hypothesis: ; Where R0 and R1 are the sum of squared residuals of the two models in formula (2), N is the sample size, and p is the confidence boundary; if the statistic is greater than the critical value derived from the F distribution, the null hypothesis is rejected. Step 2.3) Sort the variables according to the p-value of Granger causality test to complete the variable selection process; Step 2.4) Establish causal relationships between variables based on the p-values of the Granger causality test.
4. The soft sensor modeling method for fermentation processes based on time-series graph networks as described in claim 3, characterized in that, The process of step 3) is as follows: Step 3.1) Construct a Graph Long Short-Term Memory (GraphLSTM) model based on Graph Convolutional Network (GCN) and Long Short-Term Memory (LSTM); Step 3.2) Input the data X and the adjacency matrix A into the GraphLSTM model. The GraphLSTM model encodes the process data through the input of its node neighbors and past states. Step 3.3) Train the Graph Length Short-Term Memory (GraphLSTM) model using the training data, select hyperparameters for the GraphLSTM model using the validation data, and finally obtain the trained GraphLSTM model.
5. The soft sensor modeling method for fermentation processes based on time-series graph networks as described in claim 4, characterized in that, The process of step 4) is as follows: The test data is input into the trained GraphLSTM model, and the mean squared error (RMSE) is used as the evaluation metric. The calculation formula is as follows: ; in, i Represents real data, y i This represents the model's output, and n represents the number of samples in the test set. The smaller the RMSE, the closer the model's predictions are to the true values, meaning the model's prediction performance is better.