Oil and gas two-phase flow gas holdup detection device and method using halogen lamp light source
By combining a halogen lamp light source and a spectrometer with principal component regression, a PCR model for detecting gas content in two-phase oil-gas flow was established. This solved the problems of high cost and low accuracy in optical measurement methods, and achieved efficient and economical gas content detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI AN JIAOTONG UNIV
- Filing Date
- 2024-12-30
- Publication Date
- 2026-06-30
Smart Images

Figure CN122306724A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of oil-gas two-phase flow gas content detection technology, and in particular to an oil-gas two-phase flow gas content detection device and method using a halogen lamp light source. Background Technology
[0002] As industry becomes increasingly sophisticated, gas-liquid two-phase flow is receiving more and more attention. The gaseous flow medium, distributed at the scale of tiny bubbles in the lubricating oil system, will affect the system's operating characteristics and performance. For example, excessive bubbles can reduce the efficiency of the oil pump, leading to insufficient oil supply; the lubricating oil, under the influence of air, will oxidize and deteriorate, resulting in a decline in performance. Problems in the lubricating oil system can lead to damage to critical components and even serious accidents. Therefore, rapid and accurate detection of the gas content in engine lubricating oil is necessary.
[0003] Currently, the main methods for measuring the gas holdup in two-phase flow include the fast-closing valve method, radiation attenuation method, electrical method, optical method, image detection technology, and ultrasonic attenuation method. Among these, existing optical measurement methods suffer from several drawbacks. First, to achieve good light source performance, expensive light sources are used, resulting in high costs and poor economic performance. Second, the use of photoelectric sensors to collect electrical signals or optical imaging methods for detecting the gas holdup in two-phase flow does not fully utilize information at various wavelengths across a wide spectral band, thus failing to effectively eliminate the significant measurement errors introduced by scattering interference.
[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of the present invention, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] To address the shortcomings or defects of the existing technology, a device and method for detecting the gas content of oil-gas two-phase flow using a halogen lamp light source are provided. This method uses a halogen lamp light source to detect the gas content of oil-gas two-phase flow, thereby reducing detection costs and improving economic performance while ensuring detection accuracy.
[0006] The objective of this invention is achieved through the following technical solutions.
[0007] A device for detecting the gas content of an oil-gas two-phase flow using a halogen lamp light source includes,
[0008] Halogen lamp light source,
[0009] A first collimating lens is connected to the halogen lamp light source via a first optical fiber to receive the incident light emitted by the halogen lamp light source.
[0010] The second collimating lens is positioned opposite the first collimating lens at a distance.
[0011] A flow cell is disposed between the first collimating mirror and the second collimating mirror. The flow cell contains an oil-gas two-phase flow to be detected, which includes lubricating oil and air.
[0012] A three-way valve is connected to the flow pool via a pipeline. The flow pool and the three-way valve are connected via a pipeline to form a flow loop. The three-way valve controls the opening and closing of the flow loop to add or extract oil and gas two-phase flow into the flow loop.
[0013] The spectrometer, connected to the second collimating lens via a second optical fiber, receives the emitted light from the oil-gas two-phase flow passing through the flow cell and collects absorbance information of the oil-gas two-phase flow at various wavelengths.
[0014] A computer connected to the spectrometer and capable of calculating and acquiring the gas content of the two-phase flow based on the absorbance information, the computer including a principal component regression unit for establishing a PCR model for detecting the gas content of the two-phase flow to predict the gas content of the two-phase flow.
[0015] In the oil-gas two-phase flow gas content detection device using a halogen lamp light source, the first collimating mirror, the flow cell, and the second collimating mirror are installed and arranged in a straight line along the same optical path.
[0016] In the oil-gas two-phase flow gas content detection device using a halogen lamp light source, the first collimating lens converts the incident light into a parallel light path that covers the light-transmitting surface of the flow cell.
[0017] In the oil-gas two-phase flow gas content detection device using a halogen lamp light source, the first collimating lens is an 84UV collimating lens with a light transmission aperture of 2.5cm.
[0018] In the oil-gas two-phase flow gas content detection device using a halogen lamp light source, the flow cell is a transparent columnar structure made of quartz glass.
[0019] In the oil-gas two-phase flow gas content detection device using a halogen lamp light source, a peristaltic pump is connected to the flow pool via a pipeline to provide power for the flow of the oil-gas two-phase flow.
[0020] In the aforementioned oil-gas two-phase flow gas content detection device utilizing a halogen lamp light source, the halogen lamp light source includes,
[0021] DC power supply
[0022] A halogen lamp, which is connected to the DC power supply and placed in the reflective cavity.
[0023] The method for detecting the gas content in two-phase oil-gas flow using a halogen lamp light source includes the following steps.
[0024] Step 1: Turn on the halogen lamp light source, and inject the prepared oil-gas two-phase fluid to be tested into the pipeline through the three-way valve according to the pre-calibrated gas content.
[0025] Step 2: Turn on the peristaltic pump to uniformly fill the pipeline with the oil-gas two-phase fluid to be tested, turn off the peristaltic pump, connect the first collimating lens to the halogen lamp light source via the first optical fiber to receive the incident light emitted by the halogen lamp light source, and connect the spectrometer to the second collimating lens via the second optical fiber to receive the outgoing light of the oil-gas two-phase flow passing through the flow cell. Record the spectral information in the computer using the spectrometer.
[0026] Step 3: Repeat steps 1 and 2 until the spectral information of all calibrated gas contents is obtained;
[0027] Step 4: Establish a prediction model using the spectral information. Specifically, a PCR model for detecting the gas content of the two-phase flow of oil and gas is established using principal component regression to predict the gas content of the two-phase flow of oil and gas. The PCR model is based on the collected multi-wavelength absorbance information.
[0028] The gas content detection device for two-phase flow of oil and gas using a halogen lamp light source includes a measuring device and a calibration device. The measuring device includes a halogen lamp light source, an optical fiber, a collimating lens, a flow cell, a spectrometer, and a computer. The calibration device includes a peristaltic pump, a three-way valve, and pipelines.
[0029] In the method described, centering, detrending algorithm, SG convolution smoothing, and standard normal variable transformation are used to preprocess the absorbance information at each wavelength point to eliminate noise.
[0030] Compared with the prior art, the beneficial effects of this invention are as follows:
[0031] This invention utilizes Beer-Lambert's law to measure the absorbance of oil-gas two-phase flows at different gas contents using a halogen lamp light source. A PCR model for detecting the gas content of oil-gas two-phase flows is established using multi-wavelength absorbance information to ensure detection accuracy. Using a halogen lamp light source for detecting the gas content of oil-gas two-phase flows can significantly reduce the cost of the detection light source and improve the economic performance of the detection.
[0032] The description provided is merely an overview of the technical solution of this invention. In order to make the technical means of this invention clearer and more understandable, so that those skilled in the art can implement it according to the contents of the specification, and to make the described and other objects, features and advantages of this invention more obvious and understandable, specific embodiments of this invention are described below. Attached Figure Description
[0033] Various other advantages and benefits of the present invention will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiments below. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. Furthermore, the same reference numerals denote the same parts throughout the drawings.
[0034] In the attached diagram:
[0035] Figure 1 This is a schematic diagram of the structure of a gas content detection device for two-phase oil-gas flow using a halogen lamp light source according to the present invention.
[0036] Figure 2 This is a schematic diagram of the structure of the halogen light source of the present invention;
[0037] Figure 3 This is a schematic diagram of the structure of the halogen lamp of the present invention;
[0038] Figure 4 The absorption spectra are for the following conditions in Example 1 of the present invention: the gas content of the oil-gas two-phase flow is 0.9%, 1.5%, 2.1%, 2.7%, 3.3%, 3.9%, and 4.5%.
[0039] Figure 5 This is a diagram showing the optimal detection result of the gas content of the oil and gas two-phase flow obtained from the partial principal component regression model in Embodiment 1 of the present invention.
[0040] The present invention will be further explained below with reference to the accompanying drawings and embodiments. Detailed Implementation
[0041] Specific embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While specific embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the invention and to fully convey the scope of the invention to those skilled in the art.
[0042] It should be noted that certain terms are used in the specification and claims to refer to specific components. Those skilled in the art will understand that different terms may be used to refer to the same component. This specification and claims do not distinguish components based on differences in terminology, but rather on differences in function. The terms "comprising" or "including" used throughout the specification and claims are open-ended and should be interpreted as "comprising but not limited to." The following descriptions are preferred embodiments for carrying out the invention; however, these descriptions are for the purpose of understanding the general principles of the specification and are not intended to limit the scope of the invention. The scope of protection of this invention is determined by the appended claims.
[0043] To facilitate understanding of the embodiments of the present invention, the following will provide further explanation and description with reference to the accompanying drawings and several specific embodiments, and the accompanying drawings do not constitute a limitation on the embodiments of the present invention.
[0044] To better understand, such as Figures 1 to 5 As shown, a gas content detection device for oil-gas two-phase flow using a halogen lamp light source includes,
[0045] Halogen lamp light source 1,
[0046] The first collimating lens 3a is connected to the halogen lamp light source 1 via the first optical fiber 2a to receive the incident light emitted by the halogen lamp light source 1.
[0047] The second collimating lens 3b is positioned opposite the first collimating lens 3a at a distance.
[0048] A flow cell 4 is disposed between the first collimating mirror 3a and the second collimating mirror 3b. The flow cell 4 contains an oil-gas two-phase flow to be detected, which includes lubricating oil and air.
[0049] The three-way valve 5 is connected to the flow pool 4 via the pipeline 7. The flow pool 4 and the three-way valve 5 are connected via the pipeline 7 to form a flow loop. The three-way valve 5 controls the opening and closing of the flow loop to add or extract oil and gas two-phase flow into the flow loop.
[0050] The spectrometer 8 is connected to the second collimating lens 3b via the second optical fiber 2b to receive the emitted light from the oil-gas two-phase flow passing through the flow cell 4, and to collect the absorbance information of the oil-gas two-phase flow at various wavelengths.
[0051] Computer 9, which is connected to the spectrometer 8 and calculates and obtains the gas content of the two-phase flow based on the absorbance information, includes a principal component regression unit for establishing a PCR model for detecting the gas content of the two-phase flow to predict the gas content of the two-phase flow.
[0052] In a preferred embodiment of the oil-gas two-phase flow gas content detection device using a halogen lamp light source, the first collimating mirror 3a, the flow cell 4, and the second collimating mirror 3b are installed and arranged in a straight line along the same optical path.
[0053] In a preferred embodiment of the oil-gas two-phase flow gas content detection device using a halogen lamp light source, the first collimating lens 3a converts the incident light into a parallel light path that covers the light-transmitting surface of the flow cell 4.
[0054] In a preferred embodiment of the oil-gas two-phase flow gas content detection device using a halogen lamp light source, the first collimating lens 3a is an 84UV collimating lens with a light transmission aperture of 2.5cm.
[0055] In a preferred embodiment of the oil-gas two-phase flow gas content detection device using a halogen lamp light source, the flow cell 4 is a transparent columnar structure made of quartz glass.
[0056] In a preferred embodiment of the oil-gas two-phase flow gas content detection device using a halogen lamp light source, the peristaltic pump 6 is connected to the flow tank 4 via a pipeline 7 to provide power for the oil-gas two-phase flow.
[0057] In a preferred embodiment of the oil-gas two-phase flow gas content detection device using a halogen lamp light source, the halogen lamp light source 1 includes,
[0058] DC power supply
[0059] A halogen lamp 1a is connected to the DC power supply and placed in the reflective cavity.
[0060] The method for detecting the gas content in an oil-gas two-phase flow using a halogen lamp 1a light source includes the following steps.
[0061] Step 1: Turn on the halogen lamp light source 1, and inject the prepared oil-gas two-phase fluid to be tested into the pipeline 7 through the three-way valve 5 according to the pre-calibrated gas content.
[0062] Step 2: Turn on the peristaltic pump 6 to uniformly fill the pipeline 7 with the oil-gas two-phase fluid to be tested, turn off the peristaltic pump 6, connect the first collimating lens 3a to the halogen lamp light source 1 via the first optical fiber 2a to receive the incident light emitted by the halogen lamp light source 1, and connect the spectrometer 8 to the second collimating lens 3b via the second optical fiber 2b to receive the outgoing light of the oil-gas two-phase flow passing through the flow cell 4. Record the spectral information in the computer 9 through the spectrometer 8.
[0063] Step 3: Repeat steps 1 and 2 until the spectral information of all calibrated gas contents is obtained;
[0064] Step 4: Establish a prediction model using the spectral information. Specifically, a PCR model for detecting the gas content of the two-phase flow of oil and gas is established using principal component regression to predict the gas content of the two-phase flow of oil and gas. The PCR model is based on the collected multi-wavelength absorbance information.
[0065] The gas content detection device for two-phase flow of oil and gas using a halogen lamp light source includes a measuring device and a calibration device. The measuring device includes a halogen lamp light source, an optical fiber, a collimating lens, a flow cell, a spectrometer, and a computer. The calibration device includes a peristaltic pump, a three-way valve, and pipelines.
[0066] In a preferred embodiment of the method, principal component regression is used to process the absorbance information of oil and gas two-phase flow at multiple wavelengths under different gas contents, and a linear model of gas contents and absorbance at multiple wavelengths is established to predict the gas contents of oil and gas two-phase flow.
[0067] In a preferred embodiment of the method, the absorbance information at each wavelength point is preprocessed using centering, detrending algorithm, SG convolution smoothing, and standard normal variable transformation to eliminate noise.
[0068] In one embodiment, the device for detecting the gas content of an oil-gas two-phase flow using a halogen lamp light source includes a computer 9, and further includes: a halogen lamp light source 1, a spectrometer 8, a first optical fiber 2a, a second optical fiber 2b, a flow cell 4, and a pipeline 7; wherein the halogen lamp light source 1 transmits light through the flow cell 4 via the first optical fiber 2a, the spectrometer 8 receives the light signal via the second optical fiber 2b and analyzes it in the computer 9 to obtain absorbance information and thereby obtain the gas content of the oil-gas two-phase flow to be measured; the oil-gas two-phase fluid to be measured exists in the pipeline 7 and the flow cell 4, which is used to form a flow loop for the oil-gas two-phase flow; the first optical fiber 2a, the second optical fiber 2b, and the flow cell 4 are installed in a straight line along the same optical path, so as to transmit the continuous incident light emitted by the halogen lamp light source 1 to the oil-gas two-phase flow in the flow cell. It also includes a first collimating lens 3a, installed at the end of the first optical fiber 2a. The distance between the first collimating lens 3a and the adjacent interface of the flow cell 4 ranges from 0 to 10 mm. It is used to convert the optical path into a parallel optical path and cover the light-transmitting surface of the flow cell to ensure that the spectrometer 8 obtains an accurate spectral signal. It also includes a three-way valve 5, which is connected between the pipes 7 and is used to add or remove lubricating oil to the flow circuit. It also includes a peristaltic pump 6, with one end of the pipe 7 installed inside the peristaltic pump 6. It is used to provide power for the flow of the oil-gas two-phase flow to be tested and to ensure that the oil-gas two-phase flow to be tested uniformly fills the entire flow circuit.
[0069] In one embodiment, the halogen lamp 1a uses a quartz glass shell 1e, which is filled with a rare gas 1d and a halogen tungsten filament 1f. The halogen lamp light source 1 can emit continuous visible light in the wavelength range of 400nm-700nm.
[0070] This invention provides a method for detecting the gas content of an oil-gas two-phase flow using a halogen lamp light source, comprising the following steps:
[0071] Step 1: Turn on the halogen lamp light source 1, and inject the prepared oil-gas two-phase fluid to be tested into the pipeline 7 through the three-way valve 5 according to the pre-calibrated gas content.
[0072] Step 2: Turn on the peristaltic pump 6, wait five minutes to allow the oil and gas two-phase fluid to be tested to uniformly fill the pipeline 7, turn off the peristaltic pump 6, and record the spectral information in the computer 9 using the spectrometer 8;
[0073] Step 3: Repeat steps 1 and 2 until the spectral information of all calibrated gas contents is obtained;
[0074] Step 4: Build a prediction model using the measured spectral information.
[0075] In step four, a PCR model for detecting the gas content of two-phase flow of oil and gas is established using principal component regression. The absorbance information collected in this invention at multiple wavelengths is used for modeling. This absorbance information has the characteristics of a small number of samples and independent variables exceeding the number of samples. The PCR model is suitable for situations where the number of independent variables far exceeds the number of samples or where there is multicollinearity among the independent variables. Compared with other methods, the PCR model has significant advantages in handling high-dimensional data and complex regression problems, and usually has higher stability and predictive performance. Thus, the PCR model can obtain more accurate prediction results.
[0076] The gas content detection device for two-phase flow of oil and gas using a halogen lamp light source includes a measuring device and a calibration device. The measuring device includes a halogen lamp light source, an optical fiber, a collimating lens, a flow cell, a spectrometer, and a computer. The calibration device includes a peristaltic pump, a three-way valve, and pipelines.
[0077] The detection principle of this invention is: the theoretical basis for the application of spectral detection technology to the measurement of gas content in two-phase flow of oil and gas is the Beer-Lambert law.
[0078]
[0079] In the formula: : The absorbance of the substance to be measured at a wavelength; : Emitted light intensity / cd; Incident light intensity / cd; Absorption coefficient; Light absorption thickness / mm; : The content of light-absorbing substances.
[0080] The absorption coefficient is related to the wavelength of the incident light and the properties of the absorbing substance. However, under the same conditions, the absorption coefficient remains constant even with different concentrations of the same substance. Therefore, under identical external conditions, the absorbance of the same substance is directly proportional to its concentration.
[0081] In this process, the oil and gas in the two-phase flow to be tested selectively absorb at different wavelengths. The absorbance of the two-phase flow to be tested at different wavelengths can be calculated by using the intensity of the emitted light at each wavelength received by the spectrometer. The gas content of the two-phase flow to be tested can be determined by establishing a PCR model for detecting the gas content of the two-phase flow to be tested using the absorbance information at multiple wavelengths.
[0082] In a specific implementation, as a preferred embodiment of the present invention, the DC power supply 1b supplies power to the halogen lamp light source 1a and places the halogen lamp light source 1a in the reflecting cavity 1c to improve the uniformity of continuous light emitted by the halogen lamp light source 1a.
[0083] In a preferred embodiment of the present invention, the halogen lamp light source 1a emits continuous visible light in the wavelength range of 420nm-750nm, with a rated operating voltage of 6V and a rated power of 12W; the DC power supply 1b provides constant voltage power, set to 6V to power the halogen lamp light source 1a; the reflective cavity 1c is a cylinder with a length of 175mm, a cross-sectional outer diameter of 126mm, and a cavity thickness of 3mm. It is made entirely of glass and uses a surface silver plating technique.
[0084] In specific implementation, as a preferred embodiment of the present invention, such as Figure 1 As shown, a halogen lamp light source 1 emits continuous visible light, which is input from the first optical fiber 2a and then transmitted through the first collimating lens 3a to the oil-gas two-phase flow in the flow cell 4. The oil-gas two-phase flow in the flow cell 4 receives the continuous visible light and absorbs the input light. The emitted light after absorption by the oil-gas two-phase flow is transmitted through the second optical fiber 2b to the spectrometer 8. The spectrometer 8 collects absorbance information at each wavelength and transmits it to the computer 9. The computer 9 obtains absorbance information at multiple wavelengths of the oil-gas two-phase flow under different gas contents.
[0085] In a specific implementation, as a preferred embodiment of the present invention, the principal component regression method is used to process the absorbance information of multiple wavelength points of the oil-gas two-phase flow under different gas contents, and a nonlinear model of gas contents and absorbance at multiple wavelength points is established. This model is then used to predict the gas contents of the oil-gas two-phase flow.
[0086] Furthermore, the gas content prediction performance of the constructed principal component regression linear model was evaluated using the following indicators: coefficient of determination R0 2The closer the value is to 1, the better the regression or prediction results of the model; the smaller the root-mean-square error of prediction (RMSEP), the better the predictive ability of the model; the smaller the maximum absolute error (MAE), the smaller the outlier the model's prediction results and the higher the prediction accuracy; the mean relative error (MRE) ranges from 0 to 1, and the smaller the value, the higher the prediction accuracy.
[0087] In one embodiment, a light source is connected to one side of the optical fiber, and a collimating lens is connected to the other side. A spectrometer is also connected to one side of the optical fiber, and the collimating lens is connected to the other side. One end of the spectrometer is connected to the optical fiber, and the other end is connected to a computer for spectral data reading. During operation, the light source is turned on, and the computer records the spectral data under different gas content conditions detected by the spectrometer and performs modeling and prediction. The calibration device is a circulation loop consisting of a peristaltic pump, a three-way valve, and pipelines. During operation, the prepared oil-gas two-phase flow is introduced into the pipeline through the three-way valve, and the peristaltic pump is turned on to uniformly fill the entire loop. After the gas content spectral data is recorded, a fixed amount of oil phase is added or removed through the three-way valve to achieve the calibration effect.
[0088] Example 1
[0089] (1) Preparation: Prepare 37 groups of two-phase oil-gas lubricating oil with a gas content range of 0.9%-4.5% and an interval of 0.1%; set the peristaltic pump 6 speed to 200 rpm.
[0090] (2) Start-up experiment: Inject the pre-prepared two-phase lubricating oil into the flow circuit through the three-way valve 5, fix the flow pool 4, turn on the peristaltic pump 6, and turn on the halogen lamp light source 1.
[0091] (3) Data acquisition: The absorption spectrum information after passing through the flow cell 4 was acquired using the spectrometer 8, and the absorbance information at each wavelength point of the oil and gas two-phase flow was obtained in 37 sets and saved to the computer 9. Figure 4 The above are absorption spectra characterization diagrams for the two-phase flow of oil and gas with gas content of 0.9%, 1.5%, 2.1%, 2.7%, 3.3%, 3.9%, and 4.5% in Example 1 of the present invention.
[0092] (4) Model establishment: Principal component regression model is established using absorbance information obtained by computer 9.
[0093] Furthermore, the Venetian blind classification method was used to classify the 37 sets of sample data into calibration and test sets, and the ratio of the number of samples in the training set to the number of samples in the test set was determined to be 1:1.
[0094] Furthermore, different preprocessing methods were used to preprocess the absorbance data of the original spectra to eliminate noise that might affect the modeling results. Methods such as centering, autoscaling, detrend algorithm, SG convolution smoothing, and standard normal variable transformation (SNV) were selected for data preprocessing.
[0095] Furthermore, principal component regression was selected, and cross-validation was used to determine the number of latent variables, establishing a one-to-one mapping relationship between wavelength variables and gas content in the two-phase flow of oil and gas.
[0096] (5) Experimental results:
[0097] Table 1 shows the gas content of the two-phase flow of oil and gas obtained from the principal component regression model under different pretreatment methods.
[0098] Table 1:
[0099]
[0100] Table 1 shows that when predicting the gas holdup of a two-phase flow of oil and gas using a halogen lamp light source, the principal component regression model established using the centering preprocessing method yields the optimal results. Its coefficient of determination R0 is... 2 The root mean square error (RMSEP) for the test set prediction was 0.9911, the maximum absolute error (MAE) was 0.0589, and the mean relative error (MRE) was 1.85%. The detection results are as follows: Figure 5 As shown.
[0101] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.
[0102] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A method for detecting the gas content in an oil-gas two-phase flow using a halogen lamp light source, characterized in that, It includes the following steps, Step 1: Turn on the halogen lamp light source, and inject the prepared oil-gas two-phase fluid to be tested into the pipeline through the three-way valve according to the pre-calibrated gas content. Step 2: Turn on the peristaltic pump to uniformly fill the pipeline with the oil-gas two-phase fluid to be tested, turn off the peristaltic pump, connect the first collimating lens to the halogen lamp light source via the first optical fiber to receive the incident light emitted by the halogen lamp light source, and connect the spectrometer to the second collimating lens via the second optical fiber to receive the outgoing light of the oil-gas two-phase flow passing through the flow cell. Record the spectral information in the computer using the spectrometer. Step 3: Repeat steps 1 and 2 until the spectral information of all calibrated gas contents is obtained; Step 4: Establish a prediction model using the spectral information. Specifically, a PCR model for detecting the gas content of the two-phase flow of oil and gas is established using principal component regression to predict the gas content of the two-phase flow of oil and gas. The PCR model is based on the collected multi-wavelength absorbance information.
2. The method as described in claim 1, characterized in that, Preferably, principal component regression is used to process the absorbance information of oil and gas two-phase flow at multiple wavelengths under different gas contents, and a linear model of gas contents and absorbance at multiple wavelengths is established to predict the gas contents of oil and gas two-phase flow.
3. The method as described in claim 1, characterized in that, To eliminate noise, the absorbance information at each wavelength point is preprocessed using a centering algorithm, detrending algorithm, SG convolution smoothing, and standard normal variable transformation.
4. A device for detecting the gas content of an oil-gas two-phase flow using a halogen lamp light source, characterized in that, It includes, Halogen lamp light source, First collimating lens, Second collimating lens, A flow cell is disposed between the first collimating mirror and the second collimating mirror. The flow cell contains an oil-gas two-phase flow to be detected, which includes lubricating oil and air. A three-way valve is connected to the flow pool via a pipeline. The flow pool and the three-way valve are connected via a pipeline to form a flow loop. The three-way valve controls the opening and closing of the flow loop to add or extract oil and gas two-phase flow into the flow loop. The spectrometer receives the emitted light from the oil-gas two-phase flow through the flow cell and collects the absorbance information of the oil-gas two-phase flow at various wavelengths. A computer connected to the spectrometer and calculating and acquiring the gas content of the two-phase flow based on the absorbance information, the computer including a principal component regression unit for establishing a principal component regression (PCR) model to predict the gas content of the two-phase flow.
5. The oil-gas two-phase flow gas content detection device using a halogen lamp light source as described in claim 4, characterized in that, The first collimating lens, the flow cell, and the second collimating lens are installed and arranged in a straight line along the same optical path.
6. The oil-gas two-phase flow gas content detection device using a halogen lamp light source as described in claim 4, characterized in that, The first collimating lens converts the incident light into a parallel light path that covers the light-transmitting surface of the flow cell.
7. The oil-gas two-phase flow gas content detection device using a halogen lamp light source as described in claim 1, characterized in that, The aperture of the first collimating lens is 2.5 cm.