Method and system for predicting mixed oil concentration in finished oil pipeline based on curve parameterization
By constructing and updating the mixed oil concentration prediction model based on curve parameterization, the problems of low calculation efficiency and inability to achieve real-time prediction in the existing technology are solved, and the accurate, real-time and early prediction of the mixed oil concentration is achieved, and the formulation of the mixed oil treatment plan is guided, cost is reduced and the quality of refined oil is ensured.
Patent Information
- Application Number
- CN202310735917.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2043-06-20
AI Technical Summary
The prior art has low calculation efficiency in oil mixing concentration prediction, cannot realize real-time calculation, and it is difficult to meet the online monitoring needs. Moreover, the method based on numerical solution cannot predict the arrival concentration in advance, and it is difficult to assist in the formulation of the oil mixing cutting plan in advance.
The mixed oil concentration prediction method of refined oil pipeline based on curve parameterization is adopted. By collecting batch transport data and the arrival time of the mixed interface, a mixed oil concentration prediction model is constructed, and the model is updated during pipeline operation. The curve parameters are mapped to a normal distribution using nonlinear transformation to improve prediction accuracy.
The oil mixing concentration curve is achieved accurately, real-time and advance prediction, and the oil mixing download and treatment plan are guided, the oil mixing treatment cost is reduced, and the quality of the oil mixing is ensured.
Smart Images

Figure CN116825230B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of petrochemical detection, and in particular to a method and system for predicting mixed oil concentration in a finished oil pipeline based on curve parameterization. Background Art
[0002] On the basis of meeting the demand for different types and grades of refined oil in the areas along the refined oil pipeline, in order to reduce the pipeline construction and operation costs as much as possible, the refined oil pipeline adopts a sequential transportation process. This process uses one pipeline to transport multiple oil products. Two oil products will produce mixed oil at the junction. The operator needs to take certain treatment measures for the mixed oil based on the mixed oil information.
[0003] The current method of dealing with mixed oil on the pipeline site is to first determine the two-stage cutting or three-stage cutting plan, determine the mixed oil concentration according to the density meter when the mixed oil arrives at the station, determine the cutting point based on the mixed oil concentration, and then download the mixed oil to the mixed oil tank for subsequent processing. Therefore, the mixed oil concentration is an important decision-making information for mixed oil treatment. However, the method of determining the mixed oil concentration by relying solely on the on-site density meter is slow to respond and cannot be predicted in advance, resulting in unreasonable situations in the timing and plan of mixed oil cutting.
[0004] At present, a method for predicting the concentration of mixed oil is disclosed in the prior art. It is mainly based on CFD theory, considering the influence of pipeline operation water and heat factors on the formation and development of mixed oil, establishing a numerical model of mixed oil development, and describing the formation and development of mixed oil. Researchers consider the influence of convective transfer on mixed oil and the influence of concentration difference on convective diffusion coefficient to establish a one-dimensional model of mixed oil development. By predicting the axial diffusion coefficient, a two-dimensional model of mixed oil development is established. Considering the influence of various factors such as temperature and pressure on mixed oil, a multidimensional model of mixed oil development is established. However, the factors considered in the one-dimensional mixed oil model are not comprehensive enough, so the calculation results are not accurate enough. Although the two-dimensional and multi-dimensional models consider many factors and the calculation results are relatively accurate, the calculation efficiency is low, and it is impossible to solve the development status of mixed oil in large-scale refined oil pipelines. The high requirement for computing power also limits its practical application in pipeline sites. At the same time, due to the lack of a fast solution algorithm, the method based on numerical solution cannot realize real-time calculation of mixed oil concentration, and it is difficult to meet the online monitoring of the mixed oil concentration at the station to formulate a mixed oil treatment plan.
[0005] The prior art also discloses a method using data-driven. Based on the real data or simulation data on site, the five-point method or the twenty-one-point method is used to parameterize the mixed oil concentration curve, and then a regression model is established to predict the mixed oil concentration curve using pipeline operation data. The researchers used a part of the mixed oil concentration data at the station to fit the subsequent concentration change trend based on the Gamma-χ distribution function to predict the concentration at the station. The subsequent concentration distribution changes were predicted based on a part of the concentration data at the station using the logistics growth curve. Based on 19 groups of real data of a pipeline, 255 groups of data were derived using a one-dimensional mixed oil model. The concentration parameters obtained based on the five-point method were used as output, and a mixed oil concentration prediction model was constructed using a BP neural network. However, the fitting method based on the data at the station cannot achieve the advance prediction of the concentration at the station, and it is difficult to assist in the formulation of a mixed oil cutting plan in advance. The mechanism of the symmetry of the logistics growth curve about the inflection point of the curve does not conform to the knowledge of the mechanism that the oil tail of the concentration curve is longer than the oil head. However, there are many factors affecting the development of mixed oil. The prediction method based on the five-point method does not fully consider the input variables from the mechanism level, and the output dimension is high, so the model is prone to overfitting. At the same time, deriving data through numerical simulation is time-consuming and requires high computing power. For multi-dimensional inputs such as the 5-point method, a small amount of derived data is difficult to effectively improve the accuracy of the model, resulting in low prediction accuracy. It is difficult to meet the needs of accurate concentration prediction on site. Summary of the invention
[0006] In view of the above problems, the purpose of the present invention is to provide a method and system for predicting mixed oil concentration in a finished oil pipeline based on curve parameterization, which can achieve accurate prediction of the mixed oil concentration curve.
[0007] To achieve the above object, the present invention adopts the following technical solutions: In a first aspect, a method for predicting the mixed oil concentration in a finished oil pipeline based on curve parameterization is provided, comprising:
[0008] After the mixed oil passes through the station, collect the batch transportation data of the finished oil pipeline and the arrival time of the mixed oil interface at the station;
[0009] Some time before the mixed oil interface arrives at the station, the pipeline operation data in the batch transportation data is input into the pre-built mixed oil concentration prediction model to predict the mixed oil concentration and obtain the mixed oil concentration curve;
[0010] During the continuous operation of the pipeline, the collected batch delivery data and the arrival time of the mixed oil interface at the station are added to the pre-built mixed oil concentration database, and the mixed oil concentration prediction model is updated using a self-learning mechanism.
[0011] Furthermore, the construction process of the mixed oil concentration prediction model is as follows:
[0012] Obtain historical batch delivery data and historical mixed oil inbound density data of finished oil pipelines, where historical batch delivery data includes historical operation data, basic pipeline parameters and initial mixed oil information, and historical mixed oil inbound density data includes different times after mixed oil arrives at the station and historical mixed oil concentration curves;
[0013] Parameterize the historical mixed oil concentration curve in the historical mixed oil inlet density data to obtain the mixed oil concentration curve parameters as the output value of the mixed oil concentration prediction model;
[0014] Construct a mixed oil concentration database based on historical batch delivery data and historical mixed oil inbound density data;
[0015] Performing nonlinear transformation on undetermined parameters in the mixed oil concentration curve parameter, and mapping the output of the mixed oil concentration curve parameter to a normal distribution;
[0016] The mixed oil concentration database is divided into a test set and a training set. The training set is used to train the mixed oil concentration prediction model, and the test set is used to verify the model accuracy, so as to obtain the mixed oil concentration prediction model that meets the accuracy requirements.
[0017] Furthermore, the parameterization of the historical mixed oil concentration curve in the historical mixed oil inlet density data to obtain the mixed oil concentration curve parameters as the output value of the mixed oil concentration prediction model includes:
[0018] The parameters that need to be determined in the mixed oil concentration curve fitting function are randomly initialized, and the curve relationship is fitted to obtain the initial mixed oil concentration curve parameters;
[0019] Inputting the mixed oil in the mixed oil inlet density data at different times after the mixed oil arrives at the station into the mixed oil concentration curve parameter to obtain the current function value, i.e., the fitted mixed oil concentration curve;
[0020] Input the current function value and the true value into the error function to get the current error;
[0021] According to the current error, the parameter update speed is determined to obtain the updated parameters, and then the updated mixed oil concentration curve parameters are obtained. The iteration is continued until the error is reduced to a preset range, and the parameters are output to obtain the final mixed oil concentration curve parameters as the output value of the mixed oil concentration prediction model.
[0022] Furthermore, the parameters of the mixed oil concentration curve are:
[0023]
[0024] Among them, β and γ are parameters describing the growth rate of the curve, α is the maximum Y value of the curve, σ is the x value of the control inflection point, x is the different time after the mixed oil arrives at the station, and Y is the mixed oil concentration parameter.
[0025] Furthermore, the error function is
[0026]
[0027] Among them, s(p) is the error value, y i is the true value, f(x i ,,,) is the mixed oil transit time x i and three pending parameters to obtain the current function value.
[0028] Furthermore, the construction of a mixed oil concentration database based on historical batch delivery data and historical mixed oil inbound density data includes:
[0029] According to the historical batch delivery data of the finished oil pipeline and the historical mixed oil inlet density data, determine the mixed oil concentration information of a batch of mixed oil at this station;
[0030] Based on the start and end time of the mixed oil migration in the pipe section, the temperature, pressure and flow data within the time period are collected to obtain the Reynolds number, and the average value of the temperature, pressure and flow data within the time period is calculated;
[0031] Collect the hydrothermal parameters of the oil products before and after the batch interface and the initial mixed oil length of the mixed oil at the previous station;
[0032] Perform characteristic transformation on the basic information of the pipe section and the Reynolds number to obtain the corresponding characteristic variables;
[0033] A mixed oil concentration database is constructed based on pipeline operation data, hydrothermal parameters, initial mixed oil length through the station, basic information of the pipeline section, characteristic variables corresponding to the Reynolds number, and mixed oil concentration curve parameters.
[0034] Furthermore, the calculation formula of the nonlinear conversion is:
[0035]
[0036] Among them, x () i is the data after mapping, x i is the original data, λ is the transformation parameter
[0037] In a second aspect, a system for predicting mixed oil concentration in a product oil pipeline based on curve parameterization is provided, comprising:
[0038] The data acquisition module is used to collect the batch transportation data of the finished oil pipeline and the arrival time of the mixed oil interface at the station after the mixed oil passes through the station;
[0039] A prediction module is used to input the pipeline operation data in the batch transportation data into a pre-built mixed oil concentration prediction model to predict the mixed oil concentration some time before the mixed oil interface arrives at the station, and obtain a mixed oil concentration curve;
[0040] The self-learning module is used to add the collected batch delivery data and the arrival time of the mixed oil interface at the station to the pre-built mixed oil concentration database during the continuous operation of the pipeline, and adopts a self-learning mechanism to update the mixed oil concentration prediction model.
[0041] In a third aspect, a processing device is provided, comprising computer program instructions, wherein the computer program instructions, when executed by the processing device, are used to implement the steps corresponding to the above-mentioned method for predicting mixed oil concentration in a finished oil pipeline based on curve parameterization.
[0042] In a fourth aspect, a computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, are used to implement the steps corresponding to the above-mentioned method for predicting mixed oil concentration in a finished oil pipeline based on curve parameterization.
[0043] The present invention adopts the above technical solution, which has the following advantages:
[0044] 1. When the finished oil pipeline is in operation, it is necessary to cut the mixed oil at the destination according to the mixed oil concentration at the destination. The present invention comprehensively considers the factors that affect the development of mixed oil, improves the interpretability and accuracy of the prediction model; based on the parameterization of the mixed oil concentration curve and the nonlinear conversion of data, the complexity of the model is reduced, and the prediction accuracy of the mixed oil concentration prediction model is guaranteed in the context of a small amount of data.
[0045] 2. When the mixed oil interface is about to arrive at the station, the present invention can realize accurate, real-time and advance prediction of the mixed oil concentration curve based on the real-time operation data of the pipeline, thereby guiding the formulation of mixed oil download and treatment plans, effectively reducing the mixed oil treatment cost and ensuring the quality of pipeline transported finished oil.
[0046] 3. The present invention maps the mixed oil concentration curve parameters to a normal distribution through nonlinear transformation, which can improve the model fitting effect and concentration prediction accuracy.
[0047] 4. The present invention continuously collects mixed oil information during pipeline operation, updates the mixed oil concentration database, realizes self-learning of the model, and the prediction accuracy can be continuously improved until it is optimal.
[0048] 5. By obtaining the mixed oil concentration in advance to guide the cutting of the mixed oil at the station, it is helpful to help pipeline companies to reasonably formulate mixed oil cutting and receiving plans under special circumstances such as emergency situations, insufficient margin in the mixed oil tank, inaccurate manual monitoring, and problems with detection equipment.
[0049] In summary, the present invention can be widely used in the field of petrochemical detection technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Throughout the accompanying drawings, the same reference numerals are used to represent the same components. In the accompanying drawings:
[0051] Figure 1 It is a schematic diagram of a method flow provided by an embodiment of the present invention;
[0052] Figure 2 It is a schematic diagram of a parameterization process of a mixed oil concentration curve provided by an embodiment of the present invention;
[0053] Figure 3 It is a schematic diagram of the process of constructing a mixed oil concentration database provided by an embodiment of the present invention;
[0054] Figure 4 is a schematic diagram of undetermined parameters without nonlinear transformation provided by an embodiment of the present invention, wherein: Figure 4 (a) is a schematic diagram of the undetermined parameter β without nonlinear transformation. Figure 4 (b) is a schematic diagram of the undetermined parameter γ without nonlinear transformation. Figure 4 (c) is a schematic diagram of the undetermined parameter σ without nonlinear transformation;
[0055] Figure 5 is a schematic diagram of undetermined parameters for nonlinear transformation provided by an embodiment of the present invention, wherein: Figure 5 (a) is a schematic diagram of the nonlinear transformation of the unknown parameter β. Figure 5 (b) is a schematic diagram of the nonlinear transformation of the unknown parameter γ. Figure 5 (c) Schematic diagram of nonlinear transformation of the unknown parameter σ;
[0056] Figure 6 1 is a schematic diagram of the prediction result of pipeline A using the method of the present invention and the prediction result of pipeline A using the prior art method provided by an embodiment of the present invention, wherein: Figure 6 (a) is a schematic diagram of the goodness of fit of the prediction results of pipeline A using the existing technology method. Figure 6 (b) is a schematic diagram of the goodness of fit of the prediction results of pipeline A using the method of the present invention, Figure 6 (c) is a schematic diagram of the absolute average error of the prediction results of pipeline A using the existing technology method. Figure 6 (d) is a schematic diagram of the absolute average error of the prediction results of pipeline A using the method of the present invention;
[0057] Figure 7 1 is a schematic diagram of the prediction results of pipeline B using the method of the present invention and the prediction results of pipeline B using the prior art method provided by an embodiment of the present invention, wherein: Figure 7 (a) is a schematic diagram of the goodness of fit of the prediction results of pipeline B using the existing technology method. Figure 7 (b) is a schematic diagram of the goodness of fit of the prediction results of pipeline B using the method of the present invention, Figure 7 (c) is a schematic diagram of the absolute average error of the prediction results of pipeline B using the existing technology method. Figure 7 (d) is a schematic diagram of the absolute average error of the prediction results of pipeline B using the method of the present invention. DETAILED DESCRIPTION
[0058] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0059] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0060] Although the terms first, second, third, etc. can be used in the text to describe multiple elements, components, regions, layers and / or sections, these elements, components, regions, layers and / or sections should not be limited by these terms. These terms can only be used to distinguish an element, component, region, layer or section from another region, layer or section. Unless the context clearly indicates, terms such as "first", "second" and other numerical terms do not imply order or sequence when used in the text. Therefore, the first element, component, region, layer or section discussed below can be referred to as the second element, component, region, layer or section without departing from the teaching of the example embodiments.
[0061] The refined oil pipeline adopts a sequential transportation method. The mixed oil generated at the junction of two oil products will reduce the quality of the oil products. The appropriate download and treatment method of the mixed oil will bring greater economic benefits. In the current research, the one-dimensional mixed oil model constructed based on CFD theory has low accuracy, and the multi-dimensional model has high accuracy but long calculation time and difficulty in solving, which is difficult to meet the actual needs of the project. The existing data-driven method does not fully consider the input factors, and the output dimension is too high. The model prediction accuracy is low and the applicability is poor. Therefore, the pipeline operator needs a more accurate and effective mixed oil concentration monitoring method to guide the formulation of mixed oil receiving and processing plans. Accurate prediction of mixed oil concentration is also the basis for realizing automatic cutting of mixed oil in refined oil pipelines. The mixed oil concentration prediction method and system based on curve parameterization provided in the embodiment of the present invention utilizes historical pipeline data, extracts mixed oil concentration curve parameters based on an asymmetric model, and constructs a mixed oil concentration database. The parameters of the mixed oil concentration curve are mapped to the normal distribution through nonlinear transformation to improve the fitting effect of the mixed oil concentration prediction model and the concentration prediction accuracy. The mixed oil concentration prediction model of the finished oil pipeline is trained offline. When it is applied online, the pipeline operation data is collected and the mixed oil concentration is predicted when the mixed oil interface is about to arrive at the station.
[0062] Example 1
[0063] like Figure 1 As shown, this embodiment provides a method for predicting the mixed oil concentration in a finished oil pipeline based on curve parameterization, comprising the following steps:
[0064] 1) If Figure 2 As shown in the figure, based on the historical batch delivery data of the finished oil pipeline and the historical mixed oil inlet density data, a mixed oil concentration prediction model is pre-built, specifically:
[0065] 1.1) Obtain the historical batch delivery data and historical mixed oil inlet density data of the finished oil pipeline in the finished oil pipeline SCADA system.
[0066] Specifically, the historical batch transportation data includes historical operation data, basic pipeline parameters and initial oil mixing information. The historical operation data includes temperature, pressure and flow rate. The basic pipeline parameters include pipe diameter and pipe length. The initial oil mixing information includes initial oil mixing length.
[0067] Specifically, the historical mixed oil inbound density data includes different times after the mixed oil arrives at the station and the historical mixed oil concentration curve.
[0068] 1.2) The historical mixed oil concentration curve in the historical mixed oil inlet density data is parameterized to obtain the mixed oil concentration curve parameters as the output value of the mixed oil concentration prediction model, specifically:
[0069] 1.2.1) The three parameters that need to be determined in the contaminant concentration curve fitting function are randomly initialized, and the curve relationship is fitted to obtain the initial contaminant concentration curve parameters.
[0070] Specifically, the mixed oil concentration data is mainly presented in the form of a mixed oil concentration curve. The accurate description of the mixed oil concentration curve is an important part of the output of the mixed oil concentration prediction model. In order to reduce the output dimension of the model and improve the accuracy of model prediction, the number of curve parameters should be reduced as much as possible while ensuring the accuracy of concentration curve fitting. The mixed oil concentration curve has typical asymmetric characteristics, so the Morgan-Mercer-Flodin model is used as the mixed oil concentration curve fitting function. The mixed oil converts the concentration curve into multiple characteristic parameters for description. The Morgan-Mercer-Flodin model allows asymmetric growth, which is consistent with the characteristics of the mixed oil concentration curve. Its equation is:
[0071]
[0072] Among them, β and γ are parameters that describe the growth rate of the curve, α is the maximum Y value of the curve (upper asymptote, the maximum value of the mixed oil concentration curve is 1), σ is the x value that controls the inflection point, x is the independent variable, that is, the different times after the mixed oil arrives at the station, and Y is the function value, that is, the mixed oil concentration parameter.
[0073] This curve has only three unknown parameters, β, γ and σ. The output dimension of the model is small, and the difficulty of fitting nonlinear relationships between variables is greatly reduced.
[0074] 1.2.2) Input the mixed oil inlet density data at different times x after the mixed oil arrives at the station into the mixed oil concentration curve parameter to obtain the current function value, i.e., the fitted mixed oil concentration curve.
[0075] 1.2.3) Input the current function value (fitted contaminant concentration curve) and the true value (obtained historical contaminant concentration curve) into the error function to obtain the current error.
[0076] Specifically, the error function is:
[0077] Among them, s(p) is the error value, y i is the true value, f(x i , β, σ, γ) is substituted into the mixed oil transit time x i The current function value obtained after adjusting the three unknown parameters (β, γ and σ).
[0078] 1.2.4) According to the current error, determine the parameter update speed, obtain the updated parameters, and then obtain the updated mixed oil concentration curve parameters, enter step 1.2.2), and iterate continuously until the error is reduced to a preset range, output the parameters, and obtain the final mixed oil concentration curve parameters as the output value of the mixed oil concentration prediction model.
[0079] 1.3) If Figure 3 As shown in the figure, based on the historical batch delivery data and the historical mixed oil inlet density data, a mixed oil concentration database is constructed, specifically:
[0080] 1.3.1) According to the historical batch delivery data of the finished oil pipeline and the historical mixed oil inlet density data, determine the mixed oil concentration information of a batch of mixed oil at this station.
[0081] 1.3.2) Based on the start and end time of the mixed oil migration in the pipe section, collect the temperature, pressure and flow data within this time period, obtain the Reynolds number, and calculate the average value of the temperature, pressure and flow data within this time period.
[0082] 1.3.3) Collect the hydrothermal parameters (density, viscosity) of the oil products before and after the batch interface (two different fluids flowing sequentially in the pipe) and the initial mixed oil length of the mixed oil at the previous station.
[0083] 1.3.4) Perform characteristic transformation on the basic information of the pipe section and the Reynolds number to obtain characteristic variables corresponding to the basic information of the pipe section and the Reynolds number.
[0084] 1.3.5) Based on pipeline operation data, hydrothermal parameters, initial oil mixing length at the station, basic information of the pipeline section, characteristic variables corresponding to the Reynolds number, and parameters of the oil mixing concentration curve, a database of oil mixing concentration is constructed, so that the parameters of the oil mixing concentration curve can be predicted in real time and the oil mixing concentration distribution can be obtained.
[0085] Specifically, there are many factors that affect the development of oil mixing, so the input of the model needs to comprehensively consider and analyze these factors. When the finished oil is transported sequentially, oil mixing is actually the concentration gradient generated at the junction of the two oil products, which is caused by the mutual diffusion of the oil products as they migrate. The concentration gradient is an important factor affecting diffusion, and what determines the concentration gradient is the density and viscosity of the two oil products. Since oil products have a certain degree of compressibility and the principle of thermal expansion and contraction, the temperature and pressure of the oil products will affect the density and viscosity of the oil products. The convection diffusion coefficient during the oil product migration process is also affected by the flow state in the pipe. The pipe length, pipe diameter, Reynolds number, etc. will all affect the flow state. The researchers summarized a large amount of experimental and field data and obtained the Austin oil mixing formula, and concluded that the relationship between the oil mixing length and the pipe diameter, pipe length, and Reynolds number is as follows (3):
[0086] C=11.75d 0.5 L 0.5Re -0.1 (3)
[0087] Among them, C is the oil mixing length, d is the pipe diameter, L is the pipe length, and Re is the Reynolds number. It is not difficult to deduce from Austin's empirical formula that the oil mixing development is proportional to the 0.5 power of the pipe diameter and length, and proportional to the 0.1 power of the Reynolds number. At the same time, the longer the oil migration time, the more complete the oil mixing development. The more complete the initial oil mixing development, the slower the oil mixing development in the subsequent migration process.
[0088] 1.4) Perform nonlinear transformation on the undetermined parameters in the mixed oil concentration curve parameters, and map the output of the mixed oil concentration curve parameters to a normal distribution.
[0089] Specifically, after the mixed oil concentration curve is parameterized, three undetermined parameters to be predicted can be obtained. The mixed oil concentration prediction model is constructed using a data mining algorithm. The data-driven algorithm has a better learning effect on data that conforms to simple standard distributions such as normal distribution. Considering that the parameters of the mixed oil concentration curve have complex data distribution characteristics and the distribution has irregular bimodal characteristics, in order to accurately extract the high-dimensional complex nonlinear associations between input and output variables, prevent model overfitting and improve model accuracy, it is necessary to perform nonlinear transformation on the three undetermined parameters obtained by curve fitting, and map the output to a normal distribution. The Box-Cox mapping method is used, and the calculation formula is:
[0090]
[0091] Among them, x (λ) i is the data after mapping, x i is the original data, and λ is the transformation parameter. Different λs use different transformation methods. For example, when λ is -1, it is a reciprocal transformation, when λ is 0, it is a logarithmic transformation, and when λ is 0.5, it is a square root transformation.
[0092] More specifically, λ needs to select a suitable value, and the determination method is: through a series of given λ values, calculate the residual sum of squares between the transformed data and the normally distributed data, and then obtain the curve of the residual sum of squares with respect to λ based on the least squares estimation, and obtain the λ when the residual sum of squares is the smallest.
[0093] 1.5) The mixed oil concentration database is divided into a test set and a training set. The training set is used to train the mixed oil concentration prediction model, and the test set is used to verify the model accuracy to obtain a mixed oil concentration prediction model that meets the accuracy requirements.
[0094] 2) After the mixed oil passes through the upstream station, collect the batch transportation data of the finished oil pipeline and the time when the mixed oil interface arrives at the station.
[0095] 3) Some time before the mixed oil interface arrives at the station, the pipeline operation data in the batch transportation data is input into the constructed mixed oil concentration prediction model to predict the mixed oil concentration and obtain the mixed oil concentration curve to assist in determining the mixed oil cutting and back-blending plan.
[0096] 4) During the continuous operation of the pipeline, the real-time collected batch delivery data and the arrival time of the mixed oil interface at the station are added to the mixed oil concentration database, and the mixed oil concentration prediction model is updated using a self-learning mechanism to improve the prediction accuracy of the mixed oil concentration prediction model.
[0097] The following uses real data from two finished oil pipelines as specific examples to describe in detail the method for predicting mixed oil concentration in finished oil pipelines based on curve parameterization of the present invention:
[0098] First, compare the difference before and after the nonlinear transformation of the mixed oil concentration curve parameters, such as Figure 4 and Figure 5 As shown in Figure 2, the distribution of the three unknown parameters is irregular when the nonlinear transformation is not performed, especially the parameter β, which has obvious bimodal characteristics. After the nonlinear transformation, the data distribution is close to the normal distribution, and the irregular distribution phenomenon disappears.
[0099] A mixed oil concentration prediction model was constructed, and the solution of the present invention was compared with the solution of the prior art to determine the goodness of fit (R) between the predicted mixed oil concentration curve and the actual mixed oil concentration data on site. 2 ) and absolute mean error as the measurement indicators, partial error and prediction example comparison Figure 6 and Figure 7 As shown, pipeline A uses a method of comparing the fitting curve with the predicted curve, and pipeline B uses a method of comparing the predicted curve with the actual concentration point.
[0100] From the comparison between the predicted mixed oil concentration curves and the real concentration curves of the two pipelines, it can be seen that the mixed oil concentration curve predicted by the scheme of the present invention is closer to the real mixed oil concentration curve, while the scheme of the prior art not only has the overall predicted curve deviating from the real concentration curve and the fitted concentration curve being farther away, but also has Figure 7 The extreme large error shown in , that is, the performance of the prediction model in the prior art is unstable. In the actual engineering application process, the mixed oil concentration curve obtained by the present invention can play a role in assisting the mixed oil treatment decision, and the prediction result is more accurate and the model performance is more robust.
[0101] Tables 1 to 4 below show the injection and arrival times of different batches of pipeline A and pipeline B, extract the concentration distribution of mixed oil interface of the batches arriving at the station, and compare the results of different methods:
[0102] Table 2.1 Comparison of prediction results for pipeline A
[0103]
[0104]
[0105] Table 2.2B Pipeline Part Prediction Results Error Comparison
[0106]
[0107] Table 2.3 Prediction results of this scheme
[0108]
[0109] Table 2.4 Prediction results of Technical Solution 2
[0110]
[0111] It can be seen that the mixed oil concentration curve predicted by the scheme of the present invention is more in line with the actual mixed oil concentration distribution curve. From the comparison of the mean absolute error data of the prediction results, it can be obtained that the prediction accuracy of the scheme of the present invention is higher and the stability of the model is better. In addition, due to the high output dimension of the scheme of the prior art, it is easy to overfit during model training. It can be seen that the mixed oil concentration prediction accuracy and stability of the scheme of the present invention are higher than those of the scheme of the prior art. The reason is that the selected Morgan-Mercer-Flodin model can more accurately describe the asymmetric characteristics of the mixed oil concentration curve, and can also reduce the output dimension of the mixed oil concentration prediction model. Therefore, in the context of the lack of mixed oil concentration data in actual engineering applications, accurately characterizing the mixed oil concentration curve through curve parameterization and reducing the output dimension are of great significance to improving the prediction accuracy of mixed oil concentration.
[0112] Example 2
[0113] This embodiment provides a system for predicting mixed oil concentration in a product oil pipeline based on curve parameterization, including:
[0114] The data acquisition module is used to collect batch transportation data of the finished oil pipeline and the arrival time of the mixed oil interface at the station after the mixed oil passes through the station.
[0115] The prediction module is used to predict the mixed oil concentration some time before the mixed oil interface arrives, based on the pipeline operation data in the batch transportation data and the pre-built mixed oil concentration prediction model, and to obtain the predicted mixed oil concentration curve.
[0116] The self-learning module is used to add the collected mixed oil concentration information and pipeline operation data to the mixed oil concentration database in real time during the continuous operation of the pipeline, and adopts a self-learning mechanism to improve the prediction accuracy of the mixed oil concentration prediction model.
[0117] The system provided in this embodiment is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for specific processes and detailed contents, which will not be repeated here.
[0118] Example 3
[0119] This embodiment provides a processing device corresponding to the method for predicting the mixed oil concentration in a finished oil pipeline based on curve parameterization provided in this embodiment 1. The processing device can be suitable for a client processing device, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the method of embodiment 1.
[0120] The processing device includes a processor, a memory, a communication interface and a bus, and the processor, the memory and the communication interface are connected through the bus to complete mutual communication. The memory stores a computer program that can be run on the processing device, and when the processing device runs the computer program, the method for predicting the mixed oil concentration in the finished oil pipeline based on curve parameterization provided in this embodiment 1 is executed.
[0121] In some implementations, the memory may be a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.
[0122] In some other implementations, the processor may be a central processing unit (CPU), a digital signal processor (DSP), or other general-purpose processors of various types, which are not limited herein.
[0123] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.
[0124] Those skilled in the art will understand that the structure of the above-mentioned computing device is only a partial structure related to the scheme of the present application, and does not constitute a limitation on the computing device to which the scheme of the present application is applied. The specific computing device may include more or fewer components, or combine certain components, or have a different arrangement of components.
[0125] Example 4
[0126] This embodiment provides a computer program product corresponding to the method for predicting the mixed oil concentration in a finished oil pipeline based on curve parameterization provided in this embodiment 1. The computer program product may include a computer-readable storage medium on which computer-readable program instructions for executing the method for predicting the mixed oil concentration in a finished oil pipeline based on curve parameterization described in this embodiment 1 are loaded.
[0127] Computer readable storage media can be tangible devices that hold and store instructions used by instruction execution devices. Computer readable storage media can be, for example, but not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any combination thereof.
[0128] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.
[0129] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0130] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0132] The above embodiments are only used to illustrate the present invention, wherein the structure, connection mode and manufacturing process of each component may be changed. Any equivalent transformations and improvements based on the technical solution of the present invention should not be excluded from the protection scope of the present invention.
Claims
1. A method for predicting the mixed oil concentration in a finished oil pipeline based on curve parameterization, characterized in that: include: After the mixed oil passes through the station, collect the batch transportation data of the finished oil pipeline and the arrival time of the mixed oil interface at the station; Some time before the mixed oil interface arrives at the station, the pipeline operation data in the batch transportation data is input into the pre-built mixed oil concentration prediction model to predict the mixed oil concentration and obtain the mixed oil concentration curve; During the continuous operation of the pipeline, the collected batch delivery data and the arrival time of the mixed oil interface at the station are added to the pre-built mixed oil concentration database, and the mixed oil concentration prediction model is updated using a self-learning mechanism; The construction process of the mixed oil concentration prediction model is as follows: Obtain historical batch delivery data and historical mixed oil inbound density data of the finished oil pipeline, wherein the historical batch delivery data includes historical operation data, basic pipeline parameters and initial mixed oil information, the historical mixed oil inbound density data includes different times after the mixed oil arrives at the station and historical mixed oil concentration curves, the historical operation data includes temperature, pressure and flow, the basic pipeline parameters include pipe diameter and pipe length, and the initial mixed oil information includes initial mixed oil length; Parameterize the historical mixed oil concentration curve in the historical mixed oil inlet density data to obtain the mixed oil concentration curve parameters as the output value of the mixed oil concentration prediction model; Construct a mixed oil concentration database based on historical batch delivery data and historical mixed oil inbound density data; Performing nonlinear transformation on undetermined parameters in the mixed oil concentration curve parameter, and mapping the output of the mixed oil concentration curve parameter to a normal distribution; The mixed oil concentration database is divided into a test set and a training set. The mixed oil concentration prediction model is trained with the training set, and the model accuracy is verified with the test set to obtain a mixed oil concentration prediction model that meets the accuracy requirements. The parameters of the mixed oil concentration curve are: Among them, β and γ are parameters describing the growth rate of the curve, α is the maximum Y value of the curve, σ is the x value of the control inflection point, x is the different time after the mixed oil arrives at the station, and Y is the mixed oil concentration parameter.
2. A method for predicting mixed oil concentration in a finished oil pipeline based on curve parameterization according to claim 1, characterized in that: The parameterization of the historical mixed oil concentration curve in the historical mixed oil inlet density data to obtain the mixed oil concentration curve parameters as the output value of the mixed oil concentration prediction model includes: The parameters that need to be determined in the mixed oil concentration curve fitting function are randomly initialized, and the curve relationship is fitted to obtain the initial mixed oil concentration curve parameters; Inputting the mixed oil in the mixed oil inlet density data at different times after the mixed oil arrives at the station into the mixed oil concentration curve parameter to obtain the current function value, i.e., the fitted mixed oil concentration curve; Input the current function value and the true value into the error function to get the current error; According to the current error, the parameter update speed is determined to obtain the updated parameters, and then the updated mixed oil concentration curve parameters are obtained. The iteration is continued until the error is reduced to a preset range, and the parameters are output to obtain the final mixed oil concentration curve parameters as the output value of the mixed oil concentration prediction model.
3. The method for predicting mixed oil concentration in a finished oil pipeline based on curve parameterization according to claim 1, characterized in that: The error function is: Among them, s(p) is the error value, y i is the true value, f(x i ,β,σ,γ) is substituted into the mixed oil transit time x i The current function value is obtained after the three unknown parameters β, σ, and γ are calculated; m is the number of all sampling points.
4. The method for predicting mixed oil concentration in a product oil pipeline based on curve parameterization according to claim 1, characterized in that: The method of constructing a mixed oil concentration database based on historical batch delivery data and historical mixed oil inlet density data includes: According to the historical batch delivery data of the finished oil pipeline and the historical mixed oil inlet density data, determine the mixed oil concentration information of a batch of mixed oil in the station; Based on the start and end time of the mixed oil migration in the pipe section, the temperature, pressure and flow data within the time period are collected to obtain the Reynolds number, and the average value of the temperature, pressure and flow data within the time period is calculated; Collect the hydrothermal parameters of the oil products before and after the batch interface and the initial mixed oil length of the mixed oil at the previous station; Perform characteristic transformation on the basic information of the pipe section and the Reynolds number to obtain the corresponding characteristic variables; A mixed oil concentration database is constructed based on pipeline operation data, hydrothermal parameters, initial mixed oil length through the station, basic information of the pipeline section, characteristic variables corresponding to the Reynolds number, and mixed oil concentration curve parameters.
5. The method for predicting mixed oil concentration in a finished oil pipeline based on curve parameterization according to claim 1, characterized in that: The calculation formula of the nonlinear conversion is: Among them, z (λ) i is the data after mapping, z i is the original data, and λ is the transformation parameter.
6. A system for predicting the concentration of mixed oil in a finished oil pipeline based on curve parameterization, characterized in that: include: The data acquisition module is used to collect the batch transportation data of the finished oil pipeline and the arrival time of the mixed oil interface at the station after the mixed oil passes through the station; A prediction module is used to input the pipeline operation data in the batch transportation data into a pre-built mixed oil concentration prediction model to predict the mixed oil concentration some time before the mixed oil interface arrives at the station, and obtain a mixed oil concentration curve; The self-learning module is used to add the collected batch delivery data and the arrival time of the mixed oil interface to the pre-built mixed oil concentration database during the continuous operation of the pipeline, and adopt the self-learning mechanism to update the mixed oil concentration prediction model; The construction process of the mixed oil concentration prediction model is as follows: Obtain historical batch delivery data and historical mixed oil inbound density data of the finished oil pipeline, wherein the historical batch delivery data includes historical operation data, basic pipeline parameters and initial mixed oil information, the historical mixed oil inbound density data includes different times after the mixed oil arrives at the station and historical mixed oil concentration curves, the historical operation data includes temperature, pressure and flow, the basic pipeline parameters include pipe diameter and pipe length, and the initial mixed oil information includes initial mixed oil length; Parameterize the historical mixed oil concentration curve in the historical mixed oil inlet density data to obtain the mixed oil concentration curve parameters as the output value of the mixed oil concentration prediction model; Construct a mixed oil concentration database based on historical batch delivery data and historical mixed oil inbound density data; Performing nonlinear transformation on undetermined parameters in the mixed oil concentration curve parameter, and mapping the output of the mixed oil concentration curve parameter to a normal distribution; The mixed oil concentration database is divided into a test set and a training set. The mixed oil concentration prediction model is trained with the training set, and the model accuracy is verified with the test set to obtain a mixed oil concentration prediction model that meets the accuracy requirements. The parameters of the mixed oil concentration curve are: Among them, β and γ are parameters describing the growth rate of the curve, α is the maximum Y value of the curve, σ is the x value of the control inflection point, x is the different time after the mixed oil arrives at the station, and Y is the mixed oil concentration parameter.
7. A processing device, characterized in that: It comprises computer program instructions, wherein the computer program instructions are used to implement the steps corresponding to the method for predicting mixed oil concentration in a finished oil pipeline based on curve parameterization according to any one of claims 1 to 5 when executed by a processing device.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, wherein the computer program instructions, when executed by a processor, are used to implement the steps corresponding to the method for predicting mixed oil concentration in a finished oil pipeline based on curve parameterization according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for calculating oil mixing quantity of product oil pipeline based on real-time data
CN115455827A
Mixed oil quality index model based on C atom number and mixed oil cutting method
CN116259369A