A method for predicting gasoline octane number

By establishing a correlation model between the near-infrared spectral difference spectrum and the octane difference value, the problem of degradation of prediction accuracy in the prior art is solved, and a fast and accurate prediction of gasoline octane is achieved.

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

Patent Information

Application Number
CN202011082720.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-12
Publication Date
2025-03-11
Estimated Expiration
2040-10-12

AI Technical Summary

Technical Problem

When predicting gasoline octane values, the prediction accuracy of the model will decrease after the instrument is run for a period of time and when the spectral acquisition conditions change, resulting in the accuracy of the prediction results being questioned.

Method used

By obtaining the near-infrared spectrum of the gasoline sample with known octane, establishing the correction set and verification set, and calculating the correlation model between the difference spectrum and the octane difference value according to the difference subtraction method, measuring the near-infrared spectrum of the gasoline sample to be measured, finding the octane difference value corresponding to the difference spectrum calculated by the nearest spectrum, and applying the octane value of the nearest sample to obtain the octane value of the gasoline to be measured.

Benefits of technology

A method for predicting the octane number of gasoline with fast analysis speed, accurate test and good repeatability is realized, which is suitable for predicting the octane number of gasoline samples quickly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114428067B_ABST
    Figure CN114428067B_ABST
Patent Text Reader

Abstract

The present invention proposes a method for predicting the octane number of gasoline, comprising the following steps: (1) obtaining a near infrared spectrum of a gasoline sample with a known octane number, 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 an octane number difference corresponding to the difference spectrum by the same subtraction method; (3) establishing a correlation model between the difference spectrum of the near infrared spectrum of the calibration set and the octane number difference; (4) measuring 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 octane number difference corresponding to the difference spectrum by the correlation model in step (3), and adding the difference to the octane number of the gasoline sample corresponding to the closest spectrum to obtain the octane number of the gasoline to be tested. The method of the present invention has fast analysis speed, accurate test, good repeatability, and is suitable for quickly predicting the octane number of gasoline samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for predicting gasoline octane number, and in particular to a method for predicting gasoline octane number by utilizing near infrared spectroscopy. Background Art

[0002] Octane number is an important quality indicator of gasoline. Gasoline grades are generally named after their octane number, so the correct measurement of octane number is very important. The traditional method for determining gasoline octane number is bench testing, but the operation and maintenance are complicated and the operating cost is high, so the measurement cost is high. Near infrared (NIR) spectroscopy analysis method has the advantages of rapid measurement and online analysis, and has received extensive attention and research.

[0003] Spectral quantitative analysis is an emerging and rapid analytical technology. Combining it with chemometrics and computer technology can quickly quantify the research object. In recent years, the combination of infrared and near-infrared spectroscopy technology and multivariate analysis methods has made great progress in various fields. Petroleum and petrochemical products are mainly hydrocarbons, and the properties of the products mostly depend on their composition. This is the basis for infrared spectroscopy analysis technology to be used for predicting the properties of petroleum and petrochemical products. Infrared and near-infrared spectroscopy technology has the advantages of simple operation, high precision, and fast analysis speed, which is very suitable for quantitative and qualitative analysis of crude oil and oil products. The essence of rapid determination of gasoline octane number by near-infrared spectroscopy is to use the rich information provided by the CH vibration frequency doubling signal of gasoline in the near-infrared spectral region to establish a mathematical model of spectral data and octane number. The core of infrared and near-infrared spectroscopy (NIR) analysis technology for rapid analysis of oil products is to establish a robust quantitative correction model. The commonly used linear correction methods for modeling include multivariate linear regression (MLR) and partial least squares (PLS).

[0004] However, if the spectral acquisition conditions change after the instrument has been running for a period of time, the prediction accuracy of the model will deteriorate significantly, resulting in so-called out-of-bounds samples. The model out-of-bounds samples include three categories: concentration out-of-bounds samples, that is, using the Mahalanobis distance (MD) to detect whether the concentration of the unknown sample exceeds the concentration range of the calibration sample; spectral residual out-of-bounds samples, that is, using the spectral residual root mean square (RMSSR) to detect whether the unknown sample contains components that do not exist in the calibration set samples; nearest neighbor distance out-of-bounds samples, that is, using the nearest neighbor distance to detect whether the unknown sample is located in an area where the calibration set samples are sparsely distributed. When any of the spectral residual, Mahalanobis distance, and nearest neighbor distance of the unknown sample exceeds the corresponding threshold, it means that the sample is a model out-of-bounds sample, and the accuracy of its prediction results will be questioned. In order to improve the robustness (or adaptability) of the model, the out-of-bounds samples can generally be added to the calibration set to re-model the model to increase the trial range of the model, but if the number of such samples is too small, it may be difficult for the model to accept them.

[0005] In his paper “Study on Establishing a Universal Near-Infrared Calibration Model for Finished Gasoline by Support Vector Regression” (Journal of Analysis and Testing, 2008, 27(6): 619-622), Chu Xiaoli used the newly emerged support vector regression method in recent years to establish a universal calibration model for various gasoline grades in response to the problems existing in the current establishment of finished gasoline analysis models using the partial least squares method. The prediction ability of this model is better than that of the corresponding partial least squares method. The standard deviations of the predictions for gasoline research octane number, olefins and aromatics are 0.37%, 1.28% and 1.38% respectively, which can be applied to the online near-infrared spectroscopy analysis of automatic blending in actual gasoline pipelines.

[0006] In the article "Application of Artificial Neural Network to Predict Gasoline Octane Number Using Near-infrared Spectroscopy" (Journal of Analytical Science, 2006, 22(1): 71-74), Gao Jun studied the correlation prediction between gasoline octane number and its near-infrared spectral absorbance using BP artificial neural network (ANN) method. Using 35 actual gasoline sample data, a BP artificial neural network model for predicting gasoline octane number using gasoline near-infrared spectral absorbance was established. The model compared the calculated results of all octane numbers with the measured values, and the calculation error between the predicted values ​​and the measured values ​​was less than 1.55. Summary of the invention

[0007] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for predicting gasoline octane number by near infrared spectroscopy with fast analysis speed, accurate test and good repeatability.

[0008] The present invention proposes a method for predicting gasoline octane number, comprising the following steps:

[0009] (1) Obtain near infrared spectra of gasoline samples with known octane numbers and establish a calibration set and an optional validation set;

[0010] (2) using the same subtraction method, obtaining a difference spectrum of the near-infrared spectrum of the calibration set and an octane number difference corresponding to the difference spectrum;

[0011] (3) Establishing a correlation model between the difference spectrum of the calibration set near-infrared spectra and the octane number difference;

[0012] (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 octane number difference corresponding to the difference spectrum through the correlation model in step (3), and add it to the octane number of the gasoline sample corresponding to the nearest spectrum to obtain the octane number of the gasoline to be tested.

[0013] According to the present invention, optionally, in step (1), n ​​gasoline samples with known octane numbers 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 as a verification set.

[0014] 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 octane value matrix Y containing n octane values ​​is obtained according to the octane value 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.

[0015] According to the present invention, in step (1), preferably, the wave number is selected to be 7000-7500cm -1 and / or 8200-8700cm -1 The spectral range of is used as the preset spectral range.

[0016] 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.

[0017] According to the present invention, in step (1), preferably, the spectral matrix X and the octane number matrix Y are sorted from low to high according to the octane number of the gasoline sample corresponding to the calibration set, so as to obtain the spectral matrix X S and the octane matrix Y S .

[0018] 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 octane number matrix Y S There are n octane numbers corresponding to the n gasoline samples, and the first octane number is the octane number matrix Y S The lowest value in corresponds to the gasoline sample with the lowest octane number. The nth octane value is the octane number matrix Y S The highest value in corresponds to the gasoline sample with the highest octane number. The same octane number can correspond to one gasoline sample or multiple gasoline samples.

[0019] 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 octane number matrix Y S The difference between the n octane numbers in the matrix is ​​obtained to obtain a difference spectrum matrix containing n' spectra and an octane number difference matrix containing n' octane number differences.

[0020] 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 octane number matrix Y is calculated respectively. S The difference between the i-th octane number and the 1st to (i-1)th octane numbers in the matrix is ​​obtained, which contains (n-1)×n / 2 spectra. c and the octane number difference matrix Y containing (n-1)×n / 2 octane number 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.

[0021] 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 octane number difference matrix y c The multivariate regression analysis method includes one or more of partial least squares (PLS), multivariate 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 octane number difference matrix y c The association model.

[0022] According to the present invention, in step (3), optionally, a validation set is formed using gasoline samples with known octane numbers, and their near-infrared spectra are obtained. The difference spectrum of the near-infrared spectra of the validation set and the octane number difference corresponding to the difference spectrum are obtained by the same subtraction method, and the octane number difference corresponding to the difference spectrum are substituted into the correlation model to calculate the octane number, so as to verify the accuracy of the correlation model.

[0023] 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 moving window correlation coefficient or the Euclidean distance.

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

[0025]

[0026] 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;

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

[0028]

[0029] In the formula, are the mean absorbance of all wavenumber points in the ith and jth 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.

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

[0031]

[0032] 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.

[0033] The method of the invention has fast analysis speed, accurate test and good repeatability, and is suitable for quickly predicting the octane number of gasoline samples. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 The figure is a comparison chart of the actual octane number obtained by the method of the present invention and the predicted value.

[0035] Figure 2 The figure is a comparison chart of the actual octane number obtained by the comparative example method of the present invention and the predicted value. DETAILED DESCRIPTION

[0036] The present invention adopts near-infrared spectroscopy which is relatively easy to operate to measure the octane number of gasoline, expands the range of the calibration set by calculating the difference spectrum, selects the characteristic spectrum area of ​​the near-infrared spectrum, performs difference spectrum processing, and then associates the difference spectrum with the octane number of the gasoline sample, establishes a correlation model through multivariate regression analysis, and then uses the correlation model to predict the octane number of the gasoline sample to be tested based on the spectrum of the unknown sample in the selected characteristic spectrum area.

[0037] 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 ) is called the mid-infrared (abbreviated as infrared) region, and the wavelength is 780 ~ 2500nm (wave number 12820 ~ 4000cm -1 ) is called the near-infrared region.

[0038] 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, the number of samples of different types is 300-500. If the number of difference spectrum matrices is large, one sample is selected for every five samples of the difference spectrum matrix and the octane number matrix as a calibration set sample (for example, the first, sixth, eleventh, ...).

[0039] In order to test the accuracy of the association model, the 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 octane number in the calibration set gasoline samples should cover the octane number 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 finished gasoline samples collected from various refineries.

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

[0041] The correlation model is the mathematical relationship between the difference spectrum and the octane number difference. Sort the spectrum matrix X and the octane number matrix y from low to high according to the size of the octane number, and get the spectrum matrix X S and the octane number 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 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) octane number difference values ​​corresponding to the difference spectrum.

[0042] 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 7000-7500cm -1 and / or 8200-8700cm -1 The spectra of the spectral region are substituted into the calibration model to predict its octane number, which is then compared with its actual octane number to verify the accuracy of the model.

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

[0044] PLS Algorithm

[0045] First, the spectrum matrix X (n × m) and the octane number matrix Y (n × 1) 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 spectrum region, that is, the number of sampling points of absorbance in the characteristic spectrum region.

[0046]

[0047]

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

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

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

[0051] 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.

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

[0053] U=TB

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

[0055] 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.

[0056] 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.

[0057] 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:

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

[0059] 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.

[0060] 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 .

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

[0062] 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

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

[0064] (2) Normalize the weight vector w

[0065] w T =w T / ||w T ||

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

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

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

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

[0070] (5) Normalize the load q

[0071] q T =q T / ||q T ||

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

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

[0074] (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).

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

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

[0077] (9) Normalize the load p

[0078] p T =p T / ||p T ||

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

[0080] t=t||p||

[0081] (11) Normalized weight vector w

[0082] w=w||p||

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

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

[0085] (13) Calculate the residual matrix E

[0086] E X =X-tpT

[0087] E Y =Y-btq T

[0088] (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 .

[0089] The octane number y of the gasoline sample to be tested un The prediction process is as follows:

[0090] 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 ;

[0091] y un =y near +b PLS x un , where b PLS =w f T (p f w f T ) -1 q f ,y near For x un The octane number of the closest calibration set sample.

[0092] The method of the invention is suitable for predicting and analyzing the octane number of gasoline.

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

[0094] Example 1

[0095] A correlation model for gasoline octane number was established and verified.

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

[0097] 200 samples of finished motor gasoline of all grades produced by a refinery were collected, and the near-infrared spectra of these 200 samples were collected at room temperature, of which 60 were used as calibration sets and 140 were used as validation sets. The measured octane numbers of the 200 samples were obtained through the national standard GB / T 5487-2015 experiment. The near-infrared spectra of gasoline samples were collected by transmission using a Thermo Antaris II near-infrared spectrometer, and the accessory used was a headspace bottle with an optical path of 0.5 cm, and the collection temperature was room temperature.

[0098] The collection method is as follows: the gasoline sample is injected into the headspace bottle, and the spectrum is scanned with air as the reference. The number of scans is 128, and the scanning range is 10000-3500cm -1 , resolution 8cm -1 .

[0099] (2) using the same subtraction method, obtaining a difference spectrum of the near-infrared spectrum of the calibration set and an octane number difference corresponding to the difference spectrum;

[0100] The obtained near-infrared spectrum was subjected to second-order differential processing and the wave number was taken as 7000-7500cm -1 and 8200-8700cm -1 The absorbance constitutes the spectrum matrix X, and the octane number in gasoline constitutes the octane number matrix Y. The spectrum matrix X and the octane number matrix Y are sorted from low to high according to the size of the octane number to obtain the spectrum matrix X S and the octane matrix Y S ;

[0101] Calculate the difference spectrum, for the spectral matrix X S For the second spectrum x2, calculate the difference spectrum x2-x1 with the first spectrum x1; for the third spectrum x3, calculate the difference spectrum x3-x1 with the first spectrum x1 and the difference spectrum x3-x2 with the second spectrum respectively; for the fourth spectrum x4, calculate the difference spectrum x4-x1 with the first spectrum x1, the difference spectrum x4-x2 with the second spectrum x2, and the difference spectrum x4-x3 with the third spectrum x3 respectively; and so on, for the spectral matrix X S For n spectra, we can get 1+2+3+…+(n-1) difference spectra, which is 1770 in total, forming the spectrum difference matrix X c . For the octane number matrix Y S The same subtraction calculation is performed for the octane number matrix Y SFor the second octane value y2, calculate the difference y2-y1 with the first octane value y1; for the third octane value y3, calculate the difference y3-y1 with the first octane value y1 and the difference y3-y2 with the second octane value; for the fourth octane value y4, calculate the difference y4-y1 with the first octane value y1, the difference y4-y2 with the second octane value y2, and the difference y4-y3 with the third octane value y3; and so on, the octane value matrix Y S The n octane numbers in the equation obtain the corresponding 1+2+3+…+(n-1) octane number differences, forming the octane number difference matrix Y c .

[0102] (3) Establish a correlation model between the difference spectrum of the calibration set near-infrared spectrum and the octane number difference

[0103] The difference spectrum matrix X c and the octane number 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.

[0104]

[0105] 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.

[0106] (4) Use the validation set samples as samples with unknown octane numbers to verify the accuracy of the association model

[0107] The near infrared spectrum of each 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 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. The octane number corresponding to the difference spectrum is calculated by the correlation model obtained in step (3). The final octane number is obtained by adding the difference between the octane number of the closest sample and the octane number calculated by the correlation model.

[0108] Table 1 Parameter statistics

[0109]

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

[0111] Comparative Example 1

[0112] A correlation model for gasoline octane number was established and verified.

[0113] Step (1) is the same as in Example 1.

[0114] (2) Establish a correlation model between the calibration set near-infrared spectrum and octane number

[0115] The obtained near-infrared spectrum was subjected to second-order differential processing and the wave number was taken as 7000-7500cm -1 and 8200-8700cm -1 The absorbance constitutes the spectral matrix X, and the octane number of gasoline constitutes the octane number matrix Y. The spectral matrix X and the octane number matrix Y are used to establish the correlation model between gasoline near-infrared spectrum and octane number by partial least squares (PLS). The relevant statistical parameters used to establish the model are shown in Table 2.

[0116] (3) Use the validation set samples as samples with unknown octane numbers to verify the accuracy of the association model

[0117] The near infrared spectrum of each gasoline sample in the validation set (assumed to be the sample to be tested) was measured in the same way as step (1). After second-order differential processing, the wave number was taken as 7000-7500cm -1 and 8200-8700cm -1 The absorbance is substituted into the correlation model between gasoline near infrared spectrum and octane number established in step (2) to obtain the predicted octane number, which is compared with the actual measured octane number. The relevant statistical parameters of the predicted value and the actual value are shown in Table 2, and the comparison of the predicted set and the actual value is shown in Figure 2 It can be seen that when the number of calibration set samples is small, the prediction results are poor.

[0118] Table 2 Parameter statistics

[0119]

[0120] Example 2

[0121] A correlation model for gasoline octane number was established and verified.

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

[0123] 200 samples of finished motor gasoline of all grades produced by a refinery were collected, and the near-infrared spectra of these 200 samples were collected at room temperature, of which 60 were used as calibration sets and 140 were used as validation sets. The measured octane numbers of the 200 samples were obtained through the national standard GB / T 5487-2015 experiment. The near-infrared spectra of gasoline samples were collected by transmission using a Thermo Antaris II near-infrared spectrometer, and the accessory used was a headspace bottle with an optical path of 0.5 cm, and the collection temperature was room temperature.

[0124] The collection method is: inject the gasoline sample into the headspace bottle, and perform spectral scanning with air as the reference. The number of scans is 128, and the scanning range is 10000-3500cm -1 , resolution 8cm -1 .

[0125] (2) using the same subtraction method, obtaining a difference spectrum of the near-infrared spectrum of the calibration set and an octane number difference corresponding to the difference spectrum;

[0126] The obtained near-infrared spectrum was subjected to second-order differential processing and the wave number was taken as 7000-7500cm -1 and 8200-8700cm -1 The absorbance constitutes the spectrum matrix X, and the octane number in gasoline constitutes the octane number matrix Y. The spectrum matrix X and the octane number matrix Y are sorted from low to high according to the size of the octane number to obtain the spectrum matrix X S and the octane matrix Y S ;

[0127] Calculate the difference spectrum, for the spectral matrix X S For the second spectrum x2, calculate the difference spectrum x2-x1 with the first spectrum x1; for the third spectrum x3, calculate the difference spectrum x3-x1 with the first spectrum x1 and the difference spectrum x3-x2 with the second spectrum respectively; for the fourth spectrum x4, calculate the difference spectrum x4-x1 with the first spectrum x1, the difference spectrum x4-x2 with the second spectrum x2, and the difference spectrum x4-x3 with the third spectrum x3 respectively; and so on, for the spectral matrix X S For n spectra, we can get 1+2+3+…+(n-1) difference spectra, which is 1770 in total, forming the spectrum difference matrix X c . For the octane number matrix Y S The same subtraction calculation is performed for the octane number matrix Y SFor the second octane value y2, calculate the difference y2-y1 with the first octane value y1; for the third octane value y3, calculate the difference y3-y1 with the first octane value y1 and the difference y3-y2 with the second octane value; for the fourth octane value y4, calculate the difference y4-y1 with the first octane value y1, the difference y4-y2 with the second octane value y2, and the difference y4-y3 with the third octane value y3; and so on, the octane value matrix Y S The n octane numbers in the equation obtain the corresponding 1+2+3+…+(n-1) octane number differences, forming the octane number difference matrix Y c Starting from the first one, take one spectrum every five difference spectra as the calibration set sample X c’ =[x c1 ,x c6 ,x c11 ,x c16 ,…],Y c’ =[y c1 ,y c6 ,y c11 ,y c16 ,…].

[0128] (3) Establish a correlation model between the difference spectrum of the calibration set near-infrared spectrum and the octane number difference

[0129] The difference spectrum matrix X c and the octane number 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.

[0130] (4) Use the validation set samples as samples with unknown octane numbers to verify the accuracy of the association model

[0131] The near infrared spectrum of each 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 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. The octane number corresponding to the difference spectrum is calculated by the correlation model obtained in step (3). The final octane number is obtained by adding the difference between the octane number of the closest sample and the octane number calculated by the correlation model.

[0132] Table 3 Parameter statistics

[0133]

[0134] As shown in Table 3, the RMSEP (prediction standard deviation) is 0.39, and the prediction result is slightly worse than that of Example 1. Example 3 does not use all 1770 difference spectrum samples as the calibration set, but sequentially extracts the first sample from every 5 samples into the calibration set, and a total of 354 samples constitute the difference spectrum matrix X c1 Make predictions after modeling.

Claims

1. A method for predicting gasoline octane number, comprising the following steps: (1) Obtain near infrared spectra of gasoline samples with known octane numbers, and establish a calibration set and an optional validation set; in step (1), collect n gasoline samples with known octane numbers, collect the near infrared spectrum of each sample as the calibration set, where n is an integer greater than or equal to 5; perform differential preprocessing on the absorbance variables of the near infrared spectra in the calibration set, select a preset spectral region, and obtain a spectral matrix X containing n spectra; obtain an octane matrix y containing n octane numbers according to the octane values ​​in the gasoline samples corresponding to the calibration set; select a wave number of 7000-7500cm -1 and / or 8200-8700cm -1 The spectral spectrum area is used as the preset spectrum area; according to the octane number of the gasoline sample corresponding to the calibration set, the spectral matrix X and the octane number matrix Y are sorted from low to high to obtain the spectral matrix X S and the octane matrix Y S ; (2) According to the same subtraction method, the difference spectrum of the near-infrared spectrum of the calibration set and the octane number difference 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-1th) spectra in the octane number matrix Y is calculated respectively. S The difference between the i-th octane number and the 1st to (i-1)th octane numbers in the matrix is ​​obtained, which contains (n-1)×n / 2 spectra. c and the octane number difference matrix Y containing (n-1)×n / 2 octane number 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 octane number difference; (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 octane number difference corresponding to the difference spectrum through the correlation model in step (3), and add it to the octane number of the gasoline sample corresponding to the nearest spectrum to obtain the octane number of the gasoline to be tested.

2. 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 octane number difference matrix y c The association model.

3. The method according to claim 2, characterized in that The multivariate regression analysis method includes one or more of partial least squares, multivariate linear regression and principal component regression methods.

4. The method according to claim 1, characterized in that In step (3), a validation set is composed of gasoline samples with known octane numbers, and their near-infrared spectra are obtained. The difference spectrum of the near-infrared spectra of the validation set and the octane number difference corresponding to the difference spectrum are obtained by the same subtraction method. The octane number is calculated by substituting them into the correlation model to verify the accuracy of the correlation model.

5. 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 moving window correlation coefficient or the Euclidean distance.

6. The method according to claim 5, characterized in that In step (4), the moving window correlation coefficient Q is calculated as follows: 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; The correlation coefficient r p The calculation formula is as follows: In the formula, are the mean absorbance of all wavenumber points in the ith and jth 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 kth absorbance variable in the i-th and j-th spectrum or spectral interval, respectively; The calculation method of the Euclidean distance is: 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.

Citation Information

Patent Citations

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

    CN107976419A