Encoder calibration method, system, medium and device suitable for multi-directional axis movement

By installing a microcontroller unit and photosensitive module on the encoder, the eccentricity direction and eccentricity distance of the encoder axis system are analyzed, and dynamic error is calculated based on the rotation speed, and the encoder output is compensated in real time, which solves the accuracy drop caused by the encoder axis traversal. The problem of high-precision and low-cost calibration effect is achieved.

CN118882716BActive Publication Date: 2025-02-18CONTROLWAY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411355872.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-02-18
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

The prior art cannot effectively solve the problem of accuracy degradation caused by encoder axis traversal.

Method used

The microcontroller unit is combined with three photosensitive modules. By analyzing the frequency and phase deviation of the sinusoidal signal, the eccentric direction and eccentric distance of the encoder axis system shaking, and the dynamic axis system shaking error is calculated based on the rotation speed, and the encoder output is carried out in real time. compensate.

Benefits of technology

Effective compensation for multi-directional axis stroke is achieved, and the accuracy and cost-effectiveness of the encoder are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118882716B_ABST
    Figure CN118882716B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of industrial automation technology, and discloses an encoder calibration method, system, medium and equipment adapted to multi-directional shaft movement, comprising: installing a microcontroller unit on the encoder, arranging a first photosensitive module and a second photosensitive module on the encoder's code disk with the encoder's rotating shaft center as the center, and arranging a third photosensitive module between the two photosensitive modules; the first and second photosensitive modules convert the received light signals into sinusoidal signals and send them to the microcontroller unit, and the third photosensitive module converts the received light signals into electrical signals and sends them to the microcontroller unit; the microcontroller unit analyzes the deviation of the sinusoidal signal in frequency and phase to obtain the eccentric direction and eccentricity of the encoder shaft system shaking, calculates the encoder's rotation speed according to the electrical signal, obtains the dynamic shaft system shaking error in combination with the eccentric direction, eccentricity and rotation speed, and compensates the encoder's output in real time accordingly. The present invention has low cost and high compensation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial automation technology, and in particular to an encoder calibration method, system, medium and equipment adapting to multi-directional shaft movement. Background Art

[0002] As an angle sensor for measuring rotation angles, encoders are increasingly used in industrial production processes. With the development of technology and production, the industry's requirements for encoders are increasingly moving towards precision and systematization, and there are higher requirements for the accuracy of detection results.

[0003] During the use of the encoder, due to the machining errors of the encoder components and the increase in the use time of the encoder, the unreliability of the shaft structure will increase to a certain extent; especially for encoders with solid shafts and blind hole structures, due to their structural characteristics, axial or radial shaft movement, that is, shaft system shaking, may occur, thus affecting the accuracy of the encoder. However, there is no method in the prior art that can effectively solve the reduction in encoder accuracy caused by shaft movement. Summary of the invention

[0004] To this end, the technical problem to be solved by the present invention is to overcome the deficiencies in the prior art and provide an encoder calibration method, system, medium and equipment that are adaptable to multi-directional axis movement, which can reduce costs and improve compensation accuracy.

[0005] In order to solve the above technical problems, the present invention provides an encoder calibration method adapted to multi-directional shaft movement, comprising:

[0006] A microcontrol unit is installed on the encoder, and a first photosensitive module and a second photosensitive module are arranged diametrically above the code disk of the encoder with the center of the rotating shaft of the encoder as the center, and a third photosensitive module is arranged between the first photosensitive module and the second photosensitive module;

[0007] The first photosensitive module and the second photosensitive module respectively convert the light signals received in the same time into sinusoidal signals and send them to the microcontroller unit, and the microcontroller unit analyzes the deviation of the received sinusoidal signals in frequency and phase to obtain the eccentric direction and eccentricity of the encoder shaft shaking;

[0008] The third photosensitive module converts the received light signal into an electrical signal and sends it to the micro control unit, and the micro control unit calculates the rotation speed of the encoder according to the electrical signal;

[0009] The microcontroller unit obtains the dynamic shaft system shaking error caused by the shaft system shaking of the encoder by combining the eccentric direction, eccentric distance and the rotation speed of the encoder, and compensates the output of the encoder in real time according to the dynamic shaft system shaking error.

[0010] Furthermore, the eccentricity is calculated as follows:

[0011] ,

[0012] in, is the eccentricity, is the phase difference between the sinusoidal signals detected by the first photosensitive module and the second photosensitive module, d is the grating pitch on the code disk.

[0013] Furthermore, the calculation process of the eccentricity is specifically as follows:

[0014] The actual rotation axis center of the encoder is recorded as O D , the positions of the first photosensitive module and the second photosensitive module above the encoder's code disk are respectively recorded as A 1 、A 2 , the ideal geometric center of the code disk is recorded as O M , connect A 1 and O M The other intersection position of the extended line on the code disk is recorded as B ,Will O D point to O M The direction of the line segment is taken as the eccentricity direction. O D O M is the eccentric distance; taking the eccentric direction as the reference, the length difference between the first photosensitive module and the second photosensitive module on the optical circumference is arc A 2 B ;

[0015] Connect A 1 、A 2 The straight line is denoted as A 1 A 2 , will pass O M Perpendicular to A 1 A The intersection point of 2 is recorded as E ,Will O M and E The distance between O ME , according to the small angle similarity theory, the arc A 2 B ≈ A 2 B ,and O M E ⊥ A 1 A 2 , according to the geometric similarity relationship, we can get the arc A 2 B ≈2 O M E =2 *sin ,in, The eccentric direction and A 1 A 2 The angle between

[0016] The arc A 2 B The angle corresponding to the signal acquisition period is used as the phase difference between the sinusoidal signals detected by the first photosensitive module and the second photosensitive module, and the following is obtained:

[0017] ,

[0018] in, is the phase difference between the sinusoidal signals detected by the first photosensitive module and the second photosensitive module, d is the grating pitch on the code disk;

[0019] Will O M E As the eccentric distance difference between the first photosensitive module and the second photosensitive module during the rotation of the encoder's rotating shaft, O M E It will reach the extreme point twice, which will be recorded as the minimum point P min and maximum point P max , corresponding to the eccentricity direction and A 1 A 2 When orthogonal, A 2 The second photosensitive module reads two points at the position; the code disk starts from the minimum pointP min Rotate 180° counterclockwise to the maximum point P max During this period, the total phase difference read by the first photosensitive module and the second photosensitive module is , combined with the formula The calculation formula for the eccentricity is: .

[0020] Furthermore, the method for obtaining the eccentricity direction is:

[0021] The second photosensitive module starts recording when it reads any extreme point. When the total phase difference read by the first photosensitive module and the second photosensitive module reaches an extreme value, the direction perpendicular to the position and the rotation angle of the code disk is used as the eccentricity direction.

[0022] Furthermore, the calculation method of the dynamic shaft system shake error is:

[0023] The amplitude of the shaft shaking when the encoder is working is:

[0024] α=σ+G*exp(qv) ,

[0025] in, α is the amplitude of the shaft shaking when the encoder is working. σ is the amplitude of the shaft system shaking in static state, G is the shafting shake variation coefficient, exp(qv) Add the trend function for the amplitude, q The coefficient for increasing the shaft sway degree is: v is the rotation speed of the encoder;

[0026] The dynamic shafting error is expressed as:

[0027] ,

[0028] in, is the dynamic shafting error, is the angle between the center of the ideal code disk position and the encoder angle measurement position, is the eccentricity, r is the radius of the code disc.

[0029] Furthermore, the specific calculation process of the dynamic shaft system shake error is:

[0030] Construct the ideal position of the code disk and the actual position of the code disk caused by the shaking of the shaft system, and record the geometric center of the ideal position of the code disk as O The geometric center of the actual position of the code disk is recorded as O’ , set the encoder measurement position at the actual position of the code disk, recorded as P, the angle between the axis shaking direction and the encoder measurement position is recorded as , the encoder zero position is zero , the radius of the code disc is r ;

[0031] The current angle value measured by the encoder is recorded as , connect O' and O to get the vector ,Will The direction is taken as the eccentric direction, and the angle between the eccentric direction and the encoder zero position is recorded as , = + ;

[0032] The shaft shaking error is Δ ,connect O and O’ Get vector ,in , the shafting error is calculated as:

[0033] ,

[0034] The dynamic shafting error is recorded as , combined with the formula α=σ+G*exp(qv) , calculate the dynamic shafting error as:

[0035] ,

[0036] The dynamic shaft system shake error is approximated as:

[0037] ,

[0038] Will Direction and The angle between the directions is , is the vector obtained by connecting O and P; according to the geometric relationship, Δ = - , r*sin Δ = * sin ( +Δ ); Combined with the formula The final dynamic shaft system shake error is:

[0039] .

[0040] Furthermore, the encoder output is compensated in real time according to the dynamic shaft system shake error, specifically:

[0041] The final dynamic shaft shake error is superimposed on the current angle value measured by the encoder to obtain the corrected encoder output angle value:

[0042] ,

[0043] in, is the output angle value of the corrected encoder.

[0044] The present invention also provides an encoder calibration system adapting to multi-directional shaft movement, comprising:

[0045] A micro control unit, mounted on the encoder;

[0046] A first photosensitive module, a second photosensitive module and a third photosensitive module, wherein the first photosensitive module and the second photosensitive module are arranged radially above a code disk centered on the rotation axis center of the encoder, and the third photosensitive module is arranged between the first photosensitive module and the second photosensitive module;

[0047] An eccentricity direction and eccentricity calculation module, used to control the first photosensitive module and the second photosensitive module to convert the light signals received in the same time into sinusoidal signals and send them to the microcontroller unit, and control the microcontroller unit to analyze the deviation of the received sinusoidal signals in frequency and phase to obtain the eccentricity direction and eccentricity of the encoder shaft shaking;

[0048] An encoder rotation speed calculation module, used to control the third photosensitive module to convert the received light signal into an electrical signal and send it to the micro control unit, and control the micro control unit to calculate the encoder rotation speed according to the electrical signal;

[0049] The calibration module is used to control the microcontroller unit to obtain the dynamic shaft system shaking error caused by the shaft system shaking of the encoder in combination with the eccentric direction, eccentric distance and rotation speed of the encoder, and to compensate the output of the encoder in real time according to the dynamic shaft system shaking error.

[0050] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the functions of the eccentricity direction and eccentricity calculation module, the encoder rotation speed calculation module, and the calibration module in the encoder calibration system that adapts to multi-directional shaft movement are realized.

[0051] The present invention also provides an encoder calibration device that is adaptable to multi-directional shaft movement, comprising a memory, a processor, and a computer program stored in the memory and run on the processor. When the processor executes the computer program, the functions of the eccentricity direction and eccentricity calculation module, the encoder rotation speed calculation module, and the calibration module in the encoder calibration system that is adaptable to multi-directional shaft movement are implemented.

[0052] The above technical solution of the present invention has the following beneficial effects compared with the prior art:

[0053] The present invention obtains different signals through three photosensitive modules, and then uses a microcontroller unit to analyze the different signals to obtain eccentricity data and rotational speed and obtain a dynamic shaft system shake error based on the eccentricity data and rotational speed, and finally compensates the encoder output in real time according to the dynamic shaft system shake error; the cost is low and error compensation is achieved; the compensation process combines the eccentricity data and rotational speed and has high compensation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein:

[0055] Figure 1 Flow chart of the method in the preferred embodiment of the present invention.

[0056] Figure 2 It is a schematic diagram of the position arrangement of the first photosensitive module, the second photosensitive module, and the third photosensitive module in the preferred embodiment of the present invention.

[0057] Figure 3 It is a schematic diagram of the geometric relationship when the eccentric direction and eccentric distance of the encoder shaft shaking are obtained by the first photosensitive module and the second photosensitive module in the preferred embodiment of the present invention.

[0058] Figure 4 Schematic diagram of the geometric relationship between the eccentric path difference and the extreme point position of the first photosensitive module and the second photosensitive module in the preferred embodiment of the present invention.

[0059] Figure 5 It is a schematic diagram of the geometric relationship when the microcontroller unit calculates the dynamic shaft system wobble error caused by the shaft system wobble of the encoder in the preferred embodiment of the present invention.

[0060] Figure 6 The output angle of the encoder is corrected using the present invention, and the error comparison diagram before and after the correction is shown.

[0061] Explanation of the reference numerals in the specification: 1. First photosensitive module; 2. Second photosensitive module; 3. Third photosensitive module; 4. Code disk. DETAILED DESCRIPTION

[0062] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention. Embodiment 1

[0063] Reference Figure 1 As shown, the present invention discloses an encoder calibration method adapted to multi-directional shaft movement, comprising the following steps:

[0064] S1: Install a microcontroller unit (MCU) on the encoder, set a first photosensitive module and a second photosensitive module on the encoder's code disk (i.e., grating) with the encoder's rotation axis as the center, and set a third photosensitive module between the first photosensitive module and the second photosensitive module; the microcontroller unit in this embodiment is a PCBA control board integrated with the MCU. Figure 2 It is a schematic diagram of the position setting of the first photosensitive module 1, the second photosensitive module 2, and the third photosensitive module 3. The first photosensitive module 1 is set at position a, and the second photosensitive module 2 is set at position c. The first photosensitive module 1 and the second photosensitive module 2 are arranged radially above the code disk 4. The third photosensitive module 3 is arranged at position b between the first photosensitive module 1 and the second photosensitive module 2. The center of the rotation axis of the encoder is consistent with the center of the code disk 4, and the center of the rotation axis of the encoder is arranged below the code disk 4.

[0065] S2: The first photosensitive module and the second photosensitive module respectively convert the light signals received in the same time (i.e., the number of recorded gratings) into sinusoidal signals and send them to the microcontroller unit. The microcontroller unit analyzes the deviations of the received sinusoidal signals in frequency and phase to obtain the eccentricity direction and eccentricity of the encoder shaft shaking.

[0066] According to the circular grating measurement principle, the parallel light emitted by the light source will generate interference fringes after passing through the grating lines of the code disk, and the data receiving module can generate a sinusoidal signal after the light signal of the light and dark fringes generated by the interference. When the circular grating is eccentric, the sinusoidal signals detected by the photosensitive modules at different positions in the circumferential direction at the same time have a phase difference. Using this feature, the eccentric direction and eccentricity of the circular grating can be detected based on the synthesis results of the sinusoidal signals with different phases. Therefore, the specific calculation process of the eccentric direction and eccentricity in this embodiment is as follows:

[0067] S2-1: The calculation process of the eccentricity is a static error analysis, which does not consider the influence of continuous rotation and rotation speed. The first photosensitive module and the second photosensitive module are used to collect fringe signals, such as Figure 3 As shown, the actual rotation axis center of the encoder is recorded as O D, install a microcontroller unit on the encoder, set a first photosensitive module and a second photosensitive module on the encoder's code disk with the encoder's rotation axis as the center, and set a third photosensitive module between the first and second photosensitive modules, with an angle of 90° between the three. The positions of the first and second photosensitive modules on the encoder's code disk are respectively recorded as A 1. A 2. The ideal geometric center of the code disc is recorded as O M , connect A 1 and O M The other intersection position of the extended line on the code disk is recorded as B The eccentricity is l ,Will O D point to O M The direction of the line segment is taken as the eccentricity direction. O D O M is the eccentricity; based on the eccentricity direction, the rotation angle read by the sensor is , the actual rotation angle of the grating is Since the geometric center of the code disk is eccentric with respect to the rotation axis, the lengths of the first photosensitive module and the second photosensitive module on the optical circumference in the same time are different, so the sinusoidal signals detected by the first photosensitive module and the second photosensitive module have differences in frequency and phase. When the shaft rotates in a fixed direction, the difference in length of the first photosensitive module and the second photosensitive module on the optical circumference is arc A 2 B .

[0068] S2-2: Connect A 1. A The straight line of 2 is recorded as A 1 A 2. Pass O M Perpendicular to A 1 A The intersection point of 2 is recorded as E , according to the small angle similarity theory, the arc A 2 B ≈ A 2 B ,and O M E ⊥ A 1 A 2. For example Figure 3As shown, the length difference arc is obtained according to the geometric similarity relationship A 2 B It can be expressed as: arc A 2 B ≈2 O M E =2 * sin ,in is the eccentricity, O D and O M The distance between The eccentric direction and A 1 A The angle between the two is the actual rotation angle of the grating.

[0069] S2-3: The length difference arc A 2 B The angle corresponding to the signal acquisition period is used as the phase difference between the sinusoidal signals detected by the first photosensitive module and the second photosensitive module, and the following is obtained:

[0070] (1),

[0071] in, is the phase difference between the sinusoidal signals detected by the first photosensitive module and the second photosensitive module, d It is the grating pitch on the code disk. The grating pitch is confirmed at the beginning of production based on the corresponding code disk size and wiring harness requirements. 360° represents the number of angles within an electrical fringe signal cycle. The phase difference between the two photosensitive modules changes with the rotation angle of the shaft.

[0072] S2-4: Figure 4 As shown, O M and E The distance between O M E ,Will O M E As the eccentric distance difference between the first photosensitive module and the second photosensitive module during the rotation of the encoder's rotating shaft, O M E It will reach the extreme point twice, which will be recorded as the minimum point P min and maximum point P max, corresponding to the eccentricity direction and A 1 A 2 When orthogonal, it is located A The second photosensitive module at position 2 reads two points; the code disk reads two points from the minimum point P min Rotate 180° counterclockwise to the maximum point P max During this period, the total phase difference read by the first photosensitive module and the second photosensitive module is , combined with formula (1), the calculation formula for eccentricity can be obtained as:

[0073] (2).

[0074] By comparing the synthetic signals of the two photosensitive modules, the phase difference of the radial position signal after the measured shaft rotates one circle can be calculated.

[0075] S2-5: When the second photosensitive module reads any extreme point, it starts recording. After the code disk rotates 90°, the eccentricity direction will be the same as A 1 A 2 Therefore, when the total phase difference read by the first photosensitive module and the second photosensitive module reaches an extreme value, the direction perpendicular to the rotation angle of the code disk is taken as the eccentricity direction.

[0076] S3: The third photosensitive module converts the received light signal into an electrical signal and sends it to the microcontroller unit, and the microcontroller unit calculates the rotation speed of the encoder according to the electrical signal. Calculating the rotation speed of the encoder according to the electrical signal is a conventional calculation method and will not be described in detail.

[0077] S4: The microcontroller unit combines the eccentric direction, eccentricity, and rotation speed of the encoder to obtain the dynamic shaft system wobble error caused by the shaft system wobble of the encoder, and compensates the output of the encoder in real time according to the dynamic shaft system wobble error. In the rolling bearing of the encoder, the main shaft rotates without gap, but due to errors such as machining dimensions, there are shape errors between the sleeve, the ball, and the main shaft. As the encoder rotates, the main shaft will produce radial wobble and axial movement. Radial wobble will affect the eccentricity of the encoder code disk, and axial wobble will affect the amplitude of the moire fringe signal. The present invention is aimed at shaft system wobble including radial wobble and axial movement, and improves the test accuracy of the encoder by performing real-time compensation for the data error caused by shaft system wobble.

[0078] The shaking of the shaft system is also closely related to the rotation speed of the main shaft. During the high-speed rotation of the encoder or the transition from low speed to high speed, due to the shaking of the shaft system, a relatively serious eccentricity of the code disk will occur. The degree of eccentricity and the direction of the line connecting the centers of the two code disks are randomly generated according to the vibration or adjustment conditions. The change process of the shaking amplitude is similar to an exponential function. Therefore, the analysis of the shaft system shaking in the present invention is achieved by using an exponential function to approximate the relationship between amplitude and speed.

[0079] S4-1: During the rotation process, the change process of the code disk's shaking amplitude is similar to an exponential function. The exponential function is used to simulate the relationship between amplitude and speed. Therefore, in this embodiment, the amplitude of the shaft system shaking when the encoder is working (i.e., the code disk offset) is:

[0080] α = σ + G*exp ( qv ) (3),

[0081] in, α is the amplitude of the shaft shaking when the encoder is working. σ is the amplitude of the shaft system shaking in static state, G is the shafting shake variation coefficient, exp ( qv ) is the amplitude increase trend function, q The coefficient for increasing the shaft sway degree is: v is the rotation speed of the encoder, σ, G and q The value of is obtained from actual measurement (the same batch of products is tested, and the spindle shaft shake amplitude is measured with a micrometer to obtain the static shaft shake amplitude; under a known rotation speed, the shaft shake amplitude at each speed is measured, and finally the coefficient value is set using the above experimental data).

[0082] S4-2: Construct the ideal position of the code disc and the actual position of the code disc caused by the shaking of the shaft system, such as Figure 5 As shown in the figure, the amplitude caused by the shaft shaking is The direction reaches the maximum value, Figure 5 The dotted circle in the middle represents the ideal position of the code disk, and the solid circle represents the actual position of the code disk due to the shaking of the shaft system. The geometric center of the ideal position of the code disk is recorded as O The geometric center of the actual position of the code disk is recorded as O’ , set the encoder measurement position at the actual position of the code disk, recorded as P , the angle between the shaking direction of the shaft system and the encoder measurement position, that is, ∠ PO'O Recorded as , the encoder zero position is zero , the radius of the code disc is r .

[0083] S4-3: The current angle value measured by the encoder, ∠ zero Recorded as ,connect O’ and O Get vector ,Will The angle between the direction and the encoder zero position is recorded as , The size of is random, then = + .

[0084] S4-4: The axis shake error is Δ ,connect O and O’ Get vector ,in , the shafting error is calculated as:

[0085] (4).

[0086] S4-5: The dynamic axis shake error is recorded as , combined with the formula α=σ+G*exp(qv) , calculate the dynamic shafting error as:

[0087] (5).

[0088] S4-6: Approximate the dynamic axis shake error as:

[0089] (6),

[0090] From formula (6), we can know that the shafting error is for The maximum error of the 1st sine component is ; The minimum value is 0.

[0091] S4-7: Direction and The angle between the directions is , For connection O and P The vector obtained; according to the geometric relationship, Δ =∠ = - , r*sin Δ = * sin ( +Δ ); Combined with the formula The final dynamic shaft system shake error is:

[0092] (7).

[0093] S4-8: The final dynamic shaft system shake error calculated according to formula (7) is superimposed on the current angle value measured by the encoder to obtain the corrected encoder output angle value:

[0094] (8),

[0095] in, is the output angle value of the corrected encoder, It is the current angle value measured by the encoder, that is, the initial measurement value. Embodiment 2

[0096] The present invention also discloses an encoder calibration system adapting to multi-directional shaft movement, comprising:

[0097] A micro control unit, mounted on the encoder;

[0098] A first photosensitive module, a second photosensitive module and a third photosensitive module, wherein the first photosensitive module and the second photosensitive module are arranged radially above a code disk centered on the rotation axis center of the encoder, and the third photosensitive module is arranged between the first photosensitive module and the second photosensitive module;

[0099] An eccentricity direction and eccentricity calculation module, used to control the first photosensitive module and the second photosensitive module to convert the light signals received in the same time into sinusoidal signals and send them to the microcontroller unit, and control the microcontroller unit to analyze the deviation of the received sinusoidal signals in frequency and phase to obtain the eccentricity direction and eccentricity of the encoder shaft shaking;

[0100] An encoder rotation speed calculation module, used to control the third photosensitive module to convert the received light signal into an electrical signal and send it to the micro control unit, and control the micro control unit to calculate the encoder rotation speed according to the electrical signal;

[0101] The calibration module is used to control the microcontroller unit to obtain the dynamic shaft system shake error caused by the shaft system shake of the encoder in combination with the eccentric direction, eccentric distance, and rotation speed of the encoder, and to compensate the output of the encoder in real time according to the dynamic shaft system shake error. The microcontroller unit superimposes the calculated dynamic shaft system shake error on the current angle value measured by the encoder, corrects the eccentric angle measurement error of the circular grating, and improves the output angle test accuracy. Embodiment 3

[0102] The present invention also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the functions of the eccentricity direction and eccentricity calculation module, the encoder rotation speed calculation module, and the calibration module in the encoder calibration system that adapts to multi-directional shaft movement in Example 2 are realized. Embodiment 4

[0103] The present invention also discloses a device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the functions of the eccentricity direction and eccentricity distance calculation module, the encoder rotation speed calculation module, and the calibration module in the encoder calibration system adapted to multi-directional shaft movement in the second embodiment are implemented.

[0104] The present invention can be applied to the calibration of various photoelectric encoders, especially non-blind hole shaft structure photoelectric encoders used in the field of industrial automation. The present invention obtains different signals through three photosensitive modules, and then analyzes the different signals through a microcontroller unit to obtain eccentricity data and rotation speed and obtain dynamic shaft system shake error based on this, and finally compensates the encoder output in real time according to the dynamic shaft system shake error. Compared with the traditional solution for eliminating shaft system shake error, it has a simple structure, low cost and installation difficulty; it can effectively reduce the interference of shaft runout on the measurement result, and in the process of realizing error compensation, it combines the eccentricity data and rotation speed into consideration, and has high compensation accuracy, which has a positive effect on industrial production and use.

[0105] In order to further demonstrate the beneficial effects of the present invention, in this embodiment, an eccentricity error measurement experiment is performed on encoders of the same batch for existing encoder products.

[0106] First, using an electron microscope to magnify the measuring instrument, the maximum static error amplitude of the shaft shaking of this batch of gratings is measured to be 0.0001mm. When the motor drives the encoder to rotate at a speed of 500-1000r / min, the amplitude of the shaft shaking at multiple speeds is measured, and the eccentricity value of the code disk caused by the shaft shaking can be obtained by calculation. Based on the above data, set σ=0.09um, G=0.02um, q=0.05 (r / min) -1 .

[0107] Substituting the above parameters into equation (7) can obtain the final dynamic shaft system wobble error. The final dynamic shaft system wobble error is added to the error correction program of the microcontroller unit, and the final output angle is the correction angle of equation (8). Use a 21-bit servo motor to control the encoder to rotate 15° each time, and record the standard angle measurement value within one week. The error level before and after correction is as follows: Figure 6 shown. Figure 6 In the figure, the solid line represents the error before correction, and the dotted line represents the error after correction using the method of the present invention; Figure 6 It can be seen that compared with the reference 0 error, the error after correction is always smaller than that before correction, and the error after correction is reduced by about 70% at most compared with that before correction, thus proving the beneficial effect of the present invention.

[0108] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0109] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0110] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0111] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0112] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.

Claims

1. A method for calibrating an encoder adapted to multi-directional axis movement, characterized in that: include: A microcontrol unit is installed on the encoder, and a first photosensitive module and a second photosensitive module are arranged diametrically above the code disk of the encoder with the center of the rotating shaft of the encoder as the center, and a third photosensitive module is arranged between the first photosensitive module and the second photosensitive module; The first photosensitive module and the second photosensitive module respectively convert the light signals received in the same time into sinusoidal signals and send them to the microcontroller unit, and the microcontroller unit analyzes the deviation of the received sinusoidal signals in frequency and phase to obtain the eccentric direction and eccentricity of the encoder shaft shaking; The third photosensitive module converts the received light signal into an electrical signal and sends it to the micro control unit, and the micro control unit calculates the rotation speed of the encoder according to the electrical signal; The microcontroller unit obtains the dynamic shaft system shaking error caused by the shaft system shaking of the encoder by combining the eccentric direction, eccentric distance and the rotation speed of the encoder, and compensates the output of the encoder in real time according to the dynamic shaft system shaking error.

2. The encoder calibration method adapted to multi-directional axis movement according to claim 1, characterized in that: The calculation method of the eccentricity is: Wherein, l is the eccentricity, Δλ is the phase difference between the sinusoidal signals detected by the first photosensitive module and the second photosensitive module, and d is the grating pitch on the code disk.

3. The encoder calibration method adapted to multi-directional axis movement according to claim 2, characterized in that: The calculation process of the eccentricity is specifically as follows: The actual rotation axis center of the encoder is recorded as O D The positions of the first photosensitive module and the second photosensitive module above the encoder's code disk are respectively recorded as A1 and A2, and the ideal position geometric center of the code disk is recorded as O M , connect A1 and O M The other intersection of the extended line of O on the code disk is marked as B. D Point to O M The direction of the line segment O is taken as the eccentric direction. D O M is the eccentric distance; taking the eccentric direction as the reference, the length difference between the first photosensitive module and the second photosensitive module on the optical circumference is arc Let the line segment connecting A1 and A2 be A1A2, and M The intersection point perpendicular to A1A2 is marked as E, and O M The distance between E is O M E, according to the small angle similarity theory, the arc And O M E⊥A1A2, according to the geometric similarity relationship, the arc Among them, φ is the angle between the eccentric direction and A1A2; The arc The angle corresponding to the signal acquisition period is used as the phase difference between the sinusoidal signals detected by the first photosensitive module and the second photosensitive module, and the following is obtained: Wherein, Δλ is the phase difference between the sinusoidal signals detected by the first photosensitive module and the second photosensitive module, and d is the grating pitch on the code disk; O M E is the eccentric distance difference between the first photosensitive module and the second photosensitive module during the rotation of the encoder's rotating shaft. M E will reach the extreme point twice, which is recorded as the minimum point P min and the maximum point P max , which correspond to the two points read by the second photosensitive module located at position A2 when the eccentric direction is orthogonal to A1A2; the code disk is read from the minimum point P min Rotate 180° counterclockwise to the maximum point P max , combined with the formula The calculation formula for the eccentricity is:

4. The encoder calibration method adapted to multi-directional axis movement according to claim 3 is characterized in that: The method for obtaining the eccentric direction is: The second photosensitive module starts recording when it reads any extreme point. When the total phase difference read by the first photosensitive module and the second photosensitive module reaches an extreme value, the direction perpendicular to the position and the rotation angle of the code disk is used as the eccentricity direction.

5. The encoder calibration method adapted to multi-directional axis movement according to any one of claims 1 to 4, characterized in that: The calculation method of the dynamic shaft system shake error is: The amplitude of the shaft shaking when the encoder is working is: α=σ+G*exp(qv), Among them, α is the amplitude of the shaft shaking when the encoder is working, σ is the amplitude of the shaft shaking when static, G is the shaft shaking variation coefficient, exp(qv) is the amplitude increase trend function, q is the shaft shaking degree increase coefficient, and v is the rotation speed of the encoder; The dynamic shafting error is expressed as: Among them, μ is the dynamic shaft system shake error, ω1′ is the angle between the center of the ideal code disk position and the encoder angular position, l is the eccentricity, and r is the radius of the code disk.

6. The encoder calibration method adapted to multi-directional axis movement according to claim 5, characterized in that: The specific calculation process of the dynamic shaft system shake error is: Construct the ideal position of the code disk and the actual position of the code disk caused by the shaft system shaking, record the geometric center of the ideal position of the code disk as O, record the geometric center of the actual position of the code disk as O′, set the measurement position of the encoder at the actual position of the code disk, record it as P, record the angle between the shaft system shaking direction and the encoder measurement position as ω1, record the encoder zero point position as zero, and the radius of the code disk as r; The current angle value measured by the encoder is recorded as ω2, and the vector is obtained by connecting O′ and O. Will The direction is taken as the eccentric direction, and the angle between the eccentric direction and the encoder zero position is recorded as ω β ,ω2=ω1+ω β ; Let the axis shake error be Δω, and connect O and O′ to get the vector in The shafting error is calculated as: The dynamic shaft system shake error is recorded as μ, and combined with the formula α=σ+G*exp(qv), the dynamic shaft system shake error is calculated as: The dynamic shaft system shake error is approximated as: Will Direction and The angle between the directions is denoted as ω1′. is the vector obtained by connecting O and P; according to the geometric relationship, Δω=ω1′-ω1, Combining formulas The final dynamic axis shake error is:

7. The encoder calibration method adapted to multi-directional axis movement according to claim 6, characterized in that: The encoder output is compensated in real time according to the dynamic shaft system shake error, specifically: The final dynamic shaft shake error is superimposed on the current angle value measured by the encoder to obtain the corrected encoder output angle value: ∮=ω2+μ, Among them, ∮ is the output angle value of the corrected encoder.

8. An encoder calibration system adapted to multi-directional axis movement, characterized in that: include: A micro control unit, mounted on the encoder; A first photosensitive module, a second photosensitive module and a third photosensitive module, wherein the first photosensitive module and the second photosensitive module are arranged radially above a code disk centered on the rotation axis center of the encoder, and the third photosensitive module is arranged between the first photosensitive module and the second photosensitive module; An eccentricity direction and eccentricity calculation module, used to control the first photosensitive module and the second photosensitive module to convert the light signals received in the same time into sinusoidal signals and send them to the microcontroller unit, and control the microcontroller unit to analyze the deviation of the received sinusoidal signals in frequency and phase to obtain the eccentricity direction and eccentricity of the encoder shaft shaking; An encoder rotation speed calculation module, used to control the third photosensitive module to convert the received light signal into an electrical signal and send it to the micro control unit, and control the micro control unit to calculate the encoder rotation speed according to the electrical signal; The calibration module is used to control the microcontroller unit to obtain the dynamic shaft system shaking error caused by the shaft system shaking of the encoder in combination with the eccentric direction, eccentric distance and rotation speed of the encoder, and to compensate the output of the encoder in real time according to the dynamic shaft system shaking error.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the functions of the eccentricity direction and eccentricity distance calculation module, the encoder rotation speed calculation module, and the calibration module in the encoder calibration system adapted to multi-directional shaft movement as described in claim 8 are realized.

10. An encoder calibration device adapted to multi-directional shaft movement, characterized in that: The system comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the functions of the eccentricity direction and eccentricity distance calculation module, the encoder rotation speed calculation module and the calibration module in the encoder calibration system adaptable to multi-directional shaft movement as described in claim 8 are realized.

Citation Information

Patent Citations

  • Method for measuring eccentricity error of rotary table based on modulation period photoelectric detection

    CN110617785A

  • Eccentric error compensation method for asymmetric installation of double reading heads of circular grating encoder

    CN114636387A