Steam pipe network pipe section resistance coefficient correction method and computer program product thereof

The resistance coefficient of the steam pipe network segment is corrected through the genetic algorithm, which solves the problems of inaccurate steam pipe network complexity and resistance coefficient, improves the accuracy and robustness of the simulation model, and realizes efficient steam pipe network simulation calculation.

CN119089767AInactive Publication Date: 2024-12-06CHINA TOBACCO ZHEJIANG IND CO LTD

Patent Information

Application Number
CN202411041450.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-12-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

There are many internal nodes and complex structures in the steam pipeline network, which makes it difficult to accurately simulate steam quality. The inaccurate local resistance coefficient leads to a large deviation from the actual operation. It is difficult for traditional optimization methods to effectively deal with it.

Method used

Genetic algorithms are used to correct the resistance coefficient of the steam pipe network segment, and local resistance coefficients are represented by chromosomes. Parameters are optimized using sample data and fitness function, and cross and mutate operations are performed to generate new populations until the termination condition is met.

Benefits of technology

The accuracy and robustness of the simulation model are improved, the parameter settings are optimized, the calculation efficiency is improved, and efficient and accurate steam pipeline simulation calculation is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089767A_ABST
    Figure CN119089767A_ABST
Patent Text Reader

Abstract

The invention discloses a method for correcting a resistance coefficient of a pipe section of a steam pipe network and a computer program product thereof. The method comprises the following steps: S1, determining a parameter set of an actual parameter problem; s2, encoding the parameter set, wherein one chromosome represents one real number vector; s3, initializing the parameter population, and randomly generating an initial population consisting of N chromosomes with a determined length; s4, evaluating individuals in the initial group, calculating the model by adopting a large amount of sample data, comparing with an actual measurement value to generate a mechanism error, and taking a root-mean-square value of the mechanism error as a fitness function; s5, setting genetic algorithm parameters; s6, performing genetic manipulation, selection, crossover and variation to form a new population; and S7, judging whether a final condition is met or not, if not, returning to the step S4, and if a termination condition is met, outputting a parameter optimal solution. The method can effectively solve the correction problem of the local resistance coefficient in the steam pipe network simulation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of pipe network steam quality prediction, and in particular relates to a method for correcting a resistance coefficient of a steam pipe network section and a computer program product thereof. Background Art

[0002] Steam plays an indispensable role in the heating of Chinese residents and industrial production. Cogeneration is widely regarded as an effective measure for energy conservation and environmental protection. Domestic and foreign scholars have provided multi-faceted research on model construction and model calculation of steam district heating systems. The main technical means of steam network simulation calculation is to use fluid mechanics equations to establish the geometry and boundary conditions of the pipeline network, and to establish a pipeline network fluid calculation model based on the fluid properties and flow state, so as to obtain the changes in parameters such as velocity, temperature, and pressure of the fluid inside the pipeline. Many studies have shown that establishing a simulation calculation model of the pipeline network to predict, optimize and control the internal fluid operating parameters of the steam pipeline network can provide strong support for the efficient and stable operation of the pipeline network.

[0003] Due to the discontinuous use of steam, it is easy to cause water hammer and steam hammer in the pipeline, thus causing damage to the pipeline. That is to say, when the valve is opened and closed instantly in the heating pipeline network, or when there is a sudden flow change, the pressure fluctuation of the pipeline system will be too large. At this time, it is necessary to open the pressure regulating valve to release some steam to make the pressure drop back to a safe range.

[0004] At present, some scholars have studied the dynamic hydraulic characteristics of the heating network. You Shijun et al. established a non-steady-state hydraulic model of a single pipeline, proposed a solution method, and analyzed the delayed response characteristics of different pipeline parameters to the fluid. Yang Yi et al. established a mathematical model of a simple pipeline and performed dynamic simulation, reducing the pressure fluctuations during the operation of the pipeline network by adjusting the PID parameters. Zhao Fengmin et al. predicted the pressure of the steam network, which has certain guiding significance for the actual production of the enterprise, but has not been applied in practice. It can be seen that studying the dynamic response characteristics of the steam network can help predict the dynamic response behavior of the network. On the one hand, it can reduce the incidence of production accidents, and on the other hand, it can also optimize the design of the network system, which is of great significance to the safety and energy-saving regulation of the network.

[0005] However, there are many nodes inside the steam network, the structure is complex, the steam presents a variety of flow patterns, and the working conditions of the steam network change in real time over time, such as changes in steam load, adjustments to the network configuration, etc. This complexity makes it difficult to accurately simulate the quality of steam in the network. In addition, the long-term operation of the steam network will lead to problems such as pipeline corrosion and scaling of the pipe wall, making it difficult to accurately model the pipeline, which has long been a major problem in network simulation. For this reason, the accuracy of the steam network simulation model is limited by the accuracy of parameters such as the local resistance coefficient of each pipe section. If these parameters are inaccurate, the simulation results will deviate greatly from the actual operation. At the same time, the simulation model may show different performance under different operating conditions, and the model algorithm needs to remain stable and reliable under various conditions. However, the local resistance coefficient and other parameters in the current steam network are numerous and complex, and traditional optimization methods may be difficult to effectively handle them. Summary of the invention

[0006] In order to solve the above-mentioned technical problems existing in the prior art, the present invention provides a method for correcting the resistance coefficient of a steam pipe network section and a computer program product thereof, which can effectively solve the correction problem of the local resistance coefficient in the steam pipe network simulation model, improve the accuracy and robustness of the model, optimize the parameter setting, and improve the calculation efficiency, and finally realize efficient and accurate steam pipe network simulation calculation.

[0007] The technical solution adopted by the present invention is:

[0008] A method for correcting resistance coefficient of a steam pipe network section, characterized in that the method comprises the following steps:

[0009] S1. Determine the parameter set of the actual parameter problem, i.e., the local resistance coefficient between each pipe segment;

[0010] S2, encode the parameter set, a chromosome represents a real vector;

[0011] S3, initialize the parameter population and randomly generate an initial population consisting of N chromosomes of a certain length;

[0012] S4. Evaluate the individuals in the initial population, use a large amount of sample data to calculate the model, and compare it with the actual measurement value to generate a mechanism error, and use the root mean square value of the mechanism error as the fitness function; wherein the fitness function is expressed as:

[0013]

[0014] Among them, y i is the actual value, y i 'Calculated value for simulation;

[0015] S5, setting genetic algorithm parameters;

[0016] S6. Perform genetic operations, selection, crossover, and mutation to form a new population;

[0017] S7: Determine whether the final condition is met. If not, return to step S4. If the termination condition is met, output the optimal solution of the parameters.

[0018] Furthermore, in step S2, the local resistance coefficient of each pipe segment is used as a gene, and a real number is used to form a chromosome; each gene directly represents a real number, and the local resistance coefficient corresponding to this real number; assuming that there are N pipe segments, the local resistance coefficient of each pipe segment is in [L i ,U i ], you can randomly generate:

[0019] chromosome j ={x1, x2, ..., x N}where x i ∈[L i , U i ] (2).

[0020] Furthermore, in step S5, the crossover probability is set to 0.8, the mutation probability is set to 0.2, the population size is set to 20, and the genetic generation number is set to 100 in the genetic algorithm parameters.

[0021] Further, in step S6, the selection includes roulette selection, sorting selection and tournament selection; the crossover method includes single-point crossover, multi-point crossover and uniform crossover; the mutation method includes bit mutation and Gaussian mutation.

[0022] Furthermore, the roulette selection specifically includes the following steps:

[0023] Calculate the fitness value of each individual;

[0024] Calculate the probability of each individual being selected according to the fitness value;

[0025] Assume that there are N individuals in the population, and the fitness value of each individual is f i , the total fitness value is:

[0026]

[0027] Then the probability of individual i being selected is:

[0028]

[0029] Calculate the cumulative probability for each individual:

[0030]

[0031] Generate a random number r in the range [0,1] and select individuals according to the cumulative probability; repeat the above process until the required number of individuals is selected.

[0032] Furthermore, the specific process of the single-point crossover is: randomly selecting a crossover point on the chromosome, exchanging the gene fragments before and after the crossover point, so as to produce two new offspring individuals;

[0033] The specific process of the Gaussian mutation is: randomly selecting one or more genes in the chromosome for mutation, and adding a random disturbance that obeys the normal distribution to the selected gene.

[0034] Furthermore, in step S7, the termination condition is reaching the maximum genetic generation number.

[0035] A computer device, characterized in that it includes a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the above-mentioned method.

[0036] A computer-readable storage medium, characterized in that a computer program or instruction is stored on the computer-readable storage medium, and the computer program or instruction implements the above-mentioned method when executed by a processor.

[0037] A computer program product, characterized in that it includes a computer program or instructions, and the computer program or instructions implement the above-mentioned method when executed by a processor.

[0038] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0039] 1. The present invention can effectively solve the correction problem of the local resistance coefficient in the steam pipe network simulation model, improve the accuracy and robustness of the model, optimize parameter settings, improve calculation efficiency, and ultimately achieve efficient and accurate steam pipe network simulation calculation.

[0040] 2. The present invention has the advantages of easy operation, low cost, low experimental intensity, and multi-channel simultaneous operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 This is a flow chart of steam pipeline parameter correction according to the present invention. DETAILED DESCRIPTION

[0042] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.

[0043] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0044] The present invention will be described in detail below in conjunction with exemplary embodiments with reference to the accompanying drawings.

[0045] refer to Figure 1 A method for correcting resistance coefficient of a steam pipe network section of the present invention comprises the following steps:

[0046] S1. Determine the parameter set of the actual parameter problem, that is, the local resistance coefficient between each pipe section.

[0047] S2. Encode the parameter set. Real number encoding does not require numerical conversion, so this method is used for encoding. Usually, a chromosome represents a real number vector.

[0048] S3. Initialize the parameter population and randomly generate an initial population consisting of N chromosomes of a certain length.

[0049] S4. Evaluate the individuals in the group. The ultimate goal of pipe section parameter correction is to improve the accuracy of the steam network simulation calculation model and ensure the robustness of the model algorithm. Therefore, a large amount of sample data is needed to calculate the model and compare it with the actual measurement value to generate a mechanism error. The root mean square value of the mechanism error is used as the fitness function, where the fitness function is expressed as:

[0050]

[0051] Among them, y i is the actual value, y' i is the simulation calculation value;

[0052] S5. Set the genetic algorithm parameters. In order to speed up the calculation without excessively affecting the calculation accuracy, the crossover probability is set to 0.8, the mutation probability is set to 0.2, the population size is set to 20, and the genetic generation is set to 100.

[0053] S6. Perform genetic operations, selection, crossover, and mutation to form a new population.

[0054] S7. Determine whether the final condition is met. If not, return to step 4. If the termination condition is met, output the optimal solution of the parameters.

[0055] Specifically, the termination condition is to reach the maximum genetic generation number.

[0056] In the present invention, real number encoding directly uses the actual value of the parameter to represent the chromosome, without the need for discretization or other forms of numerical conversion. The specific method is as follows:

[0057] 1) Chromosome structure: The local resistance coefficient of each tube segment is taken as a gene, and a real number is used to form a chromosome.

[0058] 2) Gene representation: Each gene directly represents a real number, which is the corresponding local resistance coefficient.

[0059] The initial population is randomly generated within a certain range (usually within a pre-set physical reasonable range). Assuming there are N pipe segments, and the local resistance coefficient of each pipe segment is between [Li, Ui], it can be randomly generated:

[0060] chromosome j ={x1, x2, ..., x N}where x i ∈[L i , U i ] (2).

[0061] Specifically, suppose we have 3 pipe segments, and the local resistance coefficients of each pipe segment are represented by k1, k2, and k3, and their ranges are [0.1, 1.0], [0.2, 1.5], and [0.3, 2.0], respectively. Then a chromosome can be represented as:

[0062] Chromosome = {k1, k2, k3} = {0.5, 1.2, 1.8}

[0063] When initializing the population, multiple chromosomes like this may be generated:

[0064] Population = {{0.5, 1.2, 1.8}, {0.7, 0.9, 1.5}, ...}.

[0065] In step S6, the selection operation is to select excellent individuals from the current population to generate the next generation population. The commonly used selection method is roulette selection, which specifically includes the following steps:

[0066] Calculate the fitness value of each individual;

[0067] Calculate the probability of each individual being selected according to the fitness value;

[0068] Assume that there are N individuals in the population, and the fitness value of each individual is f i , the total fitness value is:

[0069]

[0070] Then the probability of individual i being selected is:

[0071]

[0072] Calculate the cumulative probability for each individual:

[0073]

[0074] Generate a random number r in the range [0,1] and select individuals according to the cumulative probability; repeat the above process until the required number of individuals is selected.

[0075] In step S6, the crossover operation is to recombine the genes of two parent individuals to produce new offspring individuals. Commonly used crossover methods include single-point crossover, which specifically includes the following steps:

[0076] 1) Select a crossover point: randomly select a crossover point on the chromosome;

[0077] 2) Exchange gene fragments: Exchange the gene fragments before and after the crossover point to produce two new offspring individuals.

[0078] For example, suppose the two parent chromosomes are:

[0079] Parent 1 = {0.5, 1.2, 1.8}

[0080] Parent 2 = {0.7, 0.9, 1.5}

[0081] If the crossover point is in the second position, the offspring generated after the crossover are:

[0082] Offspring 1 = {0.5, 0.9, 1.5}

[0083] Offspring 2 = {0.7, 1.2, 1.8}.

[0084] In step S6, the mutation operation is to randomly change the genes in the chromosome to increase the diversity of the population. The commonly used mutation method is Gaussian mutation, which specifically includes the following steps:

[0085] 1) Select mutant genes: randomly select one or more genes in the chromosome for mutation.

[0086] 2) Add perturbation: Add a random perturbation that follows a normal distribution to the selected gene.

[0087] For example, to mutate the first gene in offspring 1:

[0088] k1′=k1+randn(0,σ)

[0089] Assuming σ = 0.1, the mutated gene may be:

[0090] k1′=0.5+randn(0,0.1)=0.5+0.05=0.55

[0091] The mutated chromosome is:

[0092] Offspring 1 = {0.55, 0.9, 1.5}.

[0093] In order to verify the robustness and superiority of the modified model, 1440 data of all working conditions on a certain day were simulated and compared with the calculation results of the model before correction. The root mean square error (RMSE) and mean relative error (MRE) were used to evaluate the calculation parameters of the simulation model. Table 1 shows the evaluation results before and after the model correction.

[0094] Table 1 Comparison of model calculation parameter evaluation

[0095]

[0096] From the comparison results, it can be seen that after parameter correction, the root mean square error and average relative error of the model are reduced, and the accuracy of the model is improved. The average relative error of pressure is 1.058%, and the average relative error of temperature is 7.144%, which meets the requirements of industrial calculation accuracy as a whole. The model steady-state simulation can complete the single-condition calculation within 5 seconds, which provides conditions for the construction of a digital twin platform for steam pipeline networks.

[0097] Through the above methods, genetic operations can be performed to select, cross over and mutate to form a new population, continuously optimize the parameters of the steam network simulation calculation model, and improve the model accuracy and robustness.

[0098] A computer device of the present invention comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the above method.

[0099] A computer-readable storage medium of the present invention stores a computer program or instruction, and the computer program or instruction implements the above method when executed by a processor.

[0100] A computer program product of the present invention includes a computer program or instructions, and the computer program or instructions implement the above method when executed by a processor.

[0101] The above is a description of the embodiments of the present invention. Through the above description of the disclosed embodiments, professionals and technicians in the field can implement or use the present invention. Various modifications to these embodiments will be apparent to professionals and technicians in the field. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown in this article, but will conform to the widest range consistent with the principles and novelties disclosed herein.

[0102] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for correcting resistance coefficient of a steam pipe network section, characterized in that: The method comprises the following steps: S1. Determine the parameter set of the actual parameter problem, i.e., the local resistance coefficient between each pipe segment; S2, encode the parameter set, a chromosome represents a real vector; S3, initialize the parameter population and randomly generate an initial population consisting of N chromosomes of a certain length; S4. Evaluate the individuals in the initial population, use a large amount of sample data to calculate the model, and compare it with the actual measurement value to generate a mechanism error, and use the root mean square value of the mechanism error as the fitness function; wherein the fitness function is expressed as: Among them, y i is the actual value, y i 'Calculated value for simulation; S5, setting genetic algorithm parameters; S6. Perform genetic operations, selection, crossover, and mutation to form a new population; S7: Determine whether the final condition is met. If not, return to step S4. If the termination condition is met, output the optimal solution of the parameters.

2. A method for correcting resistance coefficient of a steam pipe network section according to claim 1, characterized in that: In step S2, the local resistance coefficient of each pipe segment is used as a gene, and a real number is used to form a chromosome; each gene directly represents a real number, and the local resistance coefficient corresponding to this real number; assuming that there are N pipe segments, the local resistance coefficient of each pipe segment is in [L i ,U i ], you can randomly generate: chromosome j ={x1, x2, ..., x N }where x i ∈[L i , U i ] (2).

3. A method for correcting resistance coefficient of a steam pipe network section according to claim 1, characterized in that: In step S5, the crossover probability is set to 0.8, the mutation probability is set to 0.2, the population size is set to 20, and the genetic generation number is set to 100 in the genetic algorithm parameters.

4. A method for correcting resistance coefficient of a steam pipe network section according to claim 1, characterized in that: In step S6, the selection includes roulette selection, sort selection and tournament selection; the crossover method includes single-point crossover, multi-point crossover and uniform crossover; the mutation method includes bit mutation and Gaussian mutation.

5. A method for correcting resistance coefficient of a steam pipe network section according to claim 4, characterized in that: The roulette selection specifically includes the following steps: Calculate the fitness value of each individual; Calculate the probability of each individual being selected according to the fitness value; Assume that there are N individuals in the population, and the fitness value of each individual is f i , the total fitness value is: Then the probability of individual i being selected is: Calculate the cumulative probability for each individual: Generate a random number r in the range [0,1] and select individuals according to the cumulative probability; repeat the above process until the required number of individuals is selected.

6. A method for correcting resistance coefficient of a steam pipe network section according to claim 4, characterized in that: The specific process of the single-point crossover is: randomly select a crossover point on the chromosome, and exchange the gene fragments before and after the crossover point to produce two new offspring individuals; The specific process of the Gaussian mutation is: randomly selecting one or more genes in the chromosome for mutation, and adding a random disturbance that obeys the normal distribution to the selected gene.

7. A method for correcting resistance coefficient of a steam pipe network section according to claim 1, characterized in that: In step S7, the termination condition is reaching the maximum genetic generation number.

8. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the method according to claims 1 to 7.

9. A computer-readable storage medium, characterized in that: The readable storage medium stores a computer program or instruction, and when the computer program or instruction is executed by a processor, the method according to claims 1 to 7 is implemented.

10. A computer program product, characterized in that The method comprises a computer program or an instruction, and when the computer program or the instruction is executed by a processor, the method as claimed in claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Steam pipe network friction resistance coefficient identification system based on genetic algorithm

    CN102508988A

  • Genetic ant colony algorithm based determination method for water cool storage air-conditioning system energy-saving optimal control strategy

    CN106940068A

  • Mobile semi-implicit particle method key parameter optimization method based on genetic algorithm

    CN113836791A

  • Steam simulation calculation method based on error correction of kernel extreme learning machine

    CN114896891A

Cited By

  • Large complex steam pipe network heat preservation engineering evaluation method based on digital twinborn model, electronic equipment and computer program product

    CN119379105A

  • A method, electronic equipment and computer program product for evaluating thermal insulation engineering of large and complex steam pipe networks based on digital twin models

    CN119379105B

  • Airflow ventilation analogue simulation test method, system, equipment and medium

    CN119984732A

  • Sanding machine operation deviation identification device based on digital twinning

    CN120278590A