A Dynamic Correction Method for Oil Well Power Metering Errors Based on Edge Computing
By deploying equipment and using edge computing to correct errors, the problems of large metering errors and resource waste in oil well electricity consumption have been solved, achieving accurate metering of electricity consumption and stable operation of oil wells.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-28
- Publication Date
- 2026-03-13
AI Technical Summary
Centralized processing of oil well electricity consumption is time-consuming and prone to errors, resulting in large measurement errors, increased costs, and potential risks to oil well operation.
The edge computing-based approach constructs an oil well distribution map, deploys edge computing devices, obtains power consumption and power factor, uses abrupt change amplitude coefficient and temperature compensation to correct active power, and finally determines whether to replace the power meter.
It reduces resource waste and processing time, lowers metering errors, ensures accurate electricity consumption, guarantees accurate cost accounting and normal oil well load scheduling, and reduces potential operational risks.
Smart Images

Figure CN121190244B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power metering correction technology, and more specifically, to a dynamic correction method for power metering errors in oil wells based on edge computing. Background Technology
[0002] Patent application CN108959747A discloses a method and apparatus for configuring oil well operating parameters, belonging to the field of oilfield development technology. This invention determines a first preset range for system efficiency and a second preset range for power consumption per ton of fluid per 100 meters based on the mathematical relationship between the system efficiency of the pumping unit and the power consumption per ton of fluid per 100 meters. The oil well operating parameters are configured with the first preset range as the target system efficiency, and the second preset range as the target power consumption per ton of fluid per 100 meters. This involves adjusting measures such as electric heating, high-efficiency hot well washing, chemical dosing for descaling and preventing waxing and scaling, and dynamic water adjustment. This allows for the control of power consumption per ton of fluid per 100 meters while improving system efficiency, thus saving electricity while increasing oil well production. The use of power consumption per ton of fluid per 100 meters to represent the power consumption of the pumping unit is a more accurate method.
[0003] However, with a large number of oil wells, centralized processing of their power consumption is time-consuming and prone to errors. Deploying an edge computing device for each oil well would waste resources and increase costs. During operation, the load on the oil wells changes constantly, causing fluctuations in the power factor. When the load changes abruptly (such as motor starting or switching of sucker rod working mode), the power factor will change significantly, potentially leading to measurement errors. This results in a large discrepancy between the actual power consumption and the measured power consumption, leading to large deviations in cost accounting, imbalances in oil well load scheduling, and potential hazards in oil well operation.
[0004] In view of this, the present invention proposes a dynamic correction method for oil well power metering error based on edge computing to solve the above problems. Summary of the Invention
[0005] To overcome the aforementioned deficiencies of the prior art and to achieve the above objectives, the present invention provides the following technical solution: a dynamic correction method for oil well power metering errors based on edge computing, comprising:
[0006] Step S1: Obtain the latitude and longitude of the oil wells in the monitoring area, construct an oil well distribution map based on the latitude and longitude of the oil wells, obtain the Euclidean distance between the oil well location mapping points in the oil well distribution map, and determine whether there is a first correlation relationship and a second correlation relationship between the oil well location mapping points based on the Euclidean distance between the oil well location mapping points and the communication distance of the edge computing device, and deploy the edge computing device based on the judgment result.
[0007] Step S2: Obtain the initial power consumption, initial active power, initial apparent power, and initial temperature of the oil well during the monitoring period through edge computing devices. Obtain the initial power factor based on the initial active power and initial apparent power, construct a line graph of the initial power factor change, and obtain the abrupt change amplitude coefficient based on the line graph of the initial power factor change.
[0008] Step S3: Correct the corresponding initial active power according to the mutation amplitude coefficient to obtain the mutation-corrected active power;
[0009] Step S4: Based on the change in initial temperature during the monitoring period, perform temperature compensation on the change correction active power of the oil well to obtain the temperature correction active power. Based on the temperature correction active power, obtain the final corrected energy consumption. Based on the final corrected energy consumption and the initial energy consumption, determine whether to replace the energy meter.
[0010] Furthermore, the method for constructing an oil well distribution map based on the latitude and longitude of the oil wells includes:
[0011] The latitude and longitude of the oil wells are converted into UTM(x,y) coordinates to construct a two-dimensional coordinate system. The two-dimensional rectangular coordinate system consists of the UTM x axis and the UTM y axis. The UTM(x,y) coordinates of the oil wells are mapped into the two-dimensional coordinate system to obtain the oil well location mapping points. One oil well location mapping point represents one oil well, thus obtaining an oil well distribution map.
[0012] Furthermore, the method for deploying edge computing devices based on the judgment result includes:
[0013] Step A1: Determine whether there is a first association relationship between the oil well location mapping points. For each oil well location mapping point, obtain the number of oil well location mapping points that have a first association relationship with it, and record it as the association number of the oil well location mapping point. Deploy an edge computing device at the location corresponding to the oil well location mapping point with the most associations. If there are multiple oil well location mapping points with the most associations, randomly select the location corresponding to the oil well location mapping point with the most associations and deploy an edge computing device.
[0014] Step A2: Delete the oil well location mapping points covered by the communication distance of the edge computing device, and re-determine whether there is a first association relationship between the oil well location mapping points. Obtain the oil well location mapping point with the most associations and record it as the second oil well location mapping point. Deploy an edge computing device at the location corresponding to the second oil well location mapping point. If there are multiple second oil well location mapping points, randomly select the location corresponding to the second oil well location mapping point and deploy an edge computing device.
[0015] Step A3: Repeat step A2 until the remaining oil well location mapping points do not have a first association relationship. Determine whether the remaining oil well location mapping points have a second association relationship. If the Euclidean distance between two remaining oil well location mapping points is less than twice the communication distance of the edge computing device, then the two remaining oil well location mapping points have a second association relationship. Otherwise, the two remaining oil well location mapping points do not have a second association relationship.
[0016] Step A4: Randomly select two well location mapping points with a second correlation relationship, and deploy an edge computing device at the midpoint between the two wells corresponding to the two randomly selected well location mapping points with a second correlation relationship.
[0017] Step A5: Delete the oil well location mapping points covered by the communication distance of the edge computing device, and re-determine whether there is a second association relationship between the oil well location mapping points. Randomly select two oil well location mapping points with a second association relationship, and record them as the third oil well location mapping point and the fourth oil well location mapping point, respectively. Deploy an edge computing device at the midpoint between the oil well corresponding to the third oil well location mapping point and the oil well corresponding to the fourth oil well location mapping point.
[0018] Step A6: Repeat step A5 until there is no second association between the remaining oil well location mapping points. At the location corresponding to each remaining oil well location mapping point, deploy an edge computing device.
[0019] Furthermore, the method for determining whether there is a first correlation between the oil well location mapping points includes:
[0020] If the Euclidean distance between two well location mapping points is less than the communication distance of the edge computing device, then the two well location mapping points have a first association relationship. If the Euclidean distance between two well location mapping points is greater than or equal to the communication distance of the edge computing device, then the two well location mapping points do not have a first association relationship.
[0021] Furthermore, the method for obtaining the initial power factor based on the initial active power and the initial apparent power includes:
[0022] The monitoring period was evenly divided into... The system monitors each time point and obtains the initial active power, initial apparent power, and initial temperature at each time point. The initial active power at each time point is divided by the initial apparent power at the corresponding time point to obtain the initial power factor at each time point.
[0023] Furthermore, the method for constructing the initial power factor variation line graph includes:
[0024] Establish a blank two-dimensional rectangular coordinate system, set the horizontal axis of the blank two-dimensional rectangular coordinate system to time, set the vertical axis of the blank two-dimensional rectangular coordinate system to the initial power factor, and fill the initial power factor at each monitoring time point into the blank two-dimensional rectangular coordinate system to obtain the initial power factor mapping point. Connect the initial power factor mapping points in time order with straight lines to obtain the initial power factor change line graph.
[0025] Furthermore, the method for obtaining the abrupt change amplitude coefficient based on the initial power factor change line graph includes:
[0026] Starting from the second initial power factor mapping point, draw a line parallel to the vertical axis through the initial power factor mapping point and call it the first vertical axis parallel line. Draw a line parallel to the horizontal axis through the previous initial power factor mapping point and call it the first horizontal axis parallel line.
[0027] The intersection of the first vertical axis parallel line and the first horizontal axis parallel line is recorded as the first intersection point. The area of the right triangle formed by the first intersection point, the initial power factor mapping point, and the previous initial power factor mapping point is obtained. The area of the right triangle is used as the mutation amplitude coefficient of the initial power factor mapping point, until the last initial power factor mapping point ends.
[0028] Furthermore, the method for correcting the corresponding initial active power based on the mutation amplitude coefficient to obtain the mutation-corrected active power includes:
[0029] Set a threshold for the mutation amplitude coefficient. When the mutation amplitude coefficient of the initial power factor mapping point is greater than or equal to the threshold for the mutation amplitude coefficient, the initial power factor mapping point is recorded as a candidate corrected power factor mapping point.
[0030] Obtain the historical load percentage and its corresponding historical power factor. Fit the historical load percentage and its corresponding historical power factor using the curve fitting method to obtain the relationship between the historical load percentage and its corresponding historical power factor.
[0031] Obtain the load percentage at the monitoring time point corresponding to the candidate corrected power factor mapping point, input the load percentage at the monitoring time point corresponding to the candidate corrected power factor mapping point into the relationship between the historical load percentage and its corresponding historical power factor, and obtain the corresponding theoretical power factor.
[0032] Obtain the absolute value of the difference between the initial power factor and the corresponding theoretical power factor corresponding to the candidate modified power factor mapping point, and denot it as the difference coefficient of the candidate modified power factor mapping point;
[0033] Set a difference coefficient threshold, obtain candidate power factor mapping points with difference coefficients greater than or equal to the difference coefficient threshold, and record them as power factor mapping points to be corrected. Record the initial active power at the monitoring time point corresponding to the power factor mapping point to be corrected as the active power to be corrected. Replace the initial power factor corresponding to the power factor mapping point to be corrected with the corresponding theoretical power factor and record it as the replacement power factor.
[0034] Multiply the replacement power factor corresponding to the mapping point of the power factor to be corrected by the initial apparent power to obtain the corresponding replacement active power. Replace the active power to be corrected with the corresponding replacement active power. Record the initial active power and replacement active power at each monitoring time point as the mutation correction active power.
[0035] Furthermore, the method for temperature-compensated active power of oil wells based on changes in initial temperature during the monitoring period to obtain temperature-corrected active power includes:
[0036] Temperature compensation is applied to the abrupt change-corrected active power at each monitoring time point to obtain the temperature-compensated active power, which is then recorded as the temperature-corrected active power. ;
[0037] in, ;
[0038] For monitoring time point indexes, , For the first Temperature-corrected active power at each monitoring time point For the first Active power corrected for mutations at each monitoring time point This is the temperature compensation coefficient. For the first The initial temperature at each monitoring time point This is a reference temperature.
[0039] Furthermore, the method for obtaining the final corrected energy consumption based on temperature-corrected active power, and determining whether to replace the energy meter based on the final corrected energy consumption and the initial energy consumption, includes:
[0040] The temperature-corrected active power is integrated over the monitoring period to obtain the final corrected energy consumption.
[0041] Obtain the absolute value of the difference between the final corrected energy consumption and the initial energy consumption, and record it as the metering difference coefficient. Set a metering difference coefficient threshold. When the metering difference coefficient is greater than or equal to the metering difference coefficient threshold, replace the energy meter. When the metering difference coefficient is less than the metering difference coefficient threshold, do not replace the energy meter.
[0042] The technical effects and advantages of the dynamic correction method for oil well power metering errors based on edge computing in this invention are as follows:
[0043] 1. Deploy edge computing devices based on the judgment results to ensure that each oil well is managed by an edge computing device while minimizing the number of edge computing devices, thereby saving resources and reducing costs. By using edge computing devices for decentralized processing, centralized processing is avoided, thus saving time and reducing errors in the processing process.
[0044] 2. By obtaining the monitoring time point of power factor mutation through the mutation amplitude coefficient, it is determined whether the measurement error at the monitoring time point of power factor mutation is within the allowable error range. Based on the judgment result, correction is made so that the difference between the corrected power consumption and the actual power consumption is minimal, that is, the corrected power consumption is approximately equal to the actual power consumption, thereby greatly reducing the measurement error and making the corrected power consumption more accurate. This ensures accurate cost accounting, normal oil well load scheduling, and reduces potential risks in oil well operation.
[0045] 3. Temperature compensation is applied to the active power of the oil well based on the change in initial temperature during the monitoring period, thereby eliminating the influence of temperature on the active power of the oil well and making the final corrected power consumption more accurate, thus ensuring the normal operation of the oil well. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the dynamic correction method for oil well power metering error based on edge computing according to the present invention;
[0047] Figure 2 This is a schematic diagram of the dynamic correction system for oil well power metering errors based on edge computing according to the present invention;
[0048] Figure 3 This is a flowchart illustrating the process of determining whether to replace the electricity meter according to the present invention. Detailed Implementation
[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] Example 1
[0051] Please see Figure 1 and Figure 3As shown in this embodiment, the dynamic correction method for oil well power metering errors based on edge computing includes:
[0052] Step S1: Obtain the latitude and longitude of the oil wells in the monitoring area, construct an oil well distribution map based on the latitude and longitude of the oil wells, obtain the Euclidean distance between the oil well location mapping points in the oil well distribution map, and determine whether there is a first correlation relationship and a second correlation relationship between the oil well location mapping points based on the Euclidean distance between the oil well location mapping points and the communication distance of the edge computing device, and deploy the edge computing device based on the judgment result.
[0053] Step S2: Obtain the initial power consumption, initial active power, initial apparent power, and initial temperature of the oil well during the monitoring period through edge computing devices. Obtain the initial power factor based on the initial active power and initial apparent power, construct a line graph of the initial power factor change, and obtain the abrupt change amplitude coefficient based on the line graph of the initial power factor change.
[0054] Step S3: Correct the corresponding initial active power according to the mutation amplitude coefficient to obtain the mutation-corrected active power;
[0055] Step S4: Based on the change in initial temperature during the monitoring period, perform temperature compensation on the change correction active power of the oil well to obtain the temperature correction active power. Based on the temperature correction active power, obtain the final corrected energy consumption. Based on the final corrected energy consumption and the initial energy consumption, determine whether to replace the energy meter.
[0056] The process of obtaining the latitude and longitude of oil wells within the monitoring area and constructing an oil well distribution map based on these coordinates includes:
[0057] An oil well data acquisition terminal is set up to collect the latitude and longitude of oil wells. The oil well data acquisition terminal obtains the latitude and longitude of each oil well in the monitoring area of the oilfield database. The latitude and longitude of the oil wells are converted into UTM (x, y) coordinates (unit: meters). A two-dimensional coordinate system is constructed. The two-dimensional rectangular coordinate system consists of the UTM x axis and the UTM y axis. The UTM (x, y) coordinates of the oil wells are mapped into the two-dimensional coordinate system to obtain the oil well location mapping points. One oil well location mapping point represents one oil well, thereby obtaining an oil well distribution map.
[0058] The process of obtaining the Euclidean distance between oil well location mapping points on the oil well distribution map, determining whether there is a first correlation and a second correlation between the oil well location mapping points based on the Euclidean distance between the oil well location mapping points and the communication distance of the edge computing device, and deploying the edge computing device based on the determination results includes:
[0059] Calculate the Euclidean distance between each well location mapping point and the remaining well location mapping points. For example, the coordinates of a well location mapping point are... The coordinates of the other oil well location mapping point are The Euclidean distance between the two well locations is ;
[0060] The communication distance of the edge computing device is obtained. Based on the Euclidean distance between each oil well location mapping point and the other oil well location mapping points, and the communication distance of the edge computing device, it is determined whether there is a first association relationship between the oil well location mapping points. If the Euclidean distance between two oil well location mapping points is less than the communication distance of the edge computing device, then there is a first association relationship between the two oil well location mapping points. If the Euclidean distance between two oil well location mapping points is greater than or equal to the communication distance of the edge computing device, then there is no first association relationship between the two oil well location mapping points.
[0061] The edge computing device is used to receive the initial power consumption, initial active power, initial apparent power, and initial temperature of the oil well within its communication range;
[0062] Step A1: For each well location mapping point, obtain the number of well location mapping points with the first association relationship with it, and record it as the association number of the well location mapping point. Obtain the well location mapping point with the most associations. Deploy an edge computing device at the location corresponding to the well location mapping point with the most associations. If there are multiple well location mapping points with the most associations, randomly select the well location mapping point with the most associations and deploy an edge computing device at the location corresponding to the randomly selected well location mapping point with the most associations.
[0063] Step A2: Delete the oil well location mapping points covered by the communication distance of the edge computing device, and re-determine whether there is a first association relationship between the oil well location mapping points. Obtain the oil well location mapping point with the most associations and record it as the second oil well location mapping point. Deploy an edge computing device at the location corresponding to the second oil well location mapping point. If there are multiple second oil well location mapping points, randomly select a second oil well location mapping point and deploy an edge computing device at the location corresponding to the randomly selected second oil well location mapping point.
[0064] Step A3: Repeat step A2 until the remaining oil well location mapping points do not have a first association relationship. Determine whether the remaining oil well location mapping points have a second association relationship based on the Euclidean distance between the remaining oil well location mapping points and the communication distance of the edge computing device. If the Euclidean distance between two remaining oil well location mapping points is less than twice the communication distance of the edge computing device, then the two remaining oil well location mapping points have a second association relationship. If the Euclidean distance between two remaining oil well location mapping points is greater than or equal to twice the communication distance of the edge computing device, then the two remaining oil well location mapping points do not have a second association relationship.
[0065] Step A4: Randomly select two well location mapping points with a second correlation relationship, and deploy an edge computing device at the midpoint between the two wells corresponding to the two randomly selected well location mapping points with a second correlation relationship.
[0066] Step A5: Delete the oil well location mapping points covered by the communication distance of the edge computing device, and re-determine whether there is a second association relationship between the oil well location mapping points. Randomly select two oil well location mapping points with a second association relationship, and record them as the third oil well location mapping point and the fourth oil well location mapping point, respectively. Deploy an edge computing device at the midpoint between the oil well corresponding to the third oil well location mapping point and the oil well corresponding to the fourth oil well location mapping point.
[0067] Step A6: Repeat step A5 until there is no second association between the remaining oil well location mapping points. At the location corresponding to each remaining oil well location mapping point, deploy an edge computing device.
[0068] It should be explained that, given the large number of oil wells, centralized processing of their power consumption is time-consuming and prone to errors. Therefore, this invention utilizes edge computing devices for decentralized processing, thereby reducing the processing time for oil well power consumption and further minimizing errors. Furthermore, deploying an edge computing device at each oil well would significantly increase costs and waste resources. Therefore, this invention deploys edge computing devices based on their communication distance, ensuring that the number of oil wells managed by each device is maximized within that distance. This ensures that each oil well is managed by an edge computing device while minimizing the number of edge computing devices, thus greatly reducing costs and unnecessary resource waste.
[0069] The process of acquiring the initial power consumption, initial active power, initial apparent power, and initial temperature of an oil well within a monitoring period using edge computing devices includes:
[0070] An energy meter is installed at the corresponding location of the oil well. The initial energy consumption, initial active power, and initial apparent power of the oil well during the monitoring period are measured by the energy meter. The initial energy consumption, initial active power, and initial apparent power of the oil well during the monitoring period are sent to the corresponding edge computing device. The edge computing device receives the data and obtains the initial energy consumption, initial active power, and initial apparent power of the oil well during the monitoring period. The initial temperature at the location of the energy meter during the monitoring period is obtained by a temperature sensor. The initial temperature at the location of the energy meter during the monitoring period is sent to the corresponding edge computing device. The edge computing device receives the data and obtains the initial temperature at the location of the energy meter during the monitoring period.
[0071] The process of obtaining the initial power factor based on the initial active power and initial apparent power includes:
[0072] The monitoring period was evenly divided into... The system monitors each time point and obtains the initial active power, initial apparent power, and initial temperature at each time point. The initial active power at each time point is divided by the initial apparent power at the corresponding time point to obtain the initial power factor at each time point.
[0073] The process of constructing a line graph of the initial power factor change includes:
[0074] Establish a blank two-dimensional rectangular coordinate system, set the horizontal axis of the blank two-dimensional rectangular coordinate system to time, set the vertical axis of the blank two-dimensional rectangular coordinate system to the initial power factor, and fill the initial power factor at each monitoring time point into the blank two-dimensional rectangular coordinate system to obtain the initial power factor mapping point. Connect the initial power factor mapping points in time order with straight lines to obtain the initial power factor change line graph.
[0075] The process of obtaining the abrupt change magnitude coefficient based on the initial power factor change line graph includes:
[0076] Starting from the second initial power factor mapping point, draw a line parallel to the vertical axis through the initial power factor mapping point and mark it as the first vertical axis parallel line. Draw a line parallel to the horizontal axis through the previous initial power factor mapping point and mark it as the first horizontal axis parallel line. Mark the intersection of the first vertical axis parallel line and the first horizontal axis parallel line as the first intersection point. Obtain the area of the right triangle formed by the first intersection point, the initial power factor mapping point, and the previous initial power factor mapping point. Use the area of the right triangle as the abrupt change amplitude coefficient of the initial power factor mapping point. Continue until the last initial power factor mapping point.
[0077] It should be explained that, let the first intersection point be denoted as A, the initial power factor mapping point be denoted as B, and the previous initial power factor mapping point be denoted as C. The area of the right triangle formed by the first intersection point, the initial power factor mapping point, and the previous initial power factor mapping point is equal to the area of the right triangle with AB and AC as the legs and BC as the hypotenuse.
[0078] The process of correcting the initial active power based on the abrupt change amplitude coefficient to obtain the abrupt change corrected active power includes:
[0079] Set a threshold for the mutation amplitude coefficient. The threshold for the mutation amplitude coefficient can be set through experimental data analysis or experience. When the mutation amplitude coefficient of the initial power factor mapping point is greater than or equal to the threshold for the mutation amplitude coefficient, the initial power factor mapping point is recorded as a candidate corrected power factor mapping point.
[0080] Obtain the historical load percentage and its corresponding historical power factor. Fit the historical load percentage and its corresponding historical power factor using curve fitting methods to obtain the relationship between the historical load percentage and its corresponding historical power factor: ;
[0081] in, Let be the load percentage, and a, b, and c be parameters obtained by curve fitting using historical load percentages and their corresponding historical power factors. Indicates the load percentage. The historical power factor corresponding to the time;
[0082] It should be explained that the historical load percentage and its corresponding historical power factor are obtained from the oilfield database. The historical power factor corresponding to the historical load percentage is the actual and accurate power factor. The higher the historical load percentage, the more load the oil well has, the greater the active power, and the higher the historical power factor. For example, the historical power factor corresponding to a historical load percentage of 20% is 0.5, the historical power factor corresponding to a historical load percentage of 60% is 0.78, and the historical power factor corresponding to a historical load percentage of 80% is 0.85. In oil well power metering, the power factor is greatly affected by the load. Therefore, the historical load percentage and its corresponding historical power factor are fitted to obtain a relationship, and the theoretical power factor corresponding to the corresponding load percentage is obtained through the relationship.
[0083] Obtain the load percentage at the monitoring time point corresponding to the candidate corrected power factor mapping point, input the load percentage at the monitoring time point corresponding to the candidate corrected power factor mapping point into the relationship between the historical load percentage and its corresponding historical power factor, and obtain the corresponding theoretical power factor.
[0084] It should be explained that the load percentage at the monitoring time point corresponding to the candidate corrected power factor mapping point is obtained from the oilfield database;
[0085] Obtain the absolute value of the difference between the initial power factor and the corresponding theoretical power factor corresponding to the candidate modified power factor mapping point, and denot it as the difference coefficient of the candidate modified power factor mapping point;
[0086] Set a difference coefficient threshold, which can be set through experimental data analysis or experience. Obtain candidate power factor mapping points with difference coefficients greater than or equal to the difference coefficient threshold, and record them as power factor mapping points to be corrected. Record the initial active power at the monitoring time point corresponding to the power factor mapping point to be corrected as the active power to be corrected. Replace the initial power factor corresponding to the power factor mapping point to be corrected with the corresponding theoretical power factor, and record it as the replacement power factor.
[0087] Multiply the replacement power factor corresponding to the mapping point of the power factor to be corrected by the initial apparent power to obtain the corresponding replacement active power. Replace the active power to be corrected with the corresponding replacement active power. Record the initial active power and replacement active power at each monitoring time point as the mutation correction active power.
[0088] It needs to be explained that the apparent power is obtained by multiplying the voltage and current, and the active power is obtained by multiplying the result of multiplying the voltage and current by the power factor. Therefore, the alternative active power is obtained by multiplying the initial apparent power by the alternative power factor.
[0089] It should be explained that during oil well operation, the well load constantly changes, causing fluctuations in the power factor. When the load undergoes a sudden change (such as motor startup or switching of sucker rod operating mode), the power factor will change significantly, potentially leading to measurement errors. This can result in a large discrepancy between the actual and measured power consumption, leading to significant deviations in cost accounting, imbalances in well load scheduling, and potential hazards in well operation. Therefore, this invention uses a sudden change amplitude coefficient to obtain the monitoring time point where the power factor changes abruptly. It then determines whether the measurement error at the monitoring time point is within the allowable error range and corrects it based on the judgment result. This ensures that the difference between the corrected power consumption and the actual power consumption is minimal, meaning the corrected power consumption is approximately equal to the actual power consumption. This significantly reduces measurement errors, making the corrected power consumption more accurate. Consequently, it ensures accurate cost accounting, normal well load scheduling, reduces potential hazards in well operation, and ensures the normal operation of the oil well.
[0090] The process of obtaining temperature-corrected active power by performing temperature compensation on the abrupt change correction active power of the oil well based on the initial temperature change during the monitoring period includes:
[0091] The active power at each monitoring time point is adjusted for temperature changes according to the temperature compensation formula to obtain the temperature-compensated active power, which is then recorded as the temperature-corrected active power. ;
[0092] The temperature compensation formula is: ;
[0093] For monitoring time point indexes, , For the first Temperature-corrected active power at each monitoring time point For the first Active power corrected for mutations at each monitoring time point This is the temperature compensation coefficient, obtained through experimental measurement. For the first The initial temperature at each monitoring time point Set as reference temperature ;
[0094] The process of obtaining the final corrected energy consumption based on temperature-corrected active power includes:
[0095] The temperature-corrected active power is integrated over the monitoring period to obtain the final corrected energy consumption.
[0096] The process of determining whether to replace the electricity meter based on the final revised electricity consumption and the initial electricity consumption includes:
[0097] Obtain the absolute value of the difference between the final corrected energy consumption and the initial energy consumption, and record it as the metering difference coefficient. Set the metering difference coefficient threshold, which can be set through experimental data analysis or experience. When the metering difference coefficient is greater than or equal to the metering difference coefficient threshold, replace the energy meter. When the metering difference coefficient is less than the metering difference coefficient threshold, do not replace the energy meter.
[0098] In this embodiment, edge computing devices are deployed based on the judgment results, ensuring that each oil well has one edge computing device while minimizing the number of edge computing devices, thereby saving resources and reducing costs. Distributed processing via edge computing devices avoids centralized processing, saving time and reducing errors during processing. The monitoring time point of power factor abrupt change is obtained through the abrupt change amplitude coefficient. It is then determined whether the measurement error at the monitoring time point of the power factor abrupt change is within the allowable error range. Corrections are made based on the judgment results, minimizing the difference between the corrected energy consumption and the actual energy consumption; that is, the corrected energy consumption is approximately equal to the actual energy consumption, thus greatly reducing measurement errors and making the corrected energy consumption more accurate. This ensures accurate cost accounting, normal oil well load scheduling, and reduces potential risks in oil well operation. Temperature compensation is applied to the abrupt change correction active power of the oil well based on the initial temperature changes during the monitoring period, eliminating the influence of temperature on the abrupt change correction active power of the oil well, making the final corrected energy consumption more accurate, and ensuring the normal operation of the oil well.
[0099] Example 2
[0100] Please see Figure 2 As shown, parts not described in detail in this embodiment are described in Embodiment 1. An edge computing-based dynamic correction system for oil well power metering errors is provided, including:
[0101] The equipment deployment component is responsible for acquiring the latitude and longitude of oil wells within the monitoring area, constructing an oil well distribution map based on the latitude and longitude of the oil wells, and deploying edge computing equipment based on the oil well distribution map;
[0102] The coefficient acquisition component is responsible for acquiring the initial power consumption, initial active power, initial apparent power, and initial temperature of the oil well during the monitoring period through edge computing devices. Based on the initial active power and initial apparent power, it obtains the initial power factor, constructs a line graph of the initial power factor change, and obtains the abrupt change amplitude coefficient based on the line graph of the initial power factor change.
[0103] The power correction component is responsible for correcting the corresponding initial active power according to the mutation amplitude coefficient to obtain the mutation-corrected active power.
[0104] The metering correction component is responsible for temperature compensation of the active power of the oil well based on the change of initial temperature during the monitoring period, obtaining the temperature-corrected active power, obtaining the final corrected energy consumption based on the temperature-corrected active power, and determining whether to replace the energy meter based on the final corrected energy consumption and the initial energy consumption.
[0105] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0106] In the several embodiments provided by this invention, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only one method, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0107] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
[0108] In conclusion, 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, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A dynamic correction method for oil well power metering errors based on edge computing, characterized in that, The dynamic correction method for oil well power metering errors based on edge computing includes: Step S1: Obtain the latitude and longitude of the oil wells in the monitoring area, construct an oil well distribution map based on the latitude and longitude of the oil wells, obtain the Euclidean distance between the oil well location mapping points in the oil well distribution map, and determine whether there is a first correlation relationship and a second correlation relationship between the oil well location mapping points based on the Euclidean distance between the oil well location mapping points and the communication distance of the edge computing device, and deploy the edge computing device based on the judgment result. Step S2: Obtain the initial power consumption, initial active power, initial apparent power, and initial temperature of the oil well during the monitoring period through edge computing devices. Obtain the initial power factor based on the initial active power and initial apparent power, construct a line graph of the initial power factor change, and obtain the abrupt change amplitude coefficient based on the line graph of the initial power factor change. The method for constructing the initial power factor variation line graph includes: Establish a blank two-dimensional rectangular coordinate system, set the horizontal axis of the blank two-dimensional rectangular coordinate system to time, set the vertical axis of the blank two-dimensional rectangular coordinate system to the initial power factor, and fill the initial power factor at each monitoring time point into the blank two-dimensional rectangular coordinate system to obtain the initial power factor mapping point. Connect the initial power factor mapping points in time order with straight lines to obtain the initial power factor change line graph. The method for obtaining the abrupt change amplitude coefficient based on the initial power factor change piecewise linear graph includes: Starting from the second initial power factor mapping point, draw a line parallel to the vertical axis through the initial power factor mapping point and call it the first vertical axis parallel line. Draw a line parallel to the horizontal axis through the previous initial power factor mapping point and call it the first horizontal axis parallel line. The intersection of the first vertical axis parallel line and the first horizontal axis parallel line is recorded as the first intersection point. The area of the right triangle formed by the first intersection point, the initial power factor mapping point, and the previous initial power factor mapping point is obtained. The area of the right triangle is used as the mutation amplitude coefficient of the initial power factor mapping point, until the last initial power factor mapping point ends. Step S3: Correct the corresponding initial active power according to the mutation amplitude coefficient to obtain the mutation-corrected active power; Step S4: Based on the change in initial temperature during the monitoring period, perform temperature compensation on the change correction active power of the oil well to obtain the temperature correction active power. Based on the temperature correction active power, obtain the final corrected energy consumption. Based on the final corrected energy consumption and the initial energy consumption, determine whether to replace the energy meter.
2. The method for dynamic correction of oil well power metering error based on edge computing according to claim 1, characterized in that, The method for constructing an oil well distribution map based on the latitude and longitude of oil wells includes: The latitude and longitude of the oil wells are converted into UTM(x,y) coordinates to construct a two-dimensional coordinate system. The two-dimensional rectangular coordinate system consists of the UTM x axis and the UTM y axis. The UTM(x,y) coordinates of the oil wells are mapped into the two-dimensional coordinate system to obtain the oil well location mapping points. One oil well location mapping point represents one oil well, thus obtaining an oil well distribution map.
3. The method for dynamic correction of oil well power metering error based on edge computing according to claim 2, characterized in that, The method for deploying edge computing devices based on the judgment result includes: Step A1: Determine whether there is a first association relationship between the oil well location mapping points. For each oil well location mapping point, obtain the number of oil well location mapping points that have a first association relationship with it, and record it as the association number of the oil well location mapping point. Deploy an edge computing device at the location corresponding to the oil well location mapping point with the most associations. If there are multiple oil well location mapping points with the most associations, randomly select the location corresponding to the oil well location mapping point with the most associations and deploy an edge computing device. Step A2: Delete the oil well location mapping points covered by the communication distance of the edge computing device, and re-determine whether there is a first association relationship between the oil well location mapping points. Obtain the oil well location mapping point with the most associations and record it as the second oil well location mapping point. Deploy an edge computing device at the location corresponding to the second oil well location mapping point. If there are multiple second oil well location mapping points, randomly select the location corresponding to the second oil well location mapping point and deploy an edge computing device. Step A3: Repeat step A2 until the remaining oil well location mapping points do not have a first association relationship. Determine whether the remaining oil well location mapping points have a second association relationship. If the Euclidean distance between two remaining oil well location mapping points is less than twice the communication distance of the edge computing device, then the two remaining oil well location mapping points have a second association relationship. Otherwise, the two remaining oil well location mapping points do not have a second association relationship. Step A4: Randomly select two well location mapping points with a second correlation relationship, and deploy an edge computing device at the midpoint between the two wells corresponding to the two randomly selected well location mapping points with a second correlation relationship. Step A5: Delete the oil well location mapping points covered by the communication distance of the edge computing device, and re-determine whether there is a second association relationship between the oil well location mapping points. Randomly select two oil well location mapping points with a second association relationship, and record them as the third oil well location mapping point and the fourth oil well location mapping point, respectively. Deploy an edge computing device at the midpoint between the oil well corresponding to the third oil well location mapping point and the oil well corresponding to the fourth oil well location mapping point. Step A6: Repeat step A5 until there is no second association between the remaining oil well location mapping points. At the location corresponding to each remaining oil well location mapping point, deploy an edge computing device.
4. The method for dynamic correction of oil well power metering error based on edge computing according to claim 3, characterized in that, The method for determining whether there is a first correlation relationship between oil well location mapping points includes: If the Euclidean distance between two well location mapping points is less than the communication distance of the edge computing device, then the two well location mapping points have a first association relationship. If the Euclidean distance between two well location mapping points is greater than or equal to the communication distance of the edge computing device, then the two well location mapping points do not have a first association relationship.
5. The method for dynamic correction of oil well power metering error based on edge computing according to claim 4, characterized in that, The method for obtaining the initial power factor based on the initial active power and the initial apparent power includes: The monitoring period was evenly divided into... The system monitors each time point and obtains the initial active power, initial apparent power, and initial temperature at each time point. The initial active power at each time point is divided by the initial apparent power at the corresponding time point to obtain the initial power factor at each time point.
6. The method for dynamic correction of oil well power metering error based on edge computing according to claim 5, characterized in that, The method for correcting the corresponding initial active power based on the mutation amplitude coefficient to obtain the mutation-corrected active power includes: Set a threshold for the mutation amplitude coefficient. When the mutation amplitude coefficient of the initial power factor mapping point is greater than or equal to the threshold for the mutation amplitude coefficient, the initial power factor mapping point is recorded as a candidate corrected power factor mapping point. Obtain the historical load percentage and its corresponding historical power factor. Fit the historical load percentage and its corresponding historical power factor using the curve fitting method to obtain the relationship between the historical load percentage and its corresponding historical power factor. Obtain the load percentage at the monitoring time point corresponding to the candidate corrected power factor mapping point, input the load percentage at the monitoring time point corresponding to the candidate corrected power factor mapping point into the relationship between the historical load percentage and its corresponding historical power factor, and obtain the corresponding theoretical power factor. Obtain the absolute value of the difference between the initial power factor and the corresponding theoretical power factor corresponding to the candidate modified power factor mapping point, and denot it as the difference coefficient of the candidate modified power factor mapping point; Set a difference coefficient threshold, obtain candidate power factor mapping points with difference coefficients greater than or equal to the difference coefficient threshold, and record them as power factor mapping points to be corrected. Record the initial active power at the monitoring time point corresponding to the power factor mapping point to be corrected as the active power to be corrected. Replace the initial power factor corresponding to the power factor mapping point to be corrected with the corresponding theoretical power factor and record it as the replacement power factor. Multiply the replacement power factor corresponding to the mapping point of the power factor to be corrected by the initial apparent power to obtain the corresponding replacement active power. Replace the active power to be corrected with the corresponding replacement active power. Record the initial active power and replacement active power at each monitoring time point as the mutation correction active power.
7. The method for dynamic correction of oil well power metering error based on edge computing according to claim 6, characterized in that, The method for obtaining temperature-corrected active power by temperature compensation of the abrupt change correction active power of the oil well based on the change of initial temperature during the monitoring period includes: Temperature compensation is applied to the abrupt change-corrected active power at each monitoring time point to obtain the temperature-compensated active power, which is then recorded as the temperature-corrected active power. ; in, ; For monitoring time point indexes, , For the first Temperature-corrected active power at each monitoring time point For the first Active power corrected for mutations at each monitoring time point This is the temperature compensation coefficient. For the first The initial temperature at each monitoring time point This is a reference temperature.
8. The method for dynamic correction of oil well power metering error based on edge computing according to claim 7, characterized in that, The method for obtaining the final corrected energy consumption based on temperature-corrected active power, and determining whether to replace the energy meter based on the final corrected energy consumption and the initial energy consumption, includes: The temperature-corrected active power is integrated over the monitoring period to obtain the final corrected energy consumption. Obtain the absolute value of the difference between the final corrected energy consumption and the initial energy consumption, and record it as the metering difference coefficient. Set a metering difference coefficient threshold. When the metering difference coefficient is greater than or equal to the metering difference coefficient threshold, replace the energy meter. When the metering difference coefficient is less than the metering difference coefficient threshold, do not replace the energy meter.
Citation Information
Patent Citations
Method and device for configuring working parameters of oil well
CN108959747A
Virtual power plant real-time adjustment capability evaluation method and system
CN119602395A
COP protein design tool
US20060121455A1