This patent application claims the benefit and priority of Chinese Patent Application No. 202311028017.3, filed with the China National Intellectual Property Administration on Aug. 16, 2023, the disclosure of which is incorporated by reference herein in its entirety as part of the present application.
The present disclosure relates to the technical field of gas detection, and in particular, to a method for analyzing aliased spectra of alkane gases.
Some important components, such as C3H8 and C4H10, in liquefied petroleum gas are colorless, flammable, and combustible. C3H8 and C4H10 are gathered in a hollow due to large densities thereof so as to form a high concentration gathering area prone to explosion. Therefore, it is highly necessary to detect the concentrations of C3H8 and C4H10 in a petroleum storage site.
At the present stage, the concentrations of gases are mainly detected by chemical sensors in a petroleum industry site. However, traditional chemical sensors are limited to particular detection elements and are susceptible to a temperature and a humidity of an external environment. Such traditional chemical sensors may usually have low detection accuracy and need to be frequently replaced. To avoid this problem, patent No. 201610896383.4 discloses a dual-optical-path modulation detection method in infrared spectroscopy gas logging that utilizes characteristic absorption of gas molecules within a range of a certain wave band to analyze and identify categories of gases and predicts a concentration of a gas to be measured based on an absorption spectral intensity. In combination with a long-optical path gas absorption cell technique, system stability can be well improved by using an alternate flow type gas circuit modulation technique. However, organic compounds such as C3H8 and C4H10 have complex molecule structures, and there is a high probability that infrared absorption spectra formed by rotation of molecular functional functions and vibration of chemical bonds will be superposed with one another, resulting in a widened characteristic absorption spectrum of molecules. The occurrence of continuous wide-spectrum absorption characteristics within a certain range may have a direct impact on a measurement result, resulting in reduced accuracy of a detection result.
To avoid and overcome the technical problems in the prior art, the present disclosure provides a method for analyzing aliased spectra of alkane gases. The present disclosure can allow for demodulation of aliased spectra of C3H8 and C4H10 so as to accurately obtain the gas concentration information of each component of the mixed gas.
In order to achieve the above objective, the present disclosure provides the following technical solution:
A method for analyzing aliased spectra of alkane gases includes the following steps:
As a further solution of the present disclosure, the specified gases may include a single gas C3H8, a single gas C4H10 and a mixed gas of the single gas C3H8 and the single gas C4H10 in a set ratio; and the threshold A0 may be 0.4.
As a further solution of the present disclosure, step S1 includes the following specific steps:
As a further solution of the present disclosure, the low concentration prediction model and the high concentration prediction model are each established by partial least squares regression.
As a further solution of the present disclosure, when the low concentration prediction model is established using partial least squares, a second harmonic signal is used as an independent variable and a low concentration independent variable matrix X1n×m is established, where n represents a number of samples; m represents a number of feature points, namely types of triangular scanning signal wavelengths; and with a gas concentration as a dependent variable, a dependent variable matrix Y1n×p is established, where p represents a category of a gas concentration.
As a further solution of the present disclosure, when the high concentration prediction model is established using partial least squares, an absorbance is used as an independent variable and a high concentration independent variable matrix X2n×m is established, where n represents a number of samples; m represents a number of feature points, namely types of triangular scanning signal wavelengths; and a gas concentration is used as a dependent variable and a dependent variable matrix Y2n×p is established, where p represents a category of a gas concentration.
As a further solution of the present disclosure, a calculation formula for the absorbance of a gas with a known gas concentration is as follows:
where A1 represents the absorbance of the gas with the known gas concentration; v represents a wave number of an absorption line spectrum; S(T) represents a line intensity corresponding to a gas temperature of T; C represents the gas concentration; p represents a total pressure of the gas; φ(v) represents a linear absorption function of integral area normalization; and L represents the optical path of the absorption cell.
As a further solution of the present disclosure:
As a further solution of the present disclosure, a second harmonic signal is produced by the following process: a triangular scanning signal is emitted from the incident end of the absorption cell into the absorption cell to be absorbed by a gas, and then received and converted by a photoelectric detector integrated at an exit end of the absorption cell into an electric signal, and finally, the electric signal is demodulated by a lock-in amplifier to output the corresponding second harmonic signal.
As a further solution of the present disclosure, the absorbance peak of the gas to be measured is obtained by the following process: an infrared laser, used as a triangular scanning signal, is emitted from the incident end of the absorption cell into the absorption cell to be absorbed by a gas, and then received and converted by the photoelectric detector integrated at the exit end of the absorption cell into an infrared spectrum, and finally, the corresponding absorbance peak is obtained from the infrared spectrum.
Compared with the prior art, beneficial effects of the present disclosure are as follows:
1. The present disclosure can allow for demodulation of aliased spectra of the single gas C3H8 and the single gas C4H10 so as to accurately obtain the gas concentration information of each component of the mixed gas. The present method covers a wide measuring span. After compartmental modeling, the single gas C3H8 in a concentration range of 0.8%-100% LEL and the single gas C4H10 in a concentration range of 0.9%-100% LEL can be accurately measured. The requirement of online monitoring on a plurality of gases in a petroleum industry site can be met.
2. The present disclosure accomplishes simultaneous online monitoring of the single gas C3H8 and the single gas C4H10 of petroleum volatile gases. The demodulation of the aliased absorption spectra of the single gas C3H8 and the single gas C4H10 can be completed by partial least squares regression. By piecewise switching the concentration prediction models, the concentration prediction model established based on a second harmonic signal and a triangular scanning signal is used at a low concentration with an absorbance of less than 0.4. At a high concentration with an absorbance of greater than 0.4, the concentration prediction model established based on ab absorbance signal is used. Thus, the influences of a light intensity baseline drift and nonlinearity of the second harmonic signal are reduced.
List of Reference Numerals: 1—signal generator; 2—driver board; 3—distributed feedback laser device; 4—absorption cell; 5—photoelectric detector; 6—lock-in amplifier; and 7—display.
The technical solutions of the embodiments of the present disclosure are clearly and completely described below with reference to the drawings in the embodiments of the present disclosure. Apparently, the described embodiments are merely a part rather than all of the embodiments of the present disclosure. All other embodiments derived from the embodiments in the present disclosure by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present disclosure.
The experimental system is as shown in
PLS is a novel multivariate data analysis method that is compatible with the characteristics of principal component regression and linear regression, can effectively process multiple correlations of data, and can fully extract features of an independent variable and a dependent variable with a finite number of samples to obtain a regression coefficient matrix.
When a concentration prediction model is established, it is assumed that there is a total of n groups of samples; X represents a spectral data matrix n×p including p feature points, and p feature points refer to p second harmonic signals produced corresponding to p different wavelengths. Y represents a gas concentration matrix n×q including q dependent variables. By partial least squares regression, a principal component t1 is extracted in X and a principal component u1 is extracted in Y. Regressions of X to t1 and Y to u1 are then ascertained separately. Subsequently, a second round of component extraction is carried out with residual information after X being explained by t1 and residual information after Y being explained by u1. It is repeated in this way until acceptable accuracy is reached. If m principal components t1, t2, . . . , tm are ultimately extracted for X, by partial least squares regression, regressions of yk to t1, t2, . . . , tm are expressed as regression equations of yk with respect to original variables X1, X2, . . . , Xm, where k=1, 2, . . . , q.
The extracted m principal components form matrices W and U, respectively, and X and Y may be written as:
X=WP
T
Y=UQ
T
P is an orthogonal matrix of X, and Q is an orthogonal matrix of Y; dimensions of the matrices W and Q are q×m; and dimension of the matrices P and U are p×m. W, U, P, and Q may be all calculated by a nonlinear iterative partial least squares algorithm, and a regression coefficient matrix is calculated by linear regression:
B
PLS=(WTW)−1WTU
A spectral data matrix Xnew of a gas to be measured with any gas concentration is acquired, and the gas concentration Ynew thereof is calculated with the known regression coefficient matrix BPLS:
Y
new
=X
new
PB
PLS
Q
T
To preliminarily verify the feasibility of the PLS algorithm for predicting the concentrations of the C3H8 and C4H10 gases, prediction at a low concentration is carried out for pure C3H8 gas and pure C4H10 gas separately.
The PLS algorithm is utilized to perform regression modeling on the second harmonic signal data and the gas concentration data of C3H8 and C4H10. A training set is formed by standard gas concentrations within a range of 100 ppmv to 2,000 ppmv, with a step change concentration of 100 ppmv. That is, by the concentrations of 100 ppmv, 200 ppmv, 300 ppmv, . . . , 2,000 ppmv, there are a total of 20 sets of standard gas concentration data. Each set of data records a total of 900 feature points of the second harmonic signals thereof. That is, the independent variable matrix X is 20×900 and the dependent variable matrix Y is 20×1, which are concentrations corresponding to the groups of spectra. During modeling, an optimal number of principal components extracted is selected according to cross effectiveness, and finally, the determined gas concentration prediction model is utilized to perform regression calculation separately on pure C3H8 and pure C4H10 with known concentrations. The calculation results for pure C3H8 are as shown in
The volatile components of petroleum products produced in various places are complex and different from one another, but mainly contain C3H8 and C4H10. Therefore, it is necessary to detect the concentration of each component gas of a mixed gas of both. After the prediction capability of the ns algorithm for the concentrations of the pure C3H8 gas and the pure C4H10 gas is preliminarily verified, the working performance of the established concentration prediction model under the mutual influence of the mixed gas of both needs to be considered. When a single gas is measured, the output wavelength of the laser device may be tuned separately to cover the absorption centers of C3H8 and C4H10. In the mixed gas, limited by the tuning range of the laser device and with overall consideration of influencing factors, a modulation fashion of entirely scanning the absorption peaks of C4H10 and partially scanning the absorption peaks of C3H8. The amplitudes of the second harmonic signals demodulated from C3H8 and C4H10 of a same concentration differ by two orders of magnitude, which does not affect the prediction of the respective gas concentration under the condition of a pure gas. However, in the case of the mixed gas, a C4H10 signal of a small amplitude will be drown in a huge change of a C3H8 signal, and a non-negligible pull-down effect is produced on the amplitude of the second harmonic signal of the absorption center of C3H8. Therefore, the separate modeling of second harmonic signal will produce an unacceptable error. Accordingly, it is considered that characteristic absorption information represented by the second harmonic signal is combined with spectral band absorption information represented by a direct absorption signal to act as a feature point for training the concentration prediction model for the mixed gas.
It needs to be noted that in traditional gas measurement of a single absorption peak, the original light intensity of the absorption part is often obtained by a baseline fitting method. In spectral band absorption of a macromolecular alkane gas, the light intensity baseline obtained by fitting is often wrong due to the absorption effect of the whole scanning range. For this, N2 needs to be bubbled for 5 minutes before each experiment, and an average triangular scanning signal after 32 experiments is taken as the basic light intensity, i.e., the light intensity baseline. Thus, the direct absorption signal of each group of mixed gas is obtained. To improve the prediction accuracy of the model, two groups of parallel experiments of low concentrations 100-800 ppmv and high concentrations 2,000-10,000 ppmv are set.
Prediction groups of the two groups of experiments are set in combination with the contents of both gases in actual oil gas volatiles, and cases in which C3H8 and C4H10 are mixed in different ratios are taken into consideration. The model obtained by mixed gas training has good prediction accuracy for both gases under the conditions of mixing C3H8 and C4H10 in ratios of 1:0, 0:1, 1:1, 2:1, and 1:2. In low concentration groups, the relevant coefficient R2 is 0.9985 and 0.9969 for C3H8 and C4H10, respectively, and the maximum absolute errors of prediction are 34 ppmv and 51 ppmv, respectively. In high concentration groups, the relevant coefficient R2 is 0.9999 for both C3H8 and C4H10, and the maximum absolute errors are 64 ppmv and 148 ppmv. The prescribed lower explosive limit (LEL) in the industry is 2.1% and 1.9% for C3H8 and C4H10, respectively. The above concentration prediction model not only can detect a low-concentration mixed gas of C3H8 0.8% LEL (168 ppmv) and C4H10 0.9% LEL (171 ppmv), but also has the prediction errors of less than 3% LEL at high concentrations, which meets the requirement of production safety.
In order to further verify the dynamic reliability of the established mixed gas concentration prediction model when working continuously, two continuous concentrations tests at high and low concentrations are conducted as well. For the low concentration groups, five groups of sample gases of C3H8 (ppmv)-C4H10 (ppmv) at concentrations of 340-0, 340-340, 680-340, 340-680, and 0-340 are configured by a dynamic gas distributor. For the high concentration groups, five groups of sample gases of C3H8 (ppmv)-C4H10 (ppmv) at concentrations of 3,200-0, 3,200-6,400, 6,400-6,400, 6,400-3,200, and 0-3,200 are configured. Each group of sample gases is blown for 6 minutes to ensure that the whole absorption cell 4 is thoroughly and uniformly full of the gases. Real-time prediction of two mixed gases in the whole process is realized according to the models described above. The prediction results of C3H8 in the low concentration groups are as shown in
The dotted lines in
Due to the broadband absorption spectrum feature of mutual dense superposition of C3H8 and C4H10 over the near-infrared band, it is very difficult to accurately measure the concentrations of both gases on the spot in the oil gas industry. The present disclosure basically solves the technical problem of aliasing interference of broadband spectral lines by performing spectrum scanning in an area of 1685.9-1686.8 nm using a DFB laser, periodically demodulating second harmonic and direct absorption signals, and predicting the concentrations of C3H8 and C4H10 according to characteristic absorption thereof in the area. Real-time measurement of the concentrations of both single gases and the mixed gas is realized. Moreover, regardless of the single gas or the mixed gas, correlations of predicted values and true values of C3H8 and C4H10 are greater than 0.99. Even in the high concentration group of 2,000-10,000 ppmv, the prediction error may still be controlled below 148 ppmv, proving that the established concentration regression model has good prediction accuracy. In dynamic testing, the established prediction models also exhibit good dynamic reliability. The present disclosure provides a feasible and reliable solution for accurate measurement of the concentration of each component of oil gas volatiles, which has promising application expansion prospects and will be verified later in the field of oil and gas pipeline network leakage.
The foregoing are merely descriptions of preferred specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any equivalent replacement or modification made within a technical scope of the present disclosure by a person skilled in the art according to the technical solutions of the present disclosure and inventive concepts thereof shall fall within the protection scope of the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
202311028017.3 | Aug 2023 | CN | national |