An electromagnetic coil fault detection system and method based on image analysis
By using image analysis to obtain visible light images of the surface of an electromagnetic coil, segmenting the thermochromic region and performing anisotropic diffusion analysis, and combining the winding space topology model, the problem of identifying the location of thermal faults in electromagnetic coils was solved, and high-precision fault location was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- AMISCO AUTOMATION COMPONENTS (SHENZHEN) CO LTD
- Filing Date
- 2026-04-28
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies cannot effectively identify the location of thermal faults under the influence of anisotropy in electromagnetic coil windings. Traditional methods cannot distinguish whether the irregular shape of hot spots originates from heat source characteristics or is an artifact formed by the distortion of the winding's heat conduction path.
By acquiring visible light images of the surface of the electromagnetic coil, segmenting the thermochromic region, extracting the edge contour and calculating the normal direction, and combining the winding conduction direction to perform anisotropic diffusion analysis, multiple diffusion state images are generated. The location of potential heat source faults is then identified by combining the winding spatial topology model.
This method enables accurate location of thermal faults under the influence of anisotropy in electromagnetic coil windings, improving the accuracy and precision of fault identification and avoiding feature distortion associated with traditional methods.
Smart Images

Figure CN122453754A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of fault detection technology, and more specifically, to an electromagnetic coil fault detection system and method based on image analysis. Background Technology
[0002] Fault detection is a key technology to ensure the reliable operation of industrial equipment and systems. With the development of industrial automation and Internet of Things technologies, modern fault detection has evolved from traditional periodic maintenance to data-driven intelligent prediction and health management. It collects equipment operation data in real time through sensors and uses signal processing, feature extraction and machine learning algorithms to perform status analysis and early fault identification, effectively avoiding unplanned downtime and improving equipment safety and operating efficiency.
[0003] In existing fault detection methods, fault detection first involves real-time acquisition of equipment operating data using various sensors (such as vibration, temperature, acoustic, and current sensors). Then, signal processing techniques (such as time-frequency analysis and wavelet transform) are used to extract key features characterizing the equipment's health status from the raw data. Finally, these features are analyzed and compared using predefined rule thresholds or pre-trained intelligent diagnostic models to identify the specific fault type. However, in image-based electromagnetic coil fault detection, when localized overheating occurs inside the electromagnetic coil, a region of color or texture change due to temperature rise (i.e., thermochromic region) forms on the surface of the coil. Because the electromagnetic coil... The anisotropy exhibited by the coil winding means that the hot spot morphology observed on the surface of the electromagnetic coil is not a direct reflection of the heat source characteristics, but rather the result of the combined effects of the spatial location and heating intensity of the internal heat source and the anisotropic heat conduction path of the winding. Traditional methods based on infrared thermal imaging or visible light image threshold segmentation can only identify areas of abnormal surface temperature or discoloration, but cannot distinguish whether the irregular shape of the hot spot originates from the characteristics of the heat source itself or is an artifact formed by the distortion of the heat conduction direction dominated by the winding. Consequently, it is impossible to effectively identify the location of thermal faults in the electromagnetic coil. Therefore, how to identify the location of thermal faults in the electromagnetic coil under the influence of the anisotropy exhibited by the electromagnetic coil winding has become a difficult problem for the industry. Summary of the Invention
[0004] This application provides an image analysis-based electromagnetic coil fault detection system and method, which can identify the location of thermal faults in electromagnetic coils under the influence of anisotropy in the coil windings.
[0005] In a first aspect, this application provides an electromagnetic coil fault detection method based on image analysis, comprising the following steps: Acquire visible light images of the surface of the target electromagnetic coil during operation; The thermochromic region representing the electromagnetic coil caused by internal thermal fault conduction is segmented from the visible light image of the surface as the initial hot spot region; Extract the edge contour of the initial hot spot region and calculate the normal direction of each contour point on the edge contour. Based on the normal direction of each contour point and the dominant conduction direction of the target electromagnetic coil winding on the image plane, perform anisotropic diffusion analysis on the initial hot spot region to generate multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil. Each diffusion state image is matched with the morphological features of the initial hot spot region at multiple scales, and then the target diffusion state image with the highest matching degree with the morphological features in terms of diffusion non-uniformity is selected. Based on the target diffusion state image and the winding space topology model of the target electromagnetic coil, the spatial location of potential heat source faults in the initial hot spot region is identified.
[0006] In some embodiments, segmenting the thermochromic region characterizing the electromagnetic coil formed by internal thermal fault conduction from the visible light image of the surface as the initial hot spot region specifically includes: The visible light image of the surface is denoised to obtain a denoised visible light image; The denoised visible light image is converted from the RGB color space to the HSV color space to obtain an HSV format image; The color segmentation threshold of the thermochromic region is determined based on the difference in HSV characteristics between the normal region and the thermochromic region of the electromagnetic coil. The HSV format image is thresholded using the color segmentation threshold to obtain a binary image of the thermochromic candidate region. Morphological opening operations are performed on the binary image of the thermochromic candidate region to obtain the initial hot spot region characterizing the thermal fault conduction inside the electromagnetic coil.
[0007] In some embodiments, extracting the edge contour of the initial hot spot region specifically includes: The Canny edge detection operator is used to calculate the edge response of the initial hot spot region to obtain the hot spot edge point set. Neighborhood connectivity analysis is performed on the set of hot spot edge points to filter out a set of continuous edge segments; The edge contour of the initial hot spot region is obtained by performing contour fitting on the set of continuous edge line segments.
[0008] In some embodiments, calculating the normal direction of each contour point on the edge contour specifically includes: Discrete sampling is performed on the edge contour to obtain a discrete contour point set; Calculate the tangent direction vector of each discrete contour point in the discrete contour point set; The corresponding perpendicular vector is obtained by solving the tangent direction vector of each discrete contour point, and then the initial normal direction vector of each contour point is obtained. The initial normal direction vector is normalized to obtain the normal direction of each contour point.
[0009] In some embodiments, anisotropic diffusion analysis is performed on the initial hot spot region based on the normal direction of each contour point and the dominant conduction direction of the target electromagnetic coil winding on the image plane, thereby generating multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil. Specifically, this includes: Based on the spatial topology model of the target electromagnetic coil winding, the dominant conduction direction of the target electromagnetic coil winding on the image plane is extracted; An anisotropic diffusion tensor is constructed based on the normal direction of each contour point and the dominant propagation direction. Based on the gray-level gradient magnitude of the initial hot spot region, an adaptive diffusion coefficient and multiple diffusion iterations are set. The anisotropic diffusion tensor and the adaptive diffusion coefficient are used to perform anisotropic diffusion operations on the initial hot spot region for a corresponding number of diffusion iterations to obtain multiple sets of intermediate diffusion images. The multiple sets of intermediate diffusion images are normalized to generate multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil.
[0010] In some embodiments, identifying the spatial location of potential heat source faults in the initial hotspot region based on the target diffusion state image combined with the winding spatial topology model of the target electromagnetic coil specifically includes: Perform grayscale extreme value detection on the target diffusion state image to obtain a set of candidate points for thermal diffusion centers; Based on the winding space topology model of the target electromagnetic coil, a coordinate mapping relationship between the image plane and the three-dimensional space of the winding is established; By using the coordinate mapping relationship, the set of candidate heat diffusion centers is mapped to the three-dimensional space of the winding to obtain a three-dimensional set of candidate heat sources; Based on the conductor distribution information in the winding space topology model, the validity of the three-dimensional heat source candidate point set is screened to obtain the valid three-dimensional heat source point set. Spatial clustering analysis is performed on the effective three-dimensional heat source point set to extract the cluster centers as the spatial locations of potential heat source faults in the initial hot spot region.
[0011] In some embodiments, a visible light image of the surface of the target electromagnetic coil during operation is acquired using an industrial camera.
[0012] Secondly, this application provides an image analysis-based electromagnetic coil fault detection system for performing an image analysis-based electromagnetic coil fault detection method. The system includes: The acquisition module is used to acquire visible light images of the surface of the target electromagnetic coil during operation; The processing module is used to segment the thermochromic region representing the electromagnetic coil caused by internal thermal fault conduction from the visible light image of the surface as the initial hot spot region; The processing module is also used to extract the edge contour of the initial hot spot region and calculate the normal direction of each contour point on the edge contour. Based on the normal direction of each contour point and the dominant conduction direction of the target electromagnetic coil winding on the image plane, anisotropic diffusion analysis is performed on the initial hot spot region to generate multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil. The processing module is also used to perform multi-scale matching between each diffusion state image and the morphological features of the initial hot spot region, thereby filtering out the target diffusion state image that has the highest matching degree with the morphological features in terms of diffusion non-uniformity. The execution module is used to identify the spatial location of potential heat source faults in the initial hot spot region based on the target diffusion state image and the winding space topology model of the target electromagnetic coil.
[0013] Thirdly, this application provides a computer device, the computer device including a memory and a processor, the memory storing code, and the processor being configured to acquire the code and execute the above-described image analysis-based electromagnetic coil fault detection method.
[0014] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described image analysis-based electromagnetic coil fault detection method.
[0015] The technical solutions provided by the embodiments disclosed in this application have the following beneficial effects: The electromagnetic coil fault detection system and method based on image analysis provided in this application firstly acquires a visible light image of the target electromagnetic coil during operation; secondly, it segments the thermochromic region representing the electromagnetic coil caused by internal thermal fault conduction as an initial hot spot region from the visible light image; further, it extracts the edge contour of the initial hot spot region and calculates the normal direction of each contour point on the edge contour; based on the normal direction of each contour point combined with the dominant conduction direction of the target electromagnetic coil winding on the image plane, it performs anisotropic diffusion analysis on the initial hot spot region, thereby generating multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil; then, it performs multi-scale matching between each diffusion state image and the morphological features of the initial hot spot region, thereby selecting the target diffusion state image with the highest matching degree with the morphological features in terms of diffusion non-uniformity; finally, based on the target diffusion state image and the winding space topology model of the target electromagnetic coil, it identifies the spatial location of potential heat source faults in the initial hot spot region.
[0016] Therefore, this application can identify the location of thermal faults in electromagnetic coils under the influence of anisotropy in the coil windings. First, by acquiring visible light images of the target electromagnetic coil surface during operation, it can capture the visual characteristics of thermal fault conduction to the surface in real time, providing raw data that accurately reflects the actual operating state for subsequent analysis. Second, segmenting the thermochromic region as the initial hot spot region can accurately remove background interference and focus on the core feature region corresponding to the thermal fault, ensuring the relevance and effectiveness of subsequent analysis. Furthermore, by extracting edge contours and calculating normal directions, combined with the dominant conduction direction of the winding, anisotropic diffusion analysis is performed to generate multiple diffusion state images. This can simulate the actual conduction law of thermal faults along the winding, preserving the non-uniform diffusion characteristics of the hot spot caused by the distribution of internal heat sources, providing data for subsequent analysis. Matching provides multi-dimensional, physically consistent feature carriers, avoiding traditional methods based on infrared thermal imaging or visible light image threshold segmentation, which can only identify abnormal surface temperature areas or discolored areas, but cannot distinguish whether the irregular shape of the hot spot originates from the heat source itself. Then, by screening the target diffusion state image through multi-scale matching, feature distortion caused by excessive or insufficient diffusion can be effectively eliminated, and the optimal image that best fits the initial hot spot morphology and the actual heat conduction characteristics can be identified, improving the accuracy of subsequent fault location. Finally, the fault spatial location is identified by combining the winding space topology model, realizing a precise mapping from two-dimensional image features to three-dimensional physical location. In summary, the technical solution provided in this application can identify the thermal fault location of the electromagnetic coil under the influence of anisotropy exhibited by the electromagnetic coil winding. Attached Figure Description
[0017] Figure 1 This is an exemplary flowchart of an image analysis-based electromagnetic coil fault detection method according to some embodiments of this application; Figure 2 This is an exemplary flowchart illustrating the determination of an initial hot spot region according to some embodiments of this application; Figure 3 This is a schematic diagram of the structure of an image analysis-based electromagnetic coil fault detection system according to some embodiments of this application; Figure 4 This is a schematic diagram of the structure of a computer device that implements an image analysis-based electromagnetic coil fault detection method according to some embodiments of this application. Detailed Implementation
[0018] To better understand the technical solution of this application, the technical solution of this application will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0019] refer to Figure 1 The figure is an exemplary flowchart of an image analysis-based electromagnetic coil fault detection method according to some embodiments of this application. The figure mainly includes the following steps: In step S101, a visible light image of the surface of the target electromagnetic coil during operation is acquired.
[0020] In a specific implementation, an industrial camera is used to acquire a visible light image of the surface of the target electromagnetic coil during operation. In addition, in other embodiments, other acquisition devices can be used to acquire a visible light image of the surface of the target electromagnetic coil during operation. The target electromagnetic coil refers to an electromagnetic coil that needs to be thermally detected.
[0021] It should be noted that the visible light images of the surface in this application refer to images obtained by photographing the surface of the target electromagnetic coil. When a local overheating fault occurs inside the electromagnetic coil, heat will be conducted to the surface through the winding insulation and the inter-turn medium, forming a region on the surface that changes color or texture due to temperature rise (thermochromic region). However, since the winding usually adopts a tightly wound spiral or stacked structure, its heat conduction exhibits strong anisotropy. Therefore, the hot spot morphology observed on the surface is not a direct reflection of the heat source characteristics, but rather the result of the combined effect of the spatial location of the internal heat source, the heating intensity, and the anisotropic heat conduction path of the winding. Traditional infrared thermal imaging threshold segmentation methods can only identify abnormal surface temperature areas but cannot distinguish whether the irregular shape of the hot spot originates from the characteristics of the heat source itself or is an artifact formed by the distortion and elongation of the heat conduction direction dominated by the winding. Therefore, visible light images of the surface can provide a data basis for subsequent fault location of the electromagnetic coil.
[0022] In step S102, the thermochromic region representing the electromagnetic coil caused by internal thermal fault conduction is segmented from the visible light image of the surface as the initial hot spot region.
[0023] In some embodiments, reference Figure 2 As shown, this figure is an exemplary flowchart illustrating the determination of an initial hot spot region according to some embodiments of this application. In this embodiment, segmenting the thermochromic region representing the electromagnetic coil formed by internal thermal fault conduction from the visible light image of the surface as the initial hot spot region can be achieved by the following steps: In step S1021, the visible light image of the surface is denoised to obtain a denoised visible light image. In step S1022, the denoised visible light image is converted from the RGB color space to the HSV color space to obtain an HSV format image; In step S1023, the color segmentation threshold of the thermochromic region is determined based on the difference in HSV characteristics between the normal region of the electromagnetic coil and the thermochromic region. In step S1024, the color segmentation threshold is used to perform threshold segmentation on the HSV format image to obtain a binary image of the thermochromic candidate region. In step S1025, morphological opening operations are performed on the binary image of the thermochromic candidate region to obtain the initial hot spot region characterizing the thermal fault conduction inside the electromagnetic coil.
[0024] In specific implementation, firstly, Gaussian filtering is used to denoise the visible light image of the surface, resulting in a denoised visible light image. This denoised visible light image refers to the visible light image of the surface after noise suppression. Secondly, based on the standard conversion formula between RGB and HSV color spaces, the RGB components of each pixel in the denoised visible light image are converted one by one to HSV components (i.e., hue (H), saturation (S), and lightness (V),) to obtain an HSV format image. This HSV format image refers to an image format that uses H, S, and V color components to represent the color information of the image. Further, the maximum inter-class variance (MOL) method in image processing is used to determine the color segmentation threshold of the thermochromic region based on the HSV feature differences between the normal region and the thermochromic region of the electromagnetic coil. Specifically, this is achieved by statistically analyzing the grayscale distribution histograms of the H, S, and V components corresponding to the normal region and the thermochromic region in the HSV format image, calculating the inter-class variance of the two types of regions under different grayscale thresholds, and selecting the grayscale value with the maximum inter-class variance as the color segmentation value. A threshold is set, where the color segmentation threshold is the critical grayscale value used to distinguish between thermochromic regions and normal regions. Then, the color segmentation threshold is used to perform threshold segmentation on the component channels (i.e., H channels) in the HSV format image related to thermochromic features. Pixels greater than or equal to the color segmentation threshold are marked as foreground (i.e., grayscale value marked as 255), and pixels less than the color segmentation threshold are marked as background (grayscale value as 0), resulting in a binary image of the thermochromic candidate region. The binary image of the thermochromic candidate region refers to the image that marks the background region and the thermochromic candidate region. Finally, morphological opening processing is performed on the binary image of the thermochromic candidate region. Specifically, a structuring element of a preset shape (such as a circle) is first used to perform erosion operation on the binary image to remove isolated noise pixels in the image. Then, the same structuring element is used to perform dilation operation on the eroded image to restore the original contour shape of the thermochromic candidate region, resulting in the initial hot spot region characterizing the thermal fault conduction inside the electromagnetic coil.
[0025] It should be noted that, in this application, the initial hot spot area refers to the image area that reflects the thermal discoloration area formed by the conduction of thermal faults inside the electromagnetic coil to the surface. Determining the initial hot spot area can accurately identify the thermal discoloration area formed by the conduction of thermal faults inside the electromagnetic coil to the surface from the visible light image of the surface, which includes background interference, noise and normal operating area, thus providing a real and effective target object for subsequent fault location and analysis.
[0026] In step S103, the edge contour of the initial hot spot region is extracted, and the normal direction of each contour point on the edge contour is calculated. Based on the normal direction of each contour point and the dominant conduction direction of the target electromagnetic coil winding on the image plane, anisotropic diffusion analysis is performed on the initial hot spot region, thereby generating multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil.
[0027] In some embodiments, the edge contour of the initial hot spot region is extracted using the following steps: The Canny edge detection operator is used to calculate the edge response of the initial hot spot region to obtain the hot spot edge point set. Neighborhood connectivity analysis is performed on the set of hot spot edge points to filter out a set of continuous edge segments; The edge contour of the initial hot spot region is obtained by performing contour fitting on the set of continuous edge line segments.
[0028] In specific implementation, firstly, the Canny edge detection operator is used to calculate the grayscale gradient magnitude and gradient direction of each pixel in the initial hotspot region in the horizontal and vertical directions. Based on the gradient direction, non-maximum suppression is applied to each pixel, retaining only local extrema in the gradient direction to refine the edge. Pixels with grayscale gradient magnitudes greater than a grayscale gradient magnitude threshold are designated as hotspot edge points, resulting in a hotspot edge point set. The grayscale gradient magnitude threshold is a critical value for selecting hotspot edge points, which can be set according to actual needs or expert knowledge; no specific limitation is made here. The hotspot edge point set refers to the discrete set of pixels representing the boundary of the initial hotspot region. Then, a neighborhood connectivity analysis method is used, employing the 8-neighborhood connectivity rule to analyze the hotspot edge point set. Each hotspot edge point is checked one by one to see if there are other hotspot edge points within its neighboring connected domain. Interconnected hotspot edge points are grouped into the same connected component to filter out a set of continuous edge segments formed by sequentially connecting continuous hotspot edge points. The set of continuous edge segments refers to multiple local continuous line segments formed by connecting interconnected hotspot edge points in spatial order. Each local continuous line segment corresponds to a partial segment of the boundary of the initial hotspot region. Finally, based on the set of continuous edge segments, a B-spline curve fitting algorithm is used to minimize the spatial distance error between the fitted curve and each hotspot edge point in the set of continuous edge segments by using the least squares method. The discretely distributed continuous edge segments are connected into a closed curve to obtain the edge contour of the initial hotspot region.
[0029] It should be noted that, in this application, the edge contour refers to the closed curve that can characterize the spatial morphological boundary of the initial hot spot region, which accurately reflects the shape contour characteristics and spatial distribution range of the thermochromic region.
[0030] In some embodiments, the normal direction of each contour point on the edge contour is calculated using the following steps: Discrete sampling is performed on the edge contour to obtain a discrete contour point set; Calculate the tangent direction vector of each discrete contour point in the discrete contour point set; The corresponding perpendicular vector is obtained by solving the tangent direction vector of each discrete contour point, and then the initial normal direction vector of each contour point is obtained. The initial normal direction vector is normalized to obtain the normal direction of each contour point.
[0031] In specific implementation, firstly, the edge contour is discretely sampled using a uniform interval sampling method. Specifically, by traversing the closed curve of the edge contour, the pixel coordinates on the contour are extracted according to a preset sampling step size to obtain a discrete contour point set. The sampling step size can be set according to actual needs and is not limited here. The discrete contour point set refers to the set of discrete pixels extracted from the edge contour at uniform intervals. Secondly, for each discrete contour in the discrete contour point set, its adjacent discrete contour points are selected as reference points. By calculating the difference in coordinates (x, y) between the current point and the previous reference point, and between the current point and the next reference point, two direction vectors are obtained. These two direction vectors are averaged to obtain the tangent direction of each discrete contour point. The tangent direction vector refers to the tangent pointing vector along the edge contour at discrete contour points. Then, based on the tangent direction vector of each discrete contour point, the corresponding perpendicular vector is solved. Specifically, by exchanging the x and y components of the tangent direction vector and taking the negative of one of the components, a vector perpendicular to the tangent direction is obtained, thus obtaining the initial normal direction vector of each contour point. The initial normal direction vector is a two-dimensional vector perpendicular to the tangent direction vector. Finally, the initial normal direction vector is normalized. Specifically, the magnitude of each initial normal direction vector is calculated, and the x and y components of the initial normal direction vector are divided by the magnitude, so that the magnitude of the processed vector is 1, thus obtaining the normal direction of each contour point.
[0032] It should be noted that in this application, the normal direction refers to the direction of the unit vector perpendicular to the tangent at the corresponding point of the edge contour. It is used to accurately characterize the normal direction of the contour points. As the vertical pointing feature of each point on the edge contour, the normal direction can reflect the boundary space morphology of the hot spot region. Combined with the dominant conduction direction of the electromagnetic coil winding in the image plane, an anisotropic diffusion tensor that conforms to the actual heat conduction law can be constructed. This allows the diffusion analysis to be accurately advanced along the dominant direction of heat fault conduction (such as the direction of extension of the winding wire and the synergistic direction of the contour normal). In this way, the diffusion non-uniformity characteristics formed by the difference in the distribution of internal heat sources in the hot spot region are preserved, providing a real and effective feature basis for multi-scale matching of the morphological features of the subsequent diffusion state images and the initial hot spot region.
[0033] In some embodiments, anisotropic diffusion analysis is performed on the initial hot spot region based on the normal direction of each contour point and the dominant conduction direction of the target electromagnetic coil winding on the image plane, thereby generating multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil. This is achieved through the following steps: Based on the spatial topology model of the target electromagnetic coil winding, the dominant conduction direction of the target electromagnetic coil winding on the image plane is extracted; An anisotropic diffusion tensor is constructed based on the normal direction of each contour point and the dominant propagation direction. Based on the gray-level gradient magnitude of the initial hot spot region, an adaptive diffusion coefficient and multiple diffusion iterations are set. The anisotropic diffusion tensor and the adaptive diffusion coefficient are used to perform anisotropic diffusion operations on the initial hot spot region for a corresponding number of diffusion iterations to obtain multiple sets of intermediate diffusion images. The multiple sets of intermediate diffusion images are normalized to generate multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil.
[0034] In specific implementation, firstly, a spatial topology model of the target electromagnetic coil winding is obtained. This model includes the three-dimensional arrangement, direction, and connection relationships of the target electromagnetic coil winding conductors. This spatial topology model can be directly extracted from the design and manufacturing files of the target electromagnetic coil. Through coordinate projection transformation, the extension directions of the conductors in the three-dimensional space of the target electromagnetic coil winding are mapped to an image plane (specifically, the original visible light image). The conductor projection direction with the highest frequency is selected as the dominant conduction direction of the target electromagnetic coil winding on the image plane. The dominant conduction direction refers to the direction in which the target electromagnetic coil winding conductors are projected onto the image plane. The projection direction on the plane reflects the dominant path of thermal fault propagation along the winding. Secondly, based on the normal direction of each contour point and the dominant propagation direction, a vector outer product and symmetric matrix construction method is used to convert the two direction vectors into a second-order symmetric matrix representing the diffusion intensity in different directions. Elements in the second-order symmetric matrix corresponding to the dominant propagation direction and the normal direction are assigned different weights (the weights of the dominant propagation direction and the normal direction are set to 0.8 and 0.2, respectively), to construct an anisotropic diffusion tensor. For example, let the dominant propagation direction vector u = (1,0) and the normal direction vector v = (0,1), with corresponding weights... , Calculate the tensor product u u=[[1,0],[0,0]]、v v=[[0,0],[0,1]], weighted summation yields the diffusion tensor D=0.8×[[1,0],[0,0]]+0.2×[[0,0],[0,1]]=[[0.8,0],[0,0.2]], where the anisotropic diffusion tensor is a second-order matrix describing the differences in diffusion in different directions of the image; further, based on the gray-level gradient magnitude of each pixel in the initial hotspot region, the Sigmoid function is used to construct the mapping relationship of the adaptive diffusion coefficient (the function expression is: ,in For slope parameters, For offset parameters, For input parameters, Value and The values can be set to 0.5 and 0 based on conventional experience, and the Sigmoid function is used to map the gray-level gradient magnitude to an adaptive diffusion coefficient in the 0-1 range. Simultaneously, multiple sets of different diffusion iteration numbers are set according to the possible diffusion degree of the thermal fault; for example, they can be set to 12, 15, 18, or 20 times, without limitation. This yields the adaptive diffusion coefficient and multiple sets of diffusion iteration numbers. The adaptive diffusion coefficient refers to the diffusion intensity parameter dynamically adjusted by the image gray-level gradient, and the multiple sets of diffusion iteration numbers refer to the number of iterations simulating different diffusion states. Then, the anisotropy... Substituting the diffusion tensor, adaptive diffusion coefficient, and grayscale image of the initial hotspot region into the anisotropic diffusion equation (i.e., the Perona-Malik equation), diffusion operations are performed sequentially according to the number of diffusion iterations for each group. Specifically, the initial hotspot region is traversed pixel by pixel, and a preset neighborhood (e.g., a 3×3 neighborhood) is selected for each pixel. Based on the anisotropic diffusion tensor, the diffusion weights in different directions within the neighborhood are calculated. Then, the diffusion weights are multiplied by the corresponding adaptive diffusion coefficient to obtain the final neighborhood weighting coefficient. The new grayscale value of the pixel is calculated by weighted averaging to achieve diffusion simulation. After each group of diffusion iterations is completed, The updated grayscale image is used as the intermediate diffusion image for the corresponding group, resulting in multiple intermediate diffusion images. For example, the grayscale value of the center pixel (1,1) of the initial hotspot region is 230, and the diffusion tensor D=[[0.8,0],[0,0.2]] (x-axis is the dominant propagation direction, y-axis is the normal direction). The adaptive coefficient of this center pixel is 0.9, the step size is 0.15, iterates once, and a 3×3 neighborhood is taken. The weight of the x-direction (i.e., left and right, diagonal x-components) is 0.8, and the weight of the y-direction (up and down, diagonal y-components) is 0.2. The direction weights are multiplied by the adaptive coefficient of the center pixel to obtain the final result. The weighting coefficients are substituted into the Perona-Malik equation, and the center pixel value is updated by weighted summation of the neighborhood gray-level differences. One iteration is completed pixel by pixel to obtain the diffusion intermediate image. This process is repeated for multiple sets of iterations to obtain the diffusion intermediate image. The diffusion intermediate image refers to the image that represents the different stages of heat conduction after different numbers of anisotropic diffusion iterations. Finally, the gray-level value range of the multiple sets of diffusion intermediate images is uniformly mapped to a preset standard range using a linear normalization method to generate multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil.
[0035] It should be noted that the diffusion state image in this application refers to the image characterizing the surface hot spot morphology at different diffusion stages of thermal faults. In electromagnetic coil fault detection based on image analysis, the initial hot spot region can only reflect the static morphology of thermal fault conduction to the surface and cannot reflect the conduction law, diffusion rate and spatial evolution characteristics of heat along the winding. However, the diffusion state image can restore the dynamic characteristics of heat conduction by simulating the diffusion process of thermal faults at different stages. Therefore, generating multiple diffusion state images through anisotropic diffusion analysis provides a characteristic basis for subsequent multi-scale matching that reflects the evolution law of thermal diffusion.
[0036] In step S104, each diffusion state image is matched with the morphological features of the initial hot spot region at multiple scales, thereby selecting the target diffusion state image that has the highest matching degree with the morphological features in terms of diffusion non-uniformity.
[0037] In some embodiments, the following steps are used to perform multi-scale matching between each diffusion state image and the morphological features of the initial hot spot region, and then select the target diffusion state image that has the highest matching degree with the morphological features in terms of diffusion non-uniformity: The morphological features related to diffusion inhomogeneity in the initial hot spot region are extracted to obtain a morphological feature set; A multi-scale Gaussian pyramid is constructed based on the initial hot spot region scale, and corresponding multi-scale pyramid layer images are generated for each diffusion state image. Extract the contrast morphological feature set of the multi-scale pyramid layer image corresponding to each diffusion state image; The similarity between the morphological feature set of the initial hot spot region and the comparative morphological feature set of each diffusion state image is calculated to obtain a multi-scale similarity matrix. The optimal matching similarity for each diffusion state image is obtained by filtering the maximum value of the multi-scale similarity matrix, and the diffusion state image with the highest optimal matching similarity is selected as the target diffusion state image.
[0038] In specific implementation, firstly, morphological features directly related to diffusion non-uniformity in the initial hotspot region are extracted. These morphological features include the mean gray level, gray level variance, and gray level entropy of the initial hotspot region, thus obtaining a morphological feature set characterizing the diffusion non-uniformity of the initial hotspot. This morphological feature set refers to a set composed of multiple quantized feature parameters related to diffusion non-uniformity. Secondly, using the image scale of the initial hotspot region as a benchmark, a multi-scale Gaussian pyramid is constructed using a combination of Gaussian filtering and downsampling. Specifically, the initial hotspot region is sequentially subjected to Gaussian convolution smoothing with different standard deviations, and then downsampled according to a preset ratio (e.g., 1 / 2) to generate Gaussian pyramids of different resolutions. Simultaneously, corresponding multi-scale pyramid layer images are generated for each diffusion state image using the same Gaussian filtering parameters, downsampling ratio, and pyramid layer number, ensuring complete matching of the scale levels. The multi-scale pyramid layer image refers to a standardized image set with different resolution levels, where each level corresponds to an image representation at a specific scale. Further, ... Using the same method as the initial hotspot region morphological feature extraction, the contrast morphological feature set of the multi-scale pyramid layer image corresponding to each diffusion state image is extracted. Then, the correlation coefficient, a well-known similarity measurement method, is used to calculate the similarity between the morphological feature set of the initial hotspot region and the contrast morphological feature set of each diffusion state image at each corresponding multi-scale pyramid layer. The similarity at different scale levels is arranged in pyramid level order to construct a multi-scale similarity matrix. The multi-scale similarity matrix is a two-dimensional matrix in which rows correspond to diffusion state images, columns correspond to pyramid scale levels, and elements are the similarity of morphological feature sets at the corresponding scale. Finally, the maximum value of the row vector corresponding to each diffusion state image in the multi-scale similarity matrix is selected as the optimal matching similarity for that diffusion state image. By comparing the optimal matching similarities of all diffusion state images, the diffusion state image with the largest optimal matching similarity value is selected as the target diffusion state image.
[0039] It should be noted that the target diffusion state image in this application refers to the diffusion state image that best matches the morphological characteristics of the initial hot spot region in terms of diffusion non-uniformity. The determination of the target diffusion state image is based on the fact that multiple sets of diffusion state images correspond to the morphological evolution of different diffusion stages of thermal faults. Some images may distort the diffusion non-uniformity characteristics of the initial hot spot due to excessive diffusion, or fail to fully reflect the heat conduction law due to insufficient diffusion. Therefore, by screening the image with the highest fit to the morphological characteristics of the initial hot spot through multi-scale matching, the core feature of diffusion non-uniformity formed by the difference in the distribution of internal heat sources in the initial hot spot is effectively preserved. This provides a reliable feature basis for subsequent morphological correlation analysis based on the image and the initial hot spot region, and provides direct and effective feature support for the final spatial location of potential heat source faults.
[0040] In step S105, the spatial location of potential heat source faults in the initial hot spot region is identified based on the target diffusion state image and the winding space topology model of the target electromagnetic coil.
[0041] In some embodiments, identifying the spatial location of potential heat source faults in the initial hot spot region based on the target diffusion state image and the winding spatial topology model of the target electromagnetic coil is achieved through the following steps: Perform grayscale extreme value detection on the target diffusion state image to obtain a set of candidate points for thermal diffusion centers; Based on the winding space topology model of the target electromagnetic coil, a coordinate mapping relationship between the image plane and the three-dimensional space of the winding is established; By using the coordinate mapping relationship, the set of candidate heat diffusion centers is mapped to the three-dimensional space of the winding to obtain a three-dimensional set of candidate heat sources; Based on the conductor distribution information in the winding space topology model, the validity of the three-dimensional heat source candidate point set is screened to obtain the valid three-dimensional heat source point set. Spatial clustering analysis is performed on the effective three-dimensional heat source point set to extract the cluster centers as the spatial locations of potential heat source faults in the initial hot spot region.
[0042] In specific implementation, firstly, the target diffusion state image is traversed by setting a fixed-size sliding window (e.g., a 3×3 sliding window). The gray values of the center pixel and neighboring pixels within the sliding window are compared. Local extreme points where the gray value of the center pixel is greater than that of all neighboring pixels are selected as candidate points for heat diffusion centers, thus obtaining a set of candidate points for heat diffusion centers. This set of candidate points refers to the set of discrete pixels with locally maximum gray values in the target diffusion state image. Secondly, the winding space topology model of the target electromagnetic coil and the intrinsic and extrinsic parameters of the image acquisition system are obtained. The image plane is constructed using the pinhole camera calibration principle. A mapping function between two-dimensional coordinates and three-dimensional spatial coordinates of the winding is used to determine the one-to-one correspondence between each pixel in the target diffusion state image and a point in three-dimensional space, thereby establishing a coordinate mapping relationship between the image plane and the three-dimensional space of the winding. This coordinate mapping relationship is a mathematical function that converts the two-dimensional coordinates of the image plane into the three-dimensional spatial coordinates of the winding. Further, the two-dimensional coordinates of each heat diffusion center candidate point in the heat diffusion center candidate point set are substituted into the above coordinate mapping relationship to obtain the three-dimensional heat source candidate points corresponding to each heat diffusion center candidate point, thus obtaining a set of three-dimensional heat source candidate points. The selected point set refers to the set of candidate points containing three-dimensional coordinate information formed in the three-dimensional space of the winding after coordinate mapping of the candidate heat diffusion center. Then, based on the three-dimensional coordinate range of the winding conductor in the winding space topology model, the minimum spatial distance between each three-dimensional heat source candidate point and the three-dimensional coordinates of the winding conductor is calculated using the spatial nearest neighbor distance algorithm. Three-dimensional heat source candidate points with a minimum spatial distance less than a preset distance threshold are retained as valid three-dimensional heat source points, resulting in the valid three-dimensional heat source point set. The distance threshold can be set according to actual needs or expert knowledge, and is not limited here. The valid three-dimensional heat source point set refers to... A set of three-dimensional points with actual heat sources within the three-dimensional range of the winding conductor is established. Finally, a density clustering algorithm is used to perform spatial clustering analysis on the set of effective three-dimensional heat source points. By setting the neighborhood radius (which can be set according to actual needs, for example, it can be set to 1.5-2 times the diameter of the winding conductor) and the minimum number of cluster points (which can be set to 3, without limitation here), effective three-dimensional heat source points with close spatial distances are grouped into the same cluster. The mean three-dimensional coordinates of all effective three-dimensional heat source points in each cluster are calculated, and the location point corresponding to the mean three-dimensional coordinates is extracted as the spatial location of potential heat source faults in the initial hot spot area.
[0043] It should be noted that the spatial location of the potential heat source fault in this application refers to the three-dimensional coordinate point of the corresponding heat diffusion source in the three-dimensional space of the winding, which accurately reflects the physical location of the fault inside the electromagnetic coil.
[0044] Furthermore, in another aspect of this application, in some embodiments, this application provides an electromagnetic coil fault detection system based on image analysis, referring to... Figure 3The figure is a schematic diagram of the structure of an image analysis-based electromagnetic coil fault detection system according to some embodiments of this application. The image analysis-based electromagnetic coil fault detection system includes: an acquisition module 201, a processing module 202, and an execution module 203, which are described below: The acquisition module 201 in this application is mainly used to acquire the visible light image of the surface of the target electromagnetic coil during operation; Processing module 202, in this application, is mainly used to segment the thermochromic region representing the electromagnetic coil formed by internal thermal fault conduction from the visible light image of the surface as the initial hot spot region; The processing module 202 is also used to extract the edge contour of the initial hot spot region, calculate the normal direction of each contour point on the edge contour, and perform anisotropic diffusion analysis on the initial hot spot region based on the normal direction of each contour point combined with the dominant conduction direction of the target electromagnetic coil winding on the image plane, thereby generating multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil. In addition, the processing module 202 is also used to perform multi-scale matching between each diffusion state image and the morphological features of the initial hot spot region, thereby filtering out the target diffusion state image that has the highest matching degree with the morphological features in terms of diffusion non-uniformity. The execution module 203 in this application is mainly used to identify the spatial location of potential heat source faults in the initial hot spot region based on the target diffusion state image and the winding space topology model of the target electromagnetic coil.
[0045] In addition, this application also provides a computer device, the computer device including a memory and a processor, the memory storing code, and the processor being configured to acquire the code and execute the above-described image analysis-based electromagnetic coil fault detection method.
[0046] In some embodiments, reference Figure 4 The figure is a schematic diagram of the structure of a computer device implementing an image analysis-based electromagnetic coil fault detection method according to some embodiments of this application. The image analysis-based electromagnetic coil fault detection method in the above embodiments can... Figure 4 The computer device shown is used to implement this, and the computer device includes at least one processor 301, a communication bus 302, a memory 303, and at least one communication interface 304.
[0047] The processor 301 can be a general-purpose central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more devices used to control the execution of the image analysis-based electromagnetic coil fault detection method in this application.
[0048] The communication bus 302 can be used to transmit information between the aforementioned components.
[0049] The memory 303 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disks or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 303 may exist independently and be connected to the processor 301 via the communication bus 302. The memory 303 may also be integrated with the processor 301.
[0050] The memory 303 stores program code for executing the scheme of this application, and its execution is controlled by the processor 301. The processor 301 executes the program code stored in the memory 303. The program code may include one or more software modules. In the above embodiments, the determination of the electromagnetic coil fault detection method based on image analysis can be implemented by the processor 301 and one or more software modules in the program code in the memory 303.
[0051] Communication interface 304 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.
[0052] In a specific implementation, as one example, a computer device may include multiple processors, each of which may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. Here, a processor may refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).
[0053] The aforementioned computer device can be a general-purpose computer device or a special-purpose computer device. In specific implementations, the computer device can be a desktop computer, a portable computer, a network server, a handheld digital assistant (PDA), a mobile phone, a tablet computer, a wireless terminal device, a communication device, or an embedded device. This application does not limit the type of computer device.
[0054] In addition, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described image analysis-based electromagnetic coil fault detection method.
[0055] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0056] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for detecting electromagnetic coil faults based on image analysis, characterized in that, Includes the following steps: Acquire visible light images of the surface of the target electromagnetic coil during operation; The thermochromic region representing the electromagnetic coil caused by internal thermal fault conduction is segmented from the visible light image of the surface as the initial hot spot region; Extract the edge contour of the initial hot spot region and calculate the normal direction of each contour point on the edge contour. Based on the normal direction of each contour point and the dominant conduction direction of the target electromagnetic coil winding on the image plane, perform anisotropic diffusion analysis on the initial hot spot region to generate multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil. Each diffusion state image is matched with the morphological features of the initial hot spot region at multiple scales, and then the target diffusion state image with the highest matching degree with the morphological features in terms of diffusion non-uniformity is selected. Based on the target diffusion state image and the winding space topology model of the target electromagnetic coil, the spatial location of potential heat source faults in the initial hot spot region is identified.
2. The method as described in claim 1, characterized in that, The initial hot spot region is segmented from the visible light image of the surface, specifically including: The visible light image of the surface is denoised to obtain a denoised visible light image; The denoised visible light image is converted from the RGB color space to the HSV color space to obtain an HSV format image; The color segmentation threshold of the thermochromic region is determined based on the difference in HSV characteristics between the normal region and the thermochromic region of the electromagnetic coil. The HSV format image is thresholded using the color segmentation threshold to obtain a binary image of the thermochromic candidate region. Morphological opening operations are performed on the binary image of the thermochromic candidate region to obtain the initial hot spot region characterizing the thermal fault conduction inside the electromagnetic coil.
3. The method as described in claim 1, characterized in that, Extracting the edge contour of the initial hot spot region specifically includes: The Canny edge detection operator is used to calculate the edge response of the initial hot spot region to obtain the hot spot edge point set. Neighborhood connectivity analysis is performed on the set of hot spot edge points to filter out a set of continuous edge segments; The edge contour of the initial hot spot region is obtained by performing contour fitting on the set of continuous edge line segments.
4. The method as described in claim 1, characterized in that, Calculating the normal direction of each contour point on the edge contour specifically includes: Discrete sampling is performed on the edge contour to obtain a discrete contour point set; Calculate the tangent direction vector of each discrete contour point in the discrete contour point set; The corresponding perpendicular vector is obtained by solving the tangent direction vector of each discrete contour point, and then the initial normal direction vector of each contour point is obtained. The initial normal direction vector is normalized to obtain the normal direction of each contour point.
5. The method as described in claim 1, characterized in that, Anisotropic diffusion analysis is performed on the initial hot spot region based on the normal direction of each contour point and the dominant conduction direction of the target electromagnetic coil winding on the image plane, thereby generating multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil, specifically including: Based on the spatial topology model of the target electromagnetic coil winding, the dominant conduction direction of the target electromagnetic coil winding on the image plane is extracted; An anisotropic diffusion tensor is constructed based on the normal direction of each contour point and the dominant propagation direction. Based on the gray-level gradient magnitude of the initial hot spot region, an adaptive diffusion coefficient and multiple diffusion iterations are set. The anisotropic diffusion tensor and the adaptive diffusion coefficient are used to perform anisotropic diffusion operations on the initial hot spot region for a corresponding number of diffusion iterations to obtain multiple sets of intermediate diffusion images. The multiple sets of intermediate diffusion images are normalized to generate multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil.
6. The method as described in claim 1, characterized in that, Based on the target diffusion state image and the winding spatial topology model of the target electromagnetic coil, the spatial location of potential heat source faults in the initial hot spot region is identified, specifically including: Perform grayscale extreme value detection on the target diffusion state image to obtain a set of candidate points for thermal diffusion centers; Based on the winding space topology model of the target electromagnetic coil, a coordinate mapping relationship between the image plane and the three-dimensional space of the winding is established; By using the coordinate mapping relationship, the set of candidate heat diffusion centers is mapped to the three-dimensional space of the winding to obtain a three-dimensional set of candidate heat sources; Based on the conductor distribution information in the winding space topology model, the validity of the three-dimensional heat source candidate point set is screened to obtain the valid three-dimensional heat source point set. Spatial clustering analysis is performed on the effective three-dimensional heat source point set to extract the cluster centers as the spatial locations of potential heat source faults in the initial hot spot region.
7. The method as described in claim 1, characterized in that, The visible light image of the target electromagnetic coil during operation is obtained using an industrial camera.
8. An image analysis-based electromagnetic coil fault detection system, used to execute the image analysis-based electromagnetic coil fault detection method as described in any one of claims 1 to 7, characterized in that, The system includes: The acquisition module is used to acquire visible light images of the surface of the target electromagnetic coil during operation; The processing module is used to segment the thermochromic region representing the electromagnetic coil caused by internal thermal fault conduction from the visible light image of the surface as the initial hot spot region; The processing module is also used to extract the edge contour of the initial hot spot region and calculate the normal direction of each contour point on the edge contour. Based on the normal direction of each contour point and the dominant conduction direction of the target electromagnetic coil winding on the image plane, anisotropic diffusion analysis is performed on the initial hot spot region to generate multiple diffusion state images formed by heat conduction to the surface of the electromagnetic coil. The processing module is also used to perform multi-scale matching between each diffusion state image and the morphological features of the initial hot spot region, thereby filtering out the target diffusion state image that has the highest matching degree with the morphological features in terms of diffusion non-uniformity. The execution module is used to identify the spatial location of potential heat source faults in the initial hot spot region based on the target diffusion state image and the winding space topology model of the target electromagnetic coil.
9. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing code, and the processor being configured to acquire the code and execute the image analysis-based electromagnetic coil fault detection method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the electromagnetic coil fault detection method based on image analysis as described in any one of claims 1 to 7.