A distillate oil near-infrared spectrum online property detection method for working condition switching

By integrating local modeling methods with multiple similarity measures and selecting similar samples as the calibration set, the accuracy problem of oil property detection in refining and chemical enterprises during the switching of operating conditions is solved, and high-precision adaptability of online detection is achieved.

CN116756582BActive Publication Date: 2026-03-27南京富岛软件有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

During the switching of operating conditions, the accuracy of existing online detection methods based on near-infrared spectroscopy is easily affected by the model calibration set, making it difficult to accurately detect the properties of intermediate oil products.

Method used

A local modeling method that integrates multiple similarity measures is adopted. By combining Euclidean distance, spectral information divergence and spectral gradient angle, similar samples are selected as a calibration set to establish a property detection model for the distillate oil to be tested, thereby improving the detection accuracy.

Benefits of technology

During the switching of operating conditions, the accuracy of distillate oil property detection was improved, adapting to complex changes in operating conditions and enhancing the recognition accuracy of the online detection model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116756582B_ABST
    Figure CN116756582B_ABST
Patent Text Reader

Abstract

The application discloses a distillate oil near-infrared spectrum online property detection method for working condition switching, which selects samples similar to the to-be-detected distillate oil as a calibration set to improve the property detection accuracy of the to-be-detected distillate oil. Three similarity measurement methods are adopted to measure from three aspects of Euclidean distance, spectral information divergence and spectral gradient angle, the matching degrees of the measurement methods and the distillate oil spectrum are learned, spectral feature information is extracted in different directions, the to-be-detected spectrum is represented to the maximum extent, and the recognition accuracy of the online detection model is improved to cope with complex working condition changes.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of rapid detection of oil properties based on spectrum, in particular to a distillate oil near-infrared spectrum online property detection method for working condition switching. BACKGROUND

[0002] Currently, oil refining enterprises generally use spectrum-based online oil property detection technology, which has fast detection speed and high detection efficiency, and can meet the property detection needs of a large number of products and intermediate products of oil refining enterprises.

[0003] In the process of processing and production, oil refining enterprises need to adjust the working condition according to the production plan and actual situation. For example, the production scheme of the third line of the coking scheme and the asphalt scheme in the crude oil distillation unit of the oil refining enterprise has a large difference in the final boiling point temperature, and the working condition switching process often lasts for several hours.

[0004] The online detection accuracy based on near-infrared spectrum is easily affected by the model calibration set. The change of working condition will make the original model calibration set unable to correctly reflect the oil properties under the current working condition, thereby causing deviation in online oil property detection. It should be noted that the completion of working condition switching requires a certain time, and even if modeling is performed for different working conditions, the oil properties in the intermediate state during switching are also difficult to accurately detect.

[0005] The local modeling method is often used in the case where there is a large difference between the calibration set samples. This method searches for samples with similar characteristics as the to-be-detected samples as the calibration set to optimize the prediction accuracy of the model. Common methods include similarity measurement based on distance after sample dimension reduction, similarity measurement based on spectral information divergence (SID), and similarity measurement based on gradient vector (SGA), etc. The above similarity measurement methods can extract certain spectral characteristics, but also lose a part of the spectral characteristics. Therefore, how to combine the advantages of various methods to make the local modeling method more suitable for complex working condition switching scenarios has become a problem that needs to be solved by oil refining enterprises. SUMMARY

[0006] The purpose of the present application is to provide a local modeling method that integrates multiple similarity measurements, which can adapt to different spectral characteristics for selecting similar samples and improve the online property detection accuracy during working condition switching.

[0007] The present application has the following steps:

[0008] (1) Collecting the distillate oil near-infrared spectrum sample set X and the properties Y in different working conditions and working condition transition processes set by the oil refining enterprise;

[0009] (2) Removing abnormal samples, preprocessing X, and the preprocessing steps are as follows:

[0010] (2-1) Adopt Savitzky-Golay convolution smoothing to denoise the spectrum;

[0011] (2-2) First derivative of the spectrum;

[0012] (2-3) Vector normalization processing of the spectrum;

[0013] (3) Determine the number of correction sets n, select similar samples using multiple similarity measurement methods and calculate the comprehensive similarity measurement weight W; Specifically:

[0014] (3-1) Determine the number of correction sets n according to the standard of spectral modeling:

[0015] (3-1-1) Perform partial least squares modeling on the sample set X, and determine the optimal latent variable number m of the model according to leave-one-out cross-validation,

[0016] (3-1-2) The number of correction sets n is calculated as follows:

[0017]

[0018] (3-2) Use leave-one-out method to select one from the sample set X as the to-be-tested sample, and the other samples in X as the sample library, respectively use three similarity measurement methods to select n correction sets from the sample library for modeling, and calculate the prediction error of the model, repeat the above process until the prediction error of all samples is obtained, and the prediction error is used to establish the model comprehensive similarity measurement weight W, the specific steps are as follows:

[0019] (3-2-1) Perform principal component analysis on the spectral sample set X to reduce it to 3 dimensions, and construct a 3:2:1 correction set selection solid frame with the to-be-tested spectral reduced dimension data as the center point, wherein each ratio corresponds to the first principal component, the second principal component and the third principal component, and the to-be-tested sample is taken as the starting point to enlarge the solid frame. When the number of samples in the solid frame is not less than n, the similar sample set G based on the Euclidean distance is selected. d

[0020] (3-2-2) Calculate the probability vector of the to-be-tested spectrum z and the sample spectrum X, and select any spectrum x from X. The probability vector q of x is constructed as follows: x

[0021] x = [x1, x2, x3,..., x l ]

[0022] q x = [q x1 , q x2 , q x3 ,..., q xl ] T ​​

[0023]

[0024] where l is the spectral dimension, the probability vector q is based on the measured spectrum and the sample spectrum z and q x Calculate the relative entropy:

[0025]

[0026] The divergence SID(x,z) of the measured spectrum z and the sample spectrum x is calculated as follows:

[0027] SID(z,x) = D(z||x) + D(x||z)

[0028] The smaller the divergence value, the higher the similarity between the spectra. Calculate the divergence of the measured spectrum and all sample spectra, and sort them from small to large according to the divergence value. Select the top n spectra as the similar sample set G based on the spectral information divergence SID ;

[0029] (3-2-3) Calculate the gradient vector SG of the spectrum. The gradient vector of the sample spectrum x is calculated as follows:

[0030] SG(x) = (x2-x1,x3-x2,x l -x l-1 )

[0031] Calculate the spectral gradient angle SGA according to the gradient vectors of the measured spectrum z and the sample spectrum x:

[0032]

[0033] The smaller the SGA(z,x), the higher the spectral similarity. Calculate the spectral gradient angle of the measured spectrum and all sample spectra, and sort them from small to large according to the gradient angle. Select the top n spectra as the similar sample set G based on the spectral gradient angle SGA ;

[0034] (3-2-4) Take the sample set X as the training set and n as the number of similar samples for modeling. Use leave-one-out cross-validation. The cross-validation results are the root mean square errors SECV of the modeling based on the full sample set, the similar sample set selected based on the distance, the similar sample set selected based on the spectral gradient angle, and the similar sample set selected based on the spectral information divergence, respectively:

[0035] SECV = [secv all ,secv d ,secv SID ,secv SGA ]

[0036] where secvall Corresponding to full-set modeling, secf d Corresponding to distance-based similarity sample modeling, secf SID Corresponding to similar sample modeling based on spectral information divergence, secf SGA This corresponds to modeling similar samples based on spectral angles;

[0037] (3-2-5) The difference between the mean squared errors of the global modeling and the modeling of each similar sample is calculated as follows:

[0038] (3-2-5-1) The difference between the mean square error of the global model and the modeling of each similar sample is calculated as follows:

[0039]

[0040] (3-2-5-2) Calculate the similar sample integration weight W based on the difference calculated from the root mean square error:

[0041]

[0042] W = [w d ,w SID ,w SGA ]

[0043] Where w SID ,w SGA The calculation method and w d same;

[0044] (4) During online detection, upon receiving an instruction from the refining enterprise to adjust from one operating condition to another, the near-infrared spectrum of the distillate oil to be tested is collected. Based on the calibration set selection criteria for the corresponding operating condition, a suitable sample is selected as the calibration set, and a property detection model for the distillate oil to be tested is established. The calibration set G comb The selection method is as follows:

[0045] (4-1) Calculate the local sample sets of each similarity measure of the sample to be tested according to the method in (3);

[0046] (4-2) Divide a selection interval from 0 to 1 according to the integration weight W, and select the sample set that is ranked first and not selected into G by randomly hitting a similarity measure in the interval. comb The spectral sample was placed into G. comb middle;

[0047] (4-3) Repeat the above process until G. comb The number of samples in the sample reaches n;

[0048] (5) Based on the calibration set G combestablish a property detection model of the to-be-tested distillate oil, and predict the property Y of the to-be-tested oil product X through the property detection model of the to-be-tested distillate oil test . test .

[0049] Advantages:

[0050] The application discloses a distillate oil near-infrared spectrum online property detection method for working condition switching, which selects samples similar to the to-be-tested distillate oil as a calibration set to improve the property detection accuracy of the to-be-tested distillate oil. Three similarity measurement methods are adopted to measure from three aspects of the Euclidean distance, spectral information divergence and spectral gradient angle, the matching degrees of the measurement methods and the distillate oil spectrum are learned, the spectral feature information is extracted in different directions, the to-be-tested spectrum is represented to the maximum extent, and the recognition accuracy of the online detection model is improved by coping with complex working condition changes. BRIEF DESCRIPTION OF DRAWINGS

[0051] Figure 1 is a flow chart of the distillate oil online property detection method for working condition switching of the application;

[0052] Figure 2 is a spectrum of a minus three-line distillate oil in the embodiment;

[0053] Figure 3 is a spectrum of the minus three-line distillate oil after pretreatment in the embodiment;

[0054] Figure 4 is a relationship diagram of sample latent variables and calibration standard errors in the embodiment;

[0055] Figure 5 is a calibration standard error diagram of global and similar sample local modeling in the embodiment;

[0056] Figure 6 is a comparison diagram of predicted properties and tested properties of the whole sample modeling under the working condition switching state in the embodiment;

[0057] Figure 7 is a comparison diagram of predicted properties and tested properties of the comprehensive similar sample modeling under the working condition switching state in the embodiment. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings and specific examples, and the implementation effect of the distillate oil property detection under the working condition switching state will be illustrated by the specific operation process. The embodiment is implemented on the premise of the technical scheme of the application, but the protection scope of the application is not limited to the following embodiment.

[0059] The present application takes the reduced three-line distillate oil of a certain refining and chemical enterprise as the analysis object, and analyzes the detection effect of the end point property of the distillate oil under the working condition switching. The reduced pressure residue oil of the reduced pressure device of the enterprise can be used as the raw material of the coking device and the asphalt raw material, corresponding to the coking scheme and the asphalt scheme respectively. The reduced three-line product is used as the upper side-line distillate oil, and under the coking scheme, the light component of the extracted crude oil is more, and the end point is about 560℃; and under the asphalt scheme, the light component of the extracted crude oil is less, and the end point is about 530℃. The enterprise will switch between the two schemes according to the production plan, and the switching process often lasts for several hours. The reduced three-line belongs to heavy oil, and the oil component is complex, so the experimental test is difficult, and the property deviation of the end point is acceptable within 5℃. Based on the above background, the present application adopts local modeling to enhance the model for the explanation of the to-be-detected spectrum, integrates various similarity measurements to optimize the extraction of key features in the complex spectrum environment, and further improves the accuracy of online property detection. The property detection method process shown in the present application is as follows Figure 1 . .

[0060] (1) Collect 68 near-infrared spectrum samples of distillate oil with end point properties from 517.5℃ to 546℃ under the asphalt scheme and 90 near-infrared spectrum samples of distillate oil with end point properties from 547.5℃ to 565℃ under the coking scheme of the refining and chemical enterprise, and the wave number range is 4000 to 4800cm -1 -1 . The near-infrared spectrum of a typical reduced three-line distillate oil is as shown in Figure 2 . After abnormal spectrum screening, finally 88 spectra are selected as the sample set X, the end point properties corresponding to the sample set are Y, 46 spectra are selected as the verification set X test , the verification set covers 95% of the data range of the end point of the sample set, and the end point properties corresponding to the verification set are Y test .

[0061] (2) The X and X test are pretreated as follows:

[0062] (2-1) 17-point Savitzky-Golay convolution smoothing is adopted for denoising treatment of the spectrum;

[0063] (2-2) The spectrum is subjected to first-order derivation;

[0064] (2-3) The spectrum is subjected to vector normalization treatment;

[0065] The pretreated spectrum is as shown in Figure 3 .

[0066] (3) Partial least squares modeling is performed on the sample set X, and the optimal latent variable number m of the model is determined according to the leave-one-out cross-validation, and the cross-validation result is as shown in Figure 4As shown, the optimal number of latent variables is m = 6, therefore, the number of local modeling correction sets is taken as 42;

[0067] Taking the sample set X as the training set, 6 as the number of latent variables, and 42 as the number of similar samples for local modeling, cross-validation is performed by using the leave-one-out method, and the cross-validation results are as shown in the following table: Figure 5

[0068] SECV = [secv all , secv d , secv SID , secv SGA ]

[0069] secv all = 3.87

[0070] secv d = 0.70

[0071] secv SID = 0.43

[0072] secv SGA = 0.46

[0073] The similar sample integration weight W obtained after calculation is:

[0074] W = [w d , w SID , w SGA ] = [0.44, 0.27, 0.29]

[0075] (4) In the online detection process, the near-infrared spectrum of the to-be-detected distillate oil is collected, after receiving the instruction from one working condition to another working condition, according to the sample set corresponding to the working condition, the similar sample is selected by using the comprehensive similarity measure to construct the correction set G comb of the to-be-detected sample

[0076] (5) The property detection model of the to-be-detected distillate oil is established based on the correction set G comb , and the property Y test of the to-be-detected oil X test is predicted through the property detection model.

[0077] Example data comparison:

[0078] ​The global, local sample of each similarity measure and local sample of comprehensive similarity measure of the validation set are modeled by using the above latent variable number, local modeling, similar sample number and integration weight, and the model prediction and prediction error statistics are performed, and the prediction results are shown in Table 1.

[0079] Table 1 modeling and prediction results of each method

[0080]

[0081]

[0082] The prediction standard error is shown in Table 2.

[0083] Table 2 prediction results of each method

[0084] Correction set selection Global Distance-based SID-based SGA-based Integrated similarity Standard prediction error 3.25 2.59 2.60 2.53 2.30

[0085] From the model prediction results, it can be concluded that 95.6% of the results of the local modeling method are generally more accurate than the global modeling. The three-line cut oil component is complex, and the sampling frequency of artificial testing is low, and the collected samples may be three-line products processed from different raw materials, so even if the oil component corresponding to one property test value is very different, the prediction effect of the three different local sample selection methods on different samples to be tested is also quite different. Among them, 87% of the samples have a prediction effect worse than the best local modeling method based on comprehensive similarity modeling, but better than the global and the worst local prediction. And from the overall standard prediction error, the prediction accuracy of the comprehensive similarity is better than that of the global and each local modeling.

[0086] In order to simulate the scene of working condition switching, 18 oil samples with terminal boiling point test values from 535℃ to 555℃ in the validation set are selected, and the comparison between the property predicted by the global modeling and the test property is shown in Table 4. Figure 6 The comparison between the property predicted by the comprehensive similar sample modeling and the test property is shown in Table 5, and the prediction standard error is shown in Table 3. Figure 7

[0087] Table 3 prediction results of each method

[0088] Correction set selection Global Distance-based SID-based SGA-based Integrated similarity Standard prediction error 4.22 3.59 3.52 3.40 3.34

[0089] From Table 3, it can be concluded that the prediction accuracy of the model based on comprehensive similarity modeling is better than that of the global and each local similar sample modeling. Therefore, the model prediction accuracy of the present application is improved for stable working condition and switching working condition, and can adapt to the complex online detection environment of three-line cut.​

Claims

1. A method for online near-infrared spectral property detection of distillate oils oriented towards operating condition switching, characterized in that... A modeling method using comprehensive similarity measurement is employed to select similar samples and establish a property detection model for the distillate oil to be tested. This involves the following steps: (1) Collect near-infrared spectral samples of distillate oil under different operating conditions set by refining and chemical enterprises, and during the transition of operating conditions. and their corresponding properties ; (2) Remove abnormal samples. Preprocessing is required; (3) Determine the number of calibration sets Multiple similarity measurement methods were used to select similar samples, and the weight of each similar sample selection method was calculated during integration. In step (3), local samples are selected and used as the calibration set by combining three similarity measurement methods. The three similarity measurement methods are similarity discrimination based on Euclidean distance, spectral information divergence, and spectral gradient angle, respectively. The weight of different similar sample selection methods in the integration process is as follows: The calculation process is as follows: The difference between the root mean square error of the global model and the modeling of each similar sample is calculated as follows: in The difference between the root mean square error of global modeling and modeling similar samples based on Euclidean distance. The difference between the root mean square error of global modeling and modeling similar samples based on spectral information divergence. The difference between the root mean square error of global modeling and modeling similar samples based on spectral gradient angle; The root mean square error corresponding to global modeling The root mean square error corresponding to similar sample modeling based on Euclidean distance, The root mean square error corresponding to similar sample modeling based on spectral information divergence, The root mean square error corresponding to similar sample modeling based on spectral gradient angle; The weight of different similar sample selection methods during integration is calculated based on the root mean square error. : in Weights for similar samples based on Euclidean distance. For similar sample weights based on spectral information divergence, Weights for similar samples based on spectral gradient angle; (4) During the online detection process, the near-infrared spectrum of the distillate oil to be tested is collected. After receiving the instruction to adjust from one operating condition to another, a calibration set of the test sample is constructed by selecting similar samples based on the sample set of the corresponding operating condition using a comprehensive similarity metric. , correction set The number is ; (5) Based on the calibration set Establish a property detection model for the distillate oil to be tested, and predict the properties of the oil product using the property detection model. Properties .

2. The method for online near-infrared spectral property detection of distillate oils oriented towards operating condition switching, as described in claim 1, is characterized in that... The preprocessing steps are as follows: (2-1) Savitzky-Golay convolution smoothing is used to denoise the spectrum; (2-2) Take the first derivative of the spectrum; (2-3) Perform vector normalization on the spectrum.

3. The method for online near-infrared spectral property detection of distillate oils oriented towards operating condition switching, as described in claim 1, is characterized in that... The steps for calculating the number of calibration sets in step (3) are as follows: (3-1-1) Using a sample set Partial least squares modeling is performed, and the optimal number of latent variables for the partial least squares model is determined by leave-one-out verification. ; (3-1-2) Based on the number of latent variables Determine the number of calibration sets: 。 4. The method for online near-infrared spectral property detection of distillate oils oriented towards operating condition switching, as described in claim 1, is characterized in that... The steps for selecting local samples are as follows: (3-2-1) Local samples are selected using similarity discrimination based on Euclidean distance; (3-2-2) Local samples are selected using similarity discrimination based on spectral information divergence; (3-2-3) Local samples are selected using similarity discrimination based on spectral gradient angle; (3-2-4) The sample set As a training set As the number of similar samples used for modeling, leave-one-out cross-validation was employed. The cross-validation results were the root mean square errors after modeling using the full sample set, the similar sample set selected based on Euclidean distance, the similar sample set selected based on spectral information divergence, and the similar sample set selected based on spectral gradient angle, respectively. : ; (3-2-5) Calculate the weight of different similar sample selection methods during integration using root mean square error. .

5. The method for online near-infrared spectral property detection of distillate oils oriented towards operating condition switching, as described in claim 1, is characterized in that... The similarity determination process based on Euclidean distance has the following steps: (3-2-1-1) For the spectral sample set Principal component analysis was performed to reduce the dimension to 3. (3-2-1-2) Construct a 3:2:1 calibration set selection 3D box with the dimensionality reduction data of the spectrum to be measured as the center point, where each ratio corresponds to the first principal component, the second principal component and the third principal component respectively; (3-2-1-3) Enlarge the 3D frame starting from the sample to be tested. When the number of samples within the 3D frame is not less than At that time, similar sample sets based on Euclidean distance Selection complete.

6. The method for online near-infrared spectral property detection of distillate oils oriented towards operating condition switching, as described in claim 1, is characterized in that... The similarity discrimination process based on spectral information divergence has the following steps: (3-2-2-1) Calculate the spectrum to be measured and spectral sample set The probability vector, from Select any spectrum , probability vector The structure is as follows: in For spectral dimensions; (3-2-2-2) Probability vector based on the spectrum to be measured and the sample spectrum and Calculate relative entropy: (3-2-2-3) Calculate the divergence between the spectrum to be measured and the spectra of all samples. and sample spectrum divergence The calculation is as follows: (3-2-2-4) Sort by divergence value from smallest to largest, and select the values ​​at the top of the sort. Each spectrum serves as a similar sample set based on spectral information divergence. .

7. The method for online near-infrared spectral property detection of distillate oils oriented towards operating condition switching, as described in claim 1, is characterized in that... The similarity discrimination process based on spectral gradient angle has the following steps: (3-2-3-1) Calculate the gradient vector of the spectrum From the spectral sample set Select any sample spectrum Sample spectrum The formula for calculating the gradient vector is as follows: SG(x)=(x2-x1,x3-x2,…,x l -x l-1 ) in For spectral dimensions; (3-2-3-2) Calculate the spectral gradient angles of the spectrum to be measured and all sample spectra, based on the spectrum to be measured. and sample spectrum Calculate the spectral gradient angle using the gradient vector. : (3-2-3-3) Sort the gradient angles from smallest to largest, and select the ones that appear earlier in the sorting. Each spectrum serves as a similar sample set based on its spectral gradient angle. .

8. The method for online near-infrared spectral property detection of distillate oils oriented towards operating condition switching, as described in claim 1, is characterized in that... calibration set of the test sample The selection method is as follows: (4-1) Calculate the sets of similar samples for the sample to be tested; (4-2) The weight of different similar sample selection methods during integration Define a selection interval between 0 and 1. Using a random number generator to determine the similarity metric within this interval, select the highest-ranking sample from the corresponding set that was not previously included in the selection. The spectral sample was placed into middle; (4-3) Repeat the above process until... The number of samples reached .

Citation Information

Patent Citations

  • Principal component analysis similarity discrimination-based oil quality detection method

    CN106770015A

  • Method for rapidly judging mixing uniformity of multi-grade tobacco leaves, and storage medium

    CN112304893A