Tilt angle measurement method and device of angle encoder

By acquiring and processing the encoding image in the angle encoder, determining the position of the lowest and highest points of the code disk, and calculating its tilt angle, the problem of tilt angle measurement after the angle encoder is installed is solved and the accuracy of the measurement results is ensured.

CN117990011BActive Publication Date: 2024-08-30BEIJING INST OF CONTROL ENG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410151841.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-02
Publication Date
2024-08-30
Estimated Expiration
2044-02-02

AI Technical Summary

Technical Problem

The existing technology fails to effectively measure the tilt angle of the angle encoder after installation, affecting the accuracy of the measurement results.

Method used

When the cylindrical code disk of the angle encoder rotates along the central axis of rotation, the camera is used to obtain multiple encoded images. After deduplication processing, the encoded images at the lowest and highest points are determined, the displacement in the vertical direction is calculated, and the The arcsine calculation of the code wheel diameter is performed to obtain the tilt angle.

Benefits of technology

It is possible to accurately measure the tilt angle after the angle encoder is installed to ensure the accuracy of the rotation angle measurement without the need for external equipment and only relies on the code disk and camera.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117990011B
    Figure CN117990011B
Patent Text Reader

Abstract

The present invention provides a method and device for measuring the inclination angle of an angle encoder, wherein the method comprises: in the process of the cylindrical code disk of the angle encoder rotating along the rotation center axis, using a camera to obtain multiple coded images; the rotation center axis is perpendicular to the shooting direction of the camera; an angle coding pattern is arranged on the circumference of the cylindrical code disk; multiple coded images are deduplicated based on the angle coding pattern in the multiple coded images; based on the multiple coded images remaining after the deduplication processing, the first coded image corresponding to the lowest point position of the cylindrical code disk during the rotation process and the second coded image corresponding to the highest point position are determined; the displacement of the angle encoder in the vertical direction is calculated according to the first coded image and the second coded image; the displacement and the diameter of the cylindrical code disk are used to perform an inverse sine calculation to obtain the inclination angle of the angle encoder. This scheme can accurately measure the inclination angle after the angle encoder is installed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of measurement technology, and in particular to a method and device for measuring the inclination angle of an angle encoder. Background Art

[0002] An angle encoder is a device that can measure the angle of a rotating object. It can convert physical quantities such as rotation angle, angular displacement and angular velocity into electrical signals. Therefore, it can be used in engineering projects that require accurate angle measurement, such as aerospace, ships, automobiles, and industrial equipment. An angle encoder uses the principle of optical amplification to amplify the slight angle change of the shaft system into an optical signal that is easy to measure. The sensor converts the optical signal into an electrical signal to achieve the purpose of measuring tiny angle changes.

[0003] After the angle encoder is installed, if you want to ensure the accuracy of the angle measurement result, the code disk needs to be perpendicular to the shooting direction of the camera; if the code disk is tilted relative to the shooting direction of the camera after installation, the angle measurement result can be compensated based on the tilt angle. Therefore, it is necessary to measure the tilt angle. However, there is currently no method for measuring the tilt angle. Summary of the invention

[0004] The embodiment of the present invention provides a method and device for measuring the inclination angle of an angle encoder, which can accurately measure the inclination angle after the angle encoder is installed.

[0005] In a first aspect, an embodiment of the present invention provides a method for measuring an inclination angle of an angle encoder, comprising:

[0006] In the process of the cylindrical code disk of the angle encoder rotating along the rotation center axis, a plurality of coded images are acquired by using a camera; the rotation center axis is perpendicular to the shooting direction of the camera; an angle coding pattern is arranged on the circumference of the cylindrical code disk, and the coded image is formed by the camera shooting the angle coding pattern;

[0007] Deduplication processing is performed on the plurality of coded images based on angle coding patterns in the plurality of coded images to obtain a plurality of coded images remaining after deduplication processing;

[0008] Based on the multiple coded images remaining after deduplication processing, determine a first coded image corresponding to the lowest point position and a second coded image corresponding to the highest point position of the cylindrical code disk during rotation;

[0009] Calculating a displacement of an angle encoder in a vertical direction according to the first coded image and the second coded image;

[0010] The displacement and the diameter of the cylindrical code disk are used to perform an arcsine calculation to obtain the tilt angle of the angle encoder.

[0011] In a second aspect, an embodiment of the present invention further provides a device for measuring the inclination angle of an angle encoder, comprising:

[0012] An image acquisition unit is used to acquire a plurality of coded images using a camera during the process of the cylindrical code disk of the angle encoder rotating along the rotation center axis; the rotation center axis is perpendicular to the shooting direction of the camera; an angle coding pattern is arranged on the circumference of the cylindrical code disk, and the coded image is formed by the camera shooting the angle coding pattern;

[0013] a deduplication processing unit, configured to perform deduplication processing on the plurality of coded images based on the angle coding patterns in the plurality of coded images, to obtain a plurality of coded images remaining after the deduplication processing;

[0014] An image determination unit, configured to determine, based on the plurality of coded images remaining after deduplication processing, a first coded image corresponding to the lowest point position and a second coded image corresponding to the highest point position of the cylindrical code disk during rotation;

[0015] a displacement calculation unit, configured to calculate a displacement of the angle encoder in a vertical direction according to the first encoded image and the second encoded image;

[0016] The angle calculation unit is used to perform an arcsine calculation using the displacement and the diameter of the cylindrical code disk to obtain the tilt angle of the angle encoder.

[0017] In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any embodiment of this specification is implemented.

[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, enables the computer to execute the method described in any embodiment of this specification.

[0019] The embodiment of the present invention provides a method and device for measuring the inclination angle of an angle encoder. After the angle encoder is installed, since the rotation center axis of the cylindrical code disk is perpendicular to the shooting direction of the camera, the camera can capture the encoded images of the lowest point position and the highest point position of the code disk during the rotation of the cylindrical code disk along the rotation center axis, and the angle coding pattern set on the code disk can be used to determine the encoded images of the lowest point position and the highest point position among multiple encoded images captured by the camera. The height difference between the two lowest point positions and the highest point position can be calculated using the encoded images of the lowest point position and the highest point position, and the height difference is the displacement in the vertical direction. When no tilt occurs, there will be no displacement in the vertical direction. Therefore, the inclination angle of the angle encoder can be accurately obtained by performing inverse sine calculation using the displacement in the vertical direction and the diameter of the code disk. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 is a schematic diagram of a cross-sectional circular trajectory provided by an embodiment of the present invention;

[0022] Figure 2 is a schematic diagram of an angle encoder provided by an embodiment of the present invention;

[0023] Figure 3 It is a flow chart of a method for measuring the tilt angle of an angle encoder provided by one embodiment of the present invention;

[0024] Figure 4 is a schematic diagram of a coded image provided by an embodiment of the present invention;

[0025] Figure 5 is a flow chart of a method for determining a coded image of a lowest point position and a highest point position provided by an embodiment of the present invention;

[0026] Figure 6 is a schematic diagram of comparison between a first coded image and a second coded image provided by an embodiment of the present invention;

[0027] Figure 7 is a hardware architecture diagram of an electronic device provided by an embodiment of the present invention;

[0028] Figure 8 It is a structural diagram of an inclination angle measuring device of an angle encoder provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0030] If there is a tilt angle after the angle encoder is installed, it is necessary to measure the tilt angle. As for how to measure the tilt angle, the following is an analysis of the angle encoder after installation.

[0031] Please refer to Figure 1 , is a schematic diagram of the cross-sectional circular trajectory O1 of the cylindrical code disk when there is no tilt angle and the cross-sectional circular trajectory O2 of the cylindrical code disk when there is a tilt angle. The plane formed by the trajectory O1 is the reference horizontal plane. If the cylindrical code disk has a tilt angle, the relationship between the inclined plane formed by the cross-sectional circular trajectory O2 and the reference horizontal plane is as follows: Figure 2 As shown, the intersection AB of the inclined plane and the reference horizontal plane is the diameter. For a point C on track O2, CF is perpendicular to AB, D is the projection of point C on the reference horizontal plane, E is the connection point of the extension line of OD on track O1, ∠AOC=φ is the actual rotation angle of the code disk, ∠AOE=θ represents the projection angle of the real rotation angle φ on the reference horizontal plane, and the projection angle is the rotation angle read by the reading head. The included angle ∠CFD is the inclination angle of the code disk. If the shooting direction of the camera is AB or BA, the inclination angle can be measured directly. However, after the angle encoder is installed, it is impossible to determine whether the shooting direction of the camera is the AB or BA direction. Considering that the rotation center axis of the cylindrical code disk is perpendicular to the shooting direction of the camera, during the rotation of the cylindrical code disk along the rotation center axis, there will always be the lowest point and the highest point captured by the camera. Please refer to Figure 2 The lowest point position and the highest point position can be used to calculate the vertical displacement, and the diameter of the cylindrical code disk is known, so the tilt angle α can be calculated based on the vertical displacement and the diameter.

[0032] The specific implementation of the above concept is described below.

[0033] Please refer to Figure 3 The embodiment of the present invention provides a method for measuring the inclination angle of an angle encoder, the method comprising:

[0034] Step 300, when the cylindrical code disk of the angle encoder rotates along the rotation center axis, a plurality of coded images are acquired by using a camera; the rotation center axis is perpendicular to the shooting direction of the camera; an angle coding pattern is arranged on the circumference of the cylindrical code disk, and the coded images are formed by the camera shooting the angle coding pattern;

[0035] Step 302, performing deduplication processing on the plurality of coded images based on the angle coding patterns in the plurality of coded images to obtain a plurality of coded images remaining after the deduplication processing;

[0036] Step 304, based on the multiple coded images remaining after deduplication processing, determine a first coded image corresponding to the lowest point position and a second coded image corresponding to the highest point position of the cylindrical code disk during rotation;

[0037] Step 306, calculating the displacement of the angle encoder in the vertical direction according to the first coded image and the second coded image;

[0038] Step 308: Perform an arcsine calculation using the displacement and the diameter of the cylindrical code disk to obtain the tilt angle of the angle encoder.

[0039] In the embodiment of the present invention, after the angle encoder is installed, since the rotation center axis of the cylindrical code disk is perpendicular to the shooting direction of the camera, the camera can capture the encoded images of the lowest point position and the highest point position of the code disk during the rotation of the cylindrical code disk along the rotation center axis, and the angle coding pattern set on the code disk can be used to determine the encoded images of the lowest point position and the highest point position in the multiple encoded images captured by the camera, and the height difference between the two lowest point positions and the highest point position can be calculated using the encoded images of the lowest point position and the highest point position, and the height difference is the displacement in the vertical direction. When no tilt occurs, there will be no displacement in the vertical direction. Therefore, the inclination angle of the angle encoder can be accurately obtained by performing inverse sine calculation using the displacement in the vertical direction and the diameter of the code disk.

[0040] Described below Figure 1 How the various steps are performed.

[0041] First, for step 300, while the cylindrical code disk of the angle encoder rotates along the rotation center axis, a plurality of coded images are acquired by using a camera; the rotation center axis is perpendicular to the shooting direction of the camera; an angle coding pattern is arranged on the circumference of the cylindrical code disk, and the coded image is formed by the camera shooting the angle coding pattern.

[0042] In the embodiment of the present invention, the angle encoder includes a cylindrical code disk and a camera. After the angle encoder is installed, the positions of the cylindrical code disk and the camera are fixed, and the rotation center axis is perpendicular to the shooting direction of the camera. If the center axis of the cylindrical code disk is the same as the rotation center axis, there is no tilt. If the center axis of the cylindrical code disk is different from the rotation center axis, there is tilt. Please refer to Figure 2 When the cylindrical code disk is tilted, when the cylindrical code disk rotates along the central axis of rotation, the camera can capture the coded images of the lowest point, the highest point, and each position between the lowest point and the highest point of the code disk. In order to ensure that the camera can capture the coded images of the lowest point and the highest point, the shooting interval can be reduced, and the coded images of the code disk that rotates for at least one circle can be captured.

[0043] It can be understood that the angle encoder is an instrument used to measure the rotation angle. Therefore, an angle coding pattern is arranged on the circumference of the cylindrical code disk. The camera captures the angle coding pattern to obtain a coded image, and then uses the angle coding rules to analyze the coded image to determine the current rotation angle of the angle encoder.

[0044] Then, with respect to step 102, deduplication processing is performed on the multiple coded images based on the angle coding patterns in the multiple coded images to obtain multiple coded images remaining after the deduplication processing.

[0045] Since the camera captures multiple coded images, and there are situations where multiple coded images are captured for the same position, in order to reduce repeated processing of the same coded image in the subsequent process and improve the efficiency of tilt angle measurement, the obtained multiple coded images can be deduplicated. In the embodiment of the present invention, since the angle coding patterns in different coded images are different, and the rotation angles corresponding to different angle coding patterns are different, the angle coding patterns included in the coded images can be used to deduplicate the multiple coded images, that is, if the angle coding patterns in two coded images are exactly the same, one of the coded images is deleted. In this way, the multiple coded images remaining after deduplication can be obtained for subsequent analysis.

[0046] Next, for step 104, based on the multiple coded images remaining after deduplication processing, a first coded image corresponding to the lowest point position and a second coded image corresponding to the highest point position of the cylindrical code disk during rotation are determined.

[0047] For the multiple coded images remaining after deduplication processing, how to determine which one is the first coded image corresponding to the lowest point position and which one is the second coded image corresponding to the highest point position, an embodiment of the present invention can use the angle coding pattern in the coded image for analysis.

[0048] In order to accurately obtain the first coded image and the second coded image, in the embodiment of the present invention, the angle coding pattern is coded and arranged in a two-dimensional arrangement, wherein the light and dark stripes are arranged alternately with equal distances in the horizontal direction, and a single stripe is divided into multiple stripe bits according to the number of bits in the vertical direction, and the number of stripe bits is equal to the number of bits. When the stripe bit is a light stripe, it corresponds to a different binary code when the stripe bit is a dark stripe. For example, the binary represented by the light stripe is 1, and the binary represented by the dark stripe is 0, or vice versa. In the embodiment of the present invention, if the number of binary bits is k, it can be set that only the dark stripe is divided into k equal parts according to the k-bit binary number in the vertical direction, so that a single dark stripe can obtain k stripe bits, and the light stripe is not divided equally in the vertical direction, and the light stripes are only distributed and arranged in the horizontal direction to increase the number of binary codes that can be expressed by the angle coding image. Assuming that n dark stripes are a group, a binary code of n*k bits can be formed, which can represent a unique angle value on an absolute angle encoder. Thus, more effective coding information can be read within a more limited field of view. According to the new coding arrangement method of the embodiment of the present invention, a dark stripe represents a k-bit binary number, and n stripes form a group, so there are n*k bits, and the total number of bits of a group of coding bits of the angle encoder is m=n*k.

[0049] In the embodiment of the present invention, the coded image includes a set number of stripes. Specifically, the coded image includes a first set number of stripes and each stripe includes a second set number of stripe positions. Figure 4 , is the coded image captured by the camera, which includes 9 dark stripes, and each dark stripe includes 5 stripe positions.

[0050] Each angle position on the cylindrical code disk can be represented by one and only one code value, and the code value corresponds to the absolute angle position one by one, and different positions will not correspond to the same code value. That is, when the camera captures a coded image, the corresponding code value can be determined based on the angle coding rules according to the angle coding pattern in the coded image, and then the corresponding rotation angle can be determined.

[0051] In one embodiment of the present invention, the first coded image corresponding to the lowest point position and the second coded image corresponding to the highest point position of the code disk during the rotation process can be determined by the following method. Figure 5 , the method comprising:

[0052] S1, determining the angle between the stripes in each coded image and the vertical direction;

[0053] S2, determine whether there is a coded image with an angle of 0 corresponding to the middle position stripe; if yes, execute step S3; if no, execute step S4;

[0054] S3, further determining the number of coded images with an angle of 0 corresponding to the stripes at the middle position;

[0055] If the number is two, determining whether the difference in the rotation angles corresponding to the two coded images is 180 degrees based on the angle coding rule; if so, determining that the two coded images are the first coded image and the second coded image, respectively;

[0056] If the number is one, the coded image is determined to be the first coded image or the second coded image, and based on the rotation angle corresponding to the one coded image, a coded image that differs from the rotation angle by 180 degrees is reacquired by using the camera, and the reacquired coded image is determined to be the second coded image or the first coded image;

[0057] S4. Acquire several coded images with the smallest angle, and based on the rotation angles corresponding to the several coded images, reacquire the coded images using the camera, and execute step S1 for the reacquired coded images until the first coded image and the second coded image are obtained.

[0058] In the embodiment of the present invention, after the angle encoder is installed, if the cylindrical code disk is not tilted, the stripes in the coded image are vertical, and the angle with the vertical direction is 0. If the cylindrical code disk is tilted, most of the stripes in the coded image have an angle with the vertical direction. Only when there are stripes in the coded image with an angle of 0 with the vertical direction, can it be indicated that the position corresponding to the coded image is the lowest point position / highest point position of the code disk, or the position is close to the lowest point position / highest point position. Therefore, it is necessary to determine the angle between the stripes in the coded image and the vertical direction.

[0059] It should be noted that, in order to improve accuracy, the first set number may be an odd number. The first set number may be the sum of the number of dark stripes and the number of bright stripes, or may be limited to the number of dark stripes only.

[0060] Specifically, when the angle corresponding to the middle position stripe in the encoded image is 0, it indicates that the position corresponding to the encoded image is the lowest point position / highest point position of the code disk. When the angle corresponding to the stripes in the encoded image is 0, or when the angle corresponding to the stripes in the encoded image is small, it can be indicated that the position corresponding to the encoded image is close to the lowest point position / highest point position.

[0061] In step S3, if there is a coded image with an angle of 0 corresponding to the stripes at the middle position among the multiple coded images, it can be determined that the coded image corresponds to the lowest point position or the highest point position. If the number of coded images with an angle of 0 corresponding to the stripes at the middle position is two, then if the difference between the angles corresponding to the two coded images is 180 degrees, it indicates that one of the two coded images is the first coded image and the other is the second coded image. If the number of coded images with an angle of 0 corresponding to the stripes at the middle position is one, it indicates that the coded image is the first coded image or the second coded image. It can be understood that the coding value corresponding to the coded image can be determined according to the angle coding rule, and then the rotation angle corresponding to the coded image can be determined, and the target rotation angle that differs from the rotation angle by 180 degrees can be determined. Then, based on the angle coding rule, the coding value corresponding to the target rotation angle is determined, and then the target angle coding pattern corresponding to the target rotation angle is obtained. The coded image corresponding to the target angle coding pattern captured by the camera is the second coded image or the first coded image.

[0062] In step S4, since there is no coded image with an angle of 0 corresponding to the stripe at the middle position in the multiple coded images, it indicates that the camera did not capture the coded images at the lowest point and the highest point in step 100, and therefore, it is necessary to use the camera to re-capture the coded images. In order to obtain the coded images at the lowest point and the highest point as quickly as possible, in the embodiment of the present invention, the rotation angles corresponding to the coded images with the smallest angles in the current multiple coded images can be used to assist the camera in re-capturing the coded images.

[0063] Specifically, when obtaining a plurality of coded images with the smallest angle, the method may include: determining the inclination direction of the stripes at the middle position in each coded image relative to the vertical direction, and for the coded images at two different inclination directions, selecting the coded images with the smallest angle between the stripes at the middle position and the vertical direction at the corresponding inclination directions;

[0064] Then, based on the rotation angles respectively corresponding to the several encoded images, using the camera to re-acquire the encoded images may include: taking the rotation angles respectively corresponding to two selected encoded images under different tilt directions as the two end points of the angle range, and using the camera to re-acquire multiple encoded images whose rotation angles are within the angle range.

[0065] For example, for the coded images under two different inclined directions, the coded images with the smallest angle between the middle position stripe and the vertical direction under the corresponding inclined directions are selected respectively, namely, coded image 1 and coded image 2, wherein the rotation angle corresponding to coded image 1 is 20°10', and the rotation angle corresponding to coded image 2 is 21°5', then the angle range is (20°10', 21°5'). It can be understood that the rotation angle of the coded image corresponding to the lowest point position or the highest point position is within the angle range. In this way, the camera can be used to re-acquire multiple coded images whose rotation angles are within the angle range, and then the re-acquired multiple coded images are used to execute step S1.

[0066] In one implementation, when using a camera to reacquire a plurality of coded images whose angles are within the angle range, the method may specifically include:

[0067] Determine an angle interval based on the angle range, and determine a plurality of rotation angles within the angle range using the angle interval;

[0068] An angle coding pattern corresponding to each of the plurality of rotation angles is determined based on an angle coding rule, and based on the angle coding pattern corresponding to each rotation angle, a coding image corresponding to the angle coding pattern is acquired using the camera.

[0069] If the first coded image or the second coded image still cannot be obtained from the multiple re-acquired coded images, the coded image shooting can continue using the re-determined angle range, and as the number of times the coded images are re-acquired increases, the angle interval can be gradually reduced, thereby increasing the acquisition speed of the first coded image and the second coded image.

[0070] It should be noted that, in addition to the above method, it is also possible to obtain several coded images with the smallest angle, regardless of the inclination direction of the middle position stripe relative to the vertical direction, and determine the rotation angles corresponding to the several coded images respectively. For two adjacent rotation angles, determine the angle difference between the two rotation angles, and determine the angle difference between the angles between the middle position stripe on the coded image corresponding to the two rotation angles and the vertical direction. Based on the corresponding relationship between the angle difference and the angle difference, the rotation angle corresponding to the lowest point position or the highest point position is determined.

[0071] Next, in step 106 , the vertical displacement of the angle encoder is calculated according to the first coded image and the second coded image.

[0072] After obtaining the first coded image and the second coded image, the displacement of the angle encoder in the vertical direction needs to be determined using the two coded images. In the embodiment of the present invention, the displacement can be determined at least in the following manner:

[0073] Step 1060: Determine a position sampling point pair based on the angle coding patterns in the first coded image and the second coded image; the position sampling point pair is composed of a first sampling point on the first coded image and a second sampling point on the second coded image;

[0074] Step 1062: Calculate the distance between each sampling point in the position sampling point pair and the horizontal edge line of the corresponding encoded image, and calculate the distance difference between the distances corresponding to the two sampling points in the position sampling point pair;

[0075] Step 1064: Determine the vertical displacement of the angle encoder according to the distance difference.

[0076] If the cylindrical code disk is not tilted, the distances between the stripes at the same stripe position in the two coded images (for example, the coded image includes 9 stripes, the same stripe position is the i-th, i=1,2,…,9) and the stripe positions at the same position (for example, a single stripe includes 20 stripe positions, the same position is the j-th, j=1,2,…,20) and the horizontal edge line of the corresponding coded image are equal. However, when tilted, the distances between the stripe positions at the same stripe position in the two coded images and the horizontal edge line of the corresponding coded image are not equal. In order to improve the accuracy of the calculation results, the position sampling point pair is the stripe positions at the same stripe position in the corresponding coded image.

[0077] In one implementation, the method for determining the position sampling point pair may specifically include:

[0078] Step 10600: taking stripes at the same stripe position in the first encoded image and the second encoded image as a stripe pair;

[0079] Step 10602: Determine the positions of the stripe bits contained in each stripe in the stripe pair, and take the stripe bits corresponding to the same position in the stripe pair as a stripe bit pair;

[0080] Step 10604: Select a sampling point from each stripe position in the stripe position pair to obtain a position sampling point pair.

[0081] In order to further improve the accuracy of the calculation results, when selecting the position sampling pair, the same stripe position is the middle position.

[0082] Please refer to Figure 6, is a schematic diagram of the first coded image and the second coded image. In the figure, three dark stripes, each of which includes 5 stripe positions, are taken as an example, and the stripes in the middle position are selected as stripe pairs. When determining the positions corresponding to the stripe positions contained in each stripe in the stripe pair, the stripe positions in the coded image can be determined based on all the angle coding patterns set on the stored code disk. Assume that the first coded image includes the stripe positions of the 5th, 6th, 7th, 8th, and 9th positions, and the second coded image includes part of the stripe position of the 5th position, the stripe positions of the 6th, 7th, 8th, and 9th positions, and part of the stripe position of the 10th position. When selecting the stripe position pair, the stripe positions of the 6th, 7th, 8th, and 9th positions can be selected as the stripe position pair. For example, the stripe position of the 6th position is selected as the stripe position pair, and the sampling points A1 and A2 are selected as the position sampling point pair.

[0083] Preferably, the two sampling points in the position sampling point pair are equidistant from the vertical edge of the corresponding coded image, that is, the sampling points are located at equal positions of L12 and L22.

[0084] Since the sampling points may be inaccurate if the positions inside the stripe are selected as sampling points, it is more preferred to select sampling points on the same horizontal edge line of the stripe positions of the same position. The horizontal edge line is the intersection line of two adjacent stripe positions. For example, point A1 and point A2 are located on the intersection line of the 6th stripe position and the 7th stripe position, and point B1 and point B2 are located on the intersection line of the 7th stripe position and the 8th stripe position.

[0085] Considering the contrast between the bright and dark stripes, it is further preferred that the same horizontal edge line of the stripes of the same order is the intersection line between the bright stripe and the dark stripe, wherein point A1 and point A2 are located on the intersection line between the bright stripe and the dark stripe.

[0086] After obtaining the position sampling point pair, calculate the distance between each sampling point and the horizontal edge line of the corresponding coded image, that is, distance L11 and distance L21, and then calculate the distance difference |L11-L21|. Since the coded image captured by the camera is a virtual image, it is also necessary to convert the distance difference corresponding to the coded image into an actual displacement based on the height of a single stripe, the magnification of the camera, the physical size of the unit pixel, etc.

[0087] In one embodiment of the present invention, in order to improve the accuracy of the calculation result, there may be multiple pairs of position sampling points to calculate the average of multiple distance differences, and determine the displacement in the vertical direction according to the average of the multiple distance differences.

[0088] Finally, the displacement and the diameter of the cylindrical code disk are used to perform an arcsine calculation to obtain the tilt angle of the angle encoder.

[0089] Furthermore, after the tilt angle of the angle encoder is obtained, the tilt angle can be used to compensate the measured rotation angle.

[0090] In an embodiment of the present invention, after the angle encoder is installed and used for a period of time, the tilt angle may change, so it is necessary to measure the tilt angle once every period of time. Each measurement can be performed using the measurement method provided by the embodiment of the present invention. This method does not require the aid of external equipment, but only requires the use of the existing code disk and camera of the angle encoder to quickly obtain the measurement result of the tilt angle, and then use each measurement result to compensate for the rotation angle, thereby ensuring the accuracy of the rotation angle measured by the angle encoder.

[0091] like Figure 7 , Figure 8 As shown, an embodiment of the present invention provides a device for measuring the tilt angle of an angle encoder. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. From the hardware level, Figure 7 As shown in FIG. 1 , a hardware architecture diagram of an electronic device in which an inclination angle measuring device of an angle encoder provided by an embodiment of the present invention is located is shown in FIG. Figure 7 In addition to the processor, memory, network interface, and non-volatile memory shown, the electronic device in the embodiment may also include other hardware, such as a forwarding chip responsible for processing messages, etc. Taking software implementation as an example, Figure 8 As shown, as a device in a logical sense, the CPU of the electronic device in which it is located reads the corresponding computer program in the non-volatile memory into the internal memory and runs it. This embodiment provides an inclination angle measuring device of an angle encoder, including:

[0092] The image acquisition unit 801 is used to acquire a plurality of coded images by using a camera when the cylindrical code disk of the angle encoder rotates along the rotation center axis; the rotation center axis is perpendicular to the shooting direction of the camera; an angle coding pattern is arranged on the circumference of the cylindrical code disk, and the coded image is formed by the camera shooting the angle coding pattern;

[0093] A deduplication processing unit 802 is configured to perform deduplication processing on the multiple coded images based on the angle coding patterns in the multiple coded images to obtain multiple coded images remaining after the deduplication processing;

[0094] An image determination unit 803 is used to determine, based on the multiple coded images remaining after deduplication processing, a first coded image corresponding to the lowest point position and a second coded image corresponding to the highest point position of the cylindrical code disk during rotation;

[0095] a displacement calculation unit 804, configured to calculate a displacement of the angle encoder in a vertical direction according to the first encoded image and the second encoded image;

[0096] The angle calculation unit 805 is used to perform an arcsine calculation using the displacement and the diameter of the cylindrical code disk to obtain the tilt angle of the angle encoder.

[0097] In one embodiment of the present invention, the angle coding pattern is coded and arranged in a two-dimensional arrangement, wherein light and dark stripes are arranged alternately with equal distances in the horizontal direction, and a single stripe is divided into a plurality of stripe bits in the vertical direction according to the number of bits, the number of stripe bits is equal to the number of bits, and the binary codes corresponding to the stripe bits when the stripe bits are light stripes and when the stripe bits are dark stripes are different; the coded image includes a first set number of stripes and each stripe includes a second set number of stripe bits;

[0098] The image determination unit is specifically configured to perform the following steps:

[0099] S1, determining the angle between the stripes in each coded image and the vertical direction;

[0100] S2, determine whether there is a coded image with an angle of 0 corresponding to the middle position stripe; if yes, execute step S3; if no, execute step S4;

[0101] S3, further determining the number of coded images with an angle of 0 corresponding to the stripes at the middle position;

[0102] If the number is two, determining whether the difference in the rotation angles corresponding to the two coded images is 180 degrees based on the angle coding rule; if so, determining that the two coded images are the first coded image and the second coded image, respectively;

[0103] If the number is one, the coded image is determined to be the first coded image or the second coded image, and based on the rotation angle corresponding to the one coded image, a coded image that differs from the rotation angle by 180 degrees is reacquired by using the camera, and the reacquired coded image is determined to be the second coded image or the first coded image;

[0104] S4. Acquire several coded images with the smallest angle, and based on the rotation angles corresponding to the several coded images, reacquire the coded images using the camera, and execute step S1 for the reacquired coded images until the first coded image and the second coded image are obtained.

[0105] In one embodiment of the present invention, when the image determination unit acquires a plurality of coded images with the smallest angle, the steps specifically include: determining the inclination direction of the stripes at the middle position in each coded image relative to the vertical direction, and for the coded images at two different inclination directions, selecting the coded images with the smallest angle between the stripes at the middle position and the vertical direction at the corresponding inclination directions;

[0106] When the image determination unit uses the camera to reacquire the encoded image based on the rotation angles respectively corresponding to the several encoded images, it specifically includes: taking the rotation angles respectively corresponding to two selected encoded images under different tilt directions as the two end points of the angle range, and using the camera to reacquire multiple encoded images whose rotation angles are within the angle range.

[0107] In one embodiment of the present invention, when the image determination unit uses a camera to reacquire multiple encoded images whose rotation angles are within the angle range, it specifically includes: determining an angle interval based on the angle range, and using the angle interval to determine a number of rotation angles within the angle range; determining an angle coding pattern corresponding to each of the several rotation angles based on an angle coding rule, and based on the angle coding pattern corresponding to each rotation angle, using the camera to acquire an encoded image of the corresponding angle coding pattern.

[0108] In one embodiment of the present invention, the displacement calculation unit is specifically used to:

[0109] Based on the angle coding patterns in the first coded image and the second coded image, a position sampling point pair is determined; the position sampling point pair is composed of a first sampling point on the first coded image and a second sampling point on the second coded image; the distance between each sampling point in the position sampling point pair and the horizontal edge line of the corresponding coded image is calculated, and the distance difference between the distances corresponding to the two sampling points in the position sampling point pair is calculated; and the displacement of the angle encoder in the vertical direction is determined according to the distance difference.

[0110] In one embodiment of the present invention, when the displacement calculation unit determines the position sampling point pair based on the angle coding patterns in the first coded image and the second coded image, the displacement calculation unit specifically includes:

[0111] The stripes at the same stripe position in the first encoded image and the second encoded image are taken as a stripe pair; the positions corresponding to the stripe positions contained in each stripe in the stripe pair are determined, and the stripe positions corresponding to the same positions in the stripe pair are taken as a stripe position pair; a sampling point is selected from each stripe position in the stripe position pair to obtain a position sampling point pair.

[0112] In one embodiment of the present invention, sampling points are taken on the same horizontal edge line of stripe positions of the same rank, and the two sampling points in the position sampling point pair are equidistant from the vertical edge of the corresponding encoded image.

[0113] In one embodiment of the present invention, the same horizontal edge line of the stripe positions of the same rank is the intersection line between the bright stripe position and the dark stripe position.

[0114] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the inclination angle measuring device of an angle encoder. In other embodiments of the present invention, the inclination angle measuring device of an angle encoder may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0115] The information interaction, execution process and other contents between the modules in the above-mentioned device are based on the same concept as the embodiment of the method of the present invention. For specific contents, please refer to the description in the embodiment of the method of the present invention, and no further description is given here.

[0116] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, a method for measuring the inclination angle of an angle encoder in any embodiment of the present invention is implemented.

[0117] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor executes a method for measuring the inclination angle of an angle encoder in any embodiment of the present invention.

[0118] Specifically, a system or device equipped with a storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer (or CPU or MPU) of the system or device can read and execute the program code stored in the storage medium.

[0119] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0120] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0121] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0122] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or to a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0123] It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical factors in the process, method, article or device including the elements.

[0124] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0125] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for measuring the inclination angle of an angle encoder, characterized in that: include: When the cylindrical code disk of the angle encoder rotates along the rotation center axis, a plurality of code images are acquired by using a camera; The rotation center axis is perpendicular to the shooting direction of the camera; an angle coding pattern is arranged on the circumference of the cylindrical code disk, and the coding image is formed by the camera shooting the angle coding pattern; Deduplication processing is performed on the plurality of coded images based on angle coding patterns in the plurality of coded images to obtain a plurality of coded images remaining after deduplication processing; Based on the multiple coded images remaining after deduplication processing, determine a first coded image corresponding to the lowest point position and a second coded image corresponding to the highest point position of the cylindrical code disk during rotation; Calculating a displacement of an angle encoder in a vertical direction according to the first coded image and the second coded image; Performing an arcsine calculation using the displacement and the diameter of the cylindrical code disk to obtain a tilt angle of the angle encoder; The angle coding pattern is coded and arranged in a two-dimensional arrangement, wherein light and dark stripes are arranged alternately with equal distances in the horizontal direction, and a single stripe is divided into a plurality of stripe bits in the vertical direction according to the number of bits, the number of stripe bits is equal to the number of bits, and the binary codes corresponding to the stripe bits when the stripe bits are light stripes and when the stripe bits are dark stripes are different; the coded image includes a first set number of stripes and each stripe includes a second set number of stripe bits; The step of determining a first coded image corresponding to the lowest point position and a second coded image corresponding to the highest point position of the code disk during rotation includes: S1, determining the angle between the stripes in each coded image and the vertical direction; S2, determine whether there is a coded image with an angle of 0 corresponding to the middle position stripe; if yes, execute step S3; if no, execute step S4; S3, further determining the number of coded images with an angle of 0 corresponding to the stripes at the middle position; If the number is two, determining whether the difference in the rotation angles corresponding to the two coded images is 180 degrees based on the angle coding rule; if so, determining that the two coded images are the first coded image and the second coded image, respectively; If the number is one, the coded image is determined to be the first coded image or the second coded image, and based on the rotation angle corresponding to the one coded image, a coded image that differs from the rotation angle by 180 degrees is reacquired by using the camera, and the reacquired coded image is determined to be the second coded image or the first coded image; S4, obtaining a plurality of coded images with the smallest angle, and based on the rotation angles respectively corresponding to the plurality of coded images, re-acquire the coded images using the camera, and execute step S1 for the re-acquired coded images until the first coded image and the second coded image are obtained; The method of calculating the displacement of the angle encoder in the vertical direction according to the first encoded image and the second encoded image includes: determining a position sampling point pair based on the angle encoding patterns in the first encoded image and the second encoded image; the position sampling point pair is composed of a first sampling point on the first encoded image and a second sampling point on the second encoded image; calculating the distance between each sampling point in the position sampling point pair and the horizontal edge line of the corresponding encoded image, and calculating the distance difference between the distances corresponding to the two sampling points in the position sampling point pair; and determining the displacement of the angle encoder in the vertical direction according to the distance difference.

2. The method according to claim 1, characterized in that The obtaining of the plurality of coded images with the smallest angle comprises: determining the inclination direction of the stripes at the middle position in each coded image relative to the vertical direction, and for the coded images at two different inclination directions, selecting the coded images with the smallest angle between the stripes at the middle position and the vertical direction at the corresponding inclination directions; The method of reacquiring the coded images using the camera based on the rotation angles respectively corresponding to the multiple coded images includes: taking the rotation angles respectively corresponding to two selected coded images under different tilt directions as the two end points of the angle range, and reacquiring the multiple coded images whose rotation angles are within the angle range using the camera.

3. The method according to claim 2, characterized in that The method of reacquiring a plurality of coded images whose rotation angles are within the angle range by using a camera comprises: Determine an angle interval based on the angle range, and determine a plurality of rotation angles within the angle range using the angle interval; An angle coding pattern corresponding to each of the plurality of rotation angles is determined based on an angle coding rule, and based on the angle coding pattern corresponding to each rotation angle, a coding image corresponding to the angle coding pattern is acquired using the camera.

4. The method according to claim 1, characterized in that: The determining of the position sampling point pairs based on the angle coding patterns in the first coded image and the second coded image comprises: taking the stripes at the same stripe position in the first coded image and the second coded image as a stripe pair; Determine the positions of the stripe bits contained in each stripe in the stripe pair, and take the stripe bits corresponding to the same position in the stripe pair as a stripe bit pair; A sampling point is selected from each stripe position in the stripe position pair to obtain a position sampling point pair.

5. The method according to claim 4, characterized in that Sampling points are taken on the same horizontal edge line of the stripe position of the same order, and the two sampling points in the position sampling point pair are equidistant from the vertical edge of the corresponding encoded image.

6. The method according to claim 5, characterized in that The same horizontal edge line of the stripe positions of the same order is the intersection line between the bright stripe position and the dark stripe position.

7. An inclination angle measuring device of an angle encoder, characterized in that: include: An image acquisition unit, used to acquire a plurality of encoded images using a camera during the process of the cylindrical code disk of the angle encoder rotating along the rotation center axis; The rotation center axis is perpendicular to the shooting direction of the camera; an angle coding pattern is arranged on the circumference of the cylindrical code disk, and the coding image is formed by the camera shooting the angle coding pattern; a deduplication processing unit, configured to perform deduplication processing on the plurality of coded images based on the angle coding patterns in the plurality of coded images, to obtain a plurality of coded images remaining after the deduplication processing; An image determination unit, configured to determine, based on the plurality of coded images remaining after deduplication processing, a first coded image corresponding to the lowest point position and a second coded image corresponding to the highest point position of the cylindrical code disk during rotation; a displacement calculation unit, configured to calculate a displacement of the angle encoder in a vertical direction according to the first encoded image and the second encoded image; An angle calculation unit, used to perform an arcsine calculation using the displacement and the diameter of the cylindrical code disk to obtain a tilt angle of the angle encoder; The angle coding pattern is coded and arranged in a two-dimensional arrangement, wherein light and dark stripes are arranged alternately with equal distances in the horizontal direction, and a single stripe is divided into a plurality of stripe bits in the vertical direction according to the number of bits, the number of stripe bits is equal to the number of bits, and the binary codes corresponding to the stripe bits when the stripe bits are light stripes and when the stripe bits are dark stripes are different; the coded image includes a first set number of stripes and each stripe includes a second set number of stripe bits; The image determination unit is specifically configured to perform the following steps: S1, determining the angle between the stripes in each coded image and the vertical direction; S2, determine whether there is a coded image with an angle of 0 corresponding to the middle position stripe; if yes, execute step S3; if no, execute step S4; S3, further determining the number of coded images with an angle of 0 corresponding to the stripes at the middle position; If the number is two, determining whether the difference in the rotation angles corresponding to the two coded images is 180 degrees based on the angle coding rule; if so, determining that the two coded images are the first coded image and the second coded image, respectively; If the number is one, the coded image is determined to be the first coded image or the second coded image, and based on the rotation angle corresponding to the one coded image, a coded image that differs from the rotation angle by 180 degrees is reacquired by using the camera, and the reacquired coded image is determined to be the second coded image or the first coded image; S4, obtaining a plurality of coded images with the smallest angle, and based on the rotation angles respectively corresponding to the plurality of coded images, re-acquire the coded images using the camera, and execute step S1 for the re-acquired coded images until the first coded image and the second coded image are obtained; The displacement calculation unit is specifically used to: determine a position sampling point pair based on the angle coding patterns in the first coded image and the second coded image; the position sampling point pair is composed of a first sampling point on the first coded image and a second sampling point on the second coded image; calculate the distance between each sampling point in the position sampling point pair and the horizontal edge line of the corresponding coded image, and calculate the distance difference between the distances corresponding to the two sampling points in the position sampling point pair; and determine the displacement of the angle encoder in the vertical direction according to the distance difference.

8. The device according to claim 7, characterized in that When the image determination unit acquires a plurality of coded images with the smallest angle, the image determination unit specifically includes: determining the inclination direction of the stripes at the middle position in each coded image relative to the vertical direction, and for the coded images at two different inclination directions, selecting the coded images with the smallest angle between the stripes at the middle position and the vertical direction at the corresponding inclination directions; When the image determination unit uses the camera to reacquire the encoded image based on the rotation angles respectively corresponding to the several encoded images, it specifically includes: taking the rotation angles respectively corresponding to two selected encoded images under different tilt directions as the two end points of the angle range, and using the camera to reacquire multiple encoded images whose rotation angles are within the angle range.

9. The device according to claim 8, characterized in that When the image determination unit uses a camera to reacquire multiple encoded images whose rotation angles are within the angle range, it specifically includes: determining an angle interval based on the angle range, and using the angle interval to determine a number of rotation angles within the angle range; determining an angle coding pattern corresponding to each of the several rotation angles based on an angle coding rule, and based on the angle coding pattern corresponding to each rotation angle, using the camera to acquire an encoded image of the corresponding angle coding pattern.

10. The device according to claim 7, characterized in that When the displacement calculation unit determines the position sampling point pair based on the angle coding patterns in the first coded image and the second coded image, the displacement calculation unit specifically includes: The stripes at the same stripe position in the first encoded image and the second encoded image are taken as a stripe pair; the positions corresponding to the stripe positions contained in each stripe in the stripe pair are determined, and the stripe positions corresponding to the same positions in the stripe pair are taken as a stripe position pair; a sampling point is selected from each stripe position in the stripe position pair to obtain a position sampling point pair.

11. The device according to claim 10, characterized in that Sampling points are taken on the same horizontal edge line of the stripe position of the same order, and the two sampling points in the position sampling point pair are equidistant from the vertical edge of the corresponding encoded image.

12. The device according to claim 11, characterized in that The same horizontal edge line of the stripe positions of the same order is the intersection line between the bright stripe position and the dark stripe position.

13. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Five-degree-of-freedom measurement system and method based on two-dimensional absolute grating

    CN114413763A

  • High-precision photoelectric angular displacement sensor, encoding method and measuring method

    CN117387528A