Water supply forecasting method based on wavelet transform and time series neural network
Through wavelet transformation, the data is decomposed and the time series neural network model is used, the existing water supply prediction method is solved, and high-precision prediction of water supply volume and real-time judgment of leakage points in the water supply pipeline network are achieved.
Patent Information
- Application Number
- CN202310794911.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2043-06-30
AI Technical Summary
The existing water supply prediction methods have low prediction results when dealing with data noise, which affects the decision-making and planning of the water supply system.
Wavelet transform is used to decompose the low-frequency and high-frequency components in the original data. The low-frequency components are used to build a time series neural network model for real-time prediction of water supply, and the high-frequency components are used to determine whether there are leakage points in the water supply pipeline network.
It improves the real-time prediction accuracy of water supply, effectively avoids the influence of data noise, promptly determines whether there are leakage points in the water supply pipeline network, and reduces the loss of water supply leakage.
Smart Images

Figure CN117236479B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of water supply decision control, and in particular relates to a water supply prediction method based on wavelet transform and time series neural network. Background Art
[0002] As people's living standards gradually improve, residents have higher requirements for the quality of water supply services, among which how to effectively coordinate water demand and water supply is particularly important. Water supply forecasting is a key support for water supply decision-making and planning. Improving forecast accuracy is of great significance to the water supply system. However, water consumption is highly correlated with factors such as weather. The randomness of influencing factors will lead to a decrease in the accuracy and reliability of water supply forecasting.
[0003] In this regard, Long Yuhao's paper "Research on Water Supply Forecasting Based on Convolutional Neural Networks" published at the 31st China Process Control Conference used convolutional neural networks to conduct water supply forecasting research, improving the prediction accuracy and robustness of the prediction model. Zheng Haoran's paper "Community Water Supply Forecasting Based on Seasonal ARIMA Model" published in the 1st issue of "Computer Applications and Software" in 2018 used the ARIMA model to predict and analyze seasonal community water supply, with a short prediction cycle and improved prediction accuracy. Rahman S et al.'s paper "An expert system based algorithm for short term load forecast" published in the 2nd issue of "IEEE Transactions on Power Systems" in 1988 disclosed an expert system short-term prediction method, which predicted the system in the form of an expert knowledge base and achieved practical application results. The above methods have studied the factors affecting water supply prediction and constructed prediction models, but none of them have solved the problem of data noise affecting the accuracy of model prediction results, and the accuracy of prediction results is not high. Summary of the invention
[0004] The purpose of the present invention is to provide a water supply prediction method based on wavelet transform and time series neural network in response to the above problems. The method utilizes wavelet transform to decompose the low-frequency components and high-frequency components in the original data, and uses the low-frequency components as the input of the neural network model for real-time prediction of water supply, thereby avoiding the influence of data noise on the accuracy of the prediction results. In addition, the high-frequency components and the prediction results of water supply are used as the input of the second neural network model for real-time prediction and judgment of whether there are leakage points in the water supply network.
[0005] The technical solution of the present invention is a water supply prediction method based on wavelet transform and time series neural network, comprising the following steps:
[0006] Step 1: Determine the factors affecting residents’ water use and collect historical data on the factors and water supply flow in residential areas;
[0007] Step 2: Use the wavelet transform method to perform multi-level decomposition on the residential area water supply flow data to decompose the low-frequency components and high-frequency components in the original data;
[0008] Step 3: construct the first neural network model, use the influencing factor data obtained in step 1 and the low-frequency components obtained in step 2 as the input of the first neural network model, the output of the first neural network model is the water supply in the residential area, and use historical data to train it;
[0009] Step 4: Collect the real-time data of influencing factors and water supply flow, and use the wavelet transform method in step 2 to obtain the low-frequency component of the real-time data of water supply flow as the input of the trained first neural network model, and make a real-time prediction of the water supply volume in the residential area based on its output;
[0010] Step 5: Construct a second neural network model, use the influencing factor data obtained in step 1, the high-frequency components obtained in step 2, and the output of the first neural network model as inputs to the second neural network model, the output of the second neural network model is the judgment result of whether there is a leakage point in the water supply network, and use historical data to train it;
[0011] Step 6: Obtain the real-time data of influencing factors and water supply flow and the real-time prediction result of water supply output by the first neural network model as the input of the second neural network model, and judge whether there is a leakage point in the water supply network in real time based on its output.
[0012] Preferably, the influencing factors include whether it is a holiday, season, temperature and humidity.
[0013] Preferably, the first neural network model adopts a time series neural network, which includes input layer nodes, hidden layer nodes and output layer nodes, and the output expression of the node is:
[0014]
[0015] Where y represents the output of the node, x i , i = 1, 2, ... n represents the i-th input variable of the node, n represents the number of input variables of the node; f represents the activation function; w i , i=1, 2,…n represents the weight of the i-th input variable of the node; b represents the bias.
[0016] Compared with the prior art, the beneficial effects of the present invention include:
[0017] 1) The present invention uses wavelet transform to decompose low-frequency components and high-frequency components in the original data, and uses the low-frequency components as the input of the time series neural network model for real-time prediction of water supply, thereby achieving high-precision prediction of water supply for residents, effectively avoiding the impact of data noise on the accuracy of prediction results, and facilitating the adoption of measures to strengthen the guarantee of water supply for residents;
[0018] 2) The present invention mainly decomposes the high-frequency components of the original data by wavelet transform, and uses the neural network model to realize the real-time judgment of whether there is a leakage point in the water supply network, so that maintenance personnel can take control measures in time to reduce the loss of water supply leakage;
[0019] 3) The present invention realizes the integration of the functions of predicting the water supply volume for residents and real-time judgment of whether there are leakage points in the water supply network, which reduces the calculation amount of the system and improves the calculation efficiency;
[0020] 4) The present invention uses the water supply prediction result obtained by the first neural network model as one of the inputs of the second neural network model for real-time prediction of whether there is a leakage point in the water supply network, further improving the reliability of judging whether there is a leakage point in the water supply network. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0022] Figure 1 It is a schematic diagram of decomposing high-frequency components and low-frequency components based on wavelet transform in an embodiment of the present invention.
[0023] Figure 2 Schematic diagram of the structure of a time series neural network according to an embodiment of the present invention.
[0024] Figure 3 Schematic diagram of input and output of nodes of a time series neural network according to an embodiment of the present invention.
[0025] Figure 4 4 is a curve diagram of the water supply flow rate according to an embodiment of the present invention.
[0026] Figure 5 It is a curve diagram of low-frequency and high-frequency components obtained by decomposition according to an embodiment of the present invention.
[0027] Figure 6 This is a comparison chart of the predicted value and the actual value of the first neural network model in an embodiment of the present invention.
[0028] Figure 7 It is a misjudgment curve diagram of the first neural network model according to an embodiment of the present invention.
[0029] Figure 8 This is a predicted linear regression curve diagram of the first neural network model according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In the embodiment, the original data S of the water supply flow in the residential area is decomposed into three levels by using the wavelet transform method to obtain low-frequency components A1, A2, A3 and high-frequency components D1, D2, D3, as shown in FIG. Figure 1 shown.
[0031] like Figure 1 As shown, the water supply prediction method based on wavelet transform and time series neural network includes the following steps:
[0032] Step 1: Determine the factors affecting residents’ water use and collect historical data on the factors and water supply flow in residential areas;
[0033] Step 2: Use the wavelet transform method to perform multi-level decomposition on the residential area water supply flow data to decompose the low-frequency components and high-frequency components in the original data;
[0034] Step 3: construct the first neural network model, use the influencing factor data obtained in step 1 and the low-frequency components obtained in step 2 as the input of the first neural network model, the output of the first neural network model is the water supply in the residential area, and use historical data to train it;
[0035] In the embodiment, the first neural network model is a time series neural network, including an input layer, a hidden layer and an output layer, such as Figure 2 As shown, the input and output of the node are as follows Figure 3 shown.
[0036] Step 4: Collect the real-time data of influencing factors and water supply flow, and use the wavelet transform method in step 2 to obtain the low-frequency component of the real-time data of water supply flow as the input of the trained first neural network model, and make a real-time prediction of the water supply volume in the residential area based on its output;
[0037] Step 5: Construct a second neural network model, use the influencing factor data obtained in step 1, the high-frequency components obtained in step 2, and the output of the first neural network model as inputs to the second neural network model, the output of the second neural network model is the judgment result of whether there is a leakage point in the water supply network, and use historical data to train it;
[0038] Step 6: Obtain the real-time data of influencing factors and water supply flow and the real-time prediction result of water supply output by the first neural network model as the input of the second neural network model, and judge whether there is a leakage point in the water supply network in real time based on its output.
[0039] Time series neural networks add considerations to past values on top of basic neural networks. The basic principle is to use one or more past values to predict future values. There are three main types of sequence methods:
[0040] Method 1: Predict the future value y(t) based on the past value of the time series and the variable value x(t) of the next sequence. This method is called nonlinear autoregression with external input. This method is suitable for analyzing time series affected by past sequences and accompanying variable sequences, such as financial stocks or bonds, power load forecasting and system identification. The expression is:
[0041] y(t)=f(y(t-1),…,y(td),x(t-1),…,x(td)) (1)
[0042] Method 2: Predict the future value y(t) based only on the past value of the time series. This method is called nonlinear autoregression. This method is suitable for analyzing time series that are only affected by past series. It does not require accompanying variable series, can reduce the database storage burden, and can also be used for financial forecasting. The expression is:
[0043] y(t)=f(y(t-1),…,y(td)) (2)
[0044] Method 3: Predict the future value y(t) based only on the accompanying variable sequence x(t). This method is suitable for situations where the time series y(t) is not needed or cannot be saved in method 1. The expression is:
[0045] y(t)=f(x(t-1),…,x(td)) (3)
[0046] In the embodiment, method 1 is selected as the time series neural network training method, and the number of network delay layers is set to 2 layers.
[0047] Wavelet transform (WT) is a new transform analysis method, which inherits and develops the localization idea of short-time Fourier transform, and overcomes the shortcomings of window size not changing with frequency, etc. It can provide a "time-frequency" window that changes with frequency, and is an ideal tool for signal time-frequency analysis and processing. Its main features are that it can fully highlight the characteristics of certain aspects of the problem through transformation, can perform local analysis of time (space) frequency, and gradually refine the signal (function) at multiple scales through telescoping and translation operations, and finally achieve time subdivision at high frequencies and frequency subdivision at low frequencies, and can automatically adapt to the requirements of time-frequency signal analysis, so as to focus on any details of the signal.
[0048] 1) Wavelet function definition
[0049] Let ψ(t)∈L 2 (R), where L 2 (R) represents the space of square integrable functions on real number R, let represents the Fourier transform of ψ(t), if the following admissibility condition is satisfied
[0050]
[0051] Then ψ(t) is called a wavelet function. By scaling and translating ψ(t), a family of wavelet functions can be generated, as shown in the formula
[0052]
[0053] Where a is the scale factor and b is the translation factor. ψ(t) is usually called the base wavelet. a,b (t) is called sub-wavelet. The optional wavelet functions include morlet wavelet, db wavelet and sym wavelet.
[0054] 2) Wavelet transform type
[0055] 2.1) Continuous Wavelet Transform
[0056] Assume any continuous function or signal f(t)∈L 2 (R), then the continuous wavelet transform of f(t) at position b and scale a is defined as:
[0057]
[0058] in * denotes a conjugate complex number.
[0059] After continuously changing the position parameter b and the scale parameter a, the coefficient C of the continuous wavelet transform can be obtained.<a,b> , multiplying the coefficients by the appropriately scaled and translated wavelet yields the wavelet that makes up the original signal.
[0060] When the Fourier transform of the base wavelet satisfies the admissibility condition, i.e., formula (4), if f(t) is continuous at t∈R, the inverse transform of the continuous wavelet transform can be obtained, i.e., the original signal is:
[0061]
[0062] 2.2) Discrete Wavelet Transform
[0063] Since there is redundancy after continuous wavelet transform of one-dimensional signal, in order to eliminate redundancy and realize signal reconstruction, it is necessary to discretize the position parameter b and scale parameter a. Discretizing a and b according to power series will get discrete wavelet transform.
[0064]
[0065] From this we can get:
[0066]
[0067] Let the discrete basis wavelet be ψ j,k(t), then when f(t) is subjected to discrete wavelet transform, the expression is:
[0068]
[0069] The wavelet reconstruction formula can be expressed as:
[0070]
[0071] In the embodiment, the second neural network model has a similar structure to the first neural network model, and the second neural network model includes an input layer, a double hidden layer and an output layer.
[0072] In the embodiment, water supply flow data is collected as follows Figure 4 As shown, the low-frequency and high-frequency components decomposed by the wavelet transform method in step 2 are as follows Figure 5 The prediction error of the first neural network model of the embodiment is shown as Figure 6 , Figure 7 As shown, the prediction accuracy of the first neural network model is Figure 8 shown.
[0073] In one embodiment of the present invention, the second neural network model and the first neural network model adopt exactly the same structure.
[0074] In another embodiment of the present invention, the second neural network model is combined with the first neural network model into one, which is the same time series neural network model. The output of the time series neural network model is the water supply prediction result and the prediction result of whether there is a leakage point in the water supply network.
Claims
1. Water supply prediction method based on wavelet transform and time series neural network, It is characterized in that The following steps are involved: Step 1: Determine the factors affecting residents’ water use and collect historical data on the factors and water supply flow in residential areas; The influencing factors include whether it is a holiday, season, temperature and humidity; Step 2: Use the wavelet transform method to perform multi-level decomposition of the residential area water supply flow data to decompose the low-frequency components and high-frequency components in the original data; The original data S of water supply flow in residential areas is decomposed into three levels to obtain low-frequency components A1, A2, A3 and high-frequency components D1, D2, D3; Step 3: construct the first neural network model, use the influencing factor data obtained in step 1 and the low-frequency components obtained in step 2 as the input of the first neural network model, the output of the first neural network model is the water supply in the residential area, and use historical data to train it; The first neural network model is a time series neural network, including an input layer, a hidden layer and an output layer; Step 4: Collect the real-time data of influencing factors and water supply flow, and use the wavelet transform method in step 2 to obtain the low-frequency component of the real-time data of water supply flow as the input of the trained first neural network model, and make a real-time prediction of the water supply volume in the residential area based on its output; Step 5: Construct a second neural network model, use the influencing factor data obtained in step 1, the high-frequency components obtained in step 2, and the output of the first neural network model as inputs to the second neural network model, the output of the second neural network model is the judgment result of whether there is a leakage point in the water supply network, and use historical data to train it; The second neural network model includes an input layer, a double hidden layer and an output layer; Step 6: Obtain the real-time data of influencing factors and water supply flow and the real-time prediction result of water supply output by the first neural network model as the input of the second neural network model, and judge whether there is a leakage point in the water supply network in real time based on its output.
2. The water supply prediction method based on wavelet transform and time series neural network according to claim 1, It is characterized in that In step 2, the wavelet transform method specifically includes: 1) Wavelet function definition: Let function ,in t Indicates time, Represents real numbers The space of square integrable functions on , express The Fourier transform of ; Then it is called is the wavelet function, Generate wavelet function by scaling and translation operation , ; in is the scale parameter, is a positional parameter, is the sub-wavelet function; 2) Continuous wavelet transform: Assume any continuous function ,but In position parameters and scale parameter The continuous wavelet transform on is defined as: ; ; in , * represents conjugate complex number; Continuously changing position parameters and scale parameter After that, the coefficients of continuous wavelet transform are obtained , multiplying the coefficients by the appropriately scaled and translated wavelet yields the wavelet that makes up the original signal; When the Fourier transform of the base wavelet satisfies the admissibility condition formula, if exist Continuous at all points, we can get the inverse transform of the continuous wavelet transform, that is, the original signal is: ; 3) Discrete Wavelet Transform: There is redundancy in one-dimensional signal after continuous wavelet transform. In order to eliminate the redundancy and realize signal reconstruction, the position parameters and scale parameter Discretize it, and Discretization by power series gives the discrete wavelet transform, where ; In the formula j , k are intermediate variables, all of which are integers; From this we can get: ; The discrete basis wavelet is denoted as , then When doing discrete wavelet transform, the expression is: ; In the formula is the discrete wavelet transform result.
3. The water supply prediction method based on wavelet transform and time series neural network according to claim 2, It is characterized in that The first neural network model adopts a time series neural network, which includes input layer nodes, hidden layer nodes and output layer nodes. The output expression of the node is: ; In the formula The output of the node, Indicates the node i input variables, n Represents the number of input variables of the node; f represents the activation function; Indicates the node i The weights of the input variables; Indicates bias.
Citation Information
Patent Citations
DWT-PCA-LSTM-based water supply quantity prediction device for water supply company
CN111079989A
Pipeline leakage monitoring and positioning method combining deep learning and multiple measurement technologies
CN112413413A
Method of estimating flow rate and of detecting leak of wide area water using recurrent analysis, recurrent neural network and deep neural network
KR1020190094692A