Control cabinet door opening and closing state recognition and control method based on image recognition algorithm

Through the combination of image recognition algorithm and convolutional neural network model, the adaptability and real-time control problems of the monitoring and control device of the control cabinet cabinet door switch are solved, and the accurate and rapid identification and control of the status of the cabinet door switch is realized, avoiding leakage and Risk of equipment damage.

CN119229170APending Publication Date: 2024-12-31厦门市政环境科技股份有限公司 +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411106914.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing control cabinet door switch monitoring and control devices have complex structure, large size, poor adaptability, and it is difficult to achieve real-time control cabinet door switch status, and there is a risk of leakage and equipment damage.

Method used

The cabinet door switch status recognition and control method based on image recognition algorithm is adopted, and the cabinet door switch is realized through image processing and mechanical structure using servo motor, metal shell, curved rod, strong magnet and industrial camera, combined with convolutional neural network model. Real-time identification and control of status.

Benefits of technology

It realizes the identification and control of cabinet door switch status of simple structure and good adaptability, avoids the risks of leakage and equipment damage, improves the identification accuracy and efficiency, and is suitable for emergency environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119229170A_ABST
    Figure CN119229170A_ABST
Patent Text Reader

Abstract

The invention discloses a control cabinet door opening and closing state recognition and control device, which comprises a servo motor, a metal shell, a curved bar, a strong magnet, a guide groove and an industrial camera, and is characterized in that the metal shell is fixed on the inner side of the side wall of a control cabinet; the servo motor is fixed in the metal shell; one end of the curved bar is hinged to the straight bar and then fixed in the metal shell, the other end of the curved bar magnetically attracts a strong magnet, and the servo motor drives the straight bar to drive the curved bar to rotate through external power supply; a guide groove for the strong magnet to move is fixed on the inner side of the cabinet door at the same height as the curved bar; the strong magnet is in sliding contact with the guide groove to drive the cabinet door to rotate; and the industrial camera is fixed on the inner side of the side wall of the control cabinet, is positioned above the curved bar and is responsible for collecting a sample of the curved bar. Opening and closing control of the cabinet door is achieved through simple mechanical components, the cabinet door opening and closing state is detected in real time through the mapping relation between the bent lever angle and the cabinet door opening and closing, and various emergency environments are dealt with.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for identifying and controlling the switch state of a control cabinet door. Background Art

[0002] The opening and closing operation of the control cabinet door is an essential step for relevant personnel to inspect and repair the equipment inside the control cabinet. In actual situations, there may be bad conditions such as wrong wiring and aging of equipment inside the control cabinet, which may cause leakage of the control cabinet door and cause harm to the operator. It is also possible that due to the operator's negligence, the cabinet door is not completely closed, resulting in the risk of damage to the equipment inside the control cabinet. Most of the existing control cabinet door switch monitoring and control devices have complex structures and large volumes, and have poor adaptability to existing control cabinets. Summary of the invention

[0003] In view of the fact that current technology cannot realize real-time control of the switch status of a control cabinet door, the present invention provides a control cabinet door switch status recognition and control method based on an image recognition algorithm.

[0004] The objective of the present invention is achieved through the following technical solutions:

[0005] A control cabinet door switch state recognition and control device comprises a servo motor, a metal housing, a crank rod, a strong magnet, a guide groove and an industrial camera, wherein:

[0006] The metal shell is fixed to the inner side of the side wall of the control cabinet;

[0007] The servo motor is fixed inside the metal housing;

[0008] One end of the curved rod is hinged to the straight rod and fixed in the metal housing, and the other end of the curved rod magnetically attracts a strong magnet. The servo motor drives the straight rod to drive the curved rod to rotate through external power supply;

[0009] A guide groove for the strong magnet to move is fixed on the inner side of the cabinet door at the same height as the curved rod, and the strong magnet drives the cabinet door to rotate by sliding in contact with the guide groove;

[0010] The industrial camera is fixed on the inner side of the side wall of the control cabinet and is located above the curved rod, and is responsible for collecting samples of the curved rod.

[0011] A method for identifying and controlling the switch status of a control cabinet door based on an image recognition algorithm using the above device comprises the following steps:

[0012] Step 1: Collect samples of the curved rod using an industrial camera;

[0013] Step 2, the curved bar images are divided into three categories: curved bar not extended, curved bar partially extended, and curved bar fully extended. Each curved bar image is labeled to establish a data set, which is divided into two groups, marked as a training set and a test set respectively;

[0014] Step 3, grayscale processing is performed on each curved rod image;

[0015] Step 4: Use grayscale transformation method and histogram method to adjust the brightness and darkness contrast of the grayscale image, so that the image becomes clearer, the picture is enhanced and denoised;

[0016] Step 5: Binarize the grayscale image obtained in step 4 by threshold processing;

[0017] Step 6: First set the layers and convolution blocks of the convolutional neural network model, and then establish the convolutional neural network model;

[0018] Step 7: Train the convolutional neural network model using the training set and use it as a feature extractor. Use the grayscale image processed in step 5 as the input of the trained convolutional neural network model and collect the outputs of any number of convolutional blocks.

[0019] Step 8, evaluate the accuracy: input the test set into the convolutional neural network model trained in step S7, and compare the accuracy of the test set with that of the training set. If the difference between the two does not exceed 1%, the model training is successful, otherwise add a random inactivation layer and retrain;

[0020] Step 9: Use the trained convolutional neural network model to identify the extended state of the curved rod on the grayscale image that has been subjected to noise reduction, image enhancement and binarization processing;

[0021] Step 10: If the switch state and switch angle of the cabinet door need to be adjusted, the command is transmitted to the servo motor via Bluetooth wireless transmission, and the servo motor sends a pulse to adjust the angle of the crank arm, and the crank arm drives the cabinet door to rotate.

[0022] Compared with the prior art, the present invention has the following advantages:

[0023] 1. The present invention has a simple structure and can be installed on an existing control cabinet by local adjustment without replacing the control cabinet.

[0024] 2. The metal housing and the servo motor mentioned in the present invention are connected by insulating buckles, which avoids metal contact between the servo motor and the control cabinet. At the same time, it is easy to disassemble and shortens the operation time of instrument inspection or replacement.

[0025] 3. The present invention adopts a metal shell, which has a strong ability to resist electromagnetic interference.

[0026] 4. The present invention uses a convolutional neural network to automatically learn features in images, which is more accurate and powerful than manually designed features; when processing grayscale image data sets, the convolutional neural network can achieve better accuracy and efficiency, and can accurately and quickly identify the switch status of cabinet doors.

[0027] 5. The present invention uses simple mechanical components to realize the switch control of the cabinet door, and detects the switch status of the cabinet door in real time through the mapping relationship between the crank angle and the cabinet door switch to cope with various emergency environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 This is a schematic diagram of the cabinet door control structure;

[0029] Figure 2 It is the cabinet door control structure and cabinet door connection diagram;

[0030] Figure 3 is a cross-sectional view of a magnet in an aluminum guide groove;

[0031] Figure 4 Installation status of the entire device in the control cabinet;

[0032] Figure 5 It is the flow chart of the curved bar state recognition of the convolutional neural network;

[0033] In the figure, 1-servo motor, 2-metal housing, 3-bending rod, 4-strong magnet, 5-guide groove, 6-industrial camera, 7-cabinet door, 8-cabinet door shaft, 9-hinge, 10-insulating buckle, 11-power signal interface, 12-side wall of control cabinet. DETAILED DESCRIPTION

[0034] The technical solution of the present invention is further described below in conjunction with the accompanying drawings, but is not limited thereto. Any modification or equivalent replacement of the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention should be included in the protection scope of the present invention.

[0035] The present invention provides a control cabinet door switch state recognition and control device based on image recognition algorithm, such as Figure 1-Figure 4 As shown, the device comprises a servo motor 1, a metal housing 2, a bent rod 3, a strong magnet 4, an aluminum guide groove 5 and an industrial camera 6, wherein:

[0036] The metal shell 2 is fixed to the inner side of the control cabinet side wall 12;

[0037] The servo motor 1 is fixed inside the metal housing 2;

[0038] One end of the curved rod 3 is hinged with the straight rod and fixed in the metal housing 2. The other end of the curved rod 3 magnetically attracts a cubic strong magnet 4. The servo motor 1 drives the straight rod to drive the curved rod 3 to rotate through the power signal interface 11 to identify and control the cabinet door switch.

[0039] A guide groove 5 for the strong magnet to move is fixed on the inner side of the cabinet door 7 at the same height as the bent rod 3, and the strong magnet 4 can drive the cabinet door 7 to rotate by sliding in contact with the guide groove 5;

[0040] The industrial camera 6 is fixed on the inner side of the control cabinet side wall 12 and is located above the curved rod 3 , and is responsible for collecting samples of the curved rod 3 .

[0041] like Figure 2 As shown, the guide groove 5 is fixed on the inner side of the cabinet door 7, and the size of the guide groove 5 and the strong magnet 4 is determined according to the size of the cabinet door opening and closing resistance, and the bent rod 3 drives the cabinet door 7 to move by magnetic attraction with the strong magnet 4. The specific method is: after the servo motor 1 is installed, the guide groove 5 is installed on the inner side of the cabinet door 7 at the same height, and then the strong magnet 4 is placed in the guide groove 5 and rotated so that it can be stuck inside the guide groove 5, and finally the cabinet door 7 is driven by the servo motor 1 to move by magnetic attraction between the strong magnet 4 and the bent rod 3.

[0042] like Figure 3 As shown, the strong magnet 4 slides in the aluminum guide groove 5 due to size limitations. When the crank 3 rotates to drive the cabinet door 7 to rotate, the problem of the cabinet door shaft 8 not coinciding with the servo motor shaft is solved by sliding.

[0043] like Figure 4 As shown, the installation height of the guide groove 5 and the curved rod 3 should ensure the smooth movement of the entire device, and the installation position of the industrial camera 6 should ensure that the recognition range can cover the movement range of the curved rod 3.

[0044] In the present invention, an opening is reserved on the metal shell 2 for the movement of the curved rod 3 and the access of the power supply. The curved rod 3 moves under the constraint of the hinge between the opening reserved in the metal shell 2 and the straight rod, which can ensure that the extension degree of the curved rod 3 corresponds to the opening and closing angle of the cabinet door 7 under normal circumstances. The opening and closing control of the cabinet door 7 is realized by using the servo motor signal fed back to the absolute encoder by the computer.

[0045] In the present invention, the fixing method of the metal shell 2 should be flexibly selected according to the equipment in the cabinet and the remaining space, and can be fixed by magnetic attraction or screws.

[0046] In the present invention, a grayscale image recognition method based on a convolutional neural network performs accurate recognition and prediction on images.

[0047] In the present invention, the servo motor 1 is fixed inside the metal housing 2 using an insulating clip 10 to prevent the influence of leakage of the control cabinet and prevent the cabinet door control device from affecting the instruments in the control cabinet.

[0048] In the present invention, the special connection mode between the bent rod 3 and the cabinet door 7 and the servo motor 1 can avoid the cabinet door rotating shaft, avoid the insufficient installation space caused by the different cabinet door rotating shaft designs of different models of control cabinets, and improve the adaptability.

[0049] In the present invention, the bent rod 3 is slidably connected to the guide slot 5 through the strong magnet 4. When the cabinet door 7 is opened and closed quickly due to human or non-human factors, the bent rod 3 will be disengaged from the strong magnet 4, which can avoid damage to the servo motor 1, improve durability to a certain extent, and extend service life.

[0050] In the present invention, the power supply and signal transmission wiring of the servo motor 1 and the industrial camera 6 should be simple and clear, and should not overlap or cross with the wiring related to the equipment in the control cabinet to ensure the safety of the original lines.

[0051] The present invention also provides a method for identifying and controlling the switch state of a control cabinet door based on an image recognition algorithm using the above device. The method obtains the extension state of the curved rod based on a grayscale image recognition method of a convolutional neural network, judges and displays the switch state of the cabinet door, and feeds back the signal to the servo motor. The servo motor adjusts the switch of the control cabinet door to achieve real-time control of the cabinet door. Figure 5 As shown, the specific steps include:

[0052] Step 1: Use an industrial camera to collect samples of the curved rod.

[0053] Step 2. Classify the curved rod images into three categories: curved rod not extended, curved rod partially extended, and curved rod fully extended. Label each curved rod image to establish a data set, and divide them into two groups in a 4:1 ratio, marked as training set and test set respectively. The training set is used to train the model, and the sample set is used to evaluate the accuracy of the model.

[0054] Step 3. Enter the code in Python:

[0055] import numpy as np

[0056] import cv2 as cv

[0057] path = 'image / lena.jpg'

[0058] def Gray_img(img):

[0059] #img_gray=cv.cvtColor(img_2,cv.COLOR_RGB2GRAY)

[0060] print(img.shape)

[0061] (h,w,c)=img.shape

[0062] img_b=img[:,:,0]

[0063] img_g=img[:,:,1]

[0064] img_r=img[:,:,2]

[0065] img_gray=img_r*0.299+img_g*0.587+img_b*0.114

[0066] img_gray=img_gray.astype(np.uint8)

[0067] cv2.imshow(',img_gray)

[0068] cv2.waitKey(0)

[0069] return img_gray

[0070] img = cv2.imread(path)

[0071] img_gray=Gray_img(img)

[0072] Import the photo of each sample into Python and perform image grayscale processing.

[0073] Step 4: Use grayscale transformation method and histogram method to adjust the brightness and darkness contrast of the grayscale image, so that the image becomes clearer, the picture is enhanced and denoised.

[0074] Step 5: Binarize the grayscale image obtained in step 4 by threshold processing.

[0075] Step 6: First set the layers and convolution blocks of the convolutional neural network model, and then establish the convolutional neural network model. The more layers the convolutional neural network model has, the stronger the nonlinear fitting ability is, and the more layers the more complex the pattern that can be recognized is.

[0076] Step 7. Use the training set to train the convolutional neural network model and use it as a feature extractor. Use the grayscale image processed in step 5 as the input of the trained convolutional neural network model and collect the output of any number of convolutional blocks. All selected layers contain feature information about the curved pole image. The average accuracy displayed after model training needs to be ensured to be above 95%, otherwise the convolutional neural network model is rebuilt.

[0077] Step 8: Evaluate the accuracy: Input the test set into the convolutional neural network model trained in step S7, and compare the accuracy of the test set with that of the training set. If the difference between the two does not exceed 1%, the model training is successful. Otherwise, add a random inactivation layer and retrain.

[0078] Step 9: Use the trained convolutional neural network model to identify the extended state of the curved rod on the grayscale image that has been subjected to denoising, image enhancement and binarization processing.

[0079] Step 10: If the switch state and switch angle of the cabinet door need to be adjusted, the command is transmitted to the servo motor via Bluetooth wireless transmission, and the servo motor sends a pulse to adjust the angle of the crank arm, and the crank arm drives the cabinet door to rotate.

Claims

1. A control cabinet door switch state recognition and control device, characterized in that The device comprises a servo motor, a metal housing, a curved rod, a strong magnet, a guide slot and an industrial camera, wherein: The metal shell is fixed to the inner side of the side wall of the control cabinet; The servo motor is fixed inside the metal housing; One end of the curved rod is hinged to the straight rod and fixed in the metal housing, and the other end of the curved rod magnetically attracts a strong magnet. The servo motor drives the straight rod to drive the curved rod to rotate through external power supply; A guide groove for the strong magnet to move is fixed on the inner side of the cabinet door at the same height as the curved rod, and the strong magnet drives the cabinet door to rotate by sliding in contact with the guide groove; The industrial camera is fixed on the inner side of the side wall of the control cabinet and is located above the curved rod, and is responsible for collecting samples of the curved rod.

2. The control cabinet door switch state identification and control device according to claim 1 is characterized in that The metal shell is fixed to the inner side of the side wall of the control cabinet by means of magnetism or screws.

3. The control cabinet door switch state identification and control device according to claim 1 is characterized in that The servo motor is fixed inside the metal shell by using an insulating buckle.

4. A method for identifying and controlling the switch status of a control cabinet door based on an image recognition algorithm using the device according to any one of claims 1 to 3, characterized in that The method comprises the following steps: Step 1: Collect samples of the curved rod using an industrial camera; Step 2, the curved bar images are divided into three categories: curved bar not extended, curved bar partially extended, and curved bar fully extended. Each curved bar image is labeled to establish a data set, which is divided into two groups, marked as a training set and a test set respectively; Step 3, grayscale processing is performed on each curved rod image; Step 4: Use grayscale transformation method and histogram method to adjust the brightness and darkness contrast of the grayscale image, so that the image becomes clearer, the picture is enhanced and denoised; Step 5: Binarize the grayscale image obtained in step 4 by threshold processing; Step 6: First set the layers and convolution blocks of the convolutional neural network model, and then establish the convolutional neural network model; Step 7: Train the convolutional neural network model using the training set and use it as a feature extractor. Use the grayscale image processed in step 5 as the input of the trained convolutional neural network model and collect the outputs of any number of convolutional blocks. Step 8, evaluate the accuracy: input the test set into the convolutional neural network model trained in step S7, and compare the accuracy of the test set with that of the training set. If the difference between the two does not exceed 1%, the model training is successful, otherwise add a random inactivation layer and retrain; Step 9: Use the trained convolutional neural network model to identify the extended state of the curved rod on the grayscale image that has been subjected to noise reduction, image enhancement and binarization processing; Step 10: If the switch state and switch angle of the cabinet door need to be adjusted, the command is transmitted to the servo motor via Bluetooth wireless transmission, and the servo motor sends a pulse to adjust the angle of the crank arm, and the crank arm drives the cabinet door to rotate.

Citation Information

Patent Citations

  • Smart home control device

    CN109283847A

  • Expansive soil crack image recognition method based on convolutional neural network

    CN115239749A

  • Coking furnace shutter valve identification and detection method based on inspection robot

    CN115272190A

  • Method and system for detecting opening and closing states of unloading door of garbage dump

    CN116469027A

  • Automatic door opening and closing device for door opening and closing experiment in laboratory

    CN217354019U