The present invention relates to the field of biological technologies and soft measurement technologies, and specifically to a knowledge reuse-based method and system for predicting a cell concentration in a fermentation process.
In an existing fermentation process, due to the lack of biosensors or the complexity of the process, the online measurement of key variables is an important basis for improving product yields and enhancing product quality. A cell concentration in the fermentation process shows obvious multi-stage characteristics throughout the fermentation process. There are differences in the dynamic characteristics of various stages. The use of only a single soft sensor leads to reduced model generalization, and it is costly to establish models for the stages separately.
Embodiments of the present invention provide a knowledge reuse-based method and system for predicting a cell concentration in a fermentation process, to resolve the problems of weak generalization of a cell concentration soft sensor model and high costs of establishing models for fermentation stages separately in the prior art.
Embodiments of the present invention provide a knowledge reuse-based method for predicting a cell concentration in a fermentation process. The method includes:
S1: constructing a cell concentration soft sensor universal model in a fermentation process, where the fermentation process is divided into four stages in time order: a lag phase, an exponential growth phase, a stationary phase, and a decline phase, and for two stages that occur successively, it is defined that a former stage is a fermentation stage A and a latter stage is a fermentation stage B;
S2: acquiring and preprocessing process data of the fermentation stage A;
S3: determining a cell concentration soft sensor model of the fermentation stage A based on the cell concentration soft sensor universal model in combination with a process data result of the fermentation stage A after the preprocessing;
S4: acquiring process data of the fermentation stage B, and after preprocessing, designing a cell concentration online soft sensor of the fermentation stage B with the cell concentration soft sensor model of the fermentation stage A; and
S5: predicting a cell concentration of the fermentation stage B according to the cell concentration online soft sensor of the fermentation stage B, where a method for designing a cell concentration online soft sensor of the fermentation stage B in step S4 is:
S41: setting a parameter estimation of the cell concentration soft sensor model of the fermentation stage B to:
S42: calculating the gain matrix Ĥk+τ+1 of the cell concentration soft sensor model of the fermentation stage B in step S41;
S43: designing the cell concentration online soft sensor of the fermentation stage B based on a parameter estimation vector {circumflex over (θ)}k+τ+1 and the gain matrix Ĥk+τ+1 of the cell concentration soft sensor model of the fermentation stage B.
Preferably, a method for constructing a cell concentration soft sensor universal model in a fermentation process in step S1 includes:
S11: selecting a dilution ratio as an auxiliary variable based on dynamic characteristics of the fermentation process, and setting the cell concentration soft sensor model to:
y
k+τ
+a
1
y
k+τ−1
+ . . . +a
p
y
k+τ−p
=b
0
u
k
+b
1
u
k−1
+ . . . +b
q
u
k−q
+v
k+τ,
S12: performing vector transformation on the cell concentration soft sensor model, to obtain the cell concentration soft sensor universal model:
y
k+τ
=x
k+τ
T
θ+v
k+τ,
Preferably, a method for preprocessing process data of the fermentation stage A in step S2 is:
Preferably, a method for calculating the gain matrix Ĥk+τ+1 of the cell concentration soft sensor model of the fermentation stage B includes:
step 1: defining a loss function of a knowledge reuse-based soft sensor model:
J=trace{E[(θB−{circumflex over (θ)}k+τ+1)(θB−{circumflex over (θ)}k+τ+1)T]},
step 2: calculating the gain matrix Ĥk+τ+1 based on a method of minimizing the loss function:)
Ĥ
k+τ+1=(Fk+τ+1+{circumflex over (D)}k+τ+1−1)−1Xk+1TΣk+1−1,
X
k+1
T
{circumflex over (d)}
k+τ+1
=E
k+τ+1,
Fk+τ+1 is a Fisher information matrix of the soft sensor model of the fermentation stage B at the moment k+τ+1, Σk+1−1 is an inverse of a measurement noise covariance matrix of the fermentation stage B at a moment k+1, {circumflex over (D)}k+τ+1−1 is a difference covariance matrix between the fermentation stage A and the fermentation stage B at the moment k+τ+1, and {circumflex over (d)}k+τ+1 is a parameter difference between the fermentation stage A and the fermentation stage B at the moment k+τ+1.
Preferably, a method for designing the online soft sensor based on a parameter estimation vector {circumflex over (θ)}k+τ+1 and the gain matrix Ĥk+τ+1 of the cell concentration soft sensor model of the fermentation stage B includes:
step 1: initializing {circumflex over (d)}0, G0, and Q0 at an initial moment of the fermentation stage B;
step 2: solving the cell concentration online soft sensor of the fermentation stage B, specifically denoted as follows:
{circumflex over (θ)}k+τ+1={circumflex over (θ)}A+Pk+τ+1Gk+τ+1,
F
k+τ+1
=F
k+τ
+σ
k+1
−2
x
k+τ+1
x
k+τ+1
T
=Q
k+τ
+f
k+τ+1,
G
k+τ+1
=G
k+τ+σk+τ+1−2xk+τ+1(yk+τ+1−xk+τ+1T{circumflex over (θ)}A)=Gk+τ+gk+τ+1,
P
k+τ+1≤(Fk+τ+1+{circumflex over (D)}k+τ+1−1)−1,
{circumflex over (θ)}A is the parameter estimation of the fermentation stage A, {circumflex over (θ)}k+τ+1 is the parameter estimation of the fermentation stage B at the moment k+τ+1, σk+τ+1−2 is a measurement noise variance of a cell concentration of the fermentation stage B at the moment k+τ+1, xk+τ+1 is an input vector of the fermentation stage B at the moment k+τ+1, yk+τ+1 is a cell concentration of the fermentation stage B at the moment k+τ+1, and when new measurement data is acquired, Fk+τ+1 has updated data quality of the fermentation stage B, and Gk+τ+1 and Pk+τ+1 have updated a difference between the fermentation stages A and B; and step 3: before the fermentation stage B ends, when new measurement data is acquired, sequentially calculating Fk+τ+1, Gk+τ+1, and Pk+τ+1, and updating a parameter {circumflex over (θ)}k+τ+1 of the soft sensor model.
Preferably, a method for predicting a cell concentration of the fermentation stage B according to the cell concentration soft sensor of the fermentation stage B in step S5 is:
introducing the parameter estimation {circumflex over (θ)}k+τ+1 of the soft sensor into the soft sensor universal model yk+τ=xk+τTθ+vk+τ, to obtain a predicted cell concentration value ŷk+τ+1 of the fermentation stage B:
ŷ
k+τ+1
={circumflex over (x)}
k+τ+1{circumflex over (θ)}k+τ+1.
Preferably, the method of minimizing the loss function is selected from a feasible direction method, a quadratic programming method, a particle swarm algorithm, Bayesian optimization, and a random search and gradient descent method.
Preferably, a method for calculating the inverse of the noise covariance matrix is selected from a Kalman filter and an extended form thereof, statistical hypothesis testing, and regression analysis.
Preferably, a method for calculating the model parameter difference d between the fermentation stage A and the fermentation stage B is selected from a recursive least squares method, a recursive extended least squares method, a recursive maximum likelihood method, a random Newton method, Kalman estimation, a prediction error method, and a long short-term memory network.
Embodiments of the present invention further provide a knowledge reuse-based system for predicting a cell concentration in a fermentation process. The system includes:
As can be seen from the foregoing technical solutions, the application of the present invention has the following advantages:
The embodiments of the present invention provide a knowledge reuse-based method and system for predicting a cell concentration in a fermentation process. In the present invention, dynamic characteristics of a fermentation process and a detection delay of a cell concentration are taken into consideration, and at the same time a cell concentration online soft sensor of a next stage is designed by using a knowledge reuse technology and relying on a soft sensor model of a former stage in the fermentation process, to resolve the problems of weak generalization of a cell concentration soft sensor model and high costs of establishing models for fermentation stages separately, thereby improving the prediction accuracy of a cell concentration soft sensor.
To describe the technical solutions in the embodiments of the present invention or in the prior art more clearly, the accompanying drawings that need to be used in the embodiments are briefly described below. The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the present invention in any way. A person of ordinary skill in the art can obtain other accompanying drawings without creative efforts based on these accompanying drawings. Where:
To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following clearly and completely describes the technical solutions in embodiments of the present invention with reference to the accompanying drawings in embodiments of the present invention. Apparently, the described embodiments are some rather than all of the embodiments of the present invention. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
Embodiments of the present invention provide a knowledge reuse-based method for predicting a cell concentration in a fermentation process. As shown in
S101: Construct a cell concentration soft sensor universal model in a fermentation process, where the fermentation process is divided into four stages in time order: a lag phase, an exponential growth phase, a stationary phase, and a decline phase, and for two stages that occur successively, it is defined that a former stage is a fermentation stage A and a latter stage is a fermentation stage B.
S102: Acquire and preprocess process data of the fermentation stage A.
S103: Determine a cell concentration soft sensor model of the fermentation stage A based on the cell concentration soft sensor universal model in combination with a process data result of the fermentation stage A after the preprocessing.
S104: Acquire process data of the fermentation stage B, and after preprocessing, design a cell concentration online soft sensor of the fermentation stage B with the cell concentration soft sensor model of the fermentation stage A.
S105: Predict a cell concentration of the fermentation stage B according to the cell concentration online soft sensor of the fermentation stage B.
A method for designing a cell concentration online soft sensor of the fermentation stage B in step S104 is:
S1041: Set a parameter estimation of the cell concentration soft sensor model of the fermentation stage B to:
S1042: Calculate the gain matrix Ĥk+τ+1 of the cell concentration soft sensor model of the fermentation stage B in step S41.
S1043: Design the cell concentration online soft sensor of the fermentation stage B based on a parameter estimation vector {circumflex over (θ)}k+τ+1 and the gain matrix Ĥk+τ+1 of the cell concentration soft sensor model of the fermentation stage B.
The embodiments of the present invention provide a knowledge reuse-based method and system for predicting a cell concentration in a fermentation process. Based on, in the present invention, dynamic characteristics of a fermentation process and a detection delay of a cell concentration are taken into consideration, and at the same time a cell concentration online soft sensor of a next stage is designed by using a knowledge reuse technology and relying on a soft sensor model of a former stage in the fermentation process, to resolve the problems of weak generalization of a cell concentration soft sensor model and high costs of establishing models for fermentation stages separately, thereby improving the prediction accuracy of a cell concentration soft sensor.
Further, a method for constructing a cell concentration soft sensor universal model in a fermentation process in step S101 is:
S1011: Select a dilution ratio as an auxiliary variable based on dynamic characteristics of the fermentation process, and setting the cell concentration soft sensor model to:
y
k+τ
+a
1yk+τ−1+ . . . +apyk+τ−p=b0uk+b1uk−1+ . . .+bquk−q+vk+τ,
S1012: Perform vector transformation on the cell concentration soft sensor model, to obtain the cell concentration soft sensor universal model:
y
k+τ
=x
k+τ
T
θ+v
k+τ,
Further, a method for preprocessing process data of the fermentation stage in step S102 includes:
Data of a dilution ratio and a cell concentration is obtained after the process data of the fermentation stage A is processed, as shown in
Further, the delay τA, the orders pA and qA, and the parameter θA of the cell concentration soft sensor model of the fermentation stage A are determined according to the preprocessed result of the process data of the fermentation stage A based on the cell concentration soft sensor universal model in step S103, so that a predicted result of the cell concentration of the fermentation stage A may be obtained, as shown in
A method for determining the delay of the cell concentration soft sensor model of the fermentation stage A is any one of mechanism analysis, experimental study, and an approximation technique.
A method for determining the orders of the cell concentration soft sensor model of the fermentation stage A is any one of a Hankel matrix method, an AIC criterion ordering method, a BIC criterion ordering method, an FPE criterion ordering method, residual method, and F-test method.
A method for determining the parameter of the cell concentration soft sensor model of the fermentation stage A is any one of least squares estimation, maximum likelihood estimation, a prediction error method, a random approximation method, support vector regression, partial least squares, and a neural network.
Further, after the fermentation stage A is completed and the fermentation stage B has started, the process data of the fermentation stage B is acquired and preprocessed, to obtain processed data of the dilution ratio and the cell concentration, as shown in
Further, a method for designing a cell concentration soft sensor of the fermentation stage B in step S104 includes: constructing a knowledge reuse-based soft sensor of the fermentation stage B according to the data of the cell concentration soft sensor model of the fermentation stage A, as shown in
S1041: Set a parameter estimation of the cell concentration soft sensor model of the fermentation stage B to:
S104: Calculate the gain matrix ri k+T+1 of the cell concentration soft sensor model of the fermentation stage B in step S1041.
S1043: Design the cell concentration online soft sensor of the fermentation stage B based on a parameter estimation vector {circumflex over (θ)}k+τ+1 and the gain matrix Ĥk+τ+1 of the cell concentration soft sensor model of the fermentation stage B.
A method for calculating the gain matrix Ĥk+τ+1 of the cell concentration soft sensor model of the fermentation stage B in step S1042 includes:
step 1: defining a loss function of a knowledge reuse-based soft sensor model:
J=trace{E[(θB−{circumflex over (θ)}k+τ+1)(θB−{circumflex over (θ)}k+τ+1)T]},
step 2: calculating the gain matrix Ĥk+τ+1 based on a method of minimizing
Ĥ
k+τ+1=(Fk+τ+1+{circumflex over (D)}k+τ+1)−1Xk+1TΣk+1−1,
where Fk+τ+1=Xk+1TΣk+τ+1−1Xk+1, {circumflex over (D)}k+τ+1−1={circumflex over (d)}k+τ+1{circumflex over (d)}k+τ+1T,
Xk+1T{circumflex over (d)}k+τ+1=Ek+τ+1,
Fk+τ+1 is a Fisher information matrix of the soft sensor model of the fermentation stage B at the moment k+τ+1, Σk+1−1 is an inverse of a measurement noise covariance matrix of the fermentation stage B at a moment k+1, {circumflex over (D)}k+τ+1−1 is a difference covariance matrix between the fermentation stage A and the fermentation stage B at the moment k+τ1, and {circumflex over (d)}k+τ+1 is a parameter difference between the fermentation stage A and the fermentation stage B at the moment k+τ1.
A method for designing the cell concentration online soft sensor of the fermentation stage B based on a parameter estimation vector {circumflex over (θ)}k+τ+1 and the gain matrix Ĥk+τ+1 of the cell concentration soft sensor model of the fermentation stage B in step S1043 includes:
step 1: initializing {circumflex over (d)}0, G0, and Q0 at an initial moment of the fermentation stage B;
step 2: solving the cell concentration online soft sensor of the fermentation stage B, specifically denoted as follows:
{circumflex over (θ)}k+τ+1={circumflex over (θ)}A+Pk+τ+1Gk+τ+1,
where
Fk+τ+1=Fk+τ+σk+1−2xk+τ+1xk+τ+1T=Qk+τ+fk+τ+1,
Gk+τ+1=Gk+τ+σk+τ+1−2xk+τ+1(yk+τ+1−xk+τ+1T{circumflex over (θ)}A)=Gk+τ+gk+τ+1,
P
k+τ+1=(Fk+τ+1+{circumflex over (D)}k+τ+1−1)−1,
{circumflex over (θ)}A is the parameter estimation of the fermentation stage A, {circumflex over (θ)}k+τ+1 is the parameter estimation of the fermentation stage B at the moment k+τ1, σk+τ+1−2 is a measurement noise variance of a cell concentration of the fermentation stage B at the moment k+τ1, xk+τ+1 is an input vector of the fermentation stage B at the moment k+τ1, yk+τ+1 is a cell concentration of the fermentation stage B at the moment k+τ1, and when new measurement data is acquired, Fk+τ+1 has updated data quality of the fermentation stage B, and Gk+τ+1 and Pk+τ+1 have updated a difference between the fermentation stages A and B; and
step 3: before the fermentation stage B ends, when new measurement data is acquired, sequentially calculating Fk+τ+1 , Gk+τ+1 , and Pk+τ+1 , and updating a parameter {circumflex over (θ)}k+τ+1 of the soft sensor model.
The method of minimizing the loss function in step S1042 is any one of a feasible direction method, a quadratic programming method, a particle swarm algorithm, Bayesian optimization, and a random search and gradient descent method.
A method for calculating the inverse of the noise covariance matrix in step S1042 is any one of a Kalman filter and an extended form thereof, statistical hypothesis testing, and regression analysis.
A method for calculating the model parameter difference d between the fermentation stage A and the fermentation stage B in step S1042 is any one of a recursive least squares method, a recursive extended least squares method, a recursive maximum likelihood method, a random Newton method, Kalman estimation, a prediction error method, and a long short-term memory network.
Furthermore, the method for predicting a cell concentration of the fermentation stage B according to the cell concentration soft sensor of the fermentation stage B in step S5 is:
introducing the parameter estimation {circumflex over (θ)}k+τ+1 of the soft sensor into the soft sensor universal model yk+τ=xk+τTθ+vk+τ, to obtain a predicted cell concentration value ŷk+τ+1 of the fermentation stage B:
ŷk+τ+1=xk+τ+1T{circumflex over (θ)}k+τ+1
The performance of the online soft sensor designed above is verified below. An indicator for analyzing the performance of the soft sensor may be any one of a mean squared error, root mean squared error, a mean absolute error, a mean absolute percentage error, a mean squared error logarithm, and a median absolute error. The mean squared error (MSE) is selected as an evaluation indicator for recognition accuracy. It is defined that errors of the soft sensor model at the moments k+τ and k+τ1 are respectively MSE({circumflex over (θ)}k+τ) and MSE({circumflex over (θ)}k+τ+1).
MSE({circumflex over (θ)}k+τ+1)−MSE({circumflex over (θ)}k+τ)=trace{E[Fk+τ+qk+τ+1+{circumflex over (D)}k+τ+1−1)−2−(Fk+τ+{circumflex over (D)}k+τ+1−1)−2]}<0 is satisfied, indicating that as time elapses, an error of the value of the parameter estimation of the soft sensor model gradually decrease. The designed soft sensor has excellent performance.
The cell concentration of the fermentation stage B is predicted according to the designed online soft sensor to obtain a predicted result of the cell concentration of the fermentation stage B, as shown in
Embodiments of the present invention provide a knowledge reuse-based system for predicting a cell concentration in a fermentation process. As shown in
The system is configured to implement the knowledge reuse-based method and system for predicting a cell concentration in a fermentation process in Embodiment 1 above. To avoid redundancy, details are not described again herein.
It should be noted that, the above description only provides preferred embodiments of the present invention and the employed technical principles. It should be appreciated by those skilled in the art that the present invention is not limited to the particular embodiments described herein. Those skilled in the art may make various obvious changes, readjustments, and replacements without departing from the scope of protection of the present invention. Therefore, while the present invention is illustrated in detail in combination with the above embodiments, the present invention is not only limited to the above embodiments, and can further include more other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is defined by the scope of the appended claims.
A person skilled in the art should understand that the embodiments of the present application may be provided as a method, a system or a computer program product. Therefore, the present application may use a form of hardware only embodiments, software only embodiments, or embodiments with a combination of software and hardware. Moreover, the present application may use a form of a computer program product that is implemented on one or more computer-usable storage media (including but not limited to a disk memory, a CD-ROM, an optical memory, and the like) that include computer usable program code.
The present application is described with reference to the flowcharts and/or block diagrams of the method, the device (system), and the computer program product according to the embodiments of the present application. It should be understood that computer program instructions may be used to implement each process and/or each block in the flowcharts and/or the block diagrams and a combination of a process and/or a block in the flowcharts and/or the block diagrams. These computer program instructions may be provided for a general-purpose computer, a dedicated computer, an embedded processor, or a processor of any other programmable data processing device to generate a machine, so that the instructions executed by a computer or a processor of any other programmable data processing device generate an apparatus for implementing a specific function in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.
These computer program instructions may be stored in a computer readable memory that can instruct the computer or any other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory generate an artifact that includes an instruction apparatus. The instruction apparatus implements a specific function in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams. These computer program instructions may be loaded onto a computer or another programmable data processing device, so that a series of operations and steps are performed on the computer or the another programmable device, thereby generating computer-implemented processing. Therefore, the instructions executed on the computer or the another programmable device provide steps for implementing a specific function in one or more processes in the flowcharts and/or in one or more blocks in the block diagrams.
Obviously, the foregoing embodiments are merely examples for clear description, rather than a limitation to implementations. For a person of ordinary skill in the art, other changes or variations in different forms may also be made based on the foregoing description. All implementations cannot and do not need to be exhaustively listed herein. Obvious changes or variations that are derived there from still fall within the protection scope of the invention of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
202210885437.2 | Jul 2022 | CN | national |