Method for constructing step-by-step temperature compensation model for thermal oxidation rapeseed oil quality detection based on ultrasonic diagnosis technology

By constructing a stepwise temperature compensation model, the impact of environmental temperature changes on rapeseed oil quality detection in ultrasonic diagnostic technology is solved, and higher detection accuracy and stability are achieved.

CN120044138AActive Publication Date: 2025-05-27SICHUAN AGRI UNIV

Patent Information

Application Number
CN202510176967.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-05-27
Estimated Expiration
2045-02-18

AI Technical Summary

Technical Problem

When using ultrasonic diagnostic technology to detect the quality of rapeseed oil, changes in ambient temperature will affect the sound pulse signal, resulting in inaccurate detection results.

Method used

A temperature compensation model based on stepwise temperature compensation method is constructed. By collecting ultrasonic data and physical and chemical data within the range of 22-32℃, multiple partial least squares or random forest method models are established, and temperature compensation is performed through linear interpolation to improve the accuracy of detection.

Benefits of technology

By constructing a stepwise temperature compensation model, the impact of temperature changes on the detection results can be effectively reduced and the accuracy and stability of rapeseed oil quality detection can be improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120044138A_ABST
    Figure CN120044138A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of edible vegetable oil quality analysis, and discloses a construction method of a step-by-step temperature compensation model for thermal oxidation rapeseed oil quality detection based on an ultrasonic diagnosis technology. The invention aims to solve the problem that the environment temperature change can influence the sound wave pulse signal when the rapeseed oil quality is detected by utilizing an ultrasonic diagnosis technology. According to the method, a plurality of partial least squares (PLSR) or random forest method (RF) models are respectively established by adopting each integer temperature in a temperature range of 22-32 DEG C and correspondingly acquired ultrasonic data parameters in combination with physical and chemical data parameters acquired at the temperature; the prediction pertinence and accuracy of the temperature compensation model are improved in a mode of constructing a plurality of sub-models, and meanwhile, a training set, an internal verification set and an external verification set are introduced to perform multiple verification evaluation on the model, so that the prediction performance and stability of the model are ensured, and a quality index prediction value output by the model is closer to an actual quality index; and the accuracy and effectiveness of detection data are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of quality analysis of edible vegetable oils. Specifically, it relates to a method for constructing a stepwise temperature compensation model for the quality detection of thermally oxidized rapeseed oil based on ultrasonic diagnostic technology. Background Art

[0002] As a device specifically used for detecting edible oils, the ultrasonic pulse echo system device realizes its detection function by receiving and transmitting specific pulsed electrical signals. This device exhibits many remarkable advantages in the field of edible oil detection, including its fast analysis ability, which can complete the detection and analysis of edible oil-related parameters in a short time; it has a non-invasive characteristic, and during the detection process, it will not damage the internal structure and properties of the edible oil, ensuring that the integrity and quality of the edible oil are not affected; it shows high sensitivity. It can accurately detect tiny changes and potential problems in edible oils, effectively improving the accuracy of detection; and its low operating cost during the detection process. The pulse echo system device mainly consists of six parts: a pulse transceiver, an oscilloscope, an ultrasonic probe, a sample stage, a temperature control device, and a computer.

[0003] In the ultrasonic probe, its metal structure is affected by the disorderly change of the ambient temperature. This influence directly or indirectly acts on the sensor, thereby causing changes in the parameter characteristics of the sensor signal. Specifically, when the temperature changes by 1°C, the change range of the ultrasonic sound velocity is about 3.1 - 3.6 m / s. Under laboratory conditions, due to the constant temperature environment, ultrasonic technology can be used to measure small-volume samples. However, when performing measurement operations in an industrial environment, this measurement scheme will encounter great obstacles. In view of this, to ensure the accuracy and effectiveness of the measurement, it is necessary to adopt an appropriate method to compensate for the influence of temperature on the ultrasonic signal.

[0004] Temperature compensation methods can be mainly divided into two categories: hardware compensation and software compensation. Regarding hardware compensation, due to the limited internal space of power transformers and its relatively high production cost, there are many limiting conditions in practical engineering applications. The software compensation method has the advantages of high accuracy and low cost, and has currently become the main form of temperature compensation. It should be noted that the influence mechanism of temperature on the detection error of acoustic signals is complex. How to construct a suitable temperature compensation model to achieve high-precision compensation is one of the key issues and also the difficulty in this research field. Summary of the Invention

[0005] The purpose of the present invention is to provide a method for constructing a stepwise temperature compensation model for the quality detection of thermally oxidized rapeseed oil based on ultrasonic diagnostic technology, aiming to solve the problem that the change of ambient temperature will affect the acoustic pulse signal when using ultrasonic diagnostic technology to detect the quality of rapeseed oil.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A method for constructing a stepwise temperature compensation model for detecting the quality of thermally oxidized rapeseed oil based on ultrasonic diagnosis technology, characterized by comprising the following steps:

[0008] S1. Under each integer temperature condition within the range of 22 - 32 °C, collect the ultrasonic data and physicochemical data of the thermally oxidized rapeseed oil, and respectively use the ultrasonic data collected at each integer temperature as the independent variable X, and use the physicochemical data quality index collected at each integer temperature as the dependent variable Y. Use the partial least squares method PLSR or the random forest method RF to establish the correlation model between X and Y, and a total of 11 temperature compensation sub-models at different temperatures are obtained;

[0009] S2. Integrate all the temperature compensation sub-models together to form a stepwise temperature compensation overall model, and classify the ultrasonic data and physicochemical data quality indexes at the same integer temperature together, and a total of 11 data packets are obtained. Organize the ultrasonic data of each sample in the 11 data packets as X, and organize the physicochemical data quality index as Y, and mark the sample as (x 1 , y 1 ), (x 2 , y 2 ), …, (x i , y i ), where x i represents the ultrasonic data parameter of the i-th sample, and y i represents the physicochemical data quality index corresponding to the i-th sample; Each time, select 1 sample as the validation set, and the remaining samples as the training set, and a total of i times of model training and validation processes are carried out. In each iteration, calculate the prediction error or goodness-of-fit index, and finally evaluate by synthesizing the results of all iterations;

[0010] S3. Under the temperature condition within the range of 22 - 32 °C, randomly collect the ultrasonic data of the thermally oxidized rapeseed oil, and input the collected ultrasonic data into the sub-models of the actual measured temperature T 0 and the adjacent integer temperatures, and use the following linear interpolation method to estimate the predicted value of the quality index of the sample:

[0011]

[0012] where y i and y j are the prediction results of the two sub-models at temperatures T i and T j respectively;

[0013] Verify the accuracy of the model by comparing the predicted value of the quality index of the model with the actual measured value of the quality index.

[0014] S4. Under room temperature conditions, randomly collect the ultrasonic data of thermally oxidized rapeseed oil. If the actual measured temperature of the sample is an integer, directly input the collected ultrasonic data into the corresponding sub-model to obtain the predicted result of the quality index; if the actual measured temperature of the sample is not an integer, input the collected ultrasonic data into the sub-model at the integer temperature adjacent to this temperature, and use the linear interpolation formula in step S3 above to estimate the predicted value of the quality index of the sample. Verify the accuracy of the model by comparing the predicted value of the quality index of the model with the actual measured value of the quality index.

[0015] As a further preference of this technical solution, in step S1, the sampling method of the rapeseed oil is as follows: Take 600 mL from each of the 3 rapeseed oil samples and put them into containers respectively. Place the containers in a water bath and heat them to 180 ± 2 °C within 30 minutes, and then maintain a constant temperature and continue heating for 12 hours; Continuously heat for 7 days to obtain a total of 21 rapeseed oil samples.

[0016] As a further preference of this technical solution, use an ultrasonic pulse echo system device to perform ultrasonic detection on the sampled rapeseed oil samples. The ultrasonic pulse echo system device includes a computer, a pulse transceiver, an oscilloscope, a water bath, a sample stage, an ultrasonic probe, a thermometer probe, and a sample container. The ultrasonic measurement method of the ultrasonic pulse echo system device is as follows:

[0017] S101. Verify the accuracy and stability of the ultrasonic pulse echo system device by measuring the sound speed in distilled water at 26 °C.

[0018] S102. Filter the rapeseed oil sample using a sieve, and then slowly pour the oil sample into the sample container.

[0019] S103. Place the sample stage in the water bath to ensure that the temperature remains constant and controllable during the measurement process.

[0020] S104. Immerse the signal emission end of the ultrasonic probe and the thermometer probe into the oil sample to be measured, remove the bubbles around the ultrasonic probe, and ensure that the placement position of the thermometer probe does not overlap with the transmission path of the acoustic pulse.

[0021] S105. Start the pulse transceiver and oscilloscope. After the oil sample temperature and ultrasonic signal are stable, use a computer to collect and save ultrasonic data in real time, and conduct three parallel measurements to ensure the accuracy of the results. Obtain ultrasonic spectrum data through the computer, plot a line graph with time as the abscissa and amplitude as the ordinate to obtain a time-domain spectrum, and at the same time perform a fast Fourier transform on the time-domain spectrum to obtain a frequency-domain spectrum. Obtain the characteristic data of the sound wave through the time-domain spectrum and frequency-domain spectrum, including the following ultrasonic data parameters:

[0022] The ultrasonic sound velocity v, which represents the distance traveled by ultrasonic waves per unit time, and its calculation formula is:

[0023]

[0024] In the formula, v represents the ultrasonic velocity; t 1 and t 0 respectively represent the occurrence time of the first echo and the occurrence time of the initial peak; L represents the flight distance of ultrasonic waves within this time interval;

[0025] The attenuation coefficient α, which represents the degree of attenuation of sound waves during propagation, and its calculation formula is:

[0026]

[0027] In the formula, α represents the attenuation coefficient; where A 1 and A 2 are the maximum amplitudes of the first echo and the second echo respectively, and L is the flight distance between the two echoes;

[0028] The peak value Af of the frequency-domain spectrum refers to the maximum amplitude observed within the frequency spectrum range;

[0029] The peak frequency Ff represents the frequency corresponding to the peak value of the frequency-domain spectrum;

[0030] FFT25, FFT50, and FFT75 respectively represent the minimum frequency values when the total received energy reaches 25%, 50%, and 75%.

[0031] As a further preference of this technical solution, the physical and chemical data of the thermally oxidized rapeseed oil to be collected includes the acid value, and the data collection method for the acid value is as follows: Dissolve 1 ± 0.0001 g of rapeseed oil sample in 20 mL of ether-isopropanol solution; use phenolphthalein as an indicator and titrate the free fatty acids with KOH solution; stop titration when the color changes to light pink and maintain it for 30 s, and at the same time perform a blank titration;

[0032] Complete the calculation of the acid value according to the following formula:

[0033]

[0034] In the formula, AV represents the acid value; v and v 0 respectively represent the volumes of the KOH solution used for titrating the thermally oxidized oil sample and the blank; c represents the concentration of the KOH solution; m represents the weight of the sample.

[0035] As a further preference of this technical solution, the physical and chemical data of the thermally oxidized rapeseed oil to be collected includes the iodine value, and the data collection method for the iodine value is as follows: Dissolve 0.2 ± 0.0001 g of rapeseed oil sample in 20 mL of cyclohexane - glacial acetic acid solution; add 25 mL of Wij's reagent, mix evenly and place in the dark for 1 h; after the reaction is completed, add 20 mL of potassium iodide solution and 150 mL of water; titrate with sodium thiosulfate solution, add 3 drops of starch solution after the yellow color of the liquid disappears, and continue titrating until the blue color just disappears, and perform a blank titration at the same time;

[0036] Calculate the iodine value according to the following formula:

[0037]

[0038] In the formula, IV represents the iodine value; v and v 0 respectively represent the volumes of the sodium thiosulfate solution used for titrating the thermally oxidized oil sample and the blank; c represents the concentration of the sodium thiosulfate solution; m represents the weight of the sample.

[0039] As a further preference of this technical solution, the physical and chemical data of the thermally oxidized rapeseed oil to be collected includes the polar component content, and the data collection method for the polar component content is as follows: Dissolve 1 ± 0.0001 g of rapeseed oil sample in a mixture of petroleum ether and diethyl ether, and then pour it into a silica gel column filled with silica gel, and use the mixture of petroleum ether and diethyl ether to elute the non - polar fraction; at the same time, collect about 200 mL of the eluate in a dry 500 mL round - bottom flask, and place the collected eluate in a rotary evaporator under a water bath condition of 60 °C and rotate and evaporate until nearly dry, and then place the residue in a vacuum constant - temperature drying oven at 40 °C for further drying for 20 min; after the container cools, accurately weigh the flask;

[0040] Calculate the polar component content according to the following formula:

[0041]

[0042] In the formula, TPC represents the polar component content; m 1 and m 2 respectively represent the weights of the blank flask and the flask containing polar components; m represents the weight of the sample.

[0043] As a further preference of this technical solution, the physicochemical data of the thermally oxidized rapeseed oil to be collected includes fatty acids, and the data collection method of the fatty acids includes oil sample pretreatment and fatty acid determination;

[0044] The oil sample pretreatment includes the following steps: Take 0.1±0.0001 g of rapeseed oil sample after vortexing for 2 min, and place it in a 10 mL test tube; Add 2 mL of 2% sodium hydroxide methanol solution to the test tube, perform vortex operation for 2 min, cover the stopper and let it stand in a water bath environment at 75±1°C for 20 min; After cooling, add 1 mL of 15% boron trifluoride methanol solution, vortex again for 1 min, cover the stopper and place it in a water bath at 75±1°C for 10 min; Precisely add 2 mL of n-heptane, vortex for 2 min and then add 1 mL of saturated sodium chloride aqueous solution, and then let it stand for stratification; Absorb 1 mL of the upper n-heptane extraction solution, transfer it to a 10 mL test tube, accurately add 4 mL of n-heptane, and add about 1 g of anhydrous sodium sulfate, vortex for 1 min, and let it stand for 5 min; Absorb the upper n-heptane extraction solution, and dilute it 10 times with n-heptane as the diluent; Take 1 mL of the diluted solution, filter the sample solution with a 0.22 μL hydrophobic membrane, and collect the filtered solution into an injection vial for detection and analysis;

[0045] The fatty acid determination uses a gas chromatography-mass spectrometry instrument, including the following steps: Separation is carried out using an HP-5 silica capillary column and a split ratio of 20:1; Helium is used as the carrier gas with a flow rate of 1 mL / min, the ion source temperature is 230°C, the injector temperature is maintained at 250°C, the column oven temperature is initially maintained at 120°C for 2 min, then increased to 200°C at a rate of 4°C / min and maintained for 2 min, and finally increased to 240°C at a rate of 3°C / min and maintained for 2 min; The chromatogram is recorded by monitoring the total ion chromatogram in the m / z range of 40 - 440; And the content of a given component i is calculated by calculating the percentage of the corresponding peak area to the sum of the peak areas of all components through the following formula:

[0046]

[0047] In the formula, FA i represents the percentage of a certain fatty acid in the total fatty acids; A Si represents the sum of the peak areas of each fatty acid methyl ester in the sample; represents the coefficient for converting a certain fatty acid methyl ester into a fatty acid.

[0048] As a further preference of this technical solution, in step S1, perform normality test and homogeneity of variance test on the collected ultrasonic data and physical and chemical data, perform analysis of variance to test the significance between groups on the data indicators that conform to the normal distribution and pass the homogeneity of variance test, and use Turkey test for post hoc comparison; for the data indicators that do not conform to the normal distribution, use non-parametric test for significance analysis and use Nemenyi test for multiple comparison;

[0049] Standardize the collected ultrasonic data and physical and chemical data. The calculation formula is:

[0050]

[0051] In the formula, x new represents the standardized data, x i represents the i-th data, represents the mean value, and σ represents the standard deviation.

[0052] As a further preference of this technical solution, in step S1, set the variable importance projection to evaluate the contribution of each variable to the model, and select the data indicators with the variable importance projection score greater than or equal to 5 for subsequent model training to enhance the generalization ability of the model; among them, the calculation formula of the variable importance projection score is:

[0053]

[0054] In the formula, VIP j is the variable importance projection, p is the total number of variables, R is the number of principal components, w aj is the weight of variable j on the a-th principal component, and d a is the explained variance of the a-th principal component.

[0055] As a further preference of this technical solution, in steps S2, S3, and S4, evaluate the performance of the temperature compensation model based on the root mean square error RMSE, mean absolute error MAE, and coefficient of determination R 2 ;

[0056] Based on the root mean square error RMSE as a method to measure the prediction accuracy of the model:

[0057]

[0058] Among them, y i and represent the i-th predicted value and reference value respectively, and n represents the number of data;

[0059] Based on the mean absolute error MAE as a method to measure the prediction accuracy of the model:

[0060]

[0061] Among them, y i and represent the i-th predicted value and the reference value respectively, and n represents the number of data;

[0062] Based on the coefficient of determination R 2 The method for evaluating the accuracy of the model is as follows:

[0063]

[0064] Among them, Y p and Y a represent the predicted data and the reference data respectively, represents the average value of the reference data.

[0065] Compared with the prior art, the beneficial effects of the present invention are:

[0066] The present invention establishes a temperature compensation model for ultrasonic detection of thermally oxidized rapeseed oil based on the stepwise temperature compensation method. It uses each integer temperature in the temperature range of 22 - 32°C and the corresponding ultrasonic data parameters collected, combined with the physicochemical data parameters collected at this temperature, to establish multiple partial least squares regression (PLSR) or random forest (RF) models respectively. By constructing multiple sub-models, the prediction pertinence and accuracy of the temperature compensation model are improved. At the same time, the present invention also introduces a training set, an internal validation set, and an external validation set to conduct multiple validation evaluations on the model, and through multiple model optimizations, the prediction performance and stability of the model are ensured, ensuring that the predicted values of the quality indicators output by the model are closer to the actual quality indicators, and guaranteeing the accuracy and effectiveness of the detection data. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] The drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, and do not constitute a limitation to the present invention. In the drawings:

[0068] Figure 1 is a schematic flow chart of the construction of the stepwise temperature compensation model in the present invention;

[0069] Figure 2 is a simplified diagram of the construction of the stepwise temperature compensation model in the present invention;

[0070] Figure 3 is a schematic structural diagram of the ultrasonic pulse echo system device adopted in the present invention;

[0071] Figure 4 is a schematic diagram of the steps of the ultrasonic measurement method of the ultrasonic pulse echo system device adopted in the present invention;

[0072] Figure 5 Schematic diagram of the time-domain spectrum obtained in an embodiment of the present invention;

[0073] Figure 6 Schematic diagram of the frequency-domain spectrum obtained in an embodiment of the present invention. Detailed implementation manners

[0074] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. 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 protection scope of the present invention.

[0075] Embodiment 1

[0076] Such as Figure 1 and Figure 2 shown, a method for constructing a stepwise temperature compensation model for the quality detection of thermally oxidized rapeseed oil based on ultrasonic diagnosis technology, characterized by including the following steps:

[0077] S1. Under each integer temperature condition within the range of 22 - 32 °C, collect the ultrasonic data and physicochemical data of the thermally oxidized rapeseed oil, and respectively use the ultrasonic data collected at each integer temperature as the independent variable X, and use the physicochemical data quality index collected at each integer temperature as the dependent variable Y. Establish an association model between X and Y using the partial least squares method PLSR or the random forest method RF, and a total of 11 temperature compensation sub-models at different temperatures are obtained;

[0078] S2. Integrate all the temperature compensation sub-models to form a stepwise temperature compensation overall model, and classify the ultrasonic data and physicochemical data quality indexes at the same integer temperature together, and a total of 11 data packets are obtained. Organize the ultrasonic data of each sample in the 11 data packets as X, and organize the physicochemical data quality index as Y, and mark the samples as (x 1 , y 1 ), (x 2 , y 2 ), …, (x i , y i ), where x i represents the ultrasonic data parameter of the i-th sample, and y i represents the physicochemical data quality index corresponding to the i-th sample; Each time, select 1 sample as the validation set, and the remaining samples as the training set, and a total of i model training and validation processes are performed. In each iteration, calculate the prediction error or goodness-of-fit index, and finally evaluate by integrating the results of all iterations;

[0079] Since the sample size of the present invention is small, the above steps are suitable for using the leave-one-out cross-validation method to evaluate the model performance, which can make each sample be used separately as the test set, fully utilize all the data for training and testing, ensure the wide applicability of the model, and provide an unbiased model performance estimate;

[0080] S3. Under the temperature condition in the range of 22 - 32 °C, randomly collect the ultrasonic data of thermally oxidized rapeseed oil, and input the collected ultrasonic data into the sub-models at the actual measured temperature T 0 and the sub-models at adjacent integer temperatures, and use the following linear interpolation method to estimate the predicted value of the quality index of the sample:

[0081]

[0082] where y i and y j are the prediction results of the two sub-models at the temperature T i and T j respectively;

[0083] Verify the accuracy of the model by comparing the predicted value of the quality index of the model with the actually measured value of the quality index;

[0084] The above steps are used for internal testing by introducing an internal validation set, which conducts random sampling with replacement in the original sample set, thereby performing multiple model trainings and validations, enabling it to prevent the model from overfitting and overestimating the model performance while testing the repeatability of the model;

[0085] S4. Under room temperature conditions, randomly collect the ultrasonic data of thermally oxidized rapeseed oil. If the actual measured temperature of the sample is an integer, directly input the collected ultrasonic data into the corresponding sub-model to obtain the predicted result of the quality index; if the actual measured temperature of the sample is not an integer, input the collected ultrasonic data into the sub-model at the integer temperature adjacent to this temperature, and use the linear interpolation formula in the above step S3 to estimate the predicted value of the quality index of the sample; verify the accuracy of the model by comparing the predicted value of the quality index of the model with the actually measured value of the quality index;

[0086] The above steps are used for external testing by introducing an external validation set, which predicts data different from the original sample set to evaluate the performance and robustness of the model when facing unknown data, and can also test whether the model overfits the training data, which is beneficial to verifying the robustness and credibility of the model.

[0087] More specifically, in step S1, the rapeseed oil is sampled as follows: 600 mL is taken from each of the 3 rapeseed oil samples and placed into containers respectively. The containers are put into a water bath and heated to 180 ± 2 °C within 30 min, and then maintained at a constant temperature and continuously heated for 12 h; heated continuously for 7 days, a total of 21 rapeseed oil samples are obtained; it should be noted that after the heating ends every day, it is necessary to wait for the oil temperature to cool naturally to room temperature, and before measuring the ultrasonic data and physical and chemical data of the rapeseed oil sample, the collected rapeseed oil sample needs to be stored in an environment of -4 °C and protected from light.

[0088] In this embodiment, an ultrasonic pulse echo system device is used to perform ultrasonic detection on the sampled rapeseed oil samples, as Figure 3 shown. The ultrasonic pulse echo system device includes a computer, a pulse transceiver, an oscilloscope, a water bath, a sample stage, an ultrasonic probe, a thermometer probe, and a sample container. Since the specific assembly structure of this device is prior art, it will not be elaborated here. The ultrasonic measurement method of the ultrasonic pulse echo system device is as follows:

[0089] S101, verify the accuracy and stability of the ultrasonic pulse echo system device by measuring the sound speed in distilled water at 26 °C;

[0090] S102, filter the rapeseed oil sample using a sieve, and then slowly pour the oil sample into the sample container;

[0091] S103, place the sample stage in the water bath to ensure that the temperature remains constant and controllable during the measurement process;

[0092] S104, immerse the signal transmitting end of the ultrasonic probe and the thermometer probe into the oil sample to be measured, remove the bubbles around the ultrasonic probe, and ensure that the placement position of the thermometer probe does not overlap with the transmission path of the acoustic pulse;

[0093] S105, start the pulse transceiver and the oscilloscope. After the oil sample temperature and the ultrasonic signal are stable, use the computer to collect and save the ultrasonic data in real time, and perform three parallel measurements to ensure the accuracy of the results; obtain the ultrasonic spectrum data through the computer, and draw a line graph with time as the abscissa and amplitude as the ordinate to obtain the time-domain spectrum. At the same time, perform a fast Fourier transform on the time-domain spectrum to obtain the frequency-domain spectrum, and obtain the characteristic data of the sound wave through the time-domain spectrum and the frequency-domain spectrum, including the following ultrasonic data parameters:

[0094] The ultrasonic sound speed v, which represents the distance that ultrasonic waves propagate per unit time, and its calculation formula is:

[0095]

[0096] In the formula, v represents the ultrasonic wave speed; t 1 and t0 respectively represent the occurrence time of the first echo and the time when the initial peak appears; L represents the flight distance of the ultrasonic wave within this time interval;

[0097] The attenuation coefficient α, which represents the degree of attenuation of the sound wave during propagation, and its calculation formula is:

[0098]

[0099] In the formula, α represents the attenuation coefficient; where A 1 and A 2 are the maximum amplitudes of the first echo and the second echo respectively, and L is the flight distance between the two echoes;

[0100] The peak value Af in the frequency domain spectrum refers to the maximum amplitude observed within the frequency spectrum range;

[0101] The peak frequency Ff represents the frequency corresponding to the peak value in the frequency domain spectrum;

[0102] FFT25, FFT50, and FFT75 respectively represent the minimum frequency values when the total received energy reaches 25%, 50%, and 75%.

[0103] In this embodiment, the physical and chemical data of the thermally oxidized rapeseed oil to be collected in the step S1 include acid value, iodine value, polar component content, and fatty acids.

[0104] Specifically, the method for collecting data of the acid value is: fully dissolve 1 ± 0.0001 g of rapeseed oil sample in 20 mL of ether - isopropanol solution; use phenolphthalein as an indicator and titrate the free fatty acids with KOH solution; stop titration when the color turns light pink and maintain for 30 s, and at the same time perform a blank titration;

[0105] Calculate the acid value according to the following formula:

[0106]

[0107] In the formula, AV represents the acid value; v and v 0 respectively represent the volumes of the KOH solution used for titrating the thermally oxidized oil sample and the blank; c represents the concentration of the KOH solution; m represents the weight of the sample.

[0108] The method for collecting data of the iodine value is: fully dissolve 0.2 ± 0.0001 g of rapeseed oil sample in 20 mL of cyclohexane - glacial acetic acid solution; add 25 mL of Wijs reagent, mix well and place in the dark for 1 h; after the reaction is completed, add 20 mL of potassium iodide solution and 150 mL of water; titrate with sodium thiosulfate solution, add 3 drops of starch solution after the yellow color of the liquid disappears, and continue titrating until the blue color just disappears, and at the same time perform a blank titration;

[0109] The iodine value is calculated according to the following formula:

[0110]

[0111] In the formula, IV represents the iodine value; v and v 0 respectively represent the volumes of the sodium thiosulfate solution used for titrating the thermally oxidized oil sample and the blank; c represents the concentration of the sodium thiosulfate solution; m represents the weight of the sample.

[0112] The data acquisition method for the polar component content is as follows: Dissolve 1 ± 0.0001 g of rapeseed oil sample in a mixture of petroleum ether and ether, then pour it into a silica gel column filled with silica gel, and use the mixture of petroleum ether and ether to elute the non-polar fraction; At the same time, collect about 200 mL of the eluate using a dry 500 mL round-bottom flask, and place the collected eluate in a rotary evaporator under a 60 °C water bath condition and rotate to evaporate until nearly dry, and then place the residue in a vacuum constant temperature drying oven at 40 °C for further drying for 20 min; After the container cools down, accurately weigh the flask;

[0113] The calculation of the polar component content is completed according to the following formula:

[0114]

[0115] In the formula, TPC represents the polar component content; m 1 and m 2 respectively represent the weights of the blank flask and the flask containing the polar component; m represents the weight of the sample.

[0116] The data acquisition method for the fatty acids includes oil sample pretreatment and fatty acid determination;

[0117] The pretreatment of the oil sample includes the following steps: Take 0.1 ± 0.0001 g of rapeseed oil sample after vortex treatment for 2 min, and place it in a 10 mL test tube; Add 2 mL of 2% sodium hydroxide methanol solution to the test tube, perform vortex operation for 2 min, cover with a stopper and let it stand in a water bath environment at 75 ± 1 °C for 20 min; After cooling, add 1 mL of 15% boron trifluoride methanol solution, vortex again for 1 min, cover with a stopper and place it in a water bath at 75 ± 1 °C for 10 min; Precisely add 2 mL of n-heptane, vortex for 2 min, then add 1 mL of saturated sodium chloride aqueous solution, and then let it stand for stratification; Pipette 1 mL of the upper n-heptane extraction solution, transfer it to a 10 mL test tube, accurately add 4 mL of n-heptane, and add about 1 g of anhydrous sodium sulfate, vortex for 1 min, and let it stand for 5 min; Pipette the upper n-heptane extraction solution, and dilute it 10 times with n-heptane as the diluent; Take 1 mL of the diluted solution, filter the sample solution with a 0.22 μL hydrophobic membrane, and collect the filtered solution into an injection vial for detection and analysis;

[0118] The fatty acid determination uses a PerkinElmer Clarus SQ8 gas chromatography-mass spectrometry instrument, including the following steps: Separation is carried out using an HP-5 silica capillary column and a 20:1 split mode; Helium is used as the carrier gas with a flow rate of 1 mL / min, the ion source temperature is 230 °C, the injector temperature is maintained at 250 °C, the column oven temperature is initially maintained at 120 °C for 2 min, then increased to 200 °C at a rate of 4 °C / min and maintained for 2 min, and finally increased to 240 °C at a rate of 3 °C / min and maintained for 2 min; The chromatogram is recorded by monitoring the total ion chromatogram in the m / z range of 40 - 440; And the content of a given component i is calculated by calculating the percentage of the corresponding peak area to the sum of the peak areas of all components through the following formula:

[0119]

[0120] In the formula, FA i represents the percentage of a certain fatty acid in the total fatty acids; A Si represents the sum of the peak areas of each fatty acid methyl ester in the sample; represents the coefficient for converting a certain fatty acid methyl ester into a fatty acid.

[0121] It should be noted that for those skilled in the art, other physicochemical data determinations of thermally oxidized rapeseed oil can be appropriately increased to further improve and optimize the established temperature compensation model, such as viscosity, density, etc.

[0122] Specifically, a digital viscometer was used to measure the viscosity of rapeseed oil. The specific measurement method included the following steps: Slowly pour 110 mL of rapeseed oil sample into a round flat-bottomed container with a diameter of about 60 mm. Take the rotor equipped with the container, adjust the rotor speed to 30 rpm / min, and then slowly screw it into the instrument in the counterclockwise direction; Operate the lifting block to make it rotate, so that the rotor can slowly immerse into the oil sample to be detected until the groove scale line on the rotor is at the same horizontal line as the oil sample to be measured; Calibrate the level of the instrument again and detect the viscosity of the oil sample. Repeat this detection operation three times for each oil sample.

[0123] A liquid density measuring instrument was used to measure the density of rapeseed oil samples. The specific measurement method included the following steps: Control the measurement temperature at about 25 °C. First, place the hook at the middle point of the densitometer and zero it after the data is stable; Use the hook to hook the glass weight and hang it at the middle point of the densitometer. Press the measurement button after the glass weight is stable; Slowly pour more than 50 mL of rapeseed oil sample into a glass beaker. Hang the glass weight at the middle point of the densitometer again; Remove the bubbles around the glass weight to ensure that the oil sample can completely immerse the glass weight and the weight does not touch the inner wall of the beaker. Click the measurement button to start the measurement program and record the density value displayed by the densitometer. Repeat the measurement three times.

[0124] Furthermore, in step S1, normality tests and homogeneity of variance tests were performed on the obtained ultrasonic data and physicochemical data. ANOVA was used to test the between-group significance for data indicators that conform to the normal distribution and pass the homogeneity of variance test, and Turkey test was used for post hoc comparison; Nonparametric tests were used for significance analysis of data indicators that do not conform to the normal distribution, and Nemenyi test was used for multiple comparisons.

[0125] The obtained ultrasonic data and physicochemical data were standardized. The calculation formula is:

[0126]

[0127] where x new represents the standardized data, x i represents the i-th data, represents the mean value, and σ represents the standard deviation.

[0128] Furthermore, in step S1, variable importance projection was set to evaluate the contribution of each variable to the model. Data indicators with variable importance projection scores greater than or equal to 5 were selected for subsequent model training to enhance the generalization ability of the model; The calculation formula for the variable importance projection score is:

[0129]

[0130] In the formula, VIP j is the variable importance projection, p is the total number of variables, R is the number of principal components, and w aj is the weight of variable j on the a-th principal component, and d a is the explained variance of the a-th principal component.

[0131] Furthermore, in steps S2, S3, and S4, based on the root mean square error RMSE and the mean absolute error MAE, the coefficient of determination R 2 is used to evaluate the performance of the temperature compensation model;

[0132] The method based on the root mean square error RMSE as a measure of the model prediction accuracy is as follows:

[0133]

[0134] where y i and represent the i-th predicted value and the reference value respectively, and n represents the number of data;

[0135] The method based on the mean absolute error MAE as a measure of the model prediction accuracy is as follows:

[0136]

[0137] where y i and represent the i-th predicted value and the reference value respectively, and n represents the number of data;

[0138] The method based on the coefficient of determination R 2 as a measure of the model accuracy is as follows:

[0139]

[0140] where Y p and Y a represent the predicted data and the reference data respectively, represents the average value of the reference data.

[0141] After the evaluation, the prediction performance of the model can be visually evaluated by plotting the comparison graph of the predicted value and the true value. If the prediction performance of the model is not satisfactory, the model can be optimized by adjusting the number of principal components, reselecting variables, or further preprocessing the data.

[0142] Finally, it should be noted that the above are only preferred embodiments of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for constructing a step-by-step temperature compensation model for thermally oxidized rapeseed oil quality detection based on ultrasonic diagnostic technology, characterized in that: The following steps are involved: S1, under each integer temperature condition in the range of 22-32°C, the ultrasonic data and physical and chemical data of the rapeseed oil after thermal oxidation are collected, and the ultrasonic data collected at each integer temperature are used as the independent variable X, and the quality index of the physical and chemical data collected at each integer temperature is used as the dependent variable Y. The partial least squares method PLSR or the random forest method RF is used to establish the correlation model between X and Y, and a total of 11 temperature compensation sub-models at different temperatures are obtained; S2, all temperature compensation sub-models are integrated together to form a stepwise temperature compensation overall model, and the ultrasonic data and physical and chemical data quality indicators at the same integer temperature are classified together, and a total of 11 data packets are obtained. The ultrasonic data of each sample in the 11 data packets are organized as X, and the physical and chemical data quality indicators are organized as Y. The samples are marked as (x1, y1), (x2, y2), ..., (x i ,y i ), where x i Represents the ultrasound data parameters of the i-th sample, y i Represents the quality index of the physical and chemical data corresponding to the i-th sample; each time, one sample is selected as the validation set, and the remaining samples are used as the training set. The model training and validation process is carried out i times in total. In each iteration, the prediction error or goodness of fit index is calculated, and finally the results of all iterations are comprehensively evaluated; S3, under the temperature condition of 22-32°C, the ultrasonic data of thermally oxidized rapeseed oil are randomly collected, and the collected ultrasonic data are input into the sub-model of the actual measurement temperature T0 and the adjacent integer temperature, and the quality index prediction value of the sample is estimated by the following linear interpolation method: Among them, y i and j The two sub-models are at temperature T i and T j The prediction results below: Verify the accuracy of the model by comparing the model's predicted quality index values ​​with the actual measured quality index values; S4, at room temperature, randomly collect ultrasonic data of thermally oxidized rapeseed oil. If the actual measured temperature of the sample is an integer, directly input the collected ultrasonic data into the corresponding sub-model to obtain the quality index prediction result; if the actual measured temperature of the sample is not an integer, input the collected ultrasonic data into the sub-model of the integer temperature adjacent to the temperature, and use the linear interpolation formula in the above step S3 to estimate the quality index prediction value of the sample; verify the accuracy of the model by comparing the quality index prediction value of the model with the actual quality index measurement value.

2. The method for establishing a step-by-step temperature compensation model according to claim 1, characterized in that: In step S1, the rapeseed oil is sampled as follows: 600 mL is taken from each of the three rapeseed oil samples and placed in containers respectively; the containers are placed in a water bath and heated to 180±2° C. within 30 minutes; then the constant temperature is maintained for continuous heating for 12 hours; heating is continued for 7 days to obtain a total of 21 rapeseed oil samples.

3. The method for establishing a step-by-step temperature compensation model according to claim 2, characterized in that: The ultrasonic pulse echo system device is used to perform ultrasonic detection on the sampled rapeseed oil sample. The ultrasonic pulse echo system device includes a computer, a pulse transceiver, an oscilloscope, a water bath, a sample table, an ultrasonic probe, a thermometer probe and a sample holder. The ultrasonic measurement method of the ultrasonic pulse echo system device is: S101, verify the accuracy and stability of the ultrasonic pulse echo system device by measuring the speed of sound in distilled water at 26°C; S102, filtering the rapeseed oil sample using a sieve, and then slowly pouring the oil sample into a sample container; S103, placing the sample stage in a water bath to ensure that the temperature remains constant and controllable during the measurement process; S104, immersing the signal transmitting end of the ultrasonic probe and the thermometer probe into the oil sample to be tested, removing bubbles around the ultrasonic probe, and ensuring that the placement position of the thermometer probe does not overlap with the transmission path of the sound wave pulse; S105, start the pulse transceiver and the oscilloscope, after the oil sample temperature and the ultrasonic signal are stable, use the computer to collect and save the ultrasonic data in real time, and perform three parallel measurements to ensure the accuracy of the results; obtain ultrasonic spectrum data through the computer, and draw a line graph with time as the horizontal axis and amplitude as the vertical axis to obtain a time domain spectrum, and perform fast Fourier transform on the time domain spectrum to obtain a frequency domain spectrum, and obtain characteristic data of the sound wave through the time domain spectrum and the frequency domain spectrum, including the following ultrasonic data parameters: Ultrasonic sound velocity v represents the distance ultrasonic waves propagate per unit time, and its calculation formula is: Wherein, v represents the ultrasonic velocity; t1 and t0 represent the appearance time of the first echo and the appearance time of the initial peak respectively; L represents the flight distance of the ultrasonic wave in the time interval; The attenuation coefficient α indicates the degree of attenuation of sound waves during propagation, and its calculation formula is: Where α represents the attenuation coefficient; A1 and A2 are the maximum amplitude of the first echo and the maximum amplitude of the second echo, and L is the distance between the two echoes; The frequency domain spectrum peak value Af refers to the maximum amplitude observed within the frequency spectrum; The peak frequency Ff represents the frequency corresponding to the peak of the frequency domain spectrum; FFT25, FFT50 and FFT75 represent the minimum frequency values ​​when the total received energy reaches 25%, 50% and 75%, respectively.

4. The method for constructing a global temperature compensation model according to claim 2, characterized in that: The physical and chemical data of the thermally oxidized rapeseed oil to be collected include the acid value, and the data collection method of the acid value is as follows: 1±0.0001 g of the rapeseed oil sample is fully dissolved in 20 mL of ether-isopropanol solution; Using phenolphthalein as an indicator, use KOH solution to titrate free fatty acids; stop titrating when the color turns light pink, maintain for 30 seconds, and perform a blank titration at the same time; The acid value is calculated according to the following formula: Wherein, AV represents the acid value; v and v0 represent the volume of KOH solution used to titrate the thermally oxidized oil sample and the blank, respectively; c represents the concentration of the KOH solution; and m represents the weight of the sample.

5. The method for constructing a global temperature compensation model according to claim 2, characterized in that: The physical and chemical data of the thermally oxidized rapeseed oil to be collected include iodine value, and the data collection method of the iodine value is as follows: 0.2±0.0001g of rapeseed oil sample is fully dissolved in 20mL of cyclohexane-glacial acetic acid solution; 25mL of Wei's reagent is added, mixed evenly and placed in the dark for reaction for 1h; after the reaction is completed, 20mL of potassium iodide solution and 150mL of water are added; sodium thiosulfate solution is used for titration, and 3 drops of starch solution are added after the yellow color of the liquid disappears, and the titration is continued until the blue color just disappears, and blank titration is performed at the same time; The iodine value is calculated according to the following formula: Wherein, IV represents the iodine value; v and v0 represent the volume of the sodium thiosulfate solution used to titrate the thermally oxidized oil sample and the blank, respectively; c represents the concentration of the sodium thiosulfate solution; and m represents the weight of the sample.

6. The method for constructing a global temperature compensation model according to claim 2, characterized in that: The physical and chemical data of the thermally oxidized rapeseed oil to be collected include the content of polar components. The data collection method of the content of polar components is as follows: 1±0.0001g of rapeseed oil sample is dissolved in a mixture of petroleum ether and ether, and then the mixture is poured into a silica gel column filled with silica gel, and the non-polar fraction is eluted using the mixture of petroleum ether and ether; at the same time, about 200mL of eluate is collected in a dry 500mL round-bottom flask, and the collected eluate is placed in a rotary evaporator under a 60°C water bath condition and rotary evaporated to near dryness, and then the residue is placed in a vacuum constant temperature drying oven at 40°C and further dried for 20 minutes; after the container is cooled, the flask is accurately weighed; The calculation of the polar component content is completed according to the following formula: Wherein, TPC represents the content of polar components; m1 and m2 represent the weight of the blank flask and the flask containing polar components, respectively; m represents the weight of the sample.

7. The method for constructing a global temperature compensation model according to claim 2, characterized in that: The physical and chemical data of the thermally oxidized rapeseed oil to be collected include fatty acids, and the data collection method of the fatty acids includes oil sample pretreatment and fatty acid determination; The oil sample pretreatment comprises the following steps: taking 0.1±0.0001 g of rapeseed oil sample after vortex treatment for 2 minutes, placing it in a 10 mL test tube; adding 2 mL of 2% sodium hydroxide methanol solution into the test tube, vortexing for 2 minutes, covering the tube with a stopper and placing it in a water bath at 75±1° C. for 20 minutes; after cooling, adding 1 mL of 15% boron trifluoride methanol solution, vortexing again for 1 minute, covering the tube with a stopper and placing it in a water bath at 75±1° C. for 10 minutes; accurately adding 2 mL of n-heptane , vortex for 2 minutes, add 1mL of saturated sodium chloride aqueous solution, and then let it stand to separate; draw 1mL of the upper n-heptane extraction solution, transfer it to a 10mL test tube, accurately add 4mL of n-heptane, and add about 1g of anhydrous sodium sulfate, vortex for 1min, and let it stand for 5min; draw the upper n-heptane extraction solution, dilute it 10 times with n-heptane as the diluent; take 1mL of the diluted solution, filter the sample solution with a 0.22μL hydrophobic membrane, and collect the filtered solution into a sample injection bottle for detection and analysis; The fatty acid determination adopts a gas chromatography-mass spectrometer, comprising the following steps: separation using an HP-5 silica gel capillary column and a 20:1 split mode; using helium as a carrier gas with a flow rate of 1 mL / min, an ion source temperature of 230° C., an injector temperature maintained at 250° C., a column oven temperature initially maintained at 120° C. for 2 min, then increased to 200° C. at 4° C. / min and maintained for 2 min, and finally increased to 240° C. at 3° C. / min and maintained for 2 min; recording a chromatogram by monitoring a total ion chromatogram with an m / z range of 40-440; and calculating the content of a given component i by calculating the percentage of the corresponding peak area to the sum of the peak areas of all components by the following formula: In the formula, FA i Represents the percentage of a certain fatty acid in the total fatty acids; A Si Represents the sum of the peak areas of each fatty acid methyl ester in the sample; Represents the coefficient of conversion of a fatty acid methyl ester into fatty acids.

8. The method for constructing a global temperature compensation model according to claim 1, characterized in that: In step S1, the acquired ultrasound data and physical and chemical data are subjected to normality test and variance homogeneity test, and the data indicators that conform to the normal distribution and pass the variance homogeneity test are subjected to variance analysis to test the significance between groups, and the Turkey test is used for post hoc comparison; Nonparametric tests were used to analyze the significance of data indicators that did not conform to the normal distribution, and Nemenyi test was used for multiple comparisons; The acquired ultrasound data and physical and chemical data were standardized, and the calculation formula was: In the formula, x new represents the standardized data, x i represents the i-th data, represents the mean and σ represents the standard deviation.

9. The method for constructing a global temperature compensation model according to claim 1, characterized in that: In step S1, variable importance projection is set to evaluate the contribution of each variable to the model, and data indicators with variable importance projection scores greater than or equal to 5 are selected for subsequent model training to enhance the generalization ability of the model; The calculation formula of the variable importance projection score is: In the formula, VIP j is the variable importance projection, p is the total number of variables, R is the number of principal components, and w aj is the weight of variable j on the ath principal component, d a is the explained variance of the ath principal component.

10. The method for constructing a global temperature compensation model according to claim 1, characterized in that: In steps S2, S3, and S4, based on the root mean square error RMSE, the mean absolute error MAE, and the coefficient of determination R 2 Evaluate the performance of the temperature compensation model; The method based on the root mean square error RMSE as a measure of the model prediction accuracy is: Among them, y i and Represent the i-th predicted value and reference value respectively, and n represents the number of data; The method based on mean absolute error MAE as a measure of model prediction accuracy is: Among them, y i and Represent the i-th predicted value and reference value respectively, and n represents the number of data; Based on the coefficient of determination R 2 The method to evaluate the accuracy of the model is: Among them, Y p and Y a Represent the predicted data and reference data respectively. Represents the mean value of the reference data.

Citation Information

Patent Citations

  • Method for detecting moisture content of crude oil based on ultrasonic sound velocity method

    CN109298070A

  • Ultrasonic measurement calibration method and thickness measurement method

    CN111351862A

  • Method for measuring water flow velocity

    CN118671376A

  • Density measurement of a fluid medium based on the time of flight of an ultrasound signal and the fluid's acoustic impedance with temperature compensation based on a reference time of flight sound signal measurement

    DE10112583A1

Cited By

  • Method for identifying quality of rapeseed oil

    CN121453887A

  • Frying oil quality detection method based on cascade feature screening optimization and ultrasonic diagnosis technology

    CN121805429A