Method for solving formula proportion of each component oil in blended oil product based on near infrared spectrum
By preprocessing near-infrared spectral data and using the Lsplin optimization algorithm, the problem of low accuracy in predicting blended oil proportions was solved, achieving rapid and accurate prediction of oil formulation proportions, reducing costs and improving robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PETROCHINA CO LTD
- Filing Date
- 2024-11-20
- Publication Date
- 2026-05-22
AI Technical Summary
Existing technologies have low accuracy in predicting the blending ratio of oil products and are complex to operate, making it difficult to meet the actual needs of refineries.
By preprocessing near-infrared spectral data and using the Lsplin optimization algorithm, the formulation ratio of each component oil in blended oil products can be quickly solved by setting the solution objective and constraints.
It enables rapid and accurate prediction of blended oil formulation ratios, reducing labor and material costs and improving the accuracy and robustness of prediction results.
Smart Images

Figure CN122072233A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of petrochemical production technology, specifically relating to a method for determining the proportions of various components in a blended oil product based on near-infrared spectroscopy. Background Technology
[0002] Currently, various middle distillate oils exist in major petrochemical refineries, and as refining units become increasingly complex, the types of oils are also constantly increasing. To improve oil extraction rates, quality, and throughput, it is necessary to blend the oils to enhance the overall economic efficiency of the refinery. Therefore, rapid and accurate prediction of the blend ratio is crucial before the blended oils enter the next stage of processing, or after they enter the finished product tank, to facilitate property monitoring of the blended oils.
[0003] Predicting blending ratios for oil products is largely based on near-infrared (NIIR) spectra obtained from NIIR analysis. Compared to other detection equipment, NIIR equipment offers advantages such as high analytical efficiency, fast speed, and instrument stability. Furthermore, NIIR equipment can perform both offline and online analysis, making it widely used in industry. Currently, among known reports, one method for predicting formulation ratios using NIIR spectroscopy is through simple summation of oil product spectra, but its accuracy is low, and the results are difficult to meet the actual needs of refineries. Another method involves correlating specific physical properties, such as density and sulfur content, using chemometric methods. This method requires measuring specific property values, collecting prior data, and establishing a correlation model, making the operation more complex. The accuracy of this method also depends on the quality of the model and requires continuous model maintenance. Summary of the Invention
[0004] The purpose of this invention is to provide a method for determining the proportions of each component oil in blended oil products based on near-infrared spectroscopy, which solves the problems of low accuracy in predicting the proportions of blended oil products and complex operation in existing methods.
[0005] The technical solution adopted in this invention is a method for determining the proportions of each component oil in blended oil products based on near-infrared spectroscopy. By setting the solution objective and constraints, the near-infrared spectrum of the mixed blended oil is preprocessed, and the Lsplin optimization algorithm is used to quickly solve for its proportions. The specific operation steps are as follows: Step 1: The component oils are blended to form a blended oil, and near-infrared spectral data of all possible oils involved in the blending are collected; Step 2: Preprocess the near-infrared spectral data; Step 3: Set the solution variables, the number of variables being the total number of oils that may participate in the blending, and use the lsplin solver to solve for the type of blending oil and its formula ratio.
[0006] The invention is further characterized in that, Step 1 is as follows: Component oils are collected, including all possible component oil types that may be involved in blending within the company. First, the pure component gasoline is scanned using a near-infrared spectrometer to obtain the near-infrared spectral data X1, X2, ..., Xn for each component, where X(1*m) is a multidimensional array, m is the number of data points in the near-infrared spectrum, and n is the number of possible component types involved in blending. Then, blended oils with different formulation ratios are scanned using a near-infrared spectrometer to collect the corresponding near-infrared spectral data Y1, Y2, ..., Yp, where Y(1*m) is a multidimensional array, m is the number of data points in the near-infrared spectrum, and p is the number of blended oils.
[0007] In step 2, due to unavoidable negative effects such as data noise, baseline drift, and flat peaks during the spectral scanning process, the dataset needs to be processed before data modeling begins. The near-infrared spectral band involved in this invention is 4000 cm⁻¹. -1 ~14000 cm -1 Due to the high signal-to-noise ratio and relatively stable baseline, no smoothing or baseline correction is performed. The wavenumber range is 4000 cm⁻¹. -1 ~4450 cm -1 The waveform was chaotic and contained flat-topped peaks, so this wavenumber segment was removed. Simultaneously, 10000 cm⁻¹ was removed. -1 The baseline data after the wavenumber interval, and the wavenumber range ultimately used for optimization, is 4450 cm⁻¹. -1 ~10000 cm -1 This wavelength range ensures a reasonable distribution of spectral data, which is more conducive to the next step of optimization and solution.
[0008] In step 3, the preprocessed component gasoline spectral data and blended gasoline spectral data are input into the Lsplin solver to determine the blending oil type and its formulation ratio. The specific calculation process is as follows: the solution variable is set to K(1*n), i.e., the formulation ratio; the objective is to minimize the sum of squares of the differences between the blending oil spectrum and the component oil spectrum, i.e.: min f(X) = sum((Y - K*(X1; X2; ……; Xn)).^2) s.t. sum(K) = 1 & 0 ≤ K(i) ≤ 1 Where Y represents the near-infrared spectral data of the blended oil, and X1, X2, ..., Xn represent the spectral data of the component oils. K(i) is the proportion coefficient of the i-th component.
[0009] The beneficial effects of this invention are: This invention provides a method for determining the proportions of component oils in blended oil products based on near-infrared spectroscopy. It uses an optimized algorithm to solve for the near-infrared spectra of the blended oil and its component oils, thus predicting their proportions. Compared to known methods that establish chemometric models to correlate physical property indicators, this invention is simpler and easier to implement, eliminating the need for extensive time spent on physical property testing and initial model building, significantly saving manpower and material costs. This method can be used for online monitoring of oil products and exhibits good robustness, accurately predicting the proportions of each oil even in the mixing of multiple oil products. Furthermore, the accuracy of this method in predicting proportions is significantly superior to other methods. Attached Figure Description
[0010] Figure 1 The near-infrared spectra of the component oils and blended oils in Example 1 are shown below. Figure 2 The actual formula ratio and the solved formula ratio of the blended oil in Example 1 are shown. Figure 3 The near-infrared spectra of the component oils and blended oils in Example 2 are shown below. Figure 4 The actual formula ratio and the solved formula ratio of the blended oil in Example 2 are shown. Detailed Implementation
[0011] To further understand the present invention, the present invention will be described below with reference to embodiments. These descriptions are only for further explaining the features and advantages of the present invention and are not intended to limit the claims of the present invention.
[0012] Example 1: The method provided by this invention is used to perform a spectral scan on the component oils of a domestic refinery: reformed gasoline (type I), alkylated gasoline, reformed gasoline (type II), and raffinate oil. The blending formula is then solved by an optimization algorithm.
[0013] The main steps of using this invention to solve the formula of blended gasoline include three processes: preliminary near-infrared spectral data collection, spectrum processing, and optimization solution.
[0014] (1) Data collection Before optimization, the component oils need to be blended to form a blended oil product, and spectral data need to be collected. This invention uses the near-infrared spectrum X1 of reformed gasoline (Type I), the near-infrared spectrum X2 of alkylated gasoline, the near-infrared spectrum X3 of reformed gasoline (Type II), and the near-infrared spectrum X4 of raffinate oil as the basic spectral library for potential blending. In the actual blending process, two component oils (reformed gasoline X1: alkylated gasoline X2) were blended according to nine specific formulations (volume ratios of 10:90, 20:80, 30:70, 40:60, 50:50, 60:40, 70:30, 80:20, and 90:10) to obtain the corresponding near-infrared spectral data (Y1, Y2, Y3, Y4, Y5, Y6, Y7, Y8, Y9). Based on this, optimization calculations were performed to verify the accuracy of the algorithm.
[0015] (2) Spectrum processing Because data noise, baseline drift, and flat peaks are unavoidable during the spectral scanning process, the dataset needs to be processed before data modeling begins. The near-infrared spectral band involved in this invention is 4000 cm⁻¹. -1 ~14000 cm -1 Due to the high signal-to-noise ratio and relatively stable baseline, no smoothing or baseline correction is performed. The wavenumber range is 4000 cm⁻¹. -1 ~4450 cm -1 The waveform was chaotic and contained flat-topped peaks, so this wavenumber segment was removed. Simultaneously, 10000 cm⁻¹ was removed. -1 The baseline data after the wavenumber, and the wavenumber range ultimately used for optimization, is 4450 cm⁻¹. -1 ~10000 cm -1 This spectral range ensures a reasonable distribution of spectral data, which is more conducive to the next step of optimization and solution.
[0016] (3) Optimization solution The solution variable is set as K(1*4), which is the formula ratio; the solution objective is: min(sum((YK*(X1;X2;X3;X4)).^2)), which is to minimize the sum of squares of the differences between blended gasoline and component oils; the constraint condition is: sum(K) =1&0<=K(i)<=1. The component gasoline X and the spectrum data Y of blended gasoline with different ratios after data preprocessing are substituted into the lsplin solver to solve for the blended oil type and its formula ratio. The specific results are shown in Table 1.
[0017] Table 1 Comparison of Actual and Calculated Proportions for Blended Gasoline Formulas (Table 1)
[0018] The calculation results show that when the spectra of the four pure components and the blended gasoline are input into the Lsplin solver, the results are highly consistent with the proportions of each component in the actual blending process. Furthermore, the solution results for components X3 and X4, which were not involved in the blending, are both 0. The maximum error in the formulation proportions of the nine samples is 1.77%, and the average absolute error is 0.67%, demonstrating high accuracy. This indicates that the calculation method developed in this invention is not affected by the types of other components.
[0019] Example 2: The method provided by this invention is used to perform a spectral scan on the component oils of a domestic refinery: reformed gasoline (type I), alkylated gasoline, reformed gasoline (type II), and raffinate oil. The blending formula is then solved by an optimization algorithm.
[0020] The main steps of using this invention to solve the formula of blended gasoline include three processes: preliminary near-infrared spectral data collection, spectrum processing, and optimization solution.
[0021] (1) Data collection Before optimization, the component oils need to be blended to form a blended oil product, and spectral data need to be collected. This invention uses the near-infrared spectrum X1 of reformed gasoline (Type I), the near-infrared spectrum X2 of alkylated gasoline, the near-infrared spectrum X3 of reformed gasoline (Type II), and the near-infrared spectrum X4 of raffinate oil as the basic spectral library for potential blending. In the actual blending process, two component oils (reformed gasoline X3: raffinate oil X4) were blended according to nine specific formulations (volume ratios of 10:90, 20:80, 30:70, 40:60, 50:50, 60:40, 70:30, 80:20, and 90:10) to obtain the corresponding near-infrared spectral data (Y1, Y2, Y3, Y4, Y5, Y6, Y7, Y8, Y9). Based on this, optimization calculations were performed to verify the accuracy of the algorithm.
[0022] (2) Spectrum processing Because data noise, baseline drift, and flat peaks are unavoidable during the spectral scanning process, the dataset needs to be processed before data modeling begins. The near-infrared spectral band involved in this invention is 4000 cm⁻¹. -1 ~14000 cm -1 Due to the high signal-to-noise ratio and relatively stable baseline, no smoothing or baseline correction is performed. The wavenumber range is 4000 cm⁻¹. -1 ~4450 cm -1 The waveform was chaotic and contained flat-topped peaks, so this wavenumber segment was removed. Simultaneously, 10000 cm⁻¹ was removed. -1 The baseline data after the wavenumber, and the wavenumber range ultimately used for optimization, is 4450 cm⁻¹.-1 ~10000 cm -1 This spectral range ensures a reasonable distribution of spectral data, which is more conducive to the next step of optimization and solution.
[0023] (3) Optimization solution The solution variable is set as K(1*4), which is the formula ratio; the solution objective is: min(sum((YK*(X1;X2;X3;X4)).^2)), which is to minimize the sum of squares of the differences between blended gasoline and component oils; the constraint condition is: sum(K) =1&0<=K(i)<=1. The component gasoline X and the spectrum data Y of blended gasoline with different ratios after data preprocessing are substituted into the lsplin solver to solve for the blended oil type and its formula ratio. The specific results are shown in Table 2.
[0024] Table 2 Comparison of Actual and Calculated Proportions for Blended Gasoline
[0025] The calculation results show that when the spectra of the four pure components and the blended gasoline are input into the Lsplin solver, the results are highly consistent with the proportions of each component in the actual blending process. Furthermore, the solution results for the components X1 and X2, which were not involved in the blending, are both 0. The maximum error in the formulation proportions of the nine samples is 1.81%, and the average absolute error is 0.94%, demonstrating high accuracy. This indicates that the calculation method developed in this invention is not affected by the types of other components.
[0026] The above implementation examples demonstrate that the blending ratios of each component oil in blended gasoline can be quickly and accurately determined using the lsqlin solver. As shown in Tables 1 and 2, the average absolute deviations of the formulation ratios in Examples 1 and 2 are 0.67% and 0.94%, respectively, which are essentially the same as the actual formulation ratios. This indicates that when gasoline blending is performed with fixed component oil types and varieties, the accurate types and proportions of each component oil can be determined using the near-infrared spectrum of the blended gasoline. Even when introducing other components of the same or different types to increase the difficulty of the solution, it does not affect the results; the optimized algorithm can still accurately determine the types and proportions of each component oil.
[0027] Example 3 This invention provides a method for determining the proportions of each component oil in blended oil products based on near-infrared spectroscopy. By setting the solution objective and constraints, the near-infrared spectrum of the mixed blended oil is preprocessed, and the proportions are quickly determined using the least squares linear optimization algorithm lsqlin.
[0028] Example 4 This invention relates to a method for determining the proportions of various component oils in a blended oil product based on near-infrared spectroscopy. The specific operation steps are as follows: Step 1: Blend the component oils to form a blended oil and collect the near-infrared spectral data of all the component oils involved in the blending; Step 2: Preprocess the near-infrared spectral data; Step 3: Set the solution variables, the number of variables being the total number of oils that may participate in the blending, and use the lsplin solver to solve for the type of blending oil and its formula ratio.
[0029] Example 5 Based on Example 4, Step 1 is as follows: The component oils involved in the blending were collected. First, the pure component oils were scanned using a near-infrared spectrometer to obtain the near-infrared spectral data X1, X2, ..., Xn of each component oil. The spectral data X(1*m) is a multidimensional array, where m is the number of data points in the near-infrared spectrum and n is the number of possible component types involved in the blending. The blended oils with different formulation ratios were then scanned using a near-infrared spectrometer to collect the corresponding near-infrared spectral data Y1, Y2, ..., Yp. Here, Y(1*m) is a multidimensional array, where m is the number of data points in the near-infrared spectrum and p is the number of blended oils.
[0030] In step 2, the wavenumber range of the near-infrared spectra of the blended oil and component oils is within 4000 cm⁻¹. -1 ~4450 cm -1 Band removal, including removal of 10,000 cm bands. -1 The baseline data after the wavenumber interval, and the wavenumber range ultimately used for optimization, is 4450 cm⁻¹. -1 ~10000 cm -1 .
[0031] Example 6 Based on Example 5, In step 3, the preprocessed component oil spectral data and blended oil spectral data are input into the lsplin solver to solve for the type of component oil and its formulation ratio in the blended oil. The specific calculation process is as follows: Set the solution variable as... K (1*n), which represents the formulation ratio; the objective is to minimize the sum of squares of the differences between the spectra of the blended oil and the component oils, i.e.: min f(X) = sum((Y - K*(X1; X2; ……; Xn)).^2) s.t. sum(K) = 1 & 0 ≤ K(i) ≤ 1 Where Y represents the near-infrared spectral data of the blended oil, and X1, X2, ..., Xn represent the spectral data of the component oils. K(i) For the first i The proportion coefficient of each component.
[0032] The error between the formula ratio in the blended oil and the actual ratio was calculated to verify the effectiveness of the method.
[0033] The preferred embodiments of the present invention disclosed above are merely illustrative of the invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the invention to any specific implementation. Clearly, many modifications and variations can be made based on the content of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the invention, thereby enabling those skilled in the art to better understand and utilize the invention. The invention is limited only by the claims and their full scope and equivalents.
Claims
1. A method for determining the proportions of various component oils in a blended oil product based on near-infrared spectroscopy, characterized in that, By setting the solution objective and constraints, the near-infrared spectrum of the mixed blended oil is preprocessed and then the formula ratio is quickly solved using the least squares linear optimization algorithm lsqlin.
2. The method for determining the proportions of each component oil in a blended oil product based on near-infrared spectroscopy according to claim 1, characterized in that, The specific steps are as follows: Step 1: Blend the component oils to form a blended oil and collect the near-infrared spectral data of all the component oils involved in the blending; Step 2: Preprocess the near-infrared spectral data; Step 3: Set the solution variables, the number of variables being the total number of oils that may participate in the blending, and use the lsplin solver to solve for the type of blending oil and its formula ratio.
3. The method for determining the proportions of each component oil in a blended oil product based on near-infrared spectroscopy according to claim 1, characterized in that, Step 1 is as follows: The component oils to be blended are collected. First, the pure component oils are scanned using a near-infrared spectrometer to obtain the near-infrared spectral data X1, X2, ..., Xn of each component oil. The spectral data X(1*m) is a multidimensional array, where m is the number of data points in the near-infrared spectrum and n is the number of possible component types to be blended.
4. The method for determining the proportions of each component oil in a blended oil product based on near-infrared spectroscopy according to claim 1, characterized in that, In step 1: The blended oils with different formulation ratios are scanned by a near-infrared spectrometer to collect the corresponding near-infrared spectral data Y1, Y2...Yp, where Y(1*m) is a multidimensional array, m is the number of data points in the near-infrared spectrum, and p is the number of blended oils.
5. The method for determining the proportions of each component oil in a blended oil product based on near-infrared spectroscopy according to claim 1, characterized in that, In step 2, the wavenumber range of the near-infrared spectra of the blended oil and component oils is within 4000 cm⁻¹. -1 ~4450 cm -1 Band removal, including removal of 10,000 cm bands. -1 The baseline data after the wavenumber interval, and the wavenumber range ultimately used for optimization, is 4450 cm⁻¹. -1 ~10000 cm -1 .
6. The method for determining the proportions of each component oil in a blended oil product based on near-infrared spectroscopy according to claim 1, characterized in that, In step 3, the preprocessed component oil spectral data and blended oil spectral data are input into the lsplin solver to solve for the type of component oil and its formulation ratio in the blended oil. The specific calculation process is as follows: Set the solution variable as... K (1*n), which represents the formula ratio; the objective is to minimize the sum of squares of the differences between the spectra of the blended oil and the component oils, i.e.: min f(X) = sum((YK*(X1;X2;……;Xn)).^2) st sum(K) = 1 & 0 ≤ K(i) ≤ 1 Where Y represents the near-infrared spectral data of the blended oil, and X1, X2, ..., Xn represent the spectral data of the component oils. K(i) For the first i The proportion coefficient of each component.
7. The method for determining the proportions of each component oil in a blended oil product based on near-infrared spectroscopy according to claim 1, characterized in that, The error between the formula ratio in the blended oil and the actual ratio was calculated to verify the effectiveness of the method.
8. The method for determining the proportions of each component oil in a blended oil product based on near-infrared spectroscopy according to claim 1, characterized in that, Step 2, which involves preprocessing the near-infrared spectral data, does not include smoothing or baseline correction.