Encoder precision compensation method, encoder and computer readable storage medium
By introducing auxiliary reading heads into the encoder, using the data of the circular grating and auxiliary reading head for accuracy compensation, the problem that existing encoders are difficult to achieve accuracy in high-precision requirements scenarios is solved, and the simplification and reliability of encoder accuracy compensation is achieved.
Patent Information
- Application Number
- CN202411990912.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-18
AI Technical Summary
Existing encoders are difficult to meet the accuracy requirements in scenarios with high accuracy requirements, and require external reference equipment and complex operating rotary tables to compensate for accuracy, which is cumbersome to install and operate.
By introducing an auxiliary reading head into the encoder, the accuracy compensation is performed using the angle data of the circular grating and the data of the auxiliary reading head, the angle data of the main reading head is adjusted to achieve accuracy compensation, and the auxiliary reading head can be removed after the compensation is completed.
It realizes the simplification and reliability of encoder accuracy compensation, eliminates system errors caused by eccentricity or end face jumps, has a large adaptation range and a simple device structure.
Smart Images

Figure CN119845326A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of encoders, and in particular relates to an encoder accuracy compensation method, an encoder and a computer-readable storage medium. Background Art
[0002] At a time when encoder technology is widely and deeply used, accuracy is a key indicator for measuring encoder performance, and its importance is self-evident. Encoders play a vital role in many fields, such as industrial automation, aerospace, and precision instrument manufacturing. However, in actual use, the accuracy of encoders is often difficult to meet the accuracy requirements of certain extreme or high-precision scenarios, and accuracy compensation is required. Common accuracy compensation solutions all require external reference equipment and corresponding operating turntables, which are cumbersome to install and operate. Summary of the invention
[0003] In view of this, the present invention aims to provide an encoder accuracy compensation method, an encoder and a computer-readable storage medium, which do not require the setting of an external reference device and a corresponding operating turntable, and the device structure required for implementing the encoder accuracy compensation method is simple and reliable.
[0004] To achieve the above object, the technical solution created by the present invention is implemented as follows: An encoder accuracy compensation method is applied to an encoder, wherein the encoder comprises a circular grating, a main reading head and an auxiliary reading head; the main reading head and the auxiliary reading head are detachably assembled to an external fixed structure of a device to be tested, and the circular grating is assembled to an external rotating structure of the device to be tested; the main reading head and the auxiliary reading head are arranged relative to each other at 180 degrees; the accuracy compensation method comprises: Every time the circular grating rotates a set angle, the first angle data of the main reading head and the second angle data of the auxiliary reading head are collected as a set of data; Determine the reference angle data corresponding to each set of data according to the first angle data and the second angle data in each set of data; Determine the error value corresponding to each set of data according to the first angle data and the corresponding reference angle data in each set of data; and The angle data of the main reading head is adjusted by the matching relationship between the error value corresponding to each set of data and the angle position of the circular grating corresponding to each set of data.
[0005] Furthermore, the angle is set to 2°~25°.
[0006] Further, according to the first angle data and the second angle data in each group of data, the reference angle data corresponding to each group of data is determined, including: The average value of the first angle data and the second angle data in each set of data is taken as the reference angle data corresponding to each set of data.
[0007] Further, according to the first angle data and the corresponding reference angle data in each set of data, the error value corresponding to each set of data is determined, including: The first angle data in each set of data is subtracted from the corresponding reference angle data to determine the error value corresponding to each set of data.
[0008] Further, the angle data of the main reading head is adjusted by matching the error value corresponding to each set of data with the angle position of the circular grating corresponding to each set of data, including: Determine the coordinate points in the coordinate system where the error value corresponding to each set of data and the angular position of the circular grating corresponding to each set of data match; Obtain multiple coordinate points to form a relationship curve; According to the relationship curve, adjust the angle data of the main reading head.
[0009] Further, according to the relationship curve, the angle data of the main reading head is adjusted, including: According to the relationship curve, determine the straight line equation of each two adjacent coordinate points; According to the equation of the straight line, the error value corresponding to the angular position of the circular grating at any point on the equation of the straight line can be determined; Based on the error value corresponding to the angular position of the circular grating at any point on the straight line equation, the angular data of the main reading head is adjusted.
[0010] An encoder comprises: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the encoder is running, the processor and the memory communicate via the bus, and the machine-readable instructions are executed by the processor to execute the steps of the encoder accuracy compensation method as described above.
[0011] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the encoder accuracy compensation method described above are executed.
[0012] Compared with the prior art, the invention can achieve the following beneficial effects: the encoder of the invention uses an auxiliary reading head to compensate the accuracy of the main reading head, and the auxiliary reading head can be removed after the accuracy compensation is completed, so that the system error caused by the eccentricity of the circular grating or the end face runout can be effectively eliminated, and the effect of eliminating the system error is good. In this way, there is no need to set up an external reference device and a corresponding operating turntable, and the device structure required for the encoder accuracy compensation method is simple and reliable. At the same time, auxiliary reading heads of different shapes can be flexibly adopted, and the adaptation range is large. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings constituting part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments and descriptions of the present invention are used to explain the present invention and do not constitute an improper limitation on the present invention. In the drawings: Figure 1 A partial schematic diagram of an encoder according to an embodiment of the present invention; Figure 2 A flowchart of the encoder accuracy compensation method described in an embodiment of the present invention; Figure 3 A sub-flow chart of the encoder accuracy compensation method described in the embodiment of the present invention; Figure 4 A sub-flow chart of the encoder accuracy compensation method described in the embodiment of the present invention is created.
[0014] Description of reference numerals: Encoder 10; circular grating 11; main reading head 12; auxiliary reading head 13. DETAILED DESCRIPTION
[0015] In order to make the purpose, technical scheme and advantages of the invention clearer, the invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the invention and do not constitute a limitation to the invention. Similar components in different embodiments use associated similar component numbers. In the following embodiments, many detailed descriptions are to enable the invention to be better understood. However, those skilled in the art can easily recognize that some of the features can be omitted in different situations, or can be replaced by other components, materials, and methods. In some cases, some operations related to the invention are not shown or described in the specification, in order to avoid the core part of the invention being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0016] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other to form various implementation methods. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a necessary sequence, unless otherwise specified that a certain sequence must be followed.
[0017] In the description of the invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of the invention, unless otherwise specified, the meaning of "multiple" is two or more.
[0018] In the description of the invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the invention can be understood according to specific circumstances.
[0019] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments.
[0020] See also Figure 1 and Figure 2As shown, an embodiment of the present invention provides an encoder accuracy compensation method, which is applied to an encoder 10. The encoder 10 can be a reflective encoder or a transmissive encoder, which is not limited by the present invention. The encoder 10 includes a circular grating 11, a main reading head 12 and an auxiliary reading head 13. The main reading head 12 and the auxiliary reading head 13 are detachably assembled to the fixed structure of the device to be tested by bolts. The device to be tested is a device that detects the position using the encoder 10. In this way, the auxiliary reading head 13 can be disassembled after the encoder accuracy compensation is completed. The type and specification of the auxiliary reading head can be flexibly selected according to different application scenarios and accuracy requirements to achieve the best compensation effect, so that the encoder accuracy compensation method has high flexibility and wide adaptability. The circular grating 11 is assembled to the external rotating structure of the device to be tested, and the external rotating structure can drive the circular grating 11 to rotate. When the encoder 10 is assembled to the motor, the main reading head 12 and the auxiliary reading head 13 can be detachably assembled to the stator of the motor, and the circular grating 11 can be assembled to the rotor of the motor. The main reading head 12 and the auxiliary reading head 13 are arranged at 180 degrees relative to the rotating shaft of the motor. The encoder accuracy compensation method includes steps S100 to S400.
[0021] In step S100, each time the circular grating 11 rotates a set angle, the first angle data of the main reading head 12 and the second angle data of the auxiliary reading head 13 are collected as a set of data. Until the circular grating 11 rotates 360°, multiple sets of data are obtained. In one embodiment, the set angle is 2° to 25°. The set angle can be 11.25°, or 15°, etc., which is not limited by the present invention.
[0022] The circular grating 11 rotates from the first angle position to the second angle position at a set angle. When the circular grating 11 is at the second angle position, the first angle data of the main reading head 12 and the second angle data of the auxiliary reading head 13 can be collected as a set of data. The angle position of the circular grating 11 can be determined by acquiring the angle data of the main reading head 12 in real time. When the angle data of the main reading head reaches the angle data corresponding to the second angle position, the circular grating 11 stops rotating, and the first angle data of the current main reading head 12 and the second angle data of the auxiliary reading head 13 are collected as a set of data. The circular grating 11 can rotate multiple times, and multiple sets of data can be collected during this process.
[0023] In step S200, the reference angle data corresponding to each set of data is determined according to the first angle data and the second angle data in each set of data. That is, one set of data corresponds to one reference angle data. For example, when the circular grating 11 is at the first angle position, the data set Corresponding reference angle data When the circular grating 11 is at the second angular position, the data set Corresponding reference angle data , ..., when the circular grating 11 is at the nth angular position, the data set Corresponding reference angle data .
[0024] In one embodiment, step S200 includes: taking the average of the first angle data and the second angle data in each set of data as the reference angle data corresponding to each set of data. The first angle data and the second angle data in each set of data can be taken, and the sum of the two can be divided by 2 to obtain the reference angle data corresponding to each set of data. For example, take the data set The first angle data in and second angle data , determine the reference angle data corresponding to each set of data through the following equation : .
[0025] In step S300, the error value corresponding to each set of data is determined according to the first angle data and the corresponding reference angle data in each set of data. That is, one first angle data corresponds to one error value. For example, when the circular grating 11 is at the first angle position, the first angle data Corresponding error value When the circular grating 11 is at the second angle position, the first angle data Corresponding error value , ..., when the circular grating 11 is at the nth angle position, the first angle data Corresponding error value .
[0026] In one embodiment, step S300 includes: subtracting the first angle data in each set of data from the corresponding reference angle data to determine the error value corresponding to each set of data. The first angle data in each set of data may be subtracted from the corresponding reference angle data to determine the error value corresponding to each set of data. For example, the data group The first angle data in and the corresponding data set Base angle data , the corresponding error value is determined by the following equation : .in, Can be either positive or negative.
[0027] In step S400, the angle data of the main reading head 12 is adjusted by the matching relationship between the error value corresponding to each set of data and the angle position of the circular grating 11 corresponding to each set of data. In this way, the auxiliary reading head 13 can be used to perform accuracy compensation on the main reading head 12, and the auxiliary reading head 13 can be removed after the encoder accuracy compensation is completed, so that the system error caused by the eccentricity of the circular grating 11 or the end face runout can be effectively eliminated, and the effect of eliminating the system error is good. In this way, there is no need to set up an external reference device and a corresponding operating turntable, and the device structure required for the encoder accuracy compensation method is simple and reliable. At the same time, auxiliary reading heads 13 of different shapes can also be flexibly adopted, and the adaptation range is large. It provides great convenience for the installation and maintenance of the encoder 10.
[0028] See also Figure 3 As shown, in one embodiment, step S400 includes steps S410 to S430.
[0029] In step S410, the coordinate points of the error value corresponding to each set of data and the angular position of the circular grating 11 corresponding to each set of data in the coordinate system are determined. A coordinate system can be established based on the error value and the angular position of the circular grating 11, wherein one of the error value and the angular position of the circular grating 11 is the horizontal coordinate and the other is the vertical coordinate. The error value corresponding to each set of data and the angular position of the circular grating 11 are determined, and the matching coordinate points are marked in the coordinate system. For example, coordinate point 1 (first angular position, )、Coordinate point 2 (second angle position, ), ..., coordinate point n (nth angle position, ).
[0030] In step S420, multiple coordinate points are obtained to form a relationship curve. The multiple coordinate points can be connected in sequence to form a relationship curve. For example, coordinate point 1 and coordinate point 2 are connected, coordinate point 2 and coordinate point 3 are connected, ..., coordinate point n-1 and coordinate point n are connected, so as to finally form a relationship curve between the error value and the angular position of the circular grating.
[0031] In step S430, according to the relationship curve, the angle data of the main reading head 12 is adjusted. The relationship curve can be input into the main reading head 12 to adjust the angle data of the main reading head 12, thereby performing accuracy compensation.
[0032] See also Figure 4 As shown, in one embodiment, step S430 includes S431 to S433.
[0033] In step S431, the equation of the line connecting each two adjacent coordinate points is determined according to the relationship curve. For example, the equation of the line connecting coordinate point 1 and coordinate point 2, the equation of the line connecting coordinate point 2 and coordinate point 3, ..., the equation of the line connecting coordinate point n-1 and coordinate point n are determined, and multiple equations of the line are obtained.
[0034] In step S432, the error value corresponding to the angular position of the circular grating 11 at any point on the linear equation can be determined based on the linear equation. For example, based on the linear equation of the line connecting coordinate point 1 and coordinate point 2, the error value corresponding to the angular position of the circular grating 11 at any point between coordinate point 1 and coordinate point 2 can be determined. In this way, the error value corresponding to the angular position of the circular grating 11 at any point on the relationship curve can be determined based on multiple linear equations, and the method of determining the error value is more reasonable and accurate.
[0035] In step S433, based on the error value corresponding to the angle position of the circular grating at any point on the straight line equation, the angle data of the main reading head 12 is adjusted. The corresponding error value can be added to the angle data of the main reading head 12 at each angle position of the circular grating 11, and the corresponding corrected angle data of the main reading head 12 can be obtained to achieve accuracy compensation.
[0036] The embodiment of the present invention further provides an encoder 10, which includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the encoder 10 is running, the processor and the memory communicate through the bus, and the processor executes various functional applications and data processing by running the program stored in the memory, such as implementing the encoder accuracy compensation method provided by the embodiment of the present invention. When the machine-readable instructions are executed by the processor, the steps of the encoder accuracy compensation method as described above are executed.
[0037] The embodiment of the present invention further provides a computer-readable storage medium, which can adopt any combination of one or more computer-readable media. When the computer program is executed by a processor, the steps of the encoder accuracy compensation method described above are executed.
[0038] A computer-readable storage medium may be a computer-readable signal medium or a computer-readable storage medium. More specific examples of computer-readable storage media include: an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0039] The program code included in the computer-readable storage medium can be transmitted with any appropriate medium, including but not limited to wireless, electric wire, optical cable, RF, etc., or any suitable combination of the above. The computer program code for performing the operation of the present invention can be written in one or more programming languages or their combination, and the programming language includes object-oriented programming languages such as Java, Smalltalk, C++, and also includes conventional procedural programming languages-such as "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer by any type of network including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect to the Internet).
[0040] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the disclosure of the present invention can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.
[0041] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for compensating encoder accuracy, characterized in that: Applied to an encoder, the encoder comprises a circular grating, a main reading head and an auxiliary reading head; the main reading head and the auxiliary reading head are detachably assembled to an external fixed structure of a device to be tested, and the circular grating is assembled to an external rotating structure of the device to be tested; The main reading head and the auxiliary reading head are arranged 180° relative to each other; the accuracy compensation method includes: Every time the circular grating rotates a set angle, first angle data of the main reading head and second angle data of the auxiliary reading head are collected as a set of data; Determine reference angle data corresponding to each set of data according to the first angle data and the second angle data in each set of data; Determine the error value corresponding to each set of data according to the first angle data and the corresponding reference angle data in each set of data; and The angle data of the main reading head is adjusted by the matching relationship between the error value corresponding to each set of data and the angle position of the circular grating corresponding to each set of data.
2. The encoder accuracy compensation method according to claim 1, characterized in that: The setting angle is 2°~25°.
3. The encoder accuracy compensation method according to claim 1, characterized in that: The determining, according to the first angle data and the second angle data in each group of data, the reference angle data corresponding to each group of data comprises: An average value of the first angle data and the second angle data in each set of data is taken as the reference angle data corresponding to each set of data.
4. The encoder accuracy compensation method according to claim 1, characterized in that: The step of determining the error value corresponding to each set of data according to the first angle data and the corresponding reference angle data in each set of data comprises: The first angle data in each set of data is subtracted from the corresponding reference angle data to determine the error value corresponding to each set of data.
5. The encoder accuracy compensation method according to claim 1, characterized in that: The adjusting the angle data of the main reading head by the matching relationship between the error value corresponding to each set of data and the angle position of the circular grating corresponding to each set of data comprises: Determine the coordinate points in the coordinate system where the error value corresponding to each set of data and the angular position of the circular grating corresponding to each set of data match; Acquire a plurality of the coordinate points to form a relationship curve; According to the relationship curve, the angle data of the main reading head is adjusted.
6. The encoder accuracy compensation method according to claim 5, characterized in that: The step of adjusting the angle data of the main reading head according to the relationship curve comprises: Determine the straight line equation of the line connecting each two adjacent coordinate points according to the relationship curve; According to the straight line equation, the error value corresponding to the angular position of the circular grating at any point on the straight line equation can be determined; Based on the error value corresponding to the angular position of the circular grating at any point on the straight line equation, the angular data of the main reading head is adjusted.
7. An encoder, characterized in that include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the encoder is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the encoder accuracy compensation method as described in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the encoder accuracy compensation method according to any one of claims 1 to 6 are executed.
Citation Information
Patent Citations
Circular grating eccentricity error parameter identification and compensation method
CN106500631A
Circular grating angle error compensation method and device
CN109631976A
Method for correcting angle measurement error of circular grating with double reading heads mounted in non-alignment manner
CN112902877A
Eccentric error compensation method for asymmetric installation of double reading heads of circular grating encoder
CN114636387A
Encoder calibration data amplification and error compensation method and device
CN115979181A
Cited By
Servo turntable magnetic grid encoder error dynamic compensation system and method
CN122384868A