A Measuring System and Method for Water Content in Crude Oil
By laying optical fibers on crude oil pipelines and collecting spectral signal data, calculating the spectral signal quality index and impact coefficient, screening effective monitoring points for moisture content measurement, solving the problems of large measurement errors and poor stability in complex pipeline environments, and achieving more accurate and stable moisture content measurement.
Patent Information
- Application Number
- CN202411185813.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2044-08-27
AI Technical Summary
The prior art has problems of large errors and poor stability when measuring crude oil moisture content in complex pipeline environments.
By laying optical fibers along the crude oil pipeline and setting optical fiber reflection points or fiber Bragg gratings, spectral signal data of crude oil is collected in real time, spectral signal data sets are constructed, spectral signal quality index and spectral quality impact coefficients are calculated, and effective monitoring points are screened for moisture content measurement.
Improve the accuracy and stability of measurements, reduce the impact of external factors on measurement results, and reduce maintenance costs and risks.
Smart Images

Figure CN119125025B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil well exploitation, and particularly to a measurement system and method for the water cut of crude oil. Background Art
[0002] With the continuous development of the petroleum industry, the accurate measurement of the water cut of crude oil is particularly important in the processes of oilfield development, oil refining and processing, and oil and gas storage and transportation. At present, there are various measurement methods for the water cut of crude oil, including but not limited to density method, conductivity method, microwave method, infrared spectroscopy method, etc.
[0003] In a Chinese invention application with the application publication number CN112240870A, a measurement system and method for the water cut of crude oil are disclosed, belonging to the technical field of oil well exploitation. The measurement 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 hole and a liquid outlet hole. The liquid inlet hole is located at the top end of the liquid container, and the liquid outlet hole is located at the bottom end of the liquid container. The crude oil in the oil well flows from the liquid inlet hole to the liquid outlet hole 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. Among them, a first window is provided on one side of the liquid container facing the light source structure, and a second window is provided on one side of the liquid container facing the photoelectric detection structure, and the first window and the second window are opposite to each other.
[0004] Combined with the above application, the prior art still has the following deficiencies:
[0005] Due to the complex and variable flow rate, flow direction, and pipeline shape of the crude oil in the pipeline, these factors will significantly affect the propagation and absorption path of light in the crude oil, and further affect the stability and accuracy of the spectral signal. Traditional water cut measurement methods such as vibrating tube densitometers, capacitance methods, and microwave methods often have problems such as large measurement errors and poor stability in the face of complex pipeline environments. Summary of the Invention
[0006] (1) Technical Problems to be Solved
[0007] Aiming at the deficiencies of the prior art, the present invention provides a measurement system and method for the water cut of crude oil. By plotting the spectral signal data of each spectral channel in the spectral signal data set into a spectrogram, the spectral signal quality index at each position is obtained. Through the flow rate change value, pressure change value, and spectral signal quality index change value within the same time interval, the spectral quality influence coefficient at each position is calculated, and further the comprehensive spectral quality evaluation value at each position is calculated. The comprehensive spectral quality evaluation value at each position is compared with the quality threshold, and several monitoring points are selected for the measurement of the water cut of crude oil according to the comparison result. Through the spectral data of the effective measurement points, the water cut of the crude oil is calculated, and the problems mentioned in the background art are solved.
[0008] (2) Technical solution
[0009] To achieve the above object, the present invention is realized through the following technical solutions: A method for measuring the water content of crude oil, comprising the following steps:
[0010] Lay optical fibers along the crude oil pipeline, set optical fiber reflection points or fiber Bragg gratings at different positions, connect the optical fibers laid on the pipeline to a spectrometer, collect the spectral signal data of the crude oil in real time, summarize the data collected at all positions, 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 as a spectrogram, identify the baseline in the spectrogram, determine the starting and ending 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 spectrogram to obtain the spectral signal quality index at each position;
[0012] Through the flow rate change value, pressure change value and spectral signal quality index change value within the same time interval, fit the multiple regression models of the flow rate change value and the spectral signal quality index change value, and the pressure change value and the spectral signal quality index change value, and calculate the spectral quality influence coefficient at each position through the predicted values of each model;
[0013] Calculate and obtain the comprehensive spectral quality evaluation value at each position through the spectral signal quality index and the spectral quality influence coefficient, compare the comprehensive spectral quality evaluation value at each position with the quality threshold, screen several monitoring points for measuring the water content of crude oil according to the comparison result, and calculate the water content of the crude oil through the spectral data of the effective measurement points.
[0014] Further, obtain the spectral signal data set at each position. The spectral signal data set contains several spectral channels. Use spectral analysis software to plot the spectral signal data of each spectral channel as a spectrogram. The spectral signal of each spectral channel corresponds to a spectrogram.
[0015] Further, obtain the wavelengths of the starting and ending points of the absorption band, and calculate the area of the absorption band according to the starting wavelength, ending wavelength and baseline. The calculation formula is as follows:
[0016]
[0017] Among them, S represents the area of the absorption band, λ start represents the starting wavelength, λ end represents the ending wavelength, I base represents the baseline intensity, and I(λ) represents the intensity at wavelength λ.
[0018] Further, the peak detection algorithm is used to determine the positions of the characteristic peaks in the absorption band, and the wavelengths and corresponding intensities of the characteristic peaks are recorded. The formula PI a,b = I peak_a / I peak_b is used to calculate the intensity ratio of the characteristic peaks in the absorption band. The formula SNR = I peak / RMS_noise is used to calculate the signal-to-noise ratio;
[0019] where PI a,b represents the intensity ratio of the characteristic peaks a and b in the absorption band, I peak_a represents the intensity of the characteristic peak a, I peak_b represents the intensity of the characteristic peak b, SNR represents the signal-to-noise ratio of each spectrogram, 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.
[0020] Further, the absorption band area, characteristic peak intensity ratio, and signal-to-noise ratio of the spectrograms corresponding to all spectral channels at each position are obtained. After linear normalization, the spectral signal quality index at each position is calculated. The calculation formula is as follows:
[0021]
[0022] where 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 intensity ratio of the j-th characteristic peak in the absorption band of the i-th spectral channel, i = 1, 2,..., N, N represents the number of spectral channels, and j = 1, 2,..., M, M represents the number of characteristic peak intensity ratios.
[0023] Further, the multiple regression models of the flow rate change value and the spectral signal quality index change value, and the pressure change value and the spectral signal quality index change value are respectively fitted to construct a flow rate model and a pressure model:
[0024]
[0025] where ΔSQI V , ΔSQI P respectively represent the spectral signal quality index change values corresponding to the flow rate V and the pressure P, ΔV represents the flow rate change value, ΔP represents the pressure change value, β 0 , β 1 , …, β n and γ 0 , γ 1 , …, γ n are model parameters, and n represents the order, ε1 , ε 2 is the error term.
[0026] Furthermore, through the predicted values of the two models, after linear normalization, the spectral quality influence coefficient at each position is calculated, and the calculation formula is as follows:
[0027]
[0028] where IC k represents the spectral quality influence coefficient at the k-th position, ΔSQI V,k and ΔSQI P,k respectively represent the change values of the spectral signal quality index at position k predicted using the flow rate and pressure models, k = 1, 2, …, K, where K represents the number of all positions, μ V represents the mean value of the predicted values of the flow rate model, μ P represents the mean value of the predicted values of the pressure model, and σ is a correction parameter, 0 < σ << 1.
[0029] Furthermore, through the spectral signal quality index and the spectral quality influence coefficient, the comprehensive spectral quality evaluation value at each position is calculated, and the calculation formula is as follows:
[0030]
[0031] where EV k represents the comprehensive spectral quality evaluation value at the k-th position, IC k represents the spectral quality influence coefficient at the k-th position, and SQI k represents the spectral signal quality index at the k-th position.
[0032] Furthermore, a quality threshold is preset, and the comprehensive spectral quality evaluation value at each position is compared with the quality threshold, and several monitoring points are selected according to the comparison result for the measurement of the water content of crude oil, specifically including:
[0033] When the comprehensive spectral quality evaluation value is greater than or equal to the quality threshold, the current position is selected as an effective 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 spectral quality evaluation value is less than the quality threshold, the current position is determined as an invalid measurement point, and its spectral data is excluded from the subsequent calculation and analysis of the water content of crude oil.
[0035] A measurement system for the water content of crude oil includes: a data acquisition module, a spectral signal analysis module, a spectral quality influence analysis module, and a spectral signal screening module; where
[0036] Data acquisition module: Fiber optic cables are laid along the crude oil pipeline, and fiber optic reflection points or fiber Bragg gratings are set at different positions. The fiber optic cables laid on the pipeline are connected to a spectrometer to collect spectral signal data of the crude oil in real time. The data collected at all positions are summarized to construct a spectral signal data set.
[0037] Spectral signal analysis module: Obtain the spectral signal data set for each position, plot the spectral signal data of each spectral channel in the spectral signal data set as a spectrogram, identify the baseline in the spectrogram, determine the starting and ending points of the absorption band based on the baseline, calculate the area of the absorption band and the characteristic peak intensity ratio, and combine the signal-to-noise ratio of the spectrogram to obtain the spectral signal quality index for each position.
[0038] Spectral quality impact analysis module: Through the flow rate change value, pressure change value, and spectral signal quality index change value within the same time interval, fit the multiple regression models of the flow rate change value and the spectral signal quality index change value, and the pressure change value and the spectral signal quality index change value. Calculate the spectral quality impact coefficient for each position through the predicted values of each model.
[0039] Spectral signal screening module: Calculate and obtain the comprehensive spectral quality evaluation value for each position through the spectral signal quality index and the spectral quality impact coefficient. Compare the comprehensive spectral quality evaluation value for each position with the quality threshold, and screen several monitoring points for measuring the water content of the crude oil according to the comparison result. Calculate the water content of the crude oil through the spectral data of the effective measurement points.
[0040] (3) Beneficial effects
[0041] The present invention provides a measurement system and method for the water content of crude oil, having the following beneficial effects:
[0042] (1) By laying fiber optic cables along the pipeline and setting reflection points or fiber Bragg gratings, real-time monitoring of the spectral signals of crude oil can be achieved, allowing remote monitoring at locations far from the site, improving the flexibility and efficiency of monitoring. The fiber optic sensing technology has the advantages of corrosion resistance and electromagnetic interference resistance, and is suitable for harsh industrial environments. By monitoring along the pipeline through fiber optic cables, direct contact and damage to the pipeline can be reduced, thereby reducing maintenance costs and risks.
[0043] (2) By plotting the spectrogram, the changes in spectral signals at different wavelengths can be visually observed, which helps to more accurately identify spectral features. By evaluating the quality of the spectral signals 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 affecting the stability of spectral signals. By comprehensively considering the effects of changes in flow rate and pressure, the quality changes of spectral signals can be evaluated more comprehensively, measurement errors caused by fluctuations in a single factor can be reduced, the stability of the measurement system can be improved, and it helps to more accurately interpret spectral signals in a complex and variable pipeline environment.
[0045] (4) In a complex and variable pipeline environment, spectral signals are prone to fluctuations due to factors such as flow rate, flow direction, and pipeline shape. By evaluating the quality of spectral signals and screening effective data, the influence 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 Schematic diagram of the steps of the real-time measurement method for the water content of crude oil according to the present invention;
[0047] Figure 2 Schematic diagram of the process flow of the real-time measurement method for the water content of crude oil according to the present invention;
[0048] Figure 3 Schematic diagram of the structure of the real-time measurement system for the water content of crude oil according to the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0049] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0050] Please refer to Figures 1 - 2 , the present invention provides a method for measuring the water content of crude oil, including the following steps:
[0051] Step 1: Lay optical fibers along the crude oil pipeline, set optical fiber reflection points or fiber Bragg gratings at different positions, connect the optical fibers laid on the pipeline to a spectrometer, collect spectral signal data of the crude oil in real time, and summarize the data collected at all positions to construct a spectral signal data set;
[0052] The said Step 1 includes the following content:
[0053] Step 101: Select oil-resistant, high-temperature-resistant, and corrosion-resistant optical fibers suitable for the crude oil pipeline environment as sensing elements, lay the optical fibers along the crude oil pipeline, and set optical fiber reflection points or fiber Bragg gratings at preset intervals as identifiers for different monitoring positions to distinguish spectral signals from different positions;
[0054] It should be noted that to ensure that the optical fiber can cover all areas to be monitored, the optical fiber can be installed in ways such as spiral winding, parallel laying, or embedded in the pipe wall. The optical fiber reflection point refers to a specific position or structure in the optical fiber that can reflect optical signals, which is achieved by scribing microstructures (such as tiny grooves, mirror reflection layers, etc.) on the optical fiber or installing a micro mirror. The optical fiber reflection points are used to mark different monitoring areas so as to distinguish spectral signals from different positions. The fiber Bragg grating is a more advanced optical fiber sensing element, which realizes the reflection of light with a specific wavelength by periodically engraving refractive index changes along the axial direction in the optical fiber core;
[0055] Step 102: Select one or more high-precision optical fiber spectrometers and install the spectrometers in a location convenient for operation and maintenance, such as a control room or data center near the pipeline. Connect the optical fiber laid on the pipeline to the spectrometer, and use an optical fiber connector for quick connection between the spectrometer and the optical fiber;
[0056] The optical fiber spectrometer is a device that uses an optical fiber as a signal coupling device to couple the measured light into the spectrometer for spectral analysis. It utilizes the characteristics of substances such as absorption, reflection, and transmission of light, and infers the composition, structure, color, concentration, etc. of substances by measuring the intensity distribution at different wavelength positions in the spectrum. These spectrometers should have high sensitivity and a wide spectral range to accurately measure the spectral characteristics of crude oil, ensure stable and reliable optical fiber connection, and no attenuation in signal transmission;
[0057] Step 103: Real-time collect the spectral signal data of crude oil, perform denoising processing on the collected spectral data to eliminate random noise and background noise, summarize the data collected at all positions, construct a spectral signal data set, and perform transmission and storage;
[0058] During use, combine the content of Steps 101 to 103:
[0059] By laying optical fibers along the pipeline and setting reflection points or fiber Bragg gratings, real-time monitoring of the spectral signals of crude oil can be achieved, allowing remote monitoring at locations far from the site, improving the flexibility and efficiency of monitoring. The optical fiber sensing technology has advantages such as corrosion resistance and electromagnetic interference resistance, and is suitable for harsh industrial environments. By monitoring along the pipeline through laying optical fibers, 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 as a spectrogram, identify the baseline in the spectrogram, determine the starting and ending 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 spectrogram to obtain the spectral signal quality index at each position;
[0061] Step 2 includes the following contents:
[0062] Step 201: Obtain the spectral signal dataset at each position. The spectral signal dataset contains multiple spectral channels. Use spectral analysis software (such as Origin, MATLAB, SpectraGryph, etc.) to plot the spectral signal data of each spectral channel into a spectrogram. The spectral signal of each spectral channel corresponds to a spectrogram;
[0063] Step 202: Identify the baseline in the spectrogram, determine the starting and ending points of the absorption band according to the baseline. Use the measurement tool in the spectral analysis software to measure the wavelengths of the starting and ending points of the absorption band, ensure that the measurement points are located at the positions where the intensity starts to change significantly, and consider the measurement error. Calculate the area of the absorption band according to 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 represents the starting wavelength, λ end represents the ending wavelength, I base represents the baseline intensity, and I(λ) represents the intensity at wavelength λ;
[0066] It should be noted that identifying the baseline in the spectrogram, that is, the intensity level expected when there is no absorption or emission, is usually the lowest or highest level part of the spectrogram. Look for the areas in the spectrum where the intensity suddenly drops (for absorption spectra) or rises (for emission spectra). These areas usually correspond to the specific absorption or emission bands of the substance. By identifying the points where the intensity starts to deviate significantly from the baseline and then returns to the baseline, define the starting and ending points of the absorption band;
[0067] Step 203: Use a peak detection algorithm (such as zero-crossing detection based on the second derivative) to determine the positions of the characteristic peaks in the absorption band, and record the wavelengths and corresponding intensities of the characteristic peaks. Use the formula PI a,b = I peak_a / I peak_b to calculate the intensity ratio of the characteristic peaks of the absorption band. Use the formula SNR = I peak / RMS_noise to calculate the signal-to-noise ratio;
[0068] where PI a,b represents the intensity ratio of characteristic peaks a and b in the absorption band, I peak_a represents 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 spectrogram, 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 spectrograms corresponding to all spectral channels at each position. After linear normalization, calculate the spectral signal quality index for each position. The calculation formula is as follows:
[0070]
[0071] where SQI represents the spectral signal quality index for each position, and SNR i represents the signal-to-noise ratio of the i-th spectral channel, and S i represents the absorption band area of the i-th spectral channel, and PI ij represents the intensity ratio of the j-th characteristic peak in the absorption band of the i-th spectral channel. i = 1, 2, …, N, where N represents the number of spectral channels, and j = 1, 2, …, M, where M represents the number of characteristic peak intensity ratios. max() is used to take the maximum value, and min() is used to take 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 through the absorption band area, characteristic peak intensity ratio, and signal-to-noise ratio;
[0073] When in use, combine the content of Steps 201 to 204:
[0074] By plotting the spectrogram, the changes in the spectral signal at different wavelengths can be visually 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.
[0075] Step Three: Through the flow rate change value, pressure change value, and spectral signal quality index change value within the same time interval, fit the multiple regression models of the flow rate change value and the spectral signal quality index change value, and the pressure change value and the spectral signal quality index change value. Calculate the spectral quality influence coefficient for each position through the predicted values of each model;
[0076] The above Step Three includes the following content:
[0077] Step 301: Obtain the flow rate, pressure, and corresponding spectral signal quality at each position. Through the flow rate change value, pressure change value, and spectral signal quality index change value within the same time interval, respectively fit the multiple regression models of the flow rate change value and the spectral signal quality index change value, and the pressure change value and the spectral signal quality index change value, and construct a flow rate model and a pressure model:
[0078]
[0079] Among them, ΔSQI V and ΔSQI P respectively represent the change values of the spectral signal quality index corresponding to the flow velocity V and the pressure P, ΔV represents the change value of the flow velocity, Δ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 , ε 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 existing in the model prediction process. Even if the model includes all important independent variables and these independent variables are accurately measured, there will still be a difference between the prediction value and the actual value due to random fluctuations and unpredictable factors;
[0081] Step 302: Through the prediction values of the two models, after linear normalization processing, calculate the spectral quality influence coefficient at each position. The calculation formula is as follows:
[0082]
[0083] Among them, IC k represents the spectral quality influence coefficient at the k-th position, ΔSQI V,k and ΔSQI P,k respectively represent the change values of the spectral signal quality index predicted using the flow velocity and pressure models at position k, k = 1, 2, …, K, K represents the number of all positions, μ V represents the mean value of the prediction values of the flow velocity model, μ P represents the mean value of the prediction values of the pressure model, σ is a correction parameter, 0 < σ << 1, used to prevent the denominator from being 0;
[0084] It should be noted that when fitting a polynomial regression model, it is crucial to select an appropriate model order. An overly low order may lead to underfitting of the model and inability to capture the complex relationships in the data; while an overly high order may lead to overfitting of the model and being overly sensitive to noise data. Therefore, methods such as cross-validation, Akaike information criterion, or Bayesian information criterion should be used to select the optimal model order.
[0085] When in use, combine the content of steps 301 to 302:
[0086] Flow rate and pressure are important factors affecting the stability of spectral signals. By comprehensively considering the effects of changes in flow rate and pressure, the quality changes of spectral signals can be evaluated more comprehensively, measurement errors caused by fluctuations in a single factor can be reduced, the stability of the measurement system can be improved, and it helps to more accurately interpret spectral signals in a complex and variable pipeline environment.
[0087] Step Four: Calculate and obtain the comprehensive evaluation value of spectral quality for each position through the spectral signal quality index and the spectral quality influence coefficient. Compare the comprehensive evaluation value of spectral quality for each position with the quality threshold. According to the comparison results, select several monitoring points for measuring the water content of crude oil, and calculate the water content of crude oil through the spectral data of the effective measurement points.
[0088] The above Step Four includes the following content:
[0089] Step 401: Obtain the spectral signal quality index and the spectral quality influence coefficient for each position. Calculate and obtain the comprehensive evaluation value of spectral quality for each position through the spectral signal quality index and the spectral quality influence coefficient. The calculation formula is as follows:
[0090]
[0091] where EV k represents the comprehensive evaluation value of spectral quality at the k-th position, IC k represents the spectral quality influence coefficient at the k-th position, SQI k represents the spectral signal quality index at the k-th position, and e represents the base of the natural logarithm;
[0092] Step 402: Preset the quality threshold. Compare the comprehensive evaluation value of spectral quality for each position with the quality threshold. According to the comparison results, select several monitoring points for measuring the water content of crude oil, which specifically includes:
[0093] When the comprehensive evaluation value of spectral quality is greater than or equal to the quality threshold, it indicates 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 an effective 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 evaluation value of spectral quality is less than the quality threshold, it indicates that the quality of the spectral signal data at the current position is poor, which may be caused by excessive noise, too weak signal, insufficient resolution, etc. Such spectral data may introduce large errors if used for measuring the water content of crude oil. Therefore, the current position is determined as an invalid measurement point, and its spectral data will be excluded from the subsequent calculation and analysis of the water content of crude oil.
[0095] Step 403: Extract the moisture content-related characteristic information from the spectral data of valid measurement points, including the absorption peak intensity at specific wavelengths, transmittance changes, etc. Use a neural network model to construct a crude oil moisture content calculation model. Take the characteristic information extracted from the spectral data as the input and input it into the crude oil moisture content calculation model to calculate the moisture content of the crude oil, specifically including:
[0096] Step 4031: Use filtering techniques (such as wavelet transform, Fourier transform) to remove the noise in the spectral data and adjust the baseline of the spectral data to eliminate the offset caused by instrument or environmental changes. Extract the moisture content-related characteristic information from the spectral data, including the absorption peak intensity at specific wavelengths, transmittance changes, and other spectral parameters;
[0097] Absorption peak intensity at specific wavelengths: Water in crude oil has obvious absorption peaks at certain specific wavelengths. By analyzing the spectral data, these absorption peaks at these wavelengths can be identified and their intensities calculated as one of the characteristics; Transmittance changes: During the spectral scanning process, as the wavelength changes, the transmittance also changes. Especially near the water absorption peak, the transmittance will decrease significantly. 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 the moisture 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, hidden layers, and an output layer;
[0099] The number of nodes in the input layer should match the selected number of characteristics. For example, if 5 characteristics are selected (such as 3 absorption peak intensities and 2 transmittance changes), then the input layer should have 5 nodes; Add one or more hidden layers, each layer containing a certain number of neurons. The number of hidden layers and the number of neurons in each layer need to be determined through experiments to achieve the best performance. In the hidden layers, activation functions (such as ReLU, Sigmoid, or Tanh) are used to increase the non-linear ability of the model; The output layer should have one node for outputting the calculated moisture content of the crude oil;
[0100] Step 4033: Use the spectral data and the corresponding moisture content of crude oil samples with known moisture content as training data. Take the characteristic information of the spectral data as the input and the moisture content as the target output to train the neural network. Use the backpropagation algorithm and gradient descent to optimize the model parameters and minimize the error between the predicted moisture content and the actual moisture content;
[0101] Step 4034: Input the extracted characteristic information into the trained neural network model, and the model outputs the predicted moisture content of the crude oil.
[0102] During use, in combination with the content of steps 401 to 403:
[0103] In a complex and variable pipeline environment, spectral signals are prone to fluctuations due to factors such as flow velocity, flow direction, and pipeline shape. By evaluating the spectral signal quality and screening effective data, the influence of these external factors on the measurement results can be effectively reduced, making the measurement results more stable and reliable.
[0104] Please refer to Figure 3 , the present invention also provides a real-time measurement system for crude oil water content, including: a data acquisition module, a spectral signal analysis module, a spectral quality influence 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 positions, connects the optical fibers laid on the pipeline to a spectrometer, and collects spectral signal data of the crude oil in real time. The data collected at all positions is summarized to construct a spectral signal data set;
[0106] The spectral signal analysis module obtains the spectral signal data set at each position, plots the spectral signal data of each spectral channel in the spectral signal data set as a spectrogram, identifies the baseline in the spectrogram, 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 combines the signal-to-noise ratio of the spectrogram to obtain the spectral signal quality index at each position;
[0107] The spectral quality influence analysis module fits the multiple regression models of the flow velocity change value and the spectral signal quality index change value, and the pressure change value and the spectral signal quality index change value through the flow velocity change value, the pressure change value, and the spectral signal quality index change value within the same time interval. Through the predicted values of each model, the spectral quality influence coefficient at each position is calculated;
[0108] The spectral signal screening module calculates and obtains the comprehensive spectral quality evaluation value at each position through the spectral signal quality index and the spectral quality influence coefficient, compares the comprehensive spectral quality evaluation value at each position with the quality threshold, and screens several monitoring points for measuring the water content of crude oil according to the comparison result. Through the spectral data of the effective measurement points, the water content of the crude oil is calculated.
[0109] In the application, several formulas involved are calculated by taking their numerical values after dimensionless, and the formula is obtained by software simulation of a large amount of collected data to get a formula closest to the actual situation. The coefficients in the formula are set by those skilled in the art according to the actual situation.
[0110] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. Those of ordinary skill in the art will realize that the units and algorithm steps of the examples described in connection with the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are executed 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. They may be located in one place or distributed over multiple network units. Some or all of the units can be selected according to actual needs to achieve the objectives of the solution of this embodiment.
[0112] As described above, the above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should be covered within 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 a spectral signal data set at each position, the spectral signal data set includes several spectral channels, plot the spectral signal data of each spectral channel 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 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; Through the flow velocity change value, pressure change value and spectral signal quality index change value in the same time interval, a multinomial regression model of the flow velocity change value and the spectral signal quality index change value, as well as the pressure change value and the spectral signal quality index change value is fitted: Among them, ΔSQI V , ΔSQI P They represent the change values of the spectral signal quality index corresponding to the flow rate V and pressure P, respectively. Δ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, ε1 and ε2 are error terms; The spectral quality influence coefficient of each position is calculated using the predicted value of each model: 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 index 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 values, μ P represents the mean of the predicted value of the pressure model, σ is the correction parameter, 0<σ<<1; 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: The spectral signal data of each spectral channel is plotted into a spectrum graph using spectral analysis software, and the spectral signal of each spectral channel corresponds to a spectrum 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 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.
7. A method for measuring the water content of crude oil according to claim 6, 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 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; 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.
8. A crude oil water content measurement system, used to implement the method according to any one of claims 1 to 7, 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, the spectral signal data set includes several spectral channels, draws 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 in combination with the signal-to-noise ratio of the spectrum. The spectrum quality impact analysis module fits the multinomial regression model between the flow velocity change value and the spectrum signal quality index change value, and the pressure change value and the spectrum signal quality index change value through the flow velocity change value, pressure change value and spectrum signal quality index change value in the same time interval: Among them, ΔSQI V , ΔSQI P They represent the change values of the spectral signal quality index corresponding to the flow rate V and pressure P, respectively. Δ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, ε1 and ε2 are error terms; The spectral quality influence coefficient of each position is calculated using the predicted value of each model: 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 index 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 values, μ P represents the mean of the predicted value of the pressure model, σ is the correction parameter, 0<σ<<1; 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