Robot unknown fault detection method based on residual neural network and isolation forest

CN118364356BActive Publication Date: 2026-09-25BEIJING INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410535086.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2026-09-25
Estimated Expiration
2044-04-30

AI Technical Summary

Technical Problem

上述问题在一定程度上限制了现有故障诊断技术在实际机器人故障诊断任务中的应用,因此,需要构建一种新的故障诊断模型,保证已知故障诊断准确率的同时还能够检测出潜在的未知故障类型,来实现更高效准确的机器人故障诊断效果

Benefits of technology

[0034](1)本发明创新性地提出采用孤立森林算法来进行未知故障检测,将一般用于判断正常还是故障的孤立森林算法,用于检测是否存在未知故障。该孤立森林算法利用待测数据样本的分类概率向量来判断待测样本是否异常,如果判断为正常,则表明输入的待测数据样本为已知故障;相应地,如果判断为异常,则表明待测数据样本为未知故障。本发明提出了正常-已知故障、异常-未知故障的对应关系,解决了传统故障诊断方法会将未知故障错分为已知故障的问题,提高了故障诊断的准确性与可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118364356B_ABST
    Figure CN118364356B_ABST
Patent Text Reader

Abstract

The disclosure provides a robot unknown fault detection method and system based on an isolation forest algorithm, the method comprising: step S1, feature extraction and classification are performed on a to-be-detected data sample of a robot, and a classification probability vector corresponding to the to-be-detected data sample is obtained; step S2, the classification probability vector is input into an isolation forest algorithm model, and an anomaly score of the to-be-detected data sample is calculated; step S3, the to-be-detected data sample whose anomaly score falls within an outlier range is determined to belong to an unknown fault; and the isolation forest algorithm model is trained by using classification probability vectors of known fault data. Using the present application can simultaneously realize diagnosis of known faults and detection of unknown faults, avoid misclassification of unknown faults as known faults, and further improve the reliability of fault diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fault diagnosis technology, and more specifically to a technology for detecting unknown faults in robots. Background Technology

[0002] With the continuous development of technologies such as artificial intelligence and navigation guidance, robots are increasingly being widely used in manufacturing, medical services, disaster relief, and other fields, playing a vital role. However, as tasks become more diverse and working environments more complex, the mechanical structure and control system of robots are becoming more sophisticated, integrated, and intelligent. A failure in any component can affect the stability of the entire robot system and may even cause significant losses of human, material, and financial resources. Therefore, fault detection and diagnosis for robots are essential.

[0003] Most existing fault diagnosis methods assume that the types and numbers of faults in the training and test sets are consistent and require a large amount of data to drive them. They typically achieve good results in diagnosing known faults. However, in actual robot operation, faults not seen during training—i.e., unknown faults—may occur. Without additional processing for unknown faults, traditional fault diagnosis methods may incorrectly identify them as known faults, significantly reducing the accuracy and reliability of fault diagnosis. These issues limit the application of existing fault diagnosis technologies in practical robot fault diagnosis tasks. Therefore, a new fault diagnosis model is needed to ensure accuracy in diagnosing known faults while also detecting potential unknown fault types, thereby achieving more efficient and accurate robot fault diagnosis. Summary of the Invention

[0004] In view of this, the present invention provides a robot unknown fault detection method and system based on the isolated forest algorithm, which aims to simultaneously diagnose known faults and detect unknown faults, avoid misclassifying unknown faults as known faults, and thus improve the reliability of fault diagnosis.

[0005] To solve the above-mentioned technical problems, the present invention is implemented as follows.

[0006] A method for detecting unknown faults in robots based on the isolated forest algorithm, comprising:

[0007] Step S1: Extract features and classify the robot's test data samples to obtain the classification probability vector corresponding to the test data samples;

[0008] Step S2: Input the classification probability vector into the isolated forest algorithm model to calculate the anomaly score of the data sample to be tested;

[0009] Step S3: Determine that the test data samples whose abnormal scores fall within the range of outliers belong to unknown faults; the isolated forest algorithm model is trained using the classification probability vector of known fault data.

[0010] Preferably, step S3 further includes: for the test data sample determined to be an unknown fault, using a clustering algorithm to determine the number of unknown fault types, indicating how many new faults have occurred.

[0011] Preferably, step S3 further includes: for test data samples whose abnormal scores do not fall within the abnormal value range, they are identified as known faults, and the classification result of step S1 is the fault classification result, further determining the fault location.

[0012] Preferably, in step S2, the abnormality score is calculated as follows:

[0013]

[0014] Where s(x,n) is the outlier score of data point x in n test data samples, E(h(x)) is the average path length of data point x in all isolated trees, n is the number of all test data samples, and c(n) is the average path length for constructing an isolated tree for n test data samples.

[0015] In step S3, if the anomaly score is less than 0, it is determined that the test data sample corresponding to the anomaly score belongs to an unknown fault.

[0016] Preferably, the clustering algorithm adopts a binary K-means clustering algorithm that introduces a silhouette coefficient; the K value with the best clustering effect is determined by the silhouette coefficient, that is, the number of unknown fault categories.

[0017] Preferably, the feature extraction in step S1 uses a residual neural network with an attention mechanism; fault classification and fault localization share the feature vector output by the residual neural network.

[0018] Preferably, in step S1, the method for obtaining the data sample to be tested is as follows: the robot's running data is collected by multiple sensors, the one-dimensional time series running data is spliced ​​into a two-dimensional matrix in a set order, standardized, and sliced ​​using the sliding window method to obtain multiple M×N matrix slices divided according to time, where M represents that each matrix slice includes M time lengths, and N represents that each matrix slice includes data collected by N sensors.

[0019] The present invention also provides a robot unknown fault detection system based on the isolated forest algorithm, including a feature extraction module, a fault classification module, a fault location module, an isolated forest algorithm module, and a clustering module;

[0020] The feature extraction module is used to extract features from the robot's test data samples and output feature vectors to the fault classification module and fault location module.

[0021] The fault classification module is used to generate a probability value of the test data sample belonging to a known fault category based on the feature vector; and output the classification probability vector to the isolated forest algorithm module.

[0022] The fault location module is used to generate a probability value of the test data sample belonging to a known fault category based on the characteristic vector, and to obtain the fault location corresponding to the test data sample.

[0023] The isolated forest algorithm module is used to input the classification probability vector into the isolated forest algorithm to calculate the anomaly score of the test data sample; if the anomaly score falls within the range of outliers, it is determined that the test data sample belongs to an unknown fault and is input to the clustering module; otherwise, it is determined that the test data sample belongs to a known fault, and the fault classification module and fault location module output the fault category and fault location; wherein, the isolated forest algorithm is trained using the classification probability vector of known fault data;

[0024] The clustering module is used to cluster the test data samples with unknown faults, determine the number of unknown fault types, and indicate how many new faults have occurred.

[0025] Preferably, the system further includes a training module; the training samples used in the training module are all known fault data; the training samples are input into the feature extraction module, and the extracted feature vectors are input into the fault classification module and the fault location module, and the trained fault classification module and fault location module are obtained through iterative training; the classification probability vectors corresponding to the training samples obtained by the fault classification module are input into the isolated forest algorithm for iterative training to obtain the trained isolated forest algorithm;

[0026] During the testing phase, the test samples contain new fault state data that have not appeared in the training set. The feature extraction module extracts the feature vector of the test sample and then obtains the classification probability vector of the test sample through the fault classification module. The classification probability vector is then input into the trained Isolation Forest algorithm.

[0027] Preferably, the outlier score is calculated in the isolated forest algorithm module as follows:

[0028]

[0029] Where s(x,n) is the outlier score of data point x in n test data samples, E(h(x)) is the average path length of data point x in all isolated trees, n is the number of all test data samples, and c(n) is the average path length for constructing an isolated tree for n samples;

[0030] If the anomaly score is less than 0, then the test data sample corresponding to the anomaly score is determined to be an unknown fault.

[0031] The clustering module employs a binary K-means clustering algorithm that incorporates a silhouette coefficient.

[0032] The feature extraction module employs a residual neural network with an attention mechanism.

[0033] Beneficial effects:

[0034] (1) This invention innovatively proposes the use of the Isolation Forest algorithm for unknown fault detection, applying the Isolation Forest algorithm, which is generally used to determine whether a data sample is normal or faulty, to detect the existence of unknown faults. This Isolation Forest algorithm uses the classification probability vector of the data sample to determine whether the sample is abnormal. If it is judged as normal, it indicates that the input data sample has a known fault; correspondingly, if it is judged as abnormal, it indicates that the data sample has an unknown fault. This invention proposes a correspondence between normal and known faults, and between abnormal and unknown faults, solving the problem that traditional fault diagnosis methods misclassify unknown faults as known faults, thus improving the accuracy and reliability of fault diagnosis.

[0035] (2) In a preferred embodiment of the present invention, a clustering algorithm is used to determine the number of unknown faults, providing new information for fault analysis and further improving the accuracy of fault diagnosis. In a preferred embodiment, the Bisecting K-Means clustering algorithm combined with the profile coefficient is used to cluster the identified unknown faults. This not only determines whether unknown faults have appeared in the test data sample, but also effectively identifies the number of new faults that have appeared in the test data sample.

[0036] (3) In a preferred embodiment, the result of the classic anomaly score calculation formula is inverted and then 0.5 is added to map the anomaly score to the range of -0.5 to 0.5, and 0 is used as the threshold boundary between normal and abnormal, with less than 0 being abnormal and greater than or equal to 0 being normal. The adjusted anomaly score calculation formula provides a more intuitive threshold selection method and anomaly score interpretability.

[0037] (4) In a preferred embodiment, the present invention introduces an attention mechanism while using a residual neural network for feature extraction, enabling the network to learn feature representations more deeply and effectively from different channels and different locations in space.

[0038] (5) In a preferred embodiment, a hard parameter sharing mechanism is adopted, that is, the fault classification task and the fault location task share a feature extraction module. After the feature extraction module, a fault classification module and a fault location module are retained. The parameters of the feature extraction module are shared by the two tasks, while the two tasks have their own separate output layers, thus achieving partial parameter hard sharing. In this embodiment, multi-task learning enables the feature extraction module to learn feature representations that are applicable to both fault classification and fault location tasks. Through mutual competition, sharing, complementarity, and constraint between the two tasks, the risk of overfitting the model on a single task is reduced, and the fault diagnosis effect is improved. Attached Figure Description

[0039] Figure 1 This diagram illustrates possible scenarios in a fault diagnosis task involving unknown faults.

[0040] Figure 2 This is a schematic diagram of the robot unknown fault detection method of the present invention;

[0041] Figure 3 This is a schematic diagram of the robot unknown fault detection system of the present invention;

[0042] Figure 4 This is a schematic diagram illustrating the specific process of the training and testing phases according to an embodiment of the present invention. Detailed Implementation

[0043] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments.

[0044] like Figure 1 As shown, due to the difficulty in collecting fault data and labeling samples, new faults, i.e., unknown faults, may occur in the real-world working scenarios of robots. If unknown faults are not distinguished during fault diagnosis, they may be mistakenly classified as known faults, leading to a decrease in fault diagnosis accuracy and misleading subsequent maintenance and repair, causing unnecessary losses.

[0045] Therefore, this invention provides a robot unknown fault detection method based on the isolated forest algorithm. The core idea of ​​this scheme is as follows: [See details]. Figure 2 :

[0046] Step S1: Extract features and classify the robot's test data samples to obtain the classification probability vector corresponding to the test data samples.

[0047] Step S2: Input the classification probability vector into the isolated forest algorithm model to calculate the anomaly score of the data sample to be tested.

[0048] Step S3: Determine whether the test data sample is abnormal based on whether the anomaly score falls within the outlier range. If it is normal, it indicates that the input test data sample belongs to a known fault; correspondingly, if it is judged to be abnormal, it indicates that the test data sample belongs to an unknown fault. Here, the isolated forest algorithm model is trained using the classification probability vector of known fault data (including normal state), which is easy to train.

[0049] Furthermore, step S3 may also include an unknown fault type identification operation: for test data samples identified as having unknown faults, a clustering algorithm is used to determine the number of unknown fault types, indicating how many new faults have occurred. And, for test data samples with known faults, a fault classification and further fault location can be output. The fault classification is determined based on the classification probability vector output in step S1.

[0050] As can be seen, this invention utilizes the Isolation Forest algorithm, typically used to distinguish between normal and faulty conditions, to detect the existence of unknown faults. Based on the correspondence between normal and known faults, and abnormal and unknown faults, unknown faults are identified according to the anomaly classification, allowing for targeted processing. This solves the problem of traditional fault diagnosis methods misclassifying unknown faults as known faults, improving the accuracy and reliability of fault diagnosis. Furthermore, the use of clustering algorithms to clarify the number of unknown faults provides new information for fault analysis, further enhancing the accuracy of fault diagnosis.

[0051] The following is combined Figure 3 and 4 This section details the specific implementation scheme of this method. Figure 3 The implementation system corresponding to the robot unknown fault detection method of the present invention is shown. This system is a fault diagnosis model, which specifically includes a feature extraction module, a fault classification module, a fault localization module, an isolated forest algorithm module, and a clustering module.

[0052] The feature extraction module is used to extract features from the robot's test data samples and output feature vectors to the fault classification module and fault location module.

[0053] The fault classification module generates probability values ​​for the test data samples belonging to known fault categories based on feature vectors; it outputs the classification probability vectors to the Isolation Forest algorithm module.

[0054] The fault location module is used to generate a probability value of the test data sample belonging to a known fault category based on the characteristic vector, and to obtain the fault location corresponding to the test data sample.

[0055] The isolated forest algorithm module is used to input the classification probability vector into the isolated forest algorithm to calculate the anomaly score of the test data sample; if the anomaly score falls within the range of outliers, it is determined that the test data sample belongs to an unknown fault and is input to the clustering module; otherwise, it is determined that the test data sample belongs to a known fault, and the fault classification module and fault location module output the fault category and fault location; wherein, the isolated forest algorithm is trained using the classification probability vector of known fault data;

[0056] The clustering module is used to cluster the test data samples with unknown faults, determine the number of unknown fault types, and indicate how many new faults have occurred.

[0057] The following is based on Figure 3 Based on the system, combined with Figure 4 The implementation process of the robot unknown fault detection method of the present invention is described in detail. Specifically, it includes the following steps:

[0058] Step 1: Obtain the robot's test data sample.

[0059] This step involves collecting robot operation data through multiple sensors and preprocessing the collected data samples to form an input format acceptable to the fault diagnosis model.

[0060] In a preferred embodiment, the robot's operation data is collected by multiple sensors, and the collected one-dimensional time series data is spliced ​​into a two-dimensional matrix in a certain order. The data is then standardized and divided into multiple M×N matrix slices according to time, where M represents that each matrix slice includes M time lengths and N represents that each matrix slice includes data collected by N sensors.

[0061] In this embodiment, the force sensor and displacement sensor data collected are from the end effector of the electric cylinder of the leg of the six-wheeled robot, which includes data under one normal state and four fault states.

[0062] The six-wheeled legged robot in this embodiment contains 36 electric cylinders, collecting data from 36 columns of force sensors and 36 columns of displacement sensors. The sensor data is arranged in a specific order, resulting in 36 columns of force sensor data and 36 columns of displacement sensor data with a fixed order. Since the two types of sensor data have different dimensions, standardization is required for better training results. This embodiment uses the Z-score standardization method, and its calculation formula is as follows:

[0063] x_o=(x-μ) / σ_x

[0064] Where x_o is the standardization result, x is the data before standardization, μ is the mean of the data to be standardized, and σ_x is the standard deviation of the data to be standardized.

[0065] After standardization, the force sensor data and displacement sensor data are horizontally concatenated in a specific order, resulting in 72 columns of data with a fixed order. Using all the sampled data during fault diagnosis would lead to excessive computation, hindering the learning and real-time diagnosis of the fault diagnosis model. Therefore, a sliding window method is used to slice the data. In this embodiment, the sliding window length is set to 72, resulting in multiple 72×72 data matrix slices used to assemble the subsequent dataset.

[0066] In this embodiment, data from the normal state and the two fault states are selected as the training set data, and all training set data are pre-labeled for subsequent supervised learning training. The test set data includes data from the normal state and the four fault states, i.e., it includes new fault state data that has not appeared in the training set, i.e., unknown fault state data, and the label information of the test set data is not visible to the fault diagnosis model. Note that the data from the normal state and the two fault states used in the training set do not overlap with the data from the normal state and the two fault states used in the test set, strictly avoiding data leakage.

[0067] Step 2, Feature Extraction: Input the preprocessed test data samples into the trained fault diagnosis model. As mentioned earlier, the entire fault diagnosis model includes a feature extraction module, a fault classification module, a fault location module, an isolated forest algorithm module, and a clustering module. First, the feature extraction module extracts features to obtain feature vectors.

[0068] In a preferred embodiment, the feature extraction module employs a residual neural network with an attention mechanism. This residual neural network extracts high-dimensional feature representations from the test data samples. By introducing residual blocks and residual connections, the residual neural network can learn feature representations more deeply and effectively; the introduction of channel attention and spatial attention also helps to enhance the extraction of feature representations from different channels and to obtain key information from different locations in space.

[0069] In a preferred embodiment, the residual neural network with attention mechanism adopts the ResNet-101 network, and the specific network structure is as follows:

[0070] ① A convolutional layer containing 64 7*7 convolutional kernels;

[0071] ② A max pooling layer with a window size of 3*3;

[0072] ③ There are 3 residual units, each residual unit includes: 64 convolutional layers with 1*1 kernels, 64 convolutional layers with 3*3 kernels, and 256 convolutional layers with 1*1 kernels.

[0073] ④ There are 4 residual units, each of which includes: 128 convolutional layers with 1*1 kernels, 128 convolutional layers with 3*3 kernels, and 512 convolutional layers with 1*1 kernels.

[0074] ⑤ There are 23 residual units, each of which includes: a convolutional layer with 256 1*1 kernels, a convolutional layer with 256 3*3 kernels, and a convolutional layer with 1024 1*1 kernels.

[0075] ⑥ There are 3 residual units, each residual unit includes: a convolutional layer with 512 1*1 kernels, a convolutional layer with 512 3*3 kernels, and a convolutional layer with 2048 1*1 kernels;

[0076] Finally, an adaptive mean pooling layer is added, enabling the feature extraction module to output feature maps of a specified size. This allows the feature extraction network to handle inputs of arbitrary size without affecting subsequent network connections. Attention mechanisms include channel attention and spatial attention, optimizing the feature extraction network from both channel and spatial perspectives, further improving the feature extraction module's performance in both areas. Additionally, normalization layers (Batch Normalization) and ReLU activation layers are placed between the convolutional layers to enhance network performance.

[0077] Step 3: Fault classification and fault location.

[0078] In the fault diagnosis model, the fault classification module performs fault classification, and the fault location module performs fault location. In practice, all feature vectors output by the fault extraction module can be input into the fault classification module for simultaneous classification; alternatively, all feature vectors output by the fault extraction module can be input into the fault classification module for processing first, while the fault location module remains inactive. When the Isolation Forest algorithm module distinguishes between unknown and known faults, the fault location module, based on the notification from the Isolation Forest algorithm module, processes only the data related to known faults.

[0079] like Figure 3 and Figure 4As shown, this invention splits the fault diagnosis task into two tasks: fault classification and fault location. Firstly, because robots can experience a wide variety of fault types and locations, diagnosing both fault type and location simultaneously involves numerous combinations. Using only a single classifier would significantly reduce accuracy, impacting the accuracy and reliability of fault diagnosis. For example, in this embodiment, there are normal states and four fault states. The six-wheeled robot contains 36 electric cylinders, resulting in 180 possible combinations of fault type and location. Using only a single classifier for all 180 categories would not only slow down computation but also affect classification accuracy. Secondly, compared to single-task learning, multi-task learning can learn more general feature representations, thereby reducing the risk of overfitting on a single task and improving the model's stability and generalization ability.

[0080] Two common methods in multi-task learning are hard sharing and soft sharing of hidden layer parameters. This embodiment adopts a hard sharing mechanism, where the fault classification task and the fault location task share a single feature extraction module. After the feature extraction module, a fault classification module and a fault location module are retained. The parameters of the feature extraction module are shared by both tasks, while each task has its own separate output layer, thus achieving partial parameter sharing. In this embodiment, multi-task learning enables the feature extraction module to learn feature representations applicable to both fault classification and fault location tasks. Through competition, sharing, complementarity, and constraint between the two tasks, the risk of overfitting the model on a single task is reduced, improving the fault diagnosis effect.

[0081] During the training phase, all data samples in the training set are known faults (including normal faults). The features extracted by the feature extraction module are input into the fault classification module and fault localization module, which consist of fully connected layers and activation function layers. Through iterative training, the trained fault classification module and fault localization module are obtained. Simultaneously, the fault classification module obtains the probability value of each data sample belonging to each category, forming a probability vector P. j =[p(x j )1,p(x j )2,…,p(x j ) k ], where x j Let p(x) represent the j-th data sample. j ) i This represents the probability that a data sample belongs to the i-th fault category, and k represents the number of known fault categories. Finally, the probability vector set of the training samples is input into the isolated forest model for iterative training to obtain the trained isolated forest model.

[0082] During the testing phase, the test data samples include known fault samples and unknown fault samples. The feature extraction module extracts the features of the test samples and then obtains the probability vector of the test samples through the fault classification module. The probability vector is then input into the trained isolated forest model, and the classification results of the isolated forest are combined with subsequent steps.

[0083] Step 4: The Isolation Forest algorithm module identifies unknown faults.

[0084] This invention employs the Isolation Forest algorithm to distinguish between known and unknown faults. The algorithm's core idea is to continuously segment the dataset; since outliers typically have short paths, they are isolated. The specific algorithm steps are as follows:

[0085] 1) Randomly select m points from the dataset as subsamples and put them into the root node of a tree;

[0086] 2) Randomly specify a dimension and randomly generate a cut point q within the current node's data range. The cut point should be generated between the maximum and minimum values ​​of the specified dimension in the current node's data.

[0087] 3) A hyperplane is generated by selecting the cutting point, which divides the current node's data space into two subspaces. Points less than q in the currently selected dimension are placed in the left branch of the current node, and points greater than or equal to q are placed in the right branch of the current node.

[0088] 4) Recursively perform steps 2) and 3) on the left and right branches of the current node, continuously constructing new leaf nodes until there is only one data in the leaf node, making further cutting impossible, or the tree has grown to the set height.

[0089] The Isolation Forest algorithm constructs multiple isolated trees through multiple samplings, and finally integrates the results of all trees, taking the average depth as the final output depth, thereby calculating the outlier score of the data points.

[0090] This invention, taking into account the convenience of judging results, sets the formula for calculating abnormal scores as follows:

[0091]

[0092] Where s(x,n) is the outlier score of a data point x in n test data samples, E(h(x)) is the average path length of data point x in all isolated trees, n is the number of all test data samples, and c(n) is the average path length of an isolated tree constructed from n samples, used to standardize the path length. The formula for calculating c(n) is:

[0093]

[0094] Here, H(*) is the harmonic number, which can be approximately represented as ln(*) + 0.5772156649. For a given dataset size n, the expected average path length of the tree is a constant.

[0095] The outlier score calculated using the above formula ranges from -0.5 to 0.5. The closer the outlier score is to -0.5, the more likely the data point is to be outlier; conversely, the closer the outlier score is to 0.5, the more likely the data point is to be normal.

[0096] The isolated forest model trained in step S3 is trained using a set of probability vectors of known faults. Therefore, it can be used to determine whether the test sample is abnormal by using the probability vector of the input test data sample. If it is judged to be normal, it indicates that the input test data sample has a known fault; correspondingly, if it is judged to be abnormal, it indicates that the test data sample has an unknown fault.

[0097] In this embodiment, the threshold for calculating the anomaly score in the isolated forest model is set to 0. The classification vector corresponding to the test set data sample is input into the trained isolated forest algorithm module. If the anomaly score is less than 0, the test data sample is judged to be an unknown fault; if the anomaly score is greater than or equal to 0, the test data sample is judged to be a known fault.

[0098] Step S4: If the test data sample has a known fault, the fault classification module and fault location module will output the corresponding fault type and fault location respectively; if it is an unknown fault, the clustering module will output the number of unknown fault types contained in the sample to indicate how many new faults have occurred. In this embodiment, the Bisecting K-Means clustering algorithm combined with the silhouette coefficient is used. The data samples identified as unknown faults in step S3 are input into the clustering module, the value of k is continuously changed, the size of the silhouette coefficient is compared, and the k value corresponding to the maximum silhouette coefficient is found to be 2, that is, the test set contains 2 unknown faults. This shows that the present invention can correctly distinguish the unknown faults in the test data sample and determine the number of unknown fault categories.

[0099] In summary, this invention provides a robot unknown fault detection method based on the isolated forest algorithm. By adding an isolated forest algorithm module to detect unknown faults on the basis of known fault diagnosis, the risk of misdiagnosing unknown faults as known faults is reduced, and it can be better applied to robot fault diagnosis problems in real-world scenarios.

[0100] The specific embodiments described above only illustrate the design principles of the present invention. The shapes and names of the components in this description may differ and are not limited. Therefore, those skilled in the art can modify or make equivalent substitutions to the technical solutions described in the foregoing embodiments; and these modifications and substitutions do not depart from the inventive spirit and technical solutions of the present invention, and should all fall within the protection scope of the present invention.

Claims

1. A method for detecting unknown faults in robots based on residual neural networks and isolated forests, characterized in that, include: Step S1: Extract features and classify the robot's test data samples to obtain the classification probability vector corresponding to the test data samples; specifically including: Acquiring test data samples: The robot's operation data is collected through multiple sensors and preprocessed. Specifically, the one-dimensional time series operation data is concatenated into a two-dimensional matrix in a set order, standardized, and sliced ​​using a sliding window method to obtain multiple M×N matrix slices divided according to time, where M represents that each matrix slice includes M time lengths, and N represents that each matrix slice includes data collected by N sensors; M=72, N=72. The feature extraction module uses a residual neural network with an attention mechanism to extract features from the robot's test data samples and outputs feature vectors to the fault classification module and the fault location module. The fault diagnosis task is split into two tasks: fault classification and fault location. The fault classification module completes the fault classification task, and the fault location module completes the fault location task. Fault classification and fault location share the feature vector output by the residual neural network. First, all feature vectors output by the feature extraction module are input into the fault classification module for processing, while the fault location module does not work at the beginning. The fault classification module generates probability values ​​for the test data sample belonging to a known fault category based on the feature vector; Step S2: Input the classification probability vector into the Isolation Forest algorithm module to calculate the anomaly score of the test data sample; the Isolation Forest algorithm module is trained using the classification probability vector of known fault data; The abnormal score is calculated as follows: in, It is a data point in n test data samples x Abnormal scores, E ( h ( x )) is a data point x The average path length across all isolated trees. n It is the number of all data samples to be tested. c ( n ) is the average path length for constructing an isolated tree for n test data samples; Step S3: If the anomaly score is less than 0, it is determined that the anomaly score falls within the range of outliers, and the test data sample corresponding to the anomaly score belongs to an unknown fault; if the anomaly score is greater than or equal to 0, it is determined that the test data sample is a known fault. When the Isolation Forest algorithm module distinguishes between unknown and known faults, the fault location module processes only the data of known faults according to the notification from the Isolation Forest algorithm module to obtain the fault location corresponding to the data sample to be tested.

2. The method as described in claim 1, characterized in that, Step S3 further includes: for the test data sample that is determined to be an unknown fault, a clustering algorithm is used to determine the number of unknown fault types, indicating how many new faults have occurred.

3. The method as described in claim 2, characterized in that, The clustering algorithm adopts a binary K-means clustering algorithm that introduces a silhouette coefficient; the K value with the best clustering effect is determined by the silhouette coefficient, which is the number of unknown fault categories.

Citation Information

Patent Citations

  • Power operation and maintenance data cleaning method based on isolation forest algorithm and neural network

    CN108776683A

  • Building abnormal energy consumption detection method based on K-Means + +, BP neural network and isolated forest

    CN115496163A