Encoder and position compensation method, device and storage medium thereof
By acquiring and calculating the decoding information of the encoder, calculating the error and performing position compensation, the position detection error problem of the magnetic encoder outside the motor shaft is solved, and the measurement accuracy is improved.
Patent Information
- Application Number
- CN202110964684.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-20
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2041-08-20
AI Technical Summary
When a traditional magnetic encoder is installed outside the motor shaft, due to factors such as installation accuracy and motor vibration, the position detection errors are caused and the measurement accuracy is reduced.
By acquiring the decoding information of the encoder in the first decoding area, calculating the theoretical detection information of the second decoding area, and calculating the error information based on the actual detection information, performing position compensation, and obtaining the target position information.
The detection accuracy of the encoder is improved, and the spacing error between the stator disk and the actuator disk in the magnetic charging direction is eliminated, thereby achieving more accurate position detection.
Smart Images

Figure CN115900775B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of measuring equipment, and in particular to an encoder and a position compensation method, device and storage medium thereof. Background Art
[0002] A rotary encoder is a device that detects the rotational position of a rotating body relative to a fixed body. Specifically, it compiles and converts signals or data into a signal form that can be used for communication, transmission, and storage. Rotary encoders can directly convert measured angular displacement into digital signals and are widely used in automatic measurement and control systems. Rotary encoders, including magnetic encoders, are often installed outside the motor shaft. This is affected by factors such as mounting accuracy and motor vibration, leading to position detection errors during use, reducing the encoder's measurement accuracy. Summary of the Invention
[0003] The main purpose of the present invention is to propose an encoder and a position compensation method, device and storage medium thereof, aiming to solve the problem that traditional magnetic encoders are prone to position detection errors and thus lead to reduced measurement accuracy.
[0004] To achieve the above objectives, the present invention proposes a position compensation method for an encoder. The encoder includes a stator disk and a mover disk that rotates relative to the stator disk. The mover disk and the stator disk define multiple decoding areas. The mover disk generates a magnetic field during its rotational stroke, allowing the stator disk to sequentially detect each decoding area. The multiple decoding areas include a first decoding area and a second decoding area. The encoder position compensation method includes:
[0005] Obtaining first decoding information of the encoder in the first decoding area;
[0006] Calculating theoretical detection information of the stator disk in the second decoding area based on the first decoding information;
[0007] Acquire second position information of the mover disc in the second decoding area and second detection information of the stator disc in the second decoding area;
[0008] Calculating error information based on the theoretical detection information and the second detection information;
[0009] The second position information is compensated according to the error information to obtain target position information.
[0010] Optionally, the step of obtaining first decoding information of the encoder in the first decoding area includes:
[0011] Acquire first detection information of the stator disk in the first decoding area;
[0012] First position information of the mover disk in the first decoding area is calculated according to the first detection information.
[0013] Optionally, the step of calculating theoretical detection information of the stator disk in the second decoding area based on the first decoding information includes:
[0014] determining a rotational speed of the mover disc relative to the stator disc based on the first position information and a preset algorithm;
[0015] Calculating theoretical position information of the mover disc in the second decoding area according to the rotation speed;
[0016] The theoretical detection information of the stator disc in the second decoding area is calculated according to the theoretical position information.
[0017] Optionally, the preset algorithm includes a differential algorithm or a phase-locked loop algorithm.
[0018] Optionally, among the multiple decoding areas, every two adjacent decoding areas constitute the first decoding area and the second decoding area respectively.
[0019] In addition, to achieve the above-mentioned purpose, the present invention also provides a position compensation device for an encoder, comprising a memory, a processor, and a position compensation program for an encoder stored on the memory and runnable on the processor, wherein the position compensation program for the encoder is configured to implement the steps of the position compensation method for the encoder as described above.
[0020] In addition, to achieve the above object, the present invention further provides an encoder, comprising:
[0021] A main body, the main body including a stator disk and a mover disk rotating relative to the stator disk, the mover disk and the stator disk defining a plurality of decoding areas, the mover disk generating a magnetic field during its rotational stroke so that the stator disk sequentially detects each of the decoding areas, the plurality of decoding areas including a first decoding area and a second decoding area; and
[0022] A position compensation device for an encoder, comprising a memory, a processor, and a position compensation program for the encoder stored in the memory and executable on the processor, wherein the position compensation program for the encoder is configured to implement the steps of the position compensation method for the encoder as described above.
[0023] Optionally, one end surface of the stator disc is provided with a plurality of magnetic sensors distributed along the circumferential direction, and the mover disc is provided with a plurality of magnetic pole portions distributed along the circumferential direction;
[0024] Wherein, at least some of the magnetic pole portions are arranged with different sizes.
[0025] Optionally, the plurality of magnetic pole portions include a plurality of first magnetic pole portions and a plurality of second magnetic pole portions that are staggered, and the polarities of the first magnetic pole portions and the second magnetic pole portions are opposite.
[0026] In addition, to achieve the above-mentioned purpose, the present invention also provides a storage medium, on which a position compensation program of an encoder is stored. When the position compensation program of the encoder is executed by a processor, the steps of the position compensation method of the encoder as described above are implemented.
[0027] In the technical solution provided by the present invention, the first decoding information actually output by the encoder in the first decoding area is obtained, and the first decoding information can be used as a solution reference; since the positions of each decoding area in the encoder are clear and fixed, the theoretical decoding information of the encoder in the second decoding area can be calculated according to the first decoding information obtained at the first decoding area through preset rules, and the theoretical decoding information includes the theoretical detection information of the stator disk; then, the second decoding information actually output by the encoder in the second decoding area is obtained, and the second detection information includes the second detection information of the stator disk and the second position information of the mover disk; by comparing the theoretical detection information with the second detection information, the error information can be calculated; by using the error information as compensation for the second position information, the spacing error between the stator disk and the mover disk in the magnetizing direction of the encoder can be eliminated, and more accurate target position information of the second decoding area can be obtained, thereby improving the detection accuracy of the encoder. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0029] Figure 1 A schematic diagram of an embodiment of an encoder provided by the present invention;
[0030] Figure 2 for Figure 1 Schematic diagram of the middle mover disc from bottom view;
[0031] Figure 3 for Figure 1 Schematic top view of the middle stator disc;
[0032] Figure 4 A schematic diagram of the hardware operating environment of the position compensation device of the encoder provided by the present invention;
[0033] Figure 5A schematic diagram of a first embodiment of a position compensation method for an encoder provided by the present invention;
[0034] Figure 6 A schematic diagram of a second embodiment of the position compensation method for an encoder provided by the present invention;
[0035] Figure 7 A schematic diagram of a third embodiment of the position compensation method for an encoder provided by the present invention;
[0036] Figure 8 This is a flow chart of an embodiment of the encoder position compensation method provided by the present invention.
[0037] Label name Label name 100 encoder 211 Hall effect sensors 1 Movers 3 Encoder position compensation device 11 Magnetic pole 31 processor 11a First magnetic pole portion 32 Communication bus 11b Second magnetic pole portion 33 User Interface 2 stator disc 34 Network interface 21 Magnetic sensor 35 Memory
[0038] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0039] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0040] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications will also change accordingly.
[0041] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the meaning of "and / or" appearing throughout the text includes three parallel schemes. Taking "A and / or B" as an example, it includes scheme A, or scheme B, or a scheme in which A and B are satisfied at the same time. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0042] A rotary encoder is a device that detects the rotational position of a rotating body relative to a fixed body. Specifically, it compiles and converts signals or data into a signal form that can be used for communication, transmission, and storage. Rotary encoders can directly convert measured angular displacement into digital signals and are widely used in automatic measurement and control systems. Rotary encoders, including magnetic encoders, are often installed outside the motor shaft. This is affected by factors such as mounting accuracy and motor vibration, leading to position detection errors during use, reducing the encoder's measurement accuracy.
[0043] In view of the above, the present invention provides a position compensation device for an encoder, which is used to compensate and correct detection data output by the encoder. The position compensation device for an encoder can be applied to an encoder. Therefore, the present invention also provides an encoder, which includes a main body and the position compensation device for the encoder.
[0044] See also Figures 1 to 4 , the accompanying drawings show a specific embodiment of the encoder provided by the present invention.
[0045] See also Figures 1 to 3 The main body of the encoder 100 includes a stator disk 2 and a movable disk 1 rotating relative to the stator disk 2. The movable disk 1 and the stator disk 2 define a plurality of decoding areas. The movable disk 1 generates a magnetic field during its rotation stroke so that the stator disk 2 can detect each of the decoding areas in turn. The plurality of decoding areas include a first decoding area and a second decoding area.
[0046] It is understood that the shapes of the stator disc 2 and the mover disc 1 are not limited and can be circular, elliptical, polygonal or other special shapes, and can be set according to actual needs. In this embodiment, the stator disc 2 and the mover disc 1 are roughly disc-shaped.
[0047] The stator disk 2 includes a disk-shaped body and a plurality of magnetic sensors 21 provided on one end surface of the disk-shaped body. The plurality of magnetic sensors 21 are arranged along the circumferential direction of the disk-shaped body.
[0048] The mover disc 1 is coaxially connected to the stator disc 2 and can rotate relative to the stator disc 2 under external force. The mover disc 1 is provided with multiple magnetic pole portions 11 along its circumference. It is understood that the mover disc 1 can also include a disc-shaped body, with the multiple magnetic pole portions 11 arranged on the disc-shaped body of the mover disc 1; alternatively, the mover disc 1 can be directly composed of multiple magnetic pole portions 11 spliced together. The multiple magnetic pole portions 11 are magnetized along the axial direction of the mover disc 1. Therefore, the axial direction of the mover disc 1 is also the magnetization direction of the encoder 100.
[0049] There is no restriction on the number of the magnetic pole portions 11 and the setting data of the magnetic sensors 21, and they can be set according to actual needs; for example, in this embodiment, the magnetic pole portions 11 are provided with 4 pairs, and the magnetic sensors 21 can be set to 6.
[0050] The number of magnetic pole portions 11 and the number of magnetic sensors 21 can determine the number of decoding areas. Once the layout positions of the plurality of magnetic pole portions 11 on the mover disk 1 and the layout positions of the plurality of magnetic sensors 21 on the stator disk 2 are determined, the positions of the plurality of decoding areas can also be uniquely and accurately determined.
[0051] When the mover disc 1 rotates relative to the stator disc 2, it generates a magnetic field, and the sensors on the stator disc 2 sequentially sense each decoding area. For ease of understanding, the decoding areas are defined in a sequential order, with the first decoding area preceding the second decoding area.
[0052] Specifically, the first decoding area and the second decoding area can be two adjacent decoding areas, or they can be set with several other decoding areas between the first decoding area and the second decoding area; the first decoding area can be the area that is decoded first among multiple decoding areas, or it can be a decoding area located at any position among multiple decoding areas.
[0053] When the encoder 100 is in operation, the position error difference generated is small. At this time, there is no restriction on the selection of the first decoding area and the second decoding area. They can be the first two of the multiple decoding areas, or two decoding areas closer to the middle. However, generally, the position error generated by the encoder 100 changes in real time during its operation. Therefore, in this embodiment, among the multiple decoding areas, the first two adjacent decoding areas to be decoded are defined as the first decoding area, and the second two adjacent decoding areas to be decoded are defined as the second decoding area. For example, among the first three decoding areas, the middle decoding area is both the second decoding area of the previous decoding area and the third decoding area of the next decoding area.
[0054] It should be noted that this design does not limit the type of the magnetic sensor 21. In specific applications, the magnetic sensor 21 can be a magnetoresistive sensor or a Hall sensor 211. In this embodiment, the magnetic sensor 21 is specifically configured as a Hall sensor 211.
[0055] In addition, the arrangement sizes of the plurality of magnetic pole portions 11 on the mover disk 1 can be set to be the same, and the arrangement distances of the plurality of magnetic sensors 21 on the stator disk 2 can be set to be equidistant.
[0056] Alternatively, in one embodiment, when one end surface of the stator disk 2 is provided with a plurality of magnetic sensors 21 distributed along the circumferential direction, and the mover disk 1 is provided with a plurality of magnetic pole portions 11 distributed along the circumferential direction, at least some of the magnetic pole portions 11 are provided with different sizes.
[0057] Alternatively, in one embodiment, when one end surface of the stator disk 2 is provided with a plurality of magnetic sensors 21 distributed along the circumferential direction, and the mover disk 1 is provided with a plurality of magnetic pole portions 11 distributed along the circumferential direction, the spacing between each two adjacent magnetic sensors 21 is at least partially different.
[0058] For example, the dimensions of at least a portion of the magnetic pole portions 11 are configured differently:
[0059] The dimensions of the plurality of magnetic pole portions 11 include their length along the circumference of the mover disc 1. That is, on the mover disc 1, on the circumference formed by the arrangement of the plurality of magnetic pole portions 11, the lengths of corresponding portions of the magnetic pole portions 11 on the circumference are different. This is a reasonable distribution method obtained through mathematical calculations.
[0060] For further information, please refer to Figure 2 The plurality of magnetic pole portions 11 include a plurality of staggered first magnetic pole portions 11a and a plurality of second magnetic pole portions 11b, wherein the polarity of each first magnetic pole portion 11a and each second magnetic pole portion 11b is opposite. That is, one of the first magnetic pole portion 11a and the second magnetic pole portion 11b is an N pole and the other is an S pole. The movable disk 1 has staggered N poles and S poles distributed on the circumference. Because some of the first magnetic pole portions 11a and the second magnetic pole portions 11b have different sizes, or some of the second magnetic pole portions 11b have different sizes, or some of the first magnetic pole portions 11a and some of the second magnetic pole portions 11b have different sizes, or some of the above situations exist, the N poles and S poles are unevenly distributed on the circumference of the movable disk 1. Specifically, the magnetic sensor 21 outputs a rectangular wave signal, which can accurately sense the state.
[0061] In one embodiment of the present invention, the mover disc 1 includes a magnetic ring having multiple magnetic zones distributed along the circumference of the mover disc 1, forming a plurality of first magnetic pole portions 11a and a plurality of second magnetic pole portions 11b. Specifically, the plurality of first magnetic pole portions 11a and the plurality of second magnetic pole portions 11b are arranged continuously along the circumference. In this configuration, the magnetic ring is magnetized axially, and the magnetic sensor 21 detects the magnitude and direction of the axial magnetic field to determine the position.
[0062] In another embodiment, the movable disc 1 has a plurality of magnetic blocks arranged at intervals along the circumferential direction, and each of the magnetic blocks forms a first magnetic pole portion 11a and a second magnetic pole portion 11b at both ends of the movable disc 1 in the circumferential direction. Each of the magnetic blocks can be understood as a magnet with an N pole and an S pole. With such an arrangement, the plurality of magnetic blocks can be magnetized separately to obtain the corresponding first magnetic pole portion 11a and second magnetic pole portion 11b. Compared with the arrangement of magnetic rings, magnetization is more convenient and reduces the difficulty of processing. It should be noted that each of the magnetic blocks is magnetized along the axial direction. Ideally, the spacing between each of the magnetic blocks is the same. The purpose of this arrangement is to obtain a better effect based on the arrangement of the plurality of magnetic blocks, so that there is a certain gap between each of the magnetic blocks. However, in actual engineering practice, in order to compensate for the distortion of the magnetic field, the spacing between each of the magnetic blocks will be adjusted, and there are differences.
[0063] In other embodiments, the magnetic properties of the plurality of magnetic pole portions 11 are the same, the plurality of magnetic pole portions 11 are spaced apart, and the spacing between at least some of the magnetic pole portions 11 is different. That is, the magnetic pole distribution on the entire circumference is a single pole, and the polarity of each magnetic pole portion 11 is an N pole or an S pole. Compared with the method of setting two magnetic poles, it can be understood that the corresponding S pole or N pole is left blank, and the length of the blank position is the length of the corresponding magnetic pole portion 11. Such a setting does not affect the overall principle of magnetic induction and position decoding of the magnetic sensor 21, and saves materials. It should be noted that in this structural state, the setting of the single pole does not have an absolute magnetic field zero point after the magnetic field is formed, so the signal processing will be different, which will not be explained in detail here.
[0064] Reference Figure 4 , Figure 4 This is a structural diagram of the encoder position compensation device 3 in the hardware operating environment involved in the embodiment of the present invention.
[0065] like Figure 4As shown, the encoder position compensation device 3 may include: a processor 31, such as a central processing unit (CPU), a communication bus 32, a user interface 33, a network interface 34, and a memory 35. The processor 31 includes, for example, a position calculation unit. The position calculation unit can measure the magnitude and direction of the magnetic field generated by the mover disk 1 through the Hall sensor 211 and calculate the relative rotation angle between the stator disk 2 and the mover disk 1. The communication bus 32 is used to enable communication between these components. The user interface 33 may include a display and an input unit such as a keyboard. Optionally, the user interface 33 may also include a standard wired interface or a wireless interface. The network interface 34 may optionally include a standard wired interface or a wireless interface (such as a wireless fidelity (WI-FI) interface). The memory 35 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk storage device. The memory 35 may optionally be a storage device independent of the aforementioned processor 31.
[0066] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the position compensation device 3 of the encoder, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0067] like Figure 4 As shown, the memory 35 as a storage medium may include an operating system, a network communication module, a user interface 33 module, and a position compensation program of the encoder 100 .
[0068] exist Figure 4 In the position compensation device 3 of the encoder shown, the network interface 34 is mainly used for data communication with the network server; the user interface 33 is mainly used for data interaction with the user; in the present invention, the processor 31 and the memory 35 of the position compensation device 3 of the encoder can be set in the encoder 100, and the position compensation device 3 of the encoder calls the position compensation program of the encoder 100 stored in the memory 35 through the processor 31, and executes the position compensation method of the encoder 100 provided by the embodiment of the present invention.
[0069] Based on the structure of the above-mentioned encoder 100, for example, the encoder 100 includes a main body and an encoder position compensation device 3, the main body includes a stator disk 2 and a movable disk 1 rotating relative to the stator disk 2, the movable disk 1 and the stator disk 2 define a plurality of decoding areas, the movable disk 1 generates a magnetic field during its rotation stroke, so that the stator disk 2 detects each of the decoding areas in turn, and the plurality of decoding areas include a first decoding area and a second decoding area.
[0070] The embodiment of the present invention provides a position compensation method of an encoder 100, referring to Figure 5 , Figure 5 FIG. 1 is a flow chart of a first embodiment of a position compensation method for an encoder 100 according to the present invention.
[0071] Please combine Figure 8 In this embodiment, the position compensation method of the encoder 100 includes the following steps:
[0072] Step S100: Acquire first decoding information of the encoder 100 in the first decoding area;
[0073] It is understood that when the encoder 100 begins operation, it obtains first detection information of the stator disk 2 in the first decoding area. This first detection information is a single detection signal directly output, or a multi-channel detection signal formed by superimposing multiple magnetic sensors 21 according to a predetermined rule. Gray code calculation is performed on this first detection signal to obtain first position information of the mover disk 1 in the first decoding area. It is understood that this first position information is used as the reference information for subsequent decoding areas and is generally considered to be the precise position information of the mover disk 1 in the first decoding area.
[0074] Step S200: Calculating theoretical detection information of the stator disk 2 in the second decoding area based on the first decoding information;
[0075] In this embodiment, in view of the above, the first decoding information can be the first detection information of the stator disk 2 in the first decoding area, and / or the first position information of the mover disk 1 in the first decoding area, or other information that can be obtained through decoding calculation. The position compensation device 3 of the encoder uses the obtained first decoding information as reference information, and can calculate the theoretical detection information of the stator disk 2 in the second decoding area through the reaction formula between the preset first decoding information and the theoretical detection information; or through the preset one-to-one mapping association table between the first decoding information and the theoretical detection information, the theoretical detection information of the stator disk 2 in the second encryption area is obtained by looking up the table. Of course, other algorithms can also be used to determine the theoretical detection information.
[0076] Step S300: Acquire second position information of the mover disc 1 in the second decoding area and second detection information of the stator disc 2 in the second decoding area;
[0077] In this embodiment, as the mover disc 1 continues to rotate relative to the stator disc 2, similarly to the above, second decoded information from the encoder 100 in the second decoding area is obtained. The second decoded information includes second position information of the mover disc 1 in the second decoding area and second detection information of the stator disc 2 in the second decoding area. The second position information is determined by decoding the second detection information after performing the gray code calculation described above. It can be understood that the second position information and the second detection information are actual measured values generated by the encoder 100 under the influence of axial runout error.
[0078] Step S400: Calculating error information based on the theoretical detection information and the second detection information;
[0079] Of course, in the above step S200, the theoretical position information of the movable disk 1 in the second decoding area can be calculated by the first decoding information, and then the theoretical position information and the second position information can be compared to obtain another error information. However, in actual applications, multiple magnetic sensors 21 respectively sense the position of the same magnetic pole portion 11, especially when the sizes of the multiple magnetic pole portions 11 are at least partially different, so that the detection signals obtained by the multiple magnetic sensors 21 when detecting each magnetic pole portion 11 are multi-channel superimposed. Only by performing single-point value calculation based on the theoretical position information and the second position information, the deviation is relatively large. For example, it is applicable to the usage scenario where the difference in position error of each decoding area of the encoder 100 is smaller than the preset one.
[0080] In this embodiment, by comparing the theoretical detection information with the second detection information, which is equivalent to performing comparison processing from the source signal, more accurate error information can be obtained, which is particularly suitable for the above-mentioned usage scenarios where at least part of the size of each magnetic pole portion 11 is different, or at least part of the spacing between each magnetic sensor 21 is different.
[0081] Step S500: Compensating the second position information according to the error information to obtain target position information.
[0082] It can be understood that when the error information has been determined, the error information can be used to compensate for the second position information, such as directly correcting the second detection signal, or converting it into a compensation value of position information according to a set algorithm to directly compensate for the second position information, or more accurate target position information.
[0083] Based on the above, in the technical solution provided by the present invention, the first decoding information actually output by the encoder 100 in the first decoding area is obtained, and the first decoding information can be used as a solution reference; since the positions of each decoding area in the encoder 100 are clear and fixed, the theoretical decoding information of the encoder 100 in the second decoding area can be calculated according to the first decoding information obtained at the first decoding area through preset rules, and the theoretical decoding information includes the theoretical detection information of the stator disk 2; then, the second decoding information actually output by the encoder 100 in the second decoding area is obtained, and the second detection information includes the second detection information of the stator disk 2 and the second position information of the mover disk 1; by comparing the theoretical detection information with the second detection information, the error information can be calculated; by using the error information as compensation for the second position information, the spacing error between the stator disk 2 and the mover disk 1 in the magnetizing direction of the encoder 100 can be eliminated, and more accurate target position information of the second decoding area can be obtained, thereby improving the detection accuracy of the encoder 100.
[0084] For further information, please refer to Figure 6 , Figure 6 FIG. 1 is a flow chart of a second embodiment of a position compensation method for an encoder 100 according to the present invention.
[0085] As described above, in step S100, obtaining the first decoding information of the encoder 100 in the first decoding area specifically includes:
[0086] Step S110: Acquire first detection information of the stator disk 2 in the first decoding area;
[0087] Step S120: Calculating first position information of the mover disc 1 in the first decoding area according to the first detection information.
[0088] In this embodiment, the first detection information can be obtained directly by reading the sensing data of the magnetic sensor 21. The processor 31 in the position compensation device 3 of the encoder includes a position calculation unit. The position calculation unit is provided with a decoding program, which can calculate each detection signal obtained by sensing to obtain corresponding position information. Therefore, when the position calculation unit receives the first detection information of the stator disk 2 in the first decoding area, the first detection signal is calculated to obtain the first position information of the sub-disk in the first decoding area.
[0089] For further information, please refer to Figure 7 , Figure 7 FIG. 1 is a flow chart of a third embodiment of a position compensation method for an encoder 100 according to the present invention.
[0090] As described above, in step S200, the step of calculating the theoretical detection information of the stator disk 2 in the second decoding area based on the first decoding information specifically includes:
[0091] Step S210: determining the rotation speed of the mover disc 1 relative to the stator disc 2 according to the first position information and a preset algorithm;
[0092] Step S220: Calculating theoretical position information of the mover disc 1 in the second decoding area according to the rotation speed;
[0093] Step S230: Calculating theoretical detection information of the stator disc 2 in the second decoding area according to the theoretical position information.
[0094] In this embodiment, since the relative position relationship of each decoding area is determined, the rotation speed of the mover disk 1 relative to the stator disk 2 can be estimated based on the first position information; and through the rotation speed, the theoretical position information of the mover disk 1 in the second decoding area can be further calculated, and then, similarly to the above, reverse decoding is performed based on the theoretical position information to determine the theoretical detection information of the stator disk 2 in the second decoding area.
[0095] Furthermore, in one embodiment, the preset algorithm includes a differential algorithm or a phase-locked loop algorithm.
[0096] It is understood that the differential algorithm and the phase-locked loop algorithm are both mature technologies and will not be described in detail here. Of course, other technologies can also be applied to calculate the rotation angle of the mover disk 1 relative to the stator disk 2 through position information, which will not be described in detail here. The position compensation device 3 of the encoder pre-compiles the differential algorithm and / or phase-locked loop algorithm. After the position compensation device 3 of the encoder receives the first position information, it can directly obtain the rotation speed of the mover disk 1 relative to the stator disk 2.
[0097] Next, see Figure 8 In one embodiment, each pair of adjacent decoding regions in the plurality of decoding regions constitutes the first decoding region and the second decoding region, respectively. Thus, when performing computations on each group of the first decoding region and the second decoding region, the process from steps S100 to S500 is repeated, forming a closed-loop feedback loop. This allows for real-time position compensation during the operation of the encoder 100, ensuring that each computation output of the encoder 100 is more accurate, compensated, and target position information.
[0098] It should be understood that the above is only an example and does not constitute any limitation to the technical solution of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any limitation on this.
[0099] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural transformation made by using the contents of the present description and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields, is included in the patent protection scope of the present invention.
Claims
1. A position compensation method for an encoder, characterized in that: The encoder includes a stator disk and a mover disk rotating relative to the stator disk. The mover disk and the stator disk define a plurality of decoding areas. The mover disk generates a magnetic field during its rotation stroke so that the stator disk can detect each decoding area in sequence. The plurality of decoding areas include a first decoding area and a second decoding area. The position compensation method of the encoder includes: Obtaining first decoding information of the encoder in the first decoding area; Calculating theoretical detection information of the stator disk in the second decoding area based on the first decoding information; Acquire second position information of the mover disc in the second decoding area and second detection information of the stator disc in the second decoding area; Calculating error information based on the theoretical detection information and the second detection information; The second position information is compensated according to the error information to obtain target position information.
2. The encoder position compensation method according to claim 1, wherein: The step of obtaining first decoding information of the encoder in the first decoding area includes: Acquire first detection information of the stator disk in the first decoding area; First position information of the mover disk in the first decoding area is calculated according to the first detection information.
3. The encoder position compensation method according to claim 2, wherein: The step of calculating theoretical detection information of the stator disk in the second decoding area based on the first decoding information includes: determining a rotational speed of the mover disc relative to the stator disc based on the first position information and a preset algorithm; Calculating theoretical position information of the mover disc in the second decoding area according to the rotation speed; The theoretical detection information of the stator disc in the second decoding area is calculated according to the theoretical position information.
4. The encoder position compensation method according to claim 3, wherein: The preset algorithm includes a differential algorithm or a phase-locked loop algorithm.
5. The encoder position compensation method according to claim 1, wherein: Among the plurality of decoding areas, every two adjacent decoding areas constitute the first decoding area and the second decoding area, respectively.
6. A position compensation device for an encoder, characterized in that: The invention comprises a memory, a processor and a position compensation program of an encoder stored in the memory and executable on the processor, wherein the position compensation program of the encoder is configured to implement the steps of the position compensation method of the encoder according to any one of claims 1 to 5.
7. An encoder, characterized in that include: A main body, the main body including a stator disk and a mover disk rotating relative to the stator disk, the mover disk and the stator disk defining a plurality of decoding areas, the mover disk generating a magnetic field during its rotational stroke so that the stator disk sequentially detects each of the decoding areas, the plurality of decoding areas including a first decoding area and a second decoding area; and The position compensation device of an encoder as claimed in claim 6.
8. The encoder according to claim 7, wherein One end surface of the stator disc is provided with a plurality of magnetic sensors distributed along the circumferential direction, and the mover disc is provided with a plurality of magnetic pole portions distributed along the circumferential direction; Wherein, at least some of the magnetic pole portions are arranged with different sizes.
9. The encoder according to claim 8, wherein The plurality of magnetic pole portions include a plurality of first magnetic pole portions and a plurality of second magnetic pole portions that are arranged alternately, and the polarities of the first magnetic pole portions and the second magnetic pole portions are opposite.
10. A storage medium, characterized in that: The storage medium stores a position compensation program for an encoder, and when the position compensation program for the encoder is executed by the processor, the steps of the position compensation method for the encoder according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Motor rotor angle predicting device and motor rotor angle predicting method
CN103001561A
Rotary encoder
CN105492869A