Next Article in Journal
Discharge Coefficient and Pressure Loss Characteristics of Multi-Branch Oil Jet Nozzles
Previous Article in Journal
Lubrication Reliability and Evolution Laws of Gear Transmission Considering Uncertainty Parameters
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Hyperspectral Analysis-Based Approach for Estimation of Wear Metal Content in Lubricating Oil

1
Aerospace Information Research Institute, Chinese Academy of Sciences, Beijing 100101, China
2
University of Chinese Academy of Sciences, Beijing 100101, China
*
Author to whom correspondence should be addressed.
Lubricants 2025, 13(9), 393; https://doi.org/10.3390/lubricants13090393
Submission received: 15 July 2025 / Revised: 18 August 2025 / Accepted: 2 September 2025 / Published: 4 September 2025

Abstract

Lubricating oil reflects mechanical component aging and wear. Accurate quantification of its wear metals is essential for equipment safety and intelligent maintenance. This study introduces a rapid, non-destructive method for detecting wear metal content in lubricating oil using hyperspectral technology to overcome limitations such as bulky, expensive instruments and destructive testing in current spectroscopic techniques. Absorption spectra of 98 marine gearbox oil samples were acquired using Hach UV-Vis and GLT optical fiber spectrometers. We propose a multi-head attention mechanism enhanced genetic algorithm (MHA-GA) for deep feature extraction, integrating attention weights into band selection and fitness evaluation to identify key features under multi-element interference. Wear metal prediction models were constructed using random forest (RF), support vector regression (SVR), and extreme gradient boosting (XGBoost). Results demonstrate MHA-GA outperformed traditional genetic algorithm (GA) and competitive adaptive reweighted sampling (CARS) in feature selection. The MHA-GA-XGBoost model performed best. Fe prediction R2 reached 0.96 (Hach) and 0.93 (GLT), with RPDs of 5.33 and 3.90. For Cu, R2 reached 0.91 and 0.83, with RPDs of 3.35 and 2.42. The results indicate that hyperspectral technology combined with machine learning enables effective non-destructive wear metal quantification, offering a promising strategy for intelligent maintenance and condition monitoring of lubricating oil.

1. Introduction

Lubricating oil is essential for the efficient operation of mechanical equipment, reducing friction between mechanical parts, minimizing wear, preventing equipment failure, and providing critical protective functions [1]. The quality and condition of lubricating oil are crucial in ensuring machinery safety, optimizing operational performance, and prolonging service life [2]. Used lubricating oil typically contains measurable contaminants and wear particles. The type, concentration, and size distribution of metallic wear debris effectively reflect the severity and location of equipment wear [3]. Therefore, quantitative analysis of wear metals in lubricating oil has become a fundamental method for early detection of mechanical wear [4]. Monitoring the wear metal concentration enables operational condition assessment and facilitates predictive maintenance strategies, thereby extending the lifespan of machinery [5]. Additionally, this approach supports accurate evaluation of lubricant quality and condition, allowing for timely oil replacement and contributing to energy conservation [6]. Rapid, precise, and convenient detection of wear metal content in lubricating oil is crucial for advancing intelligent machinery maintenance practices and enhancing industrial efficiency.
Spectral analysis techniques enable accurate determination of relative chemical constituent concentrations in oil samples through characteristic spectral signatures [7], providing significant utility for quantifying the content of wear metals in lubricants [8]. Commonly used spectral analysis techniques include atomic emission spectroscopy (AES) [9,10], X-ray fluorescence (XRF) [11,12], laser-induced breakdown spectroscopy (LIBS) [13,14], and atomic absorption spectroscopy (AAS) [15]. Although these methods offer high precision in detecting metal concentrations in lubricating oils, they are limited by substantial instrument size, high equipment costs, and complex operational procedures [1]. Furthermore, specific techniques demonstrate poor repeatability and require matrix effect correction during spectral analysis [16].
Hyperspectral data contain rich spectral information that provides a scientific basis for lubricating oil condition assessment [17], enabling the prediction of various physical and chemical oil properties. With advancements in portable and intelligent hyperspectral instrumentation, hyperspectral technology has been increasingly applied in oil quality monitoring [18,19]. The primary quantitative method for lubricating oil analysis is based on the Lambert-Beer law, which estimates analyte concentration through the relationship between absorbance (or transmittance) and concentration. For instance, Holland et al. established a positive correlation between engine oil oxidation time and the absorbance within the range of 245–265 nm [20]. Additional studies have used ultraviolet-visible and infrared spectral data from lubricants to estimate multiple oil attributes, including acidity, viscosity, and even particular specific metal contents [21,22], demonstrating the feasibility of hyperspectral technology for quantifying wear metals in petroleum products.
However, hyperspectral data often suffer from high redundancy and strong inter-band correlations. According to the Hughes phenomenon, increasing the number of spectral bands may improve model accuracy, but eventually leads to performance degradation and a sharp increase in the required training samples. Using the full spectrum for modeling can reduce computational efficiency and make it challenging to achieve high accuracy [23]. When spectral variables significantly outnumber samples, selecting representative feature bands becomes essential for enhancing model performance [24]. In various lubricant analysis applications, feature band selection from hyperspectral data has consistently demonstrated superior recognition accuracy compared to full-spectrum modeling [21]. Previous research has implemented genetic algorithm (GA) and competitive adaptive reweighted sampling (CARS) to effectively eliminate redundant spectral information, thereby improving computational efficiency and modeling accuracy [25,26]. The global optimization capability and flexibility of GA provide distinct advantages for high-dimensional feature selection in hyperspectral applications [27]. However, conventional genetic algorithms often employ overly generalized designs that fail to incorporate domain-specific knowledge when defining fitness functions and genetic operators [28]. Moreover, relying solely on a single performance metric may lead to overfitting and convergence to local optima [29]. Recent studies have integrated attention mechanisms with convolutional neural networks to enhance recognition and extraction of global spectral features while mitigating overfitting. These approaches demonstrate that attention mechanisms can significantly improve key feature identification and model generalization capability [30]. Therefore, combining attention mechanism with genetic algorithm presents a promising approach to overcome individual method limitations and enhance estimation accuracy.
With the development of machine learning, models such as random forest (RF) and support vector regression (SVR) have been widely used due to their superior nonlinear fitting capabilities for high-dimensional data and high-precision predictive modeling [31,32]. However, the limited availability of lubricating oil samples imposes stringent requirements on modeling algorithms. While SVR exhibits good generalization performance with small datasets, it remains highly susceptible to noise [33]. RF models display significant performance volatility and instability under small-sample conditions [34], with both approaches exhibiting heightened overfitting risks. The extreme gradient boosting (XGBoost) algorithm addresses these limitations through computational optimization and regularization techniques [35], delivering robust accuracy and stability even for high-dimensional, small-sample datasets [36].
This study proposes a rapid, non-destructive method for detecting wear metal content in lubricating oil using hyperspectral technology, effectively addressing limitations of conventional oil analysis techniques such as large instrument size, high equipment cost, and complex operations. First, 98 lubricating oil samples were collected from marine gearboxes, with absorption spectra acquired using a Hach UV-Vis spectrophotometer and a GLT optical fiber spectrometer. Second, we propose a multi-head attention mechanism enhanced genetic algorithm (MHA-GA) for deep spectral feature extraction. By incorporating attention weights as prior information into the feature selection and fitness evaluation mechanism, the proposed method enhances the identification of critical spectral features under complex interference by multiple elements. It effectively resolves the inherent limitations of standard GA in capturing higher-order nonlinear relations and easily falling into a local optimum. In addition, it enables the detection of nonlinear feature relationships across different subspaces, improving the robustness of spectral band selection. Subsequently, random forest (RF), support vector regression (SVR), and extreme gradient boosting regression tree (XGBoost) were used to construct prediction models for wear metals content in lubricating oil. These models reduce the risk of overfitting under small-sample conditions, enhancing estimation accuracy and model reliability.

2. Materials and Methods

Figure 1 illustrates the workflow for estimating the content of wear metals in lubricating oil using hyperspectral technology. The absorption spectra of lubricating oil samples were collected using a Progoo DS 10A-103 Hyperspectral lubricating oil intelligent detector (Progoo information Technoly Co., Ltd., Tianjin, China) and a Hach DR6000 UV-Vis spectrophotometer (Hach Company, CO, USA), then preprocessed by removing the saturated absorbance bands and applying wavelet threshold denoising. Subsequently, spectral feature selection for target metal elements was performed using the proposed multi-head attention mechanism enhanced genetic algorithm (MHA-GA), with conventional genetic algorithm (GA) and competitive adaptive reweighted sampling (CARS) employed for comparative analysis. The optimal feature subsets identified through this process were then used to establish inversion models employing extreme gradient boosting regression tree (XGBoost), random forest (RF), and support vector regression (SVR) algorithms. The optimal models were then used to estimate the concentrations of typical wear metals iron (Fe) and copper (Cu) in lubricating oil, accompanied by a systematic analysis of key model performance determinants.

2.1. Lubricating Oil Sample Collection and Hyperspectral Data Acquisition

98 lubricating oil samples were collected from cargo ship transmission gearboxes. The oil samples belong to the Mobil SHC Gear series, specifically SHC Gear 320 and SHC Gear 460 (ExxonMobil, Spring, TX, USA). These lubricants are fully synthetic and formulated using polyalphaolefin (PAO) base oils combined with a proprietary additive system. All samples shared identical base oil formulations and had service histories ranging from 1500 to 2500 h. Following ASTM D6595 standard [37] protocols, 2 mL aliquots of each sample underwent laboratory analysis. The concentrations of common wear metals such as Fe and Cu were quantified using a SpectrOil 100 series of elemental spectrometer (Spectro Scientific, Chelmsford, MA, USA), which employs rotating disk electrode-optical emission spectroscopy (RDE-OES). The detection range is 0–1000 μg/g, with sensitivity at sub-parts-per-million (ppm) level. Spectral data processing incorporated preset calibration programs to eliminate matrix effects and ensure measurement accuracy.
To comprehensively validate hyperspectral estimation of Fe and Cu content in lubricating oil, two types of hyperspectral instruments, the Progoo DS 10A-103 Hyperspectral lubricating oil intelligent detector which used GLT optical fiber spectrometer and the Hach DR6000 UV-Vis spectrophotometer, were employed to collect the spectral data of the oil samples. The Hach DR6000 UV-Vis spectrophotometer uses spectrophotometry and has a dual-beam spectrophotometric system equipped with a deuterium lamp (for the UV range) and a tungsten lamp (for the visible range) as light sources. Dispersion is achieved via a diffraction grating with scanning detection. The instrument includes a built-in cuvette with a fixed optical path length. It covers a wavelength range of 190–1100 nm and a spectral resolution of 0.1 nm. The GLT optical fiber spectrometer is externally connected to a deuterium lamp (UV) and a halogen tungsten lamp (visible light) as light sources, a dispersion system with a diffraction grating, and a linear-array CCD detector enabling full-spectrum acquisition. The wavelength range is 190–840 nm, and the spectral resolution is 1.6 nm. Each sample underwent five replicate measurements, with mean spectral values used for analysis to minimize random errors. Figure 2 shows a schematic diagram of the Progoo spectral acquisition system.
During Hach UV-Vis spectrophotometer measurements, oil samples exhibited absorbance saturation in the ultraviolet range (190–380 nm). Therefore, this spectral region was excluded from analysis. Wavelength range demonstrating discernible absorption features (380–800 nm) was retained for Hach spectral data processing. The raw absorption spectra obtained from both the Hach and Progoo instruments are illustrated in Figure 3.

2.2. Methodology

2.2.1. Spectral Preprocessing

After removing the saturated spectral regions, wavelet threshold denoising was applied to suppress high-frequency noise introduced by instruments, light sources, and other external factors. The wavelet transform separates the original spectrum into different frequency parts. A threshold is applied to the high-frequency part to remove small fluctuations, which are considered noise. Then, the signal is reconstructed to improve the signal-to-noise ratio and stability. Following denoising, min-max normalization was used for both spectral datasets. Each absorbance value was scaled between the minimum and maximum in the dataset. Min-max normalization reduces the influence of differences in value ranges across spectral bands. Taking the Hach spectral data as an example, a comparison of local spectral curves before and after preprocessing is shown in Figure 4. The comparison indicates that the preprocessed spectral data retain the important absorption features while effectively reducing the influence of noise on absorbance values. In addition, the preprocessed absorbance curves within the wavelength range of 380–430 nm demonstrate a general upward shift with increasing Fe concentration, indicating a positive correlation between absorbance intensity and metal content. All samples display stable absorbance peaks, increasing peak intensity as Fe concentration rises. The spectral curves exhibit greater separation, enhancing the distinguishability among different concentration levels. This trend suggests that changes in Fe concentration predominantly influence the spectral response, generating consistent and discernible spectral characteristics. These discoveries support the feasibility of utilizing absorbance spectra for estimating the concentration of wear metals in lubricating oil.
The Lambert-Beer law states that the spectral absorbance of lubricating oil samples is positively correlated with the concentration of target metal elements. The peak absorbance at 393 nm increases gradually with the rising concentration of Fe (Figure 4b), indicating that Fe content exerts a pronounced influence on spectral absorbance and predominantly drives its variation. However, in mixtures containing multiple metal elements, spectral changes become more complex and less interpretable due to the interference from other components. Specifically, when Fe content is relatively high, the spectral absorbance response to other wear metal elements tends to weaken, making it more challenging to identify their characteristic absorption features. This interference severely complicates the prediction of concentrations for different wear metals.

2.2.2. Multi-Head Attention Mechanism Enhanced Genetic Algorithm (MHA-GA)

Genetic algorithm (GA) is widely applied in hyperspectral band selection due to its global optimization capability and flexibility in handling high-dimensional data [27]. However, traditional GA faces several limitations with high-dimensional spectral datasets, including excessive redundant features, insufficient integration of problem-specific information into the fitness function [28], and susceptibility to overfitting and local optima entrapment within complex search spaces [29].
The multi-head attention (MHA) mechanism, derived from the Transformer architecture, can extract deep information from multiple subspaces across different dimensions, thereby enhancing the modeling ability of nonlinear correlations between features. By employing attention masks to identify the most informative spectral bands, MHA can significantly improve model robustness against overfitting and computational efficiency [38].
This study proposes a feature selection framework integrating the attention mechanism with the genetic algorithm. Attention weights are incorporated as prior knowledge into the feature selection process and individual initialization based on the genetic algorithm. This approach guides the model toward the most informative wavelengths by filtering redundant and highly correlated bands, which helps to mitigate the interference caused by redundant features during the exhaustive search inherent to traditional GA when dealing with high-dimensional data. The overall structure of the proposed multi-head attention mechanism enhanced genetic algorithm (MHA-GA) is illustrated in Figure 5.
  • Multi-head spectral attention mechanism
The multi-head spectral attention mechanism employs multiple independent Query-Key-Value projection heads to model feature relationships across distinct dimensions. This architecture enables the capture of potential feature dependencies within multiple attention subspaces. The structure of this multi-head attention module is illustrated in Figure 6.
First, the input spectral features are projected into multiple sets of Query, Key, and Value vectors corresponding to different attention heads. These heads operate in parallel to model feature correlations across diversified subspaces. The scaled dot-product attention mechanism is then applied to compute an attention weight matrix that captures inter-band relationships [39]:
A t t n Q i , K i , V i = S o f t m a x Q i K i T d k V i ,     i = 1 , 2 , , H ,
where H is the number of attention heads, and d k is the dimensionality of each attention head. The outputs from all attention heads are concatenated and projected back to the original channel size through a linear transformation. A Sigmoid activation function is then applied to produce the final normalized attention weight vector α for spectral bands:
α = s i g P r o j C o n c a t A t t n 1 , , A t t n H 0 ,   1 C ,
where C is the number of spectral bands. Attention weights adaptively learn the relative importance of each band from data. A weighted spectral vector is generated through feature fusion by multiplying the original spectral data with the attention weights. The model then selects the most informative spectral bands as input for subsequent modules based on the magnitude of the attention weights, thereby enhancing the accuracy of regression prediction.
2.
Genetic algorithm
The Genetic Algorithm (GA) simulates the process of natural selection and evolution. It searches through random combinations of spectral bands iteratively. In each generation, operations such as crossover and mutation are applied. The best-performing combinations are kept, based on their fitness. Over time, this helps to select the most informative feature subsets and achieve global optimization of the high-dimensional spectral data. Each individual is real-value encoded to represent the selection probability of each spectral band. During the initialization of individuals, genes are randomly distributed uniformly between 0 and 1. A threshold operation converts this real-valued vector into a binary mask, indicating a specific subset of selected features. This study modifies the individual initialization by incorporating attention weights as prior knowledge, creating a hybrid strategy where initial gene values combine constrained randomization with attention guidance. This hybrid initialization strategy helps capture global dependencies among bands and guides the algorithm toward discovering more optimal feature subsets.
This module reformulates the internal fitness function to address the traditional GA limitations, including the simplistic fitness functions, overfitting susceptibility, and local optimum entrapment. GA generates a new population through selection, crossover, and mutation, and individuals are evaluated according to a fitness function. However, traditional fitness evaluation relies solely on training set performance, ignoring underlying feature structures. Consequently, individuals with high fitness values may represent overfitted solutions that are effective only in local search space regions and lack generalizability. Our fitness function simultaneously considers both model performance and band significance. For feature subset S ⊂ {1, 2, …C}, fitness function F(S) is defined as:
F S =   R S 2 + α ¯ S ,
α ¯ S = 1 S i S α i ,
where R S 2 is the model’s coefficient of determination trained on the bands subset S, reflecting its predictive capability. α ¯ S is the average attention weight of bands within the subset. This fitness function enhancement improves feature quality evaluation by dynamically assigning differentiated weights to different feature combinations through the multi-head attention structure. This approach mitigates premature convergence due to locally optimal solutions, allowing more significant band combinations to obtain higher comprehensive fitness values. This effectively improves feature selection’s robustness and generalization ability while reducing bias from training data peculiarities.
To evaluate the effectiveness of the proposed multi-head attention mechanism combined with a genetic algorithm, we compared it with the traditional GA and the widely used CARS algorithm. The core idea of CARS is to simulate the “survival of the fittest” principle. It randomly selects multiple subsets from the original spectral bands. Then, it calculates the absolute value of regression coefficients to assess the importance of each band. Less important bands are gradually removed. Meanwhile, the probability of each band being selected in future sampling is adjusted dynamically. Ultimately, CARS chooses a subset of bands that contribute most to predicting the target variable.

2.2.3. Regression Modeling Method

The extreme gradient boosting (XGBoost) algorithm improves overall performance by training a series of weak learners iteratively. Each learner aims to correct the prediction errors made by the previous one [40]. When building a learner, XGBoost selects the best split points and features based on the amount of loss reduction. The final model is a weighted sum of all the weak learners’ outputs. It also uses a Taylor expansion and adds regularization terms to control model complexity, which helps reduce the risk of overfitting [35], delivering high accuracy and stability for high-dimensional datasets with limited samples [36]. Random forest regression (RF) generates multiple sub-training sets by randomly sampling the original training data with replacement. It builds many random decision trees and combines their predictions by averaging. This reduces variance and the risk of overfitting. RF exhibits strong generalization performance, particularly with small sample sizes [41]. Support vector regression (SVR) follows the principle of structural risk minimization. It fits the data by constructing an optimal regression hyperplane in a high-dimensional feature space. The goal is to make as many data points as possible fall within an insensitive zone defined by the hyperplane and its margin. SVR uses an insensitive loss function and kernel functions, which makes it robust to outliers [42].

2.3. Model Evaluation Metrics

Four evaluation metrics were employed to assess the predictive accuracy of the model for typical wear metal concentrations (iron, Fe and copper, Cu) in lubricating oil: the Root Mean Square Error of Calibration eRMSEC (RMSEC), the Root Mean Square Error of Prediction eRMSEP (RMSEP), the Residual Predictive Deviation ePPD (RPD), and the coefficient of determination (R2). The model evaluation formulas are defined as follows:
e R M S E C =   i = 1 n t r a i n y i y i ^ 2 n t r a i n ,
e R M S E P = i = 1 n t e s t y i y i ^ 2 n t e s t ,
e R P D = s t d e R M S E ,
R 2 = 1 i = 1 m y i y i ^ 2 i = 1 m y i y ¯ 2 # ,
where y i and y i ^ are the measured and predicted concentrations of the target metal in the i oil sample, m is the number of test samples, s t d is the standard deviation of the test dataset, and y ¯ is the mean concentration. Higher prediction accuracy corresponds to lower eRMSE, higher eRPD, and R2 values closer to 1. According to previous studies [43], a value for R2 between 0.66 and 0.80 indicates approximate quantitative predictions, whereas a value for R2 between 0.81 and 0.90 reveals good prediction. Calibration models having R2 > 0.90 are considered to be excellent.

3. Results

3.1. Statistical Analysis of Wear Metal Concentrations in Lubricating Oil Samples

Considering the limited sample size of the dataset, samples were divided into training and test sets using hold-out validation. Samples were first sorted by target metal concentration, and stratified sampling was applied to ensure balanced distribution. Specifically, out of every three consecutive samples, the first two were assigned to the training set and the third one to the test set. This yielded 65 training and 33 test samples while maintaining distributional consistency. The statistical information of Fe and Cu concentrations in the training set, test set, and the whole dataset is illustrated in Figure 7 and summarized in Table 1. Comparable means and standard deviations across subsets confirm representative sampling. In the dataset, the median of Fe concentration (4.82 ppm) is significantly lower than the mean (11.36 ppm), with several high-concentration outliers, indicating a pronounced right-skewed distribution. These outliers reflect severe wear in iron-based components during regular lubrication service cycles and were intentionally retained. Cu concentrations show a more centralized distribution, with the median value (53.00 ppm) close to the mean (47.08 ppm). However, the maximum value (141.96 ppm) is nearly three times the mean (SD = 40.20), indicating distributional breadth.

3.2. Performance Comparison of Modeling Methods in Estimating Fe and Cu Concentrations

To evaluate the modeling performance of extreme gradient boosting (XGBoost), comparative analyses were conducted against two widely used machine learning approaches, support vector regression (SVR) and random forest (RF). The models were trained using spectral data from the GLT optical fiber spectrometer and the Hach DR6000 UV-Vis spectrophotometer. Bayesian optimization was employed for hyperparameter tuning across all models. While SVR, RF, and XGBoost all effectively model nonlinear relationships, the difference lies in that SVR relies on kernel-based learning. In contrast, RF and XGBoost are ensemble methods based on decision tree architectures.
After integrating the proposed MHA-GA feature selection framework, the concentrations of Fe and Cu were predicted using SVR, RF, and XGBoost algorithms. All computations were performed in Python 3.12.7. After parameter optimization, the RF model used the following parameters: n_estimators = 100, max_depth = 5, and other parameters were default. The SVR model was configured with kernel = rbf, C = 100, and gamma = 0.1; other parameters were default. Results are summarized in Table 2 and illustrated in Figure 8. The SVR and RF models yielded comparatively lower prediction accuracy, while the XGBoost model achieved consistently superior performance across both datasets. Specifically, for Fe concentration estimation based on the Hach dataset, XGBoost attained an R2 of 0.96 and eRPD of 5.33. The GLT dataset achieved an R2 of 0.93 and eRPD of 3.90. For Cu prediction, the corresponding R2 values were 0.91 and eRPD values were 3.35 based on the Hach dataset, R2 values were 0.83 and eRPD values were 2.42 with the GLT dataset.
In this study, the XGBoost models constructed using data from Hach and GLT devices achieved the highest prediction accuracy for Fe and Cu concentrations. The SVR model exhibited inferior performance, particularly in predicting Cu content, with an RMSE of 15.06 and RPD of 2.62 on the Hach test set (Figure 8d). It was significantly worse than its performance on the training set, indicating compromised generalization capability. The RF algorithm yielded results similar to SVR, with lower estimation accuracy than XGBoost. The superior performance of XGBoost can be attributed to several algorithmic advantages. It incorporates L1/L2 regularization terms in the loss function to control model complexity and can natively handle missing values. These features make it suitable for small sample sizes, high dimensions, and incomplete datasets [44,45]. Additionally, XGBoost employs a second-order Taylor expansion to improve optimization efficiency and model stability, enhancing its generalization capability [46]. Consequently, XGBoost demonstrates distinct advantages for estimating Fe and Cu concentrations in lubricating oil samples characterized by high dimensionality and constrained sample sizes.
The GLT optical fiber spectrometer and the Hach DR6000 UV-Vis spectrophotometer successfully detected Fe and Cu concentrations in lubricating oil samples. The modeling results based on both datasets showed acceptable fitting and predictive capabilities. The Hach instrument exhibited superior performance across several evaluation metrics (Figure 8a–f), particularly in predicting Cu content (Figure 8d–f), where its performance was significantly enhanced. This improvement is primarily attributed to the Hach DR6000’s spectral separation method and measurement mechanism, which are better suited for analyzing liquid oil samples and contributing to more stable spectra. Although the GLT system enables rapid acquisition of full-spectrum data, it is more susceptible to external disturbances, resulting in slightly lower spectral stability.
From the perspective of metal type, Fe concentration was generally predicted with higher accuracy than Cu. This discrepancy may stem from the stronger spectral absorbance response associated with Fe and its more distinct spectral characteristics, facilitating model learning. This is consistent with the phenomena observed by Guan et al., who used multi-spectral data to predict Cu and Fe concentrations in soil [47].

3.3. Effectiveness Analysis of MHA-GA Feature Extraction

To validate the effectiveness of the multi-head attention mechanism enhanced genetic algorithm (MHA-GA) in enhancing hyperspectral feature selection, the feature bands extracted by MHA-GA, genetic algorithm (GA), and competitive adaptive reweighted sampling (CARS) were used to predict the concentrations of Fe and Cu with the optimal model XGBoost. The prediction results are presented in Figure 9 and Table 3. MHA-GA showed superior performance in predicting the concentrations of both typical wear metals, exhibiting strong adaptability and generalization across both Hach and GLT datasets.
The MHA-GA selects a smaller number of features, but it successfully retains the majority of high-information-density regions and achieves the highest prediction accuracy for both wear metals. For Fe and Cu prediction based on the Hach spectral datasets, MHA-GA selected 80 and 67 features, respectively, while the traditional GA retained 182 and 166 features (Table 3). Using the Hach data, the R2 of the MHA-GA model for the Fe and Cu validation sets reached 0.96 and 0.91, respectively (Figure 9c,f). Similarly, the R2 of the model based on the GLT data for Fe and Cu validation sets also reached 0.93 and 0.83 (Figure 9i,l). These results indicate that MHA-GA outperformed CARS and GA in terms of feature compression and generalization ability. The improvement was particularly significant for Cu content prediction. The R2 of the model based on the Hach data increased from 0.83 (GA) and 0.81 (CARS) to 0.91 (Figure 9f), and the R2 of the model based on the GLT data increased from 0.76 (GA) and 0.75 (CARS) to 0.83 (Figure 9l).

4. Discussion

To identify the most suitable model for the inversion of metal concentrations in lubricating oil, we conducted a comparative analysis using support vector regression (SVR), random forest (RF), and extreme gradient boosting (XGBoost). The SVR model yielded relatively low R2 values on the training set (Table 2). This limitation stems primarily from the restricted generalization capability of its kernel functions in high-dimensional feature spaces, leading to insufficient fitting for data characterized by numerous features and complex nonlinear distribution [48]. Similarly, the RF model exhibited reduced accuracy, introducing noise when applied to high-dimensional data with limited samples. XGBoost effectively handles small, feature-rich, and incomplete datasets through its L1/L2 regularization terms and automatic handling of missing values, demonstrating strong generalization ability. Therefore, XGBoost proved to be highly effective for estimating the concentrations of various wear metals in lubricating oil.
Among the three feature selection methods, the multi-head attention mechanism enhanced genetic algorithm (MHA-GA) achieved the best modeling performance while eliminating more than 80% of redundant spectral bands. It performed well for both types of wear metals, especially showing a significant improvement in Cu prediction (Figure 9f,l), demonstrating strong generalization capability. When applied to Hach-based spectral data, competitive adaptive reweighted sampling (CARS) and genetic algorithm (GA) had better accuracy for estimating Fe concentrations but lower accuracy for Cu. Furthermore, their accuracy dropped significantly when applied to GLT data for Fe estimation, indicating lower adaptability to different hyperspectral acquisition systems than MHA-GA. In addition, CARS exhibited signs of underfitting, suggesting that it failed to fully capture the complex nonlinear relationships between spectral bands. Figure 10 shows the distribution of selected spectral bands for each feature selection algorithm. For both Fe and Cu prediction, MHA-GA retained fewer more informative features, indicating superior capability in redundancy reduction and dimensionality compression. This efficiency arises because the attention mechanism focuses on information-dense and critical spectral regions [49], guiding the genetic search process more precisely and improving feature selection quality. In contrast, GA selected many features, particularly when using data from the GLT system. The chosen bands covered the entire spectral range, retaining many strongly correlated bands, which increases the risk of overfitting and band redundancy (Figure 10c,d). Although CARS reduced the number of selected features and showed some spatial concentration, its performance declined significantly, indicating that it likely excluded important spectral information during the selection process.
In lubricating oil, most wear metals exist mainly as fine particles and colloids. The metal oxide components contained in these particles exhibit specific optical absorption characteristics [50,51]. In addition, under high temperatures and the influence of additives, a small portion of Cu and Fe particles may form weak complexes or surface adsorption interactions with polar functional groups, leading to slight absorption features in the 400–800 nm range [52,53]. Figure 10 shows that bands selected by GA cover essentially the entire 400–800 nm range, introducing substantial redundancy and noise. The CARS method eliminates redundant variables stepwise and selects bands concentrated in information-rich regions. Nevertheless, due to the strong correlation in hyperspectral data, it often retains repetitive bands and misses key spectral features. For example, when inverting Cu concentration using the Hach dataset, CARS selected only a few bands near 400–500 nm (Figure 10b). Conversely, the bands extracted by MHA-GA effectively cover these characteristic absorption intervals while minimizing the influence of highly correlated neighboring bands. Compared with traditional GA and CARS, MHA-GA achieves a better balance between dimensionality reduction and preserving informative spectral variables crucial for accurate concentration prediction.
Using the Hach UV-Vis spectrophotometer data as an example, the variation in the number of selected bands alongside the corresponding fitness values for MHA-GA is shown in Figure 11. Model fitness exhibits a rising-then-falling trend with the increase in selected bands. Initially, incorporating more spectral bands provides richer information, leading to rapid performance gains. Adding further bands introduces redundancy and degrades model performance once the number of bands reaches an optimal threshold that sufficiently covers key high-information regions. The attention mechanism enhances this process by focusing on information-dense regions through higher weight assignment, enabling the model to maintain robust predictive performance with a minimal number of bands.
The research showed that the prediction accuracy and stability of Fe and Cu concentrations using GLT data were generally inferior to those achieved with Hach data. This disparity primarily arises from differences in instrument design. Hach spectrophotometer employs a holographic grating for narrow-band spectral separation and a high-precision monochromator for wavelength scanning, effectively minimizing stray light interference and enhancing spectral stability. The GLT optical fiber spectrometer uses a CCD array detector for full-spectrum acquisition, exhibiting lower optical precision and signal-to-noise ratio (SNR) than the benchtop Hach instrument. Moreover, the GLT system utilizes an external halogen light source and an open optical path structure for spectral measurement, which also introduces additional variability. Previous studies confirm that such configurations in transmission-mode spectroscopy are prone to systematic errors due to susceptibility to ambient light interference, light source fluctuations, and optical path inconsistencies, ultimately degrading the signal-to-noise ratio and model robustness [54]. Notably, the GLT spectrometer offers advantages in rapid sampling, making it better suited for industrial online analysis requiring portability and flexible integration. The Hach spectrophotometer incorporates a closed optical path with an automatic calibration mechanism, ensuring superior optical stability. It offers significant advantages in maintaining optical path consistency and precise sample path length control, effectively eliminating ambient light interference and rendering it ideal for high-precision laboratory quantification.
Beyond instrumentation, intrinsic differences in metal properties also significantly impact modeling performance. Fe is a standard metal in lubricating oil and shows strong spectral responses in the visible and near-infrared regions. These responses lead to a higher signal-to-noise ratio. As a result, the model can more easily capture spectral changes caused by Fe concentration and learn the related patterns effectively [55]. Therefore, the model performs well in Fe prediction. Conversely, the spectral response caused by Cu concentration is relatively weak and less noticeable. It is also more likely to be affected by interference from other metal components [52]. This reduces the model’s sensitivity to Cu and increases the prediction difficulty. The model predicts Fe concentration with significantly better accuracy than Cu (R2 > 0.76). This phenomenon indicates that the model has a strong explanatory power for Fe variation, with low prediction error (RMSE < 6.07), and high stability (RPD > 2.05).
In addition, Fe and Cu show significant differences in their concentration distributions and variation ranges within the samples. Fe concentrations are relatively concentrated across all samples, with most values falling in the low concentration range. Only a few samples show high concentration outliers, and these outliers have clear spectral features. This concentrated distribution helps the model form a more apparent fitting trend. High-concentration Fe samples also show more stable spectral patterns, further supporting model learning. In contrast, the concentration range of Cu is much broader, varying from 0.1 ppm to 141 ppm, with a high standard deviation of 40.20 ppm. The data distribution is highly scattered. This makes it difficult for the model to form a consistent and effective fitting path during training. Moreover, Fe and Cu distribution trends differ between the training and test sets. Fe shows similar means and standard deviations in both sets. At the same time, Cu exhibits a higher proportion of extreme values in the test set, which may negatively impact the model’s generalization performance.
To further demonstrate the applicability of the proposed MHA-GA-XGBoost model for predicting the concentration of wear metals, we analyzed the contents of other metal elements—besides Fe and Cu—in lubricating oil samples measured by the SpectrOil 100 series spectrometer. The results are shown in Table 4. Except for Na, the concentrations of other elements such as Mg, Al, Pb, B, and Ni were generally low in the samples, with limited variation. For example, the average concentration of Al was below 2 ppm, the maximum value was also small, and the standard deviation was less than 1.00. These elements showed relatively concentrated distributions across different samples, with insignificant variation trends. As a result, their absorption differences in the spectra were limited, causing little interference with the modeling of key elements.
In contrast, the concentration change of Na is more obvious. The maximum value in the sample reaches 60.59 ppm, the minimum value is 1.46 ppm, and the standard deviation is 14.60, indicating significant variability among samples. This range of variation allows it to offer recognizable feature responses in the spectrum. Therefore, based on the Fe and Cu models, Na was selected as an additional target to evaluate further the applicability and generalizability of the proposed method for multi-metal prediction. As shown in Figure 12, the model also achieved satisfactory performance in predicting Na concentration, achieving an R2 of 0.90 on the Hach data validation set and 0.87 on the GLT data validation set. The results demonstrate that this method can be applied to other metal components.
Although Na is not typically classified as a wear metal in lubricating oil analysis, it serves as a critical indicator of contamination. In marine applications, common contamination pathways include seawater or cooling water ingress, seawater mist entering through the breather system, and errors during maintenance operations. In this study, Na is categorized as a contaminant metal that accumulates during the service life of the oil. While this research focuses on wear metals such as Fe and Cu, the inclusion of Na is intended to evaluate the spectral inversion model’s ability to predict non-wear elements, thereby demonstrating its broader applicability. The accurate prediction of Na concentration confirms that the model can be effectively applied beyond wear diagnostics, enabling simultaneous monitoring of contamination-related parameters and offering more comprehensive technical support for practical oil condition monitoring.

5. Conclusions

Accurate monitoring of wear metals in lubricating oil is crucial for ensuring the operational safety of marine vessels. This study proposes a rapid and non-destructive estimation method for estimating wear metal concentrations using hyperspectral data. The proposed multi-head attention mechanism enhanced genetic algorithm (MHA-GA) integrates attention weights as prior information into feature selection and fitness evaluation, reducing data redundancy while capturing deep spectral features and improving the accuracy and robustness of wear metal concentration estimation. Fe and Cu concentration estimation models were developed using extreme gradient boosting (XGBoost) algorithms, enabling the rapid and non-destructive inversion of Fe and Cu levels in lubricating oil samples collected from marine cargo vessel gearboxes. The following conclusions can be drawn:
  • Compared to traditional feature extraction algorithms, MHA-GA effectively reduces data redundancy and improves estimation accuracy. Specifically, MHA-GA retained fewer features for Fe and Cu prediction while covering metal-sensitive spectral regions. Compared to the traditional GA, the number of selected features for Fe decreased by 102 (Hach dataset) and 422 (GLT dataset), resulting in R2 values increasing from 0.92 to 0.96 and from 0.80 to 0.93, respectively. For Cu, feature counts were reduced by 99 (Hach dataset) and 477 (GLT dataset), and R2 improved from 0.83 to 0.91 and from 0.76 to 0.83, respectively.
  • Among the three modeling methods evaluated (XGBoost, SVR, and RF), XGBoost demonstrated the best performance, achieving higher accuracy (R2 > 0.83) with fewer features. Its estimation accuracy for both target wear metals consistently surpassed that of SVR and RF, confirming its suitability for predicting wear metal concentrations in lubricating oil under high-dimensional and small-sample conditions.
  • Hyperspectral data acquired with the Hach UV–Vis spectrophotometer yielded better modeling performance than the Progoo DS 10A-103 Hyperspectral lubricating oil intelligent detector which used GLT optical fiber spectrometer, primarily attributable to its higher spectral resolution and superior instrumental stability. Nevertheless, hyperspectral data from both instruments proved effective for estimating typical wear metal concentrations in lubricating oil, demonstrating the validity and reliability of the proposed approach. The overall results highlight the significant potential of hyperspectral technology as a rapid, in situ method for detecting wear metal elements in lubricating oil.
This study focused on Fe and Cu as modeling targets due to their representativeness and practical relevance in lubricating oil for gearboxes. Fe and Cu are typical wear metals generated during mechanical friction. In addition, Na was included as a supplementary metal to test the model’s scalability. Therefore, future work can extend this approach to predict the concentrations of other common wear metals, such as zinc (Zn), aluminum (Al), and chromium (Cr). Our findings guide future efforts to monitor and quantify the comprehensive response mechanisms between metal elements and hyperspectral data in lubricating oil. However, certain limitations still exist. The original concentration data of the metal elements exhibit skewed distributions, and the model has not been preliminarily validated using simulated oil samples. Moreover, the current model only applies to samples with the same base oil. Preparing simulated samples with known concentrations for systematic investigation would benefit future studies. Data augmentation and model transfer can also mitigate the impact of uneven distributions on concentration estimation and enhance the model’s adaptability to various base oil samples.

Author Contributions

M.L.: data curation, conceptualization, formal analysis, methodology, software, validation, and writing—original draft preparation. L.Z.: conceptualization, supervision, validation and resources. D.Y.: conceptualization, validation and writing—review and editing. X.S.: supervision and validation. Q.T.: resources and validation. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The data that support the findings of this study are not publicly available due to institutional restrictions. The author does not have the permission to share the data.

Acknowledgments

The authors would like to thank Pro-goo Information Technology Co., Ltd. for providing the hyperspectral spectrometers used in this study.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Taha-Tijerina, J.; Aviña, K.; Diabb, J.M. Tribological and Thermal Transport Performance of SiO2-Based Natural Lubricants. Lubricants 2019, 7, 71. [Google Scholar] [CrossRef]
  2. Zhu, X.; Zhong, C.; Zhe, J. Lubricating Oil Conditioning Sensors for Online Machine Health Monitoring—A Review. Tribol. Int. 2017, 109, 473–484. [Google Scholar] [CrossRef]
  3. Du, L.; Zhu, X.; Han, Y.; Zhe, J. High Throughput Wear Debris Detection in Lubricants Using a Resonance Frequency Division Multiplexed Sensor. Tribol. Lett. 2013, 51, 453–460. [Google Scholar] [CrossRef]
  4. Vähäoja, P.; Välimäki, I.; Roppola, K.; Kuokkanen, T.; Lahdelma, S. Wear Metal Analysis of Oils. Crit. Rev. Anal. Chem. 2008, 38, 67–83. [Google Scholar] [CrossRef]
  5. Tao, H.; Feng, W.; Yang, G.; Du, R.; Zhong, Y. A Wear Condition Warning Method for Wind Turbine Gearbox Based on Oil On-Line Monitoring Using Learnable Multi-Scale Convolutional Neural Network. IEEE Sens. J. 2024, 24, 35709–35721. [Google Scholar] [CrossRef]
  6. Shen, M.-X.; Dong, F.; Zhang, Z.-X.; Meng, X.-K.; Peng, X.-D. Effect of Abrasive Size on Friction and Wear Characteristics of Nitrile Butadiene Rubber (NBR) in Two-Body Abrasion. Tribol. Int. 2016, 103, 1–11. [Google Scholar] [CrossRef]
  7. Li, J.; Chu, X.; Liu, D. Rapid Determination of Chemical Compositions of Raw Materials and Intermediate Products of Lube Base Oil by near Infrared Spectroscopy Combined with Library Spectral Fitting Method. Microchem. J. 2024, 200, 110265. [Google Scholar] [CrossRef]
  8. Duyck, C.; Miekeley, N.; da Silveira, C.L.P.; Aucélio, R.Q.; Campos, R.C.; Grinberg, P.; Brandão, G.P. The Determination of Trace Elements in Crude Oil and Its Heavy Fractions by Atomic Spectrometry. Spectrochim. Acta Part B 2007, 62, 939–951. [Google Scholar] [CrossRef]
  9. Azcarate, S.M.; Langhoff, L.P.; Camiña, J.M.; Savio, M. A Green Single-Tube Sample Preparation Method for Wear Metal Determination in Lubricating Oil by Microwave Induced Plasma with Optical Emission Spectrometry. Talanta 2019, 195, 573–579. [Google Scholar] [CrossRef]
  10. García, M.; Aguirre, M.Á.; Canals, A. A New Multinebulizer for Spectrochemical Analysis: Wear Metal Determination in Used Lubricating Oils by on-Line Standard Dilution Analysis (SDA) Using Inductively Coupled Plasma Optical Emission Spectrometry (ICP OES). J. Anal. At. Spectrom. 2020, 35, 265–272. [Google Scholar] [CrossRef]
  11. Laza, A.; Orozco, E.; Baldo, M.F.; Raba, J.; Aranda, P.R. Determination of Arsenic (V) in Cannabis Oil by Adsorption on Multiwall Carbon Nanotubes Thin Film Using XRF Technique. Microchem. J. 2020, 158, 105265. [Google Scholar] [CrossRef]
  12. Palacio, C.; Rojas, K.; Triana, Y. Analysis of Diesel Engine Oils from 2.5L Engine Pick-up Trucks by Means of X-Ray Fluorescence. Rev. Fac. Ing. Univ. Antioq 2021, 104, 9–19. [Google Scholar] [CrossRef]
  13. Gondal, M.A.; Hussain, T.; Yamani, Z.H.; Baig, M.A. Detection of Heavy Metals in Arabian Crude Oil Residue Using Laser Induced Breakdown Spectroscopy. Talanta 2006, 69, 1072–1078. [Google Scholar] [CrossRef]
  14. Xu, B.; Liu, Y.; Yin, P.; Li, M.; Zhang, W.; Wang, Y.; Zhao, W.; Tang, J.; Duan, Y. Improving the Laser-Induced Breakdown Spectroscopy for Highly Efficient Trace Measurement of Hazardous Components in Waste Oils. Anal. Chem. 2023, 95, 18685–18690. [Google Scholar] [CrossRef]
  15. Mdluli, N.S.; Nomngongo, P.N.; Mketo, N. A Critical Review on Application of Extraction Methods Prior to Spectrometric Determination of Trace-Metals in Oily Matrices. Crit. Rev. Anal. Chem. 2022, 52, 1–18. [Google Scholar] [CrossRef]
  16. Vinić, M.; Aruffo, E.; Andreoli, F.; Ivković, M.; Lazic, V. Quantification of Heavy Metals in Oils with µL Volume by Laser Induced Breakdown Spectroscopy and Minimazing of the Matrix Effect. Spectrochim. Acta Part B 2020, 164, 105765. [Google Scholar] [CrossRef]
  17. Braga, J.W.B.; Junior, A.A.d.S.; Martins, I.S. Determination of Viscosity Index in Lubricant Oils by Infrared Spectroscopy and PLSR. Fuel 2014, 120, 171–178. [Google Scholar] [CrossRef]
  18. Li, X.; Zhang, L.; Zhang, Y.; Wang, D.; Wang, X.; Yu, L.; Zhang, W.; Li, P. Review of NIR Spectroscopy Methods for Nondestructive Quality Analysis of Oilseeds and Edible Oils. Trends Food Sci. Technol. 2020, 101, 172–181. [Google Scholar] [CrossRef]
  19. Wang, Z.; Deng, J.; Ding, Z.; Jiang, H. Quantification of Heavy Metal Cd in Peanut Oil Using Near-Infrared Spectroscopy Combined with Chemometrics: Analysis and Comparison of Variable Selection Methods. Infrared Phys. Technol. 2024, 141, 105447. [Google Scholar] [CrossRef]
  20. Holland, T.; Abdul-Munaim, A.M.; Mandrell, C.; Karunanithy, R.; Watson, D.G.; Sivakumar, P. UV-Visible Spectrophotometer for Distinguishing Oxidation Time of Engine Oil. Lubricants 2021, 9, 37. [Google Scholar] [CrossRef]
  21. Chen, P.; Liu, D.; Wang, X.; Zhang, Q.; Chu, X. Rapid Determination of Viscosity and Viscosity Index of Lube Base Oil Based on Near-Infrared Spectroscopy and New Transformation Formula. Spectrochim. Acta Part A 2023, 287, 122079. [Google Scholar] [CrossRef]
  22. Zhou, F.; Yang, K.; Li, D.; Shi, X. Acid Number Prediction Model of Lubricating Oil Based on Mid-Infrared Spectroscopy. Lubricants 2022, 10, 205. [Google Scholar] [CrossRef]
  23. Ma, W.; Gong, C.; Hu, Y.; Meng, P.; Xu, F. The Hughes Phenomenon in Hyperspectral Classification Based on the Ground Spectrum of Grasslands in the Region around Qinghai Lake. In Proceedings of the International Symposium on Photoelectronic Detection and Imaging 2013: Imaging Spectrometer Technologies and Applications (SPIE), Beijing, China, 25–27 June 2013; Volume 8910, pp. 363–373. [Google Scholar]
  24. Casasent, D.P.; Chen, X.-W. Waveband Selection for Hyperspectral Data: Optimal Feature Selection. In Proceedings of the Optical Pattern Recognition XIV, SPIE, Orlando, FL, USA, 21–25 April 2003; Volume 5106, pp. 259–270. [Google Scholar]
  25. Park, C.W.; Lee, I.; Kwon, S.-H.; Son, S.-J.; Ko, D.-K. Classification of CARS Spectral Phase Retrieval Combined with Principal Component Analysis. Vib. Spectrosc. 2021, 117, 103314. [Google Scholar] [CrossRef]
  26. Qiu, G.; Chen, B.; Lu, H.; Yue, X.; Deng, X.; Ouyang, H.; Li, B.; Wei, X. Nondestructively Determining Soluble Solids Content of Blueberries Using Reflection Hyperspectral Imaging Technique. Agronomy 2024, 14, 2296. [Google Scholar] [CrossRef]
  27. Zhao, H.; Bruzzone, L.; Guan, R.; Zhou, F.; Yang, C. Spectral-Spatial Genetic Algorithm-Based Unsupervised Band Selection for Hyperspectral Image Classification. IEEE Trans. Geosci. Electron. 2021, 59, 9616–9632. [Google Scholar] [CrossRef]
  28. Cernuda, C.; Lughofer, E.; Hintenaus, P.; Märzinger, W. Enhanced Genetic Operators Design for Waveband Selection in Multivariate Calibration Based on NIR Spectroscopy. J. Chemom. 2014, 28, 123–136. [Google Scholar] [CrossRef]
  29. Lin, S.; Ashlock, J.C.; Zhao, G.; Lai, Q.; Xu, L.; Zhai, C. Genetic-Simulated Annealing Optimization for Surface Wave Inversion of Shear-Wave Velocity Profiles of Geotechnical Sites. Comput. Geotech. 2023, 160, 105525. [Google Scholar] [CrossRef]
  30. Zhu, Y.; Lu, C.; Zhang, Y.; Jiang, W. Quantitative Method to Near-Infrared Spectroscopy With Multi-Feature Fusion Convolutional Neural Network Based on Wavelength Attention. Spectrosc. Spectr. Anal. 2024, 44, 2607–2612. [Google Scholar] [CrossRef]
  31. Yang, H.; Li, F.; Wang, W.; Yu, K. Estimating Above-Ground Biomass of Potato Using Random Forest and Optimized Hyperspectral Indices. Remote Sens. 2021, 13, 2339. [Google Scholar] [CrossRef]
  32. Yuan, H.; Yang, G.; Li, C.; Wang, Y.; Liu, J.; Yu, H.; Feng, H.; Xu, B.; Zhao, X.; Yang, X. Retrieving Soybean Leaf Area Index from Unmanned Aerial Vehicle Hyperspectral Remote Sensing: Analysis of RF, ANN, and SVM Regression Models. Remote Sens. 2017, 9, 309. [Google Scholar] [CrossRef]
  33. Lai, Q.; Yang, Z.; Yuliang, Y. Cost Analysis of Power Engineering Based on Improved Random Forest Algorithm. In Proceedings of the 2024 International Conference on Power, Electrical Engineering, Electronics and Control (PEEEC), Athens, Greece, 14–16 August 2024; pp. 1172–1177. [Google Scholar]
  34. Li, J.; Gao, Z. Setting of Class Weights in Random Forest for Small-Sample Data. Comput. Eng. Appl. 2009, 45, 131. [Google Scholar] [CrossRef]
  35. Wang, J.; Zhou, S. Particle Swarm Optimization-XGBoost-Based Modeling of Radio-Frequency Power Amplifier under Different Temperatures. Int. J. Numer. Model. Electron. Netw. Devices Fields 2024, 37, e3168. [Google Scholar] [CrossRef]
  36. Li, J.; Liu, H.; Yang, Z.; Han, L. A Credit Risk Model with Small Sample Data Based on G-XGBoost. Appl. Artif. Intell. 2021, 35, 1550–1566. [Google Scholar] [CrossRef]
  37. ASTM D6595-22; Standard Test Method for Determination of Wear Metals and Contaminants in Used Lubricating Oils or Used Hydraulic Fluids by Rotating Disc Electrode Atomic Emission Spectrometry. ASTM International: West Conshohocken, PA, USA, 2022; pp. 1–6.
  38. Tulapurkar, H.; Mohan, B.K.; Banerjee, B. Transfomer Based Hyperspectral Dimensionality Reduction with Gabor Kernel CNN for Feature Extraction. In Proceedings of the IGARSS 2023—2023 IEEE International Geoscience and Remote Sensing Symposium, Pasadena, CA, USA, 16–21 July 2023; pp. 7388–7391. [Google Scholar]
  39. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention Is All You Need. In Proceedings of the 31st International Conference on Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017; Curran Associates Inc.: Red Hook, NY, USA, 2017; pp. 6000–6010. [Google Scholar]
  40. Zounemat-Kermani, M.; Batelaan, O.; Fadaee, M.; Hinkelmann, R. Ensemble Machine Learning Paradigms in Hydrology: A Review. J. Hydrol. 2021, 598, 126266. [Google Scholar] [CrossRef]
  41. Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
  42. Zhang, P.; Liu, X.; Zhang, H.; Shi, C.; Song, G.; Tang, L.; Li, R. Optimized SVR Model for Predicting Dissolved Oxygen Levels Using Wavelet Denoising and Variable Reduction: Taking the Minjiang River Estuary as an Example. Ecol. Inform. 2025, 86, 103007. [Google Scholar] [CrossRef]
  43. Zornoza, R.; Guerrero, C.; Mataix-Solera, J.; Scow, K.M.; Arcenegui, V.; Mataix-Beneyto, J. Near Infrared Spectroscopy for Determination of Various Physical, Chemical and Biochemical Properties in Mediterranean Soils. Soil Biol. Biochem. 2008, 40, 1923–1930. [Google Scholar] [CrossRef] [PubMed]
  44. Li, J.; Zhang, J.; Sun, M.; Zhu, R. Vegetable Sales Forecasting Based on XGBOOST Algorithm and Random Forest. In Proceedings of the 2024 International Conference on Computers, Information Processing and Advanced Education (CIPAE), Ottawa, ON, Canada, 26–28 August 2024; pp. 150–155. [Google Scholar]
  45. Zhang, Y.; Xia, C.; Zhang, X.; Cheng, X.; Feng, G.; Wang, Y.; Gao, Q. Estimating the Maize Biomass by Crop Height and Narrowband Vegetation Indices Derived from UAV-Based Hyperspectral Images. Ecol. Indic. 2021, 129, 107985. [Google Scholar] [CrossRef]
  46. Chen, Y. Research on the Prediction of Boston House Price Based on Linear Regression, Random Rorest, Xgboost and SVM Models. Highlights Bus. Econ. Manag. 2023, 21, 27–37. [Google Scholar] [CrossRef]
  47. Guan, Q.; Zhao, R.; Wang, F.; Pan, N.; Yang, L.; Song, N.; Xu, C.; Lin, J. Prediction of Heavy Metals in Soils of an Arid Area Based on Multi-Spectral Data. J. Environ. Manag. 2019, 243, 137–143. [Google Scholar] [CrossRef]
  48. Fang, J.; Tai, D. Evaluation of Mutual Information, Genetic Algorithm and SVR for Feature Selection in QSAR Regression. Curr. Drug Discov. Technol. 2011, 8, 107–111. [Google Scholar] [CrossRef] [PubMed]
  49. Wang, J.; Zhou, J.; Huang, W. Attend in Bands: Hyperspectral Band Weighting and Selection for Image Classification. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2019, 12, 4712–4727. [Google Scholar] [CrossRef]
  50. Zhang, Q.; Zhang, K.; Xu, D.; Yang, G.; Huang, H.; Nie, F.; Liu, C.; Yang, S. CuO Nanostructures: Synthesis, Characterization, Growth Mechanisms, Fundamental Properties, and Applications. Prog. Mater. Sci. 2014, 60, 208–337. [Google Scholar] [CrossRef]
  51. Bowles, J.F.W. The Iron Oxides: Structure, Properties Reactions Occurrence and Uses. Mineral. Mag. 1997, 61, 740–741. [Google Scholar] [CrossRef]
  52. Shi, T.; Chen, Y.; Liu, Y.; Wu, G. Visible and Near-Infrared Reflectance Spectroscopy—An Alternative for Monitoring Soil Contamination by Heavy Metals. J. Hazard. Mater. 2014, 265, 166–176. [Google Scholar] [CrossRef]
  53. Butsch, K.; Haseloer, A.; Schmitz, S.; Ott, I.; Schur, J.; Klein, A. FeIII, CuII and ZnII Complexes of the Rigid 9-Oxido-Phenalenone Ligand—Spectroscopy, Electrochemistry, and Cytotoxic Properties. Int. J. Mol. Sci. 2021, 22, 3976. [Google Scholar] [CrossRef]
  54. Nasse, J.-M.; Eger, P.G.; Pöhler, D.; Schmitt, S.; Frieß, U.; Platt, U. Recent Improvements of Long-Path DOAS Measurements: Impact on Accuracy and Stability of Short-Term and Automated Long-Term Observations. Atmos. Meas. Tech. 2019, 12, 4149–4169. [Google Scholar] [CrossRef]
  55. Lin, Y.; Gao, J.; Tu, Y.; Zhang, Y.; Gao, J. Estimating Low Concentration Heavy Metals in Water through Hyperspectral Analysis and Genetic Algorithm-Partial Least Squares Regression. Sci. Total Environ. 2024, 916, 170225. [Google Scholar] [CrossRef] [PubMed]
Figure 1. Flowchart of the proposed hyperspectral-based method for estimating wear metal content in lubricating oil.
Figure 1. Flowchart of the proposed hyperspectral-based method for estimating wear metal content in lubricating oil.
Lubricants 13 00393 g001
Figure 2. Schematic diagram of the GLT optical fiber spectrometer measurement system.
Figure 2. Schematic diagram of the GLT optical fiber spectrometer measurement system.
Lubricants 13 00393 g002
Figure 3. Raw spectral curves of lubricating oil samples were acquired using two instruments: (a) GLT optical fiber spectrometer; (b) Hach UV-Vis spectrophotometer.
Figure 3. Raw spectral curves of lubricating oil samples were acquired using two instruments: (a) GLT optical fiber spectrometer; (b) Hach UV-Vis spectrophotometer.
Lubricants 13 00393 g003
Figure 4. Comparison of local spectral curves of Hach data before and after preprocessing: (a) raw spectra; (b) denoised and normalized spectra.
Figure 4. Comparison of local spectral curves of Hach data before and after preprocessing: (a) raw spectra; (b) denoised and normalized spectra.
Lubricants 13 00393 g004
Figure 5. Schematic diagram of the proposed multi-head attention enhanced genetic algorithm (MHA-GA) framework.
Figure 5. Schematic diagram of the proposed multi-head attention enhanced genetic algorithm (MHA-GA) framework.
Lubricants 13 00393 g005
Figure 6. Structure of the multi-head spectral attention module.
Figure 6. Structure of the multi-head spectral attention module.
Lubricants 13 00393 g006
Figure 7. Concentration distribution of wear metals in lubricating oil samples: (a) Fe concentration; (b) Cu concentration.
Figure 7. Concentration distribution of wear metals in lubricating oil samples: (a) Fe concentration; (b) Cu concentration.
Lubricants 13 00393 g007
Figure 8. Comparison of model prediction accuracy by different modeling Methods: (af) correspond to the data from the Hach UV–Vis spectrophotometer, (gl) correspond to the data from the GLT device, (ac,gi) show the estimation results for Fe concentrations, (df,jl) show the estimation results for Cu concentrations.
Figure 8. Comparison of model prediction accuracy by different modeling Methods: (af) correspond to the data from the Hach UV–Vis spectrophotometer, (gl) correspond to the data from the GLT device, (ac,gi) show the estimation results for Fe concentrations, (df,jl) show the estimation results for Cu concentrations.
Lubricants 13 00393 g008
Figure 9. Comparison of model prediction accuracy by different feature selection methods: (af) correspond to the data from the Hach UV–Vis spectrophotometer, (gl) correspond to the data from the GLT device, (ac,gi) show the estimation results for Fe concentrations, (df,jl) show the estimation results for Cu concentrations.
Figure 9. Comparison of model prediction accuracy by different feature selection methods: (af) correspond to the data from the Hach UV–Vis spectrophotometer, (gl) correspond to the data from the GLT device, (ac,gi) show the estimation results for Fe concentrations, (df,jl) show the estimation results for Cu concentrations.
Lubricants 13 00393 g009
Figure 10. Distribution of selected spectral bands: (a,b) correspond to data from the Hach spectrophotometer, (c,d) correspond to data from the GLT spectrometer.
Figure 10. Distribution of selected spectral bands: (a,b) correspond to data from the Hach spectrophotometer, (c,d) correspond to data from the GLT spectrometer.
Lubricants 13 00393 g010
Figure 11. Relationship between the number of selected bands and fitness values: (a) Fe, (b) Cu.
Figure 11. Relationship between the number of selected bands and fitness values: (a) Fe, (b) Cu.
Lubricants 13 00393 g011
Figure 12. Prediction accuracy analysis of Na concentration: (a) based on the Hach dataset; (b) based on the GLT dataset.
Figure 12. Prediction accuracy analysis of Na concentration: (a) based on the Hach dataset; (b) based on the GLT dataset.
Lubricants 13 00393 g012
Table 1. Statistical summary of Iron and Copper concentrations in lubricating oil samples.
Table 1. Statistical summary of Iron and Copper concentrations in lubricating oil samples.
Metal TypeDataMax (ppm)Min (ppm)Median (ppm)Mean (ppm)SD
FeAll Samples52.351.354.8211.3613.14
Training Samples52.351.354.8211.5213.44
Test Samples40.981.444.8711.0312.51
CuAll Samples141.960.1353.0047.0840.20
Training Samples141.960.1353.0047.3240.70
Test Samples129.130.4352.9046.5639.15
Table 2. Estimation accuracy of wear metal concentrations using different modeling methods.
Table 2. Estimation accuracy of wear metal concentrations using different modeling methods.
SpectrometerMetal TypeModeling MethodR2 (c)eRMSE (c)/(%)eRPD (c)R2 (v)RMSE (v)/(%)RPD (v)
HachFeSVR0.962.695.000.903.963.16
RF0.982.046.580.903.933.18
XGBoost0.990.3440.020.962.385.38
CuSVR0.959.454.310.8515.062.62
RF0.967.755.260.8614.632.71
XGBoost0.959.384.340.9111.853.33
GLTFeSVR0.972.395.620.785.832.14
RF0.962.445.490.766.072.05
XGBoost0.943.274.100.933.203.90
CuSVR0.976.746.040.7419.801.98
RF0.958.664.700.7419.721.98
XGBoost0.976.366.390.8316.312.42
Table 3. Estimation accuracy of wear metal concentrations by different feature selection methods.
Table 3. Estimation accuracy of wear metal concentrations by different feature selection methods.
SpectrometerMetal
Type
Feature Selection MethodNumber of FeaturesR2 (c)eRMSE (c)/(%)eRPD (c)R2 (v)eRMSE (v)/(%)eRPD (v)
HachFeGA1820.990.9614.060.923.523.55
CARS880.972.295.870.923.483.59
MHA-GA800.990.3440.02 0.96 2.385.38
CuGA1660.976.686.090.8316.022.44
CARS1090.967.135.710.8116.862.32
MHA-GA670.959.384.340.9111.853.33
GLTFeGA5470.962.685.010.805.502.27
CARS1250.962.655.070.795.662.21
MHA-GA1270.943.274.100.933.203.90
CuGA5900.9211.773.460.7618.972.06
CARS2270.958.474.810.7519.651.99
MHA-GA1130.976.366.390.8316.312.42
Table 4. Statistical summary of wear metal element concentrations in lubricating oil samples.
Table 4. Statistical summary of wear metal element concentrations in lubricating oil samples.
Metal TypeMax (ppm)Min (ppm)Median (ppm)Mean (ppm)SD
Na60.591.4619.9621.4514.60
Mg24.9911.9719.7419.492.90
Al4.620.651.781.900.74
P3.090.130.750.900.62
B4.270.321.281.651.00
Ni0.470.010.240.230.10
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Li, M.; Zhang, L.; Yuan, D.; Sun, X.; Tong, Q. A Hyperspectral Analysis-Based Approach for Estimation of Wear Metal Content in Lubricating Oil. Lubricants 2025, 13, 393. https://doi.org/10.3390/lubricants13090393

AMA Style

Li M, Zhang L, Yuan D, Sun X, Tong Q. A Hyperspectral Analysis-Based Approach for Estimation of Wear Metal Content in Lubricating Oil. Lubricants. 2025; 13(9):393. https://doi.org/10.3390/lubricants13090393

Chicago/Turabian Style

Li, Mengjie, Lifu Zhang, Deshuai Yuan, Xuejian Sun, and Qingxi Tong. 2025. "A Hyperspectral Analysis-Based Approach for Estimation of Wear Metal Content in Lubricating Oil" Lubricants 13, no. 9: 393. https://doi.org/10.3390/lubricants13090393

APA Style

Li, M., Zhang, L., Yuan, D., Sun, X., & Tong, Q. (2025). A Hyperspectral Analysis-Based Approach for Estimation of Wear Metal Content in Lubricating Oil. Lubricants, 13(9), 393. https://doi.org/10.3390/lubricants13090393

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop