Quasi-periodic oil-gas-water three-phase flow phase change inflection point identification method and device
Matrix processing and characteristic points search for the measurement data of three -phase flow current measurement of oil and gas and water, combined with cluster algorithm and gravity gravitational search model, identify the turning point of the three -phase flow of periodic oil and gas water, solving the calculation time in existing technology The problem of long -term disturbances has achieved efficient and accurate inflection points.
Patent Information
- Application Number
- CN202411918918.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, the inflection point recognition method for quasi-periodic oil, gas and water three-phase flow measurement signal has a long calculation time and cannot meet the online measurement requirements. It is also disturbed by the outliers of the measurement signal, and it is easy to fall into local optimality during the iteration process, affecting the measurement accuracy.
By extracting the data of three -phase flow current measurement data of oil and gas and water, perform matrixization, search feature points, use cluster algorithm to divide the feature point collection, extract phase transformer turning point area, perform differential processing, generate time sequence matrix, and use center of gravity to search models Calculate the turning point position.
It improves the accuracy and efficiency of the turning point recognition of the three -phase flow of oil and gas, reduce the calculation cost, reduce the interference of the group, and meet the online measurement requirements.
Smart Images

Figure CN119357717A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of petroleum engineering, and in particular to a method and a device for identifying a phase change inflection point of a quasi-periodic oil-gas-water three-phase flow. Background Art
[0002] Flow rate and holdup are important flow parameters of oil, gas and water three-phase flow in the logging process. Existing parameter measurement methods are mainly based on the differences in the physical properties of the oil, gas and water phases. Sensors are used to directly measure the signals of the oil, gas and water three-phase flow, and the relevant flow parameters including flow rate and holdup are obtained by analyzing the trend of the oil, gas and water three-phase flow signals. However, the oil, gas and water three-phase flow has a complex shape during the flow process, and the phases are coupled with each other, resulting in low accuracy in measuring the flow rate and holdup of each phase.
[0003] In the prior art, the density difference of each phase in the oil-gas-water three-phase flow is utilized, and the phase state control method can be used to convert the disordered oil-gas-water three-phase flow into a single-phase flow corresponding to oil, gas, and water flowing in a time sequence. In order to improve the measurement accuracy of flow rate and retention rate, the phase state control method often adopts a multiple measurement method, thus forming a periodic oil-gas-water three-phase flow measurement signal. This method can reduce the measurement difficulty of the flow parameters of the oil-gas-water three-phase flow and improve the measurement accuracy of the flow parameters of the oil-gas-water three-phase flow. However, in the actual measurement process, the number of measurements is often not fixed, and may be once, twice, or more than twice. Among them, the measurement error is the largest when the number of measurements is once. At this time, the oil-gas-water three-phase flow signal obtained is called a quasi-periodic oil-gas-water three-phase flow phase change signal.
[0004] The accuracy of the phase control method depends on the accuracy of the inflection point identification of the quasi-periodic oil-gas-water three-phase flow measurement signal. At present, the existing inflection point identification methods of quasi-periodic oil-gas-water three-phase flow measurement signals have the following two problems: First, the inflection point identification usually adopts global iterative calculation, which takes a long time to calculate and cannot meet the requirements of online measurement; second, the Bayesian and other related algorithms used in the inflection point identification are disturbed by the outliers of the measurement signal, and will fall into the local optimum during the iteration process, affecting the measurement accuracy. Summary of the invention
[0005] The present invention aims to solve at least one of the problems existing in the prior art and provides a method and device for identifying the inflection point of phase change of quasi-periodic oil-gas-water three-phase flow.
[0006] In one aspect of the present invention, a method for identifying a phase change inflection point of a quasi-periodic oil-gas-water three-phase flow is provided, the method comprising: Extracting a complete cycle of oil-gas-water three-phase flow current measurement data, performing matrix processing on the oil-gas-water three-phase flow current measurement data, and obtaining a corresponding oil-gas-water current matrix; Searching for characteristic points in the oil, gas and water current matrix to construct an oil, gas and water characteristic point set; A clustering algorithm is used to establish an objective function with the minimum line spacing between feature points as the target, and based on the objective function, the oil, gas and water feature point set is divided into a gas-oil segment feature point set, an oil-water segment feature point set, and a water-gas segment feature point set; According to the gas-oil segment feature point set, the oil-water segment feature point set, and the water-gas segment feature point set, respectively extracting the gas-oil segment phase change inflection point region, the oil-water segment phase change inflection point region, and the water-gas segment phase change inflection point region; Performing differential processing on the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region to construct corresponding time series and generate corresponding time series matrix; The time series matrices corresponding to the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region are respectively input into the gravity search model for calculation to obtain the corresponding gas-oil phase change inflection point matrix, oil-water phase change inflection point matrix, and water-gas phase change inflection point matrix; According to the gas-oil phase change inflection point matrix, the oil-water phase change inflection point matrix, and the water-gas phase change inflection point matrix, the specific positions of the gas-oil phase change inflection points, the specific positions of the oil-water phase change inflection points, and the specific positions of the water-gas phase change inflection points are calculated respectively.
[0007] Optionally, extracting a complete cycle of oil-gas-water three-phase flow current measurement data, performing matrix processing on the oil-gas-water three-phase flow current measurement data, and obtaining a corresponding oil-gas-water current matrix includes: The current value vector of the oil-gas-water three-phase flow in a complete cycle after phase state control is obtained using sensors I , the current value vector I It is expressed as: ; in, Current value vector I The 1st, 2nd, 3rd, ..., nth current values in the equation; n represents the current value vector I The total number of current values in ; For the current value vector I Matrix processing is performed to construct the oil, gas, water and current matrix A : ; in, Represents the oil, gas and water current matrix A The current value of the element in the j-th row and k-th column in ; the value range of j is 1 to J, J is the total number of row vectors in the oil-gas-water matrix; the value range of k is 1 to K, K is the total number of column vectors in the oil-gas-water matrix.
[0008] Optionally, searching for characteristic points in the oil-gas-water current matrix to construct an oil-gas-water characteristic point set includes: The characteristic points in the oil-gas-water current matrix are searched using the following characteristic point search function: ; in, represents the feature point search function; Represents the discriminant center Whether it is a feature point; When the value of is 1, is the feature point; When the value of is 0, is a non-feature point; represents the fluctuation threshold; represents the fluctuation discriminant function, and Expressed as ; Represents the oil, gas and water current matrix A The current value of the element in the j-1th row and k-1th column; Represents the oil, gas and water current matrix A The current value of the element in the j-1th row and kth column; Represents the oil, gas and water current matrix A The current value of the element in the j-1th row and k+1th column; Represents the oil, gas and water current matrix A The current value of the element in the j+1th row and bkth column, where bk ranges from k-1 to k+1; Represents the oil, gas and water current matrix A The current value of the element in the bjth row and k-1th column; Represents the oil, gas and water current matrix A The current value of the element in the bj-th row and k-th column; Represents the oil, gas and water current matrix A The current value of the element in the bj-th row and k+1-th column; the value range of bj is j-1 to j+1; The feature point search function will be used The searched feature points constitute the oil, gas and water feature point set, and the oil, gas and water feature point set is expressed as: ; in, represents the set of oil, gas and water feature points, They respectively represent the current values of the 1st, 2nd, 3rd, ..., tnth characteristic points searched from the oil-gas-water current matrix, and tn represents the total number of characteristic points searched.
[0009] Optionally, the clustering algorithm is used to establish an objective function with the minimum line spacing between feature points as the target, and the oil-gas-water feature point set is divided into a gas-oil segment feature point set, an oil-water segment feature point set, and a water-gas segment feature point set based on the objective function, including: Based on the clustering algorithm, the objective function is established : ; in, Indicates the characteristic point number in the gas-oil segment cluster, and its value range is 1 to , represents the total number of characteristic points in the gas-oil segment cluster; Indicates the characteristic point number in the oil-water segment cluster, and its value range is 1 to , represents the total number of feature points in the oil-water segment cluster; Indicates the characteristic point number in the water-gas segment cluster, and its value range is 1 to , Represents the total number of feature points in the water-gas segment cluster; Indicates the maximum number of feature points in the gas-oil segment cluster; Indicates the maximum number of feature points in the oil-water segment cluster; Indicates the maximum number of feature points in the water-gas segment cluster; Represents the row number output function; Indicates the number of the gas-oil segment cluster The current value of the characteristic point; Indicates the number of the gas-oil segment cluster The characteristic points of A The row number of Indicates the characteristic points in the gas-oil segment clustering in the oil-gas-water current matrix A Mean of the row numbers in ; Indicates that the oil-water segment cluster is numbered The current value of the characteristic point; Indicates that the oil-water segment cluster is numbered The characteristic points in the oil-gas-water current matrix A The row number in ; Indicates the characteristic points in the oil-water segment clustering in the oil-gas-water current matrix A Mean of the row numbers in ; Indicates the water-gas segment cluster numbered The current value of the characteristic point; Indicates the water-gas segment cluster numbered The characteristic points in the oil-gas-water current matrix A The row number in ; Indicates the characteristic points in the water-gas segment cluster in the oil-gas-water current matrix A Mean of the row numbers in ; Based on the objective function , the oil, gas and water feature point set is divided into a gas-oil segment feature point set , oil-water segment feature point set , water-gas segment feature point set ,get: ; in, Represents the characteristic point set of the gas and oil segment The number is Elements of Represent the characteristic point set of oil and water segment The number is Elements of Represent the characteristic point set of water and gas segment The number is elements.
[0010] Optionally, extracting the gas-oil segment phase change inflection point region, the oil-water segment phase change inflection point region, and the water-gas segment phase change inflection point region respectively according to the gas-oil segment feature point set, the oil-water segment feature point set, and the water-gas segment feature point set, comprises: According to the characteristic point set of gas and oil segment , oil-water segment feature point set , water-gas segment feature point set The elements in the oil, gas and water current matrix A The position distribution in the , respectively extract the numbering bases corresponding to the phase change inflection point region of the gas-oil segment, the phase change inflection point region of the oil-water segment, and the phase change inflection point region of the water-gas segment, and express them as: ; in, Indicates the numbering base corresponding to the inflection point area of the gas-oil phase change; Indicates the numbering base corresponding to the inflection point area of the oil-water phase transition; Indicates the numbering base corresponding to the inflection point area of the water-gas phase transition; Represents a set of oil, gas and water feature points The number is Elements of express In the oil-gas-water current matrix A The row number in ; Indicates the feature point number; in the calculation hour, The value range is 1 to ; In calculation hour, The value range is to ; In calculation hour, The value range is to ; According to the numbering base, the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region are respectively expressed as: ; in, It indicates the inflection point area of the gas-oil phase change; Represent the inflection point area of the gas-oil phase transition The number is The current value; It indicates the inflection point area of the oil-water phase change; Represent the inflection point region of the oil-water phase transition The number is The current value; It indicates the inflection point area of phase transition in water-gas section; Represent the inflection point region of the water-gas phase transition The number is The current value.
[0011] Optionally, performing differential processing on the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region to construct a corresponding time series and generate a corresponding time series matrix includes: The phase transition inflection point region of the gas-oil segment , Oil-water phase transition inflection point region , Water-gas phase transition inflection point region Perform differential processing, renumber and construct the corresponding time series, and divide the gas-oil phase change inflection point area , Oil-water phase transition inflection point region , Water-gas phase transition inflection point region The corresponding time series are expressed as: ; in, Indicates the inflection point area of the gas-oil phase change The corresponding time series; , Represent the inflection point area of the gas-oil phase transition The number is , The current value; Respectively The 1st, 2nd, 3rd, ..., 3K-1th elements in Indicates the inflection point area of the oil-water phase transition The corresponding time series; , Represent the inflection point region of the oil-water phase transition The number is , The current value; Respectively The 1st, 2nd, 3rd, ..., 3K-1th elements in Indicates the inflection point area of the water-gas phase transition The corresponding time series; , Represent the inflection point region of the water-gas phase transition The number is , The current value; Respectively The 1st, 2nd, 3rd, ..., 3K-1th elements in Generate the time series matrix corresponding to each time series, and express each time series matrix as: ; Where B represents the time series The corresponding time series matrix; Represents the first bi Row, No. bj The element value of the column, used to indicate the time series The The current difference corresponding to each element; Represents the total number of row vectors of the time series matrix B; represents the total number of column vectors of the time series matrix B; C represents the time series The corresponding time series matrix; Represents the first ci Row, No. cj The element value of the column, used to indicate the time series The The current difference corresponding to each element; Represents the total number of row vectors of the time series matrix C; Represents the total number of column vectors of the time series matrix C; D represents the time series The corresponding time series matrix; represents the first d Row, No. DJ The element value of the column, used to indicate the time series The The current difference corresponding to each element; Represents the total number of row vectors of the time series matrix D; Represents the total number of column vectors of the time series matrix D.
[0012] Optionally, the time series matrices corresponding to the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region are respectively input into the gravity search model for calculation to obtain the corresponding gas-oil phase change inflection point matrix, oil-water phase change inflection point matrix, and water-gas phase change inflection point matrix, including: Input the time series matrix B, time series matrix C, and time series matrix D into the gravity search model respectively ,get: ; in, Indicates the minimum number of elements required for update iteration; Represents the updated matrix corresponding to the time series matrix B; Representation Matrix The number of elements in ; Represents the updated matrix corresponding to the time series matrix C; Representation Matrix The number of elements in ; Represents the updated matrix corresponding to the time series matrix D; Representation Matrix The number of elements in ; R represents the inflection point matrix of gas-oil phase transition; U represents the oil-water phase transition inflection point matrix; P Represents the water vapor phase transition inflection point matrix.
[0013] Optionally, a barycentric gravity search model It is expressed as: ; in, L Represents the center of gravity search model The input matrix of Represents the input matrix L The corresponding updated matrix; Representation Matrix The number of elements in ; E express The output matrix of Obtained by the following formula: ; in, Indicates the value of the gravity angle of the center of gravity; LA , LB , LC , LD are matrix update options and are expressed as: ; in, The input matrixL The feature blocks in the feature blocks have the same number of row elements and the same number of column elements, and ; Center of gravity angle value It is expressed as: ;in, It represents the component of the resultant force in the x-direction of the horizontal axis; It represents the component of the resultant force in the y direction of the longitudinal axis; and Respectively expressed as: ; in, s Represents the input matrix L The feature block number in the range of 1 to 8; Represents the input matrix L The number is s Feature blocks The corresponding gravity angle of the center of gravity; Indicates the number s Feature blocks The corresponding center of gravity is expressed as: ; in, v Represents the input matrix L Different from s The feature block number, whose value range is from 1 to 8; Represents the input matrix L Medium feature block The corresponding centroid eigenvalue; Represents the input matrix L Medium feature block The corresponding centroid eigenvalue; Feature Block The central feature block The horizontal axis of Feature Block The central feature block The horizontal axis of Feature Block The central feature block The vertical coordinate of Feature Block The central feature block The vertical coordinate of Centroid eigenvalue It is expressed as: ; in, Representation feature block Middle Row, No. Elements of a column; The value range is 1 to , Representation feature block The total number of rows in ; The value range is 1 to , Representation feature block The total number of columns in ; Representation feature block The column vector of the variance weights; Representation feature block The weight of the row vector variance of ; Representation feature block The weight of the variance of the diagonal line; Representation feature block The weight of the variance of the anti-diagonal line; Feature Block The corresponding gravity angle of the center of gravity It is expressed as: .
[0014] Optionally, the specific positions of the gas-oil phase change inflection points, the specific positions of the oil-water phase change inflection points, and the specific positions of the water-gas phase change inflection points are calculated respectively according to the gas-oil phase change inflection point matrix, the oil-water phase change inflection point matrix, and the water-gas phase change inflection point matrix, including: According to the inflection point matrix of gas-oil phase transition R , Oil-water phase transition inflection point matrix U , water vapor phase transition inflection point matrix P , the specific positions of the inflection points of the gas-oil phase change, the oil-water phase change, and the water-gas phase change are calculated using the following formulas: ; in, represents the phase transition inflection point output function; Represents the inflection point matrix of gas-oil phase transition R The number is rx The element value of Represents the oil-water phase transition inflection point matrix U The number is ux The element value of Represents the water vapor phase transition inflection point matrix P The number is px The element value of The output time series number is the specific location of the inflection point of the gas-oil phase change; The output time series number is the specific location of the inflection point of the oil-water phase change; The output time series number is the specific location of the inflection point of the water-gas phase change.
[0015] Another aspect of the present invention provides a device for identifying phase change inflection points of a quasi-periodic oil-gas-water three-phase flow, the device comprising: A matrix processing module is used to extract the oil-gas-water three-phase flow current measurement data of a complete cycle, and perform matrix processing on the oil-gas-water three-phase flow current measurement data to obtain a corresponding oil-gas-water current matrix; A feature point search module, used to search for feature points in the oil, gas and water current matrix to construct an oil, gas and water feature point set; A division module is used to use a clustering algorithm to establish an objective function with the minimum line spacing between feature points as the target, and divide the oil, gas and water feature point set into a gas-oil segment feature point set, an oil-water segment feature point set, and a water-gas segment feature point set based on the objective function; An extraction module, for extracting the gas-oil segment phase change inflection point region, the oil-water segment phase change inflection point region, and the water-gas segment phase change inflection point region respectively according to the gas-oil segment feature point set, the oil-water segment feature point set, and the water-gas segment feature point set; A differential processing module is used to perform differential processing on the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region, to construct a corresponding time series and generate a corresponding time series matrix; A gravity search module is used to input the time series matrices corresponding to the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region into the gravity search model for calculation to obtain the corresponding gas-oil phase change inflection point matrix, oil-water phase change inflection point matrix, and water-gas phase change inflection point matrix; The calculation module is used to calculate the specific positions of the gas-oil phase change inflection points, the oil-water phase change inflection points, and the water-gas phase change inflection points according to the gas-oil phase change inflection point matrix, the oil-water phase change inflection point matrix, and the water-gas phase change inflection point matrix.
[0016] Compared with the prior art, the present invention has the following beneficial effects: 1. Convert the one-dimensional time series of oil, gas and water three-phase flow current measurement data into a two-dimensional matrix to make the trend change characteristics between data more significant.
[0017] 2. According to the differences in currents of each phase of the oil, gas and water three-phase flow, feature point search is used to quickly retrieve feature points in the oil, gas and water current matrix, thereby improving retrieval efficiency.
[0018] 3. The minimum row spacing clustering is performed by using the row spacing difference between feature points to extract the phase change inflection point area of the gas-oil segment, the phase change inflection point area of the oil-water segment, and the phase change inflection point area of the water-gas segment, thereby reducing the calculation cost.
[0019] 4. The gravity principle is adopted, the gravity search model is used, and the related iterative calculation is performed through the gravity and amplitude angle between the characteristic blocks, which narrows the range of the phase change inflection point area, reduces the interference of outliers, and improves the measurement and identification accuracy of the phase change inflection point of the quasi-periodic oil-gas-water three-phase flow. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0021] Figure 1 A flow chart of a method for identifying phase change inflection points of quasi-periodic oil-gas-water three-phase flow provided in one embodiment of the present invention; Figure 2 A flow chart of a method for identifying phase change inflection points of quasi-periodic oil-gas-water three-phase flow provided in another embodiment of the present invention; Figure 3 A schematic diagram of a quasi-periodic oil-gas-water three-phase flow acquisition device based on phase state regulation provided by another embodiment of the present invention; Figure 4 A signal inflection point discrimination diagram of the gas-oil segment, the oil-water segment, and the water-gas segment in the quasi-periodic oil-gas-water three-phase flow provided by another embodiment of the present invention; Figure 5 A flow rate error analysis diagram of each phase of an oil-gas-water three-phase flow according to a method for identifying inflection points of a quasi-periodic oil-gas-water three-phase flow measurement signal in the prior art provided by another embodiment of the present invention; Figure 6 A flow rate error analysis diagram of each phase of the oil-gas-water three-phase flow of the quasi-periodic oil-gas-water three-phase flow phase change inflection point identification method provided by the present invention is provided as another embodiment of the present invention; Figure 7 A comparison chart of recognition accuracy and recognition time between the quasi-periodic oil-gas-water three-phase flow phase change inflection point recognition method provided by the present invention and the quasi-periodic oil-gas-water three-phase flow measurement signal inflection point recognition method already available in the prior art, provided as another embodiment of the present invention; Figure 8 A schematic structural diagram of a device for identifying phase change inflection points of quasi-periodic oil-gas-water three-phase flow provided in another embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present invention. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present invention can be implemented. The division of the following embodiments is for the convenience of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.
[0023] One embodiment of the present invention relates to a method for identifying phase change inflection points of quasi-periodic oil-gas-water three-phase flow, the process of which is as follows: Figure 1 As shown, it includes steps S110 to S170. Figure 2 Steps S110 to S170 are described in detail.
[0024] Step S110, extracting a complete cycle of oil-gas-water three-phase flow current measurement data, performing matrix processing on the oil-gas-water three-phase flow current measurement data, and obtaining a corresponding oil-gas-water current matrix.
[0025] Specifically, step S110 can use a quasi-periodic oil-gas-water three-phase flow acquisition device based on phase state regulation to extract oil-gas-water three-phase flow current measurement data. Figure 3 As shown, the quasi-periodic oil-gas-water three-phase flow acquisition device based on phase state regulation may include a separation box, a water tank, a water pump, a water volume controller, an oil tank, an oil pump, an oil volume controller, an air compressor, an air volume controller, a controller, a mixing device, a control valve 1, a control valve 2, a control valve 3, a differential pressure sensor, a computer, etc. In step S110, the differential pressure sensor in the acquisition device may be used to collect the oil-gas-water three-phase flow signal data, and a complete cycle of oil-gas-water three-phase flow current measurement data may be extracted from the oil-gas-water three-phase flow signal data set transmitted to the computer by the differential pressure sensor.
[0026] In other words, step S110 may include: using a sensor to obtain a current value vector of a complete cycle of the oil-gas-water three-phase flow after phase state regulation processing: I , the current value vector I It is expressed as: .in, Current value vector I The 1st, 2nd, 3rd, ..., nth current values in. n represents the current value vector I The total number of current values in. I The element numbers in dk , dkThe value range is 1 to n, then the current value vector I The dk The current value can be expressed as .
[0027] For the current value vector I Matrix processing is performed to construct the oil, gas, water and current matrix A : .
[0028] in, Represents the oil, gas and water current matrix A The current value of the element in the jth row and kth column in . The value range of j is 1 to J, where J is the total number of row vectors in the oil-gas-water matrix. The value range of k is 1 to K, where K is the total number of column vectors in the oil-gas-water matrix.
[0029] By converting the one-dimensional time series of current values into a two-dimensional matrix, the trend change characteristics between data can be made more significant, which helps to improve the accuracy of identifying the inflection point of phase change in oil-gas-water three-phase flow.
[0030] Step S120, searching for characteristic points in the oil, gas, and water current matrix to construct an oil, gas, and water characteristic point set.
[0031] Specifically, the current values between the phases of the oil-gas-water three-phase flow are quite different. By searching for characteristic points in the oil-gas-water current matrix, edge detection can be performed on the oil-gas-water three-phase flow current matrix, and the area where the phase change inflection point of the oil-gas-water three-phase flow is located can be quickly narrowed down, reducing the amount of related calculations.
[0032] Exemplarily, step S120 includes: searching for characteristic points in the oil-gas-water current matrix using the following characteristic point search function: .
[0033] in, Represents the feature point search function. Represents the discriminant center Whether it is a feature point. When the value of is 1, is the feature point. When the value of is 0, is a non-feature point. Indicates the fluctuation threshold. represents the fluctuation discriminant function, and Expressed as . Represents the oil, gas and water current matrix A The current value of the element in the j-1th row and k-1th column. Represents the oil, gas and water current matrix A The current value of the element in the j-1th row and kth column. Represents the oil, gas and water current matrix A The current value of the element in the j-1th row and k+1th column. Represents the oil, gas and water current matrix A The current value of the element in the j+1th row and bkth column, the value range of bk is from k-1 to k+1. Represents the oil, gas and water current matrix A The current value of the element in the bjth row and k-1th column. Represents the oil, gas and water current matrix A The current value of the element in the bj-th row and k-th column. Represents the oil, gas and water current matrix A The current value of the element in the bjth row and k+1th column. The value range of bj is j-1 to j+1.
[0034] The feature point search function will be used The searched feature points form the oil, gas and water feature point set, which is expressed as: .
[0035] in, Represents a set of oil, gas and water feature points. Respectively represent the current values of the 1st, 2nd, 3rd, …, tnth feature points searched from the oil, gas and water current matrix. tn represents the total number of feature points searched. The element numbers in ti , ti The value range of is 1 to tn, then the oil, gas and water feature point set Middle ti The current value of the characteristic point can be expressed as .
[0036] By searching for characteristic points in the oil, gas and water current matrix based on the current differences of each phase of the oil, gas and water three-phase flow, an oil, gas and water characteristic point matrix is constructed, which can effectively improve the retrieval efficiency.
[0037] Step S130, using a clustering algorithm to establish an objective function with the minimum line spacing between feature points as the goal, and based on the objective function, dividing the oil, gas and water feature point set into a gas-oil segment feature point set, an oil-water segment feature point set, and a water-gas segment feature point set.
[0038] Exemplarily, step S130 includes: establishing an objective function based on a clustering algorithm : .
[0039] in, Indicates the characteristic point number in the gas-oil segment cluster, and its value range is 1 to , Represents the total number of feature points in the gas-oil segment cluster. Indicates the characteristic point number in the oil-water segment cluster, and its value range is 1 to , Represents the total number of feature points in the oil-water segment cluster. Indicates the characteristic point number in the water-gas segment cluster, and its value range is 1 to , Represents the total number of feature points in the water-gas segment cluster. Indicates the maximum number of feature points in the gas-oil segment cluster. Indicates the maximum number of feature points in the oil-water segment cluster. Indicates the maximum number of feature points in the water-gas segment cluster.
[0040] Represents a row number output function. Indicates the number of gas-oil segment clusters The current value of the characteristic point. Indicates the number of the gas-oil segment cluster The characteristic points of A The row number of . Indicates the characteristic points in the gas-oil segment clustering in the oil-gas-water current matrix A The row number in the mean.
[0041] Indicates that the oil-water segment cluster is numbered The current value of the characteristic point. Indicates that the oil-water segment cluster is numbered The characteristic points in the oil-gas-water current matrix A The row number in . Indicates the characteristic points in the oil-water segment clustering in the oil-gas-water current matrix A The row number in the mean.
[0042] Indicates the water-gas segment cluster numbered The current value of the characteristic point. Indicates the water-gas segment cluster numbered The characteristic points in the oil-gas-water current matrix A The row number in . Indicates the characteristic points in the water-gas segment clustering in the oil-gas-water current matrix A The row number in the mean.
[0043] Based on the objective function , the oil, gas and water feature point set is divided into the gas-oil segment feature point set , oil-water segment feature point set , water-gas segment feature point set ,get: .
[0044] in, Represents the characteristic point set of the gas and oil segment The number is elements. Represent the characteristic point set of oil and water segment The number is elements. Represent the characteristic point set of water and gas segment The number is elements.
[0045] By using the difference in row spacing between feature points to perform minimum row spacing clustering, the oil, gas and water feature point set is divided into a gas-oil segment feature point set, an oil-water segment feature point set, and a water-gas segment feature point set. This can effectively reduce the interference caused by abnormal feature points and reduce the computational cost.
[0046] Step S140, extracting the gas-oil segment phase change inflection point region, the oil-water segment phase change inflection point region, and the water-gas segment phase change inflection point region respectively according to the gas-oil segment feature point set, the oil-water segment feature point set, and the water-gas segment feature point set.
[0047] Exemplarily, step S140 includes: according to the gas-oil segment feature point set , oil-water segment feature point set , water-gas segment feature point set The elements in the oil, gas and water current matrix A According to the position distribution in the , the number bases corresponding to the phase change inflection point region of the gas-oil segment, the phase change inflection point region of the oil-water segment, and the phase change inflection point region of the water-gas segment are extracted and expressed as: .
[0048] in, Indicates the numbering base corresponding to the inflection point area of the gas-oil phase change. Indicates the numbering base corresponding to the inflection point area of the oil-water phase change. Indicates the numbering base corresponding to the inflection point region of the water-gas phase transition. Represents a set of oil, gas and water feature points The number is elements. express In the oil-gas-water current matrix A The row number in . Indicates the feature point number. hour, The value range is 1 to In the calculation hour, The value range is to In the calculation hour, The value range is to .
[0049] According to the numbering cardinality, the phase change inflection point region of the gas-oil segment, the phase change inflection point region of the oil-water segment, and the phase change inflection point region of the water-gas segment are expressed as: .
[0050] in, Indicates the inflection point area of the gas-oil phase change. Represent the inflection point area of the gas-oil phase transition The number is The current value.
[0051] It indicates the inflection point of the oil-water phase change. Represent the inflection point region of the oil-water phase transition The number is The current value.
[0052] Indicates the inflection point area of the water-gas phase transition. Represent the inflection point region of the water-gas phase transition The number is The current value.
[0053] By extracting the gas-oil segment phase change inflection point region, the oil-water segment phase change inflection point region, and the water-gas segment phase change inflection point region respectively according to the gas-oil segment feature point set, the oil-water segment feature point set, and the water-gas segment feature point set, the interference caused by abnormal feature points can be further reduced, and the calculation cost can be reduced at the same time.
[0054] Step S150, performing differential processing on the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region, constructing corresponding time series and generating a corresponding time series matrix.
[0055] Exemplarily, step S150 includes: respectively analyzing the phase change inflection point region of the gas-oil segment , Oil-water phase transition inflection point region , Water-gas phase transition inflection point region Perform differential processing, renumber and construct the corresponding time series, and divide the gas-oil phase change inflection point area , Oil-water phase transition inflection point region , Water-gas phase transition inflection point region The corresponding time series are expressed as: .
[0056] in, Indicates the inflection point area of the gas-oil phase change The corresponding time series; , Represent the inflection point area of the gas-oil phase transition The number is , The current value. Respectively The 1st, 2nd, 3rd, …, 3K-1th elements in . That is, , , , and so on, . The time series The element numbers in nai , nai The value range of is 1 to 3K-1, then the time series The nai The elements can be recorded as .
[0057] Indicates the inflection point area of the oil-water phase transition The corresponding time series. , Represent the inflection point region of the oil-water phase transition The number is , The current value. Respectively The 1st, 2nd, 3rd, …, 3K-1th elements in . That is, , , , and so on, . The time series The element numbers in noi , noi The value range of is 1 to 3K-1, then the time series The noi The elements can be recorded as .
[0058] Indicates the inflection point area of the water-gas phase transition The corresponding time series. , Represent the inflection point region of the water-gas phase transition The number is , The current value. Respectively The 1st, 2nd, 3rd, …, 3K-1th elements in . That is, , , , and so on, . The time series The element numbers in nwi , nwi The value range of is 1 to 3K-1, then the time series The nwi The elements can be recorded as .
[0059] Generate the time series matrix corresponding to each time series, and express each time series matrix as: .
[0060] Where B represents the time series The corresponding time series matrix. Represents the first bi Row, No. bj The element value of the column, used to indicate the time series The The current difference corresponding to each element. Represents the total number of row vectors of the time series matrix B. Represents the total number of column vectors of the time series matrix B. C represents the time series The corresponding time series matrix. Represents the first ci Row, No. cj The element value of the column, used to indicate the time series The The current difference corresponding to each element. Represents the total number of row vectors of the time series matrix C. Represents the total number of column vectors of the time series matrix C. D represents the time series The corresponding time series matrix. represents the first d Row, No. DJ The element value of the column, used to indicate the time series The The current difference corresponding to each element. Represents the total number of row vectors of the time series matrix D; Represents the total number of column vectors of the time series matrix D.
[0061] Step S160, input the time series matrices corresponding to the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region into the center of gravity search model for calculation, and obtain the corresponding gas-oil phase change inflection point matrix, oil-water phase change inflection point matrix, and water-gas phase change inflection point matrix.
[0062] Specifically, since the data gradient in the inflection point region of the phase change of the oil-gas-water three-phase flow varies greatly, when a single element is used as a variable in the calculation, the calculation result is easily disturbed by outliers, trapped in a local optimum, and affects the measurement accuracy. Therefore, step S160 uses the gravity search model to update the matrix data using the gravity between feature blocks as a variable to reduce outlier interference and improve measurement accuracy.
[0063] Exemplarily, the gravity search model can be pre-built. The gravity search model is denoted as , then the center of gravity search model It can be expressed as: .
[0064] in, L Represents the center of gravity search model The input matrix. Represents the input matrix L The corresponding updated matrix. Representation Matrix The number of elements. E express The output matrix of .
[0065] Obtained by the following formula: .
[0066] in, Indicates the value of the gravity angle of the center of gravity; LA , LB , LC , LD are matrix update options and are expressed as: .
[0067] in, The input matrix L The feature blocks in the feature blocks have the same number of row elements and the same number of column elements, and .
[0068] Center of gravity angle value It is expressed as: .in, It represents the component of the resultant force in the x-direction of the horizontal axis; It represents the component of the resultant force in the y direction of the vertical axis.
[0069] and Respectively expressed as: .
[0070] in, s Represents the input matrix L The feature block number in , which ranges from 1 to 8. Represents the input matrix L The number is s Feature blocks The corresponding gravity angle of the center of gravity. Indicates the number s Feature blocks The corresponding center of gravity is expressed as: .
[0071] in, v Represents the input matrix L Different from s The feature block number ranges from 1 to 8. Represents the input matrix L Medium feature block The corresponding centroid eigenvalue. Represents the input matrix L Medium feature block The corresponding centroid eigenvalue. Feature Block The central feature block The horizontal axis of . Feature Block The central feature block The horizontal axis of . Feature Block The central feature block The vertical coordinate of . Feature Block The central feature block The vertical coordinate of .
[0072] Centroid eigenvalue It is expressed as: .
[0073] in, Representation feature block Middle Row, No. Elements of a column. The value range is 1 to , Representation feature block The total number of rows in . The value range is 1 to , Representation feature block The total number of columns in . Representation feature block Column vector of variance weights. Representation feature block The row vector of variance weights. Representation feature block The weights of the variance of the diagonal. Representation feature block The weights for the variance of the anti-diagonal.
[0074] Feature Block The corresponding gravity angle of the center of gravity It is expressed as: .
[0075] Exemplarily, step S160 includes: inputting the time series matrix B, the time series matrix C, and the time series matrix D into the center of gravity search model ,get: .
[0076] in, Indicates the minimum number of elements required for update iteration. Represents the updated matrix corresponding to the time series matrix B. Representation Matrix The number of elements. Represents the updated matrix corresponding to the time series matrix C. Representation Matrix The number of elements. Represents the updated matrix corresponding to the time series matrix D. Representation Matrix The number of elements. R Represents the gas-oil phase transition inflection point matrix. U represents the oil-water phase transition inflection point matrix. P Represents the water vapor phase transition inflection point matrix.
[0077] Specifically, The input matrix in L Replace them with time series matrix B, time series matrix C, and time series matrix D respectively, and use the gravity search model Update the matrix data to get the corresponding gas-oil phase change inflection point matrix R , Oil-water phase transition inflection point matrix U , water vapor phase transition inflection point matrix P .
[0078] Step S170, respectively calculating the specific positions of the gas-oil phase change inflection points, the oil-water phase change inflection points, and the water-gas phase change inflection points according to the gas-oil phase change inflection point matrix, the oil-water phase change inflection point matrix, and the water-gas phase change inflection point matrix.
[0079] Exemplarily, step S170 includes: according to the gas-oil phase change inflection point matrix R , Oil-water phase transition inflection point matrix U , water vapor phase transition inflection point matrixP , use the following formula to calculate the specific positions of the inflection points of the gas-oil phase change, the oil-water phase change, and the water-gas phase change: .
[0080] in, Represents the phase transition inflection point output function. Represents the inflection point matrix of gas-oil phase transition R The number is rx The element value of . Represents the oil-water phase transition inflection point matrix U The number is ux The element value of . Represents the water vapor phase transition inflection point matrix P The number is px The element value of . The output time series number is the specific location of the inflection point of the gas-oil phase change. The output time series number is the specific location of the inflection point of the oil-water phase change. The output time series number is the specific location of the water-gas phase change inflection point. In other words, the gas-oil phase change inflection point matrix R The time series corresponding to the maximum value of the elements in is the specific location of the inflection point of the gas-oil phase change, that is, the gas-oil interface. U The time series corresponding to the maximum value of the elements in is the specific location of the inflection point of the oil-water phase transition, that is, the oil-water interface. P The time series corresponding to the maximum value of the element in is the specific position of the phase change inflection point of the water-gas segment, that is, the water-gas interface. For example, the gas-oil interface, oil-water interface, and water-gas interface obtained by the quasi-periodic oil-gas-water three-phase flow phase change inflection point identification method provided in this embodiment are as follows: Figure 4 shown.
[0081] The method for identifying the phase change inflection point of quasi-periodic oil-gas-water three-phase flow provided by the embodiment of the present invention has the following beneficial effects compared with the prior art: 1. Convert the one-dimensional time series of oil, gas and water three-phase flow current measurement data into a two-dimensional matrix to make the trend change characteristics between data more significant.
[0082] 2. According to the differences in currents of each phase of the oil, gas and water three-phase flow, feature point search is used to quickly retrieve feature points in the oil, gas and water current matrix, thereby improving retrieval efficiency.
[0083] 3. The minimum row spacing clustering is performed by using the row spacing difference between feature points to extract the phase change inflection point area of the gas-oil segment, the phase change inflection point area of the oil-water segment, and the phase change inflection point area of the water-gas segment, thereby reducing the calculation cost.
[0084] 4. The gravity principle is adopted, the gravity search model is used, and the related iterative calculation is performed through the gravity and amplitude angle between the characteristic blocks, which narrows the range of the phase change inflection point area, reduces the interference of outliers, and improves the measurement and identification accuracy of the phase change inflection point of the quasi-periodic oil-gas-water three-phase flow.
[0085] In order to verify the recognition accuracy and recognition efficiency of the quasi-periodic oil-gas-water three-phase flow phase change inflection point recognition method provided by the present invention, the inventors conducted an experimental verification on the quasi-periodic oil-gas-water three-phase flow phase change inflection point recognition method proposed by the present invention and the quasi-periodic oil-gas-water three-phase flow measurement signal inflection point recognition method in the prior art. The experimental results are as follows: Figures 5 to 7 shown.
[0086] like Figure 5 As shown in the figure, the maximum relative error of oil phase flow measurement obtained based on the inflection point identification method of quasi-periodic oil-gas-water three-phase flow measurement signal in the prior art is 5.8%, the maximum relative error of gas phase flow measurement is 5.32%, and the maximum relative error of water phase flow measurement is 5.74%. Figure 6 As shown, the maximum relative error of oil phase flow measurement obtained based on the quasi-periodic oil-gas-water three-phase flow phase change inflection point identification method provided by the present invention is 1.32%, the maximum relative error of gas phase flow measurement is 1.21%, and the maximum relative error of water phase flow measurement is 1.35%, all of which are within the allowable measurement error range and meet the needs of oilfield production. Moreover, each relative error is smaller than the corresponding relative error obtained based on the quasi-periodic oil-gas-water three-phase flow measurement signal inflection point identification method already available in the prior art.
[0087] like Figure 7 As shown, the average recognition accuracy of the quasi-periodic oil-gas-water three-phase flow phase change inflection point recognition method provided by the present invention is 99.30%, which is higher than the average recognition accuracy of the quasi-periodic oil-gas-water three-phase flow measurement signal inflection point recognition method in the prior art. In terms of recognition time, the recognition time of the quasi-periodic oil-gas-water three-phase flow phase change inflection point recognition method provided by the present invention can reach 21.23ms at the fastest, and the average recognition time is 23.20ms, which is significantly less than the quasi-periodic oil-gas-water three-phase flow measurement signal inflection point recognition method in the prior art, and has a better recognition speed.
[0088] It can be seen from the above experimental results that the quasi-periodic oil-gas-water three-phase flow phase change inflection point identification method provided by the present invention reduces the calculation cost, reduces the interference of outlier signals, and improves the inflection point measurement accuracy and identification speed compared with the quasi-periodic oil-gas-water three-phase flow measurement signal inflection point identification method already available in the prior art.
[0089] Another embodiment of the present invention relates to a device for identifying phase change inflection points of quasi-periodic oil-gas-water three-phase flow, such as Figure 8As shown, it includes a matrix processing module 810, a feature point search module 820, a division module 830, an extraction module 840, a difference processing module 850, a center of gravity search module 860, and a calculation module 870.
[0090] The matrix processing module 810 is used to extract the oil-gas-water three-phase flow current measurement data of a complete cycle, perform matrix processing on the oil-gas-water three-phase flow current measurement data, and obtain the corresponding oil-gas-water current matrix.
[0091] The feature point search module 820 is used to search for feature points in the oil-gas-water current matrix and construct an oil-gas-water feature point set.
[0092] The division module 830 is used to adopt a clustering algorithm to establish an objective function with the minimum line spacing between feature points as the target, and divide the oil, gas and water feature point set into a gas-oil segment feature point set, an oil-water segment feature point set, and a water-gas segment feature point set based on the objective function.
[0093] The extraction module 840 is used to extract the gas-oil segment phase change inflection point region, the oil-water segment phase change inflection point region, and the water-gas segment phase change inflection point region according to the gas-oil segment feature point set, the oil-water segment feature point set, and the water-gas segment feature point set.
[0094] The differential processing module 850 is used to perform differential processing on the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region, construct corresponding time series and generate corresponding time series matrix.
[0095] The gravity search module 860 is used to input the time series matrices corresponding to the gas-oil phase change inflection point area, the oil-water phase change inflection point area, and the water-gas phase change inflection point area into the gravity search model for calculation to obtain the corresponding gas-oil phase change inflection point matrix, oil-water phase change inflection point matrix, and water-gas phase change inflection point matrix.
[0096] The calculation module 870 is used to calculate the specific positions of the gas-oil phase change inflection points, the oil-water phase change inflection points, and the water-gas phase change inflection points according to the gas-oil phase change inflection point matrix, the oil-water phase change inflection point matrix, and the water-gas phase change inflection point matrix.
[0097] The specific implementation method of the quasi-periodic oil-gas-water three-phase flow phase change inflection point identification device provided in the embodiment of the present invention can be referred to the quasi-periodic oil-gas-water three-phase flow phase change inflection point identification method provided in the embodiment of the present invention, and will not be repeated here.
[0098] The quasi-periodic oil-gas-water three-phase flow phase change inflection point identification device provided by the embodiment of the present invention has the following beneficial effects compared with the prior art: 1. Convert the one-dimensional time series of oil, gas and water three-phase flow current measurement data into a two-dimensional matrix to make the trend change characteristics between data more significant.
[0099] 2. According to the differences in currents of each phase of the oil, gas and water three-phase flow, feature point search is used to quickly retrieve feature points in the oil, gas and water current matrix, thereby improving retrieval efficiency.
[0100] 3. The minimum row spacing clustering is performed by using the row spacing difference between feature points to extract the phase change inflection point area of the gas-oil segment, the phase change inflection point area of the oil-water segment, and the phase change inflection point area of the water-gas segment, thereby reducing the calculation cost.
[0101] 4. The gravity principle is adopted, the gravity search model is used, and the related iterative calculation is performed through the gravity and amplitude angle between the characteristic blocks, which narrows the range of the phase change inflection point area, reduces the interference of outliers, and improves the measurement and identification accuracy of the phase change inflection point of the quasi-periodic oil-gas-water three-phase flow.
[0102] Those skilled in the art will appreciate that the above-mentioned embodiments are specific embodiments for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A method for identifying phase change inflection points of quasi-periodic oil-gas-water three-phase flow, characterized in that: The identification method comprises: Extracting a complete cycle of oil-gas-water three-phase flow current measurement data, performing matrix processing on the oil-gas-water three-phase flow current measurement data, and obtaining a corresponding oil-gas-water current matrix; Searching for characteristic points in the oil, gas and water current matrix to construct an oil, gas and water characteristic point set; A clustering algorithm is used to establish an objective function with the minimum line spacing between feature points as the target, and based on the objective function, the oil, gas and water feature point set is divided into a gas-oil segment feature point set, an oil-water segment feature point set, and a water-gas segment feature point set; According to the gas-oil segment feature point set, the oil-water segment feature point set, and the water-gas segment feature point set, respectively extracting the gas-oil segment phase change inflection point region, the oil-water segment phase change inflection point region, and the water-gas segment phase change inflection point region; Performing differential processing on the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region to construct corresponding time series and generate corresponding time series matrix; The time series matrices corresponding to the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region are respectively input into the gravity search model for calculation to obtain the corresponding gas-oil phase change inflection point matrix, oil-water phase change inflection point matrix, and water-gas phase change inflection point matrix; According to the gas-oil phase change inflection point matrix, the oil-water phase change inflection point matrix, and the water-gas phase change inflection point matrix, the specific positions of the gas-oil phase change inflection points, the specific positions of the oil-water phase change inflection points, and the specific positions of the water-gas phase change inflection points are calculated respectively.
2. The identification method according to claim 1, characterized in that: The extracting of a complete cycle of oil-gas-water three-phase flow current measurement data, performing matrix processing on the oil-gas-water three-phase flow current measurement data, and obtaining a corresponding oil-gas-water current matrix includes: The current value vector of the oil-gas-water three-phase flow in a complete cycle after phase state control is obtained using sensors I , the current value vector I It is expressed as: ; in, Current value vector I The 1st, 2nd, 3rd, ..., nth current values in the equation; n represents the current value vector I The total number of current values in ; For the current value vector I Matrix processing is performed to construct the oil, gas, water and current matrix A : ; in, Represents the oil, gas and water current matrix A The current value of the element in the j-th row and k-th column in ; the value range of j is 1 to J, J is the total number of row vectors in the oil-gas-water matrix; the value range of k is 1 to K, K is the total number of column vectors in the oil-gas-water matrix.
3. The identification method according to claim 2, characterized in that: The step of searching for characteristic points in the oil, gas and water current matrix to construct an oil, gas and water characteristic point set includes: The characteristic points in the oil-gas-water current matrix are searched using the following characteristic point search function: ; in, represents the feature point search function; Represents the discriminant center Whether it is a feature point; When the value of is 1, is the feature point; When the value of is 0, is a non-feature point; represents the fluctuation threshold; represents the fluctuation discriminant function, and Expressed as ; Represents the oil, gas and water current matrix A The current value of the element in the j-1th row and k-1th column; Represents the oil, gas and water current matrix A The current value of the element in the j-1th row and kth column; Represents the oil, gas and water current matrix A The current value of the element in the j-1th row and k+1th column; Represents the oil, gas and water current matrix A The current value of the element in the j+1th row and bkth column, where bk ranges from k-1 to k+1; Represents the oil, gas and water current matrix A The current value of the element in the bjth row and k-1th column; Represents the oil, gas and water current matrix A The current value of the element in the bj-th row and k-th column; Represents the oil, gas and water current matrix A The current value of the element in the bj-th row and k+1-th column; the value range of bj is j-1 to j+1; The feature point search function will be used The searched feature points constitute the oil, gas and water feature point set, and the oil, gas and water feature point set is expressed as: ; in, represents the set of oil, gas and water feature points, They respectively represent the current values of the 1st, 2nd, 3rd, ..., tnth characteristic points searched from the oil-gas-water current matrix, and tn represents the total number of characteristic points searched.
4. The identification method according to claim 3, characterized in that: The clustering algorithm is used to establish an objective function with the minimum line spacing between feature points as the target, and the oil, gas and water feature point set is divided into a gas-oil segment feature point set, an oil-water segment feature point set, and a water-gas segment feature point set based on the objective function, including: Based on the clustering algorithm, the objective function is established : ; in, Indicates the characteristic point number in the gas-oil segment cluster, and its value range is 1 to , represents the total number of characteristic points in the gas-oil segment cluster; Indicates the characteristic point number in the oil-water segment cluster, and its value range is 1 to , represents the total number of feature points in the oil-water segment cluster; Indicates the characteristic point number in the water-gas segment cluster, and its value range is 1 to , Represents the total number of feature points in the water-gas segment cluster; Indicates the maximum number of feature points in the gas-oil segment cluster; Indicates the maximum number of feature points in the oil-water segment cluster; Indicates the maximum number of feature points in the water-gas segment cluster; Represents the row number output function; Indicates the number of gas-oil segment clusters The current value of the characteristic point; Indicates the number of gas-oil segment clusters The characteristic points of A The row number of Indicates the characteristic points in the gas-oil segment clustering in the oil-gas-water current matrix A Mean of the row numbers in ; Indicates that the oil-water segment cluster is numbered The current value of the characteristic point; Indicates that the oil-water segment cluster is numbered The characteristic points in the oil-gas-water current matrix A The row number in ; Indicates the characteristic points in the oil-water segment clustering in the oil-gas-water current matrix A Mean of the row numbers in ; Indicates the water-gas segment cluster numbered The current value of the characteristic point; Indicates the water-gas segment cluster numbered The characteristic points in the oil-gas-water current matrix A The row number in ; Indicates the characteristic points in the water-gas segment clustering in the oil-gas-water current matrix A Mean of the row numbers in ; Based on the objective function , the oil, gas and water feature point set is divided into a gas-oil segment feature point set , oil-water segment feature point set , water-gas segment feature point set ,get: ; in, Represents the characteristic point set of the gas and oil segment The number is Elements of Represent the characteristic point set of oil and water segment The number is Elements of Represent the characteristic point set of water and gas segment The number is elements.
5. The identification method according to claim 4, characterized in that: The extracting of the gas-oil segment phase change inflection point region, the oil-water segment phase change inflection point region, and the water-gas segment phase change inflection point region respectively according to the gas-oil segment feature point set, the oil-water segment feature point set, and the water-gas segment feature point set includes: According to the characteristic point set of gas and oil segment , oil-water segment feature point set , water-gas segment feature point set The elements in the oil, gas and water current matrix A The position distribution in the , respectively extract the numbering bases corresponding to the phase change inflection point region of the gas-oil segment, the phase change inflection point region of the oil-water segment, and the phase change inflection point region of the water-gas segment, and express them as: ; in, Indicates the numbering base corresponding to the inflection point area of the gas-oil phase change; Indicates the numbering base corresponding to the inflection point area of the oil-water phase transition; Indicates the numbering base corresponding to the inflection point area of the water-gas phase transition; Represents a set of oil, gas and water feature points The number is Elements of express In the oil-gas-water current matrix A The row number in ; Indicates the feature point number; in the calculation hour, The value range is 1 to ; In calculation hour, The value range is to ; In calculation hour, The value range is to ; According to the numbering base, the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region are respectively expressed as: ; in, It indicates the inflection point area of the gas-oil phase change; Represent the inflection point area of the gas-oil phase transition The number is The current value; It indicates the inflection point area of the oil-water phase change; Represent the inflection point region of the oil-water phase transition The number is The current value; It indicates the inflection point area of phase transition in water-gas section; Represent the inflection point region of the water-gas phase transition The number is The current value.
6. The identification method according to claim 5, characterized in that: The step of performing differential processing on the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region to construct a corresponding time series and generate a corresponding time series matrix includes: The phase transition inflection point region of the gas-oil segment , Oil-water phase transition inflection point region , Water-gas phase transition inflection point region Perform differential processing, renumber and construct the corresponding time series, and divide the gas-oil phase change inflection point area , Oil-water phase transition inflection point region , Water-gas phase transition inflection point region The corresponding time series are expressed as: ; in, Indicates the inflection point area of the gas-oil phase change The corresponding time series; , Represent the inflection point area of the gas-oil phase transition The number is , The current value; Respectively The 1st, 2nd, 3rd, ..., 3K-1th elements in Indicates the inflection point area of the oil-water phase transition The corresponding time series; , Represent the inflection point region of the oil-water phase transition The number is , The current value; Respectively The 1st, 2nd, 3rd, ..., 3K-1th elements in Indicates the inflection point area of the water-gas phase transition The corresponding time series; , Represent the inflection point region of the water-gas phase transition The number is , The current value; Respectively The 1st, 2nd, 3rd, ..., 3K-1th elements in Generate the time series matrix corresponding to each time series, and express each time series matrix as: ; Where B represents the time series The corresponding time series matrix; Represents the first bi Row, No. bj The element value of the column, used to indicate the time series The The current difference corresponding to each element; Represents the total number of row vectors of the time series matrix B; represents the total number of column vectors of the time series matrix B; C represents the time series The corresponding time series matrix; Represents the first ci Row, No. cj The element value of the column, used to indicate the time series The The current difference corresponding to each element; Represents the total number of row vectors of the time series matrix C; Represents the total number of column vectors of the time series matrix C; D represents the time series The corresponding time series matrix; represents the first d Row, No. DJ The element value of the column, used to indicate the time series The The current difference corresponding to each element; Represents the total number of row vectors of the time series matrix D; Represents the total number of column vectors of the time series matrix D.
7. The identification method according to claim 6, characterized in that: The time series matrices corresponding to the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region are respectively input into the gravity search model for calculation to obtain the corresponding gas-oil phase change inflection point matrix, oil-water phase change inflection point matrix, and water-gas phase change inflection point matrix, including: Input the time series matrix B, time series matrix C, and time series matrix D into the gravity search model respectively ,get: ; in, Indicates the minimum number of elements required for update iteration; Represents the updated matrix corresponding to the time series matrix B; Representation Matrix The number of elements in ; Represents the updated matrix corresponding to the time series matrix C; Representation Matrix The number of elements in ; Represents the updated matrix corresponding to the time series matrix D; Representation Matrix The number of elements in ; R represents the inflection point matrix of gas-oil phase transition; U represents the oil-water phase transition inflection point matrix; P Represents the water vapor phase transition inflection point matrix.
8. The identification method according to claim 7, characterized in that: Gravitational search model It is expressed as: ; in, L Represents the center of gravity search model The input matrix of Represents the input matrix L The corresponding updated matrix; Representation Matrix The number of elements in ; E express The output matrix of Obtained by the following formula: ; in, Indicates the value of the gravity angle of the center of gravity; LA , LB , LC , LD are matrix update options and are expressed as: ; in, Both are input matrices L The feature blocks in the feature blocks have the same number of row elements and the same number of column elements, and ; Center of gravity angle value It is expressed as: ;in, It represents the component of the resultant force in the x-direction of the horizontal axis; It represents the component of the resultant force in the y direction of the longitudinal axis; and Respectively expressed as: ; in, s Represents the input matrix L The feature block number in the range of 1 to 8; Represents the input matrix L The number is s Feature blocks The corresponding gravity angle of the center of gravity; Indicates the number s Feature blocks The corresponding center of gravity is expressed as: ; in, v Represents the input matrix L Different from s The feature block number, whose value range is from 1 to 8; Represents the input matrix L Medium feature block The corresponding centroid eigenvalue; Represents the input matrix L Medium feature block The corresponding centroid eigenvalue; Feature Block The central feature block The horizontal axis of Feature Block The central feature block The horizontal axis of Feature Block The central feature block The vertical coordinate of Feature Block The central feature block The vertical coordinate of Centroid eigenvalue It is expressed as: ; in, Representation feature block Middle Row, No. Elements of a column; The value range is 1 to , Representation feature block The total number of rows in ; The value range is 1 to , Representation feature block The total number of columns in ; Representation feature block The column vector of the variance weights; Representation feature block The weight of the row vector variance of ; Representation feature block The weight of the variance of the diagonal line; Representation feature block The weight of the variance of the anti-diagonal line; Feature Block The corresponding gravity angle of the center of gravity It is expressed as: .
9. The identification method according to claim 8, characterized in that: The specific positions of the gas-oil phase change inflection point, the oil-water phase change inflection point, and the water-gas phase change inflection point matrix are calculated respectively according to the gas-oil phase change inflection point matrix, the oil-water phase change inflection point matrix, and the water-gas phase change inflection point matrix, including: According to the inflection point matrix of gas-oil phase transition R , Oil-water phase transition inflection point matrix U , water vapor phase transition inflection point matrix P , the specific positions of the inflection points of the gas-oil phase change, the oil-water phase change, and the water-gas phase change are calculated using the following formulas: ; in, represents the phase transition inflection point output function; Represents the inflection point matrix of gas-oil phase transition R The number is rx The element value of Represents the oil-water phase transition inflection point matrix U The number is ux The element value of Represents the water vapor phase transition inflection point matrix P The number is px The element value of The output time series number is the specific location of the inflection point of the gas-oil phase change; The output time series number is the specific location of the inflection point of the oil-water phase change; The output time series number is the specific location of the inflection point of the water-gas phase change.
10. A device for identifying phase change inflection points of quasi-periodic oil-gas-water three-phase flow, characterized in that: The identification device comprises: A matrix processing module is used to extract the oil-gas-water three-phase flow current measurement data of a complete cycle, and perform matrix processing on the oil-gas-water three-phase flow current measurement data to obtain a corresponding oil-gas-water current matrix; A feature point search module, used to search for feature points in the oil, gas and water current matrix to construct an oil, gas and water feature point set; A division module is used to use a clustering algorithm to establish an objective function with the minimum line spacing between feature points as the target, and divide the oil, gas and water feature point set into a gas-oil segment feature point set, an oil-water segment feature point set, and a water-gas segment feature point set based on the objective function; An extraction module, for extracting the gas-oil segment phase change inflection point region, the oil-water segment phase change inflection point region, and the water-gas segment phase change inflection point region respectively according to the gas-oil segment feature point set, the oil-water segment feature point set, and the water-gas segment feature point set; A differential processing module is used to perform differential processing on the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region, to construct a corresponding time series and generate a corresponding time series matrix; A gravity search module is used to input the time series matrices corresponding to the gas-oil phase change inflection point region, the oil-water phase change inflection point region, and the water-gas phase change inflection point region into the gravity search model for calculation to obtain the corresponding gas-oil phase change inflection point matrix, oil-water phase change inflection point matrix, and water-gas phase change inflection point matrix; The calculation module is used to calculate the specific positions of the gas-oil phase change inflection points, the oil-water phase change inflection points, and the water-gas phase change inflection points according to the gas-oil phase change inflection point matrix, the oil-water phase change inflection point matrix, and the water-gas phase change inflection point matrix.