Workpiece mounting method and electronic device
Patent Information
- Application Number
- CN202611108468.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-08-28
AI Technical Summary
[0004]本申请提供了一种工件安装方法及电子设备,以至少解决相关技术中因仅在安装工具接触工件前进行静态预定位而无法应对接触后工件发生的动态形变与滑移、导致安装瞬间实际对位位置产生偏差从而影响装配质量的问题
[0007] This application enables the simultaneous sensing of actual offset and contact force during the contact process between the installation tool and the workpiece. It also utilizes a predictive model to output the predicted offset in the future time domain in advance. Based on the predicted offset and the actual offset, the compensation offset is determined and a motion trajectory is generated. This achieves a leap from static pre-positioning before contact to dynamic compensation during contact, eliminating the alignment deviation caused by the dynamic deformation of the workpiece during installation and improving the assembly quality.
Smart Images

Figure CN122653104A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of workpiece mounting technology, and in particular to a workpiece mounting method and electronic device. Background Technology
[0002] As industrial products become increasingly sophisticated and assembly processes become more complex, the installation alignment compensation in related technologies employs static visual pre-positioning before the installation tool contacts the workpiece. This requires visual photography, deviation calculation, and coordinate correction of the installation tool before contact, with the entire process planned and executed manually for each compensation step.
[0003] However, the static pre-positioning of related technologies cannot cope with the micro-deformation and slippage of the workpiece after contact, and lacks the ability to perceive and adaptively adjust the dynamic changes in the contact process. This means that the actual alignment position may still deviate at the moment of installation, thus affecting the assembly quality. Summary of the Invention
[0004] This application provides a workpiece mounting method and electronic device to at least solve the problem in the related art that the static pre-positioning before the mounting tool contacts the workpiece cannot cope with the dynamic deformation and slippage of the workpiece after contact, resulting in deviation of the actual alignment position at the moment of installation and thus affecting the assembly quality.
[0005] This application provides a workpiece mounting method, including: Obtain the actual offset sequence of the workpiece relative to the installation tool and the contact force sequence between the installation tool and the workpiece when the installation tool comes into contact with the workpiece to be assembled. The contact force sequence is input into the prediction model to obtain the predicted offset sequence of the workpiece to be assembled relative to the installation tool in the future time domain; Based on the predicted and actual offset sequences, determine the compensation offset sequence in the future time domain; Based on the compensated offset sequence, the motion trajectory of the installation tool in the future time domain is generated, so as to drive the installation tool to perform installation operations according to the motion trajectory.
[0006] This application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described workpiece mounting methods.
[0007] This application enables the simultaneous sensing of actual offset and contact force during the contact process between the installation tool and the workpiece. It also utilizes a predictive model to output the predicted offset in the future time domain in advance. Based on the predicted offset and the actual offset, the compensation offset is determined and a motion trajectory is generated. This achieves a leap from static pre-positioning before contact to dynamic compensation during contact, eliminating the alignment deviation caused by the dynamic deformation of the workpiece during installation and improving the assembly quality. Attached Figure Description
[0008] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 A schematic flowchart illustrating the first workpiece mounting method provided in the embodiments of this application; Figure 2 A flowchart of the second workpiece mounting method provided in the embodiments of this application; Figure 3 A flowchart illustrating the third workpiece mounting method provided in this application embodiment; Figure 4 This is a schematic diagram of a specific workpiece mounting system provided in an embodiment of this application; Figure 5 A schematic diagram illustrating the implementation process of an online digital copy construction and update module 200 in a specific workpiece installation system provided in this application embodiment; Figure 6 This is a schematic diagram of a workpiece mounting device provided in an embodiment of this application. Detailed Implementation
[0010] 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, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0011] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0012] As industrial products become increasingly sophisticated and assembly processes become more complex, the requirements for installation accuracy are becoming increasingly stringent. In related technologies, installation alignment compensation commonly employs a static visual pre-positioning scheme before the installation tool contacts the workpiece. This involves acquiring the workpiece position via visual imaging before contact, calculating its deviation from the theoretical position, and correcting the coordinates of the installation tool accordingly. The tool then descends to perform the installation operation. However, this technology relies on visual data acquisition before the tool contacts the workpiece. When the tool actually contacts the workpiece and applies installation force, the workpiece undergoes microscopic deformation and positional slippage due to the force. This physical phenomenon, occurring in real-time during installation, is not included in the compensation calculation. Consequently, static pre-positioning cannot cope with the dynamic deformation after contact, and the actual alignment position at the moment of installation may still deviate.
[0013] Taking welding as an example, in automated welding production lines, when the welding head presses down to contact a flexible circuit board, the microscopic deformation and positional slippage of the circuit board caused by the force are difficult to predict. This directly leads to the weld point deviating from the predetermined position, affecting the reliability of the connection. Related technologies generally employ vision-based pre-positioning methods: a vision camera takes pictures of the circuit board pads before the welding head contacts them, calculating the deviation between the current position and the theoretical position; the control system uses this deviation to drive the robot to move the welding head to the compensated coordinates; the welding head then descends to perform the welding operation. However, because the visual data relied upon for position compensation is acquired before the welding head contacts the circuit board, the dynamic deformation and slippage of the circuit board when the welding head actually presses down are not included in the compensation calculation. This means that the actual alignment position at the moment of welding may still deviate, thus affecting the welding quality.
[0014] To address the shortcomings of the aforementioned related technologies, this application simultaneously acquires the actual offset sequence and contact force sequence during the contact process between the installation tool and the workpiece. It then uses a prediction model pre-built based on historical data to predict the offset trend in the future time domain. The predicted offset is then fused with the actual offset to determine the compensation offset. Finally, based on the compensation offset, an optimal motion trajectory that satisfies physical motion constraints is generated and the installation tool is driven to perform the installation operation. This achieves a leap from static pre-positioning before contact to dynamic prediction and compensation during contact, eliminating the alignment deviation caused by the dynamic deformation of the workpiece during installation and improving the installation quality and yield of precision assembly.
[0015] It is understood that this application is not only applicable to welding scenarios, but can also be extended to various precision assembly scenarios that require overcoming microscopic deformation or slippage of the contact pair, such as chip mounting, precision bearing pressing, and high-precision thread tightening. These are not limited in the embodiments of this application.
[0016] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0017] Figure 1 This is a schematic flowchart illustrating the first workpiece mounting method provided in an embodiment of this application. Figure 1 As shown, the method includes the following steps: Step 101: Obtain the actual offset sequence of the workpiece to be assembled relative to the installation tool and the contact force sequence between the installation tool and the workpiece to be assembled when the installation tool comes into contact with the workpiece to be assembled.
[0018] In some embodiments, an installation tool refers to an actuator used to perform installation operations, apply installation force to the workpiece to be assembled, and adjust its position / attitude.
[0019] In this application, the mounting tool is an end effector capable of moving and applying force in three-dimensional space, such as a welding head (welding scenario), a placement head (chip placement scenario), a pressing head (precision bearing pressing scenario), or a tightening shaft (high-precision thread tightening scenario) in an automated production line. The mounting tool integrates an image acquisition device and a force sensing device, enabling it to simultaneously sense the actual positional offset of the workpiece and the contact force it receives during contact with the workpiece. Simultaneously, the mounting tool is equipped with a micro-motion actuator (such as a piezoelectric ceramic actuator or a voice coil motor), which can achieve high-frequency, high-precision position compensation at the microscale based on the optimized motion trajectory generated in this application. This dynamically tracks the deformation and slippage of the workpiece caused by the force, ensuring that the tool center point of the mounting tool is aligned with the target feature point of the workpiece in real time.
[0020] The workpiece to be assembled refers to the target object that needs to be installed, i.e., the object to which the installation tool operates. In this application, the workpiece to be assembled refers to various precision components that will undergo microscopic deformation or positional slippage due to force during the installation process, such as circuit boards in welding scenarios (pads are the installation feature parts), substrates or chips in chip mounting scenarios (mounting positions are the installation feature parts), pressed parts in precision pressing scenarios (pressing surface positioning marks are the installation feature parts), or connected parts in thread tightening scenarios (the center of the threaded hole is the installation feature part). The workpiece to be assembled has one or more pre-set target feature points (e.g., the center point of the feature pattern on the circuit board pads) to characterize the installation position. This application continuously tracks the spatial position of the target feature point in the coordinate system of the installation tool through visual perception and model prediction to achieve dynamic alignment and installation error compensation during the contact process.
[0021] The actual offset sequence is a collection of the three-dimensional spatial offsets of the workpiece target feature points relative to the tool center point at each moment in chronological order throughout the entire process of contact between the installation tool and the workpiece. It reflects the actual displacement trajectory of the workpiece during the contact process.
[0022] The contact force sequence is the collection of axial forces applied to the workpiece by the installation tool at each moment in chronological order throughout the entire process of contact between the installation tool and the workpiece. It is the direct physical driving force for workpiece deformation and slippage, and also a key input to subsequent prediction models.
[0023] Step 102: Input the contact force sequence into the prediction model to obtain the predicted offset sequence of the workpiece to be assembled relative to the installation tool in the future time domain.
[0024] In some embodiments, this application establishes a mathematical model of the transmission law from contact force to position offset using historical data. When the contact force at the current moment is collected and input into the prediction model, the prediction model can calculate its future trend in advance before the actual deformation occurs, thereby reserving a time window for adjusting the posture of the installation tool in advance, fundamentally solving the problem of lag in correcting the deformation after it occurs.
[0025] The predictive model is a mathematical model built based on historical data to characterize the dynamic relationship between workpiece offset and contact force. In other words, workpieces of the same type will exhibit similar deformation patterns under the same stress conditions, and this model is a formal expression of this pattern.
[0026] The future time domain refers to a continuous time interval in the future, starting from the current moment. In this application, it typically covers a time range of tens of milliseconds in the future. The length of this time domain needs to be long enough to cover system response delays (visual processing delays, communication delays, actuator mechanical response delays) and to allow sufficient lead time for planning compensation trajectories. At the same time, it should not be too long to avoid exceeding the effective prediction range of the prediction model. In the embodiments of this application, no such limitation is imposed.
[0027] The predicted offset sequence is a set of predicted offset values of the workpiece relative to the mounting tool at each time point in the future time domain, arranged chronologically. It represents the system's forward-looking judgment on where the workpiece is expected to offset next.
[0028] The prediction model employs an Autoregressive model with eXogenous input (ARX model). This model establishes the mathematical relationship between the current position offset and historical position offsets and historical contact forces. Its standard form can be expressed as:
[0029] In the formula, Represents the discrete-time index; Δx(k) represents the offset at time k; F(k) represents the contact force at time k; and These represent the model order; and These are the model parameters to be identified; This represents the modeling error.
[0030] Before the prediction model is executed (i.e., when the system runs for the first time or switches to a new workpiece model), this application first enters the model building stage to train a prediction model adapted to the workpiece type. Historical actual offset sequences and historical contact force sequences collected during the historical installation process of multiple historical assembled workpieces with the same workpiece model (also known as workpiece type) are obtained. Using the historical contact force sequence as input and the historical actual offset sequence as output, the least squares method (a parameter estimation method that determines the optimal parameters of the ARX model by minimizing the sum of squared prediction errors on historical data, thus achieving the best fit on historical data) is used to train the model parameters of the aforementioned ARX model (i.e., the model to be trained). and Estimate the model parameters to minimize the sum of squared prediction errors on historical data, thereby solving for an optimal set of model parameters. and This set of parameters defines a predictor that can predict future position shifts based on known force sequences and historical locations. .
[0031] After parameter identification is completed, an initial contact dynamic prediction model for this type of workpiece is obtained. This model encapsulates the dynamic mapping relationship from force to position displacement.
[0032] After the model is built, the online prediction phase begins. At each moment, the currently collected contact force sequence (including force values at the current moment and several previous moments) is input into the trained prediction model. Based on the changing trend of the current force value, the model recursively calculates the offset at each moment in the future time domain, i.e., the predicted offset sequence.
[0033] Furthermore, the prediction model of this application also has the ability to continuously evolve. That is, after the installation of each workpiece is completed, the actual collected data (contact force sequence and actual offset sequence) of the workpiece is added to the training set as a new sample. The model parameters are finely adjusted by using the gradient descent method with a limited step size, so that the model can slowly adapt to the gradual changes in material properties, ambient temperature drift and other slow-changing factors during the production process, and become more and more accurate with use.
[0034] Step 103: Determine the compensation offset sequence in the future time domain based on the predicted offset sequence and the actual offset sequence.
[0035] In some embodiments, the compensation offset sequence is a set of offsets determined by the system at various points in time, arranged chronologically within the future time domain, to drive the installation tool for compensation motion. It can be a predicted offset sequence (when the model prediction is accurate), an actual offset sequence (when the model prediction is inaccurate), or a mixture of both.
[0036] In some embodiments, the obtained actual offset sequence is compared with the obtained predicted offset sequence time-by-time, and the following decision logic is executed for each time in the future time domain: Calculate the difference between the predicted offset at that moment and the actual offset at that moment (i.e., the offset difference), and compare the difference with a preset confidence threshold.
[0037] The confidence threshold is a pre-defined allowable deviation range, which can be determined based on the historical prediction accuracy of the prediction model, and is not limited in this embodiment. It is a critical deviation value used to determine whether the prediction offset is sufficiently reliable.
[0038] If the difference is less than the confidence threshold, it indicates that the current prediction model's prediction result for that moment is sufficiently accurate and reliable. In this case, the prediction offset at that moment is determined as the compensation offset for that moment. If the difference is greater than or equal to the confidence threshold, it indicates that the actual situation at the current moment may exceed the model's prediction capability (e.g., abnormal local deformation of the workpiece or interference from foreign objects). In this case, to ensure the robustness of the system, the actual offset at that moment is determined as the compensation offset for that moment.
[0039] After performing the above decision for each moment in the future time domain, the compensation offsets at each moment are arranged in chronological order to obtain the compensation offset sequence in the future time domain.
[0040] This application compares the actual offset with the predicted offset time-by-time. When they match, the prediction is accurate, and the system can rely on the advanced prediction for feedforward compensation, thus achieving a zero-latency response. When they do not match, the prediction may be unreliable, and the system promptly switches to the actual offset for compensation, ensuring that it can still act based on real information even in the worst-case scenario. This strategy leverages the foresight of prediction while preserving the authenticity of actual measurements.
[0041] Step 104: Generate the motion trajectory of the installation tool in the future time domain based on the compensation offset sequence, so as to drive the installation tool to perform the installation operation according to the motion trajectory.
[0042] In some embodiments, the motion trajectory includes an optimized trajectory point sequence, which refers to the set of expected positions of the installation tool in three-dimensional space at each moment in chronological order within the future time domain. It is the result of solving the optimization problem and represents the complete path planning of how the installation tool should move to best complete the compensation task.
[0043] This application uses the compensation offset sequence as a reference trajectory and combines it with the real-time motion state of the installation tool (including current position, speed, and acceleration). The desired position defined by the compensation offset sequence is used as the tracking target, and the speed limit, acceleration limit, and workspace boundary of the installation tool are used as physical constraints. By minimizing the comprehensive cost function composed of the weighted sum of the tracking error term and the motion smoothness term, an optimal motion trajectory is generated that can accurately track the desired position and ensure smooth and gentle motion while satisfying the physical constraints. Moreover, this solution process is executed in a rolling manner in each control cycle so that the motion trajectory is updated in real time with the dynamic deformation of the workpiece.
[0044] Furthermore, after obtaining the motion trajectory, this application can also generate a reference motion curve based on the motion trajectory; obtain real-time position feedback of the installation tool; determine a feedforward control quantity based on the reference motion curve; determine a feedback control quantity based on the deviation between the real-time position feedback and the reference motion curve; superimpose the feedforward control quantity and the feedback control quantity to generate a drive signal; and drive the installation tool to move along the motion trajectory according to the drive signal to perform the installation operation.
[0045] Specifically, this application uses an optimized trajectory point sequence to generate a continuous and highly differentiable reference motion curve between adjacent trajectory points using a high-order interpolation algorithm. Simultaneously, a position sensor (e.g., a linear encoder or laser interferometer) mounted on the installation tool acquires real-time feedback on the tool's actual position. The control loop combines feedforward and feedback control: the feedforward section directly outputs an ideal control quantity based on the reference motion curve, providing a basis for rapid response; the feedback section uses the deviation between the actual position and the reference position as input, generating a corrective control quantity through a proportional-integral-derivative (PID) controller to suppress deviations caused by model errors and external disturbances. The feedforward and feedback control quantities are superimposed in each control sub-cycle to form the final drive signal, driving the installation tool to move along the optimized trajectory point sequence, maintaining precise alignment with the workpiece throughout the movement, thereby completing the installation operation.
[0046] The key advantage of this composite control strategy lies in the fact that feedforward control can respond to known motion commands in advance, significantly reducing the system's tracking lag; while feedback control can suppress deviations caused by model errors, external disturbances, or actuator nonlinear characteristics in real time, ensuring the system's stability and robustness. The entire control loop operates at a speed much higher than the trajectory planning frequency, ensuring that even during highly dynamic compensation processes, the actual movement of the welding head closely follows the planned ideal trajectory.
[0047] Understandably, this application continuously operates the aforementioned high-speed control closed loop throughout the entire pressure maintenance period during workpiece installation. This application can drive the installation tool to move with nanometer-level precision along a calculated dynamic motion trajectory that balances accuracy and smoothness. This motion trajectory ensures that the installation tool (welding tip) maintains a preset, precise relative positional relationship with the workpiece (pad center point) that is drifting due to force.
[0048] In summary, this application achieves real-time sensing, forward prediction, and adaptive compensation of installation errors caused by micro-deformation due to contact force during contact by simultaneously collecting actual offset sequences and contact force sequences during the contact process between the installation tool and the workpiece. It utilizes a prediction model built based on historical data to make forward predictions of future offset trends in the time domain, compares the predicted offset with the actual offset at time-by-time thresholds, and makes adaptive decisions to determine the compensation offset sequence. It also generates the optimal motion trajectory that satisfies physical motion constraints while taking into account tracking accuracy and motion smoothness, and drives the installation tool to perform the installation operation. Compared with the static pre-positioning scheme before contact, this application significantly improves the alignment accuracy, connection reliability, and overall yield of the precision installation process.
[0049] Figure 2 A flowchart of the second workpiece mounting method proposed in this application is further shown. Based on Figure 1 The illustrated embodiment further explains step 101. Figure 2 This may include the following steps.
[0050] Step 201: If the pressure value of the installation tool is detected to be greater than or equal to a preset pressure threshold, it is determined that the installation tool is in contact with the workpiece to be assembled.
[0051] In some embodiments, this application can obtain the actual offset sequence and contact force sequence of the installation tool during the tool installation process through a multimodal contact process sensing module.
[0052] Physically, the multimodal contact process sensing module includes a sensor integration base rigidly mounted on the side of the installation tool. Two key sensors are fixed on the base: one is a one-dimensional miniature piezoelectric force sensor with its sensing surface perpendicular to the welding head axis, used to measure the axial pressure applied by the welding head; the other is a megapixel-level industrial miniature camera, paired with a fixed-focal-length macro lens. Its optical axis forms a known fixed angle of 30° to 60° with the welding head axis to ensure its field of view clearly covers the tip of the welding head and the workpiece area directly below it. The camera and force sensor are connected to the same synchronous acquisition card via internal module circuitry. This acquisition card uses a highly stable crystal oscillator to provide a unified clock reference, ensuring strict time synchronization between image data and force data.
[0053] Before the system is officially put into operation, two calibration tasks need to be completed in advance. The first is camera calibration: using a precision checkerboard calibration board with known side lengths, the installation tool is controlled to drive the camera to acquire no less than a predetermined number of calibration board images from at least three different directions. By solving the projection relationship between the pixel coordinates of the corner points in each image and their known three-dimensional coordinates in the calibration board coordinate system, the intrinsic parameter matrix of the camera (including focal length, principal point coordinates, and distortion parameters) and the extrinsic parameter matrix corresponding to each image are obtained. At the same time, the fixed transformation matrix from the camera coordinate system to the installation tool coordinate system is calculated through hand-eye calibration. The second is force sensor zero-point calibration: with the installation tool in an unloaded state, the output voltage value of the force sensor is recorded as the zero-point offset.
[0054] When the installation tool begins to press down and the reading of the force sensor is detected to reach or exceed the preset contact threshold for the first time, the system determines that the installation tool has made contact with the workpiece to be assembled. Then, the camera and force sensor are simultaneously triggered to start high-speed acquisition and begin to acquire the actual offset sequence and contact force sequence during the contact process.
[0055] Specifically, taking a welding scenario as an example, two calibration steps must be completed before the system begins the welding process. The first step is camera calibration. A precise two-dimensional checkerboard calibration plate with a known side length d is used. The welding head is controlled to drive the camera to take N (N≥10) images of the calibration plate from at least three different angles. Let the pixel coordinates of the j-th corner point on the calibration plate in the i-th image be... Its corresponding world coordinate system (set on the calibration plate) coordinates are The camera's intrinsic parameter matrix can be obtained by solving the least-squares solution of the following projection equation. and the extrinsic parameter matrix of each image :
[0056] Where s is the scale factor; K includes the focal length, principal point coordinates, and distortion parameters.
[0057] Simultaneously, using a hand-eye calibration method, the fixed transformation matrix from the camera coordinate system to the welding head tool coordinate system is calculated. The second step is force sensor zero-point calibration. With the welding head unloaded, the sensor's output voltage value is recorded as the force zero-point offset. .
[0058] When the welding head begins to press down and the force sensor reading first exceeds the contact threshold, At that time, the system determines that contact has begun.
[0059] Step 202: Obtain at least one frame image of the workpiece to be assembled when the installation tool contacts it, and the pressure value corresponding to each frame image in the at least one frame image.
[0060] In some embodiments, after the system determines that the installation tool has come into contact with the workpiece to be assembled, it simultaneously triggers the image acquisition device and the force sensing device to start high-speed acquisition. Let the acquisition time sequence be... At each data collection moment Under the control of a unified clock reference, the synchronous acquisition card ensures that a frame of image and a force sensing signal are captured at the same time, thereby obtaining at least one frame of image of the workpiece to be assembled when the installation tool contacts the workpiece to be assembled, as well as the pressure value corresponding to each frame of image. This achieves a one-to-one correspondence between visual data and force data in the time domain, providing a time-aligned data basis for subsequent determination of the actual offset sequence and contact force sequence.
[0061] Step 203: Based on each frame image, obtain the actual offset sequence, and based on the pressure value corresponding to each frame image, obtain the contact force sequence.
[0062] In some embodiments, the specific process of obtaining the actual offset sequence based on each frame image is as follows: For each frame of image acquired synchronously The processing objective is to calculate the offset of the pad feature center relative to the tip of the solder head in three-dimensional space. First, the distortion coefficients obtained from calibration are used to analyze the original image. Geometric correction is performed to eliminate imaging errors introduced by lens distortion, resulting in a distortion-free image. k In distortion-free images, two types of features need to be identified: one is the set of visual markers inherent on the mounting tool. The three-dimensional coordinates of these marker points in the coordinate system of the installation tool have been pre-calibrated; the other type is the target feature points on the workpiece to be assembled. (For example, the center point of a feature pattern on a circuit board pad).
[0063] For the set of marker points on the installation tool, a template matching algorithm based on gray-level gradients is used in the distortion-free image. k Detect its actual pixel coordinates Since the 3D model coordinates of these marker points and their 2D observations in the image are known, the real-time pose (including the rotation matrix) of the mounting tool coordinate system relative to the camera coordinate system at the current moment can be estimated by solving the perspective N-point (PnP) problem (i.e., under the optimization criterion of minimizing reprojection error). Translation vector This process reprojects the 3D model coordinates onto the image plane and continuously adjusts the pose estimate until the error between the reprojected position and the actual observation position is minimized, thereby obtaining the precise spatial transformation relationship between the installation tool coordinate system and the camera coordinate system at the current moment. Right now
[0064] in, This function represents the projection of three-dimensional coordinates onto a two-dimensional image plane via the intrinsic parameter matrix K.
[0065] For the target feature points on the workpiece to be assembled Its design position is in the coordinate system of the workpiece. Given that the initial pose of the workpiece on the mounting fixture has been determined by a pre-calibrated transformation matrix... Confirmed. Taking the welding scenario as an example, assuming that the circuit board only undergoes local elastic deformation under welding pressure while the overall rigid body pose remains approximately unchanged, the target feature point is transformed from the workpiece coordinate system to the world coordinate system through a coordinate system chain transformation, and then transformed back to the camera coordinate system through a transformation matrix from the camera coordinate system to the world coordinate system. Thus, the theoretical spatial coordinates of the target feature point in the camera coordinate system can be obtained.
[0066] In the formula, This is the transformation matrix from the camera coordinate system to the world coordinate system, obtained through global system calibration.
[0067] Subsequently, the theoretical coordinates are projected onto the image plane using camera intrinsic parameters to obtain the expected pixel coordinate region. Within this region, a sub-pixel precision edge detection algorithm is used to accurately locate the target feature points. The actual observed coordinates in the distortion-free image. Using these actual observed coordinates and camera intrinsic parameters, combined with the known 3D coordinates of the target feature point in the world coordinate system, the more accurate spatial coordinates of the point in the camera coordinate system at the current moment are calculated using the triangulation principle.
[0068] At this point, the real-time transformation relationship between the installation tool coordinate system and the camera coordinate system has been obtained. and target feature points Precise spatial coordinates in the camera coordinate system. Transform the coordinates of the target feature point from the camera coordinate system to the mounting tool coordinate system, i.e., the coordinates of the target feature point in the u-mounting tool coordinate system. for: Since the center point of the installation tool (such as the tip of the welding head) is defined as the origin (0, 0, 0) of the installation tool coordinate system, the spatial coordinates of the target feature point obtained after transformation in the installation tool coordinate system are the actual offset of the workpiece to be assembled relative to the installation tool at that moment (i.e., the positional deviation in each direction of three-dimensional space). ).
[0069] By repeating the above process for each frame of the image, the actual offset of each frame can be obtained, and the actual offset sequence can be formed by arranging them in time sequence.
[0070] In some embodiments, the specific process of obtaining the contact force sequence based on the pressure value corresponding to each frame image is as follows: The force sensor is used to obtain the pre-calibrated zero-point offset when the installation tool is unloaded. For the pressure value (i.e., the raw voltage signal of the force sensor) acquired at the corresponding moment of each frame, the pressure value is first converted from analog to digital and then the zero-point offset is subtracted to eliminate the systematic error introduced by the sensor's zero drift; then the difference is multiplied by a pre-calibrated force value calibration coefficient. The instantaneous contact force value at that moment is obtained. ,Right now The above processing is performed on the pressure values corresponding to each frame of the image one by one to obtain the contact force values at each moment. These values are then arranged in chronological order to form a contact force sequence, which corresponds strictly one-to-one with the aforementioned actual offset sequence in the time dimension.
[0071] Ultimately, this application will include a precise timestamp. offset vector The instantaneous contact force value was collected and calculated simultaneously. Encapsulation is performed to form multimodal synchronization data packets. The data packet includes the actual offset sequence and the contact force sequence: .
[0072] In summary, this application ensures the accuracy of visual and force perception data through pre-completed camera calibration and force sensor zero-point calibration. When the installation tool comes into contact with the workpiece to be assembled, synchronous acquisition is triggered by a preset pressure threshold, ensuring strict alignment of image and force data in the time domain. Furthermore, distortion correction, mark point and target feature point extraction, PnP pose calculation, and coordinate transformation are performed on each frame of synchronously acquired images to obtain the actual offset at each moment and form an actual offset sequence. At the same time, zero-point compensation and calibration coefficient conversion are performed on the synchronously acquired pressure values to obtain a corresponding contact force sequence, thus providing an accurate, reliable, and time-aligned multimodal data foundation for subsequent prediction and compensation.
[0073] Figure 3 A flowchart of the third workpiece mounting method proposed in this application is further shown. Based on Figure 1 The illustrated embodiment further explains step 104. Figure 3 This may include the following steps.
[0074] Step 301: Obtain the motion status of the installation tool.
[0075] In some embodiments, at the beginning of each control cycle, the current motion state of the installation tool, including its current position, current velocity, and current acceleration, is obtained by a sensing feedback device (such as a grating ruler or a laser interferometer) installed on the installation tool, as initial state information for subsequent trajectory planning and optimization.
[0076] The control cycle refers to the cycle in which the trajectory planning module performs optimization and solution each time. It is the complete process from obtaining the current motion state and compensation offset sequence, constructing the optimization problem, solving it, to outputting a complete set of optimized trajectory point sequences in the future time domain. It is repeated at preset time intervals so that the motion trajectory is continuously updated as the workpiece deformation state changes.
[0077] Step 302: Based on the motion state, the compensation offset sequence, and the physical motion constraints of the installation tool, with the goal of minimizing the comprehensive cost function, generate an optimized trajectory point sequence that satisfies the optimization objective and physical motion constraints in the future time domain, so as to determine the optimized trajectory point sequence as the motion trajectory.
[0078] In some embodiments, the compensated offset sequence is used as a reference trajectory to determine the desired position of the installation tool at various times in the future time domain (denoted as...). Where k represents the current time and i represents the future prediction step size), it serves as the tracking objective of the optimization problem; the planned position at each time step based on the desired position and the planned trajectory of the installation tool (denoted as...). ), determine the tracking error term.
[0079] The tracking error term is defined as:
[0080] in, Represented by a positive definite weight matrix The weighted square of the Euclidean norm is used to weigh the importance of errors in different directions.
[0081] Then, based on the acceleration changes at each moment of the planned trajectory, the motion smoothness term is determined.
[0082] set up To plan acceleration, the smoothness term is defined as a penalty for changes in acceleration:
[0083] Among them, the weight matrix Adjust the severity of the penalty for sudden motion changes. Increase The value of will prompt the optimizer to generate trajectories with slower and gentler acceleration changes.
[0084] Construct a comprehensive cost function based on the tracking error term and the motion smoothness term. Under physical motion constraints, the planned trajectory that minimizes the comprehensive cost function is obtained, leading to the optimal trajectory point sequence in the future time domain. The aforementioned physical motion constraints include velocity constraints. acceleration constraints and workspace boundary constraints Furthermore, the system's dynamic model It also serves as an equality constraint.
[0085] To accommodate the varying requirements for accuracy and smoothness at different installation stages, the weight matrices Q and R are not fixed but dynamically adjusted by the embedded strategy scheduler based on the stage of the installation process. For example, in the initial stage where rapid response is required, the relative weight of Q is increased to prioritize tracking accuracy, while in the installation stage where extreme stability is required, the weight of R is increased to prioritize motion smoothness.
[0086] After solving the aforementioned constrained optimization problem in each control cycle, a sequence of optimized trajectory points (composed of discrete, equally timed 3D position points) is output in the future time domain. This sequence is sent to the actuator control module in real time. Furthermore, the above solution process is executed continuously in each control cycle, meaning that the optimal trajectory in the future time domain is recalculated in each cycle based on the latest motion state and compensation offset sequence. This ensures that the motion trajectory is continuously updated as the workpiece dynamically deforms, thereby guaranteeing that the installation tool maintains high-precision dynamic tracking of the workpiece target position throughout the entire installation process.
[0087] In summary, this application uses the real-time motion state of the installation tool in each control cycle as the initial condition for optimization, and uses the compensation offset sequence as the reference trajectory to construct a comprehensive cost function consisting of a weighted sum of tracking error and motion smoothness terms. Under physical constraints such as velocity, acceleration, and workspace boundaries, the optimal planned trajectory is solved. Simultaneously, the strategy scheduler dynamically adjusts the weight matrix according to the installation stage to adapt to the differentiated requirements for accuracy and stability at different stages. Through rolling solutions in each control cycle, the motion trajectory is continuously updated with the dynamic deformation of the workpiece. This achieves high-precision tracking and smooth, stable compensation motion of the workpiece's dynamic deformation while meeting the physical performance limits of the installation tool. It avoids mechanical vibration and damage to installation quality caused by sudden trajectory changes, further ensuring the reliability and consistency of precision installation.
[0088] Furthermore, for ease of understanding, such as Figure 4 As shown, this application provides a structural schematic diagram of a specific workpiece mounting system.
[0089] Reference Figure 4 The system includes a multimodal contact process sensing module 100, an online digital copy construction and update module 200, an adaptive compensation instruction generation module 300, and a high-frequency dynamic actuator control module 400.
[0090] The multimodal contact process sensing module 100 is used to collect visual images of the workpiece and the axial contact force of the installation tool during the process of the installation tool (for example, the welding head in a welding scenario) contacting the workpiece to be assembled (for example, the circuit board in a welding scenario) and applying installation force (for example, welding pressure), and generate a multimodal synchronous data packet containing timestamps, workpiece three-dimensional position offset (actual offset sequence) and instantaneous contact force value (contact force sequence).
[0091] The online digital copy construction and update module 200 is used to construct a contact dynamic prediction model based on batch historical multimodal synchronous data packets and an autoregressive model for system identification. It receives instantaneous contact force values and inputs them into the contact dynamic prediction model to generate deformation prediction values (predicted offset sequence) of workpiece position offset. It compares the deformation prediction values with the actual three-dimensional position offset of the workpiece calculated from real-time visual images to make decisions, and incrementally updates the model parameters based on the new multimodal synchronous data packets after each workpiece is installed, outputting the deformation for compensation (compensation offset sequence).
[0092] The adaptive compensation instruction generation module 300 is used to construct and solve a constrained finite-time domain optimization problem in each control cycle based on deformation. The problem aims to minimize the comprehensive cost function consisting of trajectory tracking error and motion smoothness term, while satisfying the dynamic and physical constraints of the installation tool. After solving, it generates an optimized trajectory point sequence for driving the micro-motion of the installation tool.
[0093] The high-frequency dynamic actuator control module 400 is used to receive the optimized trajectory point sequence and drive the installation tool to perform corresponding micro-motion compensation in order to achieve real-time tracking of the dynamic deformation of the workpiece.
[0094] This application achieves real-time, adaptive, and high-precision compensation for installation errors caused by microscopic deformation due to contact force during precision electronic assembly by using synchronous data acquisition of the multimodal contact process sensing module 100, intelligent prediction and learning of the online digital copy construction and update module 200, optimized trajectory planning of the adaptive compensation instruction generation module 300, and precise dynamic execution finally realized by the high-frequency dynamic actuator control module 400. This significantly improves the connection reliability and overall yield of precision installation processes.
[0095] The specific execution process of each module can be found in the following references. Figures 1 to 3 The embodiments shown will not be described in detail here.
[0096] Furthermore, based on Figure 4 The workpiece mounting system shown is as follows: Figure 5 The diagram shown in this application further illustrates the implementation process of an online digital copy construction and update module 200 in a specific workpiece installation system.
[0097] Reference Figure 5 The online digital copy construction and update module 200 functions to establish and continuously maintain a mathematical model that accurately describes the dynamic deformation behavior of the workpiece under installation pressure; this model is the digital copy of the system. At the software level, this module is implemented as a real-time data processing and model calculation engine, continuously receiving real-time data streams from the multimodal contact process sensing module 100. Each data packet contains a timestamp, three-dimensional position offset, and synchronized contact force values.
[0098] Depending on the stage of the system, this module operates in one of the following two modes: In the initial learning mode, when the system is first deployed for a new type of workpiece, the module enters this mode. In this mode, the module does not immediately perform compensation control, but instead focuses on collecting basic data and building an initial prediction model. Specifically, the system continuously collects and records all multimodal synchronization data packets for the first N workpieces throughout the complete installation cycle, organizing the data for each workpiece into input-output data pairs arranged in chronological order. The input is a sequence of contact forces, and the output is a sequence of position offsets in the corresponding direction.
[0099] Subsequently, the module adopts an autoregressive model with external input as the model structure. This model establishes the mathematical relationship between the current position offset and the historical position offset and historical contact force. By applying the least squares method to estimate the parameters of the first batch of N workpieces, a set of optimal model parameters is solved, thereby generating an initial contact dynamic prediction model for this type of workpiece.
[0100] In the online prediction and adaptive update mode, after the initial modeling is completed, the module automatically switches to this mode, which is the main operating mode during the normal operation of the system. For each subsequent workpiece, the module starts synchronously the moment the installation tool contacts the workpiece, receives the contact force data stream of the current workpiece in real time, and immediately inputs it into the established contact dynamic prediction model. The model calculates the deformation prediction sequence of the workpiece position offset in the future time domain based on the real-time input force sequence.
[0101] Simultaneously, the module receives the actual position offset calculated in real time from the visual data stream. Then, the module performs a comparison decision step: it compares the deformation prediction sequence output by the model with the visually perceived actual offset in real time, calculating the difference between the two. The system presets a confidence threshold. If the difference is less than the confidence threshold, it indicates that the current prediction result is accurate and reliable. The module adopts the prediction value as the basis for compensation output and uses its zero-delay advantage to achieve feedforward compensation. If the difference is greater than or equal to the confidence threshold, it indicates that the actual situation exceeds the prediction range of the model (such as abnormal deformation or foreign object interference). The module immediately switches the signal source and outputs the actual offset perceived by vision as the basis for compensation, ensuring the robustness of the system in the worst case.
[0102] After each workpiece is installed, regardless of the accuracy of the prediction, the complete force-displacement data pairs generated by that workpiece throughout the contact process are used as new samples, triggering an incremental learning process: the module calculates the gradient of the model's prediction error and uses gradient descent with a limited step size to make small adjustments to the model parameters in the opposite direction of the gradient. This adjustment is conservative and controlled, aiming to allow the model to slowly adapt to subtle changes in the production process (such as fluctuations in material properties and drift in ambient temperature), so that the digital copy continues to evolve as the production process progresses.
[0103] In summary, the online digital copy construction and update module 200 provides the system with predictive capabilities to overcome control delays through the aforementioned cycle of continuous prediction, verification, decision-making, and updating. At the same time, it endows the system with the intelligence to adapt to the slow changes in the production environment, fundamentally upgrading error compensation from a passive reactive response to a forward-looking adaptive optimization.
[0104] The specific execution process of the online digital copy construction and update module 200 can be referred to... Figures 1 to 3 The embodiments shown will not be described in detail here.
[0105] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0106] Embodiments of this application also provide a workpiece mounting device 600. Figure 6 This is a schematic diagram of the structure of a workpiece mounting device provided in an embodiment of this application, as shown below. Figure 6 As shown, it includes: The acquisition unit 610 is used to acquire the actual offset sequence of the workpiece to be assembled relative to the installation tool and the contact force sequence between the installation tool and the workpiece to be assembled when the installation tool contacts the workpiece to be assembled. The prediction unit 620 is used to input the contact force sequence into the prediction model to obtain the predicted offset sequence of the workpiece to be assembled relative to the installation tool in the future time domain. The determining unit 630 is used to determine the compensation offset sequence in the future time domain based on the predicted offset sequence and the actual offset sequence. The installation unit 640 is used to generate the motion trajectory of the installation tool in the future time domain according to the compensation offset sequence, so as to drive the installation tool to perform installation operations according to the motion trajectory.
[0107] In some embodiments, the obtaining unit 610 is configured to: If the pressure value of the installation tool is detected to be greater than or equal to the preset pressure threshold, it is determined that the installation tool is in contact with the workpiece to be assembled. Acquire at least one frame of image of the workpiece to be assembled when the installation tool comes into contact with it, and the pressure value corresponding to each frame of the at least one frame of image. Based on each frame of the image, the actual offset sequence is obtained, and based on the pressure value corresponding to each frame of the image, the contact force sequence is obtained.
[0108] In some embodiments, the obtaining unit 610 is configured to: Distortion correction is performed on each frame of the image to obtain the corrected, distortion-free images of each frame; Extract the image coordinate set of the marker point set corresponding to the installation tool and the image coordinate set of the target feature point corresponding to the workpiece to be assembled from each frame of distortion-free image; The real-time pose of the installation tool is determined based on the image coordinate set of the marker point set and the three-dimensional coordinate set of the marker point set in the coordinate system of the installation tool. Based on the image coordinates of the target feature points, the real-time pose of the installation tool, and the pre-calibrated initial pose relationship between the workpiece to be assembled and the installation tool, determine the spatial coordinates of the target feature points in the coordinate system of the installation tool. The actual offset of each frame image is determined based on the spatial coordinates to obtain the actual offset sequence.
[0109] In some embodiments, the obtaining unit 610 is configured to: Obtain the zero-point offset of the force sensor in the installation tool; The pressure difference between the pressure value and the zero-point offset corresponding to each frame image is determined, and the product of the pressure difference and the calibration coefficient is determined as the contact force of each frame image to obtain the contact force sequence.
[0110] In some embodiments, the prediction unit 620 is configured to: Before inputting the contact force sequence into the prediction model to obtain the predicted offset sequence of the workpiece to be assembled relative to the installation tool in the future time domain, the historical actual offset sequence and historical contact force sequence of the historical assembled workpiece with the same workpiece type as the workpiece to be assembled are obtained. Based on the historical contact force sequence and the historical actual offset sequence, the model parameters of the model to be trained are estimated by combining the least squares method to obtain the prediction model.
[0111] In some embodiments, the determining unit 630 is configured to: Determine the offset difference between the predicted offset at each time step in the predicted offset sequence and the actual offset at each time step in the actual offset sequence; If the offset difference is less than the preset threshold, the predicted offset at each time step is determined as the compensation offset at each time step to obtain the compensation offset sequence. If the offset difference is greater than or equal to a preset threshold, the actual offset at each time point is determined as the compensation offset to obtain the compensation offset sequence.
[0112] In some embodiments, the mounting unit 640 is used for: Obtain the movement status of the installation tool; Based on the motion state, the compensation offset sequence, and the physical motion constraints of the installation tool, with the goal of minimizing the comprehensive cost function, an optimized trajectory point sequence that satisfies the optimization objective and physical motion constraints in the future time domain is generated, and the optimized trajectory point sequence is determined as the motion trajectory.
[0113] In some embodiments, the mounting unit 640 is used for: Using the compensated offset sequence as a reference trajectory, the expected position of the installation tool at each time point in the future time domain is determined; Based on the expected position and the planned position of the installation tool at each moment, the tracking error term is determined; Based on the acceleration changes at each moment of the planned trajectory, the motion smoothness term is determined; Construct a comprehensive cost function based on the tracking error term and the motion smoothness term; Under physical motion constraints, the planned trajectory that minimizes the comprehensive cost function is obtained, thus yielding the optimal trajectory point sequence in the future time domain.
[0114] In some embodiments, the mounting unit 640 is used for: Generate a reference motion curve based on the motion trajectory; Get real-time location feedback of the installation tool; The feedforward control quantity is determined based on the reference motion curve, and the feedback control quantity is determined based on the deviation between the real-time position feedback and the reference motion curve. The feedforward control signal is superimposed with the feedback control signal to generate a drive signal. The installation tool is driven to move along the motion trajectory according to the drive signal to perform the installation operation.
[0115] For a description of the features in the embodiment corresponding to the workpiece mounting device, please refer to the relevant description in the embodiment corresponding to the workpiece mounting method, which will not be repeated here.
[0116] Embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described workpiece mounting method embodiments.
[0117] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described workpiece mounting method embodiments when it is run.
[0118] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0119] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described workpiece mounting method embodiments.
[0120] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in any of the above-described workpiece mounting method embodiments.
[0121] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be performed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.
[0122] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0123] The above provides a detailed description of a workpiece mounting method provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A workpiece mounting method, characterized in that, include: Obtain the actual offset sequence of the workpiece to be assembled relative to the installation tool and the contact force sequence between the installation tool and the workpiece to be assembled when the installation tool comes into contact with the workpiece to be assembled; The contact force sequence is input into the prediction model to obtain the predicted offset sequence of the workpiece to be assembled relative to the installation tool in the future time domain; Based on the predicted offset sequence and the actual offset sequence, determine the compensation offset sequence in the future time domain; Based on the compensated offset sequence, the motion trajectory of the installation tool in the future time domain is generated, so as to drive the installation tool to perform installation operations according to the motion trajectory.
2. The method according to claim 1, characterized in that, The acquisition of the actual offset sequence of the workpiece to be assembled relative to the installation tool and the contact force sequence between the installation tool and the workpiece to be assembled when the installation tool comes into contact with the workpiece to be assembled includes: If the pressure value of the installation tool is detected to be greater than or equal to a preset pressure threshold, it is determined that the installation tool is in contact with the workpiece to be assembled. Acquire at least one frame image of the workpiece to be assembled when the installation tool contacts the workpiece to be assembled, and the pressure value corresponding to each frame image in the at least one frame image; Based on each frame of the image, the actual offset sequence is obtained, and based on the pressure value corresponding to each frame of the image, the contact force sequence is obtained.
3. The method according to claim 2, characterized in that, The step of obtaining the actual offset sequence based on each frame image includes: Distortion correction is performed on each frame of the image to obtain the corrected, distortion-free images of each frame. Extract the image coordinate set of the marker point set corresponding to the installation tool and the image coordinates of the target feature point corresponding to the workpiece to be assembled from each frame of distortion-free image; The real-time pose of the installation tool is determined based on the image coordinate set of the marked point set and the three-dimensional coordinate set of the marked point set in the coordinate system of the installation tool. Based on the image coordinates of the target feature point, the real-time pose of the installation tool, and the pre-calibrated initial pose relationship between the workpiece to be assembled and the installation tool, the spatial coordinates of the target feature point in the coordinate system of the installation tool are determined. The actual offset of each frame image is determined based on the spatial coordinates to obtain the actual offset sequence.
4. The method according to claim 2, characterized in that, The step of obtaining the contact force sequence based on the pressure values corresponding to each frame image includes: Obtain the zero-point offset of the force sensing device in the installation tool; The pressure difference between the pressure value corresponding to each frame image and the zero-point offset is determined, and the product of the pressure difference and the calibration coefficient is determined as the contact force of each frame image to obtain the contact force sequence.
5. The method according to claim 1, characterized in that, Before inputting the contact force sequence into the prediction model to obtain the predicted offset sequence of the workpiece to be assembled relative to the installation tool in the future time domain, the method includes: Obtain the historical actual offset sequence and historical contact force sequence of historical assembled workpieces that are of the same workpiece type as the workpiece to be assembled; Based on the historical contact force sequence and the historical actual offset sequence, the model parameters of the model to be trained are estimated using the least squares method to obtain the prediction model.
6. The method according to claim 1, characterized in that, Determining the compensation offset sequence in the future time domain based on the predicted offset sequence and the actual offset sequence includes: Determine the offset difference between the predicted offset at each time step in the predicted offset sequence and the actual offset at each time step in the actual offset sequence; If the offset difference is less than a preset threshold, the predicted offset at each time point is determined as the compensated offset at each time point to obtain the compensated offset sequence. If the offset difference is greater than or equal to a preset threshold, the actual offset at each time point is determined as the compensation offset to obtain the compensation offset sequence.
7. The method according to claim 1, characterized in that, The step of generating the motion trajectory of the installation tool in the future time domain based on the compensated offset sequence includes: Obtain the motion state of the installation tool; Based on the motion state, the compensation offset sequence, and the physical motion constraints of the installation tool, with minimizing the comprehensive cost function as the optimization objective, an optimized trajectory point sequence that satisfies the optimization objective and the physical motion constraints in the future time domain is generated, and the optimized trajectory point sequence is determined as the motion trajectory.
8. The method according to claim 7, characterized in that, The step of generating the optimized trajectory point sequence in the future time domain that satisfies the optimization objective and the physical motion constraints based on the motion state, the compensated offset sequence, and the physical motion constraints of the installation tool, with the goal of minimizing the comprehensive cost function, includes: Using the compensated offset sequence as a reference trajectory, the expected position of the installation tool at each time in the future time domain is determined; Based on the desired position and the planned position of the installation tool at each moment, the tracking error term is determined; Based on the acceleration change at each moment of the planned trajectory, the motion smoothness term is determined; The comprehensive cost function is constructed based on the tracking error term and the motion smoothness term; Under the physical motion constraints, the planned trajectory that minimizes the comprehensive cost function is solved to obtain the optimized trajectory point sequence in the future time domain.
9. The method according to claim 1, characterized in that, The step of driving the installation tool to perform the installation operation according to the motion trajectory includes: Based on the motion trajectory, a reference motion curve is generated; Obtain real-time location feedback of the installation tool; The feedforward control quantity is determined based on the reference motion curve, and the feedback control quantity is determined based on the deviation between the real-time position feedback and the reference motion curve. The feedforward control quantity and the feedback control quantity are superimposed to generate a drive signal; The installation tool is driven to move along the motion trajectory according to the drive signal to perform the installation operation.
10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the workpiece mounting method as described in any one of claims 1 to 9.