Deep learning-based urban gas pipe network hydraulic simulation method and device
Through the hydraulic simulation method of urban gas pipeline network based on deep learning, the simulation model is established and optimized using the instantaneous data of each node, the calculation error and instability problems in the existing technology are solved, and high-precision simulation prediction is achieved.
Patent Information
- Application Number
- CN202411055870.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-11-08
AI Technical Summary
In the existing hydraulic simulation methods of urban gas pipelines, there are problems such as poor grid quality, increasing calculation error, unstable numerical solution, multi-physics coupling problems, and inaccurate calculation results.
Using the hydraulic simulation method of urban gas pipeline network based on deep learning, by obtaining the instantaneous flow, pressure and temperature data of each node, a simulation model including the input layer, the convolutional layer, the pooling layer and the output layer is established, and these data are used for training. To predict instantaneous information of unknown nodes, optimize the model to improve performance.
Accurate prediction of hydraulic power simulation of urban gas pipelines is achieved, calculation errors and instability are reduced, and the reliability and accuracy of simulation results are improved.
Smart Images

Figure CN118917200A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a method and device for hydraulic simulation of a town gas pipeline network based on deep learning. Background Art
[0002] Hydraulic calculation and simulation of urban gas pipeline networks is an advanced management method based on digital simulation. It builds a real model of the basic data of the actual gas pipeline network and then conducts simulation analysis to understand the operation of the pipeline network under different conditions and predict possible changes in the system after the conditions change. Hydraulic calculation and simulation of urban gas pipeline networks is an important means to ensure the safe, economical and efficient operation of the gas supply system. Through reasonable hydraulic calculation and simulation analysis, the layout of the pipeline network and the selection of pipe diameters can be optimized, the stability and economy of the pipeline network operation can be improved, and the probability of failure and the degree of loss can be reduced.
[0003] The general pipe network hydraulic calculation and simulation mainly adopts simulation based on the basic principles of fluid dynamics, and solves the partial differential equations of fluid flow through numerical methods. These equations include continuity equation, momentum equation, energy equation, etc., which describe the basic laws of fluid flow. Through numerical methods such as finite volume method or finite element method, the continuous fluid domain is discretized, the partial differential equation is converted into a discrete equation system, and the numerical solution of the flow field is obtained through iterative solution. This method requires huge parameters and large amount of calculation. If the boundary conditions are not set properly, there may be no solution, resulting in errors in pipe network simulation.
[0004] Therefore, the following problems will occur when using fluid dynamics as the theoretical basis for urban gas pipeline simulation: 1) Poor mesh quality will lead to increased calculation errors and even calculation failures. 2) In some cases, the numerical solution may be unstable, resulting in inaccurate calculation results. 3) In the problem of multi-physics field coupling, coupling problems may occur due to the interaction and influence of different physical fields. 4) Improper boundary condition setting: Improper boundary condition setting will lead to deviations in the initial state and boundary behavior of the flow field. 5) Problems such as data format mismatch and poor visualization may occur in post-processing. Summary of the invention
[0005] The present invention aims to provide a method and device for hydraulic simulation of urban gas pipeline networks based on deep learning that overcomes the above-mentioned problems or at least partially solves the above-mentioned problems.
[0006] To achieve the above object, the technical solution of the present invention is specifically implemented as follows:
[0007] One aspect of the present invention provides a method for hydraulic simulation of a town gas pipeline network based on deep learning, comprising:
[0008] Acquire first identification data of a first node in the town gas pipeline network, and acquire first instantaneous flow data, first instantaneous pressure data, and first instantaneous temperature data of the first node at a first moment;
[0009] Acquire second identification data of a second node adjacent to the first node, and acquire second instantaneous flow data, second instantaneous pressure data, and second instantaneous temperature data of the second node at a first moment;
[0010] Determine the length data, pipe diameter data and pipe type data of the pipe between the first node and the second node;
[0011] Generate instantaneous information at a first moment, the instantaneous information at the first moment including: first moment data, the first identification data, the first instantaneous flow data, the first instantaneous pressure data, the first instantaneous temperature data, the second identification data, the second instantaneous flow data, the second instantaneous pressure data, the second instantaneous temperature data, the first length data, the first pipe diameter data, and the first pipe type data;
[0012] Establish a hydraulic simulation model for urban gas pipeline networks;
[0013] Using the instantaneous information at the first moment to train the hydraulic simulation model of the town gas pipeline network;
[0014] The second length data, the second pipe diameter data and the second pipe type data of the pipes of the unknown node and the adjacent nodes are obtained, and the instantaneous flow data of the unknown node, the instantaneous pressure data of the unknown node and the instantaneous temperature data of the unknown node are predicted by using the hydraulic simulation model of the urban gas pipeline network, and the instantaneous flow data of the unknown node, the instantaneous pressure data of the unknown node and the instantaneous temperature data of the unknown node are output.
[0015] Optionally, the establishing of a hydraulic simulation model of a town gas pipeline network includes:
[0016] Determining the structure of the hydraulic simulation model of the town gas pipeline network, the structure of the hydraulic simulation model of the town gas pipeline network includes: an input layer, a convolution layer, a pooling layer, a fully connected layer and an output layer;
[0017] Determine the activation function of the town gas network hydraulic simulation model, the activation function includes but is not limited to: ReLU, sigmoid and tanh;
[0018] The hyperparameters of the town gas network hydraulic simulation model are set, and the hyperparameters include but are not limited to: learning rate, batch size and number of iterations.
[0019] Optionally, the using the instantaneous information at the first moment to train the town gas network hydraulic simulation model includes:
[0020] Preprocessing the instantaneous information at the first moment;
[0021] Using the instantaneous information at the first moment as input features of the hydraulic simulation model of the town gas pipeline network, and using the instantaneous flow data, instantaneous pressure data and instantaneous temperature data as output targets of the hydraulic simulation model of the town gas pipeline network;
[0022] Using the instantaneous information at the first moment to train the hydraulic simulation model of the town gas pipeline network;
[0023] Evaluating the performance of the hydraulic simulation model of the town gas network;
[0024] The hydraulic simulation model of the town gas pipeline network is optimized and adjusted.
[0025] Optionally, the process of training the town gas network hydraulic simulation model using the instantaneous information at the first moment further includes: minimizing the prediction error using a loss function and an optimizer.
[0026] Optionally, the evaluating the performance of the town gas network hydraulic simulation model includes:
[0027] The performance of the town gas network hydraulic simulation model is evaluated using square error or mean absolute error.
[0028] Another aspect of the present invention provides a town gas network hydraulic simulation device based on deep learning, comprising:
[0029] An acquisition module is used to acquire first identification data of a first node in a town gas pipeline network, and acquire first instantaneous flow data, first instantaneous pressure data, and first instantaneous temperature data of the first node at a first moment; acquire second identification data of a second node adjacent to the first node, and acquire second instantaneous flow data, second instantaneous pressure data, and second instantaneous temperature data of the second node at a first moment; determine length data, pipe diameter data, and pipe type data of a pipeline between the first node and the second node;
[0030] A generating module, configured to generate instantaneous information at a first moment, wherein the instantaneous information at the first moment includes: first moment data, the first identification data, the first instantaneous flow data, the first instantaneous pressure data, the first instantaneous temperature data, the second identification data, the second instantaneous flow data, the second instantaneous pressure data, the second instantaneous temperature data, the first length data, the first pipe diameter data, and the first pipe type data;
[0031] Model building module, used to build a hydraulic simulation model of the urban gas pipeline network;
[0032] A model training module, used for training the hydraulic simulation model of the town gas pipeline network using the instantaneous information at the first moment;
[0033] The model prediction module is used to obtain the second length data, the second pipe diameter data and the second pipe type data of the pipes of the unknown node and the adjacent nodes, and use the urban gas pipeline network hydraulic simulation model to predict the instantaneous flow data of the unknown node, the instantaneous pressure data of the unknown node and the instantaneous temperature data of the unknown node, and output the instantaneous flow data of the unknown node, the instantaneous pressure data of the unknown node and the instantaneous temperature data of the unknown node.
[0034] Optionally, the model building module builds a hydraulic simulation model of a town gas pipeline network in the following manner:
[0035] Determining the structure of the hydraulic simulation model of the town gas pipeline network, the structure of the hydraulic simulation model of the town gas pipeline network includes: an input layer, a convolution layer, a pooling layer, a fully connected layer and an output layer;
[0036] Determine the activation function of the town gas network hydraulic simulation model, the activation function includes but is not limited to: ReLU, sigmoid and tanh;
[0037] The hyperparameters of the town gas network hydraulic simulation model are set, and the hyperparameters include but are not limited to: learning rate, batch size and number of iterations.
[0038] Optionally, the model training module trains the town gas network hydraulic simulation model using the instantaneous information at the first moment in the following manner:
[0039] Preprocessing the instantaneous information at the first moment;
[0040] Using the instantaneous information at the first moment as input features of the hydraulic simulation model of the town gas pipeline network, and using the instantaneous flow data, instantaneous pressure data and instantaneous temperature data as output targets of the hydraulic simulation model of the town gas pipeline network;
[0041] Using the instantaneous information at the first moment to train the hydraulic simulation model of the town gas pipeline network;
[0042] Evaluating the performance of the hydraulic simulation model of the town gas network;
[0043] The hydraulic simulation model of the town gas pipeline network is optimized and adjusted.
[0044] Optionally, the model training module is further used to use a loss function and an optimizer to minimize the prediction error during the process of training the town gas pipeline network hydraulic simulation model using the instantaneous information at the first moment.
[0045] Optionally, the model training module evaluates the performance of the town gas network hydraulic simulation model in the following manner:
[0046] The performance of the town gas network hydraulic simulation model is evaluated using square error or mean absolute error.
[0047] It can be seen that through the deep learning-based urban gas pipeline hydraulic simulation method and device provided by the present invention, through the existing pressure regulators, flow meters, thermometers and information of each pipe section in the urban gas pipeline system, such as pipe diameter, pipe material, length, etc., combined with the historical data of each node during pipeline operation, a deep learning algorithm model is used to predict the instantaneous information such as pressure, temperature and flow of any node in the pipeline system. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0049] Figure 1 A flow chart of a method for hydraulic simulation of a town gas pipeline network based on deep learning provided by an embodiment of the present invention;
[0050] Figure 2 A specific schematic diagram of a method for hydraulic simulation of a town gas pipeline network based on deep learning provided by an embodiment of the present invention;
[0051] Figure 3 A schematic diagram of the structure of a deep learning-based urban gas pipeline hydraulic simulation device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0052] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0053] Figure 1 A flowchart of a method for hydraulic simulation of a town gas pipeline network based on deep learning provided by an embodiment of the present invention is shown. Figure 2 A specific schematic diagram of the urban gas pipeline network hydraulic simulation method based on deep learning provided by an embodiment of the present invention is shown, see Figure 1 and Figure 2 , the urban gas pipeline network hydraulic simulation method based on deep learning provided by the embodiment of the present invention includes:
[0054] S1, obtaining first identification data of a first node in a town gas pipeline network, and obtaining first instantaneous flow data, first instantaneous pressure data and first instantaneous temperature data of the first node at a first moment;
[0055] S2, obtaining second identification data of a second node adjacent to the first node, and obtaining second instantaneous flow data, second instantaneous pressure data, and second instantaneous temperature data of the second node at a first moment;
[0056] S3, determining the length data, pipe diameter data and pipe type data of the pipe between the first node and the second node;
[0057] S4, generating instantaneous information at a first moment, wherein the instantaneous information at the first moment includes: first moment data, the first identification data, the first instantaneous flow data, the first instantaneous pressure data, the first instantaneous temperature data, the second identification data, the second instantaneous flow data, the second instantaneous pressure data, the second instantaneous temperature data, the first length data, the first pipe diameter data, and the first pipe type data;
[0058] Specifically, the present invention can collect historical data of each node of the town gas pipeline network, including instantaneous information of each node.
[0059] Each node in the town gas pipeline network has an identifier, counted as node_?, ? represents the number of each node. The pipeline information between each node includes length L, pipe diameter D, pipe type A. The intelligent simulation module obtains the instantaneous flow Q_?, instantaneous pressure data P_?, and instantaneous temperature T_? of each node. Therefore, the instantaneous information of the pipeline network between two adjacent nodes (such as node_1, node_2) at a certain time time_1 is info_1 (time_1, node_1, Q_1, P_1, T_1, node_2, Q_1, P_1, T_1, L, D, A).
[0060] Through the accumulation of a large amount of instantaneous information of each node in the town gas pipe network system, the town gas pipe network hydraulic simulation model established by the present invention can complete two aspects of prediction in the pipe network. First, when the pressure, flow and temperature in the instantaneous information of a certain node change, the instantaneous information of the adjacent nodes will also change, so the change state of the entire pipe network can be simulated. Second, for unknown nodes or newly added nodes, by establishing an association between the node and the adjacent nodes, the model can evaluate and predict the instantaneous information of the node and the instantaneous information of the adjacent nodes.
[0061] In a specific implementation, the present invention can be provided with (1) a communication module that can receive real-time signals from devices such as flow meters, thermometers, and voltage regulators at various nodes in the urban gas pipeline network system; (2) an intelligent simulation module that can receive real-time data from thermometers, voltage regulators, and flow meters and simulate the operation status of the pipeline network through algorithms;
[0062] Specifically, the present invention can use the existing pressure regulators, flow meters, thermometers and information of each pipe section such as pipe diameter, pipe material, length, etc. in the urban gas pipeline system, combined with the historical data of each node during pipeline operation, and adopt a deep learning algorithm model to predict the instantaneous information such as pressure, temperature and flow of any node in the pipeline system.
[0063] S5, establish a hydraulic simulation model of the urban gas pipeline network.
[0064] As an optional implementation of the embodiment of the present invention, the establishment of a hydraulic simulation model of a town gas pipeline network includes:
[0065] Determining the structure of the hydraulic simulation model of the town gas pipeline network, the structure of the hydraulic simulation model of the town gas pipeline network includes: an input layer, a convolution layer, a pooling layer, a fully connected layer and an output layer;
[0066] Determine the activation function of the town gas network hydraulic simulation model, the activation function includes but is not limited to: ReLU, sigmoid and tanh;
[0067] The hyperparameters of the town gas network hydraulic simulation model are set, and the hyperparameters include but are not limited to: learning rate, batch size and number of iterations.
[0068] In specific implementation, it can be achieved through the following deep learning process:
[0069] 1. Determine the model structure:
[0070] Input layer: Receives raw data, and each instantaneous information is used as a feature node. The feature node data is the instantaneous information data of the node, as described above: the instantaneous information of the pipe network between adjacent nodes (such as node_1, node_2) at a certain time time_1 is info_1 (time_1, node_1, Q_1, P_1, T_1, node_2, Q_1, P_1, T_1, L, D, A).
[0071] Convolutional layer: A set of trainable convolution kernels (filters) are used to convolve the input data to extract the features of instantaneous information. Each convolution kernel generates a feature map. The convolutional layer has the characteristics of local connection and parameter sharing, which can effectively reduce the number of model parameters.
[0072] Pooling layer: downsamples the feature map output by the convolutional layer to reduce the dimension of the feature map, reduce the amount of calculation and memory usage, and increase the robustness of the model. Common pooling methods include maximum pooling and average pooling.
[0073] Fully connected layer: Expands multi-dimensional features into a one-dimensional vector, performs linear transformation and activation operations, and generates the final output. Fully connected layers are usually used for classification or regression tasks.
[0074] Output layer: The number of nodes in the output layer corresponds to the number of categories of the classification task, and each node represents the probability that the current sample belongs to that category.
[0075] Output type: unknown variables of the node, that is, Q_1, P_1, T_1 in the instantaneous information data of the node (time_1, node_1, Q_1, P_1, T_1, node_2, Q_1, P_1, T_1, L, D, A), that is, flow, pressure and temperature information.
[0076] 2. Choose a suitable activation function: Common activation functions include ReLU, sigmoid, and tanh. The ReLU function is widely used because of its simplicity and effectiveness.
[0077] 3. Set hyperparameters: including learning rate, batch size, number of iterations, etc. These hyperparameters have an important impact on the performance of the model.
[0078] S6: Using the instantaneous information at the first moment to train the hydraulic simulation model of the town gas pipeline network.
[0079] As an optional implementation of the embodiment of the present invention, the training of the town gas network hydraulic simulation model using the instantaneous information at the first moment includes:
[0080] Preprocessing the instantaneous information at the first moment;
[0081] Using the instantaneous information at the first moment as input features of the hydraulic simulation model of the town gas pipeline network, and using the instantaneous flow data, instantaneous pressure data and instantaneous temperature data as output targets of the hydraulic simulation model of the town gas pipeline network;
[0082] Using the instantaneous information at the first moment to train the hydraulic simulation model of the town gas pipeline network;
[0083] Evaluating the performance of the hydraulic simulation model of the town gas network;
[0084] The hydraulic simulation model of the town gas pipeline network is optimized and adjusted.
[0085] Wherein, the process of training the urban gas pipeline network hydraulic simulation model using the instantaneous information at the first moment also includes: minimizing the prediction error using a loss function and an optimizer.
[0086] The evaluating the performance of the hydraulic simulation model of the town gas pipeline network includes: evaluating the performance of the hydraulic simulation model of the town gas pipeline network by using square error or mean absolute error.
[0087] When implementing it, you can take the following steps:
[0088] 1. Data preparation:
[0089] Collect enough historical data sequences, each of which contains the value of info_1(time_1, node_1, Q_1, P_1, T_1, node_2, Q_1, P_1, T_1, L, D, A).
[0090] Preprocess the data, such as normalization, to ensure the stability and efficiency of model training.
[0091] 2. Build the model:
[0092] Choose an appropriate deep learning model, such as a multi-layer perceptron (MLP).
[0093] Take info_1(time_1, node_1, Q_1, P_1, T_1, node_2, Q_1, P_1, T_1, L, D, A) as the input features of the model and Q, P, T as the output targets of the model.
[0094] 3. Model training:
[0095] Use historical data to train the model so that it learns to map from info_1(time_1, node_1, Q_1, P_1, T_1, node_2, Q_1, P_1, T_1, L, D, A) to Q, P, T.
[0096] During training, an appropriate loss function (such as mean squared error) and optimizer (such as Adam) are used to minimize the prediction error.
[0097] 4. Model evaluation:
[0098] Use a portion of the held-out test data to evaluate the performance of the model.
[0099] Calculate error metrics such as mean squared error (MSE) or mean absolute error (MAE) on the test set to evaluate the model’s prediction accuracy for the unknown variables.
[0100] 5. Application model:
[0101] When there is a new data sequence info_1(time_1, node_1, Q_1, P_1, T_1, node_2, Q_1, P_1, T_1, L, D, A), it is input into the trained model.
[0102] The model will output the corresponding predicted values of Q, P, and T.
[0103] 6. Model optimization and iteration:
[0104] Based on the feedback from actual applications, the model is further optimized and adjusted.
[0105] If more historical data is available, you can consider retraining the model to improve performance.
[0106] S7, obtaining the second length data, the second pipe diameter data and the second pipe type data of the pipes of the unknown node and the adjacent nodes, using the urban gas pipeline network hydraulic simulation model to predict the instantaneous flow data of the unknown node, the instantaneous pressure data of the unknown node and the instantaneous temperature data of the unknown node, and outputting the instantaneous flow data of the unknown node, the instantaneous pressure data of the unknown node and the instantaneous temperature data of the unknown node.
[0107] It can be seen that through the urban gas pipeline network hydraulic simulation method based on deep learning provided by the embodiment of the present invention, in the process of urban pipeline network hydraulic calculation and simulation, the applicable node data types are determined, for example: node 1 instantaneous information data (time, node 1, node 1 flow, node 1 temperature, node 1 pressure, adjacent node 2 number, node 2 flow, node 2 temperature, node 2 pressure, distance of the pipeline between nodes 1 and 2, diameter of the pipeline between nodes 1 and 2, pipe type of the pipeline between nodes 1 and 2), and the simulation is completed in combination with the deep learning method to realize the prediction of pipeline network node parameters. The prediction process is simple and reliable, there is no worry about no solution, and the accuracy is high.
[0108] Figure 3 The structure diagram of the hydraulic simulation device for a town gas pipeline network based on deep learning provided by an embodiment of the present invention is shown. The hydraulic simulation device for a town gas pipeline network based on deep learning applies the above method. The following is only a brief description of the structure of the hydraulic simulation device for a town gas pipeline network based on deep learning. For other matters not covered, please refer to the relevant description in the above method for hydraulic simulation of a town gas pipeline network based on deep learning. Figure 3 , the urban gas pipeline network hydraulic simulation device based on deep learning provided by the embodiment of the present invention includes:
[0109] An acquisition module is used to acquire first identification data of a first node in a town gas pipeline network, and acquire first instantaneous flow data, first instantaneous pressure data, and first instantaneous temperature data of the first node at a first moment; acquire second identification data of a second node adjacent to the first node, and acquire second instantaneous flow data, second instantaneous pressure data, and second instantaneous temperature data of the second node at a first moment; determine length data, pipe diameter data, and pipe type data of a pipeline between the first node and the second node;
[0110] A generating module, configured to generate instantaneous information at a first moment, wherein the instantaneous information at the first moment includes: first moment data, the first identification data, the first instantaneous flow data, the first instantaneous pressure data, the first instantaneous temperature data, the second identification data, the second instantaneous flow data, the second instantaneous pressure data, the second instantaneous temperature data, the first length data, the first pipe diameter data, and the first pipe type data;
[0111] Model building module, used to build a hydraulic simulation model of the urban gas pipeline network;
[0112] A model training module, used for training the hydraulic simulation model of the town gas pipeline network using the instantaneous information at the first moment;
[0113] The model prediction module is used to obtain the second length data, the second pipe diameter data and the second pipe type data of the pipes of the unknown node and the adjacent nodes, and use the urban gas pipeline network hydraulic simulation model to predict the instantaneous flow data of the unknown node, the instantaneous pressure data of the unknown node and the instantaneous temperature data of the unknown node, and output the instantaneous flow data of the unknown node, the instantaneous pressure data of the unknown node and the instantaneous temperature data of the unknown node.
[0114] As an optional implementation of the embodiment of the present invention, the model building module builds a hydraulic simulation model of a town gas network in the following manner:
[0115] Determining the structure of the hydraulic simulation model of the town gas pipeline network, the structure of the hydraulic simulation model of the town gas pipeline network includes: an input layer, a convolution layer, a pooling layer, a fully connected layer and an output layer;
[0116] Determine the activation function of the town gas network hydraulic simulation model, the activation function includes but is not limited to: ReLU, sigmoid and tanh;
[0117] The hyperparameters of the town gas network hydraulic simulation model are set, and the hyperparameters include but are not limited to: learning rate, batch size and number of iterations.
[0118] As an optional implementation of the embodiment of the present invention, the model training module trains the town gas network hydraulic simulation model using the instantaneous information at the first moment in the following manner:
[0119] Preprocessing the instantaneous information at the first moment;
[0120] Using the instantaneous information at the first moment as input features of the hydraulic simulation model of the town gas pipeline network, and using the instantaneous flow data, instantaneous pressure data and instantaneous temperature data as output targets of the hydraulic simulation model of the town gas pipeline network;
[0121] Using the instantaneous information at the first moment to train the hydraulic simulation model of the town gas pipeline network;
[0122] Evaluating the performance of the hydraulic simulation model of the town gas network;
[0123] The hydraulic simulation model of the town gas pipeline network is optimized and adjusted.
[0124] As an optional implementation of an embodiment of the present invention, the model training module is also used to use a loss function and an optimizer to minimize the prediction error during the training of the town gas pipeline network hydraulic simulation model using the instantaneous information at the first moment.
[0125] As an optional implementation manner of the embodiment of the present invention, the model training module evaluates the performance of the town gas pipeline network hydraulic simulation model in the following manner: the performance of the town gas pipeline network hydraulic simulation model is evaluated by using square error or mean absolute error.
[0126] It can be seen that the urban gas pipeline network hydraulic simulation device based on deep learning provided by the embodiment of the present invention can determine the applicable types of node data in the process of urban pipeline network hydraulic calculation and simulation, and complete the simulation in combination with the deep learning method to achieve the prediction of pipeline network node parameters. The prediction process is simple and reliable, there is no worry about no solution, and the accuracy is high.
[0127] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for hydraulic simulation of urban gas pipeline network based on deep learning, characterized in that: include: Acquire first identification data of a first node in the town gas pipeline network, and acquire first instantaneous flow data, first instantaneous pressure data, and first instantaneous temperature data of the first node at a first moment; Acquire second identification data of a second node adjacent to the first node, and acquire second instantaneous flow data, second instantaneous pressure data, and second instantaneous temperature data of the second node at a first moment; Determine the length data, pipe diameter data and pipe type data of the pipe between the first node and the second node; Generate instantaneous information at a first moment, the instantaneous information at the first moment including: first moment data, the first identification data, the first instantaneous flow data, the first instantaneous pressure data, the first instantaneous temperature data, the second identification data, the second instantaneous flow data, the second instantaneous pressure data, the second instantaneous temperature data, the first length data, the first pipe diameter data, and the first pipe type data; Establish a hydraulic simulation model for urban gas pipeline networks; Using the instantaneous information at the first moment to train the hydraulic simulation model of the town gas pipeline network; The second length data, the second pipe diameter data and the second pipe type data of the pipes of the unknown node and the adjacent nodes are obtained, and the instantaneous flow data of the unknown node, the instantaneous pressure data of the unknown node and the instantaneous temperature data of the unknown node are predicted by using the hydraulic simulation model of the urban gas pipeline network, and the instantaneous flow data of the unknown node, the instantaneous pressure data of the unknown node and the instantaneous temperature data of the unknown node are output.
2. The method according to claim 1, characterized in that The establishment of a hydraulic simulation model for a town gas pipeline network comprises: Determining the structure of the hydraulic simulation model of the town gas pipeline network, the structure of the hydraulic simulation model of the town gas pipeline network includes: an input layer, a convolution layer, a pooling layer, a fully connected layer and an output layer; Determine the activation function of the town gas network hydraulic simulation model, the activation function includes but is not limited to: ReLU, sigmoid and tanh; The hyperparameters of the town gas network hydraulic simulation model are set, and the hyperparameters include but are not limited to: learning rate, batch size and number of iterations.
3. The method according to claim 2, characterized in that The step of training the town gas network hydraulic simulation model using the instantaneous information at the first moment includes: Preprocessing the instantaneous information at the first moment; Using the instantaneous information at the first moment as input features of the hydraulic simulation model of the town gas pipeline network, and using the instantaneous flow data, instantaneous pressure data and instantaneous temperature data as output targets of the hydraulic simulation model of the town gas pipeline network; Using the instantaneous information at the first moment to train the hydraulic simulation model of the town gas pipeline network; Evaluating the performance of the hydraulic simulation model of the town gas network; The hydraulic simulation model of the town gas pipeline network is optimized and adjusted.
4. The method according to claim 3, characterized in that The process of training the town gas network hydraulic simulation model using the instantaneous information at the first moment also includes: using a loss function and an optimizer to minimize the prediction error.
5. The method according to claim 4, characterized in that The performance evaluation of the town gas network hydraulic simulation model includes: The performance of the town gas network hydraulic simulation model is evaluated using square error or mean absolute error.
6. A hydraulic simulation device for urban gas pipeline network based on deep learning, characterized in that: include: An acquisition module is used to acquire first identification data of a first node in a town gas pipeline network, and acquire first instantaneous flow data, first instantaneous pressure data, and first instantaneous temperature data of the first node at a first moment; acquire second identification data of a second node adjacent to the first node, and acquire second instantaneous flow data, second instantaneous pressure data, and second instantaneous temperature data of the second node at a first moment; determine length data, pipe diameter data, and pipe type data of a pipeline between the first node and the second node; A generating module, configured to generate instantaneous information at a first moment, wherein the instantaneous information at the first moment includes: first moment data, the first identification data, the first instantaneous flow data, the first instantaneous pressure data, the first instantaneous temperature data, the second identification data, the second instantaneous flow data, the second instantaneous pressure data, the second instantaneous temperature data, the first length data, the first pipe diameter data, and the first pipe type data; Model building module, used to build a hydraulic simulation model of the urban gas pipeline network; A model training module, used for training the hydraulic simulation model of the town gas pipeline network using the instantaneous information at the first moment; The model prediction module is used to obtain the second length data, the second pipe diameter data and the second pipe type data of the pipes of the unknown node and the adjacent nodes, and use the urban gas pipeline network hydraulic simulation model to predict the instantaneous flow data of the unknown node, the instantaneous pressure data of the unknown node and the instantaneous temperature data of the unknown node, and output the instantaneous flow data of the unknown node, the instantaneous pressure data of the unknown node and the instantaneous temperature data of the unknown node.
7. The device according to claim 6, characterized in that The model building module builds a hydraulic simulation model of a town gas pipeline network in the following way: Determining the structure of the hydraulic simulation model of the town gas pipeline network, the structure of the hydraulic simulation model of the town gas pipeline network includes: an input layer, a convolution layer, a pooling layer, a fully connected layer and an output layer; Determine the activation function of the town gas network hydraulic simulation model, the activation function includes but is not limited to: ReLU, sigmoid and tanh; The hyperparameters of the town gas network hydraulic simulation model are set, and the hyperparameters include but are not limited to: learning rate, batch size and number of iterations.
8. The device according to claim 7, characterized in that The model training module trains the town gas network hydraulic simulation model using the instantaneous information at the first moment in the following manner: Preprocessing the instantaneous information at the first moment; Using the instantaneous information at the first moment as input features of the hydraulic simulation model of the town gas pipeline network, and using the instantaneous flow data, instantaneous pressure data and instantaneous temperature data as output targets of the hydraulic simulation model of the town gas pipeline network; Using the instantaneous information at the first moment to train the hydraulic simulation model of the town gas pipeline network; Evaluating the performance of the hydraulic simulation model of the town gas network; The hydraulic simulation model of the town gas pipeline network is optimized and adjusted.
9. The device according to claim 8, characterized in that The model training module is also used to use a loss function and an optimizer to minimize the prediction error when training the town gas pipeline network hydraulic simulation model using the instantaneous information at the first moment.
10. The device according to claim 9, characterized in that The model training module evaluates the performance of the town gas network hydraulic simulation model in the following manner: The performance of the town gas network hydraulic simulation model is evaluated using square error or mean absolute error.
