Method for detecting defects of motor stator based on three-dimensional point cloud
By combining image acquisition and 3D point cloud reconstruction with a cascade detection model, the problems of low efficiency and poor accuracy in traditional motor stator detection are solved, efficient and automated motor stator defect detection is achieved, and the accuracy and speed of detection are improved.
Patent Information
- Application Number
- CN202410993181.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-07-23
AI Technical Summary
Traditional motor stator defect detection methods are inefficient and inaccurate, and are easily affected by the subjective factors of the inspector, which affects the motor quality inspection process.
An image acquisition device is used to scan the motor stator from different angles to reconstruct three-dimensional point cloud data. The defect type and location are determined through a pre-trained defect detection model. An array camera is used to improve acquisition efficiency, and a cascaded binary and multi-classification detection model is used to improve detection speed and accuracy.
It achieves efficient and automated defect detection of motor stators, improves detection accuracy and speed, reduces human errors, and improves the reliability of the motor quality inspection process.
Smart Images

Figure CN119151859B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of motor detection, in particular to a motor stator defect detection method and system based on three-dimensional point cloud. BACKGROUND
[0002] With the wide popularity of new energy vehicles, the related research of new energy vehicles has been highly valued by scientific research institutions and companies in various countries. As one of the three core systems of new energy vehicles, the driving motor provides the main driving power for vehicle running, and its characteristics determine the main performance indicators of the vehicle, directly affecting the vehicle's power, economy and user's driving experience.
[0003] The motor stator and rotor are important components of the motor, which work together to realize the operation of the motor. Among them, the motor stator is a fixed part of the motor, which is usually composed of a core, a winding and a base, etc., and its main function is to generate a magnetic field. The core in the motor stator is made of silicon steel sheets with good magnetic conductivity. Its function is to form the main magnetic circuit of the motor and fix the winding. The core is generally composed of two layers of inner and outer iron, the inner iron is sleeved with the winding, and the outer iron is sleeved with the end cover. The winding is another important component of the motor stator, which is made of insulated wires according to a certain shape and manner. The winding generates a magnetic field after being energized, realizing the conversion of electrical energy to mechanical energy. According to the number of phases of the power supply, the winding can be divided into single-phase winding and three-phase winding, etc.
[0004] The motor stator is an important part of the motor, and its quality directly affects the performance and service life of the motor. However, the traditional motor stator defect detection method relies on manual detection, which is not only low in efficiency, but also easily affected by the subjective factors of the detector, resulting in low accuracy of the detection results, which seriously affects the motor quality inspection process. Therefore, it is necessary to provide an efficient and accurate motor stator defect detection method. SUMMARY
[0005] The purpose of the present application is to provide a motor stator defect detection method based on three-dimensional point cloud, to solve the problems of low efficiency and poor accuracy of traditional detection methods, and to improve the automation degree.
[0006] To achieve the above-mentioned purpose, the present application adopts the following technical solutions:
[0007] The image acquisition device scans and collects the motor stator from different angles to obtain multiple image data of the motor stator and corresponding depth information; based on the multiple image data of the motor stator and the depth information, the three-dimensional point cloud data of the motor stator is reconstructed; the three-dimensional point cloud data of the motor stator is input into the pre-trained defect detection model, and the type and position of the defect are judged through the defect prediction model; the detection is ended.
[0008] Further, the image data of the plurality of motor stators can be a plurality of images obtained at the same scanning angle from a plurality of scanning positions around the motor stator to be measured, or can be a plurality of images obtained at different scanning angles from a plurality of scanning positions around the motor stator to be measured.
[0009] Further, the image acquisition device comprises an array camera, the array camera is adjustable in overall angle, and each camera has a different shooting angle, and a plurality of appearance images of the motor stator are obtained at one time of shooting.
[0010] Further, the defect detection model is obtained by training a neural network model.
[0011] Further, the defect type can be a crack, a scratch, a bubble, a stain, delamination, etc.
[0012] Further, the acquired image data is preprocessed, and the preprocessed image data is resolution enhanced.
[0013] Further, the resolution enhanced image is convolved to obtain first image features, a plurality of cascaded feature extraction units are set, the feature extraction units perform convolution processing, the input of the first-level feature extraction unit is the first image features, the input of each subsequent feature extraction unit is the first image features and the output of each previous feature extraction unit, and the output of the last feature extraction unit is fused with the first image features, thereby obtaining image data with higher resolution.
[0014] Further, the three-dimensional point cloud data is input into the first defect detection model to determine whether there is a defect, and if there is a defect, the three-dimensional point cloud data is continuously input into the second defect detection model to determine the type and position of the defect. BRIEF DESCRIPTION OF DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0016] Figure 1 is a flowchart of an embodiment of the motor stator defect detection method based on three-dimensional point cloud of the present application;
[0017] Figure 2 is a flowchart of an embodiment of processing image data before reconstructing three-dimensional point cloud of the present application;
[0018] Figure 3is a flowchart of array camera data acquisition and processing according to an embodiment of the present application;
[0019] Figure 4 is a flowchart of a defect detection method according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, any other embodiments obtained by a person of ordinary skill in the art without creative work fall within the scope of the present application.
[0021] Please refer to Figure 1 , Figure 1 is a flowchart of a motor stator defect detection method based on three-dimensional point cloud according to an embodiment of the present application. As shown in the figure, the method comprises:
[0022] Step S1: scanning and collecting the motor stator from different angles by an image acquisition device to obtain multiple image data of the motor stator and corresponding depth information.
[0023] Specifically, the multiple image data of the motor stator can be multiple images obtained from multiple scanning positions around the motor stator to be measured at the same scanning angle, or multiple images obtained from multiple scanning positions around the motor stator to be measured at different scanning angles respectively, so as to completely cover the appearance details of the motor stator to be measured.
[0024] Preferably, the image acquisition device can comprise an array camera, the array camera is adjustable in overall angle, and each camera has a different shooting angle. Multiple appearance images of the motor stator can be obtained at one time, which not only improves the collection efficiency, but also obtains more angle image data, which is beneficial to fully reproduce the three-dimensional appearance of the motor stator to be measured in three-dimensional point cloud reconstruction.
[0025] Step S2: reconstructing three-dimensional point cloud data of the motor stator based on the multiple image data of the motor stator and the depth information.
[0026] The image data provides two-dimensional coordinates of pixels, i.e. x and y values in the XY coordinate system, and the depth information provides Z coordinates in the camera coordinate system. According to the internal and external parameters of the camera, the coordinates of any pixel in the world coordinate system can be calculated, so as to reconstruct the three-dimensional point cloud data model of the motor stator.
[0027] Step S3: inputting the three-dimensional point cloud data of the motor stator into a pre-trained defect detection model to determine the type and position of the defect through the defect prediction model.
[0028] The defect detection model is obtained by training a neural network model, and the input of the defect detection model is three-dimensional point cloud data of the motor stator. By directly processing the three-dimensional point cloud data, the complex operations of projecting, registering, and performing 2D-3D mapping on the three-dimensional point cloud data are avoided, and data errors and information loss caused by the projection and mapping process are also avoided.
[0029] Preferably, the defect types can be cracks, scratches, bubbles, stains, delamination, etc.
[0030] Step S4: end detection.
[0031] Since the image data affects the accuracy of subsequent three-dimensional point cloud data reconstruction, the collection of image data can be affected by environmental interference and equipment, resulting in image data with noise or unclearness, etc. Therefore, before the three-dimensional point cloud data reconstruction, the image can also be processed.
[0032] Please refer to Figure 2 , Figure 2 is a flowchart of an embodiment of the present application for processing image data before three-dimensional point cloud reconstruction.
[0033] Specifically, in some embodiments, step S2 can include:
[0034] Step S21: pre-processing the collected image.
[0035] The pre-processing operation can be denoising, cropping, contrast enhancement, histogram equalization, etc.
[0036] Step S22: performing resolution enhancement on the pre-processed image.
[0037] Specifically, the pre-processed image is convolved to obtain first image features, a plurality of cascaded feature extraction units are set, the feature extraction units perform convolution processing, the input of the first-level feature extraction unit is the first image features, and the input of each subsequent feature extraction unit is the first image features and the output of each previous feature extraction unit. The output of the last feature extraction unit is fused with the first image features to obtain image data with higher resolution. Each feature extraction unit includes sequentially connected convolution layers and residual layers.
[0038] The specific calculation process of resolution enhancement is that the convolution calculation is denoted as f, the activation function is denoted as t, and R i The i-th level residual block is denoted as:
[0039]
[0040] Where H ian output of an i-th level residual block, denotes a parameter set, denotes parameters of a j-th convolutional layer in the i-th level residual block. The output feature of the last residual block is denoted as H u , denoted as:
[0041]
[0042] For the first level residual block, the input is f(X; W c ), where X is the original image data, W c is the convolutional parameter for convolution on the original image.
[0043] The j-th residual block of the i-th level feature extraction unit is defined as denotes a parameter set of the i-th level local concatenation block, then the i-th level local concatenation block is denoted as:
[0044]
[0045] where B i,U is defined as recursively callable, that is:
[0046] B i,0 = H i-1
[0047]
[0048] In the above manner, the output feature of the final concatenation block H u can be obtained:
[0049] H 0 = f(X; W c )
[0050]
[0051] where B is the number of concatenated feature extraction units.
[0052] Step S23: performing three-dimensional point cloud reconstruction based on the image data after resolution enhancement.
[0053] Specifically, the three-dimensional point cloud reconstruction process is:
[0054] Feature points are extracted for each picture, and then feature point matching is performed between the collected pictures based on the feature points to determine the positions of the same feature points in each picture, and the pixel values and corresponding position coordinates of the feature points are recorded.
[0055] Based on the camera intrinsic matrix and the pixel depth, the pixel coordinates in the two-dimensional image are converted into point cloud coordinates, and the calculation formula is as follows:
[0056]
[0057] wherein P(u,v) is the point cloud coordinate of the pixel point P, u and v are the pixel coordinates of the pixel point P in the two-dimensional image, D(u,v) is the depth information of the corresponding pixel point P, K is the intrinsic matrix of the camera, is a coordinate matrix.
[0058] The three-dimensional space coordinate information of the feature point is obtained according to the pixel value and the corresponding position coordinate of the recorded feature point.
[0059] Based on the feature points, the point cloud fusion of multi-angle data is performed using the existing PCL point cloud fusion technology, and the redundant and repetitive point cloud data is eliminated, so as to obtain the final point cloud model.
[0060] Preferably, when the image acquisition device is an array camera, step S23 can further include:
[0061] S231: identifying the feature points of each of the n images, selecting one image as a reference image, and matching the feature points based on the reference image, wherein the n images are respectively acquired by n cameras in the array camera, and the feature points are pixel points capable of indicating a feature of the motor stator.
[0062] S232: calculating the distance difference of the matching feature points between the remaining n-1 images and the reference image, respectively, and removing the corresponding image when the distance difference is greater than a threshold value.
[0063] When the distance difference of the matching feature points is large, it indicates that the image is greatly different from the reference image due to noise or other interference factors, and is not suitable for point cloud reconstruction data.
[0064] In the preferred embodiment, step S3 can include the following steps, as shown in Figure 4
[0065] S31: inputting the three-dimensional point cloud data into a first defect detection model to determine whether there is a defect;
[0066] S32: if there is a defect, continue to input the three-dimensional point cloud data into a second defect detection model to determine the type and position of the defect.
[0067] In this embodiment, the defect detection model is composed of a first defect detection model and a second defect detection model. The first defect detection model is a simple binary classification detection model, which can quickly screen data with defects. Only point cloud data with defects is input to the second defect detection model for judgment of defect type and position. Since the complexity of the convolutional neural network is closely related to the calculation efficiency, the binary classification model has a simple network structure and fast calculation speed compared with the multi-classification model. If there is only one defect detection model, data without defects also needs to be judged by the multi-classification, thereby affecting the detection efficiency. In this embodiment, the first defect detection model and the second defect detection model are cascaded, which can quickly screen point cloud data with defects, and only the point cloud data with defects is subjected to multi-classification judgment, thereby greatly improving the calculation speed.
[0068] The specific training process of the defect detection model is as follows:
[0069] Step 1: Obtain a training set with labels, wherein the labels of the first defect detection model training set are whether there is a defect, and the labels of the second defect detection model training set are defect type and position information. In order to improve the comprehensiveness and accuracy of the defect detection model, the training set can include training data of multiple types of defects and all possible positions of defects.
[0070] Step 2: Input the training set into the defect detection model to be trained for training. For the first defect detection model, set a false detection rate threshold. When the false detection rate does not exceed the threshold, judge whether the missed detection rate of the trained model is 0. If the missed detection rate is 0, end the training of the first defect detection model. If the missed detection rate is not 0, continue to adjust the parameters in the trained model. For the second defect detection model, judge whether the model training has converged by calculating whether the loss function is less than a threshold. The loss function can be any loss function in the prior art, such as cross-entropy loss function, logarithmic loss function, etc.
[0071] The false detection rate is the proportion of samples actually without defects that are incorrectly judged as having defects. A false detection rate that is too high means that the model will incorrectly judge normal motor stators as having defects. The missed detection rate refers to the proportion of samples actually with defects that are incorrectly judged as having no defects. By setting the false detection rate to be less than a certain threshold, the proportion of normal motor stators being incorrectly judged as defective stators can be reduced. By setting the missed detection rate to be 0, it can be ensured that all motor stators with defects can be detected. Through the above setting method, the effectiveness and accuracy of the defect detection model can be improved.
[0072] The motor stator defect detection method based on three-dimensional point cloud in the application, through the image acquisition device, the motor stator is scanned and collected from different angles, so as to obtain multiple image data of the motor stator and corresponding depth information, based on the multiple image data of the motor stator and the depth information, the three-dimensional point cloud data of the motor stator is reconstructed, the three-dimensional point cloud data of the motor stator is input into the defect detection model trained in advance, and the type and position of the defect are judged through the defect prediction model. Through this method, the automatic detection of motor stator defects can be realized, and the detection accuracy is high. Moreover, the imaging quality is improved by processing the collected stator image, which is beneficial to the reconstruction quality of the three-dimensional point cloud. At the same time, the cascaded secondary defect detection model is adopted, firstly, whether the stator has defects is judged, when the defects exist, the type and position of the defects are judged, the point cloud data with defects can be quickly screened out, only the point cloud data with defects is subjected to multi-classification judgment, the calculation speed is greatly improved, and good economic benefits and popularization prospect are obtained.
[0073] Finally, it should be pointed out that those skilled in the art can easily understand that the above-described embodiments are only preferred embodiments of the present application, which are used to illustrate the technical solutions of the present application, but not to limit them, and any modifications, equivalent replacements and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A motor stator defect detection method based on three-dimensional point cloud, characterized in that: The method comprises: Scanning and collecting the motor stator from different angles using an image acquisition device to obtain multiple images of the motor stator and corresponding depth information; Preprocessing the image data, convolving the preprocessed image data to obtain a first image feature, setting a plurality of cascaded feature extraction units, the feature extraction units performing convolution processing, the input of the first-level feature extraction unit is the first image feature, and the input of each subsequent level of feature extraction unit is the first image feature and the output of each previous level of feature extraction unit, and fusing the output of the last level of feature extraction unit with the first image feature; The specific calculation process is as follows: assuming that the convolution calculation is recorded as f, the activation function is expressed as t, R i Represents the residual block of level i, recorded as: Among them, H i represents the output of the i-th level residual block, Represents a parameter set, Represents the parameters of the jth convolutional layer in the i-th level residual block; the output feature of the last residual block is represented as H u , expressed as: For the first-level residual block, its input is f(X;W c ), where X is the original image data, W c is the convolution parameter for convolving the original image; The j-th residual block of the i-th level feature extraction unit is defined as , represents the parameter set of the local cascade block at level i, then the local cascade block at level i is represented as: Among them, B i,U Defined as recursive callable, that is: u=1,...,U Where U represents the recursive round; Through the above method, the final cascade block H can be obtained u Output features: b=1,...,B, Among them, B is the number of cascaded feature extraction units; Reconstruct the three-dimensional point cloud data of the motor stator based on multiple images and depth information of the motor stator; Inputting the three-dimensional point cloud data of the motor stator into a pre-trained defect detection model, and determining the type and location of the defect through the defect detection model; End detection.
2. The method according to claim 1, characterized in that The multiple motor stator image data are multiple images acquired from multiple scanning positions around the motor stator to be tested at the same scanning angle, or multiple images acquired from multiple scanning positions around the motor stator to be tested at different scanning angles.
3. The method according to claim 2, characterized in that The image acquisition device includes an array camera. The overall angle of the array camera is adjustable, and each camera has a different shooting angle, so that multiple appearance images of the motor stator can be obtained in one shooting.
4. The method according to claim 1, wherein The defect detection model is obtained by training the neural network model.
5. The method according to claim 1, wherein Defect types include cracks, scratches, bubbles, stains, and delamination.
6. The method according to claim 1, characterized in that The three-dimensional point cloud data is input into the first defect detection model to determine whether a defect exists; if a defect exists, the three-dimensional point cloud data is further input into the second defect detection model to determine the type and location of the defect.
Citation Information
Patent Citations
Product defect detection system and method
CN110609037A
Image enhancement method and device for reversing image
CN117078512A
Transmission and distribution device diagnosis method, apparatus, and system, computing device, medium, and product
WO2020232608A1