Daily water consumption prediction method based on phase space reconstruction and gene expression programming
Through phase space reconstruction and gene expression programming model, the one-dimensional water consumption data is mapped to multi-dimensional space, solving the problems of multiple parameters and training time-consuming daily water consumption prediction models in the existing technology, and achieving fast and accurate water use Quantity prediction.
Patent Information
- Application Number
- CN202111359125.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-17
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-11-17
AI Technical Summary
The existing water consumption prediction model has problems such as excessive model parameters, long training time and high data sampling frequency in daily water consumption prediction, which is difficult to apply to pipeline water consumption prediction tasks that collect only one data per day.
Using a method based on phase space reconstruction and gene expression programming, one-dimensional water consumption data is mapped to multidimensional space, and the optimal delay time and embedding dimensions are obtained through mutual information and false proximity point method, combined with the gene expression programming model Construct the convergence function of angles and quickly obtain the functional formula for water consumption prediction.
It improves the accuracy and efficiency of water consumption prediction, can quickly converge to the optimal target, is suitable for daily water consumption prediction tasks, and reduces the requirements for data sampling frequency.
Smart Images

Figure BDA0003358399590000021 
Figure BDA0003358399590000022 
Figure BDA0003358399590000023
Abstract
Description
[Technical field]
[0001] The invention relates to the technical field of water supply pipe networks, and in particular to a daily water consumption prediction method based on phase space reconstruction and gene expression programming. [Background technology]
[0002] Water consumption forecasting is divided into short-term forecasting and medium- and long-term forecasting. Medium- and long-term forecasting is usually monthly and annual water consumption forecasting, which is mainly used for optimizing the construction of urban water supply pipe networks. Short-term forecasting is usually hourly and daily water consumption forecasting, which is mainly used to optimize the configuration of water supply systems. Accurate daily water consumption forecasting can improve the management efficiency of water supply systems and reduce scheduling costs and save resources. In recent years, data-driven methods have been widely used in water consumption forecasting. In forecasting, a large number of algorithms require historical data of temperature, population, precipitation and other related variables in addition to historical water consumption data to improve the accuracy of the model. However, in practical applications, not all water companies can provide a large amount of multidimensional data as required, and water consumption data is the most basic guarantee. In the face of this problem, researchers have proposed a variety of forecasting models such as autoregressive integrated moving average model (ARIMA), artificial neural network (ANN), support vector machine model (SVM), extreme learning machine model (ELM) and long short-term memory network model (LSTM). However, most of these models have problems such as too many model parameters, time-consuming training, and require a high sampling frequency. It is not suitable for the task of predicting water consumption in a pipe network where only one data is collected every day. Therefore, it is necessary to provide a daily water consumption prediction method based on phase space reconstruction and gene expression programming to solve the above problems. [Summary of the invention]
[0003] The present invention discloses a daily water consumption prediction method based on phase space reconstruction and gene expression programming. The phase space reconstruction method is used to map one-dimensional data to multi-dimensional space, thereby increasing the amount of information in the data, which is conducive to better identification of the system. Then, a gene expression programming model is used to derive a definite mathematical model, which is conducive to guiding relevant technical personnel to strengthen their understanding of the water supply system and can quickly converge to an optimal goal.
[0004] To achieve the above object, the technical solution of the present invention is:
[0005] A method for predicting daily water consumption based on phase space reconstruction and gene expression programming comprises the following steps:
[0006] S1: Collect historical water consumption data of the water supply network to form a training set;
[0007] S2: for any point in the training set, calculate the mutual information and false neighboring points based on the phase space reconstruction method to obtain the optimal delay time and embedding dimension, and reconstruct the training set;
[0008] S3: Use the gene expression programming model to train the reconstructed training set, construct an angle-based convergence function, train until convergence, and finally obtain a functional formula for water consumption prediction, and use the functional formula to predict daily water consumption.
[0009] Preferably, step S2 comprises the following steps:
[0010] S21: The time series of historical water consumption data is x=(x 1 , x 2 , …x n ), n is the number of days for collecting historical water consumption data, and the m-dimensional phase space is obtained through phase space reconstruction as follows:
[0011]
[0012] Where m is the embedding dimension and τ is the delay time;
[0013] S22: The delay time τ is obtained by the mutual information method. For the water supply time series X, solve the vector X i and X i+τ The mutual information I τ , the formula is as follows:
[0014]
[0015] Among them, P(X i ) and P(X i+τ ) are vectors X i and X i+τ The probability, P(X i , X i+τ ) is the vector X i and X i+τ Joint distribution probability, take mutual information I τ The τ corresponding to the first minimum value is the optimal delay time;
[0016] S23: The embedding dimension m is obtained by the false neighbor method. In the m-dimensional space, the phase point X(i) and its neighboring points X η The distance of (i) is expressed as:
[0017] R m (i)=||X(i)-X η (i)||
[0018] When the embedding dimension increases from m to (m+1), R is defined to compare the distance between the m-dimensional embedding space and the (m+1)-dimensional embedding space:
[0019]
[0020] When R>R tol =15, then the neighboring point X η (i) is the false neighboring point of phase point X(i). When the proportion of false neighboring points of phase point X(i) is less than 1%, the effective embedding dimension m is obtained. tol Represents the threshold value, which is obtained based on experience, and is taken as R tol =15.
[0021] Preferably, step S3 comprises the following steps:
[0022] S31: Determine the endpoint symbol set and the function symbol set, the endpoint symbol set is: (a 1 , a 2 , …, a m ), the function symbol set is:
[0023] S32: Use the endpoint symbol set and the function symbol set to randomly combine to form an initial population. The initial population is 100, the gene head length is 8, and each chromosome has a total of 3 genes;
[0024] S33: Calculate the fitness of each individual in the population, use the angle-based fitness function to evaluate the individual, and assume that the true value at time t is Y t , the predicted value is Y p , then the angular error between the predicted value and the true value is:
[0025]
[0026] in, represents the vector from time t-1 to time t, represents the magnitude of a vector;
[0027] S34: The three best individuals with the smallest angle error θ are retained to enter the next generation, and the remaining individuals are mutated, replicated, selected and genetically recombined to generate new individuals, which together with the three best individuals retained constitute a new population;
[0028] S35: Return to step S33, and repeat the process until 300 iterations have been made, and the individual with the smallest θ value is selected as the individual with the best fitness;
[0029] S36: Analyze the individuals with the best fitness and finally get the function Y for water consumption prediction p =f(x), and use the functional formula to predict the daily water consumption.
[0030] Compared with the related technologies, the daily water consumption prediction method based on phase space reconstruction and gene expression programming provided by the present invention uses the phase space reconstruction method to map one-dimensional data to multi-dimensional space, increase the amount of information in the data, and facilitate better identification of the system. Then, the gene expression programming model is used to derive a definite mathematical model, which is conducive to guiding relevant technical personnel to strengthen their understanding of the water supply system, and can quickly converge to an optimal goal. [Specific implementation method]
[0031] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention and to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the specific implementation modes of the present invention are further described below.
[0032] The present invention provides a daily water consumption prediction method based on phase space reconstruction and gene expression programming, comprising the following steps:
[0033] S1: Collect historical water consumption data of the water supply network to form a training set.
[0034] The prediction of water supply needs to be based on the data of historical water consumption, which is collected on a daily basis. It is understandable that the longer the sampling time is, the more comprehensive the water consumption pattern of the water supply network can be reflected. Therefore, in this embodiment, the sampling time is at least 3 months.
[0035] S2: For any point in the training set, the mutual information and false neighboring points are calculated based on the phase space reconstruction method to obtain the optimal delay time and embedding dimension, and the training set is reconstructed.
[0036] Since the collected historical water consumption data is one-dimensional data, the effective information that can be reflected is limited. It is difficult to understand the complexity and comprehensiveness of the entire water supply system from a one-dimensional time series. Therefore, the present invention reconstructs the one-dimensional data into multi-dimensional data through a phase space reconstruction method based on coordinate delay. The essence of the phase space reconstruction method based on coordinate delay is to use a one-dimensional time series {(x i )} with different delay times τ to construct a multi-dimensional phase space vector.
[0037] The time series of historical water consumption data is x=(x 1 , x 2 , …x n ), n is the number of days for collecting historical water consumption data, and the m-dimensional phase space is obtained through phase space reconstruction as follows:
[0038]
[0039] Where m is the embedding dimension and τ is the delay time.
[0040] The delay time τ is obtained by the mutual information method. The determination of the delay time τ enables the original time series to be used as an independent coordinate after the time delay. For the water supply time series X, solve the vector X i and X i+τ The mutual information I τ , the formula is as follows:
[0041]
[0042] Among them, P(X i ) and P(X i+τ ) are vectors X i and X i+τ The probability, P(X i , X i+τ ) is the vector X i and X i+τ Joint distribution probability, take mutual information I τ The τ corresponding to the first minimum value is the optimal delay time.
[0043] The embedding dimension m is obtained by the false neighbor method. The chaotic time series is the projection of the trajectory of chaotic motion in the high-dimensional phase space in one-dimensional space. In the projection process, the trajectory of chaotic motion will be distorted. Two non-adjacent points in the high-dimensional phase space may become adjacent points when projected into one-dimensional space. Then one point is called the false neighbor of the other point. Reconstructing the phase space is actually to restore the trajectory of chaotic motion from the chaotic time series. As the embedding dimension m increases, the track of chaotic motion will be opened, and the false neighbors will be gradually eliminated, so that the trajectory of the entire chaotic motion will be restored.
[0044] Specifically: In m-dimensional space, the phase point X(i) and its neighboring points X η The distance of (i) is expressed as:
[0045] R m (i)=||X(i)-X η (i)||
[0046] When the embedding dimension increases from m to (m+1), R is defined to compare the distance between the m-dimensional embedding space and the (m+1)-dimensional embedding space:
[0047]
[0048] When R>R tol =15, then the neighboring point X η (i) is the false neighboring point of phase point X(i). When the proportion of false neighboring points of phase point X(i) is less than 1%, the effective embedding dimension m is obtained. tol Represents the threshold value, which is obtained based on experience, and is taken as R tol=15.
[0049] S3: Use the gene expression programming model to train the reconstructed training set, construct an angle-based convergence function, train until convergence, and finally obtain a functional formula for water consumption prediction, and use the functional formula to predict daily water consumption.
[0050] The step S3 is specifically as follows:
[0051] S31: Determine an endpoint symbol set and a function symbol set;
[0052] The terminal symbol set is just a character symbol representing the independent variable, and the number corresponds to the reconstructed dimension m, that is, the terminal symbol set is: (a 1 , a 2 , …, a m ), the function symbol set is
[0053] S32: using the endpoint symbol set and the function symbol set to randomly combine to form an initialization population;
[0054] In this embodiment, the gene expression algorithm is initialized with a population of 100, a gene head length of 8, and a total of 3 genes per chromosome.
[0055] S33: Calculate the fitness of each individual in the population;
[0056] Combined with the characteristics of water consumption data, the present invention proposes an angle-based fitness function to balance individuals, and the true value at time t is Y t , the predicted value is Y p , then the angular error between the predicted value and the true value is:
[0057]
[0058] in, represents the vector from time t-1 to time t, Represents the magnitude of a vector.
[0059] By evaluating individuals based on the angle-based fitness function, it is possible to perform iterative recursive searches in complex water supply systems, effectively discover the complex functional relationship between input data and prediction targets, and establish a reasonable prediction model.
[0060] S34: The three best individuals with the smallest angle error θ are retained to enter the next generation, and the remaining individuals are mutated, replicated, selected and genetically recombined to generate new individuals, which together with the three best individuals retained constitute a new population;
[0061] S35: Return to step S33, and repeat the process until 300 iterations have been made, and the individual with the smallest θ value is selected as the individual with the best fitness;
[0062] S36: Analyze the individuals with the best fitness and finally get the function Y for water consumption prediction p =f(x), and use the functional formula to predict the daily water consumption.
[0063] The gene expression programming model can derive a definite mathematical model of the system, which is helpful for guiding relevant technical personnel to strengthen their understanding of the water supply system, while commonly used methods such as neural networks are like black boxes and cannot know the true functional relationship. In addition, if the system is more complex, methods such as neural networks require longer time and more computing power to train parameters, which may cause gradient explosion or gradient disappearance, while the gene expression programming model can quickly converge to an optimal goal.
[0064] Compared with the related technologies, the daily water consumption prediction method based on phase space reconstruction and gene expression programming provided by the present invention uses the phase space reconstruction method to map one-dimensional data to multi-dimensional space, increase the amount of information in the data, and facilitate better identification of the system. Then, the gene expression programming model is used to derive a definite mathematical model, which is conducive to guiding relevant technical personnel to strengthen their understanding of the water supply system, and can quickly converge to an optimal goal.
[0065] The embodiments of the present invention are described in detail above, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions and variations made to these embodiments without departing from the principles and spirit of the present invention are still within the protection scope of the present invention.
Claims
1. A method for predicting daily water consumption based on phase space reconstruction and gene expression programming, characterized in that: The steps include: S1: Collect historical water consumption data of the water supply network to form a training set; S2: for any point in the training set, calculate mutual information and false neighboring points based on the phase space reconstruction method to obtain the optimal delay time and embedding dimension, and reconstruct the training set; S3: training the reconstructed training set using a gene expression programming model, constructing an angle-based convergence function, training until convergence, and finally obtaining a functional formula for water consumption prediction, and using the functional formula to predict daily water consumption; The step S2 comprises the following steps: S21: The time series of historical water consumption data is x = (x1, x2, ... x n ), n is the number of days for collecting historical water consumption data, and the m-dimensional phase space is obtained through phase space reconstruction as follows: Where m is the embedding dimension and τ is the delay time; S22: The delay time τ is obtained by the mutual information method. For the water supply time series X, solve the vector X i and X i+τ The mutual information I τ , the formula is as follows: Among them, P(X i ) and P(X i+τ ) are vectors X i and X i+τ The probability, P(X i ,X i+τ ) is the vector X i and X i+τ Joint distribution probability, take mutual information I τ The τ corresponding to the first minimum value is the optimal delay time; S23: The embedding dimension m is obtained by the false neighbor method. In the m-dimensional space, the phase point X(i) and its neighboring points X η The distance of (i) is expressed as: R m (i)=||X(i)-X η (i)|| When the embedding dimension increases from m to (m+1), R is defined to compare the distance between the m-dimensional embedding space and the (m+1)-dimensional embedding space: When R>R tol =15, then the neighboring point X η (i) is the false neighboring point of phase point X(i). When the proportion of false neighboring points of phase point X(i) is less than 1%, the effective embedding dimension m is obtained. tol Represents the threshold value, which is obtained based on experience, and is taken as R tol =15; The step S3 comprises the following steps: S31: Determine the endpoint symbol set and the function symbol set, the endpoint symbol set is: (a1, a2, ..., a m ), the function symbol set is: S32: Use the endpoint symbol set and the function symbol set to randomly combine to form an initial population. The initial population is 100, the gene head length is 8, and each chromosome has a total of 3 genes; S33: Calculate the fitness of each individual in the population, use the angle-based fitness function to evaluate the individual, and assume that the true value at time t is Y t , the predicted value is Y p , then the angular error between the predicted value and the true value is: in, represents the vector from time t-1 to time t, represents the magnitude of a vector; S34: The three best individuals with the smallest angle error θ are retained to enter the next generation, and the remaining individuals are mutated, replicated, selected and genetically recombined to generate new individuals, which together with the three best individuals that are retained constitute a new population; S35: Return to step S33, and repeat the process until 300 iterations have been made, and the individual with the smallest θ value is selected as the individual with the best fitness; S36: Analyze the individuals with the best fitness and finally get the function Y for water consumption prediction p =f(x), and use the functional formula to predict the daily water consumption.
