Two-way dynamic calibration simulation method and system based on virtual-real high-fidelity mapping

By using a two-way dynamic calibration simulation method based on high-fidelity virtual-real mapping, the problem of stable determination of the dynamic deviation between the simulation model and the actual machine in robot assembly operations is solved. This achieves stable calibration of simulation results and improves their practicality, while reducing damage caused by excessive assembly forces.

CN123179668APending Publication Date: 2026-11-27RIZHAO YUEJIANG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611325064.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to reliably determine the deviation between the simulation model and the actual machine dynamics in robot assembly operations. Parameter adjustments cannot effectively handle the deviation, resulting in parameters that have passed simulation verification not being directly used for actual machine execution. This is especially true in the final assembly process of new energy vehicles, where assembly force deviations caused by flexible deformation and complex contact are difficult to resolve.

Method used

A bidirectional dynamic calibration simulation method based on virtual-real high-fidelity mapping is adopted. By obtaining the difference between measured data and simulation data, the dynamic parameters of the simulation model and the residual compensation model are updated to ensure that the simulation model is consistent with the robot. Deviations other than the adjustment of dynamic parameters are handled by the residual compensation model, thereby achieving stable calibration of simulation results.

Benefits of technology

It enables stable determination and calibration of dynamic deviations under noisy conditions, reduces workpiece damage and downtime caused by excessive assembly force, and improves the practicality of the simulation model and the reliability of assembly operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179668A_ABST
    Figure CN123179668A_ABST
Patent Text Reader

Abstract

The embodiment of the application relates to the technical field of simulation, and provides a two-way dynamic calibration simulation method and system based on virtual-real high-fidelity mapping, which comprises the following steps: acquiring real measurement data collected when a robot performs an assembly action and simulation data obtained by running a simulation model according to a same target action instruction; determining a dynamics consistency measurement value according to differences between the two in data distribution; when the measurement value does not satisfy a consistency condition, updating a parameter in a current value interval of the dynamics parameter and narrowing the value interval; when the updated parameter still does not satisfy the consistency condition, determining a residual difference as a structural difference not expressed by the parameter, and updating a residual error compensation model for output correction; recalculating after loading the updated result, and when a recalculated measurement value satisfies the consistency condition, sending the assembly operation parameter and the residual error compensation model to a robot controller, so that the robot performs the assembly action.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of simulation technology, and more specifically to a bidirectional dynamic calibration simulation method and system based on virtual-real high-fidelity mapping. Background Technology

[0002] When robots perform tasks such as wiring harness arrangement, hose splicing, and glass assembly in the final assembly of new energy vehicles, the objects being worked on exhibit flexible deformation and complex contact. The operational strategies and process parameters are typically trained and verified in a simulation environment before being transferred to the actual machine. The physics engine of the simulation environment performs calculations based on pre-set dynamic parameters such as friction, mass inertia, and joint stiffness. The difference between the set values ​​and the actual characteristics of the actual machine determines whether the parameters verified in the simulation can be reproduced on the actual machine.

[0003] One existing approach employs Domain Randomization (DR), randomly assigning values ​​to physical parameters within a set range. The resulting strategy reflects the average dynamic characteristics within that range, but assembly force deviations in fine-contact operations still exist. Another approach treats physical parameters as a range with uncertainty, progressively narrowing this range based on comparisons between measured and simulated predictions, or estimating parameters online using historical interaction sequences. This approach relies solely on parameter adjustment, leaving factors not expressed by parameters, such as motor dynamics and frictional hysteresis, outside the model. Once the parameters are narrowed to a certain extent, the deviation stops decreasing, and comparisons are performed based on point-by-point errors. Sensor noise is factored into the deviation, causing fluctuations in the estimation results. Alignment completed once before the operation using a fixed interaction sequence does not cover drift caused by material batch changes, tooling wear, and temperature rise.

[0004] In summary, existing technologies struggle to reliably determine the dynamic deviation between the simulation model and the actual machine under real machine noise conditions, and also struggle to handle residual deviations beyond parameter adjustments. Assembly operation parameters verified in simulation cannot be directly used as the basis for actual machine execution. Summary of the Invention

[0005] This application provides a bidirectional dynamic calibration simulation method and system based on virtual-real high-fidelity mapping. It can stably determine the dynamic deviation between the simulation model and the robot under the condition that the data collected by the actual machine is noisy. It can separately process the deviation that is still residual after the adjustment of dynamic parameters, so that the simulation model can keep in line with the robot as the working conditions change. The assembly operation parameters verified in the simulation can be directly used by the robot to perform assembly actions.

[0006] In a first aspect, embodiments of this application provide a bidirectional dynamic calibration simulation method based on virtual-real high-fidelity mapping, the method comprising: Acquire measured data and simulation data. The measured data is the running data collected during the assembly process when the robot performs the assembly action according to the target action instruction. The simulation data is the running data obtained by the simulation model running according to the target action instruction. Based on the difference in data distribution between the measured data and the simulation data, the dynamic consistency metric of the simulation model is determined; If the dynamic consistency metric does not meet the consistency condition, the dynamic parameters are updated within the current value range of the dynamic parameters in the simulation model, and the current value range is narrowed according to the change of the dynamic consistency metric during the update process to obtain the updated dynamic parameters and the updated value range. If the dynamic consistency metric value re-determined according to the updated dynamic parameters still does not meet the consistency condition, the difference corresponding to the re-determined dynamic consistency metric value is identified as a structural difference not expressed by the dynamic parameters. The residual compensation model is updated according to the operating data corresponding to the structural difference in the measured data. The residual compensation model is used to output the correction amount acting on the robot control quantity. The updated dynamic parameters and the updated residual compensation model are loaded into the simulation model. The loaded simulation model is run according to the target action command to obtain recalculated data. The recalculated metric value is determined according to the difference in data distribution between the recalculated data and the measured data. If the recalculated metric value meets the consistency condition, the assembly operation parameters determined according to the loaded simulation model and the residual compensation model will be sent to the robot controller so that the robot can perform the assembly action.

[0007] Secondly, embodiments of this application provide a bidirectional dynamic calibration simulation system based on virtual-real high-fidelity mapping, the system comprising: The data acquisition module is configured to acquire measured data and simulation data. The measured data is the running data collected during the assembly process when the robot performs the assembly action according to the target action instruction. The simulation data is the running data obtained by the simulation model running according to the target action instruction. The consistency measurement module is configured to determine the dynamic consistency measurement value of the simulation model based on the difference in data distribution between the measured data and the simulation data. The parameter update module is configured to update the dynamic parameters within the current value range of the dynamic parameters in the simulation model when the dynamic consistency metric does not meet the consistency condition, and to narrow the current value range according to the change of the dynamic consistency metric during the update process. The residual compensation module is configured to, if the dynamic consistency metric value re-determined according to the updated dynamic parameters still does not meet the consistency condition, determine the difference corresponding to the re-determined dynamic consistency metric value as a structural difference not expressed by the dynamic parameters, and update the residual compensation model according to the running data corresponding to the structural difference in the measured data. The residual compensation model is used to output the correction amount acting on the robot control quantity. The verification and distribution module is configured to load the updated dynamic parameters and the updated residual compensation model into the simulation model, and then run the simulation model according to the target action command to obtain recalculated data. The module determines the recalculated metric value according to the difference in data distribution between the recalculated data and the measured data. If the recalculated metric value meets the consistency condition, the module sends the assembly operation parameters determined according to the loaded simulation model and the residual compensation model to the robot controller so that the robot can perform the assembly action.

[0008] Thirdly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a computer, cause the computer to perform the bidirectional dynamic calibration simulation method based on virtual-real high-fidelity mapping as described in the first aspect.

[0009] Fourthly, embodiments of this application provide a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the bidirectional dynamic calibration simulation method based on virtual-real high-fidelity mapping described in the first aspect.

[0010] Compared to existing technologies, this application's embodiment determines the dynamic consistency metric based on the difference in data distribution between measured and simulated data, rather than comparing measured results with simulation predictions in terms of point-by-point trajectory error, as is done in existing technologies. Since the difference in distribution reflects the overall value distribution of the two sets of data, sensor noise and sampling time jitter during the actual data acquisition process are not included in the deviation. The metric obtained between multiple acquisitions is stable, and the updated dynamic parameters do not fluctuate with a single acquisition result. This application's embodiment re-determines the dynamic consistency metric after updating the dynamic parameters. When the metric still does not meet the consistency condition, the remaining difference is identified as a structural difference not expressed by the dynamic parameters. The residual compensation model is updated according to the operating data corresponding to the structural difference, and the residual compensation model outputs a correction amount acting on the robot control quantity, instead of using parameter value adjustment as the sole means, as is done in existing technologies. Therefore, factors that cannot be expressed by dynamic parameters, such as motor dynamics, torque saturation, and frictional hysteresis, are no longer excluded from the model. The situation where the deviation no longer decreases after the value range narrows to a certain extent is addressed, and the residual torque deviation in the contact phase is taken over by the correction amount. In this embodiment, the updated dynamic parameters and residual compensation model are first loaded into the simulation model. The updated parameters are then recalculated according to the same target action command, and the recalculated metric values ​​are determined. Only after the consistency condition is met are the parameters, along with the assembly operation parameters, sent to the robot controller. If the condition is not met, the updated dynamic parameters and residual compensation model are restored. Since the usability of an update is determined by the recalculation results, manual trial runs are no longer required. The deviations introduced by the update do not directly affect the assembly action, reducing workpiece damage and downtime caused by excessive assembly forces.

[0011] As can be seen, in the embodiments of this application, the measured data is used to correct the simulation model, and the simulation recalculation results are used to determine the assembly operation parameters sent to the robot. The data transmission in both directions is completed in the same operation process. The dynamic drift caused by material batch replacement, tooling wear and continuous operation temperature rise is corrected one by one. The simulation model does not need to be stopped and recalibrated. The assembly trajectory and force control threshold can be directly taken from the output of the simulation model when changing models. Attached Figure Description

[0012] The objectives, features, and advantages of the embodiments of this application will become readily understood by referring to the accompanying drawings and the detailed description of the embodiments. Wherein: Figure 1 A schematic diagram of an application environment for the bidirectional dynamic calibration simulation method based on virtual-real high-fidelity mapping provided in the embodiments of this application; Figure 2 A flowchart illustrating a bidirectional dynamic calibration simulation method based on virtual-real high-fidelity mapping provided in this application embodiment; Figure 3A schematic diagram illustrating the narrowing of the dynamic parameter value range and the determination of structural differences provided in the embodiments of this application; Figure 4 A schematic diagram of a bidirectional dynamic calibration simulation system based on virtual-real high-fidelity mapping provided in an embodiment of this application; Figure 5 This is a schematic diagram of a computing device provided in an embodiment of this application.

[0013] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation

[0014] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions provided by the embodiments of this application are described in detail below with reference to the accompanying drawings. The described embodiments are only a part of the embodiments of this application. Other implementation methods obtained by those skilled in the art from the described embodiments without creative effort are all within the protection scope of this application. In the embodiments of this application, "multiple" refers to two or more, and / or represents any combination of connected objects. "First" and "second" are only used to distinguish different objects and do not indicate differences in order or importance. The numerical values, sensor configurations, network structures, and simulation software given in the embodiments of this application are all examples and do not constitute a limitation on this application.

[0015] In existing robot assembly operations, the operation strategy and process parameters are first trained and verified in a simulation environment before being transferred to the actual machine. The physics engine in the simulation environment performs calculations according to pre-set dynamic parameters, such as friction, mass inertia, and joint stiffness, which are taken from the equipment manual or one-time calibration results. During actual machine operation, material batches, tooling wear, and continuous temperature rise all change the actual dynamic characteristics of the actual machine, and the set values ​​in the simulation model do not change accordingly. The trajectory and force control parameters that pass the verification in the simulation show assembly force deviations on the actual machine. To reduce the above deviations, one approach is to randomly select values ​​for the physical parameters within a set range during the training phase, and the resulting strategy reflects the average characteristics within the range. Another approach is to narrow the range of parameter values ​​after each actual machine attempt based on the point-by-point error between the measured results and the simulation prediction. The former still has deviations in fine force contact operations; the latter is affected by the noise of the actual machine, and the parameter estimation results fluctuate between multiple acquisitions. Furthermore, the adjustment of parameter values ​​is the only means. Factors that cannot be expressed by parameters, such as the response delay of the motor current loop, the torque saturation of the driver, the hysteresis characteristics of joint friction, and the clearance of the transmission mechanism, remain outside the model. After the parameters are narrowed to a certain extent, the deviation no longer decreases with the adjustment of parameters.

[0016] To address the aforementioned issues, this application provides a bidirectional dynamic calibration simulation method based on high-fidelity virtual-real mapping in some embodiments. The method collects robot operation data during assembly operations and determines a dynamic consistency metric based on the differences in data distribution between the operation data and simulation data. When the metric does not meet the consistency condition, the parameters are first updated within the current value range of the dynamic parameters, narrowing the value range. The remaining differences after the parameter update are then identified as structural differences not expressed by the dynamic parameters and handled by the residual compensation model. The update result is first loaded into the simulation model for recalculation. Only after the recalculated metric meets the consistency condition is it sent to the robot controller along with the assembly operation parameters. The following detailed description is in conjunction with the accompanying drawings.

[0017] To facilitate understanding, the concepts involved in the embodiments of this application will be explained first. A simulation model refers to a model established in a computing device that corresponds to the robot and the assembly object. It includes the geometric description of the robot's links and joints, the geometric and material description of the assembly object, and the motion and contact solution process calculated by the physics engine according to dynamic parameters. Dynamic parameters refer to the parameters used by the physics engine when solving for motion and contact, including joint friction parameters, link mass inertia parameters, joint stiffness parameters, and transmission flexibility parameters. Operational data refers to the state and action quantities that change over time during the robot's assembly actions. In the embodiments of this application, this includes joint positions, joint torques, and contact forces. Target action instructions refer to the set of instructions upon which the robot completes one assembly action, including trajectory point sequences, velocity and acceleration limits, and force control thresholds.

[0018] The dynamic consistency metric is a scalar value determined based on the difference in data distribution between measured and simulated data. A smaller value indicates that the simulation model is closer to the robot under the current operating conditions. Structural discrepancies refer to the differences that still exist between measured and simulated data after the dynamic parameters have been taken to their minimum values ​​within the current range; their causes are not within the expressive power of the dynamic parameters. A residual compensation model is a model that takes the robot's state data as input and outputs correction values ​​applied to the robot's control variables. Assembly operation parameters are the parameters used by the robot when performing assembly actions, including assembly trajectory, force control threshold, and insertion depth.

[0019] In this embodiment, the calibration stage refers to the preparation stage performed before the start of batch assembly operations. During this stage, operational data from several qualified and several unqualified assemblies are collected to determine the normalization scale, the weights of each dimension and each stage, the values ​​of the consistency conditions, and the hyperparameters of each model. After the start of batch assembly operations, the online operation stage begins. During this stage, only the dynamic parameters and residual compensation model are updated according to the measured data, and the values ​​determined in the calibration stage are not changed.

[0020] Reference Figure 1 , Figure 1 This is a schematic diagram of an application environment provided for an embodiment of this application. The application environment includes a computing device, a robot controller, a robot body, and a force sensor installed at the end of the robot body. The computing device deploys a simulation model and calibration program, and the method provided in this embodiment is executed by the computing device. The robot controller generates nominal control outputs according to assembly operation parameters and drives the robot body to perform assembly actions. Simultaneously, it uploads the joint positions and torques collected by the robot body, as well as the contact forces collected by the force sensor, to the computing device. The assembly object can be a wire harness terminal, a flexible hose, or glass, or other workpieces that undergo flexible deformation or complex contact forces during assembly. The computing device and the robot controller can communicate via industrial Ethernet.

[0021] The simulation platform deployed in the computing device may include a scene construction unit, a physics engine, a data interface unit, a calibration unit, and a version library. The scene construction unit generates a virtual assembly scene based on the design models of the robot and tooling, as well as the geometric and material parameters of the assembly objects. The physics engine solves for the motion and contact in the virtual assembly scene using dynamic parameters and a fixed step size, constituting the running part of the simulation model described below. The data interface unit exchanges data with the robot controller, sending assembly operation parameters and residual compensation models to the robot controller, and receiving running data uploaded by the robot body and force sensors. The calibration unit executes the method provided in the embodiments of this application, namely, determining the dynamic consistency metric, updating the dynamic parameters and residual compensation models, and completing recalculation. The version library stores the updated dynamic parameters, value ranges, residual compensation models, and their corresponding metric values. The simulation platform in... Figure 1 The simulation model and calibration procedure within the computing device are shown in the diagram; the other units are not shown separately.

[0022] The simulation platform is used to generate and verify assembly operation parameters before the start of batch assembly operations. Specifically, it performs trajectory planning, collision checking, force control threshold calculation, and cycle time evaluation in a virtual assembly scenario, and sends the verified assembly operation parameters to the robot controller. During the batch assembly operation, the simulation platform calibrates the simulation model according to the method provided in this application embodiment, ensuring that the subsequently generated assembly operation parameters correspond to the robot's current actual characteristics. Both of these uses are performed on the same simulation platform. The generation of assembly operation parameters and the calibration of the simulation model use the same physics engine and the same set of dynamic parameters, avoiding inconsistencies in conclusions caused by using different models during parameter generation and calibration.

[0023] The simulation platform can run multiple simulation instances on the same computing device. Each simulation instance loads the same virtual assembly scenario with different candidate parameter values ​​to determine candidate metric values ​​in parallel. The simulation platform can be deployed on an industrial control computer, a single server, or a server cluster, and communicates with the robot controller via an industrial Ethernet network. The simulation platform does not change the control law of the robot controller. The simulation platform provides the robot controller with assembly operation parameters and residual compensation models. The nominal control output is still generated by the robot controller according to its own control law. Therefore, the access of the simulation platform does not affect the robot's ability to continue operating with the parameters before the update if the calibration fails.

[0024] In one optional example, the simulation model can be established as follows: A multi-rigid-body model is established based on the robot's link geometry and joint configuration. The link geometry is taken from the design model, and the joint configuration includes the rotation axis direction, travel range, and reduction ratio of each joint. A contact model is established based on the geometry and material of the assembly object. Wiring harnesses and hoses can be established as segmented flexible bodies, and glass can be established as a rigid body and contact layer. The physics engine solves the motion equations and contact constraints at a fixed step size. The quantities that need to be calibrated in the simulation model are the dynamic parameters, including the viscous friction coefficient and Coulomb friction coefficient of each joint, the mass and inertia parameters of each link, the stiffness parameters and transmission flexibility parameters of each joint, and the contact stiffness and contact damping parameters between the assembly object and the tooling. The initial values ​​and ranges of the above parameters are determined according to the nominal values ​​and tolerances given in the equipment manual. Contact parameters not given in the manual are determined based on the historical identification results of similar workpieces. When neither manual values ​​nor historical results are available, a single static loading test is used to determine the contact stiffness parameter. This involves applying a set force to the workpiece during the holding phase at the end and recording the end displacement. The force-to-displacement ratio is used as the initial value of the contact stiffness parameter, with 0.5 times and 2 times the initial value serving as the lower and upper bounds of the value range, respectively. These initial values ​​only affect the search starting point for the initial calibration and do not affect subsequent results updated based on metric values.

[0025] To ensure comparability between simulation and measured data, the simulation model must maintain the same control method as the robot controller, in addition to the dynamic parameters. This means using the same interpolation period, the same position and velocity loop gains, the same force control law and force control threshold, and the same joint and velocity limits. These control parameters are read from the robot controller and written into the simulation model, remaining unchanged during calibration and not used as dynamic parameters in updates. When control parameters change, measured data are reacquired, and the dynamic consistency metric is redefined.

[0026] It should be noted that the computing devices involved in the embodiments of this application may be servers and / or terminal devices.

[0027] The servers involved in this application's embodiments can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, and big data and artificial intelligence platforms. The terminal devices involved in this application's embodiments can be industrial control computers, portable computers, or other processing devices with data processing capabilities and the ability to communicate with robot controllers.

[0028] Reference Figure 2 , Figure 2 This is a flowchart illustrating a bidirectional dynamic calibration simulation method based on virtual-real high-fidelity mapping, provided in an embodiment of this application. The method can be derived from... Figure 2 The computing device shown executes steps 101 to 106.

[0029] Step 101: Obtain measured data and simulation data. The measured data is the operational data collected during the robot's assembly process according to the target action instructions, and the simulation data is the operational data obtained by the simulation model running according to the target action instructions.

[0030] The target motion instructions can be programmed by process engineers on a computing device according to the assembly task, or generated by the computing device based on existing assembly operation parameters. Taking wire harness terminal insertion as an example, the target motion instructions for one assembly action include the sequence of trajectory points from the end point approaching the socket above the position to be assembled, the displacement and upper limit of the insertion force during the insertion process, and the holding time after insertion. The robot controller drives the robot body to perform assembly actions according to the target motion instructions, and the computing device drives the simulation model to run according to the same target motion instructions. The identical input of both is a prerequisite for subsequent comparison.

[0031] The joint positions in the measured data can be acquired by the encoders of each joint, the joint torques can be acquired by joint torque sensors, or calculated by converting the driver output current and torque constant. The contact force can be acquired by a six-dimensional force sensor installed at the end effector. In some examples, the acquisition period of the above data is 1 millisecond, the duration of one wiring harness terminal insertion action is approximately 1.2 seconds, and approximately 1200 sampling moments are obtained for one assembly action. The simulation data is calculated by the physics engine at a fixed step size, which is 0.5 milliseconds in some examples. The output physical quantities correspond one-to-one with the measured data. The acquisition period, simulation step size, and action duration can be adjusted according to the robot model and assembly task, and do not constitute a limitation of this application.

[0032] When the joint torque is converted based on the driver output current, the conversion method is to multiply the product of the current and the torque constant by the reduction ratio. The torque constant and reduction ratio are taken from the equipment manual. The converted joint torque includes the response delay of the current loop and the dead zone of the driver. These effects are not within the scope of the dynamic parameters and belong to the causes of the structural differences described in step 104. To ensure that the measured and simulated joint torques have the same meaning, the joint torque output by the simulation model is also taken as the torque on the reducer output side. When a joint torque sensor is installed, the sensor reading is directly taken, and the reading is converted to the reducer output side according to the sensor's installation position.

[0033] The measured data and simulation data obtained in step 101 are two sets of running data under the same target action command, which are used as inputs for determining the dynamic consistency metric value in step 102.

[0034] In some optional implementations, acquiring measured data and simulation data includes: receiving joint positions and joint torques collected by the robot body and contact forces collected by force sensors during the robot's assembly operation, and using the received data as the measured data; acquiring joint positions, joint torques, and contact forces output by the simulation model under the target action command, and using these as the simulation data; aligning the measured data to the same time reference according to the acquisition timestamp, and resampling the aligned measured data according to the running step size of the simulation model; and converting the contact force from the sensor coordinate system of the force sensor to the tool coordinate system of the robot, wherein the pose relationship on which the conversion is based is determined according to the robot's kinematic parameters and the current joint position.

[0035] In the above implementation, joint data is collected by the robot controller according to the servo cycle, and contact force is collected by the force sensor according to its own sampling cycle. The collection times of the two do not coincide; using them directly together will cause a misalignment between the position and the force at the same moment. Alignment by collection timestamp means using the time of one data source as a reference and interpolating the other data source to the same time according to its timestamp. Clock consistency can be ensured by the controller and sensor sharing a synchronization signal or by using a time synchronization protocol. In some examples, the sampling period of the force sensor is 0.5 milliseconds, and the collection period of the joint data is 1 millisecond. After alignment, resampling is performed at a simulation step size of 0.5 milliseconds to obtain the measured data corresponding to the simulation data in terms of time.

[0036] The contact force is measured by a force sensor, and its components are defined in the sensor coordinate system. However, the force control threshold and insertion direction are defined in the tool coordinate system. Inconsistency between these two definitions can cause the same contact to exhibit different directional components in the two sets of data. During the conversion, the pose relationship between the tool coordinate system and the sensor coordinate system is first determined based on the robot's kinematic parameters and the current joint position. The contact force in the tool coordinate system is equal to the product of the transpose of the rotation matrix in the pose relationship and the contact force in the sensor coordinate system. The torque in the tool coordinate system is equal to the product of the transpose of the rotation matrix and the torque in the sensor coordinate system, plus the cross product of the vector pointing from the origin of the sensor coordinate system to the origin of the tool coordinate system and the converted contact force. For example, if the contact force measured in the sensor coordinate system is 12.4 Newtons along its z-axis, and the tool coordinate system is rotated 90 degrees relative to the sensor coordinate system around the x-axis, the converted contact force will fall on the y-axis direction of the tool coordinate system, still with a value of 12.4 Newtons, and the sign of the direction will be determined by the rotation direction. These example values ​​do not constitute a limitation of this application.

[0037] Step 102: Determine the dynamic consistency metric of the simulation model based on the difference in data distribution between the measured data and the simulation data.

[0038] Data distribution refers to the distribution of a set of operational data within its value range. It can be represented by the empirical distribution of the data, i.e., the distribution formed by arranging the values ​​at each sampling moment in a single assembly operation according to their magnitude. Determining the metric based on differences in data distribution differs from determining the deviation based on point-by-point error in that the former compares the overall value distribution of two sets of data, while the latter compares the difference between two values ​​at the same moment. During actual machine data acquisition, there is noise from the force sensor and fluctuations in sampling time. Point-by-point error incorporates both noise and time misalignment into the deviation, resulting in significant fluctuations in the deviation obtained from multiple acquisitions under the same operating conditions. The overall value distribution of the two sets of data is not sensitive to misalignment at individual moments, and the obtained metric remains stable across multiple acquisitions.

[0039] In one example, 1200 sampling points were used for both the measured and simulated contact forces in a single insertion action. The two sets of values ​​were sorted from smallest to largest and then averaged according to the same quantile. The resulting distribution distance was 0.62 Newtons. Repeating the sampling five times under the same condition yielded distribution distances between 0.60 and 0.65 Newtons, while the average absolute deviation obtained by considering point-by-point error ranged from 1.0 to 1.8 Newtons. Therefore, the metric determined by the difference in distribution can serve as a basis for determining whether dynamic parameters need updating, without leading to different conclusions due to noise in a single sampling. The example values ​​described do not constitute a limitation of this application.

[0040] Measured and simulated data include multiple dimensions such as joint position, joint torque, and contact force, each with different dimensions and numerical ranges. In some implementations, the distribution distance is first determined for each dimension, and then the dynamic consistency metric is obtained by weighted summation according to the weight of each dimension; alternatively, each dimension can be normalized according to its value range before being combined for calculation.

[0041] The weights for each dimension can be determined as follows: During the calibration phase, a metric value is determined for each single dimension. The ability of each dimension's metric value to distinguish between qualified and unqualified assemblies is compared. The dimension with stronger distinguishing ability is given a larger weight, and the sum of the weights for each dimension is 1. In one example, the weight of contact force is 0.5, the weight of joint torque is 0.3, and the weight of joint position is 0.2. Once the above weights are determined, they must remain unchanged in subsequent calibrations; otherwise, the metric values ​​obtained from different calibrations will not be comparable.

[0042] In some optional implementations, determining the dynamic consistency metric of the simulation model based on the difference in data distribution between the measured data and the simulation data includes: dividing the measured data and the simulation data into data segments representing the approach, contact, and holding phases according to the contact force amplitude; normalizing the measured and simulation data belonging to the same phase by data dimension to determine the distribution distance between the two sets of data after normalization; and weighting and summing the distribution distances of each phase according to their respective weights to obtain the dynamic consistency metric, wherein the weight of the contact phase is greater than the weight of the approach phase.

[0043] The above embodiments segment the data according to the contact force amplitude because the different stages of an assembly operation reflect different dynamic characteristics. In the approach stage, the end effector has not yet contacted the workpiece, and the data mainly reflects joint friction and connecting rod inertia. In the contact stage, the contact force increases from zero, and the data mainly reflects contact stiffness and damping. In the holding stage, the end effector maintains contact with the workpiece and the force is stable, and the data mainly reflects static friction and transmission flexibility. If the entire data segment is combined for calculation without segmentation, the number of data points in the approach stage is usually much greater than in the contact stage, and the deviation in the contact stage will be masked by the distribution in the approach stage. In some examples, the data segment with a contact force amplitude less than 0.5 Newtons is considered the approach stage, the data segment after the contact force amplitude reaches 0.5 Newtons is considered the contact stage, and the data segment with contact force fluctuations less than 0.2 Newtons and a duration exceeding 50 milliseconds is considered the holding stage. The above values ​​and illustrations are merely examples and are not limited by this application.

[0044] Normalization by data dimension refers to mapping two sets of data to the same dimensional interval using the value range or quantile interval of the measured data in the current dimension as a scale before determining the distribution distance, thus avoiding the numerical range of joint torque exceeding the numerical range of joint position. The weights of each stage are determined according to the sensitivity of assembly quality to each stage; in some examples, the weight of the contact stage is 0.5, the weight of the holding stage is 0.3, and the weight of the approach stage is 0.2. The distribution distance can be expressed as Earth Mover's Distance (EMD), also known as Wasserstein Distance, which is equal to the minimum amount of material handling required to transform the empirical distribution of one set of data into the empirical distribution of another set. In the one-dimensional case, the minimum amount of material handling is equal to the average of the absolute values ​​of the differences between the two sets of data at the same quantile. Other measures characterizing the overall distribution differences between the two sets of samples can also be used for the distribution distance; this application does not limit this approach.

[0045] The scale used for normalization is determined and saved during the calibration phase. Each calibration uses the saved scale and does not re-determine it based on the current data. The scale can be taken as the interval formed by the 5th and 95th quantiles of the measured data in each dimension during the calibration phase. Phase division is based on the measured data, and the resulting time intervals are applied to the simulation data, candidate simulation data, and recalculated data, ensuring that the same phase in each group of data corresponds to the same action. If the time of contact in the simulation data differs from the measured time, the time interval determined by the measured data is still used, and the resulting difference is included in the distribution distance of the contact phase.

[0046] Based on the above implementation method, the measurement value reflects the consistency of each stage of the assembly action, with the contact stage as the main focus. The deviation of the contact process, which is directly related to the assembly result, will not be masked by the data of the adjacent stages.

[0047] In some optional implementations, the consistency condition includes the dynamic consistency metric value being less than a set threshold. Furthermore, the measured data and simulation data can be reacquired and the dynamic consistency metric value can be redefined in any of the following situations: material batch change of the assembly object, end-effector replacement, continuous operation time reaching a set duration, and the joint temperature rise of the robot exceeding a set temperature rise.

[0048] In the above embodiments, the threshold for consistency conditions can be calculated based on assembly quality requirements. In some examples, the allowable insertion force deviation for wire harness terminal plugging is 0.5 Newtons, and after being weighted according to the contact stage and normalized scale, the threshold is set to 0.3. Material batch changes can be obtained from work order information issued by the manufacturing execution system or the identification results of material barcodes; end-tool replacement can be obtained from the identification signal on the tool side; continuous operation time can be obtained from the timing of the computing device; and joint temperature rise can be obtained from the temperature feedback of the actuator. The above events correspond to the causes of dynamic drift: different batches of wire harnesses have differences in bending stiffness; tooling wear changes the contact position and friction state; and joint temperature rise changes the lubrication state and friction torque. When any of the above events is detected, the data is reacquired and the measurement value is redefined, so that the timing of calibration corresponds to the change of operating conditions, and it is not necessary to stop for calibration at fixed intervals.

[0049] The above settings can be confirmed and adjusted as follows: The threshold values ​​are calculated based on assembly quality requirements: During the calibration phase, operational data from several qualified and several unqualified assemblies are collected. The dynamic consistency metric value for each measurement is determined, and the value that separates the two types of values ​​is taken as the threshold value. In one example, the metric value for qualified assemblies is distributed between 0.10 and 0.25, while the metric value for unqualified assemblies is distributed above 0.35; the threshold value is set to 0.30. The contact force threshold used for stage division is determined based on the noise amplitude of the force sensor, taking a value greater than three times the noise amplitude. In one example, the noise amplitude is 0.15 Newtons, and the threshold for dividing the approach and contact stages is 0.5 Newtons. The weight of each stage is determined based on the correlation between the distribution distance of each stage and the assembly result. Stages with higher correlation receive a larger weight, and the sum of the stage weights is 1. The setting ratio, lower limit of the setting width, setting sensitivity, and setting amplitude are set to 0.2, 10% of the initial interval width, 0.10, and 0.02, respectively, in some examples.

[0050] The above values ​​can be adjusted according to the following rules: If the recalculated metric value decreases after parameter updates but the verification metric value does not decrease, it indicates that the value range is too tight, and the lower limit of the set width should be increased. If multiple consecutive calibrations determine the existence of structural differences but the update of the residual compensation model has limited improvement on the metric value, it indicates that the set amplitude is too large, and the set amplitude should be reduced to allow the parameter search to continue. If the repeatability of the metric value under the same working condition is worse than one-third of the set threshold, it indicates that the amount of data is insufficient, and the number of assembly actions involved in determining the metric value should be increased.

[0051] Step 103: If the dynamic consistency metric does not meet the consistency condition, update the dynamic parameters within the current value range of the dynamic parameters of the simulation model, and narrow the current value range according to the change of the dynamic consistency metric during the update process to obtain the updated dynamic parameters and the updated value range.

[0052] The current value range refers to the range of possible values ​​for each dynamic parameter before this update. The initial values ​​for the value range can be determined according to the nominal values ​​and tolerances given in the equipment manual, or according to the historical identification results of the same model of robot. In some examples, the initial value range for the joint friction coefficient is 0.05 to 0.35, and the initial value range for the joint stiffness is 80 kNm / radian to 200 kNm / radian. The dynamic parameters are represented by value ranges rather than single values ​​because the excitation of a single assembly action is insufficient to uniquely determine all dynamic parameters. A single value is prone to over-aligning with data collected in a single instance, and deviations reappear after changes in operating conditions. Narrowing the value range according to changes in metric values ​​reduces the uncertainty range of the parameters as observation data accumulates, while retaining a certain width to cover changes in subsequent operating conditions.

[0053] The gradient of the dynamic parameters output by the simulation model is not used during the update process. This is because the physics engine's solution for contact involves contact state switching and constraint solving, and the derivative of the output with respect to the parameters is discontinuous at the contact switching points. Existing simulation software typically does not provide these derivatives. Therefore, the update is performed by selecting candidate parameter values, running the simulation model, determining candidate metric values, and selecting the smallest candidate metric value. In some examples, 20 sets of candidate parameter values ​​are selected per round, with a single simulation run taking approximately 0.6 seconds. When 8 simulation instances are run in parallel, a single round takes approximately 2 seconds. The updated dynamic parameters and updated value ranges output in step 103 are used in step 104 to determine if there are structural differences and in step 105 for recalculation.

[0054] In some optional implementations, updating the dynamic parameters within the current value range of the dynamic parameters in the simulation model includes: selecting multiple sets of candidate parameter values ​​within the current value range; running the simulation model according to each set of candidate parameter values ​​to obtain candidate simulation data; and determining candidate metric values ​​for each set of candidate parameter values ​​based on the difference in data distribution between the candidate simulation data and the measured data. The candidate parameter value with the smallest candidate metric value is determined as the updated dynamic parameter. Each set of candidate parameter values ​​is generated according to the selected candidate parameter values ​​and their corresponding candidate metric values, and the generation process does not use the gradient of the dynamic parameter output by the simulation model. The dynamic parameters include at least one of friction parameters, mass inertia parameters, joint stiffness parameters, and transmission flexibility parameters.

[0055] In the above embodiments, the generation of candidate parameter values ​​is based on the candidate parameter values ​​and their candidate metric values ​​that have already been run. That is, the position of the next batch of candidate values ​​is determined by the existing evaluation results, without the need for the simulation model to provide derivative information. The selection of the dynamic parameters can be determined according to the assembly task. For example, for wire harness terminal plugging, joint friction parameters and contact stiffness parameters are the main parameters, while for glass assembly, contact stiffness parameters and transmission flexibility parameters are the main parameters.

[0056] In some optional implementations, the candidate parameter values ​​are generated according to the selected candidate parameter values ​​and the corresponding candidate metric values, including: using each set of candidate parameter values ​​as the position of each particle in the particle swarm; determining the historical best position of each particle and the historical best position of the particle swarm according to the current candidate metric value of each particle; updating the position and velocity of each particle according to the historical best position; and using the updated particle position as the candidate parameter value for the next run of the simulation model.

[0057] In the above implementation, the velocity of each particle is updated by the sum of three terms: inertia, the term pointing to its own historical best position, and the term pointing to the historical best position of the particle swarm. The position moves according to the updated velocity. In some examples, the inertia weight is 0.7, both learning factors are 1.5, the number of particles is 20, and the iteration is 3 rounds. Taking the joint friction coefficient and joint stiffness as examples, in the first round, the friction coefficient corresponding to the historical best position of the particle swarm is 0.18, the joint stiffness is 120,000 Nm / radian, and the metric value is 0.81. After the second round of movement, the metric value drops to 0.42. In the third round, the friction coefficient is 0.14, the joint stiffness is 135,000 Nm / radian, and the metric value drops to 0.29. The number of particles, the number of iterations, and the learning factors can be adjusted according to the parameter dimensions and available computing power.

[0058] The search parameters used when updating the dynamic parameters are confirmed as follows: the number of particles is 10 times the dimension of the parameter to be searched, and no less than 10. In one example, when the parameter to be searched is 2-dimensional, the number of particles is 20. The inertia weight is linearly decreased from 0.9 to 0.4 with each iteration, so that the selection is dispersed within the value range in the early stage and refined near the current optimal position in the later stage. Both learning factors are set to 1.5. When the particle position exceeds the current value range, it is clamped to the range boundary and the velocity in the corresponding direction is reversed and multiplied by 0.5. The iteration termination condition is reaching the set number of rounds, or the difference between the minimum candidate metric values ​​of two consecutive rounds is less than 0.005. For example, the set number of rounds is 3 rounds, and the time taken per round is about 2 seconds. The above values ​​can be confirmed in the calibration stage by performing parameter updates with several sets of values ​​and taking the set with the smallest metric value obtained under the same number of simulations. The above values ​​are not changed in the online operation stage, and the number of particles or iteration rounds are reduced only when the time taken per round exceeds the interval between two assembly actions.

[0059] In some optional implementations, selecting multiple sets of candidate parameter values ​​within the current value range includes: determining the sensitivity of each dynamic parameter based on the change in candidate metric values ​​caused by the change in the value of each dynamic parameter. When subsequently selecting candidate parameter values, dynamic parameters with a sensitivity greater than a set sensitivity are further selected within their value range, while dynamic parameters with a sensitivity not greater than a set sensitivity retain their current value.

[0060] In the above implementation, sensitivity is used to measure the degree of influence of each dynamic parameter on the metric value. It can be determined by taking the upper and lower quartiles of the current value interval for a given dynamic parameter, keeping the current values ​​of other parameters, running simulation models to determine candidate metric values, and using the absolute value of the difference between two candidate metric values ​​as the sensitivity of the dynamic parameter. In one example, the sensitivity of the friction parameter is 0.21, the sensitivity of the contact stiffness parameter is 0.13, the sensitivity of the mass inertia parameter is 0.02, and the sensitivity of the transmission flexibility parameter is 0.05. When the sensitivity is set to 0.10, subsequent candidate values ​​are only selected for the friction and contact stiffness parameters, reducing the candidate parameter values ​​from four dimensions to two dimensions, and decreasing the number of simulations required for a single wheel from 20 to 8. Maintaining the current values ​​for parameters with sensitivity no greater than the set sensitivity reduces invalid searches and prevents these parameters from being searched for values ​​deviating from physical reality.

[0061] In some optional implementations, narrowing the current value interval according to the change of the dynamic consistency metric during the update process includes: extracting candidate parameter values ​​that are within a set proportion range after sorting the candidate metric values ​​from smallest to largest, and using the minimum and maximum values ​​among the extracted candidate parameter values ​​as the lower and upper bounds of the updated value interval. If the width of the updated value interval is less than the set lower limit of the dynamic parameter width, the updated value interval is expanded according to the set lower limit of the width, and the narrowing of the dynamic parameter is stopped.

[0062] Reference Figure 3 In one example, 20 candidate parameter values ​​are sorted by candidate metric value from smallest to largest, and the top 20%, i.e., the top 4 groups, are selected. The minimum value for the friction coefficient is 0.12, and the maximum value is 0.17. The updated friction coefficient range is then 0.12 to 0.17. A lower width limit is set to prevent the value range from shrinking below a scale that can be resolved by observational noise. In some examples, the lower width limit is 10% of the initial interval width, i.e., the lower width limit for the friction coefficient is 0.03. When the updated interval width is less than 0.03, it is expanded by 0.03 centered on the midpoint of the updated interval, and the narrowing of the friction coefficient is stopped. Maintaining the lower width limit ensures that parameter drift caused by subsequent material batch changes or joint temperature rises still falls within the value range, eliminating the need to redefine the initial interval.

[0063] Step 104: If the dynamic consistency metric value re-determined according to the updated dynamic parameters still does not meet the consistency condition, the difference corresponding to the re-determined dynamic consistency metric value is identified as a structural difference not expressed by the dynamic parameters. The residual compensation model is updated according to the operating data corresponding to the structural difference in the measured data. The residual compensation model is used to output the correction amount acting on the robot control quantity.

[0064] The structural differences are caused by factors such as the response delay of the motor current loop, the torque saturation of the driver, the hysteresis characteristics of joint friction, and the clearance of the transmission mechanism. These factors cannot be expressed by parameters such as friction, mass inertia, or joint stiffness; therefore, regardless of the parameter values ​​within their range, the measured values ​​will not decrease with parameter adjustments. Separating these residual differences and assigning them to the residual compensation model adds a data-determined component to the parametric model, rather than continuing to search for values ​​within the parameters.

[0065] The residual compensation model takes the robot's state data as input and outputs corrections applied to the robot's control variables. In some examples, the residual compensation model is a fully connected network with two hidden layers and 64 neurons per layer, taking 10-dimensional state data as input and outputting torque corrections for six joints. Alternatively, a lookup table model indexed by state intervals or a linear regression model can be used; this application does not limit the model form. During updates, the goal is to reduce the metric between the simulated data and the measured data after applying the corrections. In one example, the training data is taken from approximately 180 sampling times where the metric contribution exceeds the 0.8 quantile; after 200 updates, the metric decreases from 0.29 to 0.11. The updated residual compensation model obtained in step 104 and the updated dynamic parameters obtained in step 103 are loaded into the simulation model for recalculation in step 105.

[0066] The structure and parameters of the residual compensation model can be determined as follows. Taking a fully connected network as an example, the input layer dimension is equal to the dimension of the state data. In one example, the input consists of 6 joint positions, 6 joint velocities, 6 command torques, and 1 contact state identifier, totaling 19 dimensions. The hidden layer consists of two layers, each with 64 neurons, and the activation function is the hyperbolic tangent function. The output layer dimension is equal to the number of joints, which is 6 dimensions in one example. No activation function is added to the output layer. The trainable parameters of the above structure are approximately 6000. The input data is normalized according to the mean and standard deviation of the training samples in each dimension, and the output is normalized according to the rated torque of each joint. During inference, it is restored to the torque correction amount on the same scale. The basis for choosing the above scale is the time budget of the control cycle: in one example, the control cycle is 1 millisecond, and the network of the above scale takes about 0.05 milliseconds for a single inference, accounting for 5% of the control cycle. The remaining time is used for the robot controller to complete interpolation and servo calculations.

[0067] The residual compensation model is acquired and updated as follows. The input to the training samples consists of state data at sampling times corresponding to structural differences, with the label representing the difference between the measured and simulated joint torques at those times. Samples are divided into training and validation segments in chronological order, with a 7:3 ratio in one example. The goal of the update is to decrease the dynamic consistency metric between the simulated and measured data after applying corrections. This is achieved by using the mean squared error between the label and the model output as the loss function, and incorporating a L2 term of the model weights to suppress overfitting. In one example, the coefficient of the L2 term is 0.0001. Parameters are updated using adaptive moment estimation. The initial learning rate is 0.001, halved if the validation segment loss does not decrease for 5 consecutive rounds. The batch size is 64, with a maximum training duration of 300 rounds. Training stops when the validation segment loss does not decrease for 20 consecutive rounds. After training, the metric is determined on the validation segment. The training result is retained only if the validation segment metric decreases; otherwise, the residual compensation model before the update is maintained.

[0068] Furthermore, the values ​​for the number of hidden layers, the number of neurons per layer, the learning rate, and the L2 coefficient can be determined as follows: During the calibration phase, several sets of values ​​are trained separately, and the metric values ​​are compared on the validation phase. The set with the smallest metric value and a single inference time not exceeding 20% ​​of the control cycle is selected. During the online operation phase, the above values ​​are not changed; the model parameters are only updated incrementally based on newly collected operational data. During incremental updates, the training samples are organized according to the ratio of newly collected samples to historical samples. In one example, newly collected samples account for 70%, and historical samples extracted in reverse chronological order account for 30%, to avoid the model only fitting the most recent operating condition and losing previously compensated differences. After each update, the model parameters and their corresponding validation phase metric values ​​are saved. The number of saved versions is 5 in one example, for restoration in case of recalculation or verification failure. If the validation phase metric values ​​do not decrease after three consecutive incremental updates, the historical samples are cleared and retraining is performed according to the current operating condition, indicating that the previous structural differences have changed due to the change in mechanical state.

[0069] In some optional implementations, determining the difference corresponding to the re-determined dynamic consistency metric value as a structural difference not expressed by the dynamic parameter includes: determining the difference corresponding to the re-determined dynamic consistency metric value as the decrease in the dynamic consistency metric value as the current value interval narrows is less than a set range, or the width of the updated value interval reaches a set lower limit; and determining the running data corresponding to the moment when the dynamic consistency metric value in the measured data exceeds a set quantile as the running data corresponding to the structural difference.

[0070] The above implementation provides two criteria for judgment: First, if the decrease in the metric value as the value interval narrows is less than a set range, it indicates that further narrowing of the interval no longer improves consistency. In some examples, the decrease after two consecutive rounds of narrowing is less than 0.02, which satisfies this condition. Second, if the width of the value interval has reached the lower limit of the set width, it indicates that the adjustable space of the parameters has been exhausted. The operational data corresponding to structural differences is determined according to the contribution of each sampling time to the metric value. The contribution is determined as follows: the measured data and simulation data are sorted from smallest to largest on the same data dimension and a quantile correspondence is established. For each sampling time, its quantile in the measured data is taken, and the absolute value of the difference between the measured value and the simulation value at the quantile is taken as the contribution of that sampling time. The contributions of each sampling time are sorted from largest to smallest, and the operational data corresponding to the sampling time whose contribution exceeds the set quantile is taken as the data for updating the residual compensation model. In one example, with a quantile of 0.8, approximately 180 out of 1200 sampling moments contributed beyond the quantile, with these moments concentrated in the initial part of the contact force rise and hold phases.

[0071] In other implementations, the contribution of each sampling moment is determined using a leave-one-out method: after removing the data at each sampling moment, a new dynamic consistency metric is determined, and the difference between the metric before and after removal is taken as the contribution of that sampling moment. This method does not rely on quantile correspondence and is more sensitive to isolated values ​​in the distribution, at the cost of needing to repeatedly determine the metric. When there are many sampling moments, the method is performed by grouping data segments, that is, each time a group of data is removed, and the contribution of each moment within the group is taken as the contribution of the group. In one example, every 20 adjacent sampling moments are grouped together, and 1200 sampling moments are divided into 60 groups, and the metric is determined 60 times.

[0072] In some optional implementations, the residual compensation model is used to output a correction amount acting on the robot control quantity, including: inputting at least one of the robot's joint position, joint velocity, command torque, and contact state identifier into the residual compensation model to obtain the torque correction amount of each joint of the robot; the torque correction amount is superimposed on the nominal control output of the robot controller according to the control cycle of the robot controller; the torque correction amount is non-zero when the data input to the residual compensation model falls into the state interval corresponding to the structural difference, and the state interval is determined according to the value range of the operating data corresponding to the structural difference.

[0073] In the above embodiments, the joint velocity can be obtained by joint position differential. The contact state identifier is used to indicate whether the current sampling time is in the approach phase, contact phase, or holding phase. The command torque is taken from the nominal control output of the robot controller. The correction amount is output according to the control cycle and superimposed on the nominal control output. In some examples, the control cycle is 1 millisecond. The state interval corresponding to the structural difference is determined according to the value range of the running data used to update the residual compensation model in each input dimension, and can be expanded by a preset proportion at both ends of the range. The value of the preset proportion is adjusted based on the actual situation and is not limited in this application. When the state data falls outside the state interval, the correction amount is zero, and the robot controller executes according to the nominal control output. The purpose of limiting the effective range is to avoid introducing additional correction amounts in the case where no structural difference is observed, and to avoid the output of the residual compensation model in areas without data support affecting the assembly action.

[0074] In other implementations, the robot controller does not provide an interface for superimposing torques according to the control cycle. In this case, the correction amount is applied to the robot control quantity as follows: the torque correction amount of each joint is converted into an end effector equivalent by the generalized inverse transformation of the Jacobian matrix transpose under the current pose, and then the end effector equivalent is converted into a correction amount for the force control threshold according to the definition of the force control threshold. For data segments executed in position control mode, the torque correction amount is converted into a correction amount for the joint position according to the joint stiffness parameter, that is, the position correction amount is equal to the ratio of the torque correction amount to the corresponding joint stiffness parameter, and is superimposed to the trajectory point according to the interpolation cycle. In one example, the torque correction amount of a certain joint is 0.8 Nm and the stiffness parameter is 135,000 Nm per radian. The calculated position correction amount is approximately 0.006 milliradians, which is superimposed to the trajectory point according to the interpolation cycle of 4 milliseconds. The above conversion allows the correction amount to be applied to the assembly action even on a controller that only provides interfaces for trajectory and force control threshold. The upper limit of the amplitude of the converted correction amount is determined according to the repeatability accuracy of the joint position.

[0075] In some optional implementations, after obtaining the torque correction amount of each joint of the robot, the method further includes: determining the upper limit of the amplitude of the torque correction amount according to the rated torque of each joint, and determining the upper limit of the rate of change of the torque correction amount according to the control cycle; if the amplitude or rate of change of the torque correction amount exceeds the corresponding upper limit, outputting the torque correction amount according to the corresponding upper limit and recording the running data at the time of exceeding the limit; if the number of recorded exceeding limits reaches a set number, stopping the transmission of the residual compensation model and restoring the residual compensation model to the residual compensation model before the update.

[0076] In the above embodiments, the upper limit of amplitude is taken as 5% of the rated torque of each joint in some examples, and the upper limit of the rate of change is taken as no more than 2% of the upper limit of amplitude in each control cycle in some examples. The purpose of setting the upper limit is to ensure that even if the residual compensation model gives abnormal output at individual moments, the correction amount superimposed on the nominal control output will not cause a jump in the joint torque, and the assembled object will not be impacted as a result. The operating data recorded at the time of exceeding the limit can be used to find the working condition corresponding to the abnormal output. In one example, if the limit is exceeded 10 times in 100 consecutive control cycles, the set number is reached. At this time, the transmission of the residual compensation model is stopped and the residual compensation model before the update is restored. The robot continues to operate according to the parameters before the update.

[0077] Step 105: Load the updated dynamic parameters and the updated residual compensation model into the simulation model, run the loaded simulation model according to the target action command to obtain recalculated data, and determine the recalculated metric value according to the difference in data distribution between the recalculated data and the measured data.

[0078] The recalculation process involves loading the updated results into the simulation model, rerunning the model according to the same target action instructions as in step 101, and determining the recalculation metric based on the difference in data distribution between the recalculated data and the measured data, using the same method as in step 102. The purpose of recalculation is that since the updates in steps 103 and 104 are obtained from the same batch of measured data, and the updates to the parameter search and residual compensation models may only match certain data segments, the recalculation provides the consistency of the simulation model across the entire assembly process after loading. In one example, the recalculation metric is 0.11, which is less than the set threshold of 0.3, thus satisfying the consistency condition. If, after an update, the distribution distance of the contact stage decreases while the distribution distance of the holding stage increases, the recalculation metric may still be greater than the set threshold, and the update will not be issued.

[0079] Optionally, the updated dynamic parameters can be loaded by having the computing device write the updated dynamic parameters into the parameter configuration items of the simulation model according to their names and values. Friction and stiffness parameters are written sequentially by joint number, while contact stiffness and contact damping parameters are written sequentially by contact pair. After writing, the simulation model reconstructs the intermediate quantities used for contact solving and reads back the current values ​​of each parameter. If the read-back values ​​are inconsistent with the written values, it is determined that the loading has not taken effect and the parameters are rewritten. To avoid the previous run's state affecting the current recalculation, after writing, the joint positions, joint velocities, and workpiece poses of the simulation model are reset to the initial state when the measured data was collected in step 101. The initial state is determined based on the measurement results of the joint positions and workpiece poses at the first sampling time of the measured data.

[0080] The workpiece pose can be measured by a vision sensor mounted above the workstation. The vision sensor acquires images of the workpiece, and the workpiece's pose in the base coordinate system is determined according to the pre-calibrated pose relationship between the camera coordinate system and the robot base coordinate system. If the workstation lacks a vision sensor, the calibrated position of the fixture's positioning surface in the base coordinate system is used as the workpiece pose, and the workpiece's placement deviation within the fixture is included in the distribution distance during the contact phase. The workpiece pose is recalculated using the same value as the measured data acquired in step 101, avoiding the introduction of dynamically irrelevant differences into the recalculated data due to variations in workpiece pose.

[0081] Furthermore, the updated residual compensation model can be loaded by including a nominal control law consistent with the robot controller in the simulation model, and calculating the nominal control output according to the nominal control law in each control cycle. Loading the residual compensation model involves superimposing the torque correction amount output by the residual compensation model onto the nominal control output of the simulation model in the same control cycle. During superposition, the amplitude and rate of change are limited, and the value is also restricted to a non-zero value within the state interval corresponding to the structural difference. Thus, the recalculation reflects the difference between the loaded simulation model and the robot under the same control method, rather than just the difference after changing the dynamic parameters. If the simulation model does not have the conditions for superimposing the correction amount, the torque correction amount is converted into the force control threshold and trajectory point correction amount according to the aforementioned conversion method before loading.

[0082] When running the loaded simulation model, the target motion command, initial state, workpiece and fixture pose, clamping position, and simulation step size are all consistent with step 101, ensuring that the recalculated data and measured data are obtained under the same conditions. If the simulation model contains random factors, such as the initial iteration value of the contact solution or disturbances injected based on sensor noise amplitude, it is run with the same initial random number, or continuously run a set number of times and take the median sequence of each recalculated data as the recalculated data. In one example, the set number of times is 3. If the contact constraint solution fails to converge during the run, the simulation step size is halved and the run is restarted. If convergence is still not achieved after halving twice, the current recalculation is determined to not meet the consistency condition and the process is switched to recovery.

[0083] The segmentation method, normalization scale, and stage weights used to determine the recalculated metrics are similar to those in step 102, and will not be elaborated here. Optionally, the stage division is based on the contact force amplitude of the measured data, and the resulting time intervals are also applied to the recalculated data, ensuring that the same stage in both sets of data corresponds to the same action. The normalization scale is the same as that used in step 102, and is not re-determined based on the recalculated data; otherwise, the two resulting metrics would be incomparable. In one example, the dynamic consistency metric before the update was 0.81, after the parameter update it was 0.29, after the residual compensation model update it was 0.11, and the recalculated metric was 0.11, consistent with the value obtained during the residual compensation model update, indicating that the loading has taken effect.

[0084] In addition to recalculating the metric values, the distribution distances of each stage can be checked as follows: The distribution distances of the recalculated data and measured data in the approach, contact, and hold stages are compared with their corresponding values ​​before the update. If the distribution distance in any stage increases by more than a set percentage relative to before the update, even if the recalculated metric values ​​meet the consistency condition, the update will not be issued. In one example, the set percentage is 10%. After a certain update, the distribution distance in the contact stage decreased from 0.42 to 0.12, while the distribution distance in the hold stage increased from 0.18 to 0.25, exceeding the set percentage. Therefore, the update will not be issued and will proceed to recovery. This check is used to prevent updates where the overall quality decreases but a certain stage deteriorates from being issued to the robot controller.

[0085] When the recalculated metric does not meet the consistency condition, loading anomalies and invalid updates can be distinguished as follows: Compare the recalculated metric with the metric obtained when the residual compensation model is updated. If the difference is less than the set tolerance, the update is deemed invalid, and recovery is initiated. If the difference is not less than the set tolerance, loading anomalies are determined, parameter writing and residual compensation model loading are re-executed, and recalculation is performed again. If inconsistency persists after a set number of repetitions, a loading anomaly message is output, and recovery is initiated. In one example, the set tolerance is 0.02, and the set number of repetitions is 2. The purpose of distinguishing between the two situations is that when loading anomalies occur, the dynamic parameters and residual compensation model themselves may be valid, and direct recovery will discard one valid update.

[0086] The recalculation time includes the time for parameter writing and model loading, as well as the simulation run time. In one example, the former takes approximately 0.2 seconds and the latter approximately 0.6 seconds. When running three times consecutively and taking the median sequence, the total recalculation time is approximately 2 seconds, which can be completed within the interval between two assembly actions without occupying the execution time of the assembly action. If the interval time is insufficient, the recalculation will be scheduled for the next downtime interval of the same station. During this period, the robot will perform assembly actions according to the assembly operation parameters before the update and the residual compensation model before the update.

[0087] After successful recalculation, the computing device generates a calibration record and writes it to the version repository. The calibration record includes a timestamp, an index key, the dynamic parameters and their value ranges before and after the update, the parameters of the residual compensation model, the metric values ​​before and after the update and the recalculated metric values, the distribution distance of each stage, and the consistency condition values ​​used in this calibration. The calibration record is used for rollback when recalculation or verification fails, for other robots to access using the index key, and for scheduling subsequent calibrations based on the trend of metric values ​​changing with the number of assembly iterations.

[0088] Step 106: If the recalculated metric value meets the consistency condition, the assembly operation parameters determined according to the loaded simulation model and the residual compensation model are sent to the robot controller so that the robot can perform the assembly action.

[0089] The assembly operation parameters are determined based on the loaded simulation model, including the assembly trajectory, force control threshold, and insertion depth. These parameters can be re-planned by the simulation model under the loaded dynamic parameters, or they can be re-verified on the loaded simulation model based on the original trajectory. The computing device sends the assembly operation parameters and residual compensation model to the robot controller via industrial Ethernet. The robot controller loads the parameters before the next assembly action begins, generates nominal control outputs based on the assembly operation parameters, adds correction values, and then executes the assembly action.

[0090] Further, optionally, if the recalculated metric does not meet the consistency condition, the dynamic parameters and the residual compensation model are restored to the dynamic parameters and residual compensation model before the update.

[0091] Understandably, the specific recovery method is executed version by version. The computing device saves the dynamic parameters, value ranges, residual compensation models, and their corresponding metrics from the most recent updates. In one example, the most recent five versions are saved. The measured data collected in this instance is still retained after recovery and used as comparison data when selecting candidate parameter values ​​in the next update, so that the next update can utilize the operating condition information that failed the recalculation in this instance.

[0092] Each version in the repository stores the following information: values ​​and ranges of dynamic parameters, structural identifiers and parameters of the residual compensation model, normalization scale and weights for each stage, values ​​of consistency conditions, metrics used when the version was generated and recalculated, index key, and timestamp. During restoration, the above information from the previous version is retrieved by version number and written back to the simulation model and robot controller. When the number of versions reaches the storage limit, the version with the largest metric value that is not currently in effect is deleted.

[0093] In some optional implementations, after sending the assembly operation parameters determined according to the loaded simulation model and the residual compensation model to the robot controller, the method further includes: receiving verification data collected during the robot's execution of the assembly action according to the assembly operation parameters and the correction amount. A verification metric is determined based on the difference in data distribution between the verification data and the simulation data output by the loaded simulation model; if the verification metric does not meet the consistency condition, the assembly operation parameters and the residual compensation model before the update are sent to the robot controller, and the verification data is used as the measured data for the next determination of the dynamic consistency metric. The assembly operation parameters include at least one of assembly trajectory, force control threshold, and insertion depth.

[0094] In the above implementation, recalculation is performed on the simulation model, while verification is performed on the actual machine. Both jointly confirm whether an update is usable. Verification data is the operational data collected when the robot actually performs assembly actions according to the updated assembly parameters and correction values. In one example, the verification metric value is 0.13, still less than the set threshold of 0.3, and the update is retained. If the verification metric value does not meet the consistency condition, the computing device sends the assembly parameters and residual compensation model from before the update to the robot controller, and the robot resumes operation according to the method before the update. The verification data contains the operating condition information that caused the update to fail, which serves as the measured data for the next determination of the dynamic consistency metric value.

[0095] Verification metrics are determined for each consecutive assembly operation: only when the verification metrics for three consecutive assembly operations fail to meet the consistency condition is the previous assembly operation parameters and the previous residual compensation model sent to the robot controller; if only a few operations fail to meet the condition, the current update is retained, and the corresponding verification data is added to the data used in the next update, thereby avoiding backtracking caused by occasional material position deviations in a single assembly operation. During verification, the robot executes assembly operations according to the updated assembly operation parameters, and the torque correction is limited by the upper limit of amplitude and the upper limit of change rate. When the number of times the limits are exceeded reaches the set number, the method of stopping the transmission of residual compensation models mentioned above is followed.

[0096] The following is a complete execution example. A six-axis collaborative robot at a certain workstation performs a wire harness terminal insertion operation. After one assembly action, the computing device obtains measured and simulated data, and the dynamic consistency metric value is 0.81 after three-stage weighting, which is greater than the set threshold of 0.3. The computing device selects candidate parameter values ​​in a particle swarm optimization manner within the current value range of friction and contact stiffness parameters. After three rounds of updates, the metric value drops to 0.29, and the value range of the friction coefficient narrows from 0.05 to 0.35 to 0.12 to 0.17. The decrease in the metric value between the third and second rounds is 0.015, which is less than the set range of 0.02. The computing device identifies the residual difference as a structural difference and updates the residual compensation model with running data from approximately 180 sampling times whose contribution exceeds the 0.8 quantile, reducing the metric value to 0.11. After loading the updated dynamic parameters and residual compensation model, the metric value is recalculated to 0.11, satisfying the consistency condition. The computing device then sends the assembly trajectory, insertion force upper limit, and residual compensation model to the robot controller. The robot performs assembly actions according to the updated parameters, and the verification metric value is 0.13, which is retained in this update. After two hours of continuous operation, the joint temperature rises, and the metric value increases to 0.34. The computing device then re-executes the above process. The values ​​mentioned are examples and do not constitute a limitation of this application.

[0097] In some alternative implementations, before determining the dynamic consistency metric, the poses of the corresponding objects in the simulation model are corrected based on the workpiece and tooling poses obtained from visual measurements. Deviations between the workpiece placement and the tooling installation position alter the timing and location of contact. Without prior correction, these geometric deviations are factored into the dynamic differences, causing the dynamic parameters to be updated to values ​​deviating from the actual values. The metric is then determined after correction, reflecting the differences at the dynamic level.

[0098] In some optional implementations, the computing device uses the robot model and serial number, end-effector identifier, and material batch identifier as index keys to store the narrowed value range, the corresponding residual compensation model, and its verification segment metric values. The robot model and serial number are read by the robot controller, the end-effector identifier is obtained from the tool's identification signal, and the material batch identifier is obtained from the work order information or the identification result of the material barcode. When there are already saved results under the same index key, the initial value of the current value range is used for the first calibration of other robots. When only the robot serial number differs in the index key, the lower and upper bounds of the initial value range are obtained by weighted averaging based on the number of assembly actions on which each result is based. When the material batch identifiers differ in the index key, the intersection of the value ranges of each result is taken as the initial value range; if the intersection is empty, the range formed by the minimum value of the lower bound and the maximum value of the upper bound of each range is taken. Thus, robots of the same model with the same tooling and the same material batch do not need to start searching from the initial range, reducing the number of iteration rounds for candidate parameter values ​​from 3 rounds to 1 round in one example. The residual compensation model can also be retrieved using the index key. After retrieval, it is updated incrementally according to the running data collected by this robot. Before updating, it is first confirmed on the verification section that the retrieved model causes the metric value to decrease; otherwise, the update starts from the initial parameters.

[0099] In some optional implementations, the computing device categorizes structural differences into three types based on their correlation with the operational data across dimensions: those related to joint velocity, those related to command torque, and those related to joint position. The correlation coefficient between the contribution of each moment in the operational data and the joint velocity, command torque, and joint position at that moment is determined. This correlation coefficient is the ratio of the product of the covariance and standard deviation of the two sequences. The category corresponding to the dimension with an absolute correlation coefficient greater than a set correlation threshold is the category to which the structural difference belongs. If more than one category is satisfied, the category with the largest absolute correlation coefficient is selected. In some examples, the set correlation threshold is 0.5. Sub-models of the residual compensation model are updated for each category. The input of each sub-model is the dimension corresponding to its category and its first difference, and the output is the torque correction for each joint. During inference, the corresponding sub-model is selected based on the state interval into which the current state data falls. If the state interval of more than one sub-model is hit, the sub-model with the larger absolute correlation coefficient at the time of update is output. The above classification corresponds to the hysteresis characteristics of joint friction, the torque saturation of the actuator, and the clearance of the transmission mechanism: the hysteresis characteristics contribute more at the speed reversal point, the torque saturation contributes more when the command torque is close to the rated value, and the transmission clearance contributes more within a specific joint position range. Therefore, classifying according to the degree of correlation can make the range of the correction amount correspond to the cause.

[0100] In other implementations, the operational data corresponding to structural differences are grouped according to the contact state identifier and the sign of the joint velocity. A sub-model is updated for each group. If the number of samples in a group is less than a set number, it is merged with adjacent groups. In one example, the set number is 50 samples. This method does not rely on the calculation of correlation coefficients and is suitable for situations where structural differences are simultaneously correlated with multiple dimensions and are difficult to classify into a single category.

[0101] In some alternative implementations, the computing device records the dynamic consistency metric after each assembly operation, estimates the time when the metric reaches a set threshold based on the rate of increase of the metric with the number of assembly operations, and performs parameter updates during batch changeovers or shift handovers before said threshold. Thus, parameter updates do not consume continuous operation time.

[0102] In some alternative implementations, when the assembly object is a vulnerable part such as glass, the upper limit of the torque correction amplitude is adjusted from 5% to 2% of the rated torque, and the weight of the holding phase is increased from 0.3 to 0.4, so that the measurement value reflects the force consistency during the holding phase more.

[0103] In some alternative implementations, the computing device allocates simulation instances according to the number of candidate parameter value groups. Each simulation instance runs the same target action instruction in parallel and outputs candidate simulation data separately. In one example, the time taken for 20 groups of candidate parameter values ​​to run serially is approximately 12 seconds, while the time taken for each round after being allocated to 8 simulation instances for parallel running is approximately 2 seconds. Parameter updates can be completed within the interval between two assembly actions.

[0104] In some optional implementations, the computing device calculates the average value of the correction amount output by the residual compensation model over a set period of time. When the average value exceeds half of the upper limit of the amplitude, a maintenance prompt is output. If the correction amount consistently shows a unidirectional bias, it indicates that there is a deviation in the mechanical assembly or transmission mechanism that needs to be checked. In this case, maintenance is performed instead of continuing to increase the correction amount.

[0105] In other implementations, when updating kinetic parameters, first establishing a regression model for candidate metrics and then selecting candidate parameter values ​​can be done by uniformly selecting several sets of candidate parameter values ​​within the current value range and running a simulation model to obtain the corresponding candidate metrics. A regression model is then established using the candidate parameter values ​​as input and the candidate metric values ​​as output. The output of the regression model includes predicted values ​​and predicted variance, such as a Gaussian process regression model. The next set of candidate parameter values ​​is selected within the value range based on the principle of minimizing the difference between the predicted value and the predicted variance. The simulation model is run only for the selected candidate parameter values, and the results are added to the regression model. This method runs only a small number of simulations per round, making it suitable for situations where a single simulation takes a long time. In one example, the number of simulations required to achieve the same metric value is reduced from 60 to 22. The kernel function of the regression model can be a squared exponential kernel, with its length scale initialized according to the value range of the already run candidate parameter values ​​and updated using maximum likelihood after each new sample is added.

[0106] In other implementations, the dynamic consistency metric is determined based on the frequency domain distribution differences by performing a short-time spectral transformation on the joint torques in the measured and simulated data according to a set window length to obtain the energy sequence of each frequency band. The distribution distance is determined according to the distribution of energy in each frequency band in the two sets of data, and then the values ​​are weighted and summed according to the frequency band weights. This method is more sensitive to the hysteresis characteristics of joint friction and the response delay of the current loop. The causes of these factors are not obvious in the time domain value distribution, but they show differences in the energy distribution in the mid-to-high frequency bands. In one example, the window length is 50 milliseconds, and the frequency bands are divided into three segments: 0 to 20 Hz, 20 to 100 Hz, and above 100 Hz, with a weight of 0.5 for the 20 to 100 Hz band. The frequency domain method can be used in conjunction with the time domain method, and the metric values ​​obtained from both are summed according to their weights to obtain the dynamic consistency metric.

[0107] In other implementations, the residual compensation model can be a lookup table model indexed by state intervals. This model divides the state intervals corresponding to structural differences into grids along each input dimension. Each grid stores a set of torque correction values, which are the average label values ​​of the training samples falling into that grid. During inference, the current state data is used to locate the grid, and the correction value is output after linear interpolation based on the values ​​of adjacent grids. This model does not require iterative training; during updates, only the average value of the corresponding grid is recalculated based on the new samples, making it suitable for controllers with limited processing power. The granularity of grid division is determined by the number of training samples. In one example, each dimension is divided into 8 segments, and each grid is required to contain at least 5 samples. Grids with insufficient samples are filled with the values ​​of adjacent grids; grids that still cannot be filled output zero values.

[0108] In other implementations, the recalculation metric value is determined on the reserved data segment by dividing the acquired measured data into an update segment and a reserved segment in chronological order. The updates to the dynamic parameters and the residual compensation model only use data from the update segment. The recalculation metric value is determined based on the measured data from the reserved segment and the simulation data output by the loaded simulation model. This method ensures that the recalculation result is unaffected by the data used in the update. If the update only matches a portion of the data segment, the recalculation metric value on the reserved segment does not decrease, and the update is not issued. In one example, the update segment and the reserved segment are divided in a 7:3 ratio. In a certain update, the metric value on the update segment decreased from 0.29 to 0.09, while it remained at 0.31 on the reserved segment. This was determined to be a failure to meet the consistency condition, and the dynamic parameters and residual compensation model before the update were restored.

[0109] In other implementations, the residual compensation model can be updated by grouping joints, where the torque correction for each joint is output by an independent sub-model, and the input to each sub-model is the state data of its own joint and its adjacent joints. This method ensures that abnormal data from one joint does not affect the correction values ​​of other joints, and also facilitates updating only the corresponding sub-model after replacing the reducer or adding grease to a single joint, while keeping the other sub-models unchanged. The number of trainable parameters for each sub-model is less than that when modeling all joints uniformly; in one example, a single sub-model has approximately 1200 trainable parameters.

[0110] In other implementations, the kinetic consistency metric is determined by merging measured data from multiple consecutive assembly actions. Specifically, data from the same stage of each assembly action within a set number of times are merged before determining the distribution distance; in one example, the set number of times is 5. This method prevents occasional material position deviations in a single assembly action from triggering parameter updates, at the cost of delaying calibration until after the set number of times is completed. When a material batch change or end-tool replacement is detected, the set number of times is reduced to 1, allowing parameter updates to be performed immediately after the first assembly action following the change.

[0111] In other implementations, the updates to the kinetic parameters and the residual compensation model are performed in alternating rounds. After each update of the residual compensation model, the updated model is loaded into the simulation model, and the kinetic parameters are updated again within the current value range. The results are then used to reassess whether structural differences still exist, until the difference between the metric values ​​in two consecutive rounds is less than a set amplitude or a set number of rounds is reached. This method is suitable for situations where structural differences and kinetic parameters influence each other; that is, after the residual compensation model absorbs some differences, the optimal value of the kinetic parameters changes accordingly. In one example, two rounds are set, and after the second round of parameter updates, the metric value decreases from 0.11 to 0.08.

[0112] Regarding the models involved in the embodiments of this application, the simulation model in existing practices operates with a fixed set of dynamic parameters, which are obtained from manual values ​​or through one-time calibration. The running results are only used to generate and verify operational parameters. The simulation model in the embodiments of this application differs from this in three ways: the dynamic parameters are saved together with their current values ​​along with their ranges; the values ​​are updated according to the differences in data distribution between measured data and simulation data; the range of values ​​is narrowed during the update process while retaining a lower limit; the simulation model contains a nominal control law consistent with the robot controller, so that the correction amount output by the residual compensation model can be superimposed in the same way on the simulation side; the simulation model is recalculated after each update before being distributed, and the segmentation method, normalization scale, and weights of each stage used in the recalculation are the same as those used during the update.

[0113] Residual compensation models do not exist in existing practices, and the differences between simulation and actual operation are entirely attributed to the values ​​of dynamic parameters. The residual compensation model in this embodiment only addresses the portion that dynamic parameters cannot express: its training samples are only taken from sampling times where the contribution exceeds a set quantile; the output is non-zero only within the state interval corresponding to structural differences, and is limited by upper limits for amplitude and rate of change; the model is updated incrementally, and training samples are organized according to the ratio of newly acquired samples to historical samples; the update result must cause a decrease in the metric value during the validation phase to be retained; each version, along with its validation phase metric value, is saved for rollback. These limitations ensure that the model's scope of application is consistent with the range supported by its data, and it does not change the robot's control variables under conditions where no structural differences are observed.

[0114] The regression model for candidate metrics, the lookup table model indexed by state intervals, and the sub-models divided by category or joint are all alternative or refined implementations of the two models mentioned above: the regression model uses predicted values ​​and predicted variance to jointly determine the next set of candidate parameter values, reducing the number of simulation runs; the lookup table model uses grid-based values ​​and linear interpolation to replace network inference, used for controllers with limited processing capabilities, with its grid granularity determined by the number of training samples; the sub-models are divided according to the causes of structural differences or by joints, so that changes in data for a certain cause or a certain joint only affect the corresponding sub-model. The parameter values ​​and hyperparameters of the above models are determined according to the validation segment metrics during the calibration phase, and only the parameters are updated during the online operation phase without changing the structure.

[0115] In this embodiment, the dynamic consistency metric is determined based on the difference in data distribution between measured and simulated data. Sensor noise and sampling time jitter from actual machine acquisition are not included in the deviation. The metric obtained from multiple acquisitions under the same working condition is stable, and the updated dynamic parameters do not fluctuate with the results of a single acquisition. After the dynamic parameters are updated according to the value range, the remaining differences are identified as structural differences and are taken over by the correction amount output by the residual compensation model. Factors that cannot be expressed by parameters, such as the response delay of the motor current loop, the torque saturation of the driver, and the hysteresis characteristics of joint friction, are no longer left outside the model. The updated results are recalculated before being issued, and confirmed according to the verification data after issuance. Whether an update is usable does not rely on manual trial runs for judgment, and the deviation introduced by the update will not directly affect the assembly action. Thus, the simulation model remains consistent with the robot under conditions of material batch changes, tooling wear, and continuous temperature rise during operation. The assembly trajectory and force control threshold output by the simulation model can be directly used by the robot to perform assembly actions, reducing the number of trial and error attempts on actual machine and the workpiece damage and downtime caused by assembly force deviations.

[0116] The above describes the bidirectional dynamic calibration simulation method based on virtual-real high-fidelity mapping provided in the embodiments of this application. The following describes the bidirectional dynamic calibration simulation system based on virtual-real high-fidelity mapping that performs the above method.

[0117] Reference Figure 4 , Figure 4 This is a schematic diagram of a bidirectional dynamic calibration simulation system based on virtual-real high-fidelity mapping, provided as an embodiment of this application. The system can be deployed in... Figure 1 The computing device shown is capable of achieving the above. Figure 2The corresponding embodiments describe the steps of the bidirectional dynamic calibration simulation method based on virtual-real high-fidelity mapping. The functions implemented by the system can be achieved through hardware or through hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functions. The system includes a data acquisition module 601, a consistency measurement module 602, a parameter update module 603, a residual compensation module 604, and a verification distribution module 605.

[0118] The data acquisition module 601 is configured to acquire measured data and simulation data. The measured data is the operational data collected during the robot's assembly operations according to the target action instructions. The simulation data is the operational data obtained by the simulation model running according to the target action instructions. The robot body, force sensors, and robot controller are the sources of data acquired by the data acquisition module 601 and are not internal modules of the system.

[0119] The consistency measurement module 602 is configured to determine the dynamic consistency measurement value of the simulation model based on the difference in data distribution between the measured data and the simulation data.

[0120] The parameter update module 603 is configured to update the dynamic parameters within the current value range of the dynamic parameters of the simulation model when the dynamic consistency metric does not meet the consistency condition, and to narrow the current value range according to the change of the dynamic consistency metric during the update process.

[0121] The residual compensation module 604 is configured to, when the dynamic consistency metric value re-determined according to the updated dynamic parameters still does not meet the consistency condition, determine the difference corresponding to the re-determined dynamic consistency metric value as a structural difference not expressed by the dynamic parameters, and update the residual compensation model according to the running data corresponding to the structural difference in the measured data. The residual compensation model is used to output the correction amount acting on the robot control quantity.

[0122] The verification and distribution module 605 is configured to load the updated dynamic parameters and the updated residual compensation model into the simulation model, and then run the simulation model according to the target action instruction to obtain recalculated data. The module determines the recalculated metric value according to the difference in data distribution between the recalculated data and the measured data. If the recalculated metric value meets the consistency condition, the module sends the assembly operation parameters determined according to the loaded simulation model and the residual compensation model to the robot controller so that the robot can perform the assembly action.

[0123] In some implementations, the data acquisition module 601 is further configured to align the measured data to the same time reference according to the acquisition timestamp, resample the aligned measured data according to the running step size of the simulation model, and transform the contact force from the sensor coordinate system of the force sensor to the tool coordinate system of the robot.

[0124] In some implementations, the consistency measurement module 602 is further configured to divide the measured data and the simulation data into data segments for the approach stage, the contact stage and the holding stage according to the contact force amplitude, determine the distribution distance of the measured data and simulation data belonging to the same stage after normalization according to the data dimension, and obtain the dynamic consistency measurement value by weighted summation according to the weight of each stage.

[0125] In some implementations, the parameter update module 603 is further configured to select multiple sets of candidate parameter values ​​within the current value range, run the simulation model according to each set of candidate parameter values ​​and determine candidate metric values, determine the candidate parameter value with the smallest candidate metric value as the updated dynamic parameter, and determine the dynamic parameters for selecting subsequent candidate parameter values ​​according to the sensitivity of each dynamic parameter.

[0126] In some embodiments, the residual compensation module 604 is further configured to input at least one of the robot's joint position, joint velocity, command torque, and contact state identifier into the residual compensation model to obtain the torque correction amount for each joint, and limit the torque correction amount according to the upper limit of amplitude and the upper limit of rate of change.

[0127] In some implementations, the verification distribution module 605 is further configured to receive verification data collected during the assembly process when the robot performs the assembly action according to the assembly operation parameters and the correction amount, determine the verification metric value according to the verification data, and send the assembly operation parameters before the update and the residual compensation model before the update to the robot controller if the verification metric value does not meet the consistency condition.

[0128] In this embodiment, the data acquisition module 601 to the verification and distribution module 605 work together in the manner described above, so that the dynamic parameters of the simulation model and the residual compensation model are updated with the working conditions, and the updated parameters are applied to the robot's assembly actions only after being recalculated and verified.

[0129] The bidirectional dynamic calibration simulation system based on virtual-real high-fidelity mapping in this application embodiment has been described above from the perspective of modular functional entities. The following description focuses on hardware processing. It should be noted that... Figure 4The physical device corresponding to the data acquisition module 601 shown can be a transceiver, a communication module, and an input / output interface, etc. The physical devices corresponding to the consistency measurement module 602, parameter update module 603, residual compensation module 604, and verification distribution module 605 can be processors.

[0130] Reference Figure 5 , Figure 5 This is a schematic diagram of a computing device provided in an embodiment of this application. The computing device may vary depending on its configuration or performance, and may include one or more central processing units (CPUs) 1122 and memory 1132, as well as one or more storage media 1130 for storing application programs 1142 or data 1144. The memory 1132 and storage media 1130 may be temporary or persistent storage. The program stored in the storage media 1130 may include one or more modules, each module including a series of instruction operations on the computing device. The CPU 1122 may be configured to communicate with the storage media 1130 and execute the series of instruction operations in the storage media 1130 on the computing device. The computing device may also include one or more power supplies 1126, one or more wired or wireless network interfaces 1150, one or more input / output interfaces 1158, and / or one or more operating systems 1141.

[0131] The steps performed by the computing device in the above embodiments can be based on Figure 5 The structure is shown. For example, the central processing unit 1122 performs the following operations by calling instructions in memory 1132: receiving joint positions and joint torques collected by the robot body and contact forces collected by force sensors through input / output interface 1158 as measured data; determining a dynamic consistency metric value according to the difference in data distribution between the measured data and the simulation data; updating the dynamic parameters and narrowing the value range if the dynamic consistency metric value does not meet the consistency condition; determining structural differences and updating the residual compensation model if the dynamic consistency metric value re-determined according to the updated dynamic parameters still does not meet the consistency condition; loading the updated dynamic parameters and the updated residual compensation model into the simulation model and recalculating and determining the recalculated metric value; and also sending assembly operation parameters and the residual compensation model to the robot controller through input / output interface 1158 if the recalculated metric value meets the consistency condition.

[0132] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0133] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0134] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, apparatuses, or modules, and may be electrical, mechanical, or other forms.

[0135] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0136] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0137] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.

[0138] The computer program product includes one or more computer instructions. When the computer program is loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. 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 wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0139] The technical solutions provided in the embodiments of this application have been described in detail above. Specific examples have been used in the embodiments of this application to illustrate the principles and implementation methods of the embodiments of this application. The description of the above embodiments is only for the purpose of helping to understand the methods and core ideas of the embodiments of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the embodiments of this application. Therefore, the content of this specification should not be construed as a limitation on the embodiments of this application.

Claims

1. A bidirectional dynamic calibration simulation method based on virtual-real high-fidelity mapping, characterized in that, The method includes: Acquire measured data and simulation data. The measured data is the running data collected during the assembly process when the robot performs the assembly action according to the target action instruction. The simulation data is the running data obtained by the simulation model running according to the target action instruction. Based on the difference in data distribution between the measured data and the simulation data, the dynamic consistency metric of the simulation model is determined; If the dynamic consistency metric does not meet the consistency condition, the dynamic parameters are updated within the current value range of the dynamic parameters in the simulation model, and the current value range is narrowed according to the change of the dynamic consistency metric during the update process to obtain the updated dynamic parameters and the updated value range. If the dynamic consistency metric value re-determined according to the updated dynamic parameters still does not meet the consistency condition, the difference corresponding to the re-determined dynamic consistency metric value is identified as a structural difference not expressed by the dynamic parameters. The residual compensation model is updated according to the operating data corresponding to the structural difference in the measured data. The residual compensation model is used to output the correction amount acting on the robot control quantity. The updated dynamic parameters and the updated residual compensation model are loaded into the simulation model. The loaded simulation model is run according to the target action command to obtain recalculated data. The recalculated metric value is determined according to the difference in data distribution between the recalculated data and the measured data. If the recalculated metric value meets the consistency condition, the assembly operation parameters determined according to the loaded simulation model and the residual compensation model will be sent to the robot controller so that the robot can perform the assembly action.

2. The method according to claim 1, characterized in that, The acquisition of measured data and simulation data includes: The robot receives joint positions and joint torques collected by the robot body and contact forces collected by force sensors during the assembly process, and uses the received data as the measured data. The joint position, joint torque, and contact force output by the simulation model under the target action command are obtained as the simulation data; The measured data are aligned to the same time base according to the collection timestamp, and the aligned measured data are resampled according to the running step size of the simulation model. The contact force is transformed from the sensor coordinate system of the force sensor to the tool coordinate system of the robot. The pose relationship on which the transformation is based is determined according to the kinematic parameters of the robot and the current joint position.

3. The method according to claim 1, characterized in that, The step of determining the dynamic consistency metric of the simulation model based on the difference in data distribution between the measured data and the simulation data includes: The measured data and the simulated data are divided into data segments for the approach phase, the contact phase, and the holding phase according to the contact force amplitude. Measured data and simulated data belonging to the same stage are normalized according to data dimensions, and the distribution distance between the two sets of data after normalization is determined. The distribution distance is a distance metric that characterizes the overall distribution difference between the two sets of samples, including bulldozer distance. The distribution distances of each stage are weighted and summed according to their respective weights to obtain the dynamic consistency metric, wherein the weight of the contact stage is greater than the weight of the approach stage.

4. The method according to claim 1, characterized in that, The consistency condition includes the dynamic consistency metric value being less than a set threshold; the method further includes: In any of the following situations, such as changes in the batch of materials of the assembly object, replacement of the end tool, continuous operation time reaching the set time, or the joint temperature rise of the robot exceeding the set temperature rise, the measured data and the simulation data are reacquired, and the dynamic consistency metric value is re-determined.

5. The method according to claim 1, characterized in that, Updating the dynamic parameters within the current value range of the dynamic parameters in the simulation model includes: Within the current value range, select multiple sets of candidate parameter values, run the simulation model according to each set of candidate parameter values ​​to obtain candidate simulation data, and determine the candidate metric value of each set of candidate parameter values ​​according to the difference in data distribution between the candidate simulation data and the measured data. The candidate parameter with the smallest candidate metric value is determined as the updated dynamic parameter; Each set of candidate parameter values ​​is generated according to the selected candidate parameter values ​​and corresponding candidate metric values. The generation process does not use the gradient of the dynamic parameters output by the simulation model. The dynamic parameters include at least one of friction parameters, mass inertia parameters, joint stiffness parameters, and transmission flexibility parameters.

6. The method according to claim 5, characterized in that, Each set of candidate parameter values ​​is generated based on the selected candidate parameter values ​​and their corresponding candidate metric values, including: Each set of candidate parameter values ​​is used as the position of each particle in the particle swarm. The historical best position of each particle and the historical best position of the particle swarm are determined according to the current candidate metric value of each particle. The positions and velocities of each particle are updated according to the historical best positions, and the updated particle positions are used as candidate parameter values ​​for the next run of the simulation model. The step of selecting multiple sets of candidate parameter values ​​within the current value range includes: The sensitivity of each dynamic parameter is determined based on the changes in candidate metric values ​​caused by the changes in the values ​​of each dynamic parameter. When selecting candidate parameter values ​​in the future, dynamic parameters with sensitivity greater than the set sensitivity will continue to be selected within their value range, while dynamic parameters with sensitivity not greater than the set sensitivity will retain their current values.

7. The method according to claim 5, characterized in that, The step of narrowing the current value range according to the change of the dynamic consistency metric value during the update process includes: After sorting the candidate metric values ​​from smallest to largest, the candidate parameter values ​​that fall within a set ratio range are extracted, and the minimum and maximum values ​​among the extracted candidate parameter values ​​are used as the lower and upper bounds of the updated value range. If the width of the updated value range is less than the lower limit of the set width of the dynamic parameter, the updated value range is expanded according to the lower limit of the set width, and the narrowing of the dynamic parameter is stopped.

8. The method according to claim 1, characterized in that, The residual compensation model is used to output the correction amount acting on the robot control quantity, including: The residual compensation model is input with at least one of the robot's joint position, joint velocity, command torque, and contact state identifier to obtain the torque correction amount of each joint of the robot. The torque correction amount is then superimposed on the nominal control output of the robot controller according to the control cycle of the robot controller. The torque correction value is non-zero when the data input to the residual compensation model falls into the state interval corresponding to the structural difference. The state interval is determined according to the value range of the operating data corresponding to the structural difference.

9. The method according to claim 8, characterized in that, After obtaining the torque correction values ​​for each joint of the robot, the method further includes: The upper limit of the amplitude of the torque correction amount is determined according to the rated torque of each joint, and the upper limit of the rate of change of the torque correction amount is determined according to the control cycle. If the amplitude or rate of change of the torque correction exceeds the corresponding upper limit, the torque correction is output according to the corresponding upper limit and the running data at the time of exceeding the limit is recorded; If the number of recorded overruns reaches a set number, the transmission of the residual compensation model will stop, and the residual compensation model will be restored to the residual compensation model before the update.

10. A bidirectional dynamic calibration simulation system based on high-fidelity virtual-real mapping, characterized in that, The system includes: The data acquisition module is configured to acquire measured data and simulation data. The measured data is the running data collected during the assembly process when the robot performs the assembly action according to the target action instruction. The simulation data is the running data obtained by the simulation model running according to the target action instruction. The consistency measurement module is configured to determine the dynamic consistency measurement value of the simulation model based on the difference in data distribution between the measured data and the simulation data. The parameter update module is configured to update the dynamic parameters within the current value range of the dynamic parameters in the simulation model when the dynamic consistency metric does not meet the consistency condition, and to narrow the current value range according to the change of the dynamic consistency metric during the update process. The residual compensation module is configured to, if the dynamic consistency metric value re-determined according to the updated dynamic parameters still does not meet the consistency condition, determine the difference corresponding to the re-determined dynamic consistency metric value as a structural difference not expressed by the dynamic parameters, and update the residual compensation model according to the running data corresponding to the structural difference in the measured data. The residual compensation model is used to output the correction amount acting on the robot control quantity. The verification and distribution module is configured to load the updated dynamic parameters and the updated residual compensation model into the simulation model, and then run the simulation model according to the target action command to obtain recalculated data. The module determines the recalculated metric value according to the difference in data distribution between the recalculated data and the measured data. If the recalculated metric value meets the consistency condition, the module sends the assembly operation parameters determined according to the loaded simulation model and the residual compensation model to the robot controller so that the robot can perform the assembly action.