A secondary water supply flow prediction method based on BP neural network optimized by genetic algorithm

Through the BP neural network optimized based on genetic algorithm, a flow prediction model for the secondary water supply system is constructed, which solves the problem of inaccurate flow calculation in the existing technology and achieves accurate flow prediction and energy saving effect of the secondary water supply system. Significantly reduces carbon emissions.

CN118211755BActive Publication Date: 2024-10-11CHANGZHOU GENERAL TAP WATER CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410380124.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-30
Publication Date
2024-10-11
Estimated Expiration
2044-03-30

AI Technical Summary

Technical Problem

The current flow calculation in the design of the secondary water supply system is inaccurate, resulting in the selection of a too large water pump, resulting in wasted energy consumption and increased carbon emissions. There is a lack of effective flow prediction methods to optimize system design.

Method used

The BP neural network optimized based on genetic algorithm is used to collect and process the sample data of the secondary water supply area to build a model that can predict the actual maximum daily flow rate and the highest daily maximum hourly flow rate, and optimize the water pump selection and system design.

Benefits of technology

It achieves accurate prediction of secondary water supply flow, reduces the inefficient running time of water pumps, significantly improves energy saving effects, and is expected to reduce carbon emissions by 4299.56 tons of CO2 per year, provides a more accurate flow assessment tool, and promotes the digitalization of the water supply industry. transformation and green development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118211755B_ABST
    Figure CN118211755B_ABST
Patent Text Reader

Abstract

The present invention discloses a secondary water supply flow prediction method based on a BP neural network optimized by a genetic algorithm, the steps of which include: collecting and processing sample data of secondary water supply in a residential area; data cleaning and sample screening; data correlation analysis; normalization of sample data; setting BP neural network parameters; optimizing BP neural network parameters by using a genetic algorithm; and designing and selecting a secondary water supply system according to the final prediction results. The present invention can provide a more accurate flow evaluation tool in the fields of secondary water supply design selection, energy-saving research, etc.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a water flow prediction technology for a water supply system, in particular to a secondary water supply flow prediction method based on a BP neural network optimized by a genetic algorithm. Background Art

[0002] As one of the urban infrastructure and public service industries, the water supply industry is a vital component of the urban development process. According to the data of E20 Research Institute, in 2020, the carbon emissions of my country's urban water supply system exceeded 22 million tons of CO2, accounting for about 0.2% of the industry's carbon emissions. With the development of urbanization and the upgrading of residents' water demand, the water supply industry will face more severe pressure on carbon emissions. The proportion of high-rise residential buildings in urban building complexes is increasing, and secondary water supply has also become an important part of the urban water supply system. Taking Changzhou General Water Company as an example, from 2010 to 2022, the number of secondary water supply pump houses managed by the water company increased from 278 to 617, and the proportion of secondary water supply electricity charges in the total electricity charges of enterprises increased from 7% to 16%. With the commissioning of new secondary water supply facilities and the increase in the occupancy rate of new residential communities each year, this proportion will continue to increase.

[0003] With the increasing attention paid by the government to secondary water supply, many departments have successively issued policy documents to promote the standardization and specialization of secondary water supply construction and management. The unified management of secondary water supply facilities by water supply enterprises has also become a mainstream trend. Due to the decentralized and extensive management of secondary water supply facilities in the early stage, there were widespread problems such as non-standardization and unprofessionalism in the construction and operation process, inefficient operation of equipment, and serious leakage, resulting in abnormally high energy consumption of a large number of existing secondary water supply facilities. Led by water supply enterprises, professional and refined management in various links such as secondary water supply system design, equipment selection, operation and maintenance is the key to promoting carbon reduction and efficiency improvement in the secondary water supply industry.

[0004] The water pump is the main energy-consuming equipment in the secondary water supply facilities, and water pump energy saving is the most important way to reduce carbon emissions in the secondary water supply. In the process of analyzing the operating data of old pump houses, it was found that the actual flow rate is often much smaller than the design flow rate. The maximum water flow rate of many pump houses is only 1 / 3 to 1 / 2 of the design flow rate, which also leads to the widespread phenomenon of "big horse pulling a small cart" of water pumps. The root cause lies in the inaccurate design and selection of the secondary water supply system, especially the calculation and selection of the design flow rate often do not conform to the actual working conditions. At present, the design basis of the secondary water supply flow rate is the design second flow rate formula of the residential water supply pipeline. In the calculation process, due to the lack of reference to the actual flow rate data of the secondary water supply, the coefficient and the quota selection are left with margins, and the final design flow rate and the actual flow rate have a large deviation. According to this data, the selection of the unit water pump is guided by the low occupancy rate, the water water pattern changes greatly, and the selection of the water pump is generally too large. Through the analysis of the operating data of the secondary water supply pump house of Changzhou General Water Company, a large number of water pumps operate in the inefficient area for more than 60% of the time, resulting in huge energy waste and a large space for carbon reduction. Therefore, the first step in energy conservation and carbon reduction in secondary water supply is to accurately predict the secondary water supply flow rate so that the system design and water pump selection are more in line with actual working conditions. This is also the most critical step for water supply companies to implement professional and refined management of secondary water supply.

[0005] In recent years, scientific research institutions and equipment manufacturers have begun to use various algorithms to predict secondary water supply flow. The current prediction methods include predicting instantaneous flow based on pump operation data, predicting water consumption based on water tank liquid level, and predicting total secondary water supply flow based on single-household water consumption. These prediction methods mainly realize the prediction of water use patterns of a single pump room or community, and achieve the purpose of pipeline leakage warning, water pump efficiency statistics, and optimization of water tank water quality, but do not solve the problem of how to optimize the design of the secondary water supply system. Summary of the invention

[0006] In response to the problems existing in the prior art, the present invention provides a secondary water supply flow prediction method based on a BP neural network optimized by a genetic algorithm, which can provide a more accurate flow assessment tool in the fields of secondary water supply design selection, energy-saving research, etc., provide inexhaustible power for the digital transformation of the water supply industry, and contribute to promoting the efficient utilization of economic and social resources and green and low-carbon development.

[0007] The purpose of the present invention is achieved through the following technical solutions.

[0008] A secondary water supply flow prediction method based on BP neural network optimized by genetic algorithm, comprising the following steps:

[0009] 1) Collection and processing of secondary water supply sample data in the community;

[0010] 2) Data cleaning and sample screening;

[0011] 3) Conduct data correlation analysis: Use the Pearson correlation coefficient to preliminarily analyze the correlation between feature data and determine the feasibility of model construction;

[0012] 4) Normalize the sample data;

[0013] 5) Setting BP neural network parameters: Based on the collected secondary water supply flow characteristic sample data, the number of pressurized households, the number of households with single bathrooms, the number of households with double bathrooms, and the occupancy rate are used as input variables, and the highest daily flow, the highest daily maximum hourly flow, and the highest daily minimum hourly flow are used as the only output items to construct a separate model;

[0014] 6) Use genetic algorithm to optimize BP neural network parameters: Use genetic algorithm to find the optimal initial threshold and weight of BP neural network, so that BP neural network can overcome the defects of random selection of initial threshold and weight, start training and iteration with the optimal solution, and obtain the final prediction result;

[0015] 7) Design and select the secondary water supply system based on the final prediction results of step 6).

[0016] The sample data in step 1) includes secondary water supply characteristic data and flow data, wherein the characteristic data includes the number of pressurized households, years of operation, and occupancy rate, wherein the number of pressurized households is the key parameter for designing the calculation of the flow rate per second, and the years of operation and occupancy rate are important factors affecting the actual water consumption of the community; the flow data includes the highest daily flow rate, the highest daily maximum hourly flow rate, and the highest daily minimum hourly flow rate of the community, and the sample data comes from different data sources, and is filtered, integrated, and reduced into a sample set of flow characteristic data, which is continuously updated and accumulated for mining the water use rules contained in the data, performing correlation analysis, and establishing a flow model; the sample data comes from the following sources:

[0017] The water supply mode and the number of pressurized households were taken from the design parameters of the sample community pump room, among which the number of pressurized households was refined into the number of single-bathroom households and double-bathroom households. The basic data of occupancy rate came from the business MIS system, and the water meter reading data of each secondary water supply user in the sample community in July and August were collected. To ensure the accuracy of the occupancy rate statistics, the water users with a monthly water consumption of more than 5m 3 The number of users can be calculated to obtain the actual occupancy rate data of the community; the water inlet main of the pump room in the sample community is installed with a remote water meter to realize the continuous collection and storage of flow data, with a collection frequency of once every 15 minutes. The flow data can be exported in batches through the computer management software, and the day with the highest water consumption throughout the year can be screened out to extract the continuous flow data of the day.

[0018] The step 2) is specifically as follows: for the samples that have no data for a long time or are frequently missing, they are directly deleted; for some samples that have a small amount of missing data, the spline interpolation method is used for data interpolation; the night minimum flow distribution coefficient α is used to screen out the communities that may have pipeline leakage. The night minimum flow distribution coefficient is the ratio of the night minimum flow to the daily average flow. The leakage screening threshold is set to eliminate the leakage communities from the sample library.

[0019] In the step 5), the number of neurons m in the network input layer is 4, and the number of neurons n in the output layer is 1; the number of neurons in the hidden layer is determined according to the empirical formula l=√(m+n)+α, where α is a constant from 1 to 10. The optimal value of the best hidden layer neurons in the model is determined to be 4 through repeated comparisons using the trial and error method.

[0020] In the step 6), the coding length L=m×l+l×n+l+n=25, the population size is selected as 20; the crossover operation probability is 0.4, the mutation operation probability is 0.1; and the maximum number of evolutionary iterations is 50.

[0021] Compared with the prior art, the advantages of the present invention are:

[0022] (1) The present invention integrates the actual flow characteristic data of typical secondary water supply communities for the first time, and after data screening and integration, constructs a secondary water supply flow prediction model based on a BP neural network optimized by a genetic algorithm. This model can predict the actual maximum daily flow and the highest daily maximum hourly flow of secondary water supply communities of different sizes.

[0023] (2) The prediction percentage error (MAPE) of the maximum daily flow rate and the highest daily maximum hourly flow rate model is less than 10%. Old pump rooms generally lack flow metering equipment. The prediction data of this model was applied in the renovation process, and good energy-saving effects were achieved. The model has good prediction accuracy and generalization.

[0024] (3) In the future, further optimization of the model in terms of sample size, variable factors, and structural algorithms can provide a more accurate flow prediction method for secondary water supply design selection, energy-saving transformation, and other tasks.

[0025] (4) At present, the annual power consumption of the secondary water supply pump house managed by Changzhou General Water Company is 21.5625 million kWh. It is planned to use the flow prediction model for system optimization, water pump selection and pump house renovation. It is expected that the average energy saving rate can reach 20%, and carbon emissions can be reduced by 4299.56 tons of CO2 per year. 2 The model construction method can provide new research ideas for the industry, promote the application of data algorithms in different water supply scenarios, help water supply companies tap into energy-saving potential, and make carbon emission reduction work more refined and intelligent. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 Figure 2 is the correlation and intensity diagram of flow characteristic variables.

[0027] Figure 2 This is the structure diagram of the BP neural network.

[0028] Figure 3 Flowchart for optimizing BP neural network using genetic algorithm.

[0029] Figure 4 This is the training process of the highest daily flow model and the comparison of the predicted values.

[0030] Figure 5 This is the training process of the maximum daily hourly flow model and the comparison of the predicted values.

[0031] Figure 6 This is the training process of the maximum daily minimum hourly flow model and the comparison of the predicted values. DETAILED DESCRIPTION

[0032] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0033] A secondary water supply flow prediction method based on BP neural network optimized by genetic algorithm, comprising the following steps:

[0034] 1) Collection and processing of sample data of secondary water supply in the community; the sample data in step 1) includes secondary water supply characteristic data and flow data, and the characteristic data includes the number of boosted households, years of operation, and occupancy rate, among which the number of boosted households is the key parameter for designing the second flow calculation, and the years of operation and occupancy rate are important factors affecting the actual water consumption of the community; the flow data includes the highest daily flow in the community, the highest daily maximum hourly flow, the highest daily minimum hourly flow, etc. These data can intuitively reflect the actual water use patterns of the community water supply system, and are the basis for optimizing the selection of secondary water supply systems, equipment selection, and control logic. These data come from different data sources, and are filtered, integrated, and reduced into a sample set of flow characteristic data. The sample set is continuously updated and accumulated, and is used to mine the water use patterns contained in the data, conduct correlation analysis, and establish a flow model. The sources of various types of data are as follows:

[0035] (1) The water supply mode and the number of households with boosted water supply are taken from the design parameters of the pump house in the sample community. The number of households with boosted water supply is further divided into the number of households with one bathroom and the number of households with two bathrooms.

[0036] (2) The basic data of occupancy rate comes from the business MIS system. The water meter reading data of each secondary water supply user in the sample community in July and August are collected. To ensure the accuracy of the occupancy rate statistics, the number of users with monthly water consumption greater than 5m3 is screened out to obtain the actual occupancy rate data of the community.

[0037] (3) The water inlet main of the pump house in the sample community is equipped with a remote water meter to realize the continuous collection and storage of flow data. The collection frequency is once every 15 minutes. The flow data can be exported in batches through the computer management software, and the day with the highest water consumption throughout the year can be selected to extract the continuous flow data of the day.

[0038] 2) Data cleaning and sample screening: Due to problems with flow monitoring equipment, remote transmission devices, transmission signals, etc., flow data may be missing or abnormal, affecting the accuracy of data analysis and modeling, and need to be "cleaned" in advance. Among the samples collected this time, samples with no data for a long time and frequent missing data accounted for 4% of the total, and were directly deleted; some samples had a small amount of missing data, and the spline interpolation method was used for data interpolation.

[0039] Leakage in the booster network will cause obvious abnormal flow, which will have a great impact on the analysis results. The nighttime minimum flow distribution coefficient α is used to screen out the communities where there may be leakage in the network. This coefficient is the ratio of the minimum flow at night to the average flow of the day. In this study, the highest daily minimum flow is taken as the minimum flow at night, and α>50% is selected as the leakage screening threshold to eliminate the leakage community from the sample library.

[0040] 3) Perform data correlation analysis: There are many variables in the traffic feature data sample. In order to determine which variables the traffic data is associated with and the degree of association, the Pearson correlation coefficient is used to preliminarily analyze the correlation between the feature data and determine the feasibility of building a model. The Pearson correlation coefficient is used to compare the linear correlation between two data variables X and Y. [3] , usually the strength of the correlation is judged by the coefficient value range (see Table 1), and the calculation method is shown in formula (1):

[0041]

[0042] Where: r——Pearson correlation coefficient;

[0043] X i ——the i-th variable X;

[0044] ——the mean of variable X in the sample;

[0045] Y i ——the i-th variable Y;

[0046] ——The mean of variable Y in the sample.

[0047] Table 1 Pearson correlation coefficient strength table

[0048]

[0049] When using the Pearson correlation coefficient for comparison, both variables must be continuous variables and obey the normal distribution. Select the data sample of the number of supercharged households, years of operation, and occupancy rate community characteristic data variables, and add the actual number of water users obtained by multiplying the number of supercharged households and the occupancy rate. Analyze the correlation coefficients between these variables and the highest daily flow, the highest daily maximum hourly flow, and the highest daily minimum hourly flow. Use Matlab's plotmatrix function and corrcoef function to present the correlation coefficient in the form of a matrix graph, which is convenient for intuitively analyzing the relationship between the characteristic data variables and the flow. The scatter plot distribution between the data variables can be seen in Figure 1 (a), the strength of the correlation is shown in Figure 1 (b).

[0050] The Pearson correlation coefficient values ​​between variables are shown in Table 2. From the table, it can be found that the various flow characteristics of secondary water supply are highly correlated with the number of households with designed boosting and the number of actual water users. The correlation degree of different flow characteristics also has a certain regularity. The highest daily flow and the highest daily maximum hourly flow are highly correlated, and the highest daily minimum hourly flow is second. From the analysis results, it can be seen that the number of households with designed boosting has a high correlation with different flow characteristics. After correcting the actual number of water users in combination with the occupancy rate, the correlation is further improved, which has the feasibility of constructing a secondary water supply flow model.

[0051] Table 2 Correlation coefficient values ​​of flow characteristic variables

[0052]

[0053] 4) Normalize the sample data; Since the dimensions and units of the characteristic variables in the data sample are different, it will affect the results of data analysis. Through data normalization, each variable is limited to a certain range, such as between 0 and 1, thereby eliminating the influence of dimensions and units, which is convenient for weighted comparative analysis. The normalization formula is shown in formula (2):

[0054]

[0055] Among them: X——characteristic variable;

[0056] X min ——The minimum value of the characteristic variable in the sample;

[0057] X max ——The maximum value of the characteristic variable in the sample;

[0058] X norm ——The normalized value of the feature variable.

[0059] 5) Setting BP neural network parameters: Based on the collected secondary water supply flow characteristic sample data, the number of pressurized households, the number of single-bathroom households, the number of double-bathroom households, and the occupancy rate are used as input variables, and the highest daily flow, the highest daily maximum hourly flow, and the highest daily minimum hourly flow are used as the only output items to construct a separate model; therefore, the number of neurons in the network input layer m is 4, and the number of neurons in the output layer n is 1. The number of neurons in the hidden layer is calculated according to the empirical formula (α is a constant from 1 to 10) to determine the range, and through repeated comparisons by trial and error, determine that the optimal value of the model's best hidden layer neurons is 4. The most basic unit of an artificial neural network is a neuron. Each neuron receives data from other neurons, and the weighted sum is transmitted through connections with different weights. The obtained value is compared with the neuron threshold, and the output value is obtained through the "activation function". This output value will be further transmitted as the input value of the next neuron. The neuron structure is very simple, but the artificial neural network composed of a large number of neurons forms a highly nonlinear model system that can handle various complex problems through learning and iteration. BP neural network is a type of artificial neural network. It is currently widely used. It is a multi-layer feedforward neural network trained by error back propagation. The BP neural network consists of an input layer, a hidden layer, and an output layer (see Figure 2 ), the number of neurons in the input layer is m, the number of neurons in the output layer is n, and the number of neurons in the hidden layer is l. The initial connection weights between the input layer neurons and the hidden layer neurons, and between the hidden layer neurons and the output layer neurons are V ij , W jk , the threshold bias of hidden layer neurons and output layer neurons are γ j ,θ k , where i = 1, 2, 3 ... m, j = 1, 2, 3 ... l, k = 1, 2, 3 ... n, and the activation function is f (x) = 1 / (1 + e -x ).

[0060] Network training is divided into two stages. The first stage is to propagate forward along the neural network to obtain the output value; the second stage is to propagate the error backward along the neural network to correct the weights and threshold bias. After two stages, the neural network training is completed. The training is repeated many times until the error is less than the target value. The weights and threshold bias will be fixed and the model construction is completed. When applying the BP neural network, there is no need to know the mathematical relationship between the input value and the output value. The neural network is trained by relying on batch input values ​​and output values ​​to automatically form a corresponding mathematical model, which has good application in various prediction work.

[0061] 6) Use genetic algorithms to optimize BP neural network parameters: Since the initial weights and thresholds of BP neural networks are randomly selected, different initial values ​​will cause large deviations in the results, leading to problems such as difficulty in convergence, too long training time, or falling into local extreme values. This also leaves a lot of room for optimization for this type of neural network. Optimizing it through genetic algorithms is an ideal solution. Genetic algorithms are a method of simulating the biological evolution process in nature to search for the optimal solution. They mathematically convert the problem-solving process into the selection, crossover, and mutation of chromosome genes, select chromosomes with higher fitness to form a new population, and continuously iterate and evolve until the target conditions are met. The chromosome with the highest fitness is the optimal solution. See the process of combining the two algorithms. Figure 3 The genetic algorithm can perform a global search to obtain the optimal solution. Through this algorithm, the optimal initial threshold and weight of the BP neural network are found, so that the BP neural network can overcome the defects of random selection of the initial threshold and weight, start training and iteration with the optimal solution, and obtain the final prediction result. The BP neural network optimized by the genetic algorithm will be improved in terms of convergence speed and prediction accuracy, and it will also become the main algorithm for this model construction.

[0062] (1) The coding length L = m × l + l × n + l + n = 25, and the population size is selected as 20.

[0063] (2) The crossover operation probability is 0.4, and the mutation operation probability is 0.1.

[0064] (3) The maximum number of evolutionary iterations is 50.

[0065] 7) Design and select the secondary water supply system based on the final prediction results of step 6).

[0066] In this application, two evaluation methods are used to evaluate the model prediction value error and accuracy and explore the model usability.

[0067] (1) Mean absolute error (MAE)

[0068] MAE is the average value of the absolute error between the model prediction value and the actual value. The absolute value is used to avoid the offset of positive and negative errors. It reflects the average deviation distance between the prediction value and the actual value. When there is no error, the value is 0. The calculation method is shown in formula (3):

[0069]

[0070] Among them: MAE – mean absolute error;

[0071] y i ′——the i-th predicted value;

[0072] y i ——The i-th actual value.

[0073] (2) Mean absolute percentage error (MAPE)

[0074] MAPE is the average error rate between the predicted value and the actual value. [4] , reflects the accuracy of the predicted value. The smaller the value, the higher the accuracy. The calculation method is shown in formula (4):

[0075]

[0076] Where: MAPE – mean absolute percentage error;

[0077] y i ′——the i-th predicted value;

[0078] y i ——The i-th actual value.

[0079] The implementation area of ​​this application is Changzhou, Jiangsu. Changzhou General Water Company began to participate in the construction, renovation and operation and maintenance of secondary water supply facilities in 2005. It was the first in China to realize the unified management of all residential secondary water supply facilities in the water supply area. At present, there are 617 secondary water supply pump houses under management, distributed in the four municipal districts of Tianning District, Zhonglou District, Xinbei District and Economic Development Zone, covering the central urban area and remote suburban towns, serving 469,000 users. The main water supply methods and quantities are as follows: 198 water tank variable frequency speed regulation pump houses, 410 pipe network superposition pump houses, and 9 booster equipment and high-level water tank joint water supply pump houses. In recent years, in newly built secondary water supply facilities, the dual-mode water supply mode of water tank variable frequency and pipe network superposition has been widely adopted, and energy-saving technologies such as digital full frequency conversion and large and small pumps have been applied, which have achieved good results. In order to further explore the flow law of secondary water supply in different communities, 149 secondary water supply communities were selected as research samples from the existing secondary water supply pump houses based on the number of boosted households and years of operation. The number of boosted households in the samples ranged from 50 to 3,500, and the years of operation ranged from 1 to 15 years. Since the combined water supply mode of boosting equipment and high-level water tanks is an interval water replenishment operation state, it cannot directly reflect the user's water use situation. Therefore, the samples mainly collect relevant data of water tank variable frequency speed regulation and pipe network superposition water supply communities. The water tank variable frequency speed regulation water supply mode mainly selects communities with constant water tank liquid level and basically consistent inflow and outflow water flow.

[0080] During the research process, 6 samples with large data missing were first removed, and the data samples of 143 communities were cleaned and screened. The median value of the sample coefficient was 18.5% calculated by the minimum nighttime flow distribution coefficient α, and a total of 5 samples with possible pipeline leakage (α>50%) were eliminated. When analyzing the sample flow data of the community, it was found that there were 26 new communities with a commissioning period of less than 2 years. Due to the low occupancy rate, the average value of the highest daily hourly variation coefficient was 2.1, the minimum value was 1.6, and the water use pattern was not obvious. Therefore, the characteristic data of the new community is not used in the construction of this flow model. The data samples are retained and will be updated regularly in the future as the basic data for future research on changes in occupancy rates and flow characteristics in new communities. After screening, a total of 112 data samples were retained. The flow characteristic data samples of some communities are shown in Table 3.

[0081] Table 3 Traffic characteristic data samples

[0082]

[0083] Model prediction results:

[0084] The construction of the secondary water supply flow model relies on Matlab programming. After the model training is completed, the neural network structure and parameters are saved, and a small program is made to call the model for easy use. The model uses a total of 112 characteristic flow samples for training and verification. 97 samples are randomly selected as network training samples and 15 samples are used as prediction verification samples. The prediction error results of the highest daily flow, the highest daily maximum hourly flow, and the highest daily minimum hourly flow are shown in Table 4.

[0085] Table 4 Prediction error values

[0086]

[0087] When training the highest daily traffic model, according to the fitness change curve (see Figure 4 (a)), the fitness function value of the genetic algorithm decreases as the number of iterations increases. At the 10th generation, the fitness function value no longer changes, and the optimal solution is obtained. The predicted value is compared with the actual value (see Figure 4 (b)), the mean absolute error MAE is 21.46, that is, the average deviation of the highest daily flow prediction is 21.46m 3 ·d -1 ; The mean absolute percentage error MAPE is 5.46%.

[0088] When training the maximum daily maximum hourly flow model, according to the fitness change curve (see Figure 5 (a)), the fitness function value of the genetic algorithm decreases as the number of iterations increases. At the 15th generation, the fitness function value no longer changes, and the optimal solution is obtained. The predicted value is compared with the actual value (see Figure 5(b)), the mean absolute error MAE is 1.36, that is, the average deviation of the maximum daily flow is 1.36m 3 ·h -1 ; The mean absolute percentage error MAPE is 6.80%.

[0089] When training the maximum daily minimum hourly flow model, according to the fitness change curve (see Figure 6 (a)), the fitness function value of the genetic algorithm decreases as the number of iterations increases. At the 29th generation, the fitness function value no longer changes, and the optimal solution is obtained. The predicted value is compared with the actual value (see Figure 6 (b)), the mean absolute error MAE is 0.32, that is, the average deviation of the maximum daily flow is 0.32m 3 ·h -1 ; The mean absolute percentage error MAPE is 29.71%.

[0090] The 15 randomly selected communities were used to predict the highest daily flow model and the highest daily maximum hourly flow model. The absolute percentage error MAPE was less than 10%, and the model had high availability. Compared with the situation where the calculated value of the design second flow method differed by several times from the actual value, it has been greatly improved and can provide auxiliary reference for scientific research, design, and operation and maintenance personnel to carry out related work. However, when predicting the highest daily minimum flow model, the MAPE was higher than 29%, which was not available. It is necessary to use more accurate small flow monitoring technology and introduce more pipe network parameters as input variables for model construction and optimization to improve prediction accuracy and generalization ability.

[0091] Pump selection optimization

[0092] Juyi Garden Booster Zone 1 and Feicui Jinyuan Booster Zone 2 were selected for model application testing. The maximum flow was predicted based on the model and the water pump selection was optimized. The main design parameters and prediction results of the two zones are shown in Table 5.

[0093] Table 5 Process design parameters and prediction results

[0094]

[0095] The occupancy rate of Juyi Garden Community has reached 80%. The pump room adopts the water tank variable speed regulation water supply mode. The original design flow rate of booster zone 1 is 57m 3 ·h -1 The water supply unit water pump model is Grundfos CR32-5-2 (the water pump parameter is Q = 30m 3 ·h -1 ,H=69.7m,P=11kW), the number is 3, 2 for use and 1 for backup. Through the analysis of a large number of community water meter data, due to the mobility of the population, regardless of the age of the community, the monthly water consumption is around 5m 3The above users generally account for no more than 85%, so the occupancy rate is selected as 85% when the model is predicted. After inputting other parameters such as the number of supercharged households, the predicted maximum daily maximum flow rate is 21.0m 3 ·h -1 The maximum instantaneous flow rate is 1.3 times the maximum hourly flow rate, which is 27.3m 3 ·h -1 , which is converted into a maximum flow rate of 7.6L·s -1 The actual operating head of the booster zone unit is 50m. Combined with the predicted flow data, CR20-6 (water pump parameter is Q = 21m 3 ·h -1 , H = 70.4m, P = 7.5kW) to replace the original main pump. When the head of this type of pump is 50m, the flow range of a single pump can cover 0 ~ 27.9m 3 ·h -1 After the water pump was replaced, the maximum operating frequency during peak water usage was 47Hz.

[0096] The occupancy rate of Feicui Jinyuan Community is only 63%. The pump room adopts the pipe network superposition water supply method. The original design flow of the booster zone 2 is 28m 3 ·h -1 The water supply unit water pump model is Grundfos CR32-5-2 (the water pump parameter is Q = 30m 3 ·h -1 ,H=69.7m,P=11kW), the number is 2, 1 for use and 1 for backup. The occupancy rate is also taken as 85% when the model is predicted to meet the water supply demand after the occupancy rate increases in the future. After inputting other parameters such as the number of booster households, the predicted maximum daily maximum flow rate is 9.1m 3 ·h -1 The maximum instantaneous flow rate is 11.8m, which is 1.3 times the maximum hourly flow rate. 3 ·h -1 , which is converted into a maximum flow rate of 3.3L·s -1 The actual operating head of the booster zone unit is 78m, and the daily minimum available pressure of the municipal pipeline network is H 0 The actual pump head is 25m. b The demand is 53m3. Combined with the predicted flow data, a Grundfos CR15-5 (pump parameter is Q = 17m3) is selected. 3 ·h -1 , H = 55m, P = 4kW) to replace the original main pump. When the pump head is 53m, the flow range of a single pump can cover 0 ~ 18m 3 ·h -1 When an abnormal situation occurs in the municipal pipe network, the water supply unit will automatically shut down for protection when the municipal pressure drops to 15m. At this time, the flow range of a single pump can still cover 0-12m 3 ·h -1, to meet the maximum flow demand, after the water pump is replaced, the maximum operating frequency during peak water usage is 42Hz.

[0097] Energy saving effect:

[0098] In order to intuitively compare the power consumption per ton of water of the water pump after the water pump is optimized according to the flow model, Flexim Fluxus F401 ultrasonic flowmeter and Ankerui DTSD1352 energy meter were installed in the two pump rooms. The data collection frequency was once a minute to record the flow and power consumption changes of the water supply unit before and after the water pump was replaced.

[0099] Table 6 Comparison of energy consumption before and after transformation

[0100]

[0101] Through the analysis of monitoring data, the occupancy rate of Juyi Garden is relatively high, and the measured maximum flow rate is 24.5m3·h-1, which is close to the predicted value; the occupancy rate of Feicui Jinyuan is average, and the measured maximum flow rate is 8.5m3·h-1. Because the prediction is based on the high occupancy rate, the predicted value has a certain margin. Comparing the ton water and electricity consumption before and after the transformation (see Table 6), the Juyi Garden booster zone 1 has a decrease of 19.0%, and the Feicui Jinyuan booster zone 2 has a decrease of 41.8%. According to the annual electricity consumption, the two zone units can save 2400kWh and 7000kWh of electricity per year, respectively, and the energy saving effect is very obvious. Since it takes a certain number of years for the community to reach a high occupancy rate, and the residential buildings have a large difference in water consumption during the morning and evening peak and non-peak periods, the operating conditions of the water pump are complex. In the future, relying on the flow model prediction, the full frequency conversion technology and multi-model water pumps can be matched to make the high-efficiency zone of the complete water supply unit cover a wider flow range, further improving the energy saving and consumption reduction effect.

[0102] This application collects and summarizes actual water consumption data samples of secondary water supply communities of different sizes in Changzhou, and builds a secondary water supply flow model by learning and mapping the relationship between characteristic data such as the number of pressurized households and occupancy rate and flow through a BP data network optimized by genetic algorithms. The model has been applied and verified in the secondary water supply facility renovation project, achieving good energy-saving effects. This model provides a new flow simulation and prediction method, which can provide more accurate flow assessment tools in the fields of secondary water supply design selection, energy-saving research, etc., providing inexhaustible power for the digital transformation of the water supply industry, and contributing to promoting the efficient use of economic and social resources and green and low-carbon development, and helping to achieve the "dual carbon" goals.

Claims

1. A secondary water supply flow prediction method based on BP neural network optimized by genetic algorithm, characterized by the following steps: include: 1) Collection and processing of secondary water supply sample data in the community; 2) Data cleaning and sample screening; 3) Conduct data correlation analysis: Use the Pearson correlation coefficient to preliminarily analyze the correlation between feature data and determine the feasibility of model construction; 4) Normalize the sample data; 5) Setting BP neural network parameters: Based on the collected secondary water supply flow characteristic sample data, the number of pressurized households, the number of households with single bathrooms, the number of households with double bathrooms, and the occupancy rate are used as input variables, and the highest daily flow, the highest daily maximum hourly flow, and the highest daily minimum hourly flow are used as the only output items to construct a separate model; 6) Use genetic algorithm to optimize BP neural network parameters: Use genetic algorithm to find the optimal initial threshold and weight of BP neural network, so that BP neural network can overcome the defects of random selection of initial threshold and weight, start training and iteration with the optimal solution, and obtain the final prediction result; 7) Design and select the secondary water supply system according to the final prediction result of step 6); The sample data in step 1) includes secondary water supply characteristic data and flow data, wherein the characteristic data includes the number of pressurized households, years of operation, and occupancy rate, wherein the number of pressurized households is the key parameter for designing the calculation of the flow rate per second, and the years of operation and occupancy rate are important factors affecting the actual water consumption of the community; the flow data includes the highest daily flow rate, the highest daily maximum hourly flow rate, and the highest daily minimum hourly flow rate of the community, and the sample data comes from different data sources, and is filtered, integrated, and reduced into a sample set of flow characteristic data, which is continuously updated and accumulated for mining the water use rules contained in the data, performing correlation analysis, and establishing a flow model; the sample data comes from the following sources: The water supply mode and the number of pressurized households were taken from the design parameters of the sample community pump room, among which the number of pressurized households was refined into the number of single-bathroom households and double-bathroom households. The basic data of occupancy rate came from the business MIS system, and the water meter reading data of each secondary water supply user in the sample community in July and August were collected. To ensure the accuracy of the occupancy rate statistics, the water users with a monthly water consumption of more than 5m 3 The number of users can be used to obtain the actual occupancy rate data of the community; the water inlet main of the pump room in the sample community is installed with a remote water meter to realize the continuous collection and storage of flow data, with a collection frequency of once every 15 minutes. The flow data can be exported in batches through the computer management software, and the day with the highest water consumption throughout the year can be selected to extract the continuous flow data of the day; The step 2) is specifically as follows: for the samples that have no data for a long time or are frequently missing, they are directly deleted; for some samples that have a small amount of missing data, the spline interpolation method is used for data interpolation; the night minimum flow distribution coefficient α is used to screen out the communities that may have pipeline leakage. The night minimum flow distribution coefficient is the ratio of the night minimum flow to the daily average flow. The leakage screening threshold is set to eliminate the leakage communities from the sample library.

2. The secondary water supply flow prediction method based on BP neural network optimized by genetic algorithm according to claim 1 is characterized in that In the step 5), the number of neurons m in the network input layer is 4, and the number of neurons n in the output layer is 1; the number of neurons in the hidden layer is determined according to the empirical formula l=√(m+n)+α, where α is a constant from 1 to 10. The optimal value of the best hidden layer neurons in the model is determined to be 4 through repeated comparisons using the trial and error method.

3. The secondary water supply flow prediction method based on BP neural network optimized by genetic algorithm according to claim 2 is characterized in that In the step 6), the coding length L=m×l+l×n+l+n=25, the population size is selected as 20; the crossover operation probability is 0.4, the mutation operation probability is 0.1; and the maximum number of evolutionary iterations is 50.