Driving all-in-one machine and output shaft multi-turn absolute position detection method thereof
By acquiring the detection values of each level of the coding axis and decomposing them into circle values and in-circle residual values based on the transmission ratio, a mapping relationship is established and compensation is performed. This solves the problem of asynchronous readings caused by mechanical backlash in multi-level coding systems, and achieves continuity and accuracy in position calculation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KINCO ELECTRIC SHENZHEN
- Filing Date
- 2026-01-08
- Publication Date
- 2026-05-01
AI Technical Summary
In existing multi-level coding systems, the inherent backlash characteristics of mechanical transmission cause asynchronous readings at the zero-crossing positions of each coding axis, resulting in discontinuities in position calculation results.
By acquiring the detection values of each level of encoder axis, and decomposing them into circle values and residual values within the circle based on the transmission ratio, a mapping relationship from the previous level to the next level is established. The reading deviation is corrected by half-circle threshold comparison and compensation rules to ensure the continuity and accuracy of position calculation.
It achieves precise quantification of the state of a multi-level coding system, corrects reading deviations caused by mechanical backlash, ensures the continuity and accuracy of position calculation, and avoids position calculation errors caused by gear backlash.
Smart Images

Figure CN121954064A_ABST
Abstract
Description
Technical Field
[0001] This invention generally relates to the fields of mechatronics and precision measurement technology, and in particular to a drive integrated machine and a method for detecting the absolute position of its output shaft in multiple turns. Background Technology
[0002] As a key position measurement sensor in modern drive systems, encoders are widely used in industrial automation, robot control and precision manufacturing. Their core function is to provide real-time and accurate position feedback signals for closed-loop control systems.
[0003] In mechatronic equipment, encoders achieve precise measurement of angles or displacements through a close integration of mechanics and electronics. Current technologies commonly employ a combination of multi-stage reduction gear systems and single-turn encoders to construct multi-turn absolute position detection systems for the output shaft. This approach transmits the rotational motion of the output shaft to multiple encoder shafts via gear transmission. Sensors on each encoder shaft collect rotational angle data, and the control system calculates the position based on a preset transmission ratio, thus achieving wide-range absolute position measurement. This technology has been applied in servo drive systems. Its basic architecture includes a power gear system, multi-stage encoder shafts, and a signal processing unit. Position information is acquired through the setting of mechanical transmission ratios and the processing of sensor data.
[0004] However, in the existing technology, the inherent backlash characteristics of mechanical transmission in multi-level coding systems cause asynchronous readings of each coding axis at the zero-crossing position, resulting in discontinuity in position calculation results. Summary of the Invention
[0005] This invention provides a method for multi-turn absolute position detection of the output shaft of a drive integrated machine. The drive integrated machine includes an encoder system and a power gear system. The encoder system includes at least two levels of encoder shafts, with the upper-level encoder shaft driving the lower-level encoder shaft to rotate. The transmission ratio between adjacent encoder shafts is equal and is an integer power of 2. The first-level encoder shaft is coaxially connected to the output shaft of the power gear system. The method includes: S1. Obtain the detection values of each level of the encoding axis, and based on the transmission ratio, decompose the detection values of the other levels of the encoding axis except the first level encoding axis into the circle value and the residual value within the circle; S2. Based on the transmission ratio between two adjacent coding axes, establish a mapping relationship from the coding axis of the previous level to the coding axis of the next level, and convert the detection value of the coding axis of the previous level into a mapping value with the same dimensions as the detection value of the coding axis of the next level. S3. Obtain the difference between the mapping value and the corresponding next-level coding axis's in-loop remainder value, and compare the difference with the half-loop threshold based on the compensation rule to determine whether to compensate for the number of loops of the next-level coding axis. S4. Based on the number of revolutions of each level of the encoder shaft after compensation and the detection value of the first level encoder shaft, the absolute position of the output shaft of the power gear system is synthesized.
[0006] As an implementation method, the half-turn threshold is determined based on the transmission ratio K and the single-turn resolution M of the encoder axis, and the half-turn threshold is M / (2K).
[0007] As a feasible method, it is characterized by, The compensation rule includes: if the difference is less than or equal to the half-circle threshold, the number of circles of the next level encoding axis is increased by 1 as compensation; If the difference is greater than the half-circle threshold, then the number of circles of the next level encoding axis is reduced by 1 as compensation.
[0008] As an alternative implementation, when the encoder system includes three or more levels of encoder axes, a step is further included between S3 and S4: Based on the boundary overflow rule, the number of cycles after compensation for the Nth level coding axis is processed, where N≥3 and N is a positive integer. The boundary overflow rule includes: if the number of rounds after compensation of the (N-1)th level coding axis undergoes a cyclic carry from the maximum value to the minimum value, then the number of rounds of the Nth level coding axis is increased by 1 as compensation; If the number of cycles after compensation for the (N-1)th level coding axis undergoes a cyclic carry from the minimum to the maximum value, then the number of cycles for the Nth level coding axis is reduced by 1 for compensation.
[0009] As an implementation, the detection value of the first-level coding axis is A, T2 is the number of compensation cycles for the second-level coding axis after processing by the compensation rule, T3 is the number of compensation cycles for the third-level coding axis after processing by the compensation rule and the boundary overflow rule, ..., TN is the number of compensation cycles for the Nth-level coding axis after processing by the compensation rule and the boundary overflow rule. The absolute position P of the output shaft is obtained using the following formula: P = (TN × K) N-1 +……+ T3 × K 2 + T2 × K 1 ) ×M+ A.
[0010] The present invention also provides a drive unit, comprising: a power gear system and an encoder system.
[0011] The power gear system includes the motor input shaft and output shaft; The encoder system includes at least two levels of encoder shafts, with the upper-level encoder shaft driving the lower-level encoder shaft to rotate. The transmission ratio between adjacent encoder shafts is equal and is an integer power of 2. The first-level encoder shaft is coaxially connected to the output shaft.
[0012] As an alternative implementation, the encoder system may further include a detection gear assembly disposed between two adjacent encoder shafts for transmitting power from the upper encoder shaft to the lower encoder shaft.
[0013] As a possible implementation, the transmission ratios of each of the aforementioned detection gear assemblies are equal.
[0014] The above scheme achieves precise quantification of the state of a multi-level coding system by acquiring the detection values of each level of coding axis and decomposing them into revolution values and in-revolution values based on the transmission ratio. A mapping relationship is established from the upper first-level coding axis to the lower first-level coding axis based on the transmission ratio, and the mapping values are obtained after unifying the dimensions, thus constructing a comparable basis for upper and lower level coding data. By obtaining the difference between the mapping value and its corresponding in-revolution value of the lower first-level coding axis and comparing it with a half-revolution threshold, the asynchronous zero-crossing phenomenon caused by gear backlash can be accurately identified. Dynamic compensation of the number of revolutions of the lower first-level coding axis based on the difference comparison results effectively corrects the reading deviation caused by mechanical backlash. Finally, the absolute position of the output shaft is synthesized based on the compensated number of revolutions of each level of coding axis, ensuring the continuity and accuracy of position calculation and avoiding position calculation errors caused by gear backlash. Attached Figure Description
[0015] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 Schematic diagram of the encoder system structure of the integrated driver provided in this embodiment of the invention. Figure 1 ; Figure 2 Schematic diagram of the encoder system structure of the integrated driver provided in this embodiment of the invention. Figure 2 ; Figure 3 Schematic diagram of the encoder system structure of the integrated driver provided in this embodiment of the invention. Figure 3 . Detailed Implementation
[0016] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0017] A drive unit includes a power gear system, an encoder system, and a driver. The driver is the control unit of the drive unit; the power gear system is used to convert the high-speed, low-torque output of its motor into the low-speed, high-torque output required by the output shaft. The power gear system can be a reduction gear mechanism and includes a motor input shaft, an intermediate transmission shaft, and an output shaft.
[0018] The encoder system is used to accurately detect the absolute position of the output shaft. The encoder system includes at least two levels of encoder shafts, with the upper-level encoder shaft driving the lower-level encoder shaft to rotate; and a detection gear assembly disposed between adjacent encoder shafts to transmit power from the upper-level encoder shaft to the lower-level encoder shaft. The first-level encoder shaft 10 is coaxially connected to the output shaft. The transmission ratio between adjacent encoder shafts is equal and is an integer power of 2; correspondingly, the transmission ratio of each detection gear assembly is equal. It should be noted that each detection gear assembly includes multiple gear shafts and gears fitted onto the gear shafts; this embodiment does not limit the structure of the detection gear assembly.
[0019] In practical applications, for example, an encoder system includes two levels of encoder shafts: a first-level encoder shaft 10 and a second-level encoder shaft 20. The first-level encoder shaft 10 drives the second-level encoder shaft 20 to rotate. The first-level encoder shaft 10 is coaxially connected to the output shaft. A first detection gear assembly 40 is provided between the first-level encoder shaft 10 and the second-level encoder shaft 20, connecting the first-level encoder shaft 10 and the second-level encoder shaft 20 so that the first-level encoder shaft 10 and the second-level encoder shaft 20 rotate approximately synchronously; or, like Figures 1-3 As shown, the encoder system includes three levels of encoder shafts: a first-level encoder shaft 10, a second-level encoder shaft 20, and a third-level encoder shaft 30. The first-level encoder shaft 10 drives the second-level encoder shaft 20 to rotate, and the second-level encoder shaft 20 drives the third-level encoder shaft 30 to rotate. A first detection gear assembly 40 is provided between the first-level encoder shaft 10 and the second-level encoder shaft 20, connecting the first-level encoder shaft 10 and the second-level encoder shaft 20 so that the first-level encoder shaft 10 and the second-level encoder shaft 20 rotate approximately synchronously. A second detection gear assembly 50 is provided between the second-level encoder shaft 20 and the third-level encoder shaft 30, connecting the second-level encoder shaft 20 and the third-level encoder shaft 30 so that the second-level encoder shaft 20 and the third-level encoder shaft 30 rotate approximately synchronously. The transmission ratio from the first-level encoder shaft 10 to the second-level encoder shaft 20 is K1, and the transmission ratio from the second-level encoder shaft 20 to the third-level encoder shaft 30 is K2, where K1 = K2. Alternatively, Furthermore, each encoder shaft is independently equipped with a sensing unit consisting of a magnet and a magnetic encoder magnetic induction chip. For example, a first magnet is installed on the first-level encoder shaft 10, and a first magnetic encoder magnetic induction chip is soldered onto the encoder circuit board facing the first magnet and maintaining a preset gap. This first magnetic induction chip directly and in real time detects the angle of rotation of the first magnet with the shaft, thereby obtaining the absolute angle and / or number of turns within a single turn of the first-level encoder shaft 10. Similarly, a second magnet is installed on the second-level encoder shaft 20, and a second magnetic encoder magnetic induction chip is soldered onto the encoder circuit board facing the second magnet and maintaining a preset gap. This second magnetic induction chip directly and in real time detects the angle of rotation of the second magnet with the shaft, thereby obtaining the absolute angle and / or number of turns within a single turn of the second-level encoder shaft 20. A third magnet is installed on the third-level encoder shaft 30, and a third magnetic encoder magnetic induction chip is soldered onto the encoder circuit board facing the third magnet and maintaining a preset gap. This third magnetic induction chip directly and in real time detects the angle of rotation of the third magnet with the shaft, thereby obtaining the absolute angle and / or number of turns within a single turn of the third-level encoder shaft 30.
[0020] A detection transmission path is formed by the sensing units corresponding to each level of the encoding axis to accurately obtain the absolute position of the detection output axis. The following is a detailed description through an example: In a first specific embodiment, the encoder system includes two levels of encoding axes: a first-level encoding axis 10 and a second-level encoding axis 20. K1=K2=16. A 16-bit detection value A (0-65535) is acquired based on a sensor on the first-level encoding axis 10, and a 16-bit detection value B (0-65535) can be output based on a sensor on the second-level encoding axis 20.
[0021] For example, when the output shaft rotates a little over one revolution, the detection value A of the first-level encoding axis 10 is 100; the detection value B of the second-level encoding axis 20 is 4090. The value of B ranges from 4095-2047≤B≤4095+2047. It should be noted that when the output shaft rotates a little more than two revolutions, the value of B is: 4095×2-2047 (6143)≤B≤4095×2+2047 (10237); or, when the output shaft rotates a little more than three revolutions, the value of B is: 4095×3-2047 (10238)≤B≤4095×3+2047 (14332); or, when the output shaft rotates a little more than four revolutions, the value of B is: 4095×4-2047 (14333)≤B≤4095×4+2047 (18427); referring to the above description, this embodiment will not list them one by one.
[0022] In related technologies, the steps to obtain the absolute position P of the output shaft are as follows: Obtain B′ = (B / 4095), round B′ to the nearest integer, i.e., B′ = 0. B′ reflects the number of rotations of the output shaft.
[0023] Obtain the absolute position P of the output shaft, P = B′ × 65535 + A = 100.
[0024] In practical applications, the presence of gear backlash in the first detection gear assembly 40 may cause the second-level encoder shaft 20 to respond lag, resulting in inaccurate values for B′ and consequently, incorrect calculation of the absolute position P of the output shaft.
[0025] Based on this, the following method is proposed in this embodiment: S1. Analyze the detection values of the second-level encoding axis 20 to obtain the circle value and the residual value within the circle; B can be resolved to obtain the circle value and the remainder value within the circle (0-4095), i.e., B 圈数 =B / 4096=0, B 余数 =4090.
[0026] S2. Characterize the detection value A of the first-level coding axis 10 using the dimensions of the detection value B of the second-level coding axis 20 to obtain A. 一级至二级映射值 This involves compressing the dimension of the detected value A (0-65535) to the dimension (0-4095). 一级至二级映射值 =A÷16=100÷16=6 (rounded down).
[0027] S3. Based on the compensation rule, determine whether the second-level coding axis has lost its step in 20 cycles; Combine the half-circle threshold with A 一级至二级映射值 and B 余数 Compare the differences, in detail: If A 一级至二级映射值 -B 余数 When A is negative, 一级至二级映射值 -B 余数 ≤-2047, or, A 一级至二级映射值 -B 余数 If the value is less than -2048, then the number of cycles of the second-level coding axis 20 is increased by 1 as compensation. If A 一级至二级映射值 -B 余数 When A is positive, 一级至二级映射值 -B 余数 If the value is greater than 2047, then the number of cycles of the second-level coding axis 20 will be reduced by 1 as compensation.
[0028] Based on this, A 一级至二级映射值 -B 余数 =-4084≤-2047, or -2048, A 一级至二级映射值 -B 余数The difference is used to characterize the phase difference between the first-level encoding axis 10 and the second-level encoding axis 20. Based on half of the normalized range as the judgment threshold, it can clearly and efficiently define the boundary between the reasonable phase difference caused by gear backlash and the loss of synchronization caused by miscounting the number of revolutions. If A 一级至二级映射值 -B 余数 If the difference is less than -2047, it is considered that there is a loss of synchronization due to a miscount of the number of revolutions, that is, there is a loss of synchronization in the count of the number of revolutions of the second-level coding axis 20. The compensation number of the second-level coding axis 20 (B) 补偿 )=B 圈数 +1 = 0 + 1.
[0029] S4, Absolute position of output shaft P = (B 补偿 ×16)65536+A.
[0030] It should be noted that in S3, the half-turn threshold is determined based on the transmission ratio K and the single-turn resolution M of the encoding axis, and the half-turn threshold is M / (2K). For example, when the single-turn resolution of the encoding axis is 16 bits = 65536 counts, the transmission ratio K between two adjacent encoding axes is 8, and the half-turn threshold is 4096; when the single-turn resolution of the encoding axis is 14 bits = 16384 counts, the transmission ratio K between two adjacent encoding axes is 16, and the half-turn threshold is 512; when the single-turn resolution of the encoding axis is 12 bits = 4096 counts, the transmission ratio K between two adjacent encoding axes is 32, and the half-turn threshold is 64. This embodiment does not list them all.
[0031] The following embodiment illustrates a transmission ratio K of 8 between two adjacent encoder axes and a single-turn resolution of 16 bits for the encoder axis: In the second specific embodiment, reference is made to Figures 1-3 As shown, the encoder system includes three levels of encoding axes: a first-level encoding axis 10, a second-level encoding axis 20, and a third-level encoding axis 30. For example, when the output axis rotates a little more than one revolution, the detection value A of the first-level encoding axis 10 is 100, the detection value B of the second-level encoding axis 20 is 4090, and the detection value C of the third-level encoding axis 30 is 240.
[0032] S1. Analyze the detection values of the second and third level coding axes to obtain the circle value and the residual value within the circle; Parse B to obtain B 圈数 =B / 4096=0, B 余数 =4090, Parsing C, C can be used to extract the value representing the number of cycles and the remainder value within the cycle (0-256). 圈数 =C / 4096=0, C 余数 =240.
[0033] S2. Characterize the detection value A of the first-level coding axis 10 using the dimensions of the detection value B of the second-level coding axis 20 to obtain A. 一级至二级映射值 The dimension of the detection value A (0-65535) is compressed to the dimension (0-4095).
[0034] A 一级至二级映射值 =A÷16=100÷16=6 (rounded down).
[0035] The detection value B of the first-level coding axis 10 is characterized using the dimensions of the detection value C of the third-level coding axis 30 to obtain B. 二级至三级映射值 The dimension of the detection value B (0-4095) is compressed to the dimension (0-256).
[0036] B 二级至三级映射值 =B÷16=4090÷16=255 (rounded down).
[0037] S3. Based on the compensation rule, determine whether the number of cycles of the second-level coding axis 20 and the third-level coding axis 30 has been lost; S31. Determine if the second-level encoding axis has lost its step after 20 rotations; Combine the half-circle threshold with A 一级至二级映射值 and B 余数 Compare the differences, A 一级至二级映射值 -B 余数 =-4084≤-2047, The second-level coding axis 20 has a step loss in its count, and the compensation count (B) for the second-level coding axis 20 is... 补偿 )=B 圈数 +1 = 0 + 1.
[0038] S32. Determine if the third-level encoding axis has lost its step after 30 rotations; Combine the half-circle threshold with B 二级至三级映射值 and C 余数 Compare the differences, B 二级至三级映射值 -C 余数 =255-240=15, -2047<15<2047, therefore there is no step loss in the count of the third-level coding axis 30. The compensation count C of the third-level coding axis 30 is... 补偿 =C 圈数 =0.
[0039] S4, Absolute position of output shaft P = (C 补偿 ×256+B 补偿 ×16)65536+100.
[0040] In the third specific embodiment, reference is made to... Figures 1-3 As shown, the encoder system includes three levels of encoding axes: first-level encoding axis 10, second-level encoding axis 20, and third-level encoding axis 30.
[0041] For example, when the output shaft rotates a little more than one revolution, the detection value A of the first-level encoding axis 10 is 48000; the detection value B of the second-level encoding axis 20 is 100; and the detection value C of the third-level encoding axis 30 is 8392.
[0042] S1. Analyze the detection values of the second and third level coding axes to obtain the circle value and the residual value within the circle; Parse B to obtain B 圈数 =B / 4096=0, B 余数 =100, Parse C to obtain C 圈数 =8392 / 4096=2, C 余数 =200.
[0043] S2, A 一级至二级映射值 =A÷16=48000÷16=3000=6 (rounded down); B 二级至三级映射值 =B÷16=100÷16=6 (rounded down).
[0044] S3. Based on the compensation rule, determine whether the number of cycles of the second-level coding axis 20 and the third-level coding axis 30 has been lost; S31. Determine if the second-level encoding axis has lost its step after 20 rotations; Combine the half-circle threshold with A 一级至二级映射值 and B 余数 Compare the differences, A 一级至二级映射值 -B 余数 =3000-100>2047, therefore there is a step loss in the count of the second-level coding axis 20. The compensation count of the second-level coding axis 20 is... B 补偿 =B 圈数 -1 = 0 - 1 + 16 = 15.
[0045] It should be noted that the number of cycles for the second-level coding axis 20 ranges from 0 to 15, that is, an integer between 0 and 15. This is a cyclic count; the next number after 15 is 0, and the number before 0 is 15. Adding 16 converts the negative number -1 to the equivalent positive number 15, meaning that the number of cycles for the second-level coding axis 20 has moved from cycle 0, counterclockwise (or in the opposite direction), back to cycle 15 of the previous cycle.
[0046] S32. Determine if the third-level encoding axis has lost its step after 30 rotations; Combine the half-circle threshold with B 二级至三级映射值 and C 余数 Compare the differences, B 二级至三级映射值 -C 余数=6-200=-194,-2047<-194<2047,B 二级至三级映射值 -C 余数 The difference is not within the threshold range, therefore it is determined that there is no step loss in the 30th cycle of the third-level coding axis, and the compensation cycle C of the 30th cycle of the third-level coding axis is determined. 补偿 =C 圈数 .
[0047] S4. Based on the boundary overflow rule, process the number of circles of the third-level coding axis 30; The boundary overflow rule is as follows: if the number of rounds after compensation of the (N-1)th level coding axis undergoes a cyclic carry from the maximum value to the minimum value, then the number of rounds of the Nth level coding axis is increased by 1 as compensation, where N≥3 and N is a positive integer; If the number of cycles after compensation for the (N-1)th level coding axis undergoes a cyclic carry from the minimum to the maximum value, then the number of cycles for the Nth level coding axis is reduced by 1 for compensation.
[0048] Based on this, the number of cycles of the second-level coding axis 20 becomes 0 due to the compensation of adding 1, indicating that the number of cycles of the second-level coding axis 20 has completed a full cycle (16 cycles), and should carry over to the third-level coding axis 30, so the number of cycles of the third-level coding axis 30 is increased by 1; if the number of cycles of the second-level coding axis 20 becomes 15 due to the compensation of subtracting 1, it indicates that the number of cycles of the second-level coding axis 20 has returned to the previous cycle, and should borrow from the third-level coding axis 30, so the number of cycles of the third-level coding axis 30 is decreased by 1.
[0049] Therefore, the third-level coding axis has 30 compensation cycles (C). 最终 =C 补偿 -1=1.
[0050] S5. Calculate the absolute position of the output shaft over multiple revolutions, P = (C 最终 ×256+B compensation×16)65536+48000=(1×256+15×16)65536+48000=(256+240)×65536 + 48000.
[0051] It should be noted that T2 is the number of compensation cycles for the second-level coding axis after processing by the aforementioned compensation rules, T3 is the number of compensation cycles for the third-level coding axis after processing by the aforementioned compensation rules and the aforementioned boundary overflow rules, T4 is the number of compensation cycles for the third-level coding axis after processing by the aforementioned compensation rules and the aforementioned boundary overflow rules, ..., TN is the number of compensation cycles for the Nth-level coding axis after processing by the aforementioned compensation rules and the aforementioned boundary overflow rules. The absolute position of the output shaft P = (TN × K) N-1 +……+ T3 × K 2 + T2 × K 1 ) ×M+ A.
[0052] In the fourth specific embodiment, reference is made to... Figures 1-3 As shown, the encoder system includes three levels of encoding axes: first-level encoding axis 10, second-level encoding axis 20, and third-level encoding axis 30.
[0053] For example, when the output shaft has rotated a little over 1280 times, the detection value A of the first-level encoding axis 10 is 1600; the detection value B of the second-level encoding axis 20 is 65440; and the detection value C of the third-level encoding axis 30 is 20680.
[0054] S1. Analyze the detection values of the second and third level coding axes to obtain the circle value and the residual value within the circle; Parse B to obtain B 圈数 =B / 4096=15, B 余数 =4000, Parse C to obtain C 圈数 =C / 4096=5, C 余数 =200.
[0055] S2, A 一级至二级映射值 =A÷16=1600÷16=100 (rounded down); B 二级至三级映射值 =B÷16=65440÷16=4090 (rounded down).
[0056] S3. Based on the compensation rule, determine whether the number of cycles of the second-level coding axis 20 and the third-level coding axis 30 has been lost; S31. Determine if the second-level encoding axis has lost its step after 20 rotations; Combine the half-circle threshold with A 一级至二级映射值 and B 余数 Compare the differences, A 一级至二级映射值 -B 余数 =100-4000≤-2047, then there is a step loss in the count of the second-level coding axis 20. The compensation count of the second-level coding axis 20 (B) 补偿 ) is B 圈数 +1=15+1=0.
[0057] It should be noted that the number of cycles for the second-level encoding axis 20 ranges from 0 to 15, that is, an integer between 0 and 15. This is a cyclic count; the next number after 15 is 0, and the number before 0 is 15.
[0058] S32. Determine if the third-level encoding axis has lost its step after 30 rotations; Combine the half-circle threshold with B 二级至三级映射值 and C 余数 Compare the differences, B 二级至三级映射值 -C 余数=4090-200=3890>2047, therefore the count of the third-level coding axis 30 has a step loss, and the compensation count C of the third-level coding axis 30 is... 补偿 =C 圈数 -1 = 5 - 1.
[0059] S4. Based on the boundary overflow rule, process the number of circles of the third-level coding axis 30; Third-level encoding axis 30 compensation cycles C 最终 =C 补偿 +1=5.
[0060] S5, Absolute position of output shaft P = (C 最终 ×256+B 补偿 (×16)65536+48000=(5×256+0×16)65536+1600=1280×65536 + 1600.
[0061] In summary, the method of this application includes: S1, obtaining the detection values of each level of coding axis, and decomposing the detection values of each level of coding axis except the first level coding axis into a circle value and an in-circle remainder value based on the transmission ratio; S2, establishing a mapping relationship from the upper level coding axis to the lower level coding axis according to the transmission ratio between two adjacent levels of coding axes, and converting the detection value of the upper level coding axis into a mapping value with the same dimensions as the detection value of the lower level coding axis; S3, obtaining the difference between the mapping value and the in-circle remainder value of the corresponding lower level coding axis, and comparing the difference with a half-circle threshold based on a compensation rule to determine whether to compensate for the number of circles of the lower level coding axis; S5, synthesizing the absolute position of the output shaft of the power gear system based on the compensated number of circles of each level of coding axis and the detection value of the first level coding axis.
[0062] This application achieves precise quantification of the state of a multi-level coding system by acquiring the detection values of each level of coding axis and decomposing them into revolution values and in-revolution values based on the transmission ratio. A mapping relationship is established from the upper-level coding axis to the lower-level coding axis based on the transmission ratio, and the mapping values are obtained after unifying the dimensions, thus constructing a comparable basis for upper and lower-level coding data. By obtaining the difference between the mapping value and the corresponding in-revolution value of the lower-level coding axis and comparing it with a half-revolution threshold, the asynchronous zero-crossing phenomenon caused by gear backlash can be accurately identified. Dynamic compensation of the number of revolutions of the lower-level coding axis based on the difference comparison results effectively corrects the reading deviation caused by mechanical backlash. Finally, the absolute position of the output shaft is synthesized based on the compensated number of revolutions of each level of coding axis, ensuring the continuity and accuracy of the position calculation and avoiding position calculation errors caused by gear backlash.
[0063] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A method for detecting the absolute position of the output shaft of a drive integrated machine in multiple turns, characterized in that, The integrated drive unit includes an encoder system and a power gear system. The encoder system includes at least two levels of encoder shafts, with the upper-level encoder shaft driving the lower-level encoder shaft to rotate. The transmission ratio between adjacent encoder shafts is equal and is an integer power of 2. The first-level encoder shaft is coaxially connected to the output shaft of the power gear system. The method includes: S1. Obtain the detection values of each level of the encoding axis, and based on the transmission ratio, decompose the detection values of the other levels of the encoding axis except the first level encoding axis into the circle value and the residual value within the circle; S2. Based on the transmission ratio between two adjacent coding axes, establish a mapping relationship from the coding axis of the previous level to the coding axis of the next level, and convert the detection value of the coding axis of the previous level into a mapping value with the same dimensions as the detection value of the coding axis of the next level. S3. Obtain the difference between the mapping value and the corresponding next-level coding axis's in-loop remainder value, and compare the difference with the half-loop threshold based on the compensation rule to determine whether to compensate for the number of loops of the next-level coding axis. S5. Based on the number of revolutions of each level of the encoder shaft after compensation and the detection value of the first level encoder shaft, the absolute position of the output shaft of the power gear system is synthesized.
2. The method according to claim 1, characterized in that, The half-turn threshold is determined based on the transmission ratio K and the single-turn resolution M of the encoder axis, and the half-turn threshold is M / (2K).
3. The method according to claim 1, characterized in that, The compensation rule includes: if the difference is less than or equal to the half-circle threshold, the number of circles of the next level encoding axis is increased by 1 as compensation; If the difference is greater than the half-circle threshold, then the number of circles of the next level encoding axis is reduced by 1 as compensation.
4. The method according to claim 3, characterized in that, When the encoder system includes three or more levels of encoder axes, the step between S3 and S4 is further as follows: Based on the boundary overflow rule, the number of cycles after compensation for the Nth level coding axis is processed, where N≥3 and N is a positive integer. The boundary overflow rule includes: if the number of rounds after compensation of the (N-1)th level coding axis undergoes a cyclic carry from the maximum value to the minimum value, then the number of rounds of the Nth level coding axis is increased by 1 as compensation; If the number of cycles after compensation for the (N-1)th level coding axis undergoes a cyclic carry from the minimum to the maximum value, then the number of cycles for the Nth level coding axis is reduced by 1 for compensation.
5. The method according to claim 4, characterized in that, The detection value of the first-level coding axis is A, T2 is the number of compensation cycles for the second-level coding axis after processing by the compensation rule, T3 is the number of compensation cycles for the third-level coding axis after processing by the compensation rule and the boundary overflow rule, ..., TN is the number of compensation cycles for the Nth-level coding axis after processing by the compensation rule and the boundary overflow rule. The absolute position P of the output shaft is obtained using the following formula: P = ( TN × K N-1 +……+ T3 × K 2 + T2 × K 1 ) ×M+ A。 6. The method according to claim 1, characterized in that, In S2, the mapped value is rounded down.
7. A drive unit, employing the method according to any one of claims 1-6, characterized in that, include: The power gear system includes the motor input shaft and output shaft; The encoder system includes at least two levels of encoder shafts, wherein the upper level encoder shaft drives the lower level encoder shaft to rotate, the transmission ratio between adjacent levels of encoder shafts is equal and is an integer power of 2, and the first level encoder shaft is coaxially connected to the output shaft.
8. The integrated drive unit according to claim 7, characterized in that, The encoder system also includes a detection gear assembly disposed between two adjacent encoder shafts for transmitting power from the upper encoder shaft to the lower encoder shaft.
9. The integrated drive unit according to claim 8, characterized in that, The transmission ratios of all the aforementioned detection gear assemblies are equal.