Edge-computing-based energy consumption optimization control method, device and system for pumping unit well
By combining edge computing and the DDPG model, the energy consumption of pumping wells is optimized in real time, solving the problem that traditional systems cannot process complex data in real time, and achieving energy consumption optimization and efficiency improvement.
Patent Information
- Application Number
- CN202311540797.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-17
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2043-11-17
AI Technical Summary
Traditional oil pumping well control systems cannot process complex data in real time, making it difficult to optimize energy consumption, and the instability of the basic communication network affects real-time data acquisition and transmission.
An edge computing-based energy consumption optimization control method for pumping wells is adopted. By using the DDPG model and reinforcement learning technology, the system environment status is obtained in real time, the control strategy is updated, and energy consumption is optimized.
It optimizes the energy consumption of oil pumping wells, reduces energy consumption, improves efficiency, reduces the need for manual intervention, and does not require modification of existing equipment.
Smart Images

Figure CN120020327B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to an edge computing-based energy consumption optimization control method, device and system for a pumping unit well. BACKGROUND
[0002] A pumping unit well is an important device in oil exploitation. Most production sites of the pumping unit well are located in remote areas or environments with few people. In such an environment, the basic communication network is not as stable as in urban areas, so that the on-site data cannot be collected and transmitted in real time and the feedback cannot be returned in real time. If the data analysis and control program is directly and entirely concentrated on a cloud platform, the real-time requirement cannot be met. In addition, the energy consumption problem of the pumping unit well has been concerned. The traditional pumping unit well control system cannot process complex data in real time and make optimal decisions, so the optimization of energy consumption cannot be realized in real time. SUMMARY
[0003] In order to better realize the optimization control of the energy consumption of the pumping unit well, the application embodiment provides an edge computing-based energy consumption optimization control method, device and system for the pumping unit well.
[0004] In a first aspect, the application embodiment provides an edge computing-based energy consumption optimization control method for a pumping unit well, applied to a cloud-edge collaborative layer. The method comprises the following steps.
[0005] Real-time acquisition of a system environment state of a pumping unit well system;
[0006] Through a DDPG-based energy consumption optimization control model for the pumping unit well, a current control strategy is obtained based on a random strategy according to the current system environment state, and the current control strategy is sent to the pumping unit well system;
[0007] After the pumping unit well system executes the current control strategy, a next-time system environment state and an immediate reward are obtained;
[0008] The current system environment state, the current control strategy, the immediate reward and the next-time system environment state are integrated into a state transition data;
[0009] The above process of obtaining the state transition data is repeated until a set number of state transition data are obtained;
[0010] A plurality of state transition data are randomly extracted from the set number of state transition data, and parameters of the energy consumption optimization control model for the pumping unit well are updated;
[0011] The above process of obtaining the state transition data and updating the parameters is repeated until a preset optimization condition is met, and an optimal energy consumption optimization control strategy for the pumping unit well is obtained.
[0012] In one optional embodiment of this application, the pumping unit well energy consumption optimization control model includes an actor network and a critic network; the step of randomly extracting multiple state transition data from the predetermined number of state transition data and updating the parameters of the pumping unit well energy consumption optimization control model includes:
[0013] Multiple state transition data are randomly extracted from the set number of state transition data. Based on the system environment state at the next moment in each state transition data, the corresponding control strategy for the next moment is obtained through the actor network.
[0014] The corresponding pumping unit well production rate for the current cycle and the pumping unit well production rate for the next cycle are obtained through the critic network based on the current system environment state and the current control strategy, the system environment state and the control strategy for the next time step.
[0015] TD deviation is calculated based on the current cycle pumping well production and the next cycle pumping well production.
[0016] Update the weight parameters of the critic network based on the TD bias;
[0017] The weight parameters of the actor network are updated based on the current cycle pumping unit well production.
[0018] In an optional embodiment of this application, updating the weight parameters of the critic network based on the TD bias includes:
[0019] Based on the TD bias, the weight parameters of the critic network are updated using the following formula 1:
[0020] ω t+1 =ω t +α ω [r t +γQ(s t+1 a t+1 )-Q(s t a t )] Formula 1;
[0021] In the formula, ω t+1 ω represents the weight parameters of the critic network at time t+1. t Let α be the weight parameters of the critic network at time t; ω r is the learning rate of the critic network. t +γQ(s t+1 a t+1 )-Q(s t a t ) represents the TD deviation.
[0022] In an optional implementation of the embodiment of the application, the updating of the weight parameter of the actor network according to the current cycle pumping well liquid production rate comprises:
[0023] The weight parameter of the actor network is updated according to the current cycle pumping well liquid production rate through formula 2 as follows:
[0024]
[0025] In the formula, θ t+1 is the weight parameter of the actor network at the t+1 moment; θ t is the weight parameter of the actor network at the t moment; α θ is the learning rate of the actor network; is the deterministic policy gradient.
[0026] In an optional implementation of the embodiment of the application, the immediate reward is obtained through formula 3 as follows:
[0027]
[0028] In the formula, R is the immediate reward; -Energy(s t , a t ) is the energy consumption of the pumping system in the t time period; Q is the liquid production rate of the pumping well in the period; γ is the liquid production rate penalty coefficient; is the upper limit of the liquid production rate of the pumping well in the period; Q is the lower limit of the liquid production rate of the pumping well in the period.
[0029] In an optional implementation of the embodiment of the application, the real-time acquisition of the system environment state of the pumping well system comprises:
[0030] Real-time acquisition of the motor operating current and voltage frequency of the pumping well system based on a preset electrical parameter module;
[0031] Real-time acquisition of the motor rotation angle of the pumping well system based on a motor speed sensor;
[0032] Real-time acquisition of the temperature and pressure change of the pumping well system based on a temperature sensor and a pressure sensor;
[0033] Real-time acquisition of the dynamometer parameter of the pumping well system based on a dynamometer sensor.
[0034] In a second aspect, the embodiment of the application provides a pumping well energy consumption optimization control device based on edge computing, which is applied to a cloud-edge collaborative layer, and the device comprises:
[0035] a real-time acquisition module, configured to acquire a system environment state of the pumping unit system in real time;
[0036] a random policy module, configured to obtain a current control policy based on a random policy according to the current system environment state by using a DDPG-based pumping unit energy consumption optimization control model, and send the current control policy to the pumping unit system;
[0037] a first determination module, configured to obtain a next-time system environment state and an immediate reward after the pumping unit system executes the current control policy;
[0038] an integration module, configured to integrate the current system environment state, the current control policy, the immediate reward and the next-time system environment state into a piece of state transition data;
[0039] a repeated acquisition module, configured to repeat the process of obtaining the state transition data until a set number of state transition data are acquired;
[0040] an update module, configured to randomly extract a plurality of state transition data from the set number of state transition data, and update parameters of the pumping unit energy consumption optimization control model;
[0041] an iteration module, configured to repeat the process of obtaining the state transition data and updating the parameters until a preset optimization condition is met, and obtain an optimal pumping unit energy consumption optimization control policy.
[0042] In a third aspect, an embodiment of the present application provides a pumping unit energy consumption optimization control system based on edge computing, which comprises an intelligent perception layer, a communication layer, a cloud-edge collaboration layer and an application layer:
[0043] The intelligent perception layer is configured to collect a system environment state of a pumping unit system.
[0044] The communication layer is in communication connection with the intelligent perception layer and the cloud-edge collaboration layer.
[0045] The cloud-edge collaboration layer is configured to obtain a pumping unit energy consumption optimization control policy based on the pumping unit energy consumption optimization control method based on edge computing as described in the first aspect.
[0046] The application layer is in communication connection with the cloud-edge collaboration layer, and is configured to display a pumping well energy consumption optimization control situation.
[0047] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the pumping unit energy consumption optimization control method based on edge computing as described above.
[0048] In a fifth aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the edge computing based energy consumption optimization control method of a pumping unit well when executing the computer program.
[0049] In a sixth aspect, an embodiment of the present application provides a computer program product containing instructions, which, when the computer program product runs on a computer device, causes the computer device to execute the edge computing based energy consumption optimization control method of a pumping unit well.
[0050] In a seventh aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run a computer program or instructions, so as to implement the edge computing based energy consumption optimization control method of a pumping unit well.
[0051] The beneficial effects of the above technical solutions provided by the embodiments of the present application at least include:
[0052] The edge computing based energy consumption optimization control method of a pumping unit well provided by the embodiments of the present application, by acquiring the system environment state of the pumping unit well system in real time, and randomly giving the control strategy based on the DDPG based pumping unit well energy consumption optimization control model, obtaining the system environment state of the next time and the immediate return of the pumping unit well system after executing the control strategy, repeating the above process, constantly updating the parameters of the pumping unit well energy consumption optimization control model through the way of reinforcement learning, finally obtaining the optimal pumping unit well energy consumption optimization control strategy, and realizing the energy consumption optimization of the pumping unit well. The method has strong computing power and real-time performance, can better adapt to complex data environment and real-time control requirements, reduces the energy consumption of the pumping unit well, improves the efficiency, reduces the demand for manual intervention, and does not need to modify the existing pumping unit, can effectively reduce the energy consumption of the pumping unit well, has high practical value and popularization prospect.
[0053] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application can be realized and achieved by the structure particularly pointed out in the written description, claims, and drawings.
[0054] The technical solutions of the present application will be further described in detail below with the help of the drawings and embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0055] The accompanying drawings are included to provide a further understanding of the present application, and constitute a part of the specification, which together with the embodiments of the present application, serve to explain the present application, and do not constitute a limitation to the present application; in the drawings:
[0056] Figure 1 A step schematic diagram of the pumping unit well energy consumption optimization control method based on edge computing provided for the embodiments of the present application is shown in FIG. 1.
[0057] Figure 2 A schematic diagram of the pumping unit well MDP model decision process provided for the embodiments of the present application is shown in FIG. 2.
[0058] Figure 3 A schematic diagram of the AC framework of the pumping unit well energy consumption optimization control model provided for the embodiments of the present application is shown in FIG. 3.
[0059] Figure 4 A flowchart of the optimization control of the pumping unit well energy consumption optimization control model provided for the embodiments of the present application is shown in FIG. 4.
[0060] Figure 5 A structure schematic diagram of the pumping unit well energy consumption optimization control device based on edge computing provided for the embodiments of the present application is shown in FIG. 5.
[0061] Figure 6 A structure schematic diagram of the pumping unit well energy consumption optimization control system based on edge computing provided for the embodiments of the present application is shown in FIG. 6.
[0062] Figure 7 A whole architecture schematic diagram of the pumping unit well energy consumption optimization control system based on edge computing provided for the embodiments of the present application is shown in FIG. 7. DETAILED DESCRIPTION
[0063] In the following description, specific details are set forth, such as particular system configurations, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. However, persons skilled in the art will understand that the present application can be practiced without these specific details. In other instances, well-known systems, structures, circuits, and techniques have not been shown in detail in order not to obscure the understanding of this description.
[0064] It should be understood that the term "comprising" as used in the specification and in the claims indicates the presence of the recited features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0065] It should also be understood that the term "and / or" as used in the specification and in the claims indicates any combination of one or more of the associated listed items and all possible combinations of the items.
[0066] As used in the specification and the appended claims, the term “if’ can be interpreted as meaning “when” or “upon” or “in response to determining” or “in response to detecting” depending on the context. Similarly, the phrase “if it is determined” or “if [the described condition or event] is detected” can be interpreted to mean “upon determining” or “in response to determining” or “upon detecting [the described condition or event]” or “in response to detecting [the described condition or event]” depending on the context.
[0067] In addition, in the description of the present application and the appended claims, the terms “first”, “second”, “third”, etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0068] In the present application, the reference “one embodiment” or “some embodiments” and the like means that the specific features, structures or characteristics described in connection with the embodiment are included in one or more embodiments of the present application. Therefore, the statements “in one embodiment”, “in some embodiments”, “in other some embodiments”, “in further some embodiments” and the like appearing in different places in the specification are not necessarily all referring to the same embodiment, but mean “one or more but not all embodiments”, unless otherwise specifically emphasized. The terms “include”, “contain”, “have” and their variants mean “include but not limited to”, unless otherwise specifically emphasized.
[0069] It should be understood that the size of the serial number of each step in the following embodiments does not mean the order of execution, and the execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0070] In order to illustrate the technical solutions of the present application, the following specific embodiments are described.
[0071] The inventors found that in the prior art, the energy consumption problem of pumping unit wells has always been difficult to obtain a high-quality solution. The traditional pumping unit well control system cannot process complex data in real time and make optimal decisions, so it cannot realize real-time optimization of energy consumption. In recent years, with the development of edge computing technology, its powerful computing power and real-time performance provide a new solution for the energy consumption optimization of pumping unit wells. However, how to apply edge computing technology to the energy consumption optimization control of pumping unit wells still needs further research and exploration. Based on this, the inventors have made further research and development, and made the present application, which provides a pumping unit well energy consumption optimization control method, device and system based on edge computing.
[0072] Embodiment one
[0073] In the embodiments of the present application, the inventor proposes an energy consumption optimization control system for pumping unit well based on edge computing. The main components of the system are intelligent perception layer, communication layer, cloud-edge collaboration layer and application layer from bottom to top. In the cloud-edge collaboration layer of the system, the frequency control of the pumping unit well (i.e. pumping unit well system) is realized on the edge side, and the related coordination management and calculation support is realized on the cloud computing side. On the cloud computing side, the cloud-edge collaboration layer performs data analysis and collaborative management of different data sources, such as the access of pumping unit well, permission verification and optimal pumping unit well pumping frequency optimization service; on the edge side, through the perception, analysis and processing of data of each pumping unit well, the collaborative computing task is further completed, the message push and control of the pumping unit well to be optimized are realized, and the pumping unit well energy consumption optimization control model based on DDPG is embedded into the energy consumption controller. Through an energy consumption optimization control method for pumping unit well based on edge computing, the frequency control of the pumping unit well system on the edge side is realized.
[0074] In the above energy consumption controller, three functions of industrial control data acquisition, data storage and forwarding and edge inference application are included. Among them, the industrial control data acquisition function: supports flexible configuration of port communication, acquisition block (acquisition point) protocol and information and networking information for 1-way network port, 3-way serial port and Zigbee, is compatible with mainstream Modbus multi-protocol adaptation in oilfield site, integrates multiple communication modes such as 4G / Zigbee / wired, and meets the real-time and efficient acquisition and access of industrial control data of PLC, instruments and RTU in oil and gas field and monitoring of energy consumption controller operation data; the data storage and forwarding function: supports analyzing and mapping the data collected in the oil and gas production site to the local storage, and at the same time, the inference result data generated by the energy consumption controller in real time can be pushed to the intelligent Internet of Things system or third party system in the production network through MQTT message forwarding, supporting data analysis, function calculation and network interruption; the edge inference application function: supports uploading the pumping unit well energy consumption optimization control model based on DDPG to the current energy consumption controller, and starting, stopping, parameter configuration and version management of the pumping unit well energy consumption optimization control model online, and in the production process, the optimal production parameters can be obtained by using the pumping unit well energy consumption optimization control model based on DDPG according to the environmental parameters of the pumping unit well, so as to realize the lowest energy consumption of the pumping unit well.
[0075] The pumping unit well energy consumption optimization control method based on edge computing in the cloud-edge collaboration layer is described below:
[0076] The embodiments of the present application provide a pumping unit well energy consumption optimization control method based on edge computing, as shown in Figure 1 The method comprises:
[0077] S101: Real-time acquisition of system environment state of pumping unit well system.
[0078] In the embodiment of the present application, the real-time acquisition of the system environment state of the pumping unit well system comprises:
[0079] Based on the preset electrical parameter module, the motor operating current and voltage frequency of the pumping unit well system are acquired in real time.
[0080] Based on the motor speed sensor, the motor rotation angle of the pumping unit well system is acquired in real time.
[0081] Based on the temperature sensor and the pressure sensor, the temperature and pressure changes of the pumping unit well system are acquired in real time.
[0082] Based on the dynamometer card sensor, the dynamometer card parameters of the pumping unit well system are acquired in real time.
[0083] In the embodiment of the present application, the intelligent perception layer in the pumping unit well energy consumption optimization control system is an intelligent perception device, which is mainly responsible for the perception information collection of each pumping unit well production and production state and the feedback and control of the corresponding task unit, including the preset electrical parameter module, the motor speed sensor, the temperature sensor, the pressure sensor and the dynamometer card sensor. The preset electrical parameter module collects parameters such as motor operating current and voltage frequency, and monitors the driving size in real time; the motor speed sensor monitors the operation of the motor according to the collected motor rotation angle; the temperature sensor and the pressure sensor mainly reflect the changes of the equipment and the downhole during the operation of the pumping unit; and the dynamometer card sensor mainly collects the parameters required for generating a dynamometer card. The intelligent perception layer can obtain the production conditions of the pumping unit well and the fluid parameters in the wellbore, and perceive and feedback the variable frequency control environment of the pumping unit well in real time.
[0084] The system environment state data of the pumping unit well system collected by various sensors in the intelligent perception layer includes real-time dynamometer card data and oilfield production parameters, wherein the real-time dynamometer card data mainly includes load, displacement, maximum load and minimum load, and the oilfield production parameters include comprehensive electrical parameters, oil pressure, casing pressure, back pressure, power consumption, stroke and stroke frequency.
[0085] The various data of the system environment state of the pumping unit well system acquired by the intelligent perception layer in the above manner are transmitted to the cloud edge collaboration layer in real time for processing through the communication layer.
[0086] S102: Based on the DDPG-based pumping unit well energy consumption optimization control model, a current control strategy is obtained based on a random strategy according to the current system environment state, and is sent to the pumping unit well system.
[0087] In the embodiments of the present application, according to the characteristics of each data information obtained by the intelligent perception layer, the inventors design the neural network structure of the pumping unit well energy consumption optimization control model, select to construct the pumping unit well energy consumption optimization control model based on DDPG, use the Markov decision process model (MDP) to realize the decision process between the agent and the environment state in the reinforcement learning process, and realize by using the actor-critic (AC) framework, and initialize the neural network parameters of the pumping unit well energy consumption optimization control model and the system environment state.
[0088] In the embodiments of the present application, the premise of combining the energy-saving optimization control of the pumping unit well with the reinforcement learning is to establish the MDP model of the pumping unit well. The MDP model is usually described as a four-tuple [S, A, P, R], therefore, in the MDP model of the pumping unit well defined by the inventors, S is the state space described by the pumping unit well and external environment parameters; A is the action space composed of the available control instructions of the edge layer of the pumping unit well; P is the transition probability of the pumping unit well system between different environment states; and R is the immediate reward obtained by taking different control actions a, which is usually in the form of a function with a penalty term. The model is shown in Figure 2 As shown in the figure, the pumping unit well energy consumption optimization control model embedded in the edge energy consumption controller gives the current control action, i.e. the current control strategy a t , according to the current system environment state s t , after the pumping unit system executes the control strategy, a new state s t+1 is generated, and the edge energy consumption controller obtains an immediate reward r t .
[0089] In the embodiments of the present application, the inventors specify the specific parameters of the MDP model of the pumping unit well as follows according to the actual situation of the data obtained by the intelligent perception layer, and the evaluation conditions of the periodic liquid production and energy consumption of the pumping unit well:
[0090] 1) State space S: the ground dynamometer card and the stroke frequency law in the current control period;
[0091] 2) Action space A: according to the principle of matching the action selection with the actual controlled variable, and combining the actual situation of the research object, the stroke frequency of the pumping unit is selected as the control action corresponding to the frequency of the motor.
[0092] 3) Transition probability P: the transition probability depends on the real state of the system environment after executing the control action, and the agent needs to rely on multiple Monte Carlo sampling to make an unbiased estimate.
[0093] 4) Immediate reward R: the liquid production of the pumping unit well and the current energy consumption are the main indicators for evaluating the operation of the pumping unit well.
[0094] In the embodiments of the present application, the pumping unit well energy consumption optimization control model constructed based on DDPG is implemented by using an AC framework, as shown in FIG. 8. Figure 3 The actor network gives actions under different environmental states, and the critic network judges the goodness of the action, and the two are in a mutual supervision and mutual learning relationship. Essentially, the actor network learns the state value function from the environment, and the critic network learns the state-action value function. After the intelligent agent completes the learning task, only the actor network can complete a specific reinforcement learning task.
[0095] In the embodiments of the present application, the system environment state of the pumping unit well system transmitted by the intelligent perception layer is acquired in real time. Through the pumping unit well energy consumption optimization control model, the current control policy (i.e., the control policy issued at the current time for the next time) can be obtained based on a random policy according to the current system environment state, and sent to the pumping unit well system.
[0096] S103: Obtain the system environment state at the next time and the immediate reward obtained after the pumping unit well system executes the current control policy.
[0097] In the embodiments of the present application, when the pumping unit well system executes the current control policy, the system environment state will change immediately, and at the same time, the pumping unit well energy consumption optimization control model will obtain the system environment state at the next time and an immediate reward.
[0098] In the embodiments of the present application, the immediate reward is obtained by using the following formula 3:
[0099]
[0100] In the formula, R is the immediate reward; -Energy(s t , a t ) is the energy consumption of the pumping unit system in the t time period; Q is the liquid production of the pumping unit well in the period; γ is the liquid production penalty coefficient; is the upper limit of the liquid production of the pumping unit well in the period; Q is the lower limit of the liquid production of the pumping unit well in the period.
[0101] In the embodiments of the present application, when the MDP model of the pumping unit well is set, the liquid production and the current energy consumption of the pumping unit well are taken as the main indicators for evaluating the operation of the pumping unit well. In formula 3, -Energy(s t , a t) represents the energy consumption of the pumping unit system during the t-th time period. Since lower energy consumption is better, it is generally taken as a negative value. Q is the production of the pumping unit well during the period. Higher production is better, but in actual production, excessive production fluctuations can have a certain impact on the formation. In order to ensure that the well production is within a certain range, a penalty function γ with respect to Q is required. Take the maximum value of the Inflow Dynamics (IPR) curve, which corresponds to the maximum output when the pressure is 0. Q The average liquid production over the past 10 days of normal production was taken.
[0102] S104: Integrate the current system environment state, current control strategy, immediate report, and the system environment state at the next moment into a single state transition data.
[0103] In this embodiment of the application, the received current system environment state s t Current control strategy a t Real-time reports (rt) and the system environment status at the next moment (s) t+1 They are integrated into a single state transition data, that is, integrated into (s t a t r t s t+1 The data format is in the form of ).
[0104] S105: Repeat the above process of obtaining state transition data until a set number of state transition data are obtained.
[0105] In this embodiment, steps S102 to S104 are repeatedly executed, that is, the current system environment state is continuously acquired, and a corresponding current control strategy is given. After the pumping unit system executes the current control strategy, the system environment state changes, the system environment state at the next moment and the real-time report are obtained, and the current system environment state, the current control strategy, the real-time report and the system environment state at the next moment are integrated into a state transition data. The above process is repeated to continuously acquire state transition data (s t a t r t s t+1 (This continues until the state transition data for the set data is obtained.)
[0106] S106: Randomly extract multiple state transition data from the set number of state transition data, and update the parameters of the oil pumping well energy consumption optimization control model.
[0107] In this embodiment of the application, after obtaining a set number of state transition data, N state transition data are randomly selected, and the parameters of the oil pumping well energy consumption optimization control model are updated once using the gradient descent method.
[0108] In the embodiment of the present application, the pumping unit well energy consumption optimization control model comprises an actor network and a critic network; the plurality of state transition data are randomly extracted from the set number of state transition data, and parameters of the pumping unit well energy consumption optimization control model are updated, comprising:
[0109] The plurality of state transition data are randomly extracted from the set number of state transition data, and according to the system environment state at the next time in each state transition data, the corresponding control strategy at the next time is obtained through the actor network;
[0110] According to the current system environment state and the current control strategy and the system environment state at the next time and the control strategy at the next time, the corresponding current cycle pumping unit well fluid production and the next cycle pumping unit well fluid production are obtained through the critic network;
[0111] The TD deviation is calculated according to the current cycle pumping unit well fluid production and the next cycle pumping unit well fluid production;
[0112] The weight parameters of the critic network are updated according to the TD deviation;
[0113] The weight parameters of the actor network are updated according to the current cycle pumping unit well fluid production.
[0114] In the embodiment of the present application, the weight parameters of the critic network are updated according to the TD deviation, comprising:
[0115] The weight parameters of the critic network are updated according to the TD deviation through the following formula 1:
[0116] ω t+1 = ω t + α ω [r t + γQ(s t+1 , a t+1 ) - Q(s t , a t )] Formula 1;
[0117] In the formula, ω t+1 is the weight parameter of the critic network at the t+1 time; ω t is the weight parameter of the critic network at the t time; α ω is the learning rate of the critic network; r t + γQ(s t+1 , a t+1 ) - Q(s t , a t ) is the TD deviation.
[0118] In this embodiment of the application, updating the weight parameters of the actor network based on the current cycle pumping unit well production includes:
[0119] Based on the current cycle pumping unit well production, the weight parameters of the actor network are updated using the following formula 2:
[0120]
[0121] In the formula, θ t+1 θ represents the weight parameters of the actor network at time t+1. t Let α be the weight parameters of the actor network at time t; θ The learning rate of the actor network; For deterministic policy gradients.
[0122] In this embodiment of the application, N data points are randomly selected from a predetermined number of state transition data points. For each randomly selected state transition data point (s) t a t r t s t+1 The actor network will provide the critic network with the control strategy for the next moment based on the system environment state at the next moment. t+1 The critic network bases its decisions on the current system environment state and the current control policy (S). t a t The system environment state and control strategy at the next moment (s) t+1 a t+1 ), thus obtaining the corresponding current cycle pumping unit well production rate Q(s) t a t ) and the next cycle pumping unit well production Q(s) t+1 a t+1 The critic network updates its weight parameters based on the calculated TD deviation using Formula 1 above, and the actor network updates its weight parameters based on the current cycle pumping unit well production rate Q(s). t a t The weight parameters are updated using Formula 2 above, thus completing the parameter update of the energy consumption optimization control model for a pumping unit well.
[0123] In the embodiments of this application, such as Figure 3 The diagram shown is a schematic of the AC framework. The strategy module in the diagram is the actor network, which determines the strategy based on the current system environment state s. t The current control strategy, i.e., action a, is randomly given. t In the MDP model, the action transition probability is represented in state st The following execution action a is performed t The following execution action a is performed t+1 The probability of the pumping well system returning to the immediate return, i.e. reward r after executing the current control strategy t to the evaluation module (i.e. critic network), and the critic network calculates the TD deviation and returns the cumulative return Q t to the actor network.
[0124] S107: Repeat the above process of obtaining state transition data and updating parameters until a preset optimization condition is met to obtain an optimal pumping well energy consumption optimization control strategy.
[0125] In the embodiments of the present application, the parameters of the pumping well energy consumption optimization control model need to be iteratively updated to obtain the optimal pumping well energy consumption optimization control strategy. Each iteration update process needs to perform steps S102-S105. After obtaining a preset number of state transition data, N pieces of state transition data are randomly selected, and the parameters of the pumping well energy consumption optimization control model are updated. Repeat the process of obtaining state transition data and updating parameters for iteration. With the gradual increase of the number of iterations, the parameters of the neural network will gradually converge and stabilize, and the control action given by the pumping well energy consumption optimization control model, i.e. the control strategy, will become more and more stable. When the cumulative return of the system no longer changes significantly, it is considered that the learning process is completed, and at this time the optimal strategy has been obtained. The updated pumping well energy consumption optimization control model can be put into formal use. In addition, when the maximum number of iterations is reached, regardless of whether the optimal strategy has been learned at this time, the reinforcement learning task will be forcibly ended, and the strategy at the maximum number of iterations will be taken as the optimal pumping well energy consumption optimization control strategy.
[0126] In the embodiments of the present application, as shown in Figure 4 , it is the optimization control flowchart of the pumping well energy consumption optimization control model. In the initialization stage, first, according to the input pumping well energy consumption optimization data (including the number of strokes, liquid production and current power consumption, etc.), the neural network used by the model is set, and the parameters of the neural network and the environment of the pumping well system are initialized. The pumping well energy consumption optimization control model in the energy consumption controller randomly gives the current control strategy (i.e. control action a t ) according to the current system environment state s t , the pumping well system executes the control action, and the system environment state s t+1 at the next time is updated, the immediate return r t of the control action is calculated, and the current system environment state, the current control strategy, the immediate return and the system environment state at the next time are converted and stored as a piece of state transition data (s t , a t , rt t+1 ), repeat the above process, when the state transition data obtained reaches a set number, that is, reaches the target number, update the neural network parameters of the pumping unit well energy consumption optimization control model in the edge energy consumption controller, iteratively update until the preset optimization condition of low energy consumption and high yield is reached, then end the optimization, and obtain the optimal pumping unit well energy consumption optimization control strategy.
[0127] In the embodiments of the present application, the inventors verified the feasibility and effectiveness of the pumping unit well energy consumption optimization control method based on edge computing provided in the present application by experiments in an oilfield. The energy consumption data of 10 pumping unit wells before and after optimization control using the method were compared. The experimental results show that the method can effectively reduce the energy consumption of the pumping unit well, and the average energy saving rate can reach more than 10%. At the same time, the experiment also found that different pumping unit wells have different responses to the optimization control strategy. For some high-energy-consumption pumping unit wells, the optimization effect obtained by using the method is more significant.
[0128] The pumping unit well energy consumption optimization control method based on edge computing provided in the embodiments of the present application can obtain the system environment state of the pumping unit well system in real time, and randomly give a control strategy based on the DDPG-based pumping unit well energy consumption optimization control model, obtain the system environment state of the pumping unit well system at the next time after executing the control strategy and the immediate reward, repeat the above process, and constantly update the parameters of the pumping unit well energy consumption optimization control model through reinforcement learning, so as to finally obtain the optimal pumping unit well energy consumption optimization control strategy and realize the energy consumption optimization of the pumping unit well. The method has strong computing power and real-time performance, can better adapt to complex data environment and real-time control requirements, reduces the energy consumption of the pumping unit well, improves the efficiency, reduces the demand for manual intervention, and effectively reduces the energy consumption of the pumping unit well without modifying the existing pumping unit, which has high practical value and popularization prospect.
[0129] Embodiment two
[0130] Based on the same inventive concept, the embodiments of the present application also provide a pumping unit well energy consumption optimization control device based on edge computing, as shown in Figure 5 , the device comprises:
[0131] The real-time acquisition module 101 is configured to acquire the system environment state of the pumping unit well system in real time.
[0132] The random strategy module 102 is configured to obtain the current control strategy based on a random strategy based on the DDPG-based pumping unit well energy consumption optimization control model according to the current system environment state, and send the current control strategy to the pumping unit well system.
[0133] The determining module 103 is configured to obtain a system environment state at a next time and an immediate return obtained after the pumping unit well system executes the current control strategy.
[0134] The integrating module 104 is configured to integrate the current system environment state, the current control strategy, the immediate return and the system environment state at the next time into a piece of state transition data.
[0135] The repeatedly obtaining module 105 is configured to repeat the process of obtaining the state transition data until a set number of state transition data are obtained.
[0136] The updating module 106 is configured to randomly extract a plurality of state transition data from the set number of state transition data, and update parameters of the pumping unit well energy consumption optimization control model.
[0137] The iterating module 107 is configured to repeat the process of obtaining the state transition data and updating the parameters until a preset optimization condition is met, and obtain an optimal pumping unit well energy consumption optimization control strategy.
[0138] Embodiment three
[0139] Based on the same inventive concept, the embodiments of the present application also provide a pumping unit well energy consumption optimization control system based on edge computing, which refers to FIG. 1. The system comprises an intelligent perception layer 1, a communication layer 2, a cloud-edge collaboration layer 3 and an application layer 4. Figure 6
[0140] The intelligent perception layer 1 is configured to collect a system environment state of a pumping unit well system.
[0141] The communication layer 2 is in communication connection with the intelligent perception layer 1 and the cloud-edge collaboration layer 3.
[0142] The cloud-edge collaboration layer 3 is configured to obtain a pumping unit well energy consumption optimization control strategy based on the pumping unit well energy consumption optimization control method based on edge computing as described in embodiment one.
[0143] The application layer 4 is in communication connection with the cloud-edge collaboration layer 3, and is configured to display a pumping well energy consumption optimization control situation.
[0144] In the embodiments of the present application, as shown in FIG. 1, Figure 7 The intelligent perception layer 1 is an intelligent perception device, which is mainly responsible for the perception information collection of the production and production state of each pumping unit well and the feedback and control of the corresponding task unit, including a preset electrical parameter module, a motor speed sensor, a temperature sensor, a pressure sensor and a dynamometer card sensor. The preset electrical parameter module collects parameters such as motor operating current and voltage frequency, and monitors the driving size in real time; the motor speed sensor monitors the operation of the motor according to the collected motor angle; the temperature sensor and the pressure sensor mainly reflect the changes of the equipment and the downhole during the operation of the pumping unit; and the dynamometer card sensor mainly collects the parameters required for generating a dynamometer card. The intelligent perception layer 1 can obtain the production state of the pumping unit well and the fluid parameters in the wellbore, and perform real-time feedback on the frequency conversion control environment perception of the pumping unit well.
[0145] The communication layer 2 is a communication device, which is mainly responsible for the information communication between the devices in the pumping unit well energy consumption optimization control system, and is specifically used for communication connection with the intelligent perception layer 1 and the cloud edge collaboration layer 3, is responsible for the information collaboration of the pumping unit well production and frequency conversion and the information interaction in the pumping unit well energy consumption optimization control system, mainly communicates with the cloud edge collaboration layer 3 through a combination of wireless and wired communication, and needs to consider the physical security of the device. The communication layer 2 mainly communicates based on the MQTT protocol, pushes the MQTT messages to the intelligent Internet of Things system or the third party system of the production network through message forwarding, supports data analysis, function calculation and network interruption continuation, realizes cross-platform message subscription and sending, guarantees the low-power demand of the edge side, and also provides performance guarantee for the cloud side with high concurrent million-level connection.
[0146] The cloud edge collaboration layer 3 is a cloud edge collaboration device, which is mainly responsible for the frequency conversion control of the pumping unit well realized at the edge side, and the related coordination management and calculation support realized at the cloud computing side. It is also responsible for the information communication in the pumping unit well energy consumption optimization control system, mainly for the information collaboration of the pumping unit well production and frequency conversion and the information interaction in the system.
[0147] At the cloud computing side, the cloud edge collaboration layer performs data analysis and collaborative management of different data sources, such as pumping unit well access, permission verification and best pumping unit well pumping frequency optimization service; at the edge side, through the perception, analysis and processing of data of each pumping unit well, further collaborative computing tasks are completed, the message pushing and control of the pumping unit well to be optimized are realized, and the pumping unit well energy consumption optimization control model based on DDPG is embedded into the energy consumption controller, through an edge computing based pumping unit well energy consumption optimization control method, the frequency conversion control of the pumping unit well system at the edge side is realized.
[0148] The specific method for obtaining the optimal pumping unit well energy consumption optimization control strategy in the cloud edge collaboration layer 3 according to the pumping unit well energy consumption optimization control model based on DDPG can refer to Embodiment One, which will not be described here.
[0149] The application layer 4 mainly refers to loading an oil and gas production energy intelligent management and control platform. An operator can monitor the energy consumption of the pumping unit well in real time through a Web terminal, and query and process energy consumption optimization.
[0150] In the operation process of the pumping unit well energy consumption optimization control system in the embodiment of the application, first, real-time data in the production process of the pumping unit well, i.e., real-time system environment states, are collected by various sensors deployed in the intelligent perception layer 1, and then the energy consumption controller on the edge side of the cloud edge collaboration layer 3 preliminarily processes the data according to business rules and models. The edge side can provide calculation offloading by using the designed edge technology, and can realize real-time response of the equipment in the intelligent perception layer 1 after communication protocol analysis and data format conversion. At the same time, the data collected by the intelligent perception layer 1 can be subjected to abnormality detection and filtering processing at the edge side, so as to reduce the shortcomings of storing a large number of abnormalities and the disadvantages of effective data being submerged in the traditional cloud computing mode, improve response and reduce delay, and further complete collaborative computing tasks, realize message pushing and control of the pumping unit well to be optimized, embed the pumping unit well energy consumption optimization control model based on DDPG into the energy consumption controller, and realize frequency conversion control of the pumping unit well at the edge layer. At the cloud computing side, the cloud edge collaboration layer 3 performs data analysis and collaborative management of different data sources, such as pumping unit well access, permission verification, and best pumping unit well pumping frequency optimization services.
[0151] Embodiment four
[0152] Based on the same inventive concept, the embodiment of the application further provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the pumping unit well energy consumption optimization control method based on edge computing as described in the above embodiment one.
[0153] Embodiment five
[0154] Based on the same inventive concept, the embodiment of the application further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to realize the pumping unit well energy consumption optimization control method based on edge computing as described in the above embodiment one.
[0155] Embodiment six
[0156] Based on the same inventive concept, the embodiment of the application further provides a computer program product containing instructions, which, when the computer program product is executed on a computer device, causes the computer device to execute the pumping unit well energy consumption optimization control method based on edge computing as described in the above embodiment one.
[0157] Embodiment seven
[0158] Based on the same inventive concept, the embodiment of the present application also provides a chip, which comprises a processor and a communication interface, the communication interface is coupled with the processor, and the processor is used to run a computer program or instruction to realize the edge computing based energy consumption optimization control method of pumping unit well as described in the above embodiment one.
[0159] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage, etc.) containing computer-usable program code.
[0160] The present application is described with reference to flowcharts and / or block diagrams of the method, device (system), and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device implemented in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that carries out the functions specified in the flow(s) or block(s).
[0161] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction apparatus, which realizes the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that carries out the functions specified in the flow(s) or block(s).
[0162] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable data processing apparatus to produce a computer implemented process, so that the instructions executed on the computer or other programmable data processing apparatus provide a process for realizing the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that carries out the functions specified in the flow(s) or block(s).
[0163] Obviously, many modifications and variations of the present application are possible in light of the above teachings. It is, therefore, to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. A method for optimizing and controlling the energy consumption of pumping wells based on edge computing, characterized in that, Applied to the cloud-edge collaboration layer, including: The system environment status of the pumping unit well system is acquired in real time. This acquisition includes: acquiring the motor operating current and voltage frequency of the pumping unit well system in real time based on a preset electrical parameter module; acquiring the motor rotation angle of the pumping unit well system in real time based on a motor speed sensor; acquiring the temperature and pressure changes of the pumping unit well system in real time based on temperature and pressure sensors; and acquiring the dynamometer parameters of the pumping unit well system in real time based on a dynamometer sensor. Based on the DDPG-based energy consumption optimization control model for pumping wells, the current control strategy is obtained and sent to the pumping well system according to the current system environment state and a stochastic strategy. After the pumping unit well system executes the current control strategy, obtain the system environment status and real-time report at the next moment; The current system environment state, current control strategy, real-time report and the system environment state at the next moment are integrated into a single state transition data; Repeat the above process of obtaining state transition data until the set number of state transition data is obtained; Multiple state transition data are randomly extracted from the set number of state transition data to update the parameters of the oil pumping well energy consumption optimization control model; The process of repeatedly acquiring state transition data and updating parameters continues until the preset optimization conditions are met, thus obtaining the optimal energy consumption optimization control strategy for the pumping unit well.
2. The method as described in claim 1, characterized in that, The oil pumping unit well energy consumption optimization control model includes an actor network and a critic network; the step of randomly extracting multiple state transition data from the predetermined number of state transition data and updating the parameters of the oil pumping unit well energy consumption optimization control model includes: Multiple state transition data are randomly extracted from the set number of state transition data. Based on the system environment state at the next moment in each state transition data, the corresponding control strategy for the next moment is obtained through the actor network. The corresponding pumping unit well production rate for the current cycle and the pumping unit well production rate for the next cycle are obtained through the critic network based on the current system environment state and the current control strategy, the system environment state and the control strategy for the next time step. The TD deviation is calculated based on the current cycle pumping well production and the next cycle pumping well production; where the TD deviation is r. t +γQ(s t+1 ,a t+1 )-Q(s t ,a t ), r t This indicates the real-time report from the pumping unit well, where γ is the production penalty coefficient, and s t Indicates the current system environment status of the pumping unit well, a t Indicates the current control strategy of the pumping unit well, s t+1 This indicates the system environment state at the next moment in the pumping unit well, a t+1 This represents the control strategy of the pumping unit well at the next moment, and Q is the pumping unit well production rate within the cycle. Update the weight parameters of the critic network based on the TD bias; The weight parameters of the actor network are updated based on the current cycle pumping unit well production.
3. The method as described in claim 2, characterized in that, The step of updating the weight parameters of the critic network based on the TD bias includes: Based on the TD bias, the weight parameters of the critic network are updated using the following formula 1: ω t+1 = ω t + α ω [r t + γQ(s t+1 , a t+1 ) - Q(s t , a t )] Formula 1; In the formula, ω t+1 ω represents the weight parameters of the critic network at time t+1. t Let α be the weight parameters of the critic network at time t; ω r is the learning rate of the critic network. t +γQ(s t+1 ,a t+1 )-Q(s t ,a t ) represents the TD deviation.
4. The method as described in claim 2, characterized in that, The step of updating the weight parameters of the actor network based on the current cycle pumping unit well production includes: Based on the current cycle pumping unit well production, the weight parameters of the actor network are updated using the following formula 2: In the formula, θ t+1 θ represents the weight parameters of the actor network at time t+1. t Let α be the weight parameters of the actor network at time t; θ The learning rate of the actor network; For deterministic policy gradients.
5. The method as described in claim 1, characterized in that, The instant reward is obtained using the following formula 3: In the formula, R represents the instantaneous reward; -Energy(s) t ,a t ) represents the energy consumption of the pumping unit system during the t-th time period; Q represents the fluid production of the pumping unit well during the period; γ represents the fluid production penalty coefficient; This represents the upper limit of fluid production from the pumping unit well within the cycle. Q This represents the lower limit of the fluid production of the pumping unit well within the cycle.
6. An edge computing-based energy consumption optimization control device for pumping wells, comprising the edge computing-based energy consumption optimization control method for pumping wells as described in any one of claims 1-5, characterized in that... Applied to the cloud-edge collaboration layer, including: The real-time acquisition module is used to acquire the system environment status of the pumping unit well system in real time. The stochastic strategy module is used to obtain the current control strategy based on the current system environment state and the stochastic strategy through the DDPG-based pumping well energy consumption optimization control model and send it to the pumping well system. The first determining module is used to obtain the system environment status and real-time report at the next moment after the pumping unit well system executes the current control strategy; The integration module is used to integrate the current system environment state, the current control strategy, the real-time report, and the system environment state at the next moment into a single state transition data. The repeat acquisition module is used to repeat the above process of obtaining state transition data until a set number of state transition data are acquired. The update module is used to randomly extract multiple state transition data from the set number of state transition data and update the parameters of the oil pumping well energy consumption optimization control model; The iterative module is used to repeat the process of acquiring state transition data and updating parameters until the preset optimization conditions are met, thus obtaining the optimal energy consumption optimization control strategy for the pumping unit well.
7. An edge computing-based energy consumption optimization control system for oil pumping wells, characterized in that, It includes the intelligent sensing layer, communication layer, cloud-edge collaboration layer, and application layer: The intelligent sensing layer is used to collect the system environmental status of the pumping unit well system; The communication layer is communicatively connected to the intelligent sensing layer and the cloud-edge collaboration layer. The cloud-edge collaboration layer is used to obtain an energy consumption optimization control strategy for pumping wells based on the edge computing-based pumping well energy consumption optimization control method as described in any one of claims 1-5. The application layer is communicatively connected to the cloud-edge collaboration layer and is used to display the energy consumption optimization and control status of oil wells.
8. A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the edge computing-based energy consumption optimization control method for pumping wells as described in any one of claims 1-5.
9. A computer device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the edge computing-based energy consumption optimization control method for pumping wells as described in any one of claims 1-5.
10. A computer program product containing instructions that, when run on a computer device, causes the computer device to perform the edge computing-based energy consumption optimization control method for pumping wells as described in any one of claims 1-5.
11. A chip comprising a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to run computer programs or instructions to implement the edge computing-based energy consumption optimization control method for pumping wells as described in any one of claims 1-5.
Citation Information
Patent Citations
An intelligent pumping unit parameter adjustment method based on reinforcement learning and a confrontation generation network
CN109558633A
Field development planning based on deep reinforcement learning
US20220220828A1