Method and device for optimizing operation of refined oil pipeline network-electricity integrated energy coupling system
By dividing the finished oil pipeline network-power integrated energy coupling system into multiple distributed entities and using optimization models and pressure correlation factors for distributed solutions, the operation optimization problem of the finished oil pipeline network-power integrated energy coupling system in the existing technology is solved, and efficient energy management and information security guarantee is achieved.
Patent Information
- Application Number
- CN202310793376.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2043-06-29
AI Technical Summary
The prior art is difficult to effectively optimize the operation of the refined oil pipeline network-power integrated energy coupling system, resulting in low energy efficiency, and centralized control methods have high requirements for communication network performance, resulting in high construction costs.
By dividing the refined oil pipeline network-power integrated energy coupling system into multiple distributed entities, each entity corresponds to an optimization model, using pressure as the correlation factor, using segmented linear prediction function and spatial gradient method and other methods, the optimization model is distributedly solved to obtain the operating parameters of the pump station in the time step.
The distributed optimization of the refined oil pipeline network-power integrated energy coupling system has been achieved, reducing the burden of real-time communication, ensuring information security and system operation security, and improving energy efficiency.
Smart Images

Figure CN116822216B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of operation control of a refined oil pipeline network-electricity integrated energy coupling system, and more specifically, relates to an operation optimization method and device for a refined oil pipeline network-electricity integrated energy coupling system. Background Art
[0002] The efficiency of comprehensive energy utilization needs to be improved urgently. In addition to typical multi-energy vectors (such as cooling, heating and electricity), the coupling of oil and power systems has gradually attracted people's attention at the level of wide-area energy transmission. Among them, the refined oil pipeline-electricity integrated energy system is a noteworthy system. It uses electric pumps to drive the flow of refined oil, and this energy consumption accounts for about 88.6% of its huge total energy consumption. Therefore, it is necessary to pay attention to the optimal operation of the coupled system to promote its energy efficiency.
[0003] The refined oil pipeline-electricity integrated energy system is usually thousands of kilometers long, and the pumping stations are widely distributed geographically. It should be noted that in previous work related to the optimization of the operation of the oil-electricity integrated system, the pumping stations were coordinated through centralized optimization methods. That is, a central manual control center is required to achieve optimization decisions. However, centralized operation has high requirements on the performance of the communication network, such as large bandwidth, high information security, and good scalability, which will lead to the construction of costly communication systems in practical applications. Distributed coordination has decentralized communication and computing characteristics, which naturally solves the above requirements for centralized control. In recent years, distributed optimization methods have attracted widespread attention in power system research. There is a literature that uses the alternating direction multiplier method (ADMM) to manage the energy of network microgrids. However, there has been no use of distributed coordination methods to optimize the operation of the refined oil pipeline-electricity integrated energy coupling system. Summary of the invention
[0004] In response to the above defects or improvement needs of the prior art, the present invention provides a method and device for optimizing the operation of a refined oil pipeline network-electric power integrated energy coupling system, which aims to be applicable to a distributed coordination method of a refined oil pipeline network-electric power integrated energy coupling system, and can ensure information security and system operation security.
[0005] To achieve the above-mentioned purpose, according to one aspect of the present invention, a method for optimizing the operation of a product oil pipeline network-electricity integrated energy coupling system is provided, comprising:
[0006] Step S1: Divide the coupling system into a plurality of entities connected in series, each entity comprising a pump station and a pipeline and an operation station from the pump station to the next pump station, and the pipeline between adjacent operation stations is a pipe segment;
[0007] Step S2: Determine the optimized model of each entity in time step t;
[0008] Step S3: solving the optimization model of each entity in turn according to the fluid flow direction to obtain the operating parameters of the pump station in each entity in time step t;
[0009] Among them, the optimization model of any entity ps in time step t includes:
[0010] Objective function:
[0011]
[0012]
[0013] Constraints:
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022] Where, the subscripts ps, k, t, and s are the indices of the entity, the pump in the entity, the time step, and the pipe segment, respectively; the superscripts dep and ter represent the inlet and outlet position indices of the pipe segment, respectively; the superscripts st and en represent the initial and end time indices of the time step t, respectively; K ps is the set of pumps in entity ps, η t,k,ps , are the pump efficiency and actual head of the kth pump in entity ps in time step t, ρ t and are the density and flow rate of the finished oil flowing through the pump station in time step t, g is the acceleration due to gravity, P t,k,ps is the output power, is the duration of time step t, PLPF t,ps is the piecewise linear prediction function, n is the index of the piecewise linear segment in the piecewise linear prediction function, slope t,n,ps Represents the slope of the nth piecewise linear segment, N is the number of segments set for the piecewise linear prediction function, are the pressures under the corresponding indexes, is the upper limit of the inlet pressure of the first pipe section; They are the last pipe segment S in entity ps-1. end The outlet pressure at the corresponding time index, and Respectively represent the pressure loss under the corresponding index, represents the pressure provided by the pump station at time step t, A binary variable indicating whether the k-th pump in entity ps is turned on in time step t, Indicates opening, Indicates closed.
[0023] In one embodiment, in step S2, it also includes determining the pressure loss Substituting the obtained pressure loss into the optimization model and solving the model, the method for determining the pressure loss includes:
[0024] Step S21: obtaining the pressure loss error distribution of each pipe segment s in the entity ps based on historical data;
[0025] Step S22: Randomly sample the pressure loss error from the pressure loss error distribution of the pipe segment s, obtain the predicted pressure loss of the pipe segment s at the start and end times of the time step t based on the scheduling plan within the time step t, and superimpose the predicted loss and the sampled pressure loss error to obtain the pressure loss and
[0026] In one embodiment, step S21 includes:
[0027] The Darcy formula is used to calculate the predicted pressure loss of the pipe section s in the entity ps in a certain historical period. The deviation between the predicted pressure loss and the actual pressure loss in the historical data is calculated to obtain the pressure loss error. The deviation of the pipe section s in multiple periods is statistically analyzed to obtain the pressure loss error distribution.
[0028] In one embodiment, in step S21, when predicting the pressure loss using the Darcy formula, the Darcy friction coefficient in the Darcy formula is adjusted to minimize the mean square error of the pressure loss, and the Darcy friction coefficient determined by the adjustment is stored;
[0029] In step S22, when calculating the predicted pressure loss at the future time step t, the stored Darcy friction coefficient is directly retrieved and predicted using the Darcy formula.
[0030] In one embodiment, in step S2, the optimization model corresponding to each entity is determined, including determining the slope of each piecewise linear segment in the objective function of each optimization model, wherein the slope of each piecewise linear segment of any entity ps-1 in time step t is determined. t,n,ps-1 The methods include:
[0031] Step S23: Set the outlet pressure and And the slope slope obtained from the previous update t,n,ps Substitute the optimization model of the entity ps and solve it, and the outlet pressure and Passed to entity ps+1;
[0032] Step S24: Update the slope using the spatial gradient method t,n,ps-1 ;
[0033] Step S25: After all optimization models have completed the update of the current iteration round, determine whether the iteration round has reached the preset number of times. If not, jump to step S23. If yes, end the update and use the slope of the last update t,n,ps-1 Determine the optimized model of entity ps-1.
[0034] Wherein, step S24 comprises:
[0035] Step S241: Determine the special index n1 of the piecewise linear prediction function by using a discriminant formula, the discriminant formula is:
[0036]
[0037] Step S242: Calculate the sampling gradient slope of the current iteration:
[0038]
[0039] Step S243: Update the slope
[0040]
[0041] In the formula, iter represents the iteration index, are the slopes updated in the current iteration and the previous iteration respectively, and h is the empirical coefficient.
[0042] In one embodiment, the constraints further include:
[0043]
[0044]
[0045]
[0046] In the formula, is a binary variable, with a value of 1 or 0, indicating that the kth pump is turned on or off in time step t. is a binary variable, with a value of 1 or 0, indicating that the kth pump is in variable frequency mode or non-variable frequency mode in time step t, respectively; is the upper limit of the head of the kth pump in time step t, is the square of the actual speed of the kth pump in time step t, R 0,k is the rated speed of the kth pump, M is the set value; R k,min and R k,max are the minimum and maximum speeds of the kth pump respectively.
[0047] In one embodiment, the constraints further include:
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054] In the formula, is the outlet pressure of the previous pipe segment s at the initial and final time of time step t, are the lower and upper limits of the inlet pressure of pipe section s, respectively. are the lower and upper limits of the outlet pressure of pipe section s respectively.
[0055] According to another aspect of the present invention, there is provided a device for optimizing the operation of a product oil pipeline network-electricity integrated energy coupling system, comprising:
[0056] An entity division module is used to divide the coupling system into multiple entities connected in series, each entity includes a pump station and a pipeline and an operation station from the pump station to the next pump station, and the pipeline between adjacent operation stations is a pipe segment;
[0057] The optimization model determination module is used to determine the optimization model of the entity ps, and the objective function of the optimization model is:
[0058]
[0059]
[0060] The constraints of the optimization model include:
[0061]
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069] Where, the subscripts ps, k, t, and s are the indices of the entity, the pump in the entity, the time step, and the pipe segment, respectively; the superscripts dep and ter represent the inlet and outlet position indices of the pipe segment, respectively; the superscripts st and en represent the initial and end time indices of the time step t, respectively; K ps is the set of pumps in entity ps, η t,k,ps , are the pump efficiency and actual head of the kth pump in entity ps in time step t, ρ t and are the density and flow rate of the finished oil flowing through the pump station in time step t, g is the acceleration due to gravity, P t,k,ps is the output power, is the duration of time step t, PLPF t,ps is the piecewise linear prediction function, n is the index of the piecewise linear segment in the piecewise linear prediction function, slope t,n,ps Represents the slope of the nth piecewise linear segment, N is the number of segments set for the piecewise linear prediction function, are the pressures under the corresponding indexes, is the upper limit of the inlet pressure of the first pipe section; They are the last pipe segment S in entity ps-1. end The outlet pressure at the corresponding time index, and Respectively represent the pressure loss under the corresponding index, represents the pressure provided by the pump station at time step t, A binary variable indicating whether the k-th pump in entity ps is turned on in time step t, Indicates opening, Indicates closure;
[0070] The solution module is used to solve the optimization model of each entity in turn according to the fluid flow direction to obtain the operating parameters of the pump station in each entity within the time step t.
[0071] According to another aspect of the present invention, an electronic device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0072] According to another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0073] In general, the above technical solutions conceived by the present invention can achieve the following beneficial effects compared with the prior art:
[0074] The operation optimization method of the finished oil pipeline network-electricity integrated energy coupling system proposed in the present invention divides the entire coupling system into multiple distributed entities, each entity corresponds to an optimization model, and the operation parameters of the pump station in each entity in the time step t are obtained by distributing and solving the optimization model from front to back, thereby realizing the distributed optimization method of the coupling system, ensuring the information security of each entity in the entire coupling system, and potentially reducing the burden of real-time communication. Among them, when constructing the optimization model, the correlation between different entities in the coupling system is considered, and the pressure is used as the correlation factor to correlate the front and back entities. Specifically, a piecewise linear prediction function related to pressure is introduced into the objective function, and the set constraint condition considers the pressure relationship constraint between the entity ps and the previous entity ps-1 and the pressure loss at the entrance and exit of the same pipe section in the same entity. When solving the entity optimization model in sequence, the pressure parameter obtained by the optimization of the previous entity is transferred to the optimization model of the next entity for solution. The optimization models of the front and back entities are correlated with each other, and the actual characteristics of the oil-electricity integrated system are reflected as accurately as possible in the distributed operation, ensuring the coordination of the optimization of different entities.
[0075] Furthermore, in calculating the pressure loss and When the pressure loss error is randomly sampled from the pressure loss error distribution of pipe section s, the pressure loss is calculated based on the predicted value and the predicted error. and Substituting this pressure loss as a known quantity into the optimization model can improve the accuracy of the pressure loss parameters and make them as close to the actual situation as possible.
[0076] Furthermore, the present invention also proposes a method for determining the slope of the piecewise linear segment of the objective function of each optimization model, and combining the spatial gradient method to obtain the optimal slope, thereby achieving the optimal operation of the system. The spatial gradient method iteratively optimizes the model parameters from the most upstream pumping station to the terminal pumping station of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 It is a flowchart of the steps of a method for optimizing the operation of a product oil pipeline network-electricity integrated energy coupling system in one embodiment;
[0078] Figure 2 This is a schematic diagram of distributed entity division of a refined oil pipeline network-electricity integrated energy coupling system in an embodiment;
[0079] FIG3( a ) is a comparison diagram of the pressure loss predicted by Darcy's formula after parameter adjustment and the actual measured value of the pressure loss in one embodiment;
[0080] FIG3( b ) is a pressure loss error distribution frequency histogram and an error probability density curve obtained by fitting based on the histogram in one embodiment;
[0081] Figure 4 It is a schematic diagram of the convergence of the slope of the learning process in one embodiment. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0083] Example 1
[0084] like Figure 1 The figure is a flowchart of a method for optimizing the operation of a product oil pipeline network-electricity integrated energy coupling system in an embodiment, which mainly includes the following steps:
[0085] Step S1: Divide the coupling system into a plurality of entities connected in series, each entity comprising a pumping station and a pipeline and an operation station from the pumping station to the next pumping station, and the pipeline between adjacent operation stations is a pipe segment.
[0086] In order to realize the distributed optimization decision of the coupling system, it is necessary to first divide the coupling system into distributed entities. However, there is no mature method for this at present. The present invention utilizes the actual conditions of the coupling system in the industrial field and its inherent physical laws, that is, only the various stations in the industrial field have computing resources, and the pressure provided by the pump station is the control variable of the system. A pump station and the pipeline and operation station before the first pump station downstream of the pump station are regarded as a decision entity, such as Figure 2 As shown. The operation station is generally an oil product upload station and a download station. Usually, the upload station is at the first physical head end, and the download station can be at any node of the pipeline. The pipeline between adjacent operation stations is used as a pipeline segment. The front and rear pipeline segments are connected in series, so the pressure is transmitted to each other. It should be noted that a pump station may contain multiple controllable pumps.
[0087] It is understandable that before the optimization operation is carried out, it is necessary to collect the technical parameters of each component in each entity and the scheduling plan of each operation station, including:
[0088] 1) Flow-head, flow-efficiency characteristic parameters of each pump in the pumping station, and frequency conversion parameters of variable frequency pumps;
[0089] 2) The upper and lower safety limits of the inlet and outlet pressures of each pipe section;
[0090] 3) Oil product input and download flow plan for each station, including oil type and delivery flow.
[0091] Step S2: Determine the optimized model for each entity in time step t.
[0092] The framework of the optimization model of each entity at each time step is the same and must conform to the characteristics of the physical system. However, due to the different scheduling plans and internal structures of different entities, the parameter settings in the optimization models corresponding to different entities may be different. And because the scheduling plans of the same entity at each time step t may also be different, it is necessary to make optimization decisions for each time t. Therefore, it is necessary to determine the optimization model of each entity within time step t.
[0093] The framework of the optimization model includes the objective function and constraints. Taking ps as the entity index, the optimization model of entity ps in time step t is introduced. In the full text, subscripts ps, k, t, s are the indexes for the entity, the pump in the entity, the time step, and the pipe segment, respectively. The superscripts dep and ter represent the inlet and outlet position indexes of the pipe segment, respectively. The superscripts st and en represent the initial and end time indexes of time step t, respectively.
[0094] The objective function is:
[0095]
[0096] Where:
[0097] K ps is the number of pumps in the entity ps;
[0098] P t,k,ps is the output power of the kth pump in entity ps at time step t;
[0099] is the duration of time step t;
[0100] represents the energy consumption of the kth pump in entity ps in time step t;
[0101] PLPF t,ps To introduce a piecewise linear prediction function for entity ps at time step t:
[0102]
[0103] Where:
[0104] n is the index of the piecewise linear segment in the piecewise linear prediction function, and N is the set number of segments of the piecewise linear prediction function;
[0105] slope t,n,ps is the piecewise linear prediction function PLPF t,ps The slope of the nth piecewise linear segment in , which may have different values in different entities and different time steps;
[0106] is the value of the inlet pressure of the first pipe segment in the entity ps at the initial moment of time step t in the nth piecewise linear segment.
[0107] The constraints include:
[0108]
[0109]
[0110]
[0111]
[0112]
[0113]
[0114]
[0115]
[0116] In formula (2), η t,k,ps , are the pump efficiency and actual head of the kth pump in entity ps in time step t, ρ t and are the density and flow rate of the finished oil flowing through the pumping station in time step t, and g is the acceleration due to gravity.
[0117] In formula (3), is the inlet pressure of the first pipe segment in the entity ps at the initial time step t; Formula (3) restricts the inlet pressure of the first pipe segment in the entity ps at the initial time step t to be equal to the total inlet pressure in all piecewise linear segments.
[0118] In formula (4), Indicates the upper limit of the inlet pressure of the first pipe section in the entity ps.
[0119] In formula (5), s end Indicates the last pipe segment in the entity. Indicates the last pipe segment S in entity ps-1 end The outlet pressure at the initial time step t, represents the pressure provided by the pump station in the entity ps at time step t. Formula (5) constrains the inlet pressure of the first pipe segment of the current entity at the initial moment of time step t to be equal to the sum of the outlet pressure transmitted from the end of the last pipe segment of the previous entity at that moment and the pressure provided by the pump station in the current entity.
[0120] In formula (6), represents the inlet pressure of the first pipe segment in the entity ps at the end of time step t. Formula (6) constrains the inlet pressure of the first pipe segment of the current entity at the end of time step t to be equal to the sum of the outlet pressure transmitted from the end of the last pipe segment of the previous entity at that time and the pressure provided by the pump station in the current entity. Formulas (5) and (6) reflect the forward and backward transmission process of pressure between different entities and establish the correlation between the forward and backward entities.
[0121] In formula (7), represents the outlet pressure of the pipe segment s in the entity ps at the beginning of time step t, represents the inlet pressure of the pipe segment s in the entity ps at the beginning of time step t, Represents the pressure loss of pipe segment s inside entity ps at the beginning of time step t.
[0122] In formula (8), represents the outlet pressure of the pipe segment s in the entity ps at the end of time step t, represents the inlet pressure of the pipe segment s in the entity ps at the end of time step t, It represents the pressure loss of pipe segment s in entity ps at the end of time step t. Equations (7) and (8) take into account the pressure loss caused by friction resistance and other factors when the oil flows through the pipeline, which conforms to the physical properties of pressure change when the oil is transmitted along the pipeline.
[0123] In formula (9), A binary variable indicating whether the k-th pump in entity ps is turned on in time step t, Indicates opening, Indicates closed.
[0124] In the above model, the upper and lower limits, the density and flow rate of the finished oil, the pump efficiency, the number of segments and the slope of the piecewise linear prediction function, the set of pumps and pipe segments in the entity ps, the length of the time step, and the initial pressure of the first pipe segment of the first entity are all known quantities. The final decision to be made through the model is whether each pump in the entity ps is turned on at the time step t. And the lift required when opening
[0125] Due to the different scheduling plans and internal structures of different entities, the parameter settings in the optimization models corresponding to different entities may be different. And because the scheduling plans of the same entity at each time step t may also be different, it is necessary to make optimization decisions for each time t. Therefore, it is necessary to determine the optimization model of each entity in time step t, which is essentially to determine the slope of the piecewise linear prediction function of each entity in time step t. t,n,ps The slope can be directly set based on experience, or a better value can be selected based on a large number of experimental results.
[0126] In one embodiment, considering that the pump may be a variable frequency pump or a non-variable frequency pump, the following constraints are added to make the model applicable to pumps of any model:
[0127]
[0128]
[0129]
[0130] In formula (10), is a binary variable indicating whether the k-th pump in entity ps is a variable frequency pump in time step t, Expressed as variable frequency, Indicates non-variable frequency. represents the upper limit of the head of the k-th pump in the entity ps within the time step t, represents the square value of the actual speed of the kth pump in the entity ps within the time step t, R 0,k,psrepresents the rated speed of the kth pump in entity ps, R k,min and R k,max are the lower speed limit and upper speed limit of the kth pump respectively, M is the set value, which is a large amount to meet the requirements when When , equations (10) to (12) always hold.
[0131] In one embodiment, based on the above, the following constraints may be added:
[0132]
[0133]
[0134]
[0135] The actual constraints of equations (13) to (15) are that when the pump is not turned on, its head is 0 and its speed is 0. When the pump is in non-variable frequency mode, its speed does not need to be decided, which conforms to the operating laws and phenomena of the pump itself. When the pump is turned on, the value of M makes equations (13) to (15) always hold.
[0136] When the speed variable is introduced The speed and head are interrelated and ultimately determine whether the pump is switched on and off and at what speed.
[0137] In one embodiment, the same entity pipe segments also conform to the pressure transmission law, that is, the following constraints can be added:
[0138]
[0139]
[0140] In formula (16), represents the outlet pressure of the previous pipe segment in the entity ps at the initial time step t, Represents the inlet pressure of the pipe segment s in the entity ps at the initial moment of time step t.
[0141] In formula (17), represents the outlet pressure of the previous pipe segment of pipe segment s in entity ps at the end of time step t, Represents the inlet pressure of pipe segment s in entity ps at the end of time step t.
[0142] In one embodiment, considering the safe operation of the system, the following constraints may be added:
[0143]
[0144]
[0145]
[0146]
[0147] In the formula, are the lower and upper limits of the inlet pressure of the pipe section s in the entity ps, respectively. They are the lower and upper limits of the outlet pressure of pipe section s inside entity ps respectively.
[0148] Step S3: Solve the optimization model of each entity in turn according to the fluid flow direction to obtain the operating parameters of the pump station in each entity within the time step t.
[0149] The distributed coordinated operation optimization of the present invention uses pressure as the correlation factor of different entities. Considering the transmissibility of pressure from front to back, when solving the model, it is necessary to solve the optimization model of each entity from the beginning to the end. The pressure at the end of the pipeline obtained by solving the previous entity is transmitted to the beginning of the pipeline of the next entity, and then the pressure of the pump station at the beginning of the pipeline is superimposed, so that the finished oil continues to move forward, as shown in the constraint conditions of formula (5) and formula (6). If ps = 1, there is no pressure transmission of the front entity, and it is generally directly assumed to have an initial pressure value, that is, when ps = 1, the pressure in formula (5) and formula (6) is the set value, when ps>1, the formula (5) and formula (6) These are the state parameters corresponding to the decision made by entity ps-1.
[0150] The present invention divides the entire coupling system into multiple distributed entities through the above steps S1 to S3, each entity corresponds to an optimization model, takes pressure as a correlation factor, and solves the optimization model from front to back based on the physical characteristics of the system to obtain the operating parameters of the pump station in each entity within the time step t, thereby realizing a distributed optimization method for the coupling system, ensuring the information security of each entity in the entire coupling system, and potentially reducing the burden of real-time communication.
[0151] Example 2
[0152] In the above optimization model, the pressure loss is involved When solving the optimization model, the pressure loss needs to be determined in advance.
[0153] In one embodiment, the pressure loss can be directly determined according to the fitted pressure loss formula, which is as follows:
[0154]
[0155]
[0156] In the formula, α t,s,ps , β t,s,psare the slope and intercept of the linear function of pressure loss in pipe section s, respectively, which can be determined by fitting historical data.
[0157] In one embodiment, in order to improve the accuracy of the pressure loss estimation value, the pressure loss is determined by the following method:
[0158] Step S21: Obtain the pressure loss error distribution of each pipe segment s in the entity ps based on historical data.
[0159] The historical data includes the actual pressure loss of each pipe segment s in the entity ps during each historical period.
[0160] Specifically, conventional prediction methods can be used to predict and obtain the predicted pressure loss of pipe section s. For example, the Darcy formula can be used to calculate the predicted pressure loss of pipe section s in entity ps during a certain period of history. Then, the corresponding actual pressure loss is obtained from historical data, and the deviation between the predicted pressure loss and the actual pressure loss is calculated to obtain the pressure loss error. By statistically analyzing the deviations of pipe section s during multiple periods, the pressure loss error distribution is obtained.
[0161] In one embodiment, in order to improve the prediction accuracy of the Darcy formula, the actual pressure loss in the historical data is used as a reference, the Darcy friction coefficient in the Darcy formula is adjusted to minimize the mean square error of the pressure loss, and the Darcy friction coefficient determined by the adjustment is stored. As shown in FIG3(a), the pressure loss predicted by the Darcy formula is made as close as possible to the actual measured value of the pressure loss after the parameter adjustment. As shown in FIG3(b), the pressure loss error distribution frequency histogram obtained by the final calculation and the error probability density curve (PDF) obtained by fitting based on the histogram are shown.
[0162] Step S22: Randomly sample the pressure loss error from the pressure loss error distribution of the pipe segment s, obtain the predicted pressure loss of the pipe segment s at the start and end times of the time step t based on the scheduling plan within the time step t, and superimpose the predicted loss and the sampled pressure loss error to obtain the pressure loss and
[0163] Calculate the pressure loss at a future time step t and When , the same prediction method can be used to obtain the predicted value first, for example, the Darcy formula is also used for prediction, and the Darcy friction coefficient used is the Darcy friction coefficient after parameter adjustment. Then, the pressure loss error is randomly sampled from the pressure loss error distribution of the pipe section s, and the pressure loss is calculated based on the predicted value and the prediction error. and This pressure loss is substituted into the optimization model as a known quantity.
[0164] Pressure loss determined by steps S21 to S22 and The accuracy is higher, the optimization model is more precise, and the distributed coordination optimization performance is stronger.
[0165] Example 3
[0166] In step S2, the optimization model of each entity in time step t is determined, which is essentially to determine the slope of the piecewise linear prediction function of each entity in time step t. t,n.ps . The slope can be set directly based on experience, or a better value can be selected based on a large number of experimental results. Then, the slope is determined through experience or comparison of multiple groups of experimental results. Although the above-mentioned distributed coordination optimization can be achieved, the optimal coordination may not be obtained. Therefore, in this embodiment, for step S2, a fast and effective method is proposed to determine the slope of the piecewise linear prediction function to achieve further optimization of distributed coordination. Specifically, the spatial gradient method is used to update the slope of the piecewise linear prediction function of the previous entity based on the decision result of the latter entity. The following updates the slope of each piecewise linear segment of entity ps-1 within time step t. t,n,ps-1 The method is described as an example, which mainly includes the following steps:
[0167] Step S23: Set the outlet pressure and And the slope slope obtained from the previous update t,n.ps Substitute the optimization model of the entity ps and solve it, and the outlet pressure and Passed to entity ps+1.
[0168] If this is the first iteration, the slope used is t,n,ps is the slope of random initialization. If ps=1, then the outlet pressure and The default is a fixed value.
[0169] Step S24: Update the slope using the spatial gradient method t,n,ps-1 .
[0170] The idea of the spatial gradient method is to update the slope of the previous entity optimization model according to the solution result of the current entity optimization model. Therefore, after the entity ps is solved in step S23, the slope slope in the entity ps-1 is updated based on its solution result. t,n,ps-1 .
[0171] The specific update process is as follows:
[0172] Step S241: Determine the special index n1 of the piecewise linear prediction function by using a discriminant formula, the discriminant formula is:
[0173]
[0174] Step S242: Calculate the sampling gradient slope of the current iteration:
[0175]
[0176] Step S243: Update the slope
[0177]
[0178] In the formula, iter represents the iteration index, are the slopes updated in the current iteration and the previous iteration respectively, and h is the empirical coefficient.
[0179] Step S25: After all optimization models have completed the update of the current iteration round, determine whether the iteration round has reached the preset number of times. If not, jump to step S23. If yes, end the update and use the slope of the last update t,n,ps-1 Determine the optimized model of entity ps-1.
[0180] Example 4
[0181] The present invention also relates to an operation optimization device for a product oil pipeline network-electricity integrated energy coupling system, which comprises:
[0182] An entity division module is used to divide the coupling system into multiple entities connected in series, each entity includes a pump station and a pipeline and an operation station from the pump station to the next pump station, and the pipeline between adjacent operation stations is a pipe segment;
[0183] The optimization model determination module is used to determine the optimization model of the entity ps. The objective function of the optimization model is:
[0184]
[0185]
[0186] The constraints of the optimization model include:
[0187]
[0188]
[0189]
[0190]
[0191]
[0192]
[0193]
[0194]
[0195] Where, the subscripts ps, k, t, and s are the indices of the entity, the pump in the entity, the time step, and the pipe segment, respectively; the superscripts dep and ter represent the inlet and outlet position indices of the pipe segment, respectively; the superscripts st and en represent the initial and end time indices of the time step t, respectively; K ps is the set of pumps in entity ps, η t,k,ps , are the pump efficiency and actual head of the kth pump in entity ps in time step t, ρ t and are the density and flow rate of the finished oil flowing through the pump station in time step t, g is the acceleration due to gravity, P t,k,ps is the output power, is the duration of time step t, PLPF t,ps is the piecewise linear prediction function, n is the index of the piecewise linear segment in the piecewise linear prediction function, slope t,n,ps Represents the slope of the nth piecewise linear segment, N is the number of segments set for the piecewise linear prediction function, are the pressures under the corresponding indexes, is the upper limit of the inlet pressure of the first pipe section; They are the last pipe segment S in entity ps-1. end The outlet pressure at the corresponding time index, and Respectively represent the pressure loss under the corresponding index, represents the pressure provided by the pump station at time step t, A binary variable indicating whether the k-th pump in entity ps is turned on in time step t, Indicates opening, Indicates closure;
[0196] The solution module is used to solve the optimization model of each entity in turn according to the fluid flow direction to obtain the operating parameters of the pump station in each entity within the time step t.
[0197] In summary, in the real-time operation phase, starting from the most upstream pumping station, solve the previously obtained optimization model. In a certain time step t, first obtain the real-time pressure loss of the pipe section from the production site (such as the SCADA system), and then transmit the terminal pressure of the distributed entity to the adjacent downstream pumping station. This process will continue until the last pumping station completes the model solution. Finally, the dispatcher in each pumping station can operate the pump according to the plan. Until the operation of time step t is completed, wait for the arrival of the next time step and repeat the above steps.
[0198] Example 5
[0199] The present invention also relates to an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0200] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The memory may be used to store computer programs and / or modules, and the processor may perform various functions of the electronic device by running or executing computer programs and / or modules stored in the memory, and calling data stored in the memory.
[0201] Example 6
[0202] The present invention also relates to a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps of the above method when executed by a processor.
[0203] Specifically, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, an internal memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0204] Example 7
[0205] Consider an actual industrial refined oil pipeline network-electricity integrated energy system in southern China. The rated speed of each variable speed pump is set to 2980r / min. The total time span of the study is 27.82 hours. For the spatial gradient method, the total number of segments of the piecewise linear prediction function is 100, the step size of the updated slope is 0.3, and the initial values of the 1st to Nth segments decrease uniformly from 10000 to 0. The method introduced above is used to realize real-time distributed pump station coordination, wherein the slope is determined by the iterative update method proposed in Example 3.
[0206] like Figure 4 The figure shows the convergence of the slope in the learning process. It can be seen that the slope gradually converges from the initial value to the optimal value through iteration.
[0207] As shown in Table 1 below, the comparison results of real-time distributed pump station coordination and centralized coordination obtained by simulation using the method of the present invention are shown. It can be seen that the energy consumption of the distributed pump station coordination and centralized coordination methods proposed by the method of the present invention is basically the same, which proves the effectiveness of the method of the present invention. At the same time, distributed coordination can also ensure the information security of each entity in the entire coupling system, and potentially reduce the burden of real-time communication.
[0208] Table 1 Comparison results of real-time distributed pump station coordination and centralized coordination
[0209]
[0210] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for optimizing the operation of a refined oil pipeline network-electricity integrated energy coupling system, characterized in that: include: Step S1: Divide the coupling system into a plurality of entities connected in series, each entity comprising a pump station and a pipeline and an operation station from the pump station to the next pump station, and the pipeline between adjacent operation stations is a pipe segment; Step S2: Determine the optimization model of each entity in time step t; Step S3: solving the optimization model of each entity in turn according to the fluid flow direction to obtain the operating parameters of the pump station in each entity within the time step t; Among them, the optimization model of any entity ps in time step t includes: Objective function: Constraints: Where, the subscripts ps, k, t, and s are the indices of the entity, the pump in the entity, the time step, and the pipe segment, respectively; the superscripts dep and ter represent the inlet and outlet position indices of the pipe segment, respectively; the superscripts st and en represent the initial and end time indices of the time step t, respectively; K ps is the set of pumps in entity ps, η t,k,ps , are the pump efficiency and actual head of the kth pump in entity ps in time step t, ρ t and are the density and flow rate of the finished oil flowing through the pump station in time step t, g is the acceleration due to gravity, P t,k,ps is the output power, is the duration of time step t, PLPF t,ps is the piecewise linear prediction function, n is the index of the piecewise linear segment in the piecewise linear prediction function, slope t,n,ps Represents the slope of the nth piecewise linear segment, N is the number of segments set for the piecewise linear prediction function, are the pressures under the corresponding indexes, is the upper limit of the inlet pressure of the first pipe section; They are the last pipe segment S in entity ps-1. end The outlet pressure at the corresponding time index, and Respectively represent the pressure loss under the corresponding index, represents the pressure provided by the pump station at time step t, A binary variable indicating whether the k-th pump in entity ps is turned on in time step t, Indicates opening, Indicates closed.
2. The method for optimizing the operation of the refined oil pipeline network-electricity integrated energy coupling system according to claim 1, characterized in that: In step S2, it also includes determining the pressure loss Substituting the obtained pressure loss into the optimization model and solving the model, the method for determining the pressure loss includes: Step S21: obtaining the pressure loss error distribution of each pipe segment s in the entity ps based on historical data; Step S22: Randomly sample the pressure loss error from the pressure loss error distribution of the pipe segment s, obtain the predicted pressure loss of the pipe segment s at the start and end times of the time step t based on the scheduling plan within the time step t, and superimpose the predicted loss and the sampled pressure loss error to obtain the pressure loss and 3. The method for optimizing the operation of the product oil pipeline network-electricity integrated energy coupling system according to claim 2, characterized in that: Step S21 includes: The Darcy formula is used to calculate the predicted pressure loss of the pipe section s in the entity ps in a certain historical period. The deviation between the predicted pressure loss and the actual pressure loss in the historical data is calculated to obtain the pressure loss error. The deviation of the pipe section s in multiple periods is statistically analyzed to obtain the pressure loss error distribution.
4. The method for optimizing the operation of the product oil pipeline network-electricity integrated energy coupling system according to claim 3, characterized in that: In step S21, when the pressure loss is predicted using the Darcy formula, the Darcy friction coefficient in the Darcy formula is adjusted to minimize the mean square error of the pressure loss, and the Darcy friction coefficient determined by the adjustment is stored; In step S22, when calculating the predicted pressure loss at the future time step t, the stored Darcy friction coefficient is directly retrieved and predicted using the Darcy formula.
5. The method for optimizing the operation of the product oil pipeline network-electricity integrated energy coupling system according to claim 1, characterized in that: In step S2, the optimization model corresponding to each entity is determined, including determining the slope of each piecewise linear segment in the objective function of each optimization model, wherein the slope of each piecewise linear segment of any entity ps-1 in time step t is determined. t,n,ps-1 The methods include: Step S23: Set the outlet pressure and And the slope slope obtained from the previous update t,n,ps Substitute the optimization model of the entity ps and solve it, and the outlet pressure and Passed to entity ps+1; Step S24: Update the slope using the spatial gradient method t,n,ps-1 ; Step S25: After all optimization models have completed the update of the current iteration round, determine whether the iteration round has reached the preset number of times. If not, jump to step S23. If yes, end the update and use the slope of the last update t,n,ps-1 Determine the optimized model of entity ps-1; Wherein, step S24 comprises: Step S241: Determine the special index n1 of the piecewise linear prediction function by using a discriminant formula, the discriminant formula is: Step S242: Calculate the sampling gradient slope of the current iteration: Step S243: Update the slope In the formula, iter represents the iteration index, are the slopes updated in the current iteration and the previous iteration respectively, and h is the empirical coefficient.
6. The method for optimizing the operation of the product oil pipeline network-electricity integrated energy coupling system according to claim 1, characterized in that: The constraints also include: In the formula, is a binary variable, with a value of 1 or 0, indicating that the kth pump is turned on or off in time step t. is a binary variable, with a value of 1 or 0, indicating that the kth pump is in variable frequency mode or non-variable frequency mode in time step t, respectively; is the upper limit of the head of the kth pump in time step t, is the square of the actual speed of the kth pump in time step t, R 0,k,ps is the rated speed of the kth pump, M is the set value; R k,min and R k,max are the minimum and maximum speeds of the kth pump respectively.
7. The method for optimizing the operation of the product oil pipeline network-electricity integrated energy coupling system according to claim 1, characterized in that: The constraints also include: In the formula, is the outlet pressure of the previous pipe segment s at the initial and final time of time step t, are the lower and upper limits of the inlet pressure of pipe section s, respectively. are the lower and upper limits of the outlet pressure of pipe section s respectively.
8. A device for optimizing the operation of a product oil pipeline network-electricity integrated energy coupling system, characterized in that: include: An entity division module is used to divide the coupling system into multiple entities connected in series, each entity includes a pump station and a pipeline and an operation station from the pump station to the next pump station, and the pipeline between adjacent operation stations is a pipe segment; The optimization model determination module is used to determine the optimization model of the entity ps, and the objective function of the optimization model is: The constraints of the optimization model include: Where, the subscripts ps, k, t, and s are the indices of the entity, the pump in the entity, the time step, and the pipe segment, respectively; the superscripts dep and ter represent the inlet and outlet position indices of the pipe segment, respectively; the superscripts st and en represent the initial and end time indices of the time step t, respectively; K ps is the set of pumps in entity ps, η t,k,ps , are the pump efficiency and actual head of the kth pump in entity ps in time step t, ρ t and are the density and flow rate of the finished oil flowing through the pump station in time step t, g is the acceleration due to gravity, P t,k,ps is the output power, is the duration of time step t, PLPF t,ps is the piecewise linear prediction function, n is the index of the piecewise linear segment in the piecewise linear prediction function, slope t,n,ps Represents the slope of the nth piecewise linear segment, N is the number of segments set for the piecewise linear prediction function, are the pressures under the corresponding indexes, is the upper limit of the inlet pressure of the first pipe section; They are the last pipe segment S in entity ps-1. end The outlet pressure at the corresponding time index, and Respectively represent the pressure loss under the corresponding index, represents the pressure provided by the pump station at time step t, A binary variable indicating whether the k-th pump in entity ps is turned on in time step t, Indicates opening, Indicates closure; The solution module is used to solve the optimization model of each entity in turn according to the fluid flow direction to obtain the operating parameters of the pump station in each entity within the time step t.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.