Flat wire motor stator laser welding method and device, electronic equipment and storage medium
By determining the mark diagram and correcting the optical path in the flat line motor stator laser welding equipment, calculating the affine transformation matrix, high-precision welding is achieved, product defects caused by large welding errors are solved, and product quality is improved.
Patent Information
- Application Number
- CN202510943512.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-08-19
AI Technical Summary
There are large welding errors during laser welding of existing flat wire motors, resulting in unqualified product quality and defects such as pores, tilted heads, burned patent skins, sharp corners, and false welding.
By performing mark diagram determination, optical path correction coefficient and affine transformation matrix calculation in the laser welding equipment, surface images are collected and welding execution coordinates are determined, and the laser welding equipment is controlled for high-precision welding.
Effectively reduce errors during welding, realize high-quality welding processing of flat wire stators, and improve product pass rate.
Smart Images

Figure CN120502854A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of laser welding, and in particular to a flat wire motor stator laser welding method, device, electronic equipment and storage medium. Background Art
[0002] Laser welding of flat-wire motor stators utilizes laser technology. Its high energy density, instantaneous melting, and deep penetration weld characteristics enable efficient welding of flat-wire motor stators. However, the laser welding process can easily produce defects such as pores, misalignment, burnt paint, sharp corners, and cold welds. These defects not only affect the product's appearance but also compromise the electrical conductivity between the copper wires, reducing product quality and even rendering the product scrapped.
[0003] Therefore, in order to ensure the quality of laser welding, a visual inspection and control system is equipped to continuously detect during the welding process to ensure the quality of flat wire motor stator welding. However, the existing control system cannot effectively eliminate errors in the welding process and cannot effectively guarantee the welding accuracy. Summary of the Invention
[0004] The present invention provides a flat wire motor stator laser welding method, device, electronic equipment and storage medium. Before laser welding the flat wire motor stator, the laser system and vision system of the welding device are calibrated, thereby effectively reducing errors in the welding process, achieving high-quality welding processing of the flat wire stator, reducing product defects and ensuring product qualification rate.
[0005] According to one aspect of the present invention, a flat wire motor stator laser welding method is provided, which includes:
[0006] Determine the logo corresponding to the laser welding equipment;
[0007] Determine an optical path correction coefficient for the laser welding device based on the logo image, and determine an affine transformation matrix according to the optical path correction coefficient and the logo image;
[0008] Acquiring a surface image corresponding to the stator to be welded, and determining welding execution coordinates according to the affine transformation matrix and the surface image;
[0009] The laser welding device is controlled based on the welding execution coordinates to perform laser welding on the stator to be welded.
[0010] According to another aspect of the present invention, a flat wire motor stator laser welding device is provided, comprising:
[0011] A logo image determination module, which determines a logo image corresponding to the laser welding equipment;
[0012] an affine transformation matrix determination module, configured to determine an optical path correction coefficient of the laser welding device based on the logo image, and determine an affine transformation matrix according to the optical path correction coefficient and the logo image;
[0013] an execution coordinate determination module, configured to acquire a surface image corresponding to the stator to be welded, and determine welding execution coordinates according to the affine transformation matrix and the surface image;
[0014] The laser welding module is used to control the laser welding equipment to perform laser welding on the stator to be welded based on the welding execution coordinates.
[0015] According to another aspect of the present invention, an electronic device is provided, comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the flat wire motor stator laser welding method according to any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the flat wire motor stator laser welding method according to any embodiment of the present invention when executed.
[0020] The technical solution of an embodiment of the present invention determines a signature image corresponding to laser welding equipment, and based on the signature image, determines the optical path correction coefficients of the laser welding equipment. Based on the optical path correction coefficients and the signature image, an affine transformation matrix is determined. A surface image corresponding to the stator to be welded is then acquired, and welding execution coordinates are determined based on the affine transformation matrix and the surface image. Based on the welding execution coordinates, the laser welding equipment is controlled to perform laser welding on the stator to be welded. Based on this technical solution, before laser welding the stator of a flat wire motor, the laser system and vision system of the welding equipment are calibrated, effectively reducing errors during the welding process, achieving high-quality welding of the flat wire stator, reducing product defects, and ensuring product qualification rates.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 This is a schematic flow chart of a flat wire motor stator laser welding method provided by an embodiment of the present invention;
[0024] Figure 2 is a structural diagram of a laser welding device provided by an embodiment of the present invention;
[0025] Figure 3 This is a flow chart of a flat wire motor stator laser welding method provided by an embodiment of the present invention;
[0026] Figure 4 is a schematic diagram of a stator surface image provided by an embodiment of the present invention;
[0027] Figure 5 1 is a schematic diagram of an improved filter provided by an embodiment of the present invention;
[0028] Figure 6 This is a structural block diagram of a flat wire motor stator laser welding device provided by an embodiment of the present invention;
[0029] Figure 7 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Example 1
[0033] Figure 1 This is a flow chart of a flat wire motor stator laser welding method provided by an embodiment of the present invention. This embodiment can be used to calibrate the visual system and laser device of the welding device before laser welding the stator of the flat wire motor, thereby reducing the error in the welding process. The method can be executed by the flat wire motor stator laser welding device, which can be implemented in the form of hardware and / or software. The flat wire motor stator laser welding device can be configured in an electronic device, which can be a terminal device or a server. Figure 1 As shown, the method includes:
[0034] S110. Determine a logo corresponding to the laser welding equipment.
[0035] The laser welding equipment may be a device for laser welding a flat wire motor stator, such as Figure 2 As shown, the laser welding equipment includes a laser optical path system and a welding actuator (1); a stator rotating device and an encoder (3); a 3D vision system (5); a motion control module (4) and a host computer and its corresponding software control system (2). It should be noted that the stator to be processed is fixed in the rotating device and is driven by the rotating device to rotate 360° for scanning imaging; the 3D vision system is used to collect images of copper wires on the stator surface, and the collection frequency is determined according to the encoder feedback signal in the rotating device; the host computer visual software control system processes the image and calculates the weld point coordinates; the welding actuator receives the weld point coordinates sent from the vision system via TCP communication and performs welding. The mark diagram can be understood as a welding paper with mark points used to calibrate the laser optical path.
[0036] Specifically, when it is detected that the laser optical path of the laser welding equipment needs to be corrected, the corresponding mark diagram of the laser welding equipment is determined. For example, a mark diagram corresponding to the laser welding equipment can be set, and then when the laser optical path is corrected, the mark diagram corresponding to the laser welding equipment is directly obtained. Alternatively, when the laser optical path is corrected, the mark diagram corresponding to the laser welding equipment is obtained after the laser welding equipment is controlled to perform marking. It should be noted that since the laser optical path system is composed of multiple lenses, distortion is inevitable, so the theoretical coordinates and actual coordinates are not equal. The laser optical path system must be corrected for distortion to reduce coordinate deviation and improve laser coordinate accuracy.
[0037] On the basis of the above technical solution, the determination of the logo corresponding to the laser welding equipment includes: setting the laser welding equipment to a preset welding mode; controlling the laser welding equipment in the preset welding mode to mark the welding paper, and determining the logo corresponding to the laser welding equipment.
[0038] The preset welding mode can be understood as a working mode for marking and obtaining a mark image, and can be a low-power welding mode. The mark image includes at least two mark points.
[0039] Specifically, the laser welding equipment is set to a preset welding mode, and then the laser welding equipment is controlled to mark the welding paper based on a preset number of markings to obtain a marking pattern corresponding to the laser welding equipment. For example, by placing welding paper on the end face of the copper wire, that is, the welding plane, and adjusting the laser to a low-power welding mode in the upper computer control software, the welding paper is then laser-marked with an m*m rectangular array of "cross" marks, thereby obtaining a marking pattern including at least two marking points. It should be noted that the number of marks and the spacing between each mark can be set as required, and then the welding paper can be marked according to the number of marks and the spacing between each mark to obtain a marking pattern corresponding to the laser welding equipment.
[0040] The technical solution of the embodiment of the present invention improves the accuracy of calibration by controlling the welding equipment to be in a preset welding mode, and then controlling the laser welding equipment in the preset welding mode to mark the welding paper, determining the logo corresponding to the laser welding equipment, and then calibrating the laser system and vision system of the laser welding equipment according to the logo, thereby improving the accuracy of calibration.
[0041] S120. Determine an optical path correction coefficient of the laser welding equipment based on the signature diagram, and determine an affine transformation matrix according to the optical path correction coefficient and the signature diagram.
[0042] The optical path correction coefficient may be a coefficient used to correct the distortion of the laser system of the laser welding equipment. The affine transformation matrix may be understood as a matrix that describes the mapping relationship between the visual system and the laser device.
[0043] Specifically, the optical path correction coefficient corresponding to the laser system in the laser welding equipment is determined based on the mark diagram, and then the matrix of the mapping relationship between the visual system and the laser device is determined according to the optical path correction coefficient and the mark diagram. For example, after obtaining the annotation diagram corresponding to the laser welding equipment, the laser coordinates corresponding to the mark points in the mark diagram are recorded through the control software, and the laser coordinates are corrected according to the optical path correction coefficient.
[0044] On the basis of the above technical solution, the optical path correction coefficient of the laser welding equipment is determined based on the mark diagram, including: determining the first laser coordinate corresponding to the mark point in the mark diagram, and obtaining the first visual coordinate corresponding to the mark point in the mark diagram; determining the optical path correction coefficient of the laser welding equipment based on the first laser coordinate and the first visual coordinate.
[0045] The first laser coordinates may be laser coordinates corresponding to the marker points in the marker diagram recorded by the control software. The first visual coordinates may be visual coordinates corresponding to the marker points acquired by a high-precision visual image measuring instrument. It should be noted that the high-precision visual image measuring instrument is a measuring device independent of the laser welding equipment and is used to acquire the actual coordinates of the marker points in the marker diagram.
[0046] Specifically, the first laser coordinates corresponding to the mark points in the mark diagram are recorded by the control software, and the first visual coordinates corresponding to the mark points are acquired by the high-precision visual image measuring instrument, and then the first visual coordinates and the first laser coordinates are determined to determine the optical path correction coefficient of the laser welding equipment, and then the first laser coordinates can be corrected according to the optical path correction coefficient. It should be noted that the optical path correction coefficient can be used to describe the mapping relationship between the first laser coordinates and the first visual coordinates acquired by the high-precision visual image measuring instrument. For example, after the marking is completed, the n mark points (n=m 2 ) in the control software. The actual coordinates (x, y) of these n points are then measured using a high-precision visual image measuring instrument.
[0047] The technical solution of the embodiment of the present invention obtains the first laser coordinates, collects the first visual coordinates based on a high-precision visual image measuring instrument, determines the optical path correction coefficient of the laser system through the first visual coordinates and the first laser coordinates, and then can correct the laser coordinates to high-precision visual coordinates, thereby improving the accuracy of the welding device.
[0048] On the basis of the above technical solution, the optical path correction coefficient of the laser welding equipment is determined based on the first laser coordinates and the first visual coordinates, including: determining the expansion parameters corresponding to each marking point according to the first laser coordinates and the first visual coordinates; and determining the optical path correction coefficient of the laser welding equipment based on the expansion parameters corresponding to each marking point.
[0049] The expansion parameters are parameters corresponding to the Taylor series expansion polynomials corresponding to the respective marking points.
[0050] Specifically, the Taylor series expansion polynomial is used to continuously approach the actual position and eliminate the error caused by distortion, that is, f(r) = f(r0) + a1(r-r0) + a2(r-r0) 2 +…+a n (r-r0) n , here In order to reduce the amount of calculation, the first three items can achieve the positioning accuracy of laser welding, that is, f(r)=f(r0)+a1(r-r0)+a2(r-r0) 2 , you only need to find the coefficients a1 and a2, and you can use a1 and a2 as the optical path correction coefficients of the laser welding equipment. You can use the Taylor series expansion polynomials corresponding to at least two marking points in the marking diagram. Based on the Taylor series expansion polynomials, you can find the corresponding relationship between the two marking points to find the coefficients a1 and a2.
[0051] On the basis of the above technical solution, the optical path correction coefficient of the laser welding equipment is determined based on the expansion parameters corresponding to each marking point, including: when the number of marking points meets the preset number, the expansion parameters corresponding to each marking point are fitted and optimized using the least squares method to determine the optical path correction coefficient.
[0052] The preset number may be a preset number of marker points.
[0053] Specifically, when the number of marking points meets the preset number, the least squares method is used to fit and optimize the expansion parameters corresponding to each marking point to determine the optical path correction coefficient. It should be noted that, in theory, the coefficients a1 and a2 can be calculated by finding the corresponding relationship between the two marking points. However, in order to prevent the random errors of individual marking points from interfering with the calibration accuracy of the entire optical path system, the number of input marking points used is n (n≥9), and the least squares method is used to fit the optimization parameters of n marking points, and finally a more accurate coefficient is obtained: in: After obtaining the distortion correction coefficient, the actual laser coordinates are corrected to ensure the consistency between the theoretical coordinates and the actual coordinates.
[0054] On the basis of the above technical solution, an affine transformation matrix is determined according to the optical path correction coefficient and the marker map, including: determining a second laser coordinate corresponding to the marker point in the marker map based on the optical path correction coefficient; collecting the second visual coordinate corresponding to the marker point in the marker map through the visual system of the laser welding equipment; and determining the affine transformation matrix based on the second visual coordinate and the second laser coordinate.
[0055] The second laser coordinates are obtained by correcting the first laser coordinates using an optical path correction coefficient. The vision system can be understood as a 3D vision system provided in the laser welding equipment. The second vision coordinates can be the coordinates of the marker points in the marker image acquired by the vision system.
[0056] Specifically, the second laser coordinates corresponding to the marker point in the marker image are determined based on the optical path correction coefficient, and the marker image corresponding to the marker image is collected by the visual system, and the pixel coordinates of the marker point are determined based on the marker image, and the pixel coordinates are used as the second visual coordinates, and then the affine transformation matrix is determined based on the second visual coordinates and the second laser coordinates. For example, the marker image corresponding to the marker image is collected by the visual system, and the center pixel coordinates of the marker point are determined based on the marker image, and the center pixel coordinates are used as the second visual coordinates (row i ,col i ), i = 1 to n, and the optical path correction coefficient is used to correct the first laser coordinate to obtain the second laser coordinate (x i ,y i ), i = 1 ~ n. Use the least squares method to make a linear fit for the conversion relationship of these n points and find the minimum error Finally, the affine transformation matrix from the visual system to the laser system is obtained
[0057] S130 , collecting a surface image corresponding to the stator to be welded, and determining welding execution coordinates according to the affine transformation matrix and the surface image.
[0058] The stator to be welded may be a stator that has not been laser welded. The surface image may be understood as an image corresponding to the stator welding surface acquired by a visual system.
[0059] Specifically, a visual system captures a surface image corresponding to the stator's welding surface to be welded, identifies the desired welding position on the stator based on the surface image, and then determines the welding execution coordinates based on the affine transformation matrix and the surface image. It should be noted that during stator welding, a 3D line scan camera can be controlled to move directly above the end face of the stator copper wire, emitting a radial laser line. A rotating device at the bottom of the stator drives the stator to rotate 360°, and the 3D line scan camera captures an image of the marked area on the stator surface.
[0060] Based on the above technical solution, the welding execution coordinates are determined according to the affine transformation matrix and the surface image, including: determining the pixel coordinates corresponding to the welding center point corresponding to the stator to be welded according to the surface image; converting the pixel coordinates into laser coordinates based on the affine transformation matrix, and using the laser coordinates as the welding execution coordinates.
[0061] The welding center point may be a welding point of the copper wire corresponding to the stator.
[0062] Specifically, after obtaining the affine transformation matrix H, an image of the stator surface to be welded is captured, and the pixel coordinates of each copper wire weld center point are extracted using an image processing algorithm. These coordinates are then converted into laser welding coordinates corresponding to X weld points using the affine transformation matrix, and these coordinates are used as the welding execution coordinates. The technical solution provided by the embodiments of the present invention uses an image processing algorithm to extract the pixel coordinates of each copper wire weld center point, and then converts these pixel coordinates into laser coordinates based on the affine transformation matrix. This improves the accuracy of laser welding, enables high-precision vision-guided welding of flat stator wires, and effectively reduces various welding defects.
[0063] S140 : Controlling the laser welding equipment to perform laser welding on the stator to be welded based on the welding execution coordinates.
[0064] Specifically, establish communication between the 3D vision system and the upper computer of the laser welding mechanism, and send the coordinates of X welding points to the welding control software in sequence through the TCP protocol. The software monitors the stator welding process in real time, achieving high-precision welding of flat wire stators under visual guidance, effectively reducing various welding defects.
[0065] The technical solution of the embodiments of the present invention determines a signature map corresponding to the laser welding equipment, determines optical path correction coefficients corresponding to the laser welding equipment based on the signature map, and then determines an affine transformation matrix based on the optical path correction coefficients and the signature map. This then captures a surface image corresponding to the stator to be welded, determines welding execution coordinates based on the affine transformation matrix and the surface image, and controls the laser welding equipment to perform laser welding on the stator based on the welding execution coordinates. Based on this technical solution, before laser welding the stator of a flat wire motor, the laser system and vision system of the welding equipment are calibrated, effectively reducing errors during the welding process, achieving high-quality welding of the flat wire stator, reducing product defects, and ensuring product qualification rates.
[0066] Example 2
[0067] Figure 3 This is a flow chart of a flat wire motor stator laser welding method provided by an embodiment of the present invention. This embodiment further optimizes the technical solution for determining the affine transformation matrix based on the above technical solution. Figure 3 Shown, including:
[0068] S310: Acquire a logo image corresponding to the logo image, and perform image correction on the logo image to determine a third visual coordinate.
[0069] The mark image may be an image corresponding to the mark image acquired by a visual system in the welding equipment. The third visual coordinate may be understood as the coordinate corresponding to the mark point after the image is corrected.
[0070] Specifically, the image corresponding to the mark image is collected by the visual system, and the mark image is corrected. The third visual coordinates corresponding to each mark point are determined based on the corrected image. It should be noted that during the stator welding process, the 3D line scan camera is controlled to move to the area just above the end face of the stator copper wire. The emitted laser line is radially, and the stator bottom rotating device drives the stator to rotate 360°. The 3D line scan camera collects the image of the stator surface mark area, such as Figure 4 As shown in the figure, because the encoder and the 3D camera's linear laser sampling frequency intervals are not completely consistent, it inevitably leads to systematic errors and linear image distortion. To ensure the positioning accuracy of the vision system, the 3D vision system needs to be calibrated for distortion.
[0071] On the basis of the above technical solution, the acquisition of the mark image corresponding to the mark diagram includes: setting the laser welding equipment to a preset welding mode, controlling the laser welding equipment in the preset welding mode to mark the welding paper, determining the mark diagram corresponding to the laser welding equipment, acquiring the mark image of the point corresponding to the mark diagram based on the visual system of the laser welding equipment, and determining the second visual coordinates corresponding to each mark point.
[0072] The mark image includes at least two mark points. The preset welding mode can be understood as a working mode for marking and obtaining the mark image, which can be a low-power welding mode.
[0073] Specifically, the laser welding equipment is set to a preset welding mode, and then the laser welding equipment is controlled to mark the welding paper based on a preset number of markings to obtain a mark pattern corresponding to the laser welding equipment. For example, by placing welding paper on the end face of the copper wire, that is, the welding plane, and adjusting the laser to a low-power welding mode in the upper computer control software, the welding paper is then laser-marked with m*m rectangular arrays of "cross" marks, thereby obtaining a mark pattern including at least two marking points. It should be noted that the number of marks and the spacing between each mark can be set as required, and then the welding paper can be marked according to the number of marks and the spacing between each mark to obtain a mark pattern corresponding to the laser welding equipment. The mark pattern image of the point corresponding to the mark pattern is then collected by the visual system of the laser welding equipment, and the second visual coordinate corresponding to each mark point is determined.
[0074] On the basis of the above technical solution, the logo image is corrected to determine the third visual coordinates, including: obtaining an image filter corresponding to the visual system of the laser welding equipment; interpolating and resampling the logo image according to the image filter to determine the third visual coordinates corresponding to the second visual coordinates.
[0075] Among them, the image filter is a filter obtained by improving the Gaussian filter based on the mean filter.
[0076] Specifically, by obtaining an image filter corresponding to the visual system, the logo image is interpolated and resampled according to the image filter, and then the third visual coordinate corresponding to the second visual coordinate is determined based on the processed image. It should be noted that due to the influence of the sampling frequency, the image mainly has linear distortion on the X axis (time axis), while the Y direction is basically undistorted. Then, the mean filter and Gaussian filter are improved, and the interpolation resampling processing is performed on the collected image, such as Figure 5 As shown, the mean filter is used to improve the Gaussian filter to obtain the mean-Gaussian filter, and then the image filter is determined. For example, the original pixel coordinates are (P y0 ,Px0 ), where P y0 ∈(0~row), P x0 ∈(0~col), the corresponding gray value is f(P y0 ,P x0 ). Assuming the distortion coefficient is K, after interpolation and resampling, the new pixel coordinates are (P y ,P x ), where P y ∈(0~row), P x ∈(0~K*col), the corresponding gray value is f(P y ,P x ). Then there is the following relationship: P x =K*P x0 , P y =P y0 , Then the third visual coordinates of the corrected landmark point are obtained.
[0077] On the basis of the above technical solution, the image correction of the logo image to determine the third visual coordinates includes: for the first direction of the logo image, using a mean filter to filter the pixels in the first direction to obtain an intermediate image; for the second direction of the intermediate image, using a Gaussian filter to filter the pixels in the second direction to obtain a corrected logo image; and determining the third visual coordinate corresponding to the second visual coordinate based on the corrected logo image.
[0078] The first direction can be understood as the Y direction of the logo image, and the second direction can be the X direction of the logo image, i.e., the time axis direction. The intermediate image can be an image processed by applying a mean filter to the pixels in the Y direction. The first filter can be a mean filter. The second filter can be a Gaussian filter.
[0079] Specifically, for the Y direction where there is no distortion, the original image is convolved with a mean filter to obtain new sampled pixels to prevent distortion of pixel information in this direction during resampling. For the X direction where there is linear distortion, a Gaussian filter is used to convolve the original image to restore the true pixel information in this direction as much as possible.
[0080] S320 , determining an affine transformation matrix according to the third visual coordinates and the landmark image, and acquiring a surface image corresponding to the stator to be welded.
[0081] Specifically, the laser coordinates corresponding to each mark point in the mark image are determined, and an affine transformation matrix from the visual system to the laser system is established based on the laser coordinates and the third visual coordinates, and the surface image of the stator to be welded is collected through the visual system. For example, in the process of controlling the welding equipment to mark and generate the mark image, the laser coordinates of each mark point in the marking process can be recorded in real time.
[0082] Based on the above technical solution, the method of determining the affine transformation matrix according to the third visual coordinates and the marker image includes: obtaining the first laser coordinates corresponding to the marker image, and determining the affine transformation matrix according to the first laser coordinates and the third visual coordinates.
[0083] The first laser coordinates may be laser coordinates corresponding to each marking point recorded during the marking process. The affine transformation matrix is used to describe the mapping relationship between the visual system and the laser device.
[0084] Specifically, the center coordinates of n marker points (row i ,col i ), i = 1 to n, and obtain the laser coordinates (x i ,y i ), i = 1 ~ n. Use the least squares method to make a linear fit for the conversion relationship of these n points and find the minimum error Finally, the affine transformation matrix from the visual system to the laser system is obtained
[0085] It should be noted that, based on the above technical solution, the affine transformation matrix is determined according to the third visual coordinates and the landmark map, including determining the first laser coordinates corresponding to the laser system based on the landmark map, and correcting the first laser coordinates using the optical path correction coefficient to obtain the second laser coordinates; and determining the affine transformation matrix based on the second laser coordinates and the third visual coordinates.
[0086] The technical solution of the embodiment of the present invention can achieve high-precision characteristics for both the laser optical path system and the visual system through a comprehensive two-step distortion correction algorithm. The obtained laser coordinates and image pixel coordinates are real and accurate. Finally, the laser optical path system and the visual system are finally jointly calibrated to eliminate coordinate conversion errors.
[0087] S330 , determining welding execution coordinates according to the affine transformation matrix and the surface image, and controlling the laser welding equipment to perform laser welding on the stator to be welded based on the welding execution coordinates.
[0088] Specifically, after obtaining the affine transformation matrix H, an image of the stator surface to be welded is captured, and the pixel coordinates of each copper wire weld center point are extracted using an image processing algorithm. These coordinates are then converted into laser welding coordinates corresponding to X weld points using the affine transformation matrix, and these coordinates are used as the welding execution coordinates. The technical solution provided by the embodiments of the present invention uses an image processing algorithm to extract the pixel coordinates of each copper wire weld center point, and then converts these pixel coordinates into laser coordinates based on the affine transformation matrix. This improves the accuracy of laser welding, enables high-precision vision-guided welding of flat stator wires, and effectively reduces various welding defects.
[0089] On the basis of the above technical solution, the method of determining the welding execution coordinates according to the affine transformation matrix and the surface image includes: performing image correction on the surface image, and determining the pixel coordinates corresponding to the welding center point corresponding to the stator to be welded according to the surface image after image correction; converting the pixel coordinates into laser coordinates based on the affine transformation matrix, and using the laser coordinates as the welding execution coordinates.
[0090] Specifically, after acquiring a surface image, image correction is performed on the surface image. Based on the corrected surface image, the pixel coordinates corresponding to the weld center point of the stator to be welded are determined. The pixel coordinates are then converted into laser coordinates using an affine transformation matrix, and these laser coordinates are used as welding execution coordinates. It should be noted that image correction can be performed on the surface image by obtaining an image filter corresponding to the vision system of the laser welding equipment and then performing image correction on the surface image based on the image filter. Alternatively, image correction can be performed by filtering the surface image in a first direction using a mean filter to obtain an intermediate surface image, and then filtering the intermediate surface image in a second direction using a Gaussian filter to obtain the corrected surface image.
[0091] On the basis of the above technical solution, the laser welding equipment is controlled based on the welding execution coordinates to perform laser welding on the stator to be welded, including: sending the welding execution coordinates to the welding control software in sequence based on a preset communication protocol, so that the welding control software performs laser welding based on the welding execution coordinates.
[0092] The preset communication protocol may be a pre-set communication protocol with a host computer, and may be a TCP protocol.
[0093] Specifically, establish communication between the 3D vision system and the upper computer of the laser welding mechanism, and send the coordinates of X welding points to the welding control software in sequence through the TCP protocol. The software monitors the stator welding process in real time, achieving high-precision welding of flat wire stators under visual guidance, effectively reducing various welding defects.
[0094] The technical solution of an embodiment of the present invention involves acquiring a signature image corresponding to a signature diagram, performing image correction on the signature image to determine a third visual coordinate, determining an affine transformation matrix based on the third visual coordinate and the signature diagram, acquiring a surface image corresponding to the stator to be welded, and then determining welding execution coordinates based on the affine transformation matrix and the surface image. Based on the welding execution coordinates, the laser welding equipment is controlled to perform laser welding on the stator to be welded. Based on this technical solution, before laser welding the stator of a flat wire motor, the laser system and visual system of the welding equipment are calibrated, effectively reducing errors during the welding process, achieving high-quality welding of the flat wire stator, reducing product defects, and ensuring product qualification.
[0095] Example 3
[0096] Figure 6 The following is a schematic diagram of the structure of a flat wire motor stator laser welding device provided by an embodiment of the present invention. Figure 6 As shown, the device includes: a logo image determination module 610, an affine transformation matrix determination module 620, an execution coordinate determination module 630 and a laser welding module 640; wherein,
[0097] A signature determining module 610 determines a signature corresponding to the laser welding equipment;
[0098] An affine transformation matrix determination module 620 is configured to determine an optical path correction coefficient for the laser welding device based on the signature diagram, and determine an affine transformation matrix based on the optical path correction coefficient and the signature diagram;
[0099] An execution coordinate determination module 630 is configured to acquire a surface image corresponding to the stator to be welded and determine welding execution coordinates based on the affine transformation matrix and the surface image;
[0100] The laser welding module 640 is configured to control the laser welding device to perform laser welding on the stator to be welded based on the welding execution coordinates.
[0101] Based on the above technical solution, the mark diagram determination module is used to set the laser welding equipment to a preset welding mode; control the laser welding equipment in the preset welding mode to mark the welding paper, and determine the mark diagram corresponding to the laser welding equipment, wherein the mark diagram includes at least two mark points.
[0102] Based on the above technical solution, the affine transformation matrix determination module is used to determine the first laser coordinate corresponding to the mark point in the mark image, and obtain the first visual coordinate corresponding to the mark point in the mark image; based on the first laser coordinate and the first visual coordinate, the optical path correction coefficient of the laser welding equipment is determined.
[0103] Based on the above technical solution, the affine transformation matrix determination module is used to determine the expansion parameters corresponding to each marking point according to the first laser coordinates and the first visual coordinates; and determine the optical path correction coefficient of the laser welding equipment based on the expansion parameters corresponding to each marking point.
[0104] On the basis of the above technical solution, the affine transformation matrix determination module is used to use the least squares method to fit and optimize the expansion parameters corresponding to each marking point when the number of marking points meets the preset number, so as to determine the optical path correction coefficient.
[0105] On the basis of the above technical solution, the affine transformation matrix determination module is used to determine the second laser coordinates corresponding to the mark point in the mark image based on the optical path correction coefficient, wherein the second laser coordinates are obtained by correcting the first laser coordinates using the optical path correction coefficient; the second visual coordinates corresponding to the mark point in the mark image are collected by the visual module of the laser welding equipment; and the affine transformation matrix is determined based on the second visual coordinates and the second laser coordinates.
[0106] On the basis of the above technical solution, a coordinate determination module is executed to determine the pixel coordinates corresponding to the welding center point corresponding to the stator to be welded according to the surface image; the pixel coordinates are converted into laser coordinates based on the affine transformation matrix, and the laser coordinates are used as the welding execution coordinates.
[0107] The technical solution of an embodiment of the present invention determines a signature image corresponding to the laser welding equipment, determines the optical path correction coefficients of the laser welding equipment based on the signature image, and determines an affine transformation matrix based on the optical path correction coefficients and the signature image. This then captures a surface image corresponding to the stator to be welded, determines welding execution coordinates based on the affine transformation matrix and the surface image, and controls the laser welding equipment to perform laser welding on the stator based on the welding execution coordinates. Based on this technical solution, before laser welding the stator of a flat wire motor, the laser system and vision system of the welding equipment are calibrated, effectively reducing errors during the welding process, achieving high-quality welding of the flat wire stator, reducing product defects, and ensuring product qualification.
[0108] The flat wire motor stator laser welding device provided in the embodiment of the present invention can execute the flat wire motor stator laser welding method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0109] Example 4
[0110] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0111] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0112] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0113] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the flat wire motor stator laser welding method.
[0114] In some embodiments, the flat wire motor stator laser welding method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the flat wire motor stator laser welding method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to execute the flat wire motor stator laser welding method in any other appropriate manner (e.g., via firmware).
[0115] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0116] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0117] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0118] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0119] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0120] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0121] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0122] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A flat wire motor stator laser welding method, characterized in that: include: Determine the logo corresponding to the laser welding equipment; Determining an optical path correction coefficient of the laser welding device based on the logo image, and determining an affine transformation matrix according to the optical path correction coefficient and the logo image; Acquiring a surface image corresponding to the stator to be welded, and determining welding execution coordinates according to the affine transformation matrix and the surface image; The laser welding device is controlled based on the welding execution coordinates to perform laser welding on the stator to be welded.
2. The method according to claim 1, characterized in that Determining the logo corresponding to the laser welding equipment includes: Setting the laser welding equipment to a preset welding mode; The laser welding device in the preset welding mode is controlled to mark the welding paper, and a marking diagram corresponding to the laser welding device is determined, wherein the marking diagram includes at least two marking points.
3. The method according to claim 2, characterized in that Determining the optical path correction coefficient of the laser welding equipment based on the logo diagram includes: Determining a first laser coordinate corresponding to a marker point in a marker image, and obtaining a first visual coordinate corresponding to the marker point in the marker image; An optical path correction coefficient of the laser welding device is determined based on the first laser coordinates and the first vision coordinates.
4. The method according to claim 3, characterized in that The determining of the optical path correction coefficient of the laser welding equipment based on the first laser coordinate and the first visual coordinate includes: Determine an expansion parameter corresponding to each marking point according to the first laser coordinates and the first visual coordinates; An optical path correction coefficient for the laser welding equipment is determined based on the expansion parameters corresponding to each marking point.
5. The method according to claim 4, characterized in that The determining of the optical path correction coefficient of the laser welding equipment based on the expansion parameter corresponding to each marking point includes: When the number of the marking points meets the preset number, the least square method is used to perform fitting optimization on the expansion parameters corresponding to each marking point to determine the optical path correction coefficient.
6. The method according to claim 3, characterized in that The determining of the affine transformation matrix according to the optical path correction coefficient and the logo image includes: Determining a second laser coordinate corresponding to the marker point in the marker map based on the optical path correction coefficient, wherein the second laser coordinate is obtained by correcting the first laser coordinate using the optical path correction coefficient; The second visual coordinate corresponding to the mark point in the mark diagram is collected by the visual system of the laser welding equipment; The affine transformation matrix is determined based on the second visual coordinates and the second laser coordinates.
7. The method according to claim 1, characterized in that The determining of welding execution coordinates according to the affine transformation matrix and the surface image includes: determining pixel coordinates corresponding to a welding center point corresponding to the stator to be welded based on the surface image; The pixel coordinates are converted into laser coordinates based on the affine transformation matrix, and the laser coordinates are used as the welding execution coordinates.
8. A flat wire motor stator laser welding device, characterized in that: include: A logo image determination module, which determines a logo image corresponding to the laser welding equipment; an affine transformation matrix determination module, configured to determine an optical path correction coefficient of the laser welding device based on the logo image, and determine an affine transformation matrix according to the optical path correction coefficient and the logo image; an execution coordinate determination module, configured to acquire a surface image corresponding to the stator to be welded, and determine welding execution coordinates according to the affine transformation matrix and the surface image; The laser welding module is used to control the laser welding equipment to perform laser welding on the stator to be welded based on the welding execution coordinates.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can perform the flat wire motor stator laser welding method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the flat wire motor stator laser welding method according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Galvanometer system correction device and correction method thereof
CN101804521A
Visual positioning guiding and calibrating method for laser welding of stator end flat wire
CN112658470A
Automatic deviation rectifying method and device for galvanometer welding
CN115138962A
Flat wire motor stator welding method based on 3D visual guidance and electronic equipment
CN118951339A
Apparatus and method for inspecting soldered portions
US4772125A