Method and device for modeling agent model of natural gas helium extraction device based on process simulation
Through the proxy model modeling method of natural gas helium extraction device based on process simulation, training samples are generated using Latin hypercube and random uniform sampling methods, and the model order and parameters are automatically determined, which solves the problems of high sample acquisition cost and insufficient model robustness in the existing technology, and achieves a more robust and reliable proxy model and lower computational cost.
Patent Information
- Application Number
- CN202311644529.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-04
- Publication Date
- 2025-06-06
AI Technical Summary
The prior art faces the problems of high sample acquisition cost, insufficient model robustness and reliability when developing soft measurement models for high precision natural gas treatment process.
The agent model modeling method of natural gas helium extraction device based on process simulation is used to generate training samples through Latin hypercube and random uniform sampling methods. Combined with process simulation software and COM technology, the model order and parameters are automatically determined, and a polynomial or radial basis function neural network agent model is established.
It realizes the use of fewer samples to train to obtain a more robust and reliable proxy model, which reduces the cost of training and calculation, reduces manual intervention, and improves the consistency of output results.
Smart Images

Figure CN120108533A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial control, and more specifically, to a method and device for modeling a proxy model of a natural gas helium extraction device based on process simulation. Background Art
[0002] With the advancement of data acquisition technology and data analysis methods, data-driven soft sensor modeling methods are widely used in online calculations of key product quality in natural gas processing. Natural gas processing often has highly nonlinear, process dynamics and multi-condition characteristics, and the data is non-Gaussian, which brings great challenges to the development of high-precision soft sensor models. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a natural gas helium extraction device proxy model modeling method and device based on process simulation, avoiding the use of costly experimental collection of training samples; a more robust proxy model with more reliable prediction results can be obtained with fewer samples for training, and the training calculation cost is lower; the optimal model order and parameters can be automatically determined, reducing manual intervention and achieving better consistency in output results.
[0004] The object of the present invention is achieved through the following solutions:
[0005] A method for modeling a proxy model of a natural gas helium extraction device based on process simulation comprises the following steps:
[0006] First, the Latin hypercube and random uniform sampling methods are used to generate an initialized independent variable sample set; then the process simulation software is used to calculate the dependent variable sample set, and the converged independent variable samples are tested for uniformity and supplemented with sampling until the converged sample independent variables conform to the uniform distribution; then the training samples and modeling strategies are used to establish the proxy model.
[0007] Furthermore, the method of using Latin hypercube and random uniform sampling method to generate an initialized independent variable sample set; and then using process simulation software to calculate the dependent variable sample set specifically includes the following sub-steps: using Latin hypercube sampling within the definition domain to generate the original independent variable sample set X0, and then inputting X0 into the process simulation software, extracting the dependent variable Y0 from the simulation result, and then screening out the converged sample set, i.e., the training sample set X, Y, according to the convergence state of the process simulation calculation, and satisfying the following expression:
[0008] Furthermore, the uniformity test and supplementary sampling are performed on the converged independent variable samples until the converged sample independent variables conform to the uniform distribution, which specifically includes the sub-steps of: performing a uniformity test on each dimension of the feature variable in the independent variable separately, and if it does not conform to the uniform distribution, supplementary sampling is performed until all dimensions of the independent variable conform to the uniform distribution.
[0009] Furthermore, the uniformity test includes a Pearson chi-square test.
[0010] Furthermore, the supplementary sampling includes using a random sampling method to generate an independent variable sample set in small batches, and then inputting the independent variable into the process simulation software based on COM technology. After the calculation is completed, the result is taken out to obtain the dependent variable, and the converged independent variable and dependent variable sample sets are filtered out, and finally merged into the original converged sample set.
[0011] Furthermore, the modeling strategy specifically includes: for a specified proxy model, automatically determining the optimal model order and parameters according to a hierarchical graph-based decision strategy and an L2 norm method, and finally outputting the proxy model.
[0012] Furthermore, the proxy model includes a polynomial model.
[0013] Furthermore, the proxy model includes a radial basis function neural network model.
[0014] Furthermore, the method comprises the steps of: applying to remove hydrogen from crude helium gas for integration.
[0015] A natural gas helium extraction device proxy model modeling device based on process simulation includes a processor and a memory. A program is stored in the memory. When the program is loaded by the processor, the method described above is executed.
[0016] The beneficial effects of the present invention include:
[0017] The present invention uses a combination method of Latin hypercube sampling and random sampling, and a training sample set calculated based on process simulation software can make the samples evenly cover the sample space in the entire definition domain, so that the obtained proxy model is more robust and the prediction result is more reliable; the present invention realizes interaction with the process simulation software based on COM technology, and uses a uniformity test method and a small batch supplementary sampling method, which can reduce the overall number of training samples and thus reduce the process simulation calculation cost; the present invention uses an automatic modeling strategy to automatically select the optimal model order and parameters, so that the proxy model achieves the optimal combination of calculation complexity and calculation accuracy; the present invention adopts a browser / server (B / S) mode, and users can use it through a Web browser, and operation and maintenance are simple and convenient; in addition, the present invention adopts a B / S mode, and only needs to install the process simulation software on the server, which can avoid installing the process simulation software on each user's desktop, saving authorization fees and installation time. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0019] Figure 1 It is a flow chart of the agent model automatic modeling strategy method according to an embodiment of the present invention;
[0020] Figure 2 The preferred model order for the embodiment of the present invention is a trend diagram of the objective function changing with the model order. DETAILED DESCRIPTION
[0021] All features disclosed in all embodiments in this specification, or steps in all methods or processes implicitly disclosed, except for mutually exclusive features and / or steps, can be combined and / or expanded or replaced in any manner.
[0022] In view of the problems in the background, the inventors of the present invention believe that:
[0023] Deep learning is a branch of machine learning. It usually uses multiple hidden layer neural network models to learn the high-order representation features of the inherent laws of data through a large number of vector calculations, and uses these features to make decisions. In recent years, deep learning technology has also been widely used in the fields of petrochemicals and natural gas processing, such as the optimization control of distillation towers and online fault diagnosis of natural gas pipelines. As a data-driven model modeling method, the surrogate model uses simplified correlations based on numerical technology to describe input / output behavior and uses corresponding functional forms to describe the correlation. Although the accuracy is slightly worse than that of the strict mechanism model, it can approach the real model to a certain extent under supervision, thereby greatly reducing the computational complexity and computational time cost and improving economic benefits. It has been widely used.
[0024] In the embodiment, using Aspen Hysys process simulation software and radial basis function (RBF) neural network proxy model as an example, combined with Figure 1 The following steps of automatically building the proxy model in this embodiment are described in detail:
[0025] In step 401, the basic parameters are initialized, the number of samples N0=6000, the minimum number of valid samples M0=4800, the number of samples that converge during simulation calculation is set to N, the number of small batch supplementary sampling B0=100, the minimum and maximum orders of the proxy model are Z0=5 and Z1=20 respectively, and the dimensions of the independent and dependent variables are D1 and D2 respectively.
[0026] In step 402, a Latin hypercube sampling method is used to generate N0 original independent variable sample sets X0 within the definition domain.
[0027] In step 403, X0 is input into the process simulation software Aspen Hysys using COM technology, and the calculation result dependent variable Y0 is extracted from the simulation result, and the convergence state of each sample simulation calculation is recorded, where the converged sample independent variable and dependent variable sets are X1 and Y1 respectively. Taking the typical process model of natural gas helium extraction as an example, the independent variables include the composition of raw gas, the temperature and pressure of the top and bottom of the primary and secondary concentration towers, the temperature of the raw material entering the primary and secondary concentration towers, the nitrogen circulation volume and the compressor outlet pressure; the dependent variables include the power consumption and cooling load of the nitrogen compressor, the flow and composition of the crude helium product, the flow and composition of the natural gas product and the minimum heat exchange temperature difference of the cold box.
[0028] In step 404 , it is checked whether the number of converged samples is greater than or equal to M0 (ie ), if so, step 405 is executed; otherwise, step 411 is executed.
[0029] In step 405, an independent uniformity test is performed on each dimension in the sample set. First, the sample space is divided into k mutually incompatible events, then a hypothesis is proposed (H0: the sample set conforms to the uniform distribution, H1: the sample set does not conform to the uniform distribution), and then the Pearson chi-square test is used. If the sample set conforms to the uniform distribution, step 406 is performed; otherwise, step 410 is performed.
[0030] In step 406, the initial model order Z=Z0 is set.
[0031] In step 407, the Gaussian activation function is used as the radial basis function of the RBF neural network, the number of hidden layer nodes is set to Z, and the RBF neural network is trained using training samples X1 and Y1. After the training is completed, the basis function center of the hidden layer node, the kernel width corresponding to the center, the weight and the bias are obtained. The objective function of the RBF neural network training is to minimize the sum of squares of the prediction error, and its expression is as follows:
[0032]
[0033]
[0034] In the above two equations, y i,jis the predicted value of the j-dimensional dependent variable of the ith sample point, is the actual value of the j-th dimension dependent variable at the i-th sample point, is the input vector of the i-th sample point of the RBF neural network; is the basis function center of the kth node in the hidden layer; d k is the kernel width corresponding to the center of the kth node in the hidden layer, i.e., the variance; β k,j is the weight of the kth node in the hidden layer to the jth dependent variable in the output layer; Z is the number of hidden layer nodes of the RBF neural network; β 0,j is the constant bias of the j-th dimension dependent variable in the output layer; ‖.‖ 2 is the Euclidean norm (i.e., L2 norm).
[0035] In step 408 , it is determined whether the model order has reached the maximum number. If so, proceed to step 409 ; otherwise, proceed to step 412 .
[0036] In step 409, first, a uniform sampling method is used to generate M2 validation sample independent variables X2 (see step 402), and X2 is input into the process simulation software to calculate the dependent variable Y2 (see step 403), where the number of converged samples is T, and the converged sample sets X3 and Y3 are taken out; then X3 and Y3 are used as validation sample sets, and X3 is input into the trained RBF neural network model with a model order of Z to obtain the predicted value of the dependent variable; finally, based on the hierarchical diagram (LD) decision strategy, the number of hidden layer nodes Z is optimized by measuring the Euclidean distance from the optimization target solution set to the ideal solution set. In the LD decision optimization, there are two optimization targets considered, namely, the predicted mean square error MSE of the RBF neural network when the number of hidden layer nodes is Z. Z and the number of hidden layer nodes Z, the optimization objective function is the l2 norm of these two objectives, and its expression is:
[0037]
[0038]
[0039] In the above formula, y i,j is the predicted value of the j-dimensional dependent variable of the ith sample point, is the actual value of the j-th dimension dependent variable of the ith sample point, D2 is the dimension of the dependent variable, T is the number of converged verification samples, Z is the number of hidden layer nodes, and Z0 and Z1 are the minimum and maximum numbers of hidden layer nodes, respectively.
[0040] Make l 2,Z The minimum Z value is denoted as z * , and its corresponding RBF neural network model is the optimal proxy model.
[0041] Figure 2 is a trend chart of the change of Z. Figure 2 It can be seen that when Z = 6, it is the smallest, so the RBF neural network model corresponding to the model order of 6 is the optimal proxy model.
[0042] Step 410, the output RBF neural network model parameters include the basis function center of the hidden layer node, the kernel width corresponding to the center, the weight and the bias.
[0043] Step 411, using the random sampling method, generate B0 original independent variable sample sets XS in the definition domain, and then input them into the process simulation software to obtain the dependent variable set YS, take out the converged independent variable and dependent variable sample sets XS1 and YS1, and then merge them with the two sets X1 and Y1 obtained in step 403 as new X1 and Y1. The specific operations are as follows:
[0044] X1=X1∪XS1
[0045] Y1=Y1∪YS1
[0046] In step 412, the model order is increased by 1.
[0047] The positive effects of this embodiment are as follows: (1) mature process simulation software is used to generate training samples, avoiding the use of costly experiments to collect training samples; (2) based on advanced sampling methods and sample verification methods, a more robust proxy model with more reliable prediction results can be obtained with fewer samples, and the training calculation cost is lower; (3) based on the hierarchical graph decision strategy and L2 norm method, the optimal model order and parameters can be automatically determined, reducing manual intervention and improving the consistency of output results.
[0048] It should be noted that within the scope of protection defined in the claims of the present invention, the following embodiments can be combined and / or expanded or replaced in any logical way from the above specific implementation methods, such as disclosed technical principles, disclosed technical features or implicitly disclosed technical features.
[0049] Example 1
[0050] A method for modeling a proxy model of a natural gas helium extraction device based on process simulation comprises the following steps:
[0051] First, the Latin hypercube and random uniform sampling methods are used to generate an initialized independent variable sample set; then the process simulation software is used to calculate the dependent variable sample set, and the converged independent variable samples are tested for uniformity and supplemented with sampling until the converged sample independent variables conform to the uniform distribution; then the training samples and modeling strategies are used to establish the proxy model.
[0052] Example 2
[0053] On the basis of Example 1, the method of using Latin hypercube and random uniform sampling method to generate an initialized independent variable sample set; and then using process simulation software to calculate the dependent variable sample set, specifically includes sub-steps: using Latin hypercube sampling in the definition domain to generate the original independent variable sample set X0, and then inputting X0 into the process simulation software, extracting the dependent variable Y0 from the simulation result, and then screening out the converged sample set, i.e., the training sample set X, Y, according to the convergence state of the process simulation calculation, and satisfying the following expression:
[0054] Example 3
[0055] On the basis of Example 1, the uniformity test and supplementary sampling of the converged independent variable samples are performed until the converged sample independent variables conform to the uniform distribution, which specifically includes the sub-steps of: performing a uniformity test on each dimension of the feature variable in the independent variable separately, and if it does not conform to the uniform distribution, supplementary sampling is performed until all dimensions of the independent variable conform to the uniform distribution.
[0056] Example 4
[0057] Based on Example 1, the uniformity test includes a Pearson chi-square test.
[0058] Example 5
[0059] Based on Example 1, the supplementary sampling includes using a random sampling method to generate an independent variable sample set in small batches, and then inputting the independent variable into the process simulation software based on COM technology. After the calculation is completed, the result is taken out to obtain the dependent variable, and the converged independent variable and dependent variable sample sets are filtered out, and finally merged into the original converged sample set.
[0060] Example 6
[0061] On the basis of Example 1, the modeling strategy specifically includes: for a specified proxy model, automatically determining the optimal model order and parameters according to a hierarchical graph-based decision strategy and an L2 norm method, and finally outputting the proxy model.
[0062] Example 7
[0063] Based on Example 6, the proxy model includes a polynomial model.
[0064] Example 8
[0065] Based on Example 6, the proxy model includes a radial basis function neural network model.
[0066] Example 9
[0067] Based on any one of Examples 1 to 8, it is applied to the integration of removing hydrogen from crude helium.
[0068] Example 10
[0069] A modeling device for a proxy model of a natural gas helium extraction device based on process simulation includes a processor and a memory. A program is stored in the memory. When the program is loaded by the processor, the method described in Example 9 is executed.
[0070] The units involved in the embodiments of the present invention may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not, in some cases, limit the units themselves.
[0071] According to one aspect of an embodiment of the present invention, a computer program product or a computer program is provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in the above various optional implementations.
[0072] As another aspect, an embodiment of the present invention further provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
[0073] In addition to the above examples, those skilled in the art may obtain other embodiments based on the above disclosure or by using the knowledge or technology in the relevant field to make changes. The features of each embodiment may be interchangeable or replaced. The changes and modifications made by those skilled in the art do not depart from the spirit and scope of the present invention and should be within the scope of protection of the claims attached to the present invention.
Claims
1. A proxy modeling method for natural gas helium extraction device based on process simulation, It is characterized in that The steps include: First, the Latin hypercube and random uniform sampling methods are used to generate an initialized independent variable sample set; then the process simulation software is used to calculate the dependent variable sample set, and the converged independent variable samples are tested for uniformity and supplemented with sampling until the converged sample independent variables conform to the uniform distribution; then the training samples and modeling strategies are used to establish the proxy model.
2. The method for modeling a proxy model of a natural gas helium extraction device based on process simulation according to claim 1, It is characterized in that The method uses Latin hypercube and random uniform sampling method to generate an initialized independent variable sample set; then uses process simulation software to calculate the dependent variable sample set, specifically including sub-steps: using Latin hypercube sampling in the definition domain to generate the original independent variable sample set X0, then inputting X0 into the process simulation software, extracting the dependent variable Y0 from the simulation result, and then screening out the converged sample set, i.e., the training sample set X, Y, according to the convergence state of the process simulation calculation, and satisfying the following expression:
3. The method for modeling a proxy model of a natural gas helium extraction device based on process simulation according to claim 1, It is characterized in that The uniformity test and additional sampling of the converged independent variable samples are performed until the converged sample independent variables conform to the uniform distribution, which specifically includes the sub-steps of: performing a uniformity test on each dimension of the feature variable in the independent variable separately, and if it does not conform to the uniform distribution, additional sampling is performed until all dimensions of the independent variable conform to the uniform distribution.
4. The method for modeling a proxy model of a natural gas helium extraction device based on process simulation according to claim 1, It is characterized in that The homogeneity test includes the Pearson chi-square test.
5. The method for modeling a proxy model of a natural gas helium extraction device based on process simulation according to claim 1, It is characterized in that The supplementary sampling includes using a random sampling method to generate a small batch of independent variable sample sets, then inputting the independent variables into the process simulation software based on COM technology, taking out the results after the calculation is completed to obtain the dependent variables, filtering out the converged independent variable and dependent variable sample sets, and finally merging them into the original converged sample set.
6. The method for modeling a proxy model of a natural gas helium extraction device based on process simulation according to claim 1, It is characterized in that The modeling strategy specifically includes: for a specified proxy model, automatically determining the optimal model order and parameters according to a hierarchical graph-based decision strategy and an L2 norm method, and finally outputting the proxy model.
7. The method for modeling a proxy model of a natural gas helium extraction device based on process simulation according to claim 6, It is characterized in that The proxy model includes a polynomial model.
8. The method for modeling a proxy model of a natural gas helium extraction device based on process simulation according to claim 6, It is characterized in that The proxy model includes a radial basis function neural network model.
9. A method for modeling a proxy model of a natural gas helium extraction device based on process simulation according to any one of claims 1 to 8, It is characterized in that The method comprises the following steps: applying to the integration of removing hydrogen from crude helium.
10. A modeling device for a proxy model of a natural gas helium extraction device based on process simulation, It is characterized in that The method comprises a processor and a memory, wherein a program is stored in the memory, and when the program is loaded by the processor, the method as claimed in claim 9 is executed.