Flexible joint robot sensor fault estimation and detection method based on UF-BP-DT
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI'AN POLYTECHNIC UNIVERSITY
- Filing Date
- 2026-07-01
- Publication Date
- 2026-08-04
AI Technical Summary
该方法实现简单,但对于工况多变的柔性关节机械臂而言,健康状态下的残差与估计值本身具有显著时变波动特性:阈值过小易将正常动态波动误判为故障,阈值过大则会削弱对微小、早期故障的检测灵敏度,无法同时兼顾检测灵敏度与抗干扰能力,难以适配系统启停、加减速、负载变化等多阶段的动态特性
1、模型机理与数据学习深度融合,显著提升故障估计精度:本发明构造与系统输出故障作用结构相匹配的故障联合观测器,依托系统模型同步重构状态信息与故障信息,生成包含状态估计误差、故障估计误差的结构化残差信号;再通过BP神经网络对残差滑动时间窗口进行学习,建立残差时序特征到传感器故障幅值的非线性映射关系。该方案融合模型驱动与数据驱动两种方法的优势,既保留故障估计的物理结构约束,又能从耦合残差中提取更精细的故障特征,有效提升对微小故障、突变故障及缓变故障的估计精度。
Smart Images

Figure CN122500731A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sensor fault estimation technology, and in particular to a method for sensor fault estimation and detection of flexible joint robotic arms based on UF-BP-DT. Background Technology
[0002] As the application of robotics technology expands in fields such as industrial manufacturing, medical rehabilitation, aerospace equipment, and hazardous environments, the operational scenarios are gradually extending from structured, closed environments to complex, open environments and human-robot collaborative scenarios. This places higher demands on the control precision, execution capabilities, compliance, safety, and fault tolerance of robotic arms. As the core execution unit of a robot system, the performance and reliability of the robotic arm directly determine the overall work quality and safety level.
[0003] Flexible-joint manipulators (FJMs) are a type of multi-input multi-output system containing harmonic reducers and elastic transmission components. They are adaptable to various collaborative scenarios due to their excellent compliance and safety. However, they also possess inherent characteristics such as strong coupling, nonlinearity, and parameter uncertainty, making them susceptible to joint flexibility, friction, load fluctuations, external disturbances, and measurement noise, thus making it difficult to construct accurate dynamic models. Sensors are the core sensing components of their closed-loop control systems, responsible for measuring state quantities such as joint angles, displacements, and velocities. Their outputs directly determine the accuracy of control decisions. Affected by device aging, electromagnetic interference, mechanical shock, and long-term operational wear, sensors are prone to faults such as bias, drift, abrupt changes, or intermittent failures, causing distorted feedback information, reducing control accuracy, deteriorating system dynamic performance, and in severe cases, leading to task failure and safety accidents. Therefore, research on sensor fault estimation and detection for flexible-joint manipulators has significant engineering value.
[0004] Existing fault diagnosis technologies for robotic arms sensors are mainly divided into three categories: hardware redundancy-based methods, analytical model-based methods, and data-driven methods. Hardware redundancy-based methods acquire redundant measurement information by adding sensors to achieve fault identification and isolation. While the principle is intuitive and the diagnosis is direct, it significantly increases system cost, size, and maintenance complexity, making it difficult to adapt to lightweight, compact, flexible articulated robotic arms. Analytical model-based methods construct observers or filters based on system dynamics, generating residual signals from the difference between the actual and estimated outputs. Combined with residual analysis, fault detection and estimation are achieved, exhibiting good physical interpretability. However, the performance of these methods is highly dependent on model accuracy. For unmodeled dynamics, parameter perturbations, and external disturbances in flexible articulated robotic arms, the residual signals are easily interfered with, leading to false alarms and missed alarms. Furthermore, traditional linear observers struggle to reconstruct fault amplitudes with high accuracy, and in scenarios with small faults, initial fault stages, and strong noise, they generally suffer from identification lag, oscillation estimation, and insufficient anti-interference capabilities. Data-driven methods, with BP neural networks as a typical example, learn the mapping relationship between residual features and fault amplitudes through nonlinear approximation capabilities, reducing reliance on precise models and adapting to complex nonlinear systems. However, the output of simple neural network methods is easily affected by the quality of training samples and noise disturbances, resulting in highly volatile estimation results and insufficient stability, which directly reduces the accuracy of subsequent fault identification.
[0005] In the fault diagnosis stage, existing solutions generally adopt a fixed threshold mechanism, that is, a preset constant threshold range is used, and a fault is determined when the residual or fault estimate exceeds the limit. This method is simple to implement, but for flexible joint robotic arms with variable working conditions, the residual and estimate in the healthy state have significant time-varying fluctuation characteristics: if the threshold is too small, normal dynamic fluctuations are easily misjudged as faults, while if the threshold is too large, the detection sensitivity for small, early faults will be weakened. It is impossible to simultaneously take into account detection sensitivity and anti-interference ability, and it is difficult to adapt to the dynamic characteristics of the system in multiple stages such as start-up, shutdown, acceleration, deceleration, and load changes. Summary of the Invention
[0006] The purpose of this invention is to provide a method for sensor fault estimation and detection of flexible joint robotic arms based on UF-BP-DT, thereby solving the above-mentioned technical problems.
[0007] To achieve the above objectives, this invention provides a method for sensor fault estimation and detection in a flexible joint robotic arm based on UF-BP-DT, comprising the following steps: S1. Constructing a continuous-time sensor fault state-space model for a flexible joint manipulator: For a flexible joint manipulator containing elastic transmission components, the motor side angular displacement and the flexible joint elastic deformation angle are selected as generalized coordinates. The second-order dynamic equation of the system is derived using the Lagrange method. The motor side angular displacement, the flexible joint elastic deformation angle, the motor side angular velocity, and the flexible joint deformation angular velocity are selected as state variables. The second-order dynamic equation is converted into a first-order linearized state equation. External load changes and unmodeled dynamics are equivalent to process disturbances and introduced into the first-order linearized state equation. Sensor additive faults and measurement noise are introduced into the output equation to form a complete continuous-time fault state-space model. S2. Design a joint fault observer with robust saturation injection and determine the gain parameters: Based on the fault state space model obtained in S1, construct an augmented system with sensor fault as an extended state, build a joint fault observer containing state estimation loop and fault estimation loop, introduce a robust injection term based on saturation function into the fault estimation loop, construct an augmented estimation error system, derive the linear matrix inequality stability criterion through Lyapunov stability theory, and solve for the state observer gain and fault estimation gain. S3. Constructing a residual sliding window training sample set: Based on the joint fault observer obtained in S2, a sensor fault with known amplitude is injected in an offline environment and the observer is run to generate a residual sequence containing fault information. The length of the sliding window is set, and the two-dimensional residuals at multiple times within the window are concatenated into an input vector in chronological order. The actual fault amplitude at the corresponding time is used as the output label. Min-max normalization is performed on the input vector and the output label respectively to form a BP neural network training sample set. S4. Training the BP neural network fault estimation model: Based on the training sample set obtained in S3, a multi-layer feedforward BP neural network is constructed. The activation functions of the hidden layer, the activation functions of the output layer, the training algorithm, and the performance indicators are set. The network weights and biases are trained using supervised learning. The nonlinear mapping relationship between the residual time series features and the sensor fault amplitude is established to obtain the trained BP neural network fault estimation model. S5. Construct a dynamic threshold criterion system based on health sample statistics: Based on the BP neural network fault estimation model obtained in S4, perform multiple independent simulations under fault-free healthy conditions to obtain multiple sets of network output sequences under healthy conditions. Calculate the mean of all healthy outputs at each time step as the basic value of the threshold centerline. Calculate the standard deviation of all healthy outputs at each time step and multiply it by an amplification factor as the basic value of the threshold radius. Perform moving average and exponential weighted smoothing on the threshold centerline and the basic value of the threshold radius, respectively. Apply upper and lower limit constraints to the smoothed threshold radius. After superimposing a safety margin, generate time-varying dynamic upper and lower thresholds to form a complete dynamic threshold criterion system. S6. Generate online original fault estimation sequence: Run the joint fault observer obtained in S2 online, collect the measurement output signal of the flexible joint robot arm in real time, calculate the real-time residual sequence synchronously, extract the sliding window residual of a set length before the current time, perform normalization processing consistent with S3, input it into the BP neural network fault estimation model obtained in S4, and obtain the original fault estimation value at the corresponding time after inverse normalization processing, and update it step by step to form the original fault estimation sequence. S7. Perform fault estimation output smoothing constraint processing: Based on the original fault estimation sequence obtained in S6, calculate the difference between the original estimate at the current time and the final estimate at the previous time, set the maximum allowable change in a single step, perform change limit operation to obtain the final fault estimate at the current time, and update the smoothed final fault estimation sequence step by step. S8. Perform dynamic threshold matching and fault status determination; based on the dynamic threshold criterion system obtained in S5 and the final fault estimation sequence obtained in S7, compare the final fault estimation value with the dynamic upper and lower thresholds at each time step. When the final fault estimation value is lower than the dynamic lower threshold or higher than the dynamic upper threshold, determine that the corresponding sensor has failed and output an alarm signal. When the final fault estimation value is between the dynamic upper and lower thresholds, determine that the system is in normal operating condition.
[0008] Therefore, the present invention employs the above-mentioned UF-BP-DT-based sensor fault estimation and detection method for flexible joint robotic arms, which has the following beneficial effects: 1. Deep integration of model mechanism and data learning significantly improves fault estimation accuracy: This invention constructs a joint fault observer that matches the structure of the system output fault effect. It synchronously reconstructs state and fault information based on the system model, generating a structured residual signal containing state estimation error and fault estimation error. Then, a BP neural network is used to learn the residual sliding time window, establishing a nonlinear mapping relationship between residual time-series characteristics and sensor fault amplitude. This scheme combines the advantages of both model-driven and data-driven methods, preserving the physical structural constraints of fault estimation while extracting more refined fault features from the coupled residuals, effectively improving the estimation accuracy for minor faults, abrupt faults, and slowly changing faults.
[0009] 2. Optimized Joint Observer Structure for Enhanced Fault Sensitivity and Response: The joint fault observer designed in this invention explicitly incorporates a fault distribution matrix into the output equation, enabling simultaneous system state estimation and output sensor fault estimation. Compared to traditional observers constructed solely for state considerations, this approach more directly reflects the impact path of faults on output measurements, improving the discriminability of fault characteristics. Simultaneously, the fault estimation loop introduces residual driving terms and a saturated function nonlinear robust injection term. When the residual is small, continuous correction is maintained; when the residual is large, the output is limited. This accelerates fault response while avoiding estimation chattering caused by noise amplification, enhancing the system's sensitivity to small-amplitude and abrupt faults and improving estimation stability.
[0010] 3. Multiple anti-disturbance mechanisms work together to enhance estimation robustness under complex conditions: Addressing the issues of false alarms, missed alarms, and estimation oscillations caused by process disturbances and measurement noise, this invention strengthens anti-disturbance capabilities through two mechanisms: First, it uses a residual sliding time window as the input to the BP neural network, comprehensively utilizing temporal evolution information before and after the fault occurrence to effectively reduce the interference of random noise and instantaneous disturbances on fault identification; second, it introduces constraints on the changes in adjacent time steps in the neural network output during online fault estimation, suppressing instantaneous abrupt output changes and estimation oscillations. The synergistic effect of these two mechanisms ensures the accuracy and stability of fault estimation results even under complex conditions involving model uncertainty, external disturbances, measurement noise, and flexible vibrations.
[0011] 4. Statistical Dynamic Thresholds for Improved Fault Detection Reliability and Adaptability: This invention utilizes the mean and standard deviation of neural network outputs under multiple fault-free healthy operating conditions, combined with multi-layer smoothing, boundary constraints, and safety margins to construct time-varying dynamic upper and lower thresholds, replacing the traditional fixed threshold discrimination method. The dynamic thresholds can adaptively adjust according to the system's operating state: when the system is running smoothly and the healthy output fluctuations are small, the threshold range narrows, improving the detection sensitivity for minor and early-stage faults; when the system is in the startup, acceleration / deceleration, load change, or disturbance enhancement phase, the threshold range is appropriately widened to avoid misjudging normal transient fluctuations as faults. This mechanism effectively solves the shortcomings of fixed thresholds in balancing detection sensitivity and anti-interference capability, accurately distinguishing between normal fluctuations in a healthy state and actual fault anomalies, significantly improving the adaptability of fault detection criteria to complex operating conditions and the reliability of alarms.
[0012] 5. Reduce modeling and debugging costs and shorten the R&D cycle: This invention adopts a fusion architecture of "fault joint observer + BP neural network". While utilizing the model structure information, it learns the nonlinear mapping relationship between residuals and faults through neural networks, which reduces the dependence of the fault diagnosis system on the accurate dynamic model. This can reduce the manpower and time investment in actual system modeling, parameter tuning and repeated debugging, shorten the development cycle of the fault diagnosis system and control R&D costs.
[0013] 6. Improved timeliness of fault detection, reducing downtime and production losses: This invention can identify sensor anomalies in the early stages of a fault through residual timing characteristics and achieve automatic alarms based on dynamic thresholds. Compared with manual inspection and simple threshold monitoring methods, it can detect fault symptoms earlier, reducing the risk of fault escalation and cascading failures. In industrial production scenarios, it can effectively reduce equipment malfunctions, downtime for maintenance, product scrapping, and production interruptions caused by sensor failure, thereby reducing production and maintenance losses.
[0014] 7. Improve system reliability and ensure product quality consistency: The online fault estimation results and alarm signals output by this invention can provide data support for subsequent fault isolation, fault-tolerant control, and maintenance decisions, helping to ensure the long-term stable operation of the flexible joint robotic arm. In applications such as automated production and intelligent equipment, it can reduce quality fluctuations caused by faults and improve product production consistency and production line operational stability.
[0015] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0016] Figure 1 This is a flowchart of the sensor fault estimation and detection method for flexible joint robotic arms based on UF-BP-DT of the present invention; Figure 2 The image shows the state trajectory diagram of four state variables in the time response of the flexible joint manipulator system based on the UF-BP-DT sensor fault estimation and detection method of the present invention. Figure 3 This is a comparison diagram of the actual faults and BP neural network fault estimations in a flexible joint manipulator system based on the UF-BP-DT-based sensor fault estimation and detection method of the present invention. Figure 4 This is a state boundary envelope diagram of the actual values of the state variables of the flexible joint manipulator system and its upper and lower boundaries, based on the UF-BP-DT-based sensor fault estimation and detection method of the flexible joint manipulator of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of the present invention and are not intended to limit the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of this application. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout.
[0018] It should be noted that the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, such as a process, method, system, product, or server that includes a series of steps or units, not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or device.
[0019] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0020] like Figures 1-4 As shown, the sensor fault estimation and detection method for flexible joint robotic arms based on UF (Joint Fault Observer)-BP (Backpropagation Neural Network)-DT (Dynamic Threshold) includes the following steps: S1. Constructing a continuous-time sensor fault state-space model for a flexible joint manipulator: For a flexible joint manipulator containing elastic transmission components, the motor side angular displacement and the flexible joint elastic deformation angle are selected as generalized coordinates. The second-order dynamic equation of the system is derived using the Lagrange method. The motor side angular displacement, the flexible joint elastic deformation angle, the motor side angular velocity, and the flexible joint deformation angular velocity are selected as state variables. The second-order dynamic equation is converted into a first-order linearized state equation. External load changes and unmodeled dynamics are equivalent to process disturbances and introduced into the first-order linearized state equation. Sensor additive faults and measurement noise are introduced into the output equation to form a complete continuous-time fault state-space model. S2. Design a joint fault observer with robust saturation injection and determine the gain parameters: Based on the fault state space model obtained in S1, construct an augmented system with sensor fault as an extended state, build a joint fault observer containing state estimation loop and fault estimation loop, introduce a robust injection term based on saturation function into the fault estimation loop, construct an augmented estimation error system, derive the linear matrix inequality stability criterion through Lyapunov stability theory, and solve for the state observer gain and fault estimation gain. S3. Constructing a residual sliding window training sample set: Based on the joint fault observer obtained in S2, a sensor fault with known amplitude is injected in an offline environment and the observer is run to generate a residual sequence containing fault information. The length of the sliding window is set, and the two-dimensional residuals at multiple times within the window are concatenated into an input vector in chronological order. The actual fault amplitude at the corresponding time is used as the output label. Min-max normalization is performed on the input vector and the output label respectively to form a BP neural network training sample set. S4. Training the BP neural network fault estimation model: Based on the training sample set obtained in S3, a multi-layer feedforward BP neural network is constructed. The activation functions of the hidden layer, the activation functions of the output layer, the training algorithm, and the performance indicators are set. The network weights and biases are trained using supervised learning. The nonlinear mapping relationship between the residual time series features and the sensor fault amplitude is established to obtain the trained BP neural network fault estimation model. S5. Construct a dynamic threshold criterion system based on health sample statistics: Based on the BP neural network fault estimation model obtained in S4, perform multiple independent simulations under fault-free healthy conditions to obtain multiple sets of network output sequences under healthy conditions. Calculate the mean of all healthy outputs at each time step as the basic value of the threshold centerline. Calculate the standard deviation of all healthy outputs at each time step and multiply it by an amplification factor as the basic value of the threshold radius. Perform moving average and exponential weighted smoothing on the threshold centerline and the basic value of the threshold radius, respectively. Apply upper and lower limit constraints to the smoothed threshold radius. After superimposing a safety margin, generate time-varying dynamic upper and lower thresholds to form a complete dynamic threshold criterion system. S6. Generate online original fault estimation sequence: Run the joint fault observer obtained in S2 online, collect the measurement output signal of the flexible joint robot arm in real time, calculate the real-time residual sequence synchronously, extract the sliding window residual of a set length before the current time, perform normalization processing consistent with S3, input it into the BP neural network fault estimation model obtained in S4, and obtain the original fault estimation value at the corresponding time after inverse normalization processing, and update it step by step to form the original fault estimation sequence. S7. Perform fault estimation output smoothing constraint processing: Based on the original fault estimation sequence obtained in S6, calculate the difference between the original estimate at the current time and the final estimate at the previous time, set the maximum allowable change in a single step, perform change limit operation to obtain the final fault estimate at the current time, update the smoothed final fault estimation sequence step by step, and suppress the estimation oscillation caused by instantaneous noise. S8. Perform dynamic threshold matching and fault status determination; based on the dynamic threshold criterion system obtained in S5 and the final fault estimation sequence obtained in S7, compare the final fault estimation value with the dynamic upper and lower thresholds at each time step. When the final fault estimation value is lower than the dynamic lower threshold or higher than the dynamic upper threshold, determine that the corresponding sensor has failed and output an alarm signal. When the final fault estimation value is between the dynamic upper and lower thresholds, determine that the system is in normal operating condition.
[0021] Step S1 specifically includes the following steps: S11. Selecting generalized coordinates and establishing the system Lagrangian function: For a flexible joint robotic arm containing elastic transmission components, the flexible joint is equivalent to a linear torsional spring. The joint angular displacement on the motor side and the elastic deformation angle of the flexible joint are selected as generalized coordinates. The total kinetic energy and total elastic potential energy of the system are calculated respectively, and the Lagrangian function is constructed. The expression of the generalized coordinate vector is as follows: ; In the formula, for The generalized coordinate vector of the time system for The constant displacement of the joint angle on the motor side. for The constant elastic deformation angle of the flexible joint; Lagrange function The expression is as follows: ; In the formula, The total kinetic energy of the system. This represents the total elastic potential energy of the system. The expansions of the system's total kinetic energy and total elastic potential energy are as follows: ; In the formula, This is the equivalent rotational inertia on the motor side. Let the moment of inertia of the load-bearing link be _____. The angular velocity of the motor side joint. For the elastic deformation angular velocity of a flexible joint, The equivalent torsional stiffness of the flexible joint. This represents the actual angular velocity of the flexible joint link; This refers to the elastic deformation angle of a flexible joint. S12. Define generalized forces and derive second-order dynamic equations: Based on the Lagrangian function obtained in step S11, define the generalized forces corresponding to the motor output torque, the equivalent damping force on the motor side, and the damping force on the connecting rod side. Derive the second-order dynamic differential equations for the servo end and the load end through the Euler-Lagrangian equations. The Euler-Lagrange equations are expressed as follows: ; In the formula, For the first A generalized coordinate system For the first The first derivative of a generalized coordinate with respect to time For the corresponding number Generalized forces of a generalized coordinate The values are 1 and 2, corresponding to the two generalized coordinates of motor side angular displacement and flexible joint deformation angle, respectively. , , For the equivalent damping on the motor side, Side damping for flexible joint links. This refers to the output torque of the motor; in this embodiment, ; The second-order dynamic differential equations for the server and load are expressed as follows: ; ; In the formula, This refers to the overall gear ratio; For motor efficiency; For gearbox efficiency; The motor current torque constant; Let be the back electromotive force constant of the motor; For the motor armature resistance; This is the input voltage for the motor armature. The side angular acceleration of the motor. For the angular acceleration of flexible joint deformation; S13. Select state variables and convert them into first-order state equations: Select four state variables, namely motor side angular displacement, flexible joint elastic deformation angle, motor side angular velocity, and flexible joint deformation angular velocity, to form the system state vector. Convert the second-order dynamic differential equation obtained in step S12 into a first-order linearized state equation to obtain the system state matrix and input matrix. Wherein, the system state vector , for The motor's side angle displacement at all times, for The constant elastic deformation angle of the flexible joint. for The angular velocity of the motor side at all times, for angular velocity of flexible joint deformation at all times; The first-order linearized state equation is expressed as follows: ; ; ; In the formula, The first derivative of the state vector with respect to time. The system state matrix, For the input matrix, This is the system control input, i.e., the motor armature input voltage; For the comprehensive damping coefficient, and ; The input gain coefficient, and ; In this embodiment ; S14. Introduce extended state equations for process disturbances: External load changes, unmodeled dynamics, and parameter perturbations are uniformly equivalent to process disturbance signals. The first-order state equation obtained in step S13 is introduced through the disturbance input matrix to obtain the system state equations containing the disturbances: ; ; In the formula, The perturbation input matrix is... For process disturbance signals; S15. Constructing the output equation including sensor faults and measurement noise: Selecting the motor side angular displacement and the flexible joint elastic deformation angle as the system output quantities, constructing the output matrix, and introducing the sensor additive fault into the output equation through the fault distribution matrix, while simultaneously introducing the measurement noise signal, to obtain the system measurement output equation: ; in, ; ; In the formula, for The time system measures the output vector. For the output matrix, The fault distribution matrix is... for Real-time sensor additive fault signal, for Measure noise signals at all times; S16. Integrate to obtain the continuous-time fault state-space model: Integrate the system state equation with disturbance obtained in step S14 and the system measurement output equation obtained in step S15, omitting the feedforward compensation term for the known control input (i.e., the control input feedforward compensation is completed in advance based on the nominal dynamics of the robotic arm, and the rated control excitation is equivalently canceled, so the feedforward compensation term for the known control input is omitted in the fault diagnosis-specific model), to form the final continuous-time fault state-space model: .
[0022] Step S2 specifically includes the following steps: S21. Constructing the augmented state and augmented system model: Based on the continuous-time fault state-space model obtained in step S16, sensor faults are included as extended states in the system state vector, assuming... (At this time, the sensor is in a state of slow fault change or piecewise constant change), construct the augmented state vector and the corresponding augmented system matrix to form the augmented system state space model; The augmented state vector expression is as follows: ; In the formula, for augmented state vector at any time; The corresponding augmented system state-space model expression is as follows: ; ; ; ; In the formula, The first derivative of the augmented state vector with respect to time; , , These are the augmented system state matrix, the augmented disturbance input matrix, and the augmented output matrix, respectively. S22. Construct a dual-loop joint fault observer structure: Based on the augmented system model obtained in step S21, construct a residual-driven joint fault observer that includes a state estimation loop and a fault estimation loop. Set the state observer gain matrix and the fault estimation gain matrix respectively, and reserve access positions for robust saturation injection terms in the fault estimation loop. The continuous-time expression for the joint fault observer is as follows: ; residual ; ; In the formula, The first derivative of the state estimate with respect to time. for System state estimate at time 10:00 Here is the gain matrix of the state observer. for The joint fault observer outputs an estimated output vector at each time step. for The initial estimate of sensor faults is output by the fault observer at all times. For the fault estimation gain matrix, For robust saturation injection terms, and , For saturation gain, ; It is a saturation function, and , The width of the boundary layer. , for The intermediate driving scalar of the fault estimation loop at any given time. It is a symbolic function; This embodiment solves the observer using the MATLAB LMI Toolbox to obtain... , ; ; ; S23. Define various estimation errors and derive the composition of the residual signal: Based on the system measurement output equation in step S16 and the observer output estimation in step S22, define the state estimation error and the fault estimation error respectively, and derive the analytical expression of the residual signal by combining them: ; in, ; ; In the formula, for Time-state estimation error vector for Time-based fault estimation error; S24. Construct the augmented estimation error system and derive the LMI stability criterion: Based on the augmented system from step S21 and the linear part of the observer from step S22, define the augmented estimation error vector and derive the dynamic equation of the augmented error under nominal conditions: ; ; In the formula, To augment the first derivative of the estimation error with respect to time, To augment the total gain matrix of the observer; for Time-amplified estimation error vector Let be the augmented state estimation vector, and ; S25. Choosing a Lyapunov function, and based on Lyapunov stability theory, derive the linear matrix inequality criterion that guarantees exponential convergence of the error: If a symmetric positive definite matrix exists and intermediate matrix And it satisfies the following linear matrix inequality: ,in, , Let be the error convergence rate parameter and Then the derivative of the Lyapunov function satisfies The augmented estimation error achieves exponential convergence, and the nominal system of the observer is stable; S26. Solve the linear matrix inequality to determine the observer gain parameters: Solve the linear matrix inequality obtained in step S25 to obtain the symmetric positive definite matrix and the intermediate gain matrix. Calculate the augmented observer total gain matrix through matrix inverse transformation. Then divide the matrix into blocks according to the state dimension and the fault dimension to finally obtain the state observer gain matrix and the fault estimation gain matrix. The formula for calculating the total gain matrix of the augmented observer is as follows: ; In the formula, It is a symmetric positive definite matrix The inverse matrix; The total gain matrix is obtained by dividing it into blocks according to its dimensions. .
[0023] Step S3 specifically includes the following steps: S31. Offline injection of known sensor faults and generation of residual sequences: Based on the state observer gain matrix and fault estimation gain matrix obtained in step S26, a sensor fault signal with known amplitude is injected into the continuous-time fault state-space model obtained in step S16 in the offline simulation environment. The joint fault observer with a robust saturation injection term is run, and the system measurement output at each time step is collected at a fixed sampling step size to obtain a two-dimensional residual time series containing fault information at each sampling time step: ; In the formula, for The two-dimensional residual vector at time step 1. For the first output channel The residual value at time step, For the second output channel The residual value at time step, The sampling time, and , For the first Each sampling time, The system sampling step size, This represents the total number of sampling points in the offline simulation process. S32. Set the sliding window length and construct the input feature vector: Set the residual sliding time window length. For sampling times with an index not less than the window length, extract the two-dimensional residuals of the current time and all sampling times within the previous consecutive window lengths, and concatenate them in chronological order to form a one-dimensional input feature vector: ; In the formula, for The input feature vector at time t, For dimension The real vector space; S33. Matching output labels and constructing an initial sample pair set: Using the actual sensor fault amplitude at the corresponding time moment for each input feature vector as the output label, match it one-to-one with the corresponding input feature vector to form a sample pair, thus forming an initial sample set. : ; and ; In the formula, for Output label at any time, for Real sensor fault amplitude injected at all times; S34. Perform min-max normalization: Perform min-max normalization on all input feature vectors and all output labels in the initial sample set respectively. ; ; In the formula, The input feature vector is the normalized form. The output labels are the normalized labels. The minimum-maximum normalization mapping function corresponding to the input data. This is the minimum-maximum normalization mapping function corresponding to the output label; S35. Divide the sample pairs into three subsets to form a complete training sample set: Divide the normalized sample pairs into three subsets: training set, validation set and test set, to form a complete BP neural network training sample set.
[0024] In this embodiment, the total simulation time is set to 5 seconds, and the initial state is... The observer's initial state is set to a zero vector, and the initial fault estimate is set to zero. The process disturbance is set to an interval... Random disturbances within the range, with measurement noise set to interval Two-dimensional random noise within. The actual fault is set in... to The injection amplitude within the time interval is The constant value fault.
[0025] Step S4 specifically includes the following steps: S41. Construct a multi-layer feedforward BP neural network topology: Based on the input and output dimensions of the training sample set obtained in step S3, construct a multi-layer feedforward BP neural network containing an input layer, multiple hidden layers, and an output layer. Determine the number of neurons in each layer. The network input is a normalized residual window feature vector, and the network output is a normalized sensor fault estimate. The basic mapping form of the network input and output is as follows: ,in, For the forward computation mapping of the BP neural network, This is the normalized fault estimate output by the network; The number of neurons in the input layer is consistent with the dimension of the input feature vector in step S3, and is set to 2l, corresponding to the residual time series data of the two measurement channels within a single sliding window; the hidden layer is set to two layers, with 16 nodes in the first hidden layer and 8 nodes in the second hidden layer; the number of neurons in the output layer is 1. For dual-channel sensors, a channel-independent modeling strategy is adopted. This network model is used to estimate the fault amplitude of one channel sensor, and the other channel is configured with a BP neural network of the same structure to complete the corresponding fault estimation; S42. Set the activation function of the hidden layer in the BP neural network to the hyperbolic tangent sigmoid function and the activation function of the output layer to the purelin function; use the Levenberg-Marquardt algorithm for training to iteratively optimize the network weights and biases; use the mean squared error function as the performance metric, and stop training when the training reaches the maximum number of iterations or the mean squared error drops below the target error; S43. Supervised learning training using backpropagation: The training set samples obtained in step S3 are input into the constructed BP neural network. With minimizing the mean squared error as the optimization objective, all weights and biases of the network are iteratively updated layer by layer through backpropagation. Validation set samples are input simultaneously during training to monitor the network's generalization performance in real time. Training is terminated early when the validation set performance no longer improves after several consecutive rounds to suppress the risk of overfitting. During training, the network performs forward calculations layer by layer to obtain the output error, and then propagates the error back from the output layer to the input layer. The weights and biases of each layer are adjusted according to the error gradient to gradually reduce the mean squared error of the training set, thereby learning the mapping relationship between residual temporal features and fault amplitude.
[0026] S44. Establish a complete nonlinear mapping rule from residual time-series features to fault amplitude: After training convergence, determine the forward calculation mapping relationship of the BP neural network, and combine it with the normalization mapping defined in step S34 to define the inverse normalization calculation rule, forming a complete calculation link from the original residual window to the actual fault estimate. The inverse normalization calculation formula is as follows: ; In the formula, This is the actual sensor fault estimate obtained after inverse normalization. This is the inverse mapping of the min-max normalized mapping corresponding to the output label; Combining the network forward mapping, the complete nonlinear mapping relationship from residual time series characteristics to fault amplitude is as follows: ; In the formula, This is the global nonlinear mapping function from the residual window to the fault amplitude; S45. Test set performance verification and output of the final fault estimation model: Use the test set samples obtained in step S3 to perform performance testing on the trained BP neural network, and evaluate the fault estimation accuracy and generalization ability; after the test results meet the requirements, the trained BP neural network fault estimation model is obtained.
[0027] In this embodiment, the window length is set to... That is, the two-dimensional residual signal within the window over the most recent period constitutes the network input, and the actual fault value at the corresponding moment is used as the output label, and , , .
[0028] The backpropagation (BP) neural network has two hidden layers with 16 and 8 nodes respectively, i.e., the network structure is as follows: The maximum number of training iterations is set to 1000, and the target error is set to... The network training is completed by normalizing the residual samples and fault labels, thereby establishing a nonlinear mapping relationship from the residual window to the fault amplitude.
[0029] Step S5 specifically includes the following steps: S51. Set up a fault-free healthy operating condition and perform multiple independent simulations: Based on the continuous-time fault state-space model obtained in step S16, set up a fault-free healthy operating condition where the sensor fault signal is always zero. Combine the joint fault observer from step S2 and the BP neural network fault estimation model from step S4, and perform... Each independent health condition simulation is performed to obtain the health output sequence of the BP neural network corresponding to each simulation. The fault signal settings for a fault-free, healthy operating condition are as follows: ; In the formula, This is a sensor fault signal under healthy operating conditions. The total duration of a single health simulation; No. The health output of the BP neural network at each sampling time in the secondary health simulation. ; S52. Generate a health residual sequence and perform smoothing preprocessing: For each health simulation, a corresponding health residual sequence is generated by the joint fault observer. The health residual is smoothed by an exponentially weighted average method. The smoothed residual is then concatenated by a sliding window and input into the BP neural network fault estimation model in step S4 to obtain the smoothed health output sequence. In this embodiment, to ensure that the offline health sample preprocessing rules are completely consistent with the residual processing rules in the online fault estimation stage, an exponentially weighted average method is uniformly used to smooth the health residual.
[0030] The formula for calculating the exponentially weighted smoothing of health residuals is as follows: ; In the formula, for The original health residual signal at any given moment, The healthy residual signal after smoothing. This is the residual smoothing coefficient (the same smoothing coefficient is used in both the offline health simulation stage and the online fault estimation stage), and its value range is [value range missing]. This is used to adjust the weighting of historical residuals. for The raw health residual signal generated by the joint fault observer at each moment; S53. Calculate the baseline value of the threshold centerline and perform double-layer smoothing: For all healthy output sequences, calculate the threshold centerline value at each sampling time. The arithmetic mean of the group health output is used as the base value of the threshold centerline; the base value of the centerline is then smoothed by two layers of smoothing, namely moving average and exponential weighted average, to eliminate instantaneous fluctuations and obtain the final smoothed threshold centerline. The formula for calculating the basic value of the threshold centerline is as follows: ; In the formula, for The baseline value of the threshold centerline at time [time]. For the first In the independent simulation of the next fault-free healthy operating condition. The health status fault estimate output by the BP neural network at any given time; The expression for the first-level moving average processing is as follows: ; In the formula, This is the median value of the center line after the moving average. It is a moving average operator; The expression for the second-level exponential weighted smoothing is as follows: ; In the formula, for The final smoothed threshold centerline at time step [time]. The centerline smoothing coefficient has a value range of (0,1) and is used to control the smoothness and response speed of the centerline. for The final smoothed threshold centerline at time step; S54. Calculate the baseline value of the threshold radius and perform double-layer smoothing: Calculate at each sampling time step. The standard deviation of the health output samples is multiplied by the amplification factor to obtain the basic value of the threshold radius. Then, the basic value of the radius is smoothed by two layers of smoothing, namely moving average and exponential weighted average, to obtain the median value of the smoothed threshold radius. The formula for calculating the sample standard deviation of healthy output is as follows: ; in, for The standard deviation of the sample output of health status at any given time; The formula for calculating the basic value of the threshold radius is as follows: ; In the formula, for The baseline value of the threshold radius at time t. This is the standard deviation amplification factor, used to adjust the coverage range of the threshold interval; The expression for the first-level moving average processing is as follows: ; In the formula, This is the median value of the radius after the moving average; The expression for the second-level exponential weighted smoothing is as follows: ; In the formula, for The median value of the threshold radius after exponential smoothing at any given time. This is the radius smoothing coefficient, with a value range of (0,1). for The median value of the threshold radius after exponential smoothing at time; S55. Apply upper and lower limit constraints to the smoothing threshold radius: Apply threshold radius boundary constraints to the intermediate value of the smoothing threshold radius obtained in step S54 to obtain the final threshold radius after constraints. To avoid false alarms due to an excessively narrow threshold range or decreased detection sensitivity due to an excessively wide threshold range, a constrained final threshold radius is obtained; among which, The preset minimum threshold radius, The preset maximum threshold radius; S56. Generating Dynamic Upper and Lower Thresholds by Superimposing Safety Margin: Based on the smoothed threshold centerline, the final threshold radius and safety margin after constraint are superimposed to calculate the dynamic upper and lower thresholds at each sampling time. ; ; In the formula, for The dynamic threshold at any given time. for The dynamic upper threshold at any given time. To provide a safety margin, an additional fault tolerance range is reserved to further reduce the probability of false alarms under healthy operating conditions.
[0031] In this embodiment, to achieve fault alarm, the simulation of healthy samples is repeated under fault-free operating conditions, and the number of healthy samples is [number missing]. Statistically analyze the mean and standard deviation of the output of a BP neural network under healthy conditions, and the safety margin. Minimum threshold radius: The maximum threshold radius is This allows for the construction of dynamic upper and lower thresholds. When the estimated online fault value exceeds the set threshold range, the system determines that a sensor fault has occurred and outputs an alarm signal; otherwise, the system is considered to be in normal operating condition.
[0032] Step S7 specifically includes the following steps: S71. Calculate the fault estimation difference between adjacent time steps: Based on the original fault estimation sequence obtained in step S6, extract the original fault estimation value at the current sampling time and the final fault estimation value at the previous sampling time, calculate the difference between the two, and characterize the change range of the fault estimation value within a single step: ; In the formula, for The single-step change in fault estimation at any given time. for Original fault estimate at time of day The previous sampling time The corresponding final fault estimate; S72. Set the maximum permissible change threshold for a single step: Set the maximum permissible change in the fault estimate between two adjacent sampling times. In this embodiment, it is set that... ; S73. Perform change limiting calculation to obtain the final fault estimate at the current moment: ; In the formula, for The final fault estimate at time; The previous sampling time The final fault estimate; S74. Rolling update to generate a smooth final fault estimation sequence: Perform the operations of steps S71-S73 sequentially for each sampling time according to the sampling time sequence. Use the final fault estimation value obtained at the current time as the benchmark value for the amplitude limiting operation at the next time. Roll update the sequence to form a continuous and smooth final fault estimation sequence.
[0033] In step S8, the fault criterion expression is as follows: ; In the formula, for Real-time fault alarm signals.
[0034] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for sensor fault estimation and detection for a flexible joint robotic arm based on UF-BP-DT, characterized in that: Includes the following steps: S1. Constructing a continuous-time sensor fault state-space model for a flexible joint manipulator: For a flexible joint manipulator containing elastic transmission components, the motor side angular displacement and the flexible joint elastic deformation angle are selected as generalized coordinates. The second-order dynamic equation of the system is derived using the Lagrange method. The motor side angular displacement, the flexible joint elastic deformation angle, the motor side angular velocity, and the flexible joint deformation angular velocity are selected as state variables. The second-order dynamic equation is converted into a first-order linearized state equation. External load changes and unmodeled dynamics are equivalent to process disturbances and introduced into the first-order linearized state equation. Sensor additive faults and measurement noise are introduced into the output equation to form a complete continuous-time fault state-space model. S2. Design a joint fault observer with robust saturation injection and determine the gain parameters: Based on the fault state space model obtained in S1, construct an augmented system with sensor fault as an extended state, build a joint fault observer containing state estimation loop and fault estimation loop, introduce a robust injection term based on saturation function into the fault estimation loop, construct an augmented estimation error system, derive the linear matrix inequality stability criterion through Lyapunov stability theory, and solve for the state observer gain and fault estimation gain. S3. Constructing a residual sliding window training sample set: Based on the joint fault observer obtained in S2, a sensor fault with known amplitude is injected in an offline environment and the observer is run to generate a residual sequence containing fault information. The length of the sliding window is set, and the two-dimensional residuals at multiple times within the window are concatenated into an input vector in chronological order. The actual fault amplitude at the corresponding time is used as the output label. Min-max normalization is performed on the input vector and the output label respectively to form a BP neural network training sample set. S4. Training the BP neural network fault estimation model: Based on the training sample set obtained in S3, a multi-layer feedforward BP neural network is constructed. The activation functions of the hidden layer, the activation functions of the output layer, the training algorithm, and the performance indicators are set. The network weights and biases are trained using supervised learning. The nonlinear mapping relationship between the residual time series features and the sensor fault amplitude is established to obtain the trained BP neural network fault estimation model. S5. Construct a dynamic threshold criterion system based on health sample statistics: Based on the BP neural network fault estimation model obtained in S4, perform multiple independent simulations under fault-free healthy conditions to obtain multiple sets of network output sequences under healthy conditions. Calculate the mean of all healthy outputs at each time step as the basic value of the threshold centerline. Calculate the standard deviation of all healthy outputs at each time step and multiply it by an amplification factor as the basic value of the threshold radius. Perform moving average and exponential weighted smoothing on the threshold centerline and the basic value of the threshold radius, respectively. Apply upper and lower limit constraints to the smoothed threshold radius. After superimposing a safety margin, generate time-varying dynamic upper and lower thresholds to form a complete dynamic threshold criterion system. S6. Generate online original fault estimation sequence: Run the joint fault observer obtained in S2 online, collect the measurement output signal of the flexible joint robot arm in real time, calculate the real-time residual sequence synchronously, extract the sliding window residual of a set length before the current time, perform normalization processing consistent with S3, input it into the BP neural network fault estimation model obtained in S4, and obtain the original fault estimation value at the corresponding time after inverse normalization processing, and update it step by step to form the original fault estimation sequence. S7. Perform fault estimation output smoothing constraint processing: Based on the original fault estimation sequence obtained in S6, calculate the difference between the original estimate at the current time and the final estimate at the previous time, set the maximum allowable change in a single step, perform change limit operation to obtain the final fault estimate at the current time, and update the smoothed final fault estimation sequence step by step. S8. Perform dynamic threshold matching and fault status determination; Based on the dynamic threshold criterion system obtained in S5 and the final fault estimation sequence obtained in S7, the final fault estimation value is compared with the dynamic upper and lower thresholds at each time step. When the final fault estimation value is lower than the dynamic lower threshold or higher than the dynamic upper threshold, the corresponding sensor is determined to be faulty and an alarm signal is output. When the final fault estimation value is between the dynamic upper and lower thresholds, the system is determined to be in normal operation.
2. The UF-BP-DT based flexible-joint robotic arm sensor fault estimation and detection method of claim 1, wherein: Step S1 specifically includes the following steps: S11. Selecting generalized coordinates and establishing the system Lagrangian function: For a flexible joint robotic arm containing elastic transmission components, the flexible joint is equivalent to a linear torsional spring. The joint angular displacement on the motor side and the elastic deformation angle of the flexible joint are selected as generalized coordinates. The total kinetic energy and total elastic potential energy of the system are calculated respectively, and the Lagrangian function is constructed. The expression of the generalized coordinate vector is as follows: ; In the formula, for The generalized coordinate vector of the time system for The constant joint angle displacement of the motor side. for The constant elastic deformation angle of the flexible joint; Lagrange function The expression is as follows: ; In the formula, The total kinetic energy of the system. This represents the total elastic potential energy of the system. The expansions of the system's total kinetic energy and total elastic potential energy are as follows: ; In the formula, This is the equivalent rotational inertia on the motor side. Let the moment of inertia of the load-bearing link be . The angular velocity of the motor side joint. For the elastic deformation angular velocity of a flexible joint, The equivalent torsional stiffness of the flexible joint. This represents the actual angular velocity of the flexible joint link; This refers to the elastic deformation angle of a flexible joint. S12. Define generalized forces and derive second-order dynamic equations: Based on the Lagrangian function obtained in step S11, define the generalized forces corresponding to the motor output torque, the equivalent damping force on the motor side, and the damping force on the connecting rod side. Derive the second-order dynamic differential equations for the servo end and the load end through the Euler-Lagrangian equations. The Euler-Lagrange equations are expressed as follows: ; In the formula, For the first A generalized coordinate system For the first The first derivative of a generalized coordinate with respect to time For the corresponding number Generalized forces of a generalized coordinate The values are 1 and 2, corresponding to the two generalized coordinates of motor side angular displacement and flexible joint deformation angle, respectively. , , For the equivalent damping on the motor side, Side damping for flexible joint links. This refers to the output torque of the motor. The second-order dynamic differential equations for the server and load are expressed as follows: ; ; In the formula, This refers to the overall gear ratio; For motor efficiency; For gearbox efficiency; The motor current torque constant; Let be the back electromotive force constant of the motor; This refers to the armature resistance of the motor. This is the input voltage for the motor armature. The side angular acceleration of the motor. For the angular acceleration of flexible joint deformation; S13. Select state variables and convert them into first-order state equations: Select four state variables, namely motor side angular displacement, flexible joint elastic deformation angle, motor side angular velocity, and flexible joint deformation angular velocity, to form the system state vector. Convert the second-order dynamic differential equation obtained in step S12 into a first-order linearized state equation to obtain the system state matrix and input matrix. Wherein, the system state vector , for The motor's side angle displacement at all times, for The constant elastic deformation angle of the flexible joint. for The angular velocity of the motor side at all times, for angular velocity of flexible joint deformation at all times; The first-order linearized state equation is expressed as follows: ; ; ; In the formula, The first derivative of the state vector with respect to time. The system state matrix, For the input matrix, This is the system control input, i.e., the motor armature input voltage; For the comprehensive damping coefficient, and ; The input gain coefficient, and ; S14. Introduce extended state equations for process disturbances: External load changes, unmodeled dynamics, and parameter perturbations are uniformly equivalent to process disturbance signals. The first-order state equation obtained in step S13 is introduced through the disturbance input matrix to obtain the system state equations containing the disturbances: ; ; In the formula, The perturbation input matrix, For process disturbance signals; S15. Constructing the output equation including sensor faults and measurement noise: Selecting the motor side angular displacement and the flexible joint elastic deformation angle as the system output quantities, constructing the output matrix, and introducing the sensor additive fault into the output equation through the fault distribution matrix, while simultaneously introducing the measurement noise signal, to obtain the system measurement output equation: ; in, ; ; In the formula, for The time system measures the output vector. For the output matrix, The fault distribution matrix is... for Real-time sensor additive fault signal, for Measure noise signals at all times; S16. Integrate to obtain the continuous-time fault state-space model: Integrate the system state equation with disturbance obtained in step S14 and the system measurement output equation obtained in step S15, omitting the feedforward compensation term of the known control input, to form the final continuous-time fault state-space model: 。 3. The method for sensor fault estimation and detection of flexible joint robotic arms based on UF-BP-DT according to claim 2, characterized in that: Step S2 specifically includes the following steps: S21. Constructing the augmented state and augmented system model: Based on the continuous-time fault state-space model obtained in step S16, sensor faults are included as extended states in the system state vector, assuming... An augmented state vector and its corresponding augmented system matrix are constructed to form the state-space model of the augmented system. Before solving for the observer gain matrix, an observability analysis is performed on the augmented system. The observability of the system is verified by a rank test to ensure that the augmented system can simultaneously achieve joint estimation of the mechanical system state and sensor faults. Only when the system meets the observability rank condition can the subsequent observer gain solution process proceed; if the observability condition is not met, the process returns to adjusting the output matrix. or fault distribution matrix Rebuild the system; The augmented state vector expression is as follows: ; In the formula, for augmented state vector at any time; The corresponding augmented system state-space model expression is as follows: ; ; ; ; In the formula, The first derivative of the augmented state vector with respect to time; , , These are the augmented system state matrix, the augmented disturbance input matrix, and the augmented output matrix, respectively. S22. Construct a dual-loop joint fault observer structure: Based on the augmented system model obtained in step S21, construct a residual-driven joint fault observer that includes a state estimation loop and a fault estimation loop. Set the state observer gain matrix and the fault estimation gain matrix respectively, and reserve access positions for robust saturation injection terms in the fault estimation loop. The continuous-time expression for the joint fault observer is as follows: ; residual ; ; In the formula, The first derivative of the state estimate with respect to time. for System state estimate at time 10:00 Here is the gain matrix of the state observer. for The joint fault observer outputs an estimated output vector at each time step. for The initial estimate of sensor faults is output by the fault observer at all times. For the fault estimation gain matrix, For robust saturation injection terms, and , For saturation gain, ; It is a saturation function, and , The width of the boundary layer. , for The intermediate driving scalar of the fault estimation loop at any given time. It is a symbolic function; S23. Define various estimation errors and derive the composition of the residual signal: Based on the system measurement output equation in step S16 and the observer output estimation in step S22, define the state estimation error and the fault estimation error respectively, and derive the analytical expression of the residual signal by combining them: ; in, ; ; In the formula, for Time-state estimation error vector for Time-based fault estimation error; S24. Construct the augmented estimation error system and derive the LMI stability criterion: Based on the augmented system from step S21 and the linear part of the observer from step S22, define the augmented estimation error vector and derive the dynamic equation of the augmented error under nominal conditions: ; ; In the formula, To augment the first derivative of the estimation error with respect to time, To augment the total gain matrix of the observer; for Time-amplified estimation error vector Let be the augmented state estimation vector, and ; S25. Choosing a Lyapunov function, and based on Lyapunov stability theory, derive the linear matrix inequality criterion that guarantees exponential convergence of the error: If a symmetric positive definite matrix exists and intermediate matrix And it satisfies the following linear matrix inequality: ,in, , Let be the error convergence rate parameter and Then the derivative of the Lyapunov function satisfies The augmented estimation error achieves exponential convergence, and the nominal system of the observer is stable; S26. Solve the linear matrix inequality to determine the observer gain parameters: Solve the linear matrix inequality obtained in step S25 to obtain the symmetric positive definite matrix and the intermediate gain matrix. Calculate the augmented observer total gain matrix through matrix inverse transformation. Then divide the matrix into blocks according to the state dimension and the fault dimension to finally obtain the state observer gain matrix and the fault estimation gain matrix. The formula for calculating the total gain matrix of the augmented observer is as follows: ; In the formula, It is a symmetric positive definite matrix The inverse matrix; The total gain matrix is obtained by dividing it into blocks according to its dimensions. .
4. The method for sensor fault estimation and detection of flexible joint robotic arms based on UF-BP-DT according to claim 3, characterized in that: Step S3 specifically includes the following steps: S31. Offline injection of known sensor faults and generation of residual sequences: Based on the state observer gain matrix and fault estimation gain matrix obtained in step S26, a sensor fault signal with known amplitude is injected into the continuous-time fault state-space model obtained in step S16 in the offline simulation environment. The joint fault observer with robust saturation injection term is run, and the system measurement output at each time step is collected at a fixed sampling step size to obtain a two-dimensional residual time series containing fault information at each sampling time. ; In the formula, for The two-dimensional residual vector at time step 1. For the first output channel The residual value at time step, For the second output channel The residual value at time step, The sampling time, and , For the first Each sampling time, The system sampling step size, This represents the total number of sampling points in the offline simulation process. S32. Set the sliding window length and construct the input feature vector: Set the residual sliding time window length. For sampling times with an index not less than the window length, extract the two-dimensional residuals of the current time and all sampling times within the previous consecutive window lengths, and concatenate them in chronological order to form a one-dimensional input feature vector: ; In the formula, for The input feature vector at time t, For dimension The real vector space; S33. Matching output labels and constructing an initial sample pair set: Using the actual sensor fault amplitude at the corresponding time moment for each input feature vector as the output label, match it one-to-one with the corresponding input feature vector to form a sample pair, thus forming an initial sample set. : ; and ; In the formula, for Output label at any time, for Real sensor fault amplitude injected at all times; S34. Perform min-max normalization: Perform min-max normalization on all input feature vectors and all output labels in the initial sample set respectively. ; ; In the formula, The input feature vector is the normalized form. The output labels are the normalized labels. The minimum-maximum normalization mapping function corresponding to the input data. This is the minimum-maximum normalization mapping function corresponding to the output label; S35. Divide the sample pairs into three subsets to form a complete training sample set: Divide the normalized sample pairs into three subsets: training set, validation set and test set, to form a complete BP neural network training sample set.
5. The method for sensor fault estimation and detection of flexible joint robotic arms based on UF-BP-DT according to claim 4, characterized in that: Step S4 Specifically, the following steps are included: S41. Construct a multi-layer feedforward BP neural network topology: Based on the input and output dimensions of the training sample set obtained in step S3, construct a multi-layer feedforward BP neural network containing an input layer, multiple hidden layers, and an output layer. Determine the number of neurons in each layer. The network input is a normalized residual window feature vector, and the network output is a normalized sensor fault estimate. The basic mapping form of the network input and output is as follows: ,in, For the forward computation mapping of the BP neural network, This is the normalized fault estimate output by the network; S42. Set the activation function of the hidden layer in the BP neural network to the hyperbolic tangent sigmoid function and the activation function of the output layer to the purelin function; use the Levenberg-Marquardt algorithm for training to iteratively optimize the network weights and biases; use the mean squared error function as the performance metric, and stop training when the training reaches the maximum number of iterations or the mean squared error drops below the target error; S43. Supervised learning training is performed using the backpropagation mechanism: The training set samples obtained in step S3 are input into the constructed BP neural network. With the mean square error as the optimization objective, all values and bias parameters of the network are iteratively updated layer by layer through the backpropagation mechanism. S44. Establish a complete nonlinear mapping rule from residual time-series features to fault amplitude: After training convergence, determine the forward calculation mapping relationship of the BP neural network, and combine it with the normalization mapping defined in step S34 to define the inverse normalization calculation rule, forming a complete calculation link from the original residual window to the actual fault estimate. The inverse normalization calculation formula is as follows: ; In the formula, This is the actual sensor fault estimate obtained after inverse normalization. This is the inverse mapping of the min-max normalized mapping corresponding to the output label; Combining the network forward mapping, the complete nonlinear mapping relationship from residual time series characteristics to fault amplitude is as follows: ; In the formula, This is the global nonlinear mapping function from the residual window to the fault amplitude; S45. Test set performance verification and output of the final fault estimation model: Use the test set samples obtained in step S3 to perform performance testing on the trained BP neural network, and evaluate the fault estimation accuracy and generalization ability; after the test results meet the requirements, the trained BP neural network fault estimation model is obtained.
6. The method for sensor fault estimation and detection of flexible joint robotic arms based on UF-BP-DT according to claim 5, characterized in that: Step S5 specifically includes the following steps: S51. Set up a fault-free healthy operating condition and perform multiple independent simulations: Based on the continuous-time fault state-space model obtained in step S16, set up a fault-free healthy operating condition where the sensor fault signal is always zero. Combine the joint fault observer from step S2 and the BP neural network fault estimation model from step S4, and perform... Each independent health condition simulation is performed to obtain the health output sequence of the BP neural network corresponding to each simulation. The fault signal settings for a fault-free, healthy operating condition are as follows: ; In the formula, This is a sensor fault signal under healthy operating conditions. The total duration of a single health simulation; No. The health output of the BP neural network at each sampling time in the secondary health simulation. ; S52. Generate health residual sequence and perform smoothing preprocessing: For each health simulation, generate the corresponding health residual sequence through the joint fault observer, smooth the health residual using the exponential weighted average method, and then input the smoothed residual into the BP neural network fault estimation model in step S4 after splicing the smoothed residuals according to the sliding window to obtain the smoothed health output sequence. The formula for calculating the exponentially weighted smoothing of health residuals is as follows: ; In the formula, for The original health residual signal at any given moment, The healthy residual signal after smoothing. This is the residual smoothing coefficient; for The raw health residual signal generated by the joint fault observer at each moment; S53. Calculate the baseline value of the threshold centerline and perform double-layer smoothing: For all healthy output sequences, calculate the threshold centerline value at each sampling time. The arithmetic mean of the group health output is used as the base value of the threshold centerline; the base value of the centerline is then smoothed by two layers of smoothing, namely moving average and exponential weighted average, to eliminate instantaneous fluctuations and obtain the final smoothed threshold centerline. The formula for calculating the basic value of the threshold centerline is as follows: ; In the formula, for The baseline value of the threshold centerline at time [time]. For the first In the independent simulation of the next fault-free healthy operating condition. The health status fault estimate output by the BP neural network at any given time; The expression for the first-level moving average processing is as follows: ; In the formula, The median value of the center line after the moving average. It is a moving average operator; The expression for the second-level exponential weighted smoothing is as follows: ; In the formula, for The final smoothed threshold centerline at time step [time]. The centerline smoothing coefficient; for The final smoothed threshold centerline at time step; S54. Calculate the baseline value of the threshold radius and perform double-layer smoothing: Calculate at each sampling time step. The standard deviation of the health output samples is multiplied by the amplification factor to obtain the basic value of the threshold radius. Then, the basic value of the radius is smoothed by two layers of smoothing, namely moving average and exponential weighted average, to obtain the median value of the smoothed threshold radius. The formula for calculating the sample standard deviation of healthy output is as follows: ; in, for The standard deviation of the sample output of health at any given time; The formula for calculating the basic value of the threshold radius is as follows: ; In the formula, for The baseline value of the threshold radius at time t. This is the amplification factor for the standard deviation; The expression for the first-level moving average processing is as follows: ; In the formula, This is the median value of the radius after the moving average; The expression for the second-level exponential weighted smoothing is as follows: ; In the formula, for The median value of the threshold radius after exponential smoothing at any given time. This is the radius smoothing coefficient, with a value range of (0,1). for The median value of the threshold radius after exponential smoothing at time; S55. Apply upper and lower limit constraints to the smoothing threshold radius: Apply threshold radius boundary constraints to the intermediate value of the smoothing threshold radius obtained in step S54 to obtain the final threshold radius after constraints. ;in, The preset minimum threshold radius, The preset maximum threshold radius; S56. Generating Dynamic Upper and Lower Thresholds by Superimposing Safety Margin: Based on the smoothed threshold centerline, the final threshold radius and safety margin after constraint are superimposed to calculate the dynamic upper and lower thresholds at each sampling time. ; ; In the formula, for The dynamic threshold at any given time. for The dynamic upper threshold at any given time. For safety margin.
7. The method for sensor fault estimation and detection of flexible joint robotic arms based on UF-BP-DT according to claim 6, characterized in that: Step S7 specifically includes the following steps: S71. Calculate the fault estimation difference between adjacent time steps: Based on the original fault estimation sequence obtained in step S6, extract the original fault estimation value at the current sampling time and the final fault estimation value at the previous sampling time, calculate the difference between the two, and characterize the change range of the fault estimation value within a single step: ; In the formula, for The single-step change in fault estimation at any given time. for Original fault estimate at time of day The previous sampling time The corresponding final fault estimate; S72. Set the maximum permissible change threshold for a single step: Set the maximum permissible change in the fault estimate between two adjacent sampling times. ; S73. Perform the change limiting calculation to obtain the final fault estimate at the current moment: ; In the formula, for The final fault estimate at time; The previous sampling time The final fault estimate; S74. Rolling update to generate a smooth final fault estimation sequence: Perform the operations of steps S71-S73 sequentially for each sampling time according to the sampling time sequence. Use the final fault estimation value obtained at the current time as the benchmark value for the amplitude limiting operation at the next time. Roll update the sequence to form a continuous and smooth final fault estimation sequence.
8. The method for sensor fault estimation and detection of flexible joint robotic arms based on UF-BP-DT according to claim 7, characterized in that: In step S8, the fault criterion expression is as follows: ; In the formula, for Real-time fault alarm signals.