Precision compensation method, system and medium for rotary incremental encoder
The incremental encoder motor position error is measured by a laser interferometer, a compensation data table is generated, and real-time compensation is performed in the motor driver. This solves the problem of the positioning compensation function's dependence on the starting point and range limitation, and achieves high-precision and flexible encoder compensation.
Patent Information
- Application Number
- CN202410993070.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-07-24
AI Technical Summary
The positioning compensation function of existing incremental encoders requires a fixed reference point as the starting zero point. When the starting point is modified, the compensation data needs to be remeasured, and the compensation range is limited to a fixed position, making it difficult to adapt to working conditions where the range of motion is not fixed.
The position error of the incremental encoder motor in one revolution is measured by a laser interferometer to form a compensation data table. The compensation data is written into the motor driver when the system is turned on, which supports the offset adjustment of the compensation starting point and realizes real-time cyclic compensation.
It improves the accuracy and adaptability of the encoder, avoids the tedious process of re-measuring compensation data, and adapts to working conditions with variable motion range.
Smart Images

Figure CN118539809B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of control technology, and in particular to a precision compensation method, system and medium for a rotary incremental encoder. Background Art
[0002] Servo systems have been widely used in the industrial field because of their high efficiency, high precision and high response. Servo control systems often use a field-oriented (FOC) vector control strategy. Field-oriented control controls the motor operation by calculating the torque current component of the corresponding angle through the real-time phase of the rotor. This requires accurate detection of the position of the motor mover to achieve field orientation and position control. Generally, position sensors such as encoders are installed to detect the mover position. Encoders include absolute and incremental types. Absolute encoders can not only detect the mover position in real time, but also detect the mover initial position, but they are expensive; incremental encoders are widely used in permanent magnet motor servo systems for their high cost performance.
[0003] In the control system, the encoder is usually used to detect and feedback position information. However, due to the encoder's own accuracy, ambient temperature, manufacturing process, and deviations caused by the mechanical structure, there is a certain difference between the encoder's feedback value and the actual position of the actuator. When the processing accuracy is high, accuracy compensation is required. The current encoder accuracy compensation technology can be divided into two categories: one is the encoder's internal accuracy compensation calibration, which requires a storage medium (EEPROM, Flash, etc.) inside the encoder. The compensation value of one circle of the encoder is written into the encoder storage medium in advance. During the operation of the encoder, the compensation value is extracted in real time according to the encoder's single-circle position for compensation. This type of compensation technology is only applicable to absolute encoders (with internal storage media) and cannot compensate for the accuracy error caused by the external mechanical structure. The other is the positioning compensation function, which is a function that improves the positioning accuracy through the servo system. The encoder positioning compensation function detects the error between the actual position of the actuator end and the target position, and then uses the control system to fine-tune the encoder signal to achieve accurate positioning. Through the positioning compensation function, the system can monitor and correct the position error in real time, thereby ensuring that the execution end of the mechanical equipment can accurately reach the target position. This function is very important in automated production lines, robots and other applications that require high-precision positioning. It can improve the accuracy and reliability of the system while improving production efficiency and product quality.
[0004] The positioning compensation function is applicable to both absolute and incremental encoders, but is usually used for incremental encoders. The positioning compensation function has two disadvantages when used on incremental encoders: 1. A reference point needs to be fixed as the starting zero point of compensation (Z phase, origin signal or origin + offset). The error compensation data is measured based on the starting point. If the compensation starting point needs to be modified during use, the compensation data must be remeasured. However, machine laser interferometers are expensive and are rarely configured on-site by customers. In addition, machine adjustment and testing are cumbersome and time-consuming. 2. The positioning compensation range is generally a fixed position range starting from the starting point, which is not applicable to working conditions where the motion range is not fixed and unrestricted. Summary of the invention
[0005] The main purpose of the present invention is to provide a precision compensation method, system and medium for a rotary incremental encoder, which has the advantages of high precision, high performance, high reliability and high adaptability, and can maximize the improvement of motor precision.
[0006] To achieve the above object, the present invention provides a precision compensation method for a rotary incremental encoder, the method comprising the following steps:
[0007] The error of the position feedback of the incremental encoder motor within one circle is measured by laser interferometer, and the difference between the actual position of the end of the mechanism and the target position is compared to obtain the position error information;
[0008] The position error information is converted into compensation data, and the compensation data is written into the motor driver to form an incremental encoder single-turn compensation data table.
[0009] Wherein, the method further comprises:
[0010] When the system is turned on, the incremental encoder motor is controlled to perform an error compensation function, and the compensation data is compensated into the control signal of the position feedback instruction.
[0011] Wherein, when the system is turned on, the incremental encoder motor is controlled to perform the error compensation function, and the step of compensating the compensation data to the control signal of the position feedback instruction includes:
[0012] When the system is turned on, the incremental encoder motor is controlled to perform the error compensation function, and the position feedback is modulo the encoder resolution to obtain the encoder single-turn value;
[0013] Calculate and obtain real-time compensation data according to the single-turn value of the encoder;
[0014] The real-time compensation data is compensated into the control signal of the position feedback instruction.
[0015] Wherein, the step of converting the position error information into compensation data comprises:
[0016] The position error information is represented by different data formats, the format of the position error information is parsed, and the position error information after the format parsing is converted into compensation data.
[0017] Wherein, the method further comprises:
[0018] When the motor driver is powered on, determine whether the compensation starting point is the original system zero point;
[0019] If the compensation starting point is not the original system zero point, all single-turn compensation data tables are recalculated according to the offset starting point and mapped into a new single-turn error compensation data table starting from the offset starting point.
[0020] Wherein, the method further comprises:
[0021] After the single-turn compensation data is measured with a preset fixed point as the compensation starting point at the factory, when the compensation starting point needs to be modified later, the position deviation between the new compensation starting point and the initial compensation starting point is measured, and the compensation starting point is set according to the position deviation.
[0022] The step of measuring the error of the position feedback of the incremental encoder motor within one circle by using a laser interferometer comprises:
[0023] The corner reflector of the laser interferometer is installed at the center of the incremental encoder motor. According to the encoder resolution, one circle of the encoder is divided into N equal parts, where N is a positive integer.
[0024] When measuring error data, the servo driver controls the motor to start moving automatically, moving N points, each time using a position S-curve to move a fixed distance, and then wait for a period of time. During the waiting process, the laser interferometer records the position error of this point after detecting that the operation has stopped, and continues to move the next fixed distance after the waiting time is over.
[0025] Among them, the relevant setting parameters involved in the position error information include: number of position points, out-of-bounds distance, number of round trips, waiting time, and the data collection mode includes a unilateral mode that only collects one round of forward data, a bilateral mode that collects data in both forward and reverse directions, or multiple round trips to record multiple sets of error data.
[0026] The present invention also proposes a precision compensation system for a rotary incremental encoder, the system comprising a memory and a processor, the memory storing a computer program, and the computer program, when executed by the processor, implements the precision compensation method for the rotary incremental encoder as described above.
[0027] The present invention further provides a computer storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for precision compensation of the rotary incremental encoder as described above is implemented.
[0028] The present invention proposes a precision compensation method, system and medium for a rotary incremental encoder. The error feedback of the position of the incremental encoder motor within one circle is measured by a laser interferometer, and the difference between the actual position and the target position of the end of the mechanism is compared to obtain position error information; the position error information is converted into compensation data, and the compensation data is written into the motor driver to form an incremental encoder single-turn compensation data table. When the system is turned on later, the incremental encoder motor is controlled to perform the error compensation function, and the compensation data is compensated to the control signal of the position feedback instruction. The present invention is similar to the positioning compensation function, and is also a motion control technology based on a laser interferometer, which has the advantages of high precision, high performance, high reliability, high adaptability, etc. First, the position of the incremental encoder motor within one circle is precisely measured by a laser interferometer, and the difference between the actual position and the target position is compared to obtain position error information. The error information can be represented by different data formats, and the most common format is rta or rtl file. Through the corresponding analysis of the data format, the error information can be converted into compensation data, and these data are written into the motor driver to form a complete set of incremental encoder single-turn compensation data tables. When the system is turned on, the motor will perform the error compensation function and add the compensation data to the control signal of the position feedback command, thereby maximizing the motor accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a schematic flow chart of the precision compensation method of the rotary incremental encoder of the present invention;
[0030] Figure 2 This is a schematic diagram of the automatic movement function of the present invention;
[0031] Figure 3 This is a flow chart of the automatic movement function of the present invention;
[0032] Figure 4 It is a schematic diagram of the principle of position error compensation of the present invention;
[0033] Figure 5 It is a schematic diagram of the process of position error compensation of the present invention;
[0034] Figure 6 Schematic diagram of error compensation table remapping according to the present invention. DETAILED DESCRIPTION
[0035] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0036] As mentioned above, the positioning compensation function can help the control system achieve precise positioning tasks, improve production efficiency and ensure product quality. It is one of the indispensable and important functions in modern control systems. The positioning compensation function is applicable to both absolute and incremental encoders, but it is usually used for incremental encoders. There are two disadvantages when the positioning compensation function is used on incremental encoders: 1. A reference point needs to be fixed as the starting zero point of compensation (Z phase, origin signal or origin + offset). The error compensation data is measured based on the starting point. If the compensation starting point needs to be modified during use, the compensation data must be re-measured. However, the machine laser interferometer is expensive and is rarely configured on-site by customers. The machine adjustment test is cumbersome and takes a lot of time; 2. The positioning compensation range is generally a fixed position range starting from the starting point, which is not applicable to working conditions where the motion range is not fixed and unrestricted.
[0037] The present invention proposes a precision compensation method for a rotary incremental encoder. The present invention is similar to the positioning compensation function, and is also a motion control technology based on a laser interferometer, with the advantages of high precision, high performance, high reliability, high adaptability, etc. First, the position of the incremental encoder motor within a circle is precisely measured by a laser interferometer, and the difference between the actual position and the target position is compared to obtain the position error information. The error information can be represented by different data formats, and the most common format is rta or rtl file. Through the corresponding analysis of the data format, the error information can be converted into compensation data, and these data are written into the motor driver to form a complete set of incremental encoder single-turn compensation data tables. When the system is turned on, the motor will execute the error compensation function and compensate the compensation data to the control signal of the position feedback instruction, so as to maximize the motor accuracy.
[0038] In view of the shortcomings of positioning compensation, the present invention has made a unique design and added a compensation starting point offset function. When the servo drive is powered on, if the compensation starting point is not the original system zero point, all single-turn error compensation data tables are recalculated according to the offset starting point and mapped into a new single-turn error compensation data table starting from the offset point. After the single-turn compensation data is measured with a fixed point (Z phase, origin signal, etc.) as the compensation starting point at the factory, when the compensation starting point needs to be modified later, it is only necessary to measure the position deviation between the new compensation starting point and the initial compensation starting point, and the compensation starting point can be set arbitrarily without re-measuring the compensation data. The complete encoder single-turn compensation data table is imported into the driver. During the real-time operation of the driver, the position feedback is modulo the encoder resolution to obtain the encoder single-turn value. As long as the real-time compensation data is calculated based on the single-turn value, the real-time compensation data can be obtained. In this way, the position feedback can be cyclically compensated by the single-turn value during the rotation of the encoder, and it is no longer limited by the operating range.
[0039] Reference Figure 1 The present invention proposes a precision compensation method for a rotary incremental encoder, the method comprising the following steps:
[0040] Step S1, measuring the error of the position feedback of the incremental encoder motor within one circle by using a laser interferometer, comparing the difference between the actual position of the end of the mechanism and the target position, and obtaining the position error information;
[0041] Step S2, converting the position error information into compensation data, and writing the compensation data into the motor driver to form an incremental encoder single-turn compensation data table.
[0042] Wherein, the method further comprises:
[0043] When the system is turned on, the incremental encoder motor is controlled to perform an error compensation function, and the compensation data is compensated into the control signal of the position feedback instruction.
[0044] Wherein, when the system is turned on, the incremental encoder motor is controlled to perform the error compensation function, and the step of compensating the compensation data to the control signal of the position feedback instruction includes:
[0045] When the system is turned on, the incremental encoder motor is controlled to perform the error compensation function, and the position feedback is modulo the encoder resolution to obtain the encoder single-turn value;
[0046] Calculate and obtain real-time compensation data according to the single-turn value of the encoder;
[0047] The real-time compensation data is compensated into the control signal of the position feedback instruction.
[0048] Wherein, the step of converting the position error information into compensation data comprises:
[0049] The position error information is represented by different data formats, the format of the position error information is parsed, and the position error information after the format parsing is converted into compensation data.
[0050] Wherein, the method further comprises:
[0051] When the motor driver is powered on, determine whether the compensation starting point is the original system zero point;
[0052] If the compensation starting point is not the original system zero point, all single-turn compensation data tables are recalculated according to the offset starting point and mapped into a new single-turn error compensation data table starting from the offset starting point.
[0053] Wherein, the method further comprises:
[0054] After the single-turn compensation data is measured with a preset fixed point as the compensation starting point at the factory, when the compensation starting point needs to be modified later, the position deviation between the new compensation starting point and the initial compensation starting point is measured, and the compensation starting point is set according to the position deviation.
[0055] The step of measuring the error of the position feedback of the incremental encoder motor within one circle by using a laser interferometer comprises:
[0056] The corner reflector of the laser interferometer is installed at the center of the incremental encoder motor. According to the encoder resolution, one circle of the encoder is divided into N equal parts, where N is a positive integer.
[0057] When measuring error data, the servo driver controls the motor to start moving automatically, moving N points, each time using a position S-curve to move a fixed distance, and then wait for a period of time. During the waiting process, the laser interferometer records the position error of this point after detecting that the operation has stopped, and continues to move the next fixed distance after the waiting time is over.
[0058] Among them, the relevant setting parameters involved in the position error information include: number of position points, out-of-bounds distance, number of round trips, waiting time, and the data collection mode includes a unilateral mode that only collects one round of forward data, a bilateral mode that collects data in both forward and reverse directions, or multiple round trips to record multiple sets of error data.
[0059] The scheme of the present invention has the advantages of high precision, high performance, high reliability, high adaptability, etc. First, the position of the incremental encoder motor within one circle is precisely measured by a laser interferometer, and the difference between the actual position and the target position is compared to obtain the position error information. The error information can be represented by different data formats, and the most common format is rta or rtl file. Through the corresponding analysis of the data format, the error information can be converted into compensation data, and these data are written into the motor driver to form a complete set of incremental encoder single-turn compensation data tables. When the system is turned on, the motor will perform the error compensation function and compensate the compensation data to the control signal of the position feedback instruction, so as to maximize the motor accuracy.
[0060] The scheme of the present invention is described in detail below:
[0061] In view of the shortcomings of positioning compensation, the present invention has made a unique design and added a compensation starting point offset function. When the servo drive is powered on, if the compensation starting point is not the original system zero point, all single-turn error compensation data tables are recalculated according to the offset starting point and mapped into a new single-turn error compensation data table starting from the offset point. After the single-turn compensation data is measured with a fixed point (Z phase, origin signal, etc.) as the compensation starting point at the factory, when the compensation starting point needs to be modified later, it is only necessary to measure the position deviation between the new compensation starting point and the initial compensation starting point, and the compensation starting point can be set arbitrarily without re-measuring the compensation data. The complete encoder single-turn compensation data table is imported into the driver. During the real-time operation of the driver, the position feedback is modulo the encoder resolution to obtain the encoder single-turn value. As long as the real-time compensation data is calculated based on the single-turn value, the real-time compensation data can be obtained. In this way, the position feedback can be cyclically compensated by the single-turn value during the rotation of the encoder, and it is no longer limited by the operating range.
[0062] The solution of the present invention is divided into three modules: single-turn position error measurement; position error compensation; and compensation data table remapping.
[0063] For single-turn position error measurement
[0064] Before performing precision compensation, it is necessary to first use a laser interferometer to perform precise error measurement on the position feedback of the incremental encoder motor within one circle, compare the difference between the actual position of the end of the mechanism and the target position, and obtain a set of error information for one circle of the encoder. The error information can be saved in different data formats, the most common format is rta or rtl file.
[0065] Taking the common DDR motor as an example, the interferometer's corner reflector is installed at the center of the DDR motor. According to the encoder resolution, one circle of the encoder is divided into N equal parts (the larger N is, the higher the compensation accuracy is). When measuring the error data, the servo driver is used to control the motor to start automatic movement, moving N points, each time using the position S-curve to move a fixed distance (resolution / N), and then wait for a period of time. During the waiting process, the interferometer will record the position error of this point after detecting that the operation has stopped, and continue to move the next fixed distance after the waiting time is over. The schematic diagram of the automatic movement function is as follows Figure 2 As shown in the figure, the relevant setting parameters include the number of position points, the distance across the boundary, the number of round trips, and the waiting time. Depending on the setting of the parameters, there are different data collection modes. You can choose the single-side mode to collect only one round of forward data; you can choose the double-side mode to collect data for two round trips of forward and reverse operation, or you can go back and forth multiple times to record multiple sets of error data.
[0066] The automatic movement function process is as follows: Figure 3 As shown, the automatic movement function logic algorithm implementation includes:
[0067] Initialize the relevant variables and parameters at the beginning, then start the position S-curve point operation, walk a fixed relative distance (resolution / N), stop and wait according to the set waiting time after each distance, and reduce the number of recorded position points by 1 each time you move. When the number of recorded position points reaches 0, walk the set out-of-bounds distance, and then reverse the position S-curve point operation, and walk the same N points in the opposite direction. When the reverse operation ends, determine whether the number of round trips is 0. If it is 0, the process ends and stops running; if the number of round trips is not 0, the number of round trips is reduced by 1, and the previous forward and reverse position S-curve point operation is repeated, and the cycle runs until the number of round trips is 0.
[0068] For position error compensation
[0069] After the error is measured by laser interferometer to obtain the rta / rtl file, the error file is imported through the host computer and saved to the driver. An error compensation table will be formed inside the driver, as shown in the following table. The table contains the feedback positions of the N compensation points of the encoder and the deviation △Posi between the actual feedback position and the ideal position of each point measured by the laser interferometer. The starting point of the table is 0, the end point is the incremental encoder resolution, the compensation values of the starting point and the end point coincide (both are 0), and the position feedback interval (compensation interval) of adjacent points in the table is the incremental encoder resolution / N (the interval is named RelPos).
[0070]
[0071] Error compensation table
[0072] Due to temperature, manufacturing process, mechanical errors, etc., there is a certain difference between the encoder feedback value and the actual position of the actuator. The principle of position error compensation is as follows Figure 4 As shown in the figure, Posi is the actual encoder position feedback value of point i in the error compensation table, TPosi is the theoretical accurate position of point i in the compensation table, and the difference △Posi between Posi and TPosi can be measured by a laser interferometer. △Posi is the error value between the actual feedback position value of the encoder and the theoretical position. Each compensation point in the error compensation table corresponds to each point Posi of the encoder feedback value, and the compensation value is △Posi. When the single-turn value Pos corresponding to the feedback position of the encoder is between Posi and Posi+1, the calculation formula for the position error compensation value is: .
[0073] Among them, the process of position error compensation is as follows Figure 5 As shown, the position compensation logic algorithm implementation includes:
[0074] After the servo drive returns to zero, read the encoder's current position feedback value (pulse accumulation value), and take the encoder feedback value modulo the encoder resolution to get the encoder's current position single-turn value Pos. Divide the single-turn value Pos by the compensation point spacing RelPos to get the quotient and remainder. The quotient is i in the above formula, and the remainder is Pos%RelPos in the above formula. Substitute the quotient and remainder into the above formula to get the current position error compensation value ErrorCom. Finally, add the position error compensation value to the current position feedback value for compensation to get the accurate real-time feedback position after compensation. In addition, during the real-time operation of the drive, as long as the position feedback is modulo the encoder resolution, the encoder single-turn value can be obtained. As long as the position error compensation value is calculated based on the single-turn value, the real-time compensation data can be obtained. In this way, as long as there is a single-turn value during the encoder rotation, the position feedback can be cyclically compensated, and it is no longer limited by the operating range.
[0075] For compensation data table remapping
[0076] Before the position error compensation is turned on, the servo zero return operation is required. The zero return function will run the motor to the system zero point (Z signal / origin signal + offset). After running to the fixed point, the servo will set the encoder feedback position to 0. The position error compensation function can only be turned on after the zero return is completed. Error compensation starts from the single-turn position 0, and the compensation data is read from the error compensation table. When the customer's on-site working conditions change, the system zero point (Z signal / origin signal + offset) needs to be changed. At this time, the starting position after the zero return is completed does not correspond to the original starting position of the error compensation table. This is because the error compensation table imported into the driver is the compensation data measured at the fixed point (Z phase, origin signal, etc.) as the compensation starting point when leaving the factory. The compensation function needs the original starting position as a reference to run correctly. At this time, the error compensation function is invalid.
[0077] The present invention performs the following processing when changing the system zero point: re-map the original data of the error compensation table to form a new error compensation table with the offset point as the starting zero point. Figure 6 As shown, Figure 6 This is a schematic diagram of the error compensation table remapping of the present invention. The specific algorithm is:
[0078] According to the original error compensation table, calculate the error compensation values corresponding to the original N points + offset, and then subtract the error compensation value of the offset point (Offset pulses away from the original zero point) from each calculated error compensation value, so that a new error compensation table with the offset zero point as the starting point can be obtained. Therefore, when re-modifying the compensation starting point, you only need to measure the position deviation between the new compensation starting point and the zero point when the error compensation value was initially measured, and you can arbitrarily set the new compensation starting point without re-measuring the compensation data. The error compensation table remapping formula is as follows: .
[0079] Compared with the prior art, the solution of the present invention can reset the system zero point without affecting the compensation function; cyclic compensation is performed on the single-turn value, and the compensation range is not limited; the automatic positioning function can cooperate with the laser interferometer to perform error measurement, which can maximize the motor accuracy.
[0080] The present invention also proposes a precision compensation system for a rotary incremental encoder, the system comprising a memory and a processor, the memory storing a computer program, and the computer program, when executed by the processor, implements the precision compensation method for the rotary incremental encoder as described above.
[0081] The present invention further provides a computer storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for precision compensation of the rotary incremental encoder as described above is implemented.
[0082] The present invention proposes a precision compensation method, system and medium for a rotary incremental encoder. The error feedback of the position of the incremental encoder motor within one circle is measured by a laser interferometer, and the difference between the actual position and the target position of the end of the mechanism is compared to obtain position error information; the position error information is converted into compensation data, and the compensation data is written into the motor driver to form an incremental encoder single-turn compensation data table. When the system is turned on later, the incremental encoder motor is controlled to perform the error compensation function, and the compensation data is compensated to the control signal of the position feedback instruction. The present invention is similar to the positioning compensation function, and is also a motion control technology based on a laser interferometer, which has the advantages of high precision, high performance, high reliability, high adaptability, etc. First, the position of the incremental encoder motor within one circle is precisely measured by a laser interferometer, and the difference between the actual position and the target position is compared to obtain position error information. The error information can be represented by different data formats, and the most common format is rta or rtl file. Through the corresponding analysis of the data format, the error information can be converted into compensation data, and these data are written into the motor driver to form a complete set of incremental encoder single-turn compensation data tables. When the system is turned on, the motor will perform the error compensation function and add the compensation data to the control signal of the position feedback command, thereby maximizing the motor accuracy.
[0083] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Equivalent structures or equivalent process changes made by the scheme using the contents of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A precision compensation method for a rotary incremental encoder, characterized in that: The method comprises the following steps: The error of the position feedback of the incremental encoder motor within one circle is measured by laser interferometer, and the difference between the actual position of the end of the mechanism and the target position is compared to obtain the position error information; The position error information is converted into compensation data, and the compensation data is written into the motor driver to form an incremental encoder single-turn compensation data table, wherein the incremental encoder single-turn compensation data table includes feedback positions of N compensation points of the encoder and a deviation △Posi between the actual feedback position of each point and the ideal position measured by a laser interferometer; When the system is turned on, the incremental encoder motor is controlled to perform the error compensation function, and the position feedback is modulo the encoder resolution to obtain the encoder single-turn value Pos; The real-time compensation data is calculated according to the encoder single-turn value, specifically including: dividing the single-turn value Pos by the compensation point spacing RelPos to obtain the quotient i and the remainder Pos%RelPos, substituting the quotient and the remainder into the calculation formula of the position error compensation value to obtain the current position error compensation value ErrorCom, and the calculation formula of the position error compensation value is: ; The real-time compensation data is compensated into the control signal of the position feedback instruction.
2. The method according to claim 1, characterized in that The step of converting the position error information into compensation data comprises: The position error information is represented by different data formats, the format of the position error information is parsed, and the position error information after the format parsing is converted into compensation data.
3. The method according to claim 1, characterized in that The method further comprises: When the motor driver is powered on, determine whether the compensation starting point is the original system zero point; If the compensation starting point is not the original system zero point, all single-turn compensation data tables are recalculated according to the offset starting point and mapped into a new single-turn error compensation data table starting from the offset starting point.
4. The method according to claim 1, characterized in that: The method further comprises: After the single-turn compensation data is measured with a preset fixed point as the compensation starting point at the factory, when the compensation starting point needs to be modified later, the position deviation between the new compensation starting point and the initial compensation starting point is measured, and the compensation starting point is set according to the position deviation.
5. The method according to claim 1, characterized in that The step of measuring the error of the position feedback of the incremental encoder motor within one circle by using a laser interferometer comprises: The corner reflector of the laser interferometer is installed at the center of the incremental encoder motor. According to the encoder resolution, one circle of the encoder is divided into N equal parts, where N is a positive integer. When measuring error data, the servo driver controls the motor to start moving automatically, moving N points, each time using a position S-curve to move a fixed distance, and then wait for a period of time. During the waiting process, the laser interferometer records the position error of this point after detecting that the operation has stopped, and continues to move the next fixed distance after the waiting time is over.
6. The method according to claim 5, characterized in that The relevant setting parameters involved in the position error information include: number of position points, out-of-bounds distance, number of round trips, waiting time, among which the data collection mode includes a unilateral mode that only collects one round of forward data, a bilateral mode that collects data in both forward and reverse directions, or multiple round trips to record multiple sets of error data.
7. A precision compensation system for a rotary incremental encoder, characterized in that: The system includes a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the accuracy compensation method of the rotary incremental encoder according to any one of claims 1 to 6 is implemented.
8. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and when the computer program is executed by a processor, the method for precision compensation of a rotary incremental encoder according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
On-line actual error compensation system of sine and cosine encoder
CN101709983A
Measurement device for detecting the absolute angle of rotation of a rotating measurement object
CN103459984A
Numerical control machine tool thermal error external compensation control method based on auxiliary encoder
CN103513609A
Processing method and device for robot zero point
CN109108969A
Industrial robot zero point calibration method, calibration device and electronic equipment
CN114102580A
