Shaft-hole pose deviation identification and adaptive correction method based on assembly state machine

CN122896176APending Publication Date: 2026-10-13SHENZHEN HUACHENG IND CONTROL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611411826.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0004]本申请提供了一种基于装配状态机的轴孔姿态偏差识别与自适应修正方法,旨在解决现有纯力觉装配方案无法精准量化轴体相对孔体的倾斜角度与平面偏移方向,姿态调整多依赖试错式微幅摆动,装配周期长、对准精度有限,易出现装配卡滞与工件磕碰损伤的问题

Benefits of technology

1.依托轴孔两点接触的力学关系,通过接触力与接触力矩的关联运算直接解算位姿偏差参数,无需视觉辅助即可实现纯力觉下的偏差精准识别,有效降低装配系统部署成本,可适配狭小、密闭等受限场景的装配作业。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122896176A_ABST
    Figure CN122896176A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of robot precision assembly, and provides a shaft-hole posture deviation identification and self-adaptive correction method based on an assembly state machine. In the posture correction state, contact force data and contact torque data output by a force sensing device under a shaft-hole contact working condition are collected, an assembly shaft body is controlled to search along a spiral trajectory in a horizontal plane, and end position data is synchronously collected; differential tracking processing is performed on the contact force data, a contact force change rate is obtained, a contact state mutation of the assembly shaft body passing through a hole edge is identified according to the contact force change rate, and statistical processing is performed on the end position data to estimate a hole body center reference position; the posture deviation of the assembly shaft body is judged according to the position deviation between the current end position and the hole body center reference position, a motion adjustment instruction matching posture correction requirements is generated; and the motion adjustment instruction is sent to an assembly execution mechanism, so that the posture deviation self-adaptive correction of the assembly shaft body is completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of precision assembly technology for robots, and in particular to a method for identifying and adaptively correcting shaft and hole posture deviations based on an assembly state machine. Background Technology

[0002] Currently, most precision shaft and hole automated assembly adopts force-controlled compliant assembly schemes, which realize the hole position search and insertion of shaft components through end force sensing feedback. Some schemes use planar spiral search trajectory combined with preset attitude fine-tuning rules to complete the shaft and hole alignment operation.

[0003] Existing force-based assembly solutions cannot accurately quantify the tilt angle and planar offset direction of the shaft relative to the hole. Attitude adjustment relies heavily on trial-and-error micro-oscillation, resulting in long assembly cycles, limited alignment accuracy, and a high risk of assembly jamming and workpiece damage. Introducing a vision system for positioning assistance would increase system costs and deployment complexity, making it unsuitable for assembly operations in confined spaces or enclosed conditions. Summary of the Invention

[0004] This application provides a shaft-hole attitude deviation identification and adaptive correction method based on an assembly state machine, which aims to solve the problems of existing pure force-sensing assembly schemes that cannot accurately quantify the tilt angle and planar offset direction of the shaft relative to the hole, attitude adjustment relies on trial-and-error micro-oscillation, long assembly cycle, limited alignment accuracy, and easy assembly jamming and workpiece collision damage.

[0005] In a first aspect, embodiments of this application provide a method for identifying and adaptively correcting shaft-hole attitude deviations based on an assembly state machine, the method comprising: Under the attitude correction state, the contact force data and contact torque data output by the force sensing device under the shaft-hole contact condition are collected; numerical correlation calculations are performed on the collected contact force data and contact torque data according to the shaft-hole two-point contact model; The tilt angle and plane offset orientation of the assembly shaft relative to the hole are calculated using the correlation calculation results of contact force and contact torque; motion adjustment commands matching the attitude correction requirements are generated based on the calculated tilt angle and plane offset orientation. The motion adjustment command is sent to the assembly actuator, which drives the actuator to complete the adaptive correction of the assembly shaft position deviation in the attitude correction state.

[0006] This application has the following beneficial effects: 1. Based on the mechanical relationship of two-point contact between the shaft and hole, the position deviation parameters are directly calculated through the correlation calculation of contact force and contact torque. The deviation can be accurately identified under pure force perception without visual assistance, effectively reducing the deployment cost of the assembly system and adapting to assembly operations in confined scenarios such as narrow and enclosed spaces.

[0007] 2. It can directly obtain the quantitative results of shaft tilt angle and plane offset orientation, replacing the traditional trial-and-error attitude fine-tuning process, greatly shortening the shaft hole alignment cycle and improving assembly accuracy and work efficiency.

[0008] 3. Based on the quantified pose deviation, matching correction motion commands are generated to achieve adaptive and precise adjustment of the assembly posture, effectively reducing the risk of assembly jamming and workpiece collision damage, and improving the consistency and success rate of precision shaft and hole assembly.

[0009] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0010] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a schematic flowchart illustrating the steps of a shaft-hole attitude deviation identification and adaptive correction method based on an assembly state machine according to an embodiment of this application; Figure 2 This is a schematic diagram illustrating the principle of a shaft hole attitude deviation identification and adaptive correction method based on an assembly state machine according to an embodiment of this application; Figure 3 This is a schematic block diagram of a shaft hole attitude deviation identification and adaptive correction system based on an assembly state machine, provided in one embodiment of this application. Figure 4 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application.

[0012] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Detailed Implementation

[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0014] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0015] It should be understood that, in order to clearly describe the technical solutions of the embodiments of the present invention, the terms "first" and "second" are used in the embodiments of the present invention to distinguish identical or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.

[0016] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0017] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0018] Currently, most precision shaft and hole automated assembly adopts force-controlled compliant assembly schemes, which realize the hole position search and insertion of shaft components through end force sensing feedback. Some schemes use planar spiral search trajectory combined with preset attitude fine-tuning rules to complete the shaft and hole alignment operation.

[0019] Existing force-based assembly solutions cannot accurately quantify the tilt angle and planar offset direction of the shaft relative to the hole. Attitude adjustment relies heavily on trial-and-error micro-oscillation, resulting in long assembly cycles, limited alignment accuracy, and a high risk of assembly jamming and workpiece damage. Introducing a vision system for positioning assistance would increase system costs and deployment complexity, making it unsuitable for assembly operations in confined spaces or enclosed conditions.

[0020] Please refer to Figure 1This embodiment provides a shaft-hole posture deviation identification and adaptive correction method based on an assembly state machine, applied to a computer-controlled robot precision assembly scenario. The assembly state machine is configured only with a posture correction state, and all control logic is executed in a closed loop within this state. The method is executed by a computer device, which can be deployed on a standalone server, a server cluster, an industrial robot controller, a handheld terminal, a laptop, or a wearable computing device. All data acquisition and processing involved in this method are conducted with the authorization of the relevant parties and in compliance with data security management regulations, and do not involve the unauthorized collection or use of privacy information.

[0021] like Figure 1 As shown, the core process of this method is divided into three execution steps, corresponding to steps S101, S102 and S103 respectively.

[0022] The provided method for identifying and adaptively correcting shaft and hole attitude deviations based on an assembly state machine includes steps S101 to S103. Details are as follows: Step S101. Under the attitude correction state, collect the contact force data and contact torque data output by the force sensing device under the shaft-hole contact condition; perform numerical correlation calculation on the collected contact force data and contact torque data according to the shaft-hole two-point contact model.

[0023] Specifically, this step is the initial data processing stage of the method, and the specific implementation process is as follows: First, the shaft-hole mating condition is monitored to identify the contact state between the assembled shaft and the hole to be assembled. Once it is determined that the shaft and hole have entered the contact state, the sampling channel of the force sensor is activated. The force sensor is installed at the end of the assembly actuator and can simultaneously collect contact force and torque values ​​in multiple spatial dimensions. After the sampling channel is activated, the force sensor synchronously collects the original contact force and torque values ​​under the current condition according to a pre-set fixed sampling frequency, ensuring that the sampling times of data in different dimensions are completely aligned and avoiding timing deviations from affecting the accuracy of subsequent calculations.

[0024] During the contact state identification process, the system employs a multi-level judgment mechanism to ensure the accuracy of contact determination. First, the theoretical distance between the lower end face of the assembly shaft and the upper end face of the hole to be assembled is calculated using the kinematic model of the assembly actuator. When the theoretical distance is less than a preset proximity threshold, the system enters a contact preparation state and begins monitoring the axial force value of the force sensor at a higher frequency. Subsequently, when the axial contact force value first exceeds a preset initial contact threshold, the system marks it as a suspected contact state and starts a contact confirmation timer. Within the contact confirmation timer's timing cycle, if the axial contact force value remains above the contact determination threshold and does not drop back to zero, the assembly shaft and hole are confirmed to have entered a stable contact condition, and the sampling channel is officially triggered. If the axial force fluctuates abnormally or drops back within the timing cycle, it is determined to be a false contact, and the system returns to the contact preparation state for re-monitoring.

[0025] After the raw data acquisition is completed, preprocessing is performed on the raw values. Preprocessing includes two steps: zero-point offset calibration and gravity component elimination. Zero-point offset calibration deducts the systematic error caused by zero-point drift from the raw values ​​by using the pre-acquired no-load zero-drift values ​​of the force sensing device. Gravity component elimination combines the current pose parameters of the assembly actuator and the gravity parameters of the end-load to calculate the gravity components in each acquisition dimension of the force sensing device under the current posture, and removes the interference components caused by gravity from the raw values. Finally, the calibrated contact force data and contact torque data are output.

[0026] In the zero-point offset calibration stage, the system employs a dynamic zero-drift tracking mechanism. Since the zero-point drift of the force sensing device will slowly shift with changes in ambient temperature, the system continuously collects a preset number of no-load samples during the no-load phase before each assembly task begins, calculating the average value of each dimension as the current zero-point offset benchmark. During the assembly task execution, the system also periodically updates the zero-point benchmark using force data from the non-contact phase between the shaft and hole, ensuring the long-term accuracy of the zero-point calibration.

[0027] In the gravity component elimination stage, the system establishes a gravity compensation model for the end-effector load. This model uses the mass, center of gravity position, and installation pose of the force sensor as parameters, and transforms the gravity vector from the world coordinate system to the measurement coordinate system of the force sensor through homogeneous coordinate transformation. During the transformation, the system reads the angle encoder data of each joint of the assembly actuator in real time, obtains the current pose of the end-effector through forward kinematics calculation, and then, combined with the pre-calibrated center of gravity offset, accurately calculates the projection components of gravity in the three force dimensions and three torque dimensions of the force sensor under the current pose, and removes them from the original measurement values.

[0028] After obtaining the calibrated data, numerical correlation calculations are performed on the contact force and contact torque data based on a pre-constructed shaft-hole two-point contact model. The shaft-hole two-point contact model is constructed based on the static equilibrium state where the shaft end edge and the hole edge form two independent contact points when the shaft is tilted and contacting the hole end face. During the calculation, the calibrated total contact force and total contact torque data are input into the model, and the force and torque components corresponding to each of the two contact points are decomposed. A proportional relationship between the total contact force and total contact torque values ​​is established, and complete correlation calculation results are output, providing a data foundation for subsequent attitude deviation calculations.

[0029] During the numerical correlation calculation, the system first performs sliding window smoothing on the calibrated force and torque data, employing a weighted moving average algorithm to suppress high-frequency noise while preserving the dynamic characteristics of contact force changes. The smoothing window length is adaptively adjusted according to the sampling frequency and the rate of contact force change; the window length is shortened during rapid contact force changes to ensure response speed, and extended during stable contact force changes to improve the signal-to-noise ratio. The smoothed data is then input into the shaft-hole two-point contact model for correlation calculation, ensuring the stability and reliability of the calculation results.

[0030] Step S102. Calculate the tilt angle and plane offset orientation of the assembly shaft relative to the hole using the correlation calculation results of contact force and contact torque; generate motion adjustment commands that match the posture correction requirements based on the calculated tilt angle and plane offset orientation.

[0031] Specifically, this step is the core computational step of the method. It takes the correlation calculation result output from step S101 and completes the deviation calculation and instruction generation. The specific implementation process is as follows: First, the proportional relationship between contact force and contact torque output in step S101 is read. Then, the pre-stored geometric parameters of the assembly shaft and the hole to be assembled are retrieved. The assembly shaft geometric parameters include the shaft diameter, shaft end chamfer parameters, and the distance from the shaft's force point to the mounting end face. The hole to be assembled geometric parameters include the hole diameter and hole end chamfer parameters. Combining the above proportional relationship and geometric parameters, the tilt angle between the assembly shaft and the axis of the hole to be assembled is calculated. The tilt angle is the spatial angle between the shaft axis and the hole axis.

[0032] In the calculation of the tilt angle, the system employs an iterative solution method based on geometric constraints. First, based on the force components at the two contact points and the geometric parameters of the shaft and hole, a geometric constraint equation is established to define the spatial relationship between the shaft axis and the hole axis. This constraint equation includes unknowns such as the shaft tilt angle, planar offset, and the position coordinates of the two contact points. The system uses a Newton-Raphson iterative algorithm to solve the constraint equations, starting with an initial estimate and gradually approximating the exact solution through multiple iterations. After each iteration, the system verifies the convergence of the solution. When the difference in tilt angle between two adjacent iterations is less than a preset convergence threshold, the solution is considered complete, and the final tilt angle value is output.

[0033] After completing the tilt angle calculation, based on the proportional relationship of the torque components in two orthogonal horizontal directions, the plane offset orientation of the assembly shaft relative to the center of the assembly hole is identified. The plane offset orientation is the offset direction of the projection of the shaft axis on the horizontal plane relative to the center of the hole. Finally, the quantified tilt angle result and plane offset orientation result are output.

[0034] During the planar offset orientation identification process, the system treats the moment components in two orthogonal horizontal directions as two-dimensional vectors, and calculates the amplitude and azimuth of the combined moment through vector synthesis. The azimuth is calculated using a four-quadrant arctangent function, accurately determining the quadrant of the offset direction based on the signs of the two moment components, thus avoiding ambiguity in the azimuth. Simultaneously, the system combines the tilt angle and shaft length parameters, using trigonometric relationships to calculate the actual offset distance of the shaft end in the horizontal plane, so that the offset orientation and offset distance together constitute a complete description of the planar deviation.

[0035] After obtaining the attitude deviation results, motion adjustment command generation is performed. The rotational adjustment amount of the shaft attitude is determined based on the tilt angle value, including the rotation angle and rotation axis direction. The planar translational adjustment amount of the shaft is determined based on the planar offset orientation, including the translation distance and translation direction. The rotational and translational adjustment amounts are converted into motion trajectory parameters recognizable by the assembly actuator. These motion trajectory parameters include the end effector's position coordinates and attitude parameters in Cartesian space, ultimately generating motion adjustment commands that perfectly match the current attitude correction requirements.

[0036] During the motion adjustment command generation process, the system employs a progressive adjustment strategy to avoid sudden changes in contact force caused by excessively large single adjustments. The system divides the total adjustment amount into multiple sub-adjustment steps, with the rotation angle and translation distance of each sub-adjustment step not exceeding the preset maximum adjustment amount per step. Each sub-adjustment step corresponds to a continuous motion trajectory, which is programmed using fifth-order polynomial interpolation to ensure the continuity of position, velocity, and acceleration, avoiding impacts and vibrations during motion. The trajectory parameters of all sub-adjustment steps are arranged in execution order, forming a complete sequence of motion adjustment commands for the assembly actuator to execute step by step.

[0037] Step S103. Send the motion adjustment command to the assembly actuator to drive the actuator to complete the adaptive correction of the assembly shaft position deviation in the attitude correction state.

[0038] Specifically, this step is the execution output stage of the method. It receives the motion adjustment command generated in step S102 and drives the actuator to complete the attitude correction. The specific implementation process is as follows: The generated motion adjustment command is sent to the motion control unit of the assembly actuator through the real-time communication bus. After receiving the command, the motion control unit performs synchronous interpolation processing on the rotational adjustment action and the translational adjustment action to ensure that the adjustment actions in the two dimensions are executed synchronously, avoiding sudden changes in contact force caused by adjustment in a single dimension, which could cause workpiece scratches or equipment damage.

[0039] During synchronous interpolation, the motion control unit employs a multi-axis linkage interpolation algorithm to simultaneously map rotational and translational adjustment values ​​in Cartesian space to the joint spaces of the assembly actuator. During this mapping process, the system establishes a linear relationship between the end effector velocity and joint velocities using a Jacobian matrix, ensuring strict synchronization of rotational and translational motions on the time axis. The interpolation cycle is kept consistent with the sampling cycle of the force sensing device, enabling the motion increment within each interpolation cycle to be collected and fed back in real time by the force sensing device, forming a precise closed-loop control.

[0040] During the adjustment process, real-time data from the force sensing device is continuously collected to simultaneously verify the correction effect of the attitude deviation. By comparing the real-time force-torque ratio with the preset alignment threshold, when the ratio remains within the acceptable threshold range, it is determined that the attitude of the assembly shaft and the hole to be assembled has been aligned, the adjustment action is stopped, the adaptive correction of the attitude deviation is completed, and the attitude correction state is exited.

[0041] During the verification process of the correction effect, the system employs a statistical judgment method to avoid misjudgment. The system maintains a sliding verification window, which contains the force and torque ratio relationships of multiple consecutive sets of sampled data. When the ratio relationships of all data within the window are within the acceptable threshold range, and the standard deviation of the contact force within the window is less than a preset stability threshold, the system determines that the posture alignment is complete. The length of the sliding verification window is set according to the sampling frequency and the system response speed, ensuring both the reliability of the judgment and avoiding excessive judgment delays that could affect assembly efficiency.

[0042] In some embodiments, the step of collecting contact force data and contact torque data output by the force sensing device under the posture correction state includes: determining that the assembled shaft and hole have entered the contact state, triggering the sampling channel of the force sensing device to open, synchronously collecting multi-dimensional contact force values ​​and multi-dimensional contact torque values ​​at a fixed sampling frequency, performing zero-point offset calibration and gravity component elimination processing on the collected raw values, and outputting calibrated contact force data and contact torque data.

[0043] This embodiment further details the specific implementation of the force data acquisition process, as follows: Before initiating the attitude correction process, the no-load calibration of the force sensor is completed. The force sensor is placed in a state without external load, and multiple sets of no-load data are continuously collected and averaged as the reference value for zero-point offset calibration. At the same time, the gravity parameters of the end-load are calibrated. Using force sensor data under multiple different attitudes, the center of gravity position and gravity magnitude of the end-load are calculated as the calculation reference for gravity component elimination.

[0044] During the no-load calibration operation, the system employs a multi-point pose calibration method to improve the calibration accuracy of gravity parameters. The system controls the assembly actuator to sequentially move to multiple preset calibration poses, each with a different projection direction of the gravity of the end-load in the force-sensing coordinate system. At each calibration pose, the system remains stationary for a preset time before continuously acquiring multiple sets of force data and calculating the mean value for each dimension. After data acquisition, the system substitutes the force measurements and corresponding pose parameters from all calibration poses into the gravity parameter calculation equation, using the least squares method to solve for parameters such as the mass of the end-load, the three-dimensional coordinates of the center of gravity, and the force sensor installation offset. After calibration, the system uses the calibration parameters to perform gravity compensation verification on the force data of each calibration pose. The calibration is considered successful when the residual force in each dimension after compensation is less than a preset accuracy threshold.

[0045] During the attitude correction triggering phase, the axial contact force value of the force sensing device is read in real time. When the axial contact force value continuously exceeds the preset contact judgment threshold and the duration reaches the set judgment duration, it is determined that the assembled shaft and hole have entered the contact condition. Immediately after the judgment is completed, the sampling channel is triggered to open, and the force sensing device performs synchronous sampling according to a preset fixed sampling frequency. The sampling frequency can be adjusted from hundreds to thousands of times per second according to the assembly accuracy requirements. Each sampling simultaneously acquires the contact force value and the contact torque value in three orthogonal directions.

[0046] During the contact determination process, the system also introduces the contact force change rate as an auxiliary determination condition. When the axial contact force exceeds the initial contact threshold and its change rate per unit time also exceeds a preset change rate threshold, the system is more likely to determine it as a true contact, and the confirmation timing can be appropriately shortened. When the axial contact force exceeds the threshold but the change rate is low, the system may determine it as slow contact or sensor drift, and the confirmation timing should be appropriately extended to ensure accurate determination. This contact determination mechanism based on both force value and change rate effectively reduces the probability of false contact and missed contact.

[0047] For each set of sampled raw values, zero-point offset calibration and gravity component elimination are performed sequentially. First, the pre-calibrated zero-point offset reference value is deducted. Then, combined with the current joint pose data of the assembly actuator, the components of gravity in each dimension of the force sensing coordinate system under the current posture are calculated through coordinate transformation. Gravity components are removed from the raw values. Finally, the calibrated contact force data and contact torque data containing only external contact action are output.

[0048] During the calibration process, the system employs temperature compensation to correct the zero-point offset reference. The force sensing device integrates a temperature sensor to collect the device's operating temperature in real time. The system pre-establishes a mapping table between the zero-point offset and temperature through temperature experiments. During operation, it consults the mapping table based on the current temperature to correct the zero-point offset reference in real time, further improving calibration accuracy. Simultaneously, the system performs low-pass filtering on the gravity component calculation results to suppress gravity compensation fluctuations introduced by joint angle measurement noise, ensuring the smoothness of the calibrated data.

[0049] In some embodiments, the step of performing numerical correlation calculations on the collected contact force data and contact torque data based on the two-point contact model of the shaft and hole includes: pre-constructing a mechanical mapping model of the two-point contact of the shaft and hole, inputting the calibrated contact force data and contact torque data into the mechanical mapping model, decomposing the force components and torque components corresponding to the two contact points respectively, establishing the corresponding proportional relationship between the total contact force value and the total contact torque value, and outputting the correlation calculation results.

[0050] This embodiment further refines the specific implementation method of the numerical correlation calculation step of the two-point contact model, as detailed below: Before initiating the attitude correction process, a mechanical mapping model of the two-point contact between the shaft and the hole is pre-constructed. Based on the principle of rigid body static equilibrium, the model establishes a mapping relationship between the total contact force, total contact torque, and the forces acting at the two contact points, taking into account the case where the shaft is inclined and forms two contact points at the end face of the hole. The model inputs are calibrated three-dimensional contact force data and three-dimensional contact torque data. The model outputs the force components at each contact point, as well as the proportional relationships between the total contact torque and the total axial contact force, and between the total contact torque and the total radial contact force.

[0051] During model construction, the system first establishes a unified coordinate system definition. A force sensing coordinate system is established with the measurement origin of the force sensing device as the origin, where the Z-axis follows the initial axis of the assembly shaft, and the X and Y axes are located in the horizontal plane and are orthogonal to each other. A hole coordinate system is established with the intersection of the hole's axis and its upper surface as the origin, where the Z-axis points upwards along the hole's axis, and the X and Y axes are located in the plane of the hole's upper surface. The homogeneous transformation matrix between the two coordinate systems enables the mutual conversion of mechanical quantities.

[0052] Based on the aforementioned coordinate system, the model establishes force balance equations and moment balance equations according to the static equilibrium conditions of a rigid body. The force balance equations state that the vector sum of the normal force and the tangential friction force at the two contact points equals the total contact force; the moment balance equations state that the vector sum of the moments of the forces at the two contact points relative to the force sensing origin equals the total contact moment. The model considers the Coulomb friction model at the contact points, where the magnitude of the tangential friction force does not exceed the normal force multiplied by the static friction coefficient, and its direction is opposite to the relative sliding tendency at the contact points.

[0053] After obtaining the calibrated contact force and contact torque data, the data is input into a pre-constructed mechanical mapping model. The model first decomposes the total contact force into normal and tangential frictional components at the two contact points based on static equilibrium conditions, and the total contact torque into torque components relative to the force sensing origin at the two contact points. After decomposition, the proportional relationship between torque values ​​and stress values ​​in different dimensions is calculated, forming a complete correlation calculation result, which is then output, providing a direct calculation basis for subsequent deviation calculation.

[0054] During the model solution process, since the number of unknowns in the static equilibrium equations exceeds the number of equations, additional constraints are introduced to achieve a unique solution. These additional constraints include: both contact points are located on the geometric intersection of the shaft end edge and the hole end edge; the contact point positions satisfy the geometric dimensional constraints of the shaft and hole; the normal forces at both contact points are non-negative, consistent with the physical meaning of contact mechanics; and the tangential friction force satisfies the Coulomb friction inequality constraint. The system employs a constrained least squares optimization algorithm to find the optimal solution that satisfies all constraints, ensuring the physical rationality of the decomposition results.

[0055] In some embodiments, the calculation of the tilt angle and plane offset orientation of the assembly shaft relative to the hole using the correlation calculation results of contact force and contact torque includes: reading the corresponding proportional relationship between contact force and contact torque, combining the shaft geometric parameters and the hole geometric parameters, calculating the tilt angle value of the shaft relative to the hole axis respectively, identifying the plane offset orientation of the shaft relative to the hole center, and outputting the tilt angle result and the plane offset orientation result.

[0056] This embodiment further details the specific implementation of the attitude deviation calculation process, as follows: After reading the force-torque ratio output from the correlation calculation, the pre-stored geometric parameters of the assembly shaft and the hole to be assembled are retrieved. First, based on the ratio of axial torque to radial force, and combined with the shaft radius and hole end face radius parameters, the positional difference between the two contact points and the hole center is calculated, and the spatial tilt angle between the shaft axis and the hole axis is further derived.

[0057] In deriving the tilt angle, the system establishes a geometric model of the shaft's tilt posture. Let the axis of the hole be vertical, the tilt angle of the shaft axis relative to the hole axis be θ, and the projection direction of the shaft axis onto the horizontal plane be the azimuth angle φ. When the shaft tilts and contacts the end face of the hole, two contact points are formed between the shaft end edge and the hole end edge. The line connecting these two contact points on the horizontal plane is perpendicular to the shaft's tilt direction. The system determines the direction of the shaft's tilt based on the relationship between the normal forces at the two contact points; and derives the tilt angle θ using geometric relationships based on the distance between the two contact points and the radius parameters of the shaft and hole. During the derivation, the system considers the influence of the shaft end chamfer and the hole end chamfer, correcting the actual position of the contact points to improve the accuracy of the tilt angle calculation.

[0058] After calculating the tilt angle, the values ​​of the torque components in two orthogonal horizontal directions are read. Based on the magnitude relationship and positive / negative attributes of the two components, the azimuth angle of the resultant torque is calculated. This azimuth angle corresponds to the plane offset orientation of the assembled shaft relative to the center of the hole. At the same time, combined with the tilt angle and shaft length parameters, the offset distance of the shaft end in the horizontal plane is calculated. Finally, the quantified tilt angle value, plane offset orientation, and offset distance results are output.

[0059] During the planar offset orientation calculation, the system performs coordinate system alignment on the torque components. Because the end effector's attitude changes continuously during correction, the force sensing device's measurement coordinate system also rotates. Based on the rotation matrix of the current end effector attitude, the system transforms the horizontal torque components in the force sensing coordinate system to a fixed horizontal direction in the hole coordinate system, ensuring a consistent calculation benchmark for the offset orientation and avoiding deviations in orientation calculation due to changes in the end effector attitude. The two orthogonal torque components after transformation correspond to the X and Y axes of the hole coordinate system, respectively, and the azimuth angle calculated accordingly directly represents the offset orientation relative to the hole coordinate system.

[0060] All calculation results are quantified values ​​that can be directly used for motion control without the need for additional manual conversion. The calculation process is executed synchronously with the data sampling process to ensure the real-time nature of deviation identification.

[0061] Before outputting the solution results, the system performs a validity check on the results. The checks include: whether the tilt angle is within the physically possible range (usually not exceeding the maximum allowable tilt angle of the shaft and hole); whether the offset distance is less than the reasonable range of the difference between the shaft radius and the hole radius; and whether the change in the solution results across multiple consecutive frames exceeds a preset maximum rate of change threshold. If a solution result fails the validity check, the system discards that frame's result and retains the valid result from the previous frame to prevent abnormal solution values ​​from interfering with subsequent motion control.

[0062] In some embodiments, generating motion adjustment commands that match the attitude correction requirements based on the calculated tilt angle and plane offset orientation includes: determining the shaft attitude rotation adjustment amount based on the tilt angle value, determining the shaft plane translation adjustment amount based on the plane offset orientation, converting the rotation adjustment amount and translation adjustment amount into motion trajectory parameters that can be recognized by the assembly actuator, and generating corresponding motion adjustment commands.

[0063] This embodiment further details the specific implementation of the motion adjustment command generation process, as follows: After obtaining the tilt angle and plane offset orientation results, the rotation adjustment parameters are first determined: the rotation angle is consistent with the calculated tilt angle value, the rotation axis direction is perpendicular to the plane formed by the shaft axis and the hole axis, and the rotation direction is the direction that makes the shaft axis move closer to the hole axis.

[0064] During the determination of rotation adjustment parameters, the system employs an under-adjustment strategy to avoid overshoot. The actual rotation adjustment angle is set as the calculated tilt angle multiplied by a preset adjustment ratio coefficient, which ranges from 0.5 to 0.9 and is adaptively selected based on the contact force and workpiece material. When the contact force is large and the workpiece material is soft, a smaller adjustment ratio coefficient is selected to avoid over-adjustment and workpiece damage; when the contact force is small and the workpiece material is hard, a larger adjustment ratio coefficient is selected to improve correction efficiency. The rotation axis direction is determined by the cross product of the shaft axis vector and the hole axis vector. The direction of the cross product result is the rotation axis direction, which is determined by the right-hand rule to ensure that the rotational motion brings the shaft axis closer to the hole axis.

[0065] Then, the translation adjustment parameters were determined: the translation direction was opposite to the plane offset direction, and the translation distance was consistent with the calculated shaft end offset distance, to ensure that the shaft axis and the hole axis were in the same vertical plane after adjustment.

[0066] During the determination of translation adjustment parameters, the system also employs an under-adjustment strategy. The actual translation distance is the calculated offset distance multiplied by the translation adjustment ratio coefficient. The translation adjustment ratio coefficient and the rotation adjustment ratio coefficient can be set independently, determined based on the degree of influence of planar deviation on the contact force. The translation direction is the opposite direction of the planar offset, i.e., the direction from the current offset position of the shaft to the center of the hole. The system decomposes the translation vector into two components in the X-axis and Y-axis directions of the hole coordinate system, facilitating subsequent motion trajectory planning.

[0067] After obtaining the rotational and translational adjustment parameters, the attitude adjustment quantities in Cartesian space are converted into motion control parameters for the assembly actuator. During the conversion process, the kinematic model of the assembly actuator is used to calculate the end-effector attitude adjustment quantity into the motion increment of each joint, while generating continuous motion trajectory interpolation points to ensure smooth and shock-free adjustment movements. Finally, motion adjustment commands conforming to the actuator control protocol format are generated.

[0068] During the kinematic transformation, the system employs an inverse kinematics algorithm to calculate the motion increments of each joint. For redundant degrees of freedom assembly actuators, the system introduces performance optimization indices, selecting the solution with the minimum total joint motion and optimal obstacle avoidance performance from multiple inverse solutions that meet the end-effector attitude adjustment requirements as the final solution. Trajectory interpolation uses S-shaped acceleration and deceleration planning, dividing the adjustment process into acceleration, constant velocity, and deceleration segments. The acceleration and jerk of each segment are limited within preset ranges to ensure smooth and shock-free motion. The density of interpolation points is determined based on the transmission frequency of the communication bus. Each interpolation point contains the target angle, angular velocity, and angular acceleration of each joint for execution by the motion control unit.

[0069] In some embodiments, the step of sending motion adjustment commands to the assembly actuator and driving the actuator to complete adaptive correction of the assembly shaft attitude deviation in the attitude correction state includes: transmitting motion adjustment commands to the motion control unit of the assembly actuator in real time, controlling the actuator to simultaneously complete attitude rotation adjustment and planar translation adjustment, synchronously collecting force sensing data during the adjustment process, and verifying the attitude deviation correction effect.

[0070] This embodiment further details the specific implementation of the attitude correction execution phase, as follows: After receiving the motion adjustment command, the motion control unit uses a multi-axis synchronous interpolation algorithm to synchronously plan the rotational adjustment action and the translational adjustment action, ensuring that the attitude of the end effector transitions along a smooth trajectory during the adjustment process. The adjustment actions in both dimensions start and stop simultaneously to avoid sudden changes in contact force.

[0071] During multi-axis synchronous interpolation, the motion control unit establishes a unified motion time reference. Rotational and translational adjustments share the same total adjustment time, and their respective motion velocity curves are normalized according to the total adjustment time to ensure that the progress ratio of the two actions is consistent at each moment. The interpolation calculation is performed once in each control cycle, calculating the target rotation angle and target translation position at that moment based on the current progress ratio, and then converting them into target angles for each joint through inverse kinematics. After receiving the target angles, the servo drivers of each joint use a three-loop control structure of position loop, velocity loop, and current loop to drive the joint movement, achieving high-precision trajectory tracking.

[0072] During the adjustment process, real-time data from the force sensor is synchronously collected at the same frequency as the sampling frequency. After each set of data acquisition is completed, the current force-torque ratio is recalculated and compared with the preset alignment qualification threshold. When the ratio of multiple consecutive sets of sampled data is within the qualification threshold range and the contact force fluctuation amplitude is less than the set stability threshold, the attitude deviation correction is determined to be complete. The motion control unit immediately stops the adjustment action, locks the current attitude, and completes this adaptive correction process.

[0073] During the verification process of the correction effect, the system also monitors the absolute magnitude of the contact force as an auxiliary judgment condition. When the posture is aligned, the contact force between the shaft and the hole should gradually decrease from a larger value when in inclined contact to a value close to zero or a stable small value. Therefore, the system uses the changing trend of the absolute value of the contact force as an auxiliary indicator for alignment judgment: when the force-torque ratio meets the threshold requirement and the absolute value of the contact force continues to decrease to a preset acceptable range, the posture alignment is judged to be complete. This judgment mechanism based on both proportional relationship and absolute force value further improves the accuracy and reliability of alignment judgment.

[0074] In some embodiments, the method further includes: storing attitude deviation data and corresponding correction execution data in each attitude correction state, constructing an attitude correction sample dataset, training a deviation correction prediction model based on the sample dataset, and calling the prediction model to output pre-adjustment parameters before the attitude correction state is entered in subsequent contact conditions, thereby controlling the actuator to complete the initial attitude pre-correction in advance.

[0075] This embodiment adds an initial pose pre-correction function based on historical samples to the core method. The specific content is as follows: After each attitude correction process is completed, the system automatically stores the relevant data for that process. The stored data includes attitude deviation data at the initial contact moment, motion execution data during the correction process, and final correction effect data. After normalization preprocessing, all stored data is stored in the attitude correction sample dataset, which is continuously expanded as the number of attitude corrections increases.

[0076] During data storage and preprocessing, the system performs feature engineering on each sample record. Extracted features include: workpiece batch number, initial assembly positioning error, initial contact force magnitude, initial tilt angle, initial offset orientation, total correction time, total correction steps, adjustment amount at each step, maximum contact force during correction, and final alignment accuracy. The system performs Z-score standardization on numerical features and one-hot encoding on categorical features. The processed feature vectors are used as input for model training. Simultaneously, the system performs quality screening on the sample data, removing invalid samples due to correction failures, data anomalies, or sensor malfunctions to ensure the quality of the training data.

[0077] Once the sample size of the dataset reaches the set training threshold, the system invokes a machine learning algorithm to train the bias correction prediction model. The model takes the initial assembly positioning parameters and workpiece batch parameters as input, and the rotation and translation amounts pre-adjusted in the initial posture as output, improving prediction accuracy through iterative training with sample data.

[0078] During model training, the system employs gradient boosting trees or deep neural networks as the foundational algorithms for the prediction model. The model training uses a five-fold cross-validation method, randomly dividing the sample dataset into five subsets. Four subsets are used alternately as the training set and one subset as the validation set to evaluate the model's generalization performance. An early stopping strategy is employed during training: training is stopped when the validation set error no longer decreases after several consecutive rounds to prevent overfitting. After model training is complete, the system uses an independent test set to evaluate the model's prediction accuracy. Only when the prediction error is less than a preset accuracy requirement can the model be deployed in real-world applications.

[0079] In the subsequent attitude correction process of the same batch of workpieces, when the assembly shaft moves to the vicinity of the hole but has not yet contacted the hole, the system calls the trained deviation correction prediction model, outputs the initial attitude pre-adjustment parameters, controls the assembly actuator to complete the attitude pre-correction in advance, reduces the attitude correction time after the shaft contacts the hole, and improves the overall alignment efficiency.

[0080] During the pre-calibration process, the system sets pre-adjustment safety boundaries. Both the rotational and translational amounts during pre-calibration are limited to preset maximum allowable ranges to avoid excessive adjustment movements caused by abnormal model predictions. After pre-calibration, the system controls the assembly shaft to approach the hole at a slow speed while continuously monitoring force sensor data. If abnormal contact force is detected during the approach, the system immediately stops the approach and switches to the normal attitude correction process. If the approach is successful, the system still executes the normal deviation identification and correction process after the shaft contacts the hole; however, since pre-calibration has eliminated most of the initial deviation, the time and adjustment required for subsequent corrections are significantly reduced.

[0081] In some embodiments, the method further includes: monitoring the rate of change of contact force data in real time during attitude correction; determining that there is a risk of contact abnormality when the rate of change exceeds a preset threshold; pausing the current attitude correction action; and re-executing the attitude deviation calculation and correction process until the rate of change of contact force falls back to the threshold range.

[0082] This embodiment adds contact anomaly risk prediction and protection functions to the core method, as detailed below: Throughout the attitude correction process, the system monitors the changes in contact force data in real time and calculates the rate of change of the contact force value per unit time. Anomaly detection thresholds are pre-set based on the workpiece material and assembly accuracy requirements; these thresholds represent the maximum allowable rate of change of contact force.

[0083] During the calculation of the contact force change rate, the system calculates the change rate of the contact force in three orthogonal directions and the change rate of the composite contact force. The change rate is calculated using the difference method, which is the difference between the force value at the current sampling moment and the force value at the previous sampling moment divided by the sampling period. To suppress noise interference in the change rate calculation, the system first performs low-pass filtering on the original force value before calculating the change rate. Simultaneously, the system maintains a short sliding window, calculating the average change rate within the window as the final change rate output, avoiding misjudgments caused by single-frame outliers. The anomaly judgment threshold is set comprehensively based on the workpiece material hardness, the maximum allowable contact force during assembly, and the response speed of the actuator; the softer the material and the higher the assembly precision requirements, the smaller the threshold setting.

[0084] When the rate of change of contact force exceeds a preset threshold, the system determines that there is a risk of abnormal contact in the current working condition and immediately sends a pause command to the motion control unit to stop the current posture correction action and maintain the current contact state. After the pause, the system re-executes the complete process of force data acquisition, numerical correlation calculation, and posture deviation calculation, generates new motion adjustment commands and executes corrections until the rate of change of contact force falls back to the threshold range. After the contact abnormality is resolved, the normal posture correction process is resumed to avoid forced adjustments that could cause scratches on the workpiece surface or damage to the equipment due to overload.

[0085] During anomaly handling, the system records the time of the anomaly, the force data at the time of the anomaly, the currently executed adjustment instructions, and the anomaly handling process, storing these in the anomaly event log. The anomaly event log is used for subsequent fault analysis and process optimization. When the same type of anomaly occurs multiple times within a short period, the system determines that there may be a systemic problem, such as excessive workpiece positioning deviation, loose end effector, or sensor failure. In this case, the system suspends all assembly tasks, generates alarm information to notify operators to conduct manual inspection, and avoids batch workpiece damage or escalation of equipment failure.

[0086] In some embodiments, the method further includes: acquiring convergence data of attitude deviation calculation results in real time, dividing different correction stages according to the convergence interval of the deviation, matching the deviation calculation accuracy threshold and correction step size parameters corresponding to each stage, and dynamically adjusting the accuracy and execution speed of attitude correction as the attitude correction process progresses.

[0087] This embodiment adds a phased dynamic parameter adjustment function to the core method, as detailed below: During attitude correction, the system collects real-time data on the convergence of attitude deviations based on the output of the deviation calculation module. The attitude correction process is divided into three stages based on the convergence range of the deviation: coarse correction, fine correction, and stable correction.

[0088] During the stage division process, the system uses the combined deviation of tilt angle and offset distance as the basis for stage division. The combined deviation is calculated by weighted summation of tilt angle and offset distance, with the weighting coefficient determined according to the process requirements of shaft-hole assembly. When the combined deviation is greater than a first threshold, the system is in the coarse correction stage; when the combined deviation is between the first and second thresholds, the system is in the fine correction stage; and when the combined deviation is less than the second threshold, the system is in the steady correction stage. Stage switching adopts a hysteresis comparison mechanism, that is, moving from coarse correction to fine correction requires the combined deviation to be less than the first threshold, while moving from fine correction back to coarse correction requires the combined deviation to be greater than the first threshold plus the hysteresis width, avoiding frequent stage switching caused by fluctuations in deviation around the threshold.

[0089] For different correction stages, the system pre-matches corresponding deviation calculation accuracy thresholds and correction step size parameters. The coarse correction stage uses a lower calculation accuracy threshold and a larger correction step size to prioritize improving the attitude adjustment speed and quickly complete the coarse alignment; the fine correction stage uses a medium accuracy threshold and a medium correction step size to balance adjustment speed and correction stability; the stable correction stage uses an extremely high calculation accuracy threshold and an extremely small correction step size to strictly control the adjustment range and avoid workpiece damage caused by sudden changes in contact force.

[0090] In the parameter configurations for each stage, the coarse correction stage allows for a larger convergence threshold, fewer iterations, and faster calculation speed; the correction step size is set to a relatively large proportion of the total deviation (e.g., 0.6 to 0.8), resulting in a large adjustment per step and fast correction speed. The fine correction stage has a moderate accuracy threshold and a moderate number of iterations; the correction step size is set to a moderate proportion of the total deviation (e.g., 0.3 to 0.5), ensuring correction speed while avoiding overshoot. The stable correction stage has an extremely high accuracy threshold and a large number of iterations to ensure the accuracy of the deviation calculation; the correction step size is set to a relatively small proportion of the total deviation (e.g., 0.1 to 0.2), and the maximum adjustment per step is strictly limited, enabling fine-tuning.

[0091] As the attitude correction process progresses, the system automatically switches the parameters for the corresponding stage based on the real-time deviation convergence, dynamically adjusting the accuracy and execution speed of attitude correction to maximize correction efficiency while ensuring alignment quality.

[0092] During stage switching, the system performs parameter smoothing. When switching from the coarse correction stage to the fine correction stage, the correction step size gradually decreases from a large value to a median value, rather than abruptly, to avoid contact force fluctuations caused by sudden changes in adjustment. Parameter smoothing is achieved through linear interpolation over several sampling periods, ensuring the stability of the stage switching process. Simultaneously, at the end of each stage, the system records the correction effect data for that stage, including stage duration, deviation reduction, and contact force fluctuation range, for subsequent process parameter optimization and stage threshold adjustment.

[0093] In some embodiments, the method further includes: after exiting the attitude correction state, reading the final attitude deviation data and the full-process contact force and contact torque data, determining the attitude correction effect level, marking the corresponding deviation data and correction data that do not meet the effect level as abnormal samples, updating the operation parameters of the two-point contact model in reverse, and completing the self-calibration optimization of the model.

[0094] This embodiment adds a model self-calibration and optimization function to the core method, as detailed below: After a single attitude correction process is completed, the system reads the final attitude deviation data and the contact force and contact torque data throughout the correction. Combined with preset attitude correction effectiveness standards, the system determines the effectiveness level of the correction. The attitude correction effectiveness standards include multiple dimensions such as deviation convergence requirements, contact force fluctuation range requirements, and correction time requirements. Meeting all dimensions is considered acceptable; failing to meet any dimension is considered unacceptable.

[0095] In the effect level determination process, the system sets quantitative scoring standards for each dimension. The deviation convergence dimension is scored based on the ratio of the final remaining deviation to the maximum allowable deviation; the smaller the remaining deviation, the higher the score. The contact force fluctuation dimension is scored based on the ratio of the maximum value and standard deviation of the contact force throughout the process to the allowable threshold; the smaller the fluctuation, the higher the score. The correction time dimension is scored based on the ratio of the actual correction time to the standard correction time; the shorter the time, the higher the score. The scores of the three dimensions are weighted and summed to obtain a comprehensive score. Based on the comprehensive score, the correction effect is divided into three levels: excellent, qualified, and unqualified. An excellent level indicates that the correction quality exceeds expectations and can be used as a positive sample for model optimization; a qualified level indicates that the correction quality meets the requirements and is stored as a normal sample; an unqualified level indicates that the correction quality does not meet the standards and is used as an abnormal sample for model back-calibration.

[0096] The system marks the contact force data, deviation data, and correction data corresponding to correction processes that fail to meet the performance standards as anomalous samples. It extracts feature parameters from these anomalous samples and uses them to update the computational parameters of the two-point contact mechanics mapping model, including correction parameters for the contact point friction coefficient and lever arm calculation. Through continuous iterative optimization using anomalous samples, the system continuously improves the computational accuracy of the two-point contact model, making it adaptable to different workpiece materials and different docking conditions, thus achieving autonomous calibration and continuous optimization of the model.

[0097] During the backpropagation update of model parameters, the system employs a gradient-based parameter optimization algorithm. First, the actual contact force and torque data from the outlier samples are used as input, and the current model is used to calculate the bias, yielding the model's predicted tilt angle and offset orientation. Then, the model's prediction results are compared with the actual bias results after correction, calculating the prediction error. With the goal of minimizing the prediction error, the system calculates the gradients of each model parameter (such as the friction coefficient, lever arm correction coefficient, and contact point position correction) using the backpropagation algorithm, updating the parameters along the negative gradient direction. Parameter updates employ mini-batch stochastic gradient descent, using a set of outlier samples for each update, and a learning rate decay mechanism is implemented to ensure the stability of parameter convergence. The updated model parameters are then validated on a validation set. If the validation set error decreases, the update is considered effective; otherwise, the system rolls back to the parameters before the update.

[0098] In some embodiments, such as Figure 2 As shown, this embodiment is a complete robot shaft hole attitude alignment system applying the above method, combined with... Figure 2 The system composition and complete workflow are described below: like Figure 2 As shown, the system consists of two main parts: a physical execution unit and a data processing and control unit. The two parts are connected through a real-time communication link to form a closed-loop control system.

[0099] The physical execution unit comprises an assembly actuator, a force sensing module, an assembly shaft, and a hole to be assembled. The assembly actuator is a multi-degree-of-freedom industrial robotic arm capable of translation and attitude adjustment within space. The force sensing module is mounted on the end face of the assembly actuator, the assembly shaft is fixed to the lower end face of the force sensing module, and the hole to be assembled is fixed to a preset position on the lower worktable. When the shaft is in an inclined contact state, the lower edge of the assembly shaft and the upper edge of the hole to be assembled form a first contact point and a second contact point, which together constitute the physical condition of two-point contact between the shaft and the hole.

[0100] In the physical execution unit, the assembly actuator adopts a six-degree-of-freedom serial robotic arm structure. Each joint is equipped with a high-precision angle encoder and servo driver, achieving end-effector repeatability at the micrometer level. The force sensing module uses a six-dimensional force and torque sensor, capable of simultaneously measuring forces and torques in three orthogonal directions with a measurement resolution at the millinewton level and a sampling frequency of several kilohertz. The assembly shaft is fixed to the lower end of the force sensing module using a dedicated fixture, with an insulating gasket between the fixture and the module to prevent electrical interference. The hole to be assembled is fixed on a precision worktable equipped with a position adjustment mechanism for fine-tuning the hole's position. The materials of the shaft and hole can be selected according to the actual assembly scenario, including metals, ceramics, and plastics, each with different coefficients of friction and contact mechanical properties.

[0101] The data processing and control unit contains five functional modules: a force data acquisition module, a two-point contact model correlation calculation module, an attitude deviation calculation module, a motion adjustment command generation module, and an actuator correction module. These five modules are connected sequentially according to the data flow direction. The output of the actuator correction module is connected to the assembly actuator of the physical execution unit, and the output of the force sensing module is connected to the input of the force data acquisition module, forming a complete closed-loop control circuit.

[0102] In the data processing and control unit, five functional modules can be deployed in the same industrial computer or distributed across different computing nodes. The force data acquisition module is responsible for real-time acquisition, calibration preprocessing, and data caching of force sensing data, employing a real-time operating system to ensure the accuracy of the acquisition timing. The two-point contact model correlation calculation module is responsible for the numerical correlation calculation of force and torque, with a built-in shaft-hole two-point contact mechanical model, supporting online configuration and self-calibration of model parameters. The attitude deviation calculation module is responsible for calculating tilt angles and plane offset orientations, employing efficient numerical solving algorithms to ensure real-time calculation. The motion adjustment command generation module is responsible for generating motion adjustment commands based on the deviation results, with built-in trajectory planning and kinematic transformation functions. The actuator correction module is responsible for sending motion commands to the assembly actuator and receiving execution feedback to achieve closed-loop control. The modules interact with each other via shared memory or a high-speed communication bus to ensure low latency and high reliability of data transmission.

[0103] The complete system workflow is as follows: After the attitude correction process is initiated, the assembly actuator moves the assembly shaft to the preset docking position above the hole to be assembled. When the lower end of the assembly shaft contacts the edge of the hole's end face, forming a two-point contact condition between the first and second contact points, the force sensing module collects the contact force and contact torque data generated by the contact and transmits the data to the force data acquisition module. After performing calibration preprocessing on the raw data, the force data acquisition module sends the data to the two-point contact model association calculation module to complete the numerical association calculation of force and torque. The calculation result is input to the attitude deviation calculation module to calculate the tilt angle and plane offset orientation of the assembly shaft. The deviation result is input to the motion adjustment command generation module to generate a matching motion adjustment command. The command is finally sent to the actuator correction module to control the assembly actuator to perform the attitude adjustment action. During the adjustment process, the force sensing module continuously collects data and feeds it back to the front-end module to verify the correction effect in real time until the attitude is aligned, ending the attitude deviation correction process and exiting the attitude correction state.

[0104] In the complete system workflow, the execution sequence of each step is rigorously designed. Force data acquisition, correlation calculation, deviation calculation, and command generation constitute one calculation cycle, which is consistent with the force sensing sampling cycle to ensure that a complete deviation identification and command update are completed within each sampling cycle. The motion control unit executes servo control at a higher frequency, performing fine interpolation of the motion trajectory between two calculation cycles to ensure smooth motion. The system is equipped with a watchdog monitoring mechanism. When the execution time of any step exceeds the preset limit, the system determines that the calculation has timed out, immediately stops the assembly actuator movement, and generates an alarm to avoid control abnormalities caused by calculation delays.

[0105] In some embodiments, the method further includes: constructing a Markov decision process model for the attitude correction process, with the current attitude deviation state and contact force state as the state space, the motion adjustment command as the action space, and the weighted sum of attitude alignment accuracy and correction efficiency as the reward function, and training the attitude correction policy network using a deep reinforcement learning algorithm, so that the system can adaptively select the optimal correction action sequence according to different contact conditions.

[0106] This embodiment adds an intelligent correction strategy optimization function based on deep reinforcement learning to the core method. The specific content is as follows: The system first models the attitude correction process as a Markov decision process. The state space includes the current tilt angle, planar offset distance and orientation, three-dimensional contact force, three-dimensional contact torque, and the current correction stage. All state variables are normalized to form a state vector. The action space includes the magnitude and direction of rotational and translational adjustments. Action variables are discretized or made continuous to form an action vector. The reward function consists of three parts: a positive reward for reducing attitude deviation, a negative penalty for contact force exceeding a safety threshold, and a moderate negative reward for excessive correction steps. The weighted sum of these three parts yields the immediate reward. The system's goal is to learn an optimal policy that maximizes the cumulative reward from the initial deviation state to the alignment completion state.

[0107] The policy network employs a deep neural network structure. The input layer receives the state vector, containing multiple fully connected hidden layers, and the output layer outputs action vectors or action probability distributions. The training process utilizes a proximal policy optimization algorithm, collecting trajectory data through interaction with the environment, calculating the advantage function using generalized advantage estimation, and then updating the network parameters through policy gradients. The training environment can be a simulation environment built based on historical data from a real assembly system, or online training can be conducted on a real system through safe exploration. Safety constraints are set during training; when the contact force exceeds a safety threshold, the current iteration is immediately terminated and a large negative reward is given to ensure that the exploration process does not damage the workpiece or equipment.

[0108] After training, the strategy network is deployed to the actual system. During attitude correction, the system inputs the current state into the strategy network, which outputs the optimal adjustment action. The system directly executes this action instead of using a fixed under-adjustment strategy. The strategy network can adaptively select the magnitude and rhythm of the adjustment based on different deviations, contact force states, and workpiece characteristics: a larger adjustment is selected for rapid convergence when the deviation is large and the contact force is small; a smaller adjustment is selected for fine-tuning when the deviation is small or the contact force is large. Through this adaptive strategy, the system achieves optimal correction efficiency while ensuring safety.

[0109] In some embodiments, the method further includes: integrating a vision sensing device at the end of the assembly actuator, synchronously acquiring visual image data of the shaft-hole contact area in the posture correction state, extracting the edge contour and relative position information of the shaft and hole through image processing, and weightedly fusing the posture deviation estimated by vision with the posture deviation calculated by force to output a more accurate posture deviation estimation result.

[0110] This embodiment adds a high-precision deviation estimation function based on the fusion of visual and force sensors to the core method. The specific details are as follows: The system installs a miniature vision sensor at the end of the assembly actuator. The optical axis of the vision sensor faces the contact area between the assembly shaft and the hole to be assembled, enabling real-time acquisition of two-dimensional images of the contact area. The sampling frequency of the vision sensor is an integer multiple of the sampling frequency of the force sensor, and synchronous sampling of the two sensors is achieved through hardware triggering. Before the attitude correction process is initiated, the system completes the intrinsic parameter calibration of the vision sensor and hand-eye calibration, establishing a mapping relationship between the image pixel coordinate system and the robot's world coordinate system.

[0111] During the attitude correction process, the vision sensing device simultaneously acquires images of the shaft-hole contact area. The image processing module preprocesses the acquired images, including denoising, enhancement, and distortion correction. Subsequently, an edge detection algorithm is used to extract the contours of the lower edge of the shaft and the upper edge of the hole. The elliptical parameters of the shaft and hole cross-sections are obtained through contour fitting. Based on the major axis, minor axis, and center position of the ellipse, combined with the known geometric dimensions of the shaft and hole, the tilt angle and planar offset of the shaft relative to the hole are calculated through perspective transformation, yielding the visually estimated attitude deviation.

[0112] The system weightedly fuses the visual estimation results with the force estimation results. The fusion employs a Kalman filter framework, using the force estimation results for state prediction and the visual estimation results for observation updates. Since force estimation has a high dynamic response speed but its sensitivity decreases when the deviation is small, while visual estimation has high absolute accuracy but is significantly affected by illumination and occlusion, the fusion algorithm dynamically adjusts the weights based on the confidence levels of the two sensors: in the initial contact stage when the deviation is large, the force signal is strong and the confidence level is high, so the force weight is increased; in the later correction stage when the deviation is small, the force signal is weak and the visual features are clear, so the visual weight is increased. The fused posture deviation estimation result combines the dynamic response capability of force estimation with the absolute accuracy of vision, significantly improving the accuracy of deviation recognition.

[0113] In some embodiments, the method further includes: in the attitude correction state, the assembly actuator simultaneously operates a Cartesian space impedance control loop, the impedance control loop uses contact force as feedback to adjust the compliance of the end effector, and the attitude correction loop generates adjustment commands based on the deviation calculation results. The two loops work together through the force-position mapping relationship to achieve a compliant attitude correction process.

[0114] This embodiment adds a compliant assembly function that combines impedance control and attitude correction to the core method. The specific details are as follows: The system constructs a Cartesian space impedance control loop at the motion control layer of the assembly actuator. The impedance control loop establishes a virtual mass-spring-damping second-order dynamic model of the end effector, using the difference between the desired contact force and the actual contact force as input. The position correction of the end effector is calculated through the impedance model. The virtual mass, virtual stiffness, and virtual damping parameters are pre-set according to the workpiece material and assembly process, enabling the end effector to exhibit appropriate compliance characteristics: when the contact force exceeds the desired value, the end effector retracts along the direction of the force to avoid excessive contact force; when the contact force is lower than the desired value, the end effector returns to the desired position.

[0115] The attitude correction loop and the impedance control loop work together. The attitude correction loop generates the desired position and attitude command for attitude adjustment based on the deviation results calculated by force sensing. This command serves as the reference input for the impedance control loop. While tracking the reference command, the impedance control loop performs compliance correction on the reference trajectory based on the real-time contact force. The collaboration between the two loops is achieved through a force-position mapping: the attitude correction loop focuses on the attitude deviation of the shaft relative to the hole, eliminating the deviation by adjusting the end-effector attitude; the impedance control loop focuses on the magnitude of the contact force, ensuring that the contact force remains within a safe range through compliance adjustment. When attitude adjustment leads to an increase in contact force, the impedance control loop automatically retracts its end-effector to absorb the excess contact force; when the contact force is stable, the impedance control loop does not interfere with the normal execution of attitude correction.

[0116] During the coordinated control process, the system employs an adaptive adjustment mechanism for impedance parameters. Based on the magnitude of the current attitude deviation and the rate of change of the contact force, the virtual stiffness and virtual damping parameters are dynamically adjusted: in the coarse correction stage, when the deviation is large and the adjustment action is abrupt, the virtual stiffness is appropriately reduced and the virtual damping is increased to improve end-effector compliance and absorb impact; in the steady correction stage, when the deviation is small and the adjustment action is precise, the virtual stiffness is appropriately increased to ensure the accuracy of attitude adjustment. Through the synergy of impedance control and attitude correction, the system achieves efficient attitude alignment while ensuring the compliance and safety of the entire correction process, effectively preventing workpiece surface scratches and equipment overload.

[0117] In some embodiments, the method further includes: constructing a digital twin model of the shaft-hole assembly process, synchronously mapping the shaft posture, hole position and contact mechanical state of the physical assembly system in a virtual space, performing a virtual pre-correction simulation in the digital twin model before the physical system performs posture correction, verifying the effectiveness of the correction strategy and optimizing the correction parameters, and then mapping the optimized correction strategy to the physical system for execution.

[0118] This embodiment adds a digital twin-driven virtual pre-correction and real-time mapping function to the core method, as detailed below: The system constructs a digital twin model of the shaft-hole assembly process. The twin model comprises three layers: a geometric model, a physical model, and a behavioral model. The geometric model accurately reproduces the three-dimensional geometry and dimensional parameters of the assembled shaft, the hole to be assembled, the force sensing module, and the assembly actuator. The physical model integrates shaft-hole contact mechanics, rigid body dynamics, and friction models, capable of simulating the contact force distribution and torque transmission during inclined shaft contact. The behavioral model embeds the same attitude deviation recognition algorithm and correction control logic as the physical system, enabling the simulation of the complete attitude correction process. The twin model and the physical system achieve bidirectional data synchronization via a high-speed communication link. Sensor data from the physical system drives the real-time state updates of the twin model, and simulation results from the twin model can be sent back to the physical system to guide actual control.

[0119] Before the physical system performs attitude correction, the system first performs a virtual pre-correction simulation in a digital twin model. When the physical system detects that the shaft and hole have entered a contact state, it synchronizes the current contact force data, shaft attitude data, and hole position data to the twin model, ensuring that the twin model's state is completely consistent with the physical system. Subsequently, the system runs the attitude correction algorithm in the twin model, simulating the complete correction process and recording the contact force changes, adjustment steps, correction time, and final alignment accuracy during the correction process. The system can try various combinations of correction parameters in the twin model (such as different adjustment ratios, different correction step sizes, and different stage switching thresholds), and select the parameter combination with the optimal correction effect through simulation comparison.

[0120] After virtual pre-correction is completed, the system maps the optimized correction parameters and strategies to the physical system for execution. The physical system performs attitude correction according to the optimized parameters, while continuously synchronizing actual execution data to the twin model. The twin model compares the simulation prediction results with the actual execution results in real time. When the difference exceeds a preset range, the system determines that the physical system has unmodeled dynamics (such as changes in workpiece material, friction coefficient shifts, etc.), immediately triggering online parameter identification and model updates in the twin model. This realigns the twin model with the physical system, and the correction strategy is re-optimized based on the updated model. Through virtual pre-correction and real-time mapping of the digital twin, the system can verify and optimize the correction strategy before physical execution, significantly improving the first-time correction success rate. Simultaneously, the virtual-real comparison enables early detection and adaptive response to abnormal states of the physical system.

[0121] Please see Figure 3 As shown, Figure 3This is a schematic diagram of the structure of the shaft-hole attitude deviation identification and adaptive correction system 200 based on an assembly state machine provided in this application embodiment. The shaft-hole attitude deviation identification and adaptive correction system 200 based on an assembly state machine is used to execute the steps of the shaft-hole attitude deviation identification and adaptive correction method based on an assembly state machine shown in the above embodiments. The shaft-hole attitude deviation identification and adaptive correction system 200 based on an assembly state machine can be a single server or a server cluster, or it can be a terminal, such as a handheld terminal, a laptop computer, a wearable device, or a robot.

[0122] like Figure 3 As shown, the shaft and hole attitude deviation identification and adaptive correction system 200 based on assembly state machine includes: The correlation calculation unit 201 is used to collect the contact force data and contact torque data output by the force sensing device under the shaft-hole contact condition in the attitude correction state; and to perform numerical correlation calculation on the collected contact force data and contact torque data according to the shaft-hole two-point contact model. The instruction adjustment unit 202 is used to calculate the tilt angle and plane offset orientation of the assembly shaft relative to the hole body using the correlation calculation results of contact force and contact torque; and to generate motion adjustment instructions that match the posture correction requirements based on the calculated tilt angle and plane offset orientation. The deviation correction unit 203 is used to send motion adjustment commands to the assembly actuator, driving the actuator to complete the adaptive correction of the assembly shaft position deviation in the attitude correction state.

[0123] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the shaft and hole attitude deviation identification and adaptive correction system and its modules based on the assembly state machine described above can be referred to the corresponding content in the various embodiments of the shaft and hole attitude deviation identification and adaptive correction method based on the assembly state machine, and will not be repeated here.

[0124] The aforementioned method for identifying and adaptively correcting shaft and hole attitude deviations based on an assembly state machine can be implemented as a computer program. This computer program can be used in various applications such as... Figure 3 It runs on the system shown.

[0125] Please see Figure 4 , Figure 4 This is a schematic block diagram of the structure of a computer device provided in an embodiment of this application. The computer device includes a processor, a memory, and a network interface connected via a device bus, wherein the memory may include a storage medium and internal memory.

[0126] The storage medium can store operating devices and computer programs. The computer program includes program instructions that, when executed, cause the processor to perform any method for identifying and adaptively correcting shaft-hole attitude deviations based on an assembly state machine.

[0127] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0128] The internal memory provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor, it enables the processor to execute any method for identifying and adaptively correcting shaft and hole attitude deviations based on an assembly state machine.

[0129] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the terminal to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0130] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0131] In one embodiment, the processor is configured to run a computer program stored in memory to perform the following steps: Under the attitude correction state, the contact force data and contact torque data output by the force sensing device under the shaft-hole contact condition are collected; numerical correlation calculations are performed on the collected contact force data and contact torque data according to the shaft-hole two-point contact model; The tilt angle and plane offset orientation of the assembly shaft relative to the hole are calculated using the correlation calculation results of contact force and contact torque; motion adjustment commands matching the attitude correction requirements are generated based on the calculated tilt angle and plane offset orientation. The motion adjustment command is sent to the assembly actuator, which drives the actuator to complete the adaptive correction of the assembly shaft position deviation in the attitude correction state.

[0132] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the steps of the shaft-hole attitude deviation identification and adaptive correction method based on an assembly state machine as provided in any embodiment of this application.

[0133] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.

[0134] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for identifying and adaptively correcting shaft and hole attitude deviations based on an assembly state machine, characterized in that, An assembly state machine is used to configure attitude correction states, the method comprising: In the attitude correction state, the contact force data and contact torque data output by the force sensing device under the shaft-hole contact condition are collected, and the assembly shaft is controlled to search along the helical trajectory in the horizontal plane, and the end position data is collected synchronously. Differential tracking processing is performed on the contact force data to obtain the rate of change of contact force. Based on the rate of change of contact force, the abrupt change in the contact state of the assembly shaft passing through the hole edge is identified, and statistical processing is performed on the end position data to estimate the reference position of the hole center. The attitude deviation of the assembly shaft is determined based on the positional deviation between the current end position and the reference position of the hole center. Based on the positional deviation and contact force data, a motion adjustment command matching the attitude correction requirements is generated. The motion adjustment command is sent to the assembly actuator to drive the actuator to complete the adaptive correction of the assembly shaft's positional deviation in the attitude correction state.

2. The method according to claim 1, characterized in that, The step of identifying abrupt changes in the contact state of the assembled shaft through the hole edge and estimating the reference position of the hole center under attitude correction includes: Control the assembly shaft to move along a spiral trajectory with gradually increasing radius in the horizontal plane, and simultaneously collect end position data and contact force data during the search process; The contact force data is processed by differential tracking to obtain the rate of change of the contact force. When the contact force is lower than the preset contact threshold and the rate of change of the contact force is negative, it is determined that the assembly shaft has passed the hole edge. The end position data collected during the search process are statistically averaged to estimate the reference position of the hole center.

3. The method according to claim 1, characterized in that, The method of determining the attitude deviation of the assembled shaft based on the deviation between the current end position and the reference position of the hole center includes: Read the estimated reference position of the hole center and calculate the positional deviation between the current end position and the reference position of the hole center; When the position deviation exceeds the preset deviation threshold, it is determined that there is an attitude deviation in the assembly shaft; the attitude correction direction is determined based on the collected contact force data and contact torque data, and the corresponding attitude correction amount is generated through admittance control to make a slight adjustment to the assembly shaft.

4. The method according to claim 1, characterized in that, The step of generating motion adjustment commands that match the posture correction requirements based on position deviation and contact force data includes: The planar translation adjustment amount of the shaft is determined based on the contact force data, and the attitude rotation adjustment amount of the shaft is determined based on the contact torque data. The rotation adjustment amount and translation adjustment amount are converted into motion trajectory parameters that can be recognized by the assembly actuator, and corresponding motion adjustment commands are generated.

5. The method according to claim 1, characterized in that, The step of sending motion adjustment commands to the assembly actuator and driving the actuator to complete adaptive correction of assembly shaft attitude deviation in attitude correction state includes: The motion adjustment command is transmitted in real time to the motion control unit of the assembly actuator, which controls the actuator to simultaneously complete the attitude rotation adjustment and planar translation adjustment; force sensing data during the adjustment process is collected to verify the attitude deviation correction effect.

6. The method according to claim 1, characterized in that, The method further includes: Store the attitude deviation data and corresponding correction execution data for each attitude correction state to construct an attitude correction sample dataset; train the deviation correction prediction model based on the sample dataset, and before the attitude correction state enters under subsequent contact conditions, call the prediction model to output pre-adjustment parameters to control the actuator to complete the initial attitude pre-correction in advance.

7. The method according to claim 1, characterized in that, The method further includes: The rate of change of contact force data is monitored in real time during attitude correction. When the rate of change exceeds the preset threshold, it is determined that there is a risk of abnormal contact. The current attitude correction action is paused, and the attitude deviation calculation and correction process is re-executed until the rate of change of contact force falls back to the threshold range.

8. The method according to claim 1, characterized in that, The method further includes: The convergence data of attitude deviation calculation results are collected in real time. Different correction stages are divided within the attitude correction state according to the convergence interval of the deviation. The deviation calculation accuracy threshold and correction step size parameters corresponding to each stage are matched, and the accuracy and execution speed of attitude correction are dynamically adjusted as the attitude correction process progresses.

9. The method according to claim 1, characterized in that, The method further includes: After exiting the attitude correction state, the final attitude deviation data and the contact force and contact torque data throughout the process are read to determine the attitude correction effect level. The corresponding deviation data and correction data that do not meet the effect level are marked as abnormal samples. The relevant threshold parameters for hole position feature estimation and attitude deviation judgment are updated in reverse to complete the self-calibration optimization of the parameters.