A method for measuring the number of common vibrations of relay contacts based on target tracking technology
Through a method based on target tracking technology, CCD image acquisition and image processing technology are used to accurately measure the number of common vibrations of relay contacts, which solves the problem of large measurement errors in the existing technology, improves measurement efficiency and accuracy, and is suitable for industrial production. .
Patent Information
- Application Number
- CN202210093788.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-26
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2042-01-26
AI Technical Summary
The existing technology cannot accurately measure the number of common vibrations of relay contacts, resulting in large measurement errors and low efficiency, and cannot meet the requirements of modern industrial production and testing.
Using a method based on target tracking technology, the motion cycle image of the relay is collected through a CCD image acquisition device, image preprocessing, feature identification and tracking are performed, the contact displacement curve is drawn, and the curve waveform is analyzed to calculate the number of common vibrations.
It achieves accurate measurement of the number of common vibrations of relay contacts, improves measurement accuracy and efficiency, is suitable for industrial production, and reduces the subjective impact of manual measurement.
Smart Images

Figure CN114494438B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of relay parameter testing, and in particular to a method for measuring the number of common vibrations of relay contacts based on a target tracking technology. Background Art
[0002] Relay is an automatic switching element with isolation function. It has two parts: input circuit (control circuit) and output circuit (working circuit). It uses the suction effect of the current in the input circuit between the electromagnet core and the armature to control the output circuit. It is an electrical relay that controls the output circuit by using the suction effect of the current in the input circuit between the electromagnet core and the armature. It has the advantages of high conversion depth and good physical isolation performance. It is widely used in automatic control systems, power protection systems and communication systems. It is one of the commonly used switching devices in the fields of electricity, communication, railways, aerospace, etc., and plays a vital role in control, detection, protection and regulation. Therefore, the research and detection of relay performance parameters has always been one of the key contents of relay research, especially in relay manufacturing companies. The various parameters of relays are important criteria for evaluating whether a relay is qualified or not.
[0003] The number of times the relay contacts vibrate together is an important parameter of the relay. During the release process of the relay, the gravitational potential energy of the moving contact will be converted into kinetic energy, hitting the static contact. The static contact reed is elastic, and then the moving and static contacts will vibrate together. Part of the kinetic energy released during the joint vibration is converted into heat energy, and part is consumed in the elastic deformation and plastic deformation of the contacts. When the moving and static contacts drop to the lowest point together, the kinetic energy is zero, and the elastic potential energy is the maximum. The moving and static contacts bounce up together due to the elastic potential energy, and the above process is repeated continuously, resulting in joint vibration. Due to the release of heat energy, the amplitude of the joint vibration continues to decrease until it finally reaches stability. This process is the joint vibration of the contacts during the release process. The number of times the moving and static contacts of the relay repeat the joint vibration during the entire process is called the number of joint vibrations of the relay contacts. The number of common vibrations of the relay contacts is closely related to the wear of the contacts. Too many common vibrations will lead to increased contact wear. The heat dissipation during the common vibration process may also cause contact deformation and surface morphology changes. Too many common vibrations will also greatly reduce the elasticity of the reed, which will have a great impact on the life and reliable operation of the relay. In addition, the number of common vibrations will also affect the stability of the relay during operation. The greater the number of common vibrations, the longer it takes for the relay to recover stability, and the lower the working efficiency and reliability. At present, there is no suitable measurement method for measuring the number of common vibrations of the relay, and usually only manual observation methods can be used. Due to the small size and structure of the relay and the short action time, the manual observation method obviously cannot accurately measure the number of common vibrations of the relay, with large errors, low efficiency, and greater subjective influence of people, making it more difficult to meet the requirements of modern industrial production and testing.
[0004] Computer target detection and tracking technology is a technology and method that uses image acquisition devices, lighting systems, digital image processing, etc. to pre-process images, detect edges, identify features, and track multiple targets. It has the advantages of high accuracy, high efficiency, good robustness, simple operation, measurement, and little impact on relays. It has gradually been widely used in the field of relay parameter measurement.
[0005] Therefore, designing a method for measuring the number of common vibrations of relay contacts based on target tracking technology has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0006] The technical problem to be solved by the present invention is to overcome the deficiencies in the prior art and provide a method for measuring the number of common vibrations of relay contacts based on target tracking technology.
[0007] The present invention is implemented by the following technical scheme: a method for measuring the number of common vibrations of relay contacts based on target tracking technology, characterized in that it comprises the following steps:
[0008] Step 1: Fix the relay to be tested on the test base;
[0009] Step 2: Collect the image of the relay within one movement cycle through the CCD image acquisition device;
[0010] Step 3: Preprocess the collected images, including image grayscale processing, image denoising processing, image binarization processing and image opening processing;
[0011] Step 4: Perform feature recognition on the processed image to identify the middle moving contact and upper and lower static contacts of the relay;
[0012] Step 5: Track the identified moving and static contacts in the collected image of the complete motion cycle of the relay, obtain the corresponding pixel coordinates, and draw a complete contact displacement curve;
[0013] Step 6: Analyze the displacement data and curve of the contacts, and obtain the common vibration times of the contacts based on the curve waveform.
[0014] According to the above technical solution, preferably, in step one, the relay is fixed on the test base, the delay of the time relay is set to 1.5s, and the power supply of the test base is controlled by the time relay, thereby controlling the stable operation of the relay.
[0015] According to the above technical solution, preferably, step two specifically includes: setting up a CCD image acquisition device in front of the relay, with the CCD camera lens parallel to the relay and at the same height; setting up parallel light sources on the left and right sides of the camera, turning on the light sources and adjusting the positions so that the moving and static contact areas of the relay are well-lit, the features are obvious, and the static contacts reflect clearly and evenly; setting the shooting frequency of the CCD image acquisition device to 1500 images per second, and adjusting the lens to make the image clear; controlling the CCD image acquisition device to start acquiring images through a computer, and connecting the time relay to energize the power supply of the test base, the relay is energized and energized, and after 1.5 seconds, the time relay is activated, the relay loses power and releases, and the image acquisition ends.
[0016] According to the above technical solution, preferably, the image grayscale processing in step three is to convert the RGB three-channel color image acquired by the image acquisition device into a single-channel grayscale image, thereby reducing the amount of calculation and providing a basis for the next step of binarization; the image denoising processing is to remove the noise generated by the imaging device and the external environment interference to the image by filtering denoising method; the image binarization processing is to set the image threshold by an adaptive threshold segmentation method, and convert the grayscale image into a binary image with only two pixel values of 0 and 255; the image opening operation processing is to further eliminate the noise in the binarized image, and an opening operation is required, that is, the image is processed by a method of first corrosion and then expansion.
[0017] According to the above technical solution, preferably, in step four, adaptive edge detection is used in combination with straight line fitting to perform feature straight line detection to identify the middle moving contact of the relay and the corresponding pixel point coordinates; minimum circumscribed circle detection is used to perform recognition on the binarized image to identify the upper and lower static contacts, and the center coordinates and radius of the static contacts are obtained.
[0018] According to the above technical solution, preferably, the tracking of the identified moving and static contacts in step five specifically includes: identifying all targets in the first image through step four, respectively obtaining their shapes and coordinate information in the current image, and respectively initializing the Kalman tracker, predicting the position of the target in the second image through the Kalman tracker, continuing to use the method in step four to identify the target in the second image, and also obtaining its corresponding shape and coordinate information, matching the predicted and actual positions and shapes for similarity through the Mahalanobis distance, updating the Kalman tracker with the matched target in the second image, and then continuing to predict the position in the next image. If there is no matching target, the Kalman tracker is reinitialized and filtered according to the method of the first image, and all subsequent images are tracked according to the above method until the last image.
[0019] According to the above technical solution, preferably, in step 6, the common vibration number of the contacts is obtained according to the curve waveform, which specifically includes: setting a common vibration threshold, assuming that the positions of the same contact of the relay at the two moments of stable pull-in and stable release are h1 and h2 respectively, and the distance between the two positions is h=h1-h2, and 1%h is taken as the amplitude threshold of the common vibration, then the threshold of the common vibration is h max =h2+1%h and h min =h2-1%h, that is, during the release process of the relay, when the position of the contact exceeds the contact position after the relay is released and stabilized by 1%h each time, it is determined that the relay contacts have undergone a common vibration; the contact displacement waveform is judged through programming, starting from the release of the relay power failure, if both the peak and the trough exceed the common vibration threshold, the number of common vibrations is increased by one until it no longer exceeds the threshold. The final result is the number of common vibrations of the relay contacts.
[0020] The beneficial effects of the present invention are as follows: the present invention collects images of the relay movement cycle through a CCD image acquisition device, uses computer target detection and tracking technology to identify and track the relay contacts in the image, can accurately obtain the center coordinates of the contacts, and then can draw a complete displacement curve of the contacts, applies the target detection and tracking technology from static to dynamic, analyzes and studies the relay performance parameters from a kinematic perspective, and can achieve measurement of the number of common vibrations of the relay contacts that is currently difficult to accomplish through manual measurement through dynamic tracking.
[0021] The present invention selects a high-resolution CCD camera lens and a CCD image sensor with a high transmission speed, and a parallel light source with adjustable brightness and position, so as to collect relay images with clear imaging and obvious features. The shooting and measurement can be completed by simply operating a computer, so that the measurement method has high measurement accuracy, fast processing speed, simple operation, and is easy to realize industrialization. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 A flow chart of a method for measuring the number of common vibrations of relay contacts based on target detection and tracking technology is shown;
[0023] Figure 2 A flow chart of a multi-target tracking algorithm is shown;
[0024] Figure 3 The complete displacement curve of a single intermediate moving contact of a measured relay is shown;
[0025] Figure 4 The graph shows the displacement curve of a single intermediate moving contact of a relay after release.
[0026] In the figure: 1. Moving contact displacement curve; 2. Maximum threshold of common vibration; 3. Minimum threshold of common vibration. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and the best embodiments.
[0028] like Figure 1 As shown, the present invention provides a method for measuring the number of common vibrations of relay contacts based on target tracking technology, which is characterized by comprising the following steps:
[0029] Step 1: Fix the relay to be tested on the test base;
[0030] Step 2: Collect the image of the relay within one movement cycle through the CCD image acquisition device;
[0031] Step 3: Preprocess the collected images, including image grayscale processing, image denoising processing, image binarization processing and image opening processing;
[0032] Step 4: Perform feature recognition on the processed image to identify the middle moving contact and upper and lower static contacts of the relay;
[0033] Step 5: Track the identified moving and static contacts in the collected image of the complete motion cycle of the relay, obtain the corresponding pixel coordinates, and draw a complete contact displacement curve;
[0034] Step 6: Analyze the displacement data and curve of the contacts, and obtain the common vibration times of the contacts based on the curve waveform.
[0035] According to the above embodiment, preferably, in step one, the relay is fixed on the test base, the delay of the time relay is set to 1.5s, and the power supply of the test base is controlled by the time relay, thereby controlling the stable operation of the relay.
[0036] According to the above embodiment, preferably, step two specifically includes: setting up a CCD image acquisition device in front of the relay, with the CCD camera lens parallel to the relay and at the same height; setting up parallel light sources on the left and right sides of the camera, turning on the light sources and adjusting the positions so that the moving and static contact areas of the relay are well-lit, the features are obvious, and the static contacts reflect clearly and evenly; setting the shooting frequency of the CCD image acquisition device to 1500 images per second, and adjusting the lens to make the image clear; setting the delay of the time relay to 1.5s, controlling the CCD image acquisition device to start collecting images through a computer, and connecting the time relay to energize the power supply of the test base, and the relay is energized and attracted. After 1.5s, the time relay is activated, the relay is de-energized and released, and the image acquisition is completed. The collected image is transmitted to the computer through the CCD image sensor for the next step of processing.
[0037] According to the above embodiment, preferably, in step three
[0038] Image grayscale processing is to convert the RGB three-channel color image collected by the image acquisition device into a single-channel grayscale image. Assume that the pixel value of each pixel in the image is R=G=B, and weight the values of R, G, and B according to a certain weight to finally determine the grayscale value of the pixel. After traversing all pixels, the image becomes a grayscale image. The conversion formula is: ,in are the weights of R, G, and B respectively, where , , , which can reduce the amount of calculation and provide a basis for the next step of binarization;
[0039] Image denoising is to remove the noise caused by the imaging device and the external environment through filtering and denoising. A Gaussian filter is selected to filter and denoise the image, and its corresponding template coefficient (i.e., weight) decreases as the distance from the template center increases (obeying a two-dimensional Gaussian distribution, i.e., In the calculation process, a two-dimensional zero-mean Gaussian distribution function (i.e. and are all 0), substitute the pixel coordinates of each position around the pixel into the two-dimensional zero-mean Gaussian distribution function to obtain the template coefficient and coefficient matrix, multiply the pixel value of each point by the template coefficient and add the products to get the final pixel value after filtering.
[0040] Image binarization is to use an adaptive threshold segmentation method to set the image threshold, convert the grayscale image into a binary image with only two pixel values of 0 and 255; use an adaptive method to determine the threshold segmentation, make a distribution histogram of all pixel values in the image, divide each pixel value as a threshold, calculate the proportion of pixels in the image that are less than and greater than the threshold and their respective average pixel values, and then calculate the intra-class variance under each threshold, so that the threshold with the smallest intra-class variance is the threshold, and then set all the pixels in the image that are less than the threshold to 0, that is, black, and all the pixels that are greater than the threshold to 255, that is, white, to obtain the corresponding binary image;
[0041] Image opening processing is to further eliminate noise in the binarized image. Opening operation is required, that is, the image is processed by the method of first corrosion and then expansion. It can eliminate some tiny noise points in the image, separate the boundary of the target from other tiny objects, and smooth the boundary of the target to facilitate later recognition and tracking.
[0042] According to the above embodiment, preferably, in step four, adaptive edge detection is used in combination with straight line fitting to perform feature straight line detection to identify the middle moving contact of the relay and the corresponding pixel coordinates; due to lighting reasons, the static contacts reflect obviously, and each static contact on the binarized image is very obvious and easy to identify. Contour detection and minimum circumscribed circle detection can be used to perform identification on the binarized image to identify the upper and lower static contacts, and obtain the center coordinates and radius of the static contacts.
[0043] like Figure 2 As shown, the identified moving and static contacts are used as templates to perform multi-target tracking on the identified moving and static contacts. The tracking of the identified moving and static contacts in step five specifically includes: identifying all targets in the first image through step four, obtaining their shapes and coordinate information in the current image respectively, and initializing Kalman trackers respectively, predicting the positions of the targets in the second image through the Kalman trackers, continuing to use the method in step four to identify the targets in the second image, and also obtaining their corresponding shapes and coordinate information, and matching the predicted and actual positions and shapes by the Mahalanobis distance. The calculation formula is: , obtain the target through the matching result, use the matched target in the second image to update the Kalman tracker, and output the optimal estimate of the current state and the Kalman gain , and continues to predict the position in the next image (i.e. the optimal estimate of the current state) through the output value. The calculation formula for the Kalman tracker to predict the optimal estimate of the current state is: ,in is the actual measurement value. If there is no matching target, the Kalman tracker is reinitialized and filtered according to the method of the first image, and all subsequent images are tracked according to the above method until the last image and a complete contact displacement curve is drawn based on the obtained data. This algorithm can better cope with the interference of complex backgrounds, achieve continuous, real-time and accurate tracking of multiple targets at the same time, increase effectiveness, improve the robustness and accuracy of tracking, and has relatively small calculation amount and fast operation speed. Figure 3 Curve 1 in FIG. 1 is the displacement curve of one of the moving contacts.
[0044] According to the above embodiment, preferably, in step 6, the common vibration times of the contacts are obtained according to the curve waveform, which specifically includes: setting a common vibration threshold, assuming that the positions of the same contact of the relay at the two moments of stable pull-in and stable release are h1 and h2 respectively, and the distance between the two positions is h=h1-h2, and 1%h is taken as the amplitude threshold of the common vibration, then the threshold of the common vibration is h max =h2+1%h and h min=h2-1%h, that is, during the release process of the relay, when the position of the contact exceeds the contact position after the relay is released and stabilized by 1%h each time, it is determined that the relay contacts have undergone a common vibration; the pixel point coordinates of the contact at the moment of stable attraction are h1=828.95, and the pixel point coordinates at the moment of stable release are h2=758.02, then the amplitude threshold of the common vibration is 0.01*(828.95-758.02)=0.7093, and the threshold of the common vibration is h max =758.02+0.7093=758.7293 and h min =758.02-0.7093=757.3107, such as Figure 3 As shown by the middle straight lines 2 and 3, during the relay release process, when the contact position exceeds 758.7293 upwards and 757.3107 downwards, it is considered that the relay contacts have a common vibration;
[0045] The contact displacement waveform is judged by programming. Starting from the release of the relay power failure, if both the peak and the trough exceed the common vibration threshold, the common vibration times are increased by one until it no longer exceeds the threshold. The final result is the common vibration times of the relay contacts. The corresponding curve is enlarged as shown below: Figure 4 As shown, if both the peak and the trough exceed the common vibration threshold, the number of common vibrations increases by one until it no longer exceeds the threshold, and finally the number of common vibrations of the relay contacts is 6.
[0046] The beneficial effects of the present invention are as follows: the present invention collects images of the relay movement cycle through a CCD image acquisition device, uses computer target detection and tracking technology to identify and track the relay contacts in the image, can accurately obtain the center coordinates of the contacts, and then can draw a complete displacement curve of the contacts, applies the target detection and tracking technology from static to dynamic, analyzes and studies the relay performance parameters from a kinematic perspective, and can achieve measurement of the number of common vibrations of the relay contacts that is currently difficult to accomplish through manual measurement through dynamic tracking.
[0047] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for measuring the number of common vibrations of relay contacts based on target tracking technology, characterized in that: The following steps are involved: Step 1: Fix the relay to be tested on the test base; Step 2: Collect images within one movement cycle of the relay through a CCD image acquisition device; Step 3: Preprocess the collected image, including image grayscale processing, image denoising processing, image binarization processing and image opening processing; Step 4: Perform feature recognition on the processed image to identify the middle moving contact and upper and lower static contacts of the relay; Step 5: Track the identified moving and static contacts in the collected image of the complete motion cycle of the relay, obtain the corresponding pixel coordinates, and draw a complete contact displacement curve; Step 6: Analyze the displacement data and curve of the contact point, and obtain the common vibration times of the contact point according to the curve waveform; The step 6 obtains the common vibration times of the contacts according to the curve waveform in the step 3, specifically including: Set the common vibration threshold. Assume that the positions of the same contact of the relay at the two moments of stable pull-in and stable release are h1 and h2 respectively, and the distance between the two positions is h=h1-h2. Take 1%h as the amplitude threshold of the common vibration. Then the threshold of the common vibration is h max =h2+1%h and h min =h2-1%h, that is, during the release process of the relay, when the position of the contact exceeds the contact position after the relay is released and stabilized by 1%h each time, it is determined that the relay contacts have undergone a common vibration; The contact displacement waveform is judged through programming. Starting from the release of the relay power failure, if both the peak and the trough exceed the common vibration threshold, the common vibration number is increased by one until it no longer exceeds the threshold. The final result is the common vibration number of the relay contacts.
2. The method for measuring the number of common vibrations of relay contacts based on target tracking technology according to claim 1, characterized in that: In the step 1, the relay is fixed on the test base, the delay of the time relay is set to 1.5s, and the power supply of the test base is controlled by the time relay, thereby controlling the stable operation of the relay.
3. The method for measuring the number of common vibrations of relay contacts based on target tracking technology according to claim 2, characterized in that: The step 2 specifically includes: Set up the CCD image acquisition device in front of the relay, with the CCD camera lens parallel to the relay and at the same height; Set up parallel light sources on the left and right sides of the camera, turn on the light sources and adjust the positions so that the moving and static contact areas of the relay are well-lit, with clear features and the static contact reflecting light clearly and evenly; Set the shooting frequency of the CCD image acquisition device to 1500 images / second, and adjust the lens to make the image clear; The CCD image acquisition device is controlled by a computer to start acquiring images, and the time relay is turned on to energize the power supply of the test base. The relay is energized and energized. After 1.5s, the time relay is activated, the relay loses power and releases, and the image acquisition is completed.
4. The method for measuring the number of common vibrations of relay contacts based on target tracking technology according to claim 1, characterized in that: The image grayscale processing in step 3 is to convert the RGB three-channel color image collected by the image acquisition device into a single-channel grayscale image, thereby reducing the amount of calculation and providing a basis for the next step of binarization; Image denoising is to remove the noise caused by imaging equipment and external environment interference to the image through filtering denoising method; Image binarization is to use the adaptive threshold segmentation method to set the image threshold and convert the grayscale image into a binary image with only two pixel values of 0 and 255. The image opening operation is to further eliminate noise in the binarized image, which requires an opening operation, that is, the image is processed by first corroding and then dilating.
5. The method for measuring the number of common vibrations of relay contacts based on target tracking technology according to claim 1, characterized in that: In the step 4, adaptive edge detection is used in combination with straight line fitting to perform feature straight line detection, and the middle moving contact of the relay and the corresponding pixel point coordinates are identified; The minimum circumscribed circle detection is used to identify the upper and lower static contact points on the binarized image, and the center coordinates and radius of the static contact points are obtained.
6. The method for measuring the number of common vibrations of relay contacts based on target tracking technology according to claim 1, characterized in that: The step 5 of tracking the identified moving and static contacts specifically includes: Through step 4, all targets in the first image are identified, their shapes and coordinate information in the current image are obtained respectively, and the Kalman trackers are initialized respectively. The position of the target in the second image is predicted by the Kalman tracker, and the target in the second image is identified by the method in step 4. The corresponding shape and coordinate information is also obtained. The predicted and actual positions and shapes are matched for similarity through the Mahalanobis distance. The Kalman tracker is updated with the matched targets in the second image, and then the position in the next image is predicted. If there is no matching target, the Kalman tracker is reinitialized and filtered according to the method of the first image. All subsequent images are tracked according to the above method until the last image.
