Miniature circuit breaker contact overtravel measurement method and system

By using machine vision and the YOLOv4 model, the problems of low accuracy and long time consumption in measuring the contact overtravel of miniature circuit breakers in industrial environments have been solved, achieving high-precision real-time detection, which is suitable for measuring the contact overtravel of miniature circuit breakers.

CN121861373APending Publication Date: 2026-04-14HEBEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-04
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Traditional methods for measuring the overtravel of contacts in miniature circuit breakers suffer from problems such as low measurement accuracy and long measurement time due to unstable lighting conditions and component wear in industrial environments, making it difficult to achieve high-precision real-time detection.

Method used

By employing machine vision technology and combining it with the YOLOv4 model, a CSPDarknet53 backbone network is constructed through image acquisition, preprocessing, data augmentation, and annotation. This optimizes bounding box regression, confidence, and class loss, enabling real-time position tracking and overtravel calculation of the moving contact and trip lever.

Benefits of technology

It achieves high-precision real-time detection of contact overtravel in miniature circuit breakers, overcomes interference from light fluctuations and component oxidation, improves the accuracy and robustness of target detection, and meets the low-latency and high-efficiency detection requirements of industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121861373A_ABST
    Figure CN121861373A_ABST
Patent Text Reader

Abstract

The invention discloses a miniature circuit breaker contact overtravel measurement method and system, and belongs to the technical field of image data processing or generation. The method comprises the following steps: acquiring a sequence image of the miniature circuit breaker in a complete closing period; performing preprocessing and data enhancement on the sequence image; marking a moving contact and a tripping rod component on the sequence image after data enhancement to generate a data set; constructing a YOLOv4 model, and training the model by using data in the data set to obtain a weight of the YOLOv4 model; predicting the sequence image to obtain real-time positions and confidence coefficients of the moving contact and the tripping rod; and performing dynamic analysis on the sequence image, tracking the angle variation of the characteristic points of the tripping rod and the moving contact, and calculating the overtravel angle and the overtravel of the contact of the miniature circuit breaker. According to the method, the part recognition accuracy is obviously improved, feature interference caused by illumination fluctuation and part surface oxidation in an industrial field can be effectively overcome, and the precision and robustness of target detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing or generation technology, and in particular to a method and system for measuring the overtravel of contacts in a miniature circuit breaker. Background Technology

[0002] As a core component of the final protection stage in low-voltage power distribution networks, the operational stability of miniature circuit breakers directly affects the electrical safety of industrial control systems, building power supply facilities, and distributed energy systems. Under long-term electromechanical stress interaction, the operating mechanism of miniature circuit breakers is subjected to multimodal damage such as arc erosion and mechanical fatigue, leading to deterioration of the contact system such as electrical erosion and mechanical wear. This, in turn, causes cascading faults such as poor contact between moving and stationary contacts and reduced tripping speed, seriously threatening the safe operation of the power distribution system.

[0003] In the condition assessment system for miniature circuit breakers, dynamic monitoring of mechanical characteristic parameters has become a key technical approach for diagnosing the health status of the equipment. The contact overtravel parameter, as a core evaluation indicator, not only affects other mechanical characteristics but is also closely related to circuit resistance, the mechanical life of the miniature circuit breaker, and its electrical life.

[0004] Traditional methods for measuring the mechanical characteristic parameters of miniature circuit breakers include contact and non-contact methods. Contact measurement has high accuracy, but it can interfere with operation and is cumbersome. Non-contact measurement avoids interference, but in complex industrial environments, lighting conditions and contact wear conditions vary, making manual calibration of contact parameters or identification using machine vision technology not only time-consuming but also less accurate, thus limiting its application in industrial settings. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a method and system for measuring the overtravel of contacts of miniature circuit breakers, which realizes high-precision real-time detection of moving parts of miniature circuit breakers.

[0006] This invention is achieved through the following technical solution: A method for measuring the overtravel of contacts in a miniature circuit breaker includes the following steps: S1: Acquire sequence images of a miniature circuit breaker during one complete closing cycle; S2: Preprocess the sequence images and perform data augmentation on the preprocessed sequence images to obtain data-augmented sequence images; S3: Label the moving contact and trip lever components on the data-augmented sequence images to generate a dataset that conforms to the training of the YOLOv4 network; S4: Construct a YOLOv4 model based on the CSPDarknet53 backbone network, train the constructed YOLOv4 model using data from the dataset, optimize the bounding box regression loss, confidence loss and class loss, and obtain the weights of the YOLOv4 model. S5: Use the weights of the trained YOLOv4 model to predict the sequence of images and obtain the real-time position and confidence level of the moving contact and trip lever; S6: Based on the real-time position and confidence level of the moving contact and trip lever, perform dynamic analysis on the sequence images, track the angular changes of the trip lever feature points and the moving contact feature points, and calculate the overtravel angle and overtravel of the miniature circuit breaker contacts based on the angular changes of the trip lever feature points and the moving contact feature points.

[0007] In the optimized step S1, a machine vision imaging platform is used to collect sequence images of multiple miniature circuit breakers with different number of actions within a complete closing cycle.

[0008] In the optimized version, step S2 uses grayscale processing to preprocess the sequence images.

[0009] Furthermore, in step S2, data augmentation is performed on the preprocessed sequence images to obtain the data-augmented sequence images, as follows: Gaussian noise with different variances is added to the preprocessed sequence images to obtain Gaussian noise sequence images; The preprocessed image sequence is rotated at random angles to obtain a randomly rotated image sequence. The Mosaic data augmentation algorithm is applied to the preprocessed sequence images to combine a portion of each of the multiple images to be detected into a single image, resulting in the Mosaic data augmented sequence images. Gaussian noise sequence images, randomly rotated sequence images, and Mosaic data-enhanced sequence images constitute the data-enhanced sequence images.

[0010] In the optimized step S3, the LabelImg annotation software is used to annotate the moving contact and tripping lever components in the data-enhanced sequence image.

[0011] Furthermore, the YOLOv4 model constructed in step S4 includes a CSPDarknet53 backbone network, a feature enhancement module, and a head network. The CSPDarknet53 backbone network is used to extract multi-level feature information from the data-enhanced sequence images and output the deepest feature map. The feature enhancement module includes a spatial pyramid pooling unit and a path aggregation network. The spatial pyramid pooling unit is used to process the deepest feature map output by the CSPDarknet53 backbone network using multiple max pooling layers of different sizes and concatenate all the results to obtain a concatenated feature map. The path aggregation network is used to perform bidirectional feature fusion on the concatenated feature map to obtain a fused feature map. The head network is used to classify the fused feature map into three types of targets—large, medium, and small—for detection and output the class probability, location, and confidence score of each detection box.

[0012] Further, in step S4, the bounding box regression loss is calculated according to equation (1), the confidence loss is calculated according to equation (2), the class loss is calculated according to equation (3), and the total loss is calculated according to equation (4), thus obtaining the weights of the YOLOv4 model: (1); (2); (3); (4); in: This represents the bounding box regression loss. Indicates the first The first grid cell of the first grid cell Boundary box regression loss indicator function for each bounding box. Describes the generalized intersection-union function. Indicates the predicted first The first grid cell of the first grid cell A bounding box, Representing the true first The first grid cell of the first grid cell A bounding box, Indicates the number of grid cells. Indicates the number of bounding boxes. This represents the confidence loss for a predicted bounding box containing a target. Indicates the first The first grid cell of the first grid cell The prediction confidence of each bounding box. Indicates the first The first grid cell of the first grid cell True confidence of each bounding box This represents the confidence loss for predicted bounding boxes that do not contain the target. Indicates the first The first grid cell of the first grid cell The confidence loss indicator function for each bounding box. Indicates category loss. Indicates the first The target exists in each grid cell. Indicates the first The predicted class probability for each grid cell. Indicates the first The true class probability of each grid cell Indicates the total loss. Indicates the bounding box regression loss weights. This represents the confidence loss weight for a predicted bounding box containing a target. This represents the confidence loss weight for predicted bounding boxes that do not contain the target. This represents the category loss weight.

[0013] In the optimized version, step S6 uses a dynamic measurement method to track the angular changes of the trip lever feature point and the moving contact feature point.

[0014] Furthermore, in S6, the overtravel angle of the miniature circuit breaker contacts is calculated based on the angle change of the trip lever feature point and the moving contact feature point according to equation (5), and the overtravel of the miniature circuit breaker contacts is calculated according to equation (6): (5); (6); in: This indicates the overtravel angle of the contacts in a miniature circuit breaker. Indicates the angle of the trip lever at the end of the overtravel period. Indicates the trip lever angle at the start of the overtravel period. This indicates that the contacts of the miniature circuit breaker have exceeded their travel limit. This indicates the distance between the point where the moving and stationary contacts of a miniature circuit breaker make contact and the base shaft.

[0015] A miniature circuit breaker contact overtravel measurement system is used to perform a miniature circuit breaker contact overtravel measurement method as described in any of the above, comprising an image acquisition module, an image preprocessing and data augmentation module, an image annotation module, a YOLOv4 model construction module, a prediction module, and a dynamic analysis module; The image acquisition module is used to acquire a sequence of images within a complete closing cycle of the miniature circuit breaker. The image preprocessing and data augmentation module is used to preprocess the sequence of images and perform data augmentation on the preprocessed sequence of images to obtain data-enhanced sequence images. The image annotation module is used to annotate the moving contact and trip lever components in the data-enhanced sequence images, generating a dataset that conforms to the training of the YOLOv4 network; The YOLOv4 model building module is used to build a YOLOv4 model, train the built YOLOv4 model using data in the dataset, optimize the bounding box regression loss, confidence loss and class loss, and obtain the weights of the YOLOv4 model. The prediction module is used to predict the sequence images to obtain the real-time position and confidence level of the moving contact and trip lever; The dynamic analysis module is used to perform dynamic analysis on the sequence images, track the angular changes of the trip lever feature points and the moving contact feature points, and calculate the overtravel angle and overtravel of the miniature circuit breaker contacts based on the angular changes of the trip lever feature points and the moving contact feature points.

[0016] Beneficial effects of the invention: The present invention provides a method and system for measuring the overtravel of contacts in a miniature circuit breaker, which has the following advantages: This invention utilizes machine vision technology and innovatively introduces the YOLOv4 architecture to achieve non-contact, high-precision, real-time detection of moving parts in miniature circuit breakers. Compared to traditional target detection algorithms, this invention significantly improves component recognition accuracy while maintaining single-frame processing speed. It effectively overcomes feature interference caused by industrial lighting fluctuations and component surface oxidation, enhancing the accuracy and robustness of target detection and meeting the requirements for low-latency, high-efficiency detection in industrial production. Attached Figure Description

[0017] Figure 1 This is the curve showing the change in the loss value of the YOLOv4 model in this invention.

[0018] Figure 2a This is a diagram illustrating the identification effect of the closing start position of the present invention.

[0019] Figure 2b This is a diagram showing the recognition effect of the contact overtravel start state in this invention.

[0020] Figure 2c This is a diagram showing the recognition effect when the contact overtravel ends according to the present invention.

[0021] Figure 3 This is the closing dynamic tracking curve diagram of the present invention.

[0022] Figure 4 This is a schematic diagram of the overtravel measurement of the present invention. Detailed Implementation

[0023] A method for measuring the overtravel of contacts in a miniature circuit breaker includes the following steps: S1: Acquire sequence images of a miniature circuit breaker during one complete closing cycle; It is preferable to use a machine vision imaging platform to acquire sequential images of multiple miniature circuit breakers with different numbers of actions within a complete closing cycle. When acquiring sequential images, the miniature circuit breaker under test is fixed on the machine vision imaging platform, which mainly includes an image acquisition unit, a trigger board, and a test pan-tilt unit.

[0024] To ensure the complexity of the dataset, different light intensities can be used, and several small circuit breakers with different numbers of operations can be selected. Because of the different numbers of operations, the wear state of the contacts of these small circuit breakers is different, which ensures the diversity of the sequence images. 3000 images can be selected as the sequence images.

[0025] S2: Preprocess the sequence images and perform data augmentation on the preprocessed sequence images to obtain data-augmented sequence images; Specifically, grayscale processing can be used to preprocess the image sequence.

[0026] The purpose of grayscale processing is to convert color images captured by high-speed cameras into grayscale images. The principle is to take a weighted average of the red, green, and blue components of each pixel in the color image according to a certain ratio, resulting in a single grayscale value that replaces the original three components, thus achieving grayscale conversion. For a three-channel pixel, its grayscale value can be calculated using the following formula based on certain weighting coefficients: in, Represents grayscale value, Represents the red component of a pixel. The green component of the pixel, The blue component of the pixel is represented by 0.299, 0.587, and 0.114, which are weighting coefficients determined experimentally. Their sum is 1, ensuring that the grayscale value is between 0 and 255.

[0027] Furthermore, in step S2, data augmentation is performed on the preprocessed sequence images to obtain the data-augmented sequence images, as follows: Gaussian noise with different variances is added to the preprocessed sequence images to obtain Gaussian noise sequence images. By adding Gaussian noise with different variances to the original sequence images, the image quality degradation caused by environmental factors in the actual industrial environment can be simulated. The preprocessed sequence of images is rotated at random angles to obtain a randomly rotated sequence of images. In practical applications, the shooting angle of miniature circuit breakers may have certain deviations. Therefore, by rotating the original sequence of images at random angles, the image conditions under different shooting angles can be simulated. This transformation can be expressed by the following formula: ; in: Represents the coordinates of the image before rotation. Represents the coordinates after image rotation. This indicates the image rotation angle.

[0028] The Mosaic data augmentation algorithm is applied to the preprocessed sequence images to combine a portion of each of the multiple images to be detected into a single image, resulting in a sequence image with Mosaic data augmentation. This allows for overall detection even when some parts of the image are randomly occluded. Gaussian noise sequence images, randomly rotated sequence images, and Mosaic data-enhanced sequence images constitute the data-enhanced sequence images.

[0029] By using the methods described above to augment the preprocessed image sequences, the amount of training data can be increased, thereby improving the robustness and generalization ability of the model.

[0030] S3: Label the moving contact and trip lever components on the data-augmented sequence images to generate a dataset that conforms to the training of the YOLOv4 network; Specifically, LabelImg annotation software can be used to annotate the moving contact and trip lever components in the data-enhanced sequence images. During annotation, the components can be distinguished from the background. The generated dataset can preferably be in PASCAL VOC format.

[0031] S4: Construct a YOLOv4 model based on the CSPDarknet53 backbone network, train the constructed YOLOv4 model using data from the dataset, optimize the bounding box regression loss, confidence loss and class loss, and obtain the weights of the YOLOv4 model. Specifically, the constructed YOLOv4 model includes a CSPDarknet53 backbone network, a feature enhancement module, and a head network; The CSPDarknet53 backbone network is used to extract multi-level feature information from data-enhanced sequential images and output the deepest feature map. The YOLOv4 model uses CSPDarknet53 as the backbone network, which can use CSP to process the feature map in two parts, reducing the amount of computation and parameters, improving inference speed and efficiency, enhancing feature learning ability and preventing gradient vanishing.

[0032] The feature enhancement module includes a spatial pyramid pooling unit (SPP) and a path aggregation network (PANet). The spatial pyramid pooling unit is used to process the deepest feature map output by the CSPDarknet53 backbone network using multiple max pooling layers of different sizes, and then concatenates all the results to obtain a concatenated feature map. The core functions of this operation are: 1. Expanding the receptive field: Pooling kernels of different sizes can capture contextual information of different ranges, enabling the network to "see" both local details and the larger surrounding environment when observing the target; 2. Improving scale invariance: Regardless of the target size, multi-scale pooling can extract effective features, enhancing the robustness of the YOLOv4 model to scale changes.

[0033] The path aggregation network is used to perform bidirectional feature fusion on the spliced ​​feature map to obtain a fused feature map. Specifically, the features enhanced by SPP enter a bidirectional feature pyramid network—PANet. It's an upgrade to the traditional FPN (top-down) network, comprising two paths: Top-down path: Upsampling deep, semantically rich features and fusing them with corresponding shallow, high-resolution features in the CSPDarknet53 backbone network. This is equivalent to passing the semantic information of "what it is" to the detail layer. Bottom-up path: This is a crucial enhancement; it downsamples the fused, detail-rich shallow features again and fuses them with deeper features, essentially feeding back the precise location information of "where it is" upwards. This bidirectional (top-down + bottom-up) feature fusion structure allows the fine-grained detail information needed for localization and the strong semantic information needed for classification to flow and complement each other across the network layers. This is crucial for detecting small targets like contacts, as it greatly enhances the ability to preserve and utilize the detailed features of tiny objects.

[0034] The head network is used to classify the fused feature map into three types of targets: large, medium, and small, for detection, and outputs the class probability, location, and confidence score of each detection box.

[0035] Furthermore, the bounding box regression loss can be calculated according to equation (1), the confidence loss according to equation (2), the class loss according to equation (3), and the total loss according to equation (4), thus obtaining the weights of the YOLOv4 model: (1); (2); (3); (4); in: This represents the bounding box regression loss. Indicates the first The first grid cell of the first grid cell The bounding box regression loss indicator function for the bounding box, when the bounding box... The first grid cell of the first grid cell When a bounding box contains a target It is 1 if it is true, otherwise it is 0; Describes the generalized intersection-union function. Indicates the predicted first The first grid cell of the first grid cell A bounding box, Representing the true first The first grid cell of the first grid cell A bounding box, Indicates the number of grid cells. Indicates the number of bounding boxes. This represents the confidence loss for a predicted bounding box containing a target. Indicates the first The first grid cell of the first grid cell The prediction confidence of each bounding box. Indicates the first The first grid cell of the first grid cell The true confidence score of each bounding box is either 0 or 1. This represents the confidence loss for predicted bounding boxes that do not contain the target. Indicates the first The first grid cell of the first grid cell The confidence loss indicator function for the bounding box, when the ... The first grid cell of the first grid cell When a bounding box contains a target It is 1 if it is true, otherwise it is 0. Indicates category loss. Indicates the first The target exists in each grid cell. Indicates the first The predicted class probability for each grid cell. Indicates the first The true class probability of each grid cell Indicates the total loss. Indicates the bounding box regression loss weights. This represents the confidence loss weight for a predicted bounding box containing a target. This represents the confidence loss weight for predicted bounding boxes that do not contain the target. This represents the category loss weight.

[0036] The YOLOv4 model's loss function combines bounding box regression loss, confidence loss, and class loss, aiming to simultaneously optimize three key aspects of object detection: precise bounding box localization, confidence estimation of object presence, and accurate object classification. Through this weighted combination of losses, it can effectively learn how to accurately detect and classify objects in various scenarios during training.

[0037] Before starting basic training, you can first set the training parameters of the YOLOv4 model: initial learning rate of 0.001, batch size of 8, network iterations of 200, and the YOLOv4 model loss value change curve as shown in the figure. Figure 1 As shown in Figure 1, as the number of iterations increases, the loss curve tends to flatten out around 150 iterations. When the number of iterations reaches 200, the YOLOv4 model converges and the loss value stabilizes at around 0.5.

[0038] S5: Use the weights of the trained YOLOv4 model to predict the sequence of images and obtain the real-time position and confidence level of the moving contact and trip lever; The specific prediction and recognition results are shown in the image below. Figure 2a , 2b As shown in 2c: Figure 2a This is a diagram showing the identification effect at the start of the closing position. The tag "tkg" represents the trip lever, and 0.96 represents the confidence level of the trip lever. The tag "dcd" represents the moving contact, and 0.77 represents the confidence level of the moving contact. At this time, the mechanism is in the state of the latch and the trip lever locked together. The latch, the trip lever, the central support, and the moving contact arm are a unified whole, and under the action of the handle, they rotate clockwise around the base axis.

[0039] Figure 2b This is a diagram showing the recognition effect at the start of the contact overtravel state. The label "tkg" represents the trip lever, with a confidence level of 0.95. The label "dcd" represents the moving contact, with a confidence level of 0.89. At this point, the moving and stationary contacts begin to contact, and the contacts are in a just-closed state. This is the final moment when the latch, trip lever, center support, and moving contact arm are a unified whole. Under the action of the handle, the latch, trip lever, and center support continue to rotate clockwise around the base axis, but the moving contact stops moving and separates from the center support.

[0040] Figure 2c This is a diagram showing the recognition effect when the contact overtravel ends. The tag "tkg" represents the trip lever, and 0.95 is the confidence level of the trip lever. The tag "dcd" represents the moving contact, and 0.89 is the confidence level of the moving contact. At this point, the latch, trip lever, and central support stop moving, the trip lever's rotation angle reaches its maximum, and the mechanism is at a kinematic dead point. At this moment, the latch, trip lever, and central support are still a unified whole, and the moving contact arm's separation angle from the central support reaches its maximum.

[0041] S6: Based on the real-time position and confidence level of the moving contact and trip lever, perform dynamic analysis on the sequence images, track the angular changes of the trip lever feature points and the moving contact feature points, and calculate the overtravel angle and overtravel of the miniature circuit breaker contacts based on the angular changes of the trip lever feature points and the moving contact feature points.

[0042] Analyzing the closing sequence image, and tracking the characteristic points of the trip lever and the moving contact, a dynamic tracking curve of closing is plotted as follows: Figure 3 As shown: Figure 3 In the circuit, when the handle is rotated at an angle of 4.86°, it is the starting position for closing; when the handle is rotated at an angle of 38.22°, it is the position where the contacts are just closed, which is the starting position for overtravel; and when the handle is rotated at an angle of 69.37°, it is the dead zone position of the mechanism, which is the ending position for overtravel.

[0043] Phase 1 is the open-distance phase, and Phase 2 is the overtravel phase.

[0044] During the opening phase, the latch, trip lever, center support, and moving contact arm move together. Therefore, the angle changes of the trip lever and the moving contact are consistent, and they can be considered to share a single angle change. Upon reaching the overtravel start point, the angle change of the moving contact reaches its maximum; the angle of the trip lever at this point is denoted as... During the overtravel phase, the handle continues to rotate, the moving contact remains stationary, and the trip lever angle gradually increases until it reaches the overtravel termination point. At this point, the trip lever angle change reaches its maximum, and this angle is recorded as _____. .

[0045] Schematic diagram of overtravel measurement as follows Figure 4 As shown, the position of the moving and stationary contacts of the miniature circuit breaker when they are in contact is selected as reference point 1, denoted as . The theoretical position of the moving contact after removing the stationary contact is taken as reference point 2, denoted as... , The angle difference between the line connecting the base shaft O and the base shaft is the overtravel angle. , The distance from the base shaft O is r, and the main direction of movement of the moving contact is horizontal.

[0046] Specifically, a dynamic measurement method can be used to track the angular changes of the characteristic points of the trip lever and the moving contact.

[0047] Based on the angular change of the trip lever characteristic point and the moving contact characteristic point, the overtravel angle of the miniature circuit breaker contact can be calculated according to equation (5), and the overtravel of the miniature circuit breaker contact can be calculated according to equation (6): (5); (6); in: This indicates the overtravel angle of the contacts in a miniature circuit breaker. Indicates the angle of the trip lever at the end of the overtravel period. Indicates the trip lever angle at the start of the overtravel. This indicates that the contacts of the miniature circuit breaker have exceeded their travel limit. This indicates the distance between the point where the moving and stationary contacts of a miniature circuit breaker make contact and the base shaft.

[0048] A miniature circuit breaker contact overtravel measurement system is used to perform a miniature circuit breaker contact overtravel measurement method as described in any of the above, comprising an image acquisition module, an image preprocessing and data augmentation module, an image annotation module, a YOLOv4 model construction module, a prediction module, and a dynamic analysis module; The image acquisition module is used to acquire a sequence of images within a complete closing cycle of the miniature circuit breaker. The image preprocessing and data augmentation module is used to preprocess the sequence of images and perform data augmentation on the preprocessed sequence of images to obtain data-enhanced sequence images. The image annotation module is used to annotate the moving contact and trip lever components in the data-enhanced sequence images, generating a dataset that conforms to the training of the YOLOv4 network; The YOLOv4 model building module is used to build a YOLOv4 model. By using the data in the dataset to train the built YOLOv4 model, the bounding box regression loss, confidence loss and class loss are optimized to obtain the weights of the YOLOv4 model. The prediction module is used to predict the sequence images to obtain the real-time position and confidence level of the moving contact and trip lever; The dynamic analysis module is used to perform dynamic analysis on the sequence images, track the angular changes of the trip lever feature points and the moving contact feature points, and calculate the overtravel angle and overtravel of the miniature circuit breaker contacts based on the angular changes of the trip lever feature points and the moving contact feature points.

[0049] In summary, the present invention provides a method and system for measuring the contact overtravel of a miniature circuit breaker. Based on the acquisition of images within a complete closing cycle of the miniature circuit breaker, the key components of the miniature circuit breaker are identified and dynamically tracked using the YOLOv4 model. This enables the measurement of contact overtravel parameters that cannot be measured by current manual methods. Compared with traditional target detection algorithms, the present invention significantly improves the accuracy of component identification while maintaining single-frame processing speed. It can effectively overcome feature interference caused by light fluctuations and component surface oxidation in industrial settings, improving the accuracy and robustness of target detection and meeting the requirements for low-latency and high-efficiency detection in industrial production.

[0050] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for measuring the overtravel of contacts in a miniature circuit breaker, characterized in that: Includes the following steps: S1: Acquire sequence images of a miniature circuit breaker during one complete closing cycle; S2: Preprocess the sequence images and perform data augmentation on the preprocessed sequence images to obtain data-augmented sequence images; S3: Label the moving contact and trip lever components on the data-augmented sequence images to generate a dataset that conforms to the training of the YOLOv4 network; S4: Construct a YOLOv4 model based on the CSPDarknet53 backbone network, train the constructed YOLOv4 model using data from the dataset, optimize the bounding box regression loss, confidence loss and class loss, and obtain the weights of the YOLOv4 model. S5: Use the weights of the trained YOLOv4 model to predict the sequence of images and obtain the real-time position and confidence level of the moving contact and trip lever; S6: Based on the real-time position and confidence level of the moving contact and trip lever, perform dynamic analysis on the sequence images, track the angular changes of the trip lever feature points and the moving contact feature points, and calculate the overtravel angle and overtravel of the miniature circuit breaker contacts based on the angular changes of the trip lever feature points and the moving contact feature points.

2. The method for measuring the overtravel of contacts in a miniature circuit breaker according to claim 1, characterized in that: In step S1 The machine vision imaging platform was used to capture sequential images of multiple miniature circuit breakers with different numbers of actions during a complete closing cycle.

3. The method for measuring the overtravel of contacts in a miniature circuit breaker according to claim 1, characterized in that: In step S2, grayscale processing is used to preprocess the sequence images.

4. The method for measuring the overtravel of contacts in a miniature circuit breaker according to claim 1, characterized in that: The method for performing data augmentation on the preprocessed sequence images in step S2 to obtain the data-augmented sequence images is as follows: Gaussian noise with different variances is added to the preprocessed sequence images to obtain Gaussian noise sequence images; The preprocessed image sequence is rotated at random angles to obtain a randomly rotated image sequence. The Mosaic data augmentation algorithm is applied to the preprocessed sequence images to combine a portion of each of the multiple images to be detected into a single image, resulting in the Mosaic data augmented sequence images. Gaussian noise sequence images, randomly rotated sequence images, and Mosaic data-enhanced sequence images constitute the data-enhanced sequence images.

5. The method for measuring the overtravel of contacts in a miniature circuit breaker according to claim 1, characterized in that: In step S3, LabelImg annotation software is used to annotate the moving contact and tripping lever components in the data-enhanced sequence image.

6. The method for measuring the overtravel of contacts in a miniature circuit breaker according to claim 1, characterized in that: The YOLOv4 model constructed in step S4 includes a CSPDarknet53 backbone network, a feature enhancement module, and a head network. The CSPDarknet53 backbone network is used to extract multi-level feature information from the data-enhanced sequence images and output the deepest feature map. The feature enhancement module includes a spatial pyramid pooling unit and a path aggregation network. The spatial pyramid pooling unit is used to process the deepest feature map output by the CSPDarknet53 backbone network using multiple max pooling layers of different sizes, and then stitches all the results together to obtain a stitched feature map. The path aggregation network is used to perform bidirectional feature fusion on the spliced ​​feature map to obtain a fused feature map; the head network is used to classify the fused feature map into three types of targets: large, medium, and small, for detection, and output the class probability, position, and confidence of each detection box.

7. The method for measuring the overtravel of contacts in a miniature circuit breaker according to claim 1, characterized in that: In step S4, the bounding box regression loss is calculated according to equation (1), the confidence loss is calculated according to equation (2), the class loss is calculated according to equation (3), and the total loss is calculated according to equation (4), thus obtaining the weights of the YOLOv4 model: (1); (2); (3); (4); in: This represents the bounding box regression loss. Indicates the first The first grid cell of the first grid cell Boundary box regression loss indicator function for each bounding box. Describes the generalized intersection-union function. Indicates the predicted first The first grid cell of the first grid cell A bounding box, Representing the true first The first grid cell of the first grid cell A bounding box, Indicates the number of grid cells. Indicates the number of bounding boxes. This represents the confidence loss for a predicted bounding box containing a target. Indicates the first The first grid cell of the first grid cell The prediction confidence of each bounding box. Indicates the first The first grid cell of the first grid cell True confidence of each bounding box This represents the confidence loss for predicted bounding boxes that do not contain the target. Indicates the first The first grid cell of the first grid cell The confidence loss indicator function for each bounding box. Indicates category loss. Indicates the first The target exists in each grid cell. Indicates the first The predicted class probability for each grid cell. Indicates the first The true class probability of each grid cell Indicates the total loss. Indicates the bounding box regression loss weights. This represents the confidence loss weight for a predicted bounding box containing a target. This represents the confidence loss weight for predicted bounding boxes that do not contain the target. This represents the category loss weight.

8. The method for measuring the overtravel of contacts in a miniature circuit breaker according to claim 1, characterized in that: In step S6, a dynamic measurement method is used to track the angular changes of the characteristic points of the trip lever and the moving contact.

9. The method for measuring the overtravel of contacts in a miniature circuit breaker according to claim 1, characterized in that: In S6, the overtravel angle of the miniature circuit breaker contact is calculated based on the angle change of the tripping lever feature point and the moving contact feature point according to equation (5), and the overtravel of the miniature circuit breaker contact is calculated according to equation (6): (5); (6); in: This indicates the overtravel angle of the contacts in a miniature circuit breaker. Indicates the angle of the trip lever at the end of the overtravel period. Indicates the trip lever angle at the start of the overtravel. This indicates that the contacts of the miniature circuit breaker have exceeded their travel limit. This indicates the distance between the point where the moving and stationary contacts of a miniature circuit breaker make contact and the base shaft.

10. A miniature circuit breaker contact overtravel measurement system, used to perform a miniature circuit breaker contact overtravel measurement method as described in any one of claims 1 to 9, characterized in that, It includes an image acquisition module, an image preprocessing and data augmentation module, an image annotation module, a YOLOv4 model building module, a prediction module, and a dynamic analysis module; The image acquisition module is used to acquire a sequence of images within a complete closing cycle of a miniature circuit breaker. The image preprocessing and data augmentation module is used to preprocess the sequence of images and perform data augmentation on the preprocessed sequence of images to obtain data-enhanced sequence images. The image annotation module is used to annotate the moving contact and trip lever components in the data-enhanced sequence images, generating a dataset that conforms to the training of the YOLOv4 network; The YOLOv4 model building module is used to build a YOLOv4 model, train the built YOLOv4 model using data in the dataset, optimize the bounding box regression loss, confidence loss and class loss, and obtain the weights of the YOLOv4 model. The prediction module is used to predict the sequence images to obtain the real-time position and confidence level of the moving contact and trip lever; The dynamic analysis module is used to perform dynamic analysis on the sequence images, track the angular changes of the trip lever feature points and the moving contact feature points, and calculate the overtravel angle and overtravel of the miniature circuit breaker contacts based on the angular changes of the trip lever feature points and the moving contact feature points.