Welding control method and system applied to pulse welding machine
By acquiring the difference in image correlation and flatness and optimizing the welding path with the ant colony algorithm, the problem of low welding efficiency of the pulse welding machine is solved, and intelligent control and efficient welding are achieved.
Patent Information
- Application Number
- CN202510855386.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-07-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When welding mobile phone motor shrapnel and metal shells, existing pulse welding machines have problems with low welding efficiency, especially because the equipment stays and reduces efficiency due to unrecognized welding positions.
By obtaining the surface images of the motor shrapnel and metal shell to be welded, the correlation and flatness differences are calculated, the welding path is planned in combination with the ant colony algorithm, the welding locations are identified and screened out, and the welding paths are optimized to improve efficiency.
The welding efficiency is improved, the welding quality is ensured, and the recognition ability of unidentified areas is improved through multiple judgments, realizing intelligent control of the pulse welding machine.
Smart Images

Figure CN120362698A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of laser welding, and particularly to a welding control method and system applied to a pulse welding machine. Background Art
[0002] A pulse welding machine is a device that uses pulse current to heat the joint part of a workpiece to a molten or plastic state through resistance heat, thereby achieving welding. This welding technology is usually used for welding metal materials with good electrical conductivity, such as copper, aluminum, nickel, etc., and has the advantages of high welding efficiency, high welding quality, and the ability to precisely control the welding process. Therefore, it is widely used in occasions where high-precision and high-quality welding are required.
[0003] In the existing method for welding the motor shrapnel of a mobile phone camera to its metal shell, all the components to be welded are fixed in a metal plate, and the metal plate is fixed on the platform of the pulse welding machine. The components to be welded are placed directly below the pulse welding machine by moving the platform, and then the components are welded one by one through a preset moving trajectory. When there are welding positions on the metal plate that cannot be recognized, in order to ensure quality, they are usually not welded, but the pulse welding machine will move above them, resulting in a reduction in the welding efficiency of the motor shrapnel. Summary of the Invention
[0004] In order to solve the problem of low welding efficiency in the existing method for welding motor shrapnel, the purpose of the present invention is to provide a welding control method and system applied to a pulse welding machine, and the specific technical solutions adopted are as follows: In the first aspect, the present invention provides a welding control method applied to a pulse welding machine, and the method includes the following steps: Obtain the first surface image of the motor shrapnel to be welded and the second surface image of the metal shell; According to the first surface image and the second surface image, obtain the first correlation degree between each welding point of the motor shrapnel to be welded and the welding position on the metal shell, and the second correlation degree between each welding point and the reference area, where the reference area is an area obtained by expanding the welding position; combine the first correlation degree and the second correlation degree to identify the first welding position corresponding to the welding point of the motor shrapnel to be welded; Combine the flatness difference between each unrecognized welding position on the metal shell and the corresponding standard position, and the matching degree between each unrecognized welding position and the corresponding welding point of the motor shrapnel to be welded, and screen out the second welding position from all unrecognized welding positions; combine the recognition situation of the corresponding to-be-recognized positions on the metal shell during the historical recognition process to identify the third welding position, where the to-be-recognized position is the welding position on the metal shell except the first welding position and the second welding position. Determine the target welding position corresponding to the motor spring to be welded on the metal plate in combination with the distribution of the first welding position, the second welding position and the third welding position, and use the ant colony algorithm to determine the welding path between the motor spring and the metal shell and perform welding.
[0005] Preferably, obtaining the first correlation degree between each welding point to be welded of the motor spring to be welded and the welding position on the metal shell includes: For any welding point to be welded of the motor spring to be welded: Calculate the similarity between the gray value of the welding position on the metal shell matched by the welding point to be welded and the gray value of the corresponding position pixel point on the standard metal shell, and use it as the first correlation degree between the welding point to be welded and the welding position on the metal shell.
[0006] Preferably, the second correlation degree between each welding point to be welded and the reference area includes: For any welding point to be welded of the motor spring to be welded: Use a sliding window to slide on the reference area to obtain a plurality of sliding window areas. The sliding step of the sliding window is 1, and the size of the sliding window is equal to the size of the welding point to be welded; Calculate the similarity between the gray value of the pixel points in the area where the welding point to be welded is located and the gray value of the pixel points in each sliding window area respectively, and record it as the correlation degree of each sliding window area; take the maximum value of the correlation degrees of all sliding window areas as the second correlation degree between the welding point to be welded and the reference area; The reference area is an area obtained by extending the length and width of the welding position by a preset length respectively.
[0007] Preferably, combining the first correlation degree and the second correlation degree to identify the first welding position corresponding to the welding point to be welded of the motor spring to be welded includes: For any welding point to be welded of the motor spring to be welded: Calculate the normalized result of the average value of the first correlation degree between the welding point to be welded and the welding position on the metal shell and the second correlation degree between the welding point to be welded and the reference area. If the normalized result is greater than the preset matching threshold, then use the sliding window area corresponding to the maximum value of the correlation degree as the first welding position corresponding to the welding point to be welded.
[0008] Preferably, screening the second welding position from all unrecognized welding positions by combining the flatness difference between each unrecognized welding position on the metal shell and the corresponding standard position and the matching degree between each unrecognized welding position and the corresponding welding point to be welded of the motor spring to be welded includes: Obtain the welding index of the position to be analyzed based on the difference between the flatness of the position to be analyzed and the flatness of the corresponding standard position, and the matching degree between the position to be analyzed and the corresponding welding points of the motor spring plate to be welded. The matching degree is positively correlated with the welding index, and the difference between the flatnesses is negatively correlated with the welding index; Judge whether the position to be analyzed is the second welding position according to the welding index; The position to be analyzed is any unrecognized welding position on the metal shell.
[0009] Preferably, judging whether the position to be analyzed is the second welding position according to the welding index includes: if the welding index is greater than a preset welding threshold, determine that the position to be analyzed is the second welding position.
[0010] Preferably, identifying the third welding position by combining the recognition situation of the corresponding positions to be recognized on the metal shell during the historical recognition process includes: For any position to be recognized: Take the ratio between the number of times the corresponding position to be recognized on the metal shell was recognized during the historical recognition process and the total number of motor spring plates welded on the metal shell in the historical data as the recognition rate of any position to be recognized; Calculate the first difference between a preset value and the recognition rate. If the welding index of any position to be recognized is greater than the first difference, take any position to be recognized as the third welding position.
[0011] Preferably, determining the target welding position corresponding to the motor spring plate to be welded on the metal plate by combining the distributions of the first welding position, the second welding position, and the third welding position includes: For any motor spring plate to be welded: Record the first welding position, the second welding position, and the third welding position as welding areas. If all the welding points of any motor spring plate to be welded have successfully matched welding areas, take the position corresponding to the metal plate when any motor spring plate to be welded is successfully matched as the target welding position corresponding to the motor spring plate to be welded on the metal plate.
[0012] Preferably, using the ant colony algorithm to determine the welding path between the motor spring plate and the metal shell includes: Obtain several welding paths using the ant colony algorithm; Calculate the second difference between a preset constant and the number of nodes passed by each welding path; the nodes are the target welding positions; According to the number of blocking grids passed by each welding path, the number of direction reversals during the movement of each welding path, and the second difference, the efficiency index of each welding path is obtained. The number of blocking grids passed and the number of direction reversals are both negatively correlated with the efficiency index, and the second difference is positively correlated with the efficiency index; The welding path with the maximum efficiency index is used as the welding path when the motor elastic piece is welded to the metal shell.
[0013] In a second aspect, the present invention provides a welding control system applied to a pulse welding machine. The system includes: A data acquisition module for acquiring a first surface image of the motor elastic piece to be welded and a second surface image of the metal shell; A first screening module for obtaining, according to the first surface image and the second surface image, the first correlation between each welding point to be welded of the motor elastic piece to be welded and the welding position on the metal shell, and the second correlation between each welding point to be welded and the reference area. The reference area is an area obtained by expanding the welding position; combining the first correlation and the second correlation to identify the first welding position corresponding to the welding point to be welded of the motor elastic piece to be welded; A second screening module for screening the second welding position from all unrecognized welding positions by combining the flatness difference between each unrecognized welding position on the metal shell and the corresponding standard position, and the matching degree between each unrecognized welding position and the corresponding welding point to be welded of the motor elastic piece to be welded; combining the recognition situation of the corresponding position to be recognized on the metal shell during the historical recognition process to identify the third welding position. The position to be recognized is the welding position on the metal shell except the first welding position and the second welding position; A welding path determination module for determining the target welding position corresponding to the motor elastic piece to be welded on the metal plate by combining the distributions of the first welding position, the second welding position, and the third welding position, and using the ant colony algorithm to determine the welding path of the motor elastic piece and the metal shell and perform welding.
[0014] The present invention has at least the following beneficial effects: The present invention first acquires the first surface image of the motor spring plate to be welded and the second surface image of the metal shell, expands the welding positions on the metal shell to obtain a reference area, evaluates the correlation between each welding point of the motor spring plate to be welded and the welding positions on the metal shell, as well as the correlation between each welding point and the reference area, and then identifies the first welding position corresponding to the welding point of the motor spring plate to be welded, that is, initially matches the welding points on the motor spring plate with the welding positions on the metal shell, and screens out the first welding positions with successful initial matching. There are multiple welding positions between a motor spring plate and the metal shell, and the matching rate may vary due to differences in angles at different positions, that is, the difficulty of identifying different welding areas is different. Therefore, in combination with the flatness difference between each unrecognized welding position on the metal shell and the corresponding standard position, and the matching degree between each unrecognized welding position and the corresponding welding point of the motor spring plate to be welded, multiple second welding positions are screened out from all unrecognized welding positions. Also, according to the recognition situation of the corresponding positions to be recognized on the metal shell during the historical recognition process, the remaining welding positions on the metal shell are matched, and multiple third welding positions are screened out. Furthermore, the target welding position corresponding to the motor spring plate to be welded on the metal plate is determined, and the ant colony algorithm is used to complete the planning of the welding path of the pulse welding machine, so that the pulse welding machine can complete the welding of the motor spring plate on the metal plate with the shortest path, improving the welding efficiency and realizing the intelligent control of the pulse welding machine. At the same time, when positioning the welding position, the unrecognized areas are analyzed through multiple judgments, improving the recognition ability of the welding position to be welded and ensuring the welding quality of the motor spring plate. Brief Description of the Drawings
[0015] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0016] Figure 1 It is a flowchart of a welding control method applied to a pulse welding machine provided by an embodiment of the present invention; Figure 2 It is a structural block diagram of a welding control system applied to a pulse welding machine provided by an embodiment of the present invention. Detailed Embodiments
[0017] To further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following provides a detailed description of the welding control method and system applied to a pulse welding machine according to the present invention in conjunction with the accompanying drawings and preferred embodiments as follows.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0019] The following specifically describes the specific solutions of the welding control method and system applied to a pulse welding machine provided by the present invention in conjunction with the accompanying drawings.
[0020] Embodiment of the welding control method applied to a pulse welding machine: The specific scenario targeted by this embodiment is: during the welding process of the VCM motor shrapnel and the metal housing behind the mobile phone lens, the pulse welding machine welds the motor shrapnel and the metal housing through the processes of photographing and positioning components, detecting the flatness of the welding position, positioning the welding points, and single-beam galvanometer welding. When the flatness of the welding position between the motor shrapnel and the metal housing is insufficient or an identification error occurs in the welding area, in order to ensure the quality of the final product, the pulse welding machine does not need to weld this component. However, due to the existence of the preset welding path, the device will still stay on the component that does not need to be welded, thus reducing the welding efficiency of the pulse welding machine. For components that do not need to be welded, the welding path planning can choose not to pass through this position, thereby reducing the moving path of the pulse welding machine.
[0021] This embodiment proposes a welding control method applied to a pulse welding machine, as Figure 1 shown, a welding control method applied to a pulse welding machine in this embodiment includes the following steps: Step S1, obtain the first surface image of the motor shrapnel to be welded and the second surface image of the metal housing.
[0022] First, before welding the motor shrapnel to be welded and the metal shell behind the mobile phone lens using a pulse welding machine, place and fix the motor shrapnel to be welded and the metal shell on a metal plate, and place the metal plate on the platform of the pulse welding machine. Then, use the camera module on the pulse welding machine to take pictures of the surface of the motor shrapnel to be welded and the surface of the metal shell, obtaining the RGB image of the surface of the motor shrapnel to be welded and the RGB image of the surface of the metal shell. It should be noted that the number of motor shrapnels to be welded is multiple, and the specific number is determined according to the specific welding situation of the metal shell. Then, perform grayscale processing on all the collected RGB images. The image obtained after grayscale processing of the RGB image of the surface of the motor shrapnel to be welded is recorded as the first surface image of the motor shrapnel to be welded, and the image obtained after grayscale processing of the RGB image of the surface of the metal shell is recorded as the second surface image of the metal shell. Image grayscale processing is a prior art and will not be elaborated here.
[0023] Thus, the first surface image of each motor shrapnel to be welded and the second surface image of the metal shell are obtained.
[0024] Step S2: According to the first surface image and the second surface image, obtain the first correlation between each welding point of the motor shrapnel to be welded and the welding position on the metal shell, and the second correlation between each welding point and the reference area, where the reference area is an area obtained by expanding the welding position; combine the first correlation and the second correlation to identify the first welding position corresponding to the welding point of the motor shrapnel to be welded.
[0025] After collecting the first surface image of the motor shrapnel to be welded and the second surface image of the metal shell, this embodiment will analyze the matching degree between the motor shrapnel to be welded and the metal shell according to the collected first surface image and the second matching image.
[0026] For any motor shrapnel to be welded, there are four welding positions provided between it and the metal shell. Therefore, there are four welding points above the motor shrapnel to be welded. In this embodiment, any welding point on any motor shrapnel to be welded will be taken as an example for illustration. The same method provided in this embodiment can be used to process the other welding points on this motor shrapnel and all the welding points on other motor shrapnels to be welded.
[0027] Specifically, for any welding point of the motor shrapnel to be welded: Calculate the similarity between the grayscale value of the welding position on the metal housing corresponding to the to-be-welded point and the grayscale value of the pixel point at the corresponding position on the standard metal housing, and use it as the first correlation degree between the to-be-welded point and the welding position on the metal housing. The calculation method of the similarity is prior art and will not be elaborated here. Denote the area obtained by extending the length and width of the welding position on the metal housing by a preset length as the reference area. It should be noted that when extending the length of the welding position on the metal housing, on the original basis, extend half of the preset length in each of the two opposite directions to obtain a new length; when extending the width of the welding position on the metal housing, on the original basis, extend half of the preset length in each of the two opposite directions to obtain a new width. The obtained reference area has the same center point as the welding position on the metal housing and does not change. In specific applications, the implementer can set the preset length and the reference area according to the specific situation, and it is necessary to ensure that the reference area contains the welding position on the metal housing. Use a sliding window to slide on the reference area to obtain multiple sliding window areas. The sliding step of the sliding window is 1, and the size of the sliding window is equal to the size of the to-be-welded point.
[0028] Calculate the similarity between the grayscale value of the pixel points in the area where the to-be-welded point is located and the grayscale value of the pixel points in each sliding window area respectively, and denote it as the correlation degree of each sliding window area; take the maximum value of the correlation degrees of all sliding window areas as the second correlation degree between the to-be-welded point and the reference area.
[0029] Then, calculate the normalized result of the average value of the first correlation degree between the to-be-welded point and the welding position on the metal housing and the second correlation degree between the to-be-welded point and the reference area. If the normalized result is greater than the preset matching threshold, then take the sliding window area corresponding to the maximum value of the correlation degree as the first welding position corresponding to the to-be-welded point. In this embodiment, a linear normalization method is used to normalize the average value of the first correlation degree and the second correlation degree. This normalization method is prior art and will not be elaborated here. In this embodiment, the preset matching threshold is 0.9. In specific applications, the implementer can set it according to the specific situation.
[0030] Using the above method, it is possible to screen out the first welding position corresponding to some of the to-be-welded points of the to-be-welded motor spring piece from the welding positions on the metal housing. The first welding position is the position that successfully matches the welding point on the motor spring piece, that is, the position where welding can be performed.
[0031] Step S3: Screen a second welding position from all unrecognized welding positions on the metal shell by combining the flatness difference between each unrecognized welding position on the metal shell and the corresponding standard position and the matching degree between each unrecognized welding position and the corresponding welding point of the motor elastic sheet to be welded; recognize a third welding position by combining the recognition situation of the corresponding position to be recognized on the metal shell during the historical recognition process, where the position to be recognized is the welding position on the metal shell except the first welding position and the second welding position.
[0032] Since there are multiple welding points for a motor elastic sheet to be welded, for a motor elastic sheet to be welded, there may be a situation where some welding points are not successfully matched. Therefore, in order to further screen the unrecognized positions.
[0033] When matching the welding positions, there may be deviations between the motor elastic sheet and the welding positions on the metal shell and the standard data, that is, there are differences between the already matched welding positions and the standard data. The approximate position of the unrecognized welding position can be determined by relative position positioning.
[0034] Next, this embodiment takes any unrecognized welding position on the metal shell as an example for illustration, and the method provided in this embodiment can be used to process other recognized welding positions.
[0035] Specifically, mark any unrecognized welding position on the metal shell as the position to be analyzed. According to the flatness difference between the flatness of the position to be analyzed and the corresponding standard position and the matching degree between the position to be analyzed and the corresponding welding point of the motor elastic sheet to be welded, obtain the welding index of the position to be analyzed. The matching degree is positively correlated with the welding index, and the flatness difference is negatively correlated with the welding index.
[0036] In this embodiment, the cosine similarity is used to characterize the matching degree, that is, the cosine similarity between the gray values of the pixel points of the position to be analyzed and the gray values of the corresponding welding points of the motor elastic sheet to be welded is used as the corresponding matching degree. The methods for obtaining the cosine similarity and the flatness are prior arts and will not be elaborated here.
[0037] It should be noted that: the corresponding standard position of the position to be analyzed is the position on the pre-acquired standard metal shell that belongs to the same position as the position to be analyzed.
[0038] Among them, the positive correlation means that the dependent variable will increase as the independent variable increases and the dependent variable will decrease as the independent variable decreases. It can be an additive relationship, a multiplicative relationship, etc., which is determined by the actual application; the negative correlation means that the dependent variable will decrease as the independent variable increases and the dependent variable will increase as the independent variable decreases. It can be a subtractive relationship, a divisive relationship, etc., which is determined by the actual application.
[0039] In this embodiment, a specific calculation formula for the welding index is given. The welding index of the u-th unrecognized welding position can be expressed as: Wherein, represents the welding index of the u-th unrecognized welding position, represents the matching degree between the u-th unrecognized welding position and the corresponding welding point of the motor spring to be welded, represents the flatness of the u-th unrecognized welding position, represents the flatness of the standard position corresponding to the u-th unrecognized welding position, represents a preset first adjustment parameter, represents the absolute value symbol, and norm( ) represents a linear normalization function.
[0040] Introducing the preset first adjustment parameter into the calculation formula of the welding index is to prevent the denominator from being 0. In this embodiment, the preset first adjustment parameter is 0.01. In specific applications, the implementer can set it according to specific situations.
[0041] is used to characterize the flatness difference between the u-th unrecognized welding position and the corresponding standard position. The larger this value is, the greater the difference between the two. When the matching degree between the u-th unrecognized welding position and the corresponding welding point of the motor spring to be welded is smaller and the flatness difference between the u-th unrecognized welding position and the corresponding standard position is larger, it indicates that the u-th unrecognized welding position is less matched with the corresponding welding point of the motor spring to be welded. At this time, it is less possible to weld the welding point on the motor spring to the u-th unrecognized welding position, that is, the welding index of the u-th unrecognized welding position is smaller.
[0042] By using the above method, the welding index of each unrecognized welding position can be obtained. If the welding index is greater than the preset welding threshold, the corresponding unrecognized welding position is determined as the second welding position. In this embodiment, the preset welding threshold is 0.8. In specific applications, the implementer can set it according to specific situations. Thus, by using the above method, multiple second welding positions can be screened out from all unrecognized welding positions.
[0043] A motor spring has four welding positions with the metal shell. Due to the difference in angles, the matching rates of different positions may vary, that is, the difficulty levels of identifying different welding areas to be welded are different. For the welding areas to be welded that are more difficult to identify, the judgment threshold can be reduced, thus ensuring the welding efficiency.
[0044] The welding positions on the metal housing other than the first welding position and the second welding position are denoted as positions to be recognized. Next, in this embodiment, the third welding position will be recognized in combination with the recognition situation of the positions to be recognized corresponding to the metal housing during the historical recognition process.
[0045] Specifically, for any position to be recognized: The ratio between the number of times the position to be recognized corresponding to the metal housing was recognized during the historical recognition process and the total number of motor spring pieces welded on the metal housing in the historical data is used as the recognition rate of this position to be recognized; calculate the first difference between the preset value and the recognition rate. If the welding index of any position to be recognized is greater than the first difference, it is considered that welding can be performed at this hole position, and the corresponding position to be recognized is used as the third welding position. In this embodiment, the preset value is 1.3. In specific applications, the implementer can set it according to specific situations.
[0046] Using the above method, multiple third welding positions are screened out.
[0047] Step S4, in combination with the distributions of the first welding position, the second welding position, and the third welding position, determine the target welding position corresponding to the motor spring piece to be welded on the metal plate, and use the ant colony algorithm to determine the welding path between the motor spring piece and the metal housing and perform welding.
[0048] In this embodiment, multiple first welding positions, second welding positions, and third welding positions are screened out. The first welding position, the second welding position, and the third welding position are all denoted as welding areas. For any motor spring piece to be welded, if all the points to be welded of this motor spring piece to be welded have successfully matched welding areas, that is, there are welding areas for all four points to be welded, then the position corresponding to the metal plate when this motor spring piece to be welded is successfully matched is used as the target welding position corresponding to the motor spring piece to be welded on the metal plate. Mark the components on the metal plate that can recognize four welding areas, that is, the components that need to be welded, which completes the positioning of the positions to be welded of all components on the metal plate and determines all the component hole positions that can be welded. According to the marked hole positions that need to be welded, next, the welding path of the pulse welder will be planned in combination with the ant colony algorithm (traveling salesman problem). The specific process is as follows: (1) First, determine the starting point of the ant colony on the metal plate, that is, the first hole position to be welded in the upper left corner; (2) Subsequently, set the operating rules of the ant colony algorithm; (3) Regard each hole position as a node, and the hole positions that do not need to be welded are regarded as obstacles, that is, obstacle grids; (4) Each ant can only act once, so each ant represents a solution; (5) The ant needs to pass through each node without passing through the obstacle grid, and each node is only passed through once; Specifically, when the current position of the ant has only blocked cells and there are unvisited nodes, it can pass through the blocked cells; (7) The ant cannot return to the nodes it has already passed. The same applies to blocked cells. If the ant gets into a dead end and there are unvisited nodes, mark this path as an incorrect path.
[0049] Next, run the ant colony algorithm according to the above rules to obtain the action paths of all ants, that is, the welding paths of the pulse welding machine. The ant colony algorithm is a prior art and will not be elaborated here. Then, according to the number of blocked cells passed by each welding path, the number of direction changes during the movement of each welding path, and the second difference, obtain the efficiency index of each welding path. Specifically, calculate the second difference between the preset constant and the number of nodes passed by each welding path; the node is the target welding position; according to the number of blocked cells passed by each welding path, the number of direction changes during the movement of each welding path, and the second difference, obtain the efficiency index of each welding path. The number of blocked cells passed and the number of direction changes are both negatively correlated with the efficiency index, and the second difference is positively correlated with the efficiency index.
[0050] Among them, the positive correlation means that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases. It can be an additive relationship, a multiplicative relationship, etc., which is determined by the actual application; the negative correlation means that the dependent variable will decrease as the independent variable increases, and the dependent variable will increase as the independent variable decreases. It can be a subtractive relationship, a divisive relationship, etc., which is determined by the actual application.
[0051] In this embodiment, a specific calculation formula for the efficiency index is given. The efficiency index of the v-th welding path can be expressed as: Among them, represents the efficiency index of the v-th welding path, represents the number of blocked cells passed by the v-th welding path, represents the number of direction changes during the movement of the v-th welding path, represents the number of nodes passed by the v-th welding path, represents the preset constant. represents the second difference, and norm( ) represents the linear normalization function.
[0052] In this embodiment, the preset constant is 32. In specific applications, the implementer can set it according to the specific situation. The fewer the number of blocking grids passed by the v-th welding path, the more efficient the welding using this welding path. The fewer the number of direction changes during the movement of the v-th welding path, the more efficient the welding using this welding path. The second difference is used to reflect the difference between the v-th welding path and the maximum distance path. The greater the difference, the more efficient the v-th welding path.
[0053] By using the above method, the efficiency index of each welding path can be obtained, and the welding path with the maximum efficiency index is used as the welding path when welding the motor elastic piece and the metal shell.
[0054] According to the welding path planned in the above steps for welding the motor elastic piece and the metal shell, perform the welding operation of the pulse welding machine to obtain the required welding result.
[0055] Subsequently, check the un-welded components on the metal plate to determine the reasons why their welding positions are not recognized, such as dirt, reduced flatness, etc., and solve this problem. At the same time, evaluate the welding effect of the already welded VCM motor elastic pieces, judge them according to the standard welding results, collect the VCM motor elastic pieces that meet the welding result requirements, analyze the reasons for the abnormalities of the unqualified elastic pieces, and adjust the working parameters of the pulse welding machine.
[0056] So far, by using the method provided in this embodiment, the welding work of the VCM motor elastic piece and the metal plate has been completed.
[0057] In this embodiment, the first surface image of the motor shrapnel to be welded and the second surface image of the metal shell are first collected, and the welding position on the metal shell is expanded to obtain a reference area. The correlation degree between each welding point of the motor shrapnel to be welded and the welding position on the metal shell and the correlation degree between each welding point and the reference area are evaluated, and then the first welding position corresponding to the welding point of the motor shrapnel to be welded is identified, that is, the welding point on the motor shrapnel is initially matched with the welding position on the metal shell, and the first welding positions with successful initial matching are screened out. There are multiple welding positions between a motor shrapnel and the metal shell, and the matching rate may vary due to differences in angles at different positions, that is, the difficulty of identifying different welding areas is different. Therefore, considering the flatness difference between each unrecognized welding position on the metal shell and the corresponding standard position and the matching degree between each unrecognized welding position and the corresponding welding point of the motor shrapnel to be welded, multiple second welding positions are screened out from all unrecognized welding positions. Also, according to the recognition situation of the corresponding positions to be recognized on the metal shell during the historical recognition process, the remaining welding positions on the metal shell are matched, and multiple third welding positions are screened out. Then, the target welding position corresponding to the motor shrapnel to be welded on the metal plate is determined, and the ant colony algorithm is used to complete the planning of the welding path of the pulse welding machine, so that the pulse welding machine can complete the welding of the motor shrapnel on the metal plate with the shortest path, improving the welding efficiency and realizing the intelligent control of the pulse welding machine. At the same time, when positioning the welding position, the unrecognized areas are analyzed through multiple judgments, improving the recognition ability of the welding position to be welded and ensuring the welding efficiency of the motor shrapnel.
[0058] Embodiment of a welding control system applied to a pulse welding machine: Refer to Figure 2 , which shows the structural block diagram of a welding control system applied to a pulse welding machine provided by an embodiment of the present invention. The system may include a data acquisition module, a first screening module, a second screening module, and a welding path determination module.
[0059] Among them, the data acquisition module is used to obtain the first surface image of the motor shrapnel to be welded and the second surface image of the metal shell; The first screening module is used to obtain the first correlation degree between each welding point of the motor shrapnel to be welded and the welding position on the metal shell and the second correlation degree between each welding point and the reference area according to the first surface image and the second surface image, where the reference area is the area obtained by expanding the welding position; identify the first welding position corresponding to the welding point of the motor shrapnel to be welded by combining the first correlation degree and the second correlation degree; A second screening module, configured to screen a second welding position from all unrecognized welding positions by combining the flatness difference between each unrecognized welding position on the metal housing and the corresponding standard position, and the matching degree between each unrecognized welding position and the corresponding welding point of the motor elastic piece to be welded; identify a third welding position by combining the recognition situation of the corresponding position to be recognized on the metal housing during the historical recognition process, where the position to be recognized is the welding position on the metal housing except the first welding position and the second welding position; A welding path determination module, configured to determine the target welding position corresponding to the motor elastic piece to be welded on the metal plate by combining the distributions of the first welding position, the second welding position and the third welding position, and use the ant colony algorithm to determine the welding path between the motor elastic piece and the metal housing and perform welding.
[0060] It should be understood that Figure 2 The structural block diagram of the welding control system applied to the pulse welding machine and its modules shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented by hardware, software, or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by a suitable instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art can understand that the above methods and systems can be implemented using computer-executable instructions and / or included in the processor control code. For example, such code is provided on a carrier medium such as a disk, CD or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The system and its modules of this specification can not only be implemented by a hardware circuit of a programmable hardware device such as a very large scale integrated circuit or a gate array, a semiconductor such as a logic chip or a transistor, or a field programmable gate array or a programmable logic device, but also be implemented by software executed by various types of processors, or be implemented by a combination of the above hardware circuit and software (for example, firmware).
[0061] For more details about the above-mentioned modules, reference can be made to other positions in this specification, and details will not be elaborated here.
[0062] In other embodiments, a welding control device for a pulse welding machine is further provided, including a memory and a processor. The memory is used to store executable program codes, and the processor is used to call and run the executable program codes from the memory, so that the device executes the above-mentioned welding control method for a pulse welding machine. The device may specifically be a chip, a component or a module. The chip may include a processor and a memory connected thereto. Among them, the memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute the welding control method for a pulse welding machine provided in the above embodiments.
[0063] In other embodiments, a computer program product is further provided. When the computer program product runs on a computer, the computer is enabled to execute the above-related steps to implement the welding control method for a pulse welding machine provided in the above embodiments.
[0064] In other embodiments, a computer-readable storage medium is further provided. The computer-readable storage medium stores computer program codes. When the computer program codes run on a computer, the computer is enabled to execute the above-related method steps to implement the welding control method for a pulse welding machine provided in the above embodiments.
[0065] Among them, the provided system, electronic device, computer program product, and computer-readable storage medium are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here.
[0066] It should be noted that the above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A welding control method applied to a pulse welding machine, characterized in that, The method includes the following steps: Obtain a first surface image of the motor shrapnel to be welded and a second surface image of the metal shell; According to the first surface image and the second surface image, obtain a first correlation degree between each welding point of the motor shrapnel to be welded and the welding position on the metal shell, and a second correlation degree between each welding point and the reference area, where the reference area is an area obtained by expanding the welding position; combine the first correlation degree and the second correlation degree to identify the first welding position corresponding to the welding point of the motor shrapnel to be welded; Combine the flatness difference between each unrecognized welding position on the metal shell and the corresponding standard position, and the matching degree between each unrecognized welding position and the corresponding welding point of the motor shrapnel to be welded, and screen the second welding position from all unrecognized welding positions; combine the recognition situation of the corresponding to-be-recognized position on the metal shell during the historical recognition process to identify the third welding position, where the to-be-recognized position is the welding position on the metal shell except the first welding position and the second welding position; Combine the distributions of the first welding position, the second welding position, and the third welding position to determine the target welding position corresponding to the motor shrapnel to be welded on the metal plate, and use the ant colony algorithm to determine the welding path between the motor shrapnel and the metal shell and perform welding.
2. The welding control method applied to a pulse welding machine according to claim 1, characterized in that The obtaining of the first correlation degree between each welding point of the motor shrapnel to be welded and the welding position on the metal shell includes: For any welding point of the motor shrapnel to be welded: Calculate the similarity between the gray value of the welding position on the metal shell matched by the welding point and the gray value of the corresponding position pixel on the standard metal shell, and use it as the first correlation degree between the welding point and the welding position on the metal shell.
3. The welding control method applied to a pulse welding machine according to claim 1, characterized in that The second correlation degree between each welding point and the reference area includes: For any welding point of the motor shrapnel to be welded: Use a sliding window to slide on the reference area to obtain a plurality of sliding window areas, the sliding step of the sliding window is 1, and the size of the sliding window is equal to the size of the welding point; Calculate the similarity between the gray values of the pixel points in the area where the welding point is located and the gray values of the pixel points in each sliding window area respectively, and record it as the correlation degree of each sliding window area; take the maximum value of the correlation degrees of all sliding window areas as the second correlation degree between the welding point and the reference area; The reference area is an area obtained by extending the length and width of the welding position by a preset length respectively.
4. The welding control method applied to a pulse welding machine according to claim 3, wherein, The combining the first correlation degree and the second correlation degree to identify the first welding position corresponding to the welding point of the motor shrapnel to be welded includes: For any welding point of the motor shrapnel to be welded: Calculate the normalized result of the average value of the first correlation degree between the welding point and the welding position on the metal shell and the second correlation degree between the welding point and the reference area. If the normalized result is greater than the preset matching threshold, then use the sliding window area corresponding to the maximum value of the correlation degree as the first welding position corresponding to the welding point.
5. The welding control method applied to a pulse welding machine according to claim 1, characterized in that, Combining the flatness difference between each unrecognized welding position on the metal housing and the corresponding standard position, and the matching degree between each unrecognized welding position and the corresponding welding point of the motor elastic sheet to be welded, screening the second welding position from all unrecognized welding positions, including: Obtaining the welding index of the position to be analyzed according to the difference between the flatness of the position to be analyzed and the flatness of the corresponding standard position, and the matching degree between the position to be analyzed and the corresponding welding point of the motor elastic sheet to be welded. The matching degree has a positive correlation with the welding index, and the difference between the flatness has a negative correlation with the welding index; Judging whether the position to be analyzed is the second welding position according to the welding index; The position to be analyzed is any unrecognized welding position on the metal housing.
6. The welding control method applied to a pulse welding machine according to claim 5, characterized in that, The judging whether the position to be analyzed is the second welding position according to the welding index includes: if the welding index is greater than the preset welding threshold, it is determined that the position to be analyzed is the second welding position.
7. The welding control method applied to a pulse welding machine according to claim 5, wherein Combining the recognition situation of the corresponding positions to be recognized on the metal housing during the historical recognition process, recognizing the third welding position, including: For any position to be recognized: Taking the ratio of the number of times the corresponding position to be recognized on the metal housing is recognized during the historical recognition process to the total number of motor elastic sheets welded on the metal housing in the historical data as the recognition rate of the any position to be recognized; Calculating the first difference between the preset value and the recognition rate. If the welding index of the any position to be recognized is greater than the first difference, taking the any position to be recognized as the third welding position.
8. The welding control method applied to a pulse welding machine according to claim 1, characterized in that, Combining the distributions of the first welding position, the second welding position and the third welding position to determine the target welding position corresponding to the motor elastic sheet to be welded on the metal plate, including: For any motor elastic sheet to be welded: Recording the first welding position, the second welding position and the third welding position as welding areas. If all the welding points of the any motor elastic sheet to be welded have successfully matched welding areas, taking the position corresponding to the metal plate when the any motor elastic sheet is successfully matched as the target welding position corresponding to the motor elastic sheet to be welded on the metal plate.
9. The welding control method applied to a pulse welding machine according to claim 8, characterized in that, Using the ant colony algorithm to determine the welding path between the motor elastic sheet and the metal housing, including: Using the ant colony algorithm to obtain several welding paths; Calculating the second difference between the preset constant and the number of nodes passed by each welding path; the node is the target welding position; According to the number of blocked grids passed by each welding path, the number of direction changes during the movement of each welding path and the second difference, obtaining the high-efficiency index of each welding path. The number of blocked grids passed and the number of direction changes are both negatively correlated with the high-efficiency index, and the second difference is positively correlated with the high-efficiency index; Taking the welding path with the maximum high-efficiency index as the welding path when the motor elastic sheet and the metal housing are welded.
10. A welding control system applied to a pulse welding machine, characterized in that, The system includes: A data acquisition module for acquiring the first surface image of the motor elastic sheet to be welded and the second surface image of the metal housing; The first screening module is used to obtain the first correlation degree between each welding point to be welded of the motor shrapnel to be welded and the welding position on the metal shell, and the second correlation degree between each welding point to be welded and the reference area according to the first surface image and the second surface image, where the reference area is an area obtained by expanding the welding position; identify the first welding position corresponding to the welding point to be welded of the motor shrapnel to be welded by combining the first correlation degree and the second correlation degree; The second screening module is used to screen the second welding position from all unrecognized welding positions by combining the flatness difference between each unrecognized welding position on the metal shell and the corresponding standard position, and the matching degree between each unrecognized welding position and the corresponding welding point to be welded of the motor shrapnel to be welded; identify the third welding position by combining the recognition situation of the position to be recognized corresponding to the metal shell in the historical recognition process, where the position to be recognized is the welding position on the metal shell except the first welding position and the second welding position; The welding path determination module is used to determine the target welding position corresponding to the motor shrapnel to be welded on the metal plate by combining the distributions of the first welding position, the second welding position and the third welding position, and use the ant colony algorithm to determine the welding path between the motor shrapnel and the metal shell and perform welding.
Citation Information
Patent Citations
Metal base voice coil motor
CN110034657A
Method for detecting welding point of coil
KR1020130073590A