Catalytic reforming process modeling method based on mixing of data and mechanism

文档序号:1818166 发布日期:2021-11-09 浏览:15次 中文

阅读说明:本技术 基于数据与机理相混合的催化重整过程建模方法 (Catalytic reforming process modeling method based on mixing of data and mechanism ) 是由 张涵羽 江爱朋 王浩坤 黄秋云 林雅媚 于 2021-05-31 设计创作,主要内容包括:本发明公开基于数据与机理相混合的催化重整过程建模方法。建立机理模型;将机理模型进行离散,得到离散模型;采用能够求解大规模NLP问题的求解器对离散模型进行动态模拟,得到实测无法获取的反应器内部参数;构建数据模型,训练时采用神经网络学习方式;最后,训练好的数据模型以催化重整过程中反应器的输入实测值和动态模拟后的机理模型输出为输入,根据其输出与催化重整过程中反应器的输出实测值相比较,若差值大于阈值,则重新优化机理模型,反之则结束,得到所需的机理模型和数据模型相结合的催化重整过程模型。该方法弥补了机理建模与数据建模各自的不足之处,提高了催化重整过程模型的通用性与适应性。(The invention discloses a method for modeling a catalytic reforming process based on mixing of data and mechanisms. Establishing a mechanism model; dispersing the mechanism model to obtain a discrete model; dynamically simulating the discrete model by adopting a solver capable of solving a large-scale NLP problem to obtain internal parameters of the reactor, which cannot be obtained in actual measurement; constructing a data model, and adopting a neural network learning mode during training; and finally, the trained data model takes the input measured value of the reactor in the catalytic reforming process and the mechanism model output after dynamic simulation as input, the output of the trained data model is compared with the output measured value of the reactor in the catalytic reforming process, if the difference value is larger than a threshold value, the mechanism model is re-optimized, otherwise, the mechanism model is finished, and the catalytic reforming process model combining the required mechanism model and the data model is obtained. The method makes up the respective defects of mechanism modeling and data modeling, and improves the universality and the adaptability of the catalytic reforming process model.)

1. A modeling method of a catalytic reforming process based on mixing of data and mechanisms is characterized by comprising the following steps:

step 1, establishing a mechanism model;

step 2, optimizing the model parameters of the mechanism model in the step 1 by adopting a parameter correction method of an interior point method according to the input measured value of the reactor in the catalytic reforming process;

step 3, dispersing the mechanism model after the optimization in the step 2 to obtain a dispersion model; dynamically simulating the discrete model by adopting a solver capable of solving a large-scale NLP problem to obtain internal parameters of the reactor, which cannot be obtained in actual measurement;

step 4, constructing a data model, wherein a neural network learning mode is adopted during training, an input measured value of the reactor in the catalytic reforming process and an output of the mechanism model after dynamic simulation are used as input, and an output measured value of the reactor in the catalytic reforming process is used as output; wherein the input measured value of the reactor in the catalytic reforming process is the content of each lumped component in the reforming feed, the content of the catalyst and the like, and the output measured value of the reactor in the catalytic reforming process is the content of the output product of the reactor and the like;

and 5, taking the input measured value of the reactor in the catalytic reforming process and the mechanism model output after dynamic simulation as input of the trained data model, comparing the output with the output measured value of the reactor in the catalytic reforming process according to the input measured value and the output measured value of the reactor in the catalytic reforming process, returning to the step 2 if the difference value is larger than a threshold value, otherwise ending the operation, and obtaining the required hybrid model combining the optimized mechanism model and the data model.

2. The method of claim 1, wherein in step (1), the reaction mass in the reforming reactor is divided into 33 lump divisions, wherein the lump divisions are mainly alkanes, cycloalkanes, aromatics, olefins, hydrogen, etc., and 39 reaction rate equations are obtained according to the reaction process, as follows:

alkane dehydrogenation reaction:

dehydrogenation reaction of cycloalkane:

and (3) carrying out hydrogenolysis reaction of aromatic hydrocarbon:

alkane hydrocracking reaction:

whereinIs jthzThe reaction rate of each reaction; y isP、YN、YARespectively the molar flow of alkane, cyclane and arene; vCIs the catalyst loading; f is the volume flow of the feed; kepjIs jthzA reaction equilibrium constant;is a reaction rate constant, and the expression is:

whereinIs a reaction frequency factor;respectively representing reaction activation energy and pressure index;is composed ofThe partial pressure of hydrogen in the reactants at the pressure index; r' is a molar gas constant; t is the reaction temperature;is a catalyst activity factor;a reforming reactor unit factor;

combining the material balance and energy balance principle to obtain a reforming reactor model equation set:

whereinMolar flow rate of 33 lumped components; r is the radius of a radial reactor bed layer; h is the reactor height; liquid hourly space velocity LHSV ═ F/VcA matrix of stoichiometric coefficients for each lumped component;is the heat vector of the reaction;is a constant pressure specific heat capacity vector;for reformingThe corresponding reaction rate vector;

due to the fact thatThe reforming reactor mechanistic model equation set can therefore be rewritten as:

whereinIs a matrix of reaction rate constants.

3. The method for modeling a catalytic reforming process based on data and mechanism mixing according to claim 2, wherein in the step (1), the basic physical property data in the reforming reactor mechanism model is as follows:

1) enthalpy

Hm=A+BT+CT2+DT3+ET4+F'T5 (8)

Wherein HmIs the enthalpy of the ideal gas at T, which is the reaction temperature; A. b, C, D, E and F' are derived coefficients;

2) entropy of the entropy

Wherein S is the entropy of the ideal gas at T; g is a derived coefficient;

3) constant pressure specific heat capacity

Wherein C ispThe heat capacity of ideal gas under constant pressure;

4) heat of reaction

The heat of reaction at temperature T is calculated as:

whereinRepresents the standard molar reaction enthalpy; alpha is a stoichiometric coefficient;represents the standard molar enthalpy of formation; cp(T) is the constant pressure specific heat capacity of each component at the temperature T;

5) calculation of reaction equilibrium constant

Since the first 15 reactions are reversible, the equilibrium constants for the above reactions at a temperature T and standard pressure of 100Kpa are:

whereinCalculated as the standard molar gibbs free energy of formation, also known as the standard molar free enthalpy, at temperature T:

whereinKnown, standard molar entropy of formationThe calculation formula of (2) is as follows:

whereinIs the standard molar entropy of the components in the standard state.

4. The method for modeling a catalytic reforming process based on a mixture of data and mechanisms according to claim 1, wherein the step (2) is specifically as follows:

the 2-1 objective function is set to:

wherein G (X) represents the relationship between the measured value of the reactor in the catalytic reforming process and the set value of the reactor in the catalytic reforming process,expressing the in-th constraint equation, and expressing the total number of the constraint equations by m';

constructing a penalty term from the objective function (15) asThe allowable error is epsilon;

2-2 initializing X and penalty function factor vkSetting the iteration number k to be 1;

2-3 solve the following unconstrained problem:

min G(X)+νkβ(X) (16)

obtaining the minimum value of X;

2-4 judging whether v is satisfiedkβ(Xk) If yes, ending the process, and obtaining the product under the current iteration timesThe X minimum value is the optimal solution; conversely, let k be k +1,c ∈ (0,1), and return to step 2-3.

5. The method of claim 1, wherein the finite element collocation method differential state variable expression in step (3) is as follows:

wherein w (z) represents the current finite element differential state variable;is shown in the iyValues at the beginning of the finite element;is a finite element iyLength of (d);is shown in the iyPoints q arranged on finite elementsyThe first derivative of (d);is a polynomial of order K that satisfies the following condition:

whereinIs the r-th in finite elementyThe location of each deployment point; q. q.sy=1,...,K,ry=1,...,K

The continuity equation of the differential equation is expressed as:

in addition, interpolation polynomial representation in Lagrange form can be adopted for the process control variables and the algebraic variables;

the algebraic variables are of the form:

the process control variables are of the form:

whereinAndrespectively represent the ithyFinite element set point qyAlgebraic and control variable values of and satisfyz represents a position in space that is,indicates the spatial position of the iy configuration point,Is a lagrange polynomial of order K.

6. A computer-readable storage medium, on which a computer program is stored which, when executed in a computer, causes the computer to carry out the method of any one of claims 1-5.

7. A computing device comprising a memory having executable code stored therein and a processor that, when executing the executable code, implements the method of any of claims 1-5.

Technical Field

The invention belongs to the technical field of automatic control, and relates to a catalytic reforming process modeling method based on data and mechanism mixing.

Background

Catalytic reforming is one of the main processing techniques in the oil refining industry, and is also one of the effective methods for solving the shortage of high-octane gasoline and aromatic hydrocarbon raw materials. Only by building a more accurate model will the catalytic reformer operate better and will the yield increase resulting in better economic benefits.

The reforming reaction process is that reforming feed is mixed with circulating hydrogen, and exchanges heat with a reforming reaction product, the mixture enters a heating furnace after the heat exchange and is heated to a certain temperature, the mixture enters a first reforming reactor for reforming reaction, the generated reforming reaction product comes out from the first reforming reactor, then enters the heating furnace and is heated to a certain reaction temperature, then enters a second reforming reactor for reforming reaction, and the reaction is sequentially circulated to a fourth reforming reactor.

In the aspect of mechanism modeling of the process flow, many mature mechanism modeling software such as Aspen Plus, Pro II, UniSim and the like exist abroad. The modeling software in foreign countries is established aiming at the actual situation of the own country, and the mechanism in the software is strictly confidential and cannot be acquired, so that some existing models are not necessarily applicable to the actual situation in China, and therefore, the establishment of the mechanism model according with the actual situation in China is necessary. The mechanism model has the advantages that internal parameters can be well obtained, the parameters are easy to adjust, the model has strong adaptability, but the difficulty is that the inside of the catalytic reforming process is too complex, and some parameters cannot be obtained, so that the accuracy of the mechanism model to be established is very difficult, and in addition, a large-scale solver is required to be adopted in the optimization solution, and the solution speed is slow.

In recent years, with the development of technologies such as machine learning, artificial intelligence and the like, many experts and scholars at home and abroad gradually use the technologies to establish a data model of a catalytic reforming process so as to overcome the defects of the traditional mechanism modeling method, the established data model can be regarded as a black box model, the model does not need to know too much about the internal structure of the mechanism process and does not need a solver, but only uses the data model, and if the future change of data exceeds a certain range, the reliability of the model is greatly reduced.

With the world energy shortage and the increasingly intense international market competition, compared with the similar enterprises in the developed countries, domestic enterprises generally have the problems of high production cost, poor economic benefit and the like. Therefore, if a relatively universal and accurate model can be established, not only can the fund be saved, but also the market competitiveness can be improved. Based on the problems of a mechanism model and a data model, the invention provides a catalytic reforming process modeling method based on the mixing of data and mechanisms.

Disclosure of Invention

The invention aims to provide a modeling method for mixing a mechanism model and a data model aiming at the respective defects of the mechanism modeling and the data modeling in the existing catalytic reforming process.

According to the invention, a relatively complete mechanism model is established according to the basic principles of reforming kinetics, thermodynamics, material balance, energy balance and the like; in order to make the mechanism model consistent with the actual production process, optimizing the model parameters by adopting a parameter correction method of an interior point method according to the input data of an actual factory; dispersing the optimized mechanism model to obtain a dispersion model; dynamically simulating the discrete model by adopting a solver capable of solving a large-scale NLP problem to obtain internal parameters of the reactor, which cannot be obtained in actual measurement; constructing a data model, and adopting a neural network learning mode during training; and finally, the trained data model takes the input measured value of the reactor in the catalytic reforming process and the mechanism model output after dynamic simulation as input, the output of the trained data model is compared with the output measured value of the reactor in the catalytic reforming process, if the difference value is larger than a threshold value, the mechanism model is re-optimized, otherwise, the mechanism model is finished, and the catalytic reforming process model combining the required mechanism model and the data model is obtained.

The method makes up the respective defects of mechanism modeling and data modeling, and improves the universality and the adaptability of the catalytic reforming process model.

A modeling method of a catalytic reforming process based on mixing of data and mechanisms mainly comprises the following steps:

step 1, establishing a mechanism model according to basic principles such as reforming kinetics, thermodynamics, material balance, energy balance and the like;

step 2, in order to make the mechanism model consistent with the actual production process, optimizing the model parameters of the mechanism model in the step 1 by adopting a parameter correction method of an interior point method according to the input measured value of the reactor in the catalytic reforming process;

step 3, dispersing the mechanism model after the optimization in the step 2 to obtain a dispersion model; dynamically simulating the discrete model by adopting a solver capable of solving a large-scale NLP problem to obtain internal parameters of the reactor, which cannot be obtained in actual measurement;

step 4, constructing a data model, wherein a neural network learning mode is adopted during training, an input measured value of the reactor in the catalytic reforming process and an output of the mechanism model after dynamic simulation are used as input, and an output measured value of the reactor in the catalytic reforming process is used as output; wherein the input measured value of the reactor in the catalytic reforming process is the content of each lumped component in the reforming feed, the content of the catalyst and the like, and the output measured value of the reactor in the catalytic reforming process is the content of the output product of the reactor and the like.

And 5, taking the input measured value of the reactor in the catalytic reforming process and the mechanism model output after dynamic simulation as input of the trained data model, comparing the output with the output measured value of the reactor in the catalytic reforming process according to the input measured value and the output measured value of the reactor in the catalytic reforming process, returning to the step 2 if the difference value is larger than a threshold value, otherwise ending the operation, and obtaining the required hybrid model combining the optimized mechanism model and the data model.

The specific implementation steps of the step 1 are as follows:

the reforming reactor is the core part of the whole reforming device, the most critical part of mechanism modeling is the modeling aiming at the reforming reactor, and a lumped method is the inevitable choice of reactor modeling. The invention divides the reaction materials into 33 lumped parts, wherein the lumped parts mainly comprise alkane, cyclane, arene, alkene, hydrogen and the like, and 39 reaction rate equations can be obtained according to the reaction process, as shown in the following:

alkane dehydrogenation reaction (reversible):

cycloalkane dehydrogenation reaction (reversible):

and (3) carrying out hydrogenolysis reaction of aromatic hydrocarbon:

alkane hydrocracking reaction:

whereinIs jthzThe reaction rate of each reaction; y isP、YN、YARespectively the molar flow of alkane, cyclane and arene; vCIs the catalyst loading; f is the volume flow of the feed; kepjIs jthzA reaction equilibrium constant;is a reaction rate constant, and the expression is:

whereinIs a reaction frequency factor;respectively representing reaction activation energy and pressure index;is composed ofThe partial pressure of hydrogen in the reactants at the pressure index; r' is a molar gas constant; t is the reaction temperature;is a catalyst activity factor;is a reforming reactor equipment factor.

The continuous reforming process adopts a common radial reactor, and the pressure drop of the material flow of the radial reactor passing through the reactor is smaller than that of the axial reactor, thereby being beneficial to reducing the pressure drop of a hydrogen system. Combining the material balance and energy balance principle to obtain a reforming reactor model equation set:

whereinMolar flow rate of 33 lumped components; r is the radius of a radial reactor bed layer; h is the reactor height; liquid hourly space velocity LHSV ═ F/VcA matrix of stoichiometric coefficients for each lumped component;is the heat vector of the reaction;is a constant pressure specific heat capacity vector;is the reaction rate vector of the reforming reaction;

due to the fact thatThe reforming reactor mechanistic model equation set can therefore be rewritten as:

whereinIs a matrix of reaction rate constants.

The reforming reactor mechanism model is shown in the following specific basic physical property data in equation set (7):

in the reforming simulation process, the acquisition of necessary physical property data is a precondition for model calculation, and the accuracy of the data has a great influence on the simulation precision. Some thermodynamic property data must be calculated from the underlying data by correlation. At reforming temperatures, all reaction components are in gaseous form and can be considered as ideal gas states, using thermodynamic consistency equations.

1) Enthalpy

Hm=A+BT+CT2+DT3+ET4+F'T5 (8)

Wherein HmIs the enthalpy of the ideal gas at T, which is the reaction temperature; A. b, C, D, E, F' are derived coefficients.

2) Entropy of the entropy

Wherein S is the entropy of the ideal gas at T; g is the derived coefficient.

3) Constant pressure specific heat capacity

Wherein C ispIs the heat capacity of ideal gas under constant pressure.

4) Heat of reaction

The heat of reaction at temperature T is calculated as:

whereinRepresents the standard molar reaction enthalpy; alpha is a stoichiometric coefficient;represents the standard molar enthalpy of formation; cp(T) is the constant pressure specific heat capacity of each component at the temperature T.

5) Calculation of reaction equilibrium constant

Since the first 15 reactions are reversible, the equilibrium constants for the above reactions at a temperature T and standard pressure of 100Kpa are:

whereinFormation of Gibbs free energy for standard molarity at temperature T, also known asStandard molar free enthalpy, calculated as:

whereinKnown, standard molar entropy of formationThe calculation formula of (2) is as follows:

whereinIs the standard molar entropy of the components in the standard state.

The specific implementation steps of the step 2 are as follows:

1) in order to make the mechanism model consistent with the actual production process, according to the input data of the actual factory, the parameter correction method of the interior point method is adopted to obtain the model parameters, a parameter vector X to be estimated is set, X is expressed as the pre-index factor of the reaction and the device performance coefficient, and the objective function can be set as:

wherein G (X) represents the relationship between the measured value of the reactor in the catalytic reforming process and the set value of the reactor in the catalytic reforming process,expressing the in-th constraint equation, and expressing the total number of the constraint equations by m';

constructing a penalty term from the objective function (15) asThe allowable error is epsilon;

2) initializing X and penalty function factor vkSetting the iteration number k to be 1;

3) the following unconstrained problem is solved:

min G(X)+νkβ(X) (16)

obtaining the minimum value of X;

4) judging whether v is satisfiedkβ(Xk) If the value is less than epsilon, ending the process, and obtaining the X minimum value under the current iteration times as the optimal solution; on the contrary, let k be k +1, vk=C"νk-1C ∈ (0,1), and return to step 3).

The specific implementation steps of the step 3 are as follows:

the equation set (7) belongs to a differential algebraic optimization proposition containing both differential equations and algebraic equations, and the fully discrete simultaneous solution technology based on finite element configuration is very suitable for solving the problems due to the unique advantages. And (3) dispersing a mechanism model equation set (7) containing a differential algebraic equation by adopting a finite element configuration method to obtain a discrete model, namely obtaining a plurality of discrete variables and equations. Dynamically simulating the discrete model by adopting a solver for solving a large-scale NLP problem to obtain internal parameters of the reactor, such as a catalyst adsorption equilibrium constant, reactor device factors and the like, which cannot be obtained in actual measurement;

preferably, the finite element configuration method has many advantages of the Runge-Kutta discretization method in which the differential state variable expression is as follows:

wherein w (z) represents the current finite element differential state variable;is shown in the iyValues at the beginning of the finite element;is a finite element iyLength of (d);is shown in the iyPoints q arranged on finite elementsyThe first derivative of (d);is a polynomial of order K that satisfies the following condition:

whereinIs the r-th in finite elementyThe location of each deployment point. q. q.sy=1,...,K,ry=1,...,K

The continuity equation of the differential equation is expressed as:

furthermore, interpolation polynomial representations in the form of lagrange may be employed for process control variables and algebraic variables.

The algebraic variables are of the form:

the process control variables are of the form:

whereinAndrespectively represent the ithyFinite element set point qyAlgebraic and control variable values of and satisfyz represents a position in space that is,indicating the spatial location of the iy-th configuration point,is a lagrange polynomial of order K.

The neural network in the step 4 comprises an input layer, a hidden layer (middle layer) and an output layer, wherein the number of neurons (a plurality of linear divisions) of the hidden layer (abstraction of multiple levels of input features) and the output layer is respectively 2-4 and 2-6.

The parameters in the neural network during training are defined as follows:

input layer Unit input vector is Pks=(a1,a2,…,an) Target vector Tks=(d1,d2,…,dn) N represents the number of input vectors of the input layer unit;

hidden layer Unit input vector Sks=(s1,s2,…,sp) Output vector Bks=(b1,b2,...,bp) P represents the number of input vectors of the hidden layer unit;

output layer Unit input vector Lks=(l1,l2,…,lq) Output vector Cks=(c1,c2,…,cq) Ks is 1,2, …, m represents the number of sample data,q represents the number of input vectors of the output layer unit;

the learning process of the neural network model comprises the following steps:

a) initializing connection weight and threshold of each layer, and giving connection weight from input layer to hidden layerConnection weight v from hidden layer to output layerjtOutput threshold value theta of each unit of hidden layerjOutput threshold y of each cell of output layertAssigning random values within the interval (-1, 1); i.e. is=1,2,…,n,j=1,2,…,p,t=1,2,…,q;

b) Selecting an input sample and an output sample;

c) calculating the output of each unit of the hidden layer and the output layer by using the input samples, the connection weights, the input threshold and the output threshold:

wherein s isjAn input value representing the hidden layer cell,As output vectors of the input layer, bjOutput value, l, representing a hidden layer elementtRepresenting input values of output layer cells, ctRepresenting an output value of an output layer unit;

d) calculating generalized error of each unit of output layerThen using the connection weight v from hidden layer to output layerjtOutput vector B of the hidden layerk=(b1,b2,...,bp) Generalized error of each unit of output layerCalculating generalized error of each unit of hidden layerThe calculation formula is as follows:

e) using generalized errors of cells of the output layerModifying the connection weight v from hidden layer to output layer according to the output value of each unit of hidden layerjtOutput threshold value yt

Also using generalized error of the cells of the hidden layerModifying the connection weight w of the input layer to the hidden layer by the input of the input layerisjOutput threshold value thetaj

vjt(N) connection weights v representing the current iterationjt,vjt(N +1) represents the connection weight of the next iteration; y ist(N) represents the output threshold of the current iteration, yt(N +1) represents the output threshold for the next iteration;

wisj(N) connection weights w representing the current iterationisj,wisj(N +1) represents the connection weight of the next iteration, θj(N) denotes the threshold, θ, for the current iterationj(N +1) represents a threshold for the next iteration, N ═ 1, 2.., NN, where NN represents a set number of learning iterations;

f) selecting the next input sample and the next output sample, and returning to the step c) until the m training samples are trained;

g) calculating the accumulated error E of all samples in the way ofWhere q represents the number of output layer units, m represents the number of samples, EtIndicating the error between samples. And if the sample accumulated error E is smaller than the preset value epsilon or the current learning iteration number is larger than the set learning iteration number, finishing the learning training. Otherwise, selecting the sample input and the target output again, and then returning to the step c);

through the learning process, the neural network model describing the internal parameters output after the plant actual data input and the dynamic simulation of the mechanism model and the plant actual output data is obtained.

Compared with the prior art, the invention has the following advantages:

the invention can obtain some reactor internal parameters which can not be actually measured, such as catalyst activity and the like, by dynamically simulating the mechanism model after dispersion, and establishes a dynamic data model by using a neural network learning mode according to the obtained dynamic internal parameters and the measured value of the reactor in the catalytic reforming process. The dynamic hybrid model with the data and mechanism mixed established in the way can solve the problem that the optimization solving speed is slow and the problem that the data model can not obtain internal parameters, and the combination of the dynamic hybrid model and the dynamic hybrid model can quickly and accurately obtain the output of the model, so that the universality and the adaptability of the catalytic reforming process model are improved.

Drawings

FIG. 1 is a flow chart of the method of the present invention.

Detailed Description

The invention is further analyzed with reference to the following figures and specific examples.

A method for modeling a catalytic reforming process based on a mixture of data and mechanisms, as shown in fig. 1, comprising the steps of:

step 1, establishing a mechanism model according to basic principles such as reforming kinetics, thermodynamics, material balance, energy balance and the like;

step 2, in order to make the mechanism model consistent with the actual production process, optimizing the model parameters of the mechanism model in the step 1 by adopting a parameter correction method of an interior point method according to the input measured value of the reactor in the catalytic reforming process;

step 3, dispersing the mechanism model after the optimization in the step 2 to obtain a dispersion model; dynamically simulating the discrete model by adopting a solver capable of solving a large-scale NLP problem to obtain internal parameters of the reactor, which cannot be obtained in actual measurement;

step 4, constructing a data model, wherein a neural network learning mode is adopted during training, an input measured value of the reactor in the catalytic reforming process and an output of the mechanism model after dynamic simulation are used as input, and an output measured value of the reactor in the catalytic reforming process is used as output; wherein the input measured value of the reactor in the catalytic reforming process is the content of each lumped component in the reforming feed, the content of the catalyst and the like, and the output measured value of the reactor in the catalytic reforming process is the content of the output product of the reactor and the like.

And 5, taking the input measured value of the reactor in the catalytic reforming process and the mechanism model output after dynamic simulation as input of the trained data model, comparing the output with the output measured value of the reactor in the catalytic reforming process according to the input measured value and the output measured value of the reactor in the catalytic reforming process, returning to the step 2 if the difference value is larger than a threshold value, otherwise ending the operation, and obtaining the required hybrid model combining the optimized mechanism model and the data model.

The specific implementation steps of the step 1 are as follows:

the reforming reactor is the core part of the whole reforming device, the most critical part of mechanism modeling is the modeling aiming at the reforming reactor, and a lumped method is the inevitable choice of reactor modeling. The invention divides the reaction materials into 33 lumped parts, wherein the lumped parts mainly comprise alkane, cyclane, arene, alkene, hydrogen and the like, and 39 reaction rate equations can be obtained according to the reaction process, as shown in the following:

alkane dehydrogenation reaction (reversible):

cycloalkane dehydrogenation reaction (reversible):

and (3) carrying out hydrogenolysis reaction of aromatic hydrocarbon:

alkane hydrocracking reaction:

whereinIs jthzThe reaction rate of each reaction; y isP、YN、YARespectively the molar flow of alkane, cyclane and arene; vCIs the catalyst loading; f is the volume flow of the feed; kepjIs jthzA reaction equilibrium constant;is a reaction rate constant, and the expression is:

whereinIs a reaction frequency factor;respectively representing reaction activation energy and pressure index;is composed ofThe partial pressure of hydrogen in the reactants at the pressure index; r' is a molar gas constant; t is the reaction temperature;is a catalyst activity factor;is a reforming reactor equipment factor.

The continuous reforming process adopts a common radial reactor, and the pressure drop of the material flow of the radial reactor passing through the reactor is smaller than that of the axial reactor, thereby being beneficial to reducing the pressure drop of a hydrogen system. Combining the material balance and energy balance principle to obtain a reforming reactor model equation set:

whereinMolar flow rate of 33 lumped components; r is the radius of a radial reactor bed layer; h is the reactor height; liquid hourly space velocity LHSV ═ F/VcA matrix of stoichiometric coefficients for each lumped component;is the heat vector of the reaction;is a constant pressure specific heat capacity vector;is the reaction rate vector of the reforming reaction;

due to the fact thatThe reforming reactor mechanistic model equation set can therefore be rewritten as:

whereinIs a matrix of reaction rate constants.

The reforming reactor mechanism model is shown in the following specific basic physical property data in equation set (7):

in the reforming simulation process, the acquisition of necessary physical property data is a precondition for model calculation, and the accuracy of the data has a great influence on the simulation precision. Some thermodynamic property data must be calculated from the underlying data by correlation. At reforming temperatures, all reaction components are in gaseous form and can be considered as ideal gas states, using thermodynamic consistency equations.

1) Enthalpy

Hm=A+BT+CT2+DT3+ET4+F'T5 (8)

Wherein HmIs the enthalpy of the ideal gas at T, which is the reaction temperature; A.b, C, D, E, F' are derived coefficients.

2) Entropy of the entropy

Wherein S is the entropy of the ideal gas at T; g is the derived coefficient.

3) Constant pressure specific heat capacity

Wherein C ispIs the heat capacity of ideal gas under constant pressure.

4) Heat of reaction

At temperatureTThe heat of reaction is calculated as follows:

whereinRepresents the standard molar reaction enthalpy; alpha is a stoichiometric coefficient;represents the standard molar enthalpy of formation; cp(T) is the constant pressure specific heat capacity of each component at the temperature T.

5) Calculation of reaction equilibrium constant

Since the first 15 reactions are reversible, the temperature of the above reactionsTAnd the equilibrium constant at a standard pressure of 100Kpa is:

whereinCalculated as the standard molar gibbs free energy of formation, also known as the standard molar free enthalpy, at temperature T:

whereinKnown, standard molar entropy of formationThe calculation formula of (2) is as follows:

whereinIs the standard molar entropy of the components in the standard state.

The specific implementation steps of the step 2 are as follows:

2) in order to make the mechanism model consistent with the actual production process, according to the input data of the actual factory, the parameter correction method of the interior point method is adopted to obtain the model parameters, a parameter vector X to be estimated is set, X is expressed as the pre-index factor of the reaction and the device performance coefficient, and the objective function can be set as:

wherein G (X) represents the relationship between the measured value of the reactor in the catalytic reforming process and the set value of the reactor in the catalytic reforming process,expressing the in-th constraint equation, and expressing the total number of the constraint equations by m';

constructing a penalty term from the objective function (15) asThe allowable error is epsilon;

2) initializing X and penalty function factor vkSetting the iteration number k to be 1;

3) the following unconstrained problem is solved:

min G(X)+νkβ(X) (16)

obtaining the minimum value of X;

4) judging whether v is satisfiedkβ(Xk) If the value is less than epsilon, ending the process, and obtaining the X minimum value under the current iteration times as the optimal solution; on the contrary, let k be k +1, vk=C"νk-1C ∈ (0,1), and return to step 3).

The specific implementation steps of the step 3 are as follows:

the equation set (7) belongs to a differential algebraic optimization proposition containing both differential equations and algebraic equations, and the fully discrete simultaneous solution technology based on finite element configuration is very suitable for solving the problems due to the unique advantages. And (3) dispersing a mechanism model equation set (7) containing a differential algebraic equation by adopting a finite element configuration method to obtain a discrete model, namely obtaining a plurality of discrete variables and equations. Dynamically simulating the discrete model by adopting a solver for solving a large-scale NLP problem to obtain internal parameters of the reactor, such as a catalyst adsorption equilibrium constant, reactor device factors and the like, which cannot be obtained in actual measurement;

preferably, the finite element configuration method has many advantages of the Runge-Kutta discretization method in which the differential state variable expression is as follows:

wherein w (z) represents the current finite element differential state variable;to representAt the i-thyValues at the beginning of the finite element;is a finite element iyLength of (d);is shown in the iyPoints q arranged on finite elementsyThe first derivative of (d);is a polynomial of order K that satisfies the following condition:

whereinIs the r-th in finite elementyThe location of each deployment point. q. q.sy=1,...,K,ry=1,...,K

The continuity equation of the differential equation is expressed as:

furthermore, interpolation polynomial representations in the form of lagrange may be employed for process control variables and algebraic variables.

The algebraic variables are of the form:

the process control variables are of the form:

whereinAndrespectively represent the ithyFinite element set point qyAlgebraic and control variable values of and satisfyz represents a position in space that is,indicating the spatial location of the iy-th configuration point,is a lagrange polynomial of order K.

The neural network in the step 4 comprises an input layer, a hidden layer (middle layer) and an output layer, wherein the number of neurons (a plurality of linear divisions) of the hidden layer (abstraction of multiple levels of input features) and the output layer is respectively 2-4 and 2-6.

The parameters in the neural network during training are defined as follows:

input layer Unit input vector is Pks=(a1,a2,…,an) Target vector Tks=(d1,d2,…,dn) N represents the number of input vectors of the input layer unit;

hidden layer Unit input vector Sks=(s1,s2,…,sp) Output vector Bks=(b1,b2,...,bp) P represents the number of input vectors of the hidden layer unit;

output layer Unit input vector Lks=(l1,l2,…,lq) Output vector Cks=(c1,c2,…,cq) Ks is 1,2, …, m represents the number of sample data, q represents the number of input vectors of the output layer unit;

the learning process of the neural network model comprises the following steps:

a) initializing connection weight and threshold of each layer, and giving connection weight from input layer to hidden layerConnection weight v from hidden layer to output layerjtOutput threshold value theta of each unit of hidden layerjOutput threshold y of each cell of output layertAssigning random values within the interval (-1, 1); i.e. is=1,2,…,n,j=1,2,…,p,t=1,2,…,q;

b) Selecting an input sample and an output sample;

c) calculating the output of each unit of the hidden layer and the output layer by using the input samples, the connection weights, the input threshold and the output threshold:

wherein s isjAn input value representing the hidden layer cell,As output vectors of the input layer, bjOutput value, l, representing a hidden layer elementtRepresenting input values of output layer cells, ctRepresenting an output value of an output layer unit;

d) calculating generalized error of each unit of output layerThen using the connection weight v from hidden layer to output layerjtOutput vector B of the hidden layerk=(b1,b2,...,bp) Generalized error of each unit of output layerCalculating generalized error of each unit of hidden layerThe calculation formula is as follows:

e) using generalized errors of cells of the output layerModifying the connection weight v from hidden layer to output layer according to the output value of each unit of hidden layerjtOutput threshold value yt

Also using generalized error of the cells of the hidden layerModifying the connection weight w of the input layer to the hidden layer by the input of the input layerisjOutput threshold value thetaj

vjt(N) denotes the current iterationV of connection rightjt,vjt(N +1) represents the connection weight of the next iteration; y ist(N) represents the output threshold of the current iteration, yt(N +1) represents the output threshold for the next iteration;

wisj(N) connection weights w representing the current iterationisj,wisj(N +1) represents the connection weight of the next iteration, θj(N) denotes the threshold, θ, for the current iterationj(N +1) represents a threshold for the next iteration, N ═ 1, 2.., NN, where NN represents a set number of learning iterations;

f) selecting the next input sample and the next output sample, and returning to the step c) until the m training samples are trained;

g) calculating the accumulated error E of all samples in the way ofWhere q represents the number of output layer units, m represents the number of samples, EtIndicating the error between samples. And if the sample accumulated error E is smaller than the preset value epsilon or the current learning iteration number is larger than the set learning iteration number, finishing the learning training. Otherwise, selecting the sample input and the target output again, and then returning to the step c);

through the learning process, the neural network model describing the internal parameters output after the plant actual data input and the dynamic simulation of the mechanism model and the plant actual output data is obtained.

The foregoing is a more detailed description of the invention in connection with specific preferred embodiments and is not intended to limit the practice of the invention to these embodiments. Those skilled in the art to which the invention relates will readily appreciate that certain modifications and substitutions can be made without departing from the spirit and scope of the invention.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种醋酸生产中醋酸含量实时测量方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!