Crude oil near infrared spectrum conversion method

By performing first-order and second-order differential processing on the near-infrared spectral matrix of crude oil samples and calculating the merger of the correlation coefficient matrix of the moving window, the problem of spectral differences between different spectrometers is solved, and the accuracy of crude oil spectral conversion is improved.

CN119534389APending Publication Date: 2025-02-28CHINA PETROLEUM & CHEMICAL CORP +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311112180.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

Different models of near-infrared spectrometers will produce slight spectral differences when measuring crude oil, resulting in inaccurate spectral conversion and affecting the identification and analysis results of crude oil types.

Method used

By obtaining the near-infrared spectral matrix of unknown crude oil samples and known crude oil samples, performing first-order differential and second-order differential processing, the moving window correlation coefficient matrix is ​​calculated, and combined to obtain the near-infrared spectral conversion coefficient matrix of crude oil, eliminating the slight spectral difference between the spectrometers.

Benefits of technology

It improves the accuracy of the near-infrared spectral conversion of crude oil, ensures the spectral consistency of crude oil samples measured by different spectrometers, thereby improving the accuracy of crude oil type identification and analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119534389A_ABST
    Figure CN119534389A_ABST
Patent Text Reader

Abstract

The invention relates to a crude oil near infrared spectrum conversion method, which comprises the following steps of: processing a first spectrum matrix of a known crude oil sample on a first spectrograph to obtain a first-order differential mean value spectrum; converting a second-order differential spectrum matrix obtained by the first spectrum matrix and a second spectrum matrix of the crude oil standard sample on a second spectrometer into moving window correlation coefficient matrixes of the first-order differential mean spectrum, and merging the two moving window correlation coefficient matrixes to obtain a converted correlation coefficient matrix; and spectrum conversion among different spectrometers is realized. The method can eliminate tiny spectrum differences generated between near infrared spectrums of crude oil samples measured by different spectrometers, improves the accuracy of spectrum conversion, and is suitable for rapid analysis of composition, physical properties and the like of the crude oil samples.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for converting near-infrared spectrum of crude oil. Background Art

[0002] The use of near-infrared spectroscopy for crude oil evaluation has the advantages of rapid and non-destructive analysis. In order to solve the problem of inconsistent spectra collected by different instruments, a variety of methods have been proposed for different application objects. The commonly used algorithm is the DS (Direct Standardization) algorithm, which is aimed at the situation where there is a large spectral difference between two types of instruments. The spectral conversion coefficient between the two types of instruments is found through a set of standard samples. The Mean Spectra Subtraction Correction Method (MSSC) is aimed at the situation where there is a difference in absorbance between two types of instruments but no difference in wavelength. The absorbance difference between different instruments is found through a set of standard samples.

[0003] CN200910169611.8 discloses a method for quickly identifying crude oil types by near infrared spectra, which proposes a method for quickly identifying crude oil near infrared spectra based on the concept of moving window (Moving Window) combined with the traditional correlation coefficient method, i.e., the moving window correlation coefficient method. This method can accurately identify crude oil types, and can provide detailed difference information between different crude oil near infrared spectra, providing powerful help for parsing spectra. However, in actual application, the problem of inconsistent near infrared spectra is often encountered, i.e., the spectra measured by near infrared spectrometers of different models of the same crude oil are different, and the main reason is that there are slight differences in the key components between different models of spectrometers. If the near infrared spectrum database established on a near infrared spectrometer of one model is used for the spectrum identification measured by another model instrument, it will lead to wrong recognition results. Summary of the invention

[0004] The purpose of the present invention is to provide a crude oil near-infrared spectrum conversion method, which can eliminate the tiny spectral differences between the near-infrared spectra of crude oil samples measured by different spectrometers and improve the accuracy of spectral conversion.

[0005] In order to achieve the above object, the present disclosure provides a method for converting crude oil near infrared spectrum, which comprises the following steps:

[0006] Obtain samples of unknown crude oil and samples of known crude oil;

[0007] Using a first spectrometer to detect the known crude oil sample to obtain a first spectrum matrix;

[0008] The first spectral matrix is ​​subjected to first-order differential processing and average processing to obtain a first-order differential average spectrum; and the first spectral matrix is ​​subjected to second-order differential processing to obtain a second-order differential spectral matrix;

[0009] Calculating the first moving window correlation coefficient between each spectrum in the second-order differential spectrum matrix and the first-order differential mean spectrum to obtain a first moving window correlation coefficient matrix;

[0010] Using a second spectrometer to detect the unknown crude oil sample to obtain a second spectrum matrix;

[0011] Calculating a second moving window correlation coefficient between each spectrum in the second spectrum matrix and the first-order differential mean spectrum to obtain a second moving window correlation coefficient matrix;

[0012] The first moving window correlation coefficient matrix and the second moving window correlation coefficient matrix are combined to obtain a correlation coefficient matrix, which is used as a crude oil near-infrared spectrum conversion coefficient matrix of the unknown crude oil sample on the second spectrometer.

[0013] Optionally, the method further comprises:

[0014] Performing wavelength correction and second-order differential processing on the second spectral matrix to obtain a correction matrix;

[0015] The moving window correlation coefficient between each spectrum in the correction matrix and the first-order differential mean spectrum is calculated to obtain the second moving window correlation coefficient matrix.

[0016] Optionally, performing wavelength correction and second-order differential processing on the second spectral matrix to obtain a correction matrix includes:

[0017] Using the first spectrometer to detect the unknown crude oil sample to obtain a third spectrum matrix;

[0018] Performing densification interpolation and second-order differential processing on the third spectral matrix to obtain a target matrix;

[0019] Performing densification interpolation and second-order differential processing on the second spectral matrix to obtain a matrix to be corrected;

[0020] Divide each spectrum in the target matrix and the matrix to be corrected into n different band intervals according to the spectral wavenumber range, for each band interval, relatively and continuously move one of the spectrum of the target matrix and the spectrum of the matrix to be corrected, calculate the average moving correlation coefficient of the spectral overlapping segment after each spectrum movement, move the spectrum of the matrix to be corrected with the offset value corresponding to the maximum value of the obtained average moving correlation coefficient, and obtain a corrected spectrum;

[0021] The correction matrix is ​​obtained by connecting the correction spectra of n different waveband intervals end to end in the order of wave numbers.

[0022] Optionally, the wavelength range is 4000-5500cm -1 Band, 5500~7000cm -1 Band, 7000~8500cm -1 Band and 8500~10000cm -1 Band.

[0023] Optionally, the calculating the first moving window correlation coefficient between each spectrum in the second-order differential spectrum matrix and the first-order differential mean spectrum to obtain a first moving window correlation coefficient matrix includes:

[0024] The band interval of the preset width is used as the moving window, the sampling point with the lowest wave number is used as the starting point and the moving window is moved toward the direction of high wave number, and the first moving window correlation coefficient of each spectrum in the second-order differential spectrum matrix and the first-order differential mean spectrum is calculated according to formula (1):

[0025]

[0026] Among them, in formula (1), R ij is the first moving window correlation coefficient, are the mean absorbances of all sampling points of the i-th and j-th spectra in the second-order differential spectrum matrix, d is the number of sampling points, k is the sampling point sequence number, x ik is the absorbance of the kth sampling point of the ith spectrum in the second-order differential spectrum matrix, x jk is the absorbance of the kth sampling point of the jth spectrum in the second-order differential spectrum matrix.

[0027] Optionally, calculating the second moving window correlation coefficient between each spectrum in the second spectrum matrix and the first-order differential mean spectrum to obtain a second moving window correlation coefficient matrix includes:

[0028] A band interval of preset width is used as a moving window, and the sampling point with the lowest wave number is used as the starting point and the moving window is moved toward the direction of high wave number. The second moving window correlation coefficient of each spectrum in the second spectral matrix and the first-order differential mean spectrum is calculated according to formula (2):

[0029]

[0030] Among them, in formula (2), R ij ' is the second moving window correlation coefficient, are the mean absorbances of all sampling points of the i-th and j-th spectra in the second spectrum matrix, d is the number of sampling points, k is the sampling point sequence number, x ik ' is the absorbance of the kth sampling point of the ith spectrum in the second spectral matrix, x jk ' is the absorbance of the kth sampling point of the jth spectrum in the second spectral matrix.

[0031] Optionally, the window width of the moving window is 3 to 25 sampling points, the sampling point interval is 2 to 16 wave numbers, and the distance of each movement of the moving window is 1 to 10 sampling points.

[0032] Optionally, the first spectrometer and the second spectrometer are near-infrared spectrometers of different models.

[0033] Optionally, the first spectrometer and the second spectrometer are Fourier transform near-infrared spectrometers respectively.

[0034] Optionally, the detection conditions include: a resolution of 2 to 16 cm -1 , the wave number range is 4000~10000cm -1 , the number of scans is 16 to 128 times.

[0035] Through the above technical scheme, the present disclosure first processes the first spectrum matrix of the known crude oil sample on the first spectrometer to obtain the first-order differential mean spectrum, and then converts the second-order differential spectrum matrix obtained from the first spectrum matrix and the second spectrum matrix of the unknown crude oil sample on the second spectrometer into a moving window correlation coefficient matrix with the first-order differential mean spectrum, and then merges the two moving window correlation coefficient matrices to obtain the crude oil near-infrared spectrum conversion coefficient matrix of the unknown crude oil sample on the second spectrometer, thereby realizing the spectrum conversion between different spectrometers. This method can eliminate the tiny spectral differences between the near-infrared spectra of crude oil samples measured by different spectrometers, improve the accuracy of spectrum conversion, and is suitable for rapid analysis of the composition and physical properties of crude oil samples.

[0036] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0038] Figure 1 It is a schematic flow chart of a crude oil near-infrared spectrum conversion method provided in one embodiment of the present disclosure. DETAILED DESCRIPTION

[0039] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0040] The present invention provides a method for converting crude oil near infrared spectrum. Figure 1 As shown, the following steps S101 to S107 are included:

[0041] S101. Obtain unknown crude oil samples and known crude oil samples;

[0042] S102, using a first spectrometer to detect the known crude oil sample to obtain a first spectrum matrix;

[0043] S103, performing first-order differential processing and averaging processing on the first spectral matrix to obtain a first-order differential mean spectrum; and performing second-order differential processing on the first spectral matrix to obtain a second-order differential spectral matrix;

[0044] S104, calculating the first moving window correlation coefficient between each spectrum in the second-order differential spectrum matrix and the first-order differential mean spectrum to obtain a first moving window correlation coefficient matrix;

[0045] S105, using a second spectrometer to detect the unknown crude oil sample to obtain a second spectrum matrix;

[0046] S106, calculating a second moving window correlation coefficient between each spectrum in the second spectrum matrix and the first-order differential mean spectrum to obtain a second moving window correlation coefficient matrix;

[0047] S107: Merge the first moving window correlation coefficient matrix and the second moving window correlation coefficient matrix to obtain a correlation coefficient matrix as a crude oil near-infrared spectrum conversion coefficient matrix of the unknown crude oil sample on the second spectrometer.

[0048] The present invention aims at the wavelength difference between the near-infrared spectra of crude oil samples measured by different spectrometers, and can convert the near-infrared spectra of crude oil samples measured by different spectrometers into a moving window correlation coefficient matrix of the same mathematical form. The method is simple and has high accuracy in spectrum conversion. It is suitable for model transfer of crude oil library spectra and establishment of correction model for quick evaluation analysis.

[0049] Among them, the first spectrometer is a source machine (or called a host), and the second spectrometer is a target machine (or called a slave). The method disclosed in the present invention is applicable to two near-infrared spectrometers of different models, that is, the first spectrometer and the second spectrometer are near-infrared spectrometers of different models. Specifically, the first spectrometer and the second spectrometer can be near-infrared spectrometers of different models under the same type, or the first spectrometer and the second spectrometer can be near-infrared spectrometers of different models under different types. Among them, the types of near-infrared spectrometers include Fourier transform near-infrared spectrometers, grating spectrometers, etc., and the differences between near-infrared spectrometers of different models include, for example, structural differences, wavelength differences, absorbance differences, etc. of key components.

[0050] In a specific embodiment, the first spectrometer and the second spectrometer are Fourier transform near-infrared spectrometers, respectively. The conditions for detecting the sample using the Fourier transform near-infrared spectrometer may be well known to those skilled in the art. Detecting the known crude oil sample using the first spectrometer and detecting the unknown crude oil sample using the second spectrometer are preferably carried out under the same detection conditions to improve the accuracy of spectral conversion. Specifically, the detection may be a transmission detection, using a cuvette injection method, and a transmission light path of 0.5 mm; the detection conditions may include: a resolution of 2 to 16 cm -1 , the wave number range is 4000~10000cm -1 , scanning times 16 to 128 times.

[0051] In step S103, the methods of first-order differential processing, averaging processing, and second-order differential processing are well known to those skilled in the art.

[0052] In step S104 and step S106, the first moving window correlation coefficient and the second moving window correlation coefficient refer to that for two spectra to be compared, two correlation coefficients to be compared, i.e., moving correlation coefficients, are calculated using the correlation coefficient formula for each moving window band interval, and a series of moving correlation coefficients of sub-band intervals are obtained, and the sub-band interval is the width of a moving window. The specific calculation method can be a conventional moving window coefficient calculation method in the art.

[0053] In one implementation, the calculating the first moving window correlation coefficient between each spectrum in the second-order differential spectrum matrix and the first-order differential mean spectrum to obtain the first moving window correlation coefficient matrix includes:

[0054] The band interval of the preset width is used as the moving window, the sampling point with the lowest wave number is used as the starting point and the moving window is moved toward the direction of high wave number, and the first moving window correlation coefficient of each spectrum in the second-order differential spectrum matrix and the first-order differential mean spectrum is calculated according to formula (1):

[0055]

[0056] Among them, in formula (1), R ij is the first moving window correlation coefficient, are the mean absorbances of all sampling points of the i-th and j-th spectra in the second-order differential spectrum matrix, d is the number of sampling points, k is the sampling point sequence number, x ik is the absorbance of the kth sampling point of the ith spectrum in the second-order differential spectrum matrix, x jk is the absorbance of the kth sampling point of the jth spectrum in the second-order differential spectrum matrix.

[0057] Furthermore, the calculating of the second moving window correlation coefficient between each spectrum in the second spectrum matrix and the first-order differential mean spectrum to obtain a second moving window correlation coefficient matrix includes:

[0058] A band interval of preset width is used as a moving window, and the sampling point with the lowest wave number is used as the starting point and the moving window is moved toward the direction of high wave number. The second moving window correlation coefficient of each spectrum in the second spectral matrix and the first-order differential mean spectrum is calculated according to formula (2):

[0059]

[0060] Among them, in formula (2), R ij ' is the second moving window correlation coefficient, are the mean absorbances of all sampling points of the i-th and j-th spectra in the second spectrum matrix, d is the number of sampling points, k is the sampling point sequence number, x ik ' is the absorbance of the kth sampling point of the ith spectrum in the second spectral matrix, x jk ' is the absorbance of the kth sampling point of the jth spectrum in the second spectral matrix.

[0061] The moving window is a spectral window of a band interval with a preset width, starting from the first wave number sampling point of the spectral segment where the moving correlation coefficient needs to be calculated, and moving one to multiple sampling points each time, which is the moving distance of the window, until the last wave number sampling point. Preferably, a moving window width is selected from the sampling point with the lowest wave number, and the correlation coefficient between the absorbance of each spectrum in the second-order differential spectrum matrix or the second spectrum matrix in the window and the first-order differential mean spectrum is calculated, and then the moving window is moved in the direction of high wave number by several sampling points, and the correlation coefficient between the absorbance of each spectrum in the second-order differential spectrum matrix or the second spectrum matrix in this moving window and the first-order differential mean spectrum is calculated for the next moving window. The moving window is continuously moved according to the above method, and the correlation coefficient between the absorbance of each spectrum in the second-order differential spectrum matrix or the second spectrum matrix to be calculated in each moving window and the first-order differential mean spectrum is calculated. The obtained correlation coefficient value is plotted against the starting position of the corresponding moving window, and a moving window correlation coefficient graph is obtained. From this figure, we can easily see the similarity between the two spectra. If the two spectra are exactly the same, the moving correlation coefficient value in the entire spectral range is 1. If the two spectra are different only in a certain interval, the correlation coefficient value in this interval will drop significantly. By calculating the moving window correlation coefficient, we can distinguish two spectra with slight differences, improve the recognition accuracy of the spectra, and facilitate the extraction of implicit information.

[0062] Furthermore, the window width of the moving window should be a fixed value and can be adjusted as needed, for example, it can be 3 to 25 sampling points; the sampling point interval can be determined by the resolution of the spectrometer, for example, it can be 2 to 16 wave numbers; the distance of each movement of the moving window can be 1 to 10 sampling points.

[0063] In one implementation, the second moving window correlation coefficient is calculated after the second spectral matrix is ​​corrected to improve the accuracy of spectral conversion. Specifically, the method further includes:

[0064] Performing wavelength correction and second-order differential processing on the second spectral matrix to obtain a correction matrix;

[0065] The moving window correlation coefficient between each spectrum in the correction matrix and the first-order differential mean spectrum is calculated to obtain the second moving window correlation coefficient matrix.

[0066] The wavelength correction refers to correcting the spectrum measured by the second spectrometer to be consistent with the spectrum measured by the first spectrometer by eliminating the shift of the spectrum wavelength.

[0067] For example, performing wavelength correction and second-order differential processing on the second spectrum matrix to obtain a correction matrix includes:

[0068] Using the first spectrometer to detect the unknown crude oil sample to obtain a third spectrum matrix;

[0069] Performing densification interpolation and second-order differential processing on the third spectral matrix to obtain a target matrix;

[0070] Performing densification interpolation and second-order differential processing on the second spectral matrix to obtain a matrix to be corrected;

[0071] Divide each spectrum in the target matrix and the matrix to be corrected into n different band intervals according to the spectral wavenumber range, for each band interval, relatively and continuously move one of the spectrum of the target matrix and the spectrum of the matrix to be corrected, calculate the average moving correlation coefficient of the spectral overlapping segment after each spectrum movement, move the spectrum of the matrix to be corrected with the offset value corresponding to the maximum value of the obtained average moving correlation coefficient, and obtain a corrected spectrum;

[0072] The correction matrix is ​​obtained by connecting the correction spectra of n different waveband intervals end to end in the order of wave numbers.

[0073] The detection of the unknown crude oil sample by using the first spectrometer and the detection of the unknown crude oil sample by using the second spectrometer are preferably performed under the same detection conditions, and the detection conditions can refer to those described above.

[0074] The densification interpolation and second-order differential processing methods are well known to those skilled in the art. The densification interpolation preferably uses cubic spline interpolation, and the sampling point interval set by the densification interpolation is preferably 0.01 to 0.04 cm. -1 .

[0075] The target matrix and the matrix to be corrected are divided into n different band intervals, preferably into 3 to 5 different band intervals, and the wave number contained in each band interval is preferably 1200 to 1600 cm -1 The wave numbers contained in each band interval can be the same or different, that is, the spectrum can be divided into n band intervals according to the same wave number, or the spectrum can be divided into n band intervals according to different wave numbers. For example, the spectrum can be divided into four band intervals according to 1500 wave numbers in each band interval, that is, the band intervals are 4000~5500cm -1 Band, 5500~7000cm -1 Band, 7000~8500cm -1 Band and 8500~10000cm -1 Band.

[0076] Specifically, for each band interval, the spectra in the target matrix and the matrix to be corrected are first made to completely overlap in the spectrum of this band interval, and then the spectrum in the matrix to be corrected is kept unchanged, and the spectrum in the target matrix (recorded as spectrum EA) is shifted rightward by sampling points relative to the spectrum in the matrix to be corrected (recorded as spectrum EB), that is, the spectrum EA is first shifted rightward by one sampling point to generate a spectrum overlap segment, and then the spectrum EA is shifted rightward by one sampling point to generate another spectrum overlap segment, and so on, the spectrum in the spectrum EA is shifted rightward by m sampling points, recorded as v=m, v is the number of sampling points of the spectrum movement, and m spectrum overlap segments are generated, and the moving direction is equivalent to the spectrum EB being shifted leftward relative to the spectrum EA. Similarly, the spectrum EA is kept unchanged, and the spectrum EB is shifted rightward by m sampling points relative to the spectrum EA, recorded as v=-m, and m spectrum overlap segments are also generated. The average moving correlation coefficient R of the spectrum EA and the spectrum EB overlap segments generated after each spectrum movement is calculated. x .

[0077] The number of spectrum overlap segments generated is the same as the number of sampling points of spectrum movement. The setting method of the spectrum overlap segment is: in a spectrum band with a wave number of a to b, when spectrum EA and spectrum EB completely overlap, v=0, for spectrum EA, the overlap segment is EAa to EAb, for spectrum EB, the overlap segment is EBa to EBb, keep spectrum EB unchanged, shift spectrum EA to the right by v sampling points relative to spectrum EB, for spectrum EA, the overlap segment is EA(a+vd) to EAb, for spectrum EB, the overlap segment is EBa to EB(b-vd), and so on, until spectrum EA is shifted to the right by m sampling points relative to spectrum EB, for spectrum EA, the overlap segment is EA(a+md) to EAb, for spectrum EB, the overlap segment is EBa to EB(b-md), where d is the wave number of the sampling interval. The total number of sampling points m for relative spectrum movement is preferably 10 to 25.

[0078] The average moving correlation coefficient R of a spectral overlap segment X is calculated by formula (3): x :

[0079]

[0080] In formula (3), r i is the moving correlation coefficient of the two spectra in the i-th moving window, t is the total number of moving windows of the two spectra in the spectral overlap segment X, and i is the moving window sequence number. The moving window width is preferably 500 to 700 sampling points, and the sampling point interval is preferably 0.01 to 0.04 cm -1 .

[0081] Calculate R xWhen , although the wave number ranges of spectrum EA and spectrum EB in each spectrum overlap segment may be the same or different, the wave number is the same, and the number of moving windows generated by moving the moving window according to the sampling point is the same. Therefore, the moving correlation coefficient of the moving window can be obtained by calculating the correlation coefficient of the moving window corresponding to spectrum EA and spectrum EB in the spectrum overlap segment X. For example, when calculating r1, the correlation coefficient of spectrum EA and spectrum EB in the first moving window is calculated, and when calculating r2, the moving correlation coefficient of spectrum EA and spectrum EB in the second moving window is calculated, and so on, until the moving correlation coefficient of spectrum EA and spectrum EB in the last moving window is calculated.

[0082] For each moving window, the moving correlation coefficient of the two spectra in the i-th moving window is calculated according to formula (4):

[0083]

[0084] In formula (4), are the mean absorbance in the selected overlapping segments of spectra EA and EB, n is the number of wavenumber sampling points, and k is the wavenumber sampling sequence number.

[0085] R q is the maximum value among the average moving correlation coefficients obtained. According to R q The corresponding offset value, i.e., q value, is used to shift the spectrum EB and convert it into a spectrum consistent with the spectrum obtained by the first spectrometer test. Then, it is necessary to perform inverse interpolation processing on it. Preferably, cubic spline interpolation is used for inverse interpolation processing, so that the sampling interval of the spectrum is the same as the sampling interval of the spectrum measured by the first spectrometer, and the correction spectrum FB obtained by converting the spectrum EB of this band into the spectrum measured by the first spectrometer is obtained. n , FB n The n in the formula represents the serial number of the band interval. n The complete correction spectrum FB is obtained by connecting them end to end in the order of wave numbers, and all the correction spectra FB constitute the correction matrix.

[0086] In step S107, the correlation coefficient matrix obtained by merging the first moving window correlation coefficient matrix and the second moving window correlation coefficient matrix can be used as the crude oil near-infrared spectrum conversion coefficient matrix of the unknown crude oil sample on the second spectrometer, and the crude oil near-infrared spectrum conversion coefficient matrix can realize the spectrum database conversion from the source machine (first spectrometer) to the target machine (second spectrometer). For example, the crude oil near-infrared spectrum conversion coefficient matrix is ​​combined with the corresponding crude oil evaluation data on the first spectrometer, and a multivariate correction algorithm such as partial least squares (PLS) or other crude oil evaluation algorithms is used to model, and the crude oil spectrum matrix detected on the second spectrometer is substituted into the model to obtain the converted crude oil spectrum matrix and further model analysis results.

[0087] The disclosed method is applicable to the near-infrared spectrum conversion between different spectrometers in the detection of various crude oil samples, and the type of the crude oil sample is not particularly limited. In practical applications, a spectrum correction model can be further established on the basis of spectrum conversion for rapid analysis of the composition and physical properties of crude oil samples. The disclosure has no particular restrictions on the subsequent steps of spectrum conversion (such as spectrum correction, sample analysis, etc.), which can be carried out using conventional methods in the art.

[0088] The disclosed method first obtains the first-order differential mean spectrum of the source machine hangar spectrum, and then converts the source machine spectrum and the target machine spectrum into a moving window correlation coefficient matrix with the first-order differential mean spectrum. The model established on the source machine can obtain the model on the target machine by combining the two moving window correlation coefficient matrices to obtain the conversion coefficient matrix, thereby realizing the conversion between near-infrared spectra measured by spectrometers of different models.

[0089] The present disclosure is further described in detail below through examples, but the present disclosure is not limited thereto.

[0090] In the example, the instrument a for collecting gasoline near-infrared spectra is a Fourier transform near-infrared spectrometer produced by Thermo, model Antaris II, and the instrument b is a Fourier transform near-infrared spectrometer produced by ABB, model MB 3600. The spectrum collection conditions of both instruments a and b are: resolution 8 cm -1 , wave number range 4000~10000cm -1 , cumulative scanning times 64 times, transmission measurement method.

[0091] The following standard methods are used to determine the key properties of crude oil:

[0092] Density: SH / T0604-2000 Density determination of crude oil and petroleum products (U-shaped vibrating tube method),

[0093] Sulfur content: GB / T17606-2009 Determination of sulfur content in crude oil Energy dispersive X-ray fluorescence spectrometry,

[0094] Nitrogen content: SH / T 0704-2001 Determination of nitrogen content in petroleum and petroleum products - Boat injection chemiluminescence method.

[0095] Example 1

[0096] In this embodiment, it is known that a near-infrared spectrum database of crude oil is established on instrument a, and the database contains 500 typical crude oil samples and corresponding physical properties and composition data.

[0097] (1) The first spectral matrix A of the known crude oil sample established on the instrument a is firstly subjected to the first-order differential spectrum calculation and then subjected to the mean value processing to obtain the first-order differential mean spectrum s, and then the second-order differential spectrum matrix EA is calculated.

[0098] (2) The first moving window correlation coefficient between each spectrum in the second-order differential spectrum matrix EA and the first-order differential mean spectrum s is calculated according to the following formula to form the first moving window correlation coefficient matrix RA:

[0099]

[0100] Among them, R ij is the first moving window correlation coefficient; are the mean absorbance of all sampling points of the i-th and j-th spectra in the second-order differential spectrum matrix EA, d is the number of sampling points, k is the sampling point sequence number, x ik is the absorbance of the kth sampling point of the ith spectrum in the second-order differential spectrum matrix EA, x jk is the absorbance of the kth sampling point of the jth spectrum in the second-order differential spectrum matrix EA. The window width of the moving window is 11 sampling points, and the distance of each moving window is 1 sampling point.

[0101] (3) Take a group of unknown crude oil samples, the number of samples is 20, and use instrument b to measure their near-infrared spectra to form a second spectrum matrix B. At the same time, use standard methods to detect their density, sulfur content and nitrogen content data for spectral conversion.

[0102] The second spectrum matrix B of the crude oil sample is subjected to wavelength correction and second-order differential processing to obtain the correction matrix EB, which is specifically:

[0103] The unknown crude oil sample is detected by instrument a to obtain a third spectrum matrix C. The spectra in the second spectrum matrix B and the third spectrum matrix C are analyzed in the range of 4000 to 10000 cm -1 Within the range of 0.02cm -1 The sampling point interval is 10000 cm / s, and the interpolation spectrum is subjected to second-order differential processing to obtain two spectral matrices after densification and interpolation. The two spectral matrices are then divided into four bands: 4000-5500 cm / s. -1 Band, 5500~7000cm -1 Band, 7000~8500cm -1 Band and 8500~10000cm -1 , the average moving correlation coefficient of the spectral overlap segments in the four bands is calculated in turn, the width of the moving window used is 600 sampling points, and the sampling point interval is 0.02cm -1 , take the maximum value R in each band interval qThe corresponding offset value, i.e., q, moves the spectrum in the second spectrum matrix B accordingly, and then -1 The sampling interval is inversely interpolated using cubic spline interpolation to obtain correction spectra FB1, FB2, FB3, and FB4 in four bands, which are connected end to end in wavenumber order to obtain a complete correction spectrum FB. All correction spectra FB form a correction matrix EB.

[0104] (4) The second moving window correlation coefficient of each second-order differential spectrum and the first-order differential mean spectrum s in the correction matrix EB is calculated according to the following formula to form a second moving window correlation coefficient matrix RB:

[0105]

[0106] Among them, R ij ' is the second moving window correlation coefficient, are the mean absorbances of all sampling points of the i-th and j-th spectra in the second spectrum matrix, d is the number of sampling points, k is the sampling point sequence number, x ik ' is the absorbance of the kth sampling point of the ith spectrum in the second spectral matrix, x jk ' is the absorbance of the kth sampling point of the jth spectrum in the second spectral matrix.

[0107] (5) The first moving window correlation coefficient matrix RA and the second moving window correlation coefficient matrix RB are combined to obtain a correlation coefficient matrix RB1, which is used as the crude oil near-infrared spectrum conversion coefficient matrix of the unknown crude oil sample on the second spectrometer.

[0108] The correlation coefficient matrix RB1 is combined with the corresponding crude oil evaluation data on the first spectrometer and modeled using the partial least squares method (PLS) to obtain the crude oil prediction model. Another 20 crude oil samples were taken, and their near-infrared spectra were collected using instrument b to detect their density, sulfur content and nitrogen content data. Then, the established crude oil prediction model was used for prediction. Some of the results are shown in Table 1.

[0109] (7) Establish a partial least squares (PLS) spectral correction model on instrument a and select the optimal principal factor f best The model was used to predict the above 20 crude oil samples collected by instrument a under the conditions of , and the results are shown in Table 2.

[0110] The calculation formula of relevant statistical parameters is as follows:

[0111]

[0112] in, is the predicted value of the i-th sample, y i(i=1,2,…,n) is the true value of the i-th sample, and n is the number of samples in the test set.

[0113] Deviation = measured value - predicted value.

[0114] Table 1

[0115]

[0116] Table 2

[0117]

[0118]

[0119] By comparing Table 1 and Table 2, it can be seen that the prediction accuracy of the PLS model established on the second spectrometer after spectral conversion by the method disclosed in the present invention is basically equivalent to that before spectral conversion (first spectrometer), indicating that the method disclosed in the present invention can eliminate the tiny spectral differences between the near-infrared spectra of crude oil samples measured by different spectrometers, realize the spectral conversion between different spectrometers, and can achieve the prediction effect of original database modeling.

[0120] Comparative Example 1

[0121] The conventional DS algorithm is used to convert the spectra of instrument a and instrument b, specifically:

[0122] (1) In the actual application of a petrochemical refinery, 20 typical crude oil sample spectra were collected on instrument a and instrument b respectively as standard samples for model transfer. The near-infrared spectral absorbance matrix of the standard samples is the first spectral matrix A s and the second spectral matrix B s .

[0123] Twenty crude oil samples processed daily were collected, their near-infrared spectra were acquired on instrument b, and their relevant physical property data were determined using the national standard method. They were used as unknown samples to verify the spectral conversion effect.

[0124] (2) The first spectral matrix A s and the second spectral matrix B s Perform eigenvalue decomposition respectively, A s =U1S1V1,B s =U2S2V2,A s Represents host B s Represents the slave. The spectrum preprocessing process is the same as Example 1

[0125] (3) Let Z1=U1S1, Z2=U2S2.

[0126] (4) Solve for the regression coefficient F and find the conversion coefficient F of Z1×F=Z2 based on matrix analysis.

[0127] (5) The crude oil spectrum library matrix A established on instrument a is multiplied by the conversion coefficient F, that is, A×F=B a 'Then we get the matrix B a 'The spectrum conversion from instrument a to instrument b is completed.

[0128] (6) The crude oil evaluation data corresponding to the first spectrometer was used to establish a crude oil prediction model using the partial least squares (PLS) method. The 20 crude oil samples collected by instrument b were predicted. The results are shown in Table 3.

[0129] Table 3

[0130]

[0131] By comparing Table 1 and Table 3, it can be seen that compared with the traditional method for spectral conversion, the prediction accuracy of the PLS model established in the second spectrometer after spectral conversion by the method disclosed in the present invention is higher, indicating that the spectral conversion accuracy of the method disclosed in the present invention is high.

[0132] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.

[0133] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0134] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A method for converting crude oil near infrared spectrum, characterized in that: The method comprises the following steps: Obtain samples of unknown crude oil and samples of known crude oil; Using a first spectrometer to detect the known crude oil sample to obtain a first spectrum matrix; The first spectral matrix is ​​subjected to first-order differential processing and average processing to obtain a first-order differential average spectrum; and the first spectral matrix is ​​subjected to second-order differential processing to obtain a second-order differential spectral matrix; Calculating the first moving window correlation coefficient between each spectrum in the second-order differential spectrum matrix and the first-order differential mean spectrum to obtain a first moving window correlation coefficient matrix; Using a second spectrometer to detect the unknown crude oil sample to obtain a second spectrum matrix; Calculating a second moving window correlation coefficient between each spectrum in the second spectrum matrix and the first-order differential mean spectrum to obtain a second moving window correlation coefficient matrix; The first moving window correlation coefficient matrix and the second moving window correlation coefficient matrix are combined to obtain a correlation coefficient matrix, which is used as a crude oil near-infrared spectrum conversion coefficient matrix of the unknown crude oil sample on the second spectrometer.

2. The method according to claim 1, wherein: The method further includes: Performing wavelength correction and second-order differential processing on the second spectral matrix to obtain a correction matrix; The moving window correlation coefficient between each spectrum in the correction matrix and the first-order differential mean spectrum is calculated to obtain the second moving window correlation coefficient matrix.

3. The method according to claim 2, wherein: The step of performing wavelength correction and second-order differential processing on the second spectrum matrix to obtain a correction matrix includes: Using the first spectrometer to detect the unknown crude oil sample to obtain a third spectrum matrix; Performing densification interpolation and second-order differential processing on the third spectral matrix to obtain a target matrix; Performing densification interpolation and second-order differential processing on the second spectral matrix to obtain a matrix to be corrected; Divide each spectrum in the target matrix and the matrix to be corrected into n different band intervals according to the spectral wavenumber range, for each band interval, relatively and continuously move one of the spectrum of the target matrix and the spectrum of the matrix to be corrected, calculate the average moving correlation coefficient of the spectral overlapping segment after each spectrum movement, move the spectrum of the matrix to be corrected with the offset value corresponding to the maximum value of the obtained average moving correlation coefficient, and obtain a corrected spectrum; The correction matrix is ​​obtained by connecting the correction spectra of n different waveband intervals end to end in the order of wave numbers.

4. The method according to claim 3, wherein: The wavelength range is 4000-5500cm -1 Band, 5500~7000cm -1 Band, 7000~8500cm -1 Band and 8500~10000cm -1 Band.

5. The method according to claim 1, wherein: The step of calculating the first moving window correlation coefficient between each spectrum in the second-order differential spectrum matrix and the first-order differential mean spectrum to obtain a first moving window correlation coefficient matrix includes: The band interval of the preset width is used as the moving window, the sampling point with the lowest wave number is used as the starting point and the moving window is moved toward the direction of high wave number, and the first moving window correlation coefficient of each spectrum in the second-order differential spectrum matrix and the first-order differential mean spectrum is calculated according to formula (1): Among them, in formula (1), R ij is the first moving window correlation coefficient, are the mean absorbances of all sampling points of the i-th and j-th spectra in the second-order differential spectrum matrix, d is the number of sampling points, k is the sampling point sequence number, x ik is the absorbance of the kth sampling point of the ith spectrum in the second-order differential spectrum matrix, x jk is the absorbance of the kth sampling point of the jth spectrum in the second-order differential spectrum matrix.

6. The method according to claim 5, wherein: The step of calculating the second moving window correlation coefficient between each spectrum in the second spectrum matrix and the first-order differential mean spectrum to obtain a second moving window correlation coefficient matrix includes: A band interval of preset width is used as a moving window, and the sampling point with the lowest wave number is used as the starting point and the moving window is moved toward the direction of high wave number. The second moving window correlation coefficient of each spectrum in the second spectral matrix and the first-order differential mean spectrum is calculated according to formula (2): Among them, in formula (2), R ij ' is the second moving window correlation coefficient, are the mean absorbances of all sampling points of the i-th and j-th spectra in the second spectrum matrix, d is the number of sampling points, k is the sampling point sequence number, x ik ' is the absorbance of the kth sampling point of the ith spectrum in the second spectral matrix, x jk ' is the absorbance of the kth sampling point of the jth spectrum in the second spectral matrix.

7. The method according to claim 5 or 6, wherein: The window width of the moving window is 3 to 25 sampling points, the sampling point interval is 2 to 16 wave numbers, and the distance of each movement of the moving window is 1 to 10 sampling points.

8. The method according to claim 1, wherein: The first spectrometer and the second spectrometer are near-infrared spectrometers of different models.

9. The method according to claim 8, wherein: The first spectrometer and the second spectrometer are respectively Fourier transform near-infrared spectrometers.

10. The method according to claim 9, wherein: The detection conditions include: resolution of 2 to 16 cm -1 , the wave number range is 4000~10000cm -1 , the number of scans is 16 to 128 times.

Citation Information

Patent Citations

  • Method for fast recognition of crude oil variety through near infrared spectrum

    CN101995389B