A pipeline end valve closing method based on machine learning and intelligent algorithm

By combining machine learning and intelligent algorithms, the closure of the end valve in gravity flow water conveyance pipelines was optimized, solving the problems of low computational efficiency and weak global optimization capabilities. This achieved synergistic optimization of safety and economy, reducing water hammer effects and operational risks.

CN121503227BActive Publication Date: 2026-04-28CHINA INST OF WATER RESOURCES & HYDROPOWER RES +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA INST OF WATER RESOURCES & HYDROPOWER RES
Filing Date
2025-11-06
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

The existing optimization of valve closure at the end of gravity flow water conveyance pipelines suffers from low computational efficiency, strong subjectivity, weak global optimization capability, insufficient economic quantification, and poor dynamic adaptability, making it difficult to effectively reduce water hammer effects and resulting in high risks to the safe operation of the pipeline network.

Method used

Hydraulic transient simulation prediction is performed using a combination of inverse neural network, random forest, and support vector machine with the characteristic line method. Valve closing parameters are optimized using a multi-objective particle swarm optimization algorithm, and the optimal closing scheme is determined by the entropy weight superior solution distance method. The combination of machine learning and intelligent algorithms achieves synergistic optimization of water hammer protection and economic efficiency.

Benefits of technology

It improves pipeline operation safety, reduces the probability of pipe bursts and leaks, provides cost-effective valve shut-off parameter combinations, adapts to different operating conditions, extends equipment life, and reduces total life cycle costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121503227B_ABST
    Figure CN121503227B_ABST
Patent Text Reader

Abstract

The application discloses a pipeline end valve closing method based on machine learning and intelligent algorithm, which comprises three models of backstepping neural network, random forest and support vector machine, combines with a characteristic line method to simulate and predict hydraulic transient, and retains valve closing random characteristic samples during training; then, initial water level, two-stage valve closing time and closing percentage are taken as variables, MOPSO algorithm is used to minimize pressure fluctuation and cost, maximize safety margin, and a Pareto optimal solution set is generated; finally, the best model and optimal valve closing parameter combination are determined through EW-TOPSIS decision making. The scheme of the application is close to the actual situation, can guarantee pipeline safety, reduce pipe explosion and leakage risk, reduce commissioning cost, enhance adaptability of different working conditions and stability under extreme conditions, provides a basis for pipeline network dynamic regulation and control, prolongs equipment life, and reduces whole cycle cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hydraulic transition process technology, and in particular to a method for closing a pipeline end valve based on machine learning and intelligent algorithms. Background Technology

[0002] With my country's socio-economic development, water consumption in industry, agriculture, and cities continues to increase, exacerbating the contradiction between water supply and demand. Inter-basin water transfer projects have become a key means to address the uneven distribution of water resources. Long-distance gravity flow water transfer projects, with their advantages of fully utilizing water potential energy, minimizing water loss, convenient operation and management, and requiring no external power, play a crucial role in alleviating the spatial and temporal imbalance of water resources and urban water shortages. However, gravity flow water transfer projects involve long pipelines, large investments, and are often laid along undulating terrain with significant elevation differences. The water transfer process must consider terrain gradient, hydraulic gradient, and water pressure balance within the pipe wall. Improper opening and closing of valves at the pipeline end can easily lead to sudden pressure changes. When the water hammer pressure exceeds the pipeline's pressure-bearing limit, it will directly cause a pipe burst, threatening the safe operation of the pipeline network. Therefore, reasonable prediction and optimization of the valve closing parameters at the end of gravity flow pipelines can help reduce the water hammer effect, ensure safe pipeline operation, and reduce costs.

[0003] Currently, the optimization of valve closure patterns in gravity flow water conveyance projects mainly employs linear closure, two-stage, and three-stage broken-line closure methods. Linear closure is the most widely used, but its slow closing action makes it difficult to meet rapid flow interruption requirements. Two-stage and three-stage broken-line closure involve closing the valve at different rates, with numerous combinations of closing angles and times at each stage, requiring a series of trials and optimizations to determine the optimal closure scheme. Water hammer calculations typically use the method of characteristics (MOC). Traditional optimization methods rely on empirical judgment, gradient methods, and numerical simulations to suppress pressure fluctuations by adjusting protective equipment parameters or the closure pattern of downstream valves. A few studies have introduced genetic algorithms to repeatedly optimize valve closure schemes in two, three, and four stages, as well as three stages with a plateau period. The distribution of optimization results is statistically analyzed, and a valve closure curve simplification strategy is proposed. Based on this, the water hammer problem of downstream valve closure in a two-pipe gravity flow water conveyance system with connecting pipes during pipeline accidents has been optimized.

[0004] Existing technologies can effectively reduce water hammer effects, but they still suffer from problems such as low computational efficiency, strong subjectivity, weak global optimization capabilities, insufficient economic quantification, and poor dynamic adaptability in predicting valve closure at the end of gravity flow pipelines and optimizing water hammer protection. Summary of the Invention

[0005] To address the aforementioned problems, this invention presents a pipeline end valve closing method based on machine learning and intelligent algorithms. Specifically, it proposes a method for predicting valve closing parameters and optimizing water hammer protection in gravity flow pipelines. This method combines Backpropagation Neural Network (BPNN), Random Forest (RF), and Support Vector Machine (SVM) with the method of characteristics to simulate and predict hydraulic transients. The valve closing parameters are optimized using the Multi-Objective Particle Swarm Optimization (MOPSO) algorithm, and the Entropy Weighted Best-Choice Solution Distance (EW-TOPSIS) method is employed to determine the effective linkage between hydraulic transients and the intelligent optimization algorithm, achieving synergistic optimization of reducing water hammer effects, engineering safety, and economy.

[0006] This invention is implemented as follows:

[0007] A method for closing a pipeline end valve based on machine learning and intelligent algorithms includes the following steps:

[0008] Step S1, Model Building and Machine Learning Simulation:

[0009] Three machine learning models, namely Backpropagation Neural Network (BPNN), Random Forest (RF) and Support Vector Machine (SVM), were used in combination with the feature line method to simulate and predict hydraulic transients. During the training phase, random characteristic samples of valve closure at the end of the pipeline were retained.

[0010] Step S2, optimization is performed using the Multi-Objective Particle Swarm Optimization (MOPSO) algorithm:

[0011] Using the MOPSO algorithm with initial water level, first-stage closing time of the valve at the end of the pipeline, first-stage closing percentage of the valve at the end of the pipeline, and second-stage closing time of the valve at the end of the pipeline as design variables, and minimizing pressure fluctuation, maximizing safety margin, and minimizing cost as objective functions, a Pareto optimal solution set is generated.

[0012] Step S3, Entropy Weighted Distance Method (EW-TOPSIS) Decision:

[0013] The Pareto optimal solution set generated by MOPSO optimization is processed based on EW-TOPSIS decision-making, and the best model and the valve closing parameter combination with the best overall benefits are finally determined.

[0014] Furthermore, in step S1, a pipeline protection safety evaluation range is introduced, setting upper and lower limits for pipeline pressure resistance and yield strength. The calculation formulas are as follows:

[0015]

[0016] in, These are the upper and lower limits of the pipeline's pressure resistance. T represents the upper and lower limits of yield strength, and T represents the safety assessment range for water pipeline protection.

[0017] Furthermore, in step S1, the air valve inlet orifice diameter is determined during model construction. Outlet aperture Pipe diameter and initial water level As input data, the safety margins of positive and negative pressure (M, N) are used as output.

[0018] Furthermore, step S1 includes processing the machine learning training results by employing mean squared error (MSE), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and goodness of fit. The prediction performance is quantified using the following formula:

[0019]

[0020]

[0021]

[0022]

[0023]

[0024] Among them, O i This is the actual output; S i For predicting output; This is the average of the actual output; is the mean of the predicted output; and n is the number of samples.

[0025] Furthermore, in step S2, the multi-objective particle swarm optimization algorithm uses dynamic inertia weights to update particle velocity and position adaptively based on the number of iterations. The calculation formula is as follows:

[0026]

[0027]

[0028] in, The current update rate of the particles, This is the particle's current position. The velocity of the particle at the previous moment. Let be the individual extreme value of the i-th particle. is the global extremum, a1 and a2 are learning factors, both constants; rand() and Rand() are random numbers on [0,1]. This is the inertial weight.

[0029] Furthermore, in step S2, the Pareto optimal solution set is generated by screening Pareto front solutions through non-dominated sorting and crowding calculation, and by adopting an elite retention strategy.

[0030] Furthermore, in step S3, the Pareto optimal solution set generated by MOPSO optimization based on EW-TOPSIS decision is processed, including forward processing and data standardization of the optimal solution set to eliminate the influence of dimensions, normalization of the data using range normalization; weights are calculated using entropy weight method to construct a weighted standardization matrix to determine the ideal solution; and Euclidean distance and relative proximity are calculated.

[0031] The beneficial effects of this invention are as follows: This invention provides a pipeline end valve closing method based on machine learning and intelligent algorithms. It integrates the characteristic line method with machine learning models such as BPNN, RF, and SVM, follows the core laws of fluid mechanics, captures complex nonlinear relationships, and compensates for the biases of traditional models. It introduces random characteristic sample training for valve closing to adapt to non-ideal working conditions such as operational errors and parameter fluctuations in actual engineering, resulting in prediction results that are closer to the actual field conditions.

[0032] The model enhances pipeline operation safety by simulating transient responses under random operating conditions. It can identify risk points such as excessive pressure and insufficient safety margin in advance. Combined with MOPSO multi-objective optimization, it outputs valve parameter combinations with minimum pressure fluctuation and maximum safety margin to ensure that the pipeline is within the safety evaluation range and significantly reduce the probability of accidents such as pipe bursts and leaks.

[0033] With cost minimization as one of the objectives, Pareto optimal solution sets and EW-TOPSIS decision-making are used to select cost-effective solutions while meeting safety requirements, reducing redundant investment. The optimal parameter combination can directly guide on-site operations, avoiding the difficulty in implementing traditional optimization results. At the same time, it provides data support for pipeline maintenance and renovation throughout its entire life cycle, enhances adaptability to different operating conditions and stability under extreme conditions, assists in the dynamic control of smart pipeline networks, extends equipment life, reduces total life cycle costs, and can be linked with monitoring systems to achieve risk early warning.

[0034] The present invention will be explained in detail below with reference to the accompanying drawings and specific embodiments. Attached Figure Description

[0035] Figure 1 This is a flowchart of machine learning simulation, MOPSO algorithm optimization, and EW-TOPSIS decision-making in Embodiment 1 of the present invention.

[0036] Figure 2 This is a schematic diagram of the gravity flow water pipeline in Embodiment 1 of the present invention;

[0037] Figure 3This is a schematic diagram of the random forest (RF) topology in Embodiment 1 of the present invention;

[0038] Figure 4 This is a schematic diagram of the backpropagation neural network (BPNN) topology in Embodiment 1 of the present invention;

[0039] Figure 5 This is a schematic diagram of the support vector machine (SVM) topology in Embodiment 1 of the present invention. Detailed Implementation

[0040] Example 1:

[0041] This embodiment presents a method for closing a pipeline end valve based on machine learning and intelligent algorithms, such as... Figure 1-5 As shown, it includes the following steps:

[0042] Step S1, Model Building and Machine Learning Simulation:

[0043] A combination of Backpropagation Neural Network (BPNN), Random Forest (RF), and Support Vector Machine (SVM) with the feature line method is used to simulate and predict hydraulic transients. During the training phase, random characteristic samples of valve closure at the pipeline end are retained. In the model training process, this randomness (such as the statistical distribution of closure time and dynamic fluctuations in rate) is transformed into input features using the feature line method and used to construct the training dataset for the machine learning algorithm to simulate the nondeterministic response of actual hydraulic transients. The process includes the following steps:

[0044] S11 introduces a pipeline protection safety evaluation, assessing the protection effectiveness of different schemes for water hammer caused by the closure of valves at the pipeline end. The safety evaluation range is calculated using the following formula:

[0045] (1)

[0046] in, These are the upper and lower limits of the pipeline's pressure resistance. T represents the upper and lower limits of yield strength, and T is the safety assessment range for water pipeline protection. For pipelines with air valves installed, when the valve at the end of the pipeline is opened to closed, the maximum and minimum pressures of the pipeline are closer to the yield strength, indicating that the scheme has better protection effect and higher safety margin.

[0047] S12, Input and output parameter definition, specifying the air valve inlet orifice diameter. Outlet aperture Pipe diameter and initial water level As input data, the safety margins of positive and negative pressures (M, N) are considered as the model output. The smaller the values ​​of M and N, the higher the safety margin of the proposed scheme and the better the protection effect. The calculation formula is as follows:

[0048] (2)

[0049] In the formula, and These represent the maximum and minimum pressures at each node of the water supply pipeline.

[0050] S13 uses a combination of BPNN, RF, SVM and the characteristic line method to simulate and predict hydraulic transients, and trains a pressure safety margin prediction model.

[0051] BPNN is a supervised learning method with strong multidimensional function nonlinear mapping capabilities, and its corresponding topological structure graph is shown below. Figure 4 As shown, This represents the connection weights between the input layer and the hidden layer. This represents the connection weights between the hidden layer and the output layer. 'b' and 'b' represent the threshold values ​​for the hidden layer and output layer, respectively. The formula for calculating the control range of the number of nodes in the hidden layer is as follows:

[0052] (3)

[0053] Where J is the number of nodes in the hidden layer; P and q are the number of nodes in the input layer and output layer, respectively, and σ is an integer between 1 and 10.

[0054] Random Forest (RF) is a machine learning method based on bagging ensemble learning theory to avoid high-probability overfitting. It involves performing extensive random sampling to obtain different subsets of the original data and training different decision-based learners on each subset. The generated decision trees are then combined into a random forest, and the average prediction of all decision trees is used as the final result. In positive and negative pressure RF models, the impact of input parameters such as air valves on the protective effect is not equal. The importance of the output value is quantified by calculating the out-of-bag (OOB) data error, as shown in the following formula:

[0055] (4)

[0056] Among them, T Xi For feature X i The impact of importance; N is the size of the decision tree (RF), i.e., the number of decision trees; T 1q and T 2q These represent the Out-of-Body (OOB) errors before and after adding noise interference. Adding noise interference can randomly change feature X. i The sampled value at point T. If noise perturbation is added, then T... 2q A sharp rise, characteristic X i It has a greater impact on the output value.

[0057] The SVM model is a generalized linear classifier that uses kernel techniques and supervised learning to classify data from two variables. Its mathematical model calculation formula is as follows:

[0058] (5)

[0059] in, Let b be the normal vector of the optimal hyperplane, and b be a constant. This is the feature vector of the sample.

[0060] The objective function and constraints are calculated using the following formulas:

[0061] (6)

[0062] in, The total number of samples.

[0063] SVM is used to perform regression prediction on water hammer protection for valve closure at the end of a pipeline. The mathematical model is then transformed to solve the Support Vector Regression (SVR) problem. The calculation formula is as follows:

[0064] (7)

[0065] Where C is the penalty factor. For insensitive loss parameters, and These are slack variables.

[0066] Build width 2 The interval band is defined, and a slack variable is introduced for each sample point (xi, yi). and ,like Figure 5 As shown. If the prediction of the sample falls within the allowable range of the slack variables, the prediction is considered correct.

[0067] In hydraulic transients, the characteristic line is the propagation trajectory of pressure waves within a pipe, representing the physical path of transient disturbance energy transfer. Hydraulic transients are caused by disturbances in the fluid within the pipe due to valve opening and closing, pump start-up and shutdown, etc., manifesting as pressure waves and transient flow rates. These disturbances exhibit randomness; for example, valve closing time may fluctuate within a statistical range, and pump start-up and shutdown rates may dynamically change due to operating conditions. Consequently, the resulting pressure wave propagation speed and the amplitude of transient flow rates also exhibit nondeterministic characteristics.

[0068] The mathematical description of transient processes relies on the Saint-Venant equations. These partial differential equations cannot be directly solved analytically. The method of characteristics solves this problem through dimensionality reduction. First, the partial differential equations are transformed into ordinary differential equations of characteristic lines, and then further discretized into algebraic equations. The method of characteristics can transform the randomness of disturbances (such as the probability distribution of valve closing time and the dynamic parameters of rate fluctuations) into quantifiable boundary conditions or initial parameters, which can be substituted into the discretized algebraic equations to capture and calculate the random characteristics of pressure and flow transients in pipelines.

[0069] S14 uses mean squared error (MSE), root mean squared error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and goodness of fit. The predictive performance of the three machine learning models is quantified using the following formulas:

[0070] (8)

[0071] (9)

[0072] (10)

[0073] (11)

[0074] (12)

[0075] Among them, O i This is the actual output; S i For predicting output; This is the average of the actual output; is the mean of the predicted output; and n is the number of samples.

[0076] By quantifying these five indicators, we can achieve accurate quantification of model performance, intuitive comparison of results, clear matching of applicable scenarios, and clear guidance for optimization. MSE and RMSE focus on reflecting the overall level of error while amplifying the impact of extreme biases; MAE focuses on reflecting the average distribution characteristics of error; and MAPE intuitively shows the proportional relationship between error and the true value. Used to measure the model's ability to interpret data. Five indicators comprehensively cover the model's prediction accuracy and performance from different dimensions such as absolute error, relative error, overall bias, and fit effect, avoiding the one-sidedness of evaluation by a single indicator.

[0077] Step S2, optimization is performed using the Multi-Objective Particle Swarm Optimization (MOPSO) algorithm:

[0078] The optimization design variables are: initial water level, first-stage closing time of the valve at the end of the pipeline, first-stage closing percentage of the valve at the end of the pipeline, and second-stage closing time of the valve at the end of the pipeline. The objective variables are: minimizing pressure fluctuation, maximizing safety margin, and minimizing cost as objective functions.

[0079] These objectives are inherently conflicting; improving one objective may lead to a decline in the performance of others. Multi-objective Particle Swarm Optimization (MOPSO) addresses this conflict by efficiently searching for and obtaining the set of non-dominated solutions on the Pareto front. It boasts high search efficiency, fast convergence to reduce computational costs, and ensures a uniform distribution of solutions in the objective space through mechanisms such as crowding calculation. This provides a wealth of choices for decision-making, allowing for the acquisition of high-quality solutions that balance multiple objectives without repeated trial and error. The specific steps are as follows:

[0080] S21, Initialize the population and read basic data:

[0081] Define the particle swarm size, decision variable dimensions (4, adjustable design variables: initial water level, first-stage closure time of the pipeline end valve, first-stage closure percentage of the pipeline end valve, and second-stage closure time of the pipeline end valve, all expressed as actual values), and number of objective functions (3: minimize pressure fluctuation, maximize safety margin, and minimize cost); randomly generate the initial particle positions and velocities; initialize the external elite pool and set its maximum capacity; set the initial position of each particle as the individual extreme value (pBest), and do not set the global extreme value (gBest) for the time being.

[0082] Read the relevant data from the model building and machine learning simulation in Step 1 to provide a foundation for subsequent optimization calculations. Set the initial iteration count Gen=0, set the maximum iteration count, and begin iterative optimization.

[0083] S22, Calculate the population fitness value:

[0084] Substitute the current position of each particle into the simulation model to obtain the simulation results; calculate the multi-objective function value for each particle based on the simulation results, and the formula for calculating the objective function is as follows:

[0085] (13)

[0086] The constraints are:

[0087] (14)

[0088] Where, x= Let X be an n-dimensional decision vector, and let X be an n-dimensional decision space; y = Let Y be the m-dimensional target variable; Y is the m-dimensional target space; It is a system constraint.

[0089] S23, Update individual best value (pBest):

[0090] For each particle, compare its current position with its own historical best solution (pBest) in terms of dominance.

[0091] When the current position dominates pBest, update pBest to the current position; when neither dominates the other, retain the better position based on congestion; when pBest dominates the current position, pBest remains unchanged.

[0092] S24, Calculate density information (non-dominated ordering and crowding):

[0093] Collect the current particle position, pBest, and external elite pool solutions. First, classify the solutions into levels by non-dominated sorting, with non-dominated solutions (Pareto front solutions) being the highest level. Prioritize retaining high-level solutions as candidates for pBest and gBest. Then, calculate the crowding degree of non-dominated solutions of the same level to provide a basis for subsequent gBest selection.

[0094] S25, Update global extreme value (gBest)

[0095] Select gBest from the external elite pool: prioritize the highest-level Pareto front solution; if there are many solutions of the same level, select the one with lower crowding to enhance diversity; if the elite pool is empty, select from the current population's pBest according to the above rules.

[0096] S26, Update particle position and velocity:

[0097] Based on dynamic inertia weights, the velocity and position of particles are updated. The formula for velocity update is as follows:

[0098] (15)

[0099] The formula for calculating the location update is as follows:

[0100] (16)

[0101] in, The current update rate of the particles, This is the particle's current position. The velocity of the particle at the previous moment. Let be the individual extreme value of the i-th particle. is the global extremum, a1 and a2 are learning factors, both constants; rand() and Rand() are random numbers on [0,1]. This is the inertial weight.

[0102] S27, Output the optimal solution:

[0103] Determine whether the iteration count Gen has reached the preset maximum iteration count. If not, execute Gen = Gen + 1, and return to step S22 to continue iterating based on the intermediate result of the current iteration. If the maximum iteration count has been reached, stop the optimization.

[0104] After optimization stops, the solutions generated in the current round are first included in an external elite pool. Then, all solutions in the pool are re-screened to extract the final Pareto front non-dominated solution set (there is no dominance relationship in the set, only the optimal non-dominated solution is retained). The decision variable values ​​(initial water level, valve closing parameters, etc.) and objective function values ​​(minimize pressure fluctuation, maximize safety margin and minimize cost) corresponding to each solution are output as the decision basis for water hammer protection scheme.

[0105] To filter and retain high-quality solutions in multi-objective optimization, the following strategy is used to assist particle updates:

[0106] Non-dominated sorting: All solutions found by the particle swarm search (including the current position and the historical best solution) are judged in terms of dominance relationship. Non-dominated solutions (Pareto front solutions) are classified into the highest level, and the remaining solutions are classified according to the degree of dominance. Solutions with higher levels are preferentially retained as candidates for pBest and gBest.

[0107] Crowding degree calculation: For non-dominated solutions of the same level, calculate their crowding degree in the target space (distance between solutions), and prioritize the solution with lower crowding degree (more uniform distribution) as gBest to avoid high-quality solutions being concentrated in local regions and enhance the diversity of solutions;

[0108] Elite retention strategy: Establish an external elite pool, store selected Pareto front solutions in the pool, periodically remove old solutions dominated by new solutions, and control the size of the pool through crowding to ensure that the update of pBest and the selection of gBest can be based on high-quality solutions in the elite pool, guiding particles to search for better Pareto front directions.

[0109] Step S3, Entropy Weighted Distance Method (EW-TOPSIS) Decision:

[0110] EW-TOPSIS employs entropy weighting and similarity analysis with ideal solutions for ranking preference decisions, providing objective and accurate comprehensive evaluation and decision-making basis for multi-attribute decision problems. This method combines the objective weighting advantage of entropy weighting with the superior-inferior-inferior solution distance analysis logic of the Top-and-Best Solution Distance Method (TOPSIS). Through steps such as data standardization, determining indicator weights using entropy weighting, constructing a weighted matrix, identifying ideal and negative ideal solutions, calculating proximity, and ranking, it effectively reduces subjective interference, comprehensively covers multi-indicator information, accurately reflects the differences in quality between evaluated objects, efficiently handles complex decision problems, and provides intuitive and comparable evaluation results.

[0111] S31, Forward Data Processing and Standardization:

[0112] The Pareto optimal solution set generated by MOPSO optimization is subjected to forward processing and data standardization to eliminate the influence of dimensions and make different indicators comparable. Range normalization is then used to normalize the data. The calculation formula is as follows:

[0113] (17)

[0114] Where, x ij It is the original value, min(x) j ) and max(x j ) are the minimum and maximum values ​​of the dataset, respectively.

[0115] S32, the weights are calculated using the entropy weight method:

[0116] The weights of indicators are objectively assigned based on the degree of data dispersion, avoiding interference from subjective judgment.

[0117] 1. Calculate information entropy (e j The calculation formula is as follows:

[0118] (18)

[0119] (19)

[0120] 2. Calculate the weights (w) j The calculation formula is as follows:

[0121] (20)

[0122] S33, Construct the weighted standardized matrix:

[0123] By integrating indicator weights and standardized data, the impact of high-weight indicators on the evaluation results is highlighted. The calculation formula is as follows:

[0124] (twenty one)

[0125] S34, Determine the ideal solution:

[0126] Establish evaluation criteria and clarify the reference standards for the optimal and worst solutions.

[0127] 1. Positive ideal solution (v) j + The calculation formula is as follows:

[0128] (twenty two)

[0129] 2. Negative ideal solution (v) j -The calculation formula is as follows:

[0130] (twenty three)

[0131] S35, Calculate Euclidean distance and relative proximity:

[0132] The differences between each Pareto solution and the optimal benchmark are quantified to rank the solutions.

[0133] 1. The distance to the ideal solution is calculated using the following formula:

[0134] (twenty four)

[0135] 2. The distance to the negative ideal solution is calculated using the following formula:

[0136] (25)

[0137] 3. Relative proximity (C) i The calculation formula is as follows:

[0138] (26)

[0139] S36, finally determine the optimal model and select the valve closing parameter combination with the best overall benefits.

[0140] Select the solution with the best overall benefits and implement the decision. Based on relative proximity... Sort in descending order. The closer the value is to 1, the better the solution; select The model corresponding to the largest solution is the optimal model, and its corresponding parameters are the valve closing parameter combination with the best overall benefits.

[0141] Example 2:

[0142] This embodiment presents a pipeline end valve closing method based on machine learning and intelligent algorithms for a long-distance gravity flow water conveyance project. Water is transported by gravitational potential energy from a higher-altitude pool to a lower-altitude reservoir, with a height difference of 40m. The total length of the water conveyance pipeline is 18415m, the design flow rate is 4.4m³ / s, the pipe diameter is 1.2m, and the wall thickness is 12mm. The entire pipeline includes a tunnel section of approximately 4600m, with a tunnel pipe diameter of 2m, a wall thickness of 20mm, and made of steel pipe. The remaining pipe sections are made of ductile iron pipe. The pipeline is equipped with 47 air valves, 30 sludge discharge valves, and 6 flow regulating valves. The water conveyance pipeline has multiple "knees" (lower sections) and significant high fluctuations. When the end valve is closed, water hammer is highly likely to be interrupted, causing significant damage. Therefore, it is necessary to take economical and reliable protective measures. The safety evaluation range for the water conveyance pipeline protection is calculated using the following formula:

[0143] (27)

[0144] In the formula Let be the operating pressure at the steady state of the i-th node.

[0145] Machine learning: using the input parameter air valve inlet orifice D in 600mm, outlet orifice diameter D out 800mm, pipe diameter D con 1200m and upstream initial water level H T 344.72m, calculate the safety margin of positive and negative pressure (M, N).

[0146] Then, BPNN, RF, SVM, and the characteristic line method were combined to simulate and predict hydraulic transients. The simulation and prediction results were analyzed using mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), and goodness of fit. Quantify the predictive performance to determine the optimal model.

[0147] MOPSO Algorithm Optimization: For the MOPSO algorithm parameters, the population size is set to 1000, and the maximum number of evaluations is set to 10000. The optimal solution found by the particle itself is the individual extreme value (pBest), and the best position global extreme value experienced by the entire population is (gBest). Finally, the Pareto optimal solution set is output.

[0148] EW-TOPSIS decision-making: The obtained Pareto optimal solution set is processed by constructing an evaluation matrix, and the ideal solution is determined by data standardization. Then, the optimal solution is determined by calculating the Euclidean distance and relative proximity. Finally, the optimal model is determined and the valve closing parameter combination scheme with the best overall benefits is selected.

[0149] Finally, it should be noted that the above is only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention (such as the application of various formulas, the order of steps, etc.) without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for closing a pipeline end valve based on machine learning and intelligent algorithms, characterized in that, Includes the following steps: Step S1, Model Building and Machine Learning Simulation: Three machine learning models, namely Backpropagation Neural Network (BPNN), Random Forest (RF) and Support Vector Machine (SVM), were used in combination with the feature line method to simulate and predict hydraulic transients. During the training phase, random characteristic samples of valve closure at the end of the pipeline were retained. Step S2, optimization is performed using the Multi-Objective Particle Swarm Optimization (MOPSO) algorithm: Using the MOPSO algorithm with initial water level, first-stage closing time of the valve at the end of the pipeline, first-stage closing percentage of the valve at the end of the pipeline, and second-stage closing time of the valve at the end of the pipeline as design variables, and minimizing pressure fluctuation, maximizing safety margin, and minimizing cost as objective functions, a Pareto optimal solution set is generated. Step S3, Entropy Weighted Distance Method (EW-TOPSIS) Decision: The Pareto optimal solution set generated by MOPSO optimization is processed based on EW-TOPSIS decision-making, and the best model and the valve closing parameter combination with the best overall benefits are finally determined.

2. The pipeline end valve closing method based on machine learning and intelligent algorithms according to claim 1, characterized in that, In step S1, a pipeline protection safety evaluation range is introduced, and upper and lower limits for pipeline pressure resistance and yield strength are set. The calculation formulas are as follows: in, These are the upper and lower limits of the pipeline's pressure resistance. T represents the upper and lower limits of yield strength, and T represents the safety assessment range for water pipeline protection.

3. The pipeline end valve closing method based on machine learning and intelligent algorithms according to claim 1, characterized in that, Step S1, during model construction, the air valve inlet orifice diameter is... Outlet aperture Pipe diameter and initial water level As input data, the safety margins of positive and negative pressure (M, N) are used as output.

4. The pipeline end valve closing method based on machine learning and intelligent algorithms according to claim 1, characterized in that, Step S1 includes processing the machine learning training results by applying mean squared error (MSE), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), and goodness of fit. The prediction performance is quantified using the following formula: Among them, O i This is the actual output; S i For predicting output; This is the average of the actual output; is the mean of the predicted output; and n is the number of samples.

5. The pipeline end valve closing method based on machine learning and intelligent algorithms according to claim 1, characterized in that, In step S2, the multi-objective particle swarm optimization algorithm uses dynamic inertia weights to update particle velocity and position adaptively based on the number of iterations. The calculation formula is as follows: in, The current update rate of the particles, This is the particle's current position. The velocity of the particle at the previous moment. Let be the individual extreme value of the i-th particle. is the global extremum, a1 and a2 are learning factors, both constants; rand() and Rand() are random numbers on [0,1]. This is the inertial weight.

6. The pipeline end valve closing method based on machine learning and intelligent algorithms according to claim 1, characterized in that, In step S2, the Pareto optimal solution set is generated by screening Pareto front solutions through non-dominated sorting and crowding calculation, and by adopting an elite retention strategy.

7. The pipeline end valve closing method based on machine learning and intelligent algorithms according to claim 1, characterized in that, In step S3, the Pareto optimal solution set generated by MOPSO optimization based on EW-TOPSIS decision processing is processed, including forward processing and data standardization of the optimal solution set to eliminate the influence of dimensions, normalization of the data using range normalization, calculation of weights using entropy weight method, construction of weighted standardization matrix, and determination of ideal solution. Calculate the Euclidean distance and relative proximity.

Citation Information

Patent Citations

  • Method for optimizing pump stop water hammer protection parameters of water conveyance project

    CN115081141A

  • Intelligent construction method based on data driving

    CN120013484A