Method and device for detecting methanol and ethanol in vehicle gasoline based on near infrared spectrum

Through the establishment of spectral projection and standard curves in near-infrared spectral detection method, the problem of overlapping spectral bands and modeling complexity in methanol and ethanol detection in automotive gasoline is solved, and a fast and accurate detection effect is achieved.

CN120043992APending Publication Date: 2025-05-27BEIJING YIXINGYUAN PETROCHEMICAL TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510504691.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-22
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

When using near-infrared spectroscopy to detect methanol and ethanol in automotive gasoline, the prior art has problems such as severe overlap of spectral bands, large workload of multivariate analysis modeling, long cycles, high cost, strong subjectivity in determining regularized parameters and complex solutions.

Method used

The near-infrared spectroscopy detection method is adopted to extract the spectral components of methanol and ethanol through spectral projection operations, and a standard curve is established to eliminate the impact of coexistence on prediction ability, simplify the solution process, and determine regularization parameters based on singular values ​​and robust signal-to-noise ratio.

Benefits of technology

Fast and accurate detection without multivariate analysis modeling is achieved, the problems of band overlap and modeling complexity are overcome, more accurate regularization parameters are obtained, and the accuracy and efficiency of detection are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120043992A_ABST
    Figure CN120043992A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of gasoline detection, in particular to a method and a device for detecting methanol and ethanol in automotive gasoline based on a near infrared spectrum, and provides a near infrared spectrum detection method for alcohol concentration in gasoline without multivariate analysis modeling. Spectral components of a methanol component and an ethanol component are obtained by performing spectral projection on a near infrared spectrum of an alcohol substance-containing gasoline solution, and a standard curve is established by using the alcohol spectral components and corresponding concentrations of a standard solution with known mass concentrations, so that the influence of coexistence of methanol and ethanol on the predictive capacity of the standard curve is eliminated, and the predictive capacity of the methanol and ethanol-containing gasoline solution is predicted. The problem of serious overlapping of near infrared spectrum bands of different components is solved, and the solving process is simple.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gasoline detection, and particularly to a method and device for detecting methanol and ethanol in vehicle gasoline based on near-infrared spectroscopy. Background Art

[0002] As an important energy source, the quality and composition of vehicle gasoline have a direct impact on the performance and exhaust emissions of vehicles. In recent years, in order to improve the octane number of gasoline and reduce environmental pollution, methanol and ethanol have been widely added to vehicle gasoline. However, the addition amounts of methanol and ethanol need to be strictly controlled because excessive methanol and ethanol may damage the engine and also affect the fuel economy and exhaust emissions of vehicles. Traditional detection methods, such as gas chromatography (GC), high-performance liquid chromatography (HPLC), and chemical titration methods, etc., although they can accurately determine the contents of methanol and ethanol, these methods have disadvantages such as complex operation, long detection time, and the need to use a large amount of chemical reagents. Near-infrared spectroscopy (NIR) is an analytical technique based on the absorption characteristics of substances to near-infrared light. It has the advantages of fast speed, non-destructive, simple operation, and no need to use chemical reagents, and has been widely used in the component analysis of multiple fields such as food, medicine, petrochemical industry, etc. The near-infrared spectroscopy technology uses a NIR light source to irradiate the experimental sample, and then analyzes the spectral information carried by the substance according to the absorbed, transmitted, or reflected light, and can accurately and quickly detect the composition and component content of the substance to be detected.

[0003] However, when applying the near-infrared spectroscopy detection method to the detection process of vehicle gasoline with different components, due to the more serious overlap of the near-infrared spectral bands of different components, the single-variable linear regression method is no longer applicable, and relying on multivariate (multi-wavelength) analysis and modeling methods (such as PLS) has the disadvantages of large modeling workload, long cycle, and high cost; at the same time, there is a solution in the prior art that applies the projection method to spectral data processing. However, in the existing designs, the determination of the regularization parameter is generally realized according to empirical formulas, heuristic algorithms, etc. The above solutions either have the disadvantage of strong subjectivity or the disadvantage of complex solution. Summary of the Invention

[0004] In order to solve the above technical problems, the present invention provides a method and device for detecting methanol and ethanol in vehicle gasoline based on near-infrared spectroscopy to solve the problems existing in the prior art.

[0005] According to one aspect of the present invention, there is provided a method for detecting methanol and ethanol in vehicle gasoline based on near-infrared spectroscopy, including the following steps: S1: Prepare a standard sample of vehicle gasoline; S2: Collect data from the standard sample of vehicle gasoline to obtain the sample spectrum of the standard sample of vehicle gasoline; S3: Perform a preprocessing operation on the sample spectrum of the vehicle gasoline standard sample to obtain the sample spectrum of the preprocessed standard sample; S4: Establish a standard curve based on the sample spectrum data of the preprocessed standard sample; The specific content of S4 is as follows: S4.1: Perform a spectral projection operation on the sample spectrum of the vehicle gasoline standard sample to extract the methanol spectral component and the ethanol spectral component; S4.2: Establish a methanol mass concentration standard curve and an ethanol mass concentration standard curve based on the methanol spectral component and the ethanol spectral component; S5: Collect the near-infrared spectral data of the vehicle gasoline to be measured and perform a preprocessing operation to obtain the near-infrared spectral data of the vehicle gasoline to be measured; S6: Perform a spectral projection operation on the near-infrared spectral data of the vehicle gasoline to be measured to extract the methanol spectral component and the ethanol spectral component of the vehicle gasoline to be measured; S7: Obtain the mass concentrations of methanol and ethanol in the vehicle gasoline to be measured based on the methanol spectral component and the ethanol spectral component of the vehicle gasoline to be measured.

[0006] Preferably, in S4.1, the spectral projection operation is an oblique projection operation, specifically: perform a spectral oblique projection operation on the sample spectrum of the vehicle gasoline standard sample to extract the methanol spectral component and the ethanol spectral component.

[0007] Preferably, performing a spectral oblique projection operation on the sample spectrum of the vehicle gasoline standard sample to extract the methanol spectral component and the ethanol spectral component is specifically as follows: Sa: Convert the sample spectrum of the vehicle gasoline standard sample into a spectral matrix X; Sb: Solve the oblique projection weight vector ω for the spectral matrix; The calculation formula for solving the oblique projection weight vector ω of the spectral matrix is: ; In the formula, X is the spectral matrix, λ is the regularization parameter, y is the target variable, X T is the transpose matrix of the spectral matrix, and I is the identity matrix; Sc: Extract the methanol spectral component and the ethanol spectral component according to the oblique projection weight vector.

[0008] Preferably, the determination method of the regularization parameter is as follows: Sb1: Obtain the average value Mean(X) of the singular values of the spectral matrix X; Sb2: Obtain the robust signal-to-noise ratio of the spectral matrix X; Among them, the robust signal-to-noise ratio SNR is: ; In the formula, the MAD(y) is the median absolute deviation of the target variable y, is the initial weight; Sb3: Determine the regularization parameter according to the average value of the singular values of the spectral matrix X and the robust signal-to-noise ratio of the spectral matrix X; The specific formula is: ; In the formula, is the adjustment factor.

[0009] Preferably, is 0.5.

[0010] Preferably, in S7, input the methanol spectral component of the to-be-detected vehicle gasoline into the relational expression of the methanol mass concentration standard curve to obtain the methanol mass concentration of the to-be-detected vehicle gasoline; input the ethanol spectral component of the to-be-detected vehicle gasoline into the relational expression of the ethanol mass concentration standard curve to obtain the ethanol mass concentration of the to-be-detected vehicle gasoline.

[0011] Preferably, S2 is specifically: Use a portable Fourier near-infrared oil analyzer to collect near-infrared spectra, spectral range: 9100~4000 cm -1 , wavenumber accuracy: 6523±1 cm -1 , wavenumber precision: ±0.1cm -1 , signal-to-noise ratio better than 10000∶1, and take the average spectrum as the sample spectrum.

[0012] Preferably, in S3, the preprocessing operation includes spectral noise elimination, spectral background correction, spectral calibration, and spectral normalization.

[0013] According to another aspect of the present invention, there is provided a device for detecting methanol and ethanol in vehicle gasoline based on near-infrared spectra. This device adopts the above-mentioned method for detecting methanol and ethanol in vehicle gasoline based on near-infrared spectra. The device includes: A sample preparation module for preparing a vehicle gasoline standard sample; A spectral acquisition module for collecting data on the vehicle gasoline standard sample to obtain the sample spectrum of the vehicle gasoline standard sample; A spectral preprocessing module for performing preprocessing operations on the sample spectrum of the vehicle gasoline standard sample to obtain the sample spectrum of the preprocessed standard sample; A standard curve establishment module for establishing a standard curve according to the sample spectrum data of the preprocessed standard sample; The sample collection and preprocessing module for the sample to be tested is used to collect the near-infrared spectral data of the gasoline for vehicles to be tested and perform preprocessing operations to obtain the near-infrared spectral data of the gasoline for vehicles to be tested; The spectral projection module is used to perform spectral projection operations on the near-infrared spectral data of the gasoline for vehicles to be tested, so as to extract the methanol spectral component and ethanol spectral component of the gasoline for vehicles to be tested; The mass concentration calculation module is used to obtain the mass concentrations of methanol and ethanol in the gasoline for vehicles to be tested according to the methanol spectral component and ethanol spectral component of the gasoline for vehicles to be tested.

[0014] The present invention has the following technical effects: The present invention proposes a near-infrared spectral detection method for alcohol concentration in gasoline without multivariate analysis modeling. Its research idea: Alcohol gasoline is composed of alcohol substances and gasoline, so its spectrum is composed of the linear combination of the spectra of alcohol components and gasoline components (ignoring intermolecular interactions). The spectral data is a vector, and the spectral vectors of different components are different in direction mathematically. By performing spectral projection on the near-infrared spectrum of the gasoline solution containing alcohol substances, the spectral components of methanol and ethanol components are obtained. By using the standard solution with known mass concentration and establishing a standard curve using its alcohol spectral components and corresponding concentrations, the influence of the coexistence of methanol and ethanol on the prediction ability of the standard curve is eliminated, the problem of serious overlap of near-infrared spectral bands of different components is overcome, and the solution process is simple; According to the characteristic that near-infrared spectral data usually has collinearity, the present invention uses the median of singular values of the spectral data matrix to reflect the validity of the spectral data and avoid too small validity due to high-dimensional noise; at the same time, when solving the robust signal-to-noise ratio, the median absolute deviation is used to resist outliers; through the operation of this solution, in the above infrared spectral data processing process, the obtained regularization parameter overcomes the disadvantages of strong subjectivity and complex solution, and a relatively accurate regularization parameter is obtained. Description of the Drawings

[0015] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0016] Figure 1 It is a flowchart of a method for detecting methanol and ethanol in gasoline for vehicles based on near-infrared spectra provided by an embodiment of the present invention; Figure 2 It is a schematic diagram of a standard curve of methanol mass concentration provided by an embodiment of the present invention; Figure 3It is a schematic diagram of the standard curve of ethanol mass concentration provided by an embodiment of the present invention. Detailed implementation manners

[0017] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below. Obviously, the described embodiments are only a part rather than all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope protected by the present invention.

[0018] Example 1, attached Figure 1 shows a flow chart of a method for detecting methanol and ethanol in vehicle gasoline based on near-infrared spectroscopy. As attached Figure 1 shown, a method for detecting methanol and ethanol in vehicle gasoline based on near-infrared spectroscopy includes the following steps: S1: Prepare vehicle gasoline standard samples; In this step, anhydrous methanol, anhydrous ethanol, and petroleum ether (60 - 90 °C) were purchased from Shanghai Macklin Biochemical Co., Ltd. 92# gasoline samples: QA1-92#, QA2-92# were from Huabei Petrochemical Company, PetroChina (Renqiu), and QB1-92#, QB2-92# were from Sinopec (Beijing); 95# gasoline samples QA3-95#, QA4-95# were from Beijing Zhongyou Beiyou Chemical Co., Ltd., and QB3-95#, QB4-95# were from Huabei Petrochemical Company, PetroChina (Renqiu), all of which were samples collected from Beijing Niushan Oil Depot.

[0019] Among them, the vehicle gasoline standard samples include calibration standard samples and verification standard samples; The preparation method of the calibration standard samples is: Take a certain volume of methanol or ethanol and add it to the finished gasoline to prepare a standard solution. The finished gasoline samples are QA1-92#, QA2-92#, QA3-95#, QA4-95# gasoline. Prepare a series of methanol gasoline samples with a methanol mass concentration of 3.95 g - 197.5 g / L, numbered AM1 - AM15; prepare a series of ethanol gasoline samples with an ethanol mass concentration of 7.89 - 118.4 g / L, numbered AE1 - AE15. The specific sample information is shown in Table 1.

[0020] Table 1 Specific information of calibration samples

[0021] The preparation method of the verification standard sample is as follows: Take a certain volume of methanol or ethanol and add it to the finished gasoline to prepare a standard solution. The finished gasoline samples are the gasoline of QB1-92#, QB2-92#, QB3-95#, and QB4-95#. Prepare a series of methanol-gasoline samples with a methanol mass concentration of 6.3 - 196.0 g / L, numbered BM1 - BM8; prepare a series of ethanol-gasoline samples with an ethanol mass concentration of 23.7 - 118.4 g / L, numbered BE1 - BE8; prepare methanol-ethanol gasoline samples with a methanol mass concentration of 7.9 - 197.5 g / L and an ethanol mass concentration of 7.89 - 118.4 g / L, numbered BME1 - BME8. The specific sample information is shown in Table 2.

[0022] Table 2 Specific Information of Verification Samples

[0023] S2: Collect data on the vehicle gasoline standard sample to obtain the sample spectrum of the vehicle gasoline standard sample; Use a NIR-501A portable Fourier near-infrared oil analyzer to collect near-infrared spectra. Spectral range: 9100 - 4000 cm -1 , Wavenumber accuracy: 6523 ± 1 cm -1 , Wavenumber precision: ±0.1 cm -1 , Signal-to-noise ratio is better than 10000:1. Collect at 3 different orientations and take the average spectrum as the sample spectrum.

[0024] S3: Perform preprocessing operations on the sample spectrum of the vehicle gasoline standard sample to obtain the sample spectrum of the preprocessed standard sample; Among them, in this embodiment, the preprocessing operations include spectral noise elimination, spectral background correction, spectral calibration, spectral normalization, etc.; The spectral noise elimination is specifically as follows: Use the Savitzky-Golay convolution smoothing algorithm to smooth the spectral data. This algorithm can effectively eliminate the random noise in the spectral data through the method of local polynomial fitting while maintaining the integrity of spectral features. In this step, the size of the smoothing window is selected according to the resolution and noise level of the spectral data, usually 5 - 21 data points.

[0025] The spectral background correction is specifically as follows: Use methods such as multiplicative scatter correction (MSC) or standard normal variate transformation (SNV) to correct the background of the spectral data. The MSC method can improve the consistency and comparability of spectral signals by eliminating the scattering effect in the spectral data; the SNV method can eliminate the scale difference in the spectral data by normalizing the spectral data to a distribution with a mean of zero and a standard deviation of one.

[0026] The spectral correction specifically includes: performing baseline correction on the spectral data to eliminate baseline drift in the spectral data. The methods of baseline correction include polynomial fitting, moving average, etc. The polynomial fitting method can effectively eliminate baseline drift by fitting the baseline part of the spectral data; the moving average method can smooth the baseline drift by calculating the local average of the spectral data.

[0027] The spectral normalization specifically includes: normalizing the spectral data so that the range of the spectral data is between 0 and 1. The normalization methods include maximum - minimum normalization, Z - score normalization, etc. The maximum - minimum normalization method can eliminate the scale difference of the spectral data by normalizing the maximum and minimum values of the spectral data to 1 and 0 respectively; the Z - score normalization method can eliminate the distribution difference of the spectral data by normalizing the mean of the spectral data to 0 and the standard deviation to 1.

[0028] In this step, the above - mentioned pre - processing methods can be selectively used. For example, any one or several of the above - mentioned methods can be selected to pre - process the spectral data. This embodiment does not specifically limit this.

[0029] S4: Establish a standard curve according to the sample spectral data of the pre - processed standard sample; Although near - infrared instruments are more suitable for on - site detection, when near - infrared spectroscopy is used to detect multiple components, the near - infrared spectral bands of different components overlap more severely, and the univariate linear regression method is no longer applicable. Generally, near - infrared spectroscopy relies on multivariate (multi - wavelength) analysis modeling methods (such as PLS), but the disadvantages are large modeling workload, long cycle, and high cost. Therefore, this embodiment proposes a method for near - infrared spectroscopy detection of alcohol concentration in gasoline without multivariate analysis modeling. Its research idea is: Alcohol gasoline is composed of alcohol substances and gasoline, so its spectrum is composed of the linear combination of the alcohol component spectrum and the gasoline component spectrum (ignoring intermolecular interactions). The spectral data is a vector, and the spectral vectors of different components are different in direction mathematically. By projecting the near - infrared spectrum of the gasoline solution containing alcohol substances onto the methanol spectrum and ethanol spectrum respectively, the spectral components of the methanol component and ethanol component are obtained. Using the known mass concentration standard solution, a standard curve is established using its alcohol spectral components and corresponding concentrations, so as to eliminate the influence of the co - existence of methanol and ethanol on the prediction ability of the standard curve.

[0030] Specifically, S4 is specifically as follows: S4.1: Perform spectral projection operation on the sample spectrum of the vehicle gasoline standard sample, so as to extract the methanol spectral component and ethanol spectral component; Specifically, methanol gasoline samples AM1 to AM15, ethanol gasoline samples AE1 to AE15, and methanol-ethanol gasoline samples BME1 to BME8 in the calibration standard samples were collected for near-infrared spectroscopy analysis. Through spectral projection operations, methanol spectral components were extracted from the methanol gasoline samples; ethanol spectral components were extracted from the ethanol gasoline samples; and methanol and ethanol spectral components were respectively extracted from the methanol-ethanol gasoline samples. The shapes of the methanol and ethanol spectral components extracted from the near-infrared spectra of calibration standard samples with different mass concentrations are consistent with those of pure methanol and ethanol near-infrared spectra, and the absorbances of their methanol and ethanol spectral components increase with the increase of their mass concentrations.

[0031] As a more preferred embodiment, the spectral projection operation is an oblique projection operation; that is, an oblique spectral projection operation is performed on the sample spectra of the vehicle gasoline standard samples to extract methanol spectral components and ethanol spectral components; Specifically: Sa: Convert the sample spectra of the vehicle gasoline standard samples into a spectral matrix X; Among them, the spectral matrix X is an m×n matrix, m is the number of standard samples, and n is the number of wavelength points; It should be emphasized that the spectral data of the methanol gasoline standard samples are converted into a spectral matrix for subsequent acquisition of methanol spectral components, and the spectral data of the ethanol gasoline standard samples are converted into a spectral matrix for subsequent acquisition of ethanol spectral components.

[0032] Sb: Solve the oblique projection weight vector ω for the spectral matrix; Among them, the calculation formula for solving the oblique projection weight vector ω of the spectral matrix is: ; In the formula, X is the spectral matrix, λ is the regularization parameter, y is the target variable, X T is the transposed matrix of the spectral matrix, and I is the identity matrix; In the existing designs, the determination of the regularization parameter is generally achieved according to empirical formulas, heuristic algorithms, etc. The above-mentioned schemes either have the disadvantage of strong subjectivity or the disadvantage of complex solution; according to the above-mentioned disadvantages, this embodiment proposes a method for determining the regularization parameter to overcome the defects of strong subjectivity and difficult solution.

[0033] Specifically, the method for determining the regularization parameter is: Sb1: Obtain the average value Mean(X) of the singular values of the spectral matrix X; Sb2: Obtain the robust signal-to-noise ratio of the spectral matrix X; Among them, the robust signal-to-noise ratio SNR is: ; Wherein, the MAD(y) is the median absolute deviation of the target variable y, is the initial weight; Sb3: Determine the regularization parameter according to the average of the singular values of the spectral matrix X and the robust signal-to-noise ratio of the spectral matrix X; The specific formula is: ; Wherein, is the adjustment factor; by default, it is 0.5, and it can be optimized within the range of [0.1, 1.0] through the cross-validation method to balance the regularization strength; In this solution, according to the characteristic that near-infrared spectral data usually has collinearity, the median of the singular values of the spectral data matrix is used to reflect the effectiveness of the spectral data, avoiding too small effectiveness caused by high-dimensional noise; at the same time, when solving the robust signal-to-noise ratio, the median absolute deviation is used to resist outliers; through the operation of this solution, in the above infrared spectral data processing process, the obtained regularization parameter overcomes the disadvantages of strong subjectivity and complex solution, and a relatively accurate regularization parameter is obtained.

[0034] Sc: Extract the methanol spectral component and the ethanol spectral component according to the oblique projection weight vector; Specifically, the Sc is specifically: Sort the absolute values of each element in the oblique projection weight vector from large to small, and select the spectral components corresponding to the first k weights as the methanol spectral component or the ethanol spectral component.

[0035] S4.2: Establish a methanol mass concentration standard curve and an ethanol mass concentration standard curve according to the methanol spectral component and the ethanol spectral component; Among them, the abscissa of the methanol mass concentration standard curve is the methanol mass concentration, and the ordinate is the methanol spectral component of the spectral curve. The abscissa of the ethanol mass concentration standard curve is the ethanol mass concentration, and the ordinate is the ethanol spectral component of the spectral curve; Specifically, the methanol and ethanol spectral components respectively extracted from the near-infrared spectra of the methanol gasoline samples AM1 - AM15 and the ethanol gasoline samples AE1 - AE15 in the calibration standard samples are selected, and the O—H characteristic peak at the wavenumber of 6100 - 7200 cm -1 is used. The spectral components are linearly fitted with the corresponding mass concentrations to establish methanol and ethanol mass concentration standard curves respectively. The results are as Figure 2 and Figure 3 shown; among them, Figure 2 is the methanol mass concentration standard curve, Figure 3 is the ethanol mass concentration standard curve; from Figure 2 and Figure 3It can be seen that the correlation coefficients of the methanol and ethanol mass concentration standard curves are both above 0.999. Compared with the mass concentration standard curve equations shown in Figure 3, the linear relationship has been significantly improved.

[0036] Among them, the relational expression of the methanol mass concentration standard curve is: ; In the formula, x is the mass concentration of methanol, and y is the spectral component of methanol; The relational expression of the ethanol mass concentration standard curve is: ; In the formula, x is the mass concentration of ethanol, and y is the spectral component of ethanol.

[0037] As a more optimal embodiment, it further includes the step of verifying the standard curve by validating the data of the standard sample.

[0038] S5: Collect the near-infrared spectral data of the vehicle gasoline to be tested, and perform preprocessing operations to obtain the near-infrared spectral data of the vehicle gasoline to be tested; Among them, in order to ensure the consistency of the detection results, the collection process and preprocessing process of this step are the same as the collection process in S2 and the preprocessing process in S3.

[0039] S6: Perform spectral projection operations on the near-infrared spectral data of the vehicle gasoline to be tested, so as to extract the methanol spectral component and ethanol spectral component of the vehicle gasoline to be tested; Similarly, the spectral projection operation in this step is the same as the above-mentioned spectral projection operation.

[0040] S7: Obtain the mass concentrations of methanol and ethanol in the vehicle gasoline to be tested according to the methanol spectral component and ethanol spectral component of the vehicle gasoline to be tested.

[0041] Specifically, input the methanol spectral component of the vehicle gasoline to be tested into the relational expression of the methanol mass concentration standard curve to obtain the methanol mass concentration of the vehicle gasoline to be tested; input the ethanol spectral component of the vehicle gasoline to be tested into the relational expression of the ethanol mass concentration standard curve to obtain the ethanol mass concentration of the vehicle gasoline to be tested.

[0042] By extracting the alcohol spectral components from the near-infrared spectrum of the alcohol-containing gasoline and using the method of this embodiment to establish a near-infrared spectral projection method for detecting the mass concentration standard curve of alcohols, the absolute values of the maximum predicted relative deviations of the methanol mass concentration in the methanol gasoline sample and the ethanol mass concentration in the ethanol gasoline sample are 1.9% and 6.2% respectively, and the average values of the predicted relative deviations are 1.3% and 2.9% respectively; the accuracy of alcohol detection in gasoline is improved.

[0043] Example 2. The present invention further provides a detection device for methanol and ethanol in vehicle gasoline based on near-infrared spectroscopy. This device adopts a detection method for methanol and ethanol in vehicle gasoline based on near-infrared spectroscopy in Example 1. The device includes: A sample preparation module for preparing a standard sample of vehicle gasoline; A spectrum acquisition module for collecting data of the standard sample of vehicle gasoline to obtain the sample spectrum of the standard sample of vehicle gasoline; A spectrum preprocessing module for performing preprocessing operations on the sample spectrum of the standard sample of vehicle gasoline to obtain the sample spectrum of the preprocessed standard sample; A standard curve establishment module for establishing a standard curve based on the sample spectrum data of the preprocessed standard sample; A module for sampling and preprocessing the sample to be measured, which is used to collect the near-infrared spectrum data of the vehicle gasoline to be measured and perform preprocessing operations to obtain the near-infrared spectrum data of the vehicle gasoline to be measured; A spectrum projection module for performing spectrum projection operations on the near-infrared spectrum data of the vehicle gasoline to be measured, so as to extract the methanol spectrum component and ethanol spectrum component of the vehicle gasoline to be measured; A mass concentration calculation module for obtaining the mass concentrations of methanol and ethanol in the vehicle gasoline to be measured based on the methanol spectrum component and ethanol spectrum component of the vehicle gasoline to be measured.

[0044] Example 3. The present invention further provides an electronic device, including one or more processors and a memory.

[0045] The processor may be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0046] The memory may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may run the program instructions to implement the detection method for methanol and ethanol in vehicle gasoline based on near-infrared spectroscopy in any embodiment of the present application described above and / or other desired functions. Various contents such as initial external parameters and thresholds may also be stored in the computer-readable storage medium.

[0047] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected through a bus device and / or other forms of connection mechanisms. The input device may include, for example, a keyboard, a mouse, and the like. The output device may output various information to the outside, including warning prompt information, braking force, etc. The output device may include, for example, a display, a speaker, a printer, a communication network, and remote output devices connected thereto, and the like.

[0048] In addition, according to specific application scenarios, the electronic device may further include any other appropriate components.

[0049] In addition to the above methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, and when the computer program instructions are run by a processor, the processor is caused to implement the functions of the method for detecting methanol and ethanol in vehicle gasoline based on near-infrared spectroscopy provided by any embodiment of the present application.

[0050] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the embodiments of the present application. The programming languages include object-oriented programming languages, such as Java, C++, etc., and also include conventional procedural programming languages, such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, executed as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0051] In addition, an embodiment of the present application may also be a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are run by a processor, the processor is caused to implement the method for detecting methanol and ethanol in vehicle gasoline based on near-infrared spectroscopy provided by any embodiment of the present application.

[0052] The computer-readable storage medium may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor devices, devices or components, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0053] It should be noted that the terms used in the present invention are only for describing specific embodiments and do not limit the scope of the present application. As shown in the specification of the present invention, unless the context clearly indicates an exception, words such as "a", "an", "one kind" and / or "the" do not specifically refer to the singular and may also include the plural. The term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such a process, method or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of another identical element in the process, method or device comprising the said element.

[0054] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting methanol and ethanol in gasoline based on near infrared spectroscopy, characterized in that: include: S1: Preparation of standard samples of motor gasoline; S2: collecting data of the standard sample of gasoline for automobiles to obtain a sample spectrum of the standard sample of gasoline for automobiles; S3: performing a preprocessing operation on the sample spectrum of the motor gasoline standard sample to obtain a sample spectrum of the preprocessed standard sample; S4: establishing a standard curve according to the sample spectrum data of the pretreated standard sample; The S4 is specifically: S4.1: performing a spectral projection operation on the sample spectrum of the motor gasoline standard sample, thereby extracting the methanol spectral component and the ethanol spectral component; S4.2: establishing a methanol mass concentration standard curve and an ethanol mass concentration standard curve according to the methanol spectral component and the ethanol spectral component; S5: collecting near infrared spectrum data of the motor gasoline to be tested, and performing preprocessing operations to obtain near infrared spectrum data of the motor gasoline to be tested; S6: performing a spectral projection operation on the near-infrared spectrum data of the tested motor gasoline, thereby extracting a methanol spectrum component and an ethanol spectrum component of the tested motor gasoline; S7: Obtaining the mass concentrations of methanol and ethanol in the motor gasoline to be tested according to the methanol spectral component and the ethanol spectral component of the motor gasoline to be tested.

2. The method for detecting methanol and ethanol in gasoline for motor vehicles based on near infrared spectroscopy according to claim 1, characterized in that: In S4.1, the spectral projection operation is an oblique projection operation, specifically: performing a spectral oblique projection operation on the sample spectrum of the motor gasoline standard sample, thereby extracting the methanol spectral component and the ethanol spectral component.

3. The method for detecting methanol and ethanol in gasoline for motor vehicles based on near infrared spectroscopy according to claim 2, characterized in that: The sample spectrum of the motor gasoline standard sample is subjected to a spectral oblique projection operation, so as to extract the methanol spectral component and the ethanol spectral component. Specifically, the spectral components are: Sa: converting the sample spectrum of the motor gasoline standard sample into a spectrum matrix X; Sb: solve the oblique projection weight vector ω for the spectral matrix; The calculation formula for solving the oblique projection weight vector ω by the spectral matrix is: ; In the formula, X is the spectral matrix, λ is the regularization parameter, y is the target variable, and X T is the transposed matrix of the spectral matrix, I is the identity matrix; Sc: Extracting the methanol spectral component and the ethanol spectral component according to the oblique projection weight vector.

4. The method for detecting methanol and ethanol in gasoline for motor vehicles based on near infrared spectroscopy according to claim 3, characterized in that: The method for determining the regularization parameter is: Sb1: Calculate the mean Mean(X) of the singular values ​​of the spectral matrix X; Sb2: Obtain the robust signal-to-noise ratio of the spectral matrix X; Wherein, the robust signal-to-noise ratio SNR is: ; Wherein, MAD(y) is the median absolute deviation of the target variable y. is the initial weight; Sb3: determining a regularization parameter according to the average of the singular values ​​of the spectral matrix X and the robust signal-to-noise ratio of the spectral matrix X; The specific formula is: ; In the formula, is the adjustment factor.

5. The method for detecting methanol and ethanol in gasoline for motor vehicles based on near infrared spectroscopy according to claim 4, characterized in that: is 0.

5.

6. The method for detecting methanol and ethanol in gasoline for motor vehicles based on near infrared spectroscopy according to claim 1, characterized in that: In S7, the methanol spectral component of the automotive gasoline to be tested is input into the relationship formula of the methanol mass concentration standard curve to obtain the methanol mass concentration of the automotive gasoline to be tested; the ethanol spectral component of the automotive gasoline to be tested is input into the relationship formula of the ethanol mass concentration standard curve to obtain the ethanol mass concentration of the automotive gasoline to be tested.

7. The method for detecting methanol and ethanol in gasoline for motor vehicles based on near infrared spectroscopy according to claim 1, characterized in that: The S2 is specifically: using a portable Fourier near-infrared oil analyzer to collect near-infrared spectra, with a spectral range of 9100-4000 cm -1 , wave number accuracy: 6523±1 cm -1 , wave number accuracy: ±0.1cm -1 , the signal-to-noise ratio is better than 10000:1, and the average spectrum is taken as the sample spectrum.

8. The method for detecting methanol and ethanol in gasoline for motor vehicles based on near infrared spectroscopy according to claim 1, characterized in that: In S3, the preprocessing operation includes spectral noise elimination, spectral background correction, spectral correction, and spectral normalization.

9. A device for detecting methanol and ethanol in gasoline for automobiles based on near infrared spectroscopy, characterized in that: The device adopts a method for detecting methanol and ethanol in automotive gasoline based on near infrared spectroscopy as described in any one of claims 1 to 8, and the device comprises: Sample preparation module, used to prepare standard samples of motor gasoline; A spectrum acquisition module, used for collecting data of the standard sample of gasoline for automobiles, and obtaining a sample spectrum of the standard sample of gasoline for automobiles; A spectrum preprocessing module, used for performing a preprocessing operation on the sample spectrum of the motor gasoline standard sample to obtain a sample spectrum of the preprocessed standard sample; A standard curve establishment module, used to establish a standard curve according to the sample spectrum data of the pre-treated standard sample; The sample sampling and preprocessing module is used to collect the near-infrared spectrum data of the motor gasoline to be tested, and perform preprocessing operations to obtain the near-infrared spectrum data of the motor gasoline to be tested; A spectral projection module, used for performing spectral projection operation on the near-infrared spectral data of the motor gasoline to be tested, so as to extract the methanol spectral component and the ethanol spectral component of the motor gasoline to be tested; The mass concentration calculation module is used to obtain the mass concentrations of methanol and ethanol in the motor gasoline to be tested according to the methanol spectral component and the ethanol spectral component of the motor gasoline to be tested.

Citation Information

Patent Citations

  • Method and system for detecting and authenticating a taggant in a marking via surface-enhanced raman spectroscopy

    CA3189045A1

  • Characteristic spectrum band determination method based on characteristic absorption peak and methanol content detection system

    CN116952887A

Cited By

  • Rapid and portable detection system and detection method for methanol and ethanol in vehicle gasoline

    CN120761333A