System and method for measuring moisture content of crude oil
By laying optical fibers on crude oil pipelines and collecting spectral signal data, calculating spectral signal quality index and impact coefficient, and screening effective measurement points, the problem of large error in crude oil moisture content measurement in complex pipeline environments is solved, and the stability of the measurement system is improved. Accuracy, suitable for harsh industrial environments.
Patent Information
- Application Number
- CN202411185813.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-27
AI Technical Summary
The existing crude oil moisture content measurement methods have problems with large measurement errors and poor stability in complex pipeline environments. This is mainly due to the influence of the propagation and absorption path of light in crude oil due to the flow rate, flow direction and pipeline shape, resulting in the stability of the spectral signal and Accuracy is affected.
By laying optical fibers along crude oil pipelines and setting fiber reflection points or fiber Bragg gratings, spectral signal data are collected in real time, spectral signal data sets are constructed, spectral signal quality index and impact coefficients are calculated, effective measurement points are screened for moisture content measurement, and external factors are reduced. Effect of measurement results.
Improves the stability and accuracy of the measurement system, reduces maintenance costs and risks, enhances monitoring flexibility and efficiency, is suitable for harsh industrial environments, and reduces direct contact and damage to pipes.
Smart Images

Figure CN119125025A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of oil well exploitation, and in particular to a system and method for measuring the water content of crude oil. Background Art
[0002] With the continuous development of the petroleum industry, accurate measurement of the water content of crude oil is particularly important in oil field development, refining and processing, and oil and gas storage and transportation. At present, there are many methods for measuring the water content of crude oil, including but not limited to density method, conductivity method, microwave method, infrared spectroscopy, etc.
[0003] In a Chinese invention application with application publication number CN112240870A, a system and method for measuring the water content of crude oil are disclosed, which belongs to the technical field of oil well exploitation. The measuring system includes: a light source structure, a liquid container, a photoelectric detection structure and a signal processing device. The liquid container is provided with a liquid inlet and a liquid outlet, the liquid inlet is located at the top of the liquid container, the liquid outlet is located at the bottom of the liquid container, and the crude oil in the oil well flows from the liquid inlet to the liquid outlet under the action of gravity; the liquid container is located between the light source structure and the photoelectric detection structure, and the photoelectric detection structure is electrically connected to the information processing device, wherein a first window is provided on the side of the liquid container facing the light source structure, and a second window is provided on the side of the liquid container facing the photoelectric detection structure, and the first window is opposite to the second window.
[0004] In view of the above application, the prior art still has the following deficiencies:
[0005] Since the flow rate, flow direction and shape of crude oil in the pipeline are complex and changeable, these factors will significantly affect the propagation and absorption path of light in the crude oil, and thus affect the stability and accuracy of the spectral signal. Traditional water content measurement methods such as vibrating tube densitometer, capacitance method, microwave method, etc. often have problems such as large measurement errors and poor stability when facing complex pipeline environments. Summary of the invention
[0006] 1. Technical issues to be resolved
[0007] In view of the deficiencies in the prior art, the present invention provides a system and method for measuring the water content of crude oil. The system and method obtain the spectral signal quality index of each position by plotting the spectral signal data of each spectral channel in the spectral signal data set into a spectrum graph, and calculate the spectral quality influence coefficient of each position through the flow velocity change value, the pressure change value and the spectral signal quality change value in the same time interval. The spectral quality comprehensive evaluation value of each position is further calculated and obtained, and the spectral quality comprehensive evaluation value of each position is compared with the quality threshold. According to the comparison result, a number of monitoring points are selected for measuring the water content of crude oil, and the water content of crude oil is calculated through the spectral data of the effective measurement points, thereby solving the problems mentioned in the background technology.
[0008] (II) Technical solution
[0009] To achieve the above purpose, the present invention is implemented by the following technical scheme: A method for measuring the water content of crude oil, comprising the following steps:
[0010] Lay optical fiber along the crude oil pipeline, set optical fiber reflection points or fiber Bragg gratings at different locations, connect the optical fiber laid on the pipeline to the spectrometer, collect spectral signal data of crude oil in real time, summarize the data collected at all locations, and construct a spectral signal data set;
[0011] Obtain the spectral signal data set at each position, plot the spectral signal data of each spectral channel in the spectral signal data set into a spectrum, identify the baseline in the spectrum, determine the start and end points of the absorption band according to the baseline, calculate the area and characteristic peak intensity ratio of the absorption band, and combine the signal-to-noise ratio of the spectrum to obtain the spectral signal quality index at each position;
[0012] Through the flow velocity change value, pressure change value and spectral signal quality change value in the same time interval, a multinomial regression model of the flow velocity change value and the spectral signal quality change value, as well as the pressure change value and the spectral signal quality change value is fitted, and the spectral quality influence coefficient of each position is calculated through the predicted value of each model;
[0013] The comprehensive spectral quality evaluation value of each position is calculated through the spectral signal quality index and the spectral quality influence coefficient. The comprehensive spectral quality evaluation value of each position is compared with the quality threshold. According to the comparison results, several monitoring points are selected for the measurement of the water content of crude oil. The water content of crude oil is calculated through the spectral data of the effective measuring points.
[0014] Furthermore, a spectral signal data set is obtained at each position, the spectral signal data set includes several spectral channels, and the spectral signal data of each spectral channel is plotted into a spectral graph using spectral analysis software, and the spectral signal of each spectral channel corresponds to a spectral graph.
[0015] Furthermore, the wavelengths of the starting and ending points of the absorption band are obtained, and the area of the absorption band is calculated according to the starting wavelength, the ending wavelength and the baseline. The calculation formula is as follows:
[0016]
[0017] Where S represents the area of the absorption band, λ start Indicates the starting wavelength, λ end Indicates the end wavelength, I base represents the baseline intensity, and I(λ) represents the intensity at wavelength λ.
[0018] Furthermore, the peak detection algorithm is used to determine the position of the characteristic peak in the absorption band, and the wavelength and corresponding intensity of the characteristic peak are recorded, using the formula PI a,b =I peak_a / I peak_b Calculate the characteristic peak intensity ratio of the absorption band using the formula SNR = I peak / RMS_noise calculates the signal-to-noise ratio;
[0019] Among them, PI a,b It represents the intensity ratio of characteristic peaks a and b in the absorption band, I peak_a Indicates the intensity of characteristic peak a, I peak_b represents the intensity of characteristic peak b, SNR represents the signal-to-noise ratio of each spectrum, I peak It represents the average intensity of each spectrogram, and RMS_noise represents the root mean square value of the background noise of each spectrogram.
[0020] Furthermore, the absorption band area, characteristic peak intensity ratio and signal-to-noise ratio of the spectrum corresponding to all spectral channels at each position are obtained. After linear normalization, the spectral signal quality index of each position is calculated. The calculation formula is as follows:
[0021]
[0022] Among them, SQI represents the spectral signal quality index at each position, SNR i represents the signal-to-noise ratio of the i-th spectral channel, S i Represents the absorption band area of the i-th spectral channel, PI ij Represents the jth characteristic peak intensity ratio of the absorption band of the i-th spectral channel, i = 1, 2, ..., N, N represents the number of spectral channels, j = 1, 2, ..., M, M represents the number of characteristic peak intensity ratios.
[0023] Furthermore, multiple regression models of flow velocity change value and spectral signal quality change value, as well as pressure change value and spectral signal quality change value are fitted respectively to construct flow velocity model and pressure model:
[0024]
[0025] Among them, ΔSQI V , ΔSQI P They represent the change values of the spectral signal quality corresponding to the flow rate V and pressure P, ΔV represents the change value of the flow rate, ΔP represents the change value of the pressure, β0,β1,…,β n and γ0,γ1,…,γ n is the model parameter, n represents the order, and ε1 and ε2 are error terms.
[0026] Furthermore, the spectral quality influence coefficient of each position is calculated through the predicted values of the two models after linear normalization. The calculation formula is as follows:
[0027]
[0028] Among them, IC k represents the spectral quality influence coefficient of the kth position, ΔSQI V,k and ΔSQI P,k They represent the change in spectral signal quality at position k predicted by the flow rate and pressure models, k = 1, 2, ..., K, K represents the number of all positions, μ V represents the mean of the velocity model prediction values, μ P It represents the mean of the predicted value of the pressure model, σ is the correction parameter, 0<σ<<1.
[0029] Furthermore, the comprehensive evaluation value of the spectral quality at each position is calculated by using the spectral signal quality index and the spectral quality influence coefficient. The calculation formula is as follows:
[0030]
[0031] Among them, EV k represents the comprehensive evaluation value of the spectral quality at the kth position, IC k Represents the spectral quality influence coefficient of the kth position, SQI k Represents the spectral signal quality index at the kth position.
[0032] Furthermore, a quality threshold is set in advance, and the comprehensive evaluation value of the spectral quality at each position is compared with the quality threshold. According to the comparison results, several monitoring points are selected for measuring the water content of crude oil, including:
[0033] When the comprehensive evaluation value of the spectral quality is greater than or equal to the quality threshold, the current position is selected as a valid measurement point, and its spectral data will be used for subsequent calculation and analysis of the water content of crude oil;
[0034] When the comprehensive evaluation value of spectral quality is less than the quality threshold, the current position is judged as an invalid measurement point, and its spectral data is excluded from the subsequent calculation and analysis of crude oil water content.
[0035] A crude oil water content measurement system includes: a data acquisition module, a spectral signal analysis module, a spectral quality impact analysis module and a spectral signal screening module; wherein:
[0036] The data acquisition module lays optical fibers along the crude oil pipeline, sets optical fiber reflection points or fiber Bragg gratings at different locations, connects the optical fibers laid on the pipeline to the spectrometer, collects the spectral signal data of the crude oil in real time, summarizes the data collected at all locations, and constructs a spectral signal data set;
[0037] The spectral signal analysis module obtains the spectral signal data set of each position, plots the spectral signal data of each spectral channel in the spectral signal data set into a spectrum, identifies the baseline in the spectrum, determines the starting and ending points of the absorption band according to the baseline, calculates the area of the absorption band and the characteristic peak intensity ratio, and obtains the spectral signal quality index of each position by combining the signal-to-noise ratio of the spectrum.
[0038] The spectrum quality impact analysis module fits the multinomial regression models of flow velocity change value and spectrum signal quality change value, as well as pressure change value and spectrum signal quality change value through the flow velocity change value, pressure change value and spectrum signal quality change value in the same time interval, and calculates the spectrum quality impact coefficient of each position through the predicted value of each model;
[0039] The spectral signal screening module calculates the comprehensive spectral quality evaluation value of each position through the spectral signal quality index and the spectral quality influence coefficient, compares the comprehensive spectral quality evaluation value of each position with the quality threshold, and selects several monitoring points for measuring the water content of crude oil based on the comparison results. The water content of crude oil is calculated through the spectral data of the effective measurement points.
[0040] (III) Beneficial effects
[0041] The present invention provides a system and method for measuring the water content of crude oil, which has the following beneficial effects:
[0042] (1) By laying optical fiber along the pipeline and setting reflection points or fiber Bragg gratings, real-time monitoring of crude oil spectral signals can be achieved, allowing remote monitoring at a location far away from the site, improving the flexibility and efficiency of monitoring. Fiber optic sensing technology has the advantages of corrosion resistance and electromagnetic interference resistance, and is suitable for harsh industrial environments. By laying optical fiber along the pipeline for monitoring, direct contact and damage to the pipeline can be reduced, thereby reducing maintenance costs and risks.
[0043] (2) By drawing a spectrum graph, the changes of spectral signals at different wavelengths can be intuitively observed, which helps to more accurately identify spectral features. By evaluating the quality of the spectral signal at each position, it helps to eliminate low-quality data points and improve the reliability of the overall data.
[0044] (3) Flow rate and pressure are important factors that affect the stability of spectral signals. By comprehensively considering the impact of flow rate and pressure changes, the quality changes of spectral signals can be evaluated more comprehensively, which can reduce the measurement error caused by fluctuations of a single factor, improve the stability of the measurement system, and help to more accurately interpret spectral signals in complex and changeable pipeline environments.
[0045] (4) In a complex and changeable pipeline environment, the spectral signal is easily affected by factors such as flow velocity, flow direction and pipeline shape, causing fluctuations. By evaluating the quality of the spectral signal and screening valid data, the impact of these external factors on the measurement results can be effectively reduced, making the measurement results more stable and reliable. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a schematic diagram of the steps of the method for real-time measurement of water content in crude oil according to the present invention;
[0047] Figure 2 This is a schematic flow chart of the method for real-time measurement of water content in crude oil according to the present invention;
[0048] Figure 3 It is a schematic diagram of the structure of the real-time measurement system of the water content of crude oil of the present invention. DETAILED DESCRIPTION
[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] See also Figure 1-Figure 2 The present invention provides a method for measuring the water content of crude oil, comprising the following steps:
[0051] Step 1: Lay optical fiber along the crude oil pipeline, set optical fiber reflection points or fiber Bragg gratings at different locations, connect the optical fiber laid on the pipeline to the spectrometer, collect spectral signal data of crude oil in real time, summarize the data collected at all locations, and construct a spectral signal data set;
[0052] The step 1 includes the following contents:
[0053] Step 101: Selecting an oil-resistant, high-temperature-resistant, and corrosion-resistant optical fiber suitable for the crude oil pipeline environment as a sensing element, laying the optical fiber along the crude oil pipeline, and setting optical fiber reflection points or optical fiber Bragg gratings at preset intervals as markers of different monitoring locations to distinguish spectral signals from different locations;
[0054] It should be noted that to ensure that the optical fiber can cover all areas that need to be monitored, the optical fiber can be installed by spiral winding, parallel laying or embedding in the pipeline wall. The optical fiber reflection point refers to a specific position or structure in the optical fiber that can reflect the light signal. It is achieved by engraving microstructures (such as tiny grooves, mirror reflection layers, etc.) on the optical fiber or installing micro-reflectors. The optical fiber reflection point is used to mark different monitoring areas in order to distinguish spectral signals from different positions. The fiber Bragg grating is a more advanced optical fiber sensing element that realizes the reflection of light of a specific wavelength by periodically engraving the refractive index change along the axial direction of the optical fiber core;
[0055] Step 102: Select one or more high-precision fiber optic spectrometers, install the spectrometers in a location that is convenient for operation and maintenance, such as a control room or a data center near the pipeline, connect the optical fiber laid on the pipeline to the spectrometer, and use an optical fiber connector to quickly connect the spectrometer and the optical fiber;
[0056] Fiber optic spectrometer is a device that uses optical fiber as a signal coupling device to couple the measured light into the spectrometer for spectral analysis. It uses the absorption, reflection and transmission characteristics of light by the material to infer the composition, structure, color, concentration and other characteristics of the material by measuring the intensity distribution at different wavelengths in the spectrum. These spectrometers should have high sensitivity and a wide spectral range, be able to accurately measure the spectral characteristics of crude oil, ensure that the fiber optic connection is stable and reliable, and the signal transmission is not attenuated;
[0057] Step 103: collecting spectral signal data of crude oil in real time, denoising the collected spectral data to eliminate random noise and background noise, summarizing the data collected at all locations, constructing a spectral signal data set, and transmitting and storing it;
[0058] When using, combine the contents of step 101 to step 103:
[0059] By laying optical fiber along the pipeline and setting reflection points or fiber Bragg gratings, real-time monitoring of crude oil spectral signals can be achieved, allowing remote monitoring at locations far away from the site, improving the flexibility and efficiency of monitoring. Fiber optic sensing technology has the advantages of corrosion resistance and resistance to electromagnetic interference, and is suitable for harsh industrial environments. By laying optical fiber along the pipeline for monitoring, direct contact and damage to the pipeline can be reduced, thereby reducing maintenance costs and risks.
[0060] Step 2: Obtain the spectral signal data set at each position, plot the spectral signal data of each spectral channel in the spectral signal data set into a spectrum, identify the baseline in the spectrum, determine the starting and ending points of the absorption band according to the baseline, calculate the area of the absorption band and the characteristic peak intensity ratio, and combine the signal-to-noise ratio of the spectrum to obtain the spectral signal quality index at each position;
[0061] The step 2 includes the following contents:
[0062] Step 201: Obtain a spectral signal data set at each position, the spectral signal data set includes multiple spectral channels, and use spectral analysis software (such as Origin, MATLAB, SpectraGryph, etc.) to plot the spectral signal data of each spectral channel into a spectrogram, and the spectral signal of each spectral channel corresponds to a spectrogram;
[0063] Step 202: Identify the baseline in the spectrum, determine the starting and ending points of the absorption band based on the baseline, use the measurement tool in the spectrum analysis software to measure the wavelength of the starting and ending points of the absorption band, ensure that the measurement point is located at the position where the intensity begins to change significantly, and consider the measurement error. Calculate the area of the absorption band based on the starting wavelength, ending wavelength and baseline. The calculation formula is as follows:
[0064]
[0065] Where S represents the area of the absorption band, λ start Indicates the starting wavelength, λ end Indicates the end wavelength, I base represents the baseline intensity, and I(λ) represents the intensity at wavelength λ;
[0066] It should be noted that the baseline is identified in the spectrum, that is, the expected intensity level when there is no absorption or emission, usually the lowest or highest level part of the spectrum, and the area where the intensity suddenly drops (for absorption spectrum) or rises (for emission spectrum) in the spectrum is found. These areas usually correspond to specific absorption or emission bands of the substance. The starting and ending points of the absorption band are defined by identifying the point where the intensity begins to deviate significantly from the baseline and then returns to the baseline.
[0067] Step 203: Use a peak detection algorithm (such as zero point detection based on the second-order derivative) to determine the position of the characteristic peak in the absorption band, and record the wavelength and corresponding intensity of the characteristic peak, using the formula PI a,b =I peak_a / I peak_b Calculate the characteristic peak intensity ratio of the absorption band using the formula SNR = I peak / RMS_noise calculates the signal-to-noise ratio;
[0068] Among them, PI a,b It represents the intensity ratio of characteristic peaks a and b in the absorption band, I peak_a Indicates the intensity of characteristic peak a, I peak_b represents the intensity of characteristic peak b, SNR represents the signal-to-noise ratio of each spectrum, I peak represents the average intensity of each spectrogram, and RMS_noise represents the root mean square value of the background noise of each spectrogram;
[0069] Step 204: Obtain the absorption band area, characteristic peak intensity ratio and signal-to-noise ratio of the spectrum corresponding to all spectral channels at each position, and after linear normalization, calculate the spectral signal quality index at each position. The calculation formula is as follows:
[0070]
[0071] Among them, SQI represents the spectral signal quality index at each position, SNR i represents the signal-to-noise ratio of the i-th spectral channel, S i Represents the absorption band area of the i-th spectral channel, PI ij Indicates the jth characteristic peak intensity ratio of the absorption band of the i-th spectral channel, i=1,2,…,N, N represents the number of spectral channels, j=1,2,…,M, M represents the number of characteristic peak intensity ratios, max() is the maximum value, and min() is the minimum value;
[0072] It should be noted that the peak intensity ratio refers to the ratio between the intensities of two or more specific peaks. An absorption band may contain multiple characteristic peaks. The signal-to-noise ratio reflects the relative level of noise in the signal. A high signal-to-noise ratio indicates a clear signal with less noise. The area of the absorption band is related to the concentration or content of the substance, and also reflects the intensity of the spectral signal. Therefore, the quality of the spectral signal is quantitatively analyzed by the absorption band area, characteristic peak intensity ratio and signal-to-noise ratio.
[0073] When used, combine the contents of step 201 to step 204:
[0074] By drawing a spectrum, we can intuitively observe the changes in spectral signals at different wavelengths, which helps to more accurately identify spectral features. By evaluating the quality of the spectral signal at each position, it helps to eliminate low-quality data points and improve the reliability of the overall data.
[0075] Step 3: Fit the multinomial regression models of flow velocity change value and spectral signal quality change value, as well as pressure change value and spectral signal quality change value, through the flow velocity change value, pressure change value and spectral signal quality change value in the same time interval, and calculate the spectral quality influence coefficient of each position through the predicted value of each model;
[0076] The step three includes the following contents:
[0077] Step 301: Obtain the flow velocity, pressure and corresponding spectral signal quality at each position, and fit the multinomial regression models of the flow velocity change value and the spectral signal quality change value, and the pressure change value and the spectral signal quality change value respectively through the flow velocity change value, pressure change value and spectral signal quality change value in the same time interval, and construct the flow velocity model and pressure model:
[0078]
[0079] Among them, ΔSQI V , ΔSQI P They represent the change values of the spectral signal quality corresponding to the flow rate V and pressure P, ΔV represents the change value of the flow rate, ΔP represents the change value of the pressure, β0,β1,…,β n and γ0,γ1,…,γ n are model parameters, determined by data fitting, n represents the order, ε1 and ε2 are error terms;
[0080] It should be noted that the error term represents the difference between the model prediction value and the actual observed value. This difference reflects the uncertainty of the model in the prediction process. Even if the model contains all important independent variables and these independent variables are accurately measured, there will still be differences between the predicted value and the actual value due to random fluctuations and unpredictable factors.
[0081] Step 302: The spectral quality influence coefficient of each position is calculated through the predicted values of the two models after linear normalization processing. The calculation formula is as follows:
[0082]
[0083] Among them, IC k represents the spectral quality influence coefficient of the kth position, ΔSQI V,k and ΔSQI P,k They represent the change in spectral signal quality at position k predicted by the flow rate and pressure models, k = 1, 2, ..., K, K represents the number of all positions, μ V represents the mean of the velocity model prediction values, μ P It represents the mean of the predicted value of the pressure model, σ is the correction parameter, 0<σ<<1, which is used to prevent the denominator from being 0;
[0084] It should be noted that when fitting a polynomial regression model, it is crucial to choose an appropriate model order. Too low an order may lead to under-fitting of the model and failure to capture the complex relationships in the data; while too high an order may lead to over-fitting of the model and excessive sensitivity to noise data. Therefore, the optimal model order should be selected through methods such as cross-validation, Akaike information criterion, or Bayesian information criterion.
[0085] When used, combine the contents of step 301 to step 302:
[0086] Flow rate and pressure are important factors that affect the stability of spectral signals. By comprehensively considering the impact of flow rate and pressure changes, the quality changes of spectral signals can be evaluated more comprehensively, which can reduce measurement errors caused by fluctuations in a single factor, improve the stability of the measurement system, and help to more accurately interpret spectral signals in complex and changeable pipeline environments.
[0087] Step 4: Calculate the comprehensive spectral quality evaluation value of each position through the spectral signal quality index and the spectral quality influence coefficient, compare the comprehensive spectral quality evaluation value of each position with the quality threshold, select several monitoring points for measuring the water content of crude oil based on the comparison results, and calculate the water content of crude oil through the spectral data of the effective measurement points.
[0088] The step 4 includes the following contents:
[0089] Step 401: Obtain the spectral signal quality index and spectral quality influence coefficient of each position, and calculate the spectral quality comprehensive evaluation value of each position through the spectral signal quality index and spectral quality influence coefficient. The calculation formula is as follows:
[0090]
[0091] Among them, EV k represents the comprehensive evaluation value of the spectral quality at the kth position, IC k Represents the spectral quality influence coefficient of the kth position, SQI k represents the spectral signal quality index at the kth position, and e represents the base of the natural logarithm;
[0092] Step 402: pre-set a quality threshold, compare the comprehensive spectral quality evaluation value of each position with the quality threshold, and select a number of monitoring points for measuring the water content of crude oil according to the comparison results, specifically including:
[0093] When the comprehensive evaluation value of the spectral quality is greater than or equal to the quality threshold, it means that the quality of the spectral signal data at the current position is good and meets the requirements for measuring the water content of crude oil. Therefore, the current position is selected as a valid measurement point, and its spectral data will be used for subsequent calculation and analysis of the water content of crude oil.
[0094] When the comprehensive spectral quality evaluation value is less than the quality threshold, it means that the spectral signal data quality at the current position is poor, which may be caused by excessive noise, weak signal, insufficient resolution, etc. If such spectral data is used for crude oil water content measurement, it may introduce large errors. Therefore, the current position is judged as an invalid measurement point, and its spectral data will be excluded from the subsequent calculation and analysis of crude oil water content.
[0095] Step 403: Extract characteristic information related to water content from the spectrum data of the effective measurement points, including absorption peak intensity and transmittance change at a specific wavelength, and use a neural network model to build a crude oil water content calculation model. The characteristic information extracted from the spectrum data is used as input to the crude oil water content calculation model to calculate the water content of the crude oil, specifically including:
[0096] Step 4031: Use filtering technology (such as wavelet transform and Fourier transform) to remove noise from the spectral data, adjust the baseline of the spectral data to eliminate the offset caused by instrument or environmental changes, and extract characteristic information related to water content from the spectral data, including absorption peak intensity at a specific wavelength, transmittance change and other spectral parameters;
[0097] Absorption peak intensity at specific wavelengths: Water in crude oil will have obvious absorption peaks at certain specific wavelengths. By analyzing spectral data, the absorption peaks at these wavelengths can be identified and their intensities can be calculated as one of the characteristics; Transmittance change: During the spectral scanning process, the transmittance will also change with the change of wavelength, especially near the water absorption peak, the transmittance will drop significantly, and these transmittance changes can also be used as characteristic information; Other spectral parameters: such as slope, peak width, peak shape, etc., which can also provide useful information about water content;
[0098] Step 4032: Select a neural network model suitable for processing spectral data, such as a multi-layer perceptron (MLP), a convolutional neural network (CNN), or a recurrent neural network (RNN), including an input layer, a hidden layer, and an output layer;
[0099] The number of input layer nodes should match the number of selected features. For example, if 5 features are selected (such as 3 absorption peak intensities and 2 transmittance changes), the input layer should have 5 nodes. Add one or more hidden layers, each containing a certain number of neurons. The number of hidden layers and the number of neurons in each layer need to be determined experimentally to achieve the best performance. In the hidden layer, use activation functions (such as ReLU, Sigmoid, or Tanh) to increase the nonlinear ability of the model. The output layer should have one node to output the calculated water content of crude oil.
[0100] Step 4033: using the spectral data of the crude oil sample with known water content and the corresponding water content as training data, taking the characteristic information of the spectral data as input and the water content as target output, training the neural network, using the back propagation algorithm and gradient descent to optimize the model parameters, and minimizing the error between the predicted water content and the actual water content;
[0101] Step 4034: Input the extracted feature information into the trained neural network model, and the model outputs the predicted water content of the crude oil.
[0102] When used, combine the contents of step 401 to step 403:
[0103] In a complex and changeable pipeline environment, spectral signals are easily affected by factors such as flow velocity, flow direction and pipeline shape, causing fluctuations. By evaluating the quality of spectral signals and screening valid data, the impact of these external factors on the measurement results can be effectively reduced, making the measurement results more stable and reliable.
[0104] See also Figure 3 The present invention also provides a real-time measurement system for the water content of crude oil, comprising: a data acquisition module, a spectral signal analysis module, a spectral quality impact analysis module and a spectral signal screening module; wherein,
[0105] The data acquisition module lays optical fibers along the crude oil pipeline, sets optical fiber reflection points or fiber Bragg gratings at different locations, connects the optical fibers laid on the pipeline to the spectrometer, collects the spectral signal data of the crude oil in real time, summarizes the data collected at all locations, and constructs a spectral signal data set;
[0106] The spectral signal analysis module obtains the spectral signal data set of each position, plots the spectral signal data of each spectral channel in the spectral signal data set into a spectrum, identifies the baseline in the spectrum, determines the starting and ending points of the absorption band according to the baseline, calculates the area of the absorption band and the characteristic peak intensity ratio, and obtains the spectral signal quality index of each position by combining the signal-to-noise ratio of the spectrum.
[0107] The spectrum quality impact analysis module fits the multinomial regression models of flow velocity change value and spectrum signal quality change value, as well as pressure change value and spectrum signal quality change value through the flow velocity change value, pressure change value and spectrum signal quality change value in the same time interval, and calculates the spectrum quality impact coefficient of each position through the predicted value of each model;
[0108] The spectral signal screening module calculates the comprehensive spectral quality evaluation value of each position through the spectral signal quality index and the spectral quality influence coefficient, compares the comprehensive spectral quality evaluation value of each position with the quality threshold, and selects several monitoring points for measuring the water content of crude oil based on the comparison results. The water content of crude oil is calculated through the spectral data of the effective measurement points.
[0109] In the application, the several formulas involved are all calculated by removing dimensions and taking their numerical values. The formula is a formula of the most recent real situation obtained by collecting a large amount of data and performing software simulation. The coefficients in the formula are set by technicians in this field according to actual conditions.
[0110] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. A person of ordinary skill in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented in combination with electronic hardware, computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution.
[0111] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0112] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A method for measuring the water content of crude oil, characterized in that: The following steps are involved: Lay optical fiber along the crude oil pipeline, set optical fiber reflection points or fiber Bragg gratings at different locations, connect the optical fiber laid on the pipeline to the spectrometer, collect spectral signal data of crude oil in real time, summarize the data collected at all locations, and construct a spectral signal data set; Obtain the spectral signal data set at each position, plot the spectral signal data of each spectral channel in the spectral signal data set into a spectrum, identify the baseline in the spectrum, determine the start and end points of the absorption band according to the baseline, calculate the area and characteristic peak intensity ratio of the absorption band, and combine the signal-to-noise ratio of the spectrum to obtain the spectral signal quality index at each position; Through the flow velocity change value, pressure change value and spectral signal quality change value in the same time interval, a multinomial regression model of the flow velocity change value and the spectral signal quality change value, as well as the pressure change value and the spectral signal quality change value is fitted, and the spectral quality influence coefficient of each position is calculated through the predicted value of each model; The comprehensive spectral quality evaluation value of each position is calculated through the spectral signal quality index and the spectral quality influence coefficient. The comprehensive spectral quality evaluation value of each position is compared with the quality threshold. According to the comparison results, several monitoring points are selected for the measurement of the water content of crude oil. The water content of crude oil is calculated through the spectral data of the effective measuring points.
2. The method for measuring the water content of crude oil according to claim 1, characterized in that: A spectral signal data set is obtained at each position. The spectral signal data set includes several spectral channels. The spectral signal data of each spectral channel is plotted into a spectral graph using spectral analysis software. The spectral signal of each spectral channel corresponds to a spectral graph.
3. The method for measuring the water content of crude oil according to claim 2, characterized in that: Get the wavelength of the starting and ending points of the absorption band, and calculate the area of the absorption band based on the starting wavelength, ending wavelength and baseline. The calculation formula is as follows: Where S represents the area of the absorption band, λ start Indicates the starting wavelength, λ end Indicates the end wavelength, I base represents the baseline intensity, and I(λ) represents the intensity at wavelength λ.
4. The method for measuring the water content of crude oil according to claim 3, characterized in that: Use the peak detection algorithm to determine the position of the characteristic peak in the absorption band, and record the wavelength and corresponding intensity of the characteristic peak, using the formula PI a,b =I peak_a / I peak_b Calculate the characteristic peak intensity ratio of the absorption band using the formula SNR = I peak / RMS_noise calculates the signal-to-noise ratio; Among them, PI a,b It represents the intensity ratio of characteristic peaks a and b in the absorption band, I peak_a Indicates the intensity of characteristic peak a, I peak_b represents the intensity of characteristic peak b, SNR represents the signal-to-noise ratio of each spectrum, I peak It represents the average intensity of each spectrogram, and RMS_noise represents the root mean square value of the background noise of each spectrogram.
5. The method for measuring the water content of crude oil according to claim 4, characterized in that: The absorption band area, characteristic peak intensity ratio and signal-to-noise ratio of the spectrum corresponding to all spectral channels at each position are obtained. After linear normalization, the spectral signal quality index of each position is calculated. The calculation formula is as follows: Among them, SQI represents the spectral signal quality index at each position, SNR i represents the signal-to-noise ratio of the i-th spectral channel, S i represents the absorption band area of the i-th spectral channel, PI ij Represents the jth characteristic peak intensity ratio of the absorption band of the i-th spectral channel, i = 1, 2, ..., N, N represents the number of spectral channels, j = 1, 2, ..., M, M represents the number of characteristic peak intensity ratios.
6. The method for measuring the water content of crude oil according to claim 1, characterized in that: The multinomial regression models of flow velocity change value and spectral signal quality change value, as well as pressure change value and spectral signal quality change value are fitted respectively to construct flow velocity model and pressure model: Among them, ΔSQI V , ΔSQI P They represent the change values of the spectral signal quality corresponding to the flow rate V and pressure P, ΔV represents the change value of the flow rate, ΔP represents the change value of the pressure, β0,β1,…,β n and γ0,γ1,…,γ n is the model parameter, n represents the order, and ε1 and ε2 are error terms.
7. A method for measuring the water content of crude oil according to claim 6, characterized in that: The predicted values of the two models are linearly normalized to calculate the spectral quality influence coefficient of each position. The calculation formula is as follows: Among them, IC k represents the spectral quality influence coefficient of the kth position, ΔSQI V,k and ΔSQI P,k They represent the change values of the spectral signal quality at position k predicted by the flow velocity model and the pressure model, respectively, k = 1, 2, ..., K, K represents the number of all positions, μ V represents the mean of the velocity model prediction value, μ P It represents the mean of the predicted value of the pressure model, σ is the correction parameter, 0<σ<<1.
8. The method for measuring the water content of crude oil according to claim 1, characterized in that: The comprehensive evaluation value of the spectral quality at each position is calculated by using the spectral signal quality index and the spectral quality influence coefficient. The calculation formula is as follows: Among them, EV k represents the comprehensive evaluation value of the spectral quality at the kth position, IC k Represents the spectral quality influence coefficient of the kth position, SQI k Represents the spectral signal quality index at the kth position.
9. A method for measuring the water content of crude oil according to claim 8, characterized in that: The quality threshold is set in advance, and the comprehensive spectral quality evaluation value of each position is compared with the quality threshold. According to the comparison results, several monitoring points are selected for the measurement of the water content of crude oil, including: When the comprehensive evaluation value of spectral quality is greater than or equal to the quality threshold, the current position is selected as a valid measurement point, and its spectral data will be used for subsequent calculation and analysis of crude oil water content; When the comprehensive evaluation value of spectral quality is less than the quality threshold, the current position is judged as an invalid measurement point, and its spectral data is excluded from the subsequent calculation and analysis of crude oil water content.
10. A crude oil water content measurement system, used to implement the method according to any one of claims 1 to 9, characterized in that: include: The data acquisition module lays optical fibers along the crude oil pipeline, sets optical fiber reflection points or fiber Bragg gratings at different locations, connects the optical fibers laid on the pipeline to the spectrometer, collects the spectral signal data of the crude oil in real time, summarizes the data collected at all locations, and constructs a spectral signal data set; The spectral signal analysis module obtains the spectral signal data set of each position, plots the spectral signal data of each spectral channel in the spectral signal data set into a spectrum, identifies the baseline in the spectrum, determines the starting and ending points of the absorption band according to the baseline, calculates the area of the absorption band and the characteristic peak intensity ratio, and obtains the spectral signal quality index of each position by combining the signal-to-noise ratio of the spectrum. The spectrum quality impact analysis module fits the multinomial regression models of flow velocity change value and spectrum signal quality change value, as well as pressure change value and spectrum signal quality change value through the flow velocity change value, pressure change value and spectrum signal quality change value in the same time interval, and calculates the spectrum quality impact coefficient of each position through the predicted value of each model; The spectral signal screening module calculates the comprehensive spectral quality evaluation value of each position through the spectral signal quality index and the spectral quality influence coefficient, compares the comprehensive spectral quality evaluation value of each position with the quality threshold, and selects several monitoring points for measuring the water content of crude oil based on the comparison results. The water content of crude oil is calculated through the spectral data of the effective measurement points.
Citation Information
Patent Citations
System and method for measuring water content of crude oil
CN112240870A
Method for predicting general properties of crude oil through online near-infrared spectrum
CN107367481A
Method for measuring content of water in oil product based on deep learning and measuring instrument
CN108982405A
Monitoring system based on carbon fiber optical fiber composite rod and monitoring data interpretation method
CN113532523A
Intelligent online optimized laser-induced breakdown spectroscopy system
CN115684135A
