Method, device and equipment for controlling running speed of plunger in shaft and medium

By acquiring the number of plungers passing through the tubing and real-time acceleration, and combining this with tubing length and acceleration correction, the problem of plunger displacement estimation error was solved, enabling precise control of the plunger running speed in the wellbore and avoiding equipment damage.

CN120946552APending Publication Date: 2025-11-14BEIJING JINSHI JIAYUAN TECH DEV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511111473.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

In existing technologies, the method of estimating plunger displacement by acceleration integration is easily affected by interference, resulting in inaccurate judgment of the distance between the plunger and the bottom of the wellbore, and making it impossible to reliably control the plunger running speed.

Method used

By acquiring the number of tubing segments the plunger passes through and the real-time acceleration, and combining the tubing length and acceleration correction, the distance between the plunger and the bottom of the wellbore is calculated, and a speed control signal is generated to dynamically adjust the plunger speed.

Benefits of technology

It improves the initial positioning accuracy and anti-interference capability of the plunger's running trajectory, ensuring that the plunger actively decelerates when approaching the bottom of the wellbore, thus avoiding equipment damage caused by impact.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120946552A_ABST
    Figure CN120946552A_ABST
Patent Text Reader

Abstract

The invention relates to a control method, device and equipment for the running speed of a plunger in a shaft and a medium. The control method for the running speed of the plunger in the shaft comprises the steps that the first number value of an oil pipe penetrated by the plunger is obtained, and the first distance value between the plunger and a starting point is determined according to the first number value; the real-time acceleration of the plunger is obtained, the real-time acceleration is corrected, and a second distance value of the plunger moving in the oil pipe is calculated; determining a third distance value between the plunger and the end point based on the first distance value and the second distance value; and generating a speed control signal according to the third distance value, wherein the speed control signal is used for controlling the running speed of the plunger. The method has the advantages that displacement errors calculated through acceleration are avoided as much as possible, the judgment precision of the distance between the plunger and the bottom of a shaft is improved, and the running speed of the plunger is accurately controlled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of plunger speed control, and in particular to a method, device, equipment and medium for controlling the running speed of a plunger in a wellbore. Background Technology

[0002] Currently, plunger drainage is a common method for wellbore drainage. By inserting a plunger into the wellbore and driving it upwards, the plunger helps to drain the accumulated fluid, thus maintaining a stable working environment inside the wellbore. During the drainage process, especially when the plunger is near the bottom of the wellbore, precise control of the plunger's speed is necessary to prevent structural damage due to impact.

[0003] Existing plunger speed control methods typically rely solely on accelerometers mounted on the plunger to obtain its acceleration. The plunger displacement is then estimated by integrating this acceleration over time, indirectly calculating the remaining distance between the plunger and the bottom of the wellbore. However, due to the complex environment within the wellbore, the plunger is susceptible to interference from pipe walls, mechanical impacts, or fluid fluctuations during operation. Accelerometers are easily disturbed, leading to abnormal acceleration data. Directly integrating these abnormal accelerations results in displacement values ​​that deviate from reality, further affecting the assessment of the remaining plunger travel distance and hindering effective plunger speed control.

[0004] The existing technical solutions mentioned above have the following drawbacks: estimating displacement solely through acceleration integration is susceptible to interference and errors, leading to inaccurate judgment of the distance between the plunger and the bottom of the wellbore, and making it impossible to reliably control the plunger's running speed. Therefore, there is room for improvement. Summary of the Invention

[0005] In order to minimize errors in displacement calculations based on acceleration, improve the accuracy of distance judgment between the plunger and the bottom of the wellbore, and precisely control the plunger's running speed, this application provides a method, device, equipment, and medium for controlling the running speed of a plunger in a wellbore.

[0006] The above-mentioned objective of this application is achieved through the following technical solution: A method for controlling the running speed of a plunger in a wellbore, the method comprising: Obtain a first quantity value of the oil pipe through which the plunger passes, and determine a first distance value between the plunger and the starting point based on the first quantity value; The real-time acceleration of the plunger is obtained, the real-time acceleration is corrected, and the second distance value of the plunger's movement in the oil pipe is calculated. A third distance value between the plunger and the endpoint is determined based on the first distance value and the second distance value; A speed control signal is generated based on the third distance value, and the speed control signal is used to control the operating speed of the plunger.

[0007] By adopting the above technical solution, by obtaining the number of tubing segments the plunger passes through and combining this with the tubing length to determine the first distance between the plunger and the starting point, an initial reference position can be provided, avoiding the complete reliance on integral accumulation to estimate displacement, thereby improving the initial positioning accuracy of the plunger's trajectory. By obtaining the plunger's real-time acceleration and correcting it before calculating the second distance between the plunger and the tubing, noise and drift issues in the sensor data can be effectively corrected, improving the accuracy of displacement calculation and ensuring the reliability of subsequent positioning data. By jointly calculating the third distance between the plunger and the endpoint based on the first and second distance values, multi-source displacement data can be integrated to improve the robustness of the overall distance assessment, thereby more accurately grasping the current operating status of the plunger. By generating a control signal for speed control based on the third distance value, dynamic adjustment of the plunger's operating speed can be achieved, thereby actively reducing the speed when the plunger approaches the bottom of the wellbore to avoid equipment damage caused by impact.

[0008] In one example, this application can be further configured such that the correction of the real-time acceleration includes: Calculate the standard deviation and average value of the accelerations of multiple real-time accelerations within a preset time window; The abnormal real-time acceleration is determined based on the acceleration standard deviation; Replace the abnormal real-time acceleration with the average acceleration value.

[0009] By adopting the above technical solution, and by calculating the standard deviation and average value of multiple real-time accelerations within a preset time window, the fluctuation level of the current acceleration data can be quantified and statistical references can be provided, thereby identifying data stability and providing a basis for subsequent corrections. By identifying abnormal accelerations based on the standard deviation of acceleration, it is possible to judge whether the sensor output deviates abnormally as a whole, thereby improving the ability to filter abnormal data. By replacing abnormal real-time accelerations with the average value of acceleration, the impact of instantaneous interference on data continuity can be eliminated, thereby improving the accuracy and stability of displacement calculation.

[0010] In one example, this application can be further configured such that the real-time acceleration that is determined to be abnormal based on the acceleration standard deviation includes: Determine whether the standard deviation of the acceleration is greater than the preset standard deviation; If the acceleration standard deviation is greater than the preset standard deviation, then the median of the accelerations of the multiple real-time accelerations within the preset window is determined; Calculate the deviation between each real-time acceleration and the median acceleration within the preset time window; Determine whether the deviation value is greater than a preset deviation value; If the deviation value is greater than the preset deviation value, the corresponding real-time acceleration is marked as an abnormal value.

[0011] By adopting the above technical solutions, it is possible to quickly determine whether there are drastic fluctuations or interferences in the current window data by judging whether the standard deviation of acceleration is greater than the preset standard deviation, thereby improving the sensitivity of anomaly identification; by extracting the median of acceleration if the standard deviation of acceleration exceeds the limit, it is possible to avoid the mean being affected by individual extreme values, thus providing a more robust central value reference; by calculating the deviation value of each acceleration data point from the median, it is possible to specifically quantify the degree of deviation of the data point from the central trend, thereby providing a clear criterion for anomaly identification; by judging whether the deviation value is greater than the set threshold and marking those exceeding the threshold as outliers, it is possible to accurately filter out outlier data points, thereby improving the accuracy and robustness of acceleration correction.

[0012] In one example, this application can be further configured such that, prior to obtaining the first quantity value of the tubing through which the plunger passes, the following steps are included: At the starting point, the plunger acquires a second value of static acceleration; Determine whether each of the stated static accelerations is greater than a preset static acceleration, and mark the static accelerations that are greater than the preset static accelerations as compensation accelerations; Calculate the average compensation value of the multiple compensated accelerations; The real-time acceleration is compensated using the compensated average value.

[0013] By adopting the above technical solution, the static acceleration is collected by the plunger at the starting point, and the zero-point offset of the sensor can be extracted using the data characteristics in the non-motion state, thus providing a reference for subsequent compensation. By determining whether the static acceleration is greater than a preset threshold and marking it as compensation acceleration, representative drift samples can be screened, thereby improving the effectiveness of the compensation value. By averaging multiple compensation accelerations, the error caused by occasional fluctuations can be smoothed, thereby calculating a robust correction amount. By using the compensation average to correct the real-time acceleration, the overall error caused by static zero bias can be eliminated, thereby enhancing the accuracy of subsequent displacement calculations at low speeds or in the starting phase.

[0014] In one example, this application can be further configured such that, prior to compensating the real-time acceleration using the compensation average, it also includes: Calculate the third quantitative value of the compensated acceleration, and determine the ratio between the third quantitative value and the second quantitative value; Determine whether the ratio value is greater than a preset ratio value; If the ratio value is greater than the preset ratio value, then the real-time acceleration is compensated. If the ratio value is not greater than the preset ratio value, then compensation for the real-time acceleration is stopped.

[0015] By adopting the above technical solution, the severity of sensor offset can be assessed by statistically analyzing the number of compensated acceleration values ​​and proportionally dividing them with the total number of stationary samples, thereby determining whether a systematic error exists. By determining whether this proportion exceeds a set threshold, unnecessary correction operations can be avoided when actual interference is small, thus improving algorithm efficiency. By performing compensation operations when the proportion exceeds the limit, necessary data correction can be ensured when the offset is significant, thereby avoiding the accumulation of measurement errors that affect the speed control results. By not performing compensation processing when the proportion does not exceed the limit, the system's computational overhead can be reduced and the overall measurement stability can be avoided due to miscompensation caused by a small number of abnormal samples.

[0016] In one example, this application can be further configured such that: obtaining the first quantity value of the oil pipe through which the plunger passes includes: obtaining the number of induction signals generated when the plunger passes through the oil pipe coupling, and determining the first quantity value based on the number of induction signals.

[0017] By adopting the above technical solution, by obtaining the number of induction signals generated when the plunger passes through the oil pipe coupling and determining the first quantity value accordingly, the plunger path can be calibrated by using specific location points in the physical structure. Thus, displacement estimation can be completed independently without relying on acceleration integration, effectively improving the positioning accuracy and anti-interference capability from the starting point of the plunger operation to the current position.

[0018] The second objective of this invention is achieved through the following technical solution: A wellbore plunger running speed control device, the device comprising: The distance acquisition module is used to acquire a first quantity value of the oil pipe through which the plunger passes, and to determine a first distance value between the plunger and the starting point based on the first quantity value. An acceleration correction module is used to acquire the real-time acceleration of the plunger, correct the real-time acceleration, and calculate the second distance value of the plunger's movement in the oil pipe. A distance calculation module is used to determine a third distance value between the plunger and the endpoint based on the first distance value and the second distance value; A speed control module is used to generate a speed control signal based on the third distance value, the speed control signal being used to control the operating speed of the plunger.

[0019] By adopting the above technical solution, by obtaining the number of tubing segments the plunger passes through and combining this with the tubing length to determine the first distance between the plunger and the starting point, an initial reference position can be provided, avoiding the complete reliance on integral accumulation to estimate displacement, thereby improving the initial positioning accuracy of the plunger's trajectory. By obtaining the plunger's real-time acceleration and correcting it before calculating the second distance between the plunger and the tubing, noise and drift issues in the sensor data can be effectively corrected, improving the accuracy of displacement calculation and ensuring the reliability of subsequent positioning data. By jointly calculating the third distance between the plunger and the endpoint based on the first and second distance values, multi-source displacement data can be integrated to improve the robustness of the overall distance assessment, thereby more accurately grasping the current operating status of the plunger. By generating a control signal for speed control based on the third distance value, dynamic adjustment of the plunger's operating speed can be achieved, thereby actively reducing the speed when the plunger approaches the bottom of the wellbore to avoid equipment damage caused by impact.

[0020] The above-mentioned objective three of this application is achieved through the following technical solution: A computer device 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 steps of the above-described method for controlling the running speed of a plunger in a wellbore.

[0021] The fourth objective of this application is achieved through the following technical solution: A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method for controlling the running speed of a plunger in a wellbore.

[0022] In summary, this application includes the following beneficial technical effects: 1. By obtaining the number of tubing segments the plunger passes through and combining this with the tubing length to determine the first distance between the plunger and the starting point, an initial reference position can be provided, avoiding reliance on integral accumulation to estimate displacement and thus improving the initial positioning accuracy of the plunger's trajectory. 2. By obtaining the plunger's real-time acceleration and correcting it before calculating the second distance within the tubing, noise and drift issues in sensor data can be effectively corrected, improving the accuracy of displacement calculation and ensuring the reliability of subsequent positioning data. 3. By jointly calculating the third distance between the plunger and the endpoint based on the first and second distance values, multi-source displacement data can be integrated to improve the robustness of overall distance assessment, thereby more accurately grasping the plunger's current operating status. 4. By generating a control signal for speed control based on the third distance value, dynamic adjustment of the plunger's operating speed can be achieved, actively reducing speed when the plunger approaches the bottom of the wellbore to avoid equipment damage caused by impact. 2. By collecting the static acceleration at the starting point using the plunger, the zero-point offset of the sensor can be extracted using the data characteristics under non-motion conditions, thus providing a reference for subsequent compensation. By determining whether the static acceleration is greater than a preset threshold and marking it as compensation acceleration, representative drift samples can be screened, thereby improving the effectiveness of the compensation value. By averaging multiple compensation accelerations, the error caused by occasional fluctuations can be smoothed, thus calculating a robust correction amount. By using the compensation average to correct the real-time acceleration, the overall error caused by static zero bias can be eliminated, thereby enhancing the accuracy of subsequent displacement calculations at low speeds or in the starting phase. 3. By acquiring the number of induction signals generated when the plunger passes through the oil pipe coupling and determining the first quantity value accordingly, the plunger path can be calibrated using specific location points in the physical structure. This allows for displacement estimation without relying on acceleration integration, effectively improving the positioning accuracy and anti-interference capability from the plunger's starting point to its current position. Attached Figure Description

[0023] Figure 1 This is a flowchart of a method for controlling the running speed of a plunger in a wellbore according to an embodiment of this application; Figure 2 This is a flowchart illustrating the implementation of step S20 in a method for controlling the running speed of a plunger in a wellbore according to an embodiment of this application. Figure 3 This is a flowchart illustrating the implementation of step S202 in a method for controlling the running speed of a plunger in a wellbore according to an embodiment of this application. Figure 4 This is a flowchart of a method for controlling the running speed of a plunger in a wellbore according to an embodiment of this application, prior to step S10. Figure 5 This is a flowchart of a method for controlling the running speed of a plunger in a wellbore according to an embodiment of this application, prior to step S4; Figure 6 This is a flowchart illustrating the implementation of step S10 in a method for controlling the running speed of a plunger in a wellbore according to an embodiment of this application. Figure 7 This is a schematic block diagram of a plunger running speed control device in a wellbore according to one embodiment of this application; Figure 8 This is a schematic diagram of a device according to one embodiment of this application. Detailed Implementation

[0024] The present application will be further described in detail below with reference to the accompanying drawings.

[0025] In one embodiment, such as Figure 1 As shown, this application discloses a method for controlling the running speed of a plunger in a wellbore, which specifically includes the following steps: S10: Obtain the first quantity value of the oil pipe through which the plunger passes, and determine the first distance value between the plunger and the starting point based on the first quantity value.

[0026] In this embodiment, the starting point of the plunger can be the bottom or top of the wellbore, and the wellbore is formed by splicing multiple sections of tubing. Adjacent tubing sections are connected by tubing couplings, and the length of each section of tubing is the specified value.

[0027] In some specific embodiments, the length of the oil pipe can be 1 meter.

[0028] Specifically, when the plunger starts running from the wellbore starting point, the periodic characteristic signals generated during the plunger's movement along the wellbore are continuously detected. Each time a periodic characteristic signal is detected, it is determined that the plunger has passed through a section of tubing. The periodic characteristic signals are counted sequentially to obtain the first quantity value of the tubing passed by the plunger. Then, the first quantity value is multiplied by the standard length of a single section of tubing to obtain the cumulative running distance of the plunger along the wellbore direction since it started from the starting point, which is the first distance value.

[0029] S20: Obtain the real-time acceleration of the plunger, correct the real-time acceleration, and calculate the second distance value of the plunger's movement in the oil pipe.

[0030] In this embodiment, the initial velocity of the plunger at the starting point is 0, and the running time of the plunger in the wellbore is the time interval from the start of the plunger to the point when the plunger performs displacement calculation.

[0031] Specifically, the real-time acceleration data collected by the accelerometer is stored in a buffer at fixed time intervals. The instantaneous velocity of the plunger is calculated by time integration of each set of acceleration data based on the data acquisition frequency. The cumulative displacement of the plunger is obtained by integration again, which serves as the second distance value of the plunger in the current oil-saving pipe. Before integration, the collected acceleration data is calibrated to remove abnormal data with sudden changes or jumps, so as to avoid integration errors caused by noise or signal drift.

[0032] S30: Determine the third distance value between the plunger and the endpoint based on the first and second distance values.

[0033] Specifically, the total length of the tubing segment through which the plunger passes is taken as the first distance value, and the displacement of the plunger in the current tubing segment obtained by integration is taken as the second distance value. The sum of the two is the total displacement of the plunger since the start of operation. The third distance value between the plunger and the end point can be obtained by performing a difference calculation on the total displacement from the total length of the wellbore.

[0034] S40: Generates a speed control signal based on the third distance value. The speed control signal is used to control the operating speed of the plunger.

[0035] Specifically, after obtaining the third distance value between the plunger and the endpoint, it is determined whether the plunger has entered the speed reduction control range according to the preset deceleration control strategy. If it is determined that the plunger is close to the endpoint and the third distance value is less than the warning threshold, a speed control signal is generated. The control signal can be used to trigger upstream equipment to change the driving air pressure, slow down the upward speed of the plunger, or apply a buffer device to avoid the plunger hitting the bottom of the well. For example, when the third distance value is less than 10 meters, a linear deceleration control command is generated to reduce the speed from the current speed to the target safe speed at 0.2 meters per second.

[0036] By obtaining the number of tubing segments the plunger passes through and combining this with the tubing length to determine the first distance between the plunger and the starting point, an initial reference position can be provided, avoiding reliance on integral accumulation to estimate displacement and thus improving the initial positioning accuracy of the plunger's trajectory. By obtaining the plunger's real-time acceleration and correcting it before calculating the second distance within the tubing, noise and drift issues in sensor data can be effectively corrected, improving the accuracy of displacement calculation and ensuring the reliability of subsequent positioning data. By jointly calculating the third distance between the plunger and the endpoint based on the first and second distance values, multi-source displacement data can be integrated to improve the robustness of overall distance assessment, thereby more accurately grasping the plunger's current operating status. By generating a control signal for speed control based on the third distance value, dynamic adjustment of the plunger's operating speed can be achieved, thereby actively reducing speed when the plunger approaches the bottom of the wellbore to avoid equipment damage caused by impact.

[0037] In one embodiment, such as Figure 2 As shown, in step S20, the real-time acceleration is corrected, which specifically includes: S201: Calculate the standard deviation and average value of acceleration for multiple real-time accelerations within a preset time window.

[0038] In this embodiment, the preset time window is a sliding time window. That is, after each acceleration data analysis, the data interval is rolled forward by a fixed time interval with the current sampling time as the end point, and is continuously rolled forward and updated as the sampling time progresses. For example, if the sliding window length is set to 0.5 seconds and the acceleration sampling frequency is 100Hz, then each sliding time window contains 50 acceleration data points. After each new data point is collected, the window slides forward by one data point, that is, the oldest acceleration data point is discarded and the latest data point is added.

[0039] Specifically, a time period with the current time as the endpoint and a length of several sampling points is selected as a preset time window. After extracting all real-time acceleration data within this time window, the arithmetic mean of all real-time accelerations is first calculated as the acceleration average. Then, based on the variance formula, the square of the deviation between each real-time acceleration and the acceleration average is calculated and the mean is obtained. Finally, the square root is taken to obtain the acceleration standard deviation.

[0040] S202: Determine the real-time acceleration of anomalies based on the standard deviation of acceleration.

[0041] Specifically, after acquiring multiple real-time accelerations within a preset time window, if the calculated acceleration standard deviation exceeds the set standard deviation threshold, the acceleration data within that time window is determined to have an overall abnormal fluctuation, and the real-time accelerations with abnormalities within the preset time window are marked as abnormal real-time accelerations.

[0042] S203: Replace the anomalous real-time acceleration with the average acceleration value.

[0043] Specifically, after identifying outliers in the acceleration data, the acceleration value at the corresponding location is replaced with the average acceleration value calculated in the current time window.

[0044] By calculating the standard deviation and average value of multiple real-time accelerations within a preset time window, the fluctuation of the current acceleration data can be quantified and statistical references can be provided, thereby identifying data stability and providing a basis for subsequent corrections. By identifying abnormal accelerations based on the standard deviation of acceleration, it is possible to judge whether the sensor output deviates abnormally as a whole, thereby improving the ability to filter abnormal data. By replacing abnormal real-time accelerations with the average value of acceleration, the impact of instantaneous interference on data continuity can be eliminated, thereby improving the accuracy and stability of displacement calculation.

[0045] In one embodiment, such as Figure 3 As shown, in step S202, which involves determining the abnormal real-time acceleration based on the standard deviation of acceleration, the specific steps include: S2021: Determine whether the standard deviation of acceleration is greater than the preset standard deviation.

[0046] In this embodiment, the preset standard deviation is set based on the output fluctuation range of the plunger accelerometer under experimental conditions. In this experimental environment, no fluid disturbance, pipe wall friction or other mechanical vibration interference is set, which can provide a highly stable and low-interference detection environment for the accelerometer. Data from multiple acceleration sampling windows are continuously collected under this environment, and the standard deviation of the acceleration data in each time window is calculated to obtain multiple sets of standard deviation values. Then, the mean of these standard deviation values ​​is calculated, and a standard deviation threshold slightly higher than the mean is set as the preset standard deviation.

[0047] Specifically, the standard deviation of acceleration calculated within the sliding time window is compared with the preset standard deviation. When the standard deviation of acceleration is greater than the preset standard deviation, the fluctuation of the current acceleration data is considered abnormal.

[0048] S2022: If the standard deviation of acceleration is greater than the preset standard deviation, then determine the median of the acceleration of multiple real-time accelerations within the preset window.

[0049] Specifically, after confirming that the standard deviation of acceleration exceeds the preset standard deviation, all real-time acceleration data within the preset time window are sorted according to their numerical values, and the data in the middle position of the sorted sequence is selected as the median of acceleration.

[0050] S2023: Calculate the deviation between each real-time acceleration and the median acceleration within a preset time window.

[0051] In this embodiment, the deviation value is set based on a comprehensive evaluation of the acceleration fluctuation range of the plunger under different operating conditions. A large number of acceleration data samples under normal operating conditions are collected in the experimental environment and under simulated operation. The deviation between the median of acceleration and each data point in each window is calculated in a sliding window manner. After statistically analyzing the distribution characteristics of all deviation data, the upper quartile or percentile of its distribution range is taken as the deviation judgment reference value. At the same time, a certain margin is introduced on this basis to improve the tolerance to occasional fluctuations, thereby setting the deviation threshold.

[0052] Specifically, for each real-time acceleration within the time window, an absolute value deviation calculation is performed between the acceleration data and the median acceleration. That is, the absolute value of the difference between the acceleration data and the median acceleration is taken as the deviation value of the current data point.

[0053] S2024: Determine whether the deviation value is greater than the preset deviation value.

[0054] Specifically, the deviation value corresponding to each real-time acceleration is compared with a preset deviation threshold. If the deviation value is greater than the set error tolerance range, the real-time acceleration is considered to be abnormal data.

[0055] S2025: If the deviation value is greater than the preset deviation value, the corresponding real-time acceleration is marked as an abnormal value.

[0056] Specifically, once a deviation value of a real-time acceleration is determined to exceed an error threshold, the corresponding real-time acceleration is marked as an outlier.

[0057] By determining whether the standard deviation of acceleration is greater than a preset standard deviation, it is possible to quickly determine whether there are drastic fluctuations or interference in the current window data, thereby improving the sensitivity of anomaly detection. By extracting the median of acceleration if the standard deviation of acceleration exceeds the limit, it is possible to avoid the mean being affected by individual extreme values, thus providing a more robust central value reference. By calculating the deviation value of each acceleration data point from the median, it is possible to specifically quantify the degree to which the data point deviates from the central trend, thereby providing a clear criterion for anomaly detection. By determining whether the deviation value is greater than a set threshold and marking those exceeding the threshold as outliers, it is possible to accurately filter out outlier data points, thereby improving the accuracy and robustness of acceleration correction.

[0058] In one embodiment, such as Figure 4 As shown, before step S10, i.e. before obtaining the first quantity value of the oil pipe through which the plunger passes, the procedure further includes: S1: When the plunger is at the starting point, obtain the second value of the static acceleration.

[0059] Specifically, during the period before the plunger starts running, when it is in the initial position of the wellbore and remains in a stable state, the output values ​​of the acceleration sensor at multiple moments are continuously recorded as static acceleration data.

[0060] S2: Determine whether each static acceleration is greater than the preset static acceleration, and mark the static acceleration that is greater than the preset static acceleration as the compensation acceleration.

[0061] In this implementation, the preset static acceleration is set according to the fluctuation range of acceleration data collected when the plunger is stationary in the experimental environment. After statistically analyzing the maximum absolute value of acceleration within multiple windows, a safety margin slightly higher than this value is set as the threshold. For example, the maximum fluctuation value of 0.025 can be set to 0.03.

[0062] Specifically, for each of the acquired static acceleration values, they are compared with a pre-set static acceleration tolerance threshold. If a static acceleration exceeds the threshold, it is identified as data with significant sensor offset influence and included in the compensation acceleration set.

[0063] S3: Calculate the average compensation value of multiple compensated accelerations.

[0064] Specifically, the arithmetic mean of the multiple data points marked as compensation acceleration is calculated to obtain a representative value that reflects the current trend of the stationary error of the accelerometer, which is used as the compensation average value for subsequent real-time acceleration correction.

[0065] S4: Compensate for real-time acceleration using the average compensation value.

[0066] Specifically, after the plunger starts running from the starting point, the real-time acceleration collected at each moment is subtracted from the previously calculated compensation average value to obtain the corrected acceleration at the current moment. This operation can offset the inherent error of the sensor in the stationary state and improve the accuracy of acceleration estimation.

[0067] By acquiring static acceleration at the starting point using the plunger, the zero-point offset of the sensor can be extracted using the data characteristics under non-motion conditions, thus providing a reference for subsequent compensation. By determining whether the static acceleration is greater than a preset threshold and marking it as compensation acceleration, representative drift samples can be screened, thereby improving the effectiveness of the compensation value. By averaging multiple compensation accelerations, the error caused by occasional fluctuations can be smoothed out, thereby calculating a robust correction amount. By using the average compensation value to correct the real-time acceleration, the overall error caused by static zero bias can be eliminated, thereby enhancing the accuracy of subsequent displacement calculations at low speeds or in the starting phase.

[0068] In one embodiment, such as Figure 5 As shown, before step S4, i.e. before compensating for real-time acceleration using the compensated average value, the following steps are also included: S5: Statistically calculate the third value of the compensated acceleration and determine the ratio between the third value and the second value.

[0069] Specifically, all acceleration data that have been marked as compensated acceleration are traversed and counted to obtain a third quantity value. At the same time, the total number of acceleration data points collected in the current stationary state is counted as a second quantity value. The third quantity value is then divided by the second quantity value to obtain the ratio between the two.

[0070] S6: Determine whether the ratio value is greater than the preset ratio value.

[0071] In this embodiment, the preset ratio value is determined by repeatedly collecting static acceleration data from a normal sensor in an experimental environment and statistically analyzing the range of ratio values ​​marked as compensation acceleration. Based on this, a margin threshold slightly higher than the upper limit of the range is set.

[0072] Specifically, the obtained ratio value is compared with the preset ratio value. If the current ratio value is greater than the threshold, it is considered that there is a significant proportion of offset data in the currently collected static acceleration, indicating that the zero drift phenomenon of the current sensor is relatively obvious and compensation processing needs to be performed.

[0073] S7: If the proportional value is greater than the preset proportional value, compensation will be made for the real-time acceleration.

[0074] Specifically, a compensation operation is performed based on the judgment result, and the average compensation value calculated in the aforementioned steps is applied to the subsequently acquired real-time acceleration data.

[0075] S8: If the proportional value is not greater than the preset proportional value, then stop compensating for the real-time acceleration.

[0076] Specifically, if the current ratio is not greater than the preset ratio, it is considered that the proportion of offset in the static acceleration data is low and not enough to significantly affect the overall accuracy. Therefore, the compensation process is skipped, the original value of real-time acceleration remains unchanged, and it directly participates in the subsequent displacement calculation to reduce computational redundancy and avoid introducing invalid compensation errors.

[0077] By statistically analyzing the magnitude of the compensated acceleration and proportionally dividing it by the total number of stationary samples, the severity of sensor offset can be assessed, thereby determining whether a systematic error exists. By determining whether this ratio exceeds a set threshold, unnecessary correction operations can be avoided when actual interference is small, thus improving algorithm efficiency. By performing compensation operations when the ratio exceeds the limit, necessary data correction can be ensured when the offset is significant, thus preventing the accumulation of measurement errors from affecting the speed control results. By not performing compensation processing when the ratio does not exceed the limit, the system's computational overhead can be reduced, and the overall measurement stability can be avoided due to miscompensation caused by a small number of abnormal samples.

[0078] In one embodiment, such as Figure 6 As shown, in step S10, specifically obtaining the first quantity value of the oil pipe through which the plunger passes, the following is included: S101: Obtain the number of induction signals generated when the plunger passes through the oil pipe coupling, and determine the first quantity value based on the number of induction signals.

[0079] In this embodiment, a magnetic induction device is installed inside the tubing coupling, and a magnetic induction coil is installed inside the plunger.

[0080] Specifically, when the plunger passes through the coupling area during operation, the relative motion between the magnetic induction device and the coil will generate an induced voltage signal in the induction coil due to the change in magnetic flux. This signal exhibits a short-duration pulse characteristic. By continuously acquiring the output signal of the magnetic induction coil and identifying the above pulse characteristic, it can be determined that the plunger has passed through a tubing segment. The number of identified induced signals is accumulated to determine the number of couplings passed by the plunger, and thus the number of tubing segments passed by the plunger is determined as the first quantity value.

[0081] By acquiring the number of induced signals generated when the plunger passes through the tubing coupling and determining the first quantity value accordingly, the plunger path can be calibrated using specific locations in the physical structure. This allows for displacement estimation without relying on acceleration integration, effectively improving the positioning accuracy and anti-interference capability from the plunger's starting point to its current position.

[0082] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0083] In one embodiment, a plunger running speed control device in a wellbore is provided, which corresponds one-to-one with the plunger running speed control method in the above embodiment. For example... Figure 7 As shown, this wellbore plunger speed control device includes a distance acquisition module, an acceleration correction module, a distance calculation module, and a speed control module. Detailed descriptions of each functional module are as follows: The distance acquisition module is used to acquire the first quantity value of the oil pipe through which the plunger passes, and to determine the first distance value between the plunger and the starting point based on the first quantity value. The acceleration correction module is used to obtain the real-time acceleration of the plunger, correct the real-time acceleration, and calculate the second distance value of the plunger's movement in the oil pipe. The distance calculation module is used to determine a third distance value between the plunger and the endpoint based on the first and second distance values; The speed control module is used to generate a speed control signal based on a third distance value. The speed control signal is used to control the operating speed of the plunger.

[0084] Optionally, the acceleration correction module specifically includes: The statistical analysis module is used to calculate the standard deviation and average value of acceleration for multiple real-time accelerations within a preset time window. Anomaly identification module is used to determine abnormal real-time accelerations based on the standard deviation of acceleration. The data substitution module is used to replace abnormal real-time accelerations with average acceleration values.

[0085] Optionally, the anomaly detection module specifically includes: The standard deviation judgment module is used to determine whether the standard deviation of acceleration is greater than the preset standard deviation; The median extraction module is used to determine the median of multiple real-time accelerations within a preset window if the standard deviation of acceleration is greater than the preset standard deviation. The deviation calculation module is used to calculate the deviation value between each real-time acceleration and the median acceleration within a preset time window; The deviation determination module is used to determine whether the deviation value is greater than the preset deviation value; The anomaly marking module is used to mark the corresponding real-time acceleration as an anomaly if the deviation value is greater than a preset deviation value.

[0086] Optionally, a plunger running speed control device in a wellbore may further include: The static sampling module is used to obtain the second value of static acceleration when the plunger is at the starting point; The offset filtering module is used to determine whether each static acceleration is greater than the preset static acceleration, and to mark the static acceleration that is greater than the preset static acceleration as the compensation acceleration; The compensation calculation module is used to calculate the average compensation value of multiple compensation accelerations; The compensation execution module is used to compensate for real-time acceleration using the compensation average value.

[0087] Optionally, a plunger running speed control device in a wellbore may further include: The proportional statistics module is used to calculate the third quantitative value of the compensated acceleration and determine the ratio between the third quantitative value and the second quantitative value. The ratio judgment module is used to determine whether the ratio value is greater than the preset ratio value; The compensation trigger module is used to compensate for the real-time acceleration if the ratio value is greater than the preset ratio value. The compensation cancellation module is used to stop compensating for real-time acceleration if the ratio value is not greater than the preset ratio value.

[0088] Optionally, the distance acquisition module specifically includes: The signal recognition module is used to acquire the number of induction signals generated when the plunger passes through the tubing coupling, and to determine a first quantity value based on the number of induction signals.

[0089] Specific limitations regarding the plunger speed control device in the wellbore can be found in the above description of the control method for the plunger speed in the wellbore, and will not be repeated here. Each module in the aforementioned plunger speed control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0090] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for controlling the speed of a plunger in a wellbore.

[0091] In one embodiment, a computer device is provided, including 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 perform the following steps: Obtain the first quantity value of the oil pipe through which the plunger passes, and determine the first distance value between the plunger and the starting point based on the first quantity value; The real-time acceleration of the plunger is obtained, the real-time acceleration is corrected, and the second distance value of the plunger's movement in the oil pipe is calculated. A third distance value between the plunger and the endpoint is determined based on the first and second distance values. A speed control signal is generated based on the third distance value, which is used to control the operating speed of the plunger.

[0092] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor: Obtain the first quantity value of the oil pipe through which the plunger passes, and determine the first distance value between the plunger and the starting point based on the first quantity value; The real-time acceleration of the plunger is obtained, the real-time acceleration is corrected, and the second distance value of the plunger's movement in the oil pipe is calculated. A third distance value between the plunger and the endpoint is determined based on the first and second distance values. A speed control signal is generated based on the third distance value, which is used to control the operating speed of the plunger.

[0093] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0094] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0095] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for controlling the running speed of a plunger in a wellbore, characterized in that, The method for controlling the running speed of the plunger in a wellbore includes: Obtain a first quantity value of the oil pipe through which the plunger passes, and determine a first distance value between the plunger and the starting point based on the first quantity value; The real-time acceleration of the plunger is obtained, the real-time acceleration is corrected, and the second distance value of the plunger's movement in the oil pipe is calculated. A third distance value between the plunger and the endpoint is determined based on the first distance value and the second distance value; A speed control signal is generated based on the third distance value, and the speed control signal is used to control the operating speed of the plunger.

2. The method for controlling the running speed of a plunger in a wellbore according to claim 1, characterized in that, The correction of the real-time acceleration includes: Calculate the standard deviation and average value of the accelerations of multiple real-time accelerations within a preset time window; The abnormal real-time acceleration is determined based on the acceleration standard deviation; Replace the abnormal real-time acceleration with the average acceleration value.

3. The method for controlling the running speed of a plunger in a wellbore according to claim 2, characterized in that, The real-time acceleration that is determined to be abnormal based on the acceleration standard deviation includes: Determine whether the standard deviation of the acceleration is greater than the preset standard deviation; If the acceleration standard deviation is greater than the preset standard deviation, then the median of the accelerations of the multiple real-time accelerations within the preset window is determined; Calculate the deviation between each real-time acceleration and the median acceleration within the preset time window; Determine whether the deviation value is greater than a preset deviation value; If the deviation value is greater than the preset deviation value, the corresponding real-time acceleration is marked as an abnormal value.

4. The method for controlling the running speed of a plunger in a wellbore according to claim 1, characterized in that, Before obtaining the first quantity value of the tubing through which the plunger passes, the process also includes: At the starting point, the plunger acquires a second value of static acceleration; Determine whether each of the stated static accelerations is greater than a preset static acceleration, and mark the static accelerations that are greater than the preset static accelerations as compensation accelerations; Calculate the average compensation value of the multiple compensated accelerations; The real-time acceleration is compensated using the compensated average value.

5. The method for controlling the running speed of a plunger in a wellbore according to claim 4, characterized in that, Before compensating the real-time acceleration using the compensated average value, the following steps are also included: Calculate the third quantitative value of the compensated acceleration, and determine the ratio between the third quantitative value and the second quantitative value; Determine whether the ratio value is greater than a preset ratio value; If the ratio value is greater than the preset ratio value, then the real-time acceleration is compensated. If the ratio value is not greater than the preset ratio value, then compensation for the real-time acceleration is stopped.

6. The method for controlling the running speed of a plunger in a wellbore according to claim 1, characterized in that, The first quantity value of the tubing through which the plunger passes includes: The number of induction signals generated when the plunger passes through the oil pipe coupling is obtained, and the first quantity value is determined based on the number of induction signals.

7. A device for controlling the running speed of a plunger in a wellbore, characterized in that, The wellbore plunger running speed control device includes: The distance acquisition module is used to acquire a first quantity value of the oil pipe through which the plunger passes, and to determine a first distance value between the plunger and the starting point based on the first quantity value. An acceleration correction module is used to acquire the real-time acceleration of the plunger, correct the real-time acceleration, and calculate the second distance value of the plunger's movement in the oil pipe. A distance calculation module is used to determine a third distance value between the plunger and the endpoint based on the first distance value and the second distance value; A speed control module is used to generate a speed control signal based on the third distance value, the speed control signal being used to control the operating speed of the plunger.

8. The plunger running speed control device in a wellbore according to claim 7, characterized in that, The acceleration correction module specifically includes: The statistical analysis module is used to calculate the standard deviation and average value of the accelerations of multiple real-time accelerations within a preset time window; An anomaly identification module is used to determine the abnormal real-time acceleration based on the acceleration standard deviation; A data substitution module is used to replace the abnormal real-time acceleration with the average acceleration value.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for controlling the running speed of a plunger in a wellbore as described in any one of claims 1 to 6.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for controlling the running speed of a plunger in a wellbore as described in any one of claims 1 to 6.