Methods and equipment for detecting oil adulteration
By employing near-infrared spectroscopy and a discriminant analysis model, combined with differential processing, the problem of mixing aviation kerosene and diesel fuel was solved, achieving efficient and low-cost detection of oil mixing and ensuring the smooth progress of the aviation kerosene refining process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA PETROLEUM & CHEMICAL CORP
- Filing Date
- 2021-10-22
- Publication Date
- 2026-05-05
AI Technical Summary
Existing technologies are insufficient to effectively distinguish and monitor the blending of aviation kerosene fractions and diesel fractions, leading to increased difficulty and cost in subsequent refining processes.
Near-infrared spectroscopy is used to obtain the absorbance of characteristic spectral regions of oil samples. The oil category is determined by a pre-established discriminant analysis model. By constructing a partial least squares discriminant analysis model and combining it with first-order or second-order differential processing of the spectrum, the detection of oil adulteration is achieved.
This provides a more reliable and simpler method to accurately identify the blending ratio of aviation kerosene and diesel, reducing detection costs and improving the robustness and accuracy of monitoring.
Smart Images

Figure CN116008216B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of testing, specifically to a method and equipment for detecting oil adulteration. Background Technology
[0002] Aviation kerosene is a specialized fuel for jet-powered aircraft. Due to the demanding nature of its operating environment, it requires extremely stringent performance characteristics, including good low-temperature fluidity, high net calorific value and density, rapid and complete combustion, and good stability. These properties largely depend on the chemical composition of the aviation kerosene, which can vary depending on the raw materials and production processes, thus affecting certain characteristics. Currently, aviation kerosene is primarily obtained through conventional petroleum refining processes, accounting for over 80% of total production. Aviation kerosene refining technology utilizes atmospheric and vacuum distillation to separate compounds with different boiling points through distillation, condensation, and collection, yielding fractions such as liquefied petroleum gas (LPG), naphtha, gasoline, kerosene, diesel oil, lubricating oil, fuel oil, and residual oil. However, due to the overlap in the boiling range of kerosene (180–310℃) and diesel (180–370℃, light diesel), when cutting the desired aviation kerosene fraction, diesel fractions are easily extracted into the aviation kerosene fraction, increasing the difficulty and cost of subsequent aviation kerosene refining processes. To facilitate the smooth progress of subsequent aviation kerosene processes and ensure the highest possible quality of the finished aviation kerosene, it is necessary to monitor the aviation kerosene cutting process. Monitoring this process first requires finding a method that can distinguish between pure aviation kerosene fractions and aviation kerosene containing diesel fractions. Summary of the Invention
[0003] The purpose of this application is to provide a method and apparatus for detecting oil adulteration.
[0004] To achieve the above objectives, a first aspect of this application provides a method for detecting oil mixing, the method comprising: acquiring the near-infrared spectrum of an oil sample to be tested; acquiring the absorbance of a characteristic spectral region from the near-infrared spectrum of the oil sample to be tested; and determining the category of the oil sample to be tested based on the absorbance of the characteristic spectral region and a pre-established discriminant analysis model, wherein the discriminant analysis model is generated based on the near-infrared spectra of multiple samples of a first oil and a second oil, their mixing ratio, and the absorbance of the characteristic spectral region.
[0005] In this embodiment of the application, the discriminant analysis model is generated according to the following operations:
[0006] Obtain multiple samples of the first oil and the second oil;
[0007] The first near-infrared spectrum is obtained according to formula ①.
[0008] m = xd+(1 - x)j ①
[0009] Where, m represents the first near-infrared spectrum synthesized from the spectra of the first oil and 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 the blending ratio of the near-infrared spectrum of the first oil. For example, 0 ≤ x < 1.
[0010] Using the first near-infrared spectrum, generate library sample spectra, and set corresponding class label values according to the blending ratio of the near-infrared spectrum of the first oil (for example, the class label of the first near-infrared spectrum synthesized when 0 < x < 1 can be set to -1, and the class label of the first near-infrared spectrum when x = 0 can be set to 1); and
[0011] Obtain the absorbance of the characteristic spectral region of each library sample spectrum, and combine its corresponding class label value to construct a partial least squares discriminant analysis model. <000014f b PLS Here, represents the regression coefficients of the Partial Least Squares (PLS) algorithm, where f is the optimal number of principal factors determined using the cross-validation method, and w... f p is the weight vector of the absorbance matrix of the sample spectra used in the established discriminant analysis model under the f principal components. f The loadings of the absorbance matrix of the sample spectra used in the established discriminant analysis model under f principal components, q f The loadings of the class label matrix corresponding to the sample spectra used in the established discriminant analysis model under the f principal components.
[0019] The method also includes:
[0020] The near-infrared spectrum of the oil sample to be tested is processed by first-order or second-order differential processing to obtain the differential spectrum of the oil sample to be tested.
[0021] Obtain the differential absorbance of the characteristic spectral region in the differential spectrum; and
[0022] Based on the differential absorbance and the pre-established discriminant analysis model, the category of the oil sample to be tested is determined, wherein the discriminant analysis model is generated based on the near-infrared spectra of multiple samples of the first and second oils and their mixing ratios, the differential spectra of the near-infrared spectra and the differential absorbance of their characteristic spectral regions.
[0023] In this embodiment of the application, the discriminant analysis model is generated according to the following operations:
[0024] Obtain multiple samples of the first oil and the second oil;
[0025] The first near-infrared spectrum is obtained according to formula ①.
[0026] m=xd+(1-x)j ①
[0027] Where m represents the first near-infrared spectrum synthesized from the spectra of the first oil and 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 the blending ratio of the near-infrared spectrum of the first oil.
[0028] Perform first-order or second-order differential processing on each of the first near-infrared spectra to obtain the first differential spectrum;
[0029] Obtain the first differential absorbance of the characteristic spectral region in each of the first differential spectra;
[0030] By associating all the first differential absorbance values with the corresponding category label values, a partial least squares discriminant analysis model is constructed.
[0031] In this embodiment of the application, the window width of the first-order differential processing is 19, and the window width of the second-order differential processing is 25.
[0032] In this embodiment of the application, the first oil is diesel oil and the second oil is aviation kerosene.
[0033] A second aspect of this application provides an apparatus for detecting oil mixing, the apparatus comprising: a memory; and a processor configured to perform the above-described method for detecting oil mixing.
[0034] A third aspect of this application provides a machine-readable storage medium storing instructions, characterized in that, when executed by a processor, the instructions cause the processor to be configured to perform the above-described method for detecting oil mixing.
[0035] Using the above technical solution, a discriminant analysis model can be constructed based on the near-infrared spectra of known samples of the first and second oil solutions, synthesized from the mixed spectra. Therefore, when the known samples (including samples of the first and second oil solutions) are typical and sufficient, the spectra of the second oil solution mixed with any proportion of the first oil solution can be synthesized using their spectra, thereby simulating the spectra of the second oil solution mixed with different proportions of the first oil solution. Compared with the method of directly collecting samples of mixed oil solutions to establish a model, this method is more reliable and simpler.
[0036] Other features and advantages of the embodiments of this application will be described in detail in the following detailed description section. Attached Figure Description
[0037] The accompanying drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the following detailed description to explain the embodiments of this application, but do not constitute a limitation on the embodiments of this application. In the drawings:
[0038] Figure 1 The schematic diagram illustrates a process flow diagram of a method for detecting oil adulteration according to an embodiment of this application;
[0039] Figure 2 This illustration schematically shows another process diagram of a method for detecting oil adulteration according to an embodiment of this application;
[0040] Figure 3 This schematic diagram illustrates a structural block diagram of an apparatus for detecting oil mixing according to an embodiment of this application;
[0041] Figure 4This is an example of how the method of the present invention distinguishes training set samples in Example 1 (in the figure, the samples below the 0 threshold line at A-I on the left are correctly classified simulated aviation kerosene samples mixed with different proportions of diesel, and the samples above them are incorrectly classified simulated aviation kerosene samples mixed with different proportions of diesel; on the right, the samples above the 0 threshold line at A-I are correctly classified aviation kerosene samples, and the samples below them are incorrectly classified aviation kerosene samples).
[0042] Figure 5 This is an example of how the method of the present invention judges the validation set samples in Example 1 (the samples below the 0 threshold line on the left are correctly classified aviation kerosene samples mixed with different proportions of diesel, and the samples above them are incorrectly classified aviation kerosene samples mixed with different proportions of diesel; the samples above the 0 threshold line on the right are correctly classified aviation kerosene samples, and the samples below them are incorrectly classified aviation kerosene samples).
[0043] Figure 6 Example 2 shows the discrimination of the training set samples by the method of the present invention (in the figure, the area below the 0 threshold line at A to I on the left is a correctly classified simulated aviation kerosene sample mixed with different proportions of diesel, and the area above it is a incorrectly classified simulated aviation kerosene sample mixed with different proportions of diesel; on the right, the area above the 0 threshold line at A to I is a correctly classified aviation kerosene sample, and the area below it is an incorrectly classified aviation kerosene sample).
[0044] Figure 7 Example 2 shows the discrimination of the validation set samples by the method of the present invention (in the figure, the area below the 0 threshold line at A to I on the left is the correctly classified aviation kerosene sample mixed with different proportions of diesel, and the area above it is the incorrectly classified aviation kerosene sample mixed with different proportions of diesel; the area above the 0 threshold line at A to I on the right is the correctly classified aviation kerosene sample, and the area below it is the incorrectly classified aviation kerosene sample). Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for illustration and explanation of the embodiments of this application and are not intended to limit the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0046] It should be noted that if the embodiments of this application involve directional indicators (such as up, down, left, right, front, back, etc.), the directional indicators are only used to explain the relative positional relationship and movement of the components in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicators will also change accordingly.
[0047] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0048] It should be noted that, in the following description, diesel oil and aviation kerosene are used as the first and second oils, respectively, to illustrate the present invention. However, the present invention is not limited to diesel oil and aviation kerosene, and can be applied to the identification of blending of other oils. Furthermore, the present invention is not limited to the identification of blending of two oils; the identification of blending between any number of oils is feasible.
[0049] Figure 1 A schematic flowchart of a method for detecting oil adulteration according to an embodiment of this application is shown. It should be understood that, although... Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0050] like Figure 1 As shown in one embodiment of this application, a method for detecting oil adulteration is provided, the method comprising the following steps:
[0051] Step 102: Obtain the near-infrared spectrum of the oil sample to be tested;
[0052] Step 104: Obtain the absorbance of the characteristic spectral region from the near-infrared spectrum of the oil sample to be tested;
[0053] Step 106: Determine the category of the oil sample to be tested based on the absorbance of the characteristic spectral region and the pre-established discriminant analysis model, wherein the discriminant analysis model is generated based on the near-infrared spectra of multiple samples of the first oil and the second oil, their mixing ratio, and the absorbance of the characteristic spectral region.
[0054] like Figure 2 As shown in one embodiment of this application, a method for detecting oil adulteration is provided, the method comprising the following steps:
[0055] Step 202: Perform first-order or second-order differential processing on the near-infrared spectrum of the oil sample to be tested to obtain the differential spectrum of the oil sample to be tested.
[0056] Step 204: Obtain the differential absorbance of the characteristic spectral region in the differential spectrum; and
[0057] Step 206: Determine the category of the oil sample to be tested based on the differential absorbance and the pre-established discriminant analysis model, wherein the discriminant analysis model is generated based on the near-infrared spectra of multiple samples of the first and second oils and their mixing ratios, the differential spectra of the near-infrared spectra and the differential absorbance of their characteristic spectral regions.
[0058] In one embodiment, such as Figure 3 As shown, a device for detecting oil adulteration is provided, including a processor 310 and a memory 320. The processor contains a kernel that retrieves corresponding program units from the memory. One or more kernels can be configured, and the method for detecting oil adulteration can be implemented by adjusting kernel parameters. The memory may include non-permanent memory in computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and includes at least one memory chip.
[0059] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the device to which the present application is applied. Specific devices may include more or fewer components than those shown in the figure, or may combine certain components, or may have different component arrangements.
[0060] This invention utilizes known aviation kerosene sample spectra and diesel sample spectra to synthesize a first near-infrared spectrum. By combining the first near-infrared spectrum with the known aviation kerosene sample spectrum, a library sample spectrum is obtained. A partial least squares discriminant analysis model is constructed by combining the library sample spectrum and its corresponding category label values. Then, the category of the aviation kerosene sample to be tested is determined by the near-infrared spectrum (i.e., the second near-infrared spectrum) of a laboratory-prepared aviation kerosene sample mixed with diesel and the aforementioned discriminant analysis model.
[0061] For the establishment of discriminant analysis models, the traditional method of collecting typical modeling samples is quite difficult to implement, and the collected samples are difficult to cover all the actual changes in the samples. If discriminant analysis models are established based on these samples, their robustness is often not very good.
[0062] Spectra can reflect changes in the composition of matter. Theoretically, when the composition of a substance changes, its spectrum will also change accordingly, meaning the two should exhibit good consistency. Based on this theory, the synthetic spectrum obtained by linearly combining the spectra of two actual samples in a certain proportion should show good consistency with the spectrum measured after mixing these two samples. Therefore, the synthetic spectrum obtained by linearly combining the spectra of actual samples can better simulate mixed samples under different proportions of actual samples and can generate a rich sample spectral database, laying the foundation for subsequent establishment of robust, large-sample-scale discriminant analysis models. This invention uses the near-infrared spectra of actual aviation kerosene samples and diesel samples to generate a first near-infrared spectrum in a certain proportion.
[0063] The present invention uses a transmission method to determine the near-infrared spectrum of aviation kerosene samples, employing a 0.5 mm cuvette and operating under constant temperature conditions of 25°C. The spectrometer's scanning range is 10000–3500 cm⁻¹. -1 The resolution is 4cm. -1 The total number of scans is 64.
[0064] This invention uses a test aviation kerosene sample prepared from aviation kerosene and diesel samples to verify the reliability of a partial least squares discriminant analysis model based on synthetic spectra.
[0065] This invention performs first-order or second-order differential processing on the first and second near-infrared spectra to eliminate interference. Specifically, this invention provides a method for detecting diesel blending in aviation kerosene based on near-infrared spectroscopy, comprising: (1) simulating and synthesizing the near-infrared spectrum of aviation kerosene blended with diesel using the known near-infrared spectra of aviation kerosene samples and diesel samples, i.e., the first near-infrared spectrum; (2) associating the absorbance of the characteristic spectral region of the first-order or second-order differential spectrum of the first near-infrared spectrum with the corresponding category label value to construct a partial least squares discriminant analysis model; and (3) determining the category of the aviation kerosene sample based on the established partial least squares discriminant analysis model and the absorbance of the characteristic spectral region of the first-order or second-order differential spectrum of the second near-infrared spectrum of the aviation kerosene sample to be tested. By using the near-infrared spectra of known aviation kerosene and diesel samples to synthesize the near-infrared spectra of aviation kerosene with any proportion of diesel, the near-infrared spectra of aviation kerosene with any proportion of diesel can be simulated, eliminating the need to directly collect aviation kerosene samples mixed with diesel. This is highly advantageous for establishing robust discriminant analysis models.
[0066] This invention uses partial least squares (PLS) to associate the absorbance of the characteristic spectral regions of the synthesized spectrum with their corresponding category label values to establish a discriminant analysis model.
[0067] The following is a brief introduction to the process of establishing a discriminant analysis model using the PLS algorithm:
[0068] First, the spectral absorbance matrix X (n×m) and concentration matrix Y (n×1) (in this invention, there is only one column and it is a category label value of -1 or 1) are decomposed as follows. In this algorithm, n is the number of samples and m is the number of absorbance wavelength points in the characteristic spectral region, that is, the number of absorbance sampling points in the characteristic spectral region.
[0069]
[0070]
[0071] Where: t k (n×1) is the score of the k-th principal factor of the absorbance matrix X;
[0072] p k (1×m) is the loading of the k-th principal factor of the absorbance matrix X;
[0073] u k (n×1) represents the score of the k-th principal factor of the concentration matrix Y;
[0074] q k (1×1) represents the loading of the k-th principal factor of the concentration matrix Y; f is the number of principal factors. That is: T and U are the score matrices of X and Y, respectively, P and Q are the loading matrices of X and Y, respectively, and E...X and E Y The PLS fitting residual matrices for X and Y are respectively.
[0075] The second step is to perform a linear regression on T and U:
[0076] U=TB
[0077] B = (T) T T) -1 T T Y
[0078] In the prediction, the unknown sample spectral matrix X is first calculated based on P. un Score T un Then, the concentration prediction value is obtained from the following formula: Y un =T un BQ (B is the regression coefficient matrix).
[0079] In the actual PLS algorithm, PLS combines matrix decomposition and regression into one step, that is, the decomposition of X and Y matrices is performed simultaneously, and the information of Y is introduced into the decomposition process of X matrix. Before calculating each new principal component, the score T of X is swapped with the score U of Y, so that the obtained X principal components are directly associated with Y.
[0080] The PLS algorithm was calculated using the nonlinear iterative partial least squares algorithm (NIPALS) proposed by H. Wold. The specific algorithm is as follows:
[0081] For the correction process, ignoring the residual matrix E, when the principal factor number is 1, we have:
[0082] For X = tp T Left multiply t T Get: p T =t T X / t T t; multiplying by p on the right, we get: t = Xp / p T p.
[0083] For Y = uq T Left multiply u T Get: q T =u T Y / u T u, dividing both sides gives q T Therefore: u = Y / q T .
[0084] (1) Find the weight vector w of the absorbance matrix X.
[0085] Take a single column of the concentration matrix Y (only one column in this invention) as the initial iteration value of u, replace t with u, and calculate w.
[0086] The equation is: X = uwT The solution is: w T =u T X / u T u
[0087] (2) Normalize the weight vector w
[0088] w T =w T / ||w T ||
[0089] (3) Calculate the factor score t of the absorbance matrix X, and then calculate t from the normalized w.
[0090] The equation is: X = tw T The solution is: t = Xw / w T w
[0091] (4) Calculate the loading q value of the concentration matrix Y, and use t to replace u to calculate q.
[0092] The equation is: Y = tq T The solution is: q T =t T Y / t T t
[0093] (5) Normalize the load q
[0094] q T =q T / ||q T ||
[0095] (6) Calculate the factor score u of the concentration matrix Y, using q T Calculate u
[0096] The equation is: Y = uq T The solution is: u = Yq / q T q
[0097] (7) Replace t with u and return to step (1) to calculate w. T , by w T Calculate t new This process is repeated iteratively until t converges (||t). new -t old ||≤10 -6 ||t new If ||), proceed to step (8) for calculation; otherwise, return to step (1).
[0098] (8) Calculate the loading vector p of the absorbance matrix X from the converged t.
[0099] The equation is: X = tp T The solution is: p T =tT Y / t T t
[0100] (9) Normalize the load p
[0101] p T =p T / ||p T ||
[0102] (10) Factor score t of standardized X
[0103] t=t||p||
[0104] (11) Standardized weight vector w
[0105] w = w||p||
[0106] (12) Calculate the intrinsic relationship b between t and u.
[0107] b = u T t / t T t
[0108] (13) Calculate the residual matrix E
[0109] E X =X-tp T
[0110] E Y =Y-btq T
[0111] (14) With E X Instead of X, E Y Replace Y and return to step (1), and so on, to find the principal factors w, t, p, u, q, b of X and Y. Use the cross-validation method to determine the optimal number of principal factors f, and save w. f p f q f (w f p is the weight vector of the absorbance matrix of the sample spectra used in the established discriminant analysis model under the f principal components. f The loadings of the absorbance matrix of the sample spectra used in the established discriminant analysis model under f principal components, q f The loadings of the class label matrix corresponding to the sample spectra used in the established discriminant analysis model under the f principal components.
[0112] The process for classifying the aviation kerosene samples to be tested is as follows:
[0113] x un To determine the absorbance of the characteristic spectral region of the sample to be tested, retrieve the previously saved data. f p f qf .
[0114] The class label value y of the sample to be tested un =b PLS x un , where b PLS =w f T (p f w f T ) -1 q f Compare y in turn un The relationship between y and the threshold value of the category label, if y un If y < 0, the sample to be tested is determined to be an aviation kerosene sample mixed with diesel fuel. un If the value is greater than 0, the sample to be tested is determined to be a pure aviation kerosene sample.
[0115] The invention is further illustrated below with examples, but the invention is not limited thereto.
[0116] Example 1
[0117] A partial least squares discriminant analysis model was established and validated.
[0118] (1) Measurement of spectra of aviation kerosene and diesel samples
[0119] Forty-nine representative samples of finished aviation kerosene, seven samples of straight-run diesel, and two samples of finished diesel were collected, and their near-infrared spectra were measured.
[0120] (2) Synthesis of the first near-infrared spectrum
[0121] The first near-infrared spectrum was synthesized using the near-infrared spectral data measured in step (1) combined with equation ①.
[0122] m=xd+(1-x)j ①
[0123] In this invention, the scaling factor x for the near-infrared spectra of diesel fuel is set to a range of 0.002 to 0.098 (any value less than 1 is reasonable; the lower concentration range is chosen to facilitate determining the minimum detection limit of the method in the training set), with a step size of 0.002. Therefore, x has 49 scaling factors. This invention uses near-infrared spectra from 9 diesel fuel samples, resulting in 9 × 49 = 441 first near-infrared spectra with a label value of -1. Furthermore, in the embodiment of this invention, each scaling factor corresponds to a first near-infrared spectrum when x is 0 (i.e., the near-infrared spectrum of pure aviation kerosene). In summary, this process generates a total of 882 first near-infrared spectra. These 882 first near-infrared spectra and their corresponding label values will constitute the training set for subsequent construction of the partial least squares discriminant analysis model.
[0124] (3) Construction of Partial Least Squares Discriminant Analysis Model
[0125] The first near-infrared spectrum obtained in step (2) is subjected to first-order differential processing with a window width of 19 to obtain the absorbance of the characteristic interval of the first near-infrared differential spectrum. Then, it is associated with the corresponding category label value to construct a partial least squares discriminant analysis model. The characteristic interval is 4462-4752 cm⁻¹. -1 .
[0126] (4) Acquisition of the spectrum of the sample to be tested and category prediction
[0127] The aviation kerosene sample to be tested is prepared by using the aviation kerosene sample and diesel sample from step (1) according to formula ②.
[0128] m = cd + (1 - c)j ②
[0129] In this study, the volume ratio c of each diesel sample was successively set to 0.005, 0.01, 0.02, 0.03, 0.05, and 0.07 (any value of c less than 1 is reasonable; the lower concentration range is set here primarily to facilitate determining the method's limit of detection in the validation set). This resulted in 6 × 9 = 54 aviation kerosene samples to be tested. Correspondingly, each volume ratio corresponds to a sample with c set to 0 (i.e., a pure aviation kerosene sample), thus forming a validation set with a sample size of 10⁸. The near-infrared spectrum of the validation set, i.e., the second near-infrared spectrum, was obtained, ranging from 4462 to 4752 cm⁻¹. -1 The first-order differential absorbance of the characteristic spectral region is substituted into the partial least squares discriminant analysis model to predict the class label value of each sample, and the class of each sample is determined based on the value and the class label threshold.
[0130] (3) Performance evaluation of discriminant analysis model
[0131] The model's performance was evaluated using the recognition rates of real aviation kerosene, aviation kerosene mixed with diesel, and the overall recognition rate. Let N1 be the number of real aviation kerosene samples, N2 be the number of aviation kerosene samples mixed with diesel, M1 be the number of correctly identified real aviation kerosene samples, and M2 be the number of correctly identified aviation kerosene samples mixed with diesel. Then, the recognition rate of real aviation kerosene samples P(%) = M1 / N1, the recognition rate of aviation kerosene samples mixed with diesel T(%) = M2 / N2, and the overall recognition rate F(%) = (M1+M2) / (N1+N2). The relevant statistical results for the partial least squares discriminant analysis model's training and validation sets are shown in Table 1.
[0132] Table 1
[0133]
[0134] Example 2
[0135] A partial least squares discriminant analysis model was established and validated using the method in Example 1. The difference was that second-order differential processing was performed on the first and second near-infrared spectra during model training and validation. The relevant statistical results for the training and validation sets are shown in Table 2.
[0136] Table 2
[0137]
[0138] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can 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, etc.) containing computer-usable program code.
[0139] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0140] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0141] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0142] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0143] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0144] Computer-readable media include both permanent and non-permanent, removable and non-removable media, which can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0145] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0146] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for detecting oil adulteration, the method comprising: Obtain the near-infrared spectrum of the oil sample to be tested; The absorbance of the characteristic spectral region was obtained from the near-infrared spectrum of the oil sample to be tested; as well as Based on the absorbance in the characteristic spectral region and a pre-established discriminant analysis model, the category of the oil sample to be tested is determined. The discriminant analysis model is generated based on the near-infrared spectra of multiple samples of the first and second oils, their mixing ratios, and the absorbance in the characteristic spectral region. The category label value of the oil sample to be tested is calculated according to the following formula, and the value is compared with a threshold to determine the category of the oil sample to be tested: y un = b PLS x un , in, x un The absorbance of the characteristic spectral region of the oil sample to be tested. b PLS = w f T ( p f w f T ) -1 q f b PLS Here are the regression coefficients from the Partial Least Squares (PLS) algorithm, where... f This represents the optimal number of principal factors determined using the cross-validation method in partial least squares. w f The absorbance matrix of the sample spectra used in the established discriminant analysis model is in f Weight vectors under each principal component p f The absorbance matrix of the sample spectra used in the established discriminant analysis model is in f Loads under each principal component q f The class label matrix corresponding to the sample spectra used in the established discriminant analysis model is in f Loads under each principal component Among them, comparing in turn y un The relationship between the value and the threshold value of the category label is as follows: y un If <0, the sample to be tested is determined to be an aviation kerosene sample mixed with diesel fuel. y un If the value is greater than 0, the sample to be tested is determined to be a pure aviation kerosene sample. The characteristic spectral region is 4462-4752 cm⁻¹. -1 .
2. The method according to claim 1, characterized in that, The discriminant analysis model is generated according to the following operations: Obtain multiple samples of the first oil and the second oil; The first near-infrared spectrum is obtained according to formula ①. in, m This represents the first near-infrared spectrum synthesized from the spectra of the first oil and the second oil. d The first oil near-infrared spectrum, j The second oil near-infrared spectrum, x The first oil near-infrared spectral mixing ratio, Using the first near-infrared spectrum, a library sample spectrum is generated, and a corresponding category label value is set according to the near-infrared spectral mixing ratio of the first oil; and Obtain the absorbance of the characteristic spectral region of each library sample's spectrum, and construct a partial least squares discriminant analysis model by combining it with its corresponding category label value.
3. The method according to claim 1, characterized in that, The oil sample to be tested is either an actual oil sample or an oil sample prepared according to formula ②. In formula ② m This refers to the sample obtained by mixing the first oil and the second oil. d This is a sample of the first oil. j This is a sample of the second oil. c Let c be the volume ratio of the first oil sample, where c ranges from 1 to 2. ,and c When the value is 0, m A sample representing the pure second oil, wherein... This represents the maximum blending ratio of the first oil.
4. The method according to claim 1, characterized in that, The method also includes: The near-infrared spectrum of the oil sample to be tested is processed by first-order or second-order differential processing to obtain the differential spectrum of the oil sample to be tested. Obtain the differential absorbance of the characteristic spectral region in the differential spectrum; and Based on the differential absorbance and the pre-established discriminant analysis model, the category of the oil sample to be tested is determined, wherein the discriminant analysis model is generated based on the near-infrared spectra of multiple samples of the first and second oils and their mixing ratios, the differential spectra of the near-infrared spectra and the differential absorbance of their characteristic spectral regions.
5. The method according to claim 4, characterized in that, The discriminant analysis model is generated according to the following operations: Obtain multiple samples of the first oil and the second oil; The first near-infrared spectrum is obtained according to formula ①. in, m This represents the first near-infrared spectrum synthesized from the spectra of the first oil and the second oil. d The first oil near-infrared spectrum, j The second oil near-infrared spectrum, x The first oil near-infrared spectral mixing ratio, Perform first-order or second-order differential processing on each of the first near-infrared spectra to obtain the first differential spectrum; Obtain the first differential absorbance of the characteristic spectral region in each of the first differential spectra; By associating all the first differential absorbance values with the corresponding category label values, a partial least squares discriminant analysis model is constructed.
6. The method according to claim 4 or 5, characterized in that, The window width for the first-order differential processing is 19, and the window width for the second-order differential processing is 25.
7. The method according to claim 1, characterized in that, The first oil is diesel fuel, and the second oil is aviation kerosene.
8. An apparatus for detecting oil adulteration, the apparatus comprising: Memory; as well as The processor is configured to perform the method for detecting oil mixing according to any one of claims 1 to 7.
9. A machine-readable storage medium storing instructions thereon, characterized in that, When executed by a processor, this instruction causes the processor to be configured to perform the method for detecting oil mixing according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for predicting single-type crude oil content in mixed crude oil by near infrared spectrum
CN101988895A
Method for detecting corn oil mixed with sesame oil based on two-dimensional near-infrared and intermediate infrared correlation spectroscopy information fusion
CN107561031A