A method and system for determining the outlet temperature of the upstream station of an oilfield based on the axial temperature drop mechanism
By constructing axial temperature drop mechanism model and cluster analysis, combined with gradient descent method, the outbound temperature of the upstream station of the oil field was determined, and the problems of pipe blocking and energy waste in the transmission of wax-containing crude oil were solved, and the accuracy and efficiency of temperature control were improved.
Patent Information
- Application Number
- CN202210493061.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-07
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-05-07
AI Technical Summary
During the oil-water medium transmission process at the upstream station of the oil field, how to determine the appropriate outbound temperature to avoid solidification and pipe blockage caused by temperature reduction, while avoiding energy waste, especially for the high freezing point characteristics of wax-containing crude oil.
By constructing axial temperature drop mechanism model, combining historical operation data, using the K-means clustering network and gradient descent method, the combined value of the oil product specific heat C and the total heat transfer coefficient K were determined, and the recommended value of the outbound temperature of the upstream station was calculated, and the temperature control was carried out using the formula T out = T0+ (T inlet - T0)eaL.
Based on the inbound temperature requirements of downstream stations, the recommended value of the outbound temperature of upstream stations is reasonably recommended, avoiding the problem of difficult parameters in the pure physical simulation model of heat transfer, and improving the accuracy of temperature control and energy utilization efficiency.
Smart Images

Figure CN114722724B_ABST
Abstract
Description
Technical Field
[0001] The present invention discloses a method for determining the outlet temperature of an upstream station in an oilfield, in particular a method and system for determining the outlet temperature of an upstream station in an oilfield based on the axial temperature drop mechanism. Background Art
[0002] Due to the relatively high freezing point of waxy crude oil, it generally loses fluidity or has very poor fluidity at ambient temperature (i.e., normal temperature), so the normal temperature transportation method cannot be directly adopted. To solve such problems, heated transportation has become the most commonly used transportation method at present, that is, the oil product is first heated and then input into the pipeline. By increasing the temperature of the oil product, its viscosity is reduced, the frictional resistance loss is reduced, and kinetic energy is saved by consuming thermal energy.
[0003] Therefore, during the transmission of the oil-water medium between oilfield stations, there are certain requirements for the outlet temperature of the incoming liquid at the upstream station to prevent wax precipitation due to the reduction of the temperature of the oil-water medium to the freezing point during the transmission process, and then the phenomenon of pipe blockage occurs.
[0004] In practical applications, there are two common unexpected situations: (1) If the outlet temperature is too high, the temperature difference between the pipeline and the surrounding environment will be large, resulting in accelerated heat dissipation and energy waste; (2) If the outlet temperature is too low, the axial temperature drop of the pipeline is likely to reach the freezing point, and then the phenomenon of pipe blockage occurs. Therefore, it is very important to determine the appropriate outlet temperature of the upstream station under different environments. Summary of the Invention
[0005] Aiming at the problems in the prior art mentioned above, such as the relatively high freezing point of waxy crude oil, which is prone to energy waste or pipe blockage during transportation, the present invention provides a method and system for determining the outlet temperature of an upstream station in an oilfield based on the axial temperature drop mechanism. By constructing an axial temperature drop mechanism model for the forward flow of hot oil along the pipeline and combining historical operation data, the variables that are not easily obtained in the mechanism model are solved, so that the recommended value of the corresponding outlet temperature of the upstream station can be given through calculation for the upstream station to control the temperature.
[0006] The technical solution adopted by the present invention to solve its technical problems is: A method for determining the outlet temperature of an upstream station in an oilfield based on the axial temperature drop mechanism, the method comprising the following steps:
[0007] (1) Obtain the numerical values of the characteristic variables of the real-time hot oil medium flow rate G, the inlet temperature T of the downstream station 入 and the ambient temperature T0;
[0008] (2) Normalize the above characteristic variables, and then input them into the K-means clustering network to determine the clustering cluster interval k i , and take out the combined values of the specific heat capacity C and the overall heat transfer coefficient K of the oil product corresponding to this clustering cluster for calculation;
[0009] From the formula T 出 = T0 + (T 入 - T0) e aL , calculate the recommended value of the outlet temperature of the upstream station at this time.
[0010] A system for determining the outlet temperature of the upstream station of an oilfield based on the axial temperature drop mechanism. The system includes a mechanism analysis module, a data extraction module, a data clustering module, a parameter update module, and an online calculation module. Among them,
[0011] Mechanism analysis module: used to calculate the recommended value of the outlet temperature T 出 of the upstream station according to known conditions. Set a hot oil pipeline. At a distance Lx from the heating station, take a micro-element section dL. Assume the oil temperature at this section is T. Then the temperature change of the oil flow through the dL section is dT. Therefore, at the section Lx + dL, the oil temperature is T + dT. When stable heat transfer occurs, the heat balance equation on the dL section is:
[0012] KπD(T - T0)dL = -GCdT
[0013]
[0014] Integrate the above formula:
[0015] That is: Where
[0016] Then the outlet temperature calculation formula: T 出 = T0 + (T 入 - T0) e aL ;
[0017] Data extraction module: used to extract representative data during the operation of the upstream station heating furnace to determine the parameter combination of the specific heat capacity C of the oil product and the overall heat transfer coefficient K;
[0018] Data clustering module: used to perform clustering analysis on different combinations of the specific heat capacity C of the oil product and the overall heat transfer coefficient K existing under different external conditions, divide the data distribution into k clusters, and thus simulate different external conditions to obtain k groups of different combinations of the specific heat capacity C of the oil product and the overall heat transfer coefficient K;
[0019] Specific heat capacity C of the oil product and overall heat transfer coefficient K parameter update module: for the data set in a certain cluster ki, with the medium flow rate G, ambient temperature T0, and downstream station inlet temperature T 入 as features, and the outlet temperature of the upstream station as the prediction target value. The relationship between the known features and the prediction target: T 出 = T0 + (T 入 - T0) e aL , where e is the natural logarithm base, and a is Let \(L\) be the distance between heating stations. Based on the obtained sample data, the specific heat capacity \(C\) of the oil product and the overall heat transfer coefficient \(K\) are fitted. According to the downstream inlet temperature, the corresponding outlet temperature is calculated.
[0020] Online calculation module: It is used to ensure the lowest inlet temperature of the downstream station during the production process, and obtain a reasonable recommended value for the outlet temperature of the upstream station using the outlet temperature calculation formula.
[0021] The technical solution adopted by the present invention to solve its technical problems further includes:
[0022] The clustering cluster interval \(k\) i The calculation of the corresponding specific heat capacity \(C\) of the oil product and the overall heat transfer coefficient \(K\) includes the following steps:
[0023] Step S1: Extract representative data during the operation of the upstream station heating furnace. Utilize the characteristic that the standard deviation reflects the degree of dispersion of random variables, and extract the data of the furnace operating stably under different working conditions by setting the standard deviation threshold boundaries of certain specified PLC points, including the following sub-steps:
[0024] Step (1): Set a fixed time window \(T\).
[0025] Step (2): Slide this time window in sequence, and calculate the standard deviation of a specific PLC point within this window. The selected specific PLC point and the threshold boundary conditions are: \(\sigma\) 出 \(\leq 1^{\circ}C\), \(\sigma\) 介 \(\leq 3m\) 3 / h, \(\sigma\) 入 \(\leq 1^{\circ}C\), where \(\sigma\) 出 \(\), \(\sigma\) 介 \(\), \(\sigma\) 入 respectively represent the standard deviations of the outlet temperature of the upstream station, the flow rate of the hot oil medium in the pipeline, and the inlet temperature of the downstream station.
[0026] Step (3): If the standard deviations of the specific points do not exceed the threshold boundaries, it is determined that the furnace condition data in this time window is stable. Take the average value of the relevant PLC points within this time window as the feature, where the feature is the flow rate \(G\) of the hot oil medium, the inlet temperature \(T\) 入 \(\) of the downstream station, and the ambient temperature \(T_0\). The prediction target is the outlet temperature \(T\) 出 \(\) of the upstream station. Then, construct a training sample, and continuously slide the window to obtain multiple samples.
[0027] Step S2: Conduct a clustering analysis on the samples, divide the data distribution into \(k\) clusters, and use this to simulate and represent different external conditions, thereby obtaining \(k\) groups of different combinations of the specific heat capacity \(C\) of the oil product and the overall heat transfer coefficient \(K\), including the following sub-steps:
[0028] (1) Eliminate abnormal data and perform relevant filling processing on missing values, etc.
[0029] (2) Normalize the feature variables in the training set data so that their values are restricted between (0, 1). The calculation formula is as follows:
[0030]
[0031] Where Xmin and Xmax represent the minimum and maximum values of a certain feature respectively, X represents the sampling value of a certain feature, and Xnorm represents the normalized value;
[0032] (3) Input the normalized samples into an unsupervised clustering model for clustering. Divide the data set into different clusters and perform separate modeling and prediction for each cluster;
[0033] Step S3: For the data set falling into a certain cluster ki above, with the medium flow rate G, ambient temperature T0, and downstream station inlet temperature T 入 as features and the upstream station outlet temperature as the predicted target value. Since the relationship formula between the known features and the predicted target is: T 出 = T0 + (T 入 - T0)e aL , where e is the natural base and a is L is the distance between heating stations. According to the obtained sample data, fit to obtain the specific heat capacity C and the overall heat transfer coefficient K of the oil product, including the following sub-steps:
[0034] (1) Define the loss function Where y i is the true value of the outlet temperature of the i-th sample, is the predicted value of the outlet temperature of the i-th sample, and N is the number of samples;
[0035] (2) Use the gradient descent method to update these two parameters. Their partial derivatives are as follows:
[0036]
[0037]
[0038] (3) According to the gradient descent method, the update formula for the parameters is as follows:
[0039]
[0040]
[0041] Where η represents the learning rate and i represents the number of iterations;
[0042] (4) After n times of iterative updates, finally obtain the C i corresponding to the data distribution in the k i cluster and Ki Determined value;
[0043] (5) Repeat steps (1)-(4), and the corresponding (C i ,K i )(i = 1, 2, ……, k) combination values can be obtained.
[0044] The unsupervised clustering model described above adopts the K-means clustering process, including the following sub-steps:
[0045] A. Select k initialized samples as the initial clustering centers a = a1, a2, … ak; where ak represents the center of the k-th cluster;
[0046] B. Calculate the distance from each sample xi in the dataset to the k clustering centers and assign it to the class corresponding to the clustering center with the minimum distance;
[0047] Among them, the distance calculation uses the Euclidean distance, and the calculation formula is as follows;
[0048] Suppose there are two points P and Q, where P = {p1, p2, … p n} and Q = {q1, q2, …, q n}, n = 1, 2, 3…, then the distance between P and Q is denoted as d, then
[0049]
[0050] Among them, p1 to p n are all the feature information of one piece of data, and q1 to q n are all the feature information of another piece of data;
[0051] C. For each category a j , recalculate its clustering center where |c i | is the number of samples falling into this class, and X is the sample belonging to this class;
[0052] D. Repeat the above two operations of B and C until the termination condition is reached;
[0053] E. Obtain the trained clustering model, which has k clusters.
[0054] When calculating the recommended value of the outlet temperature of the upstream station, a hot oil pipeline is set. Among them, the calculated outer diameter of the pipeline is D, the surrounding medium temperature is T0, the total heat transfer coefficient is K, the hot oil flow rate is G, the specific heat of the oil product is C, the outlet oil temperature of the upstream station is T 出 , the inlet temperature of the downstream station is T 入 and the distance between heating stations is L. At a distance of L from the heating station xat a location, i.e., at a distance of L from the exit of the station x At a location, take an infinitesimal segment dL. Assume the oil temperature at the cross-section here is T. Then the temperature change of the oil flow passing through the dL segment is dT. Therefore, the oil temperature at the cross-section of Lx + dL is T + dT. When in steady heat transfer, the heat balance equation for the dL segment is:
[0055] KπD(T - T0)dL = -GCdT
[0056]
[0057] Integrate the above equation:
[0058] That is: Among them
[0059] Then the calculation formula for the outlet temperature: T 出 = T0 + (T 入 - T0)e aL .
[0060] The data extraction module uses the characteristic that the standard deviation reflects the degree of dispersion of random variables, and extracts the data of the stable operation of the heating furnace under different working conditions by setting the standard deviation threshold boundaries of some specified PLC points. The specific steps are as follows:
[0061] Step (1), set a fixed time window T;
[0062] Step (2), slide this time window in turn, and calculate the standard deviation of some specific PLC points within this window. The selected specific PLC points and the threshold boundary conditions are: σout <= 1 °C, σmedium <= 3
[0063] m3 / h, σin <= 1 °C, where σout, σmedium, and σin respectively represent the standard deviations of the outlet temperature of the upstream station, the flow rate of the hot oil medium in the pipeline, and the inlet temperature of the downstream station;
[0064] Step (3), if the standard deviations of the specific points do not exceed the threshold boundaries, it is determined that the furnace condition data of this time window is stable, and take the average value of the relevant PLC points within this time window as the feature. The features are the flow rate G of the hot oil medium, the inlet temperature T 入 of the downstream station, and the ambient temperature T0. The prediction target is the outlet temperature T 出 of the upstream station. Then construct a training sample, and continuously slide the window to obtain multiple samples.
[0065] The specific steps of the data clustering module are as follows:
[0066] (1) Eliminate possible abnormal data to ensure that the data in the training set is the normal data flow of the heating furnace operation, and perform relevant filling processing on missing values, etc.;
[0067] (2) Normalize the feature variables in the training set data to limit their values to the range (0, 1).
[0068] The calculation formula is as follows:
[0069]
[0070] Where Xmin and Xmax represent the minimum and maximum values of a certain feature respectively, X represents the sampling value of a certain feature, and Xnorm represents the value after normalization;
[0071] (3) Input the normalized samples into an unsupervised clustering model for clustering and divide the data set into different clusters, and perform separate modeling and prediction for each cluster.
[0072] The unsupervised clustering model uses the K-means clustering model. The K-means clustering process:
[0073] A. Select k initial samples as the initial clustering centers a = a1, a2,..., ak; where ak represents the center of the k-th cluster;
[0074] B. Calculate the distance from each sample xi in the data set to the k clustering centers and assign it to the class corresponding to the clustering center with the minimum distance;
[0075] Among them, the distance calculation uses the Euclidean distance, and the calculation formula is as follows;
[0076] Suppose there are two points P and Q, where P = {p1, p2,..., p n}, Q = {q1, q2,..., q n}, n = 1, 2, 3..., then the distance between P and Q is expressed as d, then
[0077]
[0078] Among them, p1 to p n are all the feature information of a piece of data, and q1 to q n are all the feature information of another piece of data;
[0079] C. For each category aj, recalculate its clustering center where |c i | is the number of samples falling into this class, and X is the sample belonging to this class; D. Repeat the above two steps B and C until the termination condition is reached;
[0080] E. Obtain the trained clustering model, which has k clusters.
[0081] The parameter update module is as follows:
[0082] (1) Define the loss function where y i is the true value of the outlet temperature of the i-th sample, is the predicted value of the outlet temperature of the i-th sample, N is the number of samples, and the specific heat capacity C of the oil product and the overall heat transfer coefficient K are obtained by fitting to minimize the loss;
[0083] (2) Update these two parameters using the gradient descent method, and their partial derivatives are as follows:
[0084]
[0085]
[0086] (3) According to the gradient descent method, the update formula for the parameters is as follows:
[0087]
[0088]
[0089] where η represents the learning rate and i represents the number of iterations;
[0090] (4) After n times of iterative updates, the determined values of Ci and Ki corresponding to the data distribution in the ki cluster are finally obtained;
[0091] (5) Repeat steps (1)-(4) to obtain the combined values of (Ci, Ki) (i = 1, 2,..., k) corresponding to k different data distribution situations.
[0092] The online calculation module is implemented as follows:
[0093] (1) Obtain the real-time hot oil medium flow rate G, the inlet temperature T 入 of the downstream station, and the sensor values of the ambient temperature T0;
[0094] (2) Normalize the above characteristic variables, then input them into the K-means clustering network to determine the clustering cluster interval ki into which they fall, take out the combined values of the specific heat capacity C of the oil product and the overall heat transfer coefficient K corresponding to this clustering cluster for calculation, and calculate the recommended value of the upstream station outlet temperature at this time from the formula T 出 = T0 + (T 入 - T0)e aL .
[0095] The beneficial effects of the present invention are as follows: Through theoretical calculations, the present invention can reasonably recommend the recommended value of the outlet temperature of the upstream station according to the requirements of the downstream station for different inlet temperatures; based on the analysis of historical data, the problem that the relevant parameters in the process of the pure physical simulation model of heat transfer cannot be determined is avoided.
[0096] The following will further illustrate the present invention in conjunction with the drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0097] Figure 1 It is a program flow chart of the present invention.
[0098] Figure 2 It is a schematic structural diagram of the oil pipeline of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0099] This embodiment is the preferred embodiment of the present invention. All other embodiments with the same or similar principles and basic structures as this embodiment are within the protection scope of the present invention.
[0100] The present invention mainly protects an algorithm for determining the outlet temperature of the upstream station of an oilfield based on the analysis of the axial temperature drop mechanism.
[0101] The present invention also protects a system for determining the outlet temperature of the upstream station of an oilfield based on the analysis of the axial temperature drop mechanism. Please refer to the attached Figure 1 and the attached Figure 2 . The system includes a mechanism analysis module, a data extraction module, a data clustering module, a parameter update module, and an online calculation module. Among them,
[0102] (1) Mechanism analysis module:
[0103] Please refer to the attached Figure 2 . Set a hot oil pipeline, where the calculated outer diameter of the pipeline is D, the surrounding medium temperature is T0, the total heat transfer coefficient is K, the hot oil flow rate is G, the specific heat of the oil product is C, the outlet oil temperature of the upstream station is T 出 , the inlet temperature of the downstream station is T 入 and the distance between heating stations is L.
[0104] At a distance of L x from the heating station, that is, at a position with a length of L x from the outlet, take an infinitesimal element dL (since calculus operations are performed, the infinitesimal element dL is an infinitesimal length segment, and the oil temperature in this segment is stable and can be regarded as a cross-section). Let the oil temperature at this cross-section be T, then the temperature change of the oil flow through the dL segment is dT. Therefore, the oil temperature at the Lx + dL cross-section is T + dT. If the influence of frictional resistance is ignored during the forward flow of the hot oil along the pipeline, then in the case of stable heat transfer, the heat balance equation on the dL segment is:
[0105] KπD(T - T0)dL = -GCdT
[0106]
[0107] Integrate the above equation:
[0108] That is: Where
[0109] Then the calculation formula for the outlet temperature: T 出 = T0 + (T 入 - T0)e aL
[0110] In the formula,
[0111] K - Overall heat transfer coefficient;
[0112] D - Outer diameter of the pipe;
[0113] T - Oil temperature at the cross-section;
[0114] T0 - Temperature of the surrounding medium;
[0115] dL - Micro-element segment;
[0116] G - Hot oil flow rate;
[0117] C - Specific heat of the oil product;
[0118] dT - Temperature change value;
[0119] T 入 - Inlet temperature at the downstream station;
[0120] T 出 - Outlet temperature at the upstream station;
[0121] L - Distance between stations;
[0122] a -
[0123] From the above formula, it can be seen that if a, L, T0, and T 入 are specified, the outlet temperature T 出 of the upstream station can be calculated to obtain the recommended value.
[0124] Among them, the distance between stations L and the outer diameter of the pipe D are fixed parameters and are easy to obtain (in the simulation case, the parameter values can be directly input, and in the actual situation, they can also be directly obtained through measurement). The hot oil flow rate G is obtained by monitoring with a real-time sensor, the temperature of the surrounding medium T0 can be obtained by an environmental temperature sensor, and the lowest inlet temperature T 入It can be set in advance manually according to different production conditions (in actual situations, it is obtained through actual measurement). Therefore, only by determining the overall heat transfer coefficient K and the specific heat capacity C of the oil product can the upstream outlet temperature T be calculated. 出 Due to the existence of changing factors such as pipeline scaling, pipeline wax precipitation, the composition of the hot oil, and the water content of the hot oil, the specific heat capacity C of the oil product and the overall heat transfer coefficient K are constantly changing. It is impossible to determine the relevant values through measurement in advance, and it is also not feasible to detect the specific heat capacity C of the oil product and the overall heat transfer coefficient K in real time. Based on this, in this embodiment, relevant models are constructed using historical data, and the values of parameter combinations (specific heat capacity C of the oil product, overall heat transfer coefficient K) are fitted. That is, for different external conditions, there will be different combinations of (specific heat capacity C of the oil product, overall heat transfer coefficient K). Substituting these into the formula for relevant calculations can achieve the goal.
[0125] (2) Data extraction module:
[0126] The main function of this module is to extract representative data during the transmission process of the oil-water medium for subsequent determination of the parameter combination (specific heat capacity C of the oil product, overall heat transfer coefficient K). Utilizing the characteristic that the standard deviation reflects the degree of dispersion of random variables, the data of the furnace operating stably under different working conditions is extracted by setting the standard deviation threshold limits of certain specified PLC points. In this embodiment, the selection of PLC points can be based on experience to select relevant points, such as: selecting according to typical values such as the outlet temperature of the upstream station, the flow rate of the hot oil medium in the pipeline, and the inlet temperature of the downstream station.
[0127] The specific steps are as follows:
[0128] Step (1) Set a fixed time window T. In this embodiment, assume T = 30 min;
[0129] Step (2) Slide this time window in sequence and calculate the standard deviation of certain specific PLC points within this window (such as: selected according to the outlet temperature of the upstream station, the flow rate of the hot oil medium, and the inlet temperature of the downstream station). The specific PLC points selected and the threshold limit conditions are: σ 出 <= 1 °C, σ 介 <= 3 m 3 / h, σ 入 <= 1 °C, where σ 出 、σ 介 、σ 入 respectively represent the standard deviations of the outlet temperature of the upstream station, the flow rate of the hot oil medium in the pipeline, and the inlet temperature of the downstream station;
[0130] Step (3) If the standard deviations of the specific points do not exceed the threshold limits, it is determined that the furnace condition data within this time window is stable, and the average values of the relevant PLC points within this time window are taken as features, where the features are the flow rate G of the hot oil medium and the inlet temperature T of the downstream station 入, ambient temperature T0, the prediction target is the outlet temperature T of the upstream station 出 , a training sample is constructed accordingly, and the window is continuously slid to obtain multiple samples. When sliding the window, it can be slid backward at different time intervals. The specific time interval is not determined and can be selected according to actual needs. Usually, the time interval is not greater than the length of the time window T.
[0131] (3) Data clustering module
[0132] As can be seen from the mechanism analysis module, for different external conditions, there are different combinations of (specific heat capacity C of oil, overall heat transfer coefficient K). Therefore, in this embodiment, by performing clustering analysis on them, the data distribution is divided into k clusters (the value of K can be selected based on the target error in the final historical validation set, or it can be given by those skilled in the art based on the experience of conventional technical means), so as to simulate different external conditions, and thus obtain k groups of different combinations of (specific heat capacity C of oil, overall heat transfer coefficient K). The specific steps are as follows:
[0133] (1) Eliminate possible abnormal data (in this embodiment, some values that are obviously unreasonable, such as the outlet temperature of 100 °C, etc., which can be determined according to different abnormal conditions in the business scenario), ensure that the data in the training set is the normal data flow of the heating furnace operation. At the same time, perform relevant filling processing on missing values (in this embodiment, the missing value means the value at this moment is missing) (there are various filling methods. The processing of abnormal data and missing values are both conventional data cleaning operations, and each case has different standards. It can be filled according to the conventional data cleaning operation, or a normal value within the range can be randomly filled, or the average value of a normal data can be filled).
[0134] (2) Normalize the feature variables in the training set data so that their values are restricted between (0, 1). The calculation formula is as follows:
[0135]
[0136] where Xmin and Xmax respectively represent the minimum value and the maximum value of a certain feature, X represents the sampling value of a certain feature, and X norm represents the value after normalization;
[0137] (3) Input the normalized samples into an unsupervised clustering model for clustering. Divide the data set into different clusters, and perform separate modeling and prediction for each cluster. In this embodiment, the K-means clustering process is used as an example to explain the algorithm principle:
[0138] A. Select k initialized samples as the initial clustering centers a = a1, a2,... a k ; where ak represents the center of the kth cluster;
[0139] B. For each sample x in the dataset i Calculate its distances to k cluster centers and assign it to the class corresponding to the cluster center with the minimum distance.
[0140] Among them, the distance calculation uses the Euclidean distance, and the calculation formula is as follows;
[0141] Suppose there are two points P and Q, where P = {p1, p2,... p n} and Q = {q1, q2,..., q n}, and n = 1, 2, 3..., then the distance between P and Q is denoted as d, and then
[0142]
[0143] Among them, p1 to p n are all the feature information of one piece of data, and q1 to q n are all the feature information of another piece of data;
[0144] C. For each category a j , recalculate its cluster center where |c i | is the number of samples falling into this class, and X is the samples belonging to this class;
[0145] D. Repeat the above two steps B and C until a certain termination condition is reached (such as: reaching the set number of iterations, exceeding the minimum error change, etc.).
[0146] E. Obtain the trained clustering model, which has k clusters;
[0147] (4) (Oil specific heat C, overall heat transfer coefficient K) parameter update module
[0148] For the dataset falling into one of the above clusters k i , with the medium flow rate G, ambient temperature T0, and downstream station inlet temperature T 入 as features, and the upstream station outlet temperature as the predicted target value. Since the relationship between the known features and the predicted target is: T 出 = T0 + (T 入 - T0)e aL , where e is the natural base, and a is L is the distance between heating stations. The purpose is to fit the oil specific heat C and the overall heat transfer coefficient K based on the obtained sample data, so that the corresponding outlet temperature can be calculated according to the downstream inlet temperature. The specific process is as follows:
[0149] (1) Define the loss function
[0150]
[0151] , where y i is the true value of the outlet temperature of the i-th sample, is the predicted value of the outlet temperature of the i-th sample, and N is the number of samples. Then the problem is transformed into fitting to obtain the specific heat capacity C of the oil product and the overall heat transfer coefficient K to minimize the loss.
[0152] (2) Update these two parameters using the gradient descent method, and their partial derivatives are as follows:
[0153]
[0154]
[0155] (3) According to the gradient descent method, the update formulas for the parameters are as follows:
[0156]
[0157]
[0158] where η represents the learning rate and i represents the number of iterations;
[0159] (4) After n iterations of update, finally obtain the determined values of C i corresponding to the data distribution in the k i cluster and K i . The specific number of iterations depends on the finally output result, and it is okay when the output result meets the actual requirements.
[0160] (5) Repeat steps (1)-(4) to obtain the combined values of (C i , K i )(i = 1, 2,..., k) corresponding to k different data distribution situations.
[0161] (5) Online calculation module
[0162] When it is necessary to ensure the lowest inlet temperature of the downstream station during the production process, a reasonable recommended value of the upstream station's outlet temperature can be obtained according to the outlet temperature calculation formula, so that the upstream station's temperature control unit can perform relevant control on the outlet temperature. The specific implementation is as follows:
[0163] (1) Obtain the sensor values of the real-time hot oil medium flow rate G, the inlet temperature T 入 of the downstream station, and the ambient temperature T0;
[0164] (2) Normalize the above characteristic variables, then input them into the K-means clustering network to determine the clustering cluster interval k i , and take out the combined values of (the specific heat capacity C of the oil product and the overall heat transfer coefficient K) corresponding to this clustering cluster for calculation;
[0165] From the formula T 出 = T0 + (T 入 - T0) e aL , the recommended value of the upstream station's outgoing temperature at this time is calculated.
[0166] Through theoretical calculation, the present invention can reasonably recommend the recommended value of the upstream station's outgoing temperature according to the requirements of the downstream station for different incoming temperatures; by analyzing historical data, the problem that the relevant parameters in the process of the pure physical simulation model of heat transfer cannot be determined is avoided.
Claims
1. A method for determining the outlet temperature of the upstream station of an oilfield based on the axial temperature drop mechanism, characterized in that: The method described above includes the following steps: (1) Obtain the real-time hot oil medium flow rate G, the incoming temperature T of the downstream station 入 and the numerical values of the characteristic variables of the ambient temperature T0; (2) Normalize the above characteristic variables, and then input them into the K-means clustering network to determine the clustering cluster interval k where they fall. i Take out the combined values of the specific heat C and the total heat transfer coefficient K of the oil product corresponding to this clustering cluster for calculation. From the formula , calculate the recommended value of the outlet temperature of the upstream station at this time; The combined value of the specific heat capacity C of the oil product and the overall heat transfer coefficient K is extracted by the data extraction module to extract representative data during the transmission process of the oil-water medium, and determine the parameter combination of the specific heat capacity C of the oil product and the overall heat transfer coefficient K; The combined value of the specific heat C of the oil product and the overall heat transfer coefficient K is determined by the parameter update module for the specific heat C of the oil product and the overall heat transfer coefficient K based on the data set falling into one of the above clusters k i in the medium flow rate G, the ambient temperature T0, and the inlet temperature T of the downstream station 入 as features, with the outlet temperature of the upstream station as the predicted target value, through the relationship between the known features and the predicted target: , where e is the natural base, a is , L is the distance between heating stations, and based on the obtained sample data, the updated specific heat C of the oil product and the overall heat transfer coefficient K are fitted.
2. The method for determining the outlet temperature of the upstream station of an oilfield based on the axial temperature drop mechanism according to claim 1, characterized in that: The clustering cluster interval k i The calculation of the corresponding specific heat C of the oil product and the overall heat transfer coefficient K includes the following steps: Step S1: Extract representative data during the operation of the upstream station heating furnace. Utilize the characteristic that the standard deviation reflects the degree of dispersion of random variables, and extract the data for the stable operation of the furnace under different working conditions by setting the standard deviation threshold limits of certain specified PLC points. It includes the following sub-steps: Step (1): Set a fixed time window T; Step (2): Slide the time window in sequence and calculate the standard deviation of specific PLC points within the window. The selected specific PLC points and the threshold boundary conditions are: σ 出 ≤ 1°C, σ 介 ≤ 3 m 3 / h, σ 入 ≤ 1°C, where σ 出 , σ 介 , σ 入 represent the standard deviations of the outlet temperature of the upstream station, the flow rate of the hot oil medium in the pipeline, and the inlet temperature of the downstream station, respectively; Step (3): If the standard deviations of all specific points do not exceed the threshold limit, it is determined that the furnace condition data for this time window is stable, and the average value of the relevant PLC points within this time window is taken as the feature, where the features are the hot oil medium flow rate G, the inlet temperature T of the downstream station 入 , the ambient temperature T0, and the prediction target is the outlet temperature T of the upstream station 出 , then a training sample is constructed accordingly, and the window is continuously slid to obtain multiple samples; Step S2: Conduct cluster analysis on the samples, divide the data distribution into k clusters, and thereby simulate and represent different external conditions, so as to obtain k groups of different combinations of the specific heat capacity C of the oil product and the overall heat transfer coefficient K. It includes the following sub-steps: (1) Eliminate abnormal data and perform relevant filling processing on missing values, etc.; (2) Normalize the characteristic variables in the training set data so that their values are limited between (0, 1). The calculation formula is as follows: Where, Xmin and Xmax respectively represent the minimum value and the maximum value of a certain characteristic, X represents the sampling value of a certain characteristic, and Xnorm represents the value after normalization; (3) Input the normalized samples into an unsupervised clustering model for clustering and clustering, divide the data set into different clusters, and perform separate modeling and prediction for each cluster; Step S3: For the data set falling into one of the above clusters ki, with the medium flow rate G, the ambient temperature T0, and the incoming temperature T of the downstream station as features, and the outgoing temperature of the upstream station as the predicted target value. Since the relationship between the known features and the predicted target is: 入 , where e is the natural base, a is , L is the distance between heating stations. According to the obtained sample data, the specific heat capacity C of the oil product and the overall heat transfer coefficient K are fitted, including the following sub-steps: (1)Define the loss function , where y i is the true value of the outlet temperature of the i-th sample, is the predicted value of the outlet temperature of the i-th sample, and N is the number of samples; (2) Update these two parameters using the gradient descent method. Their partial derivatives are as follows: (3) According to the gradient descent method, the update formula for the parameters is as follows: Where, η represents the learning rate and i represents the number of iterations; (4) After n iterations of update, the final determined values of C i corresponding to the data distribution in the cluster and K i are obtained; i (5) Repeat steps (1)-(4) to obtain the corresponding (C i ,K i )(i = 1, 2, ……, k) combination values for k different data distribution scenarios.
3. The method for determining the outlet temperature of the upstream station of an oilfield based on the axial temperature drop mechanism according to claim 1, characterized in that: The unsupervised clustering model described above adopts the K-means clustering process, including the following sub-steps: A. Select k initialized samples as the initial clustering centers a = a1, a2,... ak; where, ak represents the center of the kth cluster; B. Calculate the distance from each sample xi in the data set to the k clustering centers and assign it to the class corresponding to the clustering center with the minimum distance; Among them, the distance calculation uses the Euclidean distance, and the calculation formula is as shown below; Among them, p1 to p n are all the characteristic information of one piece of data, and q1 to q n are all the characteristic information of another piece of data; C. For each category a j , recalculate its cluster center , where |c i | is the number of samples falling into this category, and X is the samples belonging to this category; D. Repeat the above two steps B and C until the termination condition is reached; E. Obtain the trained clustering model, which has k clusters.
4. The method for determining the outlet temperature of the upstream station of the oilfield based on the axial temperature drop mechanism according to claim 1, wherein: When calculating the recommended value of the outlet temperature of the upstream station, a hot oil pipeline is set, where the calculated outer diameter of the pipeline is D, the ambient medium temperature is T0, the overall heat transfer coefficient is K, the hot oil flow rate is G, the specific heat of the oil product is C, and the outlet oil temperature of the upstream station is T 出 , the inlet temperature of the downstream station is T 入 and the distance between heating stations is L. At a distance of L from the heating station x , that is, at a position where the length from the outlet is L x , take an infinitesimal section dL. Let the oil temperature at this section be T, then the temperature change of the oil flow through the dL section is dT. Therefore, at the section of L x +dL, the oil temperature is T + dT. Then, when the heat transfer is stable, the heat balance equation on the dL section is: 。 5. A system for determining the outlet temperature of the upstream station of an oilfield based on the axial temperature drop mechanism, characterized in that: The system described above includes a mechanism analysis module, a data extraction module, a data clustering module, a parameter update module, and an online calculation module. Among them, Mechanism analysis module: used to calculate the recommended value of the upstream station outlet temperature T according to known conditions 出 Suggestion value. Set a hot oil pipeline. At a distance of Lx from the heating station, take a micro-element section dL. Assume the oil temperature at this section is T. Then the temperature change of the oil flow through the dL section is dT. Therefore, the oil temperature at the section of Lx + dL is T + dT. When the heat transfer is stable, the heat balance equation on the dL section is as follows: ; Data extraction module: Used to extract representative data during the operation of the upstream station heating furnace to determine the parameter combination of the specific heat capacity C of the oil product and the overall heat transfer coefficient K; Data clustering module: Used to conduct cluster analysis on different combinations of the specific heat capacity C of the oil product and the overall heat transfer coefficient K existing under different external conditions, divide the data distribution into k clusters, and thereby simulate and represent different external conditions, so as to obtain k groups of different combinations of the specific heat capacity C of the oil product and the overall heat transfer coefficient K; Oil specific heat C and overall heat transfer coefficient K parameter update module: For the data set in a certain cluster ki, with the medium flow rate G, ambient temperature T0, and downstream station inlet temperature T 入 as features, and the upstream station outlet temperature as the predicted target value, the relationship between the known features and the predicted target is: , where e is the natural base, a is , L is the distance between heating stations. According to the obtained sample data, the oil specific heat C and the overall heat transfer coefficient K are fitted, and the corresponding outlet temperature is calculated based on the downstream inlet temperature; Online calculation module: Used to ensure the lowest inlet temperature of the downstream station according to the requirements during the production process, and obtain a reasonable recommended value for the outlet temperature of the upstream station using the outlet temperature calculation formula.
6. The system for determining the outlet temperature of the upstream station of an oilfield based on the axial temperature drop mechanism according to claim 5, characterized in that: The data extraction module uses the characteristic that the standard deviation reflects the degree of dispersion of random variables, and extracts the data for the stable operation of the heating furnace under different working conditions by setting the standard deviation threshold boundaries of certain specified PLC points. The specific steps are as follows: Step (1): Set a fixed time window T; Step (2): Slide the time window sequentially, and calculate the standard deviation of certain specific PLC points within the window. The selected specific PLC points and the threshold boundary conditions are: σ_out <= 1 °C, σ_med <= 3 m3 / h, σ_in <= 1 °C, where σ_out, σ_med, and σ_in represent the standard deviations of the outlet temperature of the upstream station, the hot oil medium flow rate in the pipeline, and the inlet temperature of the downstream station, respectively; Step (3): If the standard deviations of all specific points do not exceed the threshold limit, it is determined that the furnace condition data for this time window is stable, and the average value of the relevant PLC points within this time window is taken as a feature, where the features are the hot oil medium flow rate G, the incoming temperature T of the downstream station 入 , the ambient temperature T0, and the prediction target is the outgoing temperature T of the upstream station 出 . Then, a training sample is constructed accordingly, and the window is continuously slid to obtain multiple samples.
7. The system for determining the outlet temperature of the upstream station of the oilfield based on the axial temperature drop mechanism according to claim 5, characterized in that: The specific steps of the data clustering module are as follows: (1) Eliminate possible abnormal data to ensure that the training set data is the normal data stream of the heating furnace operation, and perform relevant filling processing on missing values, etc.; (2) Normalize the feature variables in the training set data so that their values are restricted between (0, 1). The calculation formula is as follows: Among them, Xmin and Xmax represent the minimum and maximum values of a certain feature respectively, X represents the sampling value of a certain feature, and Xnorm represents the normalized value; (3) Input the normalized samples into an unsupervised clustering model for clustering and clustering, divide the data set into different clusters, and perform separate modeling and prediction for each cluster.
8. The system for determining the outlet temperature of the upstream station of an oilfield based on the axial temperature drop mechanism according to claim 7, characterized in that: The unsupervised clustering model uses the K-means clustering model. The K-means clustering process: A. Select k initialized samples as the initial clustering centers a = a1, a2,... ak; where ak represents the center of the kth cluster; B. Calculate the distance from each sample xi in the data set to the k clustering centers and assign it to the class corresponding to the clustering center with the smallest distance; Among them, the distance calculation uses the Euclidean distance, and the calculation formula is as follows; Among them, p1 to p n are all the characteristic information of one piece of data, and q1 to q n are all the characteristic information of another piece of data; C. For each category aj, recalculate its cluster center , where |c i | is the number of samples falling into this category, and X is the sample belonging to this category; D. Repeat the above two steps B and C until the termination condition is reached; E. Obtain the trained clustering model, which has k clusters.
9. The system for determining the outlet temperature of the upstream station of the oilfield based on the axial temperature drop mechanism according to claim 5, characterized in that: The specific process of the parameter update module is as follows: (1)Define the loss function , where y i is the true value of the outlet temperature of the i-th sample, is the predicted value of the outlet temperature of the i-th sample, N is the number of samples, and the specific heat capacity C and the overall heat transfer coefficient K of the oil product are obtained by fitting to minimize the loss; (2) Use the gradient descent method to update these two parameters, and their partial derivatives are as follows: (3) According to the gradient descent method, the update formula for the parameters is as follows: Among them, η represents the learning rate, and i represents the number of iterations; (4) After n iterations of update, finally obtain the determined values of Ci and Ki corresponding to the data distribution in the ki cluster; (5) Repeat steps (1)-(4) to obtain the combination values of (Ci, Ki) (i = 1, 2,..., k) corresponding to k different data distribution situations.
10. The system for determining the outlet temperature of the upstream station of an oilfield based on the axial temperature drop mechanism according to claim 5, characterized in that: The specific implementation of the online calculation module is as follows: (1)Obtain the real-time hot oil medium flow rate G and the temperature T at the inlet of the downstream station 入 , and the sensor values of the ambient temperature T0; (2) Normalize the above characteristic variables, then input them into the K-means clustering network to determine the clustering cluster interval ki into which they fall, and take out the combined values of the specific heat capacity C and the total heat transfer coefficient K of the oil product corresponding to this clustering cluster for calculation. According to the formula , calculate the recommended value of the outlet temperature of the upstream station corresponding at this time.
Citation Information
Patent Citations
K-Means clustering lane flow analysis method based on a Gaussian regression algorithm
CN109800801A
Transformer oil temperature prediction method combining k-means and random forest
CN111160629A