Kuhn–Munkres Algorithm-Based Matching Method and Automatic Device for Tiny Magnetic Steel Pair

The tiny magnetic steel pair (TMSP), composed by two tiny magnetic steel blocks (TMSBs), is critical for some precision instruments. Incorrect matching of TMSP may result in insufficient instrument performance. Herein, the matching method of TMSP based on the Kuhn–Munkres algorithm is proposed. Further, an automatic TMSP matching device is developed. Especially, an ingenious clamp for multiple constraints of TMSB is presented and a visual/magnetism/force hybrid control strategy is realized for the safe and efficient manipulation of TMSBs in a magnetic environment. Moreover, with the TMSBs of a pendulum accelerometer, the matching experiments are conducted to validate the comprehensive performance. The result of the numerical experiment shows that the Kuhn–Munkres algorithm-based method is stable and efficient. The results of measurement and TMSP matching experiments show that the device has good repeatability (<1 mT) and practicability. The proposed matching method has great application prospect in various matching and microassembly of TMSPs.


Introduction
The tiny magnetic steel pair (TMSP), composed by one tiny magnetic steel block (TMSB) and another TMSB as an opposite pole, is critical for some precision instruments such as the accelerometer, three-floated gyroscope, small motor etc. [1][2][3]. The TMSP function is to generate an even magnetic field and correspondingly apply ampere force on coil or other objects in an air-gap, inducing them to deflect, translate, keep balance with external forces etc. [4]. Obviously, the magnetic field is dependent on not only the size and position of TMSBs, but also the magnetizing parameters. Therefore, to obtain satisfied TMSP for the followed assembly, the selective TMSP matching from a certain amount of TMSBs based on magnetic flux density is indispensable [5,6]. In related industrial areas, most TMSP matching processes are manually operated with precise mechanical fixtures. The subtle wear of fixtures and the unavoidable finger trembling might seriously affect the consistency. Moreover, unexpected demagnetization often happens, owing to the personal error. Therefore, it is urgent to develop an automatic method for TMSP matching.
The generalized process of TMSP matching can be divided into three steps: 1. Data collection. The size and surface magnetic flux density of TMSBs (n-TMSB and s-TMSB mean the TMSBs as the N-pole and S-pole of an air-gap magnetic field) are measured and saved. 2.
Matching process. According to the surface magnetic flux density of n-TMSBs and s-TMSBs, those qualified TMSBs are preliminarily screened out and estimated to make sure of the possibility of TMSPs. As a result, the likely suitable TMSPs will be found out (here 'suitable' means that their air-gap magnetic flux density is high enough).
3. nResult verification. Based on the estimated combinations, the qualified TMSBs are assembled into the corresponding magnet bases to form TMSPs. Then, the air-gap magnetic field in each TMSP is measured to verify the performance.
Although there is no direct report about TMSP matching, some related works exist. For example, Meyer et al. [7] proposed an automated logistics and storage solution for TMSBs of permanent magnet motor. This solution improved the traceability of single TMSBs and enabled to compensate variations of the magnetic properties by selective TMSB assembly. Arbenz et al. [8] presented an approach to deduce the magnetization of TMSB. By using the Hall sensor to scan the magnetic field, the TMSB magnetization could be inferred. Franke [9] presented an assembly solution for magnetized high coercive TSMP, including an automated TMSB separator and some different grippers. More recently, the patent proposed by Apple Inc. [10] presented a device for automatic measurement of TMSBs, in which a precision turntable was used to achieve intermittent feed movement of TMSBs. Moreover, several Helmholtz coils were used to measure the magnetic flux density of TMSB and to determine whether the property of TMSB was qualified. But until now, as far as we know, the complete research on the automatic matching method had not yet been reported. The main challenges of TMSP matching lie in: Firstly, the suitable method needs to be developed to predict the magnetic flux density of TMSPs and to optimize its combination [11,12]. Secondly, the strong magnetic forces might cause demagnetization or damage of TMSBs due to collision in matching process [13]. Thirdly, the air-gap magnetic flux density distribution is highly sensitive to assembly accuracy [14,15]. Obviously, if the TMSB is incorrectly assembled, it will affect the matching performance.
Here, inspired from the Kuhn-Munkres (K-M) algorithm, a novel TMSP matching method for TMSP is proposed. Additionally, the numerical experiment is performed to verify the reliability and efficiency of the method. Further, an automatic TMSP matching device using the matching method is developed too. Especially, an ingenious clamp for multiple constraints of TMSB and a visual/magnetism/force hybrid control strategy are realized for the safe and efficient manipulation of TMSBs in a complex magnetic environment. Finally, utilizing the TMSBs from a type of pendulum accelerometer, the matching experiments are actually conducted to validate the comprehensive performance.

Principle of Matching Algorithm
The TMSP matching can be considered the weighted bipartite graph matching problem. Herein, the K-M algorithm about the optimal matching of the bipartite graph is utilized. In principle, by giving each vertex a top mark, the algorithm can convert the problem of maximizing weight matching into continuous searching an augmentation path to make the bipartite graph [16,17]. By inputting the predicted value of B a for each combination as the edge weight, the optimal combination can be obtained. The matching process will not stop until the number of matched pairs reaches the number of maximum complete matching. The matching principle for TMSP can be described as shown in Figure 1.

1.
Magnetostatics modeling. Through FEM simulation, the distribution of magnetic flux density in TMSP is calculated. Then, an equation is built up to describe the influence of magnetic flux densities of s-TMSBs and n-TMSBs (B S and B N ) on the air-gap magnetic flux density (B a ). 2.
Weight calculation. B S and B N are measured firstly. Then, the n-TMSBs and s-TMSBs are numbered as (S i , N j ) respectively for the left vertex and right one of bipartite graph. B a (i, j) is calculated by the B Si and B Nj , as the weight of edge connected by each vertex. 3.
Vertex assignment. It means that the maximum edge weight (max [B a (j)]) of all edges connected to each S vertex on the left is assigned to the top mark (L S ). Additionally, the top mark (L N ) of each N vertex on the right is assigned to zero. 4.
TMSP matching. The algorithm starts from the vertex S 1 on the left to search for the corresponding vertex and augmented path (N vertex). The guideline of matching is to keep only the edges with the same weight B a (i, j) and the left top mark L Si , and to meet the requirements of L Si + L Nj ≥ B a (i, j). If one edge is not qualified or the two edges conflict, then L S of all left vertices of the conflict path is subtracted by a top mark adjustment d (d = min [B a (i, j) − ( L Si + L Nj )]), and L N of all right vertices is increased by d. After that, the pairing is performed again, and the augmented path is searched until the maximum matching number (min [i, j]) is reached. 5.
Result verification. According to the matching result, s-TMSB is actually assembled with n-TMSB to form a TMSP and then B a is measured to verify it.
4. TMSP matching. The algorithm starts from the vertex S1 on the left to search for the corresponding vertex and augmented path (N vertex). The guideline of matching is to keep only the edges with the same weight B a (i, j) and the left top mark LSi, and to meet the requirements of L Si + L Nj ≥ B a (i, j The path conflict? The number of matches reach min(i, j)？

FEM Simulation
The data required for magnetostatics modeling is obtained by FEM. We choose the TMSP framework from a pendulum accelerometer as shown in Figure 2. When the acceleration (a) is input into the pendulum accelerometer, relative displacements (deflection angle θ) of the inertial pendulum will appear. Then, the current I being proportional to θ is transmitted to the torque coil connected to the pendulum by the sensor and corresponding circuit. In the air-gap magnetic field (B), a balance moment Mf is generated to balance

FEM Simulation
The data required for magnetostatics modeling is obtained by FEM. We choose the TMSP framework from a pendulum accelerometer as shown in Figure 2. When the acceleration (a) is input into the pendulum accelerometer, relative displacements (deflection angle θ) of the inertial pendulum will appear. Then, the current I being proportional to θ is transmitted to the torque coil connected to the pendulum by the sensor and corresponding circuit. In the air-gap magnetic field (B), a balance moment M f is generated to balance the inertial pendulum energized coil. It means that the air-gap magnetic field (B) can directly affect the output of the pendulum accelerometer [20]. the inertial pendulum energized coil. It means that the air-gap magnetic rectly affect the output of the pendulum accelerometer [20]. The TMSP is mainly composed of a s-TMSB and a base with a glued of the n-TMSB and S-pole of the s-TMSB are set oppositely, and magnet Y-direction). With COMSOL software (COMSOL Inc. Stockholm, Sweden of magnetic field distribution is carried out. Related parameters are show The magnetic flux density distribution is shown in Figure 3a. The and Br-N on B a (point in the middle) is shown in Figure 3b. B a is basicall the increase of the remanence of the two TMSBs (Br-S and Br-N) that can Equation (1). For this TMSP of accelerometer, a is 0.502 and b is 0.192: Since here the TMSB is a rectangular permanent magnet, the relat the remanence Br and the magnetic flux density B at certain distance x f surface in a magnetized direction can be described [21,22]: where L, H, W are the length, height, and width of magnet, in which W i ized direction. For this same kind of TMSB, α is fixed to 2.939. Thus, The TMSP is mainly composed of a s-TMSB and a base with a glued n-TMSB (N-pole of the n-TMSB and S-pole of the s-TMSB are set oppositely, and magnetized direction is Y-direction). With COMSOL software (COMSOL Inc. Stockholm, Sweden), the simulation of magnetic field distribution is carried out. Related parameters are shown in Table 1. The magnetic flux density distribution is shown in Figure 3a. The influence of B r-S and B r-N on B a (point in the middle) is shown in Figure 3b. B a is basically increased with the increase of the remanence of the two TMSBs (B r-S and B r-N ) that can be described by Equation (1). For this TMSP of accelerometer, a is 0.502 and b is 0.192: Since here the TMSB is a rectangular permanent magnet, the relationship between the remanence B r and the magnetic flux density B at certain distance x from the magnet surface in a magnetized direction can be described [21,22]: where L, H, W are the length, height, and width of magnet, in which W is in the magnetized direction. For this same kind of TMSB, α is fixed to 2.939. Thus, a = γ · a = 1.688, b = γ · b = 0.645 in Equation (3). The equation has been verified by Gauss meter and the deviation is less than 1.8%:

Device Structure
An automatic device for TMSP matching is developed as shown in Figure 4, which is composed of the TMSB fixture module, the single-TMSB measurement module, the TMSP matching module, and the microscopic imaging module, being installed on a 3D linear precision motorized stage (Repeatability: ±1 μm). These parts that directly contact with TMSBs and magnet bases are made of brass to avoid magnetization. Owing to modular design, the device can be easily modified for various TMSBs. flexible mechanism, micro-force sensor, and connecting parts as shown in Figure 5.
The TMSB clamp is used to clamp TMSB. It is composed of two fingers driven by an air gripper. The structure of the finger hook is used to prevent the clamped TMSB from falling off by magnetic force induced by other TMSBs. In the clamping state, TMSB is clamped by the pressure of the side clamping surface on the side surface of the clamp. The lower surface of the finger hook structure contacts the lower surface of TMSB.
A micro-force sensor is used to detect the force in the matching process to judge the contact state between the clamp and TMSB. It is connected to the air gripper through a Ushaped leaf spring. According to the experimental result, the threshold is set to 0.2 N. With the information of contact state, the excessive squeeze in Z-direction on the clamp and TMSB can be avoided. The front end of the clamp is equipped with a Hall probe, which can measure in situ the air-gap magnetic flux density (B a ) in TMSP.
Complete process of TMSP matching with the device is as follows: 1. TMSB size and position measurement. The size and position are measured via the microscopic imaging module. These parts with qualified size will be put into a list.

Device Structure
An automatic device for TMSP matching is developed as shown in Figure 4, which is composed of the TMSB fixture module, the single-TMSB measurement module, the TMSP matching module, and the microscopic imaging module, being installed on a 3D linear precision motorized stage (Repeatability: ±1 µm). These parts that directly contact with TMSBs and magnet bases are made of brass to avoid magnetization. Owing to modular design, the device can be easily modified for various TMSBs. With the magnetic flux density B a within the required qualified range, the clamp will release the s-TMSB and keep it on the magnet base. Otherwise, the s-TMSB will be moved to the next matching position of magnet base. If the s-TMSB cannot be matched after whole traversal, it will be put back to the initial position.

1.
The TMSB fixture module is used to fix the magnet bases and s-TMSBs. At present, it is composed of five fixtures. Every s-TMSB is placed in one socket in which the space on its left and right is kept for the TMSB clamp fingers.

2.
The single-TMSB measurement module consists of two Hall probes (Resolution: 10 nT, range: 30 T), air slide table, and corresponding connecting parts, which are used to measure the magnetic flux density of the n-TMSBs and the s-TMSBs, respectively. 3.
The microscopic imaging module (1×, CCD resolution: 3840 × 2748, Pixel size: 1.67 µm) is used to measure the size and position of TMSBs and magnet bases.

4.
The TMSP matching module consists of the TMSB clamp, air gripper, Hall probe, flexible mechanism, micro-force sensor, and connecting parts as shown in Figure 5.

Control Strategy for TMSB Positioning Task
To make the safe and efficient positioning of TMSB in a complex m ment, a visual/magnetism/force hybrid control strategy is proposed as sh After the TMSP matching module is driven to the top of the first s-TMSB is controlled to the position and then picks up the s-TMSB. The spatia TMSBs and magnet bases are obtained via the microscopic imaging modu The TMSB clamp is used to clamp TMSB. It is composed of two fingers driven by an air gripper. The structure of the finger hook is used to prevent the clamped TMSB from falling off by magnetic force induced by other TMSBs. In the clamping state, TMSB is clamped by the pressure of the side clamping surface on the side surface of the clamp. The lower surface of the finger hook structure contacts the lower surface of TMSB.
A micro-force sensor is used to detect the force in the matching process to judge the contact state between the clamp and TMSB. It is connected to the air gripper through a U-shaped leaf spring. According to the experimental result, the threshold is set to 0.2 N. With the information of contact state, the excessive squeeze in Z-direction on the clamp and TMSB can be avoided. The front end of the clamp is equipped with a Hall probe, which can measure in situ the air-gap magnetic flux density (B a ) in TMSP.
Complete process of TMSP matching with the device is as follows: 1. TMSB size and position measurement. The size and position are measured via the microscopic imaging module. These parts with qualified size will be put into a list.

2.
TMSB magnetic property measurement and matching prediction. The single-TMSB measurement module is driven to measure the magnetic flux density B S and B N in the list respectively. Then, the above-mentioned matching method is used to predict and give the list of matching result. 3.
TMSP matching. The TMSP matching module is driven to the top of first s-TMSB in the matching list, and then the clamp is controlled to the position and pick up the s-TMSB. Then, the clamped s-TMSB is moved to the matching position and temporarily fixed on the magnet base. Additionally, B a of TMSP is measured by the Hall probe in front of the TMSB clamp.
With the magnetic flux density B a within the required qualified range, the clamp will release the s-TMSB and keep it on the magnet base. Otherwise, the s-TMSB will be moved to the next matching position of magnet base. If the s-TMSB cannot be matched after whole traversal, it will be put back to the initial position.

Control Strategy for TMSB Positioning Task
To make the safe and efficient positioning of TMSB in a complex magnetic environment, a visual/magnetism/force hybrid control strategy is proposed as shown in Figure 6. After the TMSP matching module is driven to the top of the first s-TMSB in list, the clamp is controlled to the position and then picks up the s-TMSB. The spatial positions of s-TMSBs and magnet bases are obtained via the microscopic imaging module. According to those photos, the coarse positioning of s-TMSB and the magnet base is realized. Using force servo and magnetic servo, the fine positioning is completed by controlling the feedback value of contact force and magnetic flux density. The micro-force sensor is integrated to obtain the contact force during the lowering of the clamp to determine whether it has reached the expected position. Once the contact force exceeds a given threshold (0.2 N), the 3D linear motorized stage stops the Z-direction displacement to ensure the safety of the Hall probe and the TMSBs. Then, the clamp is driven close to the TMSB along the negative Y-direction.
Once the magnetic flux density change measured by the Gauss meter is less than a threshold (1 mT) during the process, the 3D linear stage stops and the TMSB is fully positioned. After that, the air gripper is closed to clamp the TMSB. Then, the clamped s-TMSB is moved to the matching position of the magnet base.

Experiments
The TMSB measurement experiment, numerical experiment, and TMSP matching experiment are carried out. Before the experiments, the Gauss meter and the Hall probes are checked by professional verification organization (measuring range: 0.04-2.00 T, uncertainty: U rel = 2 × 10 -5 , k = 2).
The magnetic flux densities of TMSBs are measured with the visual/magnetism/force hybrid control strategy. Each TMSB is measured five times. The results of two s-TMSBs and two n-TMSBs are shown in Table 2. The average time for each TMSB measurement is ~15 s. The result shows that the device presents good repeatability (<1 mT) and the control strategy can guarantee the consistency.  The micro-force sensor is integrated to obtain the contact force during the lowering of the clamp to determine whether it has reached the expected position. Once the contact force exceeds a given threshold (0.2 N), the 3D linear motorized stage stops the Z-direction displacement to ensure the safety of the Hall probe and the TMSBs. Then, the clamp is driven close to the TMSB along the negative Y-direction.
Once the magnetic flux density change measured by the Gauss meter is less than a threshold (1 mT) during the process, the 3D linear stage stops and the TMSB is fully positioned. After that, the air gripper is closed to clamp the TMSB. Then, the clamped s-TMSB is moved to the matching position of the magnet base.

Experiments
The TMSB measurement experiment, numerical experiment, and TMSP matching experiment are carried out. Before the experiments, the Gauss meter and the Hall probes are checked by professional verification organization (measuring range: 0.04-2.00 T, uncertainty: U rel = 2 × 10 -5 , k = 2).
The magnetic flux densities of TMSBs are measured with the visual/magnetism/force hybrid control strategy. Each TMSB is measured five times. The results of two s-TMSBs and two n-TMSBs are shown in Table 2. The average time for each TMSB measurement is 15 s. The result shows that the device presents good repeatability (<1 mT) and the control strategy can guarantee the consistency. To further verify reliability and efficiency of the matching method, the numerical experiment is carried out with MATLAB. Different combinations of B S and B N are carefully selected (B S range: 220~275 mT, B N range: 130~170 mT), and data are combined to iterate 1500 pairs. Generally, the higher average B a of all matched TMSP in qualified range (490~550 mT) means that the matched combinations are more appropriate. As shown in Figure 7, the average value of air-gap magnetic flux density (B a ) by the K-M algorithmbased method can be basically stabilized at about 515 mT. When the number of matched pairs is small (<500), the running time is within 5 s. These results show that the method presents an advantage in multi-group matching, and is efficient and stable for the matching of an amount of TMSBs in production.  By using the developed device, five sets of s-TMSBs and magnet bases are ins to match for the experiment. The actual matching results are shown in Table 3. The ified range of BS here is 240~270 mT. A negative BS means that the TMSB is installed wrong direction, and a zero value means that no TMSB is installed in this position qualified range of BN is 140~155 mT, and the qualified range of Ba is 490~550 mT. As s in Table 3, B a matched by this device is within the required qualified range, and equal to 525 mT. These results show that the device can accurately match more su TMSPs from multiple sets of TMSBs and can successfully complete the microassem TMSB. The matching method and device can be modified for various TMSBs, whic great prospect in various related-magnetism microassembly tasks.  By using the developed device, five sets of s-TMSBs and magnet bases are installed to match for the experiment. The actual matching results are shown in Table 3. The qualified range of B S here is 240~270 mT. A negative B S means that the TMSB is installed in the wrong direction, and a zero value means that no TMSB is installed in this position. The qualified range of B N is 140~155 mT, and the qualified range of B a is 490~550 mT. As shown in Table 3, B a matched by this device is within the required qualified range, and B a is equal to 525 mT. These results show that the device can accurately match more suitable TMSPs from multiple sets of TMSBs and can successfully complete the microassembly of TMSB. The matching method and device can be modified for various TMSBs, which has great prospect in various related-magnetism microassembly tasks.

Conclusions
In this paper, a Kuhn-Munkres algorithm-based method and an automatic TMSP matching device are proposed to selectively match TMSPs from TMSBs. Especially, an ingenious clamp for multiple constraints of TMSB and a visual/magnetism/force hybrid control strategy are realized for safe and efficient manipulation of TMSBs in a magnetic environment. The result of the numerical experiment shows the reliability and efficiency of the Kuhn-Munkres algorithm-based matching method. The results of the measurement experiment and TMSP matching experiment show that the device has good repeatability (<1 mT) and practicability. The proposed matching method and automated device has great prospect in various magnetism-related microassembly tasks.