Water supply network pressure monitoring point arrangement method based on density peak clustering improved surrounding center point division algorithm
By adopting an improved algorithm around the center point based on density peak clustering in the pressure monitoring point arrangement of the water supply pipeline network, the problem of unstable initial cluster center selection is solved, and the accuracy and representativeness of the monitoring data are improved.
Patent Information
- Application Number
- CN202411839532.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When arranging pressure monitoring points of the water supply pipeline network, the clustering results are easily unstable due to the initial clustering centers being too close or multiple initial clustering centers selected in the same cluster, which affects the accuracy and representativeness of the monitoring data.
The center point division algorithm (DPC algorithm) based on density peak clustering is adopted, combined with the PAM algorithm, and the initial clustering center is generated and iteratively processed to ensure that the clustering center is more reasonable and the instability of clustering results is avoided.
It improves the reliability and accuracy of the pressure monitoring point arrangement of the water supply pipeline network, ensures the representativeness and quality of the monitoring data, and is suitable for complex large-scale water supply partition pipelines.
Smart Images

Figure CN119783293A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of urban water supply network design, relates to the technical field of network point monitoring, and in particular to a method for arranging water supply network pressure monitoring points based on a density peak clustering improved around-center point partitioning algorithm. Background Art
[0002] The municipal water supply network consists of pipes, accessories and ancillary facilities. It is an important infrastructure to ensure the economic development and living standards of a city, and is the lifeline of the city's survival and development. However, due to the continuous increase in urban water consumption and the increase in the service life of the network, the municipal water supply network has gradually exposed a large range of leakage. If not handled in time, safety accidents such as pipe bursts will occur, resulting in waste of water resources and economic losses.
[0003] In order to ensure the safe operation of the water supply network and realize the optimized scheduling of the water supply network, a certain number of monitoring points are first required to collect the operation information of the entire water supply system. By processing and analyzing the pipeline data collected by the optimized monitoring points, the pipeline operation status can be effectively and comprehensively reflected. The collected data must be both accurate and representative. The representativeness of the collected data, that is, the number and location of the monitoring points, and the layout plan of the water supply network monitoring points directly affect the quality of the monitoring data of the monitoring points. Therefore, before establishing the water supply network model, the optimized layout plan of the water supply network monitoring points must be determined to cover the entire monitoring area with the least monitoring nodes.
[0004] The layout method of pressure monitoring points has been developed so far. According to its development process, it can be divided into two categories: manual experience method and theoretical analysis method. The specific introduction is as follows: the manual experience method is that the manager manually arranges the pressure monitoring points based on his familiarity with the water supply network. The objects of the experience layout method are mostly simple small water supply networks and the layout is relatively subjective. The layout plan of the monitoring points selected by the experience method often lacks corresponding rationality due to the mismatch of the mathematical relationship between the location and number of the monitoring points. It can only provide the approximate scheduling information and basic hydraulic operation information of the water supply network. In addition, for large-scale ring networks with complex structures, since it is impossible to fully understand the operating conditions of the entire network by relying on experience, the experience layout method can no longer meet the needs of large water supply divisions; in recent years, domestic and foreign researchers have tried to introduce theoretical analysis methods into the layout of pressure monitoring points. The theoretical method for arranging and optimizing pressure monitoring points mainly takes certain hydraulic characteristics of water supply system nodes as constraints or control indicators, constructs relevant objective functions or characteristic matrices, and solves and analyzes the objective functions or characteristic matrices through algorithms or analysis methods such as genetic algorithms, ant colony algorithms, regression analysis, and nonlinear mapping theory analysis, so as to obtain the corresponding pressure monitoring point layout plan.
[0005] The invention patent with application number 202010053680.9 discloses a method for arranging pressure monitoring points in a water supply network based on the CFSFDP clustering algorithm. Use simulation software to build a pipe network model, densely arrange pressure monitoring points on the pipe network model, and record the coordinates of all pressure monitoring points; configure normal working conditions and leakage working conditions for the pipe network model, obtain pressure data of all pressure monitoring points under different working conditions, and calculate the pressure influence and difference coefficient of each pressure monitoring point; use the coordinates, pressure influence and difference coefficient of the pressure monitoring points to construct the original data set, input the original data set into the CFSFDP algorithm, and obtain the clustering results; use all cluster centers as the layout positions of the pressure monitoring points. Summary of the invention
[0006] In order to solve the above technical problems, the present invention proposes a method for arranging pressure monitoring points in a water supply network based on a density peak clustering-based improved center point partitioning algorithm. Based on the DPC algorithm, it can avoid the initial clustering centers selected in the PAM algorithm being too close, resulting in unstable clustering results. It also avoids selecting multiple initial clustering centers in the same cluster and ignoring clusters with fewer data objects, thereby confirming the optimal pressure monitoring point arrangement scheme under the current number of clustering centers, which improves the reliability of subsequent pressure monitoring point arrangement while being closer to the actual characteristics of the water supply network.
[0007] In the first aspect, the present invention proposes a method for arranging pressure monitoring points in a water supply network based on a density peak clustering improved around-center partitioning algorithm, wherein the method arranges pressure monitoring points in a water supply network by using a density peak clustering DPC algorithm to improve a around-center partitioning PAM algorithm for water supply network pressure monitoring, and the method comprises:
[0008] Establish a hydraulic model of the water supply network and perform hydraulic analysis to obtain model parameter information based on the network structure and operating conditions;
[0009] Generate a node feature matrix of the water supply network based on the model parameter information;
[0010] The node feature matrix is divided and processed by the DPC algorithm to generate an initial cluster center C′;
[0011] The initial cluster center C′ is processed based on the PAM algorithm to generate a cluster center P, and the water supply network pressure monitoring point arrangement is completed according to the cluster center P for water supply network pressure monitoring.
[0012] Furthermore, the steps of establishing a hydraulic model of the water supply network and obtaining model parameter information based on the network structure and operation status after performing hydraulic analysis specifically include:
[0013] A hydraulic model of a water supply network is established according to the topological relationship of an actual water supply network and the operating parameters of pipe fittings, and N nodes and M pipe sections are set in the hydraulic model of the water supply network;
[0014] Perform hydraulic analysis based on the water supply network hydraulic model to generate model parameter information based on the network structure and operation status, the model parameter information including the position coordinates of each node Water demand q=[q1,q2,...,q i ] and pressure value H=[H1,H2,...,H i ], where i=1,2,...,N.
[0015] Furthermore, the step of generating a node characteristic matrix of the water supply network based on the model parameter information specifically includes:
[0016] In the water supply network, leakage is simulated by increasing the water demand at each node. The injection coefficient α and the leakage flow index β are set at the jth node. The formula is used Calculate the node leakage flow value q j , and perform hydraulic analysis to obtain the pressure value H′ of all nodes in the water supply network under the simulated leakage condition of each node:
[0017]
[0018] Among them, H ji represents the pressure value of the i-th node when the j-th node leaks, j = 1, 2, ..., N;
[0019] According to the pressure value H and the pressure value H′, the influence coefficient x(i, j) of node j on node i is calculated and the influence coefficient matrix X is constructed:
[0020]
[0021] Where: H i , H j is the pressure value of node i and node j under the condition of no leakage in the water supply network; H ji , H jj is the pressure value of node i in the water supply network at node j under leakage condition;
[0022]
[0023] After processing the influence coefficient matrix X, the matrix X″ and the matrix X″(i,j) are obtained:
[0024]
[0025] Where: X′ jmax is the maximum value of the jth column of X′, X′jmin is the minimum value of the jth column of X′, The minimum value of represents the average value of each column element of the influence coefficient matrix X, S j Represents the standard deviation of each column element of the influence coefficient matrix X;
[0026] Based on the matrix X″(i,j), the average Euclidean distance difference matrix R between the node j of the water supply network and the other nodes in the N nodes of the water supply network except the node j is calculated:
[0027]
[0028] The mean of the average Euclidean distance difference between node j and the N nodes in the water supply network except node j is calculated by the following formula:
[0029]
[0030] The mean of the average Euclidean distance difference is defined as the leakage point sensitivity of N nodes in the water supply network, and the leakage point sensitivity matrix of each node in the water supply network is constructed.
[0031] According to the position coordinates of each node and the leak point sensitivity matrix Constructing the node feature matrix
[0032] Furthermore, the steps of dividing and processing the water supply network by the DPC algorithm to generate the initial cluster center C′ specifically include:
[0033] The node feature matrix W is defined as a set of sample points:
[0034] W={y1,y2,…,y N} T
[0035] in:
[0036]
[0037] Input data set W = {y1,y2,…,y N} T , set the number of clusters to T;
[0038] Calculate the sample point y i and j The Euclidean distance between them is given by the following formula:
[0039]
[0040] Where: Represents the sample point y i The kth element value of ; Represents the sample point y j The k-th element value of , where K is the dimension of the data set W;
[0041] The sample point y i and j The Euclidean distance matrix between is defined as follows:
[0042] D={D1,D2,…,D N} T
[0043] in:
[0044] D1={d 11 d 12 …d 1N}
[0045] D2={d 21 d 22 …d 2N}
[0046]
[0047] D N ={d N1 d N2 …d NN}
[0048] At the same time, define the cutoff distance as d c , d c Select all sample points y i It is 0.3% of the total N, and the formula is as follows:
[0049]
[0050] Where: Represents the ceiling operator;
[0051] Define the sample point y i The local density ρ={ρ1,ρ2,…,ρ N}, the calculation formula is as follows:
[0052]
[0053] Where: d ij is the sample point y i and sample point y j The Euclidean distance between
[0054] Calculate the sample point y i With y jThe relative distance between them is δ={δ1,δ2,…,δ N}, the calculation formula is as follows:
[0055]
[0056] When the sample point y j The local density ρ j Greater than the sample point y i The local density ρ i When i Select the Euclidean distance matrix D i The minimum value in; when the sample point y j The local density ρ j Less than or equal to the sample point y i The local density ρ i When i Select the Euclidean distance matrix D i The maximum value in .
[0057] The obtained sample point y i The local density ρ i and the relative distance δ i Multiply them, and then sort them from large to small to get B = {b1, b2, ..., b N}, the sample points corresponding to array B are C={c1,c2,…,c N}, select the first T sample points as the initial cluster center, expressed as follows: C′={c1,c2,…,c t}, where i=1,2,...,N, j=1,2,...,N, t=1,2,...,T.
[0058] Furthermore, the initial cluster center C′ is processed based on the PAM algorithm to generate a cluster center P, and the steps of arranging the water supply network pressure monitoring points for water supply network pressure monitoring according to the cluster center P specifically include:
[0059] According to the initial cluster center C′={c1,c2,…,c t}, define the NT data objects outside the center point as
[0060] Use the following formula to calculate To the initial cluster center C′={c1,c2,…,c t}'s distance matrix:
[0061]
[0062] And the distance matrix is defined as follows:
[0063] D′={D1′,D2′,…,D′ N}
[0064] in:
[0065] D1′={d1′1d2′1…d′ N-T,1} T
[0066] D2′={d1′2d2′2…d′ N-T,2} T
[0067]
[0068] D′ N ={d1′ T d2′ T …d′ N-T,T} T
[0069] Select the matrix D i ′, and define this value as the shortest distance between each data object in the NT data objects and the initial cluster center point. The point with the shortest distance to each data object is the corresponding center point, and Each data object in is assigned to the cluster where the nearest center point is located;
[0070] The absolute error function is used as the criterion function to calculate the sum of squared errors. The formula is as follows:
[0071]
[0072] Where: E represents the sum of absolute errors of all data objects, c t is the initial cluster center C′={c1,c2,…,c t A central point in};
[0073] Select a point that is not the center of a cluster Replace the center point c t , calculate the change of the new and old clusters after replacing the center point, the formula is as follows:
[0074] S=E1-E2
[0075] Where: S represents the change in absolute error, E1 represents the sum of the absolute errors between all representative points in the data set and the center points in the same cluster before replacement; E2 represents the sum of the absolute errors between all representative points in the data set and the center points in the same cluster after the center point is replaced;
[0076] When S<0, the point that is not the center of the cluster Currently belongs to the center point c i, if the center point c i Replace with c h as the center point, and Closest to c h , and i≠h, then is reassigned to c h ; When S>0, the point that is not the cluster center Currently belongs to the center point c i , if the center point c i Replace with c h As the center point, Closest to c i , Not to be re-zoned;
[0077] The clustering process is terminated by iterative calculation until the affiliation of the data object no longer changes, and the output T clusters are determined to generate the cluster center P, with P = {p1, p2, ..., p t} represents, where t=1,2,…,T.
[0078] Furthermore, the step of completing the arrangement of the water supply network pressure monitoring points according to the cluster center P for water supply network pressure monitoring specifically includes:
[0079] According to the cluster center P = {p1, p2, ..., p t}, the position coordinates of the center point Among them, the position coordinates of the center point are the position coordinates of the pressure sensor arrangement in the water supply network, and the number of cluster center points T is the required number of pressure sensors, so as to complete the arrangement of the water supply network pressure monitoring points for water supply network pressure monitoring based on the position and number of pressure monitoring points in the water supply network monitoring area.
[0080] Compared with the prior art, the present invention has the following beneficial effects:
[0081] By combining the topological structure information and operating status information of the water supply network, a node feature matrix that more comprehensively reflects the current state of the water supply network is constructed. The node feature matrix including node spatial attributes and node leakage sensitivity solves the problem that other methods do not consider spatial characteristics. It is closer to the actual characteristics of the water supply network and improves the reliability of the subsequent layout of pressure monitoring points.
[0082] The focus of the clustering stage of the present invention is to combine the DPC algorithm with the PAM algorithm, the purpose is to avoid the selected initial clustering centers being too close to cause instability in the clustering results, and also to avoid selecting multiple initial clustering centers in the same cluster and ignoring clusters with fewer data objects; the PAM algorithm, as a typical unsupervised clustering algorithm based on the partitioning method, can cluster sample points through multiple iterations, and it has the advantages of simple clustering ideas, high feasibility of clustering process, and clustering time complexity close to linearity. At the same time, it also shows good support for large-scale data mining and is widely used in many fields. However, the input of the PAM algorithm is randomly selected data containing n objects, and the data point closest to the cluster mean is used as the calculation method of the initial clustering center. When calculating the clustering center, due to the existence of isolated noise points in the data set, the calculated initial clustering center may deviate from the true clustering center, which makes the clustering result inaccurate. Based on the DPC algorithm, it can avoid the instability of clustering results caused by the initial cluster centers selected in the PAM algorithm being too close. It also avoids selecting multiple initial cluster centers in the same cluster and ignoring clusters with fewer data objects, thereby confirming the optimal pressure monitoring point layout plan under the current number of cluster centers. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] Figure 1 A flow chart of a method for arranging pressure monitoring points in a water supply network based on a density peak clustering improved center point partitioning algorithm proposed by the present invention;
[0084] Figure 2 A pipe network model of an implementation case of a method for arranging pressure monitoring points in a water supply pipe network based on a density peak clustering-based improved partitioning algorithm around a center point proposed by the present invention;
[0085] Figure 3 This is the final pressure monitoring point layout diagram of an implementation case of the water supply network pressure monitoring point layout method based on the density peak clustering improved center point partitioning algorithm proposed in the present invention. DETAILED DESCRIPTION
[0086] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
[0087] The terms used herein are only used for the purpose of describing specific example embodiments and are not restrictive. For example, unless the context clearly indicates otherwise, as used herein, the singular forms "a", "an" and "the" may also include plural forms. When used in this specification, the terms "include", "comprise" and / or "contain" mean that the associated integers, steps, operations, elements and / or components exist, but do not exclude the existence of one or more other features, integers, steps, operations, elements, components and / or groups or that other features, integers, steps, operations, elements, components and / or groups may be added in the system / method.
[0088] In view of the following description, these and other features of the present specification, as well as the operation and function of the related elements of the structure, and the economy of the combination and manufacture of the parts can be significantly improved. Reference is made to the accompanying drawings, all of which form a part of this specification. However, it should be clearly understood that the drawings are for illustration and description purposes only and are not intended to limit the scope of this specification. It should also be understood that the drawings are not drawn to scale.
[0089] The flowcharts used in this specification illustrate the operations implemented by the system according to some embodiments in this specification. It should be clearly understood that the operations of the flowcharts may not be implemented in sequence. On the contrary, the operations may be implemented in reverse order or simultaneously. In addition, one or more other operations may be added to the flowchart. One or more operations may be removed from the flowchart.
[0090] like Figure 1 As shown, the present invention proposes a method for arranging pressure monitoring points in a water supply network based on a density peak clustering improved center point partitioning algorithm. The method arranges pressure monitoring points by using a density peak clustering DPC algorithm to improve a center point partitioning PAM algorithm for water supply network pressure monitoring, and specifically includes the following steps:
[0091] Step S101: Establish a hydraulic model of the water supply network, and perform hydraulic analysis to obtain model parameter information based on the network structure and operating conditions.
[0092] In this embodiment, the hydraulic model of the actual water supply network is established by importing the topological structure information and pipe operating parameters of the actual water supply network into the EPANET software; the EPANET toolbox is called to perform hydraulic analysis to obtain the network topological structure information and operating status information, including the total number N of water supply network nodes and the total number M of water supply pipe sections.
[0093] Perform hydraulic analysis based on the water supply network hydraulic model to generate model parameter information based on the network structure and operation status, the model parameter information including the position coordinates of each node Water demand q=[q1,q2,...,q i] and pressure value H=[H1,H2,...,H i ], where i=1,2,...,N.
[0094] Step S102: Generate a node feature matrix of the water supply network based on the model parameter information.
[0095] In this embodiment, the leakage is simulated by increasing the water demand at each node in the water supply network, setting the injection coefficient α and the leakage flow index β at the jth node, and using the formula Calculate the node leakage flow value q j , and perform hydraulic analysis to obtain the pressure value H′ of all nodes in the water supply network under the simulated leakage condition of each node:
[0096]
[0097] Among them, H ji Represents the pressure value of the i-th node when the j-th node leaks, j=1,2,...,N.
[0098] Step S101 obtains the pressure value H = [H1, H2, ..., H i ], calculate the influence coefficient x(i,j) of node j on node i according to the pressure value H and pressure value H′ and construct the influence coefficient matrix X:
[0099]
[0100] Where: H i , H j is the pressure value of node i and node j under the condition of no leakage in the water supply network; H ji , H jj is the pressure value of node i in the water supply network at node j under leakage condition;
[0101]
[0102] After processing the influence coefficient matrix X, the matrix X″ and the matrix X″(i,j) are obtained. Specifically, the average value of each column element of the influence coefficient matrix X is calculated. and standard deviation
[0103] in,
[0104]
[0105] Where: X′ jmax is the maximum value of the jth column of X′, X′ jmin is the minimum value of the jth column of X′, The minimum value of represents the average value of each column element of the influence coefficient matrix X, S j Represents the standard deviation of each column element of the influence coefficient matrix X;
[0106] Based on the matrix X″(i,j), the average Euclidean distance difference matrix R between the node j of the water supply network and the other nodes in the N nodes of the water supply network except the node j is calculated:
[0107]
[0108]
[0109] The mean of the average Euclidean distance difference between node j and the N nodes in the water supply network except node j is calculated by the following formula:
[0110]
[0111] The mean of the average Euclidean distance difference is defined as the leakage point sensitivity of N nodes in the water supply network, and the leakage point sensitivity matrix of each node in the water supply network is constructed.
[0112] According to the position coordinates of each node and the leak point sensitivity matrix Constructing the node feature matrix
[0113] Step S103: The node feature matrix is divided and processed by the DPC algorithm to generate an initial cluster center C′.
[0114] In this embodiment, the node feature matrix W is defined as a set of sample points:
[0115] W={y1,y2,…,y N} T
[0116] in:
[0117]
[0118] Input data set W = {y1,y2,…,y N} T , set the number of clusters to T;
[0119] Calculate the sample point y i and j The Euclidean distance between them is given by the following formula:
[0120]
[0121] Where: Represents the sample point yi The kth element value of ; Represents the sample point y j The k-th element value of , where K is the dimension of the data set W;
[0122] The sample point y i and j The Euclidean distance matrix between is defined as follows:
[0123] D={D1,D2,…,D N} T
[0124] in:
[0125] D1={d 11 d 12 …d 1N}
[0126] D2={d 21 d 22 …d 2N}
[0127]
[0128] D N ={d N1 d N2 …d NN}
[0129] At the same time, define the cutoff distance as d c , d c Select all sample points y i It is 0.3% of the total N, and the formula is as follows:
[0130]
[0131] Where: Represents the ceiling operator;
[0132] Define the sample point y i The local density ρ={ρ1,ρ2,…,ρ N}, the calculation formula is as follows:
[0133]
[0134] Where: d ij is the sample point y i and sample point y j The Euclidean distance between
[0135] Calculate the sample point y i With y j The relative distance between them is δ={δ1,δ2,…,δN}, the calculation formula is as follows:
[0136]
[0137] When the sample point y j The local density ρ j Greater than the sample point y i The local density ρ i When i Select the Euclidean distance matrix D i The minimum value in; when the sample point y j The local density ρ j Less than or equal to the sample point y i The local density ρ i When i Select the Euclidean distance matrix D i The maximum value in .
[0138] The obtained sample point y i The local density ρ i and the relative distance δ i Multiply them, and then sort them from large to small to get B = {b1, b2, ..., b N}, the sample points corresponding to array B are C={c1,c2,…,c N}, select the first T sample points as the initial cluster center, expressed as follows: C′={c1,c2,…,c t}, where i=1,2,...,N, j=1,2,...,N, t=1,2,...,T.
[0139] Step S104: The initial cluster center C′ is processed based on the PAM algorithm to generate a cluster center P, and the water supply network pressure monitoring point arrangement is completed according to the cluster center P for water supply network pressure monitoring.
[0140] In this embodiment, the initial cluster center is C′={c1,c2,…,c t}, define the NT data objects outside the center point as
[0141] Use the following formula to calculate To the initial cluster center C′={c1,c2,…,c t}'s distance matrix:
[0142]
[0143] And the distance matrix is defined as follows:
[0144] D′={D1′,D2′,…,D′ N}
[0145] in:
[0146] D1′={d1′1d2′1…d′ N-T,1} T
[0147] D2′={d1′2d2′2…d′ N-T,2} T
[0148]
[0149] D′ N ={d1′ T d2′ T …d′ N-T,T} T
[0150] Select the matrix D i ′, and define this value as the shortest distance between each data object in the NT data objects and the initial cluster center point. The point with the shortest distance to each data object is the corresponding center point, and Each data object in is assigned to the cluster where the nearest center point is located;
[0151] The absolute error function is used as the criterion function to calculate the sum of squared errors. The formula is as follows:
[0152]
[0153] Where: E represents the sum of absolute errors of all data objects, c t is the initial cluster center C′={c1,c2,…,c t A central point in};
[0154] Select a point that is not the center of a cluster Replace the center point c t , calculate the change of the new and old clusters after replacing the center point, the formula is as follows:
[0155] S=E1-E2
[0156] Where: S represents the change in absolute error, E1 represents the sum of the absolute errors between all representative points in the data set and the center points in the same cluster before replacement; E2 represents the sum of the absolute errors between all representative points in the data set and the center points in the same cluster after the center point is replaced;
[0157] When S<0, the point that is not the center of the cluster Currently belongs to the center point c i , if the center point c i Replace with ch as the center point, and Closest to c h , and i≠h, then is reassigned to c h ; When S>0, the point that is not the cluster center Currently belongs to the center point c i , if the center point c i Replace with c h As the center point, Closest to c i , Not to be re-zoned;
[0158] The clustering process is terminated by iterative calculation until the affiliation of the data object no longer changes, and the output T clusters are determined to generate the cluster center P, with P = {p1, p2, ..., p t} represents, where t=1,2,…,T.
[0159] According to the cluster center P = {p1, p2, ..., p t}, the position coordinates of the center point Among them, the position coordinates of the center point are the position coordinates of the pressure sensor arrangement in the water supply network, and the number of cluster center points T is the required number of pressure sensors, so as to complete the arrangement of the water supply network pressure monitoring points for water supply network pressure monitoring based on the position and number of pressure monitoring points in the water supply network monitoring area.
[0160] The above method is used to arrange the positions and numbers of the pressure monitoring points in the monitoring area of the water supply network to complete the arrangement of the pressure monitoring points of the water supply network for water supply network pressure monitoring.
[0161] like Figure 1-2 As shown, the present invention is a method for arranging pressure monitoring points in a water supply network based on a density peak clustering improved algorithm for dividing around a center point, and the water supply network in Modena, Italy, is selected as an experimental research object. The network consists of 268 water demand nodes, 4 water supply reservoirs and 317 connecting pipe sections, wherein the total water demand is 406.94L / s, the minimum value of the water demand node elevation is 30.39m, the maximum value is 41.83m, and the minimum service water pressure of the network is 14m. The network structure of the water supply network is complex, and it can well simulate the actual water supply network, and is specifically implemented according to the following content.
[0162] Step 1: Import the topological relationship and pipe operation parameters of the actual water supply network into EPANET software to establish the hydraulic model of the actual water supply network, where the number of water demand nodes in the water supply network is N = 268.
[0163] , the number of pipe sections is M = 317; call the EPANET toolbox to perform hydraulic analysis and obtain the network topology information and operation status information, including the adjacency matrix of the water supply network and the location coordinates, elevation, water demand, and pressure data of each node, as follows:
[0164] Call the EPANET toolbox to obtain the location coordinates, elevation, water demand, and pressure data of each node in the water supply network. The data is displayed in a table as follows:
[0165]
[0166]
[0167] Step 2: Calculate the node characteristic matrix by combining the water supply network topology and the network node parameters. The node characteristic matrix is obtained by calculation. The specific steps are as follows:
[0168] S1: Under the condition of no leakage in the water supply network, the water supply network model is hydraulically simulated, and the pressure value of each node in the water supply network is H = {26.307, 23.918, 22.578, …, 0}; in the water supply network, the leakage is simulated by increasing the water demand at each node, setting the injection coefficient α = 0.5 and the leakage flow index β = 0.7, using the formula Calculate the leakage flow value q of each node in the water supply network, call the EPANET toolbox, perform hydraulic analysis, and obtain the pressure values of all nodes in the water supply network under the simulated leakage conditions of each node
[0169]
[0170] S2: Using the formula The influence coefficients of the 268 nodes in the water supply network are calculated, and the influence coefficient matrix X is:
[0171]
[0172] Using the formula Find the average value of each column element of matrix X, and we get Using the formula Find the standard deviation of each column element of matrix X and get S j ={0.1707,0.1567,0.1377,…,0.1724}(j=1,2,…,N). Then use the formula Standardize the columns of matrix X to get the matrix Using the formula Normalize the matrix X'(i,j) to get a new matrix
[0173] Using the formula Calculate the average Euclidean distance difference between node j (j = 1, 2, ..., N) of the water supply network and the other nodes in the water supply network except node j And using the formula Calculate the mean of the average Euclidean distance difference between node j (j = 1, 2, ..., N) and the other nodes in the water supply network except node j. Define the mean of the average Euclidean distance difference as the leakage point sensitivity of the N nodes in the water supply network. The leakage point sensitivity matrix of each node in the water supply network is
[0174] The position coordinates of each node in the water supply network obtained in step 1 are and the leak point sensitivity matrix Combined to form a node feature matrix
[0175]
[0176] Step 3: Input the node feature matrix W obtained in step 2 into the DPC algorithm, divide the water supply network into T clusters, set the number of generated clusters to T, and use the DPC algorithm to generate the initial cluster center C = {c1, c2, ..., c t}(t=1,2,…,T), the specific steps are as follows:
[0177] S1: Define the node feature matrix as a set of sample points:
[0178] W={y1,y2,…,y N} T (i=1,2,…,N)
[0179] in,
[0180] y1={1.6501*10 6 4944639 0.6853}
[0181] y2={1.6503*10 6 4944585 0.8348}
[0182]
[0183] y N ={1.6535*10 6 4946758 0.8134}
[0184] S2: Using the formula Calculate the sample point y i and j The Euclidean distance matrix between
[0185] At the same time, define the cutoff distance as d c , d c Select all sample points y i 0.3% of the total N,
[0186] Use the following formula to calculate any sample point y i The local density
[0187]
[0188] ρ i ={2.4106,9.9410,20.1216,…,14.8056}(i=1,2,…,N).
[0189] Calculate the Euclidean distance d ij The maximum and minimum distances in
[0190]
[0191] δ i ={0.4108,0.2000,0.5925,…,0.0447}(i=1,2,…,N).
[0192] The local density ρ of the obtained sample point yi (i = 1, 2, ..., N) i and the relative distance δ i Multiply them, and then sort them from large to small to get array B. The sample points corresponding to array B are C = {30,59,…,265} (i = 1,2,…,N). The first T sample points are selected as the initial cluster centers, which are expressed as follows: C′ = {30,59,88,93,100,172,189,200,218,260}
[0193] Step 4: Input the initial cluster center C′={30,59,88,93,100,172,189,200,218,260} obtained in step 3 into the PAM algorithm to obtain a new cluster center. The specific steps are as follows:
[0194] S1: Input the initial cluster center into the PAM algorithm and select the cluster center according to the local density ρ. j and the distance δ from the cluster center j Determine the cluster center point. The specific steps are as follows:
[0195] Using the formula Calculate the distance from the data object to the initial cluster center, and assign the data object to the cluster with the nearest center point.
[0196] S2: Use the absolute error function as the criterion function and the error sum of squares To measure each cluster center c t The quality of the cluster is arbitrarily selected to replace the center point c t , and then calculate the difference value S = E1-E2 between the new and old clusters after replacing the center point.
[0197] At this time, if S<0, find the point with the least cost to replace the center point with a non-center point, and then replace the two objects accordingly. After the replacement is completed, the remaining objects that are not center points are reallocated to the cluster where the center point closest to it is located; if S>0, the cluster does not need to be re-divided;
[0198] The new center point c h A new cluster center is formed, denoted by P = {8, 65, 76, 103, 109, 134, 174, 185, 219, 252}.
[0199] S3: Repeat the process of S1-S3 until the data representing the object after iterative update no longer changes, and then end the clustering process, determine to output 10 clusters, and the set of output clusters P = {8, 65, 76, 103, 109, 134, 174, 185, 219, 252}.
[0200] Step 5: Based on the cluster center
[0201] P = {8, 65, 76, 103, 109, 134, 174, 185, 219, 252}, the position coordinates of the center point That is, the location coordinates of the pressure sensors arranged in the water supply network. The number of cluster center points T=10 is the required number of pressure sensors, and finally the location and number of pressure monitoring points in the monitoring area of the water supply network are determined.
[0202] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for arranging pressure monitoring points in a water supply network based on density peak clustering to improve the center point partitioning algorithm, characterized in that: The method uses a density peak clustering (DPC) algorithm to improve a PAM algorithm around a center point to arrange pressure monitoring points in a water supply network for water supply network pressure monitoring. The method includes: Establish a hydraulic model of the water supply network and perform hydraulic analysis to obtain model parameter information based on the network structure and operating conditions; Generate a node feature matrix of the water supply network based on the model parameter information; The node feature matrix is divided and processed by the DPC algorithm to generate an initial cluster center C′; The initial cluster center C′ is processed based on the PAM algorithm to generate a cluster center P, and the water supply network pressure monitoring point arrangement is completed according to the cluster center P for water supply network pressure monitoring.
2. The method for arranging pressure monitoring points in a water supply network according to claim 1, characterized in that: The steps of establishing a hydraulic model of a water supply network and performing hydraulic analysis to obtain model parameter information based on the network structure and operation status include: A hydraulic model of a water supply network is established according to the topological relationship of an actual water supply network and the operating parameters of pipe fittings, and N nodes and M pipe sections are set in the hydraulic model of the water supply network; Perform hydraulic analysis based on the water supply network hydraulic model to generate model parameter information based on the network structure and operation status, the model parameter information including the position coordinates of each node Water demand q=[q1,q2,...,q i ] and pressure value H=[H1,H2,...,H i ], where i=1,2,...,N.
3. The method for arranging pressure monitoring points in a water supply network according to claim 2, characterized in that: The step of generating a node characteristic matrix of a water supply network based on the model parameter information specifically includes: In the water supply network, leakage is simulated by increasing the water demand at each node. The injection coefficient α and the leakage flow index β are set at the jth node. The formula is used Calculate the node leakage flow value q j , and perform hydraulic analysis to obtain the pressure value H′ of all nodes in the water supply network under the simulated leakage condition of each node: Among them, H ji represents the pressure value of the i-th node when the j-th node leaks, j = 1, 2, ..., N; According to the pressure value H and the pressure value H′, the influence coefficient x(i, j) of node j on node i is calculated and the influence coefficient matrix X is constructed: Where: H i , H j is the pressure value of node i and node j under the condition of no leakage in the water supply network; H ji , H jj is the pressure value of node i in the water supply network at node j under leakage condition; After processing the influence coefficient matrix X, the matrix X″ and the matrix X″(i,j) are obtained: Where: X′ j max is the maximum value of the jth column of X′, X′ j min is the minimum value of the jth column of X′, The minimum value of represents the average value of each column element of the influence coefficient matrix X, S j Represents the standard deviation of each column element of the influence coefficient matrix X; Based on the matrix X″(i,j), the average Euclidean distance difference matrix R between the node j of the water supply network and the other nodes in the N nodes of the water supply network except the node j is calculated: The mean of the average Euclidean distance difference between node j and the N nodes in the water supply network except node j is calculated by the following formula: The mean of the average Euclidean distance difference is defined as the leakage point sensitivity of N nodes in the water supply network, and the leakage point sensitivity matrix of each node in the water supply network is constructed. According to the position coordinates of each node and the leak point sensitivity matrix Constructing the node feature matrix 4. The method for arranging pressure monitoring points in a water supply network according to claim 1, characterized in that: The steps of dividing and processing the water supply network using the DPC algorithm to generate the initial cluster center C′ specifically include: The node feature matrix W is defined as a set of sample points: W={y1,y2,…,y N } T in: Input data set W = {y1,y2,…,y N } T , set the number of clusters to T; Calculate the sample point y i and j The Euclidean distance between them is given by the following formula: Where: Represents the sample point y i The kth element value of ; Represents the sample point y j The kth element value of , where K is the dimension of the data set W; The sample point y i and j The Euclidean distance matrix between is defined as follows: D={D1,D2,…,D N } T in: At the same time, define the cutoff distance as d c , d c Select all sample points y i It is 0.3% of the total N, and the formula is as follows: Where: Represents the ceiling operator; Define the sample point y i The local density ρ={ρ1,ρ2,…,ρ N }, the calculation formula is as follows: Where: d ij is the sample point y i and sample point y j The Euclidean distance between Calculate the sample point y i With y j The relative distance between them is δ={δ1,δ2,…,δ N }, the calculation formula is as follows: When the sample point y j The local density ρ j Greater than the sample point y i The local density ρ i When i Select the Euclidean distance matrix D i The minimum value in; when the sample point y j The local density ρ j Less than or equal to the sample point y i The local density ρ i When i Select the Euclidean distance matrix D i The maximum value in . The obtained sample point y i The local density ρ i and the relative distance δ i Multiply them, and then sort them from large to small to get B = {b1, b2, ..., b N }, the sample points corresponding to array B are C={c1,c2,…,c N }, select the first T sample points as the initial cluster center, expressed as follows: C′={c1,c2,…,c t }, where i=1,2,...,N, j=1,2,...,N, t=1,2,...,T.
5. The method for arranging pressure monitoring points in a water supply network according to claim 1, characterized in that: The steps of generating a cluster center P after processing the initial cluster center C′ based on the PAM algorithm and completing the arrangement of the water supply network pressure monitoring points for water supply network pressure monitoring according to the cluster center P specifically include: According to the initial cluster center C′={c1,c2,…,c t }, define the NT data objects outside the center point as Use the following formula to calculate To the initial cluster center C′={c1,c2,…,c t }'s distance matrix: And the distance matrix is defined as follows: D′={D1′,D2′,…,D′ N } in: Select the matrix D i ′, and define this value as the shortest distance between each data object in the NT data objects and the initial cluster center point. The point with the shortest distance to each data object is the corresponding center point, and Each data object in is assigned to the cluster where the nearest center point is located; The absolute error function is used as the criterion function to calculate the sum of squared errors. The formula is as follows: Where: E represents the sum of absolute errors of all data objects, c t is the initial cluster center C′={c1,c2,…,c t A central point in}; Select a point that is not the center of a cluster Replace the center point c t , calculate the change of the new and old clusters after replacing the center point, the formula is as follows: S=E1-E2 Where: S represents the change in absolute error, E1 represents the sum of the absolute errors between all representative points in the data set and the center points in the same cluster before replacement; E2 represents the sum of the absolute errors between all representative points in the data set and the center points in the same cluster after the center point is replaced; When S<0, the point that is not the cluster center Currently belongs to the center point c i , if the center point c i Replace with c h as the center point, and Closest to c h , and i≠h, then is reassigned to c h ; When S>0, the point that is not the cluster center Currently belongs to the center point c i , if the center point c i Replace with c h As the center point, Closest to c i , Not to be re-zoned; The clustering process is terminated by iterative calculation until the affiliation of the data object no longer changes, and the output T clusters are determined to generate the cluster center P, with P = {p1, p2, ..., p t } represents, where t=1,2,…,T.
6. The method for arranging pressure monitoring points in a water supply network according to claim 5, characterized in that: The step of completing the arrangement of the water supply network pressure monitoring points according to the cluster center P for water supply network pressure monitoring specifically includes: According to the cluster center P = {p1, p2, ..., p t }, the position coordinates of the center point Among them, the position coordinates of the center point are the position coordinates of the pressure sensor arrangement in the water supply network, and the number of cluster center points T is the required number of pressure sensors, so as to complete the arrangement of the water supply network pressure monitoring points for water supply network pressure monitoring based on the position and number of pressure monitoring points in the water supply network monitoring area.
Citation Information
Patent Citations
A method for arranging pressure monitoring points in water supply network based on CFSFDP clustering algorithm
CN111291472B