Correction method and device for absolute value encoder
By sampling the location information when the absolute value encoder is rotated, the actual and ideal position curve is calculated, the position error curve is obtained and compensated, the lack of correction relying on external equipment in the existing technology, realizing the absolute value encoder's self -herself Correction improves position accuracy and operating convenience.
Patent Information
- Application Number
- CN202411623379.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-11-14
AI Technical Summary
The existing position error correction method of absolute value encoder needs to rely on external high-precision equipment, and the equipment is huge in size and inconvenient to carry, so it cannot be corrected without external equipment.
By sampled the location information when the absolute value encoder is rotated evenly, the actual location curve is obtained, and the ideal position curve is calculated based on this to obtain the position error curve. Finally, the position information of the encoder is compensated to achieve self -correction.
In the case of relying on external devices, the position error of the absolute value encoder is self -corrected. It is simple and convenient to operate, and has high position accuracy and working performance.
Smart Images

Figure CN119374647A_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 the field of servo motor control, providing accurate position feedback for servo control systems and helping servo systems achieve high-precision motion control. When using an absolute encoder, the stator needs to be fixed on the motor fixture, and the mover needs to be fixed on the motor shaft. Affected by the installation clearance, concentricity and motor shaft runout, the encoder output position has a regular position error that is strongly related to the installation structure.
[0003] At present, the common method for correcting the position error of encoders in the market is to use extremely high-precision encoders 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 whole 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, and the 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 calibration method for an absolute value encoder, comprising: 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; 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] Determine a first adjacent zero point and a second adjacent zero point 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, obtaining the abscissa of the second zero point by linear fitting;
[0010] Obtaining the vertex of the ideal position curve based on the abscissa of the second zero point and the resolution of the absolute encoder;
[0011] Based on the first zero point and the vertex, the ideal position curve is obtained by linear fitting.
[0012] Optionally, obtaining an ideal position curve based on the actual position curve includes:
[0013] Determine 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, based on the position error curve, compensating the position information of the absolute encoder 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] The 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 comprises:
[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 length, and Pf is the modulo of the position to be compensated to the step length.
[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 the position information of the absolute value encoder to obtain an actual position curve when the absolute value encoder rotates at a constant speed, wherein the position information is the rotation angle of the absolute value encoder, and the actual position curve is the corresponding relationship between the actual position of the absolute value 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, which calculates a position error curve based on the actual position curve and the ideal position curve;
[0031] The error compensation unit compensates the position information of the absolute encoder based on the position error curve.
[0032] By using the correction method and device for the absolute value encoder, the absolute value encoder position error self-correction can be achieved without relying on external correction equipment, the operation is simple and convenient, and the position accuracy and working performance are relatively high. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a flow chart of a correction method for an absolute encoder according to an embodiment of the present application.
[0034] Figure 2 It is a curve diagram of the correspondence between the time and position information of the uniform rotation of the absolute encoder according to the embodiment of the present application.
[0035] Figure 3 It is a flow chart of compensating the position information of the absolute encoder according to an embodiment of the present application.
[0036] Figure 4 is a curve diagram of the actual position and ideal position of the absolute encoder according to an embodiment of the present application.
[0037] Figure 51 is a position range and position error curve diagram 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 the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with 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, which is the correspondence between the actual position of the absolute encoder and the rotation time. Among them, 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 the 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, the 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 junction of the next circle, there is a zero point with the smallest position information value and a maximum point with the largest position information value. The ordinate value of the zero point is 0, and the ordinate 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 needed.
[0041] In step 102, based on the actual position curve, an ideal position curve is obtained, where the ideal position curve is the correspondence between the ideal position and the rotation time of the absolute encoder. Figure 2 Let's explain this step in detail. Figure 2It is the corresponding relationship curve of the time and position information of the uniform rotation of the absolute encoder, where the triangle represents the sampling point and the curve is the ideal position curve. The adjacent first zero point P(x1), (x1,0) and the second zero point P(x2), (x2,0) indicate that the encoder has rotated one circle at this time point (i.e. x1 and x2) and started the next circle of rotation. P(a), P(b), P(c), and P(d) are the sampling points before and after the two zero points, respectively, and each peak of the curve (i.e. the maximum value of the position information) is the resolution RES of the absolute encoder. Therefore, according to the coordinates of the two sampling points before and after, the coordinates of the corresponding zero point can be obtained by linear fitting. Specifically, taking the first zero point P(x1), (x1,0) as an example, since the slope of the curve of each rotation of the absolute encoder is the same, the coordinates of the P(b) sampling point (bx, by) can be translated upward to the point P(b'), (bx, by + RES). In this way, the equation of the straight line where the point (x1, RES) is located can be fitted through point P(a) and point P(b′), and after the ordinate value RES is substituted into the straight line equation, the value of x1 can be calculated. Similarly, after the value of x2 is obtained by linear fitting, the ideal position curve within one rotation of the absolute encoder can be fitted through points (x1, 0) and points (x2, RES), which is similar to the ideal position curve for multiple rotations, 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 absolute uniform speed, its position information is completely linear with time and speed, and 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, but not a limitation.
[0042] In step 103, the 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, therefore, 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 errors of the sampling points at the same sampling position in each circle are averaged to obtain more accurate error points, 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 To 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 for the convenience of subsequent calculations. The position interval is an interval of the same size divided artificially. 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, it is determined that the position to be compensated of the absolute encoder is located in the position interval to be compensated. 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 of 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. It is only used as an example, 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 This step is further explained with a corresponding relationship curve diagram between position interval and position error. 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 point Pc(n1) with abscissa n1 and point Pc(n2) with abscissa n2 are selected as compensation points on the position error curve. Then, the step length STEP of 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 linear interpolation. Therefore, the position compensation amount Pc(n) of the position n to be compensated 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, with the help of other computing resources (such as an external computer, etc.), the position error curve equation can be obtained, and 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 an error correction operation to obtain the position error curve. For example, if the operator believes that the absolute value sensor is accurate enough to meet the measurement requirements, no correction operation is required, otherwise correction is performed.
[0049] The present application also proposes a calibration device 600 for an absolute value encoder, referring to Figure 6 , which includes the following units:
[0050] The position sampling unit 601 samples the position information of the absolute encoder to obtain an actual position curve when the absolute encoder rotates at a constant speed. The position information is the rotation angle of the absolute encoder, and the actual position curve is the corresponding relationship 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 and a rotation time of an absolute encoder;
[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 encoder corresponding to the present application to self-correct the position error of the encoder without introducing external equipment.
[0055] The above specific embodiments illustrate the implementation of the present application, and 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 the implementation. 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 without conflict.
[0056] Furthermore, various operations will be described as multiple discrete operations in a manner that is most helpful for 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 a 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 specific figure does not mean 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", etc. may be used here to describe various units or data, these units or data should not be limited by these terms. These terms are used only to distinguish one feature from another. For example, without departing from the scope of the exemplary embodiment, a first feature may be referred to as a second feature, and similarly, a second feature may be referred to as a first feature.
[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 and explained in the 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, the position information of the absolute encoder is sampled to obtain an actual position curve, wherein the actual position curve is a corresponding relationship between the actual position of the absolute encoder and the rotation time; Based on the actual position curve, an ideal position curve is obtained, wherein the ideal position curve is a corresponding relationship between an ideal position and a rotation time of the absolute encoder; Based on the actual position curve and the ideal position curve, a position error curve is calculated; Based on the position error curve, the position information of the absolute encoder is compensated.
2. The method according to claim 1, characterized in that The obtaining of the ideal position curve based on the actual position curve comprises: Determine a first adjacent zero point and a second adjacent zero point from the actual position curve; Based on the sampling points before and after the first zero point, obtaining the abscissa of the first zero point by linear fitting; Based on the sampling points before and after the second zero point, obtaining the abscissa of the second zero point by linear fitting; Obtaining the 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, the ideal position curve is obtained by linear fitting.
3. The method according to claim 1, characterized in that The obtaining of the ideal position curve based on the actual position curve comprises: Determine a first sampling point and a second sampling point located within the same straight line from the actual position curve; The ideal position curve is obtained by linear fitting based on the first sampling point and the second sampling point.
4. The method according to claim 2 or 3, characterized in that: The calculating the position error curve based on the actual position curve and the ideal position curve comprises: The ideal position curve and the actual position curve are subtracted to obtain the position error curve when the absolute encoder rotates one circle.
5. The method according to claim 1, characterized in that Based on the position error curve, compensating the position information of the absolute encoder 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; The 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.
6. The method according to claim 5, characterized in that The step of taking two end points of the position interval to be compensated as compensation points and determining the position compensation amount based on the compensation points comprises: The position compensation amount is determined by linear interpolation based on the two endpoints.
7. The method according to claim 6, characterized in that The linear interpolation is performed using the following formula: 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 length, and Pf is the modulo of the position to be compensated to the step length.
8. The method according to claim 7, characterized in that The step size is equal to the resolution of the absolute encoder divided by the number of position intervals.
9. A correction device for an absolute value encoder, characterized in that: include: a position sampling unit, which samples the position information of the absolute value encoder to obtain an actual position curve when the absolute value encoder rotates at a constant speed, wherein the position information is the rotation angle of the absolute value encoder, and the actual position curve is the corresponding relationship between the actual position of the absolute value encoder and the rotation time; 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; an error calculation unit, which calculates a position error curve based on the actual position curve and the ideal position curve; The 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
Method and System for Evaluating Analyte Sensor Response Characteristics
US20110320167A1
Encoder and position compensation method and apparatus therefor, and storage medium
WO2023019679A1