Soft measurement method for working fluid level
By using real-time data and prediction models in the pump well, combining clustering algorithms and exhaustive methods to calculate the dynamic liquid level parameters, the problem of insufficient soft measurement accuracy of dynamic liquid level in the prior art is solved, and a higher precision soft measurement of dynamic liquid level is achieved.
Patent Information
- Application Number
- CN202510902418.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-08-15
AI Technical Summary
The existing soft measurement method of dynamic liquid level cannot measure parameters such as mixed liquid density, Youfan loss and Gufan loss in real time, resulting in insufficient calculation accuracy.
A prediction model based on real-time data of the pump well was adopted, combining the maximum load, minimum load, stroke and mixed liquid moisture content, and training the model through a clustering algorithm, using the exhaustive method to calculate the target degassing crude oil density and metering coefficient, and combining the dynamic liquid level soft measurement formula for dynamic liquid level soft measurement.
The accuracy of soft measurement of the dynamic fluid level is improved, and a more accurate dynamic fluid level value is calculated by combining real-time data to predict the degassing crude oil density.
Smart Images

Figure CN120487058A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of oil and gas production information, and particularly relates to a soft measurement method for a dynamic liquid level. Background Art
[0002] During the production process of a pumping well, the dynamic fluid level, a crucial production parameter, reflects the reservoir's fluid supply capacity, assesses the efficiency and status of the pumping unit, and, based on this, infers bottomhole flowing pressure. Dynamic fluid level changes are a key indicator of well production status and provide valuable insights into optimizing pumping unit operating modes and adjusting production schedules. Dynamic fluid level parameters can be obtained through various methods, including direct measurement with a dynamic fluid level meter, calculation using work diagrams, and soft sensing.
[0003] When soft-measuring the dynamic liquid level, due to the complexity of the downhole working conditions of the pumping unit and the dynamic supply of the bottom oil, parameters such as the density of the mixed liquid, free fluid loss, and solid fluid loss cannot be measured in real time. Generally, set parameter values are used instead. This method is prone to large errors because it does not combine the real-time data of the pumping well. Summary of the Invention
[0004] To this end, the present invention provides a soft measurement method for dynamic liquid level to solve the problem that existing soft measurement methods for dynamic liquid level use set parameter values to replace parameter values that cannot be measured in real time, which easily leads to large errors.
[0005] To achieve the above objectives, the present invention adopts the following technical solutions:
[0006] In a first aspect, the present invention provides a soft measurement method for a dynamic liquid level, comprising:
[0007] Get real-time data on pumping wells;
[0008] The maximum load, minimum load, stroke, number of strokes, and water content of the mixed liquid in the real-time data are used as input parameters of a prediction model to predict the degassed crude oil density; the prediction model is a model obtained by training a clustering algorithm model based on historical data;
[0009] Obtaining a target degassed crude oil density and a stoichiometric coefficient by an exhaustive method based on the predicted degassed crude oil density;
[0010] A soft measurement value of the dynamic liquid level is obtained according to the real-time data, the target degassed crude oil density and the metering coefficient.
[0011] Furthermore, the soft measurement value of the dynamic liquid level is obtained based on the real-time data, the target degassed crude oil density and the metering coefficient, including:
[0012] Obtaining a fixed valve opening point load value, a floating valve opening point load value, an upstroke friction force, and a downstroke friction force based on the real-time data;
[0013] The soft measurement value of the dynamic liquid surface is obtained by the dynamic liquid surface soft measurement calculation formula, and the dynamic liquid surface soft measurement calculation formula is:
[0014]
[0015] Among them, L′ f Indicates the soft measurement value of the dynamic liquid level, F u Indicates the fixed valve opening point load value, F d Indicates the load value of the floating valve opening point, f1 indicates the friction force of the upstroke, f2 indicates the friction force of the downstroke, Δp1 indicates the solid valve loss, Δp2 indicates the floating valve loss, P D Indicates the pressure of the jacket acting on the liquid surface, P h Indicates oil pressure, f p represents the cross-sectional area of the plunger, ρ′ o represents the target degassed crude oil density, n represents the stoichiometric coefficient, hsl represents the water content of the mixed liquid, ρ w Indicates the density of water.
[0016] Furthermore, the fixed valve opening point load value, the floating valve opening point load value, the upstroke friction force and the downstroke friction force are obtained based on the real-time data, including:
[0017] Solving a pump performance diagram based on the real-time data to obtain a pump performance diagram;
[0018] The fixed valve opening point load value and the floating valve opening point load value are obtained according to the pump performance diagram.
[0019] Furthermore, the step of solving the pump work diagram based on the real-time data to obtain the pump work diagram includes:
[0020] Obtaining the weight of the rod column according to the rod level, rod length, rod diameter and rod density in the real-time data;
[0021] Obtaining the weight of the liquid column based on the load data in the real-time data and the weight of the rod column;
[0022] Obtaining a polished rod speed based on the stroke data and the stroke frequency data in the real-time data; and obtaining a dimensionless damping value based on the polished rod speed;
[0023] Obtaining a damping value according to the pump depth data in the real-time data and the dimensionless damping value;
[0024] Obtaining load and displacement data of the end of the rod string based on the rod string weight, liquid column weight and damping value in combination with Fourier transform;
[0025] The pump work diagram is obtained based on the load and displacement data.
[0026] Furthermore, obtaining the fixed valve opening point load value and the floating valve opening point load value according to the pump performance diagram includes:
[0027] Obtaining the curvature value of each point in the pump work diagram by Heron's formula;
[0028] The curve of the pump performance diagram is divided into 4 segments, and the point with the largest curvature value in each segment is taken to obtain a fixed valve opening point, a fixed valve closing point, a floating valve opening point, and a floating valve closing point;
[0029] The load value of the fixed valve opening point is used as the load value of the fixed valve opening point;
[0030] The load value of the floating valve opening point is taken as the load value of the floating valve opening point.
[0031] Furthermore, the fixed valve opening point load value, the floating valve opening point load value, the upstroke friction force and the downstroke friction force are obtained based on the real-time data, including:
[0032] The upstroke friction force is obtained according to the upstroke friction force solution formula, which is:
[0033]
[0034] Among them, A r represents the cross-sectional area of the sucker rod, ρ s It represents the density of the sucker rod, L represents the pump hanging depth, S represents the pumping unit stroke, N represents the pumping unit stroke number, μ represents the crude oil viscosity, and m represents the ratio of the inner diameter of the oil pipe to the diameter of the sucker rod. A t Indicates the cross-sectional area of the oil pipe;
[0035] The downstroke friction force is obtained according to the downstroke friction force solution formula, and the downstroke friction force solution formula is:
[0036]
[0037] Among them, A r represents the cross-sectional area of the sucker rod, ρ s represents the density of the sucker rod, ρ l Indicates the standard value of the density of the mixed liquid, ρ l is 0.8, L represents the pump hanging depth, S represents the pumping unit stroke, N represents the pumping unit stroke times, μ represents the crude oil viscosity, A p Indicates the cross-sectional area of the plunger, A o represents the cross-sectional area of the valve hole, ξ is the valve flow coefficient, which can be found on the standard valve flow coefficient chart of the oil well pump, and m is the ratio of the inner diameter of the oil pipe to the diameter of the sucker rod. A t Indicates the cross-sectional area of the oil pipe.
[0038] Furthermore, the target degassed crude oil density and stoichiometric coefficient are obtained by exhaustive method based on the predicted degassed crude oil density, including:
[0039] The target degassed crude oil density and metering coefficient are obtained by exhaustive enumeration using a conversion formula based on the water content of the mixed liquid. The conversion formula is:
[0040]
[0041] Among them, ρ′ o is the target degassed crude oil density, ρ″ o To predict the density of degassed crude oil, n is the stoichiometric coefficient;
[0042] The exhaustive method limits the range to: if the water content of the mixed liquid is less than or equal to 50%, then 0.76<ρ′ o <0.85; if the water content of the mixed liquid is greater than 50%, then 0.86<ρ′ o <0.94;
[0043] The exhaustive screening conditions are: retain the measurement coefficient to three decimal places, and retain the set of ρ′ with the smallest loss o and n.
[0044] Furthermore, before obtaining the real-time data of the pumping well, the method further includes:
[0045] Obtaining and obtaining a training set based on historical data; the training set includes maximum load, minimum load, stroke, stroke number, water content of the mixed liquid, and density of degassed crude oil;
[0046] Constructing an initial model; the initial model is a model constructed based on the K-Means clustering algorithm;
[0047] The initial model is trained according to the training set to obtain the prediction model.
[0048] Furthermore, the obtaining of the training set based on the historical data includes:
[0049] Acquire the maximum load, minimum load, stroke, stroke frequency and mixed liquid moisture content from the historical data as the dynamic data of the training set;
[0050] The density of degassed crude oil is calculated based on the historical data as the result data of the training set.
[0051] Furthermore, the training of the initial model based on the training set to obtain a prediction model includes:
[0052] Normalizing the dynamic data and result data in the training set into a feature matrix;
[0053] The prediction model is obtained by performing fitting model training on the initial model according to the feature matrix.
[0054] The present invention adopts the above technical solution and has at least the following beneficial effects:
[0055] A soft measurement method for dynamic liquid level is provided. The maximum load, minimum load, stroke, number of strokes, and water content of the mixed liquid in the real-time data of the pumping well are used as input parameters of the prediction model for prediction to obtain the predicted degassed crude oil density. The target degassed crude oil density and the metering coefficient are obtained through an exhaustive method based on the predicted degassed crude oil density. The soft measurement value of the dynamic liquid level is obtained based on the real-time data, the target degassed crude oil density, and the metering coefficient. During the soft measurement process of the dynamic liquid level, the method combines the real-time data of the pumping well to predict the degassed crude oil density, and calculates the soft measurement value of the dynamic liquid level based on the predicted degassed crude oil density, thereby effectively improving the accuracy of the soft measurement of the dynamic liquid level.
[0056] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0058] Figure 1 The figure is a flow chart showing a soft measurement method of a dynamic liquid level according to an exemplary embodiment of the present invention.
[0059] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. DETAILED DESCRIPTION
[0060] To make the purpose, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be described in detail below. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0061] Due to the complexity of the downhole working conditions of the pumping unit and the dynamic supply of the bottom oil, parameters such as mixed liquid density, free fluid loss, and solid fluid loss cannot be measured in real time. Existing soft measurement methods usually use set parameter values to replace parameters that cannot be measured in real time. Since the accuracy of the soft measurement model depends on the quality of the input parameters and the adaptability of the model, it is difficult to ensure the accuracy of the soft measurement value by calculating based on the set parameter values.
[0062] An embodiment of the present invention provides a soft measurement method for dynamic liquid level, which combines real-time data of pumping wells to predict the density of degassed crude oil and calculates the soft measurement value of the dynamic liquid level based on the predicted value, thereby effectively improving the accuracy of the soft measurement of the dynamic liquid level.
[0063] The method of the present invention is described below with reference to specific examples.
[0064] See also Figure 1 , Figure 1 is a flow chart of a soft measurement method of a dynamic liquid level according to an exemplary embodiment of the present invention. Figure 1 , the method comprising:
[0065] Step S11, obtaining real-time data of the pumping well;
[0066] Step S12: using the maximum load, minimum load, stroke, stroke frequency, and mixed liquid water content in the real-time data as input parameters of a prediction model to predict the degassed crude oil density; the prediction model is a model obtained by training a clustering algorithm model based on historical data;
[0067] Step S13: Obtaining the target degassed crude oil density and metering coefficient by exhaustive method based on the predicted degassed crude oil density;
[0068] Step S14: obtaining a soft measurement value of the dynamic liquid level based on the real-time data, the target degassed crude oil density and the metering coefficient.
[0069] It should be noted that the technical solution provided in this embodiment can be used in practice as a small program or plug-in loaded into existing pumping well systems or applications, or as a standalone application to implement dynamic fluid level soft measurement through an external interface. Applicable scenarios include, but are not limited to, dynamic fluid level measurement in pumping wells.
[0070] It can be understood that the method provided in this embodiment combines the real-time data of the pumping well to predict the density of degassed crude oil during the soft measurement of the dynamic liquid level, and calculates the soft measurement value of the dynamic liquid level based on this, thereby effectively improving the accuracy of the soft measurement of the dynamic liquid level.
[0071] In specific practice, the real-time data in step S11 "obtaining real-time data of the pumping well" includes: static data such as pump diameter, inner diameter of the oil pipe, number of rod stages, rod length, rod diameter, rod density, well depth, crude oil viscosity, oil-gas ratio, crude oil volume coefficient, water density, as well as dynamic data such as maximum load, minimum load, stroke, number of strokes and water content of the mixed liquid, as well as constant parameters such as Young's modulus, speed of sound, and acceleration of gravity.
[0072] In specific practice, the prediction model in step S12 "using the maximum load, minimum load, stroke, number of strokes and water content of the mixed liquid in the real-time data as input parameters of the prediction model to predict and obtain the predicted degassed crude oil density" is a model obtained by training the clustering algorithm model based on historical data.
[0073] In specific practice, step S13 of "obtaining the target degassed crude oil density and metering coefficient by exhaustive enumeration based on the predicted degassed crude oil density" includes: obtaining the target degassed crude oil density and metering coefficient by exhaustive enumeration based on the water content of the mixed liquid using a conversion formula, the conversion formula being: Among them, ρ′ o is the target degassed crude oil density, ρ″ o To predict the density of degassed crude oil, n is the stoichiometric coefficient; the exhaustive method is limited to the following range: if the water content of the mixed liquid is less than or equal to 50%, then 0.76<ρ′ o <0.85; if the water content of the mixed liquid is greater than 50%, then 0.86<ρ′ o <0.94; exhaustive screening conditions are: retain the measurement coefficient to three decimal places, and retain the group with the smallest loss ρ′ o and n.
[0074] It should be noted that in order to ensure the rationality of the degassed crude oil density data, the metering coefficient n is introduced to limit the target degassed crude oil density.
[0075] It can be understood that the technical solution provided in this embodiment further rationalizes the prediction of degassed crude oil density based on the water content of the mixed liquid, providing reliable parameter support for the soft measurement of the dynamic liquid level.
[0076] In specific practice, step S13, "obtaining a soft measurement value of the dynamic liquid level based on real-time data, target degassed crude oil density, and metering coefficient," includes: obtaining a fixed valve opening point load value, a floating valve opening point load value, an upstroke friction force, and a downstroke friction force based on real-time data; and obtaining a soft measurement value of the dynamic liquid level using a dynamic liquid level soft measurement calculation formula, which is: Among them, L′ f Indicates the soft measurement value of the dynamic liquid level, F u Indicates the fixed valve opening point load value, F dIndicates the load value of the floating valve opening point, f1 indicates the friction force of the upstroke, f2 indicates the friction force of the downstroke, Δp1 indicates the solid valve loss, Δp2 indicates the floating valve loss, P D Indicates the pressure of the jacket acting on the liquid surface, P h Indicates oil pressure, f p represents the cross-sectional area of the plunger, ρ′ o represents the target degassed crude oil density, n represents the stoichiometric coefficient, hsl represents the water content of the mixed liquid, ρ w Indicates the density of water.
[0077] It should be noted that solid loss and floating loss are negligible in the calculation, and both values are 0; in this formula, the pressure of the casing acting on the liquid surface, the oil pressure, the cross-sectional area of the plunger, the water content of the mixed liquid and the water density are all derived from real-time data.
[0078] In specific practice, the fixed valve opening point load value, the floating valve opening point load value, the upstroke friction force and the downstroke friction force are obtained based on real-time data, including: solving the pump power diagram based on real-time data to obtain the pump power diagram; obtaining the fixed valve opening point load value and the floating valve opening point load value based on the pump power diagram.
[0079] Specifically, the pump power diagram is solved based on the real-time data to obtain the pump power diagram, including: obtaining the rod column weight based on the rod stage number, rod length, rod diameter and rod density in the real-time data; obtaining the liquid column weight based on the load data and rod column weight in the real-time data; obtaining the light rod speed based on the stroke data and stroke frequency data in the real-time data; obtaining the dimensionless damping value based on the light rod speed; obtaining the damping value based on the pump depth data and the dimensionless damping value in the real-time data; obtaining the load and displacement data at the end of the rod column based on the rod column weight, liquid column weight and damping value combined with Fourier transform; and obtaining the pump power diagram based on the load and displacement data.
[0080] It should be noted that the pole weight calculation equation is established based on the pole number, pole length, pole diameter and pole density according to the mechanical characteristics. The pole weight is obtained by this calculation equation, where M g represents the weight of the rod column, n represents the number of rod levels, i represents the i-th rod, ρ si represents the density of the i-th level rod, l i represents the length of the i-th level rod, d i Indicates the rod diameter of the i-th level rod; Based on the load data and the weight of the rod column, establish the liquid weight calculation equation, M y =wzC i ·yM g , where M yRepresents the weight of the liquid column, wzC represents the load-displacement data set after Fourier transformation, i represents the i-th data point, y represents the load value, and the weight of the liquid column is calculated by this formula; combining the energy dissipation theory and dimensionless damping analysis in fluid mechanics, the damping value of the sucker rod is solved, and the polished rod speed is calculated based on the stroke and stroke frequency. The formula is: gg_speed=2*S*N / 60, where gg_speed represents the polished rod speed, S represents the stroke, and N represents the stroke frequency; combining the relationship curve between the polished rod speed and the dimensionless damping coefficient, the dimensionless damping value C is obtained. d ; Combining the energy dissipation theory and dimensionless damping analysis in fluid mechanics, the damping value solution equation is established. Among them, damp represents the damping value, α represents the speed of sound, C d represents the dimensionless damping value and L represents the pump depth.
[0081] It should be noted that the load and displacement data at the end of the rod column are obtained based on the rod column weight, liquid column weight and damping value combined with Fourier transform, including: in Fourier transform, the Fourier series nfx is 16, the matrix and array size is 4, and the equation is solved in a loop in combination with the aforementioned rod column weight, liquid column weight and damping value to realize the calculation of each time domain and frequency domain data, and obtain the load and displacement data after Fourier transform, that is, wzC.
[0082] It should be noted that the pump work diagram is obtained based on the load and displacement data, including: translating the displacement of the aforementioned wzC data so that the minimum displacement is translated to 0, that is, obtaining the pump work diagram data, namely wzH, and synchronously calculating the maximum load, minimum load, maximum displacement and minimum displacement of the pump work diagram.
[0083] Specifically, the fixed valve opening point load value and the floating valve opening point load value are obtained according to the pump power diagram, including: obtaining the curvature value of each point in the pump power diagram by Heron's formula; dividing the curve of the pump power diagram into 4 segments and taking the point with the largest curvature value in each segment to obtain the fixed valve opening point, the fixed valve closing point, the floating valve opening point and the floating valve closing point; using the load value of the fixed valve opening point as the fixed valve opening point load value; and using the load value of the floating valve opening point as the floating valve opening point load value.
[0084] It should be noted that the Heron formula is used to calculate the curvature of each point on the pump diagram. Take three consecutive points in wzH and calculate the side length between the three points. The expression is:
[0085] Among them, x a Indicates the horizontal coordinate of point a, y a Indicates the vertical coordinate of point a, x b Indicates the horizontal coordinate of point b, y b Indicates the vertical coordinate of point b, x c Indicates the horizontal coordinate of point c, yc Indicates the ordinate of point c; calculates the semi-perimeter of the triangle formed by three points. The specific expression is as follows:
[0086] Among them, L a , L b , L c represents the length of the sides between the three points, S represents the semi-perimeter; the expression for calculating the area of the triangle is: Among them, A s Represents the area of the triangle; calculate the curvature k of the middle point among the three points, and its approximate calculation expression is:
[0087] It should be noted that the pump power diagram curve is divided into 4 segments, and the opening and closing points of the fixed valve and the floating valve are determined by finding the maximum curvature points of different interval segments. The load value of the fixed valve opening point is used as the load value of the fixed valve opening point; the load value of the floating valve opening point is used as the load value of the floating valve opening point.
[0088] Specifically, the upstroke friction force is obtained according to the upstroke friction force solution formula, and the upstroke friction force solution formula is: Among them, A r represents the cross-sectional area of the sucker rod, ρ s It represents the density of the sucker rod, L represents the pump hanging depth, S represents the pumping unit stroke, N represents the pumping unit stroke number, μ represents the crude oil viscosity, and m represents the ratio of the inner diameter of the oil pipe to the diameter of the sucker rod. A t represents the cross-sectional area of the oil pipe; in this formula, the cross-sectional area of the sucker rod, the density of the sucker rod, the pump hanging depth, the stroke of the pumping unit, the number of pumping unit strokes, the crude oil viscosity, and the cross-sectional area of the oil pipe are all derived from real-time data.
[0089] Specifically, the downstroke friction force is obtained according to the downstroke friction force solution formula, and the downstroke friction force solution formula is:
[0090] Among them, A r represents the cross-sectional area of the sucker rod, ρ s represents the density of the sucker rod, ρ l Indicates the standard value of the density of the mixed liquid, ρ l is 0.8, L represents the pump hanging depth, S represents the pumping unit stroke, N represents the pumping unit stroke times, μ represents the crude oil viscosity, A p Indicates the cross-sectional area of the plunger, A o represents the cross-sectional area of the valve hole, ξ is the valve flow coefficient, which can be found on the standard valve flow coefficient chart of the oil well pump, and m is the ratio of the inner diameter of the oil pipe to the diameter of the sucker rod. A trepresents the cross-sectional area of the oil pipe; in this formula, the cross-sectional area of the sucker rod, the density of the sucker rod, the standard value of the mixed liquid density, the pump hanging depth, the pumping unit stroke, the pumping unit stroke frequency, the crude oil viscosity, the cross-sectional area of the plunger, the cross-sectional area of the valve hole, the valve flow coefficient, and the cross-sectional area of the oil pipe are all derived from real-time data.
[0091] It is understandable that the technical solution provided in this embodiment calculates various parameters used for soft measurement in combination with real-time data to improve the accuracy of soft measurement.
[0092] In specific practice, before obtaining real-time data from the pumping well, it also includes: obtaining and obtaining a training set based on historical data; the training set includes maximum load, minimum load, stroke, number of strokes, water content of the mixed liquid and density of degassed crude oil; building an initial model; the initial model is a model built based on the K-Means clustering algorithm; and the initial model is trained based on the training set to obtain a prediction model.
[0093] Specifically, a training set is obtained based on historical data, including: obtaining the maximum load, minimum load, stroke, number of strokes and water content of the mixed liquid from the historical data as dynamic data of the training set; and calculating the density of the degassed crude oil based on the historical data as result data of the training set.
[0094] It should be noted that the density of the mixed liquid is calculated based on the historical data, and the expression is: Among them, ρ′ l Indicates the density of the mixed liquid, F u Indicates the fixed valve opening point load value, F d Indicates the load value of the floating valve opening point, f1 indicates the friction force of the upstroke, f2 indicates the friction force of the downstroke, Δp1 indicates the solid valve loss, Δp2 indicates the floating valve loss, P D Indicates the pressure of the jacket acting on the liquid surface, P h Indicates oil pressure, f p Indicates the cross-sectional area of the plunger, L f Indicates the measured dynamic liquid level depth. The above-mentioned fixed valve opening point load value, floating valve opening point load value, upstroke friction force, and downstroke friction force are all calculated based on historical data. The calculation method refers to the fixed valve opening point load value, floating valve opening point load value, upstroke friction force, and downstroke friction force obtained based on real-time data; it indicates that the fixed valve loss and floating valve loss are negligible, and the values of both are 0; in this formula, the pressure of the casing acting on the liquid surface, the oil pressure, the cross-sectional area of the plunger, and the measured dynamic liquid level depth are all derived from historical data. Based on ρ′ l Calculate the density of degassed crude oil using the formula: Where ρ″ o represents the density of degassed crude oil, ρ′ l represents the density of the mixed liquid, hsl represents the water content of the mixed liquid, ρw Represents water density; the water content of the mixed liquid and water density in this formula are both derived from historical data.
[0095] Specifically, the dynamic data and result data in the training set are standardized into a feature matrix; the initial model is fitted and trained based on the feature matrix to obtain a prediction model.
[0096] It should be noted that the dynamic data and result data in the training set are standardized into a feature matrix, which is:
[0097] Where S represents stroke, N represents stroke number, MaxY represents maximum load value, MinY represents minimum load value, hsl represents water cut, and ρ represents density of degassed crude oil. A multilayer perceptron regression model is defined, and the initial model is fitted using the training set. The multilayer perceptron model defines two layers of hidden neurons, including 100 and 50 neurons respectively; the maximum number of iterations is 1000; and the random seed is 42.
[0098] It can be understood that the technical solution provided in this embodiment uses a big data model prediction method to optimize the calculation of unknown model parameters, which significantly improves the accuracy and reliability of dynamic liquid level soft measurement.
[0099] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database 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), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0100] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0101] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0102] Each embodiment in this specification is described in a related manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For related parts, refer to the description of the method embodiment.
[0103] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0104] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A soft measurement method for a dynamic liquid level, characterized in that: The method comprises: Get real-time data on pumping wells; The maximum load, minimum load, stroke, number of strokes, and water content of the mixed liquid in the real-time data are used as input parameters of a prediction model to predict the degassed crude oil density; the prediction model is a model obtained by training a clustering algorithm model based on historical data; Obtaining a target degassed crude oil density and a stoichiometric coefficient by an exhaustive method based on the predicted degassed crude oil density; A soft measurement value of the dynamic liquid level is obtained according to the real-time data, the target degassed crude oil density and the metering coefficient.
2. The soft sensing method according to claim 1, wherein: The soft measurement value of the dynamic liquid level is obtained based on the real-time data, the target degassed crude oil density and the metering coefficient, including: Obtaining a fixed valve opening point load value, a floating valve opening point load value, an upstroke friction force, and a downstroke friction force based on the real-time data; The soft measurement value of the dynamic liquid surface is obtained by the dynamic liquid surface soft measurement calculation formula, and the dynamic liquid surface soft measurement calculation formula is: Among them, L′ f Indicates the soft measurement value of the dynamic liquid level, F u Indicates the fixed valve opening point load value, F d Indicates the load value of the floating valve opening point, f1 indicates the friction force of the upstroke, f2 indicates the friction force of the downstroke, Δp1 indicates the solid valve loss, Δp2 indicates the floating valve loss, P D Indicates the pressure of the jacket acting on the liquid surface, P h Indicates oil pressure, f p represents the cross-sectional area of the plunger, ρ′ o represents the target degassed crude oil density, n represents the stoichiometric coefficient, hsl represents the water content of the mixed liquid, ρ w Indicates the density of water.
3. The soft measurement method according to claim 2, characterized in that The method of obtaining the fixed valve opening point load value, the floating valve opening point load value, the upstroke friction force, and the downstroke friction force based on the real-time data includes: Solving a pump performance diagram based on the real-time data to obtain a pump performance diagram; The fixed valve opening point load value and the floating valve opening point load value are obtained according to the pump performance diagram.
4. The soft measurement method according to claim 3, characterized in that Solving the pump work diagram based on the real-time data to obtain the pump work diagram includes: Obtaining the weight of the rod column according to the rod level, rod length, rod diameter and rod density in the real-time data; Obtaining the weight of the liquid column based on the load data in the real-time data and the weight of the rod column; Obtaining a polished rod speed based on the stroke data and the stroke frequency data in the real-time data; and obtaining a dimensionless damping value based on the polished rod speed; Obtaining a damping value according to the pump depth data in the real-time data and the dimensionless damping value; Obtaining load and displacement data of the end of the rod string based on the rod string weight, liquid column weight and damping value in combination with Fourier transform; The pump work diagram is obtained based on the load and displacement data.
5. The soft sensing method according to claim 3, wherein: The method of obtaining the fixed valve opening point load value and the floating valve opening point load value according to the pump work diagram includes: Obtaining the curvature value of each point in the pump work diagram by Heron's formula; The curve of the pump performance diagram is divided into 4 segments, and the point with the largest curvature value in each segment is taken to obtain a fixed valve opening point, a fixed valve closing point, a floating valve opening point, and a floating valve closing point; The load value of the fixed valve opening point is used as the load value of the fixed valve opening point; The load value of the floating valve opening point is taken as the load value of the floating valve opening point.
6. The soft sensing method according to claim 3, wherein: The method of obtaining the fixed valve opening point load value, the floating valve opening point load value, the upstroke friction force, and the downstroke friction force based on the real-time data includes: The upstroke friction force is obtained according to the upstroke friction force solution formula, which is: Among them, A r represents the cross-sectional area of the sucker rod, ρ s It represents the density of the sucker rod, L represents the pump hanging depth, S represents the pumping unit stroke, N represents the pumping unit stroke number, μ represents the crude oil viscosity, and m represents the ratio of the inner diameter of the oil pipe to the diameter of the sucker rod. A t Indicates the cross-sectional area of the oil pipe; The downstroke friction force is obtained according to the downstroke friction force solution formula, and the downstroke friction force solution formula is: Among them, A r represents the cross-sectional area of the sucker rod, ρ s represents the density of the sucker rod, ρ l Indicates the standard value of the density of the mixed liquid, ρ l is 0.8, L represents the pump hanging depth, S represents the pumping unit stroke, N represents the pumping unit stroke times, μ represents the crude oil viscosity, A p Indicates the cross-sectional area of the plunger, A o represents the cross-sectional area of the valve hole, ξ is the valve flow coefficient, which can be found on the standard valve flow coefficient chart of the oil well pump, and m is the ratio of the inner diameter of the oil pipe to the diameter of the sucker rod. A t Indicates the cross-sectional area of the oil pipe.
7. The soft sensing method according to claim 1, wherein: The target degassed crude oil density and metering coefficient are obtained by exhaustive method based on the predicted degassed crude oil density, including: The target degassed crude oil density and metering coefficient are obtained by exhaustive enumeration using a conversion formula based on the water content of the mixed liquid. The conversion formula is: Among them, ρ′ o is the target degassed crude oil density, ρ″ o To predict the density of degassed crude oil, n is the stoichiometric coefficient; The exhaustive method limits the range to: if the water content of the mixed liquid is less than or equal to 50%, then 0.76<ρ′ o <0.85; if the water content of the mixed liquid is greater than 50%, then 0.86<ρ′ o <0.94; The exhaustive screening conditions are: retain the measurement coefficient to three decimal places, and retain the set of ρ′ with the smallest loss o and n.
8. The soft sensing method according to claim 1, wherein: Before acquiring the real-time data of the pumping well, the method further includes: Obtaining and obtaining a training set based on historical data; the training set includes maximum load, minimum load, stroke, stroke number, water content of the mixed liquid, and density of degassed crude oil; Constructing an initial model; the initial model is a model constructed based on the K-Means clustering algorithm; The initial model is trained according to the training set to obtain the prediction model.
9. The soft sensing method according to claim 8, characterized in that: The step of obtaining a training set based on historical data includes: Acquire the maximum load, minimum load, stroke, stroke frequency and mixed liquid moisture content from the historical data as the dynamic data of the training set; The density of degassed crude oil is calculated based on the historical data as the result data of the training set.
10. The soft sensing method according to claim 8, wherein: The step of training the initial model according to the training set to obtain a prediction model includes: Normalizing the dynamic data and result data in the training set into a feature matrix; The prediction model is obtained by performing fitting model training on the initial model according to the feature matrix.