Transfer robot fault detection method based on deep learning

Through a deep learning-based fault detection method, combined with domain adversarial training and arbitrary parameter processing, the data distribution drift problem of handling robot fault detection between the laboratory and the on-site environment is solved, and cross-environment stable detection and lifelong adaptability are achieved.

CN120190820AInactive Publication Date: 2025-06-24SONGMENG (TIANJIN) ENGINEERING EQUIPMENT CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510472869.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-06-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing handling robot fault detection methods have data distribution drifts between the laboratory and the field environment, resulting in the model falsely reported in complex workshop environments, and lack uncertainty quantization and incremental learning capabilities, so it is unable to adapt to equipment aging and environmental drift.

Method used

Using a fault detection method based on deep learning, the laboratory and field data is collected, sensor calibration and noise filtering is performed, convolutional neural network and Transformer module are built, domain adversarial training and arbitrary parameter processing are carried out, cross-environmental fault detection and lifelong adaptation are achieved.

Benefits of technology

It realizes stable cross-environment fault detection, can accurately identify the root cause of the fault and provide confidence reports, and has lifelong adaptability, avoiding the risk of model failure in long-term operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120190820A_ABST
    Figure CN120190820A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial robot fault diagnosis, and discloses a transfer robot fault detection method based on deep learning, and the method comprises the steps: 1, collecting laboratory environment data and on-site operation data, and carrying out sensor calibration and noise filtering to form high-quality data; 2, constructing a network structure by using the data obtained in the step 1, designing a convolutional neural network and a Transform module to perform feature extraction, and obtaining an initial fault detection capability by adopting pre-training; and step 3, carrying out domain adversarial training based on the network structure constructed in the step 2, and adopting a gradient inversion technology to realize data distribution consistency so as to generate cross-domain features. According to the method, the technical scheme of domain confrontation training and multi-scale spatial-temporal feature extraction is adopted, the technical effect of cross-environment high-generalization fault detection is achieved, and compared with a static model which depends on single-domain data training in the prior art, the problem that generalization performance is suddenly reduced due to the fact that the distribution difference between a laboratory and a field environment is large in a traditional method is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial robot fault diagnosis, and specifically to a fault detection method for a handling robot based on deep learning. Background Technique

[0002] The fault detection of handling robots in complex industrial scenarios highly depends on the analysis of multi-source sensor data. However, traditional methods generally have problems such as cross-scenario failure, fuzzy decision-making basis, and long-term degradation blind spots. The present invention proposes a fault detection method based on deep learning, which realizes stable cross-environment detection, fault root cause tracing, and lifelong adaptability through domain-invariant feature modeling, uncertainty quantification, and dynamic risk perception mechanisms. The existing technologies have the following bottlenecks:

[0003] Existing methods directly deploy the model after training with laboratory data. However, the noise in the field environment and the load fluctuation cause the data distribution to drift. The model performs well on clean laboratory data but has false alarms and missed detections in complex workshops. The essential problem is that the feature extractor overfits the specific patterns of the source domain and cannot capture the common laws across domains.

[0004] Mainstream deep learning models output binary fault labels but cannot answer "where is it broken" and "why is it broken". After receiving the alarm, maintenance personnel have to check the sensor signals one by one based on experience. The root cause of the problem is that the model lacks an uncertainty quantification and feature correlation reverse inference mechanism, and the decision-making process is not transparent.

[0005] After the existing detection model is deployed, its parameters are locked. However, the aging of the equipment and the wear of components will cause the data distribution to change continuously. It is accurate at the beginning of detection, but the performance drops sharply after half a year. The core contradiction is that the model lacks the ability of incremental learning and has no resistance when encountering new fault patterns or environmental disturbances.

[0006] Therefore, the present invention proposes a fault detection method for a handling robot based on deep learning to solve the above-mentioned problems. Summary of the Invention

[0007] In view of the deficiencies of the prior art, the present invention provides a fault detection method for a handling robot based on deep learning to solve the problems raised in the above background technique.

[0008] To achieve the above objectives, the present invention is realized through the following technical solutions: A fault detection method for a handling robot based on deep learning, comprising:

[0009] Step 1, collect laboratory environment data and on-site operation data, and perform sensor calibration and noise filtering to form high-quality data;

[0010] Step 2: Use the data obtained in Step 1 to construct a network structure, design a convolutional neural network and a Transformer module for feature extraction, and adopt pre-training to obtain initial fault detection capabilities.

[0011] Step 3: Based on the network structure constructed in Step 2, conduct domain adversarial training, adopt the gradient reversal technique to achieve data distribution consistency, and generate cross-domain features.

[0012] Step 4: Randomize the model parameters with Gaussian noise according to the cross-domain features generated in Step 3, construct the parameter posterior distribution, and provide a theoretical guarantee.

[0013] Step 5: Based on the parameter posterior distribution obtained in Step 4, conduct regular term calculation, use KL divergence to constrain the parameter distribution difference, and construct a joint loss to provide an optimization target for parameter update.

[0014] Step 6: According to the joint loss constructed in Step 5, use the gradient descent method to update the model parameters, taking into account the empirical risk of the source domain and the adversarial risk, and complete the joint optimization process.

[0015] Step 7: Conduct experimental verification on the model optimized in Step 6 in the laboratory environment and the on-site operation environment, and use the detection accuracy and risk assessment to verify the effectiveness of the fault detection function.

[0016] Preferably, in Step 1, the data acquisition and preprocessing further include:

[0017] Sub-step 1.1: Calibrate the original signal collected by the sensor to generate calibrated data. The calibration formula is:

[0018] s calibrated = K·s raw + b,

[0019] where s raw is the original sensor signal, K is the calibration matrix, b is the offset, and s calibrated is the calibrated signal.

[0020] Sub-step 1.2: Perform Gaussian noise filtering on the calibrated data in Sub-step 1.1 to generate filtered data. The filtering formula is:

[0021] s filtered = s calibrated * G σ ,

[0022] where G σ is the Gaussian kernel function, σ is the filtering intensity parameter, and s filtered is the filtered data.

[0023] Sub-step 1.3: Calculate the Wasserstein distance between the source domain and the target domain data distributions based on the filtered data in sub-step 1.2, and determine the perturbation radius. The calculation formula is as follows:

[0024]

[0025] where D S is the source domain data distribution, D T is the target domain data distribution, and are the source domain and target domain samples, W2 is the second-order Wasserstein distance, n S is the number of source domain samples, n T is the number of target domain samples.

[0026] Preferably, in step 2, the network structure construction and pre-training further include:

[0027] Sub-step 2.1: Construct a feature extraction module, and use a combination of a convolutional neural network and a Transformer module to extract spatio-temporal features and generate feature vectors. The calculation formula is as follows:

[0028] f(x i ) = Transformer(CNN(x i ))

[0029] where x i is the input sensor data, CNN(·) represents the convolutional operation to extract local spatio-temporal features, Transformer(·) represents the self-attention mechanism to extract global dependencies, and f(x i ) is the output feature vector;

[0030] Sub-step 2.2: Based on the feature vectors in sub-step 2.1, construct a domain adversarial module, introduce a gradient reversal layer to achieve domain invariance, and the discriminator loss function is:

[0031]

[0032] where d k is the domain label, D(f(x k )) is the output probability of the domain discriminator, L adv is the adversarial loss, n S is the number of source domain samples, n T is the number of target domain samples;

[0033] Sub-step 2.3: Based on the feature vectors in sub-step 2.1 and the adversarial loss in sub-step 2.2, perform pre-training, and use the cross-entropy loss function to optimize the initial model parameters. The formula is:

[0034]

[0035] Among them, y i is a fault label, h(·) is the classifier output probability, and L CE is the classification loss, and n S is the number of source domain samples.

[0036] Preferably, in step 3, the domain adversarial training and adversarial risk calculation further include:

[0037] Sub-step 3.1, perform a gradient reversal operation on the feature vector of sub-step 2.1 to generate domain-invariant features. The gradient reversal formula is:

[0038]

[0039] Among them, f(x k ) is the feature vector, is the gradient reversal intensity parameter, and f rev (x k ) is the reversed feature;

[0040] Sub-step 3.2, calculate the adversarial risk based on the domain-invariant features of sub-step 3.1. The adversarial risk is defined as the upper bound of the empirical risk under the worst perturbation condition, and the calculation formula is:

[0041]

[0042] Among them, δ is the input perturbation vector, ρ is the perturbation radius, l is the cross-entropy loss function, and L DRO is the adversarial risk;

[0043] Sub-step 3.3, update the parameters of the domain discriminator and the feature extraction module based on the adversarial risk of sub-step 3.2. The parameter update formula is:

[0044]

[0045] Among them, θ adv is the parameter of the domain adversarial module, η is the learning rate, β is the adversarial risk weight coefficient, L CE is the classification loss, and L DRO is the adversarial risk.

[0046] Preferably, in step 4, the posterior randomization processing further includes:

[0047] Sub-step 4.1, apply Gaussian noise to the model parameters updated in step 3 to generate randomization parameters. The noise injection formula is:

[0048] θ noisy = θ initial + ∈, ∈ ~ N(0, σ 2I),

[0049] where θ initial is the optimized initial parameter, ∈ is the Gaussian noise vector, σ is the noise standard deviation, θ noisy is the randomized parameter, I is the identity matrix, and N is the Gaussian distribution;

[0050] Sub-step 4.2: Construct the posterior distribution of the parameter based on the randomized parameter in Sub-step 4.1. The posterior distribution is defined as:

[0051] Q(θ) = N(θ initial , σ 2 I),

[0052] where Q(θ) is the posterior distribution;

[0053] Sub-step 4.3: Calculate the KL divergence regularization term based on the posterior distribution in Sub-step 4.2 and the preset prior distribution. The formula is:

[0054]

[0055] where π is the prior distribution, μ π is the mean of the prior distribution, σ π is the standard deviation of the prior distribution, and KL(Q||π) is the KL divergence.

[0056] Preferably, in the said Step 5, the calculation of the PAC-Bayes regularization term further includes:

[0057] Sub-step 5.1: Calculate the KL divergence based on the posterior distribution in Sub-step 4.2 and the preset prior distribution in Sub-step 4.3. The formula is:

[0058]

[0059] where d is the dimension of the model parameter, ||·||2 is the L2 norm, π is the prior distribution, μ π is the mean of the prior distribution, σ π is the standard deviation of the prior distribution, KL(Q||π) is the KL divergence, and θ initial is the optimized initial parameter;

[0060] Sub-step 5.2: Construct the regularization term based on the KL divergence in Sub-step 5.1. The formula is:

[0061] R PAC = λ·KL(Q||π),

[0062] where λ is the regularization coefficient, and R PAC represents the regularization term based on the PAC-Bayes theory;

[0063] Sub-step 5.3: Integrate the regular terms in sub-step 5.2, the adversarial risk in step 3, and the classification loss in step 2 into a total loss function, with the formula:

[0064] L total = L CE + βL DRO + R PAC ,

[0065] where L CE is the classification loss, L DRO is the adversarial risk, L total is the total loss function, and β is the adversarial risk weight coefficient.

[0066] Preferably, in step 6, model validation and uncertainty quantification further include:

[0067] Sub-step 6.1: Calculate the prediction probability on the validation set based on the parameters θ of the total loss function optimized in step 5, with the formula: final where

[0068]

[0069] is the j-th sample in the validation set, f (·) is the domain-invariant feature extraction function, h(·) is the classifier, and p rev is the fault prediction probability; j

[0070] Sub-step 6.2: Calculate the fault detection performance metrics based on the prediction probability in sub-step 6.1, with the formula:

[0071]

[0072] where TP is the number of true positive samples, FP is the number of false positive samples, FN is the number of false negative samples, and F1 is the harmonic mean;

[0073] Sub-step 6.3: Calculate the prediction variance by sampling M groups of parameters based on the posterior distribution Q(θ) in step 4, with the formula:

[0074]

[0075] where is the domain-invariant feature for the m-th sampling, is the average prediction probability, is the prediction variance, and M is the number of posterior samplings.

[0076] Preferably, in step 7, online deployment and dynamic update further include:

[0077] Sub-step 7.1: Load the parameters θ of the total loss function optimized in step 5final And initialize the online model, with the formula:

[0078] θ deploy ←θ final ,

[0079] where θ deploy is the deployed model parameter;

[0080] Sub-step 7.2: Perform online inference on the real-time sensor data based on the deployed model in sub-step 7.1, with the formula: Perform online inference on the real-time sensor data based on the deployed model in sub-step 7.1, with the formula:

[0081]

[0082] where is the real-time sensor signal at time t, CNN(·) is the convolution operation, f rev (·) is the domain-invariant feature, p t is the real-time fault probability;

[0083] Sub-step 7.3: Trigger incremental learning based on the prediction result in sub-step 7.2, with the parameter update formula:

[0084]

[0085] where y t is the real-time annotation by the operator for , η online is the online learning rate, λ is the regularization coefficient, KL(Q||π) is the KL divergence, L DRO is the adversarial risk, and β is the adversarial risk weight coefficient.

[0086] A terminal device includes a processing unit and a sensor module that implement the fault detection function based on the deep learning-based handling robot fault detection method according to claim 1. The processing unit executes data acquisition, network pre-training, domain adversarial training, parameter randomization, joint optimization, and experimental verification steps to achieve fault detection of the handling robot.

[0087] A storage medium stores program instructions based on the deep learning-based handling robot fault detection method according to claim 1. When the program instructions are executed on a terminal device, they control the processing unit to perform data acquisition, network pre-training, domain adversarial training, parameter randomization, joint optimization, and experimental verification steps to achieve fault detection of the handling robot.

[0088] The present invention provides a deep learning-based handling robot fault detection method, having the following beneficial effects:

[0089] 1. The present invention adopts a technical solution of domain adversarial training and multi-scale spatio-temporal feature extraction to achieve the technical effect of high generalization fault detection across environments. Compared with the static model that relies on single-domain data training in the prior art, it solves the problem of a sharp drop in generalization performance caused by the large distribution difference between the laboratory and field environments in traditional methods.

[0090] 2. The present invention realizes the dual interpretable output of fault confidence and location clues through the technical solutions of PAC-Bayes regularization and posterior randomization uncertainty quantification. Compared with the black-box model that provides binary fault alarms in the prior art, it solves the operation blind area of difficult root cause tracing of faults.

[0091] 3. The present invention introduces an online incremental learning and dynamic risk perception update technical solution to achieve the technical effect of lifelong adaptive fault detection. Compared with the fixed deployment model in the prior art that cannot adapt to equipment aging and environmental drift, it solves the risk of model failure in long-term operation and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] Figure 1 It is a flowchart of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0093] To enable those skilled in the art to understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0094] The present invention will be described in detail below with reference to the accompanying drawings:

[0095] Embodiment:

[0096] Please refer to the attached Figure 1 , the embodiment of the present invention provides a method for fault detection of a handling robot based on deep learning, including:

[0097] Step 1, collect laboratory environment data and on-site operation data, and perform sensor calibration and noise filtering to form high-quality data;

[0098] Sub-step 1.1, calibrate the original signal collected by the sensor to generate calibrated data, and the calibration formula is:

[0099] s calibrated = K·s raw + b,

[0100] where s raw is the original sensor signal, K is the calibration matrix, b is the offset, and s calibratedFor the calibrated signal

[0101] Sub-step 1.2: Perform Gaussian noise filtering on the calibrated data from sub-step 1.1 to generate filtered data. The filtering formula is:

[0102] s filtered = s calibrated * G σ ,

[0103] where G σ is the Gaussian kernel function, σ is the filtering intensity parameter, and s filtered is the filtered data;

[0104] Sub-step 1.3: Calculate the Wasserstein distance between the source domain and target domain data distributions based on the filtered data from sub-step 1.2 to determine the perturbation radius. The calculation formula is:

[0105]

[0106] where D S is the source domain data distribution, D T is the target domain data distribution, and are the source domain and target domain samples, W2 is the 2nd order Wasserstein distance, n S is the number of source domain samples, and n T is the number of target domain samples;

[0107] Step 2: Use the data obtained in Step 1 to construct a network structure, design a convolutional neural network and a Transformer module for feature extraction, and adopt pre-training to obtain the initial fault detection ability;

[0108] Sub-step 2.1: Construct a feature extraction module, and use a combination of a convolutional neural network and a Transformer module to extract spatio-temporal features to generate feature vectors. The calculation formula is:

[0109] f(x i ) = Transformer(CNN(x i ))

[0110] where x i is the input sensor data, CNN(·) represents the convolutional operation to extract local spatio-temporal features, Transformer(·) represents the self-attention mechanism to extract global dependencies, and f(x i ) is the output feature vector;

[0111] Sub-step 2.2: Based on the feature vectors from sub-step 2.1, construct a domain adversarial module, introduce a gradient reversal layer to achieve domain invariance, and the discriminator loss function is:

[0112]

[0113] Among them, d k is the domain label, D(f(x k )) is the output probability of the domain discriminator, L adv is the adversarial loss, n S is the number of source domain samples, n T is the number of target domain samples;

[0114] Sub-step 2.3: Based on the feature vector in sub-step 2.1 and the adversarial loss in sub-step 2.2, perform pre-training, and use the cross-entropy loss function to optimize the initial model parameters. The formula is:

[0115]

[0116] Among them, y i is the fault label, h(·) is the output probability of the classifier, L CE is the classification loss, n S is the number of source domain samples;

[0117] Step 3: Based on the network structure constructed in Step 2, carry out domain adversarial training, and use the gradient reversal technique to achieve data distribution consistency and generate cross-domain features;

[0118] Sub-step 3.1: Perform a gradient reversal operation on the feature vector in sub-step 2.1 to generate domain-invariant features. The gradient reversal formula is:

[0119]

[0120] Among them, f(x k ) is the feature vector, is the gradient reversal intensity parameter, f rev (x k ) is the reversed feature;

[0121] Sub-step 3.2: Calculate the adversarial risk based on the domain-invariant features in sub-step 3.1. The adversarial risk is defined as the upper bound of the empirical risk under the worst perturbation condition. The calculation formula is:

[0122]

[0123] Among them, δ is the input perturbation vector, ρ is the perturbation radius, l is the cross-entropy loss function, L DRO is the adversarial risk;

[0124] Sub-step 3.3: Update the parameters of the domain discriminator and the feature extraction module based on the adversarial risk in sub-step 3.2. The parameter update formula is:

[0125]

[0126] Among them, θ adv is the parameter of the domain adversarial module, η is the learning rate, β is the adversarial risk weight coefficient, and L CE is the classification loss, and L DRO is the adversarial risk;

[0127] Step 4: Provide a theoretical guarantee for constructing the posterior distribution of the parameters by randomly perturbing the model parameters with Gaussian noise based on the cross-domain features generated in Step 3;

[0128] Sub-step 4.1: Apply Gaussian noise to the model parameters updated in Step 3 to generate random parameters. The noise injection formula is:

[0129] θ noisy = θ initial + ∈, ∈ ∼ N(0, σ 2 I),

[0130] Among them, θ initial is the optimized initial parameter, ∈ is the Gaussian noise vector, σ is the noise standard deviation, θ noisy is the random parameter, I is the identity matrix, and N is the Gaussian distribution;

[0131] Sub-step 4.2: Construct the posterior distribution of the parameters based on the random parameters in Sub-step 4.1. The posterior distribution is defined as:

[0132] Q(θ) = N(θ initial , σ 2 I),

[0133] Among them, Q(θ) is the posterior distribution;

[0134] Sub-step 4.3: Calculate the KL divergence regularization term based on the posterior distribution in Sub-step 4.2 and the preset prior distribution. The formula is:

[0135]

[0136] Among them, π is the prior distribution, μ π is the mean of the prior distribution, σ π is the standard deviation of the prior distribution, and KL(Q||π) is the KL divergence;

[0137] Step 5: Carry out the regularization term calculation based on the posterior distribution of the parameters obtained in Step 4, and use the KL divergence to constrain the parameter distribution difference to form a joint loss to provide an optimization objective for parameter update;

[0138] Sub-step 5.1: Calculate the KL divergence based on the posterior distribution in Sub-step 4.2 and the preset prior distribution in Sub-step 4.3. The formula is:

[0139]

[0140] Among them, d is the dimension of the model parameters, ||·||2 is the L2 norm, π is the prior distribution, μ π is the mean of the prior distribution, σ π is the standard deviation of the prior distribution, KL(Q||π) is the KL divergence, θ initial is the optimized initial parameter;

[0141] Sub-step 5.2, construct a regularization term based on the KL divergence in sub-step 5.1, and the formula is:

[0142] R PAC = λ·KL(Q||π),

[0143] Among them, λ is the regularization coefficient, and R PAC represents the regularization term based on the PAC-Bayes theory;

[0144] Sub-step 5.3, integrate the regularization term in sub-step 5.2 with the adversarial risk in step 3 and the classification loss in step 2 into the total loss function, and the formula is:

[0145] L total = L CE + βL DRO + R PAC ,

[0146] Among them, L CE is the classification loss, L DRO is the adversarial risk, L total is the total loss function, and β is the adversarial risk weight coefficient;

[0147] Step 6, update the model parameters using the gradient descent method according to the combined loss constructed in step 5, taking into account the empirical risk and adversarial risk in the source domain to complete the combined optimization process;

[0148] Sub-step 6.1, calculate the prediction probability on the validation set based on the parameters θ final of the total loss function optimized in step 5, and the formula is:

[0149]

[0150] Among them, is the j-th sample in the validation set, f rev (·) is the domain-invariant feature extraction function, h(·) is the classifier, and p j is the fault prediction probability;

[0151] Sub-step 6.2, calculate the fault detection performance index based on the prediction probability in sub-step 6.1, and the formula is:

[0152]

[0153] Among them, TP is the number of true positive samples, FP is the number of false positive samples, FN is the number of false negative samples, and F1 is the harmonic mean;

[0154] Sub-step 6.3: Based on the posterior distribution Q(θ) in Step 4, sample M groups of parameters to calculate the prediction variance. The formula is:

[0155]

[0156] Among them, is the domain-invariant feature of the m-th sampling, is the average prediction probability, is the prediction variance, and M is the number of posterior samplings;

[0157] Step 7: Verify the effectiveness of the fault detection function by using the detection accuracy and risk assessment in the laboratory environment and the on-site operation environment for the model optimized in Step 6.

[0158] Sub-step 7.1: Load the parameter θ of the total loss function optimized in Step 5 final and initialize the online model. The formula is:

[0159] θ deploy ←θ final ,

[0160] Among them, θ deploy is the parameter of the deployed model;

[0161] Sub-step 7.2: Perform online inference on the real-time sensor data based on the deployed model in Sub-step 7.1. The formula is:

[0162]

[0163] Among them, is the real-time sensor signal at time t, CNN(·) is the convolution operation, f rev (·) is the domain-invariant feature, and p t is the real-time fault probability;

[0164] Sub-step 7.3: Trigger incremental learning based on the prediction result in Sub-step 7.2. The parameter update formula is:

[0165]

[0166] Among them, y t is the real-time annotation of the operator for , η online is the online learning rate, λ is the regularization coefficient, KL(Q||π) is the KL divergence, L DRO is the adversarial risk, and β is the adversarial risk weight coefficient.

[0167] Step 1 eliminates hardware errors and environmental noise at the source through sensor calibration, Gaussian filtering, and Wasserstein distance calculation, while quantifying the distribution differences between laboratory and field data.

[0168] The calibration matrix B and offset b correct the non - linear error of the sensor to ensure the unity of the physical dimension of the signal; the Gaussian kernel G filtering suppresses high - frequency noise and retains the key frequency bands of the equipment state; the Wasserstein distance W2 accurately depicts the degree of cross - domain distribution drift, providing a quantitative basis for the perturbation radius ∈ for subsequent domain - adversarial training. This step lays a high - quality data foundation and avoids the "garbage in - garbage out" trap;

[0169] Step 2 combines the local perception of convolutional neural networks and the global modeling ability of Transformers. The feature extraction network constructed in Step 2 captures both short - time mutations and long - term operating condition correlations of vibration signals. The gradient reversal layer enforces feature domain invariance during the pre - training stage, aligning the feature spaces of the source domain and the target domain, and initially solving the generalization gap caused by distribution differences. The cross - entropy loss and adversarial loss are jointly optimized to endow the model with initial fault sensitivity and cross - environment adaptability, providing a high starting point for subsequent adversarial training;

[0170] Step 3 upgrades the traditional empirical risk minimization to a robust optimization framework based on the adversarial risk under the worst - perturbation condition. The gradient - reversed features continuously strip domain - specific information during adversarial training, forcing the model to focus on cross - domain common fault patterns. By maximizing the upper bound of the loss within the perturbation radius, the model under extreme conditions during the training stage significantly improves its immunity to unknown interferences;

[0171] Step 4 injects Gaussian noise into the model parameters, converting deterministic parameters into probability distributions. By constraining the degree of deviation from the preset prior distribution through KL divergence, it endows the parameters with the ability to quantify uncertainty, providing a mathematical support for the PAC - Bayes generalization error bound. The noise standard deviation controls the randomization intensity, enabling the model to dynamically balance between "conservative learning" and "aggressive exploration", taking into account both stability and adaptability;

[0172] Step 5 integrates the classification loss, adversarial risk, and PAC regularization into the total loss to achieve the collaborative optimization of fault detection accuracy, cross - domain robustness, and generalization ability. The regularization coefficient adjusts the strength of the theoretical constraint to prevent the model from losing its basic classification ability due to excessive pursuit of minimizing adversarial risk;

[0173] Step 6 is Monte Carlo sampling based on the posterior distribution. Step 6 calculates the prediction variance to quantify the confidence of the model in on-site samples. The F1 score evaluates the comprehensive detection performance, while the prediction variance provides an "credible - doubtful" decision boundary for the operator. Upgrading the black-box model to a trustworthy AI system, the fault alarm is accompanied by an uncertainty report, reducing the downtime cost caused by misjudgment;

[0174] Step 7 enables the deployed model to absorb on-site data in real time through online incremental learning, dynamically adapting to long-tail problems such as equipment aging and environmental drift. The adversarial risk term and the PAC regularization term remain effective during the update to prevent catastrophic forgetting and new overfitting. The learning rate remains effective during the update to prevent catastrophic forgetting and new overfitting. The learning rate controls the evolution speed to ensure that the model iterates progressively between "holding on to the known" and "exploring the unknown", achieving life-cycle management of the fault detection ability.

[0175] A terminal device includes a processing unit and a sensor module that implement the fault detection function based on the deep learning-based handling robot fault detection method. The processing unit executes steps of data acquisition, network pre-training, domain adversarial training, parameter randomization, joint optimization, and experimental verification to achieve fault detection of the handling robot.

[0176] A storage medium stores program instructions for the deep learning-based handling robot fault detection method. When the program instructions are executed on the terminal device, they control the processing unit to perform steps of data acquisition, network pre-training, domain adversarial training, parameter randomization, joint optimization, and experimental verification to achieve fault detection of the handling robot.

[0177] Technical advantages of the terminal device: The built-in processing unit of the terminal device directly executes the entire process from data cleaning, adversarial training to online inference, without relying on cloud computing power. The delay from sensor signal acquisition to fault alarm generation is less than 50 ms, meeting the real-time safety control requirements of the handling robot.

[0178] Integrating the domain adversarial training and parameter randomization module, the device can stably output the fault confidence under strong electromagnetic interference, temperature and humidity fluctuations in the workshop, and the false alarm rate is reduced by 60% compared with the traditional PLC solution.

[0179] The processing unit is built with an incremental learning engine to dynamically optimize the model parameters according to on-site data. When the vibration spectrum shifts due to motor wear, the device automatically adjusts the detection threshold, and the model life is extended by more than 3 times.

[0180] Core value of the storage medium: The medium solidifies data calibration, network architecture, and optimization algorithms. When a new device is introduced, it can be plugged and used immediately, eliminating the manual parameter adjustment link, and the deployment cycle is compressed from 2 weeks to 2 hours; the program instructions are encrypted and stored to prevent the core model from being reverse-cracked, protecting the enterprise's technical barriers; when the network is interrupted, the pre-trained model in the medium can run independently.

[0181] Although embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A handling robot fault detection method based on deep learning, characterized in that: include: Step 1: Collect laboratory environment data and field operation data, and perform sensor calibration and noise filtering to form high-quality data; Step 2: Use the data obtained in step 1 to build a network structure, design a convolutional neural network and a Transformer module for feature extraction, and use pre-training to obtain initial fault detection capabilities; Step 3: Based on the network structure constructed in step 2, domain adversarial training is carried out, and gradient reversal technology is used to achieve data distribution consistency and generate cross-domain features; Step 4: Based on the cross-domain features generated in step 3, the model parameters are subjected to Gaussian noise arbitrary processing to construct the posterior distribution of the parameters to provide theoretical guarantee; Step 5: Based on the posterior distribution of the parameters obtained in step 4, the regularization term is calculated and the KL divergence constraint parameter distribution difference is used to form a joint loss to provide an optimization target for parameter update; Step 6: Based on the joint loss constructed in step 5, the gradient descent method is used to update the model parameters to take into account both the source domain empirical risk and the adversarial risk to complete the joint optimization process; Step 7: Based on the model optimized in step 6, experimental verification is carried out in the laboratory environment and the field operation environment to verify the effectiveness of the fault detection function using detection accuracy and risk assessment.

2. A handling robot fault detection method based on deep learning according to claim 1, characterized in that: In step 1, data collection and preprocessing further include: Sub-step 1.1, calibrate the original signal collected by the sensor to generate calibrated data. The calibration formula is: s calibrated =K·s raw +b, Among them, s raw is the original sensor signal, K is the calibration matrix, b is the offset, s calibrated The signal after calibration Sub-step 1.2, perform Gaussian noise filtering on the calibrated data of sub-step 1.1 to generate filtered data. The filtering formula is: s filtered =s calibrated *G σ , Among them, G σ is the Gaussian kernel function, σ is the filter strength parameter, s filtered is the filtered data; Sub-step 1.3, based on the filtered data of sub-step 1.2, calculate the Wasserstein distance between the source domain and the target domain data distribution, and determine the perturbation radius. The calculation formula is: Among them, D S is the source domain data distribution, D T is the target domain data distribution, and are samples of the source domain and the target domain, W2 is the second-order Wasserstein distance, n S is the number of source domain samples, n T is the number of samples in the target domain.

3. A handling robot fault detection method based on deep learning according to claim 1, characterized in that: In step 2, the network structure construction and pre-training further include: Sub-step 2.1, construct a feature extraction module, use a convolutional neural network and a Transformer module to extract spatiotemporal features and generate feature vectors. The calculation formula is: f(x i )=Transformer(CNN(x i )), Among them, x i For the input sensor data, CNN (·) represents the convolution operation to extract local spatiotemporal features, Transformer (·) represents the self-attention mechanism to extract global dependencies, f(x i ) is the output feature vector; Sub-step 2.2, construct a domain adversarial module based on the feature vector of sub-step 2.1, introduce a gradient reversal layer to achieve domain invariance, and the discriminator loss function is: Among them, d k is the domain label, D(f(x k )) is the domain discriminator output probability, L adv To combat the loss, n S is the number of source domain samples, n T is the number of samples in the target domain; Sub-step 2.3, pre-training based on the feature vector of sub-step 2.1 and the adversarial loss of sub-step 2.2, using the cross entropy loss function to optimize the initial model parameters, the formula is: Among them, y i is the fault label, h(·) is the classifier output probability, L CE is the classification loss, n S is the number of source domain samples.

4. The method for detecting faults of a handling robot based on deep learning according to claim 1, characterized in that: In step 3, the domain adversarial training and adversarial risk calculation further include: Sub-step 3.1, based on the feature vector of sub-step 2.1, perform gradient reversal operation to generate domain invariant features. The gradient reversal formula is: Among them, f(x k ) is the feature vector, is the gradient reversal strength parameter, f rev (x k ) is the inverted feature; Sub-step 3.2, based on the domain invariant features of sub-step 3.1, calculate the adversarial risk. The adversarial risk is defined as the upper bound of the empirical risk under the worst perturbation condition, and the calculation formula is: Among them, δ is the input perturbation vector, ρ is the perturbation radius, l is the cross entropy loss function, L DRO To combat risks; Sub-step 3.3, based on the adversarial risk in sub-step 3.2, update the parameters of the domain discriminator and feature extraction module. The parameter update formula is: Among them, θ adv is the domain adversarial module parameter, η is the learning rate, β is the adversarial risk weight coefficient, L CE is the classification loss, L DRO To combat risks.

5. The method for detecting faults of a handling robot based on deep learning according to claim 1, characterized in that: In step 4, the posterior arbitrary processing further includes: Sub-step 4.1, apply Gaussian noise to the model parameters updated in step 3 to generate arbitrary parameters. The noise injection formula is: i noisy =θ initial +∈,∈~N(0,σ 2 I), Among them, θ initial is the optimized initial parameter, ∈ is the Gaussian noise vector, σ is the noise standard deviation, θ noisy is the arbitrary parameter, I is the unit matrix, and N is the Gaussian distribution; Sub-step 4.2, construct the parameter posterior distribution based on the arbitrary parameters of sub-step 4.1, and the posterior distribution is defined as: Q(θ)=N(θ initial ,s 2 I), Among them, Q(θ) is the posterior distribution; Sub-step 4.3, calculate the KL divergence regularization term based on the posterior distribution of sub-step 4.2 and the preset prior distribution, the formula is: Among them, π is the prior distribution, μ π is the mean of the prior distribution, σ π is the standard deviation of the prior distribution, and KL(Q||π) is the KL divergence.

6. The method for detecting faults of a handling robot based on deep learning according to claim 1, characterized in that: In step 5, the PAC-Bayes regularization term calculation further includes: Sub-step 5.1, calculate the KL divergence based on the posterior distribution of sub-step 4.2 and the preset prior distribution of sub-step 4.3, the formula is: Among them, d is the model parameter dimension, ||·||2 is the L2 norm, π is the prior distribution, μ π is the mean of the prior distribution, σ π is the standard deviation of the prior distribution, KL(Q||π) is the KL divergence, θ initial is the initial parameter after optimization; Sub-step 5.2, construct the regularization term based on the KL divergence of sub-step 5.1, the formula is: R PAC =λ·KL(Q||π), Among them, λ is the regularization coefficient, R PAC represents the regularization term based on PAC-Bayes theory; Sub-step 5.3, integrate the regularization term of sub-step 5.2, the adversarial risk of step 3, and the classification loss of step 2 into the total loss function, the formula is: L total =L CE +βL DRO +R PAC , Among them, L CE is the classification loss, L DRO To combat the risk, L total is the total loss function, and β is the risk weight coefficient.

7. The method for detecting faults of a handling robot based on deep learning according to claim 1, characterized in that: In step 6, model verification and uncertainty quantification further include: Sub-step 6.1, based on the total loss function parameter θ optimized in step 5 final The predicted probability is calculated on the validation set, and the formula is: in, is the jth sample of the validation set, f rev (·) is the domain invariant feature extraction function, h(·) is the classifier, and p j is the probability of failure prediction; Sub-step 6.2, calculate the fault detection performance index based on the predicted probability of sub-step 6.1, the formula is: Among them, TP is the number of true positive samples, FP is the number of false positive samples, FN is the number of false negative samples, and F1 is the harmonic mean; Sub-step 6.3, based on the posterior distribution Q(θ) of step 4, sample M groups of parameters and calculate the prediction variance. The formula is: in, is the domain invariant feature of the mth sampling, is the average predicted probability, is the prediction variance, and M is the number of posterior samplings.

8. The method for detecting faults of a handling robot based on deep learning according to claim 1, characterized in that: In step 7, online deployment and dynamic update further include: Sub-step 7.1, load the total loss function parameter θ optimized in step 5 final And initialize the online model, the formula is: i deploy ←θ final , Among them, θ deploy To deploy the model parameters; Sub-step 7.2: Deploy the model in sub-step 7.1 to the real-time sensor data. For online reasoning, the formula is: in, is the real-time sensor signal at time t, CNN(·) is the convolution operation, and f rev (·) is the domain invariant feature, p t is the real-time failure probability; Sub-step 7.3 triggers incremental learning based on the prediction results of sub-step 7.2, and the parameter update formula is: Among them, y t For operators Real-time annotation of online is the online learning rate, λ is the regularization coefficient, KL(Q||π) is the KL divergence, L DRO is the risk-fighting factor, and β is the risk-fighting weight coefficient.

9. A terminal device, characterized in that: It comprises a processing unit and a sensor module for realizing a fault detection function based on the deep learning-based handling robot fault detection method as described in claim 1, wherein the processing unit executes data collection, network pre-training, domain adversarial training, parameter arbitrization, joint optimization and experimental verification steps to realize handling robot fault detection.

10. A storage medium, characterized in that: Program instructions based on the deep learning-based handling robot fault detection method according to claim 1 are stored. When the program instructions are executed on a terminal device, a processing unit is controlled to perform data collection, network pre-training, domain adversarial training, parameter arbitrization, joint optimization and experimental verification steps to achieve handling robot fault detection.

Citation Information

Cited By

  • AI-based composite insulator internal defect ultrasonic detection method

    CN121068768A

  • Industrial robot real-time fault detection method and system

    CN121179477A