Motor rotation speed measurement method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202310869397.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-07-14
AI Technical Summary
[0016] This invention provides a method, apparatus, electronic device, and storage medium for measuring motor speed, relating to the field of generator online monitoring technology. It involves controlling a stroboscopic light source to project light onto a motor under test according to a preset pulse cycle, and controlling a camera to capture images of the motor during the projection process. Preset marks are set on the surface of the motor shaft. Target detection is performed on the motor images to determine the movement distance of the preset marks in the motor images. Based on the movement distance and the preset pulse cycle, the speed of the motor under test is determined. This invention controls the stroboscopic light source to flash using pulse signals, analyzes the images captured by the camera during the flashing process, and uses the pixel movement range of the preset marks in the analyzed images and the preset pulse cycle to achieve generator speed measurement, avoiding the problem of inaccurate speed measurement caused by inconsistent tooth pitch of the gear disc.
Smart Images

Figure CN116819113B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of generator online monitoring technology, specifically to a method, device, electronic equipment, and storage medium for measuring motor speed. Background Technology
[0002] During generator set operation, it is necessary to detect the rotational speed of the motor in the generator set to determine the operating status of the generator set.
[0003] The existing method for measuring the speed of generator sets mainly involves measuring the speed through a toothed disc. This method involves installing a ring-shaped toothed device at the end of the generator shaft, and installing a toothed disc speed sensor and a corresponding speed signal processor on a fixed component. When the generator set rotates, a proximity or photoelectric sensor senses and generates a pulse signal that reflects the generator set's speed. The host computer processes the pulse signal, measures the pulse width, and calculates and obtains the generator set's speed.
[0004] However, due to limitations in machining precision, the distance between teeth on the geared disc (i.e., tooth pitch) cannot be perfectly equal. High-sensitivity sensors calculate speed by scanning the time between teeth. This can lead to a situation where the unit's rotational speed remains constant, but changes in tooth pitch cause variations in the calculated speed, generating interference signals and reducing the accuracy of the measurement results. Summary of the Invention
[0005] This invention provides a method, apparatus, electronic device, and storage medium for measuring motor speed, in order to improve the accuracy of generator speed measurement.
[0006] On one hand, embodiments of the present invention provide a method for measuring motor speed, the method comprising:
[0007] A strobe light source is controlled to project light onto the motor under test according to a preset pulse cycle, and a camera is controlled to capture images of the motor during the process of projecting light onto the motor under test; a preset mark is provided on the surface of the rotating shaft of the motor under test;
[0008] Target detection is performed on the motor image to determine the moving distance of a preset marker in the motor image;
[0009] The rotational speed of the motor under test is determined based on the travel distance and the preset pulse period.
[0010] On the other hand, embodiments of the present invention provide a motor speed measuring device, the device comprising:
[0011] The image acquisition module is used to control the strobe light source to project light onto the motor under test according to a preset pulse cycle, and to control the camera to acquire images of the motor during the process of projecting light onto the motor under test; the surface of the rotating shaft of the motor under test is provided with preset marks;
[0012] The distance detection module is used to perform target detection on the motor image and determine the movement distance of a preset mark in the motor image;
[0013] The speed measurement module is used to determine the speed of the motor under test based on the moving distance and the preset pulse period.
[0014] On the other hand, embodiments of the present invention provide an electronic device, including a memory and a processor; the memory stores an application program, and the processor is used to run the application program in the memory to perform the operations in the above-described motor speed measurement method.
[0015] On the other hand, embodiments of the present invention provide a storage medium storing a plurality of instructions adapted for loading by a processor to execute the steps in the above-described motor speed measurement method.
[0016] This invention provides a method, apparatus, electronic device, and storage medium for measuring motor speed, relating to the field of generator online monitoring technology. It involves controlling a stroboscopic light source to project light onto a motor under test according to a preset pulse cycle, and controlling a camera to capture images of the motor during the projection process. Preset marks are set on the surface of the motor shaft. Target detection is performed on the motor images to determine the movement distance of the preset marks in the motor images. Based on the movement distance and the preset pulse cycle, the speed of the motor under test is determined. This invention controls the stroboscopic light source to flash using pulse signals, analyzes the images captured by the camera during the flashing process, and uses the pixel movement range of the preset marks in the analyzed images and the preset pulse cycle to achieve generator speed measurement, avoiding the problem of inaccurate speed measurement caused by inconsistent tooth pitch of the gear disc. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the motor speed measurement system provided in an embodiment of the present invention;
[0019] Figure 2 This is a flowchart illustrating the motor speed measurement method provided in an embodiment of the present invention;
[0020] Figure 3 This is a schematic diagram of the shutter exposure time of the camera and the pulse period of the stroboscopic light source provided in the embodiment of the present invention;
[0021] Figure 4 This is a flowchart illustrating the method for detecting the movement distance of a preset marker provided in an embodiment of the present invention;
[0022] Figure 5 This is a flowchart illustrating another method for measuring motor speed provided in an embodiment of the present invention;
[0023] Figure 6 This is a schematic diagram of the structure of a motor speed measuring device provided in an embodiment of the present invention;
[0024] Figure 7 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0025] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the invention will be more thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art.
[0026] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a full understanding of embodiments of the invention. However, those skilled in the art will recognize that the technical solutions of the invention can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of the invention.
[0027] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0028] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0029] It should be noted that "multiple" in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0030] As described in the background section, due to limitations in machining precision, the distance between teeth on a geared disc (i.e., tooth pitch) cannot be perfectly equal. High-sensitivity sensors calculate speed by scanning the time between teeth. This means that even if the unit's rotational speed remains constant, changes in tooth pitch can alter the calculated speed, generating interference signals. This reduces the accuracy of speed measurement methods based on geared discs. Furthermore, geared disc speed sensors have a "sensing threshold," and the generator may be at this threshold when stopped. Vibrations in the generator set and plant can cause the speed sensor to detect the geared disc, leading to false alarms and further reducing the accuracy of speed measurements. Moreover, geared disc-based speed measurement methods require adding a geared disc device to rotating components, increasing system complexity and introducing safety risks. Finally, due to the sensor's temperature measurement range limitations, sensors mounted on fixed components are typically only 1-2 mm away from the geared disc, making them susceptible to damage from friction between moving and stationary parts, requiring replacement and increasing hardware costs. It is evident that existing speed measurement methods based on toothed discs suffer from inaccurate measurement results, complex measurement processes, high hardware costs, and potential safety hazards.
[0031] Based on this, in order to improve the accuracy of generator speed measurement results, reduce the cost of measurement hardware, and provide a convenient and safe speed measurement method, this invention provides a motor speed measurement method, device, electronic device, and storage medium. It controls a stroboscopic light source to strobe using pulse signals, analyzes the images captured by a camera during the stroboscopic process, and uses the pixel movement range of preset markers and a preset pulse period in the analyzed images to measure the generator speed. This avoids the problem of inaccurate speed measurement caused by inconsistent tooth pitch on the gear disc. Furthermore, it eliminates the need to add structural components to the rotating parts of the generator, reducing system complexity and eliminating the safety risks associated with adding structural components to the rotating parts. In addition, the camera and the rotating shaft can maintain a large distance, eliminating the risk of collision between moving and stationary parts in the measurement method.
[0032] To facilitate understanding of the technical solutions provided in the embodiments of the present invention, the motor speed measurement method, device, electronic equipment, and storage medium provided in the embodiments of the present invention will be introduced below in conjunction with specific application scenarios.
[0033] like Figure 1 As shown, Figure 1This is a schematic diagram of the motor speed measurement system provided in an embodiment of the present invention. The motor speed measurement system shown includes a motor under test, a camera, a host computer, a pulse generator, and a dispersive light source. The camera can be an area scan camera, such as an industrial camera.
[0034] The host computer is connected to both the camera and the pulse generator. It sends commands to the camera to capture images of the motor under test, and sends commands to the pulse generator to control it to send pulses to the stroboscopic light source, which then projects light onto the motor under test according to a preset pulse cycle. The host computer also receives the motor images captured by the camera, performs target detection on the motor images, determines the moving distance of a preset marker in the motor images, and determines the rotational speed of the motor under test based on the moving distance and the preset pulse cycle.
[0035] In some implementations, the surface of the motor shaft under test is provided with preset markings, such as... Figure 1 As shown, diagonal stripes are provided on the surface of the motor shaft under test. It should be noted that... Figure 1 The preset markings shown are merely illustrative and do not constitute a limitation on the embodiments of the present invention. The preset markings can also be vertical stripes, circles, triangles, or other shapes.
[0036] Optionally, preset marks can be set on the surface of the motor shaft under test through various methods such as spraying, printing, and pasting.
[0037] Understandably, the pulse generator sends pulse signals to the strobe light source based on a preset pulse period. The strobe light source projects light onto the motor under test according to the pulse signals. Since the strobe light source projects light onto the motor under test intermittently, during the time period when the strobe light source does not project light onto the motor under test, there is no light source in the environment where the motor under test is located, and the camera cannot capture the preset mark on the shaft surface. During the time period when the strobe light source projects light onto the motor under test, the camera captures the preset mark on the shaft surface. Thus, during the process of the strobe light source projecting light onto the motor under test according to the pulse signals, the movement of the shaft causes the preset mark on the shaft surface to rotate. Since the camera has a shutter exposure time, when the RF flash source is projected onto the motor under test within the preset pulse period, the camera captures the movement distance of the preset mark on the shaft surface within the preset pulse period. Therefore, the rotational speed of the motor under test can be obtained based on the movement distance of the preset mark on the shaft surface within the preset pulse period. For example, when a strobe light source projects light onto the motor under test twice within a preset pulse period, there is a time difference between the projection times of the two light sources. During this time difference, the movement of the shaft causes the preset marks on the surface of the shaft to rotate. Therefore, in the motor image captured by the camera, there are two preset marks. By calculating the distance between the two preset marks, the moving distance of the preset marks in the motor image can be determined, and thus the rotational speed of the motor under test can be determined.
[0038] In some implementations, such as Figure 1 As shown, the host computer includes a database, a shaft speed calculation unit, and a camera and light source control unit. The shaft speed calculation unit is connected to the data center and is used to receive motor images acquired by the camera, perform target detection on the motor images, determine the moving distance of preset marks in the motor images, determine the speed of the motor under test based on the moving distance and the preset pulse period, and write the speed of the motor under test into the database. The camera and light source control unit is used to send control commands to the area array camera and to the pulse generator.
[0039] The motor speed measurement system provided in this invention uses pulse signals to control the stroboscopic light source to strobe, analyzes the images captured by the camera during the stroboscopic process, and uses the pixel movement range of preset markers in the analysis images and the preset pulse period to measure the generator speed. This avoids the problem of inaccurate speed measurement caused by inconsistent tooth pitch of the gear disk. Furthermore, it eliminates the need to add structural components to the rotating parts of the generator, reducing the complexity of the system and eliminating the safety risks associated with adding structural components to the rotating parts. In addition, the camera and the rotating shaft can maintain a large distance, eliminating the risk of collision and friction between moving and stationary parts in the measurement method.
[0040] based on Figure 1 The motor speed measurement system shown in this invention provides a method for measuring motor speed, such as... Figure 2 As shown, Figure 2 This is a schematic flowchart of a motor speed measurement method provided in an embodiment of the present invention. The motor speed measurement method shown can be applied to... Figure 1 The host computer in the illustrated motor speed measurement system can also be applied to computer equipment with data processing capabilities, such as industrial computers and servers. This embodiment of the invention does not specifically limit its application in this regard. Specifically, the illustrated motor speed measurement method includes at least steps 210 to 230, described in detail below:
[0041] Step 210: Control the strobe light source to project the light source onto the motor under test according to the preset pulse cycle, and control the camera to acquire motor images during the process of projecting the light source onto the motor under test.
[0042] The surface of the motor shaft to be tested is marked with preset marks.
[0043] In some implementations, the preset pulse period can be pre-set by the operator.
[0044] In some implementations, the camera has a shutter exposure time. In order to ensure that the camera can capture the position information of the preset mark set on the surface of the motor shaft under test at different times within the shutter exposure time, it is necessary to ensure that the stroboscopic light source can project light source onto the motor under test at least twice within the shutter exposure time. Based on this, the preset pulse period can be determined according to the shutter exposure time of the camera.
[0045] Optionally, a shooting command is sent to the camera, and a preset pulse period is determined based on the camera's shutter exposure time. A pulse signal is generated based on the preset pulse period and sent to a stroboscopic light source. The stroboscopic light source triggers the opening and closing of the light source based on the pulse signal, projecting the light source onto the motor under test. The camera responds to the shooting command and acquires images of the motor during the process of projecting the light source onto the motor under test.
[0046] In some implementations, in order to ensure that the acquired motor images can record the position information of the preset markers at different times, the camera can be controlled to continuously shoot according to a preset frame rate and shutter exposure time. During the continuous shooting process, the strobe light source is controlled to project light onto the motor under test according to a preset pulse period. This ensures that at least one of the multiple motor images acquired by the camera records the position information of the preset markers at different times.
[0047] Optionally, a shooting command can be sent to the camera at preset intervals. At the same time, a preset pulse period is determined based on the camera's shutter exposure time. A pulse signal is generated based on the preset pulse period and sent to a strobe light source. The strobe light source triggers the light source to turn on and off based on the pulse signal, projecting light onto the motor under test. The camera responds to the shooting command, determines the camera frame rate, shutter exposure time, and shooting duration, and continuously takes pictures according to the camera frame rate and shutter exposure time within the shooting duration to obtain multiple images of the motor.
[0048] Step 220: Perform target detection on the motor image to determine the moving distance of the preset mark in the motor image.
[0049] In some implementations, a preset detection model can be used to detect targets in a motor image, thereby obtaining the movement distance of a preset marker in the motor image. The detection model can be a machine learning-based model, such as a dictionary-based model, or a neural network-based model, such as a CNN-based model, a Fast-CNN-based model, a Faster-CNN-based model, or a YOLO-based model.
[0050] In some implementations, target detection can be performed on the motor image to determine preset markers at different positions in the motor image. The movement distance of the preset markers in the motor image can be obtained based on the pixel distance between each preset marker. The pixel distance can be the distance between each preset marker in the image coordinate system where the motor image is located, or it can be the number of pixels between each preset marker in the motor image.
[0051] Optionally, the target detection of the motor image can be performed using a preset detection model; alternatively, the target detection of the motor image can be performed using an edge detection operator.
[0052] In some implementations, target detection can be performed on the motor image to determine whether there are at least two preset markers in the motor image. If there are at least two preset markers, the image region where each preset marker is located in the motor image is determined. Based on the position information of the image region where each preset marker is located, the moving distance of the preset marker in the motor image is obtained. If there are no at least two preset markers, the motor image is discarded, and target detection is performed on the next motor image, or the motor image is re-acquired.
[0053] In some implementations, the motor image can be differentially analyzed with a pre-stored reference image to obtain a difference image between the motor image and the pre-stored reference image. Target detection is then performed based on the difference image to determine the image region where a preset marker is located in the difference image. Based on the position information of the image regions where each preset marker is located, the movement distance of the preset marker in the motor image is obtained. The preset reference image may be an image without preset markers.
[0054] Step 230: Determine the rotational speed of the motor under test based on the travel distance and the preset pulse period.
[0055] In some implementations, after determining the travel distance, the rotational speed of the motor under test can be obtained by dividing the travel distance by the preset pulse period, based on the travel distance and the preset pulse period.
[0056] In some implementations, after determining the travel distance, the linear velocity of the motor under test can be obtained by dividing the travel distance by the preset pulse period based on the travel distance and the preset pulse period. The rotational speed of the motor under test can be obtained by dividing the rotational distance by the preset pulse period based on the shaft radius and linear velocity of the motor shaft.
[0057] In some implementations, after determining the travel distance, the linear velocity of the motor under test can be obtained by dividing the travel distance by the preset pulse period, based on the travel distance and a preset pulse period. The rotational speed of the motor under test can then be obtained based on a preset mapping relationship between the linear velocity and rotational speed of the motor under test. The preset mapping relationship between the linear velocity and rotational speed of the motor under test is used to indicate the mapping relationship between the linear velocity and the corresponding rotational speed of the motor under test.
[0058] In some implementations, if there are multiple motor images, the initial rotational speed corresponding to each motor image can be obtained based on the movement distance of a preset mark in each motor image. The initial rotational speeds corresponding to each motor image are then averaged to obtain the rotational speed of the motor under test. If there is only one motor image, the initial rotational speed corresponding to that motor image is determined as the rotational speed of the motor under test.
[0059] In some implementations, steps 210-230 can be executed at preset time intervals over a period of time to obtain the rotational speed sequence of the motor under test. Based on the rotational speed sequence, the rotational state of the motor under test is detected to determine whether there is any abnormality in its rotational state. If an abnormality is found, an alarm message is issued to prompt the staff to maintain the motor under test. The rotational state includes abnormal rotation and normal rotation.
[0060] For example, when there are consecutive speeds greater than a preset speed threshold in the speed sequence of the motor under test, it is determined that the motor under test is rotating abnormally; when all speeds in the speed sequence of the motor under test are less than or equal to the preset speed threshold, it is determined that the motor under test is rotating normally.
[0061] The motor speed measurement method provided in this invention uses a pulse signal to control the stroboscopic light source to strobe, analyzes the image captured by the camera during the stroboscopic process, and uses the pixel movement range of preset markers in the analysis image and the preset pulse period to measure the generator speed. This avoids the problem of inaccurate speed measurement caused by inconsistent tooth pitch of the gear disk. Furthermore, it eliminates the need to add structural components to the rotating parts of the generator, reducing the complexity of the system and eliminating the safety risks associated with adding structural components to the rotating parts. In addition, the camera and the rotating shaft can maintain a large distance, eliminating the risk of collision and friction between moving and stationary parts in the measurement method.
[0062] Considering the camera's shutter exposure time, to ensure that the camera captures the positions of preset markers at different times in the same motor image, it is necessary to ensure that the stroboscopic light source projects light onto the motor at least twice within the shutter exposure time. Based on this, in some implementations, the pulse period can be set according to the camera's shutter exposure time and the number of flashes of the stroboscopic light source. Specifically, the method for determining the pulse period includes steps a1 to a2:
[0063] Step a1: Obtain the camera's shutter speed and the number of flashes of the stroboscopic light source within the shutter speed.
[0064] Step a2: Determine the preset pulse period of the stroboscopic light source based on the shutter exposure time and the number of stroboscopic flashes.
[0065] In some implementations, the shutter speed of the camera and the number of flashes of the stroboscopic source can be obtained based on the configuration page view input by the staff.
[0066] In some implementations, the camera's shutter speed and the number of flashes from the strobe source can be obtained from the backend server.
[0067] In some implementations, the preset pulse period of the stroboscopic light source can be obtained by dividing the shutter exposure time by the number of stroboscopic flashes.
[0068] For example, let's take a stroboscopic effect where the number of flashes during the shutter exposure time is 2 as an example. Figure 3 As shown, Figure 3 This is a schematic diagram of the shutter exposure time of the camera and the pulse period of the stroboscopic light source provided in an embodiment of the present invention. Two pulse signals are triggered within one shutter exposure time t. The pulse period between the pulse signals is T = t / 2, and each pulse lasts for a time T1. Here, K is the frame rate of the camera, and 1 / K is the shooting frequency of the camera.
[0069] In this embodiment of the invention, the preset pulse period of the stroboscopic light source is determined by the shutter exposure time and the number of stroboscopic flashes. This ensures that the stroboscopic light source can project a light source of a certain number of stroboscopic flashes onto the motor under test within the shutter exposure time. Since there is a time difference between each projection of the light source onto the motor under test, and the motor under test operates sequentially, the motor can capture the positional change of the preset mark set on the surface of the motor shaft under test within the time difference, thereby determining the moving distance of the preset mark in the motor image.
[0070] Considering that the motor continues to rotate during the shutter exposure time, the motor image captured by the camera may contain multiple preset markers, each positioned differently within the image. The movement distance of a preset marker can be obtained by detecting the distance between its contours. Therefore, in some implementations, edge detection can be performed on the motor image to determine the contour of each preset marker, and the movement distance of the preset marker in the motor image can be determined based on the distance between these contours.
[0071] Optionally, edge detection operators can be used to perform edge detection on the motor image to determine the contour of each preset marker in the motor image. These edge detection operators include, but are not limited to, gradient operators, Sobel (discrete differential operator), Roberts (gradient calculation method for oblique deviation integral), Prewitt (edge detection operator for differential operators), Canny (optimal step-type edge detection operator), and Laplacian (second-order differential operator) edge recognition operators.
[0072] The distance between the contours of each preset mark in the motor image can be the distance between the outer edges of the contours of each preset mark in the motor image; it can also be the distance between the inner edges of the contours of each preset mark in the motor image; or it can be the distance between the center points of the contours of each preset mark in the motor image.
[0073] In some implementations, the distance between the contours of each preset marker in the motor image can be determined as the moving distance of the preset marker in the motor image.
[0074] In some implementations, the movement distance of the preset markers in the motor image can be obtained based on the distance between the contours of each preset marker in the motor image and the mapping relationship between the preset image distance and the actual distance.
[0075] The preset mapping relationship between image distance and actual distance is used to indicate the mapping relationship between image distance and actual distance in the corresponding actual coordinate system. In some embodiments, the preset mapping relationship between image distance and actual distance can be a mapping function between image distance and actual distance, such as a transformation function between image coordinate system and world coordinate system.
[0076] Optionally, when there are two preset marks in the motor image, the moving distance of the preset marks in the motor image can be obtained based on the distance between the outlines of the preset marks.
[0077] Optionally, when there are two or more preset marks in the motor image, the maximum distance between the contours of each preset mark in the motor image can be determined as the target contour distance, and the moving distance of the preset mark in the motor image can be obtained based on the target contour distance. For example, the target contour distance can be determined as the moving distance of the preset mark in the motor image; for example, the moving distance of the preset mark in the motor image can be obtained based on the target contour distance and the mapping relationship between the preset image distance and the actual distance.
[0078] To improve the accuracy of edge detection, and consequently the precision of the movement distance of preset markers in the motor image, thereby ensuring the reliability of the speed measurement results, some embodiments may preprocess the motor image and perform edge detection based on the preprocessed image. This improves the image quality of the motor image, thereby enhancing the accuracy of edge detection and ultimately improving the precision of the movement distance of preset markers in the motor image, thus ensuring the reliability of the speed measurement results. Preprocessing includes, but is not limited to, image sharpening, grayscale stretching, image noise reduction, and image edge enhancement.
[0079] Specifically, such as Figure 4 As shown, Figure 4 This is a flowchart illustrating a method for detecting the movement distance of a preset marker according to an embodiment of the present invention. The method for detecting the movement distance of a preset marker includes steps 221 to 223:
[0080] Step 221: Preprocess the motor image to obtain the preprocessed motor image.
[0081] Step 222: Perform edge detection on the preprocessed motor image to determine the contour of each preset marker in the preprocessed motor image.
[0082] Step 223: Determine the pixel distance between each contour, and based on the pixel distance between each contour, determine the movement distance of the preset mark in the preprocessed motor image.
[0083] In some implementations, the image coordinates of the center point of each preset mark's contour in the image coordinate system where the motor image is located can be determined based on the contour of each preset mark. The pixel distance between each contour can then be obtained based on the distance between the image coordinates of the center points of each preset mark's contour. For example, the pixel distance between each contour can be determined by the Euclidean distance or Mahalanobis distance between the image coordinates of the center points of each preset mark's contour. Here, the center point can be either the geometric center or the centroid.
[0084] In some implementations, the image coordinates of the edge of each preset marker's contour in the image coordinate system where the motor image is located can be determined based on the contour of each preset marker. The pixel distance between the contours of each preset marker can then be determined based on these image coordinates. Here, the edge can be either an outer edge or an inner edge.
[0085] In some implementations, the pixel distance between the contours of each preset marker can be obtained based on the image coordinates of preset key points in each contour within the image coordinate system of the motor image. The preset key points can be the center point of the contour, the center point of an edge in the contour, or any point within the contour.
[0086] In some implementations, the pixel distance between the contours of each preset marker can be determined based on the number of pixels between preset key points in each contour. Specifically, the method for determining the pixel distance includes:
[0087] (1) Determine the number of pixels between preset key points in each contour based on the position information of preset key points in each contour.
[0088] (2) The number of pixels between preset key points in each contour is determined as the pixel distance between each contour.
[0089] Optionally, the position information of preset key points in each contour can be compared in the motor image to obtain the image length between preset key points in each contour. Based on the image length between preset key points in each contour and the resolution of the motor image, the number of pixels between preset key points in each contour can be obtained.
[0090] Optionally, the number of pixels between the position information of the preset key points in the motor image and the position information of the preset key points in other contours in the motor image can be counted to obtain the number of pixels between the preset key points in each contour.
[0091] In some implementations, after determining the pixel distance, the pixel distance can be mapped to the world coordinate system based on the mapping relationship between the image coordinate system and the world coordinate system to obtain the movement distance of the preset mark in the preprocessed motor image. The mapping relationship between the image coordinate system and the world coordinate system indicates the mapping relationship between coordinate values in the image coordinate system and coordinate values in the world coordinate system.
[0092] In some implementations, after determining the pixel distance, to ensure the accuracy of the movement distance calculation, it is also necessary to consider the actual physical size represented by each pixel in the motor image, and then determine the movement distance of the preset mark in the preprocessed motor image. That is, the preset pixel precision of the camera and the pixel distance are needed to determine the movement distance of the preset mark in the preprocessed motor image. The preset pixel precision of the camera is used to characterize the actual physical size represented by each pixel in the image captured by the camera. Specifically, the movement distance determination method based on pixel distance includes:
[0093] (1) Based on the pixel distance between each contour and the preset pixel accuracy of the camera, the initial movement distance of the preset mark in the preprocessed motor image is obtained.
[0094] (2) Based on the image height of the preset mark in the preprocessed motor image and the preset actual height of the preset mark, obtain the correction coefficient between the pixel length and the actual distance.
[0095] (3) The initial moving distance is corrected based on the correction coefficient to obtain the moving distance of the preset mark in the preprocessed motor image.
[0096] In some implementations, the initial movement distance of the preset mark in the preprocessed motor image can be obtained by multiplying the pixel distance by the preset pixel accuracy, based on the pixel distance between each contour and the preset pixel accuracy of the camera.
[0097] In some implementations, the physical distance between each contour can be obtained by multiplying the pixel distance by the preset pixel precision of the camera, based on the pixel distance between each contour and the preset pixel precision. The farthest distance among the physical distances between each contour is then determined as the initial moving distance of the preset mark in the preprocessed motor image.
[0098] The correction coefficient indicates the mapping coefficient between length in the image coordinate system and length in the world coordinate system. In some embodiments, the correction coefficient can be obtained by dividing the image height by the preset actual height of the preset mark in the preprocessed motor image. The image height represents the height of the preset mark in the image coordinate system of the motor image.
[0099] In some implementations, the movement distance of the preset mark in the preprocessed motor image can be obtained by multiplying the correction coefficient by the initial movement distance.
[0100] In some implementations, after obtaining the movement distance of the preset mark in the preprocessed motor image, the speed of the motor under test can be determined according to the method for determining the speed of the motor under test in step 230.
[0101] Considering that due to factory vibrations or inertial motion after power shutdown, or low-speed movement of the motor shaft during low-speed motor operation, the positional change of the preset marker may be difficult to capture within the camera's shutter exposure time, or the positional change of the preset marker may be small. Therefore, if the camera uses the same shutter exposure time for image acquisition, the accuracy of the moving distance calculation may be low, thus reducing the accuracy of the rotational speed measurement results. Based on this, to ensure the accuracy of the rotational speed measurement results, in some embodiments, after obtaining the moving distance, the moving distance is compared with a preset distance threshold. When the moving distance is less than or equal to the preset distance threshold, the camera's shutter exposure time is adjusted, thereby ensuring that the positional change of the preset marker can be captured within the camera's shutter exposure time. Specifically, as... Figure 5 As shown, Figure 5 This is a schematic flowchart of another motor speed measurement method provided in an embodiment of the present invention. The motor speed measurement method shown includes at least steps 510 to 580:
[0102] Step 510: Control the strobe light source to project the light source onto the motor under test according to the preset pulse cycle, and control the camera to acquire motor images during the process of projecting the light source onto the motor under test.
[0103] In some implementation methods, reference may be made to Figure 2 In step 210 of the provided motor speed measurement method, the stroboscopic light source is controlled to project light onto the motor under test according to a preset pulse cycle, and the camera is controlled to collect motor images during the process of projecting light onto the motor under test. The embodiments of the present invention will not be described in detail here.
[0104] In some implementations, the preset pulse period can be determined according to the pulse period determination method provided in steps a1 to a2, with reference to... Figure 2 In step 210 of the provided motor speed measurement method, the stroboscopic light source is controlled to project light onto the motor under test according to a preset pulse cycle, and the camera is controlled to collect motor images during the process of projecting light onto the motor under test. The embodiments of the present invention will not be described in detail here.
[0105] Step 520: Perform target detection on the motor image to determine the moving distance of the preset mark in the motor image.
[0106] In some implementation methods, reference may be made to Figure 4 The provided method for detecting the movement distance of a preset marker determines the movement distance of the preset marker in the motor image. This embodiment of the invention will not be described in detail here.
[0107] Step 530: If the moving distance is greater than the preset distance threshold, the rotational speed of the motor under test is determined based on the moving distance and the preset pulse period.
[0108] In some implementations, the moving distance can be compared with a preset distance threshold; if the moving distance is greater than the preset distance threshold, then... Figure 2 In the provided motor speed measurement method, step 230 determines the speed of the motor under test, which will not be described in detail here.
[0109] Step 540: If the moving distance is less than or equal to a preset distance threshold, adjust the camera's shutter speed and pulse period.
[0110] In some implementations, if the moving distance is less than or equal to a preset distance threshold, an adjustment coefficient is obtained. The camera's shutter speed is then adjusted based on this adjustment coefficient. The adjusted pulse period is obtained by dividing the adjusted shutter speed by the number of flashes. Here, the adjustment coefficient is an integer greater than 1.
[0111] Optionally, the adjusted shutter speed can be obtained by multiplying the coefficient by the camera's shutter speed.
[0112] Alternatively, the adjusted shutter speed can be obtained by multiplying the camera's shutter speed by 2^(adjustment factor).
[0113] Optionally, the adjustment coefficient can be obtained from a preset adjustment coefficient sequence; optionally, the adjustment coefficient input by the staff can be obtained; optionally, the number of times the shutter exposure time is adjusted can be obtained and the number of adjustments can be determined as the adjustment coefficient, or 2^(number of adjustments) can be determined as the adjustment coefficient.
[0114] Step 550: Based on the adjusted pulse period, project the light source onto the motor under test, and control the camera to acquire new motor images during the process of projecting the light source onto the motor under test according to the adjusted shutter exposure time.
[0115] In some implementations, it is possible Figure 2 In step 210 of the provided motor speed measurement method, a light source is projected onto the motor under test based on the adjusted pulse period, and the camera is controlled to acquire a new motor image of the motor under test during the process of projecting the light source according to the adjusted shutter exposure time. The embodiments of the present invention will not be described in detail here.
[0116] Step 560: Perform target detection on the new motor image to determine the new moving distance of the preset marker in the motor image.
[0117] In some implementation methods, reference may be made to Figure 4 The provided method for detecting the movement distance of a preset marker determines the new movement distance of the preset marker in the motor image. The embodiments of the present invention will not be described in detail here.
[0118] Step 570: If the new moving distance is less than or equal to the preset distance threshold, then the preset speed is determined as the speed of the motor under test.
[0119] In some implementations, if the new moving distance is less than or equal to a preset distance threshold, steps 540-560 are repeated to obtain a new moving distance. If the new moving distance is less than or equal to the preset distance threshold, it indicates that the shaft of the motor under test has no rotational speed or the speed is too low. In this case, the preset speed is determined as the speed of the motor under test. The preset speed can be 0 / s.
[0120] In some implementations, if the new moving distance is less than or equal to a preset distance threshold, the number of shutter exposure time adjustments is greater than a preset number threshold, and the rotational speed is set to the rotational speed of the motor under test; if the number of shutter exposure time adjustments is less than or equal to a preset number threshold, steps 540 to 560 are repeated to obtain a new moving distance.
[0121] After steps 580 and 560, if the new moving distance is greater than the preset distance threshold, the speed of the motor under test is determined based on the new moving distance and the adjusted pulse period.
[0122] In some implementations, if the new moving distance is greater than a preset distance threshold, then according to... Figure 2 In the provided motor speed measurement method, step 230 determines the speed of the motor under test, which will not be described in detail here.
[0123] The motor speed measurement method provided in this embodiment of the invention increases the detection of the moving distance. When the speed is too low or there is no speed, resulting in insufficient pixel accuracy to accurately obtain the moving distance, the camera shutter exposure time is automatically controlled. By increasing the shutter exposure time, an effective moving distance is obtained, so that the parameters of the camera, pulse generator and other devices are matched with the current speed of the motor under test, and more accurate measurement is performed. This avoids the problem of inaccurate speed measurement results caused by low speed or factory vibration.
[0124] To better implement the motor speed measurement method provided in the embodiments of the present invention, based on the embodiments of the motor speed measurement method, the present invention provides a motor speed measurement device, such as... Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of the motor speed measuring device provided in an embodiment of the present invention. The motor speed measuring device shown includes:
[0125] The image acquisition module 601 is used to control the strobe light source to project light onto the motor under test according to a preset pulse cycle, and to control the camera to acquire images of the motor during the process of projecting light onto the motor under test; the surface of the rotating shaft of the motor under test is provided with preset marks;
[0126] The distance detection module 602 is used to perform target detection on the motor image and determine the moving distance of the preset mark in the motor image;
[0127] The speed measurement module 603 is used to determine the speed of the motor under test based on the travel distance and the preset pulse period.
[0128] In some embodiments, the distance detection module 602 includes:
[0129] The image preprocessing unit is used to preprocess the motor image to obtain the preprocessed motor image;
[0130] The edge detection unit is used to perform edge detection on the preprocessed motor image and determine the contour of each preset mark in the preprocessed motor image;
[0131] The distance detection unit is used to determine the pixel distance between each contour, and based on the pixel distance between each contour, to determine the movement distance of the preset mark in the preprocessed motor image.
[0132] In some implementations, the distance detection unit is used for:
[0133] Based on the pixel distance between each contour and the camera's preset pixel accuracy, the initial movement distance of the preset mark in the preprocessed motor image is obtained;
[0134] Based on the pixel height of the preset mark and the preset actual height of the preset mark in the preprocessed motor image, the correction coefficient between the pixel length and the actual distance is obtained;
[0135] The initial moving distance is corrected based on the correction coefficient to obtain the moving distance of the preset mark in the preprocessed motor image.
[0136] In some implementations, the distance detection unit is used for:
[0137] Based on the position information of the preset key points in each contour, determine the number of pixels between the preset key points in each contour;
[0138] The number of pixels between preset key points in each contour is determined as the pixel distance between each contour.
[0139] In some embodiments, the rotational speed measurement module 603 is used for:
[0140] The linear velocity of the motor under test is obtained based on the moving distance and the preset pulse period.
[0141] Obtain the shaft radius of the motor to be tested;
[0142] The rotational speed of the motor under test is obtained based on the shaft radius and linear velocity.
[0143] In some embodiments, the motor speed measuring device further includes:
[0144] The feedback adjustment module 604 is used to adjust the camera's shutter speed and pulse period if the moving distance is less than or equal to a preset distance threshold.
[0145] The image acquisition module 601 is used to project a light source onto the motor under test based on the adjusted pulse period, and control the camera to acquire new motor images of the motor under test during the process of projecting the light source according to the adjusted shutter exposure time.
[0146] The distance detection module 602 is used to perform target detection on the new motor image and determine the new moving distance of the preset mark in the motor image;
[0147] The speed measurement module 603 is used to determine the speed of the motor under test as the preset speed if the new moving distance is less than or equal to the preset distance threshold; and to determine the speed of the motor under test based on the new moving distance and the adjusted pulse period if the new moving distance is greater than the preset distance threshold.
[0148] In some embodiments, the motor speed measuring device further includes:
[0149] The control module 605 is used to acquire the camera's shutter exposure time and the number of flashes of the stroboscopic light source during the shutter exposure time; and to determine the preset pulse period of the stroboscopic light source based on the shutter exposure time and the number of flashes.
[0150] The motor speed measuring device provided in this invention controls the flash source to flash via pulse signals, analyzes the image captured by the camera during the flashing process, and uses the pixel movement range of preset marks in the analysis image and the preset pulse period to measure the generator speed. This avoids the problem of inaccurate speed measurement caused by inconsistent tooth pitch of the gear disk. Furthermore, it eliminates the need to add structural components to the rotating parts of the generator, reducing the complexity of the system and eliminating the safety risks associated with adding structural components to the rotating parts. In addition, the camera and the rotating shaft can maintain a large distance, eliminating the risk of collision and friction between moving and stationary parts in the measurement method.
[0151] This invention also provides an electronic device, such as... Figure 7 As shown, it illustrates a structural schematic diagram of the electronic device involved in an embodiment of the present invention, specifically:
[0152] The electronic device may include components such as a processor 701 with one or more processing cores, a memory 702 with one or more computer-readable storage media, a power supply 703, and an input unit 704. Those skilled in the art will understand that... Figure 7The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0153] The processor 701 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 702, and by calling data stored in the memory 702, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 701.
[0154] The memory 702 can be used to store software programs and modules. The processor 701 executes various functional applications and data processing by running the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
[0155] The electronic device also includes a power supply 703 that supplies power to the various components. Preferably, the power supply 703 can be logically connected to the processor 701 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 703 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0156] The electronic device may also include an input unit 704, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0157] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 701 in the electronic device loads the executable files corresponding to the processes of one or more application programs into the memory 702 according to the following instructions, and the processor 701 runs the application programs stored in the memory 702 to realize various functions, as follows:
[0158] The strobe light source is controlled to project light onto the motor under test according to a preset pulse cycle, and the camera is controlled to capture images of the motor during the process of projecting light onto the motor under test; preset marks are set on the surface of the motor shaft under test;
[0159] Target detection is performed on the motor image to determine the movement distance of a preset marker in the motor image;
[0160] The rotational speed of the motor under test is determined based on the travel distance and the preset pulse period.
[0161] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0162] To this end, embodiments of the present invention provide a storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the motor speed measurement methods provided in the embodiments of the present invention. For example, the instructions can execute the following steps:
[0163] The strobe light source is controlled to project light onto the motor under test according to a preset pulse cycle, and the camera is controlled to capture images of the motor during the process of projecting light onto the motor under test; preset marks are set on the surface of the motor shaft under test;
[0164] Target detection is performed on the motor image to determine the movement distance of a preset marker in the motor image;
[0165] The rotational speed of the motor under test is determined based on the travel distance and the preset pulse period.
[0166] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0167] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0168] Since the instructions stored in the storage medium can execute the steps in any of the motor speed measurement methods provided in the embodiments of the present invention, the beneficial effects that any of the motor speed measurement methods provided in the embodiments of the present invention can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0169] The foregoing has provided a detailed description of a motor speed measurement method, device, electronic device, and storage medium provided by embodiments of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for measuring motor speed, characterized in that, The method includes: The camera's shutter exposure time and the number of flashes of the stroboscopic light source during the shutter exposure time are obtained. The preset pulse period of the strobe light source is determined based on the shutter exposure time and the number of flashes. A stroboscopic light source is controlled to project light onto the motor under test according to a preset pulse cycle, and a camera is controlled to acquire images of the motor during the process of projecting light onto the motor under test; a preset mark is provided on the surface of the rotating shaft of the motor under test; wherein, during the shutter exposure time of the camera, the stroboscopic light source emits at least two pulse flashes, so that the motor image contains at least two images of the preset mark; Target detection is performed on the motor image to determine the moving distance of a preset marker in the motor image; The rotational speed of the motor under test is determined based on the travel distance and the preset pulse period.
2. The motor speed measurement method according to claim 1, characterized in that, The step of performing target detection on the motor image and determining the movement distance of a preset marker in the motor image includes: The motor image is preprocessed to obtain a preprocessed motor image; Edge detection is performed on the preprocessed motor image to determine the contour of each preset marker in the preprocessed motor image; The pixel distance between each of the contours is determined, and based on the pixel distance between each of the contours, the movement distance of the preset mark in the preprocessed motor image is determined.
3. The motor speed measurement method according to claim 2, characterized in that, Determining the movement distance of the preset marker in the preprocessed motor image based on the pixel distance between each of the contours includes: Based on the pixel distance between each of the contours and the preset pixel accuracy of the camera, the initial movement distance of the preset mark in the preprocessed motor image is obtained; Based on the pixel height of the preset mark in the preprocessed motor image and the preset actual height of the preset mark, a correction coefficient between the pixel length and the actual distance is obtained; The initial moving distance is corrected based on the correction coefficient to obtain the moving distance of the preset mark in the preprocessed motor image.
4. The motor speed measurement method according to claim 2, characterized in that, Determining the pixel distance between each of the contours includes: The number of pixels between the preset key points in each contour is determined based on the position information of the preset key points in each contour. The number of pixels between preset key points in each contour is determined as the pixel distance between each contour.
5. The method for measuring motor speed according to claim 1, characterized in that, Determining the rotational speed of the motor under test based on the travel distance and the preset pulse period includes: The linear velocity of the motor under test is obtained based on the moving distance and the preset pulse period. Obtain the shaft radius of the motor shaft to be tested; The rotational speed of the motor under test is obtained based on the shaft radius and the linear velocity.
6. The method for measuring motor speed according to claim 1, characterized in that, After performing target detection on the motor image and determining the moving distance of the preset marker in the motor image, the method further includes: If the moving distance is less than or equal to a preset distance threshold, then the shutter speed of the camera and the pulse period are adjusted. The light source is projected onto the motor under test based on the adjusted pulse period, and the camera is controlled to acquire new motor images of the motor under test during the process of projecting the light source according to the adjusted shutter exposure time. Target detection is performed on the new motor image to determine the new moving distance of the preset markers in the motor image; If the new moving distance is less than or equal to the preset distance threshold, then the preset rotational speed is determined as the rotational speed of the motor under test; If the new moving distance is greater than the preset distance threshold, the rotational speed of the motor under test is determined based on the new moving distance and the adjusted pulse period.
7. A motor speed measuring device, characterized in that, The device includes: The control module is used to acquire the camera's shutter exposure time and the number of flashes of the stroboscopic light source during the shutter exposure time; The preset pulse period of the strobe light source is determined based on the shutter exposure time and the number of flashes. The image acquisition module is also used to control the strobe light source to project light onto the motor under test according to a preset pulse period, and to control the camera to acquire motor images during the process of projecting light onto the motor under test; the surface of the rotating shaft of the motor under test is provided with preset marks; wherein, during the shutter exposure time of the camera, the strobe light source emits at least two pulse flashes, so that the motor image contains at least two images of the preset marks; The distance detection module is used to perform target detection on the motor image and determine the movement distance of a preset mark in the motor image; The speed measurement module is used to determine the speed of the motor under test based on the moving distance and the preset pulse period.
8. An electronic device, characterized in that, It includes a memory and a processor; the memory stores an application program, and the processor runs the application program in the memory to perform the operations in the motor speed measurement method according to any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium stores a plurality of instructions adapted for loading by a processor to execute the steps of the motor speed measurement method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Automatic measuring method and apparatus for rotating speed of motor
CN106370880A
Dual-camera rapid space trajectory capturing method based on high-frequency flash source
CN115379132A