Method and device for online scheduling planning of natural gas pipeline network based on cyclic iterative optimization
Through the circular iterative optimization method, the state parameters of the natural gas pipeline network and compressor units are monitored and optimized in real time, which solves the problems of poor scheduling management and difficult to achieve online scheduling in the existing technology, and achieves a more economical and stable pipeline operation.
Patent Information
- Application Number
- CN202210614636.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-05-30
AI Technical Summary
The existing technology lacks reliable technical guidance and theoretical support in the scheduling and management of natural gas pipelines, resulting in poor operational matching, large economic losses, and it is difficult to achieve the interaction between online scheduling and real operation.
The circular iteration optimization method is adopted to monitor the state parameters of the natural gas pipeline network and compressor units in real time, improve the decision-making mechanism of the agent, calculate the most economical compressor action under safe operating conditions, and develop hardware devices and high-performance computing platforms suitable for online circular iteration optimization.
It significantly improves the economical operation of the pipeline compressor, reduces the energy consumption of the compressor, maintains the stability of the pipeline storage level, and realizes real-time interaction between online scheduling and real operation.
Smart Images

Figure CN114926065B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a technology in the field of natural gas, specifically to a method and device for online scheduling planning of a natural gas pipeline network with cyclic iterative optimization. Background Art
[0002] At present, the operation control of compressor units under the natural gas regulation mode is heavily dependent on the experience of dispatching managers, and the operation matching of each station unit with the upstream and downstream stations lacks reliable technical guidance and perfect theoretical support. In addition, the current pipeline operation management mode that only considers safety factors leads to a large amount of unnecessary economic losses. There is an urgent need for a dispatching management strategy based on unit efficiency optimization and comprehensive optimization of pipeline paths. However, there are few references to the optimization experience and technology of pipeline operation. The coupling relationship between users, compressor stations, pipelines and other subsystems in the pipeline system is complicated, which has become a challenge for the dispatching and operation optimization of the pipeline network. The shortcomings of the current technology are: first, it is difficult to achieve dispatching operation only by enumerating and comparing different startup modes through simulation algorithms; second, based on the simplified pipeline mechanism model, it is impossible to meet the calculation accuracy requirements and it is difficult to ensure optimality and safety; third, online dispatching is not realized, and there is a lack of interaction mechanism and corresponding support devices with the real natural gas pipeline, which makes it difficult to ensure the deployment effect. Summary of the invention
[0003] In view of the above-mentioned deficiencies in the prior art, the present invention proposes a method and device for online scheduling and planning of a natural gas pipeline network with cyclic iterative optimization, which can realize real-time communication with the database of a large-scale natural gas pipeline network real-time monitoring system, obtain the real-time status parameters (temperature, pressure, flow, speed, etc.) of the current natural gas pipeline network and the compressor unit from the industrial real-time database through the data server, and use the received pipeline system feedback to improve the decision-making mechanism of the internal cyclic iterative optimization intelligent body, and return the most economical compressor action in the safe operating condition under the current pipeline network status and production target through the computing server. At the same time, the present invention establishes a hardware device suitable for online cyclic iterative optimization, develops a large-capacity and high-efficiency computing environment, supports the method in online communication with a large-scale pipeline network system, realizes periodic model self-update, and develops a good visualization interface. The test deployment environment provided by the present invention is simple and convenient, has strong portability, and has low maintenance cost.
[0004] The present invention is achieved through the following technical solutions:
[0005] The present invention relates to a cyclic iterative optimization online scheduling device for a natural gas pipeline network, comprising: a front-end visualization unit, a data service unit and a computing service unit, wherein: the front-end visualization unit requests data based on a relevant configuration file according to relational database information of a local server to obtain a visualization result; the data service unit connects to a real-time industrial database of a pipeline network according to measurement point configuration information, obtains the original data required for calculation and stores it in a local relational database; the computing service unit obtains the final compressor operation suggestion according to the obtained pipeline system boundary data information through a back-end cyclic iterative optimization script calculation.
[0006] The present invention relates to a method for online scheduling of a natural gas pipeline network based on the above-mentioned device through cyclic iterative optimization. First, the real-time state parameters of the current natural gas pipeline and the compressor unit are collected, and the decision mechanism of the internal cyclic iterative optimization intelligent body is improved by using the received pipeline system feedback, and the most economical compressor action in the safe operating condition under the current pipeline state and production target is returned, which specifically includes:
[0007] Step 1: Obtain the network status parameters from the real-time database with a fixed time step of 1 minute through the cyclic reader, and save them to the original monitoring data table in the local relational database through the data conversion interface; establish the unit management and user management data tables according to the unit configuration and user management configuration;
[0008] Step 2: Initialize the online and target network modules in the action decider and the value fitter in the computing service module, and synchronize the target network module in the action decider to the online decision network;
[0009] Step 3: The computing service module initiates computing tasks every 10 minutes, including:
[0010] Step 3.1, generate action instructions: obtain the pressure, temperature and flow data sequence of the current pipeline node from the original monitoring data table, with a length of 10 minutes, and record one data point every minute as the state parameter St, input it into the online decision network to generate the action instruction At, and after the noise generator applies white noise, it is transmitted to the online scheduling instruction receiver in the industrial control system, and the action of the compressor unit is controlled by the field scheduling controller;
[0011] Step 3.2, calculate the reward: After waiting for 10 minutes, read the state parameter sequence of 10 minutes in length again as the state parameter St+1, calculate the reward Rt through the sample (St, At, St+1), form a sample data (St, At, St+1, Rt), and store it in the historical sample storage unit;
[0012] Step 3.3: If the number of samples in the historical sample storage unit is less than the number of batch samples N (set to 30 here), repeat steps 4 and 5 until the number of samples is greater than N, and then execute step 3.4;
[0013] Step 3.4, randomly take out N samples from the historical sample storage unit, update the online network modules in the action decider and the value fitter, and after the update is completed, synchronize the online decision network with the target network module of the action decider;
[0014] Step 3.5, upload the sample (St, At, Rt) to the calculation data table in the data service module. At this point, the scheduling optimization under the t time step is completed, return to step 3.1, and perform the scheduling optimization of the next time step.
[0015] The industrial control system includes an online dispatch instruction receiver, an on-site dispatch controller and a real-time database, wherein: the online dispatch instruction receiver receives the dispatch instruction of the computing service module, i.e., the compressor pressure ratio action instruction; the on-site dispatch controller receives the signal of the dispatch instruction receiver, sets the pressure ratio signal and controls the compressor unit to adjust the unit operation status according to the pressure ratio action; the real-time database realizes the synchronization, recording and storage of the unit monitoring parameters (compressor inlet and outlet pressure, temperature) and pipeline status parameters (pipeline inlet and outlet temperature, pressure) of the on-site station control system. The monitoring parameters of the unit and pipeline at time t are subsequently recorded as S t .
[0016] The data service module includes a cyclic reader, a data conversion interface and a local relational database. The cyclic reader keeps in sync with the real-time database and updates a status data every 10 minutes, that is, S t , transmitted to the local relational database through the data conversion interface. The local relational database includes a user management data table, which is used for the front-end to set permissions for specific users; an original monitoring data table, which saves and records state parameters; a calculation data table that receives sample data from the calculation service module; and a unit management data table that is mainly used to record the relevant parameter settings of the compressor and pipeline of the pipeline network object (including compressor characteristic parameters and pipeline characteristic parameters).
[0017] The computing service module includes an online decision network, a noise generator, a reward calculation module, a historical scheduling sample storage unit, an action decision maker and a value fitter, wherein: the online decision network is synchronized with the online network module in the action decision maker, once every 5 minutes, and receives the state parameter S t The output decision instruction action is added with white noise by the noise generator to form the final decision instruction A t Transmitted to the online scheduling instruction receiver; the reward calculation module is based on the state parameter S t and decision instruction A tCalculated, denoted as R t , and obtain the state parameter S of the next time step (i.e. 10 minutes later) from the original monitoring data table in the data service module t+1 , transmitted to the action decision maker for online and target network module training and updating; the historical scheduling sample storage unit is used to store a small amount of action-state samples (S t , A t , R t , S t+1 ); The action decision maker obtains N state samples of sample pairs from the historical scheduling sample storage unit (S t , R t , S t+1 ), the online network is updated through the optimizer, and the update strategy is soft update, that is, the update result of the network parameters is the weighted sum of the target network parameters and the trained online network parameters; the value fitter obtains N state-action samples (S) of the sample pairs from the historical scheduling sample storage unit t , A t , R t , S t+1 ), the online network is updated through the optimizer, and the update strategy is soft update, that is, the update result of the network parameters is the weighted sum of the target network parameters and the trained online network parameters. The update logic is the same as the online network in the action decider. There is interaction between the action decider and the value fitter.
[0018] Batch sampling data (S) obtained from the historical scheduling sample storage unit t , A t , R t , S t+1 ) will be transferred to the calculation data table in batches, with a transmission interval of 10 minutes.
[0019] The scheduling optimization specifically includes:
[0020] Step ①, raw data reading: obtain the network status parameters from the real-time database with a fixed time step of 1 minute through the loop reader, and save them to the original monitoring data table in the local relational database through the data conversion interface; establish the unit management and user management data tables according to the unit configuration and user management configuration;
[0021] Step ②, generate action instructions: obtain the current pressure, temperature and flow data sequence of the pipeline network node from the original monitoring data table, the length is 10 minutes, and one data point is recorded every minute as the state parameter S t , input the online decision network to generate action instruction A t , after being added with white noise by the noise generator, it is transmitted to the online dispatching instruction receiver, and the action of the compressor unit is controlled by the on-site dispatching controller;
[0022] Step 3: Calculate the reward: Read the state parameter sequence of the first 10 minutes as the state parameter S t+1 , through the sample (S t , A t , S t+1 ) Calculate the reward R t , forming sample data (S t , A t , S t+1 , R t ), stored in the historical sample storage unit;
[0023] Step ④, randomly take out N samples from the historical sample storage unit, update the online network modules in the action decider and the value fitter, and after the update is completed, synchronize the online decision network with the online network module of the action decider;
[0024] Step ⑤: Sample (S t , A t , R t ) is uploaded to the calculation data table in the data service module. At this time, the single-step scheduling optimization is completed, and the next step of scheduling will start again from step ②, and so on.
[0025] Technical Effects
[0026] The present invention defines the natural gas pipeline scheduling problem in a cyclic iterative optimization manner and provides a complete mathematical description; it builds supporting data, computing servers and data, computing service modules to achieve real-time optimization and scheduling of large-scale natural gas pipeline networks. Compared with existing conventional technical means, the present invention has significantly improved technical details as follows: it implements cyclic iterative dynamic scheduling optimization, significantly improves the economy of pipeline network compressor operation, reduces compressor energy consumption, and maintains the required pipeline storage level.
[0027] The built-in method of the present invention adopts an intelligent agent with a loop iterative optimization mechanism to solve the optimization strategy for pipeline network scheduling and operation. The intelligent agent is embedded in the computing service module and directly interacts with the scheduling system environment of the real pipeline. The intelligent agent issues a scheduling instruction for the compressor according to the current state of the pipeline system. After the compressor executes the action, feedback is generated and transmitted to the intelligent agent through the monitoring system. The intelligent agent updates the optimal operation strategy according to the feedback, and so on. In terms of the device, the present invention develops a communication interface program and hardware that matches the real-time pipeline monitoring system and the control system, which are used to obtain and save the state of the real-time pipeline system and transmit the compressor scheduling instructions to the control system and the device in real time; establish a high-performance computing platform and equipment suitable for online loop iterative optimization calculations, which are suitable for the online scheduling function requirements of large-scale pipeline systems, have high-performance computing and large-capacity storage capabilities, have a good debugging environment, and have high scalability and portability.
[0028] Compared with the prior art, the dynamic scheduling optimization algorithm of the present invention significantly improves the economy of the operation of the pipeline network compressor, reduces the energy consumption of the compressor by more than 1.5%, and at the same time, the scheduled pipeline storage level follows the target pipeline storage curve well. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A schematic diagram of the software and hardware relationship of the system and device involved in the present invention;
[0030] Figure 2 A schematic diagram of the architecture of the data and computing service modules in the device of the present invention;
[0031] Figure 3 The loop iteration optimization intelligent agent internal parameter update logic of the present invention;
[0032] Figure 4 The schematic diagram is a comparison of the actual history-cycle iteration optimization scheduling strategies of some compressor stations;
[0033] Figure 5 Schematic diagram of total energy consumption of compressor for pipeline historical scheduling VS cyclic iterative optimization scheduling;
[0034] Figure 6 Schematic diagram of energy consumption-output ratio of pipeline historical scheduling vs. cyclic iterative optimization scheduling;
[0035] Figure 7 Schematic diagram of pipeline storage rate for historical scheduling vs. cyclic iteration optimization scheduling. DETAILED DESCRIPTION
[0036] like Figure 2 As shown, a cyclic iteratively optimized natural gas pipeline online scheduling device involved in this embodiment includes: a data service module and a computing service module, wherein: the data service unit connects to the real-time industrial database of the pipeline network according to the measurement point configuration information, obtains the original data required for calculation and stores it in the local relational database, and the computing service unit obtains the final compressor station operation suggestion according to the obtained pipeline system boundary data information through the background dynamic scheduling optimization script calculation.
[0037] The raw data refers to the measured parameters of the whole pipe network operation, such as the inlet and outlet temperature and pressure of the pipe and compressor, the speed of the compressor, etc. The raw data is accessed through the raw data interface to the pipe network monitoring system and stored in the local relational database;
[0038] The calculation data refers to the compressor group scheduling recommendations obtained by the cyclic iterative optimization agent through the original data, which are also stored in the local database. The calculation server requests the input data required by the agent, that is, the real-time monitoring parameters of the entire pipeline network over a period of time and the specified production targets, and outputs the compressor operation recommendations for the next scheduling period through the agent model, which are written into the relational database of the data server, providing a good data interface for the front end. The front-end visualization unit can display the production target load setting, cyclic iterative optimization agent algorithm hyperparameters and operation optimization recommendations.
[0039] The computing service module includes: a computing server, a computing request interface, and a pipe network system configuration unit and a loop iterative optimization intelligent body unit respectively connected thereto, wherein: the computing server performs continuous learning and operation optimization calculations of the loop iterative optimization intelligent body according to the boundary condition information of the pipe network real-time task obtained, and obtains the optimized compressor station startup recommendation result; the computing request interface calls the intelligent body calculation script and configures relevant parameters according to the model configuration information; the pipe network system configuration unit obtains the corresponding measurement point configuration list according to the targeted pipe network information configuration, and is used to request the original data and write the calculated data into the relational database; the loop iterative optimization intelligent body unit performs status feedback according to the pipe network system status parameter information observed from the relational database to obtain the result.
[0040] like Figure 2 As shown, the scheduling agent in this implementation outputs the scheduling strategy in real time. The iterative learning of the agent itself measures the strategy distance between two updates with KL divergence and constrains it to be greater than a certain value to improve the strategy update rate. Here, the pipe network system operation optimization problem is defined as follows: Let the scheduling time step be t, the scheduling cycle of the algorithm be defined as T, and the number of batch training samples be N.
[0041] Here, according to the requirements of the pipeline scheduling problem, the basic elements of the invented iterative optimization agent are defined: Action A t Definition: The dispatching action sequence of all m compressors in the pipe network system within a period of time T is described by the compressor's pressure ratio parameter: in
[0042] Status S t Definition: The sequence of the inlet and outlet pressure P and flow M of each pipeline. If there are n pipelines, the state is. At time t, the state sequence of the pipeline network system in a scheduling period T is observed as follows: in:
[0043] Reward function R definition: The optimal scheduling of the natural gas pipeline network system aims to search for economically efficient scheduling instructions that meet user needs, operating boundary conditions and safety requirements. Therefore, the definition of the reward function is divided into the economic optimality objective R C , Management target constraint R S , safe operation condition constraints R B . In the scheduling period T after t time steps:
[0044] Make the compressor consume the least gas and define the optimal target reward R C = -C; Given a storage target sequence L, define the constraint reward Given safe operating conditions such as the minimum outlet pressure P of the last section of the pipeline L , the maximum inlet pressure of the entire pipeline P M And the maximum outlet flow M L Define a reward with a penalty function In order to weigh the weights of each reward component, an adjustment factor is set to form the final reward R = ζR C +μR s +ξR B , where: the optimal values of reward factors ζ, μ, ξ need to be determined through adjustment and comparative analysis of numerical examples.
[0045] The invention proposes a sequence-sequence value and strategy approximation network (online network module in action decider and value fitter) with strong inertia processing capability. The action-state value network and strategy network are constructed based on the general recurrent neural network and sequence-sequence structure respectively, and applied to strong dynamic problems.
[0046] The input of the online network module in the value fitter is the state and action sequence (S t ,A t ), the output is the state and action sequence value Q in the scheduling cycle. The unit initial value is (S0, A0) of the time step before the start of the scheduling cycle, and the input is the action and state sequence in the current cycle. Finally, the feature vector of the dynamic spatiotemporal data of the cycle is obtained. After being processed by a multi-layer perceptron neural network, the final estimated value Q is output.
[0047] The online network module of the action decider takes as input the state sequence S t , the output is action sequence A t The sequence-to-sequence model is used to process high-dimensional state sequences through a recurrent neural network structure (encoder). The state of the time step before the start of the scheduling cycle is used as the initial value, and the input state sequence S t, recursively and encodes through the recurrent neural network structure unit to form a feature vector; then another recurrent neural network structure (decoder) decodes the low-dimensional feature vector, decodes it according to the time step, and gradually outputs the action sequence A that should be executed in the corresponding state t .
[0048] The update logic of the online and target network modules in the action decider and value fitter is as follows Figure 3 The online network module in the action decider receives the state parameter S t , get action instruction A t , transmitted to the online network module in the value fitter to obtain the value Q t According to Q t , (S t , R t , S t+1 ), the optimizer of the value fitter updates the parameters of its online network module; according to Q t , (S t , A t , S t+1 , R t ) and the gradient information of the online network module in the value fitter, the action decider updates the parameters of its online network module; after the online network modules of the action decider and the value fitter are updated, the parameters of the online network modules of the two parts and the target network module are weighted and fused respectively, and finally assigned to the target network modules of the action decider and the value fitter respectively, completing a learning at this time step.
[0049] In summary, this section combines the scheduling problem of the natural gas pipeline system, defines the network structure and innovatively uses sequence-sequence to construct a deep neural network to fit the value function and strategy function, establishes a cyclic iterative scheduling optimization algorithm that can interact with the monitoring system, learn strategies online through trial and error-correction, and form scheduling guidance suggestions, and integrates the online scheduling system and its device. The overall algorithm framework is as follows: Figure 2 .
[0050] By deploying the algorithm on the monitoring platform, the boundary parameters of the pipeline network system and the status monitoring parameters are synchronized in real time, which can realize the lifelong online learning of the cyclic iterative scheduling optimization agent and continuously provide suggestions for the optimal scheduling. Based on the target data training agent, the scheduling instructions are formed for some compressor stations, and the actual historical scheduling is compared. Figure 4 , the scheduling time is 8h. Figure 5 , 6 7 and 8 are the comparison diagrams of compressor unit energy consumption, energy consumption-output ratio and pipeline storage rate of the original scheduling scheme and the cyclic iterative optimization scheduling scheme on the experimental pipeline.
[0051] like Figure 2As shown, this embodiment relates to a natural gas pipeline network online scheduling method and device with a cyclic iterative optimization mechanism, and the specific implementation steps include:
[0052] Step 1: Obtain the network status parameters from the real-time database with a fixed time step of 1 minute through the cyclic reader, and save them to the original monitoring data table in the local relational database through the data conversion interface; establish the unit management and user management data tables according to the unit configuration and user management configuration;
[0053] Step 2: Initialize the online and target network modules in the action decider and the value fitter in the computing service module, and synchronize the target network module in the action decider to the online decision network;
[0054] Step 3: The computing service module initiates a computing task every 10 minutes. The computing task includes the following steps 4, 5, 6, 7, and 8.
[0055] Step 4: Generate action instructions: Obtain the pressure, temperature and flow data sequence of the current pipe network node from the original monitoring data table. The length is 10 minutes, and one data point is recorded every minute as the state parameter S t , input the online decision network to generate action instruction A t , after being added with white noise by the noise generator, it is transmitted to the online dispatching instruction receiver in the industrial control system, and the action of the compressor unit is controlled by the on-site dispatching controller;
[0056] Step 5. Calculate the reward: After waiting for 10 minutes, read the state parameter sequence of 10 minutes in length again as the state parameter S t+1 , through the sample (S t , A t , S t+1 ) Calculate the reward R t , forming a sample data (S t , A t , S t+1 , R t ), stored in the historical sample storage unit;
[0057] Step 6: If the number of samples in the historical sample storage unit is less than the number of batch samples N (set to 30 here), repeat steps 4 and 5 until the number of samples is greater than N, and then execute step 7;
[0058] Step 7: Randomly take N samples from the historical sample storage unit, update the online network modules in the action decider and the value fitter, and update the logic as follows: Figure 2 ,After the update is completed, the online decision network and the target network module of the action decider are synchronized;
[0059] Step 8: Sample (St , A t , R t ) is uploaded to the calculation data table in the data service module. At this point, the scheduling optimization under the t time step is completed, and the process returns to step 4 to perform the scheduling optimization for the next time step;
[0060] The front-end interface is deployed on the data server, which displays the algorithm hyperparameters with optimization agents and implements the adjustment function. The update cycle is 30 seconds. Through the front-end visualization unit, the operation suggestion is finally visualized on the visualization window. The operation suggestion is the comparison between the outbound pressure and the current outbound pressure, and the calculated recommended pressure ratio operation curve is output.
[0061] After actual testing, it is run on a dual server consisting of two high-performance servers. The detailed configuration is as follows: CPU: 2 Intel Xeon Gold 5120 (2.2GHz / 14 cores / 19.25MB / 105W) processors (with heat sink), memory: 2x32GB DDR4 RDIMM memory for a total of 64GB; hard disk and RAID: 3 600GB 10K RPM SAS hard disks, configured with 1 SR450C-M 2G (Avago3508) SAS / SATA RAID card), supporting RAID 0, 1, 5, 6, 10 and power-off protection; power supply: 2 550W platinum AC power modules; network card: SM211 onboard network card-2xGE electrical port (I350)-RJ45, Ethernet card-10Gb optical port (Intel82599)-dual port-SFP+ (including 2 multi-mode optical modules)-PCIe 2.0 x8; HBA card: 2 Emulex-FC HBA card-16Gb (LPe16000B)-single port-SFP+ (including 1 multi-mode optical module)-PCIe 3.0 x8. After implementing the above method, in terms of energy consumption, the scheduling schemes based on the cyclic iterative optimization of the present invention and the traditional optimization algorithm both make the total energy consumption of the compressor show a downward trend. The original scheduling scheme consumes an average of 581,000 standard cubic meters / day within 12 hours, the cyclic iterative optimization scheduling scheme consumes 572,000 standard cubic meters / day, and the traditional optimization algorithm consumes 575,000 standard cubic meters / day. The iterative optimization scheme saves an average of 1.54%, while the traditional optimization scheme saves an average of 1.03%, and the energy saving ratio increases by 0.51 percentage points; in terms of pipeline storage, the iterative optimization algorithm can better track the pipeline storage curve and achieve the goal of pipeline storage growth compared with the traditional scheduling optimization algorithm, while the traditional optimization algorithm is more unstable, which may cause unstable pipeline status and large fluctuations in pipeline storage; finally, comparing the gas consumption / transmission index, in this example, the gas consumption / transmission index of the original scheduling scheme is 0.01702, and the gas consumption / transmission index of the scheme optimized by the traditional interior point method optimization solution algorithm is 0.01679, a decrease of 1.36%, and the gas consumption / transmission index of the iterative optimization scheduling scheme is 0.01671, a decrease of 1.82%, which is 0.46 percentage points lower than the traditional method.
[0062] Compared with the prior art, under the same production task, while maintaining the pipeline storage level, compared with the traditional interior point optimization algorithm, the energy consumption of the pipeline network compressor unit of the method of the present invention is significantly reduced, and the energy utilization rate is significantly improved.
[0063] 1) Compared with the traditional optimization-based operation optimization algorithm, the compressor online scheduling algorithm based on cyclic iterative optimization developed in the present invention has higher stability, is more capable of approaching the global optimal solution, and has stronger ability to solve complex and dynamic nonlinear systems.
[0064] 2) The high-performance iterative optimization computing framework constructed by the present invention has more efficient storage and computing efficiency, rationally utilizes memory and computing resources, and can complete multiple online strategy solutions within the entire pipeline network within the scheduling cycle, meeting the timeliness requirements of actual production.
[0065] 3) The iterative optimization algorithm and the supporting hardware and software environment constructed by the present invention can realize real-time and rapid communication with the real monitoring system. Based on the real pipeline network, the scheduling strategy solved is more credible than the optimization algorithm based on the simulation model.
[0066] 4) The cyclic iterative optimization intelligent body constructed by the present invention embeds a sequence-sequence neural network and adopts an encoding-decoding structure, which can process the information of the dynamic system and extract features. Compared with the general multi-layer perceptron and recurrent neural network, it can better handle the pipe network system with large inertia and large delay, and the assessment of state value is more accurate.
[0067] 5) The cyclic iterative optimization compressor online scheduling algorithm constructed by the present invention was used for computational experiments on real pipeline cases. Compared with the historical scheduling method, the total energy consumption of all compressors was saved by 1.54%, and the energy consumption-output ratio index was reduced by 1.82% while maintaining pipeline inventory balance and pipeline stability.
[0068] The above-mentioned specific implementation can be partially adjusted in different ways by those skilled in the art without departing from the principle and purpose of the present invention. The protection scope of the present invention shall be based on the claims and shall not be limited by the above-mentioned specific implementation. Each implementation scheme within its scope shall be subject to the constraints of the present invention.
Claims
1. A cyclic iterative optimization online scheduling device for a natural gas pipeline network, characterized in that: include: Front-end visualization unit, data service unit and calculation service unit, wherein: the front-end visualization unit requests data based on the relational database information of the local server and the relevant configuration files to obtain visualization results; the data service unit connects to the real-time industrial database of the pipe network according to the measurement point configuration information, obtains the original data required for calculation and stores it in the local relational database; the calculation service unit obtains the final compressor operation suggestion based on the obtained pipe network system boundary data information and the background loop iterative optimization script calculation; The raw data refers to the measured parameters of the whole pipe network operation, including: the inlet and outlet temperature, pressure and compressor speed of the pipeline and compressor, which are accessed through the raw data interface to the pipe network monitoring system and stored in the local relational database; the calculated data refers to the compressor unit scheduling scheme obtained by the cyclic iterative optimization agent through the raw data, which is also stored in the local database; The computing service unit includes: an online decision network, a noise generator, an intelligent agent reward calculation module, a historical scheduling sample storage unit, an action decider and a value fitter, wherein: the online decision network is synchronized with the online network module in the action decider, receives state parameters, outputs decision instruction actions, and forms final decision instructions after being applied with white noise by the noise generator, which are transmitted to the online scheduling instruction receiver; the cyclic iterative optimization intelligent agent reward module is calculated based on the state parameters and decision instructions, and the state parameters of the next time step are obtained from the original monitoring data table in the data service module, and transmitted to the action decider for online and target network module training and updating; the historical scheduling sample storage unit is used to store a small amount of action-state samples; the action decider obtains samples from the historical scheduling sample storage unit, and updates the online network through the optimizer; the value fitter obtains samples from the historical scheduling sample storage unit, and updates the online network through the optimizer; The computing server requests the input data required by the iterative optimization agent, namely the real-time monitoring parameters of the entire pipeline network in the current period and the specified production targets, and outputs the compressor operation recommendations for the next scheduling period through the iterative optimization agent model, which are written into the relational database of the data server; the front-end visualization unit displays the production target load settings, agent hyperparameters and operation optimization recommendations.
2. The cyclic iteratively optimized natural gas pipeline network online scheduling device according to claim 1 is characterized in that: The data service unit includes: a circulation reader, a data conversion interface and a local relational database, wherein: the circulation reader is synchronized with the real-time database and is transmitted to the local relational database through the data conversion interface; the local relational database includes a user management data table for the front-end to set the user's authority; an original monitoring data table to save and record the status parameters; a calculation data table to receive sample data from the calculation service module; and a unit management data table for recording the relevant parameter settings of the compressor and pipeline of the pipeline network object.
3. A method for online scheduling of a natural gas pipeline network based on the online scheduling device of the natural gas pipeline network based on the iterative optimization according to claim 1 or 2, characterized in that: First, the real-time status parameters of the current natural gas pipeline and compressor unit are collected, and the decision-making mechanism of the internal loop iterative optimization intelligent agent is improved by using the received pipeline system feedback to return the most economical compressor action within the safe operating conditions under the current pipeline network status and production targets.
4. The method for online scheduling of natural gas pipeline network according to claim 3 is characterized in that: include: Step 1: Obtain the network status parameters from the real-time database with a fixed time step of 1 minute through the cyclic reader, and save them to the original monitoring data table in the local relational database through the data conversion interface; establish the unit management and user management data tables according to the unit configuration and user management configuration; Step 2: Initialize the online and target network modules in the action decider and the value fitter in the computing service module, and synchronize the target network module in the action decider to the online decision network; Step 3: The computing service module initiates computing tasks every 10 minutes, including: Step 3.1, generate action instructions: obtain the pressure, temperature and flow data sequence of the current pipeline node from the original monitoring data table, with a length of 10 minutes, and record one data point every minute as the state parameter St, input it into the online decision network to generate the action instruction At, and after the noise generator applies white noise, it is transmitted to the online scheduling instruction receiver in the industrial control system, and the action of the compressor unit is controlled by the field scheduling controller; Step 3.2, calculate the reward: After waiting for 10 minutes, read the state parameter sequence of 10 minutes in length again as the state parameter St+1, calculate the reward Rt through the sample (St, At, St+1), form a sample data (St, At, St+1, Rt), and store it in the historical sample storage unit; Step 3.3: If the number of samples in the historical sample storage unit is less than the number of batch samples N, which is 30, repeat steps 4 and 5 until the number of samples is greater than N, and then execute step 3.
4. Step 3.4, randomly take out N samples from the historical sample storage unit, update the online network modules in the action decider and the value fitter, and after the update is completed, synchronize the online decision network with the target network module of the action decider; Step 3.5, upload the sample (St, At, Rt) to the calculation data table in the data service module. At this point, the scheduling optimization under the t time step is completed, return to step 3.1, and perform the scheduling optimization of the next time step.
5. The method for online scheduling of natural gas pipeline network by cyclic iterative optimization according to claim 4 is characterized in that: The industrial control system includes an online dispatch instruction receiver, a field dispatch controller and a real-time database, wherein: the online dispatch instruction receiver receives the dispatch instruction of the computing service module, that is, the compressor pressure ratio action instruction; the field dispatch controller receives the signal of the dispatch instruction receiver, sets the pressure ratio signal and controls the compressor unit to adjust the unit operation state according to the pressure ratio action; the real-time database realizes the synchronization, recording and storage of the unit monitoring parameters and pipeline state parameters of the field station control system, and subsequently records the monitoring parameters of the unit and pipeline at time t as S t .
6. The method for online scheduling of natural gas pipeline network by cyclic iterative optimization according to claim 5 is characterized in that: The data service module includes a cyclic reader, a data conversion interface and a local relational database. The cyclic reader keeps in sync with the real-time database and updates a status data every 10 minutes, that is, S t , transmitted to the local relational database through the data conversion interface. The local relational database includes a user management data table for front-end user authority settings; an original monitoring data table for saving and recording state parameters; The calculation data table receives sample data from the calculation service module; The unit management data table is used to record the relevant parameter settings of the compressor and pipeline of the pipeline network object; The computing service module includes an online decision network, a noise generator, a reward calculation module, a historical scheduling sample storage unit, an action decision maker and a value fitter, wherein: the online decision network is synchronized with the online network module in the action decision maker, once every 5 minutes, and receives the state parameter S t The output decision instruction action is added with white noise by the noise generator to form the final decision instruction A t Transmitted to the online scheduling instruction receiver; the reward calculation module is based on the state parameter St and the decision instruction A t Calculated, denoted as R t , and obtain the next time step, that is, the state parameter S after 10 minutes, from the original monitoring data table in the data service module t+1 , transmitted to the action decision maker for online and target network module training and updating; the historical scheduling sample storage unit is used to store a small amount of action-state samples (S t , A t , R t , S t+1 ); The action decision maker obtains N state samples of sample pairs from the historical scheduling sample storage unit (S t , R t , S t+1 ), the online network is updated through the optimizer, and the update strategy is soft update, that is, the update result of the network parameters is the weighted sum of the target network parameters and the trained online network parameters; the value fitter obtains N state-action samples (S) of the sample pairs from the historical scheduling sample storage unit t , A t , R t , S t+1 ), the online network is updated through the optimizer, and the update strategy is soft update, that is, the update result of the network parameters is the weighted sum of the target network parameters and the trained online network parameters. The update logic is the same as the online network in the action decider, and there is interaction between the action decider and the value fitter.
7. The method for online scheduling of natural gas pipeline network by cyclic iterative optimization according to claim 6 is characterized in that: The scheduling optimization specifically includes: Step ①, raw data reading: obtain the network status parameters from the real-time database with a fixed time step of 1 minute through the loop reader, and save them to the original monitoring data table in the local relational database through the data conversion interface; establish the unit management and user management data tables according to the unit configuration and user management configuration; Step ②, generate action instructions: obtain the current pressure, temperature and flow data sequence of the pipeline network node from the original monitoring data table, the length is 10 minutes, and one data point is recorded every minute as the state parameter S t , input the online decision network to generate action instruction A t , after being added with white noise by the noise generator, it is transmitted to the online dispatching instruction receiver, and the action of the compressor unit is controlled by the on-site dispatching controller; Step 3: Calculate the reward: Read the state parameter sequence of the first 10 minutes as the state parameter S t+1 , through the sample (S t , A t , S t+1 ) Calculate the reward R t , forming sample data (S t , A t , S t+1 , R t ), stored in the historical sample storage unit; Step ④, randomly take out N samples from the historical sample storage unit, update the online network modules in the action decider and the value fitter, and after the update is completed, synchronize the online decision network with the online network module of the action decider; Step ⑤: Sample (S t , A t , R t ) is uploaded to the calculation data table in the data service module. At this time, the single-step scheduling optimization is completed, and the next step of scheduling will start again from step ②, and so on.
Citation Information
Patent Citations
Network resource scheduling method and system based on deep reinforcement learning
CN113254197A
Multi-energy system optimal cooperative operation method based on intelligent agent
CN113591375A