CN114428067A - Method for predicting gasoline octane number - Google Patents

Method for predicting gasoline octane number Download PDF

Info

Publication number
CN114428067A
CN114428067A CN202011082720.9A CN202011082720A CN114428067A CN 114428067 A CN114428067 A CN 114428067A CN 202011082720 A CN202011082720 A CN 202011082720A CN 114428067 A CN114428067 A CN 114428067A
Authority
CN
China
Prior art keywords
spectrum
octane number
difference
matrix
octane
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011082720.9A
Other languages
Chinese (zh)
Inventor
李敬岩
褚小立
陈瀑
许育鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sinopec Research Institute of Petroleum Processing
China Petroleum and Chemical Corp
Original Assignee
Sinopec Research Institute of Petroleum Processing
China Petroleum and Chemical Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sinopec Research Institute of Petroleum Processing, China Petroleum and Chemical Corp filed Critical Sinopec Research Institute of Petroleum Processing
Priority to CN202011082720.9A priority Critical patent/CN114428067A/en
Publication of CN114428067A publication Critical patent/CN114428067A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/35Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
    • G01N21/359Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light using near infrared light

Landscapes

  • Physics & Mathematics (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The invention provides a method for predicting the octane number of gasoline, which comprises the following steps: (1) acquiring a near infrared spectrum of a gasoline sample with a known octane number, and establishing a correction set and an optional verification set; (2) obtaining a difference spectrum of a correction set near infrared spectrum and an octane value difference value corresponding to the difference spectrum according to the same difference subtraction method; (3) establishing a correlation model between the difference spectrum of the near infrared spectrum of the correction set and the difference value of the octane number; (4) and (3) determining the near infrared spectrum of the gasoline sample to be detected, finding the spectrum closest to the gasoline sample to be detected from the correction set, calculating the difference spectrum between the spectrum and the spectrum, calculating the octane number difference value corresponding to the difference spectrum through the correlation model in the step (3), and adding the octane number difference value and the octane number of the gasoline sample corresponding to the closest spectrum to obtain the octane number of the gasoline to be detected. The method has the advantages of high analysis speed, accurate test and good repeatability, and is suitable for quickly predicting the octane number of a gasoline sample.

Description

Method for predicting gasoline octane number
Technical Field
The invention relates to a method for predicting the octane number of gasoline, in particular to a method for predicting the octane number of gasoline by utilizing near infrared spectrum.
Background
Octane number is an important quality index of gasoline, and the grade of gasoline is generally named as octane number, so that the correct measurement of the octane number is very important. The traditional method for measuring the octane number of gasoline is a bench test, but the operation and maintenance are complex, the operation cost is high, and therefore the measurement cost is high. Near Infrared (NIR) spectroscopy has the advantages of rapid measurement, on-line analysis, and the like, and thus has received extensive attention and research.
Quantitative spectroscopic analysis is an emerging, rapid analytical technique that, in combination with chemometrics and computer technology, allows rapid quantification of a subject. In recent years, the combination of infrared and near infrared spectroscopy and multivariate analysis methods has been developed in various fields. Petroleum and petrochemical products are mainly hydrocarbons, and the properties of the products are mostly determined by the composition of the products, which is the basis for the infrared spectrum analysis technology to be used for property prediction of the petroleum and petrochemical products. The infrared and near infrared spectrum technology has the advantages of simple operation, high precision, high analysis speed and the like, and is very suitable for quantitative and qualitative analysis of crude oil and oil products. The essence of the near infrared spectroscopy for rapidly determining the octane number of the gasoline is to establish a mathematical model of spectral data and the octane number by utilizing rich information provided by C-H vibration frequency doubling signals of the gasoline in a near infrared spectral region, establish a steady quantitative correction model at the core of rapid oil product analysis by infrared and near infrared spectral (NIR) analysis technologies, and establish a linear correction method commonly used for modeling, such as Multivariate Linear Regression (MLR), Partial Least Squares (PLS) and the like.
However, if the spectrum collection condition changes after the instrument is operated for a period of time, the prediction accuracy of the model will be obviously deteriorated, so-called out-of-range samples are generated, and the out-of-range samples of the model include three types: a concentration out-of-range sample, namely detecting whether the concentration of the unknown sample exceeds the concentration range of the correction sample by using the Mahalanobis Distance (MD); detecting whether the unknown sample contains components which do not exist in the correction set sample by using a spectral residual root mean square (RMSSR) sample; and (4) detecting whether the unknown samples are positioned in the area with sparse sample distribution in the correction set by using the nearest neighbor distance. When any one of the spectral residual, the mahalanobis distance and the nearest neighbor distance of the unknown sample exceeds the corresponding threshold, the sample is an out-of-model sample, the accuracy of the prediction result of the sample is greatly questioned, and in order to improve the robustness (or adaptability) of the model, the out-of-model sample can be added into the correction set to be modeled again so as to improve the trial range of the model, but if the number of the samples is too small, the sample can be hardly accepted by the model.
The method is established in ' research on establishing a general near-infrared correction model for finished gasoline by support vector regression ' (academic press of analysis and test, 2008, 27 (6): 619-622) '), aiming at the problems existing in the existing method for establishing a finished gasoline analysis model by adopting a partial least square method, a plurality of general correction models for gasoline labels are established by adopting a support vector regression method emerging in recent years, the prediction capability of the correction models is superior to that of a corresponding partial least square method, the standard deviations of the octane number, the olefin and the aromatic hydrocarbon of a gasoline research method are respectively 0.37%, 1.28% and 1.38%, and the correction models can be applied to near-infrared spectrum online analysis of automatic blending of actual gasoline pipelines.
In the article of artificial neural network for near infrared spectrum prediction of gasoline octane number (scientific analysis report 2006, 22 (1): 71-74), the article by the high handsome studies the association prediction of BP Artificial Neural Network (ANN) method between the gasoline octane number and its near infrared spectrum absorbance, adopts 35 actual gasoline sample data, establishes a BP artificial neural network model for predicting the gasoline octane number by using the near infrared spectrum absorbance of the gasoline, compares the calculation results of all the octane numbers with the actual measurement values, and obtains the calculation error of the prediction value and the actual measurement value less than 1.55.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method for predicting the octane number of gasoline by using near infrared spectrum, which has the advantages of high analysis speed, accurate test and good repeatability.
The invention provides a method for predicting the octane number of gasoline, which comprises the following steps:
(1) acquiring a near infrared spectrum of a gasoline sample with a known octane number, and establishing a correction set and an optional verification set;
(2) obtaining a difference spectrum of a correction set near infrared spectrum and an octane value difference value corresponding to the difference spectrum according to the same difference subtraction method;
(3) establishing a correlation model between the difference spectrum of the near infrared spectrum of the correction set and the difference value of the octane number;
(4) and (3) determining the near infrared spectrum of the gasoline sample to be detected, finding the spectrum closest to the gasoline sample to be detected from the correction set, calculating the difference spectrum between the spectrum and the spectrum, calculating the octane number difference value corresponding to the difference spectrum through the correlation model in the step (3), and adding the octane number difference value and the octane number of the gasoline sample corresponding to the closest spectrum to obtain the octane number of the gasoline to be detected.
According to the invention, optionally, in step (1), n gasoline samples of known octane number are collected, and the near infrared spectrum of each sample is collected as a calibration set, wherein n is an integer greater than or equal to 5; optionally, one or more finished gasoline samples are randomly selected as a validation set.
According to the invention, optionally, in the step (1), differential preprocessing is performed on the absorbance variable of the near-infrared spectrum in the correction set, a preset spectrum region is selected, a spectrum matrix X containing n spectra is obtained, and an octane number matrix Y containing n octane numbers is obtained according to the octane number in the gasoline sample corresponding to the correction set. The differential preprocessing may be first order differential preprocessing or second order differential preprocessing.
According to the present invention, in step (1), preferably, the wave number is selected to be 7000-7500cm-1And/or 8200-8700cm-1The spectral region of (a) serves as a preset spectral region.
According to the present invention, in step (1), the near infrared spectrum of each sample may be collected at room temperature, or may be collected at a temperature higher than or lower than room temperature, as long as it is collected at the same temperature, and is not particularly limited.
According to the invention, in the step (1), preferably, the spectrum 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 correction set, so as to obtain the spectrum matrix XSAnd octane number matrix YS
According to the invention, in step (1), in the spectral matrix XSHaving n spectra from 1 st to n th, in octane number matrix YSHaving n octane numbers corresponding to said n gasoline samples, the 1 st octane number being an octane number matrix YSThe lowest value in the index table corresponds to the gasoline sample with the lowest octane number, and the nth octane number is the octane number matrix YSThe highest value in the above-mentioned range corresponds to a gasoline sample with the highest octane number, and the same octane number may correspond to one gasoline sample or a plurality of gasoline samples.
According to the invention, optionally, in step (2), the spectral matrices X are calculated separately in the same subtraction calculation methodSDifference spectrum between middle n spectra and octane number matrix YSAnd obtaining a difference spectrum matrix containing n 'spectra and an octane difference value matrix containing n' octane difference values by the difference value among the n octane numbers.
According to the invention, in step (2), preferably, the spectral matrices X are calculated separately in the same subtraction calculation methodSRespectively calculating the difference spectrum between the ith spectrum and the 1 st to (i-1) th spectraSThe difference between the ith octane number and the 1 st to (i-1) th octane numbers to obtain a difference spectrum matrix X containing (n-1) X n/2 spectracAnd an octane number difference matrix Y comprising (n-1). times.n/2 octane number differencesc(ii) a Wherein i is an integer greater than 1 and less than or equal to n. Because of the large number of spectra in the difference spectrum matrix, part of the spectra in the difference spectrum matrix can be selected as the correction set at regular intervals, for example, the 1 st, 6 th, 11 th, and … in the difference spectrum matrix can be selected as the correction set in sequence.
According to the present invention, in step (3), preferably, the difference spectrum matrix X is established by using a multiple regression analysis methodcAnd the octane number difference matrix ycIncluding one or more of Partial Least Squares (PLS), Multiple Linear Regression (MLR) and Principal Component Regression (PCR), and more preferably, the difference spectrum matrix X is established using the partial least squares methodcAnd the octane number difference matrix ycThe correlation model of (1).
According to the invention, in step (3), optionally, a gasoline sample with a known octane number is used to form a verification set, a near infrared spectrum of the gasoline sample is obtained, a difference spectrum of the near infrared spectrum of the verification set and an octane number difference value corresponding to the difference spectrum are obtained according to the same subtraction method, and the difference spectrum and the octane number difference value are substituted into the correlation model to calculate the octane number, so that the accuracy of the correlation model is verified.
According to the invention, in step (4), preferably, the spectrum closest to the gasoline sample to be tested is found from the spectrum matrix X by calculating a moving window correlation coefficient or euclidean distance.
According to the present invention, in step (4), preferably, the calculation method of the moving window correlation coefficient Q is:
Figure BDA0002719266480000031
wherein r ispIs a correlation coefficient, p is the serial number of the moving window, and n is the total number of the moving windows;
the correlation coefficient rpThe calculation formula of (a) is as follows:
Figure BDA0002719266480000032
in the formula (I), the compound is shown in the specification,
Figure BDA0002719266480000033
respectively is the average value of absorbances of all wavenumber points of the ith spectrum or the jth spectrum interval, n is the wavenumber sampling point number, k is the wavenumber sampling number, xik、xjkRespectively the ith and jth spectra or k absorbance variables within the spectral interval. The closer the two spectra are, the closer the absolute value of the moving window correlation coefficient between them is to 1.
According to the present invention, in step (4), preferably, the euclidean distance is calculated by:
Figure BDA0002719266480000041
where n is the dimension of the variable, J, K are two spectral samples, Ji,kiAnd J, K is the ith absorbance of the two spectral samples.
The method has the advantages of high analysis speed, accurate test and good repeatability, and is suitable for quickly predicting the octane number of a gasoline sample.
Drawings
FIG. 1 is a graph comparing the octane number actual value and the octane number predicted value obtained by the method of the present invention.
FIG. 2 is a graph comparing the octane number actual value and the octane number predicted value obtained by the comparative example method of the present invention.
Detailed Description
The method adopts a near infrared spectrum which is simple and convenient to operate to measure the octane number of the gasoline, enlarges the correction set range by calculating a difference spectrum, selects a characteristic spectrum region of the near infrared spectrum to carry out difference spectrum processing, correlates the difference spectrum with the octane number of a gasoline sample, establishes a correlation model by multivariate regression analysis, and can predict the octane number of the gasoline sample to be measured by the spectrum of an unknown sample in the selected characteristic spectrum region through the correlation model.
Near infrared spectroscopy is generated by vibrational-rotational energy level transitions of molecules. Conventionally, the wavelength is usually 2500 to 25000nm (wave number is 4000 to 400 cm)-1) The spectral region is called as middle infrared (infrared for short) region, and the wavelength is 780-2500 nm (wave number 12820-4000 cm)-1) The spectral region of (a) is called the near infrared region.
When the correlation model is established, the more the number of the selected samples is, the more accurate and reliable the established model is. However, in practice, to reduce the workload, an appropriate number of samples covering all possible predicted values are generally selected, and the number of samples of different types is preferably 300-500, and if the number of difference spectrum matrices is large, one sample is taken for every 5 samples of the difference spectrum matrix and the octane number matrix as a correction set sample (for example, the number of samples may be 1 st, 6 th, 11 th, …).
To verify the accuracy of the correlation model, gasoline samples are typically divided into a correction set and a validation set. The sample number of the correction set is relatively large and representative, namely the octane number in the gasoline sample of the correction set is covered by the octane number in all the gasoline samples determined in advance. And the verification set is randomly extracted and used as an unknown sample to verify the accuracy of the correlation model. In the present invention, the validation set sample may be a collected sample of the product gasoline from each refinery.
The near infrared spectrum is measured by a near infrared spectrometer, and then the absorbance variable of the spectrum of the selected spectral region can be subjected to first-order or second-order differential processing to eliminate interference.
The correlation model is a mathematical relationship between the difference spectrum and the octane difference. Sequencing the spectrum matrix X and the octane number matrix y from low to high according to the octane number to obtain the spectrum matrix XSAnd octane number matrix yS. Calculating a difference spectrum, namely calculating the difference spectrum of the ith spectrum, the difference spectrum of the 2 nd spectrum, … and the difference spectrum of the (i-1) th spectrum respectively, wherein i is an integer between 1 and n; i.e. to the spectral matrix XS2 spectrum: calculating a difference spectrum with the 1 st spectrum, and for the 3 rd spectrum: respectively calculating a difference spectrum with the 1 st spectrum and a difference spectrum with the 2 nd spectrum; for the 4 th spectrum: respectively calculating a difference spectrum with the 1 st spectrum, a difference spectrum with the 2 nd spectrum and a difference spectrum with the 3 rd spectrum; by analogy, for the spectral matrix XSThe 1+2+3+ … + (n-1) difference spectrum can be obtained from the n spectra. For octane number matrix YSThe same subtraction calculation was also performed to obtain 1+2+3+ … + (n-1) octane number differences corresponding to the difference spectrum.
The method preferably adopts Partial Least Squares (PLS) to establish a correlation model, and then uses a verification set sample at 7000-7500cm-1And/or 8200-8700cm-1And substituting the spectrum of the spectrum region into the correction model to predict the octane number of the spectrum region, and comparing the octane number with the actual octane number of the spectrum region to verify the accuracy of the model.
The method of the present invention for establishing a correlation model using Partial Least Squares (PLS) is described below as follows:
PLS algorithm
Firstly, a spectrum matrix X (n multiplied by m) and an octane number matrix Y (n multiplied by 1) are decomposed as follows, wherein n is the number of samples, and m is the number of absorbance wavelength points in a characteristic spectrum region, namely the number of sampling points of absorbance in the characteristic spectrum region.
Figure BDA0002719266480000051
Figure BDA0002719266480000052
Wherein: t is tk(n × 1) is the score of the k-th principal factor of the spectral matrix X;
pk(1 xm) is the loading of the kth principal factor of the spectral matrix X;
uk(n × 1) is the score of the kth main factor of the concentration matrix Y;
qk(1 × 1) the load of the k-th main factor of the density matrix Y; f is the number of major factors. Namely: t and U are the scoring matrices of the X and Y matrices, respectively, P and Q are the loading matrices of the X and Y matrices, respectively, EXAnd EYThe residual matrices are fitted to the PLS for X and Y, respectively.
The second step is to make linear regression of T and U:
U=TB
B=(TTT)-1TTY
in prediction, firstly, an unknown sample spectrum matrix X is obtained according to PIs unknownScore T ofIs unknownThen, the predicted value of the concentration is obtained by the following formula: y isIs unknown=TIs unknownBQ。
Usually, the PLS algorithm combines matrix decomposition and regression into one step, i.e. the decomposition of X and Y matrices is performed simultaneously, and the information of Y is introduced into the X matrix decomposition process, and the score T of X is exchanged with the score U of Y before each new principal component is calculated, so that the obtained X principal component is directly associated with Y.
The PLS algorithm is preferably calculated according to the nonlinear iterative partial least squares algorithm (NIPALS) proposed by H Wold, which is as follows:
for the correction procedure, ignoring the residual matrix E, the number of main factors taken to be 1 is:
for X ═ tpTLeft-hand multiplication by tTObtaining: p is a radical ofT=tTX/tTt; right multiplying by p: t is Xp/pTp。
For Y ═ uqTLeft multiplying uTObtaining: q. q.sT=uTY/uTu, both sides are divided by qTObtaining: u-Y/qT
(1) Calculating the weight vector w of the absorbance matrix X
Taking a certain column (only one column in the present invention) of the concentration matrix Y as the initial iteration value of u, replacing t with u, and calculating w
The equation is: x ═ uwTThe solution is: w is aT=uTX/uTu
(2) Normalizing the weight vector w
wT=wT/||wT||
(3) Calculating the factor score t of the absorbance matrix X, and calculating t from the normalized w
The equation is: x ═ twTThe solution is: t is Xw/wTw
(4) Obtaining the load q value of the concentration matrix Y, and calculating q by replacing u with t
The equation is: tq ═ YTThe solution is: q. q.sT=tTY/tTt
(5) Normalizing the load q
qT=qT/||qT||
(6) Calculating a factor score u of the density matrix Y from qTCalculating u
The equation is: y ═ uqTThe solution is: u is Yq/qTq
(7) Then, u replaces t to return to the step (1) for calculating wTFrom wTCalculating tNewIterating so repeatedly if t has converged (II t)New-tOld age‖≤10-6‖tNew|), and (4) carrying out the operation in the step (8), and otherwise, returning to the step (1).
(8) Calculating the load vector p of the absorbance matrix X from the converged t
The equation is: x ═ tpTThe solution is: p is a radical ofT=tTY/tTt
(9) Normalizing the load p
pT=pT/||pT||
(10) Normalizing the factor score t of X
t=t||p||
(11) Normalized weight vector w
w=w||p||
(12) Calculating the internal relation b between t and u
b=uTt/tTt
(13) Computing residual matrix E
EX=X-tpT
EY=Y-btqT
(14) With EXIn place of X, EYInstead of Y, the procedure returns to step (1), and so on, to find X, Y the main factors of w, t, p, u, q, b. Determining the optimal main factor number f by using an interactive inspection method, and storing wf、pf、qf
Octane number y of gasoline sample to be testedunThe prediction process of (2) is as follows:
xuncalling the stored w for the absorbance of the gasoline sample to be detected in the characteristic spectrum regionf、pf、qf
yun=ynear+bPLSxunWherein b isPLS=wf T(pfwf T)-1qf,ynearIs equal to xunOctane number of the closest correction set sample.
The method is suitable for the prediction analysis of the gasoline octane number.
The present invention is illustrated in detail below by way of examples, but the present invention is not limited thereto.
Example 1
And establishing a correlation model of the gasoline octane number and verifying the correlation model.
(1) Establishing a correction set and a verification set of the near infrared spectrum of the gasoline sample;
200 finished product motor gasoline samples covering all brands produced by a refinery are respectively collected, and the near infrared spectrums of the 200 samples are collected at room temperature, wherein 60 samples are used as correction sets, and 140 samples are used as verification sets. The octane number measured values of 200 samples are obtained by the national standard GB/T5487-2015 experiment. The near infrared spectrum of the gasoline sample is collected by a Thermo Antaris II near infrared spectrometer in a transmission mode, a headspace bottle with the optical path of 0.5cm is used as an accessory, and the collection temperature is room temperature.
The acquisition method comprises the following steps: injecting a gasoline sample into a headspace bottle, performing spectrum scanning with air as reference, wherein the scanning frequency is 128 times, and the scanning range is 10000-3500cm-1Resolution of 8cm-1
(2) Obtaining a difference spectrum of a correction set near infrared spectrum and an octane value difference value corresponding to the difference spectrum according to the same difference subtraction method;
subjecting the obtained near infrared spectrum to second order differential treatment, and collecting wave number of 7000-7500cm-1And 8200-8700cm-1The absorbance forms a spectrum matrix X, the octane number in the gasoline forms an octane number matrix Y, and the spectrum matrix X and the octane number matrix Y are sequenced from low to high according to the octane number to obtain the spectrum matrix XSAnd octane number matrix YS
Calculating a difference spectrum for the spectral matrix XSSecond spectrum x of2Calculating the first spectrum x1Difference spectrum x of2-x1(ii) a For the third spectrum x3Separately calculating the first spectrum x1Difference spectrum x of3-x1A difference spectrum x from the second spectrum3-x2(ii) a For the fourth spectrum x4Separately calculating the first spectrum x1Difference spectrum x of4-x1And a second spectrum x2Difference spectrum x of4-x2And the third spectrum x3Difference spectrum x of4-x3(ii) a By analogy, for the spectral matrix XSThe sum of the obtained 1+2+3+ … + (n-1) difference spectra is 1770 to form a spectrum difference spectrum matrix Xc. For octane number matrix YSThe same subtraction calculation is also made for the octane matrix YSSecond octane number y of2Calculating the first octane number y1Difference y of2-y1(ii) a For a third octane number y3Respectively calculating the first octane number y1Difference y of3-y1The difference y from the second octane number3-y2(ii) a For the fourth octane number y4Respectively calculating the first octane number y1Difference y of4-y1And a second octane number y2Difference y of4-y2And a third octane number y3Difference y of4-y3(ii) a By analogy, the octane number matrix YSObtaining corresponding 1+2+3+ … + (n-1) octane number difference values from the n octane numbers to form an octane number difference value matrix Yc
(3) Establishing a correlation model between the difference spectrum of the correction set near infrared spectrum and the difference value of the octane number
Will be the difference spectrum matrix XcMatrix Y of difference from octane numbercThe correlation model is built by Partial Least Squares (PLS), the relevant statistical parameters used for building the model are shown in Table 1, the prediction standard deviation RMSEP and the decision coefficient R2The calculation formula of (c) is as follows.
Figure BDA0002719266480000081
Wherein m is the total number of samples in the verification set, n is the total number of samples in the correction set, yi,actualIs a measured value of a standard method, yi,predictedFor predictive values, RMSEP is the prediction standard deviation, R2To determine the coefficients.
(4) The accuracy of the correlation model is verified by taking the verification set samples as samples with unknown octane number
And (3) measuring and verifying the near infrared spectrum of each gasoline sample in the centralized manner according to the method in the step (2) and performing the same spectral processing. Firstly, respectively finding out the nearest spectrum to each verification set sample (assumed as a sample to be detected) from the spectrum matrix X by calculating the correlation coefficient of the moving window, respectively calculating the difference spectrum between the spectrum and the sample to be detected, calculating the octane number corresponding to the difference spectrum by using the correlation model obtained in the step (3), and finally obtaining the octane number by adding the octane number of the nearest sample and the octane number difference value calculated by the correlation model.
TABLE 1 statistics of parameters
Figure BDA0002719266480000082
FIG. 1 is a graph showing the comparison between the octane number predicted value and the actual value obtained by the method of the present invention. As can be seen from Table 1 and FIG. 1, RMSEP (predicted standard deviation) is only 0.33, and it can be seen that the method of the present invention can predict the octane number of a gasoline sample more accurately.
Comparative example 1
And establishing a correlation model of the gasoline octane number and verifying the correlation model.
Step (1) was the same as in example 1.
(2) Establishing a correlation model between near infrared spectrum and octane number of a correction set
Subjecting the obtained near infrared spectrum to second order differential treatment, and collecting wave number of 7000-7500cm-1And 8200-8700cm-1The absorbance forms a spectrum matrix X, the octane number of the gasoline forms an octane number matrix Y, a correlation model between the near infrared spectrum of the gasoline and the octane number is established by using the spectrum matrix X and the octane number matrix Y through a Partial Least Squares (PLS), and relevant statistical parameters used for establishing the model are shown in a table 2.
(3) The accuracy of the correlation model is verified by taking the verification set samples as samples with unknown octane number
Measuring and verifying the near infrared spectrum of each gasoline sample (assumed to be a sample to be detected) in the same method as the step (1), and after second-order differential treatment, taking the wave number of 7000-7500cm-1And 8200-8700cm-1And (3) substituting the absorbance into the correlation model between the gasoline near infrared spectrum and the octane number established in the step (2) to obtain an octane number predicted value, and comparing the octane number predicted value with the octane number actually measured. The relevant statistical parameters of the predicted values and the actual values are shown in the table 2, and the comparison of the prediction set and the actual values is shown in the table 2. It can be seen that the prediction result is poor when the correction set samples are fewer.
TABLE 2 statistics of parameters
Figure BDA0002719266480000091
Example 2
And establishing a correlation model of the gasoline octane number and verifying the correlation model.
(1) Establishing a correction set and a verification set of the near infrared spectrum of the gasoline sample;
200 finished product motor gasoline samples covering all brands produced by a refinery are respectively collected, and the near infrared spectrums of the 200 samples are collected at room temperature, wherein 60 samples are used as correction sets, and 140 samples are used as verification sets. The octane number measured values of 200 samples are obtained by the national standard GB/T5487-2015 experiment. The near infrared spectrum of the gasoline sample is collected by a Thermo Antaris II near infrared spectrometer in a transmission mode, a headspace bottle with the optical path of 0.5cm is used as an accessory, and the collection temperature is room temperature.
The acquisition method comprises the following steps: injecting a gasoline sample into a headspace bottle, performing spectrum scanning with air as reference, wherein the scanning frequency is 128 times, and the scanning range is 10000-3500cm-1Resolution of 8cm-1
(2) Obtaining a difference spectrum of a correction set near infrared spectrum and an octane value difference value corresponding to the difference spectrum according to the same difference subtraction method;
subjecting the obtained near infrared spectrum to second order differential treatment, and collecting wave number of 7000-7500cm-1And 8200-8700cm-1The absorbance forms a spectrum matrix X, the octane number in the gasoline forms an octane number matrix Y, and the spectrum matrix X and the octane number matrix Y are sequenced from low to high according to the octane number to obtain the spectrum matrix XSAnd octane number matrix YS
Calculating a difference spectrum for the spectral matrix XSSecond spectrum x of2Calculating the first spectrum x1Difference spectrum x of2-x1(ii) a For the third spectrum x3Separately calculating the first spectrum x1Difference spectrum x of3-x1A difference spectrum x from the second spectrum3-x2(ii) a For the fourth spectrum x4Separately calculating the first spectrum x1Difference spectrum x of4-x1And a second spectrum x2Difference spectrum x of4-x2And the third spectrum x3Difference spectrum x of4-x3(ii) a By analogy, for the spectral matrix XSThe sum of the obtained 1+2+3+ … + (n-1) difference spectra is 1770 to form a spectrum difference spectrum matrix Xc. For octane number matrix YSThe same subtraction calculation is also made for the octane matrix YSSecond octane number y of2Calculating the first octane number y1Difference y of2-y1(ii) a For a third octane number y3Respectively calculating the first octane number y1Difference y of3-y1The difference y from the second octane number3-y2(ii) a For the fourth octane number y4Respectively calculating the first octane number y1Difference y of4-y1And a second octane number y2Difference y of4-y2And a third octane number y3Difference y of4-y3(ii) a By analogy, the octane number matrix YSObtaining corresponding 1+2+3+ … + (n-1) octane number difference values from the n octane numbers to form an octane number difference value matrix Yc. Taking 1 spectrogram as a correction set sample X at intervals of 5 difference spectrums from the 1 st spectrogram in sequencec’=[xc1,xc6,xc11,xc16,…],Yc’=[yc1,yc6,yc11,yc16,…]。
(3) Establishing a correlation model between the difference spectrum of the correction set near infrared spectrum and the difference value of the octane number
Will be the difference spectrum matrix XcMatrix Y of difference from octane numbercThe correlation model was established using Partial Least Squares (PLS) and the relevant statistical parameters used to establish the model are shown in Table 3.
(4) The accuracy of the correlation model is verified by taking the verification set samples as samples with unknown octane number
And (3) measuring and verifying the near infrared spectrum of each gasoline sample in the centralized manner according to the method in the step (2) and performing the same spectral processing. Firstly, respectively finding out the nearest spectrum to each verification set sample (assumed as a sample to be detected) from the spectrum matrix X by calculating the correlation coefficient of the moving window, respectively calculating the difference spectrum between the spectrum and the sample to be detected, calculating the octane number corresponding to the difference spectrum by using the correlation model obtained in the step (3), and finally obtaining the octane number by adding the octane number of the nearest sample and the octane number difference value calculated by the correlation model.
TABLE 3 parameter statistics
Figure BDA0002719266480000111
As can be seen from table 3, RMSEP (predicted standard deviation) was 0.39, and the predicted result was slightly inferior to that of example 1. Example 3 instead of using all 1770 difference spectrum samples as the correction set, the first sample is presented in the correction set from every 5 samples in sequence, totaling 354 samples constituting the difference spectrum matrix Xc1And predicting after modeling.

Claims (11)

1. A method of predicting the octane number of a gasoline, comprising the steps of:
(1) acquiring a near infrared spectrum of a gasoline sample with a known octane number, and establishing a correction set and an optional verification set;
(2) obtaining a difference spectrum of a correction set near infrared spectrum and an octane value difference value corresponding to the difference spectrum according to the same difference subtraction method;
(3) establishing a correlation model between the difference spectrum of the near infrared spectrum of the correction set and the difference value of the octane number;
(4) and (3) determining the near infrared spectrum of the gasoline sample to be detected, finding the spectrum closest to the gasoline sample to be detected from the correction set, calculating the difference spectrum between the spectrum and the spectrum, calculating the octane number difference value corresponding to the difference spectrum through the correlation model in the step (3), and adding the octane number difference value and the octane number of the gasoline sample corresponding to the closest spectrum to obtain the octane number of the gasoline to be detected.
2. The method according to claim 1, wherein in step (1), n samples of gasoline of known octane number are collected, and the near infrared spectrum of each sample is collected as a calibration set, n being an integer greater than or equal to 5.
3. The method according to claim 1, wherein in step (1), the absorbance variable of the near-infrared spectrum in the calibration set is subjected to differential preprocessing, a predetermined spectral region is selected to obtain a spectral matrix X comprising n spectra, and an octane matrix y comprising n octane numbers is obtained according to the octane numbers in the gasoline sample corresponding to the calibration set.
4. The method according to claim 1, wherein in step (1), the wave number is selected to be between 7000 and 7500cm-1And/or 8200-8700cm-1The spectral region of (a) serves as a preset spectral region.
5. The method according to claim 1, wherein in the step (1), the spectrum matrix X and the octane number matrix Y are ranked from low to high according to the octane number of the gasoline sample corresponding to the correction set, and the spectrum matrix X is obtainedSAnd octane number matrix YS
6. The method according to claim 1, wherein in step (2), the spectral matrices X are calculated separately in the same subtraction calculation methodSDifference spectrum between middle n spectra and octane number matrix YSAnd obtaining a difference spectrum matrix containing n 'spectra and an octane difference value matrix containing n' octane difference values by the difference value among the n octane numbers.
7. The method according to claim 1, wherein in step (2), the spectral matrices X are calculated separately in the same subtraction calculation methodSRespectively calculating the difference spectrum between the ith spectrum and the 1 st to (i-1) th spectraSThe difference between the ith octane number and the 1 st to (i-1) th octane numbers to obtain a difference spectrum matrix X containing (n-1) X n/2 spectracAnd an octane number difference matrix Y comprising (n-1). times.n/2 octane number differencesc(ii) a Wherein i is an integer greater than 1 and less than or equal to n.
8. The method of claim 1, wherein in step (3), the difference spectrum matrix X is established using a multivariate regression analysis methodcAnd the octane number difference matrix ycThe correlation model of (1) (the multiple regression analysis method comprises one or more of partial least squares, multiple linear regression, and principal component regression methods).
9. The method according to claim 1, wherein in step (3), a gasoline sample with a known octane number is used to form a verification set, a near infrared spectrum of the gasoline sample is obtained, a difference spectrum of the near infrared spectrum of the verification set is obtained according to the same subtraction method, and an octane number difference value corresponding to the difference spectrum is substituted into the correlation model to calculate the octane number, so as to verify the accuracy of the correlation model.
10. 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 a moving window correlation coefficient or Euclidean distance.
11. The method of claim 10, wherein in step (4), the moving window correlation coefficient Q is calculated by:
Figure FDA0002719266470000021
wherein r ispIs a correlation coefficient, p is the serial number of the moving window, and n is the total number of the moving windows;
the correlation coefficient rpThe calculation formula of (a) is as follows:
Figure FDA0002719266470000022
in the formula (I), the compound is shown in the specification,
Figure FDA0002719266470000023
respectively is the average value of absorbances of all wavenumber points of the ith spectrum or the jth spectrum interval, n is the wavenumber sampling point number, k is the wavenumber sampling number, xik、xjkRespectively is the ith and jth spectrum or the k absorbance variable in the spectrum interval;
the calculation method of the Euclidean distance comprises the following steps:
Figure FDA0002719266470000024
where n is the dimension of the variable, J, K are two spectral samples, Ji,kiAnd J, K is the ith absorbance of the two spectral samples.
CN202011082720.9A 2020-10-12 2020-10-12 Method for predicting gasoline octane number Pending CN114428067A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011082720.9A CN114428067A (en) 2020-10-12 2020-10-12 Method for predicting gasoline octane number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011082720.9A CN114428067A (en) 2020-10-12 2020-10-12 Method for predicting gasoline octane number

Publications (1)

Publication Number Publication Date
CN114428067A true CN114428067A (en) 2022-05-03

Family

ID=81310012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011082720.9A Pending CN114428067A (en) 2020-10-12 2020-10-12 Method for predicting gasoline octane number

Country Status (1)

Country Link
CN (1) CN114428067A (en)

Similar Documents

Publication Publication Date Title
US6897071B2 (en) Topological near infrared analysis modeling of petroleum refinery products
CN107703097B (en) Method for constructing model for rapidly predicting crude oil property by using near-infrared spectrometer
CN109324013B (en) Near-infrared rapid analysis method for constructing crude oil property by using Gaussian process regression model
CN101995389B (en) Method for fast recognition of crude oil variety through near infrared spectrum
CN109324014B (en) Self-adaptive near-infrared rapid prediction method for crude oil properties
He et al. A novel adaptive algorithm with near-infrared spectroscopy and its application in online gasoline blending processes
EP0846253A1 (en) Biological fluid analysis using distance outlier detection
CN102841069B (en) Method for rapidly identifying types of crude oil by using mid-infrared spectrum
WO2006126978A1 (en) Topological near infrared analysis modeling of petroleum refinery products
CN115993344A (en) Quality monitoring and analyzing system and method for near infrared spectrum analyzer
CN116559110A (en) Self-adaptive near infrared spectrum transformation method based on correlation and Gaussian curve fitting
CN113158575A (en) Method for transferring online near-infrared spectrum model of assumed standard sample
CN112179871A (en) Method for nondestructive detection of caprolactam content in sauce food
CN107966499B (en) Method for predicting crude oil carbon number distribution by near infrared spectrum
CN107966420B (en) Method for predicting crude oil property by near infrared spectrum
CN110672578A (en) Model universality and stability verification method for polar component detection of frying oil
CN108120694B (en) Multi-element correction method and system for chemical component analysis of sun-cured red tobacco
CN114428067A (en) Method for predicting gasoline octane number
CN114624402B (en) Quality evaluation method for snail rice noodle sour bamboo shoots based on near infrared spectrum
CN114166792A (en) Method for determining ethanol content in gasoline
CN112229816B (en) Wood elastic modulus prediction method based on OPLS-SPA-MIX-PLS
CN113793652A (en) Spectrogram chemometrics analysis method based on segmented intelligent optimization
WO2024011687A1 (en) Method and apparatus for establishing oil product physical property fast evaluation model
CN111829976A (en) Method for predicting composition of gasoline fraction hydrocarbon group of crude oil by near infrared spectrum
CN110646371A (en) Method for measuring water content of tobacco essence perfume

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination