A stator appearance inspection system and method instead of manual inspection

CN122999552APending Publication Date: 2026-10-30SHAANXI YONGHUI ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611440015.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-16
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

然而,人工目检存在以下突出问题:人工目检难以精确测量定子的关键尺寸,尤其是在异型端部结构中,人工测量难度更大;传统测量方式效率低、误差大,无法满足大规模生产线的在线检测节奏;人工目检结果受检测人员经验、状态等人为因素影响,检测标准不统一,漏检率和误判率高;现有技术无法在同一检测流程中同时完成多维度的综合外观检测

Benefits of technology

在上述技术方案中,本发明通过第一2D相机、第二2D相机和2D线扫相机三个视觉传感器在三个检测工位上的协同配合,实现了对定子端面参数、pin状态、线圈顶部高度和绝缘纸宽度的多维度综合外观检测,检测覆盖面广、信息完整;通过输送装置实现定子的自动输送,通过三个检测工位依次完成多维度的自动检测,通过控制器实现检测结果的综合判定,通过分选装置实现良品与不良品的自动分选,替代了传统的人工目检和人工分选,大幅提升了检测效率和产线自动化水平;本发明可同时适配异型端与常规端新能源汽车电机定子,解决人工测量结构适配难题,适用于不同型号、不同规格的定子,通过控制器进行自动综合判定,统一了质检判定标准,消除了人为因素导致的检测结果差异,提升了定子品质的一致性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122999552A_ABST
    Figure CN122999552A_ABST
Patent Text Reader

Abstract

The application discloses a stator appearance detection system and method instead of manual inspection, relates to the technical field of new energy automobile motor stator appearance detection, and comprises a conveying device, three detection stations, a sorting device and a controller. The first detection station is used for detecting whether the inner and outer circles of a stator envelope, the inner and outer circles of an iron core and pins exceed the target area by using a first 2D camera. The second detection station is used for detecting the height from the top of a coil to an end face by using a second 2D camera. The third detection station is used for detecting the width of insulating paper by using a 2D line scanning camera. The controller comprehensively judges three detection results and controls the sorting device to sort good products and defective products. The application realizes multi-dimensional comprehensive detection and automatic sorting, is suitable for irregular end and conventional end stators, and improves detection efficiency and product quality consistency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of stator appearance inspection technology for new energy vehicle motors, specifically relating to a stator appearance inspection system and method that replaces manual visual inspection. Background Technology

[0002] With the rapid development of the new energy vehicle industry, drive motors are evolving towards higher power density and higher integration. As the core component of the motor, the stator is being used more and more widely. The stator ends are divided into irregular and conventional structures, with complex shapes and stringent processing precision requirements. Key dimensions and appearance parameters of the stator, such as the inner and outer diameters of the stator envelope, the inner and outer diameters of the iron core, the pin protrusion state, the coil top height, and the width of the insulating paper, directly affect the motor's assembly accuracy, operating efficiency, insulation performance, and safety.

[0003] Currently, the appearance inspection of motor stators mainly relies on manual visual inspection. However, manual visual inspection has the following prominent problems: it is difficult to accurately measure the key dimensions of the stator, especially in irregular end structures, where manual measurement is even more difficult; traditional measurement methods are inefficient and have large errors, which cannot meet the online inspection pace of large-scale production lines; the results of manual visual inspection are affected by human factors such as the experience and condition of the inspectors, the inspection standards are not uniform, and the rates of missed inspections and misjudgments are high; existing technologies cannot simultaneously complete multi-dimensional comprehensive appearance inspection in the same inspection process. Summary of the Invention

[0004] To address the aforementioned problems in the prior art, the present invention provides a stator appearance inspection system and method that replaces manual visual inspection.

[0005] The technical problem to be solved by this invention is achieved through the following technical solution: In a first aspect, the present invention provides a stator appearance inspection system that replaces manual visual inspection, the system comprising: a conveying device, a first inspection station, a second inspection station, a third inspection station, a sorting device, and a controller; The conveying device is used to convey the stator to be tested; The first inspection station is equipped with a first 2D camera for taking pictures and inspecting above the stator to obtain a first inspection result; wherein, the first inspection result includes whether the inner circle of the stator, the outer circle of the stator, the inner circle of the core, and the outer circle of the core meet preset conditions and whether the pin of the stator exceeds the target area. The second inspection station is equipped with a second 2D camera for taking pictures and inspecting the side of the stator to obtain a second inspection result; wherein, the second inspection result includes whether the height value from the top of the coil to the end face of the stator exceeds a preset height range; The third inspection station is equipped with a 2D line scan camera, which is used to perform rotational scanning and photographing of the stator to obtain a third inspection result; wherein, the third inspection result includes whether the width of the insulating paper of the stator exceeds a preset width range. The controller is communicatively connected to the first 2D camera, the second 2D camera, the 2D line scan camera, and the sorting device. The controller is also used to assign a unique stator number to each stator, associate the detection results of the same stator at the first detection station, the second detection station, and the third detection station according to the stator number, generate a comprehensive judgment result of the stator based on the associated first detection result, second detection result, and third detection result, and control the sorting device to perform sorting operation on the stator according to the comprehensive judgment result. The controller is further configured to control the sorting device to transport the stator to the good product conveying channel when the overall judgment result is qualified, and to control the sorting device to transport the stator to the defective product conveying channel when the overall judgment result is unqualified.

[0006] In a second aspect, the present invention provides a stator appearance inspection and sorting method, applied to the stator appearance inspection system described in the first aspect, the method comprising: The stator is sequentially conveyed to the first inspection station, the second inspection station, and the third inspection station by the conveying device; At the first inspection station, a first 2D camera is used to take pictures and inspect the stator above it to obtain the first inspection result; At the second inspection station, a second 2D camera is used to take pictures and inspect the side of the stator to obtain a second inspection result; At the third inspection station, the stator is rotated and scanned using a 2D line scan camera to obtain the third inspection result. Based on the first, second, and third detection results associated with the stator numbers, a comprehensive judgment result is generated by the controller, and the sorting device is controlled to perform sorting operations on the stators according to the comprehensive judgment result; wherein, the stator numbers are assigned by the controller, and each stator has a unique stator number; When the overall judgment result is qualified, the sorting device is controlled to transport the stator to the good product conveying channel; When the overall judgment result is unqualified, the sorting device is controlled to transport the stator to the defective product conveying channel.

[0007] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects: In the above technical solution, this invention achieves multi-dimensional comprehensive appearance inspection of stator end face parameters, pin status, coil top height, and insulation paper width through the coordinated operation of three vision sensors—a first 2D camera, a second 2D camera, and a 2D line scan camera—at three inspection stations. This results in broad inspection coverage and complete information. The invention utilizes a conveying device for automatic stator transport, three inspection stations for sequential multi-dimensional automatic inspection, a controller for comprehensive judgment of inspection results, and a sorting device for automatic sorting of good and defective products. This replaces traditional manual visual inspection and sorting, significantly improving inspection efficiency and production line automation. Furthermore, this invention is compatible with both irregularly shaped and conventionally shaped stators for new energy vehicle motors, solving the problem of manual measurement and structural adaptation. It is applicable to stators of different models and specifications. The controller performs automatic comprehensive judgment, unifying quality inspection standards, eliminating differences in inspection results caused by human factors, and improving the consistency of stator quality.

[0008] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0009] Figure 1 This is a schematic diagram of a stator appearance inspection system that replaces manual visual inspection, provided by an embodiment of the present invention; Figure 2 This is a schematic diagram of the first and second detection stations provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a third detection station provided in an embodiment of the present invention; Figure 4 This is a flowchart of a stator appearance inspection and sorting method provided in an embodiment of the present invention. Detailed Implementation

[0010] The present invention will be further described in detail below with reference to specific embodiments, but the implementation of the present invention is not limited thereto.

[0011] Figure 1 This is a schematic diagram of a stator appearance inspection system that replaces manual visual inspection, as provided in an embodiment of the present invention. Figure 1 As shown, the system may include: a conveying device, a first inspection station, a second inspection station, a third inspection station, a sorting device, and a controller; the conveying device is used to convey the stator to be inspected; The first inspection station is equipped with a first 2D camera, which is used to take pictures and inspect the stator from above to obtain the first inspection result. The first inspection result includes whether the inner circle, outer circle, inner circle and outer circle of the stator meet the preset conditions and whether the pin of the stator exceeds the target area.

[0012] Understandable, Figure 2This is a schematic diagram of the first and second detection stations provided in an embodiment of the present invention. The first detection station is equipped with a first 2D camera and a ring light source. The ring light source is coaxially mounted with the first 2D camera, and the central aperture of the ring light source is coaxial with the center of the field of view of the first 2D camera to ensure uniform illumination and clear imaging.

[0013] Optionally, the process of obtaining the stator's inner envelope circle, outer envelope circle, inner core circle, and outer core circle includes: Stator pixel features are extracted from the acquired end face images of the stator; A circular region of interest extraction algorithm based on least squares fitting is adopted to obtain the outer circle, inner circle, outer circle of the iron core, and inner circle of the iron core in the end face image by fitting the extracted stator pixel features.

[0014] Optionally, the preset conditions include: the radius of the inner circle of the envelope is greater than the radius of the inner circle of the iron core and the radius of the outer circle of the envelope is less than the radius of the outer circle of the iron core.

[0015] Understandably, the process of extracting stator pixel features may include: filtering and denoising the acquired stator end face image (such as Gaussian filtering or median filtering) to eliminate noise interference introduced during image acquisition; performing contrast enhancement (such as histogram equalization) to enhance the grayscale difference between the stator end face, the core area and the background area; and performing binarization segmentation and morphological processing to eliminate isolated noise points and fill small holes, thereby obtaining a binarized stator end face feature image, i.e., stator pixel features.

[0016] Then, edge detection (such as the Canny algorithm) is performed on the stator pixel features to extract all edge points on the stator end face, resulting in an edge point set. A circular region of interest extraction algorithm based on least squares fitting is used to fit the edge point set to obtain the outer circle, inner circle, outer core circle, and inner core circle in the end face image. Specifically, the outermost edge point in the edge point set is fitted with a circle using the least squares method to obtain the outer circle and its center coordinates and radius. An annular region of interest is set inside the outer circle, and the inner edge points within this region are extracted and fitted with a circle to obtain the inner circle. The outer edge points of the core are further extracted inside the inner circle and fitted with a circle to obtain the outer core circle. The inner edge points of the core are further extracted inside the outer circle and fitted with a circle to obtain the inner core circle. The extraction of the four circles is carried out in a step-by-step positioning order from the outside to the inside. The extraction result of the outer circle limits the search area of ​​the inner circle, which in turn limits the detection range of the outer circle of the iron core. The outer circle of the iron core provides regional constraints for the extraction of the inner circle of the iron core, thereby gradually reducing the detection area of ​​each circle and improving the fitting accuracy and anti-interference ability.

[0017] Optionally, the process for determining whether the stator pins exceed the target area includes: The end face image of the stator is acquired and preprocessed to obtain the preprocessed end face image; The detection region is obtained by extracting the target region from the preprocessed end face image based on template matching or Blob extraction. An adaptive threshold Blob detection is performed within the detection area, and the stator pins are determined to be outside the target area based on the Blob detection results.

[0018] Understandably, the end face image of the stator is acquired by the first 2D camera and preprocessed to obtain the preprocessed end face image. The preprocessing includes filtering and denoising, and binarization.

[0019] Then, the target region in the preprocessed end face image is extracted based on template matching or Blob (Binary Large Object) to obtain the detection region. The target region is a ring-shaped or rectangular target region set on the stator end face to define the allowable extension range of the pin tip. The position of the target region in the end face image is located by template matching algorithm, or the inner edge of the target region is extracted by Blob, and the area enclosed by the inner edge is used as the detection region. The target region can also be determined by setting positioning marks on the stator fixture or stator end face: the position of the positioning marks is determined by visual positioning algorithm, and the position and range of the target region in the image are calculated according to the preset relative positional relationship between the positioning marks and the target region.

[0020] Finally, adaptive threshold blob detection is performed within the detection area, and the result is used to determine whether the pin exceeds the target area. Adaptive threshold blob detection adaptively determines the segmentation threshold based on the local grayscale distribution within the detection area, improving detection robustness under different lighting conditions. The criteria for blob detection are: the area is greater than a preset area threshold (e.g., 5 pixels), and the average grayscale value within the area is greater than a preset grayscale threshold (this preset grayscale threshold can be selected from 180 to 220 based on actual conditions). When a blob that meets the above criteria exists within the detection area, it is determined that the pin tip extends into or beyond the target area, i.e., the stator pin exceeds the target area; otherwise, it is determined that the pin does not exceed the target area.

[0021] The second inspection station is equipped with a second 2D camera, which is used to take pictures and inspect the stator from the side to obtain a second inspection result. The second inspection result includes whether the height value from the top of the stator coil to the end face exceeds a preset height range.

[0022] Optionally, the second 2D camera is calibrated to establish a mapping relationship between the side image pixel coordinate system and the physical coordinate system; Obtain the side view image of the stator; Extract the edge contour at the junction of the stator end face and the side wall in the side image and perform straight line fitting to obtain the second baseline; In the side image, a region of interest is set, and gray-scale jump points are detected by scanning line by line along a direction perpendicular to the second baseline to determine the position of the top of the coil; Based on the vertical pixel distance between the top position of the coil and the second baseline, and combined with the mapping relationship, the vertical pixel distance is converted into physical dimensions to obtain the height value from the top of the stator coil to the end face.

[0023] It is understandable that, such as Figure 2 As shown, the second inspection station is located on the side of the stator. First, the second 2D camera is calibrated to establish a mapping relationship between the pixel coordinate system of the side image and the physical coordinate system. Specifically, a calibration block or ruler of known size is placed at the height of the stator coils to capture a calibration image and calculate the pixel equivalent (i.e., the physical length corresponding to each pixel in the image). Simultaneously, distortion correction is performed by obtaining the camera's intrinsic parameters and distortion coefficients through the calibration plate to eliminate the influence of lens distortion on measurement accuracy.

[0024] Then, the stator is fixed to the inspection station by mechanical clamps, or the acquired side image is matched and positioned by an image matching algorithm to ensure the consistency of the stator's position in the image and obtain the side image of the stator.

[0025] Next, the edge contour at the junction of the stator end face and sidewall in the side image is extracted and fitted with a straight line to obtain the second baseline. Since the second 2D camera is located on the side of the stator, the acquired image is a side view of the stator, and the stator end face appears as a side line or contour line in the side image. When the end face appears as an arc or a segmented line, least-squares straight line fitting is performed on the edge points of the end face to obtain an approximate end face baseline.

[0026] Then, a region of interest is set in the side image, and grayscale transition points are detected line by line along a direction perpendicular to the second baseline to determine the top position of the coil. When the coil has multiple top edge points, the edge point farthest from the second baseline is selected as the top position of the coil to ensure that the maximum extension height of the coil is detected; when the top of the coil is a plane, the midpoint of the top edge of the coil or the midpoint of the fitted straight line segment is selected as the top position of the coil.

[0027] Finally, based on the vertical pixel distance between the top position of the coil and the second baseline, and combined with the mapping relationship, the vertical pixel distance is converted into physical dimensions to obtain the height value from the top of the stator coil to the end face.

[0028] It is worth mentioning that the second test result is as follows: when the height value is greater than the upper limit of the preset height range (e.g., 20.0mm to 23.0mm), the top of the coil is determined to be too high, which may pose a risk of interference with the casing or other components; when the height value is less than the lower limit of the preset height range, the top of the coil is determined to be too low, which may indicate that the coil is not installed properly or the insulation distance is insufficient; when the height value is within the preset height range, the top height of the coil is determined to be qualified.

[0029] The third inspection station is equipped with a 2D line scan camera, which is used to rotate and scan the stator to obtain the third inspection result. The third inspection result includes whether the width of each insulating paper of the stator exceeds the preset width range.

[0030] Optionally, Figure 3 This is a schematic diagram of a third detection station provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the third inspection station is also equipped with a collaborative robot arm, on which a 2D line scan camera is mounted. The collaborative robot arm is used to move the 2D line scan camera to the imaging position. The third inspection station is also equipped with a lifting gripper, which is used to lift and clamp the stator.

[0031] It is understood that the optical axis of the 2D line scan camera is perpendicular to the axis of the stator, meaning the 2D line scan camera is mounted radially along the stator, making the line scan direction of the 2D line scan camera parallel to the axis of the stator. When the stator rotates around its own axis, the 2D line scan camera acquires a line array image on a fixed generatrix on the circumference of the stator, which is then stitched together line by line as the stator rotates to form a complete unfolded circumference image. The working distance between the 2D line scan camera and the circumference of the stator is determined based on the focal length and field of view of the 2D line scan camera's lens. Preferably, the working distance is 50mm to 150mm. The focal length of the 2D line scan camera's lens is 8mm to 25mm, and the field of view is 20mm to 80mm. The working distance is determined as follows: the field of view width of the 2D line scan camera is calculated based on the outer diameter of the stator and the lateral resolution of the unfolded circumference image to be detected; the working distance is then calculated based on the field of view width, the sensor size of the camera, and the focal length of the lens. The working distance is fine-tuned during installation and commissioning using a focusing mechanism to ensure clear imaging of the stator's circumferential surface. After the stator is clamped by the lifting jaws at the third inspection station, the stator's rotation axis extends vertically in space. The linear scan direction of the 2D line scan camera is set vertically, making the linear scan direction parallel to the rotation axis. As the stator rotates uniformly around the rotation axis, the 2D line scan camera acquires images line by line along the same generatrix of the stator's circumferential surface. These images are continuously stitched together as the rotation angle changes, forming an unfolded image of the stator's circumferential surface. The parallelism error between the linear scan direction and the rotation axis does not exceed ±0.5° to ensure that the stitched unfolded image of the circumferential surface is not distorted.

[0032] The collaborative robot is a six-degree-of-freedom articulated robot. Its motion path includes: initial pose: the robot is in standby position, with the 2D line scan camera away from the stator's rotation area; image-taking pose: the robot moves the 2D line scan camera to an image-taking position to the side of the stator, ensuring the camera's optical axis is perpendicular to the stator's axis, and the working distance between the camera and the stator's circumferential surface is a preset working distance (e.g., 80mm-120mm); reset pose: after detection, the robot moves the camera back to the initial pose. Each joint of the collaborative robot is controlled and driven by a controller, moving from the initial pose to the image-taking pose according to a preset trajectory, and then back to the reset pose after detection. The preset trajectory is a collision-free trajectory pre-planned by the controller based on the stator's dimensions and the 2D line scan camera's installation parameters. A quick-change device is provided on the camera mounting flange for quickly changing 2D line scan cameras with different focal lengths according to different stator models.

[0033] The third inspection station can also be equipped with a rotary drive device, which includes a servo motor and a rotary spindle. A lifting gripper is mounted on the upper end of the rotary spindle, and the servo motor is connected to the rotary spindle via a transmission mechanism (such as a synchronous belt drive or worm gear drive). When the stator is conveyed to the third inspection station, the lifting gripper lifts and clamps the stator from the conveying device. The servo motor drives the rotary spindle, causing the lifting gripper and the stator to rotate uniformly around their own axis. The lifting gripper only performs clamping and rotational transmission functions and does not independently perform rotary drive functions. The servo motor is a closed-loop controlled AC servo motor with a built-in encoder for real-time feedback of the stator's actual rotation angle and speed. The servo motor is driven and controlled by the controller according to preset rotational speed commands. The encoder feedback signal is simultaneously transmitted to the controller for synchronization with the line frequency signal of the 2D line scan camera.

[0034] The stator's rotation axis is parallel to the linear scanning direction of the 2D line scan camera. Specifically, after the stator is clamped by the lifting gripper at the third inspection station, the stator's rotation axis extends vertically, and the linear scanning direction of the 2D line scan camera is set vertically, making the linear scanning direction parallel to the rotation axis. The parallelism error between the linear scanning direction and the rotation axis does not exceed ±0.5°.

[0035] The matching relationship between the stator rotation speed and the line scan frequency of the 2D line scan camera is as follows: Set the stator rotation speed to... (Unit: rad / s), the outer diameter of the stator is (Unit: mm), then the linear velocity of the stator circumference surface. Let the pixel size of the 2D line scan camera be... (Unit: mm / pixel), line scan frequency is (Unit: Hz), then the circumferential spacing between two adjacent scan lines on the stator circumferential surface. Overlap rate between two adjacent linear array images To ensure the continuity and robustness of the stitched images, this embodiment controls the rotational speed of the servo motor to achieve a certain circumferential interval. Slightly smaller than pixel size overlap rate The rotational speed is controlled between 2% and 10%. In this embodiment, the stator rotational speed... The line scan frequency of a 2D line scan camera is 0.5 rad / s to 2 rad / s. The frequency range is 5 kHz to 20 kHz. The controller determines the matching relationship between the stator's rotation speed and the line scan frequency based on the preset overlap rate target value, and sends a line scan frequency control signal to the 2D line scan camera, while simultaneously sending a speed control signal to the servo motor. The encoder of the servo motor provides real-time feedback on the actual rotation angle of the stator, and the controller dynamically adjusts the line scan frequency of the 2D line scan camera or the speed of the servo motor based on the encoder feedback signal to compensate for speed deviations.

[0036] The stitching process of the unfolded images is as follows: The 2D line scan camera continuously acquires images during the uniform rotation of the stator. Linear array images, the controller will process them according to the acquisition time sequence. Linear array images are arranged row by row and stitched together to form a circumferentially unfolded image. The stitching algorithm includes: grayscale correction and noise filtering for each row of linear array images; calculating the offset between adjacent rows using phase correlation or normalized cross-correlation methods and performing position correction; fusing pixel values ​​in overlapping areas using a weighted average fusion algorithm; and arranging and stitching the processed rows of images sequentially according to time order. When the number of rows acquired... satisfy When the complete scan of one circumference is completed, image acquisition is stopped and the complete unfolded circumference image is output.

[0037] Optionally, the process of obtaining the width of each insulating paper of the stator includes: The stator is rotated and scanned to obtain an image of its unfolded circumference. Perform grayscale transformation on the unfolded image to obtain the transformed image; An adaptive threshold segmentation method is used to segment the insulating paper region in the transformed image to obtain the two sides of the insulating paper. Multiple measurement points are taken on both sides of the insulating paper area. The multiple measurement points on both sides are fitted into two straight measurement lines, and the distance between the two straight measurement lines is measured to obtain the width of a single insulating paper. Using the width of a single insulating paper as a reference, the center point coordinates of the remaining insulating papers in the image are obtained by using image segmentation tools and prior structural information of the stator core slots evenly distributed along the circumference. The width of the insulating paper is then detected cyclically using the center point coordinates to obtain the width of each insulating paper in the stator.

[0038] Understandably, once the stator enters the third inspection station, the lifting gripper lifts and clamps the stator, while the cooperating robot moves the 2D line scan camera to the imaging position. During the stator's rotation, the 2D line scan camera continuously acquires images of the stator's circumference, which are then stitched together to form an unfolded image of the stator's circumference.

[0039] Then, grayscale transformation is performed on the unfolded image to enhance the grayscale contrast between the insulating paper and the background area. Grayscale transformation can be grayscale stretching (stretching the grayscale range corresponding to the insulating paper to the full range of 0~255) or grayscale inversion (making the insulating paper appear as a bright area and the background area appear as a dark area) to facilitate subsequent segmentation and extraction.

[0040] Next, an algorithm module can be installed at the controller or the third detection station to perform insulating paper segmentation on the transformed image using an adaptive threshold segmentation method, obtaining the two edges of the insulating paper. When the grayscale difference between the insulating paper and the iron core area is insufficient for effective segmentation using a single global threshold, the adaptive threshold segmentation method dynamically determines the segmentation threshold for each local area based on the grayscale distribution of the local image area, adapting to different lighting conditions and grayscale changes at different locations.

[0041] Specifically, the size of the local neighborhood window is determined based on the expected width and expected spacing of the insulating paper in the image. The window size is 2 to 4 times the expected width of the insulating paper. In this embodiment, the window size is 150 pixels × 150 pixels, and the step size (sliding step size) is 30 pixels. When the width of the insulating paper varies within the range of 50 to 200 pixels, the window size is adaptively adjusted to 3 times the expected width of the insulating paper. For any pixel in the image... The grayscale value of all pixels within a local neighborhood window centered on it is The standard deviation is Local threshold The calculation formula is: ; in, The preset adjustment coefficient is used to control the segmentation sensitivity. In this embodiment... The value range is 0.2 to 0.5, preferably 0.3. When it is necessary to improve the detection rate of the edge of the insulating paper, the value will be... Adjust to a smaller value (e.g., 0.2); when it is necessary to reduce the risk of over-segmentation, Adjust to a larger value (e.g., 0.5).

[0042] Simultaneously calculate the global grayscale mean of the entire image. The local threshold and the global threshold are weighted and fused to obtain the final segmentation threshold. : ; in, This is the local threshold weighting coefficient, with a value ranging from 0.6 to 0.9. In this embodiment... The preferred value is 0.75. When the image illumination distribution is relatively uniform, The value can be appropriately reduced (e.g., to 0.6) to decrease the interference of local noise on the segmentation results; when the image illumination distribution is uneven, The value can be appropriately increased (e.g., to 0.9) to enhance the algorithm's adaptability to local lighting changes. Pixel grayscale value at With the final segmentation threshold Comparison: When At that time, the pixel points If the area is identified as insulating paper, it is considered background. For example, the Canny edge detection algorithm can be used to extract the two edges of the insulating paper.

[0043] Then, multiple measurement points are taken on both sides of the insulating paper, and the corresponding width measurements are calculated and averaged to obtain the width of a single insulating paper. It is worth mentioning that after obtaining the width of a single insulating paper, it is also necessary to locate the positions of the remaining insulating papers in the unfolded circumferential image. Specifically, the reasoning involves using the geometric positioning function of an image segmentation tool, based on the prior structural information of the stator core slots being uniformly distributed along the circumference, to calculate the theoretical center point coordinates of the remaining insulating papers.

[0044] Let the coordinates of the center point of the target insulating paper be the reference point. The total number of slots in the sub-core is set to be The angular interval between adjacent slots is Using reference points Using the starting reference point, proceed according to a fixed angle step size. The theoretical polar coordinates of each slot are calculated sequentially, and the mapping relationship from polar coordinates to rectangular coordinates in the unfolded image is used to transform the theoretical positions to image pixel coordinates, thus obtaining the theoretical center point coordinates of the remaining insulating paper. For example, assuming the stator has 36 slots, the angular interval between adjacent slots is 10°. Taking the slot where the target insulating paper is located as the first slot, then the... The theoretical position of each slot is: relative to the first slot, rotated circumferentially. Image segmentation tools (such as CogSegmentTool in Cognex VisionPro) have the aforementioned geometric calculation functions built-in: users only need to input the pixel coordinates of the reference point and the total number of slots. With the polar-Cartesian coordinate mapping parameters of the unfolded image, the tool can automatically calculate and output the pixel coordinates of the theoretical center points of each slot, which can be used as the positioning basis for subsequent detection, and thus obtain the width of each insulating paper of the stator.

[0045] Finally, the width of each insulating paper is compared with a preset width range (e.g., 5.0mm to 6.5mm): when the width of each insulating paper is within the preset width range, the width of the insulating paper is deemed to be qualified; when any insulating paper width is detected to exceed the preset width range, the width of the insulating paper is deemed to be unqualified (too narrow indicates insufficient insulation, too wide indicates the risk of the insulating paper exceeding the slot and affecting subsequent assembly).

[0046] The controller is communicatively connected to the first 2D camera, the second 2D camera, the 2D line scan camera, and the sorting device. The controller is used to receive the first detection result, the second detection result, and the third detection result, generate a comprehensive judgment result based on the first detection result, the second detection result, and the third detection result, and control the sorting device to perform sorting operations on the stator based on the comprehensive judgment result.

[0047] Understandably, the controller can also record the detection data and sorting results of each stator and generate detection statistical reports to facilitate quality traceability and process improvement.

[0048] The controller can also include a stator identification management module to assign a unique stator number to each stator. The stator number is either an auto-incrementing serial number or a unique code generated based on a timestamp, and each stator number corresponds one-to-one with the physical entity of the stator. A first position sensor is installed at the entrance of the conveyor. When the first position sensor detects a new stator entering the conveyor, it sends a trigger signal to the controller. The controller assigns a stator number to the current stator and binds the stator number to the current system timestamp. A second, third, and fourth position sensor can also be installed at the entrances of the first, second, and third inspection stations, respectively. When a stator arrives at the entrance of any inspection station, the corresponding position sensor sends an arrival signal to the controller. The controller matches the corresponding stator number based on the timestamp of the arrival signal and the operating speed of the conveyor, and binds and stores this stator number with the inspection result of the current inspection station.

[0049] The controller can also include a stator position tracking module, which comprises a first-in, first-out (FIFO) queue for storing the stator numbers and corresponding position information of all stators on the conveyor. An encoder is installed on the conveyor, connected to the drive motor of the conveyor, for real-time detection of the conveyor's travel distance. The controller calculates the real-time displacement of the conveyor based on the encoder's pulse signals and, combined with the initial position of each stator when it enters the conveyor, calculates the real-time absolute position coordinates of each stator. Position sensors at each detection station are positioned at a preset distance before the image capture position at that station. When a position sensor detects the arrival of a stator, the controller records the current encoder pulse count and calculates the predicted time for the stator to reach the image capture position based on the preset distance, triggering the camera at the corresponding detection station to take a picture. Each camera, when taking a picture, sends the stator number, detection result, station number, and timestamp of the current stator to the controller.

[0050] When the inspection time at a certain inspection station exceeds the preset inspection time threshold, the controller executes an anti-misalignment control strategy: the controller sends a pause command to the drive motor of the conveyor, pausing the conveyor's operation; the stator that has exceeded the inspection time limit is marked as an expired stator, and its stator number is temporarily removed from the FIFO queue, to be reinserted at the head of the FIFO queue after the next stator inspection is completed; when all inspection stations are idle and the stator numbers in the FIFO queue match the actual stator order on the conveyor, the controller sends a resume operation command to the drive motor of the conveyor. It is worth noting that the binding relationship between the stator number in the FIFO queue and the inspection result is not cleared immediately after inspection, but only after the stator has completed final sorting and been confirmed to be out of the queue. All stator inspection data that has been removed from the queue is persistently stored in the controller's non-volatile memory for subsequent quality traceability and statistical report generation.

[0051] The controller has a built-in system clock. The first 2D camera, the second 2D camera, and the 2D line scan camera each receive the clock synchronization signal from the controller. When acquiring images, each camera embeds the system timestamp of the image acquisition time into the acquired image data. After receiving the detection results from each detection station, the controller associates the first, second, and third detection results corresponding to the same stator number into a complete detection record for the same stator based on the stator number and / or timestamp carried in the detection results of each detection station.

[0052] Understandably, the controller can also record the detection data and sorting results of each stator and generate detection statistical reports to facilitate quality traceability and process improvement.

[0053] The controller is also used to control the sorting device to transport the stator to the good product conveying channel when the overall judgment result is qualified, and to control the sorting device to transport the stator to the defective product conveying channel when the overall judgment result is unqualified.

[0054] The controller receives the first detection result from the first detection station, the second detection result from the second detection station, and the third detection result from the third detection station, and generates a comprehensive judgment result based on the first detection result, the second detection result, and the third detection result.

[0055] Optionally, the controller can also be used to record the test data and sorting results of each stator and generate test statistical reports to facilitate quality traceability and process improvement.

[0056] Specifically, the conditions for a satisfactory overall judgment are as follows: First, in the first test result, the radius of the inner circle of the envelope is greater than the radius of the inner circle of the iron core, and the radius of the outer circle of the envelope is less than the radius of the outer circle of the iron core; the pin does not exceed the target area. Second, in the second test result, the height from the top of the coil to the end face is within a preset height range. Third, in the third test result, the width of the insulating paper is within a preset width range. If any of the above conditions are not met, the overall judgment result is unsatisfactory.

[0057] After generating the comprehensive judgment result, the controller controls the sorting device to perform sorting operations on the stator according to the comprehensive judgment result: when the comprehensive judgment result is qualified, the controller controls the sorting device to transport the stator to the good product conveying channel; when the comprehensive judgment result is unqualified, the controller controls the sorting device to transport the stator to the defective product conveying channel.

[0058] In the above technical solution, the present invention achieves multi-dimensional comprehensive appearance inspection of stator end face parameters, pin status, coil top height, and insulation paper width through the coordinated operation of three vision sensors—a first 2D camera, a second 2D camera, and a 2D line scan camera—at three inspection stations. The invention also achieves automatic stator transport via a conveying device, automatic comprehensive judgment of inspection results via a controller, and automatic sorting of good and defective products via a sorting device. The detection accuracy of the present invention can reach sub-pixel level, and the detection efficiency meets the online inspection cycle requirements of the production line. It effectively replaces traditional manual visual inspection and manual sorting, significantly improving detection efficiency and product quality consistency.

[0059] Figure 4 This is a flowchart of a stator appearance inspection and sorting method provided in an embodiment of the present invention, as shown below. Figure 4 As shown, the method applied to the aforementioned stator appearance inspection system may include the following steps: S401. The stator is sequentially conveyed to the first inspection station, the second inspection station and the third inspection station according to the conveying device; S402. At the first inspection station, a first 2D camera is used to take pictures and inspect the stator above it to obtain the first inspection result. S403. At the second inspection station, a second 2D camera is used to take pictures and inspect the side of the stator to obtain the second inspection result. S404. At the third inspection station, the stator is rotated and scanned by a 2D line scan camera to obtain the third inspection result. S405. Based on the first, second, and third detection results associated with the stator numbers, a comprehensive judgment result is generated by the controller, and the sorting device is controlled to perform sorting operations on the stators according to the comprehensive judgment result; wherein, the stator numbers are assigned by the controller, and each stator has a unique stator number; S406. When the overall judgment result is qualified, the control sorting device will transport the stator to the good product conveying channel; S407. When the overall judgment result is unqualified, the control sorting device will transport the stator to the defective product conveying channel.

[0060] It is understood that the method embodiments are basically similar to the system embodiments, so the description is relatively simple, and relevant parts can be referred to in the description of the system embodiments.

[0061] It should be noted that the terms "first," "second," etc., are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention.

[0062] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.

[0063] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings and the disclosure in carrying out the claimed invention. In the description of the invention, the word "comprising" does not exclude other components or steps, "a" or "an" does not exclude a plurality, and "a plurality" means two or more, unless otherwise explicitly specified. Furthermore, while different embodiments may describe certain measures, this does not mean that these measures cannot be combined to produce good results.

[0064] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.

Claims

1. A stator appearance inspection system to replace manual visual inspection, characterized in that, The system includes: a conveying device, a first inspection station, a second inspection station, a third inspection station, a sorting device, and a controller; The conveying device is used to convey the stator to be tested; The first inspection station is equipped with a first 2D camera for taking pictures and inspecting above the stator to obtain a first inspection result; wherein, the first inspection result includes whether the inner circle of the stator, the outer circle of the stator, the inner circle of the core, and the outer circle of the core meet preset conditions and whether the pin of the stator exceeds the target area. The second inspection station is equipped with a second 2D camera for taking pictures and inspecting the side of the stator to obtain a second inspection result; wherein, the second inspection result includes whether the height value from the top of the coil to the end face of the stator exceeds a preset height range; The third inspection station is equipped with a 2D line scan camera, which is used to perform rotational scanning and photographing of the stator to obtain a third inspection result; wherein, the third inspection result includes whether the width of the insulating paper of the stator exceeds a preset width range. The controller is communicatively connected to the first 2D camera, the second 2D camera, the 2D line scan camera, and the sorting device. The controller is also used to assign a unique stator number to each stator, associate the detection results of the same stator at the first detection station, the second detection station, and the third detection station according to the stator number, generate a comprehensive judgment result of the stator based on the associated first detection result, second detection result, and third detection result, and control the sorting device to perform sorting operation on the stator according to the comprehensive judgment result. The controller is further configured to control the sorting device to transport the stator to the good product conveying channel when the overall judgment result is qualified, and to control the sorting device to transport the stator to the defective product conveying channel when the overall judgment result is unqualified.

2. The stator appearance inspection system according to claim 1, replacing manual visual inspection, is characterized in that, The third inspection station is also equipped with a collaborative robot arm, on which the 2D line scan camera is mounted. The collaborative robot arm is used to move the 2D line scan camera to the imaging position. The third inspection station is also equipped with a lifting gripper, which is used to lift and clamp the stator.

3. The stator appearance inspection system according to claim 1, replacing manual visual inspection, is characterized in that, The process of obtaining the inner circle of the stator envelope, the outer circle of the stator envelope, the inner circle of the iron core, and the outer circle of the iron core includes: Stator pixel features are extracted based on the acquired end face image of the stator; A circular region of interest extraction algorithm based on least squares fitting is used to fit the extracted stator pixel features to obtain the outer envelope circle, inner envelope circle, outer core circle, and inner core circle in the end face image.

4. The stator appearance inspection system according to claim 1, replacing manual visual inspection, is characterized in that, The preset conditions include: the radius of the inner circle of the envelope is greater than the radius of the inner circle of the iron core and the radius of the outer circle of the envelope is less than the radius of the outer circle of the iron core.

5. The stator appearance inspection system according to claim 1, replacing manual visual inspection, is characterized in that, The process for determining whether the stator pins extend beyond the target region includes: The end face image of the stator is acquired and preprocessed to obtain the preprocessed end face image; The detection region is obtained by extracting the target region from the preprocessed end face image based on template matching or Blob; An adaptive threshold Blob detection is performed within the detection area, and the stator pin is determined to be outside the target area based on the obtained Blob detection result.

6. The stator appearance inspection system according to claim 1, replacing manual visual inspection, is characterized in that, The process of obtaining the height value from the top of the stator coil to the end face includes: The second 2D camera is calibrated to establish a mapping relationship between the side image pixel coordinate system and the physical coordinate system; Obtain a side view image of the stator; Extract the edge contour at the junction of the stator end face and the side wall in the side image and perform straight line fitting to obtain the second baseline; A region of interest is set in the side image, and grayscale jump points are detected line by line along a direction perpendicular to the second baseline to determine the position of the top of the coil; Based on the vertical pixel distance between the top position of the coil and the second baseline, and combined with the mapping relationship, the vertical pixel distance is converted into a physical dimension to obtain the height value from the top of the stator coil to the end face.

7. The stator appearance inspection system according to claim 1, replacing manual visual inspection, is characterized in that, The process of obtaining the width of the insulating paper of the stator includes: The stator is rotated and scanned to obtain an image of its unfolded circumference. Perform grayscale transformation on the unfolded image to obtain the transformed image; An adaptive threshold segmentation method is used to segment the insulating paper region in the transformed image to obtain the two sides of the insulating paper. Multiple measurement points are taken on both sides of the insulating paper area. The multiple measurement points on both sides are fitted into two straight measurement lines, and the distance between the two straight measurement lines is measured to obtain the width of a single insulating paper. Using the width of a single insulating paper as a reference, the center point coordinates of the remaining insulating papers in the image are obtained using an image segmentation tool and prior structural information of the stator core slots evenly distributed along the circumference. The width of the insulating paper is then cyclically detected using the center point coordinates to obtain the width of each insulating paper of the stator.

8. A method for stator appearance inspection and sorting, characterized in that, The method, applied to the stator appearance inspection system according to any one of claims 1 to 7, comprises: The stator is sequentially conveyed to the first inspection station, the second inspection station, and the third inspection station by the conveying device; At the first inspection station, a first 2D camera is used to take pictures and inspect the stator above it to obtain the first inspection result; At the second inspection station, a second 2D camera is used to take pictures and inspect the side of the stator to obtain a second inspection result; At the third inspection station, the stator is rotated and scanned using a 2D line scan camera to obtain the third inspection result. Based on the first, second, and third detection results associated with the stator numbers, a comprehensive judgment result is generated by the controller, and the sorting device is controlled to perform sorting operations on the stators according to the comprehensive judgment result; wherein, the stator numbers are assigned by the controller, and each stator has a unique stator number; When the overall judgment result is qualified, the sorting device is controlled to transport the stator to the good product conveying channel; When the overall judgment result is unqualified, the sorting device is controlled to transport the stator to the defective product conveying channel.