Urban real-time water supply flow prediction method and system and water supply scheduling method and system
The real-time water supply flow prediction method and the scheduling strategy constructed by the LSTM neural network combined with the water pump characteristic curve has solved the problems of inaccurate water supply flow prediction and untimely adjustment of the water pump operating status in traditional water supply scheduling, and achieved efficient and stable operation of the water supply system.
Patent Information
- Application Number
- CN202411260974.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-20
AI Technical Summary
Traditional urban water supply scheduling methods are difficult to accurately predict changes in water supply flow, and they cannot adjust the operating status of the water pump in real time, resulting in inefficiency, waste of water resources and unstable water supply system.
The real-time water supply flow prediction method based on LSTM neural network is adopted, combined with the water pump characteristic curve, and the water supply flow prediction model is constructed by obtaining environmental and historical data, and the water pump operation status is adjusted in real time to achieve optimized water supply scheduling.
It improves the accuracy and efficiency of water supply scheduling, reduces the energy consumption and failure rate of water pumps, and enhances the reliability and stability of the water supply system.
Smart Images

Figure CN119168306A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of urban water supply, and in particular, relates to a method and system for predicting urban real-time water supply flow, and a method and system for water supply scheduling. Background Art
[0002] With the acceleration of urbanization and the continuous growth of population, urban water supply systems are facing increasing pressure. Traditional water supply scheduling methods often rely on experience and simple mathematical models, which are difficult to accurately predict changes in water supply and cannot adjust the operating status of water pumps in real time to cope with emergencies. Traditional water supply scheduling methods are not only inefficient, but may also lead to waste of water resources and instability of the water supply system.
[0003] Water supply forecasting is one of the core links of water supply scheduling. The change of water supply is affected by many factors, including seasonal changes, weather conditions, holidays, emergencies, etc. The interaction between these factors makes the prediction of water supply particularly complicated. Traditional water supply forecasting methods such as linear regression and time series analysis often have poor prediction accuracy when facing complex and changeable water supply systems and cannot meet the needs of water supply systems.
[0004] Pump scheduling is another core link of water supply scheduling. As a key equipment in the water supply system, the operating status of the pump directly affects the stability and efficiency of the water supply system. Traditional pump scheduling methods are based on fixed operating parameters or simple control strategies, and cannot be adjusted according to real-time water supply demand and pump performance. This will not only increase pump energy consumption and shorten pump life, but also affect the overall performance of the water supply system. Summary of the invention
[0005] In view of the above-mentioned problems of poor accuracy in water supply flow prediction in the prior art, the present invention provides a method and system for predicting real-time urban water supply flow, and an optimization scheduling method and system, which can accurately predict the water supply flow, and scientifically and reasonably adjust the operating state of the water pump according to the predicted water supply flow and the water pump characteristic curve, so as to ensure the efficient and stable operation of the water pump, realize water supply optimization scheduling, improve water supply scheduling efficiency, reduce the energy consumption and failure rate of the water pump, and improve the reliability and stability of the water supply system.
[0006] In order to achieve the above object, the present invention provides a method for predicting urban real-time water supply flow, the steps of which are as follows: Data acquisition steps: Obtain environmental parameters and history at the prediction time point Environmental parameters at each time point and historical water supply flow monitored in the pipe network SCADA system, including holidays, temperature and humidity; Data processing steps: preprocess the historical water supply flow and historical environmental parameters, form a data set with the preprocessed historical water supply flow and historical environmental parameters, and divide the data set into a training set, a validation set, and a test set; Model construction steps: Based on the LSTM neural network structure, with historical water supply flow and historical environmental parameters as input and the water supply flow at the predicted time point as output, a water supply flow prediction model is constructed, wherein the LSTM neural network output at the n-1th time point is output as the output of the hidden layer of the LSTM neural network to the next network layer, and is used as the input of the water supply flow prediction model at the nth time point; the LSTM neural network output at the n-2th time point is output as the output of the hidden layer of the LSTM neural network to the next network layer, and is used as the input of the water supply flow prediction model at the n-1th time point, and the cycle repeats for other time points; Model training and verification steps: set the water supply flow prediction model parameters, train the water supply flow prediction model through the training set, and verify the trained water supply flow prediction model through the verification set; Prediction step: Input the test set into the water supply flow prediction model to obtain the predicted water supply flow at the prediction time point.
[0007] In some embodiments, the specific method for verifying the water supply flow prediction model is: inputting the verification set into the water supply flow prediction model to obtain the predicted value, calculating the error between the predicted value and the true value under different model parameters, and the model parameter with the smallest error is the water supply flow prediction model parameter.
[0008] In some embodiments, a model optimization step is also included: monitoring the water supply flow at the predicted time point in the pipe network SCADA system in real time at the predicted time point, adding the real-time monitored water supply flow at the predicted time point, holiday conditions at the predicted time point, temperature at the predicted time point, and humidity at the predicted time point to the training set to form a new training set, and training the water supply flow prediction model with the new training set to optimize the water supply flow prediction model.
[0009] In a second aspect, the present invention provides a city real-time water supply flow prediction system, which is used to implement the city real-time water supply flow prediction method described in the first aspect of the present invention, comprising: Data acquisition module, obtains environmental parameters and history at the prediction time point Environmental parameters at each time point and historical water supply flow monitored in the pipe network SCADA system; A data processing module pre-processes the historical water supply flow and historical environmental parameters, forms a data set with the pre-processed historical water supply flow and historical environmental parameters, and divides the data set into a training set, a validation set, and a test set; The model building module is based on the LSTM neural network structure, takes the historical water supply flow and historical environmental parameters as input, and the predicted water supply flow at the time point as output to build a water supply flow prediction model; Model training and verification module, setting water supply flow prediction model parameters, training the water supply flow prediction model through the training set, and verifying the trained water supply flow prediction model through the verification set; The water supply flow prediction module inputs the test set into the water supply flow prediction model to obtain the predicted water supply flow at the predicted time point.
[0010] In some embodiments, a model optimization module is further included, wherein the model optimization module includes: A data monitoring module, used to monitor the actual water supply flow at the predicted time point in real time; The new training set generation module adds the actual water supply flow at the prediction time point monitored in real time, the holiday situation at the prediction time point, the temperature at the prediction time point, and the humidity at the prediction time point to the training set to form a new training set, so as to train the water supply flow prediction model through the new training set and optimize the water supply flow prediction model.
[0011] In a third aspect, the present invention provides a method for real-time urban water supply scheduling, the steps of which are: Data acquisition steps: Obtain environmental parameters and history at the prediction time point Environmental parameters at each time point and historical water supply flow monitored in the pipe network SCADA system, including holidays, temperature and humidity; Data processing steps: preprocess the historical water supply flow and historical environmental parameters, form a data set with the preprocessed historical water supply flow and historical environmental parameters, and divide the data set into a training set, a validation set, and a test set; Model construction steps: Based on the LSTM neural network structure, with historical water supply flow and historical environmental parameters as input and the water supply flow at the predicted time point as output, a water supply flow prediction model is constructed, wherein the LSTM neural network output at the n-1th time point is output as the output of the hidden layer of the LSTM neural network to the next network layer, and is used as the input of the water supply flow prediction model at the nth time point; the LSTM neural network output at the n-2th time point is output as the output of the hidden layer of the LSTM neural network to the next network layer, and is used as the input of the water supply flow prediction model at the n-1th time point, and the cycle repeats for other time points; Model training and verification steps: set the water supply flow prediction model parameters, train the water supply flow prediction model through the training set, and verify the trained water supply flow prediction model through the verification set; Prediction step: input the test set into the water supply flow prediction model to obtain the predicted water supply flow at the prediction time point; Judgment step: judging the magnitude of the predicted water supply flow and the current water supply flow, and judging whether the absolute value of the difference between the predicted water supply and the current water supply exceeds a set threshold; Water pump status adjustment steps: when the predicted water supply flow is greater than the current water supply flow and the absolute value of the difference between the two exceeds the set threshold, turn on each water pump in turn, or increase the frequency of each water pump according to the flow-head characteristic curve and the flow-efficiency characteristic curve to increase the water supply flow, until the sum of the water supply flow of all water pumps reaches the predicted water supply flow; when the predicted water supply flow is less than the current water supply flow and the absolute value of the difference between the two exceeds the set threshold, turn off each water pump in turn, or lower the frequency of each water pump according to the flow-head characteristic curve and the flow-efficiency characteristic curve to reduce the water supply flow, until the sum of the water supply flow of all water pumps reaches the predicted water supply flow.
[0012] In some embodiments, in the water pump state adjustment step, when it is determined to reduce the water supply flow, if the water pump is a fixed speed pump and the current operating state of the fixed speed pump is on, its state can be changed to off; if the water pump is a variable frequency pump, the predicted water supply pressure is calculated based on the predicted water supply flow, the head of each water pump installed in parallel is equal to the water supply pressure, the water supply flow of the variable frequency pump is calculated according to the flow-head characteristic curve of the water pump, and whether the variable frequency pump is in the high-efficiency zone is determined according to the flow-efficiency characteristic curve. If the operating state of the variable frequency pump is higher than the high-efficiency zone or is already in the high-efficiency zone, the operating frequency of the variable frequency pump is lowered and finally reaches the lowest operating frequency to the left of the highest efficiency point in the high-efficiency zone. If the operating state of the variable frequency pump is lower than the high-efficiency zone, the operating frequency of the variable frequency pump is not adjusted.
[0013] In some embodiments, in the water pump state adjustment step, when it is determined to increase the water supply flow, if the water pump is a fixed speed pump and the current operating state of the fixed speed pump is closed, its state can be changed to open; if the water pump is a variable frequency pump, the predicted water supply pressure is calculated based on the predicted water supply flow, the head of each water pump installed in parallel is equal to the water supply pressure, the water supply flow of the variable frequency pump is calculated according to the flow-head characteristic curve of the water pump, and whether the variable frequency pump is in the high-efficiency zone is determined according to the flow-efficiency characteristic curve. If the operating state of the variable frequency pump is lower than the high-efficiency zone or is already in the high-efficiency zone, the operating frequency of the variable frequency pump is increased and finally reaches the highest operating frequency to the right of the highest efficiency point in the high-efficiency zone. If the operating state of the variable frequency pump is higher than the high-efficiency zone, the operating frequency of the variable frequency pump is not adjusted.
[0014] In some embodiments, in the water pump state adjustment step, if the water pump is a variable frequency pump, when the predicted water supply flow is greater than the maximum water outlet flow of the current water plant, all variable frequency pumps are in the on state, and the operating frequency of all variable frequency pumps is the highest operating frequency in the high-efficiency zone and has not reached the rated flow of the variable frequency pump, each variable frequency pump is adjusted in turn according to priority, and the operating frequency is adjusted to the rated frequency until the predicted water supply is reached.
[0015] In a fourth aspect, the present invention provides a city real-time water supply scheduling system, which is used to implement the city real-time water supply scheduling method described in the third aspect of the present invention, including: Data acquisition module, obtains environmental parameters and history at the prediction time point Environmental parameters at each time point and historical water supply flow monitored in the pipe network SCADA system; A data processing module pre-processes the historical water supply flow and historical environmental parameters, forms a data set with the pre-processed historical water supply flow and historical environmental parameters, and divides the data set into a training set, a validation set, and a test set; The model building module is based on the LSTM neural network structure, takes the historical water supply flow and historical environmental parameters as input, and the predicted water supply flow at the time point as output to build a water supply flow prediction model; Model training and verification module, setting water supply flow prediction model parameters, training the water supply flow prediction model through the training set, and verifying the trained water supply flow prediction model through the verification set; The water supply flow prediction module inputs the test set into the water supply flow prediction model to obtain the predicted water supply flow at the predicted time point; A judgment module is used to judge the difference between the predicted water supply flow and the current water supply flow, and to judge whether the absolute value of the difference between the predicted water supply and the current water supply exceeds a set threshold; The water pump status adjustment module turns on each water pump in turn or increases the frequency of each water pump to increase the water supply flow when the predicted water supply flow is greater than the current water supply flow and the absolute value of the difference between the two exceeds the set threshold, until the sum of the water supply flow of all water pumps reaches the predicted water supply flow; when the predicted water supply flow is less than the current water supply flow and the absolute value of the difference between the two exceeds the set threshold, turns off each water pump in turn or lowers the frequency of each water pump to reduce the water supply flow until the sum of the water supply flow of all water pumps reaches the predicted water supply flow.
[0016] Compared with the prior art, the advantages and positive effects of the present invention are: (1) The real-time urban water supply flow prediction method and system provided by the present invention builds a water supply flow prediction model based on the LSTM neural network structure, and performs training and verification. The LSTM neural network structure is used to learn the historical urban water supply flow change law, capture the long-term dependence of water supply flow and time, temperature, humidity, and holidays, and use the trained and verified water supply flow model to accurately predict the future water supply flow of each pump station, and then obtain the future water supply pressure of each pump station. Compared with traditional prediction methods, the prediction method and system of the present invention can more accurately reflect the trend of water supply flow changes, providing a more reliable basis for water supply scheduling decisions.
[0017] (2) The urban real-time water supply scheduling method and system provided by the present invention combines the water supply flow predicted by the water supply flow prediction model constructed based on the LSTM neural network structure with the current water supply flow and the operating status judgment of the water pump characteristic curve to perform water supply scheduling. Compared with the existing water supply scheduling method, the water supply scheduling strategy is more scientific and reasonable, which can achieve the supply and demand balance of the water supply system and the optimal allocation of resources, improve the overall operating efficiency and economic benefits of the water supply system, and provide favorable guarantees for the stable and efficient operation of the urban water supply system. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1-2 A flowchart of a method for predicting urban real-time water supply flow rate according to an embodiment of the present invention; Figure 3 It is a structural block diagram of the real-time urban water supply flow prediction according to an embodiment of the present invention; Figure 4 This is a flowchart of the urban real-time water supply scheduling method according to an embodiment of the present invention; Figure 5 A flow chart of scheduling a water pump when reducing the water supply flow rate according to an embodiment of the present invention; Figure 6 A flow chart of scheduling a water pump when increasing the water supply flow rate according to an embodiment of the present invention; Figure 7 It is a schematic diagram of a characteristic curve of a water pump according to an embodiment of the present invention; Figure 8 This is a structural block diagram of the urban real-time water supply scheduling system according to an embodiment of the present invention; Fig. 9 This is a comparison chart between the predicted value and the actual value predicted by the exponential smoothing prediction algorithm; Fig.10 This is a comparison chart of the predicted value and the actual value obtained by using the adaptive filtering prediction algorithm; Fig.11 The figure is a comparison chart between the predicted value and the actual value obtained by using the urban real-time water supply flow prediction method and system described in the embodiment of the present invention.
[0019] In the figure, 1. data acquisition module, 2. data processing module, 3. model building module, 4. model training and verification module, 5. water supply flow prediction module, 6. model optimization module, 601. data monitoring module, 602. new training set generation module, 7. judgment module, 8. water pump state adjustment module. DETAILED DESCRIPTION
[0020] The present invention is described in detail below by way of exemplary embodiments. However, it should be understood that elements, structures, and features in one embodiment may also be beneficially combined in other embodiments without further description.
[0021] In view of the poor accuracy of existing urban water supply flow prediction, the present invention provides a real-time urban water supply flow prediction method and system, an optimization scheduling method and system, which predicts the water supply flow through a water supply flow prediction model constructed based on an LSTM neural network structure, and combines the predicted water supply flow with the current water supply flow and the operating state of the water pump characteristic curve for water supply scheduling. The water supply flow can be accurately predicted, and the operating state of the water pump can be scientifically and reasonably adjusted according to the predicted water supply flow combined with the water pump characteristic curve to ensure efficient and stable operation of the water pump, realize water supply optimization scheduling, improve water supply scheduling efficiency, reduce the energy consumption and failure rate of the water pump, and improve the reliability and stability of the water supply system. The following is a detailed description of a real-time urban water supply flow prediction method and system, an optimization scheduling method and system provided by the present invention in conjunction with the accompanying drawings.
[0022] See also Figure 1 to Figure 2 The first embodiment of the present invention provides a method for predicting urban real-time water supply flow, the steps of which are: S1. Data acquisition step: Obtain environmental parameters and history at the prediction time point The environmental parameters at each time point and the historical water supply flow monitored in the pipe network SCADA system. The environmental parameters include holidays, temperature and humidity.
[0023] Specifically, temperature and humidity are selected from weather data downloaded from a professional weather website with the same granularity as the water supply flow data.
[0024] It should be noted that the number of historical time points can be set according to actual needs, for example: the number of historical time points is 24, and the interval between adjacent time points is 1 hour.
[0025] S2. Data processing steps: pre-process the historical water supply flow and historical environmental parameters, form a data set with the pre-processed historical water supply flow and historical environmental parameters, and divide the data set into a training set, a validation set, and a test set.
[0026] Specifically, when dividing the data set, 70% of the data in the data set is used as training data to form a training set, 20% of the data in the data set is used as verification data to form a verification set, and 10% of the data in the data set is used as test data to form a test set. It should be noted that when dividing the data set, most of the data is used as training data to train the water supply flow prediction model constructed later, and the data in the training set, verification set and test set are not repeated, and the division ratio of the training set, verification set and test set is not limited to 7:2:1.
[0027] It should be noted that the pipe network SCADA system provides real-time monitoring data for water supply scheduling. These data are time series. During the data collection and transmission process, due to the interference of other factors, the collection results will produce noise data, resulting in incomplete data acquisition or abnormal data. In order to avoid affecting the accuracy of the prediction results, the linear interpolation method is used to pre-process the historical water supply flow. The specific method is as follows: S21. Historical traffic data uses a set time (e.g., 1 hour) as the time interval. If data for a certain time is missing, linear interpolation is used to fill in the missing value. S22. If the data at a certain time point exceeds the normal upper and lower limits of the indicator, such as when the flow data produces a negative number, the linear interpolation method is used to fill the abnormal value; S23. If the difference between a certain flow data and the adjacent flow data exceeds a certain set range, it is considered that the data conflict occurs, and the linear interpolation method is used to fill the data.
[0028] Specifically, in order to ensure the accuracy and reliability of the holiday situation in the subsequent model training process, the holiday field is digitized using the empirical parameter method. The digitized holiday situation is shown in Table 1.
[0029] Table 1
[0030] The sample data obtained after the above processing is shown in Table 2.
[0031] Table 2
[0032] It should be noted that since the dimensions of the sample data in the data set are different, the sample data also needs to be normalized to make them have the same dimensions.
[0033] S3. Model construction steps: Based on the LSTM neural network structure, with historical water supply flow and historical environmental parameters as input and the water supply flow at the predicted time point as output, a water supply flow prediction model is constructed, wherein the output of the LSTM neural network at the n-1th time point is output as the output of the hidden layer of the LSTM neural network to the next network layer, and serves as the input of the water supply flow prediction model at the nth time point; the output of the LSTM neural network at the n-2th time point is output as the output of the hidden layer of the LSTM neural network to the next network layer, and serves as the input of the water supply flow prediction model at the n-1th time point, and the cycle repeats for other time points.
[0034] Specifically, the water supply flow model is described by taking the data input of three time steps (t-1, t, and t+1) as an example. First, the water supply flow data and environmental parameter data at time t-1 are input to the water supply flow prediction model. The output of the LSTM neural network in the water supply flow prediction model is sent to two places. The first is output to the next network layer as the output of the hidden layer of the LSTM neural network, and the second is input to the water supply flow prediction model of the next time step (t). The input of the water supply flow prediction model at time t includes the water supply flow data and environmental parameter data at time t, and also includes the output result of the previous time step (t-1). Therefore, the input at time t includes the information of the previous time step (t-1). The model output at time t has two outputs like at time t-1. The input of the water supply flow prediction model at time t+1 includes the water supply flow data and environmental parameter data at time t+1, and also includes the output result of the previous time step (t). Therefore, the input at time t+1 includes the information of the previous time step (t). The model output at time t+1 has two outputs, just like at time t. Similarly, when the time step is multiple, the above rule is repeated until the last moment.
[0035] Specifically, the water supply flow prediction model is expressed as: Q=NN(T,D,R,q) Among them, Q is the water supply flow at the prediction time point, NN represents the LSTM neural network structure, T is the temperature at the historical time point before the prediction time point, D is the humidity at the historical time point before the prediction time point, R is the historical holiday situation before the prediction time point, and q is the historical water supply flow before the prediction time point.
[0036] Specifically, the data format of the water supply flow prediction model is [number of samples, time steps, number of features], where the number of samples is the number of samples in the training set; the time step is the total number of times the LSTM neural network is trained, for example: using the environmental parameters and water supply flow of the previous 24 time steps as features to predict the data at the 25th time point, that is, the LSTM neural network needs to loop 24 times, each time calculating the feature data of one time step; the number of features, in this application, the environmental parameters plus the water supply flow, specifically the four features of temperature, humidity, holidays and water supply flow, therefore, the number of features is 4.
[0037] It should be noted that changes in various environmental factors in the city directly or indirectly affect changes in water consumption. The four aspects that have the greatest impact on water consumption, namely historical temperature, historical humidity, historical holidays and historical water supply flow, are selected as input, and the predicted water supply flow is used as output to construct a water supply flow prediction model, which can accurately reflect the changing trend of water supply.
[0038] S4, model training and verification steps: set the water supply flow prediction model parameters, train the water supply flow prediction model through the training set, and verify the trained water supply flow prediction model through the verification set.
[0039] Specifically, when training the water supply flow prediction model, the training data in the training set is one sampling point per hour. Taking 24 sampling points per day as an example, during the training of the water supply flow prediction model, the temperature, humidity, holidays, and water supply flow of the 24 sampling points in the training set are used as input features of the water supply flow prediction model to predict the water supply flow of the 25th sampling point, and this rule is continuously rolled down. It should be noted that the label in this application is the water supply flow, which is both a feature and a label.
[0040] Specifically, the model parameters include the number of hidden layers, the number of epochs for model training, the batch size (batch_size), and the optimizer (optimizer). The water supply flow prediction model is trained with the training set, and the trained water supply flow prediction model is saved after the training is completed. The model parameters are used to directly infer the water supply flow prediction model on the input data, and the performance of the trained model is verified with the validation set, and a comparison chart between the predicted value and the true value in the validation set is drawn.
[0041] Specifically, in some embodiments, the specific method for verifying the water supply flow prediction model is: inputting the verification set into the trained water supply flow prediction model to obtain the predicted value, calculating the error between the predicted value and the true value under different model parameters, and the model parameter with the smallest error is the water supply flow prediction model parameter. In a specific embodiment, in the model parameters, the LSTM neural network hidden layer is set to two layers, the optimizer uses the Adam optimizer, the learning rate is 0.01, the epochs is 100, and the batch_size is 512.
[0042] S5. Prediction step: input the test set into the water supply flow prediction model to obtain the predicted water supply flow at the prediction time point.
[0043] In some embodiments, the above-mentioned urban real-time water supply flow prediction method also includes a model optimization step: monitoring the water supply flow at the prediction time point in the pipe network SCADA system in real time at the prediction time point, adding the real-time monitored water supply flow at the prediction time point, the holiday situation at the prediction time point, the temperature at the prediction time point, and the humidity at the prediction time point to the training set to form a new training set, and training the water supply flow prediction model through the new training set to optimize the water supply flow prediction model. Adding real-time data to the water supply flow model training data, continuously optimizing the water supply flow prediction model, realizing the closed loop of the entire water supply flow prediction process, and ensuring the timeliness of the water supply flow prediction model.
[0044] It should be noted that, unlike the traditional method of directly using the predicted value of the previous time point as the predicted input value for the next time point, when the data of this application is input into the water supply flow prediction model, the predicted value of the previous time point is not directly used as the input value for the next time point. Instead, when the time point arrives at the predicted time point, the water supply flow, holiday conditions, temperature, and humidity monitored in real time at that time point are added to the training set for training. After the water supply flow prediction model is optimized, the prediction for the next time point is entered. This will not cause error accumulation and improve the prediction accuracy.
[0045] The above-mentioned urban real-time water supply flow prediction method of the embodiment of the present invention constructs a water supply flow prediction model based on the LSTM neural network structure, and performs training and verification. The LSTM neural network structure is used to learn the changing rules of the historical water supply flow of the city, and the long-term dependence of the water supply flow on time, temperature, humidity, and holidays is captured. The water supply flow model after training and verification can accurately predict the future water supply flow of each pumping station, and then obtain the future water supply pressure of each pumping station. It can accurately reflect the changing trend of the water supply flow and provide a more reliable basis for water supply scheduling decisions.
[0046] See also Figure 3 The second embodiment of the present invention provides a city real-time water supply flow prediction system, which is used to implement the city real-time water supply flow prediction method described in the first aspect of the present invention, including: Data acquisition module 1, obtains environmental parameters and historical data at the predicted time point Environmental parameters at each time point and historical water supply flow monitored in the pipe network SCADA system; Data processing module 2, preprocessing the historical water supply flow and historical environmental parameters, forming a data set with the preprocessed historical water supply flow and historical environmental parameters, and dividing the data set into a training set, a validation set and a test set; Model building module 3, based on the LSTM neural network structure, takes historical water supply flow and historical environmental parameters as input and the water supply flow at the predicted time point as output to build a water supply flow prediction model; Model training and verification module 4, setting water supply flow prediction model parameters, training the water supply flow prediction module through the training set, and verifying the trained water supply flow prediction model through the verification set; The water supply flow prediction module 5 inputs the test set into the water supply flow prediction model to obtain the predicted water supply flow at the prediction time point.
[0047] In some embodiments, the above-mentioned urban real-time water supply flow prediction system further includes a model optimization module 6, and the model optimization module includes: The data monitoring module 601 is used to monitor the actual water supply flow at the predicted time point in real time; The new training set generation module 602 adds the actual water supply flow at the prediction time point monitored in real time, the holiday situation at the prediction time point, the temperature at the prediction time point, and the humidity at the prediction time point to the training set to form a new training set, so as to train the water supply flow prediction model through the new training set and optimize the water supply flow prediction model.
[0048] Add real-time data to the water supply flow model training data, continuously optimize the water supply flow prediction model, realize the closed loop of the entire water supply flow prediction process, and ensure the timeliness of the water supply flow prediction model. It should be noted that, unlike the traditional method of directly using the predicted value of the previous time point as the predicted input value of the next time point, when the data of this application is input into the water supply flow prediction model, the predicted value of the previous time point is not directly used as the input value of the next time point. Instead, when the time point arrives at the predicted time point, the water supply flow, holiday conditions, temperature, and humidity monitored in real time at that time point are added to the training set for training. After optimizing the water supply flow prediction model, the prediction at the next time point is entered. This will not cause the accumulation of errors and improve the prediction accuracy.
[0049] The above-mentioned urban real-time water supply flow prediction system in this embodiment builds a water supply flow prediction model based on the LSTM neural network structure, and performs training and verification. The LSTM neural network structure is used to learn the changing rules of the city's historical water supply flow, and capture the long-term dependence of water supply flow on time, temperature, humidity, and holidays. The water supply flow model after training and verification can accurately predict the future water supply flow of each pumping station, and then obtain the future water supply pressure of each pumping station. It can accurately reflect the changing trend of water supply flow and provide a more reliable basis for water supply scheduling decisions.
[0050] See also Figure 4 The third embodiment of the present invention provides a method for real-time urban water supply scheduling, the steps of which are: S1. Data acquisition step: Obtain environmental parameters and history at the prediction time point The environmental parameters at each time point and the historical water supply flow monitored in the pipe network SCADA system. The environmental parameters include holidays, temperature and humidity.
[0051] Specifically, temperature and humidity are selected from weather data downloaded from a professional weather website with the same granularity as the water supply flow data.
[0052] It should be noted that the number of historical time points can be set according to actual needs, for example: the number of historical time points is 24, and the interval between adjacent time points is 1 hour.
[0053] S2. Data processing steps: pre-process the historical water supply flow and historical environmental parameters, form a data set with the pre-processed historical water supply flow and historical environmental parameters, and divide the data set into a training set, a validation set, and a test set.
[0054] Specifically, when dividing the data set, 70% of the data in the data set is used as training data to form a training set, 20% of the data in the data set is used as verification data to form a verification set, and 10% of the data in the data set is used as test data to form a test set. It should be noted that when dividing the data set, most of the data is used as training data to train the water supply flow prediction model constructed later, and the data in the training set, verification set and test set are not repeated, and the division ratio of the training set, verification set and test set is not limited to 7:2:1.
[0055] It should be noted that the pipe network SCADA system provides real-time monitoring data for water supply scheduling. These data are time series. During the data collection and transmission process, due to the interference of other factors, the collection results will produce noise data, resulting in incomplete data acquisition or abnormal data. In order to avoid affecting the accuracy of the prediction results, the linear interpolation method is used to pre-process the historical water supply flow. The specific method is as follows: S21. Historical traffic data uses a set time (e.g., 1 hour) as the time interval. If data for a certain time is missing, linear interpolation is used to fill in the missing value. S22. If the data at a certain time point exceeds the normal upper and lower limits of the indicator, such as when the flow data produces a negative number, the linear interpolation method is used to fill the abnormal value; S23. If the difference between a certain flow data and the adjacent flow data exceeds a certain set range, it is considered that the data conflict occurs, and the linear interpolation method is used to fill the data.
[0056] Specifically, in order to ensure the accuracy and reliability of the holiday situation in the subsequent model training process, the holiday field is digitized using the empirical parameter method. The digitized holiday situation is shown in Table 1.
[0057] The sample data obtained after the above processing is shown in Table 2.
[0058] It should be noted that since the dimensions of the sample data in the data set are different, the sample data also needs to be normalized to make them have the same dimensions.
[0059] S3. Model construction steps: Based on the LSTM neural network structure, with historical water supply flow and historical environmental parameters as input and the water supply flow at the predicted time point as output, a water supply flow prediction model is constructed, wherein the output of the LSTM neural network at the n-1th time point is output as the output of the hidden layer of the LSTM neural network to the next network layer, and serves as the input of the water supply flow prediction model at the nth time point; the output of the LSTM neural network at the n-2th time point is output as the output of the hidden layer of the LSTM neural network to the next network layer, and serves as the input of the water supply flow prediction model at the n-1th time point, and the cycle repeats for other time points.
[0060] Specifically, the water supply flow model is described by taking the data input of three time steps (t-1, t, and t+1) as an example. First, the water supply flow data and environmental parameter data at time t-1 are input to the water supply flow prediction model. The output of the LSTM neural network in the water supply flow prediction model is sent to two places. The first is output to the next network layer as the output of the hidden layer of the LSTM neural network, and the second is input to the water supply flow prediction model of the next time step (t). The input of the water supply flow prediction model at time t includes the water supply flow data and environmental parameter data at time t, and also includes the output result of the previous time step (t-1). Therefore, the input at time t includes the information of the previous time step (t-1). The model output at time t has two outputs like at time t-1. The input of the water supply flow prediction model at time t+1 includes the water supply flow data and environmental parameter data at time t+1, and also includes the output result of the previous time step (t). Therefore, the input at time t+1 includes the information of the previous time step (t). The model output at time t+1 has two outputs, just like at time t. Similarly, when the time step is multiple, the above rule is repeated until the last moment.
[0061] Specifically, the water supply flow prediction model is expressed as: Q=NN(T,D,R,q) Among them, Q is the water supply flow at the prediction time point, NN represents the LSTM neural network structure, T is the temperature at the historical time point before the prediction time point, D is the humidity at the historical time point before the prediction time point, R is the historical holiday situation before the prediction time point, and q is the historical water supply flow before the prediction time point.
[0062] Specifically, the data format of the water supply flow prediction model is [number of samples, time steps, number of features], where the number of samples is the number of samples in the training set; the time step is the total number of times the LSTM neural network is trained, for example: using the environmental parameters and water supply flow of the previous 24 time steps as features to predict the data at the 25th time point, that is, the LSTM neural network needs to loop 24 times, each time calculating the feature data of one time step; the number of features, in this application, the environmental parameters plus the water supply flow, specifically the four features of temperature, humidity, holidays and water supply flow, therefore, the number of features is 4.
[0063] It should be noted that changes in various environmental factors in the city directly or indirectly affect changes in water consumption. The four aspects that have the greatest impact on water consumption, namely historical temperature, historical humidity, historical holidays and historical water supply flow, are selected as input, and the predicted water supply flow is used as output to construct a water supply flow prediction model, which can accurately reflect the changing trend of water supply.
[0064] S4, model training and verification steps: set the water supply flow prediction model parameters, train the water supply flow prediction model through the training set, and verify the trained water supply flow prediction model through the verification set.
[0065] Specifically, when training the water supply flow prediction model, the training data in the training set is one sampling point per hour. Taking 24 sampling points per day as an example, during the training of the water supply flow prediction model, the temperature, humidity, holidays, and water supply flow of the 24 sampling points in the training set are used as input features of the water supply flow prediction model to predict the water supply flow of the 25th sampling point, and this rule is continuously rolled down. It should be noted that the label in this application is the water supply flow, which is both a feature and a label.
[0066] Specifically, the model parameters include the number of hidden layers, the number of epochs for model training, the batch size (batch_size), and the optimizer (optimizer). The water supply flow prediction model is trained with the training set, and the trained water supply flow prediction model is saved after the training is completed. The model parameters are used to directly infer the water supply flow prediction model on the input data, and the performance of the trained model is verified with the validation set, and a comparison chart between the predicted value and the true value in the validation set is drawn.
[0067] Specifically, in some embodiments, the specific method for verifying the water supply flow prediction model is: inputting the verification set into the trained water supply flow prediction model to obtain the predicted value, calculating the error between the predicted value and the true value under different model parameters, and the model parameter with the smallest error is the water supply flow prediction model parameter. In a specific embodiment, in the model parameters, the LSTM neural network hidden layer is set to two layers, the optimizer uses the Adam optimizer, the learning rate is 0.01, the epochs is 100, and the batch_size is 512.
[0068] S5. Prediction step: input the test set into the water supply flow prediction model to obtain the predicted water supply flow at the prediction time point.
[0069] S6. Judgment step: determine the magnitude of the predicted water supply flow and the current water supply flow, and determine whether the absolute value of the difference between the predicted water supply and the current water supply exceeds a set threshold.
[0070] S7, water pump status adjustment step: when the predicted water supply flow is greater than the current water supply flow and the absolute value of the difference between the two exceeds the set threshold, turn on each water pump in turn, or increase the frequency of each water pump according to the flow-head characteristic curve and the flow-efficiency characteristic curve to increase the water supply flow, until the sum of the water supply flow of all water pumps reaches the predicted water supply flow; when the predicted water supply flow is less than the current water supply flow and the absolute value of the difference between the two exceeds the set threshold, turn off each water pump in turn, or lower the frequency of each water pump according to the flow-head characteristic curve and the flow-efficiency characteristic curve to reduce the water supply flow, until the sum of the water supply flow of all water pumps reaches the predicted water supply flow.
[0071] It should be noted that the pump characteristic curve can reflect the operating status of the pump. According to the predicted water supply flow and the pump characteristic curve, the operating status of the pump can be scientifically and reasonably adjusted to ensure efficient and stable operation of the pump, achieve water supply optimization scheduling, improve water supply scheduling efficiency, reduce water pump energy consumption and failure rate, and improve the reliability and stability of the water supply system. The pump characteristic curve includes flow-head (QH) curve and flow-efficiency (Q- ) curve. Since the main function of the water pump is to transport water to the outside, the output flow is the most basic parameter of the water pump, and the head and efficiency are based on the flow as a reference. The mathematical expression of the water pump characteristic curve is obtained by fitting the water pump characteristic curve through the quadratic curve fitting method.
[0072] (1) The mathematical expression of the pump characteristic curve at rated speed is as follows: QH curve:
[0073] Q- curve:
[0074] in, It is the head of the pump at rated speed; is the flow rate at the rated speed of the pump; is the static head of the pump; is the pipeline friction coefficient; is the efficiency of the pump at rated speed; is the coefficient of the water pump characteristic curve equation.
[0075] (2) The mathematical expression of the pump characteristic curve at any speed is as follows: After the curve of the water pump at rated speed is obtained by quadratic curve fitting, the characteristic curve of the speed regulating pump at any speed can be obtained by similarity theorem.
[0076] Similarity law of water pump:
[0077] Among them, S is the speed ratio of the pump, Q is the flow rate at any speed, and H is the head at any speed.
[0078] The characteristic curve formula of the water pump at any speed is: QH curve:
[0079] Q- curve:
[0080] The water pump is one of the main water supply equipment in the pipe network, which can be divided into two categories: fixed speed pump and variable frequency pump. The fixed speed pump has a fixed speed and cannot be adjusted according to actual needs, so there is no need to consider its speed. The speed ratio is a very important indicator for the variable frequency pump. Generally, the speed ratio range S is set for the variable frequency pump according to the environment during project implementation. [S min , S max ], and the rated speed of the pump marked at the factory is generally at the highest efficiency point of the pump, so the speed ratio range of the variable frequency pump can be limited to S [S min ,1]. In the pump station, the pumps are installed in parallel, so the water discharge pressure of the pump station is equal to the lifting head of each pump. Due to the increased pump speed ratio constraint in the previous point, the pump cannot provide water that exceeds its own water supply capacity, so the total water discharge of the pump station is: , where M is the number of water pumps, For the i The water output of a water pump.
[0081] Specifically, in some embodiments, in the water pump state adjustment step, see Figure 5 , when determining to reduce the water supply flow, if the water pump is a fixed speed pump and the current operating state of the fixed speed pump is on, then change its state to off; if the water pump is a variable frequency pump, calculate the predicted water supply pressure based on the predicted water supply flow, calculate the water supply flow of the variable frequency pump based on the flow-head characteristic curve of the water pump, and determine whether the variable frequency pump is in the high-efficiency zone based on the flow-efficiency characteristic curve. If the operating state of the variable frequency pump is higher than the high-efficiency zone or is already in the high-efficiency zone, then lower the operating frequency of the variable frequency pump and finally reach the highest efficiency point in the high-efficiency zone (i.e. Figure 4 The lowest operating frequency to the left of point F (i.e. Figure 4 Point A in the figure), if the operating state of the variable frequency pump is lower than the high efficiency zone, the operating frequency of the variable frequency pump will not be adjusted. It should be noted that the variable frequency pump needs to consider the water supply flow, lifting pressure and high efficiency zone at the same time. Since the water pumps in the water plant are installed in parallel, the lifting head of each water pump is equal to the water supply pressure, and the predicted water supply pressure is calculated by predicting the water supply flow.
[0082] It should also be noted that the water supply flow prediction model is based on the pipe network SCADA system. The pipe network SCADA system connects the actual pipe network structure through topological relationships, reflects the facility attributes and process data in the pipe network, and solves the unknown quantities in the model through pipe network simulation. In the process of water supply prediction, the pipe network SCADA system uses EPANET to solve the model. EPANET is an open source software developed by the Environmental Protection Agency (EPA) of the United States. It is a computer program that can perform delayed simulation of hydraulic and water quality characteristics of pressurized pipe networks. EPANET can be used to perform pipe network adjustment calculations of water supply systems and calculate the outlet pressure of each pump station. In the process of water supply flow prediction, the predicted water supply flow of each pump station, the water level of the pool collected in real time by the SCADA system, the water consumption of the water point, and the pressure of the pressure control point are used as the input data of the hydraulic adjustment. After the hydraulic adjustment is completed, the hydraulic data of the entire urban pipe network SCADA system is returned, from which the key data of the outlet pressure of each pump station needs to be obtained.
[0083] Specifically, in some embodiments, in the water pump state adjustment step, see Figure 6, when determining to increase the water supply flow, if the water pump is a fixed-speed pump and the current operating state of the fixed-speed pump is closed, then change its state to open; if the water pump is a variable-frequency pump, calculate the predicted water supply pressure based on the predicted water supply flow, calculate the water supply flow of the variable-frequency pump based on the flow-head characteristic curve of the water pump, and determine whether the variable-frequency pump is in the high-efficiency zone based on the flow-efficiency characteristic curve. If the operating state of the variable-frequency pump is lower than the high-efficiency zone or is already in the high-efficiency zone, increase the operating frequency of the variable-frequency pump and finally reach the highest efficiency point in the high-efficiency zone (i.e. Figure 7 The highest operating frequency to the right of point F (i.e. Figure 7 If the operating state of the variable frequency pump is higher than the high efficiency zone, the operating frequency of the variable frequency pump will not be adjusted.
[0084] Specifically, in some embodiments, in the water pump state adjustment step, if the water pump is a variable frequency pump, when the predicted water supply flow is greater than the current maximum water outflow of the water plant, all variable frequency pumps are in the on state, and the operating frequency of all variable frequency pumps is the highest operating frequency in the high efficiency zone (i.e. Figure 7 When the rated flow rate of the variable frequency pump is not reached, each variable frequency pump is adjusted in turn according to the priority, and the operating frequency is adjusted to the rated frequency until the predicted water supply is reached.
[0085] The urban real-time water supply scheduling method provided by the present invention combines the water supply flow predicted by the water supply flow prediction model constructed based on the LSTM neural network structure with the size judgment of the current water supply flow and the operation state judgment of the water pump characteristic curve to perform water supply scheduling. Compared with the existing water supply scheduling method, the water supply scheduling strategy is more scientific and reasonable, can achieve the supply and demand balance of the water supply system and the optimal allocation of resources, improve the overall operation efficiency and economic benefits of the water supply system, and provide favorable guarantees for the stable and efficient operation of the urban water supply system.
[0086] See also Figure 8 In a fourth aspect, the present invention provides a city real-time water supply scheduling system, which is used to implement the city real-time water supply scheduling method described in the third aspect of the present invention, including: Data acquisition module 1, obtains environmental parameters and historical data at the predicted time point Environmental parameters at each time point and historical water supply flow monitored in the pipe network SCADA system; Data processing module 2, preprocessing the historical water supply flow and historical environmental parameters, forming a data set with the preprocessed historical water supply flow and historical environmental parameters, and dividing the data set into a training set, a validation set and a test set; Model building module 3, based on the LSTM neural network structure, takes historical water supply flow and historical environmental parameters as input and the water supply flow at the predicted time point as output to build a water supply flow prediction model; Model training and verification module 4, setting water supply flow prediction model parameters, training the water supply flow prediction module through the training set, and verifying the trained water supply flow prediction model through the verification set; The water supply flow prediction module 5 inputs the test set into the water supply flow prediction model to obtain the predicted water supply flow at the prediction time point; A judgment module 7 is used to judge the difference between the predicted water supply flow and the current water supply flow, and to judge whether the absolute value of the difference between the predicted water supply and the current water supply exceeds a set threshold; The water pump state adjustment module 8 turns on each water pump in turn or increases the frequency of each water pump to increase the water supply flow rate when the predicted water supply flow rate is greater than the current water supply flow rate and the absolute value of the difference between the two exceeds a set threshold value, until the sum of the water supply flow rates of all water pumps reaches the predicted water supply flow rate; when the predicted water supply flow rate is less than the current water supply flow rate and the absolute value of the difference between the two exceeds a set threshold value, turns off each water pump in turn or lowers the frequency of each water pump to reduce the water supply flow rate until the sum of the water supply flow rates of all water pumps reaches the predicted water supply flow rate.
[0087] In some embodiments, the above-mentioned urban real-time water supply scheduling system model optimization module 6, the model optimization module includes: The data monitoring module 601 is used to monitor the actual water supply flow at the predicted time point in real time; The new training set generation module 602 adds the actual water supply flow at the prediction time point monitored in real time, the holiday situation at the prediction time point, the temperature at the prediction time point, and the humidity at the prediction time point to the training set to form a new training set, so as to train the water supply flow prediction model through the new training set and optimize the water supply flow prediction model.
[0088] Add real-time data to the water supply flow model training data, continuously optimize the water supply flow prediction model, realize the closed loop of the entire water supply flow prediction process, and ensure the timeliness of the water supply flow prediction model. It should be noted that, unlike the traditional method of directly using the predicted value of the previous time point as the predicted input value of the next time point, when the data of this application is input into the water supply flow prediction model, the predicted value of the previous time point is not directly used as the input value of the next time point. Instead, when the time point arrives at the predicted time point, the water supply flow, holiday conditions, temperature, and humidity monitored in real time at that time point are added to the training set for training. After optimizing the water supply flow prediction model, the prediction at the next time point is entered. This will not cause the accumulation of errors and improve the prediction accuracy.
[0089] The urban real-time water supply scheduling system provided by the present invention combines the water supply flow predicted by the water supply flow prediction model constructed based on the LSTM neural network structure with the size judgment of the current water supply flow and the operation state judgment of the water pump characteristic curve to perform water supply scheduling. Compared with the existing water supply scheduling method, the water supply scheduling strategy is more scientific and reasonable, and can achieve the supply and demand balance of the water supply system and the optimal allocation of resources, improve the overall operation efficiency and economic benefits of the water supply system, and provide favorable guarantees for the stable and efficient operation of the urban water supply system.
[0090] The effectiveness of the above-mentioned urban real-time water supply flow prediction method and system is described below in conjunction with specific embodiments.
[0091] Example: Based on the actual water supply flow of a pumping station provided by Qingdao Hairun Water Group Co., Ltd., the water supply flow of the pumping station in a certain period of time is predicted using the exponential smoothing prediction algorithm, the adaptive filtering prediction algorithm and the urban real-time water supply flow prediction method and system based on the LSTM neural network proposed in this scheme, and the comparison diagrams of the actual value and the predicted value are as follows: Figure 9-11 As shown. Figure 9-11 It can be clearly seen from the curve graph that the predicted value obtained by the urban real-time water supply flow prediction method and system based on LSTM neural network proposed in this scheme has a higher degree of fit with the actual value than the curve fitting of the exponential smoothing prediction algorithm and the adaptive filtering prediction algorithm, and the overall trend is very close to the actual data.
[0092] The above embodiments are used to explain the present invention rather than to limit the present invention. Any modification and change made to the present invention within the spirit of the present invention and the protection scope of the claims shall fall within the protection scope of the present invention.
Claims
1. A method for predicting urban real-time water supply flow, characterized in that: The steps are: Data acquisition steps: Obtain environmental parameters and history at the prediction time point Environmental parameters at each time point and historical water supply flow monitored in the pipe network SCADA system, including holidays, temperature and humidity; Data processing steps: preprocess the historical water supply flow and historical environmental parameters, form a data set with the preprocessed historical water supply flow and historical environmental parameters, and divide the data set into a training set, a validation set, and a test set; Model construction steps: Based on the LSTM neural network structure, with historical water supply flow and historical environmental parameters as input and the water supply flow at the predicted time point as output, a water supply flow prediction model is constructed, wherein the LSTM neural network output at the n-1th time point is output as the output of the hidden layer of the LSTM neural network to the next network layer, and is used as the input of the water supply flow prediction model at the nth time point; the LSTM neural network output at the n-2th time point is output as the output of the hidden layer of the LSTM neural network to the next network layer, and is used as the input of the water supply flow prediction model at the n-1th time point, and the cycle repeats for other time points; Model training and verification steps: set the water supply flow prediction model parameters, train the water supply flow prediction model through the training set, and verify the trained water supply flow prediction model through the verification set; Prediction step: Input the test set into the water supply flow prediction model to obtain the predicted water supply flow at the prediction time point.
2. The method for predicting urban real-time water supply flow rate according to claim 1, characterized in that: The specific method for verifying the water supply flow prediction model is as follows: input the verification set into the trained water supply flow prediction model to obtain the predicted value, calculate the error between the predicted value and the true value under different model parameters, and the model parameter with the smallest error is the water supply flow prediction model parameter.
3. The method for predicting urban real-time water supply flow rate according to claim 1, characterized in that: It also includes a model optimization step: monitoring the water supply flow at the prediction time point in the pipe network SCADA system in real time at the prediction time point, adding the real-time monitored water supply flow at the prediction time point, holiday conditions at the prediction time point, temperature at the prediction time point, and humidity at the prediction time point to the training set to form a new training set, and training the water supply flow prediction model with the new training set to optimize the water supply flow prediction model.
4. A city real-time water supply flow prediction system, used to implement the city real-time water supply flow prediction method according to any one of claims 1 to 3, characterized in that: include: Data acquisition module, obtains environmental parameters and history at the prediction time point Environmental parameters at each time point and historical water supply flow monitored in the pipe network SCADA system; A data processing module pre-processes the historical water supply flow and historical environmental parameters, forms a data set with the pre-processed historical water supply flow and historical environmental parameters, and divides the data set into a training set, a validation set, and a test set; The model building module is based on the LSTM neural network structure, takes the historical water supply flow and historical environmental parameters as input, and the predicted water supply flow at the time point as output to build a water supply flow prediction model; Model training and verification module, setting water supply flow prediction model parameters, training the water supply flow prediction model through the training set, and verifying the trained water supply flow prediction model through the verification set; The water supply flow prediction module inputs the test set into the water supply flow prediction model to obtain the predicted water supply flow at the predicted time point.
5. The urban real-time water supply flow prediction system as claimed in claim 4, characterized in that: It also includes a model optimization module, which includes: A data monitoring module, used to monitor the actual water supply flow at the predicted time point in real time; The new training set generation module adds the actual water supply flow at the prediction time point monitored in real time, the holiday situation at the prediction time point, the temperature at the prediction time point, and the humidity at the prediction time point to the training set to form a new training set, so as to train the water supply flow prediction model through the new training set and optimize the water supply flow prediction model.
6. A real-time urban water supply scheduling method, characterized in that: The steps are: Data acquisition steps: Obtain environmental parameters and history at the prediction time point Environmental parameters at each time point and historical water supply flow monitored in the pipe network SCADA system, including holidays, temperature and humidity; Data processing steps: preprocess the historical water supply flow and historical environmental parameters, form a data set with the preprocessed historical water supply flow and historical environmental parameters, and divide the data set into a training set, a validation set, and a test set; Model construction steps: Based on the LSTM neural network structure, with historical water supply flow and historical environmental parameters as input and the water supply flow at the predicted time point as output, a water supply flow prediction model is constructed, wherein the LSTM neural network output at the n-1th time point is output as the output of the hidden layer of the LSTM neural network to the next network layer, and is used as the input of the water supply flow prediction model at the nth time point; the LSTM neural network output at the n-2th time point is output as the output of the hidden layer of the LSTM neural network to the next network layer, and is used as the input of the water supply flow prediction model at the n-1th time point, and the cycle repeats for other time points; Model training and verification steps: set the water supply flow prediction model parameters, train the water supply flow prediction model through the training set, and verify the trained water supply flow prediction model through the verification set; Prediction step: input the test set into the water supply flow prediction model to obtain the predicted water supply flow at the prediction time point; Judgment step: judging the magnitude of the predicted water supply flow and the current water supply flow, and judging whether the absolute value of the difference between the predicted water supply and the current water supply exceeds a set threshold; Water pump status adjustment steps: when the predicted water supply flow is greater than the current water supply flow and the absolute value of the difference between the two exceeds the set threshold, turn on each water pump in turn, or increase the frequency of each water pump according to the flow-head characteristic curve and the flow-efficiency characteristic curve to increase the water supply flow, until the sum of the water supply flow of all water pumps reaches the predicted water supply flow; when the predicted water supply flow is less than the current water supply flow and the absolute value of the difference between the two exceeds the set threshold, turn off each water pump in turn, or lower the frequency of each water pump according to the flow-head characteristic curve and the flow-efficiency characteristic curve to reduce the water supply flow, until the sum of the water supply flow of all water pumps reaches the predicted water supply flow.
7. The urban real-time water supply scheduling method according to claim 6, characterized in that: In the water pump state adjustment step, when it is determined to reduce the water supply flow, if the water pump is a fixed speed pump and the current operating state of the fixed speed pump is on, then its state can be changed to off; if the water pump is a variable frequency pump, the predicted water supply pressure is calculated based on the predicted water supply flow, the head of each water pump obtained by installing the water pumps in parallel is equal to the water supply pressure, the water supply flow of the variable frequency pump is calculated according to the flow-head characteristic curve of the water pump, and whether the variable frequency pump is in the high-efficiency zone is determined according to the flow-efficiency characteristic curve. If the operating state of the variable frequency pump is higher than the high-efficiency zone or is already in the high-efficiency zone, the operating frequency of the variable frequency pump is lowered and finally reaches the lowest operating frequency on the left side of the highest efficiency point in the high-efficiency zone. If the operating state of the variable frequency pump is lower than the high-efficiency zone, the operating frequency of the variable frequency pump is not adjusted.
8. The urban real-time water supply scheduling method according to claim 6, characterized in that: In the water pump state adjustment step, when it is determined to increase the water supply flow, if the water pump is a fixed speed pump and the current operating state of the fixed speed pump is closed, its state can be changed to open; if the water pump is a variable frequency pump, the predicted water supply pressure is calculated based on the predicted water supply flow, the head of each water pump obtained by installing the water pumps in parallel is equal to the water supply pressure, the water supply flow of the variable frequency pump is calculated according to the flow-head characteristic curve of the water pump, and whether the variable frequency pump is in the high-efficiency zone is determined according to the flow-efficiency characteristic curve. If the operating state of the variable frequency pump is lower than the high-efficiency zone or is already in the high-efficiency zone, the operating frequency of the variable frequency pump is increased and finally reaches the highest operating frequency to the right of the highest efficiency point in the high-efficiency zone. If the operating state of the variable frequency pump is higher than the high-efficiency zone, the operating frequency of the variable frequency pump is not adjusted.
9. The urban real-time water supply scheduling method according to claim 6, characterized in that: In the water pump state adjustment step, if the water pump is a variable frequency pump, when the predicted water supply flow is greater than the maximum water outlet flow of the current water plant, all variable frequency pumps are in the on state, the operating frequency of all variable frequency pumps is the highest operating frequency in the high-efficiency area and has not reached the rated flow of the variable frequency pump, each variable frequency pump is adjusted in turn according to priority, and the operating frequency is adjusted to the rated frequency until the predicted water supply is reached.
10. A city real-time water supply scheduling system, used to implement the city real-time water supply scheduling method according to any one of claims 6 to 9, characterized in that: include: Data acquisition module, obtains environmental parameters and history at the prediction time point Environmental parameters at each time point and historical water supply flow monitored in the pipe network SCADA system; A data processing module pre-processes the historical water supply flow and historical environmental parameters, forms a data set with the pre-processed historical water supply flow and historical environmental parameters, and divides the data set into a training set, a validation set, and a test set; The model building module is based on the LSTM neural network structure, takes the historical water supply flow and historical environmental parameters as input, and the predicted water supply flow at the time point as output to build a water supply flow prediction model; Model training and verification module, setting water supply flow prediction model parameters, training the water supply flow prediction model through the training set, and verifying the trained water supply flow prediction model through the verification set; The water supply flow prediction module inputs the test set into the water supply flow prediction model to obtain the predicted water supply flow at the predicted time point; A judgment module is used to judge the difference between the predicted water supply flow and the current water supply flow, and to judge whether the absolute value of the difference between the predicted water supply and the current water supply exceeds a set threshold; The water pump status adjustment module turns on each water pump in turn or increases the frequency of each water pump to increase the water supply flow when the predicted water supply flow is greater than the current water supply flow and the absolute value of the difference between the two exceeds the set threshold, until the sum of the water supply flow of all water pumps reaches the predicted water supply flow; when the predicted water supply flow is less than the current water supply flow and the absolute value of the difference between the two exceeds the set threshold, turns off each water pump in turn or lowers the frequency of each water pump to reduce the water supply flow until the sum of the water supply flow of all water pumps reaches the predicted water supply flow.
Citation Information
Cited By
Method and system for predicting water consumption of secondary water supply pool and regulation and storage method and system
CN119379491A
Water supply network optimized supply scheduling system based on big data analysis
CN119624052A
Water outlet pressure prediction method and device
CN120067898A
Intelligent accounting method for industrial water consumption
CN120069220A
Irrigation area patrol equipment and method based on augmented reality technology
CN120704524A
