Mechanical arm precision control method based on neural network

By constructing a time series prediction model based on mask encoder, using a multi-patch projection module and arbitrary variable attention mechanism, combined with a composite loss function, the dynamic error prediction and compensation problems of the robot arm under multi-variable time series data are solved, and high-precision motion control is achieved.

CN120480934AActive Publication Date: 2025-08-15SHANGHAI BEIMO CONSTR ENG CO LTD

Patent Information

Application Number
CN202510999646.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-21
Publication Date
2025-08-15
Estimated Expiration
2045-07-21

AI Technical Summary

Technical Problem

The prior art is difficult to effectively deal with the multivariable, high-dimensional and heterogeneous time series data of the robotic arms, resulting in motion trajectory errors, affecting positioning accuracy and installation quality.

Method used

A time series prediction model based on mask encoder is constructed, a multi-patch projection module is used to adaptively divide time series with different sampling frequencies, and an arbitrary variable attention mechanism is introduced, combined with a composite loss function for training to achieve high-precision prediction and compensation of dynamic errors of the robotic arm.

Benefits of technology

It significantly improves the fine correction ability of the robotic arm motion trajectory, improves the modeling flexibility and calculation efficiency of the model, enhances the understanding of heterogeneity among variables, and improves the prediction accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120480934A_ABST
    Figure CN120480934A_ABST
Patent Text Reader

Abstract

The invention discloses a mechanical arm precision control method based on a neural network, and relates to the field of mechanical arm precision control, and the method comprises the steps: S1, constructing a multi-source sensing data collection system of a mechanical arm system, and obtaining a joint control instruction, tail end track feedback, an environment state and stress data in real time; s2, constructing a time sequence prediction model based on a mask encoder, processing high-dimensional dynamic error data by adopting a mask encoder structure, adaptively dividing time sequences of different sampling frequencies through a multi-patch projection module, and introducing an arbitrary variable attention mechanism to capture time sequence dependence and heterogeneity between variables; s3, training the model by adopting a composite loss function; and S4, the mechanical arm target pose error point estimation output by the trained model is injected into a mechanical arm control instruction, the motion track of the mechanical arm is compensated in real time, and the mechanical arm is driven to execute high-precision motion control. The problems that in the prior art, efficient and accurate modeling of a multivariable time sequence is difficult, and scheduling optimization is insufficient are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot arm precision control, and in particular to a robot arm precision control method based on neural network. Background Art

[0002] With the development of intelligent manufacturing and industrial automation, robotic arms are increasingly being used in fields such as curtain wall installation and welding. High-precision motion control of robotic arms is directly related to product quality and production efficiency. However, during actual operation, robotic arms are often affected by a variety of dynamic factors such as structural vibration, thermal expansion, external disturbances, and environmental changes. These factors can lead to motion trajectory errors, affecting positioning accuracy and installation quality. Traditional robotic arm control methods, which rely on empirical models or simple error feedback, struggle to effectively handle multivariate, high-dimensional, and heterogeneous time series data, and cannot achieve accurate dynamic error compensation.

[0003] Deep learning technology, especially time series-based prediction models, provides a new solution for robotic arm precision control. However, existing time series prediction methods struggle to comprehensively model multiple time scales, variable heterogeneity, and high-dimensional dynamic characteristics. They also consume significant computational resources when processing data at different sampling frequencies, and their model generalization capabilities are limited. Existing technologies lack dynamic error modeling. Traditional PID control and Kalman filtering are unable to integrate multi-source heterogeneous data (e.g., 1kHz vibration + 10Hz temperature), resulting in large errors in thermal expansion / vibration drift compensation. Existing LSTM / Transformer models, due to their fixed time windows, struggle to account for both high-frequency dynamics (>100Hz) and low-frequency drift (≤10Hz), resulting in high computational redundancy. Current methods rely on empirical formulas to adjust welding parameters and lack closed-loop compensation based on real-time thermal field prediction, resulting in significant deformation in thin plate welding.

[0004] Therefore, designing an efficient deep learning model suitable for multi-variable and multi-scale dynamic error prediction has become a key technical bottleneck for improving the precision control level of robotic arms. Summary of the Invention

[0005] In response to the shortcomings of the existing technology, the present invention aims to propose a series of innovative technical solutions to the difficulties in modeling multi-variable, high-dimensional, and different-frequency time series data and the scheduling optimization problems in the precision control and dynamic error compensation of robotic arms, so as to solve the problems in the existing technology of multi-variable time series difficult to model efficiently and accurately and the scheduling optimization problems.

[0006] To achieve the above objectives, the following technical solutions are adopted: A method for controlling the precision of a robotic arm based on a neural network, comprising: S1. Build a multi-source sensor data acquisition system for the robotic arm system to obtain joint control instructions, end-point trajectory feedback, environmental status, and force data in real time; S2. Build a time series prediction model based on a mask encoder. This model uses a mask encoder structure to process high-dimensional dynamic error data. It adaptively divides time series with different sampling frequencies through a multi-patch projection module and introduces an arbitrary variable attention mechanism to capture temporal dependencies and inter-variable heterogeneity. S3. Using a composite loss function to train the model, the loss function simultaneously constrains the numerical accuracy of the predicted points and the confidence interval coverage quality; S4. Inject the error point estimation of the target position of the manipulator output by the trained model into the manipulator control command, perform real-time compensation on the motion trajectory of the manipulator, and drive the manipulator to perform high-precision motion control.

[0007] Compared with the prior art, the present invention achieves the following beneficial effects: 1. This paper proposes a general structure for time series prediction based on a mask encoder. This structure can effectively capture complex time dependencies, support the joint modeling of multi-dimensional and multi-variable time series, achieve high-precision prediction and compensation of the dynamic errors of the robot arm, and significantly improve the ability to fine-tune the robot arm's motion trajectory.

[0008] 2. The present invention proposes a multi-patch projection module, which adopts a multi-scale patch partitioning strategy for time series with different sampling frequencies, taking into account the feature expression of high-frequency and low-frequency data, significantly improving the modeling flexibility and computational efficiency of the model, and avoiding information loss or computational redundancy caused by inappropriate patch length.

[0009] 3. An arbitrary variable attention mechanism is proposed, and a rotation position encoding matrix is introduced to accurately capture the temporal dependencies of time series, enhance the model's understanding of the heterogeneity and intrinsic connections between variables, and improve the prediction accuracy of multivariate time series.

[0010] 4. A composite loss function combining mean squared error (MSE) and mean scale interval score (MSIS) is proposed, which fully considers the numerical accuracy and interval coverage quality of the prediction error, optimizes the model training objectives, and improves the robustness and generalization performance of the model under different error scales.

[0011] In summary, the neural network-based robotic arm precision control method of the present invention provides technical support for the automated high-precision operation of robotic arms in the field of intelligent manufacturing, solves the problem of difficulty in efficient and accurate modeling and insufficient scheduling optimization of multivariable time series in the existing technology, and has important application value and broad promotion prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0013] Figure 1 1 is a flow chart of a method for controlling the precision of a robotic arm based on a neural network according to an embodiment of the present invention; Figure 2 2 is a schematic diagram of the architecture of a time series prediction model based on a mask encoder according to an embodiment of the present invention; Figure 3 1 is a flow chart of a method for controlling the precision of a robotic arm based on a neural network according to another embodiment of the present invention; Figure 4 is a schematic diagram of the architecture of a thermal deformation prediction model according to another embodiment of the present invention; Figure 5 is an exemplary structural diagram of an electronic device according to another embodiment of the present invention. DETAILED DESCRIPTION

[0014] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0015] (1) Digital modeling for welding 1. Weld structure modeling Use CAD software to extract the key parameters of the curtain wall components to be welded: weld geometry (groove angle, gap size); material thermophysical properties (thermal conductivity, thermal expansion coefficient); constraints (assembly fixing point location); output: welding path reference trajectory and thermal deformation sensitive area identification.

[0016] 2. Welding environment scanning Environmental data fusion perception: Deploy lidar to quickly scan obstacles around the weld to ensure collision-free movement of the welding actuator; visual cameras capture the initial position of the weld in real time (positioning accuracy ±0.1mm).

[0017] (2) Robotic arm hardware 1. Welding control robotic arm Type: 7-DOF redundant robotic arm (±0.1mm repeatability); End effector: High-response servo welding actuator (current / voltage regulation accuracy ±1%); Integrated multispectral sensors: Infrared thermal imager (temperature range 300–1500°C, frame rate 60Hz), laser displacement meter (real-time monitoring of weld deformation, accuracy ±5μm); 2. Auxiliary modules Dynamic cooling device: compressed air nozzle (moves with the welding actuator, with adjustable cooling rate), water cooling module (used for targeted cooling in areas with high heat accumulation); closed-loop feedback system: thermocouple array (buried in the area adjacent to the weld, with a sampling rate of 1kHz), vibration suppression platform (actively offsets the jitter of the robotic arm movement).

[0018] The present invention aims to establish a precision control model that can adaptively compensate for dynamic errors (such as structural vibration and thermal expansion) in the movement of the robotic arm by introducing a deep learning algorithm, thereby achieving refined correction of the motion trajectory of the welding control robotic arm and improving positioning accuracy and stability.

[0019] First embodiment

[0020] Figure 1 FIG is a flow chart of a method for controlling the precision of a robotic arm based on a neural network according to an embodiment of the present invention. Figure 1 As shown, a method 100 for controlling the precision of a robotic arm based on a neural network includes: S1. Build a multi-source sensor data acquisition system for the robotic arm system to obtain joint control instructions, end-point trajectory feedback, environmental status, and force data in real time; This step S1 aims to build a multi-source sensor data acquisition system for the robotic arm system, obtain joint control instructions, end trajectory feedback, environmental status and force data in real time, and perform data preprocessing, specifically including: Deploy a high-frequency sensor with a sampling frequency ≥ 1kHz in the robotic arm system (e.g., sampling period ≤1ms), collect time series sample data to train the control model: Angular displacement and control command data (servo motor input for each joint); Actual output trajectory data (from the end position feedback device); End force and torque data (force control sensor, IMU); Environmental status data (temperature, humidity, vibration amplitude, etc.); All data are normalized (such as Z-score, Min-Max) and denoised (such as Kalman filtering, wavelet denoising) to form an input feature tensor, and the corresponding output is a trajectory error sequence. For example, the trajectory error sequence is defined as tThe vector difference between the actual position of the end and the target position, that is, , construct a supervised training sample set for model training.

[0021] in, is the trajectory error vector at time step t, is the actual measured end pose (from feedback devices such as laser trackers), is the planned target pose (from motion control instructions).

[0022] S2. Build a time series prediction model based on a mask encoder. This model uses a mask encoder structure to process high-dimensional dynamic error data. It adaptively divides time series with different sampling frequencies through a multi-patch projection module and introduces an arbitrary variable attention mechanism to capture temporal dependencies and inter-variable heterogeneity. This step, S2, aims to achieve high-precision prediction and compensation control of dynamic errors (such as vibration drift and small deviations caused by thermal expansion) during the robot's motion by designing a deep learning model. This paper proposes a general architecture for time series prediction based on a mask encoder. This architecture can effectively process high-dimensional, multivariate, and mixed time series data with different sampling frequencies, and exhibits good scalability and robustness.

[0023] The model combines hierarchical input modeling, multi-scale feature extraction and context mask modeling to enhance the model's ability to understand information at different time scales while maintaining computational efficiency, ultimately achieving a precise prediction of the robot's future trajectory errors.

[0024] Further, Figure 2 Schematic diagram of the architecture of the time series prediction model based on the mask encoder according to an embodiment of the present invention. Figure 2 As shown in Figure 2, the architecture of the time series prediction model based on the mask encoder includes: S2.1 build multi-patch projection module: To address the modeling challenges posed by the mixing of multiple time scales in input data (e.g., minute-level robotic arm joint motion data, hour-level thermal expansion and contraction trends, and daily or weekly system stability fluctuations), a multi-patch projection module was designed. The core idea of this module is to divide the input into multiple scale domains based on the data sampling frequency and design appropriate patch sizes for data of different frequencies, thereby achieving effective modeling while balancing accuracy and efficiency.

[0025] Furthermore, the multi-patch projection module S2.1 specifically performs the following operations: S2.1.1 Multi-time scale processing strategy In order to avoid feature compression or information loss when different time-frequency features are modeled at the same scale, the model introduces the following processing strategies: adaptively divide the time patches (data blocks) according to the sampling frequency of the input sensor data, use larger patches to compress the time series dimension for high-frequency data, and use small patches to retain detail features for low-frequency data. An adaptive mapping mechanism is used to automatically allocate patch granularity according to the sampling frequency of the data source to improve the network input adaptability. This step breaks through the limitation of traditional patch division that only considers the time scale. For the first time, it introduces a grouping mechanism of variable physical properties, constructs a "time-variable" two-dimensional decoupled projection, and provides structured feature representation for subsequent attention mechanisms. For the multi-time-scale mixed sensor data of the robotic arm, time patches of different sizes are adaptively divided according to the sampling frequency, and patches of different sizes are mapped to a unified feature space through a linear projection layer with shared weights. At the same time, position encoding is added to maintain the time order to generate a unified embedding representation that integrates multi-scale time series features. Among them, (1) Time dimension: High-frequency data (such as joint position changes and force feedback data, with a sampling frequency > 100 Hz): Use a larger patch length (such as 128) to compress the time dimension into fewer representation units, thereby reducing computational overhead and preserving the overall dynamic trend. T is the total number of time steps in the original sequence, for example, sampling duration 10s × sampling frequency 1kHz, resulting in T = 10000.

[0026] For example, high-frequency data (joint angular velocity, etc.) → large patches , using a 128-step long time window, compressed into T / 128 feature blocks, retaining the overall dynamic trend, is the number of variables with high frequency data; Low-frequency data (such as ambient temperature and system temperature gradient, with a sampling frequency of ≤10 Hz): Use a smaller patch length (such as 8 or 16) to ensure that no information details are missed, especially for capturing the impact of subtle environmental changes on errors; For example, low-frequency data (ambient temperature, etc.) → small patch size ,Using 8-step long time window, compressing it into T / 8 feature blocks, retaining detailed features such as ambient temperature drift, is the number of variables for low-frequency data.

[0027] Specifically, high-frequency data (>100 Hz) uses a step size of 128 corresponding to a 1.28-second time window (covering the main frequency period of the robot arm vibration), and low-frequency data (≤10 Hz) uses a step size of 8 to retain 0.8-second detailed features (matching the thermal inertia time constant).

[0028] (2) Variable dimension: Group by physical coupling (e.g. thermal variables: motor temperature / ambient temperature; dynamic variables: joint angle / end force) Generate variable group codes (K′=number of groups), embedded into patch features; Example: Heat related groups ={motor temperature, ambient temperature}; dynamics group ={joint angle, end force, torque}.

[0029] S2.1.2 Shared Projection Weight Strategy Considering that the model input dimension may be high and there are multiple time channels, assigning a separate projection layer to each type of data will lead to redundant model parameters and increased training overhead. Therefore, a linear mapping weight sharing mechanism is proposed. Using a linear projection layer with shared weights, the divided patches of different sizes are mapped to a feature space of uniform dimensionality. At the same time, positional encoding information is added to the mapped patch features to preserve temporal order. The unified embedding representation that integrates multi-scale temporal features is output to the mask encoder for the subsequent attention mechanism to model temporal dependencies.

[0030] Specifically, to efficiently process high-dimensional input and multi-channel time series data and avoid assigning independent projection layers to patches with different sampling frequencies or different variable groups (which would significantly increase model parameters and training complexity), this model adopts a parameter sharing mechanism in the core operation of the multi-patch projection module. Specifically, Before entering the mask encoder, all patches are transformed using a unified linear projection matrix, and the data distribution from different sources is merged through feature reorganization; then the projection and reorganization are decoupled according to the "time-variable" dual dimension. Specifically: Design separate projection weights: (1) Shared time projection matrix ( ), ,in, is the original time step feature dimension (equal to the patch length, 128 for high frequency and 8 for low frequency), and d is the unified feature dimension after projection, which is used to extract the temporal pattern: regardless of the original patch High-frequency data ( ) or low-frequency data ( ), they all share the same time projection matrix .Right now, and Using the same model parameter matrix . Responsible for extracting common temporal dynamic pattern features from all types of time series patches. dimensional patches are mapped to d-dimensional space.

[0031] (2) Shared variable projection matrix ( ), , Encode dimensions for groups of variables, , used to extract variable group associations: Similarly, the encoding of all variable groups All share the same variable projection matrix . Responsible for learning the physical property encoding of the variable group The mapping relationship from The dimensional group encoding is mapped to a d-dimensional space, capturing the common semantic information at the group level.

[0032] Furthermore, the implementation process includes: for each original patch block obtained by division (regardless of time scale and variable group): Apply shared Perform a linear projection: . Get the code of its corresponding variable group . Application sharing right Perform a linear projection: The projection results are added together and activated by ReLU, and the reorganized output is expressed as follows:

[0033] in, is the feature matrix after projection of high-frequency data, is the feature matrix after projection of low-frequency data, is the original high-frequency data patch; is the original low-frequency data patch; is the high-frequency data time projection matrix; is the time projection matrix of low-frequency data; is the high-frequency data variable projection matrix; is the low-frequency data variable projection matrix; is a linear transformation of the variable group coding; It is the physical grouping code of the variable; is a nonlinear activation function; represents (time patch index, variable group index).

[0034]

[0035] in, is the set of all patch features; is the total number of time patches (T / 128 for high frequency and T / 8 for low frequency); is the number of variable groups (e.g., thermal-related group / kinetic group); , all patches are projected to the same dimension d, d is a hyperparameter and ,in, is the length of the high-frequency patch, is the length of the low-frequency patch, and the typical value of d is 256.

[0036] Time Projection With variable projection Outputs of the same dimension d are fused by element-by-element addition. The grouping mechanism reduces the dimensionality of attention computation, and the physics-guided distribution improves the rationality of error modeling.

[0037] Generating features of uniform dimension Finally, in order to preserve the order of the temporal patches in the sequence and provide relative position information for the subsequent attention mechanism, the temporal patch index b is directly used to generate the absolute position identifier required for the Rotary Position Embedding (RoPE). This means that the patch position encoding is also preserved, ensuring that the model can understand the relative order and structural position of each temporal segment. The specific steps are as follows: (1) Position identification generation: For each time patch index b, it is regarded as the absolute position of the patch in the time series.

[0038] The position input to the position encoder is the temporal patch index b.

[0039] Time step calculation, reconstructed according to the sampling rate:

[0040]

[0041] :timepatchcenterphysicaltime; is the raw data sampling interval (such as 0.001s), which is determined by the sensor (for example, if the sampling frequency is 1kHz, =0.001s); The patch validity window.

[0042] (2) Rotational position coding injection: Instead of using the traditional method of injecting the position coding vector and features In contrast, Rotated Position Encoding (RoPE) is a method that incorporates position information when computing attention scores. The key idea is to rotate the query vector Q and the key vector K according to their absolute positions b and b' before computing the dot product between them.

[0043] (3) Output features: Features obtained through multi-patch projection and group coding It does not explicitly fuse with the position encoding vector itself. The position information b is independently saved and will be used to calculate the rotation matrix of the query vector Q and the key vector K in the arbitrary variable attention mechanism (S2.2) of the subsequent masked encoder layer . Therefore, the projected and grouped features are directly input into the unified embedding representation of the masked encoder (corresponding to in S2.2).

[0044] For the feature vector , the relative position encoding matrix adopts a dimension-wise rotation strategy, specifically using the Rotation Position Encoding (RoPE) formula: For the feature vector , its position-encoded vector is:

[0045] where is the time step difference, is the frequency parameter of the i-th dimension, i is the feature dimension index (starting from 0), and the rotation operation is only performed when i + 1 < d. When i + 1 ≥ d, , that is, for the feature dimension boundary, when i + 1 exceeds the dimension d, no rotation operation is performed and the original value is retained.

[0046] Add frequency-adaptive position encoding to the unified dimension features obtained after mapping to retain their position information in the time series. All processed form the final unified embedding representation and are input into the subsequent masked encoder. Among them, the masked encoder is composed of multiple Transformer blocks. Calculate the cross-time-step dependence of the query vector and the key vector through the rotation position encoding matrix, and dynamically integrate it into the dot product calculation of the query Q and key K vectors based on the relative position difference

[0047] (the rotation position encoding for is dynamically incorporated into the dot product calculation of the query Q and key K vectors (formula described later).

[0048] Finally, this multi-patch projection module, as a pre-processing layer of the encoder, together with the subsequent masked attention mechanism and feed-forward network, constitutes the entire time series modeling structure. Its main advantages are as follows: Achieve unified modeling and compressed expression of multi-time-scale features; Significantly reduce the computational burden and redundancy in high-frequency data processing; Improve the training efficiency and generalization ability of the overall model through linear projection sharing and frequency mapping; Provide more discriminative multi-scale embedded feature input for subsequent accuracy prediction network.

[0049] S2.2 Arbitrary Variable Attention Mechanism: For the unified embedding representation output by the multi-patch projection module, the multi-scale temporal features fused by the unified embedding representation are used to further explore the explicit associations between variables in the spatiotemporal dimension and generate a variable-aware attention weight matrix; To address the problem of non-fixed variable dimension changes, an attention modeling method that unifies time and variable dimensions is proposed. The two-dimensional data is expanded into a one-dimensional nested structure, the temporal dependency is captured by rotating the position encoding matrix, and the variable identity is distinguished by binary attention bias.

[0050] Specifically, the operations performed by the arbitrary variable attention mechanism in S2.2 include: For the unified embedding representation output by the multi-patch projection module, the time index and variable index are combined into a two-dimensional structure to generate the query vector Q and the key vector K. and key vector , the rotation matrix satisfy ,in, is the dimension of the query vector Q, is the dimension of the key vector K, and dimensional decoupling is achieved by block diagonalization: Directly use the decoupled features , , ;in, represents the projected features of the time patch b and variable m; Indicates time patch , the projection characteristics of variable n.

[0051] Physical group index replaces original variable index: k corresponds to variable grouping (e.g. k=1 indicates a thermally correlated group).

[0052] Output variable-aware attention weights, which are used to dynamically weight fusion features and correct robot trajectory errors: Arbitrary variable attention output By physical group Aggregation, for , the attention score aggregation generates the distribution selection weight, that is, the error mode weight : In-group attention aggregation: ;in, For the k Aggregate attention score for the group;

[0053] Generate distribution weights based on attention scores: ;

[0054] in, is the kth physical variable grouping (e.g., thermal-related group, kinetic group); is the number of variables included in the k group; represents the weight of the k-th error mode, and the mode type is learned by data-driven learning; is a learnable weight vector, ensuring .

[0055] For example, when the attention score of the variables (temperature, thermal expansion coefficient) in the thermal-related group k=1 is high, Increases, the lognormal distribution dominates; when the attention score of the variables (joint angle, end force) of the dynamics group k=2 is high, As σ increases, the Student's t distribution dominates.

[0056] Dynamic adaptation mechanism: When the system temperature rises, the attention score of the heat-related group increases, and the corresponding mixed distribution weight coefficient increases, then the thermal expansion model dominates; when the robotic arm moves at high speed, the attention score of the dynamics group increases, and the corresponding mixed distribution weight coefficient increases, then the vibration drift model dominates.

[0057]

[0058] in, : The time index b and variable index m of the query vector, such as the sensor values of the robot end position, joint angle, temperature or vibration; : The time index b' and variable index n of the key vector, that is, the system input or disturbance in a certain state in the past being compared; : Attention score, which indicates the dependence of time step b, variable m on time step b', variable n, and is used as a weighting coefficient for error modeling and correction; : The attention score of time step b and variable m on time step b′ and variable n, which measures the influence of dynamic error sources; : query vector projection matrix; : key vector projection matrix; : The embedded representation of the mth sensor or control variable (such as angle, temperature, load) at time step b; : The embedded representation of the nth sensor or control variable (such as angle, temperature, load) at time step b'; : Relative position encoding rotation matrix, encoding the relative time distance between time steps b and b′, characterizing the time difference between the current state and the historical state, and used to capture dynamic effects such as structural hysteresis and thermal inertia; : A learnable attention bias term (indicating preference for the same variable) when the variable index m=n, used to strengthen the autocorrelation dynamic compensation mechanism, Initialized to 0. : A learnable attention bias term (indicating preferences across variables) when the variable index m≠n, used to model cross-modal or interference coupling effects (such as temperature changes affecting angle accuracy), Initialized to 0; : An indicator function that is 1 when the variable indices are equal and 0 otherwise; : An indicator function that is 1 when the variable indices are not equal and 0 otherwise; : Normalize all possible keys (k, o) to form a softmax distribution; is the time step b , the attention score of variable m to time step k and variable o; : Indicates the transpose operation.

[0059] The above formula introduces a learnable same-variable bias term and cross-variable bias , respectively strengthen the autocorrelation within the variable and the coupling effect between variables; among them, the same variable bias term Activated when the variable index is the same, it is used to enhance the compensation effect of the historical state of the same sensor on the current state, for example, acting on variables within the same physical group (such as motor temperature → ambient temperature) to achieve same group reinforcement; cross-variable bias term Activated when the variable index is different, it is used to model the coupling relationship between the environmental disturbance and the robot control variable, such as modeling the relationship between physical groups (such as the thermal expansion effect of the thermal group → the dynamic group) to achieve cross-group coupling.

[0060] S2.3 builds the mixed distribution prediction output layer: In view of the heterogeneous characteristics of the dynamic errors of the robotic arm, four probability distributions are used in parallel to model different error modes respectively. The outputs of each distribution are adaptively mixed by the learnable weight coefficients corresponding to each error mode to generate a mixed probability distribution of the robotic arm's posture.

[0061] Considering the diverse distribution characteristics of precision errors (such as long tails, right skewness, and discreteness), a mixed distribution prediction head is designed to accommodate different distribution types: Student's t distribution is used to fit long-tail errors; lognormal distribution is used to model skewed errors; negative binomial distribution is used to handle discrete offsets (such as position jumps); and normal distribution is used to approximate linear changes. Therefore, the four probability distributions mentioned above include Student's t distribution, lognormal distribution, negative binomial distribution, and normal distribution.

[0062] Furthermore, the prediction output layer S2.3 performs the following operations: Construct multiple probability distribution prediction heads in parallel, including: Student's t distribution for fitting long-tail errors, lognormal distribution for modeling skew errors, negative binomial distribution for handling discrete jump errors, and normal distribution for approximating linear change errors; Parameter generation layer:

[0063] is the projection feature of the b-th time patch and the m-th variable; (1) Student's t distribution (long-tail error) When dealing with long-tail errors such as joint vibration / instantaneous impact, the prediction distribution parameters corresponding to the k-th error mode (Student's t distribution (long-tail error)) are Provides two core parameters of the Student's t distribution: the degrees of freedom parameter ν, which controls the thickness of the distribution tail. The smaller the value, the thicker the tail and the better it can capture extreme deviations. The scale parameter σ, which describes the degree of discreteness of the error. The value of is calculated from the characteristics of the dynamics group (joint angle / end force), specifically targeting the vibration drift error generated when the robot arm moves at high speed.

[0064] Here, It is the characteristic vector of the dynamic group (such as joint angle / end force), which is used to describe long-tail distribution errors such as vibration drift; For the k The degree of freedom parameter of the Student's t distribution under the error model is, For the k The scale parameter of the Student's t distribution under the error model, 、 are all learnable weight matrices. Through the activation function make sure to maintain the distribution definition.

[0065] (2) Lognormal distribution (skewed error) When modeling right-skewed errors such as motor temperature rise / thermal expansion, the predicted distribution parameters corresponding to the k-th error mode (lognormal distribution (skewed error)) are Provides: location parameter μ: determines the offset direction of the error distribution; shape parameter σ: controls the degree of distribution skewness. The value of is generated by the characteristics of the thermal correlation group (motor temperature / ambient temperature) and specifically describes the systematic position offset caused by temperature changes.

[0066]

[0067] Here, is the eigenvector of a thermally related group (e.g., motor temperature / ambient temperature), used to model the right-side error caused by thermal expansion; is the location parameter of the lognormal distribution; 、 are all learnable weight matrices (similar to the Student's t distribution different branches).

[0068] (3) Negative binomial distribution (discrete jump error) When dealing with discrete errors such as load mutation / position lock, the prediction distribution parameters corresponding to the k-th error mode (negative binomial distribution (discrete jump error)) are Provides: number of successes (i.e. discrete transition counts) : Controls the discrete intervals at which jump events occur; success probability : describes the statistical characteristics of the jump amplitude, Logit transformation is used to ensure . The value of is calculated from the characteristics of the shock-sensitive group (vibration amplitude / current mutation), specifically to capture sudden position jumps such as clamping force fluctuations.

[0069]

[0070] Here, It is the characteristic vector of the shock-sensitive group (such as vibration amplitude / load mutation), which is used to describe discrete errors such as position jump; 、 are all learnable weight matrices.

[0071] (4) Normal distribution (linear change error) When approximating progressive errors such as system aging / structural creep, the prediction distribution parameters corresponding to the kth error mode (normal distribution (linear variation error)) are Provides: mean μ: describes the central tendency of linear drift; standard deviation σ: quantifies the fluctuation range of drift. The value of is generated by the characteristics of the stability group (temperature drift coefficient / accumulated operating hours), which is specifically used to model the slow offset caused by the long-term operation of the robot arm.

[0072]

[0073] Here, is the eigenvector of the system stability group (such as temperature drift / aging coefficient) used to model gradual linear shifts.

[0074] This mechanism supports the input of any number of variables and has permutation invariance, which improves the model's adaptability to actual complex industrial control data.

[0075] Dynamically weight the outputs of each distribution to generate a mixed probability distribution of the robot's posture:

[0076] : Given a sensor state input Under the condition of , the predicted distribution of the robot's posture at time t; : Error point estimation of the target pose of the manipulator (such as the end effector position or angle) predicted by the neural network ( ),in is the predicted actual position of the robot arm (such as the position or angle of the end effector), is the target pose of the robotic arm; : Input features, including historical poses, vibration sensor readings, temperature changes, joint angles, load information, etc. : The number of dynamic error modes considered in the hybrid model (e.g. different load and temperature distribution conditions, etc.); : The error mode weight coefficient of the softmax output is directly input by the physical group weight, which indicates the probability that the current system may be in the kth error state; : Pose prediction probability distribution function under the kth error mode.

[0077] For multi-dimensional poses (such as 3D position and pose angle), each dimension is independently applied with a mixed distribution, sharing the same attention weight But the independent distribution parameters .

[0078] S3. Using a composite loss function to train the model, the loss function simultaneously constrains the numerical accuracy of the predicted points and the confidence interval coverage quality; In step S3, a composite loss function of a weighted combination of mean square error and average scale interval score is used to train the model, wherein the average scale interval score simultaneously penalizes situations where the prediction interval width is insufficient and the true value exceeds the confidence interval boundary.

[0079] The model training uses mean square error (MSE) and mean scale interval score (MSIS) as loss functions:

[0080]

[0081] , : The total loss function of the precision control neural network is used to jointly optimize the point prediction and interval credibility; : The weight of the MSE loss, which controls the penalty intensity of the point error; : The weight of the MSIS loss, which controls the calibration quality of the prediction uncertainty interval; MSE: Mean Squared Error, which is used to measure the average deviation between the actual end position of the manipulator and the predicted value; MSIS: Mean Scale Interval Score, which is used to measure the width and coverage quality of the confidence interval of the predicted pose; : The pose of the end-arm predicted by the neural network; : The actual observed pose of the end of the robotic arm at time t (e.g., from a laser tracker or visual feedback); : The upper bound of the predicted pose at time t; : The lower bound of the predicted pose at time t; : If the actual value is lower than the predicted lower bound, the excess value is penalized; : If the actual value is higher than the upper bound of the prediction, the excess is penalized; φ=0.05: significance level, representing a 95% confidence interval; h: the number of time steps in the prediction interval (such as the length of a trajectory segment); p: the preset historical period length, used to reflect the system's own fluctuation scale (such as temperature or structural periodic error); g: the length of the historical data of the current training batch; denominator Used to calculate historical data The first difference of The mean of , contains g - p sample points in total.

[0082] Furthermore, the weight coefficient is determined as follows: =0.7 (point accuracy priority), =0.3 (interval quality assurance), determined by Bayesian optimization, balancing point accuracy (MSE contribution ≥ 85%) and interval coverage (MSIS contribution ≤ 15%), total loss .

[0083] Training parameters include using the Adam optimizer, an initial learning rate of 0.001, a batch size of 32, and 100 epochs. LayerNorm and dropout were added to prevent overfitting. Adding LayerNorm preprocessing and a 0.1% dropout (applied to the attention weight matrix) reduced the validation set overfitting indicator (GenGap) to 2.3%.

[0084] S4. Inject the error point estimate of the manipulator's target pose predicted by the neural network output of the trained model into the manipulator's control command, perform real-time compensation on the manipulator's motion trajectory, and drive the manipulator to perform high-precision motion control. In step S4, the real-time compensation of the robot arm's motion trajectory includes: calculating the compensated target pose based on the predicted pose error point estimate; solving the target joint angle command corresponding to the compensated target pose through inverse kinematics; calculating the pseudo-inverse of the Jacobian matrix based on the current joint angle, mapping the Cartesian space pose error point estimate value to the joint space compensation amount; superimposing the target joint angle command on the joint space compensation amount adjusted by the gain matrix to generate the final joint command; sending the final joint command to the robot arm joint servo controller for execution, so as to drive the robot arm to perform high-precision motion control. Specifically including: S4.1 Feedforward Control: Input step S3 predicted output pose error point estimate ; Calculate the compensated target pose .

[0085] in, is the original planned target pose.

[0086] S4.2 Joint command generation and execution Introduce Jacobian matrix mapping: Let θ(t) be the current joint angle, read from the encoder), the current joint angle of the 7-DOF robot arm is: ; (Position error point estimation), the position of the end of the robotic arm in Cartesian space is , J(θ) is the Jacobian matrix; Compute the pseudoinverse of the Jacobian matrix for the current configuration: ;in, is the transpose of the Jacobian matrix (dimensions 7×67×6), is a 6-dimensional unit matrix, and λ is the damping coefficient (ranging from 0.01 to 0.1), which is used to avoid singular configurations.

[0087] Map the Cartesian space compensation to the joint space compensation: .

[0088] The corrected Cartesian target pose is obtained based on S4.1 First, solve the corresponding target joint angle command through inverse kinematics (IK) At the same time, the predicted Cartesian space error compensation By mapping the Jacobi pseudo-inverse to the joint space, we can get The final joint instructions By target instruction Add a proportionally adjusted joint compensation constitute:

[0089] in, is the joint angle command vector after compensation; The target pose after compensation is obtained through inverse kinematics (IK). The calculated target joint angle command vector (assuming 7 degrees of freedom), which includes feedforward compensation; : Joint space scale compensation gain matrix, , used to compensate the joint after mapping Perform fine-tuning, which is further fine-tuning of the feedforward compensation (e.g., to handle model prediction errors or high-frequency disturbances), This is an adjustable parameter that can be adjusted through Lyapunov stability analysis or frequency domain response testing. It is usually set to a value close to the unit matrix (such as diag(0.8,..., 0.8) or diag(1.0, ...,1.0)). Its setting principle (such as setting it based on the response characteristics of the joint servo system or stability analysis) is to avoid oscillation or instability caused by excessive gain.

[0090] Finally, the compensated joint angle command vector , sent to the bottom joint servo controller of the robotic arm for execution.

[0091] According to the above-mentioned embodiment of the present invention, by adopting multi-scale patch projection and physical grouping attention mechanism, combined with dynamic weighted output of mixed probability distribution (t distribution, lognormal, negative binomial distribution, normal distribution, etc.), the dynamic error compensation accuracy of the robotic arm is effectively improved.

[0092] Example 2 Figure 3 FIG. 1 is a flow chart of a method for controlling the precision of a robotic arm based on a neural network according to another embodiment of the present invention. Figure 3 As shown, a neural network-based robotic arm precision control method 100 of the present invention further includes: S5. The welding actuator is precisely positioned by controlling the movement of the robotic arm, and a thermal deformation prediction model is constructed using a neural network to predict the welding thermal deformation in real time, and the welding actuator path, speed and power are dynamically adjusted.

[0093] In step S5, the dynamic control process of the welding actuator specifically includes: S5.1 Multi-source thermal data acquisition Real-time input: welding actuator current I(t) (range: 50-300A), voltage U(t), moving speed v(t); temperature field distribution T(x′, y′, t) (infrared thermal imager); real-time weld defect detection information (location, type) Defect(t) (laser displacement meter); material state S(t) (spectral characteristics); S5.2 Constructing a thermal deformation prediction model Figure 4 FIG. 1 is a schematic diagram of the architecture of a thermal deformation prediction model according to another embodiment of the present invention. Figure 4 As shown, a spatiotemporal convolution-long short-term memory network (ST-ConvLSTM) is used to construct a thermal deformation prediction model including a spatial encoding module and a temporal prediction module: the spatial encoding module uses three layers of three-dimensional convolution layers to extract the spatial gradient features of the temperature field through the convolution kernel of a set size: the 3D convolution layer extracts the spatial features of the temperature field; the temporal prediction module uses a two-layer long short-term memory network to output a sequence of thermal deformation predictions in the next few seconds: the LSTM layer models the thermal accumulation effect; output: a sequence of predicted thermal deformation values of the local key points of welding relative to the current time t in the next 5 seconds. (Unit: mm), where Indicates the predicted deformation at t+1 second.

[0094] Preferably, the ST-ConvLSTM network contains 3 layers of spatiotemporal convolution (number of filters [64, 128, 256]) and 2 layers of LSTM (512 hidden units), and the spatial encoder uses a 3×3×3 convolution kernel to capture the temperature field gradient.

[0095] S5.3 Dynamic adjustment strategy of welding actuator Optionally, in some embodiments, the following welding actuator dynamic adjustment strategy is executed to dynamically adjust the welding actuator path, speed, and power, including: If the thermal deformation predicted in the next 1 second If it is less than the first threshold (such as 0.1 mm), the current parameters are maintained; If the first threshold (such as 0.1mm) ≤ the thermal deformation predicted in the next 1 second < the second threshold (e.g. 0.3mm), the welding current is reduced by 10% and the moving speed is increased by 15%; If the thermal deformation predicted in the next 1 second ≥ the second threshold (such as 0.3mm), the dynamic cooling device is triggered and the path reverse compensation offset is generated , w is the material-related gain coefficient, and this offset Applies to the path point currently being welded or the next path point to be welded The modified target pose goes through S4 process again to generate joint instructions, where the path compensation offset The direction of the path is determined by the direction of material expansion detected by the thermal imager. : For example, it is the Cartesian space position compensation amount perpendicular to the weld direction and away from the side of the material thermal expansion bulge at the path point where excessive deformation is detected.

[0096] Optionally, in some embodiments, when When the diameter is ≥0.3mm, the dynamic cooling device is triggered to activate the compressed air nozzle and the water cooling module synchronously.

[0097] According to this embodiment of the present invention, a spatiotemporal fusion thermal deformation model is constructed, in which a 3D convolutional layer (64-128-256 filter) extracts the spatial gradient of the temperature field, coupled with LSTM to predict thermal deformation in the next 5 seconds, and drives a three-level closed-loop strategy (current / speed adaptive adjustment + vertical weld path compensation), which effectively suppresses thermal deformation and improves the welding repeat positioning accuracy, reduces the deformation of the thin plate, and thus improves the yield rate.

[0098] Example 3 In addition, some embodiments of the present application further provide an electronic device. The electronic device may be various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, etc. The electronic device may also be various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices.

[0099] Figure 5 An exemplary structural diagram of the electronic device is disclosed. Figure 5 As shown, the electronic device includes: one or more processors 1101, memory 1102, and interfaces for connecting various components, including high-speed and low-speed interfaces. The various components are interconnected using different buses and can be mounted on a common motherboard or in other ways as needed. The processor can process instructions executed within the electronic device, including instructions stored in or on the memory for displaying graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some other embodiments, if desired, multiple processors and / or multiple buses can be used with multiple memories and multiple storage devices. Similarly, multiple electronic devices can be connected, with each device providing some of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or claimed herein.

[0100] The electronic device may further include: an input device 1103 and an output device 1104. The processor 1101, the memory 1102, the input device 1103 and the output device 1104 may be connected via a bus or other means. Figure 5 The bus connection is taken as an example.

[0101] Input device 1103 can receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. Examples include a touch screen, keypad, mouse, trackpad, touchpad, pointing stick, one or more mouse buttons, trackball, joystick, and other input devices. Output device 1104 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibration motors). The display device may include, but is not limited to, a liquid crystal display (LCD), a light-emitting diode (LED) display, and a plasma display. In some embodiments, the display device may be a touch screen.

[0102] To provide user interaction, the electronic device may be a computer. The computer includes a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user, as well as a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices may also be used to provide user interaction; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback), and input from the user may be received in any form, including acoustic input, voice input, or tactile input.

[0103] In the embodiments of the present application, a computer program / instruction is stored on a computer-readable medium. When executed by a processor, the computer program / instruction implements the steps of the method provided in any one or more of the above embodiments. The computer-readable medium may be included in the electronic device described in the above embodiments, or it may exist independently and not be incorporated into the device. The computer-readable medium carries one or more computer-readable instructions.

[0104] The memory 1102 can be used as a non-transitory computer-readable storage medium to store non-transitory software programs, non-transitory computer executable programs, and modules. The processor 1101 executes the non-transitory software programs, instructions, and modules stored in the memory 1102 to execute various functional applications and data processing of the server, thereby implementing the program instructions / modules corresponding to the method provided in any one or more of the above embodiments of the present application.

[0105] The memory 1102 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created based on the use of the electronic device, etc. In addition, the memory 1102 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 1102 may optionally include a memory remotely located relative to the processor 1101, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0106] It should be noted that the computer-readable medium described in this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component.

[0107] Computer-readable media includes both permanent and non-permanent, removable and non-removable media, and can be implemented using any method or technology for information storage. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc-read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0108] Computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0109] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. For example, implementation may be achieved using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In some embodiments, the software program of the present application may be executed by a processor to implement the above steps or functions. Similarly, the software program of the present application (including related data structures) may be stored in a computer-readable recording medium, such as a RAM memory, a magnetic or optical drive, a floppy disk, or the like. In addition, some steps or functions of the present application may be implemented using hardware, for example, as a circuit that cooperates with a processor to perform the various steps or functions.

[0110] The computer program product provided in the embodiments of the present application includes one or more computer programs / instructions, which, when executed by a processor, generate, in whole or in part, the processes or functions described in the embodiments of the present application. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0111] The flowcharts or block diagrams in the accompanying drawings illustrate the possible architectures, functions and operations of the devices, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of code, and the module, program segment or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-specific system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0112] The scope of this application is defined by the appended claims rather than the foregoing description and is therefore intended to encompass within this application all changes that come within the meaning and range of equivalents of the claims. Any reference signs in the claims should not be construed as limiting the claims to which they relate. In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim may also be implemented by one unit or device through software or hardware. Words such as "first" and "second" are only used to distinguish the description and do not indicate any particular order, nor should they be understood as indicating or implying relative importance.

[0113] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art may easily propose variations or substitutions within the technical scope disclosed in the present application, and such variations or substitutions shall be encompassed within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the scope of protection of the claims, and the above embodiments shall be regarded as exemplary and non-limiting.

Claims

1. A method for controlling the precision of a robotic arm based on a neural network, characterized in that: include: S1. Build a multi-source sensor data acquisition system for the robotic arm system to obtain joint control instructions, end-point trajectory feedback, environmental status, and force data in real time; S2. Build a time series prediction model based on a mask encoder. This model uses a mask encoder structure to process high-dimensional dynamic error data. It adaptively divides time series with different sampling frequencies through a multi-patch projection module and introduces an arbitrary variable attention mechanism to capture temporal dependencies and inter-variable heterogeneity. S3. Using a composite loss function to train the model, the loss function simultaneously constrains the numerical accuracy of the predicted points and the confidence interval coverage quality; S4. Inject the error point estimation of the target position of the manipulator output by the trained model into the manipulator control command, perform real-time compensation on the motion trajectory of the manipulator, and drive the manipulator to perform high-precision motion control.

2. The method for controlling the precision of a robotic arm according to claim 1, wherein: In step S2, the architecture of the time series prediction model based on the mask encoder includes: Multi-patch projection module: For the multi-time-scale mixed sensor data of the robotic arm, it adaptively divides the time patches of different sizes according to the sampling frequency, and maps the patches of different sizes into a unified feature space through a linear projection layer with shared weights. At the same time, position encoding is added to maintain the time order, generating a unified embedding representation that integrates multi-scale temporal features; Arbitrary variable attention mechanism: for the unified embedding representation output by the multi-patch projection module, the unified embedding representation is used to extract explicit correlations between variables in the spatiotemporal dimension using the multi-scale temporal features fused therein; Prediction output layer: To address the heterogeneous characteristics of the robot's dynamic errors, four probability distributions are used in parallel to model different error modes. The outputs of each distribution are adaptively mixed using learnable weight coefficients corresponding to each error mode to generate a mixed probability distribution of the robot's posture. The four probability distributions include Student's t distribution, lognormal distribution, negative binomial distribution, and normal distribution.

3. The method for controlling the precision of a robotic arm according to claim 2, wherein: The multi-patch projection module specifically performs the following operations: Adaptively divide the time patches according to the sampling frequency of the input sensor data; A linear projection layer with shared weights is used to map the divided patches of different sizes into a feature space of uniform dimension, while adding position encoding information to the mapped patch features to preserve the temporal order. The unified embedding representation of the output fused multi-scale temporal features is sent to the mask encoder for the subsequent attention mechanism to perform temporal dependency modeling.

4. The method for controlling the precision of a robotic arm according to claim 2, wherein: The arbitrary variable attention mechanism performs the following operations: For the unified embedding representation output by the multi-patch projection module, combine the time index and the variable index into a two-dimensional structure to generate a query vector and a key vector; Calculate the cross-time-step dependencies between the query vector and the key vector by rotating the position encoding matrix; Learnable same-variable bias and cross-variable bias are introduced to strengthen the autocorrelation within the variables and the coupling effect between variables, respectively. The same-variable bias is activated when the variable index is the same, and is used to enhance the compensation effect of the historical state of the same sensor on the current state. The cross-variable bias is activated when the variable index is different, and is used to model the coupling relationship between the environmental disturbance and the manipulator control variable. The output variable-aware attention weights are used to dynamically weight the fusion features and correct the robot trajectory error.

5. The method for controlling the precision of a robotic arm according to claim 2, wherein: The prediction output layer performs the following operations: Construct multiple probability distribution prediction heads in parallel, including: Student's t distribution for fitting long-tail errors, lognormal distribution for modeling skew errors, negative binomial distribution for handling discrete jump errors, and normal distribution for approximating linear change errors; Dynamically weight the outputs of each distribution to generate a mixed probability distribution of the robot arm's posture.

6. The method for controlling the precision of a robotic arm according to claim 5, wherein: in, S3. Use a composite loss function to train the model. The loss function constrains both the numerical accuracy of the predicted points and the quality of the confidence interval coverage, including: The model is trained using a composite loss function that is a weighted combination of mean squared error and average scale interval score; The average scale interval score also penalizes situations where the prediction interval is not wide enough and the true value exceeds the confidence interval boundary.

7. The method for controlling the precision of a robotic arm according to claim 5, wherein: in, In step S4, the real-time compensation of the robot arm's motion trajectory includes: Calculate the compensated target pose based on the predicted pose error point estimate; Solving the target joint angle command corresponding to the compensated target posture through inverse kinematics; Calculate the pseudo-inverse of the Jacobian matrix based on the current joint angle and map the Cartesian space pose error point estimate to the joint space compensation amount; The target joint angle command is superimposed on the joint space compensation amount adjusted by the gain matrix to generate a final joint command; The final joint command is sent to the robot arm joint servo controller for execution, so as to drive the robot arm to perform high-precision motion control.

8. The method for controlling the precision of a robotic arm according to claim 1, wherein: The method further comprises: S5. The welding actuator is precisely positioned by controlling the movement of the robotic arm, and a thermal deformation prediction model is constructed using a neural network to predict the welding thermal deformation in real time, and the welding actuator path, speed and power are dynamically adjusted.

9. The method for controlling the precision of a robotic arm according to claim 8, wherein: In step S5, the welding actuator path, speed, and power are dynamically adjusted based on the following welding actuator dynamic adjustment strategy, including: When the predicted thermal deformation amount in the next 1 second is less than the first threshold, the current welding parameters are maintained; When the predicted thermal deformation reaches a first threshold but does not exceed a second threshold, the welding current percentage is reduced and the welding movement speed percentage is increased simultaneously; When the predicted thermal deformation exceeds a second threshold, the dynamic cooling device is activated; a path compensation offset perpendicular to the weld and deviating from the direction of thermal expansion is generated; the path compensation offset is injected into the target posture of the current or next path point, and the trajectory compensation control process is re-executed.

10. The method for controlling the precision of a robotic arm according to claim 9, wherein: in, In step S5, the thermal deformation prediction model includes a spatial encoding module and a temporal prediction module: The spatial encoding module uses three layers of three-dimensional convolution layers to extract the spatial gradient features of the temperature field through convolution kernels of set sizes; The time prediction module uses a two-layer long short-term memory network to output a prediction sequence of thermal deformation within multiple seconds in the future; The first threshold is 0.1 mm, and the second threshold is 0.3 mm; Reduce the welding current percentage by 10% and increase the welding movement speed percentage by 15%.

Citation Information

Patent Citations

  • Motion track prediction method and system for upper limb rehabilitation robot

    CN118664607A

  • Mechanical arm control method and system based on multi-mode driving and storage medium

    CN118752495A

  • Double-mechanical-arm self-adaptive motor neural network optimization system

    CN120023827A

  • System and method for performing unified human motion prediction (HMP) for 2d and 3D poses

    US20240144725A1

Cited By

  • Kinematics compensation method and system of explosion-proof robot based on parameter coupling identification

    CN120735055A

  • Metamaterial reverse design method and system meeting multiple conditions

    CN121148548A

  • Neural network-based laser radar attitude error online measurement and calibration method

    CN121165072A

  • Mechanical arm error compensation method based on PINN

    CN121492066A

  • General mechanical arm inverse kinematics solving method and system based on comparative learning

    CN122008192A