An oc-svm-xgboost-based hierarchical fault diagnosis method and system
By using the hierarchical fault diagnosis method of OcSVM-XGBoost, which combines coarse and fine classification layers, the problems of high complexity in multi-scale fault decision-making, difficulty in parameter optimization, and insufficient robustness in noisy environments in bearing fault diagnosis are solved, and high-precision and highly interpretable fault identification is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NAVAL AVIATION UNIV
- Filing Date
- 2026-05-29
- Publication Date
- 2026-07-03
AI Technical Summary
Existing bearing fault diagnosis methods suffer from high decision complexity when dealing with multi-scale faults, difficulty in parameter optimization under small sample conditions, lack of interpretability of feature-fault mode correlation, and insufficient model robustness in noisy environments.
A hierarchical fault diagnosis method based on OctSVM-XGBoost is adopted. By combining coarse classification layer and fine classification layer, coarse-grained classification of fault parts is first performed, followed by fine-grained classification. The parameters are optimized by combining sparrow search algorithm to construct a hierarchical diagnosis model.
It effectively reduces the decision complexity of single-level classifiers, improves the stability and representativeness of feature selection, enhances the interpretability of fault modes, and improves the robustness of the model in noisy environments, especially for the recognition rate of low-proportion categories such as rolling body faults.
Smart Images

Figure CN122329686A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of bearing fault diagnosis technology, and particularly relates to a hierarchical fault diagnosis method and system based on OcSVM-XGBoost. Background Technology
[0002] As a core component of rotating machinery, bearing failure can lead to increased system vibration and energy loss, and in severe cases, equipment shutdown or even safety accidents. Statistics show that damage to the inner and outer rings accounts for over 90% of all bearing failures. While rolling element and cage failures account for a smaller percentage, they evolve rapidly and are highly dangerous. Research indicates that vibration signals induced by bearing failure exhibit significantly different characteristics from normal conditions in both the time and frequency domains. Outer ring failures show constant-period, constant-amplitude impacts in the time domain, while inner ring failures exhibit variable-amplitude waveforms due to rotational frequency modulation. Rolling element failures show characteristics of revolution frequency modulation. These unique signal patterns provide a theoretical basis for vibration-based fault diagnosis. By establishing a mapping relationship between vibration signal characteristics and fault locations, accurate identification of early-stage bearing failures can be achieved, which is a key technology for ensuring safe equipment operation and enabling predictive maintenance.
[0003] Currently, data-driven intelligent diagnostic methods have been widely applied in the field of bearing fault diagnosis. Existing technologies construct multi-dimensional feature spaces for fault classification by extracting time-domain features, frequency-domain features, and time-frequency-domain features. Support Vector Machines (SVMs) are widely used in binary classification tasks of bearing faults due to their powerful small-sample processing capabilities; ensemble learning methods such as Random Forests (RF) and Gradient Boosting Trees (XGBoost) effectively improve the accuracy of fault classification by constructing multi-decision tree ensemble models.
[0004] However, existing methods still face multiple technical bottlenecks in practical applications: traditional single-level classification models have high decision complexity when dealing with multi-scale faults and insufficient discrimination of similar fault modes; there is a large amount of redundant information in the high-dimensional feature space, and the evaluation of feature importance is greatly affected by the randomness of model training, resulting in unstable selection results; parameter optimization is difficult under small sample conditions, existing methods are highly sensitive to hyperparameters, and manual parameter tuning is prone to getting trapped in local optima; the correlation between features and fault modes lacks interpretable support, making it difficult to provide diagnostic basis at the mechanistic level; the robustness of the model decreases under noisy interference environments, and the recognition rate of categories with a low proportion, such as rolling body faults, is significantly lower than that of major fault parts.
[0005] Therefore, this invention provides a hierarchical fault diagnosis method and system based on OctSVM-XGBoost. Summary of the Invention
[0006] This invention provides a hierarchical fault diagnosis method and system based on OcSVM-XGBoost, which at least solves the problems of high decision complexity, difficulty in parameter optimization under small sample conditions, lack of interpretability of feature-fault mode association, and insufficient robustness of the model in noisy environments when single-level classification models deal with multi-scale faults.
[0007] In a first aspect, embodiments of this application provide a hierarchical fault diagnosis method based on OctSVM-XGBoost, the method comprising: Step S1: Obtain the original vibration signal of the bearing, and perform sliding window slicing on the original vibration signal to obtain vibration signal segments; Step S2: Extract a high-dimensional feature vector containing time-domain features, frequency-domain features, and time-frequency-domain features from the vibration signal segment, obtain the fault status identifier corresponding to the high-dimensional feature vector, the fault status identifier includes the fault location and fault size, and define the fault status identifier as a real label; Step S3: Bind the high-dimensional feature vector to its corresponding real label to obtain the input sample; Step S4: Input the input sample into the hierarchical diagnostic model to be trained to obtain a trained hierarchical diagnostic model; the trained hierarchical diagnostic model includes a coarse classification layer and a fine classification layer, and the output bearing fault diagnosis result includes the fault location and fault size; Step S5: Obtain the high-dimensional feature vector of the vibration signal segment of the bearing under test and input it into the trained hierarchical diagnostic model; Step S6: Perform coarse-grained classification on the high-dimensional feature vector of the vibration signal segment of the bearing under test through a coarse classification layer to obtain the fault location; Step S7: Based on the obtained fault location, select the fine classifier corresponding to the fault location through the fine classification layer, and perform fine-grained classification of the fault location through the fine classifier to obtain the fault size; Step S8: Output the fault diagnosis results of the bearing under test.
[0008] Furthermore, the expression for the input sample is:
[0009] in, Indicates the first High-dimensional feature vectors of vibration signal segments Indicates the first The true label of each vibration signal segment.
[0010] Further, step S6: The high-dimensional feature vector of the vibration signal segment of the bearing under test is coarsely classified using a coarse classification layer to obtain the fault location, specifically including: Step S61: Divide the fault diagnosis target into K coarse categories, and denote the set of coarse categories as . ,in, , Indicates the normal class. Indicates the rolling body fault class. Indicates an inner circle fault class. Indicates an outer ring fault type; Step S62: For each coarse classification category, train a coarse classification model OcSVM. The coarse classification model OcSVM maps the high-dimensional feature vector from the original feature space to the high-dimensional Hilbert space through a kernel function mapping, and constructs a hyperplane in the high-dimensional Hilbert space. The expression of the decision function of the coarse classification model OcSVM is:
[0011] in, Represents kernel function mapping, Denotes the hyperplane normal vector. Indicates hyperplane offset; Step S63: Input the high-dimensional feature vectors sequentially A coarse classification model, OcSVM, is used to calculate a set of decision values. The high-dimensional feature vectors are then assigned to the coarse classification categories with the largest decision values, yielding the coarse classification result, expressed as:
[0012] in, This represents the coarse classification result of the high-dimensional feature vectors; Step S64: Obtain the fault location based on the coarse classification determined by the coarse classification results.
[0013] Further, in step S7, based on the obtained fault location, a fine-classifier corresponding to the fault location is selected through a fine-classification layer. The fault location is then classified in a fine-grained manner by the fine-classifier to obtain the fault size. Specifically, this includes: Step S71: Select the fine classifier corresponding to the fault location and set the coarse classification. The included subcategories are:
[0014] in, This represents the number of subcategories within the coarse category; Indicates the first The fault location is the first Each fault size category, i.e., a sub-category; Indicates a normal state; This indicates rolling element failure in 7-inch, 14-inch, and 21-inch models. This indicates faults in 7-inch, 14-inch, and 21-inch models under the inner ring fault category. This indicates faults in 7-inch, 14-inch, and 21-inch models under the outer ring fault category. Step S72: For high-dimensional feature vectors belonging to the coarse classification, their high-dimensional feature vectors are input to the corresponding fine classifier, which has a built-in prediction model XGBoost. The prediction model XGBoost is composed of... The set of CART trees provides the probability that a high-dimensional feature vector belongs to each sub-category:
[0015] in, Represents the set of model parameters; Indicates the first Parameters of the trees; Indicates the first The prediction score of a tree for a high-dimensional feature vector belonging to a specific subcategory; Step S73: Determine the sub-category with the highest probability, and use the sub-category with the highest probability as the fine-grained classification result of the high-dimensional feature vector. Its expression is:
[0016] in, This represents the fine-grained classification result of the high-dimensional feature vector; Step S74: Obtain the fault size based on the subcategories determined by the fine-grained classification results.
[0017] Furthermore, step S72 also includes: the fine classifier optimizes its parameters by minimizing the regularization objective function.
[0018] in, Cross-entropy loss is used to measure the true label. With predictive labels Differences; For regular expressions, the expression is:
[0019] in, The tree complexity penalty coefficient, The leaf node weight penalty coefficient, For the first The weight of each leaf node.
[0020] Furthermore, the method also includes: The Sparrow Search Algorithm (SSA) is used to globally optimize the parameters of the coarse and fine classification layers.
[0021] Furthermore, the parameters of the coarse and fine classification layers are globally optimized using the Sparrow Search Algorithm (SSA), specifically including: Set the population size of the Sparrow Search Algorithm (SSA) to N, the optimization dimension to D, and the maximum number of iterations to T; The position of each individual is represented as Its fitness value is ; The penalty coefficient and kernel function parameters of the coarse classification model OcSVM in the coarse classification layer are optimized, and its parameter search space is defined as follows:
[0022] in, This represents the penalty coefficient parameter; Represents kernel function parameters; The optimization objective is to maximize the accuracy of coarse classification, and its expression is:
[0023] in, This indicates an indicator function; its value is 1 if the classification is correct, and 0 otherwise. Indicates the first The coarse classification result corresponding to each high-dimensional feature vector; Indicates the first The labels of the actual fault locations corresponding to each high-dimensional feature vector; The learning rate of the XGBoost prediction model in the fine classification layer Maximum depth Subsampling rate Column sampling rate Number of trees To optimize, its parameter search space is defined as:
[0024] The optimization objective is to maximize the cross-validation accuracy of the subcategories, and its expression is:
[0025] in, For the first Classification accuracy of cross-validation; The Sparrow Search Algorithm (SSA) simulates the foraging and vigilance behavior of a sparrow flock. It performs global optimization within a defined parameter search space through the collaborative search of three types of individuals: discoverers, joiners, and vigilants. After iteration, the location of the individual with the best fitness value is output and decoded into the optimal hyperparameter combination of the coarse classification model OcSVM and the prediction model XGBoost. The optimal hyperparameter combination obtained by using the Sparrow Search Algorithm (SSA) is used to retrain the coarse classification model OctSVM and the prediction model XGBoost, forming an optimized hierarchical diagnostic model.
[0026] Furthermore, through collaborative search by three types of individuals—discoverers, participants, and vigilants—global optimization is performed within the defined parameter search space, specifically including: The discoverer expanded the parameter search space using random walks; Joiners achieve partial development by following the discoverers; The vigilant avoids local optima by perturbing.
[0027] Furthermore, the discoverer expands the parameter search space through random walks, the expression of which is:
[0028] in, This represents the current iteration number. The maximum number of iterations, , It is a random number. As a safety threshold, Normally distributed random numbers, for 1-dimensional unit vector; Joiners achieve partial development by following discoverers, as expressed in the following expression:
[0029] in, For the first The first globally optimal individual Dimensional position, For the first The worst individual in the world Dimensional position, for 3D random vector, It is a pseudo-inverse matrix; The vigilant avoids local optima through perturbation, expressed as:
[0030] in, Step size factor As a direction factor, For the first Average fitness of the population across generations For the first The worst fitness of the generation, It is a local minimum.
[0031] Secondly, embodiments of this application also provide a system for applying the hierarchical fault diagnosis method based on OcSVM-XGBoost as described in the above aspects, the system comprising: The data acquisition module is used to acquire the original vibration signal of the bearing, and to perform sliding window slicing on the original vibration signal to obtain vibration signal segments; The data processing module is used to extract a high-dimensional feature vector containing time-domain features, frequency-domain features, and time-frequency-domain features from the vibration signal segment, obtain the fault status identifier corresponding to the high-dimensional feature vector, the fault status identifier including the fault location and fault size, and define the fault status identifier as a real label. The sample construction module is used to bind high-dimensional feature vectors with their corresponding real labels to obtain input samples; The model training module is used to input the input samples into the hierarchical diagnostic model to be trained, and to obtain a trained hierarchical diagnostic model. The trained hierarchical diagnostic model includes a coarse classification layer and a fine classification layer, and the output bearing fault diagnosis results include the fault location and fault size. The model input module is used to obtain the high-dimensional feature vector of the vibration signal segment of the bearing under test and input it into the trained hierarchical diagnostic model. The coarse classification diagnostic module is used to perform coarse-grained classification of the high-dimensional feature vector of the vibration signal segment of the bearing under test through the coarse classification layer to obtain the fault location; The fine classification diagnostic module is used to select the fine classifier corresponding to the fault location based on the obtained fault location through the fine classification layer, and then perform fine-grained classification of the fault location through the fine classifier to obtain the fault size. The fault diagnosis output module is used to output the fault diagnosis results of the bearing under test.
[0032] As can be seen from the above technical solutions, the present invention has the following advantages: The hierarchical fault diagnosis method based on OctSVM-XGBoost provided in this application adopts a hierarchical diagnosis architecture that combines coarse classification layers and fine classification layers. High-dimensional feature vectors are input into the trained hierarchical diagnosis model. First, the coarse classification layer performs coarse-grained classification of the fault parts, and then the fine classification layer performs fine-grained classification of the fault parts to obtain the fault size. This effectively reduces the decision dimension and category interference of the single-level classifier and solves the problems of high decision complexity and insufficient discrimination of similar fault modes in traditional single-level classification models when dealing with multi-scale faults.
[0033] By utilizing high-dimensional feature vectors containing time-domain, frequency-domain, and time-frequency-domain features extracted from vibration signal segments, and combining them with their corresponding real labels to construct input samples, the feature extraction process covers multi-domain information, reduces the influence of redundant information in the high-dimensional feature space, improves the stability and representativeness of feature selection, and overcomes the limitation of traditional methods where feature importance assessment is greatly affected by the randomness of model training.
[0034] The trained hierarchical diagnostic model processes high-dimensional feature vectors sequentially through coarse and fine classification layers, ultimately outputting a predicted label containing the fault location and size. The entire process eliminates the need for complex manual parameter adjustments, significantly reducing the sensitivity to hyperparameters under small sample conditions and avoiding the situation where manual parameter tuning can easily fall into local optima.
[0035] This hierarchical fault diagnosis method determines the fault location through a coarse classification layer and then performs fine-grained classification, which makes the fault diagnosis process have a clear logical hierarchy, enhances the interpretability of the correlation between features and fault modes, provides effective support for mechanism-level diagnosis, and improves the problem of lack of interpretability of feature-fault mode correlation in traditional methods.
[0036] By employing a hierarchical processing strategy, this hierarchical fault diagnosis method can robustly classify major categories first through a coarse classification layer and then perform fine identification in a fine classification layer when facing noise interference. This improves the robustness of the model in noisy environments, especially for categories with a low proportion such as rolling body faults, and can maintain a high recognition rate. This overcomes the shortcomings of traditional methods where model performance degrades under noise interference. Attached Figure Description
[0037] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 This is a flowchart of the hierarchical fault diagnosis method based on OctSVM-XGBoost described in this invention. Detailed Implementation
[0039] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0040] This application provides a hierarchical fault diagnosis method and system based on OctSVM-XGBoost, which solves the technical problem of urgently needing a bearing intelligent fault diagnosis scheme that achieves high accuracy, strong interpretability and can adapt to small sample conditions.
[0041] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0042] Figure 1 This is a flowchart illustrating a hierarchical fault diagnosis method based on OctSVM-XGBoost, provided as an embodiment of this application. Figure 1 As shown in the figure, the hierarchical fault diagnosis method based on OcSVM-XGBoost provided in this application embodiment specifically includes the following steps: Step S1: Obtain the original vibration signal of the bearing, and perform sliding window slicing on the original vibration signal to obtain vibration signal segments; Step S2: Extract a high-dimensional feature vector containing time-domain features, frequency-domain features, and time-frequency-domain features from the vibration signal segment, obtain the fault status identifier corresponding to the high-dimensional feature vector, the fault status identifier includes the fault location and fault size, and define the fault status identifier as a real label; It should be noted that the true label is a predefined fault state identifier corresponding to a high-dimensional feature vector extracted from the vibration signal segment of the bearing. It serves as a benchmark for evaluating the accuracy of the model's prediction results. The true label contains information in two dimensions: the location of the fault and the size of the fault.
[0043] Step S3: Bind the high-dimensional feature vector to its corresponding real label to obtain the input sample; In practical implementation, several input samples are combined to form an input sample set, the expression of which is:
[0044] in, Indicates the input sample set, Indicates the first One input sample, Indicates the first High-dimensional feature vectors of vibration signal segments Indicates the first The true label of each vibration signal segment This represents the total number of samples in the sample set, i.e., the number of vibration signal segments. High-dimensional space features , where d is the feature dimension.
[0045] Step S4: Input the input sample into the hierarchical diagnostic model to be trained to obtain a trained hierarchical diagnostic model; the trained hierarchical diagnostic model includes a coarse classification layer and a fine classification layer, and the output bearing fault diagnosis result includes the fault location and fault size; Step S5: Obtain the high-dimensional feature vector of the vibration signal segment of the bearing under test and input it into the trained hierarchical diagnostic model; Step S6: Perform coarse-grained classification on the high-dimensional feature vector of the vibration signal segment of the bearing under test through a coarse classification layer to obtain the fault location; The high-dimensional feature vector is coarsely classified using a coarse classification layer (OcSVM) of multiple single-class support vector machines to obtain the fault location; Step S7: Based on the obtained fault location, select the fine classifier corresponding to the fault location through the fine classification layer, and perform fine-grained classification of the fault location through the fine classifier to obtain the fault size; Based on the obtained fault location, a corresponding fine classifier is selected to perform fine-grained classification on the high-dimensional feature vector to obtain the fault size; Accurate fault identification is achieved through coarse classification layer and fine classification layer. The coarse classification layer, OcSVM, completes coarse-grained classification according to fault location, and then XGBoost is used to finely classify the fault size within the coarse classification, effectively reducing the decision dimension and category interference of single-level classifier.
[0046] Step S8: Output the fault diagnosis results of the bearing under test.
[0047] This invention first determines the fault location through a coarse classification layer, then inputs the high-dimensional feature vector into the fine classifier corresponding to the fault location, and outputs the final fault location and fault size label to complete the hierarchical and accurate diagnosis of bearing faults.
[0048] Furthermore, as a refinement and extension of the specific implementation of the above embodiments, in order to fully illustrate the specific implementation process in this embodiment, another hierarchical fault diagnosis method based on OcSVM-XGBoost is provided. In step S6, the high-dimensional feature vector of the vibration signal segment of the bearing under test is coarsely classified by a coarse classification layer to obtain the fault location, specifically including: Step S61: Divide the fault diagnosis target into K coarse categories, and denote the set of coarse categories as . ,in, , Indicates the normal class. Indicates the rolling body fault class. Indicates an inner circle fault class. Indicates an outer ring fault type; Step S62: For each coarse classification category, train a coarse classification model OcSVM. The coarse classification model OcSVM maps the high-dimensional feature vector from the original feature space to the high-dimensional Hilbert space through a kernel function mapping, and constructs a hyperplane in the high-dimensional Hilbert space. The expression of the decision function of the coarse classification model OcSVM is:
[0049] in, Represents kernel function mapping, Denotes the hyperplane normal vector. Indicates hyperplane offset; Step S63: For the high-dimensional feature vector to be diagnosed, input the high-dimensional feature vector sequentially. A coarse classification model, OcSVM, is used to calculate a set of decision values. The high-dimensional feature vectors are then assigned to the coarse classification categories with the largest decision values, yielding the coarse classification result, expressed as:
[0050] in, This represents the coarse classification result of the high-dimensional feature vectors; Step S64: Obtain the fault location based on the coarse classification determined by the coarse classification results.
[0051] The goal of the coarse classification layer is to divide the fault diagnosis targets into Let there be coarse categories, and denote the set of coarse categories as... ,in, , Indicates the normal class. Indicates the rolling body fault class. Indicates an inner circle fault class. This indicates a fault in the outer ring.
[0052] For each coarse category, a coarse classification model is trained. This model maps high-dimensional feature vectors from the original feature space to a high-dimensional Hilbert space using a kernel function, and constructs a hyperplane in the high-dimensional Hilbert space. The expression for the decision function of the coarse classification model is:
[0053] in, Represents kernel function mapping, ,in, Represents the original feature space. Represents the high-dimensional Hilbert space. Denotes the hyperplane normal vector. Indicates hyperplane bias, when At that time, the high-dimensional feature vector is determined to be a potential member. Rental; In practical classification, for a high-dimensional feature vector, its decision values on all K coarse classification models need to be calculated to obtain a set of decision values. The high-dimensional feature vectors are then assigned to the coarse category with the largest decision value.
[0054] in, This represents the coarse classification result of the high-dimensional feature vector, i.e., the fault location.
[0055] This strategy transforms complex multi-class classification problems into... This approach addresses the binary classification problem, effectively reducing the decision complexity in the coarse classification stage while also being suitable for scenarios with scarce target class samples.
[0056] The coarse classification layer divides the high-dimensional feature vectors into predefined coarse fault categories, providing a decision basis for subsequent fine classification. The coarse classification layer uses the coarse classification model OcSVM to achieve coarse-grained classification. Specifically, it maps samples to a high-dimensional Hilbert space through kernel function mapping, constructs an optimal hyperplane to separate the target class and non-target class, and determines the class based on the positional relationship of the sample relative to the hyperplane.
[0057] In an exemplary embodiment, step S7 involves selecting a fine classifier corresponding to the obtained fault location through a fine classification layer, and performing fine-grained classification of the fault location using the fine classifier to obtain the fault size. Specifically, this includes: Step S71: Select the fine classifier corresponding to the fault location and set the coarse classification. The included subcategories are:
[0058] in, This represents the number of subcategories within the coarse category; Indicates the first The fault location is the first Each fault size category, i.e., a sub-category; Indicates a normal state; This indicates rolling element failure in 7-inch, 14-inch, and 21-inch models. This indicates faults in 7-inch, 14-inch, and 21-inch models under the inner ring fault category. This indicates faults in 7-inch, 14-inch, and 21-inch models under the outer ring fault category. Step S72: For high-dimensional feature vectors belonging to the coarse classification, their high-dimensional feature vectors are input to the corresponding fine classifier, which has a built-in prediction model XGBoost. The prediction model XGBoost is composed of... It is composed of a set of CART trees, and the high-dimensional feature vectors belong to each sub-category. The probability is:
[0059] in, Represents the set of model parameters; Indicates the first Parameters of the trees; Indicates the first The prediction score of a tree for a high-dimensional feature vector belonging to a specific subcategory; Step S73: Determine the sub-category with the highest probability, and use the sub-category with the highest probability as the fine-grained classification result of the high-dimensional feature vector. Its expression is:
[0060] in, This represents the fine-grained classification result of the high-dimensional feature vector; Step S74: Obtain the fault size based on the subcategories determined by the fine-grained classification results.
[0061] According to another embodiment of the present invention, step S72 further includes: the fine classifier optimizes its parameters by minimizing the regularization objective function.
[0062] in, Cross-entropy loss is used to measure the true label. With predictive labels Differences; For regular expressions, the expression is:
[0063] in, The tree complexity penalty coefficient, The leaf node weight penalty coefficient, For the first The weights of each leaf node can be adjusted using regularization terms to effectively prevent overfitting in the prediction model.
[0064] According to embodiments of this application, the method further includes: The Sparrow Search Algorithm (SSA) is used to globally optimize the parameters of the coarse and fine classification layers.
[0065] The Sparrow Search Algorithm (SSA) is used to globally and collaboratively optimize the 11-dimensional hyperparameters of the coarse and fine classification layers. Specifically, the SSA algorithm is introduced to globally optimize the parameters of the coarse classification model (OcSVM) in the coarse classification layer and the prediction model (XGBoost) in the fine classification layer, thereby improving parameter adaptability and enhancing the classification accuracy and stability of the model in small sample scenarios.
[0066] In one embodiment, the parameters of the coarse and fine classification layers are globally optimized using the Sparrow Search Algorithm (SSA), specifically including: The Sparrow Search Algorithm (SSA) is optimized by simulating the foraging and vigilance behaviors of a sparrow flock. Individuals in the population are divided into three categories: discoverers, joiners, and vigilants. The population size of the SSA algorithm is set to N, the optimization dimension to D, and the maximum number of iterations to T. The position of each individual is represented as Its fitness value is ; The penalty coefficient and kernel function parameters of the coarse classification model OcSVM in the coarse classification layer are optimized, and its parameter search space is defined as follows:
[0067] in, This represents the penalty coefficient parameter; Represents kernel function parameters; The optimization objective is to maximize the accuracy of coarse classification, and its expression is:
[0068] in, This indicates an indicator function; its value is 1 if the classification is correct, and 0 otherwise. Indicates the first The coarse classification result corresponding to each high-dimensional feature vector; Indicates the first The labels of the actual fault locations corresponding to each high-dimensional feature vector; The learning rate of the XGBoost prediction model in the fine classification layer Maximum depth Subsampling rate Column sampling rate Number of trees To optimize, its parameter search space is defined as:
[0069] The optimization objective is to maximize the cross-validation accuracy of the subcategories, and its expression is:
[0070] in, For the first Classification accuracy of cross-validation; The Sparrow Search Algorithm (SSA) simulates the foraging and vigilance behavior of a sparrow flock. It performs global optimization within a defined parameter search space through the collaborative search of three types of individuals: discoverers, joiners, and vigilants. After iteration, the location of the individual with the best fitness value is output and decoded into the optimal hyperparameter combination of the coarse classification model OcSVM and the prediction model XGBoost. The optimal hyperparameter combination obtained by using the Sparrow Search Algorithm (SSA) is used to retrain the coarse classification model OctSVM and the prediction model XGBoost, forming an optimized hierarchical diagnostic model.
[0071] By employing the Sparrow Search Algorithm (SSA) to collaboratively optimize key parameters of the coarse and fine classification layers, the classification accuracy and stability of the model under small sample conditions were significantly improved. The optimization process effectively avoided the subjectivity and local optima issues inherent in manual parameter tuning through dynamic adjustment of the parameter search strategy.
[0072] As an example, through collaborative search by three types of individuals—discoverers, participants, and vigilants—global optimization is performed within a defined parameter search space, specifically including: The discoverer expands the parameter search space using random walks, expressed as:
[0073] in, This represents the current iteration number. The maximum number of iterations, , It is a random number. As a safety threshold, Normally distributed random numbers, for 1-dimensional unit vector; Joiners achieve partial development by following discoverers, as expressed in the following expression:
[0074] in, For the first The first globally optimal individual Dimensional position, For the first The worst individual in the world Dimensional position, for 3D random vector, It is a pseudo-inverse matrix; The vigilant avoids local optima through perturbation, expressed as:
[0075] in, Step size factor As a direction factor, For the first Average fitness of the population across generations For the first The worst fitness of the generation, It is a local minimum.
[0076] Through the random walk of the discoverer, the follow-up development of the joiner, and the perturbation mechanism of the watcher, the Sparrow Search algorithm can dynamically adjust its search strategy in a complex parameter space, avoid premature convergence, and ensure that it finds a hyperparameter combination close to the global optimum.
[0077] The present invention also provides a hierarchical fault diagnosis system for OcSVM-XGBoost, the system comprising: The data acquisition module is used to acquire the original vibration signal of the bearing, and to perform sliding window slicing on the original vibration signal to obtain vibration signal segments; The data processing module is used to extract a high-dimensional feature vector containing time-domain features, frequency-domain features, and time-frequency-domain features from the vibration signal segment, obtain the fault status identifier corresponding to the high-dimensional feature vector, the fault status identifier including the fault location and fault size, and define the fault status identifier as a real label. The sample construction module is used to bind high-dimensional feature vectors with their corresponding real labels to obtain input samples; The model training module is used to input the input samples into the hierarchical diagnostic model to be trained, and to obtain a trained hierarchical diagnostic model. The trained hierarchical diagnostic model includes a coarse classification layer and a fine classification layer, and the output bearing fault diagnosis results include the fault location and fault size. The model input module is used to obtain the high-dimensional feature vector of the vibration signal segment of the bearing under test and input it into the trained hierarchical diagnostic model. The coarse classification diagnostic module is used to perform coarse-grained classification of the high-dimensional feature vector of the vibration signal segment of the bearing under test through the coarse classification layer to obtain the fault location; The fine classification diagnostic module is used to select the fine classifier corresponding to the fault location based on the obtained fault location through the fine classification layer, and then perform fine-grained classification of the fault location through the fine classifier to obtain the fault size. The fault diagnosis output module is used to output the fault diagnosis results of the bearing under test.
[0078] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0079] Any changes, modifications, substitutions, and variations made to the embodiments without departing from the principles and spirit of the present invention still fall within the protection scope of the present invention.
Claims
1. A hierarchical fault diagnosis method based on OcSVM-XGBoost, characterized in that, The method includes: Step S1: Obtain the original vibration signal of the bearing, and perform sliding window slicing on the original vibration signal to obtain vibration signal segments; Step S2: Extract a high-dimensional feature vector containing time-domain features, frequency-domain features, and time-frequency-domain features from the vibration signal segment, obtain the fault status identifier corresponding to the high-dimensional feature vector, the fault status identifier includes the fault location and fault size, and define the fault status identifier as a real label; Step S3: Bind the high-dimensional feature vector to its corresponding real label to obtain the input sample; Step S4: Input the input sample into the hierarchical diagnostic model to be trained to obtain a trained hierarchical diagnostic model; the trained hierarchical diagnostic model includes a coarse classification layer and a fine classification layer, and the output bearing fault diagnosis result includes the fault location and fault size; Step S5: Obtain the high-dimensional feature vector of the vibration signal segment of the bearing under test and input it into the trained hierarchical diagnostic model; Step S6: Perform coarse-grained classification on the high-dimensional feature vector of the vibration signal segment of the bearing under test through a coarse classification layer to obtain the fault location; Step S7: Based on the obtained fault location, select the fine classifier corresponding to the fault location through the fine classification layer, and perform fine-grained classification of the fault location through the fine classifier to obtain the fault size; Step S8: Output the fault diagnosis results of the bearing under test.
2. The method of claim 1, wherein, The expression for the input sample is: wherein, represents a high-dimensional feature vector of the th vibration signal segment, represents a true label of the th vibration signal segment.
3. The method as described in claim 2, characterized in that, Step S6: Perform coarse-grained classification on the high-dimensional feature vector of the vibration signal segment of the bearing under test through a coarse classification layer to obtain the fault location, specifically including: Step S61: Divide the fault diagnosis target into Let there be coarse categories, and denote the set of coarse categories as... ,in, , Indicates the normal class. Indicates the rolling body fault class. Indicates an inner circle fault class. Indicates an outer ring fault type; Step S62: For each coarse classification category, train a coarse classification model OcSVM. The coarse classification model OcSVM maps the high-dimensional feature vector from the original feature space to the high-dimensional Hilbert space through a kernel function mapping, and constructs a hyperplane in the high-dimensional Hilbert space. The expression of the decision function of the coarse classification model OcSVM is: in, Represents kernel function mapping, Denotes the hyperplane normal vector. Indicates hyperplane offset; Step S63: Input the high-dimensional feature vectors sequentially A coarse classification model, OcSVM, is used to calculate a set of decision values. The high-dimensional feature vectors are then assigned to the coarse classification categories with the largest decision values, yielding the coarse classification result, expressed as: in, This represents the coarse classification result of the high-dimensional feature vectors; Step S64: Obtain the fault location based on the coarse classification determined by the coarse classification results.
4. The method as described in claim 3, characterized in that, In step S7, based on the obtained fault location, a fine-classifier is selected according to the fine-classification layer. The fine-classifier performs fine-grained classification of the fault location to obtain the fault size. Specifically, this includes: Step S71: Select the fine classifier corresponding to the fault location and set the coarse classification. The included subcategories are: in, This represents the number of subcategories within the coarse category; Indicates the first The fault location is the first Each fault size category, i.e., a sub-category; Indicates a normal state; This indicates rolling element failure in 7-inch, 14-inch, and 21-inch models. This indicates faults in 7-inch, 14-inch, and 21-inch models under the inner ring fault category. This indicates faults in 7-inch, 14-inch, and 21-inch models under the outer ring fault category. Step S72: For high-dimensional feature vectors belonging to the coarse classification, their high-dimensional feature vectors are input to the corresponding fine classifier, which has a built-in prediction model XGBoost. The prediction model XGBoost is composed of... The set of CART trees provides the probability that a high-dimensional feature vector belongs to each sub-category: in, Represents the set of model parameters; Indicates the first Parameters of the trees; Indicates the first The prediction score of a tree for a high-dimensional feature vector belonging to a specific subcategory; Step S73: Determine the sub-category with the highest probability, and use the sub-category with the highest probability as the fine-grained classification result of the high-dimensional feature vector. Its expression is: in, This represents the fine-grained classification result of the high-dimensional feature vector; Step S74: Obtain the fault size based on the subcategories determined by the fine-grained classification results.
5. The method as described in claim 4, characterized in that, Step S72 also includes: the fine classifier optimizes its parameters by minimizing the regularization objective function. in, Cross-entropy loss is used to measure the true label. With predictive labels Differences; For regular expressions, the expression is: in, The tree complexity penalty coefficient, The leaf node weight penalty coefficient, For the first The weight of each leaf node.
6. The method as described in claim 5, characterized in that, The method further includes: The Sparrow Search Algorithm (SSA) is used to globally optimize the parameters of the coarse and fine classification layers.
7. The method as described in claim 6, characterized in that, The Sparrow Search Algorithm (SSA) is used to globally optimize the parameters of the coarse and fine classification layers, specifically including: Set the population size of the Sparrow Search Algorithm (SSA) to N, the optimization dimension to D, and the maximum number of iterations to T; The position of each individual is represented as Its fitness value is ; The penalty coefficient and kernel function parameters of the coarse classification model OcSVM in the coarse classification layer are optimized, and its parameter search space is defined as follows: in, This represents the penalty coefficient parameter; Represents kernel function parameters; The optimization objective is to maximize the accuracy of coarse classification, and its expression is: in, This indicates an indicator function; its value is 1 if the classification is correct, and 0 otherwise. Indicates the first The coarse classification result corresponding to each high-dimensional feature vector; Indicates the first The labels of the actual fault locations corresponding to each high-dimensional feature vector; The learning rate of the XGBoost prediction model in the fine classification layer Maximum depth Subsampling rate Column sampling rate Number of trees To optimize, its parameter search space is defined as: The optimization objective is to maximize the cross-validation accuracy of the subcategories, and its expression is: in, For the first Classification accuracy of cross-validation; The Sparrow Search Algorithm (SSA) simulates the foraging and vigilance behavior of a sparrow flock. It performs global optimization within a defined parameter search space through the collaborative search of three types of individuals: discoverers, joiners, and vigilants. After iteration, the location of the individual with the best fitness value is output and decoded into the optimal hyperparameter combination of the coarse classification model OcSVM and the prediction model XGBoost. The optimal hyperparameter combination obtained by using the Sparrow Search Algorithm (SSA) is used to retrain the coarse classification model OctSVM and the prediction model XGBoost, forming an optimized hierarchical diagnostic model.
8. The method as described in claim 7, characterized in that, Through collaborative search by three types of individuals—discoverers, participants, and vigilants—global optimization is performed within a defined parameter search space, specifically including: The discoverer expanded the parameter search space using random walks; Joiners achieve partial development by following the discoverers; The vigilant avoids local optima by perturbing.
9. The method as described in claim 8, characterized in that, The discoverer expands the parameter search space using random walks, expressed as: in, This represents the current iteration number. The maximum number of iterations, , It is a random number. As a safety threshold, Normally distributed random numbers, for 1-dimensional unit vector; Joiners achieve partial development by following discoverers, as expressed in the following expression: in, For the first The first globally optimal individual Dimensional position, For the first The worst individual in the world Dimensional position, for 3D random vector, It is a pseudo-inverse matrix; The vigilant avoids local optima through perturbation, expressed as: in, Step size factor As a direction factor, For the first Average fitness of the population across generations For the first The worst fitness of the generation, It is a local minimum.
10. A system applied to the hierarchical fault diagnosis method based on OctSVM-XGBoost as described in any one of claims 1-9, characterized in that, The system includes: The data acquisition module is used to acquire the original vibration signal of the bearing, and to perform sliding window slicing on the original vibration signal to obtain vibration signal segments; The data processing module is used to extract a high-dimensional feature vector containing time-domain features, frequency-domain features, and time-frequency-domain features from the vibration signal segment, obtain the fault status identifier corresponding to the high-dimensional feature vector, the fault status identifier including the fault location and fault size, and define the fault status identifier as a real label. The sample construction module is used to bind high-dimensional feature vectors with their corresponding real labels to obtain input samples; The model training module is used to input the input samples into the hierarchical diagnostic model to be trained, and to obtain a trained hierarchical diagnostic model. The trained hierarchical diagnostic model includes a coarse classification layer and a fine classification layer, and the output bearing fault diagnosis results include the fault location and fault size. The model input module is used to obtain the high-dimensional feature vector of the vibration signal segment of the bearing under test and input it into the trained hierarchical diagnostic model. The coarse classification diagnostic module is used to perform coarse-grained classification of the high-dimensional feature vector of the vibration signal segment of the bearing under test through the coarse classification layer to obtain the fault location; The fine classification diagnostic module is used to select the fine classifier corresponding to the fault location based on the obtained fault location through the fine classification layer, and then perform fine-grained classification of the fault location through the fine classifier to obtain the fault size. The fault diagnosis output module is used to output the fault diagnosis results of the bearing under test.