Oil well yield metering method and device based on oil well pump indicator diagram
Through the measurement method based on the pumping pump power diagram, the calculation of oil well output is simplified, the problems of complex calculation and low accuracy in the prior art are solved, and more accurate and easy-to-use output measurement is achieved, which is of significance to guide production.
Patent Information
- Application Number
- CN202310736164.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2024-12-20
AI Technical Summary
In the prior art, the calculation process of the oil pump well output measurement method is complex, the generalization applicability is not strong, and the accuracy is not high, making it difficult to meet the needs of oil field production planning.
Based on the oil pump power diagram, the oil outlet radius, punching and downward effective stroke are obtained, and the measurement coefficient is set. The oil well output is calculated using the formula y=γ*π*r2*cch*cc, and the fast Fourier transform is used. The effective stroke is extracted and the early stopping mechanism is used to adjust the value of the measurement coefficient.
It simplifies metrological calculations, improves the accuracy and generalization capabilities of calculations, makes it easier for front-line business personnel to understand and apply, and has strong guiding production significance.
Smart Images

Figure CN119167129A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil production, and in particular to a method for measuring oil well production based on an oil well pump dynamometer diagram, an oil well production measuring device based on an oil well pump dynamometer diagram, a machine-readable storage medium and a processor. Background Art
[0002] The production measurement of the pumping unit is of great significance to the production planning of oilfields and oil plants. In the prior art, the methods for measuring the production of the pumping unit well include: using the power-work diagram conversion model, using the work diagram to convert the pump work diagram, the five-point curvature method, etc. However, these methods are closely related to the geological parameters of the well, their generalization applicability is not strong, and the calculation process is too complicated, and the accuracy of the calculation results is not high. Summary of the invention
[0003] The purpose of the embodiments of the present invention is to provide a method, device, storage medium and processor for measuring oil well production based on an oil well pump dynamometer diagram.
[0004] In order to achieve the above-mentioned purpose, an embodiment of the present invention provides an oil well production metering method based on a wellbore pump dynamometer diagram, which calculates the oil well production within a target time period, and the method comprises: obtaining the oil outlet radius of the wellbore pump; obtaining the number of strokes of the wellbore pump within the target time period; obtaining the wellbore pump dynamometer diagram within the target time period, and obtaining the lower effective stroke of the wellbore pump plug based on the wellbore pump dynamometer diagram; setting a metering coefficient; and calculating the oil well production within the target time period based on the oil outlet radius of the wellbore pump, the number of strokes of the wellbore pump, the lower effective stroke of the wellbore pump plug and the metering coefficient.
[0005] Based on the first aspect, in some embodiments of the present application, the calculation formula for the oil well production within the target time period is as follows:
[0006] y=γ*π*r 2 *cch*cc
[0007] In the above formula, y represents the oil well production in the target time period, γ represents the metering coefficient, r represents the oil outlet radius of the oil pump, cch represents the lower effective stroke, and cc represents the number of strokes.
[0008] Based on the first aspect, in some embodiments of the present application, the method for obtaining the lower effective stroke includes: taking the displacement as the real part and the load as the imaginary part, constructing the oil pump dynamometer diagram into a complex number Z; converting Z into frequency through fast Fourier transform; selecting the first n low-frequency frequencies for inverse Fourier transform, extracting the real part of the inverse Fourier transform result as the transformed displacement, and the imaginary part as the transformed load; differentiating the transformed load, and the displacement with the smallest differential result minus the initial displacement is the lower effective stroke.
[0009] Based on the first aspect, in some embodiments of the present application, the value of the metering coefficient is determined by the following method: the oil well production, the number of strokes and the next effective stroke of the oil pump are obtained as sample data, and the sample data are divided into a training set and a test set; initialization γ = 0, lr = 0.001, formula y = γ * π * r 2 *cch*cc calculates the predicted measurement results and the corresponding loss function values corresponding to the training set and test set samples respectively; uses the early stopping mechanism to determine whether the value of γ needs to be updated. If it needs to be updated, calculates the gradient g of γ corresponding to the loss function value on the training set, and uses the formula γ=γ-lr*g to update γ. Otherwise, terminates the training and obtains the final result of γ.
[0010] In a second aspect, the present application provides an oil well production metering device based on a pump dynamometer diagram, which calculates the oil well production within a target time period, and the device comprises: a first acquisition module, used to obtain the oil outlet radius of the pump; a second acquisition module, used to obtain the number of strokes of the pump within the target time period; a third acquisition module, used to obtain the pump dynamometer diagram within the target time period, and obtain the lower effective stroke of the pump plug based on the pump dynamometer diagram; a setting module, used to set a metering coefficient; a calculation module, used to calculate the oil well production within the target time period based on the oil outlet radius of the pump, the number of strokes of the pump, the lower effective stroke of the pump plug and the metering coefficient.
[0011] Based on the second aspect, in some embodiments of the present application, the calculation module uses the following calculation formula to calculate the oil well production within the target time period:
[0012] y=γ*π*r 2 *cch*cc
[0013] In the above formula, y represents the oil well production in the target time period, γ represents the metering coefficient, r represents the oil outlet radius of the oil pump, cch represents the lower effective stroke, and cc represents the number of strokes.
[0014] Based on the second aspect, in some embodiments of the present application, the third acquisition module obtains the lower effective stroke by the following method: taking the displacement as the real part and the load as the imaginary part, constructing the oil pump dynamometer diagram into a complex number Z; converting Z into frequency through fast Fourier transform; selecting the first n low-frequency frequencies for inverse Fourier transform, extracting the real part of the inverse Fourier transform result as the transformed displacement, and the imaginary part as the transformed load; differentiating the transformed load, and the displacement with the smallest differential result minus the initial displacement is the lower effective stroke.
[0015] Based on the second aspect, in some embodiments of the present application, the setting module uses the following method to determine the value of the metering coefficient: obtain the oil well production, the number of strokes and the next effective stroke of the oil pump as sample data, and divide the sample data into a training set and a test set; initialize γ = 0, lr = 0.001 formula y = γ * π * r 2 *cch*cc calculates the predicted measurement results and the corresponding loss function values corresponding to the training set and test set samples respectively; uses the early stopping mechanism to determine whether the value of γ needs to be updated. If it needs to be updated, calculates the gradient g of γ corresponding to the loss function value on the training set, and uses the formula γ=γ-lr*g to update γ. Otherwise, terminates the training and obtains the final result of γ.
[0016] In a third aspect, the present application provides a machine-readable storage medium having instructions stored thereon, which, when executed by a processor, configures the processor to execute the above-mentioned oil well production metering method based on the oil well pump dynamometer diagram.
[0017] In a fourth aspect, the present application provides a processor configured to execute the above-mentioned oil well production metering method based on the oil well pump dynamometer diagram.
[0018] The oil well production measurement method based on the oil well pump dynamometer diagram provided in this application has at least the following beneficial effects:
[0019] In the metering method provided in the present application, the effective lower effective stroke characteristics can be extracted for metering calculation based only on the indicator diagram. This method is simple and practical, easy to calculate, and more convenient for front-line business personnel to understand, and has a strong significance for guiding production.
[0020] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0022] Figure 1 It is a comparison diagram before and after the transformation of the indicator diagram in the embodiment of the present application;
[0023] Figure 2 It is a schematic diagram of the differential result of the load on the indicator diagram after the change in the embodiment of the present application;
[0024] Figure 3 It is a structural block diagram of an oil well production metering device based on an oil well pump dynamometer diagram of the present application.
[0025] Description of Reference Numerals
[0026] 1-first acquisition module; 2-second acquisition module; 3-third acquisition module; 4-setting module; 5-calculation module. DETAILED DESCRIPTION
[0027] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.
[0028] Example 1
[0029] The present application provides an oil well production measurement method based on an oil well pump dynamometer diagram, which calculates the oil well production within a target time period. The method comprises:
[0030] S1, obtaining the oil outlet radius of the oil well pump;
[0031] The oil outlet radius of the oil well pump is usually fixed and can be measured directly.
[0032] S2, obtaining the number of strokes of the oil pump within the target time period;
[0033] S3, obtaining a pump dynamometer diagram within a target time period, and obtaining a lower effective stroke of the pump plug based on the pump dynamometer diagram;
[0034] Specifically, the method for obtaining the lower effective stroke includes:
[0035] Taking displacement as the real part and load as the imaginary part, the oil well pump indicator diagram is constructed into a complex number Z, that is, Z=displacement+load*j, where displacement is the real part and load is the imaginary part;
[0036] Convert Z to frequency by fast Fourier transform;
[0037] Select the first n low-frequency frequencies for inverse Fourier transform, extract the real part of the inverse Fourier transform result as the transformed displacement, and the imaginary part as the transformed load;
[0038] The transformed load is differentiated, and the displacement with the smallest differential result minus the initial displacement is the lower effective stroke.
[0039] Illustratively, an example of the solution process is shown below.
[0040] Here, the sample data of the original dynamometer diagram is shown in Table 1.
[0041] Table 1 Example of power diagram
[0042]
[0043] After fast Fourier transform, selecting the first n low-frequency frequencies and performing inverse Fourier transform, the indicator diagram (indicator) is compared with the transformed (indicator reconstruct) indicator diagram, such as Figure 1 (The horizontal axis represents displacement, and the vertical axis represents load). The indicator reconstruct diff is calculated for the transformed load on the indicator diagram, as shown in Figure 2 (The horizontal axis represents displacement and the vertical axis represents load). At this point, we can calculate that the lower effective stroke of the dynamometer diagram is 0.26m.
[0044] S4, set the metering coefficient;
[0045] Specifically, in order to improve the accuracy of production metering calculation and maintain the generalization ability of metering coefficients, the real metering results of the entire oil field and oil mill can be used to unify the fitting metering parameters, and the evaluation index uses mape (Mean Absolute Percentage Error).
[0046] The detailed calculation process is as follows:
[0047] 1) Extract the effective stroke from the dynamometer diagram of all samples. (In addition, the oil well production, pump stroke frequency and pump radius are all known.)
[0048] 2) Randomly sample 80% of all samples as training set and the remaining 20% as test set.
[0049] 3) Initialize γ=0, lr=0.001, formula y=γ*π*r 2 *cch*cc calculates the prediction measurement results and corresponding loss (loss function value) corresponding to the training set and test set samples respectively.
[0050] Use the early stopping mechanism to determine whether γ needs to be updated. If it needs to be updated, calculate the gradient g of γ corresponding to the loss on the training set, and use the formula γ = γ-lr*g to update γ. Otherwise, terminate the training and get the final result γ.
[0051] S5. Calculate the oil well production within the target time period based on the oil outlet radius of the oil pump, the stroke frequency of the oil pump, the lower effective stroke of the oil pump plug and the metering coefficient.
[0052] Specifically, the calculation formula for the oil well production within the target time period is as follows:
[0053] y=γ*π*r 2 *cch*cc
[0054] In the above formula, y represents the oil well production in the target time period, γ represents the metering coefficient, r represents the oil outlet radius of the oil pump, cch represents the lower effective stroke, and cc represents the number of strokes.
[0055] Example 2
[0056] The present application provides an oil well production metering device based on an oil well pump dynamometer diagram, which calculates the oil well production within a target time period, and the device comprises:
[0057] The first acquisition module 1 is used to obtain the oil outlet radius of the oil well pump;
[0058] The second acquisition module 2 is used to acquire the number of strokes of the oil pump within the target time period;
[0059] The third acquisition module 3 is used to acquire the oil well pump indicator diagram within the target time period, and acquire the lower effective stroke of the oil well pump plug based on the oil well pump indicator diagram;
[0060] Setting module 4, used for setting metering coefficient;
[0061] The calculation module 5 is used to calculate the oil well production within the target time period based on the oil outlet radius of the oil pump, the stroke frequency of the oil pump, the lower effective stroke of the oil pump plug and the metering coefficient.
[0062] Furthermore, the calculation module 5 uses the following calculation formula to calculate the oil well production within the target time period:
[0063] y=γ*π*r 2 *cch*cc
[0064] In the above formula, y represents the oil well production in the target time period, γ represents the metering coefficient, r represents the oil outlet radius of the oil pump, cch represents the lower effective stroke, and cc represents the number of strokes.
[0065] Furthermore, the third acquisition module 3 obtains the lower effective stroke by the following method: taking the displacement as the real part and the load as the imaginary part, constructing the oil pump indicator diagram into a complex number Z; converting Z into frequency by fast Fourier transform; selecting the first n low-frequency frequencies for inverse Fourier transform, extracting the real part of the inverse Fourier transform result as the transformed displacement, and the imaginary part as the transformed load; differentiating the transformed load, and subtracting the initial displacement from the minimum differential result is the lower effective stroke.
[0066] Furthermore, the setting module 4 uses the following method to determine the value of the metering coefficient: obtain the oil well production, the number of strokes and the next effective stroke of the oil pump as sample data, and divide the sample data into a training set and a test set; initialize γ = 0, lr = 0.001, and the formula y = γ*π*r 2*cch*cc calculates the predicted measurement results and the corresponding loss function values corresponding to the training set and test set samples respectively; uses the early stopping mechanism to determine whether the value of γ needs to be updated. If it needs to be updated, calculates the gradient g of γ corresponding to the loss function value on the training set, and uses the formula γ=γ-lr*g to update γ. Otherwise, terminates the training and obtains the final result of γ.
[0067] The oil well production metering device based on the oil well pump dynamometer diagram includes a processor and a memory. The first acquisition module 1, the second acquisition module 2, the third acquisition module 3, the setting module 4 and the calculation module 5 are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
[0068] The processor includes a kernel, which calls the corresponding program unit from the memory.
[0069] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, the oil well production metering method based on the oil well pump dynamometer diagram is implemented.
[0070] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program executes the oil well production metering method based on the oil well pump dynamometer diagram when running.
[0071] The embodiment of the present invention provides a device, which includes at least one processor, at least one memory connected to the processor, and a bus; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the above-mentioned oil well production measurement method based on the oil well pump indicator diagram. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0072] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0073] In a typical configuration, the device includes one or more processors (CPU), memory and bus. The device may also include input / output interface, network interface and the like.
[0074] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip. The memory is an example of a computer-readable medium.
[0075] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0076] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0077] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0078] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for measuring oil well production based on a pump dynamometer diagram, used to calculate the oil well production within a target time period, characterized in that: The method comprises: Get the oil outlet radius of the oil pump; Obtain the number of strokes of the oil pump within the target time period; Obtaining an oil well pump indicator diagram within a target time period, and obtaining a lower effective stroke of the oil well pump plug based on the oil well pump indicator diagram; Set the metering factor; The oil well production within a target time period is calculated based on the oil outlet radius of the oil well pump, the stroke frequency of the oil well pump, the lower effective stroke of the oil well pump plug and the metering coefficient.
2. The oil well production measurement method based on the oil well pump dynamometer diagram according to claim 1, characterized in that: The calculation formula for the oil well production within the target time period is as follows: y=γ*π*r 2 *cch*cc In the above formula, y represents the oil well production in the target time period, γ represents the metering coefficient, r represents the oil outlet radius of the oil well pump, cch represents the lower effective stroke of the oil well pump plug, and cc represents the stroke frequency of the oil well pump.
3. The oil well production measurement method based on the oil well pump dynamometer diagram according to claim 1, characterized in that: The method for obtaining the lower effective stroke of the oil well pump plug comprises: Taking the displacement as the real part and the load as the imaginary part, the oil well pump dynamometer diagram is constructed into a complex number Z; Convert Z to frequency by fast Fourier transform; Select the first n low-frequency frequencies for inverse Fourier transform, extract the real part of the inverse Fourier transform result as the transformed displacement, and the imaginary part as the transformed load; The transformed load is differentiated, and the displacement with the smallest differential result minus the initial displacement is taken as the lower effective stroke.
4. The oil well production measurement method based on the oil well pump dynamometer diagram according to claim 1, characterized in that: The value of the metering coefficient is determined by the following method: The oil well production, the number of strokes of the oil pump and the lower effective stroke of the oil pump plug are obtained as sample data, and the sample data are divided into a training set and a test set; Initialize γ=0, lr=0.001, and use the formula y=γ*π*r 2 *cch*cc calculates the prediction measurement results and corresponding loss function values corresponding to the training set and test set samples respectively; Use the early stopping mechanism to determine whether the value of γ needs to be updated. If it needs to be updated, calculate the gradient g of γ corresponding to the loss function value on the training set, and use the formula γ = γ-lr*g to update γ. Otherwise, terminate the training and get the final result of γ.
5. An oil well production metering device based on a pump dynamometer diagram, used to calculate the oil well production within a target time period, characterized in that: The device comprises: The first acquisition module is used to acquire the oil outlet radius of the oil well pump; The second acquisition module is used to acquire the number of strokes of the oil pump within a target time period; A third acquisition module is used to acquire a pump dynamometer diagram within a target time period, and acquire a lower effective stroke of the pump plug based on the pump dynamometer diagram; A setting module, used to set the metering coefficient; The calculation module is used to calculate the oil well production within a target time period based on the oil outlet radius of the oil pump, the stroke frequency of the oil pump, the lower effective stroke of the oil pump plug and the metering coefficient.
6. The oil well production metering device based on the oil well pump dynamometer diagram according to claim 5, characterized in that: The calculation module uses the following calculation formula to calculate the oil well production within the target time period: y=γ*π*r 2 *cch*cc In the above formula, y represents the oil well production in the target time period, γ represents the metering coefficient, r represents the oil outlet radius of the oil well pump, cch represents the lower effective stroke of the oil well pump plug, and cc represents the stroke frequency of the oil well pump.
7. The oil well production metering device based on the oil well pump dynamometer diagram according to claim 5, characterized in that: The third acquisition module acquires the lower effective stroke of the oil well pump plug by the following method: Taking the displacement as the real part and the load as the imaginary part, the oil well pump dynamometer diagram is constructed into a complex number Z; Convert Z to frequency by fast Fourier transform; Select the first n low-frequency frequencies for inverse Fourier transform, extract the real part of the inverse Fourier transform result as the transformed displacement, and the imaginary part as the transformed load; The transformed load is differentiated, and the displacement with the smallest differential result minus the initial displacement is taken as the lower effective stroke.
8. The oil well production metering device based on the oil well pump dynamometer diagram according to claim 5, characterized in that: The setting module determines the value of the metering coefficient by the following method: The oil well production, the number of strokes of the oil pump and the lower effective stroke of the oil pump plug are obtained as sample data, and the sample data are divided into a training set and a test set; Initialize γ=0, lr=0.001, formula y=γ*π*r 2 *cch*cc calculates the prediction measurement results and corresponding loss function values corresponding to the training set and test set samples respectively; Use the early stopping mechanism to determine whether the value of γ needs to be updated. If it needs to be updated, calculate the gradient g of γ corresponding to the loss function value on the training set, and use the formula γ = γ-lr*g to update γ. Otherwise, terminate the training and get the final result of γ.
9. A machine-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor is configured to execute the oil well production measurement method based on the oil well pump dynamometer diagram according to any one of claims 1 to 4.
10. A processor, characterized in that: The method is configured to execute the oil well production measurement method based on the oil well pump dynamometer diagram according to any one of claims 1 to 4.
