A method for determining ethanol content in gasoline

Through near-infrared spectroscopy technology and difference spectrum processing, combined with multiple regression analysis, a correlation model was established, which solved the problem of slow speed and poor accuracy in measuring ethanol content in gasoline in the prior art, and achieved rapid and accurate determination of ethanol content.

CN114166792BActive Publication Date: 2025-03-11CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011167139.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-09-11
Filing Date
2020-10-28
Publication Date
2025-03-11
Estimated Expiration
2040-10-28

AI Technical Summary

Technical Problem

When determining the ethanol content in gasoline, the analysis speed is slow, the accuracy is low, and the repeatability is poor, making it difficult to meet the needs of fast and accurate detection.

Method used

Near-infrared spectroscopy technology combined with difference spectrum processing and multivariate regression analysis to establish a correlation model, and the ethanol content in gasoline is quickly determined through the correlation between the difference spectrum of the near-infrared spectroscopy and the difference in ethanol content.

Benefits of technology

It realizes the determination of ethanol content in fast analysis speed, accurate testing and good repeatability, and is suitable for the rapid determination of ethanol content in ethanol gasoline.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114166792B_ABST
    Figure CN114166792B_ABST
Patent Text Reader

Abstract

The present invention proposes a method for determining the ethanol content in gasoline, comprising the following steps: (1) obtaining a near infrared spectrum of a gasoline sample with a known ethanol content, and establishing a calibration set and an optional verification set; (2) obtaining a difference spectrum of the near infrared spectrum of the calibration set and a difference value of the ethanol content corresponding to the difference spectrum by the same difference subtraction method; (3) establishing a correlation model between the difference spectrum of the near infrared spectrum of the calibration set and the difference value of the ethanol content; (4) determining the near infrared spectrum of the gasoline sample to be tested, finding the spectrum closest to the gasoline sample to be tested from the calibration set, calculating the difference spectrum between the two, calculating the difference value of the ethanol content corresponding to the difference spectrum by the correlation model in step (3), and adding the difference value to the ethanol content value of the gasoline sample corresponding to the closest spectrum to obtain the ethanol content of the gasoline to be tested. The method of the present invention has fast analysis speed, accurate test, good repeatability, and is suitable for rapid determination of the ethanol content in ethanol gasoline.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for measuring the ethanol content in gasoline, in particular to a method for measuring the ethanol content in gasoline by utilizing near infrared spectroscopy. Background Art

[0002] In recent years, due to the increasing scarcity of oil resources, the rising international oil prices and the increasing awareness of environmental protection, the use of traditional petroleum fuels such as gasoline and diesel is facing great challenges. The society urgently needs to find a new type of clean fuel to replace fossil fuels. Ethanol gasoline is a new type of automobile fuel mixed with an appropriate amount of fuel ethanol in ordinary gasoline. Due to its advantages such as high octane number and low combustion pollution, ethanol gasoline containing 5% to 20% ethanol has been widely used in the United States, Brazil, Europe and other countries, and is sold in large quantities on the market. The use of ethanol gasoline can better alleviate the demand for petroleum fuels.

[0003] my country has also begun to promote the use of ethanol gasoline. The national standard requires that the ethanol content in ethanol gasoline be 10±0.5%. This is because when the ethanol content is too high, acetic acid will be produced during the combustion process, which is easy to corrode the engine. When the ethanol content is too low, the purpose of energy conservation and emission reduction cannot be achieved. The amount of ethanol content determines the quality of ethanol gasoline and also has a significant impact on the performance of the engine. Therefore, accurate and rapid detection of the ethanol content in ethanol gasoline has become a hot topic.

[0004] Near infrared spectroscopy has the advantages of fast analysis rate, high precision and simple operation, and is very suitable for quantitative and qualitative analysis of crude oil and oil products. The use of near infrared spectroscopy combined with chemometric methods to predict the ethanol content in ethanol gasoline can achieve relatively ideal results.

[0005] In his paper “Study on Near-infrared Spectroscopic Detection of Ethanol Gasoline Content” (Laser & Infrared, 2012, 42(8): 901-904), Ouyang Aiguo used PCA in the spectral range of 1840-2030nm to accurately classify ethanol gasoline and finished gasoline; PLS was used in the spectral range of 1400-2200nm to accurately measure the ethanol content in ethanol gasoline, and its standard error of cross validation (SECV) was 1.35% (%, V / V), which can meet the actual detection needs of most ethanol gasoline production companies.

[0006] In the article "Detection of Ethanol Content in Ethanol Gasoline by Mid-Infrared Spectroscopy" (China Optics, 2017, 10(6): 752-759), Ouyang Aiguo used mid-infrared spectroscopy to quantitatively analyze the spectral data of ethanol gasoline collected. ELM, LSSVM, and PLS were used to establish a prediction model for the ethanol content in ethanol gasoline. By comparing the prediction capabilities of the three modeling methods for ethanol content, it was found that the PLS method had higher accuracy than the other two methods. Model determination factor R 2 It is 0.958, and the prediction mean square error RMSEP is 1.479% (V / V, volume ratio).

[0007] In the article “Simultaneous determination of methanol and ethanol in gasoline using NIR spectroscopy: Effect of gasoline composition”. {Talanta, 2008, 75(3)804-810}, Fernandes HL et al. used near infrared spectroscopy to analyze the collected ethanol gasoline. By adopting appropriate pretreatment methods to eliminate the interference of background factors, good prediction results were achieved. Summary of the invention

[0008] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method for determining the ethanol content in gasoline by near infrared spectroscopy with fast analysis speed, accurate test and good repeatability.

[0009] In order to achieve the above object, the present invention provides a method for determining the ethanol content in gasoline.

[0010] The method for measuring ethanol content in gasoline of the present invention comprises the following steps:

[0011] (1) Obtain near infrared spectra of gasoline samples with known ethanol content and establish a calibration set and an optional validation set;

[0012] (2) using the same subtraction method, obtaining a difference spectrum of the near-infrared spectrum of the calibration set and a difference value of the ethanol content corresponding to the difference spectrum;

[0013] (3) establishing a correlation model between the difference spectrum of the calibration set near-infrared spectra and the difference in ethanol content;

[0014] (4) Determine the near infrared spectrum of the gasoline sample to be tested, find the spectrum closest to the gasoline sample to be tested from the calibration set, calculate the difference spectrum between the two, calculate the ethanol content difference corresponding to the difference spectrum through the correlation model in step (3), and add it to the ethanol content value of the gasoline sample corresponding to the nearest spectrum to obtain the ethanol content of the gasoline to be tested.

[0015] According to the present invention, in step (1), the ethanol content in the gasoline sample can be determined by measuring the ethanol content in the sample, or by mixing a gasoline sample without ethanol with ethanol in different volume ratios to prepare a gasoline sample with a specified ethanol content, or by mixing a gasoline sample with a known ethanol content with ethanol in different volume ratios or a gasoline sample without ethanol to prepare a gasoline sample with a specified ethanol content. The gasoline sample without ethanol can be selected from one or more gasoline samples of known brands, such as 92#, 95#, and 98# automotive gasoline samples; the gasoline sample with a known ethanol content can be selected from one or more ethanol gasoline samples of known brands, such as E92 and E95.

[0016] According to the present invention, optionally, in step (1), n ​​gasoline samples with known ethanol content are collected, and the near-infrared spectrum of each sample is collected as a calibration set, where n is an integer greater than or equal to 5; optionally, one or more finished gasoline samples are randomly selected and formulated into gasoline samples with different ethanol contents as a verification set.

[0017] According to the present invention, optionally, in step (1), the absorbance variable of the near-infrared spectrum in the calibration set is subjected to differential preprocessing, a preset spectrum region is selected, and a spectrum matrix X containing n spectra is obtained, and an ethanol content matrix y containing n ethanol content values ​​is obtained according to the ethanol content in the gasoline sample corresponding to the calibration set. The differential preprocessing may be a first-order differential preprocessing or a second-order differential preprocessing.

[0018] According to the present invention, in step (1), preferably, the wave number is selected to be 4700 to 5100 cm -1 and / or 6000~6700cm -1 The spectral range of is used as the preset spectral range.

[0019] According to the present invention, in step (1), the near-infrared spectrum of each sample can be collected at room temperature, or at a temperature above or below room temperature, and there is no particular limitation as long as the samples are collected at the same temperature.

[0020] According to the present invention, in step (1), preferably, the spectral matrix X and the ethanol content matrix y are sorted from low to high according to the ethanol content in the gasoline sample corresponding to the calibration set, so as to obtain the spectral matrix X S and the ethanol content matrix y S .

[0021] According to the present invention, in step (1), the ethanol content in the n gasoline samples may range from 0 to 25%, preferably from 0.5% to 20%.

[0022] According to the present invention, in step (1), preferably, the ethanol content values ​​in the n gasoline samples are arranged in an arithmetic progression according to the content, for example, they can be increased or decreased by a specified content difference, and the specified content difference can be a value between 0.1% and 5%, which can be 0.1%, 0.2%, 0.5%, 1%, 2%, 3%, 4% or 5%. The appropriate content difference can be determined based on the balance between the calculation amount and the calculation accuracy.

[0023] According to the present invention, in step (1), in the spectrum matrix X S There are n spectra from the 1st to the nth, in the ethanol content matrix y S There are n ethanol content values ​​corresponding to the n gasoline samples, and the first ethanol content value is the ethanol content matrix y S The lowest value in corresponds to the gasoline sample with the lowest ethanol content. The nth ethanol content value is the ethanol content matrix y S The highest value in the above data corresponds to the gasoline sample with the highest ethanol content. The same ethanol content value may correspond to one gasoline sample or multiple gasoline samples.

[0024] According to the present invention, optionally, in step (2), the spectrum matrix X is calculated respectively according to the same subtraction calculation method. S The difference spectrum between the n spectra and the ethanol content matrix y S The difference between n ethanol content values ​​in the matrix is ​​obtained to obtain a difference spectrum matrix containing n' spectra and an ethanol content difference matrix containing n' ethanol content difference values; n' is an integer greater than or equal to 5.

[0025] According to the present invention, in step (2), preferably, the spectrum matrix X is calculated respectively according to the same subtraction calculation method. S The difference spectrum between the i-th spectrum and the 1st to (i-1th) spectra in the equation is used to calculate the ethanol content matrix y S The difference between the ethanol content value of the i-th ethanol content and the ethanol content values ​​of the 1st to (i-1)th ethanol content is obtained to obtain the difference spectrum matrix X containing (n-1)×n / 2 spectra. c and the ethanol content difference matrix y containing (n-1)×n / 2 ethanol content difference values c ; where i is an integer greater than 1 and less than or equal to n. Since there are many spectra in the difference spectrum matrix, some spectra in the difference spectrum matrix can be selected as the correction set at specified intervals. For example, the first, sixth, eleventh, ... in the difference spectrum matrix can be selected in sequence as the correction set.

[0026] According to the present invention, in step (3), preferably, a multivariate regression analysis method is used to establish a difference spectrum matrix X c and ethanol content difference matrix yc The multivariate regression analysis method includes one or more of partial least squares (PLS), linear regression (MLR) and principal component regression (PCR) methods. More preferably, partial least squares method is used to establish the difference spectrum matrix X c and ethanol content difference matrix y c The association model.

[0027] According to the present invention, in step (3), optionally, a validation set is formed using ethanol gasoline samples with known ethanol content, and their near-infrared spectra are obtained. According to the same subtraction method, a difference spectrum of the near-infrared spectrum of the validation set and the ethanol content difference corresponding to the difference spectrum are obtained, and the ethanol content is calculated by substituting them into the correlation model to verify the accuracy of the correlation model.

[0028] According to the present invention, in step (4), preferably, the spectrum closest to the gasoline sample to be tested is found from the spectrum matrix X by calculating the Euclidean distance or the moving window correlation coefficient.

[0029] According to the present invention, in step (4), preferably, the Euclidean distance is calculated by:

[0030]

[0031] Among them, n is the dimension of the variable, J and K are two spectral samples, and j i , k i J is the i-th absorbance of the two spectral samples, and K is the i-th absorbance of the two spectral samples.

[0032] According to the present invention, in step (4), preferably, the moving window correlation coefficient Q is calculated as follows:

[0033]

[0034] where r p is the correlation coefficient, p is the sequence number of the moving window, and n is the total number of moving windows;

[0035] The correlation coefficient r p The calculation formula is as follows:

[0036]

[0037] In the formula, are the mean absorbance of all wavenumber points in the i-th spectrum or spectral region and the j-th spectrum or spectral interval, n is the number of wavenumber sampling points, k is the wavenumber sampling sequence number, x ik 、x jk are the i-th and j-th spectra or the k-th absorbance variable in the spectral interval, respectively. The closer the two spectra are, the closer the absolute value of the moving window correlation coefficient between them is to 1.

[0038] The method of the invention has fast analysis speed, accurate test and good repeatability, and is suitable for quickly determining the ethanol content in ethanol gasoline. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 The figure is a comparison chart of the actual value and the predicted value of the ethanol content obtained by the method of the present invention.

[0040] Figure 2 This is a correlation diagram between the actual and predicted values ​​of ethanol content obtained by the traditional modeling method. DETAILED DESCRIPTION

[0041] The present invention adopts near-infrared spectroscopy which is relatively easy to operate to measure the ethanol content in gasoline, expands the range of a calibration set by calculating a difference spectrum, selects a characteristic spectrum region of the near-infrared spectrum, performs difference spectrum processing, and then associates the difference spectrum with the ethanol content in a gasoline sample, establishes a correlation model through multivariate regression analysis, and then, through the correlation model, the ethanol content of a gasoline sample to be tested can be predicted from the spectral intensity of an unknown sample in the selected characteristic spectrum region.

[0042] Near infrared spectroscopy is produced by the vibration-rotation energy level transition of molecules. Conventionally, wavelengths of 2500 to 25000 nm (wave numbers 4000 to 400 cm -1 The spectral region with wavelengths of 780 to 2500 nm (wave number 12820 to 4000 cm) is called the mid-infrared (abbreviated as infrared) region. -1 ) is called the near-infrared region.

[0043] When establishing an association model, the more samples are selected, the more accurate and reliable the model is. However, in actual operation, in order to reduce the workload, an appropriate number of samples that can cover all possible prediction values ​​are generally selected, preferably 300-400 samples of different types. If the number of difference spectrum matrices is large, one sample is selected for every five samples of the difference spectrum matrix and the ethanol content matrix as a calibration set sample (for example, the first, sixth, eleventh, ...).

[0044] In order to test the accuracy of the association model, gasoline samples are generally divided into a calibration set and a validation set. The calibration set has a large number of samples and is representative, that is, the ethanol content in the calibration set gasoline samples should cover the ethanol content in all pre-measured gasoline samples. The validation set is randomly selected and used as an unknown sample to verify the accuracy of the association model. In the present invention, the validation set samples can be a series of samples randomly mixed with a certain proportion of ethanol from the finished gasoline produced by each refinery.

[0045] The near infrared spectrum is measured by a near infrared spectrometer, and then the absorbance variable of the spectrum in the selected spectral region is processed by first-order or second-order differential to eliminate interference.

[0046] The correlation model is the mathematical relationship between the difference spectrum and the ethanol content difference. Sort the spectrum matrix X and the ethanol content matrix y from low to high according to the ethanol content value, and get the spectrum matrix X S and the ethanol content matrix y S . Calculate the difference spectrum. For the i-th spectrum, calculate the difference spectrum with the first spectrum, the difference spectrum with the second spectrum, ..., and the difference spectrum with the (i-1)th spectrum, where i is an integer between 1 and n; that is, for the spectrum matrix X S For the second spectrum: calculate the difference spectrum with the first spectrum, for the third spectrum: calculate the difference spectrum with the first spectrum and the difference spectrum with the second spectrum respectively; for the fourth spectrum: calculate the difference spectrum with the first spectrum, the difference spectrum with the second spectrum, and the difference spectrum with the third spectrum respectively; and so on, for the spectral matrix X S For the n spectra in the matrix y, we can get 1+2+3+…+(n-1) difference spectra. S The same subtraction calculation is performed to obtain 1+2+3+…+(n-1) ethanol content difference values ​​corresponding to the difference spectrum.

[0047] The method of the present invention preferably uses partial least squares (PLS) to establish the association model, and then uses the validation set samples at 4700-5100 cm -1 and 6000-6700cm -1 The spectra of the spectral region are substituted into the calibration model to predict their ethanol content, which is then compared with their actual ethanol content values ​​to verify the accuracy of the model.

[0048] The method of establishing the association model using the partial least squares method (PLS) of the present invention is described as follows:

[0049] PLS Algorithm

[0050] First, the spectral matrix X (n × m) and the concentration matrix Y (n × 1) (i.e., the ethanol content matrix or the ethanol content difference matrix in the present invention) are decomposed as follows. In this algorithm, n is the number of samples, and m is the number of absorbance wavelength points in the characteristic spectral region, i.e., the number of sampling points of absorbance in the characteristic spectral region.

[0051]

[0052]

[0053] Where: t k (n×1) is the score of the kth principal factor of the spectral matrix X;

[0054] p k (1×m) is the loading of the kth principal factor of the spectral matrix X;

[0055] u k (n×1) is the score of the kth principal factor of the concentration matrix Y;

[0056] q k (1×1) is the load of the kth principal factor of the concentration matrix Y; f is the number of principal factors. That is, T and U are the score matrices of the X and Y matrices, P and Q are the load matrices of the X and Y matrices, and E X and E Y are the PLS fitting residual matrices for X and Y respectively.

[0057] The second step is to perform linear regression on T and U:

[0058] U=TB

[0059] B=(T T T) -1 T T Y

[0060] When predicting, first calculate the unknown sample spectrum matrix X according to P 未知 Score T 未知 , and then the predicted value of concentration is obtained by the following formula: Y 未知 =T 未知 BQ.

[0061] Usually, the PLS algorithm combines matrix decomposition and regression into one step, that is, the decomposition of the X and Y matrices is performed simultaneously, and the information of Y is introduced into the decomposition process of the X matrix. Before calculating each new principal component, the score T of X is exchanged with the score U of Y, so that the obtained principal component of X is directly associated with Y.

[0062] The PLS algorithm is preferably calculated according to the nonlinear iterative partial least squares algorithm (NIPALS) proposed by H Wold, and its specific algorithm is as follows:

[0063] For the correction process, ignoring the residual matrix E, when the number of main factors is 1, we have:

[0064] For X = tp T , multiply t on the left T Get: p T =t T X / t T t; multiply the right side by p to get: t = Xp / p T p.

[0065] For Y = uq T , multiply u on the left T Get: q T =u T Y / u T u, divide both sides to get q T So: u=Y / q T .

[0066] (1) Find the weight vector w of the absorbance matrix X

[0067] Take a column of the concentration matrix Y (only one column in this invention) as the starting iteration value of u, replace t with u, and calculate w

[0068] The equation is: X = uw T , its solution is: w T =u T X / u T u

[0069] (2) Normalize the weight vector w

[0070] w T =w T / ||w T ||

[0071] (3) Find the factor score t of the absorbance matrix X, and calculate t from the normalized w

[0072] The equation is: X = tw T , the solution is: t = Xw / w T w

[0073] (4) Find the load q value of the concentration matrix Y and use t instead of u to calculate q

[0074] The equation is: Y = tq T , whose solution is: q T =t T Y / t T t

[0075] (5) Normalize the load q

[0076] q T =q T / ||q T ||

[0077] (6) Find the factor score u of the concentration matrix Y, from q T Calculate u

[0078] The equation is: Y = uq T , the solution is: u = Yq / q T q

[0079] (7) Replace t with this u and return to step (1) to calculate w T , by w T Calculate t 新 , and iterate repeatedly. If t has converged (‖t 新 -t 旧 ‖≤10 -6 ‖t 新‖), go to step (8) for calculation, otherwise return to step (1).

[0080] (8) Find the load vector p of the absorbance matrix X from the converged t

[0081] The equation is: X = tp T , its solution is: p T =t T Y / t T t

[0082] (9) Normalize the load p

[0083] p T =p T / ||p T ||

[0084] (10) Standardized factor score t of X

[0085] t=t||p||

[0086] (11) Normalized weight vector w

[0087] w=w||p||

[0088] (12) Calculate the intrinsic relationship b between t and u

[0089] b=u T t / t T t

[0090] (13) Calculate the residual matrix E

[0091] E X =X-tp T

[0092] E Y =Y-btq T

[0093] (14) E X Instead of X, E Y Replace Y, return to step (1), and so on, to find w, t, p, u, q, b of the main factors of X and Y. Use the interaction test method to determine the best number of main factors f, save w f 、p f ,q f .

[0094] The concentration y of the gasoline sample to be tested un The prediction process of (ethanol content) is as follows:

[0095] x un The absorbance of the gasoline sample to be tested in the characteristic spectrum area is called up and the saved w f 、p f,q f ;

[0096] y un =b PLS x un , where b PLS =w f T (p f w f T ) -1 q f .

[0097] The method of the invention is suitable for predicting and analyzing the ethanol content in gasoline.

[0098] The present invention is described in detail below by way of examples, but the present invention is not limited thereto.

[0099] Example 1

[0100] A correlation model for ethanol content in ethanol gasoline was established and verified.

[0101] (1) Establish a calibration set and a validation set for the near-infrared spectra of ethanol gasoline samples;

[0102] Three samples of automotive gasoline of three brands, 92#, 95# and 98#, were collected respectively. These three pure gasoline samples were used to prepare a series of ethanol gasoline samples with ethanol volume concentrations of 1%, 2%, 3%, 4%, 5%, ... 20%, totaling 60 samples, and near-infrared spectra of these 60 samples were collected at room temperature as a calibration set; finished gasoline samples of various brands were collected from gas stations and oil depots, totaling 160, and ethanol gasoline samples were randomly prepared in the concentration range of 0.5%-20%, and their near-infrared spectra were collected as a validation set.

[0103] The above near-infrared spectrum was collected by transmission using a Thermo AntarisⅡ near-infrared spectrometer. The accessory used was a cuvette with an optical path of 1 mm, and the collection temperature was room temperature.

[0104] The collection method is: use a pipette to transfer the ethanol gasoline sample into a glass cuvette, and perform spectral scanning with air as the reference. The number of scans is 88, and the scanning range is 10000~3500cm -1 , resolution 8cm -1 .

[0105] (2) using the same subtraction method, obtaining a difference spectrum of the near-infrared spectrum of the calibration set and a difference value of the ethanol content corresponding to the difference spectrum;

[0106] The obtained near-infrared spectrum was subjected to second-order differential processing, and the wave number was taken as 4700-5100 cm -1and 6000~6700cm -1 The absorbance constitutes the spectral matrix X, and the ethanol content in ethanol gasoline constitutes the ethanol content matrix Y. The spectral matrix X and the ethanol content matrix y are sorted from low to high according to the ethanol content value to obtain the spectral matrix X S and the ethanol content value matrix y S ;

[0107] Calculate the difference spectrum, for the spectral matrix X S For the second spectrum, calculate the difference spectrum with the first spectrum; for the third spectrum, calculate the difference spectrum with the first spectrum and the difference spectrum with the second spectrum respectively; for the fourth spectrum, calculate the difference spectrum with the first spectrum, the difference spectrum with the second spectrum, and the difference spectrum with the third spectrum respectively; and so on, for the spectral matrix X S For n spectra, we can get 1+2+3+…+(n-1), a total of 1770 difference spectra, forming the difference spectrum matrix X c . For the ethanol content matrix y S The same subtraction calculation is performed to obtain the corresponding 1+2+3+…+(n-1) ethanol content differences, forming the ethanol content difference matrix y c .

[0108] (3) Establish a correlation model between the difference spectrum of the calibration set near-infrared spectrum and the difference in ethanol content

[0109] The difference spectrum matrix X c and the ethanol content difference matrix y c The association model was established using the partial least squares (PLS) method. The relevant statistical parameters used to establish the model are shown in Table 1. The prediction standard deviation RMSEP and the determination coefficient R 2 The calculation formula is as follows.

[0110]

[0111] Where m is the total number of samples in the validation set, n is the total number of samples in the calibration set, and y i,actual is the measured value of the standard method, y i,predicted is the predicted value, RMSEP is the predicted standard deviation, R 2 is the determination coefficient.

[0112] (4) Use the validation set samples as samples with unknown ethanol content to verify the accuracy of the association model

[0113] The near infrared spectrum of each ethanol gasoline sample in the validation set is measured according to the method of step (2) and the same spectrum processing is performed. First, by calculating the Euclidean distance, the spectrum closest to each validation set sample (assuming it is the sample to be tested) is found from the spectrum matrix X, and the difference spectrum between the two is calculated respectively. The ethanol content value corresponding to the difference spectrum is calculated by the association model obtained in step (3). The final ethanol content value is obtained by adding the ethanol content value of the closest sample and the ethanol content difference calculated by the association model.

[0114] Table 1 Parameter statistics

[0115]

[0116] Figure 1 The figure is a comparison chart of the predicted value and the actual value of ethanol content obtained by the method of the present invention. Figure 1 It can be seen that the RMSEP (standard deviation of prediction) is only 0.45%, which shows that the method of the present invention can more accurately predict the ethanol content in the ethanol gasoline sample.

[0117] Comparative Example 1

[0118] Only the same 60 actual prepared calibration set samples as in Example 1 were used to establish a correlation model using the partial least squares (PLS) method to predict gasoline samples with unknown ethanol content. The near infrared spectrum acquisition method was the same as in Example 1.

[0119] The relevant statistical parameters of the model are shown in Table 2, and the comparison chart between the predicted value and the actual value of ethanol content is shown in Figure 2 .

[0120] As shown in Table 2, the RMSEP (standard deviation of prediction) is 0.59%, which is significantly higher than the result obtained in Example 1. Figure 2 It can be seen that the prediction results of individual samples are obviously too large. By comparison, it can be seen that the method of the present invention can significantly improve the prediction accuracy of ethanol content.

[0121] Table 2 Parameter statistics

[0122]

[0123] Example 2

[0124] A correlation model for ethanol content in ethanol gasoline was established and verified.

[0125] (1) Establish a calibration set and a validation set for the near-infrared spectra of ethanol gasoline samples;

[0126] Three samples of automotive gasoline of three brands, 92#, 95# and 98#, were collected respectively. These three pure gasoline samples were used to prepare a series of ethanol gasoline samples with ethanol volume concentrations of 1%, 2%, 3%, 4%, 5%, ... 20%, totaling 60 samples, and near-infrared spectra of these 60 samples were collected at room temperature as a calibration set; finished gasoline samples of various brands were collected from gas stations and oil depots, totaling 160, and ethanol gasoline samples were randomly prepared in the concentration range of 0.5%-20%, and their near-infrared spectra were collected as a validation set.

[0127] The above near-infrared spectrum was collected by transmission using a Thermo AntarisⅡ near-infrared spectrometer. The accessory used was a cuvette with an optical path of 1 mm, and the collection temperature was room temperature.

[0128] The collection method is: use a pipette to transfer the ethanol gasoline sample into a glass cuvette, and perform spectral scanning with air as the reference. The number of scans is 88, and the scanning range is 10000~3500cm -1 , resolution 8cm -1 .

[0129] (2) using the same subtraction method, obtaining a difference spectrum of the near-infrared spectrum of the calibration set and a difference value of the ethanol content corresponding to the difference spectrum;

[0130] The obtained near-infrared spectrum was subjected to second-order differential processing, and the wave number was taken as 4700-5100 cm -1 and 6000~6700cm -1 The absorbance constitutes the spectral matrix X, and the ethanol content in ethanol gasoline constitutes the ethanol content matrix Y. The spectral matrix X and the ethanol content matrix y are sorted from low to high according to the ethanol content value to obtain the spectral matrix X S and the ethanol content value matrix y S ;

[0131] Calculate the difference spectrum, for the spectral matrix X S For the second spectrum, calculate the difference spectrum with the first spectrum; for the third spectrum, calculate the difference spectrum with the first spectrum and the difference spectrum with the second spectrum respectively; for the fourth spectrum, calculate the difference spectrum with the first spectrum, the difference spectrum with the second spectrum, and the difference spectrum with the third spectrum respectively; and so on, for the spectral matrix X S For n spectra, we can get 1+2+3+…+(n-1), a total of 1770 difference spectra, forming the difference spectrum matrix X c . For the ethanol content matrix y S The same subtraction calculation is performed to obtain the corresponding 1+2+3+…+(n-1) ethanol content differences, forming the ethanol content difference matrix y c .

[0132] (3) Establish a correlation model between the difference spectrum of the calibration set near-infrared spectrum and the difference in ethanol content

[0133] The difference spectrum matrix X c and the ethanol content difference matrix y c The association model was established using the partial least squares (PLS) method, and the relevant statistical parameters used to establish the model are shown in Table 3.

[0134] (4) Use the validation set samples as samples with unknown ethanol content to verify the accuracy of the association model

[0135] The near infrared spectrum of each ethanol gasoline sample in the validation set is measured according to the method in step (2) and the same spectral processing is performed.

[0136] First, by calculating the moving window correlation coefficient, the spectrum closest to each validation set sample (assuming it is the sample to be tested) is found from the spectrum matrix X, and the difference spectrum between the two is calculated respectively. The ethanol content value corresponding to the difference spectrum is calculated by the association model obtained in step (3). The final ethanol content value is obtained by adding the ethanol content value of the nearest sample and the ethanol content difference calculated by the association model.

[0137] Table 3 Parameter statistics

[0138]

[0139] As can be seen from Table 3, by calculating the moving window correlation coefficient, the spectrum closest to each validation set sample (assuming it is a sample to be tested) is found in the spectrum matrix X. Compared with Example 1, the RMSEP (prediction standard deviation) does not change, which shows that the method of the present invention can more accurately predict the ethanol content in the ethanol gasoline sample.

[0140] Example 3

[0141] A correlation model for ethanol content in ethanol gasoline was established and verified.

[0142] (1) Establish a calibration set and a validation set for the near-infrared spectra of ethanol gasoline samples;

[0143] Three samples of automotive gasoline of three brands, 92#, 95# and 98#, were collected respectively. These three pure gasoline samples were used to prepare a series of ethanol gasoline samples with ethanol volume concentrations of 1%, 2%, 3%, 4%, 5%, ... 20%, totaling 60 samples, and near-infrared spectra of these 60 samples were collected at room temperature as a calibration set; finished gasoline samples of various brands were collected from gas stations and oil depots, totaling 160, and ethanol gasoline samples were randomly prepared in the concentration range of 0.5%-20%, and their near-infrared spectra were collected as a validation set.

[0144] The above near-infrared spectrum was collected by transmission using a Thermo AntarisⅡ near-infrared spectrometer. The accessory used was a cuvette with an optical path of 1 mm, and the collection temperature was room temperature.

[0145] The collection method is: use a pipette to transfer the ethanol gasoline sample into a glass cuvette, and perform spectral scanning with air as the reference. The number of scans is 88, and the scanning range is 10000~3500cm -1 , resolution 8cm -1 .

[0146] (2) using the same subtraction method, obtaining a difference spectrum of the near-infrared spectrum of the calibration set and a difference value of the ethanol content corresponding to the difference spectrum;

[0147] The obtained near-infrared spectrum was subjected to second-order differential processing, and the wave number was taken as 4700-5100 cm -1 and 6000~6700cm -1 The absorbance constitutes the spectral matrix X, and the ethanol content in ethanol gasoline constitutes the ethanol content matrix Y. The spectral matrix X and the ethanol content matrix y are sorted from low to high according to the ethanol content value to obtain the spectral matrix X S and the ethanol content value matrix y S ;

[0148] Calculate the difference spectrum, for the spectral matrix X S For the second spectrum, calculate the difference spectrum with the first spectrum; for the third spectrum, calculate the difference spectrum with the first spectrum and the difference spectrum with the second spectrum respectively; for the fourth spectrum, calculate the difference spectrum with the first spectrum, the difference spectrum with the second spectrum, and the difference spectrum with the third spectrum respectively; and so on, for the spectral matrix X S For n spectra, we can get 1+2+3+…+(n-1), a total of 1770 difference spectra, forming the difference spectrum matrix X c . For the ethanol content matrix y S The same subtraction calculation is performed to obtain the corresponding 1+2+3+…+(n-1) ethanol content differences, forming the ethanol content difference matrix y c .

[0149] Instead of using all 1770 difference spectrum samples as the calibration set, the first sample is taken from every 5 samples in sequence to enter the calibration set, and a total of 354 samples constitute the difference spectrum matrix X c1 , and obtain the ethanol content matrix y in the same order c1 .

[0150] (3) Establish a correlation model between the difference spectrum of the calibration set near-infrared spectrum and the difference in ethanol content

[0151] The difference spectrum matrix X c1and the ethanol content difference matrix y c1 The association model was established using the partial least squares (PLS) method, and the relevant statistical parameters used to establish the model are shown in Table 4.

[0152] (4) Use the validation set samples as samples with unknown ethanol content to verify the accuracy of the association model

[0153] The near infrared spectrum of each ethanol gasoline sample in the validation set is measured according to the method of step (2) and the same spectrum processing is performed. First, by calculating the Euclidean distance, the spectrum closest to each validation set sample (assuming it is the sample to be tested) is found from the spectrum matrix X, and the difference spectrum between the two is calculated respectively. The ethanol content value corresponding to the difference spectrum is calculated by the association model obtained in step (3). The final ethanol content value is obtained by adding the ethanol content value of the closest sample and the ethanol content difference calculated by the association model.

[0154] Table 4 Parameter statistics

[0155]

Claims

1. A method for determining the ethanol content in gasoline, comprising the following steps: (1) Obtain near-infrared spectra of gasoline samples with known ethanol content and establish a calibration set and an optional validation set. In step (1), select a wave number of 4700-5100 cm -1 and / or 6000~6700 cm -1 The spectral range of the gasoline sample with known ethanol content is taken as the preset spectral range; n gasoline samples with known ethanol content are collected, and the near infrared spectrum of each sample is collected as a calibration set, where n is an integer greater than or equal to 5; one or more finished gasoline samples are randomly selected to prepare gasoline samples with different ethanol contents as a validation set; the absorbance variable of the near infrared spectrum in the calibration set is differentially preprocessed, and the preset spectral range is selected to obtain a spectral matrix X containing n spectra, and an ethanol content matrix y containing n ethanol content values ​​is obtained according to the ethanol content in the gasoline sample corresponding to the calibration set; the spectral matrix X and the ethanol content matrix y are sorted from low to high according to the ethanol content in the gasoline sample corresponding to the calibration set to obtain a spectral matrix X S and the ethanol content matrix y S ; (2) According to the same subtraction method, the difference spectrum of the near infrared spectrum of the calibration set and the difference value of the ethanol content corresponding to the difference spectrum are obtained; in step (2), according to the same subtraction calculation method, the spectrum matrix X is calculated respectively. S The difference spectrum between the i-th spectrum and the 1st to (i-1)-th spectra in the calculation of the ethanol content matrix y S The difference between the ethanol content value of the i-th ethanol content and the ethanol content values ​​of the 1st to (i-1)th ethanol content in the matrix X is obtained, which contains (n-1) × n / 2 spectra. c and the ethanol content difference matrix y containing (n-1) × n / 2 ethanol content difference values c ; Wherein i is an integer greater than 1 and less than or equal to n; (3) Establishing a correlation model between the difference spectrum of the calibration set near-infrared spectra and the difference in ethanol content; (4) Determine the near infrared spectrum of the gasoline sample to be tested, find the spectrum closest to the gasoline sample to be tested from the calibration set, calculate the difference spectrum between the two, calculate the ethanol content difference corresponding to the difference spectrum through the correlation model in step (3), and add it to the ethanol content value of the gasoline sample corresponding to the nearest spectrum to obtain the ethanol content of the gasoline to be tested.

2. The method according to claim 1, characterized in that In step (1), the ethanol content in the gasoline sample is determined by measuring the ethanol content in the sample, or by mixing a gasoline sample not containing ethanol with ethanol in different volume ratios to prepare a gasoline sample with a specified ethanol content, or by mixing a gasoline sample with a known ethanol content with ethanol in different volume ratios or a gasoline sample not containing ethanol to prepare a gasoline sample with a specified ethanol content.

3. The method according to claim 1, characterized in that In step (1), the ethanol content values ​​in the n gasoline samples range from 0 to 25%.

4. The method according to claim 1, characterized in that In step (1), the ethanol content values ​​in the n gasoline samples are arranged in an arithmetic progression according to the content.

5. The method according to claim 1, characterized in that In step (3), the difference spectrum matrix X is established by using the multivariate regression analysis method. c and ethanol content difference matrix y c The association model.

6. The method according to claim 1, characterized in that In step (3), the difference spectrum matrix X is established by using the multivariate regression analysis method. c and ethanol content difference matrix y c The multiple regression analysis method includes one or more of partial least squares, linear regression and principal component regression methods.

7. The method according to claim 1, characterized in that In step (3), optionally, a validation set is formed using ethanol gasoline samples with known ethanol content, and their near-infrared spectra are obtained. The difference spectrum of the near-infrared spectra of the validation set and the ethanol content difference corresponding to the difference spectrum are obtained by the same subtraction method, and the ethanol content difference corresponding to the difference spectrum are substituted into the correlation model to calculate the ethanol content, so as to verify the accuracy of the correlation model.

8. The method according to claim 1, characterized in that In step (4), the spectrum closest to the gasoline sample to be tested is found from the spectrum matrix X by calculating the Euclidean distance or the moving window correlation coefficient.

Citation Information

Patent Citations

  • Method for predicting properties of oil product through near-infrared spectrum of oil product

    CN107976419A