Abnormal monitoring method and system for water supply network pressure signal based on covariance matrix
By analyzing the covariance matrix and correlation coefficients, and combining the F-norm difference and quartile method, the problem of anomaly detection in multi-point pressure monitoring of water supply networks was solved, achieving efficient and accurate anomaly location and identification.
Patent Information
- Application Number
- CN202411337147.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-09-25
AI Technical Summary
Existing technologies for monitoring water supply network pressure are insufficient for effectively utilizing data from multiple measurement points for real-time and accurate anomaly detection, leading to increased time costs and a high false alarm rate.
By employing covariance matrix and correlation coefficient analysis methods, the F-norm difference of the pipeline pressure covariance matrix and the correlation coefficient between measuring points are calculated. Combined with the upper and lower quartiles method, anomaly monitoring is performed to achieve anomaly location and secondary judgment of water supply pipeline pressure signals.
It improves the real-time performance and accuracy of water supply network pressure monitoring, reduces computational resource consumption, enables rapid identification and precise location of abnormal monitoring points, and reduces the false alarm rate.
Smart Images

Figure CN118856247B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of urban water supply pipe networks, and in particular relates to a method and system for monitoring abnormal pressure signals of a water supply pipe network based on a covariance matrix. Background Art
[0002] When building a water supply network pressure monitoring system, it is crucial to accurately capture abnormal changes in water pressure in real time so that potential problems such as pipe bursts and monitoring point failures can be quickly responded to. At present, water companies mainly use intelligent pressure gauges to monitor water supply networks to ensure the normal operation of water supply networks. Existing technologies usually analyze and process pressure data from a single measuring point, such as using the wavelet transform (WT) method to detect singular points in the pressure signal, and identify abnormal events in the pressure monitoring signal by analyzing the singular points of the pressure signal. Another example is the use of a joint analysis method in the time and frequency domains. On the basis of conventional detection in the time domain, the frequency domain wavelet singular point detection method is combined to identify pressure mutation signals. These methods are limited to a single measuring point and are not suitable for fusion analysis and processing of multiple measuring points. With the rapid development of the Internet of Things technology, a large number of pressure measuring points will be deployed in the water supply network to form a pressure gauge array. If single measuring points are still used for analysis one by one, it will not only increase the time cost, but also easily lead to single-point false alarms.
[0003] The covariance matrix and correlation coefficient can be used to analyze the correlation between adjacent measuring points in the water supply network. By analyzing the covariance matrix and correlation coefficient, we can gain a deep understanding of the hydraulic characteristics between different measuring points and obtain important information about the status of the network. The covariance matrix is used to evaluate the interdependence between multiple variables. It can show the correlation of water pressure changes between different measuring points. Using the covariance matrix, we can not only effectively capture the pressure anomalies in the network, but also improve the real-time and accuracy of the monitoring system, providing strong support for the healthy operation of the network. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention proposes a method and system for monitoring abnormal pressure signals of a water supply network based on a covariance matrix. The present invention uses the covariance matrix and correlation coefficient to analyze the pressure array signal to achieve abnormal pressure array signal monitoring of the water supply network.
[0005] In a first aspect, the present invention provides a method for monitoring abnormal pressure signals of a water supply network based on a covariance matrix, comprising the following steps:
[0006] Step 1, calculate the pipe network pressure covariance matrix;
[0007] Step 2, at each sampling moment, calculate the F-norm difference between the pressure covariance matrix in the current moment window and the pressure covariance matrix in the previous sampling moment window;
[0008] When the F-norm difference is greater than the first threshold, proceed to step 3;
[0009] Step 3, analyzing the correlation coefficient between the measurement points to determine the nature of the event;
[0010] For events within the area, the change amplitude of the measuring point is captured. When the change amplitude of the measuring point is greater than the second threshold, it is determined to be a fault measuring point; otherwise, it goes to step 4 for secondary determination;
[0011] Step 4: Analyze the deviation data of the initially screened measuring points and identify abnormal measuring points using the upper and lower quartile method.
[0012] In a second aspect, the present invention provides a water supply network pressure signal anomaly monitoring system based on a covariance matrix, comprising:
[0013] A covariance matrix calculation unit, used to calculate the pipe network pressure covariance matrix;
[0014] An F-norm difference analysis unit is used to calculate the F-norm difference between the pressure covariance matrix in the current window and the pressure covariance matrix in the previous window at each sampling moment;
[0015] When the F-norm difference is greater than the first threshold, the pressure abnormality event preliminary determination unit is entered;
[0016] The unit for preliminary judgment of abnormal pressure events is used to analyze the correlation coefficients between measuring points to judge the nature of the event;
[0017] For events within the area, the change amplitude of the measuring point is captured. When the change amplitude of the measuring point is greater than the second threshold, it is determined to be a faulty measuring point; otherwise, it enters the secondary judgment unit of the pressure abnormality event for secondary judgment;
[0018] The secondary determination unit for abnormal pressure events analyzes the deviation data of the initially screened measuring points and identifies abnormal measuring points through the upper and lower quartile method.
[0019] In the third aspect, the present invention provides an electronic device for monitoring abnormal pressure signals of a water supply network based on a covariance matrix, comprising a processor and a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed by the processor, a method for monitoring abnormal pressure signals of a water supply network based on a covariance matrix is implemented.
[0020] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a method for monitoring abnormal pressure signals in a water supply network based on a covariance matrix.
[0021] Compared with traditional technical solutions, the present invention can effectively identify abnormal pressure events in water supply networks; by calculating the F-norm deviation of the covariance matrix for anomaly detection, the present invention can not only perform preliminary anomaly location, but also accurately locate abnormal measurement points from a global perspective through strategies such as secondary determination, and clarify the secondary determination area and abnormal measurement points. When facing large-scale pipe networks, the present invention can greatly reduce the consumption of computing resources and improve computing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a flow chart of the method of the present invention;
[0023] Figure 2 This is the pipe network structure diagram of the application example. DETAILED DESCRIPTION
[0024] The present invention will be described in detail below based on the accompanying drawings and preferred embodiments, and the purpose and effects of the present invention will become more clear. It should be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the scope of the present invention and its application.
[0025] The present application provides a method for monitoring abnormal pressure signals of a water supply network based on a covariance matrix, comprising the following steps:
[0026] Step 1: Calculation of the network pressure covariance matrix
[0027] The covariance matrix is a matrix that describes the linear correlation between variables. The diagonal elements of the covariance matrix represent the covariance of each variable with itself. Because covariance is a measure of how two variables change together, the covariance of a variable with itself is its variance. Variance measures the variability of a single variable, so in the covariance matrix, each element on the diagonal is the variance of the corresponding variable. The off-diagonal elements of the covariance matrix represent the covariance between different variables. The absolute value of the covariance can reflect the strength of the linear relationship between the variables.
[0028] For two random variables X and Y, their covariance can be calculated by the following formula:
[0029] (1)
[0030] In formula (1), E(X) and E(Y) represent the expectations of X and Y respectively, and E represents the expected value.
[0031] The specific calculation formula is:
[0032] (2)
[0033] In formula (2), n is the number of observations, is the observed value, and is the sample mean.
[0034] For matrix A, the covariance matrix C can be calculated as follows:
[0035] (3)
[0036] In formula (3), n is the number of observations, is a matrix where each column is the mean of the corresponding variable.
[0037] According to the monitoring data of the pipe network pressure monitoring point, the measured data matrix can be obtained. Assume that the measured data matrix is as follows:
[0038] (4)
[0039] In formula (4), p represents the number of monitoring points and N represents the total number of samples.
[0040] Take a window of fixed length L as the observation object, the moving interval as the unit sampling interval, and assume that the current time is m. The observation data matrix of the current time window is:
[0041] (5)
[0042] Assuming that the fault occurs at time m+1, the difference matrix of the two observation matrices is calculated as follows:
[0043] (6)
[0044] According to formula (6), the covariance matrix of the difference matrix at time m+1 is:
[0045] (7)
[0046] In formula (7), is the covariance matrix, and L is the window length.
[0047] Step 2: F-norm-based difference analysis
[0048] At each sampling moment, the F-norm difference between the covariance matrix in the current window L and the covariance matrix in the previous sampling window L is calculated. By calculating the F-norm difference, the degree of change of the covariance matrix at consecutive sampling moments can be effectively measured, as shown in formula (8):
[0049] (8)
[0050] In formula (8), The calculation is shown in formula (9):
[0051] (9)
[0052] In formula (9), for The elements in , p is the number of monitoring points, and L is the window length.
[0053] Subsequently, the upper quartiles of the differences calculated based on the sampling data of the normal operation of the pipeline network are calculated, and the upper quartiles are used as the threshold to balance the detection sensitivity and reduce the need for underreporting, so as to ensure that the real abnormal changes can be accurately identified in most cases. When the F-norm difference at a certain moment exceeds this threshold (i.e., the first threshold), it is judged as a mutation of the covariance matrix, which indicates that an abnormal event may have occurred in the system.
[0054] Step 3: Preliminary determination of abnormal pressure events
[0055] When a monitoring point records a sudden change in covariance, it usually indicates that the water supply network may have encountered an abnormal event at that moment. In the water supply network system, water pressure often rises and falls due to pump station regulation or water use activities in communities. In these cases, the water pressure curves of related measuring points often show highly consistent change characteristics.
[0056] In order to distinguish such normal operation events, this embodiment adopts a method of analyzing the correlation coefficient between measurement points. The calculation formula of the correlation coefficient is as follows:
[0057] (10)
[0058] In formula (10), It represents the correlation degree of water pressure series between nodes i and j; , Respectively represent the water pressure values of nodes i and j at time l; , They represent the mean water pressure of nodes i and j respectively; L is the window length.
[0059] When the average value of the correlation coefficient of the measuring points in the monitoring area exceeds 0.7, it is determined that there is a strong correlation between the measuring points in the monitoring area, indicating that there is a consistency in the changes in the pressure of the measuring points in the system, and it is determined to be an event outside the (pipeline network monitoring) area, otherwise it is an event within the (pipeline network monitoring) area.
[0060] For events within the region, at the current time m, the original data matrix will contain sampled data of a window length of L. In order to accurately capture these anomalies, the amplitude of the measurement point change is captured, which is expressed as follows:
[0061] (11)
[0062] In formula (11), is the monitoring value of the e-th monitoring point at time m; is the measured value before the l window length, and L is the original data matrix window length. It reflects the deviation level of the measured value. The faulty measuring point can be determined by comparing the deviation degree of the pressure value at the measuring point.
[0063] When the pressure difference at the measuring point When the pressure exceeds the set threshold k (i.e., the second threshold), it indicates that the measuring point has experienced a significant pressure change, indicating that an abnormality has occurred at the measuring point, which can be used to quickly locate the specific time when the abnormality occurred. At the same time, the pressure rise and fall trend is determined by calculating the difference between the pressure data before and after the measuring point. If the pressure deviation does not exceed the set threshold k, proceed to step 4, otherwise the abnormal event is recorded.
[0064] Step 4: Secondary determination of abnormal pressure events
[0065] In addition to the more obvious abnormal pressure drop, this embodiment will also perform secondary determination on the remaining covariance mutation events. This process mainly uses the upper and lower quartile method to conduct in-depth analysis on the initially screened measurement point deviation data, thereby identifying those potential abnormal measurement points with large pressure deviations.
[0066] In this embodiment, the first 25% of the data is set as , set the first 75% of the data to , then the interquartile range IQR calculation formula (12) is as follows:
[0067] (12)
[0068] Calculate the upper limit of the outlier point based on IQR ( ) and the lower limit ( ), as shown in formula (13):
[0069] (13)
[0070] If the data point value is less than the Lower Limit or greater than the Upper Limit, it is considered an anomaly.
[0071] Based on these suspected abnormal measurement points and their connected measurement points, the secondary judgment area is defined. This strategy can effectively narrow the search range of potential abnormal measurement points, thereby accelerating the location of abnormal measurement points and reducing unnecessary computing resource consumption.
[0072] For the measurement points in the secondary determination area, single measurement point abnormal value determination is performed. Assuming that the signal acquisition frequency is 0.1Hz, that is, one data is collected every 10s, then different scales are set to 10s, 60s, and 600s, which are recorded as L1(1), L1(2), and L1(3). For the acquisition signals of other frequencies, the scales can be set according to the actual situation. The single measurement point abnormal value determination is shown in steps S4.1-S4.4:
[0073] The S4.1 network pressure data is not normally distributed, so the box rule is used to determine the anomalies of L1(1), L1(2), and L1(3).
[0074] S4.2 Calculate the quartile values and outer limits of L1(1), L1(2), and L1(3) under normal operation of the pipeline network, and use this outer limit as the threshold (i.e., the third threshold), and observe the time subscripts of the monitored data L1(1), L1(2), and L1(3) exceeding their respective thresholds.
[0075] S4.3 deduplicates abnormal events and removes and merges events with close time.
[0076] S4.4 Determine the area where the event is located by the correlation coefficient and determine the type of abnormal pressure trend based on the pressure difference.
[0077] In a preferred embodiment, the present application also provides a water supply network pressure signal anomaly monitoring system based on a covariance matrix, and the water supply network pressure signal anomaly monitoring method based on a covariance matrix described in the above preferred example is applied, including:
[0078] A covariance matrix calculation unit, used to calculate the pipe network pressure covariance matrix;
[0079] An F-norm difference analysis unit is used to calculate the F-norm difference between the pressure covariance matrix in the current window and the pressure covariance matrix in the previous window at each sampling moment;
[0080] When the F-norm difference is greater than the first threshold, the pressure abnormality event preliminary determination unit is entered;
[0081] The unit for preliminary judgment of abnormal pressure events is used to analyze the correlation coefficients between measuring points to judge the nature of the event;
[0082] For events within the area, the change amplitude of the measuring point is captured. When the change amplitude of the measuring point is greater than the second threshold, it is determined to be a faulty measuring point; otherwise, it enters the secondary judgment unit of the pressure abnormality event for secondary judgment;
[0083] The secondary determination unit for abnormal pressure events analyzes the deviation data of the initially screened measuring points and identifies abnormal measuring points through the upper and lower quartile method.
[0084] The embodiment of the present application also discloses an electronic device for monitoring abnormal pressure signals of a water supply network based on a covariance matrix, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for monitoring abnormal pressure signals of a water supply network based on a covariance matrix are implemented, wherein the memory may include a memory, such as a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk memory, etc.; the processor, the network interface, and the memory are interconnected through an internal bus, and the internal bus may be an industrial standard architecture bus, a peripheral component interconnection standard bus, an extended industrial standard structure bus, etc., and the bus may be divided into an address bus, a data bus, a control bus, etc. The memory is used to store programs, and specifically, the program may include a program code, and the program code includes computer operation instructions. The memory may include a memory and a non-volatile memory, and provide instructions and data to the processor.
[0085] The embodiment of the present application also discloses a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the water supply network pressure signal abnormality monitoring method based on the covariance matrix are implemented. Specifically, the computer-readable storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. The volatile memory may include a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include a read-only memory (ROM), a hard disk, a flash memory, an optical disk, a magnetic disk, etc.
[0086] Application examples:
[0087] like Figure 1 As shown in the figure, the method of this application example includes the steps of calculating the covariance matrix of the pipe network pressure, difference analysis based on the F norm, preliminary determination of pressure abnormal events and secondary determination of pressure abnormal events. The application example is a pipe network in a certain test area, and the pipe network structure diagram is as follows: Figure 2 As shown, there are 190 measuring points in total, with a sampling frequency of once every 5 minutes, which are saved in the SCADA database. The measured data of 2023-03-05 and 2023-03-06 are now obtained for analysis.
[0088] Step 1: Calculation of the network pressure covariance matrix
[0089] For the corresponding use case, the pressure signal on 2023-03-06 (a total of 288 pressure data at a single measuring point) is analyzed, and the sampling window length is set to 1 hour.
[0090] Taking the time window from 2023-03-06 00:00:00 to 2023-03-06 00:55:00 as an example, the observation data matrix in this time window is
[0091]
[0092] The observation data matrix in the time window of the next moment is
[0093]
[0094] The difference matrix of the two observation matrices calculated by formula (6) is as follows:
[0095] =
[0096] The covariance matrix of the difference matrix calculated by formula (7) is as follows:
[0097] =
[0098] Step 2: F-norm-based difference analysis
[0099] By analyzing historical data, this application example calculates the F-norm difference of the covariance matrix between consecutive time points. Specifically, taking March 5, 2023 as an example, there was no pipe burst on that day, which is the normal operation data of the water supply network. Based on the data of this day, the F-norm difference of the covariance matrix between different time points is calculated. The F-norm difference of the covariance matrix at each time point on March 5, 2023 is detailed in Table 1.
[0100] Table 1 Covariance matrix F norm difference table on March 5, 2023
[0101]
[0102] According to Table 1, the difference of the covariance F norm at each time on March 5, 2023 can be obtained. Based on this, the normal threshold of the covariance F norm can be calculated to be 0.549. The difference of the covariance F norm is calculated for the monitoring date, as shown in Table 2.
[0103] Table 2 Covariance matrix F norm difference table on March 6, 2023
[0104]
[0105] When the calculated F-norm difference of the covariance matrix exceeds the threshold value of 0.549, it indicates that an abnormal event may have occurred.
[0106] Step 3: Preliminary determination of abnormal pressure events
[0107] When a monitoring point records a sudden change in covariance, it usually indicates that the water supply network may have encountered an abnormal event at that moment. The correlation threshold is set to 0.7, and the pressure difference threshold is set to 5m. A preliminary judgment is made on the covariance mutation event, and some of the judgment events are shown in Table 3.
[0108] Table 3 Preliminary determination of some abnormal events
[0109]
[0110] Step 4: Secondary determination of abnormal pressure events
[0111] Except for the out-of-region time and the more obvious abnormal pressure drop in step 3, the remaining covariance mutation events are re-determined.
[0112] First, the threshold values of each measuring point are calculated based on the normal operation data of the pipeline network on March 5, 2023, as shown in Table 4, in meters.
[0113] Table 4 Threshold table of single measuring point L1(1), L1(2), L1(3)
[0114]
[0115] According to the threshold of each measuring point, the monitored data is re-determined, and the secondary determination events are merged with the initial determination events to obtain the final monitoring disturbance event table, as shown in Table 5.
[0116] Table 5 Monitoring disturbance events of this application example
[0117]
[0118] When facing different numbers of measurement points, the operating efficiency of the singular point detection algorithm of time-frequency joint analysis and the covariance matrix monitoring method proposed in this application example are compared, as shown in Table 6.
[0119] Table 6 Comparison of computational efficiency of different algorithms under different numbers of measurement points
[0120]
[0121] It can be seen from Table 6 that compared with the singular point detection algorithm of time-frequency joint analysis, the application example of this application can effectively reduce the calculation time and still maintain good real-time performance when facing a large-scale pipeline network with many measuring points.
[0122] Those skilled in the art can understand that the above are only preferred examples of the invention and are not intended to limit the invention. Although the invention is described in detail with reference to the above examples, those skilled in the art can still modify the technical solutions recorded in the above examples or replace some of the technical features therein with equivalents. Any modification, equivalent replacement, etc. made within the spirit and principle of the invention shall be included in the protection scope of the invention.
Claims
1. A water supply network pressure signal abnormality monitoring method based on covariance matrix, characterized in that The method comprises the following steps: Step 1, calculate the pipe network pressure covariance matrix; Step 2, at each sampling moment, calculate the F-norm difference between the pressure covariance matrix in the current moment window and the pressure covariance matrix in the previous sampling moment window; When the F-norm difference is greater than the first threshold, proceed to step 3; Step 3, analyzing the correlation coefficient between the measurement points to determine the nature of the event; For events within the area, the change amplitude of the measuring point is captured. When the change amplitude of the measuring point is greater than the second threshold, it is determined to be a fault measuring point; otherwise, it goes to step 4 for secondary determination; Step 4: Analyze the deviation data of the initially screened measuring points and identify abnormal measuring points using the upper and lower quartile method.
2. The method for monitoring abnormal pressure signals of a water supply network based on a covariance matrix according to claim 1, characterized in that: The first threshold is obtained by calculating the difference based on the normal operation data of the pipeline network, calculating the upper quartile thereof, and using the upper quartile as the first threshold.
3. The method for monitoring abnormal pressure signals of a water supply network based on a covariance matrix according to claim 1, characterized in that: The change range of the measuring point described in step 3 is calculated by the following formula: ; in for m The monitoring value of the e-th monitoring point at time; for m - l The monitoring value of the e-th monitoring point at time, L is the window length.
4. The method for monitoring abnormal pressure signals of a water supply network based on a covariance matrix according to claim 1, characterized in that: For the abnormal measuring points identified in step 4 and the measuring points connected thereto, a secondary determination area is defined.
5. The method for monitoring abnormal pressure signals of a water supply network based on a covariance matrix according to claim 4 is characterized in that: The method also includes performing single-measurement-point abnormal value determination on the measurement points within the secondary determination area.
6. The method for monitoring abnormal pressure signals of a water supply network based on a covariance matrix according to claim 5, characterized in that: The single measuring point abnormal value is determined as follows: S4.
1. The network pressure data is not normally distributed, and abnormality judgment is performed on L1(1), L1(2), and L1(3), where L1(1), L1(2), and L1(3) are three different scales at the same acquisition frequency; S4.
2. Calculate the quartile values and outer limits of L1(1), L1(2), and L1(3) under normal operation of the pipeline network, and use this outer limit as the third threshold, and observe the time when the monitored data L1(1), L1(2), and L1(3) exceed their respective thresholds; S4.
3. De-duplicate abnormal events and remove and merge events with close time. S4.
4. Determine the area where the event is located and the type of abnormal pressure trend through the correlation coefficient.
7. The method for monitoring abnormal pressure signals of a water supply network based on a covariance matrix according to claim 5, characterized in that: The box rule is used to determine abnormalities of L1(1), L1(2), and L1(3).
8. A water supply network pressure signal abnormality monitoring system based on covariance matrix, characterized in that: include: A covariance matrix calculation unit, used to calculate the pipe network pressure covariance matrix; An F-norm difference analysis unit is used to calculate the F-norm difference between the pressure covariance matrix in the current window and the pressure covariance matrix in the previous window at each sampling moment; When the F-norm difference is greater than the first threshold, the pressure abnormality event preliminary determination unit is entered; The unit for preliminary judgment of abnormal pressure events is used to analyze the correlation coefficients between measuring points to judge the nature of the event; For events within the area, the change amplitude of the measuring point is captured. When the change amplitude of the measuring point is greater than the second threshold, it is determined to be a faulty measuring point; otherwise, it enters the secondary judgment unit of the pressure abnormality event for secondary judgment; The secondary determination unit for abnormal pressure events analyzes the deviation data of the initially screened measuring points and identifies abnormal measuring points through the upper and lower quartile method.
9. An electronic device for monitoring abnormal pressure signals of a water supply network based on a covariance matrix, characterized in that: It includes a processor and a computer-readable storage medium, wherein the computer-readable storage medium stores instructions. When the instructions are executed by the processor, the water supply network pressure signal anomaly monitoring method based on the covariance matrix as described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for monitoring abnormal pressure signals in a water supply network based on a covariance matrix as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Blower fan abnormal data processing method and device based on quartile box plot
CN106897941A
Hydraulic modeling method for pressure-driven water supply network and application
CN117236225A
