A method for identifying lubricating oil oxidation products with adaptive baseline correction
Patent Information
- Application Number
- CN202610921036.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-25
- Publication Date
- 2026-10-20
AI Technical Summary
[0004]为了弥补以上不足,本发明提供了一种自适应基线校正的润滑油氧化产物识别方法,旨在改善现有红外光谱识别方法难以根据不同胶质累积程度调整基线拟合强度和屏蔽区域的问题
1、本发明中,通过根据背景抬升量确定胶质级别和惩罚系数,并结合胶质级别动态确定吸收区域掩膜,从而减少胶质、碳烟和宽峰重叠对基线拟合的干扰,提高氧化产物特征峰识别的稳定性。
Smart Images

Figure FT_1
Abstract
Description
Technical Field
[0001] This invention relates to the field of lubricating oil testing technology, and in particular to an adaptive baseline correction method for identifying lubricating oil oxidation products. Background Technology
[0002] During long-term service, lubricating oil is affected by factors such as high temperature, oxygen, metal abrasive particles and combustion byproducts, which gradually generate oxidation and deterioration products such as carbonyl compounds, gums and soot. These products will form characteristic absorption peaks in the infrared spectrum, and will also cause spectral background rise and baseline drift. Therefore, it is necessary to identify and quantitatively evaluate the oxidation products of lubricating oil through infrared spectroscopy analysis.
[0003] Existing infrared spectroscopy identification methods mostly use baseline correction with fixed parameters or fixed absorption ranges for peak identification. It is difficult to adjust the baseline fitting strength and shielding area according to different degrees of gum accumulation. When the lubricating oil is deeply degraded and the broad peaks overlap significantly, problems such as baseline overfitting or unstable characteristic peak extraction are likely to occur. Summary of the Invention
[0004] To overcome the above shortcomings, this invention provides an adaptive baseline correction method for identifying lubricating oil oxidation products, aiming to improve the problem that existing infrared spectroscopy identification methods are difficult to adjust the baseline fitting intensity and shielding area according to different degrees of gum accumulation.
[0005] This invention provides the following technical solution: an adaptive baseline correction method for identifying lubricating oil oxidation products, comprising the following steps: S1. Obtain the infrared spectrum, calculate the difference between the average absorbance of the infrared spectrum within a preset window and the preset reference absorbance to generate the background rise amount, and determine the gel level and penalty coefficient based on the preset numerical range of the background rise amount. S2. Determine the absorption region mask based on the colloidal level, input the absorption region mask and the penalty coefficient into the asymmetric penalized least squares model to fit the infrared spectrum to generate a spectral baseline, and subtract the spectral baseline from the infrared spectrum to generate a corrected spectrum. S3. Perform second-derivative filtering on the corrected spectrum to generate a second-derivative spectrum, and extract the abscissa of the minimum point of the second-derivative spectrum in the preset carbonyl region to generate an initial peak position list. S4. Using the initial peak position list as a constraint condition for the Voigt function, perform multi-peak fitting on the corrected spectrum to generate a fitting curve, extract the peak area, peak position and full width at half maximum of the fitting curve to construct a peak feature vector, and calculate the fitting residual between the corrected spectrum and the fitting curve. S5. Determine the target degradation stage based on the gel grade and the peak area in the peak feature vector, and input the peak feature vector and the background rise into the partial least squares regression model corresponding to the target degradation stage to generate an initial predicted value. S6. Extract the gel compensation coefficient corresponding to the gel level, add the product of the gel compensation coefficient and the background rise to the initial prediction value to generate the final prediction value, calculate the confidence level based on the fitting residual and output it along with the final prediction value.
[0006] Preferably, in S1, the step of calculating the difference between the average absorbance of the infrared spectrum within a preset window and a preset reference absorbance to generate a background rise, and determining the gel level and penalty coefficient based on a preset numerical range of the background rise, specifically includes the following steps: The arithmetic mean of the absorbance of all data points in the infrared spectrum within the preset window is calculated to generate the average absorbance. The difference between the average absorbance and the preset reference absorbance is calculated to generate the background lift. The background elevation amount is matched with a preset threshold sequence to extract the corresponding preset value interval, and the integer identifier corresponding to the preset value interval is used to generate the gel level. Extract the preset base penalty coefficient and preset amplification factor corresponding to the gel level, calculate the product of the preset amplification factor and the background lift to generate an amplification term, and add the preset base penalty coefficient to the amplification term to generate a penalty coefficient.
[0007] Preferably, in step S2, determining the absorption region mask based on the colloidal level specifically includes the following steps: Extract a preset interval mapping table, which contains the correspondence between preset integer identifiers and preset wavenumber intervals; The gel grade is queried and matched in the preset interval mapping table to extract the target wavenumber interval corresponding to the gel grade; Extract the abscissa of all data points in the infrared spectrum, and extract the data points whose abscissas are contained within the target wavenumber interval to generate mask data points; Extract the position index of the mask data points in the infrared spectrum, and stitch all the position indices together to generate an absorption region mask.
[0008] Preferably, in S2, the step of inputting the absorption region mask and the penalty coefficient into an asymmetric penalized least squares model to fit the infrared spectrum and generate a spectral baseline specifically includes the following steps: Initialize the data point weights of the infrared spectrum to generate an initial weight vector, and fit the infrared spectrum based on the initial weight vector to generate an initial spectral baseline; Calculate the difference between the infrared spectrum and the initial spectral baseline to generate a residual vector; The initial weight vector is updated to generate an iterative weight vector based on the preset asymmetric parameters and the positive or negative sign of the residual vector; Set the values at the corresponding positions of the absorption region mask in the iterative weight vector to zero to generate a mask weight vector, and convert the mask weight vector into a diagonal matrix to generate a diagonal weight matrix; The diagonal weight matrix, the penalty coefficient, and the preset second-order difference matrix are substituted into a preset system of linear equations to generate an updated spectral baseline. Calculate the difference norm between the updated spectral baseline and the initial spectral baseline. When the difference norm is greater than a preset convergence threshold, return the updated spectral baseline as the initial spectral baseline to execute the step of calculating the difference between the infrared spectrum and the initial spectral baseline to generate a residual vector. When the difference norm is not greater than the preset convergence threshold, the updated spectral baseline is extracted as the spectral baseline.
[0009] Preferably, in step S3, the step of extracting the abscissas of the minimum points of the second derivative spectrum within a preset carbonyl region to generate an initial peak list specifically includes the following steps: Candidate minimum points are generated by extracting data points whose ordinates are smaller than those of adjacent data points within the preset carbonyl region based on the second derivative spectrum. The difference between the maximum and minimum ordinates of the second derivative spectrum within the preset carbonyl region is calculated to generate the regional range. The regional range is then multiplied by a preset scaling factor to generate a peak depth threshold. Data points whose absolute ordinate value is less than the peak depth threshold are removed from the candidate minimum points to generate valid minimum points; Calculate the difference in the abscissa of adjacent data points in the effective minimum point. When the difference in the abscissa is less than the preset peak spacing threshold, remove the data points with smaller absolute values of the ordinate to generate the target minimum point. Extract the x-coordinates of the target minimum points to generate an initial peak list.
[0010] Preferably, in step S4, calculating the fitting residual between the corrected spectrum and the fitted curve specifically includes the following steps: Extract the absorbance of the corrected spectrum in the preset carbonyl region and the absorbance at the corresponding abscissa position of the fitted curve, and calculate the difference between the absorbance of the corrected spectrum and the absorbance of the fitted curve to generate a residual sequence; Calculate the sum of squares of each element in the residual sequence to generate the residual sum of squares; The mean square error is generated by calculating the ratio of the sum of squared residuals to the number of elements in the residual sequence. The square root operation is performed on the mean square error to extract the numerical value as the fitting residual.
[0011] Preferably, in step S5, the step of inputting the peak feature vector and the background rise into the partial least squares regression model corresponding to the target degradation stage to generate the initial predicted value specifically includes the following steps: The background lift is used as a numerical element and concatenated to the end of the peak feature vector to generate a joint feature vector; Extract the regression coefficient vector and intercept constant from the partial least squares regression model corresponding to the target degradation stage; Calculate the inner product of the joint feature vector and the regression coefficient vector to generate the basic regression prediction value; The initial prediction value is generated by adding the intercept constant to the regression prediction base value.
[0012] Preferably, in step S6, the step of calculating the confidence level based on the fitted residual and outputting it along with the final predicted value specifically includes the following steps: The ratio of the fitted residual to the preset benchmark residual is calculated to generate a normalized residual; The negative of the normalized residual is calculated to generate a negative exponential term; Using the natural constant as the base, the negative exponent term is used as the exponent to generate the confidence level through exponentiation. The confidence level is compared with a preset range to extract the corresponding character identifier and generate a confidence level status label. The confidence level, the confidence level state label, and the final predicted value are concatenated to generate an output dataset, which is then merged and output.
[0013] The present invention has the following beneficial effects: 1. In this invention, the colloid level and penalty coefficient are determined based on the background elevation, and the absorption region mask is dynamically determined in combination with the colloid level, thereby reducing the interference of colloids, soot and broad peak overlap on baseline fitting and improving the stability of characteristic peak identification of oxidation products.
[0014] 2. In this invention, by performing second derivative screening on the calibrated spectrum and constraining the Voith multi-peak fitting with an initial peak position list, peak shape features such as peak area, peak position, and full width at half maximum (FWHM) are extracted, thereby improving the resolution of overlapping carbonyl absorption peaks.
[0015] 3. In this invention, the peak feature vector and the background rise are input into the partial least squares regression model corresponding to the target deterioration stage, and the confidence level is calculated by combining gum compensation and fitting residuals, thereby outputting acid value prediction results and reliability prompts, which facilitates the assessment of lubricating oil deterioration status. Attached Figure Description
[0016] Figure 1This is a flowchart of an adaptive baseline correction method for identifying lubricating oil oxidation products proposed in this invention. Detailed Implementation
[0017] The technical solutions in 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.
[0018] This invention provides an adaptive baseline-corrected method for identifying lubricating oil oxidation products, such as... Figure 1 As shown, it includes the following steps: S1. Obtain the infrared spectrum, calculate the difference between the average absorbance of the infrared spectrum within the preset window and the preset reference absorbance to generate the background rise amount, and determine the gel grade and penalty coefficient based on the preset value range of the background rise amount. Further, in S1, the difference between the average absorbance of the infrared spectrum within a preset window and the preset reference absorbance is calculated to generate the background rise. Based on the preset numerical range of the background rise, the gel level and penalty coefficient are determined, specifically including the following steps: The arithmetic mean of the absorbance of all data points in the infrared spectrum within a preset window is calculated to generate the average absorbance; the difference between the average absorbance and the preset reference absorbance is calculated to generate the background rise; the background rise is matched with a preset threshold sequence to extract the corresponding preset numerical interval, and the integer identifier corresponding to the preset numerical interval is used to generate the gel level; the preset base penalty coefficient and preset amplification factor corresponding to the gel level are extracted, the product of the preset amplification factor and the background rise is calculated to generate the amplification term, and the preset base penalty coefficient is added to the amplification term to generate the penalty coefficient.
[0019] Specifically, the infrared spectrum of the lubricating oil sample to be tested is obtained. A high-frequency, absorption-free wavenumber range in the lubricating oil spectrum that is less susceptible to interference from the characteristic absorption of major oxidation products is selected as a preset window, for example, 3700 cm⁻¹ to 4000 cm⁻¹. The absorbance of all data points within this preset window is extracted, and the arithmetic mean of the absorbance of all data points within the preset window is calculated to generate the average absorbance. The calculation formula is: ;In the formula, This indicates the average absorbance within the preset window. This indicates the total number of infrared spectral data points contained within the preset window. Indicates the first [number] in the preset window The absorbance of each data point. For the same type of brand-new lubricating oil, at least five independent measurements are performed within the same preset window. The arithmetic mean of the multiple measurements is taken as the preset baseline absorbance. The difference between the average absorbance and the preset baseline absorbance is calculated to generate the background rise. The calculation formula is: ;In the formula, Indicates the amount of background lift. This represents the preset baseline absorbance, which is the arithmetic average of the absorbance values obtained by taking multiple independent measurements of the same type of brand-new lubricating oil within the same preset window. Physically, this background rise characterizes the degree of spectral scattering and global baseline drift caused by the accumulation of macromolecular gums and soot particles during the deep oxidation and deterioration process of the lubricating oil.
[0020] The system pre-establishes a preset threshold sequence consisting of multiple incremental numerical nodes. This sequence divides the continuous numerical space into multiple discrete preset numerical intervals. Each interval adopts a left-closed, right-open rule, meaning that when the background rise meets the specified threshold, the threshold is determined by the threshold value. Time belongs to the first The intervals, the last of which is a left-closed unbounded interval. In the formula, Indicates the sequence number of the preset numerical range. and These represent the th values in the preset threshold sequence. The and the first A threshold node value, when belonging to the last interval. The value is positive infinity. The calculated background rise is matched with a preset threshold sequence to determine the specific preset numerical interval it falls into, and the integer identifier bound to that preset numerical interval is used to generate the gel level. For example, the preset threshold sequence contains nodes 0, 0.02, 0.05, and 0.10, corresponding to four preset numerical intervals with integer identifiers of 0, 1, 2, and 3 respectively: the gel level is 0 when the background rise is not less than 0 and less than 0.02, the gel level is 1 when the background rise is not less than 0.02 and less than 0.05, the gel level is 2 when the background rise is not less than 0.05 and less than 0.10, and the gel level is 3 when the background rise is not less than 0.10. The numerical value of the gel level directly indicates the degree of macroscopic deterioration and turbidity of the lubricating oil sample.
[0021] Based on the baseline correction algorithm's requirement for penalty weights, the system maps a specific preset base penalty coefficient and preset amplification factor to each gel level. The preset base penalty coefficient and preset amplification factor corresponding to the current gel level are extracted. The product of the preset amplification factor and the background uplift is calculated to generate an amplification term. The preset base penalty coefficient is then added to the amplification term to generate the penalty coefficient. The calculation formula is as follows: ;In the formula, Indicates the penalty coefficient. This indicates the preset base penalty coefficient corresponding to the current gel grade. This indicates the preset amplification factor corresponding to the current gum grade. The above amplification factors correspond to the following gum grades. and All values are derived from empirical calibration based on experimental data. For example, when the gelatin level is 0... Take 100, Take 500; when the gel grade is 1 Take 500, Take 1000; when the gel grade is 2 Take 1000, Take 2000; when the gel grade is 3 Take 2000, The value is set to 5000. This penalty coefficient serves as the core input parameter for the subsequent asymmetric penalized least squares model, controlling the smoothness and rigidity of the generated spectral baseline. By transforming the global background offset of the lubricating oil spectrum into a quantitative gum assessment index and penalty parameter, computational parameters are provided for subsequent adaptive baseline fitting based on the actual degradation state.
[0022] S2. Determine the absorption region mask based on the colloidal level, input the absorption region mask and penalty coefficient into the asymmetric penalized least squares model to fit the infrared spectrum to generate the spectral baseline, and subtract the spectral baseline from the infrared spectrum to generate the corrected spectrum. Furthermore, in S2, the absorption region mask is determined based on the colloid level, specifically including the following steps: Extract a preset interval mapping table, which contains the correspondence between preset integer identifiers and preset wavenumber intervals; query and match the gel level in the preset interval mapping table to extract the target wavenumber interval corresponding to the gel level; extract the abscissa of all data points in the infrared spectrum, and extract data points whose abscissas are contained within the target wavenumber interval to generate mask data points; extract the position index of the mask data points in the infrared spectrum, and stitch all position indices together to generate an absorption region mask.
[0023] Furthermore, in S2, the absorption region mask and penalty coefficient are input into the asymmetric penalized least squares model to fit the infrared spectrum and generate a spectral baseline, specifically including the following steps: Initialize the data point weights of the infrared spectrum to generate an initial weight vector, and fit the infrared spectrum based on the initial weight vector to generate an initial spectral baseline; Calculate the difference between the infrared spectrum and the initial spectral baseline to generate a residual vector; The initial weight vector is updated to generate an iterative weight vector based on the preset asymmetric parameters and the sign of the residual vector. Set the values at the corresponding positions of the absorption region mask in the iterative weight vector to zero to generate the mask weight vector, and then convert the mask weight vector into a diagonal matrix to generate the diagonal weight matrix. Substitute the diagonal weight matrix, penalty coefficient, and preset second-order difference matrix into a preset system of linear equations to generate an updated spectral baseline; Calculate the difference norm between the updated spectral baseline and the initial spectral baseline. If the difference norm is greater than a preset convergence threshold, return the updated spectral baseline as the initial spectral baseline to execute the step of calculating the difference between the infrared spectrum and the initial spectral baseline to generate the residual vector. When the difference norm is not greater than the preset convergence threshold, the updated spectral baseline is extracted as the spectral baseline.
[0024] Specifically, the gel grade output from the above steps is received. A pre-constructed preset interval mapping table is extracted, which contains the correspondence between preset integer identifiers and preset wavenumber intervals. The preset interval mapping table is constructed as follows: Lubricating oil samples covering different degrees of oxidation degradation are collected, and the infrared spectra of each sample are measured. The degradation degree of each sample is independently characterized by physicochemical analysis methods such as acid value determination and viscosity testing. Using acid value as the main grouping basis, the boundaries of each group are determined according to the principle of equal spacing, and all samples are divided into groups according to the degree of degradation from light to severe. Each group is sequentially bound to an integer identifier. , . The number can be determined based on the actual number of degradation stages. For example, taking 4 corresponds to four stages: new oil, light degradation, moderate degradation, and severe degradation. For the... Each sample in the group , It is a positive integer greater than or equal to 1, and its maximum value is the th. The total number of samples in the group is used to extract their infrared absorbance within a preset initial carbonyl search range. Absorbance is defined as the common logarithm of the ratio of incident light intensity to transmitted light intensity, a dimensionless pure numerical value. This physical property ensures that all subsequent weighting and matrix operations are valid within a dimensionless unified framework. The peak absorbance of the sample within the search range is calculated, and the peak absorbance is compared with a preset proportionality coefficient. The product of these values is used as the threshold for determining the peak range of the sample. The calculation formula is: ; In the formula, Indicates the first Group 1 Peak range determination threshold for each sample This represents the preset scaling factor, with a value between 0 and 1, for example, 0.1. Indicates the first Group 1 Each sample at wavenumber absorbance at that point and These represent the lower and upper wavenumbers of the preset initial search range for carbonyl groups, respectively, for example... Take 1550cm⁻¹, Take 1900cm⁻¹.
[0025] The absorbance of the extracted sample is not less than The minimum and maximum wavenumbers are taken as the peak initiation and peak termination wavenumbers of the sample, respectively. The calculation formula is: ; In the formula, This represents the wavenumber variable that changes continuously within the preset initial search interval for carbonyl groups. Indicates the first Group 1 Peak onset wavenumber of each sample Indicates the first Group 1 Peak termination wavenumber of each sample.
[0026] For the The minimum peak initiation wavenumber and the maximum peak termination wavenumber of all samples within a group are used to generate the target wavenumber interval boundary for that group. The calculation formula is as follows: ; ; In the formula, Indicates the first The lower limit wavenumber of the target wavenumber range. Indicates the first The upper limit of the target wavenumber range. Integer identifier. With the target wavenumber range One-to-one correspondence, for all The above process is repeated for each group, eventually forming a preset interval mapping table covering all gel grades, and the mapping table is stored in the system for subsequent querying.
[0027] As the gum quality increases, the absorption peaks of oxidation products such as carbonyl groups in lubricating oil exhibit significant broadening and overlap. Therefore, different integer identifiers map wavenumber ranges with increasing widths. For example, preset integer identifiers 0, 1, 2, and 3 correspond to wavenumber ranges of 1700 cm⁻¹ to 1730 cm⁻¹, 1680 cm⁻¹ to 1750 cm⁻¹, 1650 cm⁻¹ to 1780 cm⁻¹, and 1600 cm⁻¹ to 1820 cm⁻¹, respectively. The gum quality level is matched against a preset range mapping table to extract the target wavenumber range. The abscissas of all data points in the infrared spectrum are extracted, and data points whose abscissas fall within the target wavenumber range are used to generate mask data points. The position indices of the mask data points in the infrared spectrum are extracted, and all position indices are concatenated in numerical order to generate an absorption region mask. This mask can dynamically lock the characteristic absorption peak regions that need to be shielded based on the actual degree of gum degradation.
[0028] The absorption region mask and the penalty coefficient calculated in the previous step are input into the asymmetric penalized least squares model to fit the infrared spectrum and generate a spectral baseline. The weights of the data points in the infrared spectrum are initialized, with all weight values set to 1 to generate an initial weight vector. This initial weight vector is then constructed as a unit diagonal weight matrix, which, along with the penalty coefficient and a preset second-order difference matrix, is substituted into the subsequent linear equations to generate the initial spectral baseline. The difference between the absorbance of the infrared spectrum and the corresponding value at the initial spectral baseline is calculated to generate a residual vector. The initial weight vector is updated based on preset asymmetric parameters and the sign of the residual vector to generate an iterative weight vector. The logic is as follows: when the difference is greater than zero, it indicates that the data point belongs to the absorption peak region and is assigned a smaller weight; when the difference is not greater than zero, it indicates that the point is close to the floor noise and is assigned a larger weight. The calculation formula is: ;In the formula, Represents the th element in the iterative weight vector. One element, The value ranges from 1 to the total number of infrared spectral data points. , This indicates a preset asymmetric parameter, whose value is usually very close to 0, for example, 0.05. Indicating the first in the infrared spectrum The absorbance of each data point This indicates the spectral baseline of the current iteration. The value at each position.
[0029] The mask weight vector is generated by forcibly setting the values at the corresponding positions of the absorption region mask in the iterative weight vector to zero. This operation physically cuts off the abnormal pull of the broadband overlap region of strong oxidation products on the baseline trend. The main diagonal elements of the mask weight vector are set to their own values, and the remaining positions are set to zero, transforming it into a diagonal matrix to generate a diagonal weight matrix. The diagonal weight matrix, penalty coefficient, and preset second-order difference matrix are substituted into a preset linear equation system to generate an updated spectral baseline. The calculation formula is as follows: ;In the formula, This represents the diagonal weight matrix. This represents the penalty coefficient adaptively determined based on the grade of the gum. This represents a pre-defined second-order difference matrix, constructed based on the index of spectral data points rather than the physical wavenumber. All elements within the matrix are dimensionless constants, ensuring the consistency of physical dimensions when adding the two terms on the left-hand side of the formula. It is constructed by performing a difference operation on the first-order difference matrix again, and is used to perform second-order difference operations on adjacent elements. This represents the transpose of a predefined second-order difference matrix. This represents the updated spectral baseline column vector generated by the solution. The absorbance column vector representing the infrared spectrum, i.e., composed of all A column vector arranged in index order.
[0030] The difference norm between the updated spectral baseline and the initial spectral baseline is calculated, which is equivalent to calculating the square root of the sum of squares of the differences between their corresponding elements. If the difference norm is greater than a preset convergence threshold, the model is considered unstable, and the updated spectral baseline is used as the initial spectral baseline to return to the step of calculating the difference between the infrared spectrum and the initial spectral baseline to generate the residual vector for the next iteration. The preset convergence threshold can be 1×10⁻ 6 When the difference norm is no greater than a preset convergence threshold, the fitting is considered convergent, and an updated spectral baseline is extracted as the spectral baseline. Finally, the absorbance of each data point in the infrared spectrum is subtracted from the value at the corresponding position of the spectral baseline to generate a corrected spectrum. By introducing a dynamic absorption region mask related to the depth of lubricant degradation and adaptive penalty parameters, the baseline overfitting problem caused by the overlap of macromolecular colloids is accurately suppressed, effectively restoring the true spectral characteristics.
[0031] S3. Perform second-derivative filtering on the corrected spectrum to generate a second-derivative spectrum, and extract the abscissa of the minimum point in the second-derivative spectrum within the preset carbonyl region to generate an initial peak position list. Further, in S3, the abscissas of the minimum points of the second derivative spectrum within the preset carbonyl region are extracted to generate an initial peak position list, specifically including the following steps: Candidate minimum points are generated by extracting data points whose ordinates are smaller than those of adjacent data points within the preset carbonyl region of the second derivative spectrum. The difference between the maximum and minimum ordinates of the second derivative spectrum within the preset carbonyl region is calculated to generate the regional range. The regional range is then multiplied by a preset scaling factor to generate the peak depth threshold. Data points whose absolute value of the ordinate is less than the peak depth threshold are removed from the candidate minimum points to generate valid minimum points; Calculate the difference in the x-coordinates of adjacent data points in the effective minimum point. When the difference in the x-coordinates is less than the preset peak spacing threshold, remove the data points with smaller absolute values of the y-coordinates to generate the target minimum point. Extract the x-coordinates of the target minimum points to generate an initial list of peak positions.
[0032] Specifically, the corrected spectrum output from the previous stage is received. To eliminate potential residual baseline drift in the spectrum and highlight the characteristic absorptions of overlapping oxidation products, a discrete second-order difference filter in the form of a second derivative is performed on the entire corrected spectrum to generate a second-order derivative spectrum. In this embodiment, the second-order derivative filtering is implemented using discrete second-order difference operations, which not only sharpens overlapping peaks but also transforms the absorbance maxima in the corrected spectrum into the minima in the second-order derivative spectrum. The infrared spectral data points are arranged in an equally spaced wavenumber sampling or resampling order. The calculation formula is: ;In the formula, The second derivative spectrum represents the spectrum at the 1st... Discrete second-order difference filter values at each data point Indicates the first [number]th ... The x-coordinate of the wavenumber corresponding to each data point This is the index of the entire calibration spectral data point, with a value ranging from 2 to... , This represents the total number of data points in the entire calibrated spectrum. , and These represent the corrected spectra at the 1st, 2nd, and 3rd respectively. The, the The and the first The absorbance at consecutive wavenumber points. For boundary data points located at the beginning and end of the entire calibrated spectrum, i.e. equal to 1 or equal When a boundary data point lacks adjacent data points to its left or right, differential calculations are not performed on it; it is skipped and not included in the subsequent extreme value extraction range. Since the absorbance of the corrected spectrum is a dimensionless pure numerical value, the second derivative filtering value obtained from the discrete difference operation also retains its dimensionless characteristic. A preset carbonyl region is defined, covering the characteristic absorption of the core oxidation product, for example, 1600 cm⁻¹ to 1850 cm⁻¹. Candidate minimum points are generated by extracting data points whose ordinates in the second derivative spectrum within the preset carbonyl region are less than the ordinates of their adjacent data points. The mathematical criteria are as follows: and In this step, adjacent data points are allowed as comparison items. or Located outside the preset carbonyl region, this ensures that data points at the boundary of the preset carbonyl region can obtain complete extremum determination. In the physical meaning of infrared absorption spectroscopy, the abscissa of the minimum point of the second derivative spectrum directly corresponds to the position of the central vibrational frequency of the microscopic chemical group.
[0033] To filter out meaningless spikes and false peaks caused by high-frequency electrical noise in the instrument, a dynamic threshold determination mechanism needs to be established. The difference between the maximum and minimum ordinates of the second derivative spectrum within a preset carbonyl region is calculated to generate the regional range. This regional range is then multiplied by a preset scaling factor to generate the peak depth threshold. The calculation formula is as follows: ;In the formula, Indicates the peak depth threshold. This represents the preset scaling factor, which ranges from 0 to 1, for example, 0.05. Integer index, and These represent the data point index areas corresponding to the preset lower and upper wavenumbers of the carbonyl region, respectively. The second derivative spectrum represents the spectrum at the 1st... The ordinate values at each data point are calculated. All candidate minimum points are iterated over, and the absolute value of the ordinate of each candidate minimum point is extracted. Data points with ordinate absolute values less than the peak depth threshold are removed to generate valid minimum points. This step adaptively determines the noise cutoff baseline based on the overall signal dynamic range within the local frequency band.
[0034] Because the absorption peaks of oxidation products in deeply degraded lubricating oils often exhibit broadening and asymmetry, they are prone to producing closely spaced distorted split secondary peaks near the true peak center during differentiation. Therefore, further spatial span verification is necessary. The effective minimum points are arranged in ascending order of their abscissa values, and the difference in abscissa between adjacent data points within the effective minimum points is calculated. The calculation formula is as follows: ;In the formula, This represents the difference in the x-coordinates of adjacent effective minimum points. This represents the sequence number of the valid minimum points after they are arranged in order. Its value ranges from 1 to the total number of valid minimum points minus 1. The subscript letter E indicates the label of the valid minimum point. and They represent the first The and the first The x-coordinates of each effective minimum point are determined. The difference between these x-coordinates is then checked against a preset peak spacing threshold, determined based on the lower bound of the full width at half maximum (FWHM) of the natural absorption peak obtained from experimental measurements of a known pure oxidation product standard sample (e.g., 8 cm⁻¹). If the difference is less than the threshold, the two effective minimum points are considered to be a distortion splitting phenomenon of the same physical absorption peak. In this case, the absolute values of their ordinates in the second derivative spectrum are compared, and the data point with the smaller absolute value is discarded, while the one with the larger absolute value is retained. After each data point is discarded, the remaining minimum points are rearranged, and the difference between adjacent x-coordinates is recalculated. This process is iterated until the difference between the x-coordinates of any two remaining data points is not less than the preset peak spacing threshold. The final retained data points are then output as target minimum points. Finally, the x-coordinates of all target minimum points are extracted and arranged according to their numerical values to generate an initial peak position list. By employing a discrete derivative transformation and adaptive dual threshold screening mechanism, the center coordinates of absorption peaks of various oxidation products hidden in a broadband overlapping background were located, providing positional constraints for subsequent multi-peak fitting physical models.
[0035] S4. Using the initial peak position list as the constraint condition of the Voigt function, perform multi-peak fitting on the calibration spectrum to generate a fitting curve. Extract the peak area, peak position and full width at half maximum of the fitting curve to construct the peak feature vector, and calculate the fitting residual between the calibration spectrum and the fitting curve. Further, in S4, the fitting residuals between the corrected spectrum and the fitted curve are calculated, specifically including the following steps: Extract the absorbance of the calibration spectrum in the preset carbonyl region and the absorbance of the corresponding abscissa position of the fitted curve, and calculate the difference between the absorbance of the calibration spectrum and the absorbance of the fitted curve to generate a residual sequence. Calculate the sum of squares of each element in the residual sequence to generate the residual sum of squares; The mean square error is generated by calculating the ratio of the sum of squared residuals to the number of elements in the residual sequence. The square root of the mean square error is used to extract the numerical value as the fitting residual.
[0036] Specifically, the system receives the corrected spectrum and initial peak position list output from the previous step. The horizontal axis of each peak in the initial peak position list indicates the candidate center position of the absorption peak of each oxidation product within a preset carbonyl region, serving as the initial peak position constraint value for the Voigt function multi-peak fitting. Let the initial peak position list be: ;In the formula, This represents the initial list of peak positions. Indicates the first peak in the initial peak list An initial peak position. The index represents the initial peak position, and its value ranges from 1 to... , This indicates the total number of peaks included in the initial peak list. Corresponding to the first step in the previous section The x-coordinates of the target minimum points are given in cm⁻¹.
[0037] Absorbance data from the calibration spectrum within a preset carbonyl region are extracted as the fitting object. For the first [unit] within the preset carbonyl region... For each data point, a fitted curve is constructed by superimposing multiple Voigt function components. The calculation formula is: ; In the formula, Indicates the fitted curve at the th The absorbance fitted values at each wavenumber point Indicates the first [unit] in the preset carbonyl region The x-coordinate of the wavenumber corresponding to each data point This indicates the sequence number of the data point within the preset carbonyl region, with a value ranging from 1 to... , This indicates the total number of data points participating in the fitting within the preset carbonyl region. This represents the total number of components of the Voigt function. Indicates the first The peak height parameter of each Voigt function component, whose value corresponds to absorbance. Indicates the first The Voigt function components in the wavenumber The unit peak height Voigt peak shape function at that location, Indicates the first Peak position of each Voigt function component Indicates the first Gaussian broadening parameters for each of the Voigt function components Indicates the first Lorentz broadening parameters for each Voigt function component.
[0038] The Voigt function is used to characterize the composite peak shape of lubricating oil oxidation product absorption peaks, which are simultaneously affected by instrument resolution broadening and molecular vibrational relaxation broadening. In actual calculations, the normalized Voigt function is first calculated, and then divided by the function value at the peak position to obtain the Voigt peak shape function per unit peak height. The calculation formula is: ; ; ; ; In the formula, Represents the normalized Voigt function. This represents a wavenumber variable that changes continuously within a predefined carbonyl region. This represents the convolution integral variable with the dimension of wavenumber. Represents pi (π). Indicates that the center is located at And the Gaussian broadening parameter is Gaussian function, The Lorentz broadening parameter is... The Lorentz function, This represents the natural exponential function. This represents the Voigt peak shape function for a unit peak height. Because... Equals 1, That is to say, the first The absorbance peak height at the peak position of each absorption peak. In actual numerical implementation, The calculation can be performed using the Faddeeva function or by numerical integration over a finite interval; when using numerical integration over a finite interval, the integration interval can be truncated to... to ,in Pick and The larger value in the range is obtained, and numerical solutions are obtained using trapezoidal integrals or Simpson integrals.
[0039] Using the initial peak list as the peak constraint, for each peak... Each Voigt function component sets the peak search range, making the peak position... Around the corresponding initial peak position Perform finite-range optimization. The constraints are: ; ; ; In the formula, This indicates the allowable peak position offset, which can be taken as 5cm⁻¹. Used to limit the peak height of the absorption peak to be non-negative. and This is to ensure that the Voigt function has an effective broadening parameter. The above-mentioned allowable peak shifts and broadening parameter ranges are all based on infrared spectral calibration experiments using known oxidation product standard samples.
[0040] Set initial values for each fitting parameter. Peak position parameters The initial value is taken . No. Peak height parameter The initial value is taken as the correction spectrum. The maximum absorbance within a nearby local window, the local window can be taken as to . No. Gaussian broadening parameter and Lorentz broadening parameters The initial value is taken as the median of the preset broadening interval, for example, 15 cm⁻¹. This initial value allows the nonlinear optimization to converge from near the peak center identified in the previous step.
[0041] By minimizing the sum of squared residuals between the corrected spectrum and the fitted curve within a predetermined carbonyl region, the peak height, peak position, Gaussian broadening parameter, and Lorentz broadening parameter of each Voigt function component are solved. The objective function is: ; In the formula, This indicates that the corrected spectrum is in the preset carbonyl region. absorbance at each wavenumber point This represents the absorbance fit value of the fitted curve at the same wavenumber point. This indicates the total number of data points participating in the fitting within the preset carbonyl region. This represents the set of parameters to be optimized for all Voigt function components. Due to upper and lower bound constraints in this scheme, the solution can be obtained using a trust-region reflection algorithm for bounded nonlinear least squares optimization. After optimization, a fitted curve is obtained formed by the superposition of multiple Voigt function components. The peak area, peak position, and full width at half maximum (FWHM) are extracted for each Voigt function component in the fitted curve. The peak position of each peak is directly taken from the optimized value. Peak areas are uniformly calculated using a discrete summation method to adapt to the discrete sampling data of infrared spectroscopy. The calculation formula is: ;In the formula, Indicates the first The peak area of each absorption peak, expressed in units of absorbance multiplied by cm⁻¹. This represents the sampling interval between adjacent wavenumber points within the preset carbonyl region, in cm⁻¹. If the infrared spectral wavenumber axis has been resampled, then... This represents the fixed wavenumber interval after resampling; the meanings of other symbols are the same as those in the previous text.
[0042] Half-width through the first The wavenumbers are calculated by finding the two wavenumber positions corresponding to half the peak height on both sides of each Voigt function component. First, calculate the... Half peak height: ;In the formula, Indicates the first The half-peak height of the first absorption peak. Then the second... For each Voigt function component, find two adjacent sampling points to the left and right of the peak position, such that the absorbance of the component at these two sampling points spans... And the half-peak height position is determined by linear interpolation. If and For adjacent sampling points, and the corresponding component absorbance and If the condition of crossing half-peak height is met, then the formula for calculating the position of half-peak height is: ;In the formula, This indicates the half-peak height position obtained through linear interpolation. and The x-coordinate of the wavenumber of adjacent sampling points, and They represent the first The components of the Voigt function in and The absorbance at the peak position. After obtaining the half-peak height (FHM) positions on the left and right sides of the peak, respectively, the FHM width is calculated: ;In the formula, Indicates the first The full width at half maximum (FWHM) of each absorption peak Indicates the first The wavenumber of the Voigt function component that reaches half the peak height to the left of the peak. Indicates the first The wavenumber of the Voigt function component reaching half-peak height to the right of the peak position, superscript This indicates the half-peak height position marker, not an exponentiation operation.
[0043] The peak area, peak position, and full width at half maximum (FWHM) of all peaks are arranged in ascending order of peak position to construct a peak eigenvector. The calculation formula is as follows: ; In the formula, Represents the peak eigenvector. , and They represent the first Peak area, peak position, and full width at half maximum (FWHM) of each absorption peak.
[0044] Calculate the fitting residual between the corrected spectrum and the fitted curve. Extract the absorbance of the corrected spectrum within the preset carbonyl region and the absorbance at the corresponding abscissa position of the fitted curve. Calculate the difference between the absorbance of the corrected spectrum and the absorbance of the fitted curve to generate a residual sequence. The calculation formula is: ;In the formula, Represents the nth element in the residual sequence One element, Indicates the corrected spectrum in the 1st... absorbance at each wavenumber point This represents the absorbance fit value of the fitted curve at the same wavenumber point. The sum of squares of each element in the residual sequence is calculated to generate the residual sum of squares. The calculation formula is: ;In the formula, This represents the sum of squared residuals. The mean squared error is generated by calculating the ratio of the sum of squared residuals to the number of elements in the residual sequence. The formula is: ;In the formula, Indicates mean square error. This represents the number of elements in the residual sequence, i.e., the total number of data points participating in the residual calculation within the preset carbonyl region. The square root of the mean square error is used to extract the numerical value as the fitting residual. The calculation formula is: ;In the formula, The residual represents the overall deviation between the multi-peak fitted curve and the corrected spectrum within the preset carbonyl region. Using the initial peak list obtained in the previous step to constrain the Voigt multi-peak fitting, the area, peak position, and full width at half maximum (FWHM) of each oxidation product absorption peak are extracted, and the fitting residual is generated. This provides peak shape characteristics and fitting quality parameters for subsequent degradation stage judgment and prediction value calculation.
[0045] S5. Determine the target deterioration stage based on the gel grade and the peak area in the peak feature vector, and input the peak feature vector and background rise into the partial least squares regression model corresponding to the target deterioration stage to generate the initial predicted value. Furthermore, in S5, the peak feature vector and background elevation are input into the partial least squares regression model corresponding to the target degradation stage to generate initial predicted values, specifically including the following steps: The background lift is used as a numerical element and concatenated to the end of the peak feature vector to generate a joint feature vector; Extract the regression coefficient vector and intercept constant from the partial least squares regression model corresponding to the target degradation stage; Calculate the inner product of the joint eigenvector and the regression coefficient vector to generate the basic value for regression prediction; The initial predicted value is generated by adding the intercept constant to the baseline value of the regression prediction.
[0046] Specifically, it receives the gelatin level generated in the first stage and the peak feature vector generated in the previous stage. To ensure that the dimension of the subsequent input partial least squares regression model is fixed, the peak feature vector needs to undergo dimension unification processing. The system internally includes... A reference peak template for the center coordinates of a standard absorption peak. The peak position can be determined based on the main absorption peak types of lubricating oil oxidation products, for example, using 6. The construction method for the reference peak position template is as follows: Perform the same peak position extraction procedure as in S3 on brand new and standard lubricating oil samples at each stage of degradation. Summarize the peak position values obtained from all samples, cluster them according to the peak position values, and take the values of each cluster center as the standard center coordinates, ultimately forming a template containing... A reference peak template with standard center coordinates is generated and stored in the system.
[0047] The distance between each peak position in the current sample's peak feature vector and each standard center coordinate in the reference peak template is calculated. If the absolute difference between the peak position of a certain absorption peak in the current sample and a certain standard center coordinate is less than a preset matching threshold, for example, 5 cm⁻¹, then the absorption peak is considered to have successfully matched the corresponding standard center coordinate, and the peak area, peak position, and half-width at half-maximum (WHM) of the absorption peak are filled into the preset feature slot of the corresponding standard center coordinate. If a certain standard center coordinate does not match any absorption peak of the current sample, then the peak area in the feature slot corresponding to the standard center coordinate is filled with 0, the peak position is filled with the value of the standard center coordinate, and the WHM is filled with a preset fixed constant, for example, 10 cm⁻¹. If a certain absorption peak of the current sample does not match any standard center coordinate, then it is judged as an abnormal secondary peak or noise interference and is removed. The above preset matching threshold and the fixed WHM of missing peaks are all obtained from infrared spectral experiments of known oxidation product standard samples. Through the above processing, it is ensured that the updated peak feature vector constantly contains... Each absorption peak characteristic data, with a fixed data dimension. Extract all features contained in the updated peak feature vector. The peak areas of each absorption peak are calculated, and the sum of all peak areas is used to generate the total carbonyl peak area. The calculation formula is: ;In the formula, This represents the total carbonyl peak area, expressed in units of absorbance multiplied by cm⁻¹. This represents the index of the absorption peak in the updated peak eigenvector. This indicates the th peak in the updated eigenvector. Peak area of each absorption peak This indicates the total number of standard absorption peaks contained in the reference peak template.
[0048] Extract the pre-established degradation stage mapping table. In this embodiment, acid value is used as the target oxidative degradation index, and all predicted values in subsequent steps correspond to the predicted acid value. The mapping table is constructed as follows: Collect training lubricating oil samples covering the entire life cycle and divide them into initial, intermediate, and late stages according to a preset acid value threshold from low to high. For example, acid value less than 0.5 mgKOH / g is the initial stage, acid value not less than 0.5 mgKOH / g and less than 2.0 mgKOH / g is the intermediate stage, and acid value not less than 2.0 mgKOH / g is the late stage. Calculate the gum level and total carbonyl peak area of each training sample, and statistically analyze the numerical range of the total carbonyl peak area corresponding to each gum level in each stage. Divide the numerical range of the total carbonyl peak area into multiple non-overlapping intervals with left-closed and right-open sides, for example... , and A two-dimensional table is established, representing the lower and upper threshold values of the interval, and establishing a one-to-one correspondence between the gel quality level, the total carbonyl peak area interval, and preset integer stage identifiers (e.g., 1 for initial stage, 2 for intermediate stage, and 3 for late stage). This table is then stored in the system. The gel quality level of the current sample is input into the degradation stage mapping table for comparison to determine the specific two-dimensional interval combination into which the current parameter falls. The preset integer stage identifier bound to this interval combination is then extracted to generate the target degradation stage.
[0049] The background elevation generated in the first step is extracted and appended as an additional numerical element to the end of the updated peak feature vector to generate a joint feature vector for partial least squares regression prediction. The calculation formula is as follows: ;In the formula, Represents the joint feature vector, for the index number The value ranges from 1 to All elements between This indicates the th peak in the updated eigenvector. Peak area of each absorption peak This indicates the th peak in the updated eigenvector. The peak positions of the absorption peaks are expressed in cm⁻¹. This indicates the th peak in the updated eigenvector. The full width at half maximum (FWHM) of each absorption peak, in cm⁻¹. This represents the amount of background lift, and its value corresponds to the absorbance value. The total number of data dimensions contained in the joint feature vector is fixed. This splicing operation merges global baseline drift characteristics, which reflect macroscopic turbidity, with local peak shape characteristics, which reflect microscopic chemical bond concentration, from a physical data perspective.
[0050] The system pre-trains and stores multiple partial least squares regression models offline, each uniquely bound to a specific target degradation stage. The offline training method for each model is as follows: extract the joint feature vector of all training samples within the same degradation stage as the input matrix of independent variables, extract the actual measured acid values of all training samples within that stage as the output vector of dependent variables, and perform partial least squares regression fitting. The number of latent variables in the partial least squares regression model is determined through cross-validation, and the number of latent variables that minimizes the predicted residuals is taken as the final value, for example, between 3 and 5. The model weights and bias parameters after convergence are extracted as the regression coefficient vector and intercept constant, respectively, and the stage identifier is bound to the corresponding regression coefficient vector and intercept constant for storage.
[0051] Based on the currently determined target degradation stage, the regression coefficient vector and intercept constant from the corresponding partial least squares regression model are retrieved and extracted. The inner product of the joint eigenvector and the regression coefficient vector is calculated to generate the baseline regression prediction value. The calculation formula is as follows: ;In the formula, This represents the baseline value for regression prediction, in mgKOH / g. Represents the first eigenvector in the joint eigenvector. Feature values at each location, This represents the index of the feature element, with a value ranging from 1 to... , This indicates that the extracted regression coefficient vector corresponds to the first... The weight constants of each feature element. The dimensional configuration of the regression coefficient vector is consistent with that of the joint feature vector, both being [values to be filled in]. dimension.
[0052] The initial predicted value is generated by adding the corresponding intercept constant to the calculated baseline regression prediction value. The calculation formula is as follows: ;In the formula, This represents the initial predicted value, which physically means the preliminary prediction result for the acid value without final nonlinear compensation, expressed in mgKOH / g. This represents the intercept constant extracted from the partial least squares regression model, in mgKOH / g, with subscripts indicating the angle between the two values. This indicates the identifier for the partial least squares regression model.
[0053] By using a dimensional alignment mechanism and a phased mapping strategy, the macroscopic baseline state and microscopic peak characteristics are input into a prediction model that is highly matched with the current chemical deterioration stage, and the initial quantitative index reflecting the degree of lubricating oil oxidation is calculated and output.
[0054] S6. Extract the gel compensation coefficient corresponding to the gel level, add the product of the gel compensation coefficient and the background uplift to the initial prediction value to generate the final prediction value, calculate the confidence level based on the fitting residual and output it along with the final prediction value.
[0055] Furthermore, in S6, the confidence level is calculated based on the fitted residuals and output along with the final predicted value, specifically including the following steps: The normalized residual is generated by calculating the ratio of the fitted residual to the preset benchmark residual. Calculate the negative of the normalized residual to generate a negative exponential term; The confidence level is generated by exponentiation with the natural constant as the base and the negative exponent term as the exponent. The confidence level is compared with the preset range to extract the corresponding character identifier and generate a confidence level status label. The confidence score, confidence score state label, and final predicted value are concatenated to generate the output dataset, which is then merged and output.
[0056] Specifically, the system receives the gum level and background rise generated in the first stage, as well as the initial predicted value generated in the previous stage. The system pre-stores a gum compensation coefficient mapping relationship, which is established through experimental calibration using training lubricating oil samples. Specifically, for each gum level, training samples are collected within that level. The actual acid value, initial predicted value, and background rise of each training sample are obtained. The prediction deviation between the actual acid value and the initial predicted value is calculated. A univariate linear regression is performed with the background rise as the independent variable and the prediction deviation as the dependent variable. The slope of the regression line corresponding to that gum level is used as the gum compensation coefficient. The calculation formula is: ; ; ; ; In the formula, This indicates the gel grade, and its value is an integer representing the gel grade generated in the first stage, such as 0, 1, 2, or 3. Indicates the first The index of the training sample within each gel grade, with a value ranging from 1 to... , Indicates the first The total number of training samples within each gel grade, Indicates the first Within each grade of gelatin The prediction bias for each training sample, expressed in mgKOH / g. Indicates the first Within each grade of gelatin The actual acid value of each training sample, in mgKOH / g. Indicates the first Within each grade of gelatin The initial predicted values for each training sample, calculated in the previous step, are expressed in mgKOH / g. Indicates the first Within each grade of gelatin The background rise of each training sample corresponds to the dimensionless absorbance difference. Indicates the first The average background elevation of all training samples within each gel grade. Indicates the first The average prediction bias of all training samples within each gel grade. Indicates the first The colloidal compensation coefficient corresponding to each colloidal grade is expressed in mgKOH / g.
[0057] Based on the current sample's gum level, the corresponding gum compensation coefficient is extracted from the gum compensation coefficient mapping relationship. This gum compensation coefficient is multiplied by the background lift, and the calculated product is added to the initial predicted value to generate the final predicted value characterizing the lubricating oil's final acid value. The calculation formula is as follows: ; ;In the formula, Indicates the gel grade of the current sample. This represents the colloidal compensation coefficient corresponding to the current sample's colloidal level, extracted from the colloidal compensation coefficient mapping relationship. The unit is mgKOH / g. This represents the final predicted value, in mgKOH / g, indicating the predicted acid value of the lubricating oil after correction for gum content. This represents the initial predicted value output from the previous step, in mgKOH / g. This represents the background rise of the current sample, and its value corresponds to the dimensionless absorbance difference. Since the background rise is a dimensionless absorbance difference, The unit is mgKOH / g, consistent with the units of the initial and final predicted values.
[0058] The fourth step receives the fitting residuals generated by calculating the multi-peak fitting residual sequence. These fitting residuals reflect the overall deviation between the fitted curve formed by the superposition of Voigt function components and the corrected spectrum within the preset carbonyl region. The preset baseline residuals are obtained through calibration using repeated measurements of standard oil samples. Specifically, multiple standard lubricating oil samples undergo repeated infrared measurements and the same baseline correction and multi-peak fitting process is performed to obtain multiple corresponding fitting residuals. The average and standard deviation of these fitting residuals are calculated, and the average plus twice the standard deviation is used as the preset baseline residual. The calculation formula is: ;In the formula, Indicates the preset baseline residual. This represents the average value of the fitting residuals obtained from repeated measurements of the standard oil sample. The standard deviation of the fitted residuals obtained from repeated measurements of a standard oil sample is represented by the subscript. This indicates that the results were obtained from a dataset of repeated measurements of standard oil samples. , and All values correspond to absorbance residuals, with absorbance considered dimensionless. The preset baseline residual can also be calibrated to 0.005 based on historical standard oil sample data.
[0059] The normalized residual is generated by calculating the ratio of the fitted residual to the preset baseline residual. The calculation formula is: ;In the formula, This represents the normalized residual, which is a dimensionless ratio. This represents the fitting residual output from the fourth stage. Indicates the preset baseline residual. and All correspond to absorbance residual values.
[0060] The negative exponent term is generated by calculating the inverse of the normalized residual. Using the natural constant as the base and the negative exponent term as the exponent, a power operation is performed to calculate the confidence level used to quantify the reliability of the current predicted output. The calculation formula is as follows: ; ;In the formula, Indicates a negative exponent term. The confidence level is a dimensionless evaluation index ranging from 0 to 1. This represents the natural exponential function. This represents the normalized residual. As the fitted residual decreases, the normalized residual also decreases, and the calculated confidence level increases accordingly.
[0061] The calculated confidence score is compared with a preset interval to determine the specific numerical range within which the confidence score falls, and the corresponding character identifier is extracted to generate a confidence status label. The preset interval uses a non-overlapping boundary rule. For example, when the confidence score is not less than 0.90, it is determined to fall into the high confidence interval, and the corresponding character identifier "High" is extracted to generate a high confidence status label; when the confidence score is not less than 0.70 and less than 0.90, it is determined to fall into the medium confidence interval, and the corresponding character identifier "Medium" is extracted to generate a medium confidence status label; when the confidence score is less than 0.70, it is determined to fall into the low confidence interval, and the corresponding character identifier "Low" is extracted to generate a low confidence status label.
[0062] The confidence score, confidence score status label, and final predicted value are concatenated in sequence to generate a complete output dataset, which is then output to an external monitoring terminal or user interface. The calculation formula is as follows: ;In the formula, Indicates the output data set. Indicates the confidence level. This indicates the confidence level label, with values including High, Medium, and Low. This represents the final predicted value, in mgKOH / g.
[0063] The influence of gum background on acid value prediction is corrected by the gum compensation coefficient, and the quality of multi-peak fitting is indicated by confidence level and confidence level status label.
[0064] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is 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 identifying lubricating oil oxidation products using adaptive baseline correction, characterized in that, Includes the following steps: S1. Obtain the infrared spectrum, calculate the difference between the average absorbance of the infrared spectrum within a preset window and the preset reference absorbance to generate the background rise amount, and determine the gel level and penalty coefficient based on the preset numerical range of the background rise amount. S2. Determine the absorption region mask based on the colloidal level, input the absorption region mask and the penalty coefficient into the asymmetric penalized least squares model to fit the infrared spectrum to generate a spectral baseline, and subtract the spectral baseline from the infrared spectrum to generate a corrected spectrum. S3. Perform second-derivative filtering on the corrected spectrum to generate a second-derivative spectrum, and extract the abscissa of the minimum point of the second-derivative spectrum in the preset carbonyl region to generate an initial peak position list. S4. Using the initial peak position list as a constraint condition for the Voigt function, perform multi-peak fitting on the corrected spectrum to generate a fitting curve, extract the peak area, peak position and full width at half maximum of the fitting curve to construct a peak feature vector, and calculate the fitting residual between the corrected spectrum and the fitting curve. S5. Determine the target degradation stage based on the gel grade and the peak area in the peak feature vector, and input the peak feature vector and the background rise into the partial least squares regression model corresponding to the target degradation stage to generate an initial predicted value. S6. Extract the gel compensation coefficient corresponding to the gel level, add the product of the gel compensation coefficient and the background rise to the initial prediction value to generate the final prediction value, calculate the confidence level based on the fitting residual and output it along with the final prediction value.
2. The method for identifying lubricating oil oxidation products with adaptive baseline correction according to claim 1, characterized in that, In S1, the step of calculating the difference between the average absorbance of the infrared spectrum within a preset window and a preset reference absorbance to generate a background rise, and determining the gel level and penalty coefficient based on a preset numerical range of the background rise, specifically includes the following steps: The arithmetic mean of the absorbance of all data points in the infrared spectrum within the preset window is calculated to generate the average absorbance. The difference between the average absorbance and the preset reference absorbance is calculated to generate the background lift. The background elevation amount is matched with a preset threshold sequence to extract the corresponding preset value interval, and the integer identifier corresponding to the preset value interval is used to generate the gel level. Extract the preset base penalty coefficient and preset amplification factor corresponding to the gel level, calculate the product of the preset amplification factor and the background lift to generate an amplification term, and add the preset base penalty coefficient to the amplification term to generate a penalty coefficient.
3. The method for identifying lubricating oil oxidation products with adaptive baseline correction according to claim 1, characterized in that, In S2, determining the absorption region mask based on the colloidal level specifically includes the following steps: Extract a preset interval mapping table, which contains the correspondence between preset integer identifiers and preset wavenumber intervals; The gel grade is queried and matched in the preset interval mapping table to extract the target wavenumber interval corresponding to the gel grade; Extract the abscissa of all data points in the infrared spectrum, and extract the data points whose abscissas are contained within the target wavenumber interval to generate mask data points; Extract the position index of the mask data points in the infrared spectrum, and stitch all the position indices together to generate an absorption region mask.
4. The method for identifying lubricating oil oxidation products with adaptive baseline correction according to claim 1, characterized in that, In S2, the step of inputting the absorption region mask and the penalty coefficient into an asymmetric penalized least squares model to fit the infrared spectrum and generate a spectral baseline specifically includes the following steps: Initialize the data point weights of the infrared spectrum to generate an initial weight vector, and fit the infrared spectrum based on the initial weight vector to generate an initial spectral baseline; Calculate the difference between the infrared spectrum and the initial spectral baseline to generate a residual vector; The initial weight vector is updated to generate an iterative weight vector based on the preset asymmetric parameters and the positive or negative sign of the residual vector; Set the values at the corresponding positions of the absorption region mask in the iterative weight vector to zero to generate a mask weight vector, and convert the mask weight vector into a diagonal matrix to generate a diagonal weight matrix; The diagonal weight matrix, the penalty coefficient, and the preset second-order difference matrix are substituted into a preset system of linear equations to generate an updated spectral baseline. Calculate the difference norm between the updated spectral baseline and the initial spectral baseline. When the difference norm is greater than a preset convergence threshold, return the updated spectral baseline as the initial spectral baseline to execute the step of calculating the difference between the infrared spectrum and the initial spectral baseline to generate a residual vector. When the difference norm is not greater than the preset convergence threshold, the updated spectral baseline is extracted as the spectral baseline.
5. The method for identifying lubricating oil oxidation products with adaptive baseline correction according to claim 1, characterized in that, In S3, the step of extracting the abscissa of the minimum point of the second derivative spectrum in the preset carbonyl region to generate an initial peak position list specifically includes the following steps: Candidate minimum points are generated by extracting data points whose ordinates are smaller than those of adjacent data points within the preset carbonyl region based on the second derivative spectrum. The difference between the maximum and minimum ordinates of the second derivative spectrum within the preset carbonyl region is calculated to generate the regional range. The regional range is then multiplied by a preset scaling factor to generate a peak depth threshold. Data points whose absolute ordinate value is less than the peak depth threshold are removed from the candidate minimum points to generate valid minimum points; Calculate the difference in the abscissa of adjacent data points in the effective minimum point. When the difference in the abscissa is less than the preset peak spacing threshold, remove the data points with smaller absolute values of the ordinate to generate the target minimum point. Extract the x-coordinates of the target minimum points to generate an initial peak list.
6. The method for identifying lubricating oil oxidation products with adaptive baseline correction according to claim 1, characterized in that, In S4, calculating the fitting residual between the corrected spectrum and the fitted curve specifically includes the following steps: Extract the absorbance of the corrected spectrum in the preset carbonyl region and the absorbance at the corresponding abscissa position of the fitted curve, and calculate the difference between the absorbance of the corrected spectrum and the absorbance of the fitted curve to generate a residual sequence; Calculate the sum of squares of each element in the residual sequence to generate the residual sum of squares; The mean square error is generated by calculating the ratio of the sum of squared residuals to the number of elements in the residual sequence. The square root operation is performed on the mean square error to extract the numerical value as the fitting residual.
7. The method for identifying lubricating oil oxidation products with adaptive baseline correction according to claim 1, characterized in that, In S5, the step of inputting the peak feature vector and the background rise into the partial least squares regression model corresponding to the target degradation stage to generate the initial predicted value specifically includes the following steps: The background lift is used as a numerical element and concatenated to the end of the peak feature vector to generate a joint feature vector; Extract the regression coefficient vector and intercept constant from the partial least squares regression model corresponding to the target degradation stage; Calculate the inner product of the joint feature vector and the regression coefficient vector to generate the basic regression prediction value; The initial prediction value is generated by adding the intercept constant to the regression prediction base value.
8. The method for identifying lubricating oil oxidation products with adaptive baseline correction according to claim 1, characterized in that, In S6, the step of calculating the confidence level based on the fitting residual and outputting it along with the final predicted value specifically includes the following steps: The ratio of the fitted residual to the preset benchmark residual is calculated to generate a normalized residual; The negative of the normalized residual is calculated to generate a negative exponential term; Using the natural constant as the base, the negative exponent term is used as the exponent to generate the confidence level through exponentiation. The confidence level is compared with a preset range to extract the corresponding character identifier and generate a confidence level status label. The confidence level, the confidence level state label, and the final predicted value are concatenated to generate an output dataset, which is then merged and output.