Summary of the invention
Purpose of the present invention is exactly the weak point at existing batch process optimisation technique, a kind of batch-to-batch optimization method of batch process in conjunction with the correction strategy in mid-term is proposed, utilizing batch-to-batch optimization to obtain on the basis of current optimal control policy, utilize current batch of information that is obtained, adopt the correction strategy in mid-term, control strategy to the back is revised, thereby can handle current batch process interference, has improved control performance.
Technical scheme of the present invention is by means such as data acquisition, data-driven, process optimizations, at first, last product quality is predicted according to the control operation variable of process based on the quality variable forecast model of process database foundation based on non-linear partial least square (NLPLS).Based on this model, calculate optimal control policy and on actual device, implement.In order to solve model and object mismatch and to have the problem of unknown disturbance, adopt recursive algorithm, after each batch end, former NLPLS model is upgraded according to the data and the old model parameter that newly obtain.Then, find the solution optimal control policy and on object, implementing again.Usually through several batches, control strategy will converge to a satisfactory solution.Simultaneously, adopt the correction strategy in mid-term, utilize current batch of fresh information that is obtained that the control strategy of back is revised, thereby improved control performance for the interference in handling batch.
The concrete steps of the inventive method are:
Step (1) is set up based on non-linear partial least square (NLPLS) quality variable forecast model based on process database, and concrete grammar is:
A. by data collector gatherer process service data, with the process operation data of the gathering sample set as data-driven, as input, the end product quality variable is used to set up NLPLS quality variable forecast model as output with the control operation variable; The data of each batch are to being expressed as { x (k) } and { y (k) }, and x (k) represents k batch of control operation variable data, y (k) expression k batch products quality variable data; To import data constitutes input matrix X, output data is constituted output matrix Y;
B. set up NLPLS quality variable forecast model based on inputoutput data, method is:
Matrix X and Y are carried out normalized, and making it average is 0, and variance is 1; Then input matrix is listed as expansion, the expansion item is 1 column vector 1 entirely for the latent node output matrix G of radial basis function (RBF) neural network and element, the output g of the corresponding input vector effect of each row latent node down of G wherein, the bias term coefficient that conceals node is 1; Following augmentation input matrix and output matrix are carried out partial least square (PLS) recurrence:
The NLPLS quality variable forecast model that obtains is expressed as for [1 X G], Y}:
In the formula (1), X
EExpression augmentation input matrix, A and H are respectively the weights matrix of coefficients of corresponding original input vector and the latent node output vector of corresponding RBF network, and b is the output offset vector, and T represents transposition.
Unknown parameter in the NLPLS quality variable forecast model is latent node center vector c, respective width vector σ, weights coefficient matrices A and H, model bias vector b, and these parameters are determined as follows:
1. with the k-means clustering algorithm input data are carried out cluster, obtain latent node center c; This algorithm can be determined optimum cluster centre number, simultaneously cluster centre reasonably is distributed in the data space.
2. adopt p neighbour rule to calculate latent node width:
Wherein N is the number of latent node center, c
iBe p nearest latent node center of j latent node center of distance.
3. adopt PLS to return and determine weights coefficient matrices A, H and bias vector b:
Calculate latent node output matrix G according to latent node center that obtains and width, then input matrix is expanded, obtain augmentation input matrix [1 X G].To data to { [1 X G], Y} carry out PLS and return, and obtain PLS model parameter matrix { T, W, P, B, Q}.In order in the model modification of back, to keep all information, extract the order that the characteristic variable number equals augmentation input matrix [1 X G], and the proper vector number a that model kept that finally is used to predict adopts cross validation method to determine, the parameter matrix that obtains is designated as { Ta, Wa, Pa, Ba, Qa} calculates PLS regression coefficient matrix β by them, thereby obtain A, H and b.
The NLPLS model note of the quality index that the process control performance variable prediction that the application of above-mentioned foundation is all is last is made model I.If constantly can obtain the quality variable measured value in the middle of some in course of reaction, can utilize them to come the Correction and Control variable, to improve control performance: measurements moment θ in each
i, set up two other NLPLS model, note is made model II and model III respectively.Moment θ in the middle of model II is used for predicting
iQuality variable, input variable comprises from reaction and beginning to moment θ
iThe measured value and the θ constantly of all process variable
iPreceding quality variable measured value.Model III is used for the pre-measured reaction quality variable when finishing, and input variable comprises all control operation variablees and begins to moment θ from reaction
iAll quality variable measured values.
Step (2) calculates initial optimal control policy according to the model I that obtains in the step (1), and concrete grammar is:
The target of batch process optimization is normally sought one group of control variable makes certain objective function minimize, and this objective function adopts following mathematical form to describe normally about the function of the reaction quality variable finish time:
Wherein, t
fBe the reaction time, u
kBe the control variable that needs are optimized, Δ u
kVariable quantity for control variable is defined as: Δ u
k=u
k-u
K-1, y
SpBe the setting value of end product quality variable,
Be the predicted value of building soft-sensing model to the end product quality variable, soft-sensing model is with u
kInput as model.Q
1And Q
2Be the diagonal angle weighting matrix.Second in the following formula is in order to limit the change of control variable, too big thereby output variable can not fluctuate between former and later two batches.In order to reflect physical restriction, can introduce hard restriction: u to control variable
Min≤ u
k≤ u
MaxFormula (3) is found the solution the control variable that is optimized, concrete ripe optimization method, for example seqential quadratic programming (SQP) algorithm of adopting.
Step (3) is implemented the optimal control policy that obtains on new batch.When at θ
iWhen constantly obtaining the quality variable measured value, itself and the predicted value that is obtained by model II are compared:
If the predicated error of model II is greater than setting threshold, there is bigger variation in declarative procedure, and using original optimal control policy like this can not be less than the end product quality of optimum.At this moment, employing correction strategy in mid-term is adjusted performance variable, makes end product quality get back to desired value, and concrete grammar is: adopt the optimization method in the step (2), with model III substitution model I, recomputate θ
iOptimum control performance variable constantly applies it to current batch then.
If the predicated error of model II is smaller or equal to setting threshold, declarative procedure changes little, and model I just may provide accurately and predict the outcome, and needn't utilize model III that model is revised again.
Step (4) obtains actual end product quality variable after a batch of end.Utilize the new lot data that obtain in conjunction with original NLPLS model, adopt recursive algorithm to model I, II and III upgrade, and concrete grammar is:
If pass through in the NLPLS model that obtains after k-1 batch, the latent node center matrix of RBF network is
The corresponding center vector of each row; The respective width vector is
The width of the corresponding latent node of each element.{ W (k-1), P (k-1), B (k-1), Q (k-1) } is PLS model parameter matrix.After k batch end, obtain new input/output variable x (k) and y (k),
A. adopt with step (1) in the same method new data is carried out the data pre-service.Calculate the output vector of the latent node of former NLPLS model, be designated as g (k) for new samples x (k).
B. judge whether to increase new latent node:
If all elements of g (k) all less than setting value, then adds new latent node.New latent node center is taken as x (k), and corresponding width σ adopts the arest neighbors rule to calculate:
σ=z
c-ησ
c (4)
Wherein, z
cBe the distance of x (k) to nearest latent node center, η is overlapping parameter, and span is [0,1], σ
cBe width from the nearest latent node of x (k).Thereby obtain new latent node center matrix and width vector:
As follows to parameter matrix P (k-1) and vectorial g (k) expansion simultaneously:
In the formula, 0 is that whole elements all are 0 row vector.
If all elements of g (k) all more than or equal to setting value, does not then need to increase latent node, C
g, σ
g, P, g remain unchanged.
C. x (k) is expanded, obtain augmentation input vector: x
E(k)
T=[1x (k)
TG (k)
T].
D. with new data x
E(k) and y (k) combine with old PLS model parameter matrix, carry out PLS then and return, form is as follows:
According to 3. method of step, calculate PLS regression parameter A (k), H (k) and b (k).Preserve new model parameter
For prediction with use during model modification next time.
Model after step (5) utilization is upgraded returns step (2), obtains new optimal control policy by finding the solution formula (3).
Above step batch between constantly repeat.Usually through several batches, control strategy will converge to optimum solution, and it is optimum that end product quality will reach.
The batch-to-batch optimization method of batch process in conjunction with the correction strategy in mid-term that the present invention proposes adopts recursive algorithm, according to the data and the old model parameter that newly obtain master mould is upgraded after each batch end.Then, find the solution optimal control policy and on object, implementing again.Solve model and object mismatch and had the problem of unknown disturbance.Utilize the current batch of fresh information that is obtained the control strategy of back is revised simultaneously, the interference in having overcome batch, thus improved control performance.
Embodiment
A kind of batch-to-batch optimization method of batch process in conjunction with the correction strategy in mid-term, concrete steps are:
Step (1) is set up based on non-linear partial least square (NLPLS) quality variable forecast model based on process database, and concrete grammar is:
A. by data collector gatherer process service data, with the process operation data of the gathering sample set as data-driven, as input, the end product quality variable is used to set up NLPLS quality variable forecast model as output with the control operation variable; The data of each batch are to being expressed as { x (k) } and { y (k) }, and x (k) represents k batch of control operation variable data, y (k) expression k batch products quality variable data; To import data constitutes input matrix X, output data is constituted output matrix Y;
B. set up NLPLS quality variable forecast model based on inputoutput data, method is:
Matrix X and Y are carried out normalized, and making it average is 0, and variance is 1; Then input matrix is listed as expansion, the expansion item is 1 column vector 1 entirely for the latent node output matrix G of radial basis function (RBF) neural network and element, the output g of the corresponding input vector effect of each row latent node down of G wherein, the bias term coefficient that conceals node is 1; Following augmentation input matrix and output matrix are carried out partial least square (PLS) recurrence:
The NLPLS quality variable forecast model that obtains is expressed as for [1 X G], Y}:
In the formula (1), X
EExpression augmentation input matrix, A and H are respectively the weights matrix of coefficients of corresponding original input vector and the latent node output vector of corresponding RBF network, and b is the output offset vector, and T represents transposition.
Unknown parameter in the NLPLS quality variable forecast model is latent node center vector c, respective width vector σ, weights coefficient matrices A and H, model bias vector b, and these parameters are determined as follows:
1. with the k-means clustering algorithm input data are carried out cluster, obtain latent node center c.
2. adopt p neighbour rule to calculate latent node width:
Wherein N is the number of latent node center, c
iBe p nearest latent node center of j latent node center of distance.
3. adopt PLS to return and determine weights coefficient matrices A, H and bias vector b:
Calculate latent node output matrix G according to latent node center that obtains and width, then input matrix is expanded, obtain augmentation input matrix [1 X G].To data to { [1 X G], Y} carry out PLS and return, and obtain PLS model parameter matrix { T, W, P, B, Q} extracts the order that the characteristic variable number equals augmentation input matrix [1 X G], and the proper vector number a that model kept that finally is used to predict adopts cross validation method to determine, the parameter matrix that obtains is designated as { Ta, Wa, Pa, Ba, Qa} calculates PLS regression coefficient matrix β by them, thereby obtain A, H and b.
The NLPLS model note of the quality index that the process control performance variable prediction that the application of above-mentioned foundation is all is last is made model I.If constantly can obtain the quality variable measured value in the middle of some in course of reaction, can utilize them to come the Correction and Control variable, to improve control performance: measurements moment θ in each
i, set up two other NLPLS model, note is made model II and model III respectively.Moment θ in the middle of model II is used for predicting
iQuality variable, input variable comprises from reaction and beginning to moment θ
iThe measured value and the θ constantly of all process variable
iPreceding quality variable measured value.Model III is used for the pre-measured reaction quality variable when finishing, and input variable comprises all control operation variablees and begins to moment θ from reaction
iAll quality variable measured values.
Step (2) calculates initial optimal control policy according to the model I that obtains in the step (1), and concrete grammar is:
The target of batch process optimization is normally sought one group of control variable makes certain objective function minimize, and this objective function adopts following mathematical form to describe normally about the function of the reaction quality variable finish time:
Wherein, t
fBe the reaction time, u
kBe the control variable that needs are optimized, Δ u
kVariable quantity for control variable is defined as: Δ u
k=u
k-u
K-1, y
SpBe the setting value of end product quality variable,
Be the predicted value of building soft-sensing model to the end product quality variable, soft-sensing model is with u
kInput as model.Q
1And Q
2Be the diagonal angle weighting matrix.Second in the following formula is in order to limit the change of control variable, too big thereby output variable can not fluctuate between former and later two batches.In order to reflect physical restriction, can introduce hard restriction: u to control variable
Min≤ u
k≤ u
MaxFormula (3) is found the solution the control variable that is optimized, concrete ripe optimization method, for example seqential quadratic programming (SQP) algorithm of adopting.
Step (3) is implemented the optimal control policy that obtains on new batch.When at θ
iWhen constantly obtaining the quality variable measured value, itself and the predicted value that is obtained by model II are compared:
Correction strategy is adjusted performance variable if the predicated error of model II, adopts mid-term greater than setting threshold, makes end product quality get back to desired value, and concrete grammar is: adopt the optimization method in the step (2), with model III substitution model I, recomputate θ
iOptimum control performance variable constantly applies it to current batch then.
If the predicated error of model II is smaller or equal to setting threshold, declarative procedure changes little, and model I just may provide accurately and predict the outcome, and needn't utilize model III that model is revised again.
Step (4) obtains actual end product quality variable after a batch of end.Utilize the new lot data that obtain in conjunction with original NLPLS model, adopt recursive algorithm to model I, II and III upgrade, and concrete grammar is:
If pass through in the NLPLS model that obtains after k-1 batch, the latent node center matrix of RBF network is
The corresponding center vector of each row; The respective width vector is
The width of the corresponding latent node of each element.{ W (k-1), P (k-1), B (k-1), Q (k-1) } is PLS model parameter matrix.After k batch end, obtain new input/output variable x (k) and y (k),
A. adopt with step (1) in the same method new data is carried out the data pre-service.Calculate the output vector of the latent node of former NLPLS model, be designated as g (k) for new samples x (k).
B. judge whether to increase new latent node:
If all elements of g (k) all less than setting value, then adds new latent node.New latent node center is taken as x (k), and corresponding width σ adopts the arest neighbors rule to calculate:
σ=z
c-ησ
c (4)
Wherein, z
cBe the distance of x (k) to nearest latent node center, η is overlapping parameter, and span is [0,1], σ
cBe width from the nearest latent node of x (k).Thereby obtain new latent node center matrix and width vector:
As follows to parameter matrix P (k-1) and vectorial g (k) expansion simultaneously:
In the formula, 0 is that whole elements all are 0 row vector.
If all elements of g (k) all more than or equal to setting value, does not then need to increase latent node, C
g, σ
g, P, g remain unchanged.
C. x (k) is expanded, obtain augmentation input vector: x
E(k)
T=[1x (k)
TG (k)
T].
D. with new data x
E(k) and y (k) combine with old PLS model parameter matrix, carry out PLS then and return, form is as follows:
According to 3. method of step, calculate PLS regression parameter A (k), H (k) and b (k).Preserve new model parameter
For prediction with use during model modification next time.
Model after step (5) utilization is upgraded returns step (2), obtains new optimal control policy by finding the solution formula (3).
Above step batch between constantly repeat.Usually through several batches, control strategy will converge to optimum solution, and it is optimum that end product quality will reach.