CN116008216A - Method and apparatus for detecting oil blending - Google Patents

Method and apparatus for detecting oil blending Download PDF

Info

Publication number
CN116008216A
CN116008216A CN202111233019.7A CN202111233019A CN116008216A CN 116008216 A CN116008216 A CN 116008216A CN 202111233019 A CN202111233019 A CN 202111233019A CN 116008216 A CN116008216 A CN 116008216A
Authority
CN
China
Prior art keywords
oil
spectrum
sample
near infrared
absorbance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111233019.7A
Other languages
Chinese (zh)
Inventor
王海朋
褚小立
李敬岩
陈瀑
刘丹
许育鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sinopec Research Institute of Petroleum Processing
China Petroleum and Chemical Corp
Original Assignee
Sinopec Research Institute of Petroleum Processing
China Petroleum and Chemical Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sinopec Research Institute of Petroleum Processing, China Petroleum and Chemical Corp filed Critical Sinopec Research Institute of Petroleum Processing
Priority to CN202111233019.7A priority Critical patent/CN116008216A/en
Publication of CN116008216A publication Critical patent/CN116008216A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The application provides a method and equipment for detecting oil blending. The method comprises the following steps: acquiring a near infrared spectrum of an oil sample to be tested; obtaining the absorbance of a characteristic spectrum area from the near infrared spectrum of the oil sample to be detected; and determining the category of the oil sample to be detected according to the absorbance of the characteristic spectrum area and a pre-established discriminant analysis model, wherein the discriminant analysis model is generated according to the near infrared spectrums of a plurality of samples of the first oil and the second oil, the mixing proportion of the samples and the absorbance of the characteristic spectrum area. According to the scheme, a discriminant analysis model can be constructed based on the mixed spectrum synthesized by the near infrared spectrums of the samples of the known first oil and the second oil, so that the second oil spectrum mixed with the first oil spectrum in any proportion can be synthesized by utilizing the spectrum of the known samples under the typical and sufficient conditions, and the second oil spectrum mixed with different first oil proportions is simulated. Compared with a method for directly collecting a sample of blended oil liquid to build a model, the method is more reliable and simple.

Description

Method and apparatus for detecting oil blending
Technical Field
The application relates to the field of detection, in particular to a method and equipment for detecting oil blending.
Background
Aviation kerosene is a special fuel for jet aircraft. Because of the special nature of the working environment, the requirements on the performance of the fuel are very strict, such as good low-temperature fluidity, larger net heat value and density, faster combustion speed, complete combustion, good stability and the like. These properties are largely dependent on the chemical composition of the aviation kerosene, which may also vary from feedstock to feedstock and from production process to production process, thereby affecting certain properties of the aviation kerosene. At present, aviation kerosene is mainly obtained by a conventional petroleum refining process, and the yield of aviation kerosene accounts for more than 80% of the total yield. The aviation kerosene refining technology is to utilize atmospheric and vacuum distillation technology to distill, condense and collect compounds with different boiling points to separate substances and obtain fractions such as liquefied gas, naphtha, gasoline, kerosene, diesel oil, lubricating oil, fuel oil, residual oil and the like. However, because the boiling ranges of kerosene (180-310 ℃) and diesel (180-370 ℃) are coincident, when aviation kerosene fraction required by cutting is obtained, the diesel fraction is easily cut into aviation kerosene fraction, so that the difficulty of the subsequent aviation kerosene refining process is increased, and the cost is increased. In order to facilitate the smooth proceeding of the subsequent process of aviation kerosene and ensure the quality of finished aviation kerosene to the greatest extent, the aviation kerosene cutting process needs to be monitored. Monitoring of this process first requires a method to be sought that can distinguish between a pure aviation kerosene fraction and an aviation kerosene cut into a diesel fraction.
Disclosure of Invention
The embodiment of the application aims to provide a method and equipment for detecting oil blending.
To achieve the above object, a first aspect of the present application provides a method for detecting oil blending, the method comprising: acquiring a near infrared spectrum of an oil sample to be tested; obtaining the absorbance of a characteristic spectrum area from the near infrared spectrum of the oil sample to be detected; and determining the category of the oil sample to be detected according to the absorbance of the characteristic spectrum area and a pre-established discriminant analysis model, wherein the discriminant analysis model is generated according to the near infrared spectrums of a plurality of samples of the first oil and the second oil, the mixing proportion of the samples and the absorbance of the characteristic spectrum area.
In an embodiment of the present application, the discriminant analysis model is generated according to the following operations:
obtaining a plurality of samples of the first oil and the second oil;
obtaining a first near infrared spectrum according to the formula (1),
m=xd+(1-x)j
wherein m represents a first near infrared spectrum synthesized by a spectrum of the first oil and a spectrum of the second oil, d is the near infrared spectrum of the first oil, j is the near infrared spectrum of the second oil, and x is a blending ratio of the near infrared spectrum of the first oil, for example, x is more than or equal to 0 and less than or equal to 1.
Generating a library sample spectrum by using the first near infrared spectrum, and setting a corresponding class label value according to the near infrared spectrum blending proportion of the first oil liquid (for example, a class label of the first near infrared spectrum synthesized at 0< x <1 can be set to be-1, and a class label of the first near infrared spectrum at x=0 is set to be 1); and
and (3) obtaining the absorbance of the characteristic spectrum region of each library sample spectrum, and constructing a partial least square discriminant analysis model by combining the absorbance of the characteristic spectrum region of each library sample spectrum and the corresponding class label value.
In the embodiment of the applicationThe characteristic spectrum area is 4462-4752cm -1
In the embodiment of the application, the oil sample to be detected is an actual oil sample or an oil sample configured by (2),
m=cd+(1-c)j
in the formula (2), m represents a sample obtained after mixing the first oil liquid and the second oil liquid, d is a sample of the first oil liquid, j is a sample of the second oil liquid, and c is a volume ratio of the sample of the first oil liquid, wherein the value range of c is more than or equal to 0 and less than or equal to x max <1, and c takes 0, m represents a sample of the second oil in pure form, wherein x is max Is the maximum blending proportion of the first oil liquid.
In this embodiment of the present application, a class label value of the oil sample to be measured is calculated according to the following formula, and the class label value is compared with a threshold value to determine a class of the oil sample to be measured:
y un =b PLS x un
wherein x is un B, absorbance of a characteristic spectrum area of the oil sample to be detected PLS =w f T (p f w f T ) -1 q f b PLS Regression coefficients for Partial Least Squares (PLS) algorithm, where f is the optimal prime factor number of partial least squares determined by interactive inspection, w f Weight vector of absorbance matrix of sample spectrum under f principal components, p for established discriminant analysis model f The load of the absorbance matrix of the sample spectrum at f principal components, q, used for the established discriminant analysis model f And loading the class label matrix corresponding to the sample spectrum used for the established discriminant analysis model under f principal components.
Wherein the method further comprises:
performing first-order or second-order differential treatment on the near infrared spectrum of the oil sample to be detected to obtain a differential spectrum of the oil sample to be detected;
obtaining differential absorbance of a characteristic spectrum area in the differential spectrum; and
and determining the category of the oil sample to be detected according to the differential absorbance and a pre-established discriminant analysis model, wherein the discriminant analysis model is generated according to the near infrared spectrum and the mixing proportion of a plurality of samples of the first oil and the second oil, and the differential spectrum of the near infrared spectrum and the differential absorbance of the characteristic spectrum region thereof.
In an embodiment of the present application, the discriminant analysis model is generated according to the following operations:
obtaining a plurality of samples of the first oil and the second oil;
obtaining a first near infrared spectrum according to the formula (1),
m=xd+(1-x)j
wherein m represents a first near infrared spectrum synthesized by a spectrum of the first oil and a spectrum of the second oil, d is the near infrared spectrum of the first oil, j is the near infrared spectrum of the second oil, x is the blending proportion of the near infrared spectrum of the first oil,
performing first-order or second-order differential processing on each first near infrared spectrum to obtain first differential spectrums;
acquiring first differential absorbance of a characteristic spectrum region in each first differential spectrum;
and correlating all the first differential absorbance with the class label value corresponding to all the first differential absorbance to construct a partial least square discriminant analysis model.
In the embodiment of the present application, the window width of the first-order differential process is 19, and the window width of the second-order differential process is 25.
In the embodiment of the application, the first oil is diesel oil, and the second oil is aviation kerosene.
A second aspect of the present application provides an apparatus for detecting oil blending, the apparatus comprising: a memory; and a processor configured to perform the above method of detecting oil blending.
A third aspect of the present application provides a machine-readable storage medium having instructions stored thereon, which when executed by a processor cause the processor to be configured to perform the method of detecting oil blending described above.
According to the technical scheme, the discriminant analysis model can be constructed based on the mixed spectrum synthesized by the near infrared spectrums of the samples of the known first oil and the second oil, so that the second oil spectrum mixed with the first oil spectrum in any proportion can be synthesized by utilizing the spectrum of the known samples (including the samples of the first oil and the second oil) under the condition that the known samples are typical and sufficient, and the second oil spectrum mixed with different first oil proportions is simulated. Compared with a method for directly collecting a sample of blended oil liquid to build a model, the method is more reliable and simple.
Additional features and advantages of embodiments of the present application will be set forth in the detailed description that follows.
Drawings
The accompanying drawings are included to provide a further understanding of embodiments of the present application and are incorporated in and constitute a part of this specification, illustrate embodiments of the present application and together with the description serve to explain, without limitation, the embodiments of the present application. In the drawings:
FIG. 1 schematically illustrates a flow chart of a method of detecting oil blending according to an embodiment of the present application;
FIG. 2 schematically illustrates another flow diagram of a method of detecting oil blending according to an embodiment of the present application;
FIG. 3 schematically illustrates a block diagram of an apparatus for detecting oil blending in accordance with an embodiment of the present application;
fig. 4 shows the discrimination of training set samples by the method of the present invention in example 1 (in the figure, the simulated aviation kerosene samples blended with different diesel ratios with correct classification are below the 0 threshold line at the left side a-I, the simulated aviation kerosene samples blended with different diesel ratios with incorrect classification are above, the 0 threshold line at the right side a-I are above the correctly classified aviation kerosene samples, and the unclassified aviation kerosene samples are below).
Fig. 5 shows the discrimination of the sample of the verification set by the method of the present invention in example 1 (below the left 0 threshold line in the figure is the correctly classified aviation kerosene sample mixed with different diesel ratios, above is the non-correctly classified aviation kerosene sample mixed with different diesel ratios, above is the right 0 threshold line is the correctly classified aviation kerosene sample, below is the non-correctly classified aviation kerosene sample).
FIG. 6 shows the discrimination of training set samples by the method of the present invention in example 2 (in the figure, the simulated aviation kerosene samples blended with different diesel ratios with correct classification are below the 0 threshold line at the left side A-I, the simulated aviation kerosene samples blended with different diesel ratios with incorrect classification are above, the 0 threshold line at the right side A-I are above, and the aviation kerosene samples with correct classification are below).
Fig. 7 shows the discrimination of the sample of the verification set by the method of the present invention in example 2 (below the 0 threshold line at the left side a to I in the figure, there are correctly classified aviation kerosene samples blended with different diesel ratios, above there are non-correctly classified aviation kerosene samples blended with different diesel ratios, above the 0 threshold line at the right side a to I there are correctly classified aviation kerosene samples, below there are non-correctly classified aviation kerosene samples).
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the specific implementations described herein are only for illustrating and explaining the embodiments of the present application, and are not intended to limit the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be noted that, in the embodiment of the present application, directional indications (such as up, down, left, right, front, and rear … …) are referred to, and the directional indications are merely used to explain the relative positional relationship, movement conditions, and the like between the components in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indications are correspondingly changed.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present application, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be regarded as not exist and not within the protection scope of the present application.
In the following, the invention is described by using diesel oil and aviation kerosene as the first oil and the second oil respectively, but the scheme of the invention is not limited to diesel oil and aviation kerosene, and can be applied to blending identification of other oils. In addition, the scheme of the invention is not limited to the mixing identification of two kinds of oil liquids, and the mixing identification between any number of oil liquids is feasible.
FIG. 1 schematically illustrates a flow chart of a method of detecting oil blending according to an embodiment of the present application. It should be understood that, although the steps in the flowchart of fig. 1 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps of other steps.
As shown in fig. 1, in one embodiment of the present application, a method for detecting oil blending is provided, the method comprising the steps of:
102, acquiring a near infrared spectrum of an oil sample to be detected;
104, obtaining absorbance of a characteristic spectrum area from a near infrared spectrum of the oil sample to be detected;
and 106, determining the category of the oil sample to be detected according to the absorbance of the characteristic spectrum region and a pre-established discriminant analysis model, wherein the discriminant analysis model is generated according to the near infrared spectrums of a plurality of samples of the first oil and the second oil, the mixing proportion of the near infrared spectrums and the absorbance of the characteristic spectrum region.
As shown in fig. 2, in one embodiment of the present application, a method for detecting oil blending is provided, the method comprising the steps of:
step 202, performing first-order or second-order differential treatment on a near infrared spectrum of an oil sample to be detected to obtain a differential spectrum of the oil sample to be detected;
step 204, obtaining differential absorbance of a characteristic spectrum area in the differential spectrum; and
and 206, determining the category of the oil sample to be detected according to the differential absorbance and a pre-established discriminant analysis model, wherein the discriminant analysis model is generated according to the near infrared spectrum and the mixing proportion of a plurality of samples of the first oil and the second oil, the differential spectrum of the near infrared spectrum and the differential absorbance of the characteristic spectrum region thereof.
In one embodiment, as shown in FIG. 3, an apparatus for detecting oil blending is provided that includes a processor 310 and a memory 320. The processor comprises a kernel, and the kernel calls corresponding program units from the memory. The kernel can be provided with one or more than one, and the method for detecting oil blending is realized by adjusting kernel parameters. The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), which includes at least one memory chip.
It will be appreciated by those skilled in the art that the structure shown in fig. 3 is merely a block diagram of a portion of the structure associated with the present application and does not constitute a limitation of the apparatus to which the present application is applied, and that a particular apparatus may include more or less components than those shown in the drawings, or may combine certain components, or have a different arrangement of components.
According to the invention, a first near infrared spectrum is synthesized by using a known aviation kerosene sample spectrum and a diesel oil sample spectrum, a library sample spectrum is obtained by combining the first near infrared spectrum and the known aviation kerosene sample spectrum, a partial least square discriminant analysis model is built by combining the library sample spectrum and a corresponding class label value thereof, and then the class of the aviation kerosene sample to be detected (namely, a second near infrared spectrum) mixed with diesel oil and prepared by a laboratory is judged by the near infrared spectrum of the aviation kerosene sample to be detected and the discriminant analysis model.
For the establishment of a discriminant analysis model, the traditional method for collecting typical modeling samples is quite difficult to implement, and the collected samples hardly cover all practical variation situations of the samples, so that the robustness is not always good if the discriminant analysis model is established based on the samples.
The spectrum reflects the composition change of the substance. In theory, the composition of the substance changes, and the spectrum of the substance changes correspondingly, namely, the substance and the spectrum show better consistency. Based on the theory, the synthesized spectrum obtained by linearly combining the spectrums of the two actual samples according to a certain proportion and the spectrum measured after the two samples are mixed should show better consistency. Therefore, the synthesized spectrum obtained by the linear combination of the actual sample spectrum can better simulate the mixed sample of the actual sample under different proportion conditions, and can generate a rich sample spectrum database, thereby laying a foundation for the subsequent establishment of a robust and large-sample-amount discriminant analysis model. The invention adopts the actual near infrared spectrum of the aviation kerosene sample and the near infrared spectrum of the diesel sample to generate a first near infrared spectrum according to a certain proportion.
The invention adopts a transmission type measurement mode for measuring the near infrared spectrum of the aviation kerosene sample, selects a cuvette with 0.5mm, adopts the constant temperature of 25 ℃ and has the scanning range of 10000-3500 cm -1 Resolution of 4cm -1 The cumulative number of scans was 64.
The invention adopts the aviation kerosene sample to be tested prepared by the aviation kerosene sample and the diesel sample to verify the reliability of the partial least square discriminant analysis model based on the synthetic spectrum.
The invention carries out first-order or second-order differential treatment on the first near infrared spectrum and the second near infrared spectrum so as to eliminate interference. Specifically, the invention provides a detection method of aviation kerosene blended diesel based on near infrared spectrum, which comprises the steps of (1) simulating and synthesizing the aviation kerosene near infrared spectrum blended with diesel by utilizing the known aviation kerosene sample near infrared spectrum and the diesel sample near infrared spectrum, namely a first near infrared spectrum, (2) correlating the absorbance of a first-order or second-order differential spectrum characteristic spectrum area of the first near infrared spectrum with a corresponding class label value, and constructing a partial least square discriminant analysis model. (3) And judging the category of the aviation kerosene sample to be tested according to the established partial least square discriminant analysis model and the absorbance of the characteristic spectrum area of the first-order or second-order differential spectrum of the second near infrared spectrum of the aviation kerosene sample to be tested. Because the near infrared spectrum of the aviation kerosene mixed with the diesel oil spectrum of any proportion is synthesized by using the near infrared spectrums of the known aviation kerosene sample and the diesel oil sample, the near infrared spectrum of the aviation kerosene mixed with any diesel oil mixing proportion can be simulated, the process of directly collecting the aviation kerosene sample mixed with diesel oil is omitted, and the method is very beneficial to establishing a robust discriminant analysis model.
The invention adopts partial least square method (PLS) to correlate the absorbance of the synthesized spectrum characteristic spectrum area and the corresponding class label value, and establishes a discriminant analysis model.
The procedure for establishing a discriminant analysis model using the PLS algorithm is briefly described as follows:
first, the spectral absorbance matrix X (n×m) and the concentration matrix Y (n×1) (only one column of the present invention is the class label value-1 or 1) are decomposed as follows, where n is the number of samples in the present algorithm, and m is the number of absorbance wavelength points in the characteristic spectrum region, that is, the number of absorbance sampling points in the characteristic spectrum region.
Figure BDA0003316772950000091
Figure BDA0003316772950000092
Wherein: t is t k (n X1) is a fraction of the kth principal factor of the absorbance matrix X;
p k (1×m) is the load of the kth principal factor of the absorbance matrix X;
u k (n×1) is a fraction of the kth principal factor of the concentration matrix Y;
q k (1×1) is the load of the kth principal factor of the concentration matrix Y; f is the main factor number. Namely: t and U are scoring matrices of X and Y matrices, respectively, P and Q are loading matrices of X and Y matrices, respectively, E X And E is Y PLS fit residual matrices for X and Y, respectively.
And secondly, carrying out linear regression on T and U:
U=TB
B=(T T T) -1 T T Y
in the prediction, an unknown sample spectrum matrix X is firstly obtained according to P un Score T of (2) un The concentration predictions were then obtained from the following equation: y is Y un =T un BQ (B is a regression coefficient matrix).
In the actual PLS algorithm, PLS combines matrix decomposition and regression into one step, i.e. the decomposition of the X and Y matrices is performed simultaneously, and introduces Y information into the X matrix decomposition process, exchanging the score T of X with the score U of Y before calculating each new principal component, so that the resulting X principal component is directly associated with Y.
PLS is calculated by a nonlinear iterative partial least squares algorithm (nipels) proposed by H Wold, which is specifically as follows:
for the correction process, neglecting the residual matrix E, the main factor number takes 1 with:
for x=tp T Left-hand t T Obtaining: p is p T =t T X/t T t is; right multiplication p yields: t=xp/p T p。
For y=uq T Left-hand u T Obtaining: q T =u T Y/u T u, dividing both sides simultaneously to obtain q T Obtaining: u=y/q T
(1) The weight vector w of the absorbance matrix X is calculated
Taking a certain column (only one column in the invention) of the concentration matrix Y as the initial iteration value of u, replacing t with u, and calculating w
The equation is: x=uw T The solution is as follows: w (w) T =u T X/u T u
(2) Normalizing weight vector w
w T =w T /||w T ||
(3) Calculating a factor score t of the absorbance matrix X, and calculating t from the normalized w
The equation is: x=tw T The solution is as follows: t=xw/w T w
(4) Calculating q by calculating the load q value of the concentration matrix Y and replacing u with t
The equation is: y=tq T The solution is as follows: q T =t T Y/t T t
(5) Normalizing load q
q T =q T /||q T ||
(6) Factor score u of concentration matrix Y is calculated from q T Calculation u
The equation is: y=uq T The solution is as follows: u=yq/q T q
(7) And then the u is used for replacing t to return to the step (1) to calculate w T From w T Calculating t new Repeating the iteration in this way, if t is converged (||t) new -t old ||≤10 -6 ||t new And (3) transferring to the step (8) for operation, otherwise, returning to the step (1).
(8) Calculating the load vector p of the absorbance matrix X from the converged t
The equation is: x=tp T The solution is as follows: p is p T =t T Y/t T t
(9) Normalizing load p
p T =p T /||p T ||
(10) Normalized X factor score t
t=t||p||
(11) Normalized weight vector w
w=w||p||
(12) Calculating an internal relationship b between t and u
b=u T t/t T t
(13) Calculating a residual matrix E
E X =X-tp T
E Y =Y-btq T
(14) By E X Instead of X, E Y Instead of Y, return to step (1), and so on, find w, t, p, u, q, b of the main factors of X, Y. Determining optimal principal factor number f by interactive test method, and storing w f 、p f 、q f (w f Weight vector of absorbance matrix of sample spectrum under f principal components, p for established discriminant analysis model f The load of the absorbance matrix of the sample spectrum at f principal components, q, used for the established discriminant analysis model f The load of the class label matrix corresponding to the sample spectrum used for the established discriminant analysis model at f principal components).
The category identification process of the sample of the aviation kerosene to be tested is as follows:
x un calling the saved w for the absorbance of the characteristic spectrum area of the sample to be detected f 、p f 、q f
Sample class label value y to be measured un =b PLS x un Wherein b PLS =w f T (p f w f T ) -1 q f Comparing y in turn un Magnitude relation with threshold 0 of class label value, if y un <0, the sample to be measured is judged to be the aviation kerosene sample mixed with diesel oil, if y un >0, the sample to be tested is judged to be a pure aviation kerosene sample.
The invention is further illustrated by the following examples, but is not limited thereto.
Example 1
And establishing a partial least square discriminant analysis model and verifying.
(1) Measurement of aviation kerosene sample and diesel sample spectra
49 representative finished aviation kerosene samples, 7 straight run diesel samples and 2 finished diesel samples were collected and near infrared spectra were measured respectively.
(2) Synthesis of the first near infrared spectrum
Synthesizing a first near infrared spectrum by utilizing the near infrared spectrum data measured in the step (1) and combining the data of the near infrared spectrum data in the step (1),
m=xd+(1-x)j
wherein, the value range of the ratio x of the near infrared spectrum of the diesel oil is set to 0.002-0.098 (any value of which the upper limit of x is smaller than 1 is reasonable, and the lower concentration range is mainly set for conveniently learning the lowest detection limit of the method in the training set), and the step length is 0.002, so that x has 49 ratio gradients. The present invention uses 9 near infrared spectra of diesel samples, and therefore, a first near infrared spectrum of 9×49=441 tag values of-1 is finally synthesized. Furthermore, in embodiments of the invention, each ratio gradient corresponds to a first near infrared spectrum (i.e., the near infrared spectrum of pure aviation kerosene) at x is taken to be 0. In summary, this process produces 882 total first near infrared spectra. Here 882 first near infrared spectra and their corresponding label values will constitute a training set for the subsequent construction of partial least squares discriminant analysis models.
(3) Construction of partial least square discriminant analysis model
And (3) performing first-order differential processing with the window width of 19 on the first near infrared spectrum obtained in the step (2), obtaining the absorbance of the characteristic interval of the first near infrared differential spectrum, and then associating the absorbance with the corresponding class label value to construct a partial least square discriminant analysis model. Wherein the characteristic interval is 4462-4752cm -1
(4) Acquisition and category prediction of spectrum of sample to be measured
Preparing an aviation kerosene sample to be tested according to the step (2) by using the aviation kerosene sample and the diesel sample in the step (1),
m=cd+(1-c)j
wherein, the volume ratio c of each diesel sample sequentially takes 0.005,0.01,0.02,0.03,0.05,0.07 (any value with the upper limit of c being less than 1 is reasonable, and the lower concentration range is set here mainly for conveniently learning the lowest detection limit of the method in the verification set), so that 6×9=54 aviation kerosene samples to be detected are generated in total, and correspondingly, each volume ratio corresponds to one sample to be detected (namely, a pure aviation kerosene sample) when c takes 0, thus forming the verification set with the sample capacity of 108. Obtaining near infrared spectrum of verification set, namely second near infrared spectrum, 4462-4752cm -1 And substituting the first-order differential absorbance of the characteristic spectrum region into the partial least square discriminant analysis model, predicting the class label value of each sample, and judging the class of each sample according to the value and the class label threshold value.
(3) Evaluation of discriminant analysis model Performance
And evaluating the performance of the model by adopting the real aviation kerosene recognition rate, the aviation kerosene recognition rate and the overall recognition rate of the blended diesel. Let the number of samples of real aviation kerosene be N 1 The number of aviation kerosene samples blended with diesel oil is N 2 Let the number of correctly identified real aviation kerosene samples be M 1 The number of correctly identified aviation kerosene samples of the blended diesel is M 2 The recognition rate P (%) =m of the real aviation kerosene sample 1 /N 1 Recognition rate T (%) =m of aviation kerosene sample blended with diesel oil 2 /N 2 Overall recognition rate F (%) = (M 1 +M 2 )/(N 1 +N 2 ). The relevant statistical results of the training set and the verification set of the partial least square discriminant analysis model are shown in table 1.
TABLE 1
Figure BDA0003316772950000141
Example 2
A partial least squares discriminant analysis model was built and validated as in example 1, except that second order differential processing was performed on the first near infrared spectrum and the second near infrared spectrum during model training and validation. The relevant statistics of the training set and the validation set are shown in Table 2.
TABLE 2
Figure BDA0003316772950000151
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer-readable media include both permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (11)

1. A method for detecting oil blending, the method comprising:
acquiring a near infrared spectrum of an oil sample to be tested;
obtaining the absorbance of a characteristic spectrum area from the near infrared spectrum of the oil sample to be detected; and
and determining the category of the oil sample to be detected according to the absorbance of the characteristic spectrum region and a pre-established discriminant analysis model, wherein the discriminant analysis model is generated according to the near infrared spectrums of a plurality of samples of the first oil and the second oil, the mixing proportion and the absorbance of the characteristic spectrum region.
2. The method of claim 1, wherein the discriminant analysis model is generated in accordance with:
obtaining a plurality of samples of the first oil and the second oil;
obtaining a first near infrared spectrum according to the formula (1),
m=xd+(1-x)j ①
wherein m represents a first near infrared spectrum synthesized by a spectrum of the first oil and a spectrum of the second oil, d is the near infrared spectrum of the first oil, j is the near infrared spectrum of the second oil, x is the blending proportion of the near infrared spectrum of the first oil,
generating a library sample spectrum by using the first near infrared spectrum, and setting a corresponding class label value according to the near infrared spectrum mixing proportion of the first oil liquid; and
and (3) obtaining the absorbance of the characteristic spectrum region of each library sample spectrum, and constructing a partial least square discriminant analysis model by combining the absorbance of the characteristic spectrum region of each library sample spectrum and the corresponding class label value.
3. The method of claim 1, wherein the characteristic spectrum region is 4462-4752cm -1
4. The method of claim 1, wherein the oil sample to be tested is an actual oil sample or an oil sample configured from (2),
m=cd+(1-c)j ②
in the formula (2), m represents a sample obtained after mixing the first oil liquid and the second oil liquid, d is a sample of the first oil liquid, j is a sample of the second oil liquid, and c is a volume ratio of the sample of the first oil liquid, wherein the value range of c is more than or equal to 0 and less than or equal to x max <1, and c takes 0, m represents a sample of the second oil in pure form, wherein x is max Is the maximum blending proportion of the first oil liquid.
5. The method of claim 1, wherein the class label value of the oil sample to be tested is calculated according to the following formula and compared to a threshold value to determine the class of the oil sample to be tested:
y un =b PLS x un
wherein x is un B, absorbance of a characteristic spectrum area of the oil sample to be detected PLS =w f T (p f w f T ) -1 q f b PLS Regression coefficients for Partial Least Squares (PLS) algorithm, where f is the optimal prime factor number of partial least squares determined by interactive verification method, w f Weight vector of absorbance matrix of sample spectrum under f principal components, p for established discriminant analysis model f The load of the absorbance matrix of the sample spectrum at f principal components, q, used for the established discriminant analysis model f And loading the class label matrix corresponding to the sample spectrum used for the established discriminant analysis model under f principal components.
6. The method according to claim 1, characterized in that the method further comprises:
performing first-order or second-order differential treatment on the near infrared spectrum of the oil sample to be detected to obtain a differential spectrum of the oil sample to be detected;
obtaining differential absorbance of a characteristic spectrum area in the differential spectrum; and
and determining the category of the oil sample to be detected according to the differential absorbance and a pre-established discriminant analysis model, wherein the discriminant analysis model is generated according to the near infrared spectrum and the mixing proportion of a plurality of samples of the first oil and the second oil, and the differential spectrum of the near infrared spectrum and the differential absorbance of the characteristic spectrum region thereof.
7. The method of claim 6, wherein the discriminant analysis model is generated in accordance with:
obtaining a plurality of samples of the first oil and the second oil;
obtaining a first near infrared spectrum according to the formula (1),
m=xd+(1-x)j ①
wherein m represents a first near infrared spectrum synthesized by a spectrum of the first oil and a spectrum of the second oil, d is the near infrared spectrum of the first oil, j is the near infrared spectrum of the second oil, x is the blending proportion of the near infrared spectrum of the first oil,
performing first-order or second-order differential processing on each first near infrared spectrum to obtain first differential spectrums;
acquiring first differential absorbance of a characteristic spectrum region in each first differential spectrum;
and correlating all the first differential absorbance with the class label value corresponding to all the first differential absorbance to construct a partial least square discriminant analysis model.
8. The method according to claim 6 or 7, wherein the window width of the first order differential process is 19 and the window width of the second order differential process is 25.
9. The method of claim 1, wherein the first oil is diesel and the second oil is aviation kerosene.
10. An apparatus for detecting oil blending, the apparatus comprising:
a memory; and
a processor configured to perform the method of detecting oil blending of any of claims 1-9.
11. A machine-readable storage medium having instructions stored thereon, which when executed by a processor cause the processor to be configured to perform the method of detecting oil blending of any of claims 1 to 9.
CN202111233019.7A 2021-10-22 2021-10-22 Method and apparatus for detecting oil blending Pending CN116008216A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111233019.7A CN116008216A (en) 2021-10-22 2021-10-22 Method and apparatus for detecting oil blending

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111233019.7A CN116008216A (en) 2021-10-22 2021-10-22 Method and apparatus for detecting oil blending

Publications (1)

Publication Number Publication Date
CN116008216A true CN116008216A (en) 2023-04-25

Family

ID=86021631

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111233019.7A Pending CN116008216A (en) 2021-10-22 2021-10-22 Method and apparatus for detecting oil blending

Country Status (1)

Country Link
CN (1) CN116008216A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117074346A (en) * 2023-08-17 2023-11-17 河北敦诚新能源科技有限公司 Method, device and storage medium for determining material composition based on infrared spectrum

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117074346A (en) * 2023-08-17 2023-11-17 河北敦诚新能源科技有限公司 Method, device and storage medium for determining material composition based on infrared spectrum
CN117074346B (en) * 2023-08-17 2024-03-29 河北敦诚新能源科技有限公司 Method, device and storage medium for determining material composition based on infrared spectrum

Similar Documents

Publication Publication Date Title
US20120290223A1 (en) Direct match spectrographic determination of fuel properties
CN111143981B (en) Virtual test model verification system and method
JPH08503075A (en) Methods to improve the chemometric evaluation of substance properties
CN109060702B (en) Infrared spectrum nonlinear quantitative analysis method
CN107958267B (en) Oil product property prediction method based on spectral linear representation
JP5945365B2 (en) Method for identifying substances from NMR spectra
CN108490782B (en) A kind of method and system being suitable for the missing data completion of complex industrial process product quality indicator based on selective double layer integrated study
CN103115889B (en) Method by transmitted infrared light spectrum prediction sulfur content in crude oil
CN105466884A (en) Method for identifying type and characteristic of crude oil through near-infrared spectrum
CN105319179B (en) A kind of method using middle infrared spectrum prediction hydrogen sulfide content in desulfurized amine
CN116008216A (en) Method and apparatus for detecting oil blending
CN107966420B (en) Method for predicting crude oil property by near infrared spectrum
Akpabio et al. PVT fluid characterization and consistency check for retrograde condensate reservoir modeling
CN102954946B (en) By the method for infrared spectrum measurement sulfur content in crude oil
CN107966499B (en) Method for predicting crude oil carbon number distribution by near infrared spectrum
CN116067905A (en) Method and apparatus for detecting oil blending
CA2635930C (en) Fourier transform infrared (ftir) chemometric method to determine cetane number of diesel fuels containing fatty acid alkyl ester additives
CN102221534B (en) Mid-infrared spectrum method for quickly identifying engine fuel type
CN102323235B (en) Method for measuring quality indexes of engine fuel by mid-infrared spectroscopy technology
CN113740294B (en) Near infrared modeling-based gasoline/diesel oil detection and analysis method and device
CN116008248A (en) Fuel Raman spectrum measuring method and system
Issa Parametric and Nonparametric Approaches of Reid Vapor Pressure Prediction for Gasoline Containing Oxygenates: A Comparative Analysis Using Partial Least Squares, Nonlinear, and LOWESS Regression Modelling Strategies with Physical Properties
CN106485049A (en) A kind of detection method of the NIRS exceptional sample based on Monte Carlo cross validation
CN102954945B (en) A kind of method by infrared spectrum measurement acid value for crude oil
CN103134764A (en) Method for predicting crude oil true boiling point distillation curve by transmission infrared spectroscopy

Legal Events

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