Robot grinding and polishing constant force control method and system based on neural network force compensation

By constructing a fault-tolerant neural network model and integrating multiple control strategies, the problems of dynamic gravity interference and environmental changes in the constant force control of robot grinding and polishing were solved, and high-precision and robust contact force tracking control was achieved.

CN121870753AInactive Publication Date: 2026-04-17HENGYANG FINANCE ECONOMICS & IND POLYTECHNIC +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENGYANG FINANCE ECONOMICS & IND POLYTECHNIC
Filing Date
2026-01-15
Publication Date
2026-04-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing robotic grinding and polishing constant force control technology is insufficient in accuracy, has poor robustness, and lacks fault tolerance when dealing with dynamic gravity disturbances, model uncertainties, system failures, and environmental changes.

Method used

A neural network prediction model with a fault tolerance mechanism is constructed, and parameters are optimized by combining an adaptive particle swarm optimization algorithm. The robot end pose information is collected in real time, and gravity interference components are compensated by the principle of weight grouping and collaborative scaling. A model predictive controller is designed for rolling optimization, and fuzzy logic compensator and adaptive impedance control are used for intelligent compensation and fusion, and finally the final control command is generated.

Benefits of technology

It achieves high-precision online elimination of dynamic gravity interference, improves the robustness and reliability of the system under sensor anomalies and model mismatch, effectively copes with environmental uncertainties and nonlinear friction, and realizes high-precision and high-stability tracking control of contact force in robotic grinding and polishing operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121870753A_ABST
    Figure CN121870753A_ABST
Patent Text Reader

Abstract

The invention discloses a robot grinding and polishing constant force control method and system based on neural network force compensation. The method comprises the following steps: constructing a neural network prediction model with a fault tolerance mechanism, and establishing mapping between a robot end pose and a gravity interference force; performing grouping compensation on the predicted gravity interference component through a weight grouping collaborative scaling principle, and extracting a net grinding and polishing contact force signal; rolling optimization is carried out based on the model prediction controller, and an optimal tail end pose adjustment instruction is solved; performing on-line fine adjustment on prediction model parameters by using a neural network prediction deviation; an intelligent compensation signal is generated in combination with a fuzzy logic compensator, and feedforward superposition and feedback adjustment are achieved; and finally, generating an auxiliary pose adjustment instruction through a self-adaptive impedance control model, and fusing the auxiliary pose adjustment instruction with the optimal instruction to form a final control instruction. According to the method, the influence of gravity interference, model uncertainty and environment change is effectively overcome, and high-precision and high-robustness constant-force grinding and polishing control is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot intelligent control and precision machining technology, specifically to a robot grinding and polishing constant force control method and system based on neural network force compensation. Background Technology

[0002] As the manufacturing industry moves towards higher precision and efficiency, robotic grinding and polishing technology has become an important means of precision machining complex curved surface parts. However, constant force control during the grinding and polishing process faces many challenges: gravity interference, changes in environmental stiffness, and model uncertainties significantly affect the control accuracy of the contact force. In particular, dynamic gravity interference generated by the robot in different poses can be coupled into the contact force signal through the force sensor, leading to increased control errors.

[0003] Currently, mainstream force control methods mainly employ strategies such as impedance control and force / position hybrid control. While traditional impedance control can adapt to certain environmental changes, its ability to compensate for dynamic disturbances is limited. Model-based predictive control methods can improve response speed, but they are highly dependent on model accuracy. Simple neural network compensation methods can learn nonlinear disturbances, but they lack fault tolerance mechanisms, and their performance degrades significantly when sensors malfunction or models mismatch.

[0004] Existing technologies have proposed force compensation methods based on neural networks, but they do not consider network fault tolerance mechanisms; model predictive control is used to achieve force tracking, but it is insufficient for dynamic compensation of gravitational disturbances. Therefore, there is an urgent need for an intelligent constant force control method that can comprehensively handle dynamic disturbances and model uncertainties, and has fault tolerance capabilities. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of existing robotic grinding and polishing constant force control technology, such as insufficient accuracy and poor robustness when dealing with dynamic gravity interference, model uncertainty, system failure and environmental changes, and to provide a high-precision, highly adaptive, and fault-tolerant intelligent constant force control scheme.

[0006] In a first aspect, embodiments of this application provide a robot grinding and polishing constant force control method based on neural network force compensation, the method comprising: S1. Construct a neural network prediction model with a fault tolerance mechanism, establish the mapping relationship between the robot end pose and the gravitational disturbance force, and use an adaptive particle swarm optimization algorithm to globally optimize the model parameters. S2. In the robot grinding and polishing operation, the robot end pose information is collected in real time and input into the neural network prediction model to output the predicted gravity interference component; the predicted gravity interference component is grouped based on the weight grouping collaborative scaling principle and the scaling coefficient of each group is calculated. The scaling coefficient is used to compensate for the grouping deviation of the original six-dimensional force signal to obtain the net grinding and polishing contact force signal. S3. The net grinding and polishing contact force signal is used as the controlled variable and compared with the expected constant force value to obtain the force tracking error; a model predictive controller is designed to perform rolling optimization based on the force tracking error, robot motion state and system dynamic constraints, and to solve the optimal end pose adjustment command sequence in the future time domain. S4. Execute the optimal end pose adjustment command, collect the actual net grinding and polishing force signal and the actual gravity interference component, calculate the neural network prediction deviation based on the actual gravity interference component and the predicted gravity interference component output by the neural network prediction model in S2, and use the deviation to fine-tune the parameters of the neural network prediction model online. S5. Based on the force tracking error and its rate of change, generate an intelligent compensation signal through a fuzzy logic compensator, feed the intelligent compensation signal forward and superimpose it onto the output of the model prediction controller and feed it back to the input of the neural network prediction model; S6. Based on the net grinding and polishing contact force signal and the environmental stiffness estimate obtained through its real-time identification, the target impedance parameter is calculated using an adaptive impedance control model, and an auxiliary pose adjustment command is generated. The auxiliary pose adjustment command is weighted and fused with the optimal end-effector pose adjustment command to form the final robot control command.

[0007] Secondly, embodiments of this application provide a robot grinding and polishing constant force control system based on neural network force compensation, applied to the robot grinding and polishing constant force control method based on neural network force compensation as described in the first aspect, the system comprising: The neural network prediction module is used to construct a neural network prediction model with a fault tolerance mechanism, establish the mapping relationship between the robot's end-effector pose and the gravitational disturbance force, and use an adaptive particle swarm optimization algorithm to globally optimize the model parameters. The gravity interference compensation module is used to collect the robot end pose information in real time during robot grinding and polishing operations and input it into the neural network prediction model to output the predicted gravity interference component. Based on the weighted grouping collaborative scaling principle, the predicted gravity interference component is grouped and the scaling coefficient of each group is calculated. The scaling coefficient is used to compensate for the grouping deviation of the original six-dimensional force signal to obtain the net grinding and polishing contact force signal. The model predictive control module is used to compare the net grinding and polishing contact force signal as the controlled variable with the expected constant force value to obtain the force tracking error; the model predictive controller is designed to perform rolling optimization based on the force tracking error, robot motion state and system dynamic constraints, and solve for the optimal end pose adjustment command sequence in the future time domain. The online parameter adjustment module is used to execute the optimal end pose adjustment command, collect the actual net grinding and polishing force signal and the actual gravity interference component, calculate the neural network prediction deviation based on the actual gravity interference component and the predicted gravity interference component output by the gravity interference compensation module, and use the deviation to fine-tune the parameters of the neural network prediction model online. The intelligent compensation module is used to generate an intelligent compensation signal based on the force tracking error and its rate of change through a fuzzy logic compensator, feed the intelligent compensation signal forward and superimpose it onto the output of the model prediction controller and feed it back to the input of the neural network prediction model. The impedance control fusion module is used to calculate the target impedance parameters and generate auxiliary pose adjustment commands based on the net grinding and polishing contact force signal and the environmental stiffness estimate obtained through its real-time identification, using an adaptive impedance control model; the auxiliary pose adjustment commands are weighted and fused with the optimal end-effector pose adjustment commands to form the final robot control commands.

[0008] Thirdly, embodiments of this application provide an electronic device, including: processor; Memory used to store processor-executable instructions; The processor is configured to implement the robot grinding and polishing constant force control method based on neural network force compensation as described in the first aspect when executing the instructions.

[0009] Fourthly, embodiments of this application provide a computer-readable storage medium storing a program that instructs a device to execute the robot grinding and polishing constant force control method based on neural network force compensation as described in the first aspect.

[0010] The beneficial effects of this invention are as follows: through neural network prediction and compensation technology, high-precision online elimination of dynamic gravity interference is achieved; through fault-tolerant design and online learning mechanism, the robustness and reliability of the system in the face of sensor anomalies, model mismatch and other situations are significantly improved; through the organic integration of model predictive control, fuzzy compensation and adaptive impedance control, various disturbances such as environmental uncertainty and nonlinear friction are effectively dealt with, and finally high-precision and high-stability tracking control of contact force in robot grinding and polishing operations is achieved. Attached Figure Description

[0011] Figure 1This is a schematic flowchart of a robot grinding and polishing constant force control method based on neural network force compensation provided in an embodiment of this application.

[0012] Figure 2 This is a diagram illustrating the architecture of a robot grinding and polishing constant force control system based on neural network force compensation, provided as an embodiment of this application.

[0013] Figure 3 A schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.

[0015] It should be noted that in the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.

[0016] Based on the embodiments described in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0017] Example 1

[0018] Figure 1 This is a schematic flowchart illustrating a robot grinding and polishing constant force control method based on neural network force compensation, provided as an embodiment of this application. Figure 1 As shown, a robot grinding and polishing constant force control method based on neural network force compensation includes: S1. Construct a neural network prediction model with a fault-tolerant mechanism, establish the mapping relationship between the robot's end-effector pose and the gravitational disturbance force, and use an adaptive particle swarm optimization algorithm to globally optimize the model parameters. The core function of this step is to establish an intelligent and reliable prediction model. This model can learn the disturbance force of gravity on the end-effector under different robot postures and has inherent fault tolerance capabilities. The global optimization algorithm is used to fine-tune the model parameters, laying the foundation for subsequent accurate compensation.

[0019] Specifically, in this embodiment, the implementation of the fault tolerance mechanism includes: A residual detection module based on Kalman filtering is constructed to calculate the residual sequence between the output value of the neural network prediction model and the actual measured value in real time. The fault detection threshold is dynamically set through adaptive updates of the residual covariance matrix. First, the residual detection module is constructed. This module operates at a fixed sampling period. (Typical value 10 milliseconds) running, per sampling period (indicating the first) Two data vectors are simultaneously acquired at discrete moments: the three-dimensional gravity disturbance force vector predicted by the neural network model. Its weight , , These represent the predicted gravity components along the X, Y, and Z axes, respectively; and the reference value vector obtained through pre-calibration offline. Its weight , , These are the calibration reference values ​​for the gravitational components in the corresponding directions. For each direction (using...), Taking direction as an example, calculate the original deviation. = - The Kalman filter is used to perform optimal estimation of the bias sequence: its state equation is as follows. ,in The true deviation state to be estimated. It is process noise of covariance; the observation equation is ,in It is the observation deviation value. It is observation noise. The filter passes through the prediction step (calculating the predicted state value). and prediction error covariance (Q is the adjustment amount) and update steps (calculating the Kalman gain) State Optimal Estimation and updated error covariance The process is iterated. Finally, the standardized residual is calculated as follows: , As an adjustment quantity, this value theoretically follows a standard normal distribution.

[0020] Let the sliding window length be... =100, the standardized residual sequence within the window is: , Adaptive fault detection threshold Based on the most recent Sliding window calculation for (e.g., 100) standardized residuals: , , in and These are the sample mean and sample standard deviation of the residuals within the window, respectively. This is the confidence coefficient (e.g., 3.0). If Then record once. directional abnormal events.

[0021] Secondly, a fault diagnosis and triggering mechanism is constructed. This mechanism maintains a sliding counting window for each force component, with a length of [missing information]. (e.g. 5), and initialize the exception accumulation count. =0. In each cycle According to standardized residuals With threshold The comparison result updates the count, and the counting logic formula is as follows: , in, For a moment of Accumulated count of directional anomalies. Increment condition: The current standardized residual exceeds the adaptive threshold; Decrease condition: The current standardized residual does not exceed the adaptive threshold, and the counter is greater than 0.

[0022] Set fault trigger threshold (e.g., 3), when satisfied When the system determines that a soft fault has occurred in that direction, it records the current time as the fault trigger time. This activates the subsequent fault-tolerant switching mechanism. Diagnostics in the X, Y, and Z directions are independent of each other, achieving fault isolation.

[0023] When the residual of multiple consecutive sampling periods exceeds the fault detection threshold, network fault diagnosis is triggered, and a fault-tolerant switching mechanism is activated. The fault-tolerant switching mechanism includes the following parallel strategies: switching to a backup neural network model with the same structure but independently trained weights; activating redundant neuron connection paths within the main network, which are dormant under normal operating conditions; and adjusting the weight parameters of the currently activated network online using an adaptive particle swarm optimization algorithm to compensate for model performance degradation caused by the fault.

[0024] Finally, a parallel fault-tolerant switching strategy is executed. Strategy A (backup model switching): A primary model is provided. A backup model with the same structure and independently trained parameters. At the moment the fault was triggered Then, set a transition period number. (e.g., 10). During the transition period, a linearly decaying weighting function is used. Output of the two models and We perform weighted fusion to obtain the final output. After the transition period, switch completely to the backup model. Strategy B (Redundant Path Activation): Pre-set a certain proportion (e.g., 15%) of redundant connections between specific layers of the main network (e.g., between the second and third layers), with weights of zero under normal conditions. After a fault is triggered, calculate the average contribution of each neuron in the second layer to the recent output error: , in, For the length of the backtracking time window, This is the backtracking time offset. For the second layer The activation values ​​of each neuron are determined. Several neurons with the lowest contribution are selected, and all their corresponding redundant connections are activated, with the weights of these connections initialized to small random values. Subsequently, the following steps are performed: Online gradient descent fine-tuning over 50 cycles updates only the newly activated weights to quickly adapt to the current operating conditions. Strategy C (Online Parameter Optimization): A lightweight particle swarm optimizer is launched in the background to optimize some weight parameters of the currently activated network (e.g., all weights between the second and third layers, dimension...). Optimizer configuration particle number (e.g., 10) In each iteration, each particle is determined based on its historical best position. and global optimal position Update its speed and location : , , Inertia weight Indicates the first The inertial weights of each generation are updated using a non-linear decreasing strategy, or according to a linear law. Decrease from the initial value. Acceleration constant. , Set to 2.0. The fitness function is the particle's corresponding parameter in the nearest... (e.g., the sum of the mean squares of prediction errors for 20 historical moments) , These are the iteration indices for this generation and the next generation, respectively. The optimization process runs at a fixed frequency (e.g., one generation per second). If a solution better than the current network parameters is found, it is merged with a certain coefficient. (e.g., 0.1) The optimization results are then hot-updated to the network.

[0025] The process of globally optimizing the model parameters using the adaptive particle swarm optimization algorithm includes: In the initialization phase, the adjustable parameters of the neural network are encoded as particle position vectors, and an adaptive inertia weight adjustment strategy is set to maintain global search capability in the early stage of iteration and enhance local search capability in the later stage of iteration. In the iterative optimization phase, each particle updates its state based on its historical best position and the group's best position, introduces a dynamic mutation mechanism to avoid getting trapped in local optima, and evaluates particle fitness based on validation set performance after each iteration. In the termination and deployment phase, optimization stops when the preset termination condition is met, and the parameter configuration corresponding to the group's best particle is deployed to the neural network prediction model.

[0026] The inertia weight controls the influence of a particle's previous velocity on its current velocity and is a key parameter for balancing global exploration and local exploitation capabilities. This embodiment employs a nonlinear decreasing strategy, where the change in inertia weight with the number of iterations is determined by the following function: , in, and These are the initial and final inertia weights, respectively. The total number of iterations represents the total number of rounds planned for the optimization process. This is the adjustment coefficient.

[0027] S2. In the robot grinding and polishing operation, the robot end pose information is collected in real time and input into the neural network prediction model to output the predicted gravity interference component; the predicted gravity interference component is grouped based on the weighted grouping collaborative scaling principle and the scaling coefficient of each group is calculated. The scaling coefficient is used to compensate for the grouping deviation of the original six-dimensional force signal to obtain the net grinding and polishing contact force signal.

[0028] The main function of this step is to eliminate gravity interference in real time and restore the true contact force signal. Gravity interference is predicted in real time through a neural network, and an innovative group scaling compensation strategy is used to refine the original six-dimensional force signal, extracting the pure grinding and polishing contact force, providing a clean input for precise force control.

[0029] Specifically, in this embodiment, the process of grouping the predicted gravity disturbance components based on the weighted grouping collaborative scaling principle and calculating the scaling coefficient for each group is as follows: (I) Grouping. Based on the spatial correlation analysis of the output weight matrix of the neural network prediction model, the predicted gravity interference components are divided into multiple groups. Each group contains multiple predicted gravity interference components that are spatially adjacent or have similar weight amplitudes. The specific steps are as follows: 1. Spatial correlation analysis. First, the output weight matrix of the neural network prediction model is analyzed. Spatial correlation analysis was performed. The weight matrix has dimensions of [missing information]. 6 corresponds to the output dimension (i.e. , , , , , (Six force / torque components) This represents the number of neurons in the last hidden layer of the neural network. A correlation coefficient matrix is ​​constructed by calculating the Pearson correlation coefficient between each row vector in the weight matrix (corresponding to each output component). Its elements Indicates the first The output component and the first The correlation of each output component in the weight space. Set a correlation threshold. If | |≥ If the two output components are considered to have a strong spatial correlation in their weight distribution, then the components are... and They are grouped together.

[0030] 2. Weight Magnitude Similarity Analysis. Simultaneously, considering the similarity of weight magnitudes: calculate the weight vector for each output component. L2 norm Set an amplitude similarity threshold If the absolute value of the difference between the weight norms of the two output components is less than ,Right now It is also regarded as a similar amplitude component, and the component is... and They are grouped together.

[0031] Through the above two steps of analysis, the six predicted gravity disturbance components are divided into: Each group contains components that are spatially adjacent or have similar weight magnitudes (e.g., group 1 contains...). , Group 2 contains , Group 3 contains , ).

[0032] (ii) Calculation of within-group statistical characteristics. For each group... ( (Total number of groups), calculate the predicted gravity disturbance component within each group in the most recent =Statistical characteristics over 100 sampling periods. Specifically, grouped. Included Taking a component (e.g., group 1 contains 2 components) as an example, each component at time... The predicted value is denoted as ,in Calculate the joint statistic for this group within the sliding window: the mean vector is: Sum of covariance matrix: .

[0033] (III) Establishing the loss function and optimization problem. To determine the optimal scaling factor vector... The following weighted mean square error loss function is constructed: For each group, the statistical characteristics of the predicted gravity disturbance component are calculated to determine the optimal scaling factor that satisfies the bias compensation requirement. Wherein, the loss function... The formula is as follows: , in, The scaling factor vector to be optimized corresponds to the grouping. within One gravity disturbance component. For grouped indexes, Grouping The number of predicted gravity disturbance components included. The time index represents a specific historical sampling moment within the sliding window. This refers to the current moment. The sliding window length is used to calculate the number of historical data points for the loss function. For at any time Grouping predicted by neural networks The gravity disturbance component vector within. For at any time Force sensor measurement, and grouping The corresponding original six-dimensional force signal component vector (without gravity compensation). ⊙ represents element-wise multiplication. Indicated by The error of the weights is the square of the weighted norm. It is a positive definite weight matrix, which can be defined as: , in, It is a group Intrapredictive components in recent The covariance matrix of each sample (reflecting the correlation between components and their respective variances); It is a very small positive number (e.g.) This is used to ensure matrix invertibility and avoid numerical instability; It is an identity matrix.

[0034] (iv) Solving for the scaling factor (analytical solution). Optimal scaling factor vector. The optimization problem is determined by minimizing the weighted mean square sum of the within-group prediction errors. .

[0035] This problem has an analytical solution: , In practical calculations, to avoid inversion and enhance numerical stability, the scaling coefficients are updated online using the recursive least squares method, with the forgetting factor set to... .

[0036] (V) Group Alignment Compensation. The scaling coefficients are grouped and calculated with the corresponding original six-dimensional force signals. Group alignment compensation is performed on the scaled predicted gravity interference components and the original six-dimensional force signals to eliminate systematic deviations within each group. The compensation results from each group are then combined and output as the net grinding and polishing contact force signal. Finally, the calculated group scaling coefficient vectors are... The corresponding original six-dimensional force signal groups are used for calculation to achieve group alignment compensation. The compensation formula is: , in, This is the net contact force signal after compensation for this group. The compensation results of all groups are then recombined in the original output order to obtain the complete six-dimensional net grinding and polishing contact force signal. This serves as the input for the subsequent force control system.

[0037] This process occurs in each sampling period. The internal synchronization ensures real-time and refined elimination of gravity interference, significantly improving the purity and control accuracy of the contact force signal during the grinding and polishing process.

[0038] (vi) Optional Implementation: Online Calculation Method Based on Gradient Descent. As another optional implementation, the determination of the optimal scaling factor that satisfies the deviation compensation requirement can also be calculated online using the gradient descent algorithm. For each group... (e.g., group 1 contains) and The optimal scaling factor is calculated online using the gradient descent algorithm (two prediction components). The specific process is as follows: First, set the initial value of the scaling factor to a vector. (Assume the group contains two components), and set the learning rate. and maximum number of iterations In each sampling period, the most recent group is used. A loss function is constructed using historical data points (i.e., predicted values ​​and corresponding original force signals). This function measures the weighted mean square error between the scaled predicted value and the actual measured value at the current scaling factor. In each iteration, the loss function is calculated on the scaling factor vector. gradient And update the scaling factor in the opposite direction of the gradient: Iterate until the maximum number of iterations is reached. Or the gradient norm is less than the threshold. The final result is... This is the optimal scaling factor that meets the deviation compensation requirements at the current moment, ensuring that the scaled predicted value effectively approximates the preset compensable range and is used in subsequent group alignment compensation processes. This process runs in the background... It is executed asynchronously in a periodic manner, ensuring the real-time performance of the system while enabling adaptive updates of coefficients.

[0039] S3. The net grinding and polishing contact force signal is compared with the desired constant force value to obtain the force tracking error. A model predictive controller is designed, and rolling optimization is performed based on the force tracking error, robot motion state, and system dynamic constraints to solve for the optimal end-effector pose adjustment command sequence in the future time domain. The core function of this step is to achieve high-precision, pre-responsive force tracking. An advanced predictive controller is designed with the extracted net contact force as the control target. This controller can comprehensively consider the current error and future dynamics, and generate a series of optimal robot adjustment commands through rolling optimization, actively and smoothly driving the force value to converge towards the desired value.

[0040] Specifically, in this embodiment, the process of designing a predictive controller and performing rolling optimization based on the force tracking error, robot motion state, and system dynamic constraints is as follows: An optimization objective function is established, which includes a force tracking error penalty term, control input constraints, and system state constraints. The objective function consists of three main parts: a quadratic penalty term for the force tracking error (with a weight matrix of...). ), and a smoothness penalty term for controlling input changes (weight matrix is) The hard constraints include soft constraints on the attitude change range of the end effector, as well as the upper limit of the joint torque, the maximum acceleration of the end effector, and the preset safe workspace boundary.

[0041] The system's future dynamics are predicted in multiple steps using a predictive model. Within each control cycle, the optimal end-effector pose adjustment command sequence that satisfies the system's dynamic constraints is solved, and the first command in the sequence is sent to the robot actuator as the actual control output at the current moment. Specifically, the robot's discretized dynamic equations are used as the predictive model. This model takes the current joint position, velocity, and torque as states, the end-effector pose adjustment command as input, and outputs the future... The end force / torque sequence and motion state sequence for each step (0.2s in the prediction time domain). In each control cycle... (with sampling period) Within the synchronous phase, based on the currently measured force tracking error and robot state, a quadratic programming solver (such as OSQP) is used online to solve for the optimal end-effector pose adjustment command sequence that satisfies all dynamic and state constraints. The first instruction in the desired sequence. The commands are converted into robot joint speed commands and sent to the robot driver for execution via a real-time communication interface, achieving force tracking control at the current moment. The rolling optimization process described above is re-executed in the next cycle to achieve closed-loop adaptive control.

[0042] S4. Execute the optimal end-effector pose adjustment command, acquire the actual net grinding and polishing force signal and the actual gravity interference component, calculate the neural network prediction deviation based on the actual gravity interference component and the predicted gravity interference component output by the neural network prediction model in S2, and use this deviation to fine-tune the parameters of the neural network prediction model online. The main function of this step is to achieve self-correction and continuous evolution of the system. By comparing the deviation between the model prediction and the actual situation, the internal parameters of the neural network model are continuously and incrementally adjusted. This process enables the prediction model to adapt to the slow time-varying characteristics and unmodeled dynamics during the operation, maintaining long-term prediction accuracy.

[0043] Specifically, in this embodiment, the process of fine-tuning the online parameters of the neural network prediction model using neural network prediction bias is as follows: A loss function is constructed based on the neural network prediction bias; the gradient update amount of the neural network prediction model parameters is calculated using the backpropagation algorithm; the model parameters are iteratively optimized using an adaptive learning rate adjustment strategy; and regularization constraints are introduced during the parameter update process to prevent overfitting. Specifically, a) constructing the loss function: based on the deviation sequence between the neural network-predicted gravity disturbance force and the measured disturbance force obtained at the current time (e.g., the most recent...). =50 sets of samples, called the fine-tuning window), construct the mean squared error loss function, and add an L2 regularization term (regularization coefficient λ=0.001) to constrain the weight magnitude. b. Gradient calculation and update: The backpropagation algorithm is used to calculate the gradient of the loss function with respect to all model weights and bias parameters. Each fine-tuning selects only one batch of samples (batch size B=16) to reduce the computational burden and enhance the real-time update. c. Adaptive learning rate adjustment: The Adam optimizer is used for parameter update, with the initial learning rate set to And dynamically adjust based on the decrease in loss during training: if continuous If the loss does not decrease significantly within a few iterations, multiply the learning rate by a decay factor γ = 0.5; otherwise, keep it unchanged. d. Iterative optimization and early stopping: Perform fine-tuning iterations in the background at a fixed frequency (e.g., once per second), with each iteration executing at most [number missing]. If the error of the most recent historical data used for monitoring (e.g., the last 50 samples) increases within 5 consecutive rounds of fine-tuning iterations, an early stop mechanism is triggered, terminating the current fine-tuning process and rolling back to the parameter version with the lowest verification error. This process continues to execute during system operation, enabling the neural network prediction model to adapt online to changes in the robot's working state and dynamic characteristics, improving the long-term accuracy and robustness of gravity disturbance prediction.

[0044] S5. Based on the force tracking error and its rate of change, a smart compensation signal is generated through a fuzzy logic compensator. This smart compensation signal is then fed forward and superimposed onto the output of the model predictive controller and fed back to the input of the neural network predictive model. The core function of this step is to provide fast and adaptive auxiliary compensation to cope with sudden disturbances. Based on the real-time dynamics of the force error, a smart compensation signal is generated through fuzzy inference. This signal not only directly enhances the speed of the control output but also feeds back to the predictive model, dynamically adjusting its characteristics to achieve synergy and performance enhancement between different control modules.

[0045] Specifically, in this embodiment, the process of generating intelligent compensation signals through a fuzzy logic compensator includes: The force tracking error and its rate of change are used as input variables of the fuzzy logic compensator. Reasoning and calculation are performed using a preset fuzzy rule base to output the corresponding fuzzy compensation signal. Specifically, the input fuzzification operation is as follows: the force tracking error... and its rate of change The two input variables of the fuzzy logic compensator are divided into five fuzzy linguistic values: {negative large (NB), negative small (NS), zero (ZE), positive small (PS), positive large (PB)}. The input universes of discourse are normalized to [−1,1] and [−0.5,0.5], respectively, and fuzzification is performed using triangular membership functions.

[0046] The rules in the fuzzy rule base are set based on expert experience. Each rule describes the nonlinear mapping relationship between the force tracking error, its rate of change, and the compensation signal. Specifically, the fuzzy rule base inference process is as follows: a fuzzy rule base containing 5×5=25 rules is preset, with rule forms such as: for example: IF For negative AND The feedforward compensation is positively small, and the feedback adjustment is negatively small. The rules, based on expert experience, describe the nonlinear relationship between error and compensation during dynamic force tracking. The Mamdani inference mechanism is employed, and the principle of taking the smaller value and taking the larger value is used for fuzzy inference.

[0047] The fuzzy compensation signal is divided into a feedforward compensation component and a feedback adjustment component. The feedforward compensation component is directly superimposed on the output of the model prediction controller, while the feedback adjustment component is input to the input of the neural network prediction model to dynamically adjust the model's prediction characteristics. Specifically, the centroid method is used to defuzzify the inference result, converting it into two clear output signals: the feedforward compensation component and the feedback adjustment component. and feedback adjustment components The output universe of discourse is normalized to [−0.1, 0.1], corresponding to the adjustment range of the end force command and the fine-tuning range of the neural network prediction weights, respectively. Among them, the feedforward compensation component... This is directly superimposed on the end force command output of the model predictive controller as real-time disturbance feedforward compensation, improving the system's dynamic response to sudden load changes. (Feedback adjustment component) The input to the neural network prediction model serves as a dynamic bias term to adjust the model's prediction output, compensating for drift in prediction characteristics caused by environmental changes or model aging, and enhancing long-term adaptability. This fuzzy logic compensator... To ensure synchronous operation, it works in conjunction with the model predictive controller and the neural network predictive model to form a feedforward-feedback-adaptive triple compensation mechanism, which significantly improves the accuracy and robustness of grinding and polishing force control.

[0048] S6. Based on the net grinding and polishing contact force signal and the environmental stiffness estimate obtained through real-time identification, an adaptive impedance control model is used to calculate the target impedance parameters and generate auxiliary pose adjustment commands. The auxiliary pose adjustment commands are then weighted and fused with the optimal end-effector pose adjustment commands to form the final robot control commands. The main function of this step is to enhance the system's adaptability to environmental changes and integrate the advantages of multiple control strategies. Interactive characteristics such as environmental stiffness are identified online, and auxiliary adjustment commands considering environmental compliance are generated accordingly. Finally, these commands are intelligently fused with the main controller commands to form final control commands that can accurately track the target force and adapt to environmental changes, thereby achieving robust and compliant constant force control under complex working conditions.

[0049] Specifically, in this embodiment, the process of calculating the target impedance parameters and generating auxiliary pose adjustment commands based on the net grinding and polishing contact force signal and the environmental stiffness estimate obtained through its real-time identification using an adaptive impedance control model includes: The environmental stiffness estimate is identified online using the recursive least squares method. This method constructs an observation equation based on the robot's end-effector position change and contact force history sequence, updating the environmental stiffness estimate at a fixed sampling period. Based on this environmental stiffness estimate and the net grinding and polishing contact force signal, the damping coefficient and stiffness parameters of the impedance control model are dynamically adjusted to generate auxiliary pose adjustment commands to compensate for dynamic environmental changes. These auxiliary pose adjustment commands are then fused with the optimal end-effector pose adjustment command output by the model predictive controller according to preset weighting coefficients.

[0050] Specifically, based on recent =50 sets of robot end-position increments With the corresponding net grinding and polishing contact force increment Constructing linear observation equations ,in, They are time points The net contact force increment and end position increment, To observe the noise, Let be the environmental stiffness matrix to be identified, where The sliding window length is used to identify environmental stiffness. The environmental stiffness estimate is updated online using the recursive least squares (RLS) method. Its forgetting factor is set as Update cycle The initial estimate is set to... N / m. The impedance model adopts a second-order mass-spring-damped structure, and its desired dynamic equation is: ,in, For positional error, It is the velocity error (first derivative). It is the acceleration error (second derivative). To set up a virtual mass matrix, This is the net contact force. The adaptive parameter update strategy is as follows: stiffness parameter matrix The proportionality coefficient β = 0.6; damping parameters The damping ratio ζ = 0.8. This parameter is adjusted in real time according to the estimated environmental stiffness to match the actual contact dynamics.

[0051] Current net contact force The input adaptive impedance model is used to obtain the auxiliary pose adjustment command through discrete integration. This command is used to compensate for the effects of dynamic environmental changes on the contact process. It includes an auxiliary pose adjustment command. The optimal end-effector pose adjustment command output by the model predictive controller Linear fusion based on weighting coefficients: Among them, the weighting coefficient Dynamically adjust based on current contact force tracking error: When the force tracking error is large, increase the weight of MPC instructions. →0.7), emphasizing tracking performance; when the error is small, increase the impedance command weight ( →0.3), emphasizing compliance. The fused commands are converted into joint commands via inverse kinematics and sent to the robot for execution. This process achieves online identification of environmental stiffness and adaptive matching of impedance parameters. Through a fusion control strategy with a model predictive controller, it balances force tracking accuracy and environmental adaptability, improving the dynamic control performance and robustness of grinding and polishing operations.

[0052] Example 2

[0053] like Figure 2 As shown, this application provides an architecture diagram of a robot grinding and polishing constant force control system based on neural network force compensation, which is applied to the robot grinding and polishing constant force control system based on neural network force compensation as described in Embodiment 1. It includes: a neural network prediction module 210, a gravity interference compensation module 220, a model prediction control module 230, an online parameter adjustment module 240, an intelligent compensation module 250, and an impedance control fusion module 260.

[0054] Specifically, the neural network prediction module 210 is used to construct a neural network prediction model with a fault tolerance mechanism, establish a mapping relationship between the robot end pose and the gravitational disturbance force, and use an adaptive particle swarm optimization algorithm to globally optimize the model parameters.

[0055] Specifically, the gravity interference compensation module 220 is used to collect the robot end pose information in real time during robot grinding and polishing operations and input it into the neural network prediction model to output predicted gravity interference components; based on the weighted grouping collaborative scaling principle, the predicted gravity interference components are grouped and the scaling coefficient of each group is calculated; the scaling coefficient is used to compensate for the grouping deviation of the original six-dimensional force signal to obtain the net grinding and polishing contact force signal.

[0056] Specifically, the model prediction control module 230 is used to compare the net grinding and polishing contact force signal as the controlled variable with the expected constant force value to obtain the force tracking error; design a model prediction controller to perform rolling optimization based on the force tracking error, robot motion state and system dynamic constraints, and solve for the optimal end pose adjustment command sequence in the future time domain.

[0057] Specifically, the online parameter adjustment module 240 is used to execute the optimal end pose adjustment command, collect the actual net grinding and polishing force signal and the actual gravity interference component, calculate the neural network prediction deviation based on the actual gravity interference component and the predicted gravity interference component output by the gravity interference compensation module, and use the deviation to fine-tune the parameters of the neural network prediction model online.

[0058] Specifically, the intelligent compensation module 250 is used to generate an intelligent compensation signal based on the force tracking error and its rate of change through a fuzzy logic compensator, feed the intelligent compensation signal forward and superimpose it onto the output of the model prediction controller and feed it back to the input of the neural network prediction model.

[0059] Specifically, the impedance control fusion module 260 is used to calculate the target impedance parameters and generate auxiliary pose adjustment commands based on the net grinding and polishing contact force signal and the environmental stiffness estimate obtained through its real-time identification, using an adaptive impedance control model; and to perform weighted fusion of the auxiliary pose adjustment commands and the optimal end-effector pose adjustment commands to form the final robot control commands.

[0060] Figure 3 This is an electronic device provided in one embodiment of this application. For example... Figure 3 As shown, the electronic device includes at least the following components: processor 301 and memory 300, communication interface 303, and bus 302.

[0061] In this embodiment of the application, memory 300 is used to store executable instructions of processor 301, which, when configured to execute instructions, implements the method as described in the first aspect.

[0062] In embodiments of this application, a computer-readable storage medium includes instructions that instruct a device to perform the method as described in the first aspect. For example, the instructions instruct the device to perform... Figure 1 The method is shown in the process steps.

[0063] In one embodiment of this application, the program operating in the electronic device may be a program that controls a central processing unit (CPU) or similar device to achieve the functions of the above-described embodiments of the present invention (a program that enables the computer to function). Information processed by these systems is then temporarily stored in random access memory (RAM) during processing, and subsequently stored in various ROMs such as read-only memory (FlashROM) and hard disk drives (HDDs), and read, corrected, and written by the CPU as needed.

[0064] It should be noted that a portion of the electronic device described in the above embodiments can also be implemented using a computer. In this case, the program for implementing the control function can be recorded on a computer-readable recording medium, and the program recorded on the recording medium can be read into the computer and executed.

[0065] It should be noted that the computer mentioned here refers to a computer built into an electronic device, employing hardware including an operating system and peripheral devices. Furthermore, computer-readable recording media refers to removable media such as floppy disks, magneto-optical disks, ROMs, and CD-ROMs, as well as storage systems such as hard drives built into the computer.

[0066] Furthermore, computer-readable recording media can include: media that dynamically stores programs for short periods of time, such as communication lines used when transmitting programs via networks like the Internet or communication lines like telephone lines; and media that store programs for fixed periods of time, such as volatile memory inside a computer that serves as a server or client in this case. In addition, the aforementioned program can be a program used to implement the above-mentioned functions, or it can be a program that can implement the above-mentioned functions by combining them with programs already recorded in the computer.

[0067] Furthermore, the electronic device in the above embodiments can also be implemented as an assembly (system group) composed of multiple systems. Each system constituting the system group can possess some or all of the functions or functional blocks of the electronic device in the above embodiments. As a system group, it is sufficient to have all the functions or functional blocks of the electronic device.

[0068] Those skilled in the art should recognize that the above embodiments are only used to illustrate this application and are not intended to limit this application. Any appropriate changes and variations made to the above embodiments within the essential spirit and scope of this application fall within the scope of protection claimed in this application.

Claims

1. A robot grinding and polishing constant force control method based on neural network force compensation, characterized in that, Includes the following steps: S1. Construct a neural network prediction model with a fault tolerance mechanism, establish the mapping relationship between the robot end pose and the gravitational disturbance force, and use an adaptive particle swarm optimization algorithm to globally optimize the model parameters. S2. During the robot grinding and polishing operation, the robot end pose information is collected in real time and input into the neural network prediction model to output the predicted gravity disturbance component. Based on the principle of weighted grouping and collaborative scaling, the predicted gravity interference components are grouped and the scaling coefficient of each group is calculated. The scaling coefficient is then used to compensate for the grouping deviation of the original six-dimensional force signal to obtain the net grinding and polishing contact force signal. S3. The net grinding and polishing contact force signal is used as the controlled variable and compared with the expected constant force value to obtain the force tracking error; a model predictive controller is designed to perform rolling optimization based on the force tracking error, robot motion state and system dynamic constraints, and to solve the optimal end pose adjustment command sequence in the future time domain. S4. Execute the optimal end pose adjustment command, collect the actual net grinding and polishing force signal and the actual gravity interference component, calculate the neural network prediction deviation based on the actual gravity interference component and the predicted gravity interference component output by the neural network prediction model in S2, and use the deviation to fine-tune the parameters of the neural network prediction model online. S5. Based on the force tracking error and its rate of change, generate an intelligent compensation signal through a fuzzy logic compensator, feed the intelligent compensation signal forward and superimpose it onto the output of the model prediction controller and feed it back to the input of the neural network prediction model; S6. Based on the net grinding and polishing contact force signal and the environmental stiffness estimate obtained through its real-time identification, the target impedance parameter is calculated using an adaptive impedance control model, and an auxiliary pose adjustment command is generated. The auxiliary pose adjustment command is weighted and fused with the optimal end-effector pose adjustment command to form the final robot control command.

2. The method according to claim 1, characterized in that, The implementation of the fault tolerance mechanism includes: A residual detection module based on Kalman filtering is constructed to calculate the residual sequence between the output value of the neural network prediction model and the actual measured value in real time. The fault detection threshold is dynamically set through adaptive updating of the residual covariance matrix. When the residual of multiple consecutive sampling periods exceeds the fault detection threshold, network fault diagnosis is triggered and the fault-tolerant switching mechanism is activated. The fault-tolerant switching mechanism includes the following parallel strategies: Switch to an alternative neural network model with the same structure but independently trained weights; Activate redundant neuron connection paths within the main network, which are dormant under normal operating conditions; The adaptive particle swarm optimization algorithm is used to adjust the weight parameters of the currently activated network online to compensate for the model performance degradation caused by faults.

3. The method according to claim 1, characterized in that, The process of globally optimizing the model parameters using the adaptive particle swarm optimization algorithm includes: In the initialization phase, the adjustable parameters of the neural network are encoded as particle position vectors, and an adaptive inertial weight adjustment strategy is set to maintain global search capability in the early stage of iteration and enhance local search capability in the later stage of iteration. During the iterative optimization phase, each particle updates its state based on its historical best position and the group's best position. A dynamic mutation mechanism is introduced to avoid getting trapped in local optima, and the particle fitness is evaluated based on the performance of the validation set after each iteration. During the termination and deployment phase, optimization stops when the preset termination conditions are met, and the parameter configuration corresponding to the optimal particle of the swarm is deployed to the neural network prediction model.

4. The method according to claim 1, characterized in that, The process of grouping the predicted gravity disturbance components based on the weighted grouping collaborative scaling principle and calculating the scaling coefficient for each group is as follows: Based on the spatial correlation analysis of the output weight matrix of the neural network prediction model, the predicted gravity interference components are divided into multiple groups, and each group contains multiple predicted gravity interference components that are spatially adjacent or have similar weight amplitudes. For each group, the statistical characteristics of the predicted gravity disturbance component within the group are calculated to determine the optimal scaling factor that meets the deviation compensation requirements; The scaling factor is grouped and calculated with the corresponding original six-dimensional force signal. The predicted gravity interference component after scaling is grouped and aligned with the original six-dimensional force signal to eliminate systematic deviations within each group. The compensation results of each group are then combined and output as the net grinding and polishing contact force signal.

5. The method according to claim 4, characterized in that, The process of determining the optimal scaling factor that satisfies the deviation compensation requirement is as follows: Based on the statistical characteristics of the predicted gravity disturbance components within each group, an adaptive optimization algorithm is used to calculate the optimal scaling factor that can scale each predicted gravity disturbance component within the group to a preset compensable numerical range. The adaptive optimization algorithm is one of the following: genetic algorithm, simulated annealing algorithm, or gradient descent algorithm.

6. The method according to claim 1, characterized in that, The process of designing a predictive controller and performing rolling optimization based on the force tracking error, robot motion state, and system dynamics constraints is as follows: An optimization objective function is established that includes a force tracking error penalty term, control input constraints, and system state constraints. The system's future dynamics are predicted in multiple steps using a predictive model. Within each control cycle, the optimal end-effector pose adjustment command sequence that satisfies the system dynamics constraints is determined. The first instruction in the sequence is then sent to the robot actuator as the actual control output at the current moment.

7. The method according to claim 1, characterized in that, The process of fine-tuning the parameters of the neural network prediction model online using the prediction bias of the neural network is as follows: Based on the prediction bias of the neural network, a loss function is constructed. The gradient update amount of the neural network prediction model parameters is calculated using the backpropagation algorithm. The model parameters are iteratively optimized using an adaptive learning rate adjustment strategy. Regularization constraints are introduced during the parameter update process to prevent overfitting.

8. The method according to claim 1, characterized in that, The process of generating intelligent compensation signals through a fuzzy logic compensator includes: The force tracking error and its rate of change are used as input variables of the fuzzy logic compensator. The fuzzy logic compensator is inferred and calculated through a preset fuzzy rule base and outputs the corresponding fuzzy compensation signal. The rules in the fuzzy rule base are set according to expert experience, and each rule is used to describe the nonlinear mapping relationship between the force tracking error and its rate of change and the compensation signal; The fuzzy compensation signal is divided into a feedforward compensation component and a feedback adjustment component. The feedforward compensation component is directly superimposed on the output of the model prediction controller, while the feedback adjustment component is input to the input of the neural network prediction model to dynamically adjust the prediction characteristics of the model.

9. The method according to claim 1, characterized in that, The process of calculating the target impedance parameters and generating auxiliary pose adjustment commands based on the net grinding and polishing contact force signal and the environmental stiffness estimate obtained through its real-time identification using an adaptive impedance control model includes: The environmental stiffness estimate is identified online using the recursive least squares method. The recursive least squares method constructs an observation equation based on the robot end position change and the contact force history sequence, and updates the environmental stiffness estimate with a fixed sampling period. Based on the estimated environmental stiffness and the damping coefficient and stiffness parameters of the dynamic adjustment impedance control model using the net grinding and polishing contact force signal, auxiliary pose adjustment commands are generated to compensate for dynamic environmental changes. The auxiliary pose adjustment command is then fused with the optimal end pose adjustment command output by the model prediction controller according to preset weighting coefficients.

10. A robot grinding and polishing constant force control system based on neural network force compensation, applied to the robot grinding and polishing constant force control method based on neural network force compensation as described in any one of claims 1 to 9, characterized in that, The system includes: The neural network prediction module is used to construct a neural network prediction model with a fault tolerance mechanism, establish the mapping relationship between the robot's end-effector pose and the gravitational disturbance force, and use an adaptive particle swarm optimization algorithm to globally optimize the model parameters. The gravity interference compensation module is used to collect the robot end pose information in real time during robot grinding and polishing operations and input it into the neural network prediction model to output the predicted gravity interference component. Based on the weighted grouping collaborative scaling principle, the predicted gravity interference component is grouped and the scaling coefficient of each group is calculated. The scaling coefficient is used to compensate for the grouping deviation of the original six-dimensional force signal to obtain the net grinding and polishing contact force signal. The model predictive control module is used to compare the net grinding and polishing contact force signal as the controlled variable with the expected constant force value to obtain the force tracking error; the model predictive controller is designed to perform rolling optimization based on the force tracking error, robot motion state and system dynamic constraints, and solve for the optimal end pose adjustment command sequence in the future time domain. The online parameter adjustment module is used to execute the optimal end pose adjustment command, collect the actual net grinding and polishing force signal and the actual gravity interference component, calculate the neural network prediction deviation based on the actual gravity interference component and the predicted gravity interference component output by the gravity interference compensation module, and use the deviation to fine-tune the parameters of the neural network prediction model online. The intelligent compensation module is used to generate an intelligent compensation signal based on the force tracking error and its rate of change through a fuzzy logic compensator, feed the intelligent compensation signal forward and superimpose it onto the output of the model prediction controller and feed it back to the input of the neural network prediction model. The impedance control fusion module is used to calculate the target impedance parameters and generate auxiliary pose adjustment commands based on the net grinding and polishing contact force signal and the environmental stiffness estimate obtained through its real-time identification, using an adaptive impedance control model; the auxiliary pose adjustment commands are weighted and fused with the optimal end-effector pose adjustment commands to form the final robot control commands.