A machine learning-based gas composition analysis method, system, and device
Patent Information
- Application Number
- CN202510148375.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2026-09-08
- Estimated Expiration
- 2045-02-11
AI Technical Summary
[0003]相关技术中通常采用仪器进行燃气成分分析,例如气相色谱分析设备和红外光谱设备,但是,在进行分析时燃气样品通常要经过复杂的处理,需要消耗大量的时间和人力,影响燃气分析的效率
[0071]The beneficial effects of the machine learning-based gas composition analysis method, system, and equipment of this invention are: acquiring multiple key parameters such as flue gas oxygen content, flue gas carbon dioxide content, flue gas carbon monoxide content, flue gas water content, as well as gas density, combustion chamber temperature, and absolute humidity, reducing repetitive operations in the data acquisition process, saving time, and thus improving overall analysis efficiency. Based on the flue gas carbon monoxide content, flue gas water content, and absolute humidity, the water content produced by gas combustion in the current flue gas is calculated through a pre-set water content relationship. Based on the acquired flue gas oxygen content, flue gas carbon monoxide content, and flue gas carbon dioxide content, the excess air coefficient is quickly calculated through the excess air relationship. This eliminates the need for complex experimental equipment or lengthy reaction processes, rapidly providing important parameters for subsequent gas composition prediction and accelerating the analysis process. This method inputs multiple gas and flue gas parameters, including the excess air coefficient, into a trained gas composition prediction model, which quickly outputs gas composition analysis results. Trained on a large amount of data, this model possesses high computational power and accurate predictive performance, enabling it to analyze and process complex input parameters in a short time. Compared to traditional analysis methods, this method, by introducing a neural network model, significantly shortens the time required to predict gas composition, greatly improving analysis efficiency. Simultaneously, it avoids interference between different gas components during gas composition detection, improving the accuracy of gas composition analysis. Furthermore, by introducing various physical constraints, it ensures the physical authenticity of the gas composition analysis results.
Smart Images

Figure CN120084973B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas analysis technology, and more specifically, to a gas composition analysis method, system, and device based on machine learning. Background Technology
[0002] In modern society, natural gas, as an important form of energy, is widely used in various fields such as homes, industries, and commerce. In order to ensure the safety, economy, and environmental friendliness of natural gas, analyzing its composition is particularly important.
[0003] In related technologies, instruments are typically used for gas composition analysis, such as gas chromatography and infrared spectroscopy. However, gas samples usually require complex processing during analysis, which consumes a lot of time and manpower, affecting the efficiency of gas analysis. Summary of the Invention
[0004] The problem addressed by this invention is how to improve the efficiency of gas analysis.
[0005] To address the above problems, this invention provides a method, system, and device for analyzing gas composition based on machine learning.
[0006] In a first aspect, the present invention provides a machine learning-based method for analyzing the composition of natural gas, comprising:
[0007] The oxygen content, carbon dioxide content, carbon monoxide content, and water content in the flue gas, as well as the gas density, combustion chamber temperature, and absolute humidity of the air, are obtained.
[0008] Based on the carbon monoxide content of the flue gas, the water content of the flue gas, and the absolute humidity of the air, the water content produced by the combustion of fuel gas in the flue gas is obtained through the relationship of water content.
[0009] Based on the oxygen content, carbon monoxide content, and carbon dioxide content of the flue gas, the excess air coefficient is obtained through the excess air relationship.
[0010] The excess air coefficient, the oxygen content of the flue gas, the carbon dioxide content of the flue gas, the carbon monoxide content of the flue gas, the water content produced by the combustion of the gas in the flue gas, the gas density, and the combustion chamber temperature are input into the trained gas composition prediction model to output the gas composition analysis results.
[0011] Optionally, the water content relationship satisfies:
[0012]
[0013] in, The water content produced by the combustion of fuel gas in the flue gas. The water content of the flue gas, C represents the absolute humidity of the air. CP The carbon monoxide content of the flue gas.
[0014] Optionally, the excess air relationship satisfies:
[0015]
[0016] Wherein, α is the excess air coefficient. C represents the oxygen content of the flue gas. Co The carbon monoxide content of the flue gas, β represents the carbon dioxide content of the flue gas, and β is the oxygen content coefficient.
[0017] Optionally, the training process of the gas composition prediction model includes:
[0018] Acquire training data on gas composition and an initial neural network, wherein the training data on gas composition includes input data and label data, and the initial neural network includes an input layer, a hidden layer, an output layer, and a constraint layer;
[0019] The input data is passed to the hidden layer through the input layer to obtain the output result of the hidden layer;
[0020] The output of the hidden layer is passed to the output layer to obtain the initial output of the output layer;
[0021] The initial result is passed to the constraint layer to obtain the prediction result output by the constraint layer;
[0022] Based on the comparison results of the prediction results and the corresponding label data, the hidden layer weights, hidden layer biases, output layer weights, and output layer biases in the initial neural network are updated to obtain the trained gas composition prediction model.
[0023] Optionally, the output of the hidden layer satisfies:
[0024]
[0025] Among them, H j w represents the output result of the hidden layer at the j-th node of the hidden layer. ij x is the hidden layer weight in the j-th node of the hidden layer corresponding to the i-th node of the input layer. i Let θ be the input value of the i-th node in the input layer. j is the bias corresponding to the j-th node of the hidden layer, g() is the activation function, and n is the number of nodes in the input layer.
[0026] Optionally, the output result of the output layer satisfies:
[0027]
[0028] Among them, O k u is the output result of the output layer at the k-th node of the output layer. jk H represents the output layer weights in the k-th node of the output layer that correspond to the j-th node of the hidden layer. j The hidden layer output result for the j-th node of the hidden layer, θ k is the bias corresponding to the k-th node of the output layer, and l is the number of nodes in the hidden layer.
[0029] Optionally, the updated hidden layer weights satisfy:
[0030]
[0031] The updated hidden layer bias satisfies:
[0032]
[0033] The updated output layer weights satisfy:
[0034] u' jk =u jk +ηH j (Y k -O k );
[0035] The updated output layer bias satisfies:
[0036] θ' k =θ k +η(Y k -O k );
[0037] Among them, w' ij w is the updated hidden layer weight corresponding to the i-th node of the input layer in the j-th node of the hidden layer. ij x is the hidden layer weight in the j-th node of the hidden layer corresponding to the i-th node of the input layer. i Let H be the input value of the i-th input node in the input layer, where η is the preset parameter learning coefficient, and H is the input value of the i-th input node in the input layer. j The hidden layer output result for the j-th node of the hidden layer, u' jk The updated output layer weights, u, are the output layer weights corresponding to the j-th hidden layer nodes in the k-th node of the output layer. jk The output layer weight corresponding to the j-th node of the hidden layer in the k-th node of the output layer, O kY is the output result of the output layer at the k-th node of the output layer. k For the output layer
[0038] The label data corresponding to k nodes, where m is the number of output layer nodes, and θ' j θ is the hidden layer bias corresponding to the j-th node of the updated hidden layer. j The hidden layer partial hidden layer corresponding to the j-th node.
[0039] Place, θ' k θ is the output layer bias corresponding to the k-th node of the updated output layer. k This is the output layer bias corresponding to the k-th node of the output layer.
[0040] Optionally, the constraint layer includes total component constraints, carbon conservation constraints, carbon-to-hydrogen ratio constraints, fuel gas calorific value constraints, fuel gas density constraints, upper and lower limits constraints for fuel gas components, and alkane component range constraints; the initial results include fuel gas methane content, fuel gas ethane content, fuel gas propane content, and fuel gas butane content; the step of passing the initial results to the constraint layer to obtain the prediction results output by the constraint layer includes:
[0041] When the initial result simultaneously satisfies the constraints on total component amount, carbon conservation, carbon-to-hydrogen ratio, calorific value of fuel gas, density of fuel gas, upper and lower limits of fuel gas components, and range of alkane components, the initial result is determined as the predicted result.
[0042] Otherwise, the solution space of the gas composition is determined according to the total component constraint, the carbon element conservation constraint, the carbon-hydrogen ratio constraint, the calorific value constraint of the gas, the gas density constraint, the upper and lower limits constraint of the gas composition and the alkane composition range constraint.
[0043] Based on the initial result, an optimization is performed in the gas composition solution space, and the solution in the gas composition solution space that is closest to the initial result is determined as the prediction result;
[0044] The total component constraint constraint satisfies:
[0045]
[0046] The carbon conservation constraint satisfies:
[0047]
[0048] The carbon-hydrogen ratio constraint satisfies:
[0049]
[0050] The calorific value constraint of the gas satisfies:
[0051]
[0052] The gas density constraint satisfies:
[0053]
[0054] The upper and lower limits of the gas composition constraints satisfy:
[0055]
[0056]
[0057] The constraints on the alkane component range satisfy:
[0058]
[0059] The prediction result satisfies:
[0060]
[0061] in, The methane content of the fuel gas, The ethane content of the fuel gas, The propane content of the fuel gas, V represents the butane content of the fuel gas. fg To obtain the volume of flue gas generated after combustion of the gas, A1 is the preset lower limit of the carbon-hydrogen ratio, A2 is the preset upper limit of the carbon-hydrogen ratio, B1 is the preset lower limit of the calorific value of the gas, B2 is the preset upper limit of the calorific value of the gas, C1 is the preset lower limit of the gas density, C2 is the preset upper limit of the gas density, minf(C i To find the objective function f(C) i The minimum value of C) i Let C be the content of the i-th component in the predicted composition of the gas. i ′ R represents the content of the i-th component in the initial results of the gas composition. 4 Let ρ be the four-dimensional solution space of the combustion gas. min ρ is the lower limit of the methane content in the fuel gas. max σ is the upper limit of the methane content in the fuel gas. min σ is the lower limit of the ethane content in the fuel gas. max τ is the upper limit of the ethane content in the fuel gas. min τ is the lower limit of the propane content in the fuel gas. max This is the upper limit of the propane content in the fuel gas. This is the lower limit of the butane content in the fuel gas. This is the upper limit of the butane content in the fuel gas.
[0062] Secondly, the present invention provides a gas composition analysis system based on a machine learning model, comprising:
[0063] The acquisition module is used to acquire the oxygen content, carbon dioxide content, carbon monoxide content, and water content in the flue gas, as well as the gas density, combustion chamber temperature, and absolute humidity of the air.
[0064] The first processing module is used to obtain the water content produced by combustion of fuel gas in flue gas based on the relationship between the carbon monoxide content of flue gas, the water content of flue gas, and the absolute humidity of air.
[0065] The second processing module is used to obtain the excess air coefficient based on the oxygen content, carbon monoxide content, and carbon dioxide content of the flue gas through the excess air relationship.
[0066] The prediction module is used to input the excess air coefficient, the oxygen content of the flue gas, the carbon dioxide content of the flue gas, the carbon monoxide content of the flue gas, the water content produced by the combustion of the gas in the flue gas, the gas density, and the combustion chamber temperature into the trained gas composition prediction model to output the gas composition analysis results.
[0067] Thirdly, the present invention provides an electronic device, including a memory and a processor;
[0068] The memory is used to store computer programs;
[0069] The processor is configured to, when executing the computer program, implement the machine learning-based gas composition analysis method as described in the first aspect.
[0070] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the machine learning-based gas composition analysis method as described in the first aspect.
[0071] The beneficial effects of the machine learning-based gas composition analysis method, system, and equipment of this invention are: acquiring multiple key parameters such as flue gas oxygen content, flue gas carbon dioxide content, flue gas carbon monoxide content, flue gas water content, as well as gas density, combustion chamber temperature, and absolute humidity, reducing repetitive operations in the data acquisition process, saving time, and thus improving overall analysis efficiency. Based on the flue gas carbon monoxide content, flue gas water content, and absolute humidity, the water content produced by gas combustion in the current flue gas is calculated through a pre-set water content relationship. Based on the acquired flue gas oxygen content, flue gas carbon monoxide content, and flue gas carbon dioxide content, the excess air coefficient is quickly calculated through the excess air relationship. This eliminates the need for complex experimental equipment or lengthy reaction processes, rapidly providing important parameters for subsequent gas composition prediction and accelerating the analysis process. This method inputs multiple gas and flue gas parameters, including the excess air coefficient, into a trained gas composition prediction model, which quickly outputs gas composition analysis results. Trained on a large amount of data, this model possesses high computational power and accurate predictive performance, enabling it to analyze and process complex input parameters in a short time. Compared to traditional analysis methods, this method, by introducing a neural network model, significantly shortens the time required to predict gas composition, greatly improving analysis efficiency. Simultaneously, it avoids interference between different gas components during gas composition detection, improving the accuracy of gas composition analysis. Furthermore, by introducing various physical constraints, it ensures the physical authenticity of the gas composition analysis results. Attached Figure Description
[0072] Figure 1 This is a schematic flowchart of a machine learning-based gas composition analysis method according to an embodiment of the present invention.
[0073] Figure 2 This is a schematic diagram of the structure of a machine learning-based gas composition analysis system according to an embodiment of the present invention;
[0074] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0075] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the accompanying drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0076] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0077] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to"; the term "based on" means "at least partially based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; and the term "optionally" means "optional embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first," "second," etc., mentioned in this invention are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0078] It should be noted that the terms "one" and "more" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0079] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0080] In related technologies, current methods for real-time measurement of natural gas composition in gas-fired equipment primarily involve direct component detection at the equipment inlet. Commonly used online full-component detection methods for multi-component gases include gas chromatography (GC) and Fourier transform infrared spectroscopy (FTIR). GC can obtain physical properties such as natural gas composition, density, and calorific value; however, GC requires carrier gas and the separation and detection process is time-consuming, making real-time monitoring of gas components impossible. FTIR offers fast analysis speed but cannot detect homonuclear diatomic molecules such as nitrogen and hydrogen. Since natural gas is a mixture of various alkanes and other gases, a certain proportion of nitrogen and hydrogen is unavoidable, leading to cross-sensitivity in the detection results and measurement interference between gas components. Therefore, conventional gas detection equipment requires a significant amount of time for gas component analysis, and accuracy is difficult to guarantee.
[0081] To address the problems existing in the aforementioned related technologies, this embodiment provides a method, system, and device for analyzing gas composition based on machine learning.
[0082] like Figure 1 As shown in the figure, an embodiment of the present invention provides a machine learning-based method for analyzing gas composition, comprising:
[0083] S100 acquires the oxygen content, carbon dioxide content, carbon monoxide content, and water content in the flue gas, as well as the gas density, combustion chamber temperature, and absolute humidity of the air.
[0084] It should be noted that this embodiment integrates multiple research fields such as energy science, chemical science, and artificial intelligence, and takes the online identification of changes in the calorific value of gas as its starting point. It proposes a gas composition analysis method based on the carbon-hydrogen balance and chemical reaction heat correction of the gas and flue gas dual system. By inverting the natural gas composition of the equipment through operating parameters such as flue gas information, the composition changes of natural gas in the gas equipment can be accurately analyzed.
[0085] Specifically, the composition data of the flue gas produced after the combustion of natural gas in the gas-fired equipment is obtained, including the oxygen content, carbon dioxide content, carbon monoxide content, and water content of the flue gas. Simultaneously, the gas density input to the gas-fired equipment, the combustion chamber temperature, and the current absolute humidity of the air are also obtained. Since the main components of natural gas are hydrocarbons, carbon is converted into carbon dioxide and carbon monoxide during combustion. By detecting the carbon dioxide and carbon monoxide content in the flue gas, the carbon content in the gas can be calculated, and thus the proportion of carbon-containing compounds can be inferred. Similarly, hydrogen combustion produces water; calculating the amount of water produced by gas combustion in the flue gas allows for an estimation of the hydrogen content in the gas, helping to determine the composition of various hydrocarbons in the gas.
[0086] S200, based on the carbon monoxide content of the flue gas, the water content of the flue gas, and the absolute humidity of the air, the water content produced by the combustion of fuel gas in the flue gas is obtained through the relationship of water content.
[0087] S300, based on the oxygen content, carbon monoxide content, and carbon dioxide content of the flue gas, the excess air coefficient is obtained through the excess air relationship.
[0088] Specifically, based on the carbon monoxide content, water content, and absolute humidity of the flue gas, the water content produced by combustion of the gas in the current flue gas is calculated through a pre-set water content relationship. Based on the oxygen content, carbon monoxide content, and carbon dioxide content of the flue gas, the corresponding excess air coefficient is calculated through a pre-set excess air relationship. The excess air content can reflect the degree of air supply and combustion completeness during combustion.
[0089] S400, the excess air coefficient, the oxygen content of the flue gas, the carbon dioxide content of the flue gas, the carbon monoxide content of the flue gas, the water content produced by the combustion of the gas in the flue gas, the gas density, and the combustion chamber temperature are input into the trained gas composition prediction model to output the gas composition analysis results.
[0090] Specifically, the excess air coefficient, the content of each component in the flue gas (oxygen content, carbon dioxide content, carbon monoxide content, and water content produced by combustion of fuel gas), fuel gas density, and combustion chamber temperature are input into the trained fuel gas composition prediction model to obtain output results that meet the constraints.
[0091] In this embodiment, multiple key parameters are acquired, including flue gas oxygen content, flue gas carbon dioxide content, flue gas carbon monoxide content, flue gas water content, as well as fuel gas density, combustion chamber temperature, and absolute humidity. This reduces repetitive operations during data acquisition, saves time, and improves overall analysis efficiency. Based on the flue gas carbon monoxide content, flue gas water content, and absolute humidity, the moisture content produced by fuel gas combustion is calculated using a pre-defined water content relationship. Based on the acquired flue gas oxygen content, flue gas carbon monoxide content, and flue gas carbon dioxide content, the excess air coefficient is quickly calculated using the excess air relationship. This eliminates the need for complex experimental equipment or lengthy reaction processes, rapidly providing crucial parameters for subsequent fuel gas composition prediction and accelerating the analysis process. This method inputs multiple gas and flue gas parameters, including the excess air coefficient, into a trained gas composition prediction model, which quickly outputs gas composition analysis results. Trained on a large amount of data, this model possesses high computational power and accurate predictive performance, enabling it to analyze and process complex input parameters in a short time. Compared to traditional analysis methods, this method, by introducing a neural network model, significantly shortens the time required to predict gas composition, greatly improving analysis efficiency. Simultaneously, it avoids interference between different gas components during gas composition detection, improving the accuracy of gas composition analysis. Furthermore, by introducing various physical constraints, it ensures the physical authenticity of the gas composition analysis results.
[0092] Optionally, the water content relationship satisfies:
[0093]
[0094] in, The water content produced by the combustion of fuel gas in the flue gas. The water content of the flue gas, C represents the absolute humidity of the air. CP The carbon monoxide content of the flue gas.
[0095] Optionally, the excess air relationship satisfies:
[0096]
[0097] Wherein, α is the excess air coefficient. C represents the oxygen content of the flue gas. CO The carbon monoxide content of the flue gas, β represents the carbon dioxide content of the flue gas, and β is the oxygen content coefficient.
[0098] Optionally, the training process of the gas composition prediction model includes:
[0099] Acquire training data on gas composition and an initial neural network, wherein the training data on gas composition includes input data and label data, and the initial neural network includes an input layer, a hidden layer, an output layer, and a constraint layer;
[0100] The input data is passed to the hidden layer through the input layer to obtain the output result of the hidden layer;
[0101] The output of the hidden layer is passed to the output layer to obtain the initial output of the output layer;
[0102] The initial result is passed to the constraint layer to obtain the prediction result output by the constraint layer;
[0103] Based on the comparison results of the prediction results and the corresponding label data, the hidden layer weights, hidden layer biases, output layer weights, and output layer biases in the initial neural network are updated to obtain the trained gas composition prediction model.
[0104] Specifically, the first step is to construct gas composition input data based on historical data from gas equipment. This data comprises various characteristic information related to gas composition, such as flue gas oxygen content, flue gas carbon dioxide content, flue gas carbon monoxide content, flue gas water content, gas density, combustion chamber temperature, and absolute humidity. These parameters reflect the gas combustion process and related environmental information from different perspectives and are crucial for predicting gas composition. By collecting a large number of representative training data samples, rich material can be provided for the neural network to learn the relationship between gas composition and these parameters. For each set of training data, the actual gas composition information is explicitly given through corresponding label data, which is the expected output of the model training, such as the specific content of various gas components, including methane, ethane, propane, and butane content. This data is the target of the neural network's learning. The neural network continuously adjusts its parameters to try to make the prediction results as close as possible to these actual label data. The initial neural network includes an input layer, hidden layers, an output layer, and a constraint layer. The input layer, serving as the entry point to the neural network, receives training data as input and passes it to the hidden layers. The number of neurons in the input layer typically corresponds to the number of features in the training data, ensuring that each input feature can be processed by the neural network. The hidden layers are a core component of the neural network. They do not directly interact with external data but internally perform complex nonlinear transformations on the training data. Through a series of neurons and weights, the hidden layers extract and combine features from the training data, uncovering potential patterns and relationships. The number of neurons and layers in the hidden layers can be set according to actual needs, and different settings will affect the learning and expressive capabilities of the neural network. The output layer receives the output from the hidden layers and converts it into an initial result, i.e., the initial predicted gas composition. The number of neurons in the output layer corresponds to the types of gas components to be predicted, and the output value of each neuron represents the predicted content of one gas component. The constraint layer receives the initial result from the output layer and determines whether the initial result satisfies the constraints, thus outputting the final prediction result.
[0105] For example, training data is passed from the input layer to the hidden layer to obtain the output of the hidden layer. The data transmission process is as follows: When training data enters the input layer, each input feature is assigned to a corresponding neuron. The neuron multiplies the received data value by its corresponding weight (the initial hidden layer weights can be randomly generated), and then sums the weighted results. This sum is then processed by an activation function. The activation function gives the neural network non-linear characteristics, enabling it to learn complex non-linear relationships. Common activation functions include the Sigmoid function and the ReLU function. After processing by the activation function, the resulting value is the output of the hidden layer neurons. All neurons in the hidden layer perform this calculation, ultimately producing the hidden layer's output, which contains the training data information after preliminary processing and feature extraction.
[0106] The hidden layer output is then passed to the output layer to obtain the output result. The hidden layer output, as the input to the output layer, undergoes a similar computational process. The neurons in the output layer multiply the received hidden layer output by their respective weights (the initial output layer weights can be randomly generated), sum them, and then process them through an activation function (sometimes the output layer may use a special activation function, such as the Softmax function for multi-class problems; in gas composition prediction, if gas components are considered as different categories, a similar function may be used) to obtain the initial result of the output layer. This initial result is then passed to the constraint layer to determine if it satisfies the preset constraints. If it does, the initial result is used as the final prediction result. If not, based on the initial result, an optimization is performed in the gas composition solution space generated by the constraints in the prediction layer, and the solution closest to the initial result is taken as the final prediction result. This prediction result is the neural network's prediction of the gas composition corresponding to the current training data. Based on the comparison between the prediction result and the corresponding label data, i.e. the error between the prediction result and the corresponding expected output, the hidden layer weights, hidden layer biases, output layer weights, and output layer biases in the initial neural network are updated to obtain the trained gas composition prediction model.
[0107] Furthermore, during error calculation, the predicted results output by the constraint layer are compared with the label data (i.e., the actual gas composition data). The error between the two is calculated using a loss function (e.g., mean squared error, used to measure the degree of difference between the predicted value and the true value). The error value reflects the degree of deviation between the current neural network prediction result and the actual situation. The smaller the error, the closer the prediction result is to the true value. A preset error threshold can be set. When the error is less than the preset threshold, it is determined that the prediction result output by the model meets the requirements, and the initial neural network model that meets the requirements is determined as the finally trained gas composition prediction model.
[0108] Weight and bias update: To reduce errors, the weights of the hidden layers and output layers, as well as the biases of the hidden layers and output layers, need to be adjusted and updated in the neural network. By repeatedly inputting training data into the neural network, calculating the error, and updating the weights and biases of the hidden and output layers, the prediction results of the neural network will gradually approach the actual gas composition, ultimately resulting in a well-trained gas composition prediction model. This model can make relatively accurate gas composition predictions based on the input training data.
[0109] In this optional embodiment, by training the gas composition prediction model, the model can process complex multi-dimensional gas data in parallel, quickly uncover the nonlinear relationship between parameters and gas composition, and make rapid predictions based on existing learning results with its powerful pattern recognition capabilities, saving analysis time. The weights are automatically updated during training, reducing manual intervention, rapidly optimizing the model, and adapting to different gas characteristics. This eliminates the need to develop specific processes for various types of gas, improving overall efficiency.
[0110] Optionally, the output of the hidden layer satisfies:
[0111]
[0112] Among them, H j w represents the output result of the hidden layer at the j-th node of the hidden layer. ij x is the hidden layer weight in the j-th node of the hidden layer corresponding to the i-th node of the input layer. i Let θ be the input value of the i-th node in the input layer. j is the bias corresponding to the j-th node of the hidden layer, g() is the activation function, and n is the number of nodes in the input layer.
[0113] Optionally, the output result of the output layer satisfies:
[0114]
[0115] Among them, O ku is the output result of the output layer at the k-th node of the output layer. jk H represents the output layer weights in the k-th node of the output layer that correspond to the j-th node of the hidden layer. j The hidden layer output result for the j-th node of the hidden layer, θ k is the bias corresponding to the k-th node of the output layer, and l is the number of nodes in the hidden layer.
[0116] Optionally, the updated hidden layer weights satisfy:
[0117]
[0118] The updated hidden layer bias satisfies:
[0119]
[0120] The updated output layer weights satisfy:
[0121] u' jk =u jk +ηH j (Y k -O k );
[0122] The updated output layer bias satisfies:
[0123] θ' k =θ k +η(Y k -O k );
[0124] Among them, w' ij w is the updated hidden layer weight corresponding to the i-th node of the input layer in the j-th node of the hidden layer. ij x is the hidden layer weight in the j-th node of the hidden layer corresponding to the i-th node of the input layer. i The input value is the i-th input node of the input layer, and η is a preset parameter.
[0125] Learning coefficient, H j The hidden layer output result for the j-th node of the hidden layer, u' jk The updated output layer weights, u, are the output layer weights corresponding to the j-th hidden layer nodes in the k-th node of the output layer. jk The output layer weight corresponding to the j-th node of the hidden layer in the k-th node of the output layer, O k Y is the output result of the output layer at the k-th node of the output layer. kThe label data corresponding to the k-th node of the output layer, m is the number of nodes in the output layer, and θ' j θ is the hidden layer bias corresponding to the j-th node of the updated hidden layer. j Let θ' be the hidden layer bias corresponding to the j-th node of the hidden layer. k θ is the output layer bias corresponding to the k-th node of the updated output layer. k This is the output layer bias corresponding to the k-th node of the output layer.
[0126] Optionally, the constraint layer includes total component constraints, carbon conservation constraints, carbon-to-hydrogen ratio constraints, fuel gas calorific value constraints, fuel gas density constraints, upper and lower limits constraints for fuel gas components, and alkane component range constraints; the initial results include fuel gas methane content, fuel gas ethane content, fuel gas propane content, and fuel gas butane content; the step of passing the initial results to the constraint layer to obtain the prediction results output by the constraint layer includes:
[0127] When the initial result simultaneously satisfies the constraints on total component amount, carbon conservation, carbon-to-hydrogen ratio, calorific value of fuel gas, density of fuel gas, upper and lower limits of fuel gas components, and range of alkane components, the initial result is determined as the predicted result.
[0128] Otherwise, the solution space of the gas composition is determined according to the total component constraint, the carbon element conservation constraint, the carbon-hydrogen ratio constraint, the calorific value constraint of the gas, the gas density constraint, the upper and lower limits constraint of the gas composition and the alkane composition range constraint.
[0129] Based on the initial result, an optimization is performed in the gas composition solution space, and the solution in the gas composition solution space that is closest to the initial result is determined as the prediction result;
[0130] The total component constraint constraint satisfies:
[0131]
[0132] The carbon conservation constraint satisfies:
[0133]
[0134] The carbon-hydrogen ratio constraint satisfies:
[0135]
[0136] The calorific value constraint of the gas satisfies:
[0137]
[0138] The gas density constraint satisfies:
[0139]
[0140] The upper and lower limits of the gas composition constraints satisfy:
[0141]
[0142] The constraints on the alkane component range satisfy:
[0143]
[0144] The prediction result satisfies:
[0145]
[0146] in, The methane content of the fuel gas, The ethane content of the fuel gas, The propane content of the fuel gas, V represents the butane content of the fuel gas. fg To obtain the volume of flue gas generated after combustion of the gas, A1 is the preset lower limit of the carbon-hydrogen ratio, A2 is the preset upper limit of the carbon-hydrogen ratio, B1 is the preset lower limit of the calorific value of the gas, B2 is the preset upper limit of the calorific value of the gas, C1 is the preset lower limit of the gas density, C2 is the preset upper limit of the gas density, minf(C i To find the objective function f(C) i The minimum value of C) i Let C be the content of the i-th component in the predicted composition of the gas. i ′ R represents the content of the i-th component in the initial results of the gas composition. 4 Let be the four-dimensional solution space for the combustion gas.
[0147] In this optional embodiment, based on the constraints of the total component amount, carbon conservation, C / H ratio, calorific value, density, upper and lower limits of gas components, and alkane component range, it is determined whether the initial result output by the output layer simultaneously satisfies the above constraints. If the constraints are met, the initial result is used as the prediction result output by the initial neural network. If the initial result does not satisfy the constraints, a corresponding gas composition solution space is determined based on the constraints of the total component amount, carbon conservation, C / H ratio, calorific value, density, upper and lower limits of gas components, and alkane component range. This gas composition solution space can include the value range of each gas component. Then, based on the initial result that does not meet the constraints, optimization is performed within the gas composition solution space to find the optimal solution closest to the initial result. The optimal solution closest to the initial result is then used as the final output prediction result. By quickly determining the optimal solution closest to the initial result in the gas composition solution space through optimization, the analysis of gas components can be completed quickly, improving the efficiency and accuracy of gas component analysis.
[0148] It should be noted that the following constraints apply: Total component constraint: Since the fuel gas contains other substances besides methane, ethane, propane, and butane, such as carbon dioxide and other alkanes, the sum of the contents of methane, ethane, propane, and butane is less than 100%, adhering to the law of conservation of total mass; Carbon element conservation constraint: The amount of carbon in the fuel gas before and after the reaction is less than the amount of carbon output in the flue gas, ensuring that the prediction results are reasonable and accurate at the chemical element level; Carbon-hydrogen ratio constraint: Different fuel gases have specific carbon-hydrogen ratio ranges, which are used to determine whether the predicted components conform to the characteristics of the fuel gas type; Fuel gas calorific value constraint: The heat released by the combustion of a unit of fuel gas must be within a specified range to meet the needs of different applications; Fuel gas density constraint: Under specific temperature and pressure, fuel gas density is related to the composition, affecting practical applications and verifying the rationality of the composition; Only when the initial fuel gas prediction result simultaneously meets all of the above constraints can it be determined as a constrained fuel gas composition prediction result, providing a reliable basis for each stage of the fuel gas process; Upper and lower limits of fuel gas component constraints: The upper and lower limits of the required methane, ethane, propane, and butane contents are determined through extensive experiments.
[0149] Specifically, the upper and lower limits of gas composition constraints can be:
[0150]
[0151] For example, a gas composition detection device can consist of an online detection module, a data storage module, a gas composition inversion module, and a gas information output module. The online detection module includes measuring devices for flue gas composition, flue gas humidity, air humidity, gas density, and combustion chamber temperature. These devices measure parameters such as the content of oxygen, carbon dioxide, carbon monoxide, and moisture in the flue gas, the moisture content in the air, gas flow rate, gas density, and air flow rate, providing data support for subsequent analysis. Based on the law of conservation of mass and energy, the moisture content produced by gas combustion is obtained by analyzing the difference in moisture content between the flue gas and the air. This difference can be combined with the carbon dioxide and carbon monoxide content in the flue gas to calculate the gas hydrocarbon ratio, establishing a hydrocarbon balance relationship between the gas and the flue gas. By utilizing the correlation between combustion chamber temperature and air flow rate, and gas calorific value, a relationship between the heat of chemical reaction of the gas and the combustion chamber temperature is constructed. These relationships provide arguments for machine learning and constrain the output results. Based on carbon-hydrogen balance and chemical reaction heat correction, and using a database constructed from relevant data, a flue gas information inversion model for gas composition is built using a machine learning BP neural network algorithm and convex optimization theory. Specific steps include reading data, setting training and testing data, constructing the BP neural network (setting the number of nodes in each layer, activation function, weights, biases, network performance function, convex optimization problem constraints and objective function, etc.), and training the neural network (calculating the output and error of the hidden and output layers, updating weights and thresholds until the error is minimized). Based on the gas composition and calorific value predicted by the inversion module, the calorific value of the mixed gas is calculated, and the predicted gas composition and calorific value results are output to the user.
[0152] Furthermore, it can be based on a pre-defined objective function f(C) i The prediction result is determined, wherein the Hessian matrix in the objective function is positive definite, therefore the objective function is convex. All constraints are linear, therefore the constraints are convex. Since both the objective function and constraints are convex, the optimization problem is a convex optimization problem. An important characteristic of convex optimization problems is that local optima are also global optima, making the solution more reliable. The objective function is a polynomial function. Polynomial functions are differentiable everywhere. Therefore, the objective function is differentiable at the optimal solution. All constraints are linear, and linear functions are differentiable everywhere. Therefore, the constraints are also differentiable at the optimal solution.
[0153] Therefore, both the objective function and the constraints are differentiable at the optimal solution, meaning the optimization problem is a differentiable convex optimization problem. This implies that at the optimal solution, we can use gradient information to analyze and solve the problem, which is the basis for applying the Karush-Kuhn-Tucker (KKT) conditions. It also means that introducing the convex optimization process as a constraint layer into the neural network process is feasible, as it does not interrupt the error backpropagation process during neural network training. Since the convex optimization problem in this embodiment has inequality constraints, KKT conditions are used to solve the optimal solution. KKT conditions are a standard method for solving optimization problems with inequality constraints.
[0154] For example, the gradient condition is: the linear combination of the gradient of the objective function and the gradient of the constraint condition is zero.
[0155]
[0156] Where, f(C) i Let g be the objective function. r (C i Let ) be the r-th constraint, and C i Let represent the content of the i-th component in the predicted composition of the gas, and T represent the number of constraints.
[0157] Original feasibility: The constraints must be met.
[0158] g r (C i )≤0, where i=1,2,3,4 and r=1,2,…,18, that is, 18 constraints;
[0159] Duality feasibility: Lagrange multiplier λ r It must be non-negative.
[0160] λ r ≥0, where r = 1, 2, ..., 18;
[0161] Complementary relaxation condition: The product of the Lagrange multiplier and the constraint value is zero.
[0162] Where i = 1, 2, 3, 4 and j = 1, 2, ..., 18;
[0163] By analyzing the four parts of the KKT conditions, the optimal solution can be found. Furthermore, the objective function reaches its minimum at the optimal solution, while simultaneously satisfying all constraints.
[0164] like Figure 2 As shown in the figure, an embodiment of the present invention provides a gas composition analysis system 200 based on machine learning, comprising:
[0165] The acquisition module 210 is used to acquire the oxygen content, carbon dioxide content, carbon monoxide content, and water content in the flue gas, as well as the gas density, combustion chamber temperature, and absolute humidity of the air.
[0166] The first processing module 220 is used to obtain the water content produced by combustion of fuel gas in flue gas based on the relationship between the carbon monoxide content of flue gas, the water content of flue gas and the absolute humidity of air.
[0167] The second processing module 230 is used to obtain the excess air coefficient based on the oxygen content, carbon monoxide content, and carbon dioxide content of the flue gas through the excess air relationship.
[0168] The prediction module 240 is used to input the excess air coefficient, the oxygen content of the flue gas, the carbon dioxide content of the flue gas, the carbon monoxide content of the flue gas, the water content produced by the combustion of the gas in the flue gas, the gas density, and the combustion chamber temperature into the trained gas composition prediction model to output the gas composition analysis results.
[0169] The machine learning-based gas composition analysis system of this embodiment is used to implement the machine learning-based gas composition analysis method described above. Its advantages over the prior art are the same as those of the machine learning-based gas composition analysis method compared to the prior art, and will not be repeated here.
[0170] like Figure 3 As shown, an electronic device 300 provided in this embodiment of the invention includes a memory 310 and a processor 320; the memory 310 is used to store a computer program; the processor 320 is used to implement the machine learning-based gas composition analysis method as described above when the computer program is executed.
[0171] Alternatively, an electronic device 300 includes a memory 310 and a processor 320 coupled to the memory 310; the memory 310 is configured to store a computer program; and the processor 320 is configured to perform the following operations when the computer program is executed:
[0172] The oxygen content, carbon dioxide content, carbon monoxide content, and water content in the flue gas, as well as the gas density, combustion chamber temperature, and absolute humidity of the air, are obtained.
[0173] Based on the carbon monoxide content of the flue gas, the water content of the flue gas, and the absolute humidity of the air, the water content produced by the combustion of fuel gas in the flue gas is obtained through the relationship of water content.
[0174] Based on the oxygen content, carbon monoxide content, and carbon dioxide content of the flue gas, the excess air coefficient is obtained through the excess air relationship.
[0175] The excess air coefficient, the oxygen content of the flue gas, the carbon dioxide content of the flue gas, the carbon monoxide content of the flue gas, the water content produced by the combustion of the gas in the flue gas, the gas density, and the combustion chamber temperature are input into the trained gas composition prediction model to output the gas composition analysis results.
[0176] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the machine learning-based gas composition analysis method described above.
[0177] Alternatively, a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the following operations:
[0178] The oxygen content, carbon dioxide content, carbon monoxide content, and water content in the flue gas, as well as the gas density, combustion chamber temperature, and absolute humidity of the air, are obtained.
[0179] Based on the carbon monoxide content of the flue gas, the water content of the flue gas, and the absolute humidity of the air, the water content produced by the combustion of fuel gas in the flue gas is obtained through the relationship of water content.
[0180] Based on the oxygen content, carbon monoxide content, and carbon dioxide content of the flue gas, the excess air coefficient is obtained through the excess air relationship.
[0181] The excess air coefficient, the oxygen content of the flue gas, the carbon dioxide content of the flue gas, the carbon monoxide content of the flue gas, the water content produced by the combustion of the gas in the flue gas, the gas density, and the combustion chamber temperature are input into the trained gas composition prediction model to output the gas composition analysis results.
[0182] The present invention will now be described an electronic device 300 that can serve as a server or client of the present invention, which is an example of a hardware device that can be applied to various aspects of the present invention. Electronic device 300 is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 300 can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0183] Electronic device 300 includes a computing unit that can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) or a computer program loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The computing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0184] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. In this application, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention according to actual needs. Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.
[0185] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.
Claims
1. A machine learning-based method for analyzing the composition of natural gas, characterized in that, include: The oxygen content, carbon dioxide content, carbon monoxide content, and water content in the flue gas, as well as the gas density, combustion chamber temperature, and absolute humidity of the air, are obtained. Based on the carbon monoxide content of the flue gas, the water content of the flue gas, and the absolute humidity of the air, the water content produced by the combustion of fuel gas in the flue gas is obtained through the relationship of water content. Based on the oxygen content, carbon monoxide content, and carbon dioxide content of the flue gas, the excess air coefficient is obtained through the excess air relationship. The excess air coefficient, the oxygen content of the flue gas, the carbon dioxide content of the flue gas, the carbon monoxide content of the flue gas, the water content produced by the combustion of the gas in the flue gas, the gas density, and the combustion chamber temperature are input into the trained gas composition prediction model to output the gas composition analysis results. The training process of the gas composition prediction model includes: Acquire training data on gas composition and an initial neural network, wherein the training data on gas composition includes input data and label data, and the initial neural network includes an input layer, a hidden layer, an output layer, and a constraint layer; The input data is passed to the hidden layer through the input layer to obtain the output result of the hidden layer; The output of the hidden layer is passed to the output layer to obtain the initial output of the output layer; The initial result is passed to the constraint layer to obtain the prediction result output by the constraint layer; Based on the comparison results of the prediction results and the corresponding label data, the hidden layer weights, hidden layer biases, output layer weights and output layer biases in the initial neural network are updated to obtain the trained gas composition prediction model. The constraint layer includes constraints on total component quantity, carbon conservation, carbon-to-hydrogen ratio, calorific value of fuel gas, fuel gas density, upper and lower limits of fuel gas components, and alkane component range constraints; the initial results include the methane content, ethane content, propane content, and butane content of fuel gas; the process of passing the initial results to the constraint layer to obtain the prediction results output by the constraint layer includes: When the initial result simultaneously satisfies the constraints on total component amount, carbon conservation, carbon-to-hydrogen ratio, calorific value of fuel gas, density of fuel gas, upper and lower limits of fuel gas components, and range of alkane components, the initial result is determined as the predicted result. Otherwise, the solution space of the gas composition is determined according to the total component constraint, the carbon element conservation constraint, the carbon-hydrogen ratio constraint, the calorific value constraint of the gas, the gas density constraint, the upper and lower limits constraint of the gas composition and the alkane composition range constraint. Based on the initial result, an optimization is performed in the gas composition solution space, and the solution in the gas composition solution space that is closest to the initial result is determined as the prediction result; The total component constraint constraint satisfies: ; The carbon element conservation constraint satisfies: ; The carbon-hydrogen ratio constraint satisfies: ; The calorific value constraint of the gas satisfies: ; The gas density constraint satisfies: ; The upper and lower limits of the gas composition constraints satisfy: ; ; ; ; The alkane component range constraints satisfy: ; ; The prediction result satisfies: ; in, The methane content of the fuel gas, The ethane content of the fuel gas, The propane content of the fuel gas, V represents the butane content of the fuel gas. fg To obtain the volume of flue gas generated after combustion of the gas, A1 is a preset lower limit for the hydrocarbon ratio, A2 is a preset upper limit for the hydrocarbon ratio, B1 is a preset lower limit for the calorific value of the gas, B2 is a preset upper limit for the calorific value of the gas, C1 is a preset lower limit for the gas density, and C2 is a preset upper limit for the gas density. To find the objective function The minimum value, C i Let be the content of the i-th component in the predicted composition of the gas. R represents the content of the i-th component in the initial results of the gas composition. 4 For a four-dimensional solution space of the gas composition, This is the lower limit of the methane content in the fuel gas. This is the upper limit of the methane content in the fuel gas. This is the lower limit of the ethane content in the fuel gas. This is the upper limit of the ethane content in the fuel gas. This is the lower limit of the propane content in the fuel gas. This is the upper limit of the propane content in the fuel gas. This is the lower limit of the butane content in the fuel gas. This is the upper limit of the butane content in the fuel gas.
2. The machine learning-based gas composition analysis method according to claim 1, characterized in that, The water content relationship satisfies: ; in, The water content produced by the combustion of fuel gas in the flue gas. The water content of the flue gas, The absolute humidity of the air, The carbon monoxide content of the flue gas.
3. The machine learning-based gas composition analysis method according to claim 1, characterized in that, The excess air relationship satisfies: ; Wherein, α is the excess air coefficient. The oxygen content of the flue gas. The carbon monoxide content of the flue gas, β represents the carbon dioxide content of the flue gas, and β is the oxygen content coefficient.
4. The machine learning-based gas composition analysis method according to claim 1, characterized in that, The output of the hidden layer satisfies: ; Among them, H j w represents the output result of the hidden layer at the j-th node of the hidden layer. ij x is the hidden layer weight in the j-th node of the hidden layer corresponding to the i-th node of the input layer. i Let θ be the input value of the i-th node in the input layer. j is the bias corresponding to the j-th node of the hidden layer, g() is the activation function, and n is the number of nodes in the input layer.
5. The machine learning-based gas composition analysis method according to claim 1, characterized in that, The output result of the output layer satisfies: ; Among them, O k u is the output result of the output layer at the k-th node of the output layer. jk H represents the output layer weights in the k-th node of the output layer that correspond to the j-th node of the hidden layer. j The hidden layer output result for the j-th node of the hidden layer, θ k is the bias corresponding to the k-th node of the output layer, and l is the number of nodes in the hidden layer.
6. The machine learning-based gas composition analysis method according to claim 4, characterized in that, The updated hidden layer weights satisfy: ; The updated hidden layer bias satisfies: ; The updated output layer weights satisfy: ; The updated output layer bias satisfies: ; in, w is the updated hidden layer weight corresponding to the i-th node of the input layer in the j-th node of the hidden layer. ij x is the hidden layer weight in the j-th node of the hidden layer corresponding to the i-th node of the input layer. i Let H be the input value of the i-th input node in the input layer, where η is the preset parameter learning coefficient, and H is the input value of the i-th input node in the input layer. j The hidden layer output result is given for the j-th node of the hidden layer. The updated output layer weights, u, are the output layer weights corresponding to the j-th hidden layer nodes in the k-th node of the output layer. jk The output layer weight corresponding to the j-th node of the hidden layer in the k-th node of the output layer, O k Y is the output result of the output layer at the k-th node of the output layer. k The label data is the label data corresponding to the k-th node of the output layer, where m is the number of nodes in the output layer. θ is the hidden layer bias corresponding to the j-th node of the updated hidden layer. j This represents the hidden layer bias corresponding to the j-th node in the hidden layer. θ is the output layer bias corresponding to the k-th node of the updated output layer. k This is the output layer bias corresponding to the k-th node of the output layer.
7. A machine learning-based gas composition analysis system, characterized in that, include: The acquisition module is used to acquire the oxygen content, carbon dioxide content, carbon monoxide content, and water content in the flue gas, as well as the gas density, combustion chamber temperature, and absolute humidity of the air. The first processing module is used to obtain the water content produced by combustion of fuel gas in flue gas based on the relationship between the carbon monoxide content of flue gas, the water content of flue gas, and the absolute humidity of air. The second processing module is used to obtain the excess air coefficient based on the oxygen content, carbon monoxide content, and carbon dioxide content of the flue gas through the excess air relationship. The prediction module is used to input the excess air coefficient, the flue gas oxygen content, the flue gas carbon dioxide content, the flue gas carbon monoxide content, the water content produced by combustion of fuel gas in the flue gas, the fuel gas density, and the combustion chamber temperature into the trained fuel gas composition prediction model to output the fuel gas composition analysis results. The training process of the gas composition prediction model includes: Acquire training data on gas composition and an initial neural network, wherein the training data on gas composition includes input data and label data, and the initial neural network includes an input layer, a hidden layer, an output layer, and a constraint layer; The input data is passed to the hidden layer through the input layer to obtain the output result of the hidden layer; The output of the hidden layer is passed to the output layer to obtain the initial output of the output layer; The initial result is passed to the constraint layer to obtain the prediction result output by the constraint layer; Based on the comparison results of the prediction results and the corresponding label data, the hidden layer weights, hidden layer biases, output layer weights and output layer biases in the initial neural network are updated to obtain the trained gas composition prediction model. The constraint layer includes constraints on total component quantity, carbon conservation, carbon-to-hydrogen ratio, calorific value of fuel gas, fuel gas density, upper and lower limits of fuel gas components, and alkane component range constraints; the initial results include the methane content, ethane content, propane content, and butane content of fuel gas; the process of passing the initial results to the constraint layer to obtain the prediction results output by the constraint layer includes: When the initial result simultaneously satisfies the constraints on total component amount, carbon conservation, carbon-to-hydrogen ratio, calorific value of fuel gas, density of fuel gas, upper and lower limits of fuel gas components, and range of alkane components, the initial result is determined as the predicted result. Otherwise, the solution space of the gas composition is determined according to the total component constraint, the carbon element conservation constraint, the carbon-hydrogen ratio constraint, the calorific value constraint of the gas, the gas density constraint, the upper and lower limits constraint of the gas composition and the alkane composition range constraint. Based on the initial result, an optimization is performed in the gas composition solution space, and the solution in the gas composition solution space that is closest to the initial result is determined as the prediction result; The total component constraint constraint satisfies: ; The carbon element conservation constraint satisfies: ; The carbon-hydrogen ratio constraint satisfies: ; The calorific value constraint of the gas satisfies: ; The gas density constraint satisfies: ; The upper and lower limits of the gas composition constraints satisfy: ; ; ; ; The alkane component range constraints satisfy: ; ; The prediction result satisfies: ; in, The methane content of the fuel gas, The ethane content of the fuel gas, The propane content of the fuel gas, V represents the butane content of the fuel gas. fg To obtain the volume of flue gas generated after combustion of the gas, A1 is a preset lower limit for the hydrocarbon ratio, A2 is a preset upper limit for the hydrocarbon ratio, B1 is a preset lower limit for the calorific value of the gas, B2 is a preset upper limit for the calorific value of the gas, C1 is a preset lower limit for the gas density, and C2 is a preset upper limit for the gas density. To find the objective function The minimum value, C i Let be the content of the i-th component in the predicted composition of the gas. R represents the content of the i-th component in the initial results of the gas composition. 4 For a four-dimensional solution space of the gas composition, This is the lower limit of the methane content in the fuel gas. This is the upper limit of the methane content in the fuel gas. This is the lower limit of the ethane content in the fuel gas. This is the upper limit of the ethane content in the fuel gas. This is the lower limit of the propane content in the fuel gas. This is the upper limit of the propane content in the fuel gas. This is the lower limit of the butane content in the fuel gas. This is the upper limit of the butane content in the fuel gas.
8. An electronic device, characterized in that, Including memory and processor; The memory is used to store computer programs; The processor is configured to, when executing the computer program, implement the machine learning-based gas composition analysis method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for determining mixing proportion of hydrogen-doped natural gas fuel, medium and product
CN118795087A
Gas turbine natural gas hydrogen-doped combustion optimization method and system
CN119312727A