Correction method and device for absolute value encoders
By sampling and calculating the position information of the absolute encoder, self-correction is achieved without external equipment, solving the problem of position error correction relying on external equipment in the prior art and achieving high-precision position error compensation.
Patent Information
- Application Number
- CN202411623379.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-11-14
AI Technical Summary
In the prior art, position error correction of an absolute encoder requires reliance on external equipment, and the correction equipment is bulky and inconvenient to carry, and correction cannot be performed without external equipment.
By sampling the position information of the absolute encoder during uniform rotation, calculating the actual position curve, obtaining the ideal position curve and the position error curve, the position compensation is performed using linear fitting and interpolation methods to achieve self-correction.
Without relying on external equipment, the position error self-correction of the absolute encoder is realized, the operation is simple and convenient, and it has high precision and high working performance.
Smart Images

Figure CN119374647B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of absolute value encoders, and in particular to a correction method and device for absolute value encoders. Background Art
[0002] Absolute encoders are widely used in servo motor control, providing accurate position feedback and enabling high-precision motion control. When using an absolute encoder, the stator must be mounted on the motor fixture, and the mover on the motor shaft. Due to mounting clearance, concentricity, and motor shaft play, the encoder output position can exhibit regular position errors that are strongly correlated with the mounting structure.
[0003] At present, the common method for correcting the position error of encoders in the market is to use an extremely high-precision encoder or dedicated correction equipment (laser interferometer, high-precision correction platform, etc.) to collect the actual position information of the encoder under test, and compare it with the position information of the high-precision encoder or high-precision correction equipment, so as to obtain the position error of the encoder under test within a full circle, and compensate for the position error of the encoder under test to obtain higher-precision position feedback and performance.
[0004] Current error correction methods inevitably rely on external equipment for error calibration and compensation. Moreover, error correction equipment is often bulky and inconvenient to carry. Without external equipment, position error correction operations cannot be performed. Summary of the Invention
[0005] In order to calibrate an absolute value encoder without relying on external equipment, the present application proposes a correction method for an absolute value encoder, including: when the absolute value encoder rotates at a constant speed, sampling the position information of the absolute value encoder to obtain an actual position curve, the actual position curve being the correspondence between the actual position of the absolute value encoder and the rotation time; based on the actual position curve, obtaining an ideal position curve, the ideal position curve being the correspondence between the ideal position of the absolute value encoder and the rotation time; based on the actual position curve and the ideal position curve, calculating a position error curve; and based on the position error curve, compensating for the position information of the absolute value encoder.
[0006] Optionally, obtaining an ideal position curve based on the actual position curve includes:
[0007] Determining adjacent first and second zero points from the actual position curve;
[0008] Based on the sampling points before and after the first zero point, obtaining the abscissa of the first zero point by linear fitting;
[0009] Based on the sampling points before and after the second zero point, the abscissa of the second zero point is obtained by linear fitting;
[0010] Obtaining a vertex of the ideal position curve based on the abscissa of the second zero point and the resolution of the absolute encoder;
[0011] The ideal position curve is obtained by linear fitting based on the first zero point and the vertex.
[0012] Optionally, obtaining an ideal position curve based on the actual position curve includes:
[0013] Determining a first sampling point and a second sampling point located within the same straight line from the actual position curve;
[0014] The ideal position curve is obtained by linear fitting based on the first sampling point and the second sampling point.
[0015] Optionally, the calculating a position error curve based on the actual position curve and the ideal position curve includes:
[0016] The ideal position curve and the actual position curve are subtracted to obtain the position error curve when the absolute encoder rotates one circle.
[0017] Optionally, compensating the position information of the absolute encoder based on the position error curve includes:
[0018] Evenly dividing the position error curve into a plurality of position intervals;
[0019] Determine the position interval to be compensated in which the position to be compensated of the absolute encoder is located;
[0020] Two end points of the position interval to be compensated are used as compensation points, and a position compensation amount is determined based on the compensation points. The position compensation amount is used to compensate the position to be compensated.
[0021] Optionally, taking two endpoints of the position interval to be compensated as compensation points and determining the position compensation amount based on the compensation points includes:
[0022] The position compensation amount is determined by linear interpolation based on the two endpoints.
[0023] Optionally, the linear interpolation is performed using the following formula:
[0024]
[0025] Among them, Pc(n) is the position compensation amount, Pc(n1) is the left endpoint of the two endpoints, Pc(n2) is the right endpoint of the two endpoints, STEP is the step size, and Pf is the remainder of the position to be compensated for the step size.
[0026] Optionally, the step size is equal to the resolution of the absolute encoder divided by the number of position intervals.
[0027] The present application also proposes a correction device for an absolute value encoder, comprising:
[0028] a position sampling unit, which samples position information of the absolute encoder when the absolute encoder rotates at a constant speed to obtain an actual position curve, wherein the position information is the rotation angle of the absolute encoder, and the actual position curve is a correspondence between the actual position of the absolute encoder and the rotation time;
[0029] a position prediction unit, which obtains an ideal position curve based on the actual position curve, wherein the ideal position curve is a correspondence between an ideal position and a rotation time of the absolute encoder;
[0030] an error calculation unit, configured to calculate a position error curve based on the actual position curve and the ideal position curve;
[0031] An error compensation unit compensates the position information of the absolute encoder based on the position error curve.
[0032] The correction method and device for the absolute encoder can realize self-correction of the position error of the absolute encoder without relying on external correction equipment. The operation is simple and convenient, and the position accuracy and working performance are high. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 4 is a flow chart of a correction method for an absolute encoder according to an embodiment of the present application.
[0034] Figure 2 This is a curve diagram of the correspondence between time and position information of the uniform rotation of the absolute encoder according to an embodiment of the present application.
[0035] Figure 3 This is a flowchart of compensating position information of an absolute encoder according to an embodiment of the present application.
[0036] Figure 4 1 is a graph showing the actual position and ideal position of an absolute encoder according to an embodiment of the present application.
[0037] Figure 52 is a graph showing the position range and position error of an absolute encoder according to an embodiment of the present application.
[0038] Figure 6 A correction device for an absolute value encoder according to an embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0040] First reference Figure 1 The flowchart is used to illustrate the correction method process of the present application. In step 101, when the absolute encoder rotates at a constant speed, the position information of the absolute encoder is sampled to obtain an actual position curve. The actual position curve is the correspondence between the actual position of the absolute encoder and the rotation time. In order to ensure the accuracy of the correction, it is necessary to sample the position information of multiple circles, and store the sampling time and position information of the sampling points in a position sampling table. In addition, the sampling of the position information is obtained by reading the absolute encoder, which is represented by the resolution. For example, for a 16-bit absolute encoder, its resolution is 2^16-1, and the value range of the position information is 0 to 2^16-1. Therefore, in the actual position curve, when the absolute encoder rotates to the next circle, there is a zero point with the minimum position information value and a maximum point with the maximum position information value. The vertical coordinate value of the zero point is 0, and the vertical coordinate value of the maximum point is 2^16-1. It is understandable that, due to the influence of position errors such as installation errors mentioned above, position sampling when the absolute encoder rotates at a constant speed does not mean absolute constant speed, that is, the actual position curve is not a completely linear relationship, but there are error fluctuations, so correction is required.
[0041] In step 102, based on the actual position curve, an ideal position curve is obtained, which is the correspondence between the ideal position and rotation time of the absolute encoder. Figure 2 Let's explain this step in detail. Figure 2The graph represents the correspondence between time and position information for an absolute encoder rotating at a constant speed. Triangles represent sampling points, and the curve represents the ideal position curve. The adjacent first zero point P(x1), (x1,0) and second zero point P(x2), (x2,0) indicate that the encoder has completed one rotation at that time (i.e., x1 and x2) and has begun the next rotation. P(a), P(b), P(c), and P(d) are the sampling points before and after these two zero points, respectively. Each peak of the curve (i.e., the maximum position information) is the absolute encoder's resolution RES. Therefore, based on the coordinates of the two preceding and following sampling points, the coordinates of the corresponding zero point can be obtained through linear fitting. Specifically, using the first zero point P(x1), (x1,0) as an example, since the slope of the curve for each rotation of the absolute encoder is the same, the coordinates of the P(b) sampling point (bx,by) can be shifted upward to point P(b'), (bx,by+RES). In this way, the equation of the straight line where point (x1, RES) is located can be fitted through point P(a) and point P(b′). After substituting the vertical coordinate value RES into the straight line equation, the value of x1 can be calculated. Similarly, after performing linear fitting to obtain the value of x2, the ideal position curve within one rotation of the absolute encoder can be fitted through points (x1, 0) and (x2, RES). Similarly, the ideal position curve for multiple rotations can be obtained, and it can be seen that not all sampling points fall on the ideal position curve. By substituting the sampling time of the sampling point into the ideal position curve, the ideal position point at the corresponding time can be obtained. It can be understood that any two points on the same straight line can also be used to fit the ideal position curve within one rotation, or because the ideal absolute encoder rotates at an absolutely uniform speed, its position information is completely linear with time and speed. Pure mathematical calculations can also be used to obtain the corresponding ideal position curve. The method adopted in this application is only a preferred embodiment that is closer to reality and more accurate, and is not a limitation.
[0042] In step 103, a position error curve is calculated based on the actual position curve and the ideal position curve. Since the error is regular, that is, the error curve of each rotation of the absolute encoder should actually be the same, in one embodiment, the ideal position curve and the actual position curve can be subtracted to obtain the position error curve, and the position error curve of multiple rotations can be averaged to obtain the position error curve when the encoder rotates one circle. In another embodiment, the ideal position point and the sampling point corresponding to the sampling point can be subtracted to obtain the error point. Then, the position error of the sampling points at the same sampling position in each circle is averaged to obtain a more accurate error point, thereby obtaining the position error curve when the encoder rotates one circle. It can be understood that due to the data processing capability limitations of the encoder hardware, the latter embodiment is usually adopted in practice, and it is impossible to obtain a specific position error curve equation.
[0043] In step 104, the position information of the absolute encoder is compensated based on the position error curve. Figure 3 Let's explain this step in detail. Due to the excessive number of points, the actual storage module has limited capacity and lacks sufficient computing resources. Therefore, after obtaining the position error curve, in step 301, the position error curve is evenly divided according to a specific position interval and stored in the storage module of the absolute encoder to facilitate the calculation of subsequent operations. The position interval is an interval of the same size that is artificially divided. For example, if the interval size is 20°, the position error curve is evenly divided into 12 position intervals (360° / 20°=12). The position interval can be set according to the accuracy requirements and the computing power of the absolute encoder. When error compensation is performed on a certain position, in step 302, the position interval to be compensated of the absolute encoder is determined. In step 303, the two endpoints of the position interval to be compensated are used as compensation points, and the position compensation amount is determined based on the compensation points of the position to be compensated. The position compensation amount is used to compensate the position to be compensated.
[0044] Figure 4 This is a graph showing the actual position and ideal position of the absolute encoder. Figure 4 In the figure, the solid line is the actual position curve Pa of the absolute encoder, and the dotted line is the ideal position curve Pb obtained according to the above steps. It can be understood that the actual position curve is not absolutely linear, but has error fluctuations. This is only an example and not a limitation. Subtract the ideal position curve Pb from the actual position curve Pa to obtain Figure 5 Position error curve Pc. Figure 5 The corresponding relationship curve between position interval and position error is used to further illustrate this step. Figure 5 The horizontal axis is the position of the absolute encoder during one rotation (expressed in degrees, i.e., a full rotation from 0 degrees to 360 degrees), and the vertical axis is the position error of any position during one rotation of the absolute encoder. At any position, there is a unique error value (i.e., the position to which the encoder rotates corresponds to the error value of that position). As an example, Figure 5 As shown, the position n to be compensated is located in the position interval to be compensated between n1 and n2, which is represented as point Pc(n), and the point Pc(n1) with the horizontal coordinate n1 and the point Pc(n2) with the horizontal coordinate n2 are selected as compensation points on the position error curve. Then, the step length STEP of the linear interpolation is determined according to the position interval. In this embodiment, the step length STEP is preferably the resolution RES of the absolute encoder divided by the number of position intervals, and the step length is modulo the position to be compensated to obtain the parameter Pf, so as to obtain the interpolation ratio STEP / Pf of the linear interpolation. Therefore, the position compensation amount Pc(n) of the position to be compensated n can be calculated by the following formula (1):
[0045]
[0046] The actual position of the encoder (i.e. the position to be compensated) plus the above position compensation amount can obtain the compensated high-precision position.
[0047] It can be understood that the use of linear interpolation to obtain the position compensation amount is only a preferred embodiment. In other embodiments, other computing resources (such as an external computer, etc.) can be used to obtain the position error curve equation, and thus the position error of any position, that is, the position compensation amount, can be obtained by substituting it into the equation.
[0048] A judgment can also be made before compensation. When a position error curve is stored in the absolute encoder, the compensation operation is performed directly to avoid repeated operations. When the position error curve is not stored, manual operation can be used to control whether to perform error correction operations to obtain the position error curve. For example, if the operator believes that the absolute value sensor accuracy is sufficient to meet the measurement requirements, no correction operation is required, otherwise correction is performed.
[0049] This application also proposes a correction device 600 for an absolute value encoder, referring to Figure 6 , which includes the following units:
[0050] A position sampling unit 601 samples the position information of the absolute encoder when the absolute encoder rotates at a constant speed to obtain an actual position curve. The position information is the rotation angle of the absolute encoder, and the actual position curve is the correspondence between the actual position of the absolute encoder and the rotation time.
[0051] The position prediction unit 602 obtains an ideal position curve based on the actual position curve, where the ideal position curve is a correspondence between an ideal position of the absolute encoder and a rotation time;
[0052] The error calculation unit 603 calculates a position error curve based on the actual position curve and the ideal position curve;
[0053] The error compensation unit 604 compensates the position information of the absolute encoder based on the position error curve.
[0054] It is understandable that the device 600 can run on various computers and servers, and can use the correction method for absolute encoders corresponding to the present application to self-correct the position error of the encoder without introducing external equipment.
[0055] The above is an explanation of the embodiments of the present application by specific embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Although the description of the present application will be introduced in conjunction with the preferred embodiment, this does not mean that the features of this invention are limited to this embodiment. In addition, in order to avoid confusion or blurring the focus of the present application, some specific details will be omitted in the description. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other unless there is a conflict.
[0056] Furthermore, various operations will be described as multiple discrete operations in a manner that is most helpful in understanding the illustrative embodiments; however, the order of description should not be construed as implying that these operations are necessarily order dependent. In particular, these operations do not need to be performed in the order presented.
[0057] Unless the context dictates otherwise, the terms "comprising," "having," and "including" are synonymous. The phrase "A / B" means "A or B." The phrase "A and / or B" means "(A and B) or (A or B)."
[0058] As used herein, the term "module" or "unit" may refer to, be or include: an application specific integrated circuit (ASIC), an electronic circuit, a (shared, dedicated or group) processor and / or memory that executes one or more software or firmware programs, a combinational logic circuit and / or other suitable components that provide the described functionality.
[0059] In the accompanying drawings, some structural or method features are shown in a specific arrangement and / or order. However, it should be understood that such specific arrangement and / or order may not be required. In some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0060] It should be understood that although the terms "first," "second," and the like may be used herein to describe various elements or data, these elements or data should not be limited by these terms. These terms are used only to distinguish one feature from another. For example, a first feature may be referred to as a second feature, and similarly, a second feature may be referred to as a first feature without departing from the scope of the exemplary embodiments.
[0061] It should be noted that in this specification, similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0062] While the present invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention.
Claims
1. A calibration method for an absolute value encoder, characterized in that: include: When the absolute encoder rotates at a constant speed, position information of the absolute encoder is sampled to obtain an actual position curve, where the actual position curve is a correspondence between the actual position of the absolute encoder and the rotation time; Based on the actual position curve, an ideal position curve is obtained, where the ideal position curve is a correspondence between an ideal position and a rotation time of the absolute encoder, including: Determining adjacent first and second zero points from the actual position curve; Obtaining the abscissa of the first zero point by linear fitting based on sampling points before and after the first zero point, including: translating the coordinates (bx, by) of the sampling points after the first zero point upward to a point (bx, by + RES), fitting a straight line equation of a point (x1, RES) using the coordinates of the sampling points before the first zero point and the point (bx, by + RES), substituting the value of RES into the straight line equation to obtain the abscissa of the first zero point, wherein x1 is the abscissa of the first zero point, and RES is the resolution of the absolute encoder; Based on the sampling points before and after the second zero point, the abscissa of the second zero point is obtained by linear fitting; Obtaining a vertex of the ideal position curve based on the abscissa of the second zero point and the resolution of the absolute encoder; Based on the first zero point and the vertex, obtaining the ideal position curve through linear fitting; Calculating a position error curve based on the actual position curve and the ideal position curve; The position information of the absolute encoder is compensated based on the position error curve.
2. The method according to claim 1, characterized in that The calculating a position error curve based on the actual position curve and the ideal position curve includes: The ideal position curve and the actual position curve are subtracted to obtain the position error curve when the absolute encoder rotates one circle.
3. The method according to claim 1, characterized in that Compensating the position information of the absolute encoder based on the position error curve includes: Evenly dividing the position error curve into a plurality of position intervals; Determine the position interval to be compensated in which the position to be compensated of the absolute encoder is located; Two end points of the position interval to be compensated are used as compensation points, and a position compensation amount is determined based on the compensation points. The position compensation amount is used to compensate the position to be compensated.
4. The method according to claim 3, characterized in that The step of using two endpoints of the position interval to be compensated as compensation points and determining the position compensation amount based on the compensation points includes: The position compensation amount is determined by linear interpolation based on the two endpoints.
5. The method according to claim 4, characterized in that The linear interpolation is performed using the following formula: , in, Pc(n) is the position compensation amount, Pc(n1) is the left endpoint of the two endpoints, Pc(n2) is the right endpoint of the two endpoints, STEP is the step length, Pf The modulo of the position to be compensated and the step length.
6. The method according to claim 5, characterized in that The step size is equal to the resolution of the absolute encoder divided by the number of position intervals.
7. A correction device for an absolute value encoder, characterized in that: include: a position sampling unit, which samples position information of the absolute encoder when the absolute encoder rotates at a constant speed to obtain an actual position curve, wherein the position information is the rotation angle of the absolute encoder, and the actual position curve is a correspondence between the actual position of the absolute encoder and the rotation time; A position prediction unit obtains an ideal position curve based on the actual position curve, wherein the ideal position curve is a correspondence between an ideal position and a rotation time of the absolute encoder, including: Determining adjacent first and second zero points from the actual position curve; Obtaining the abscissa of the first zero point by linear fitting based on sampling points before and after the first zero point, including: translating the coordinates (bx, by) of the sampling points after the first zero point upward to a point (bx, by + RES), fitting a straight line equation of a point (x1, RES) using the coordinates of the sampling points before the first zero point and the point (bx, by + RES), substituting the value of RES into the straight line equation to obtain the abscissa of the first zero point, wherein x1 is the abscissa of the first zero point, and RES is the resolution of the absolute encoder; Based on the sampling points before and after the second zero point, the abscissa of the second zero point is obtained by linear fitting; Obtaining a vertex of the ideal position curve based on the abscissa of the second zero point and the resolution of the absolute encoder; Based on the first zero point and the vertex, obtaining the ideal position curve through linear fitting; an error calculation unit, configured to calculate a position error curve based on the actual position curve and the ideal position curve; An error compensation unit compensates the position information of the absolute encoder based on the position error curve.
Citation Information
Patent Citations
Palladium alloy hydrogen sensor and temperature compensation method thereof
CN117705893A
Apparatus and method for Frequency measurement based on modified zero-crossing
KR1020100063424A