Search

CN-122023516-A - Visual calibration method and system for assembly precision of permanent magnet

CN122023516ACN 122023516 ACN122023516 ACN 122023516ACN-122023516-A

Abstract

The invention relates to the technical field of machine vision and intelligent manufacturing, and discloses a vision calibration method and a vision calibration system for permanent magnet assembly precision, wherein the vision calibration method for permanent magnet assembly precision comprises the steps of collecting original polarized image data of a permanent magnet, separating specular reflection and diffuse reflection components, preprocessing, constructing a continuous magnetic field model, extracting magnetic field feature vectors and removing magnetic field interference noise, designing an edge detection network, carrying out multi-scale feature extraction and edge prediction, collecting multi-view image data, carrying out cross-view feature association and matching, solving six-degree-of-freedom pose of the permanent magnet, constructing feature vectors, predicting cumulative error distribution, calculating compensation quantity and evaluating confidence interval, converting the compensation quantity into a robot joint motion instruction through inverse kinematics, executing compensation motion and carrying out pose reinspection, and adaptively adjusting learning gain and gradually approximating to target pose.

Inventors

  • CHEN HAOLONG
  • Zhang meile
  • CHEN RUI

Assignees

  • 宁波江北新月磁业有限公司

Dates

Publication Date
20260512
Application Date
20260108

Claims (10)

  1. 1. The visual calibration method for the assembly precision of the permanent magnet is characterized by comprising the following steps of: Collecting original polarized image data of a permanent magnet, separating specular reflection components and diffuse reflection components, and preprocessing to obtain a permanent magnet surface enhanced image; Constructing a continuous magnetic field model based on the permanent magnet surface enhanced image, extracting a magnetic field feature vector, removing magnetic field interference noise, and obtaining a denoised image; designing an edge detection network, and carrying out multi-scale feature extraction and edge prediction based on the denoised image to obtain the complete outline of the permanent magnet; performing cross-view characteristic association and matching based on the permanent magnet surface enhanced image and the permanent magnet complete outline, and solving the six-degree-of-freedom pose of the permanent magnet to obtain a pose detection result; Calculating pose deviation based on the pose detection result, constructing a feature vector containing assembly state and historical errors, predicting accumulated error distribution, calculating compensation quantity, evaluating confidence interval and outputting pose compensation parameters; Based on pose compensation parameters, the motion compensation is converted into a robot joint motion instruction through inverse kinematics, the motion compensation is executed, the pose recheck is carried out, the learning gain is adaptively adjusted, the target pose is gradually approximated, and the final assembly pose of the permanent magnet is obtained.
  2. 2. The visual calibration method for the assembly accuracy of the permanent magnet according to claim 1, wherein the step of obtaining the surface enhanced image of the permanent magnet specifically comprises: Configuring a focal plane-splitting polarization camera system, and reading the resolution of a camera sensor, the pixel size and the arrangement mode of a micro-polarizer array; Adopting a multi-angle annular polarized light source to illuminate, and enabling emergent light of each light-emitting unit to become polarized light in a specific polarization direction after passing through a linear polarizer; Super-pixel analysis is carried out on the original polarized image data, light intensity component images in four polarization directions are extracted, and space alignment is carried out on each polarized channel image; Calculating the polarization degree and the polarization angle of each pixel based on a Stokes parameter calculation method; Separating the specular reflection component and the diffuse reflection component based on the polarization degree information, determining pixels with the polarization degree higher than a preset polarization degree threshold value as containing the specular reflection component, determining pixels with the polarization degree lower than the preset polarization degree threshold value as containing the diffuse reflection component, and reconstructing an intrinsic gray image of the surface of the permanent magnet; and carrying out contrast enhancement and edge sharpening on the intrinsic gray image.
  3. 3. The visual calibration method for assembly accuracy of a permanent magnet according to claim 1, wherein the step of obtaining the denoised image specifically comprises: Arranging a sensor array formed by three-axis Hall sensors in an assembly area, and reading output signals of all the Hall sensors to obtain three-component data of magnetic field intensity; Performing spatial interpolation on magnetic field data of discrete sampling points to construct a continuous magnetic field distribution model; Extracting magnetic field feature vectors from a continuous magnetic field distribution model, wherein the magnetic field feature vectors comprise a magnetic field intensity three-component mean value of the position of an image sensor, a gradient component of the magnetic field intensity in a sensor plane and a time change rate of the magnetic field intensity; Constructing a condition generation countermeasure network, wherein a generator adopts an encoder decoder structure, maps magnetic field feature vectors into modulation parameters, and carries out affine transformation on feature graphs of all layers of an encoder; And inputting the permanent magnet surface enhanced image and the magnetic field characteristic vector into a trained generator network to obtain an image with magnetic field interference removed.
  4. 4. The visual calibration method of permanent magnet assembly accuracy according to claim 1, wherein the step of obtaining the complete profile of the permanent magnet comprises: Designing an edge detection network, wherein the network adopts an encoder and decoder structure; introducing a deformable convolution module into a key layer of the encoder, outputting an offset field, and adding an offset to a regular sampling position to obtain a deformed sampling position; Designing a multi-scale feature fusion module, and expanding a receptive field range through a plurality of parallel cavity convolution branches with different cavity rates; introducing a depth supervision mechanism into a plurality of intermediate layers of the network, and carrying out weighted fusion on the edge probability map output by each branch and the edge probability map output by the decoder; and carrying out non-maximum value inhibition processing on the edge probability map output by the network, adopting a sub-pixel edge positioning algorithm to refine the edge position, and connecting the edge points into an edge curve.
  5. 5. The visual calibration method of permanent magnet assembly accuracy according to claim 1, wherein the step of obtaining the pose detection result specifically comprises: Configuring a multi-camera system, acquiring a plurality of groups of images by using a calibration plate, and solving the relative pose relation between an internal parameter matrix of each camera and the cameras; Performing edge detection on each view angle image, extracting characteristic points on the outline, and calculating local descriptors; constructing a graph structure representation of the graph neural network, wherein nodes of the graph correspond to characteristic points, and edges of the graph are connected with adjacent characteristic point pairs; Designing a message transmission mechanism of the graph neural network, collecting the characteristics of neighbor nodes by each node, calculating message vectors by a multi-layer perceptron network, and aggregating by adopting attention weighted summation; Designing an attention mechanism for cross-view feature matching, calculating a similarity matrix between feature point pairs, performing bidirectional soft maximization processing on the similarity matrix to obtain a matching probability matrix, and extracting matching point pairs; verifying the matching point pairs by utilizing epipolar geometric constraint, and screening the matching point pairs by adopting a random sampling consistency algorithm; and calculating three-dimensional space coordinates corresponding to the matching points by utilizing a triangulation principle, registering the reconstruction point cloud with a computer-aided design model of the permanent magnet, and solving the six-degree-of-freedom pose of the permanent magnet.
  6. 6. The visual calibration method for permanent magnet assembly accuracy according to claim 5, wherein the step of obtaining the pose detection result further comprises: And calculating the relative angle deviation between the current permanent magnet and the adjacent assembled permanent magnet, reading pose information of the last permanent magnet from a system database, comparing the pose of the current permanent magnet with the pose of the last permanent magnet, calculating a relative rotation matrix, and extracting a rotation angle component around the axial direction of the rotor from the relative rotation matrix, wherein the difference between the rotation angle component and the oblique pole angle required by design is the relative angle deviation.
  7. 7. The visual calibration method of permanent magnet assembly accuracy according to claim 1, wherein the step of outputting the pose compensation parameter specifically comprises: Defining state variables describing the current assembly state, wherein the state variables comprise a sequence number of a current assembly section, a pose deviation sequence, pose deviation of the current section, ambient temperature and humidity and joint angles of the robot; Collecting historical assembly data, measuring the actual pose of the end permanent magnet by using a three-coordinate measuring machine, and comparing the measurement result with the designed pose to obtain an actual accumulated error, thereby forming a training data set; designing a composite kernel function of a Gaussian process regression model, and adopting different types of kernel functions for different components; Inputting the current state variable into a trained Gaussian process regression model, and outputting the prediction distribution of the accumulated error; calculating a compensation quantity by adopting a minimum variance criterion; and calculating a confidence interval of the optimal compensation quantity, and sending out a warning by the system when the width of the confidence interval exceeds a preset confidence threshold value.
  8. 8. The visual calibration method for the assembly precision of the permanent magnet according to claim 1, wherein the step of obtaining the final assembly pose of the permanent magnet specifically comprises: The optimal compensation quantity of the Cartesian space is converted into a motion instruction of the joint space; designing a learning law of the iterative learning controller, wherein the control input of the next iteration is equal to the product of the control input of the current iteration plus the learning gain and the tracking error; Controlling the robot to execute compensation movement, triggering the vision system to acquire images again, calculating the current pose of the permanent magnet, and comparing the current pose with the target pose to obtain tracking error; comparing the tracking error with a preset precision threshold, terminating the iteration process if the convergence condition is met, and updating the control input to enter the next iteration if the convergence condition is not met; and adaptively adjusting the learning gain according to the error change trend, if the error is continuously reduced, keeping the learning gain unchanged, if the error is oscillated, multiplying the learning gain by a preset attenuation coefficient, and if the error reduction amplitude is smaller than a preset reduction threshold value, multiplying the learning gain by a preset amplification coefficient.
  9. 9. The method of claim 8, wherein after the iterative process is completed, the complete data of the current calibration is recorded in a system database, including initial pose deviation, control input and tracking error of each iteration, final assembly pose and number of iterations, and these data are used to update a training dataset of the gaussian process regression model.
  10. 10. A visual calibration system for assembly accuracy of a permanent magnet, characterized by performing a visual calibration method for assembly accuracy of a permanent magnet according to any one of claims 1-9, comprising: the polarized image acquisition module is used for acquiring original polarized image data of the permanent magnet, separating specular reflection components and diffuse reflection components and preprocessing the specular reflection components to obtain a permanent magnet surface enhanced image; The magnetic field interference denoising module is used for constructing a continuous magnetic field model based on the permanent magnet surface enhanced image, extracting magnetic field feature vectors and removing magnetic field interference noise to obtain a denoised image; the edge detection module is used for designing an edge detection network, extracting multi-scale characteristics and predicting edges based on the denoised image, and obtaining the complete outline of the permanent magnet; the pose estimation module is used for carrying out cross-view characteristic association and matching based on the permanent magnet surface enhanced image and the permanent magnet complete outline, solving the six-degree-of-freedom pose of the permanent magnet, and obtaining a pose detection result; The error prediction module is used for calculating pose deviation based on a pose detection result, constructing a feature vector containing assembly state and historical error, predicting cumulative error distribution, calculating compensation quantity, evaluating confidence interval and outputting pose compensation parameters; And the closed-loop calibration module is used for performing compensation motion and performing pose rechecking by converting the compensation motion into a robot joint motion instruction through inverse kinematics based on pose compensation parameters, adaptively adjusting learning gain and gradually approaching the target pose to obtain the final assembly pose of the permanent magnet.

Description

Visual calibration method and system for assembly precision of permanent magnet Technical Field The invention relates to the technical field of machine vision and intelligent manufacturing, in particular to a vision calibration method and system for permanent magnet assembly precision. Background With the rapid development of new energy automobile industry, permanent magnet synchronous motors have become the mainstream choice of electric automobile driving systems due to the advantages of high power density, high efficiency, wide speed regulation range and the like. The permanent magnet is used as a core functional component of the permanent magnet synchronous motor, and the assembly quality of the permanent magnet directly influences the electromagnetic performance, the vibration noise characteristic and the service life of the motor. Particularly in a high-performance driving motor adopting a sectional oblique pole design, the assembly precision requirement of the permanent magnet is more severe, the absolute positioning precision of a single permanent magnet in a slot position is required to be ensured, and the oblique pole angle of which the relative angle between adjacent sections of permanent magnets meets the design requirement is also required to be ensured. Currently, permanent magnet assembly is mainly accomplished by an industrial robot in combination with a visual guidance system. The vision system calculates the pose deviation of the permanent magnet by collecting images of the permanent magnet and the assembly groove position, and feeds back deviation information to the robot for compensation. However, the conventional visual calibration technology faces many challenges when dealing with a special scene of permanent magnet assembly, namely, the surface of the permanent magnet is subjected to nickel plating treatment and then presents a specular characteristic of high reflection, a large-area highlight area exists in an image under the conventional illumination condition, so that edge contours are blurred, characteristics are difficult to extract, a strong magnetic field generated by the permanent magnet can cause interference on electronic elements of an image sensor, abnormal phenomena such as noise points and stripes occur in the image, and the geometric complexity of a segmented oblique pole structure makes it difficult to completely acquire all key characteristics from a single visual angle. In the prior art, aiming at the imaging problem of the high-reflection surface, a diffuse illumination or multiple exposure fusion method is generally adopted, but the methods either sacrifice the contrast of the image or increase the acquisition time, so that the real-time requirement of a production line is difficult to meet. For the problem of magnetic field interference, a method of increasing the distance between the camera and the permanent magnet is generally adopted to reduce interference, but this can lead to reduced imaging resolution and affect measurement accuracy. Aiming at the problem of accumulated errors of sectional assembly, the prior art lacks an effective error transfer modeling and compensation mechanism, so that the assembly precision of the final permanent magnet is difficult to guarantee. Accordingly, there is a need for a visual calibration method for assembly accuracy of permanent magnets that overcomes the above-described technical problems. Disclosure of Invention The invention provides a visual calibration method and a visual calibration system for permanent magnet assembly precision, which solve the technical problems of blurred edge profile, difficult feature extraction and difficult complete acquisition of all key features in a single visual angle in the related technology. The invention provides a visual calibration method for assembly precision of a permanent magnet, which comprises the following steps: Collecting original polarized image data of a permanent magnet, separating specular reflection components and diffuse reflection components, and preprocessing to obtain a permanent magnet surface enhanced image; Constructing a continuous magnetic field model based on the permanent magnet surface enhanced image, extracting a magnetic field feature vector, removing magnetic field interference noise, and obtaining a denoised image; designing an edge detection network, and carrying out multi-scale feature extraction and edge prediction based on the denoised image to obtain the complete outline of the permanent magnet; performing cross-view characteristic association and matching based on the permanent magnet surface enhanced image and the permanent magnet complete outline, and solving the six-degree-of-freedom pose of the permanent magnet to obtain a pose detection result; Calculating pose deviation based on the pose detection result, constructing a feature vector containing assembly state and historical errors, predicting accumulated error distribution, calculating compens