Construction method of stepwise temperature compensation model for quality detection of hot-oxidized rapeseed oil based on ultrasonic diagnosis technology
By constructing a stepwise temperature compensation model, the impact of environmental temperature changes on rapeseed oil quality detection in ultrasound diagnostic technology was addressed, achieving high-precision temperature compensation and improving the accuracy and stability of rapeseed oil quality detection.
Patent Information
- Application Number
- CN202510176967.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-02-18
AI Technical Summary
In ultrasound diagnostic technology, the impact of changes in ambient temperature on the detection of sound wave signals is complex, and existing temperature compensation methods are difficult to achieve high-precision compensation, which affects the accuracy of rapeseed oil quality testing.
A stepwise temperature compensation model based on ultrasound diagnostic technology was constructed. By collecting ultrasound data and physicochemical data in the range of 22-32℃, multiple partial least squares or random forest models were established. The models were then iteratively optimized using training and validation sets, and temperature compensation was performed using linear interpolation.
This improves the predictive accuracy and stability of rapeseed oil quality testing, ensuring the accuracy and validity of test data.
Smart Images

Figure CN120044138B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of edible vegetable oil quality analysis technology, 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 Technology
[0002] The ultrasonic pulse echo system, a device specifically designed for testing edible oils, achieves its detection function by receiving and transmitting specific pulse electrical signals. This device exhibits several significant advantages in the field of edible oil testing, including rapid analysis capabilities, enabling the analysis of relevant parameters of edible oils in a short time; non-invasive characteristics, ensuring that the internal structure and properties of the edible oil are not damaged during the testing process, thus preserving its integrity and quality; high sensitivity, accurately detecting minute changes and potential problems in edible oils, effectively improving detection accuracy; and low operating costs. The pulse echo system 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 ultrasonic probes, the metal structure is affected by random changes in ambient temperature. This effect directly or indirectly impacts the sensor, causing changes in the sensor signal's parameter characteristics. Specifically, for every 1°C change in temperature, the ultrasonic velocity changes by approximately 3.1-3.6 m / s. Under laboratory conditions, where the environment is at a constant temperature, ultrasonic technology can be used to measure small-volume samples. However, this measurement approach encounters significant obstacles when performing measurements in industrial environments. Therefore, to ensure the accuracy and effectiveness of measurements, it is necessary to employ appropriate methods to compensate for the effects 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, its production cost is relatively high, facing many limitations in practical engineering applications. Software compensation, on the other hand, has the advantages of high accuracy and low cost, and has become the main form of temperature compensation. It is important to note that the mechanism by which temperature affects acoustic signal detection errors is complex. How to construct a suitable temperature compensation model to achieve high-precision compensation is one of the key issues and also a major challenge in this research field. Summary of the Invention
[0005] The purpose of this 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 changes in ambient temperature affect the acoustic pulse signal when using ultrasonic diagnostic technology to detect the quality of rapeseed oil.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] A method for constructing a stepwise temperature compensation model for the quality detection of thermally oxidized rapeseed oil based on ultrasonic diagnostic technology, characterized by the following steps:
[0008] S1. Under each integer temperature condition within the range of 22-32℃, ultrasonic and physicochemical data of rapeseed oil after thermal oxidation were collected. The ultrasonic data collected at each integer temperature was used as the independent variable X, and the quality index of the physicochemical data collected at each integer temperature was used as the dependent variable Y. The correlation model between X and Y was established using the partial least squares method (PLSR) or the random forest method (RF), resulting in 11 temperature compensation sub-models at different temperatures.
[0009] S2, integrate all temperature compensation sub-models to form a stepwise temperature compensation overall model, and group the ultrasound data and physicochemical data quality indicators at the same integer temperature together, resulting in 11 data packages. Organize the ultrasound data of each sample in these 11 data packages as X, and the physicochemical data quality indicators as Y. Label the samples as (x1, y1), (x2, y2), ..., (x... i y i ), where x i y represents the ultrasound data parameters of the i-th sample. i The physicochemical data quality index represents 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. Finally, the results of all iterations are evaluated.
[0010] S3. Under temperature conditions ranging from 22-32℃, ultrasonic data of thermally oxidized rapeseed oil were randomly collected. The collected ultrasonic data were then input into a sub-model of the actual measured temperature T0 and adjacent integer temperatures. The following linear interpolation method was used to estimate the predicted quality indicators of the samples:
[0011]
[0012] Among them, y i and y j The two sub-models are respectively located at temperature T. i and T j The following are the prediction results;
[0013] The accuracy of the model is verified by comparing the predicted values of the quality indicators with the actual measured values of the quality indicators.
[0014] S4. Under room temperature conditions, ultrasonic data of thermally oxidized rapeseed oil are randomly collected. If the actual measured temperature of the sample is an integer, the collected ultrasonic data is directly input into the corresponding sub-model to obtain the quality index prediction result. If the actual measured temperature of the sample is not an integer, the collected ultrasonic data is input into the sub-model of the integer temperature adjacent to that temperature, and the linear interpolation formula in step S3 above is used to estimate the predicted value of the sample's quality index. The accuracy of the model is verified by comparing the predicted value of the model's quality index with the actual measured value of the quality index.
[0015] As a further preferred embodiment of this technical solution, in step S1, the rapeseed oil is sampled as follows: 600 mL is taken from each of the three rapeseed oil samples and placed into separate containers. The containers are placed in a water bath and heated to 180±2℃ within 30 minutes. The temperature is then maintained and heated continuously for 12 hours. This process is repeated for 7 days to obtain a total of 21 rapeseed oil samples.
[0016] As a further preferred embodiment of this technical solution, an ultrasonic pulse echo system is used to perform ultrasonic testing on the sampled rapeseed oil. The ultrasonic pulse echo system 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 is as follows:
[0017] S101, the accuracy and stability of the ultrasonic pulse echo system were verified by measuring the velocity of sound in distilled water at 26℃;
[0018] S102, use a sieve to filter the rapeseed oil sample, 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 transmitting end of the ultrasonic probe and the thermometer probe into the oil sample to be tested, remove air bubbles around the ultrasonic probe, and ensure that the placement of the thermometer probe does not overlap with the transmission path of the sound wave pulse.
[0021] S105, start the pulse transceiver and oscilloscope. After the oil sample temperature and ultrasonic signal stabilize, use a computer to collect and save 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 plot a line graph with time as the x-axis and amplitude as the y-axis to obtain a time-domain spectrum. Simultaneously, 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 and frequency-domain spectra, including the following ultrasonic data parameters:
[0022] The speed of sound, v, represents the distance an ultrasonic wave travels per unit time, and its calculation formula is:
[0023]
[0024] In the formula, v represents the ultrasonic velocity; t1 and t0 represent the time of the first echo and the time of the initial peak, respectively; L represents the distance the ultrasonic wave travels during this time interval.
[0025] The attenuation coefficient α represents the degree of attenuation of sound waves during propagation, and its calculation formula is as follows:
[0026]
[0027] In the formula, α represents the attenuation coefficient; A1 and A2 are the maximum amplitudes of the first echo and the second echo, respectively, and L is the distance between the two echoes.
[0028] The peak value Af in the frequency domain refers to the maximum amplitude observed within the frequency spectrum.
[0029] Peak frequency Ff represents the frequency corresponding to the peak value of the frequency domain spectrum;
[0030] FFT25, FFT50, and FFT75 represent the minimum frequency values at which the total received energy reaches 25%, 50%, and 75%, respectively.
[0031] As a further preferred embodiment of this technical solution, the required physicochemical data of thermally oxidized rapeseed oil includes acid value. The method for collecting acid value data is as follows: 1 ± 0.0001 g of rapeseed oil sample is fully dissolved in 20 mL of diethyl ether-isopropanol solution; free fatty acids are titrated with KOH solution using phenolphthalein as an indicator; titration is stopped when the color turns light pink, maintained for 30 s, and a blank titration is performed simultaneously.
[0032] The acid value is calculated using the following formula:
[0033]
[0034] In the formula, AV represents the acid value; v and v0 represent the volumes of KOH solutions used for titrating 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.
[0035] As a further preferred embodiment of this technical solution, the required physicochemical data for thermally oxidized rapeseed oil includes iodine value. The method for collecting the iodine value data is as follows: 0.2 ± 0.0001 g of rapeseed oil sample is fully dissolved in 20 mL of cyclohexane-glacial acetic acid solution; 25 mL of Widmanstätten reagent is added, mixed evenly, and then placed in the dark for 1 h; after the reaction is complete, 20 mL of potassium iodide solution and 150 mL of water are added; titration is performed using sodium thiosulfate solution, and after the yellow color of the liquid disappears, 3 drops of starch solution are added, and titration continues until the blue color just disappears, while a blank titration is performed simultaneously.
[0036] Calculate the iodine value using the following formula:
[0037]
[0038] In the formula, IV represents the iodine value; v and v0 represent the volumes of sodium thiosulfate solutions used for titrating 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.
[0039] As a further preferred embodiment of this technical solution, the required physicochemical data of thermally oxidized rapeseed oil includes the content of polar components. The data collection method for the polar component content is as follows: 1 ± 0.0001 g of rapeseed oil sample is dissolved in a mixture of petroleum ether and diethyl ether, and then poured into a silica gel column filled with silica gel. The non-polar fraction is eluted using the mixture of petroleum ether and diethyl ether. Simultaneously, approximately 200 mL of eluent is collected in a dry 500 mL round-bottom flask, and the collected eluent is placed in a rotary evaporator under 60°C water bath conditions for rotary evaporation until nearly dry. The residue is then placed in a vacuum constant temperature drying oven at 40°C for further drying for 20 min. After the container cools, the flask is accurately weighed.
[0040] The content of polar components can be calculated using the following formula:
[0041]
[0042] In the formula, TPC represents the content of polar components; m1 and m2 represent the weights of the blank flask and the flask containing the polar components, respectively; and m represents the weight of the sample.
[0043] As a further preferred embodiment of this technical solution, the required physicochemical data of thermally oxidized rapeseed oil includes fatty acids, and the data acquisition method for fatty acids includes oil sample pretreatment and fatty acid determination.
[0044] The oil sample pretreatment includes the following steps: Take 0.1±0.0001g of rapeseed oil sample after vortexing for 2 minutes and place it in a 10mL test tube; add 2mL of 2% sodium hydroxide methanol solution to the test tube, vortex for 2 minutes, stopper the tube, and let it stand in a water bath at 75±1℃ for 20 minutes; after cooling, add 1mL of 15% boron trifluoride methanol solution, vortex again for 1 minute, stopper the tube, and place it in a water bath at 75±1℃ for 10 minutes; accurately add 2mL of n-heptane. After vortexing for 2 minutes, add 1 mL of saturated sodium chloride aqueous solution, and then let it stand to allow it to separate into layers. Take 1 mL of the upper n-heptane extraction solution and transfer it to a 10 mL test tube. Accurately add 4 mL of n-heptane and about 1 g of anhydrous sodium sulfate. Vortex for 1 minute and let it stand for 5 minutes. Take the upper n-heptane extraction solution and dilute it 10 times with n-heptane as the diluent. Take 1 mL of the diluted solution and filter it through a 0.22 μL hydrophobic membrane. Collect the filtered solution in a sample vial for analysis.
[0045] The fatty acid determination was performed using gas chromatography-mass spectrometry (GC-MS), comprising the following steps: separation was performed using an HP-5 silica capillary column in 20:1 split mode; helium was used as the carrier gas at a flow rate of 1 mL / min, the ion source temperature was 230 °C, the injector temperature was maintained at 250 °C, the column oven temperature was initially maintained at 120 °C for 2 min, then increased to 200 °C at 4 °C / min and held for 2 min, and finally increased to 240 °C at 3 °C / min and held for 2 min; the chromatogram was recorded by monitoring the total ion chromatogram in the m / z range of 40-440; and the content of a given component i was calculated by the percentage of the corresponding peak area to the sum of the peak areas of all components using the following formula:
[0046]
[0047] In the formula, FA i Represents the percentage of a specific fatty acid in the total fatty acids; A Si This represents the sum of the peak areas of each fatty acid methyl ester in the sample; It represents the coefficient by which a certain fatty acid methyl ester is converted into a fatty acid.
[0048] As a further preferred embodiment of this technical solution, in step S1, the collected ultrasound data and physicochemical data are subjected to normality tests and homogeneity of variance tests. For data indicators that conform to a normal distribution and pass the homogeneity of variance test, the significance between groups is tested by analysis of variance, and the Turkey test is used for post-hoc comparisons. For data indicators that do not conform to a normal distribution, a nonparametric test is used for significance analysis, and the Nemenyi test is used for multiple comparisons.
[0049] The collected ultrasound and physicochemical data were standardized, and the calculation formula is as follows:
[0050]
[0051] In the formula, x new x represents the standardized data. i This represents the i-th data. σ represents the mean, and σ represents the standard deviation.
[0052] As a further preferred embodiment of this technical solution, in step S1, variable importance projection is used to evaluate the contribution of each variable to the model. Data indicators with variable importance projection scores greater than or equal to 5 are selected for subsequent model training to enhance the model's generalization ability. The formula for calculating the variable importance projection score is as follows:
[0053]
[0054] In the formula, VIP j For variable importance projection, p is the total number of variables, R is the number of principal components, and w aj d is the weight of variable j on the a-th principal component. a It is the variance explained by the a-th principal component.
[0055] As a further preferred embodiment of this technical solution, in steps S2, S3, and S4, based on the root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²), 2 The performance of the temperature compensation model was evaluated.
[0056] The method based on root mean square error (RMSE) as a measure of model prediction accuracy is as follows:
[0057]
[0058] Among them, y i and These represent the i-th predicted value and the reference value, respectively, and n represents the number of data points;
[0059] The method based on mean absolute error (MAE) as a measure of model prediction accuracy is as follows:
[0060]
[0061] Among them, y i and These represent the i-th predicted value and the reference value, respectively, and n represents the number of data points;
[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 These represent the predicted data and the reference data, respectively. This represents the average value of the reference data.
[0065] Compared with the prior art, the beneficial effects of the present invention are:
[0066] This invention establishes a temperature compensation model for ultrasonic testing of thermally oxidized rapeseed oil based on a stepwise temperature compensation method. It uses each integer temperature within the 22-32℃ range and its corresponding acquired ultrasonic data parameters, combined with the physicochemical data parameters acquired at that temperature, to establish multiple partial least squares (PLSR) or random forest (RF) models. By constructing multiple sub-models, the predictive relevance and accuracy of the temperature compensation model are improved. Furthermore, this invention introduces training sets, internal validation sets, and external validation sets to perform multiple validation evaluations of the model, and optimizes the model multiple times to ensure its predictive performance and stability. This ensures that the predicted quality indicators output by the model are closer to the actual quality indicators, guaranteeing the accuracy and validity of the test data. Attached Figure Description
[0067] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention, but do not constitute a limitation thereof. In the drawings:
[0068] Figure 1 This is a schematic diagram illustrating the construction process of the stepwise temperature compensation model in this invention;
[0069] Figure 2 This is a simplified diagram illustrating the construction of the stepwise temperature compensation model in this invention.
[0070] Figure 3 This is a schematic diagram of the ultrasonic pulse echo system device used in this invention;
[0071] Figure 4 This is a schematic diagram of the ultrasonic measurement method steps of the ultrasonic pulse echo system device used in this invention;
[0072] Figure 5 This is a schematic diagram of the time-domain spectrum obtained in one embodiment of the present invention;
[0073] Figure 6 This is a schematic diagram of the frequency domain spectrum obtained in one embodiment of the present invention. Detailed Implementation
[0074] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0075] Example 1
[0076] like Figure 1 and Figure 2 The method for constructing a stepwise temperature compensation model for the quality detection of thermally oxidized rapeseed oil based on ultrasonic diagnostic technology, as shown, is characterized by including the following steps:
[0077] S1. Under each integer temperature condition within the range of 22-32℃, ultrasonic and physicochemical data of rapeseed oil after thermal oxidation were collected. The ultrasonic data collected at each integer temperature was used as the independent variable X, and the quality index of the physicochemical data collected at each integer temperature was used as the dependent variable Y. The correlation model between X and Y was established using the partial least squares method (PLSR) or the random forest method (RF), resulting in 11 temperature compensation sub-models at different temperatures.
[0078] S2, integrate all temperature compensation sub-models to form a stepwise temperature compensation overall model, and group the ultrasound data and physicochemical data quality indicators at the same integer temperature together, resulting in 11 data packages. Organize the ultrasound data of each sample in these 11 data packages as X, and the physicochemical data quality indicators as Y. Label the samples as (x1, y1), (x2, y2), ..., (x... i y i ), where x i y represents the ultrasound data parameters of the i-th sample. i The physicochemical data quality index represents 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. Finally, the results of all iterations are evaluated.
[0079] Since the sample size of this invention is small, the above steps are suitable for using leave-one-out crossover method to evaluate model performance. This method allows each sample to be used as a test set separately, making full use of all the data for training and testing, ensuring the wide applicability of the model, and providing an unbiased model performance estimate.
[0080] S3. Under temperature conditions ranging from 22-32℃, ultrasonic data of thermally oxidized rapeseed oil were randomly collected. The collected ultrasonic data were then input into a sub-model of the actual measured temperature T0 and adjacent integer temperatures. The following linear interpolation method was used to estimate the predicted quality indicators of the samples:
[0081]
[0082] Among them, y i and y j The two sub-models are respectively located at temperature T. i and T j The following are the prediction results;
[0083] The accuracy of the model is verified by comparing the predicted values of the quality indicators with the actual measured values of the quality indicators.
[0084] The above steps involve introducing an internal validation set for internal testing. This is achieved by randomly sampling with replacement from the original sample set, thereby conducting multiple model training and validations. This not only verifies the repeatability of the model but also prevents overfitting and overestimation of the model's performance.
[0085] S4. Under room temperature conditions, ultrasonic data of thermally oxidized rapeseed oil are randomly collected. If the actual measured temperature of the sample is an integer, the collected ultrasonic data is directly input into the corresponding sub-model to obtain the quality index prediction result. If the actual measured temperature of the sample is not an integer, the collected ultrasonic data is input into the sub-model of the integer temperature adjacent to that temperature, and the linear interpolation formula in step S3 above is used to estimate the predicted value of the sample's quality index. The accuracy of the model is verified by comparing the predicted value of the model's quality index with the actual measured value of the quality index.
[0086] The above steps involve introducing an external validation set for external testing. This set is used to evaluate the model's performance and robustness when faced with unknown data by making predictions on data different from the original sample set. It also checks whether the model is overfitting the training data, which helps to verify the model's robustness and credibility.
[0087] More specifically, in step S1, the rapeseed oil is sampled as follows: 600 mL is taken from each of the three rapeseed oil samples and placed into separate containers. The containers are then placed in a water bath and heated to 180±2℃ within 30 minutes, followed by continuous heating at a constant temperature for 12 hours. This heating process is repeated for 7 days, resulting in a total of 21 rapeseed oil samples. It should be noted that after each day's heating, the oil temperature needs to be allowed to cool naturally to room temperature. Furthermore, before measuring the ultrasonic and physicochemical data of the rapeseed oil samples, the collected rapeseed oil samples need to be stored in a -4℃ environment protected from light.
[0088] In this embodiment, an ultrasonic pulse-echo system is used to perform ultrasonic testing on the sampled rapeseed oil. Figure 3 As shown, the ultrasonic pulse echo system 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 existing technology, it will not be described in detail here. The ultrasonic measurement method of the ultrasonic pulse echo system is as follows:
[0089] S101, the accuracy and stability of the ultrasonic pulse echo system were verified by measuring the velocity of sound in distilled water at 26℃;
[0090] S102, use a sieve to filter the rapeseed oil sample, 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 tested, remove air bubbles around the ultrasonic probe, and ensure that the placement of the thermometer probe does not overlap with the transmission path of the sound wave pulse.
[0093] S105, start the pulse transceiver and oscilloscope. After the oil sample temperature and ultrasonic signal stabilize, use a computer to collect and save 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 plot a line graph with time as the x-axis and amplitude as the y-axis to obtain a time-domain spectrum. Simultaneously, 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 and frequency-domain spectra, including the following ultrasonic data parameters:
[0094] The speed of sound, v, represents the distance an ultrasonic wave travels per unit time, and its calculation formula is:
[0095]
[0096] In the formula, v represents the ultrasonic velocity; t1 and t0 represent the time of the first echo and the time of the initial peak, respectively; L represents the distance the ultrasonic wave travels during this time interval.
[0097] The attenuation coefficient α represents the degree of attenuation of sound waves during propagation, and its calculation formula is as follows:
[0098]
[0099] In the formula, α represents the attenuation coefficient; A1 and A2 are the maximum amplitudes of the first echo and the second echo, respectively, and L is the distance between the two echoes.
[0100] The peak value Af in the frequency domain refers to the maximum amplitude observed within the frequency spectrum.
[0101] Peak frequency Ff represents the frequency corresponding to the peak value of the frequency domain spectrum;
[0102] FFT25, FFT50, and FFT75 represent the minimum frequency values at which the total received energy reaches 25%, 50%, and 75%, respectively.
[0103] In this embodiment, the physicochemical data of the thermally oxidized rapeseed oil to be collected in step S1 include acid value, iodine value, polar component content, and fatty acids.
[0104] Specifically, the method for collecting acid value data is as follows: 1 ± 0.0001 g of rapeseed oil sample is fully dissolved in 20 mL of diethyl ether-isopropanol solution; free fatty acids are titrated with KOH solution using phenolphthalein as an indicator; titration is stopped when the color turns light pink, and maintained for 30 s, while a blank titration is performed simultaneously;
[0105] The acid value is calculated using the following formula:
[0106]
[0107] In the formula, AV represents the acid value; v and v0 represent the volumes of KOH solutions used for titrating 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.
[0108] The data acquisition method for the iodine value is as follows: 0.2 ± 0.0001 g of rapeseed oil sample is fully dissolved in 20 mL of cyclohexane-glacial acetic acid solution; 25 mL of Widmanstätten reagent is added, mixed evenly, and placed in the dark for 1 h; after the reaction is completed, 20 mL of potassium iodide solution and 150 mL of water are added; titration is performed using sodium thiosulfate solution, and after the yellow color of the liquid disappears, 3 drops of starch solution are added, and titration is continued until the blue color just disappears, while a blank titration is performed at the same time;
[0109] Calculate the iodine value using the following formula:
[0110]
[0111] In the formula, IV represents the iodine value; v and v0 represent the volumes of sodium thiosulfate solutions used for titrating 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.
[0112] The data acquisition method for the polar component content is as follows: 1 ± 0.0001 g of rapeseed oil sample is dissolved in a mixture of petroleum ether and diethyl ether, and then poured into a silica gel column filled with silica gel. The non-polar fraction is eluted using the mixture of petroleum ether and diethyl ether. At the same time, about 200 mL of eluent is collected in a dry 500 mL round-bottom flask, and the collected eluent is placed in a rotary evaporator under a 60 °C water bath to be nearly dry. The residue is then placed in a vacuum constant temperature drying oven at 40 °C for 20 min for further drying. After the container cools, the flask is accurately weighed.
[0113] The content of polar components can be calculated using the following formula:
[0114]
[0115] In the formula, TPC represents the content of polar components; m1 and m2 represent the weights of the blank flask and the flask containing the polar components, respectively; and m represents the weight of the sample.
[0116] The data acquisition method for fatty acids includes oil sample pretreatment and fatty acid determination;
[0117] The oil sample pretreatment includes the following steps: Take 0.1±0.0001g of rapeseed oil sample after vortexing for 2 minutes and place it in a 10mL test tube; add 2mL of 2% sodium hydroxide methanol solution to the test tube, vortex for 2 minutes, stopper the tube, and let it stand in a water bath at 75±1℃ for 20 minutes; after cooling, add 1mL of 15% boron trifluoride methanol solution, vortex again for 1 minute, stopper the tube, and place it in a water bath at 75±1℃ for 10 minutes; accurately add 2mL of n-heptane. After vortexing for 2 minutes, add 1 mL of saturated sodium chloride aqueous solution, and then let it stand to allow it to separate into layers. Take 1 mL of the upper n-heptane extraction solution and transfer it to a 10 mL test tube. Accurately add 4 mL of n-heptane and about 1 g of anhydrous sodium sulfate. Vortex for 1 minute and let it stand for 5 minutes. Take the upper n-heptane extraction solution and dilute it 10 times with n-heptane as the diluent. Take 1 mL of the diluted solution and filter it through a 0.22 μL hydrophobic membrane. Collect the filtered solution in a sample vial for analysis.
[0118] The fatty acid determination was performed using a PerkinElmer Clarus SQ8 gas chromatography-mass spectrometry system, including the following steps: separation was performed using an HP-5 silica capillary column in 20:1 split mode; helium was used as the carrier gas at a flow rate of 1 mL / min, the ion source temperature was 230 °C, the injector temperature was maintained at 250 °C, the column oven temperature was initially maintained at 120 °C for 2 min, then increased to 200 °C at 4 °C / min and held for 2 min, and finally increased to 240 °C at 3 °C / min and held for 2 min; the chromatogram was recorded by monitoring the total ion chromatogram in the m / z range of 40-440; and the content of a given component i was calculated by the percentage of the corresponding peak area to the sum of the peak areas of all components using the following formula:
[0119]
[0120] In the formula, FA i Represents the percentage of a specific fatty acid in the total fatty acids; A Si This represents the sum of the peak areas of each fatty acid methyl ester in the sample; It represents the coefficient by which a certain fatty acid methyl ester is converted into a fatty acid.
[0121] It should be noted that, for those skilled in the art, it is also possible to appropriately increase the measurement of other physicochemical data of thermally oxidized rapeseed oil in order to further improve and optimize the established temperature compensation model, such as viscosity and density.
[0122] Specifically, the viscosity of rapeseed oil was determined using a digital viscometer. The specific measurement method included the following steps: 110 mL of rapeseed oil sample was slowly poured into a round, flat-bottomed container with a diameter of approximately 60 mm. The rotor provided with the container was taken, and the rotor speed was adjusted to 30 rpm / min. Then, the rotor was slowly screwed into the instrument in a counterclockwise direction. The lifting block was operated to rotate the rotor so that it could slowly immerse the oil sample to be tested until the groove scale line on the rotor was at the same level as the oil sample. The instrument's levelness was then recalibrated, and the viscosity of the oil sample was measured. This test operation was repeated three times for each oil sample.
[0123] The density of rapeseed oil samples was determined using a liquid density meter. The specific measurement method included the following steps: The measurement temperature was controlled at approximately 25℃. First, the hook was placed at the center of the density meter, and the reading was zeroed after stabilization. A glass weight was then attached to the center of the density meter using the hook, and the measurement button was pressed after the weight stabilized. At least 50 mL of rapeseed oil sample was slowly poured into a glass beaker, and the glass weight was again attached to the center of the density meter. Air bubbles around the glass weight were removed, ensuring the oil sample completely submerged the weight and that the weight did not contact the inner wall of the beaker. The measurement button was then pressed to start the measurement program, and the density value displayed on the density meter was recorded. This measurement was repeated three times.
[0124] Furthermore, in step S1, the acquired ultrasound data and physicochemical data are subjected to normality tests and homogeneity of variance tests. For data indicators that conform to a normal distribution and pass the homogeneity of variance test, the significance between groups is tested by analysis of variance, and the Turkey test is used for post-hoc comparisons. For data indicators that do not conform to a normal distribution, a nonparametric test is used for significance analysis, and the Nemenyi test is used for multiple comparisons.
[0125] The acquired ultrasound and physicochemical data were standardized, and the calculation formula is as follows:
[0126]
[0127] In the formula, x new x represents the standardized data. i This represents the i-th data. σ represents the mean, and σ represents the standard deviation.
[0128] Furthermore, in step S1, variable importance projection is used to evaluate the contribution of each variable to the model. Data indicators with variable importance projection scores greater than or equal to 5 are selected for subsequent model training to enhance the model's generalization ability. The formula for calculating the variable importance projection score is as follows:
[0129]
[0130] In the formula, VIP j For variable importance projection, p is the total number of variables, R is the number of principal components, and w aj d is the weight of variable j on the a-th principal component. a It is the variance explained by the a-th principal component.
[0131] Furthermore, in steps S2, S3, and S4, based on the root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R²), 2 The performance of the temperature compensation model was evaluated.
[0132] The method based on root mean square error (RMSE) as a measure of model prediction accuracy is as follows:
[0133]
[0134] Among them, y i and These represent the i-th predicted value and the reference value, respectively, and n represents the number of data points;
[0135] The method based on mean absolute error (MAE) as a measure of model prediction accuracy is as follows:
[0136]
[0137] Among them, y i and These represent the i-th predicted value and the reference value, respectively, and n represents the number of data points;
[0138] Based on the coefficient of determination R 2 The method for evaluating the accuracy of the model is as follows:
[0139]
[0140] Among them, Y p and Y a These represent the predicted data and the reference data, respectively. This represents the average value of the reference data.
[0141] After evaluation, the predictive performance of the model can be visually assessed by plotting a comparison chart of the predicted and actual values. If the predictive performance of the model is not satisfactory, it can be optimized by adjusting the number of principal components, reselecting variables, or performing further preprocessing of the data.
[0142] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended 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 make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for constructing a stepwise temperature compensation model for the quality detection of thermally oxidized rapeseed oil based on ultrasonic diagnostic technology, characterized in that, Includes the following steps: S1. Under each integer temperature condition within the range of 22-32℃, ultrasonic and physicochemical data of rapeseed oil after thermal oxidation were collected. The ultrasonic data collected at each integer temperature was used as the independent variable X, and the quality index of the physicochemical data collected at each integer temperature was used as the dependent variable Y. The correlation model between X and Y was established using the partial least squares method (PLSR) or the random forest method (RF), resulting in 11 temperature compensation sub-models at different temperatures. S2, integrate all temperature compensation sub-models to form a stepwise temperature compensation overall model, and group the ultrasound data and physicochemical data quality indicators at the same integer temperature together, resulting in 11 data packages. Organize the ultrasound data of each sample in the 11 data packages as X, and the physicochemical data quality indicators as Y. Label the samples as (x1, y1), (x2, y2), ..., (x... i y i ), where x i y represents the ultrasound data parameters of the i-th sample. i The physicochemical data quality index represents 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. Finally, the results of all iterations are evaluated. S3. Under temperature conditions ranging from 22-32℃, ultrasonic data of thermally oxidized rapeseed oil were randomly collected. The collected ultrasonic data were then input into a sub-model of integer temperatures adjacent to the actual measured temperature T0. The following linear interpolation method was used to estimate the predicted values of the sample's quality indicators: ; Among them, T i and T j These are the integer temperatures adjacent to the actual measured temperature T0, y i and y j The two sub-models are respectively located at temperature T. i and T j The following are the prediction results; The accuracy of the model is verified by comparing the predicted values of the quality indicators with the actual measured values of the quality indicators. S4. Under room temperature conditions, ultrasonic data of thermally oxidized rapeseed oil are randomly collected. If the actual measured temperature of the sample is an integer, the collected ultrasonic data is directly input into the corresponding sub-model to obtain the quality index prediction result. If the actual measured temperature of the sample is not an integer, the collected ultrasonic data is input into the sub-model of the integer temperature adjacent to that temperature, and the linear interpolation formula in step S3 above is used to estimate the predicted value of the sample's quality index. The accuracy of the model is verified by comparing the predicted value of the model's quality index with the actual measured value of the quality index.
2. The method for constructing a stepwise 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 into separate containers. The containers are placed in a water bath and heated to 180±2℃ within 30 minutes. The temperature is then maintained and heated continuously for 12 hours. This process is repeated for 7 days, resulting in a total of 21 rapeseed oil samples.
3. The method for constructing a stepwise temperature compensation model according to claim 2, characterized in that, An ultrasonic pulse echo system was used to perform ultrasonic testing on the collected rapeseed oil samples. The ultrasonic pulse echo system included 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 was as follows: S101, the accuracy and stability of the ultrasonic pulse echo system were verified by measuring the velocity of sound in distilled water at 26℃; S102, use a sieve to filter the rapeseed oil sample, and then slowly pour the oil sample into the sample container; S103, place the sample stage in the water bath to ensure that the temperature remains constant and controllable during the measurement process; S104. Immerse the signal transmitting end of the ultrasonic probe and the thermometer probe into the oil sample to be tested, remove air bubbles around the ultrasonic probe, and ensure that the placement of the thermometer probe does not overlap with the transmission path of the sound wave pulse. S105, start the pulse transceiver and oscilloscope. After the oil sample temperature and ultrasonic signal stabilize, use a computer to collect and save 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 plot a line graph with time as the x-axis and amplitude as the y-axis to obtain a time-domain spectrum. Simultaneously, 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 and frequency-domain spectra, including the following ultrasonic data parameters: The speed of sound, v, represents the distance an ultrasonic wave travels per unit time, and its calculation formula is: ; In the formula, v represents the ultrasonic velocity; t1 and t0 represent the time of the first echo and the time of the initial peak, respectively; L represents the distance the ultrasonic wave travels during this time interval. The attenuation coefficient α represents the degree of attenuation of sound waves during propagation, and its calculation formula is as follows: ; In the formula, α represents the attenuation coefficient; A1 and A2 are the maximum amplitudes of the first echo and the second echo, respectively, and L is the distance between the two echoes. The peak value Af in the frequency domain refers to the maximum amplitude observed within the frequency spectrum. Peak frequency Ff represents the frequency corresponding to the peak value of the frequency domain spectrum; FFT25, FFT50, and FFT75 represent the minimum frequency values at which the total received energy reaches 25%, 50%, and 75%, respectively.
4. The method for constructing a stepwise temperature compensation model according to claim 2, characterized in that, The required physicochemical data for thermally oxidized rapeseed oil include acid value. The method for collecting acid value data is as follows: fully dissolve 1 ± 0.0001 g of rapeseed oil sample in 20 mL of diethyl ether-isopropanol solution. Free fatty acids were titrated with KOH solution using phenolphthalein as an indicator; titration was stopped when the color turned light pink, and maintained for 30 seconds, while a blank titration was performed simultaneously. The acid value is calculated using the following formula: ; In the formula, AV represents the acid value; v and v0 represent the volumes of KOH solutions used for titrating 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 stepwise temperature compensation model according to claim 2, characterized in that, The required physicochemical data for thermally oxidized rapeseed oil include iodine value. The method for collecting the iodine value data is as follows: 0.2 ± 0.0001 g of rapeseed oil sample is fully dissolved in 20 mL of cyclohexane-glacial acetic acid solution; 25 mL of Widmanstätten reagent is added, mixed thoroughly, and placed in the dark for 1 h; after the reaction is complete, 20 mL of potassium iodide solution and 150 mL of water are added; titration is performed using sodium thiosulfate solution, and after the yellow color of the liquid disappears, 3 drops of starch solution are added, and titration continues until the blue color just disappears, while a blank titration is performed simultaneously. Calculate the iodine value using the following formula: ; In the formula, IV represents the iodine value; v and v0 represent the volumes of sodium thiosulfate solutions used for titrating 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 stepwise temperature compensation model according to claim 2, characterized in that, The required physicochemical data for thermally oxidized rapeseed oil include the content of polar components. The data collection method for the polar component content is as follows: 1 ± 0.0001 g of rapeseed oil sample is dissolved in a mixture of petroleum ether and diethyl ether, and then poured into a silica gel column filled with silica gel. The non-polar fraction is eluted using the mixture of petroleum ether and diethyl ether. Simultaneously, approximately 200 mL of eluent is collected in a dry 500 mL round-bottom flask, and the collected eluent is placed in a rotary evaporator at 60 °C for rotary evaporation until nearly dry. The residue is then placed in a vacuum constant-temperature drying oven at 40 °C for further drying for 20 min. After the container cools, the flask is accurately weighed. The content of polar components can be calculated using the following formula: ; In the formula, TPC represents the content of polar components; m1 and m2 represent the weights of the blank flask and the flask containing the polar components, respectively. m represents the weight of the sample.
7. The method for constructing a stepwise temperature compensation model according to claim 2, characterized in that, The required physicochemical data of thermally oxidized rapeseed oil include fatty acids, and the data acquisition methods for fatty acids include oil sample pretreatment and fatty acid determination. The oil sample pretreatment includes the following steps: Take 0.1±0.0001g of rapeseed oil sample after vortexing for 2min and place it in a 10mL test tube; add 2mL of 2% sodium hydroxide methanol solution to the test tube, vortex for 2min, stopper the tube, and let it stand in a water bath at 75±1℃ for 20min; after cooling, add 1mL of 15% boron trifluoride methanol solution, vortex again for 1min, stopper the tube, and place it in a water bath at 75±1℃ for 10min; accurately add 2mL of n-heptane. After vortexing for 2 minutes, add 1 mL of saturated sodium chloride aqueous solution, and then let it stand to allow it to separate into layers. Take 1 mL of the upper n-heptane extraction solution and transfer it to a 10 mL test tube. Accurately add 4 mL of n-heptane and about 1 g of anhydrous sodium sulfate. Vortex for 1 minute and let it stand for 5 minutes. Take the upper n-heptane extraction solution and dilute it 10 times with n-heptane as the diluent. Take 1 mL of the diluted solution and filter it through a 0.22 μL hydrophobic membrane. Collect the filtered solution in a sample vial for analysis. The fatty acid determination was performed using gas chromatography-mass spectrometry (GC-MS), comprising the following steps: separation was performed using an HP-5 silica capillary column in 20:1 split mode; helium was used as the carrier gas at a flow rate of 1 mL / min, the ion source temperature was 230 °C, the injector temperature was maintained at 250 °C, the column oven temperature was initially maintained at 120 °C for 2 min, then increased to 200 °C at 4 °C / min and held for 2 min, and finally increased to 240 °C at 3 °C / min and held for 2 min; the chromatogram was recorded by monitoring the total ion chromatogram in the m / z range of 40–440; and the content of a given component i was calculated by the percentage of the corresponding peak area to the sum of the peak areas of all components using the following formula: ; In the formula, It represents the percentage of a specific fatty acid in the total fatty acids; This represents the sum of the peak areas of each fatty acid methyl ester in the sample; It represents the coefficient by which a certain fatty acid methyl ester is converted into a fatty acid.
8. The method for constructing a stepwise temperature compensation model according to claim 1, characterized in that, In step S1, the acquired ultrasound data and physicochemical data are subjected to normality test and homogeneity of variance test. For data indicators that conform to normal distribution and pass the homogeneity of variance test, the significance between groups is tested by analysis of variance, and the Turkey test is used for post-hoc comparison. For data indicators that do not conform to a normal distribution, nonparametric tests are used for significance analysis, and the Nemenyi test is used for multiple comparisons. The acquired ultrasound and physicochemical data were standardized, and the calculation formula is as follows: ; In the formula, This represents the standardized data. This represents the i-th data. σ represents the mean, and σ represents the standard deviation.
9. The method for constructing a stepwise 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 formula for calculating the variable importance projection score is as follows: ; In the formula, Projecting the importance of variables, It is the total number of variables. It is the number of principal components. It is a variable In the The weights of each principal component It is the first Explained variance of each principal component.
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