Oil Prediction Method Based on Near-Infrared Spectroscopy
By performing the method of segmented similarity calculation and target feature sample determination on near-infrared spectral data, the problems of complexity and error of oil product prediction models in the prior art are solved, and high-accuracy oil product data prediction is achieved, especially In the prediction of 50% evaporation temperature, the error is controlled within 1.41°C.
Patent Information
- Application Number
- CN202410136265.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-30
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-01-30
AI Technical Summary
The existing near-infrared spectral analysis technology has problems such as complex model, large calculation volume and large prediction errors in specific oil product parameters in oil product properties measurement, which limits the prediction accuracy and robustness.
Using near-infrared spectral analysis method, a characteristic sample library is formed by collecting the information of refined oil samples, measuring the near-infrared spectral data of the sample to be measured and correcting. The spectral data are segmented according to the wavenumber interval of characterizing the oil product data, and calculating The similarity between the sample to be tested and the characteristic sample is determined based on the preset similarity threshold for oil product data prediction.
A simple and high-accuracy oil prediction model is realized, with high practical value and small prediction errors, especially in the prediction of 50% evaporation temperature, the error does not exceed 1.41°C.
Smart Images

Figure CN117972491B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil product inspection, and in particular to an oil product prediction method based on near infrared spectroscopy analysis. Background Art
[0002] Molecular vibration is generated when the molecular state transitions to a high energy level. The near-infrared spectrum mainly records the frequency-over-frequency and frequency-combination absorption of gas-containing groups CH (methyl, methylene, methoxy, aromatic, etc.), OH (hydroxyl, antelope, etc.), NH (primary amine, secondary amine, tertiary amine and salt, etc.), and SH. The near-infrared absorption wavenumbers and intensities of different groups or the same group in different chemical environments are significantly different. Crude oil has rich structural and composition information and is very suitable for measuring the composition properties of hydrocarbon organic substances. Specifically, the methyl aromatics and methylene carbon-hydrogen stretching vibrations in alkanes show characteristic absorption wavenumbers in the infrared region. These characteristic wavenumbers can be used for oil quality testing, such as determining the concentration and composition of oil products. Although the application of near-infrared spectroscopy analysis technology in the measurement of oil properties is very extensive, and there are many related research papers and reports, there are still some technical difficulties in the modeling process, which limit the accuracy and robustness of near-infrared model predictions.
[0003] Patent CN107958267A discloses a method for predicting oil properties based on spectral linear representation; principal component analysis is performed on the near-infrared spectral data of the calibration set and the test sample, the first k principal components in the score matrix obtained by the principal component analysis are extracted to establish the principal component space, and the n oil samples in the calibration set closest to the test sample are found in the principal component space based on the Euclidean distance, which are called neighboring samples; the near-infrared spectral weights w of the neighboring samples are calculated; the property values of the neighboring samples are weighted using the near-infrared spectral weights w, that is, the property value prediction of the test sample is obtained. Patent CN106407648A discloses a method for rapid batch prediction of key properties of gasoline, which is based on the near-infrared spectrum of gasoline. First, the baseline correction, interception and vector normalization methods are used for spectral preprocessing, and then the coefficient matrix is obtained by fast Fourier transform and BP neural network training is performed, and finally the batch prediction of key properties of gasoline is performed. The above methods are all based on the prediction of feature samples of near-infrared spectra and oil data based on similarity, but the above methods have the problems of large and complex models, large amount of calculations, and large prediction errors for certain specific oil parameters. Summary of the invention
[0004] The present invention provides an oil product prediction method based on near infrared spectroscopy analysis, which adopts the following technical solutions:
[0005] Step 1: Collect multiple refined oil sample information to form a feature sample library, wherein the refined oil sample information includes oil product data and near infrared spectrum data.
[0006] Step 2: measure the near infrared spectrum data of the sample to be tested and perform correction processing to obtain the spectrum correction data of the sample to be tested.
[0007] Step 3, after segmenting the spectral correction data according to the wave number intervals characterizing the oil product data, segmentally calculate the similarity between the sample to be tested and the characteristic samples in the characteristic sample library.
[0008] Step 4: determine the target feature sample corresponding to each spectral segment based on a preset similarity threshold.
[0009] Step 5: providing a prediction result of the oil product data of the sample to be tested based on the target feature samples corresponding to each segment.
[0010] Furthermore, the wave number range of the near infrared spectrum is 3500-10000cm -1 .
[0011] The oil product data include: octane number, flash point and 50% evaporation temperature.
[0012] Furthermore, in step 2, the near infrared spectrum data of the sample to be tested is corrected using a base point method.
[0013] The near infrared spectrum of the sample to be tested is at wave number x i The absorbance at y i , select two base points (x1, y1) and (x2, y2) on the spectrum, and the equation of the line passing through the two base points is expressed as:
[0014]
[0015] Then the near infrared spectrum of the sample to be tested after correction is at wave number x i The absorbance at
[0016]
[0017] The base point wave number x1 ranges from 6500 to 7000 cm -1 , the base point wave number x2 ranges from 8000 to 8200 cm -1 .
[0018] Furthermore, in step 3, segmenting the spectral correction data according to the wave number intervals representing different oil product data includes:
[0019] The wave number range characterizing the 50% evaporation temperature is 4000-4800 cm -1 .
[0020] The wave number range characterizing the octane number is 7000-7500 cm -1and 8000~8700cm -1 Two paragraphs.
[0021] The wave number range characterizing the flash point is 5200-6300 cm -1 .
[0022] Furthermore, let the wave number interval of the spectrum segment L be [x l ,x l+m ], where x l is the starting wave number, x l+m is the end wave number, m is the interval width, and the similarity calculation formula between the spectral segment L and the nth feature sample in the feature sample library is:
[0023]
[0024] In the formula, S Ln is the similarity between the spectral segment L and the nth feature sample in the feature sample library, y ni is the nth characteristic sample at wave number x i The absorbance at .
[0025] Calculate the similarity between the spectral segment L and each feature sample in the feature sample library respectively, and sort them from high to low to obtain the maximum similarity S LMax , compare the maximum similarity with a preset similarity threshold, and when the maximum similarity S LMax When the maximum similarity S is greater than or equal to the preset similarity threshold, LMax The corresponding characteristic sample is the target characteristic sample, and the oil product data of the target characteristic sample is the predicted value of the oil product data represented by the sample to be tested in the spectral segment L.
[0026] Furthermore, the preset similarity threshold is 0.995. LMax When it is less than the preset similarity threshold, it is impossible to give a specific prediction value of the oil product data represented by the spectral segment L of the sample to be tested.
[0027] Furthermore, when the similarity S LMax When it is less than the preset similarity threshold, the prediction result is a numerical range; the numerical range is determined by the similarity sorting result and the relative position of the spectral segment L and the spectral segment of the characteristic sample, the characteristic peak of the spectral segment L is found, and the characteristic samples with the largest similarity above and below the characteristic peak are found respectively. The oil product data range corresponding to the two characteristic samples is the prediction result of the oil product data represented by the sample to be tested in the spectral segment L.
[0028] Compared with the prior art, the present invention has the following beneficial effects: after the present invention segments the spectral correction data according to the wavenumber intervals characterizing the oil product data, the similarity between the sample to be tested and the characteristic sample is calculated in segments, and the target characteristic sample is determined according to the similarity threshold to determine the predicted value of the oil product data. The prediction model of this method is simple, the accuracy is high, and it has high practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is a flow chart of the oil quality prediction method based on near infrared spectroscopy analysis of the present invention.
[0030] Figure 2 It is the near infrared spectrum diagram of the sample to be tested of the present invention. DETAILED DESCRIPTION
[0031] The following is a detailed calculation process and specific operation flow in conjunction with the accompanying drawings and specific examples to further illustrate the present invention. The spectral library in the embodiment uses 185 near-infrared spectra of 93# gasoline collected by a company and its actual measured oil product data. The wavenumber range of these near-infrared spectra is 3500~10000cm -1 The actual measured oil data include octane number, flash point and 50% evaporation temperature; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0032] Example
[0033] like Figure 1 FIG. 1 is a flow chart of an oil product prediction method based on near infrared spectroscopy analysis of the present invention, and the method comprises:
[0034] Step 1: Collect multiple refined oil sample information to form a feature sample library, wherein the refined oil sample information includes oil product data and near infrared spectrum data.
[0035] According to the above method, 185 near-infrared spectra and their actually measured oil product data are used to form a feature sample library, and the 50% evaporation temperature of the actually measured oil product data is predicted.
[0036] Step 2: measure the near infrared spectrum data of the sample to be tested and perform correction processing to obtain the spectrum correction data of the sample to be tested.
[0037] like Figure 2 As shown, it is the near infrared spectrum diagram of the sample to be tested of the present invention, and the base point method is used to correct the near infrared spectrum data of the sample to be tested.
[0038] The near infrared spectrum of the sample to be tested is at wave number x i The absorbance at y i, select two base points (x1, y1) and (x2, y2) on the spectrum, and the equation of the line passing through the two base points is expressed as:
[0039]
[0040] Then the near infrared spectrum of the sample to be tested after correction is at wave number x i The absorbance at
[0041]
[0042] The base point wave number x1 ranges from 6500 to 7000 cm -1 , the base point wave number x2 ranges from 8000 to 8200 cm -1 In the predicted values given in this embodiment, the base point wave number x1 is 6200cm -1 , the base point wave number x2 value range is 80000cm -1 .
[0043] Step 3, after segmenting the spectral correction data according to the wave number intervals characterizing the oil product data, segmentally calculate the similarity between the sample to be tested and the characteristic samples in the characteristic sample library.
[0044] It should be noted that segmenting the spectral correction data according to the wave number intervals representing different oil product data includes:
[0045] The wave number range characterizing the 50% evaporation temperature is 4000-4800 cm -1 The wave number range characterizing the octane number is 7000-7500cm -1 and 8000~8700cm -1 Two sections; the wave number range characterizing the flash point is 5200~6300cm -1 ; This implementation is to predict the octane number of the sample to be tested, so 4000 ~ 4800cm -1 The wave number interval is Figure 2 Medium 4800cm -1 and 4000cm -1 The spectrum data between the two dotted lines is segmented according to the wave number intervals representing different oil data, including: the wave number interval representing the 50% evaporation temperature is 4000-4800cm -1 The wave number range for characterizing the octane number is 7000-7500 cm -1 and 8000~8700cm -1 The wave number range characterizing the flash point is 5200-6300cm -1 .
[0046] Assume that the wave number interval of the spectrum segment L is [x l ,x l+m ], where x l is the starting wave number, x l+m is the end wave number, m is the interval width, and the similarity calculation formula between the spectral segment L and the nth feature sample in the feature sample library is:
[0047]
[0048] In the formula, S Ln is the similarity between the spectral segment L and the nth feature sample in the feature sample library, y ni is the nth characteristic sample at wave number x i The absorbance at .
[0049] Step 4: determine the target feature sample corresponding to each spectral segment based on a preset similarity threshold.
[0050] Calculate the similarity between the spectral segment L and each feature sample in the feature sample library respectively, and sort them from high to low to obtain the maximum similarity S LMax , compare the maximum similarity with a preset similarity threshold, and when the maximum similarity S LMax When the maximum similarity S is greater than or equal to the preset similarity threshold, LMax The corresponding characteristic sample is the target characteristic sample, and the oil product data of the target characteristic sample is the predicted value of the oil product data represented by the sample to be tested in the spectral segment L.
[0051] The preset similarity threshold is 0.995. The 50% evaporation temperature range of 93# gasoline is 81.6-106.6°C. The above method is used to calculate the similarity of 9 samples to be tested, and the numbers of the target feature samples are found as shown in Table 1. Among them, the maximum similarity between the test sample numbers Test 5 and Test 8 and the 185 samples in the feature sample library does not meet the preset similarity threshold, and the target feature samples with matching degree cannot be found.
[0052] Table 1 Target samples and similarity statistics of this embodiment
[0053]
[0054]
[0055] Step 5: providing a prediction result of the oil product data of the sample to be tested based on the target feature samples corresponding to each segment.
[0056] When the similarity S LMaxWhen it is less than the preset similarity threshold, it is impossible to give a specific prediction value of the oil product data represented by the spectral segment L of the sample to be tested.
[0057] When the similarity S LMax When it is less than the preset similarity threshold, the prediction result is a numerical range; the numerical range is determined by the similarity sorting result and the relative position of the spectral segment L and the spectral segment of the characteristic sample, the characteristic peak of the spectral segment L is found, and the characteristic samples with the largest similarity above and below the characteristic peak are found respectively. The oil product data range corresponding to the two characteristic samples is the prediction result of the oil product data represented by the sample to be tested in the spectral segment L.
[0058] The maximum similarity between the test sample numbers Test 5 and Test 8 and the 185 samples in the feature sample library does not meet the preset similarity threshold. After further searching and matching, the feature samples with the largest similarity above and below the feature peak of the test sample number Test 5 are Sample#107 and Sample#23, and the feature samples with the largest similarity above and below the feature peak of the test sample number Test 8 are Sample#45 and Sample#6. Based on the above method, the prediction result range of the oil product data of the test sample numbers Test 5 and Test 8 can be given. After actual measurement, Table 2 statistics the measurement errors for the 9 samples to be tested. Due to the numerical range given by Test 5 and Test8, the actual measured value is within the numerical range, and the error is considered to be 0.
[0059] Table 2 Prediction error of the method of this embodiment
[0060]
[0061]
[0062] It can be seen that the error between the predicted value and the actual measured value of the method implemented in this embodiment is very small. The maximum error of the prediction of the 50% evaporation temperature does not exceed 1.41°C, which can prove the accuracy of this method. The octane number and flash point can also be predicted by this method. It should be noted that since the wave number range of the octane number is 7000-7500cm -1 and 8000~8700cm -1 Therefore, when calculating the similarity, the two segments should be regarded as a whole to calculate the similarity between the sample to be tested and the feature samples in the feature sample library.
[0063] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. The oil quality prediction method based on near infrared spectroscopy analysis is characterized by: The method comprises: Step 1, collecting multiple refined oil sample information to form a feature sample library, wherein the refined oil sample information includes oil product data and near infrared spectrum data; Step 2, measuring the near infrared spectrum data of the sample to be tested and performing correction processing to obtain the spectrum correction data of the sample to be tested; Step 3, after segmenting the spectral correction data according to the wave number intervals characterizing the oil product data, segmentally calculating the similarity between the sample to be tested and the characteristic samples in the characteristic sample library; Step 4, determining the target feature sample corresponding to each spectral segment based on a preset similarity threshold; Step 5, providing a prediction result of the oil product data of the sample to be tested based on the target feature samples corresponding to each segment; Assume that the wave number interval of the spectrum segment L is ,in, is the starting wave number, is the terminal wave number, is the interval width, then the spectral segment L is The similarity calculation formula between feature samples is: ; In the formula, is the spectral segment L and the first The similarity between feature samples, is the near infrared spectrum of the sample to be tested at wave number The absorbance at For the The characteristic samples are in wave number The absorbance at Calculate the similarity between the spectral segment L and each feature sample in the feature sample library respectively, and sort them from high to low to get the maximum similarity , compare the maximum similarity with a preset similarity threshold, and when the maximum similarity When the maximum similarity is greater than or equal to the preset similarity threshold, The corresponding characteristic sample is the target characteristic sample, and the oil product data of the target characteristic sample is the predicted value of the oil product data characterized by the sample to be tested in the spectral segment L; the preset similarity threshold is 0.995; When the similarity When it is less than the preset similarity threshold, the prediction result is a numerical range; the numerical range is determined by the similarity sorting result and the relative position of the spectral segment L and the spectral segment of the characteristic sample, the characteristic peak of the spectral segment L is found, and the characteristic samples with the largest similarity above and below the characteristic peak are found respectively. The oil product data range corresponding to the two characteristic samples is the prediction result of the oil product data represented by the sample to be tested in the spectral segment L.
2. The oil quality prediction method based on near infrared spectroscopy analysis according to claim 1 is characterized in that: The wave number range of the near infrared spectrum is 3500~10000cm -1 ; The oil product data include: octane number, flash point and 50% evaporation temperature.
3. The oil quality prediction method based on near infrared spectroscopy analysis according to claim 1 is characterized in that: In the step 2, the near infrared spectrum data of the sample to be tested is corrected using the base point method; The near infrared spectrum of the sample to be tested is at wave number The absorbance at , select two base points on the spectrum and , the equation of the line passing through two base points is expressed as: ; After correction, the near infrared spectrum of the sample to be tested is The absorbance at ; Among them, the base point wave number The value range is 6500~7000cm -1 , base point wave number The value range is 8000~8200cm -1 .
4. The oil quality prediction method based on near infrared spectroscopy analysis according to claim 2 is characterized in that: In the step 3, segmenting the spectral correction data according to the wave number intervals representing different oil product data includes: The wave number range characterizing the 50% evaporation temperature is 4000~4800cm -1 ; The wave number range that characterizes the octane number is 7000~7500cm -1 and 8000~8700cm -1 Two paragraphs; The wave number range characterizing the flash point is 5200~6300cm -1 .
