Subdivision Method for Moiré Fringe Signal of Photoelectric Encoder
By correcting the moiré fringe signal of the photoelectric encoder by the correction coefficient, the problem of signal inconsistency and center point offset in the manufacturing process of the photoelectric encoder is solved, and the measurement accuracy and accuracy of the photoelectric encoder are improved.
Patent Information
- Application Number
- CN202210996457.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-19
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-08-19
AI Technical Summary
During the installation and manufacturing process of the photoelectric encoder, due to the inconsistent amplitude of the moiré fringe signal output by the reading head and the signal center point is not 0, the calculation error of the subdivision angle is large, and even the problem of wrong codes is caused.
The moiré fringe signal is corrected by calculating the correction coefficients a0, b0 and c0, and a new subdivision value calculation formula is used to eliminate or reduce the error caused by signal amplitude inconsistency and center point offset, and improve the subdivision accuracy.
Effectively eliminate or reduce the zero-position error and amplitude error of the signal, improve the measurement accuracy of the photoelectric encoder, and ensure the accuracy of the photoelectric encoder.
Smart Images

Figure CN115164951B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of optoelectronic encoders, and particularly provides a method for subdividing Moiré fringe signals of an optoelectronic encoder. Background Art
[0002] An optoelectronic shaft angle encoder, also known as an optoelectronic angular position sensor, is a precision digital angle measuring device integrating optics, mechanics, and electronics. An optoelectronic shaft angle encoder generally consists of a shafting, a light-emitting diode, a code disk, slits, a receiving tube, and a processing circuit. On the circular code disk of the optoelectronic encoder, there are several concentric code tracks along the radial direction, and each code track is composed of light-transmitting and light-impermeable fan-shaped intervals. On one side of the code disk is a light-emitting element, and on the other side, each code track corresponds to a photosensitive element. Each combination of a light-emitting element and a photosensitive element is called a reading head, and several reading heads are combined together to form a group of reading heads. When the light emitted by the light-emitting element passes through the code disk and the slits and irradiates the receiving element, Moiré fringe signals will be formed. When the code disk is in different positions, each photosensitive element will output different Moiré fringe current signals according to whether it is illuminated and the intensity of the illumination. This current signal is connected in series with a resistor, and the resistor converts the current signal into a voltage signal, which is called the original Moiré fringe input signal of the optoelectronic encoder.
[0003] Optoelectronic shaft angle encoders are divided into absolute and incremental types. The signals of absolute optoelectronic encoders are divided into coarse code signals and fine code signals, while incremental optoelectronic encoders only have fine code signals. Whether it is an absolute optoelectronic encoder or an incremental optoelectronic encoder, the accuracy of the optoelectronic encoder depends on the subdivision accuracy of the fine code signals. The original Moiré fringe signals of a group of fine code reading heads of an optoelectronic shaft angle encoder are generally divided into four channels, recorded as C0, C90, C180, and C270, which are four approximately sine wave signals with a phase difference of 90 degrees. Among them, the phase difference between C0 and C180 is 180 degrees. The sine wave signal obtained after the C0 and C180 signals enter a differential amplifier for amplification and shaping is denoted as the SIN signal; the phase difference between C90 and C270 is 180 degrees. The sine wave signal obtained after the C90 and C270 signals enter a differential amplifier for amplification and shaping is denoted as the COS signal, and the phase difference between the SIN signal and the COS signal is 90 degrees. The subdivision angle value θ of one fine code period of the optoelectronic encoder is calculated according to the values of the SIN signal and the COS signal, and the formula is as follows:
[0004]
[0005] Since negative values will appear in the actual calculation of formula (4), during the actual calculation, a certain angle will be added to the θ value according to the quadrant, so as to ensure that its subdivision value is positive and continuous within one Moiré fringe signal period.
[0006] When calculating the subdivision angle of the photoelectric encoder using formula (4), it is default that the two amplified Moiré fringe signals output by the photoelectric encoder are centered on 0, and the amplitudes of the SIN signal and the COS signal are the same. At this time, the calculated subdivision angle value has a small error. However, due to errors in the installation and manufacturing process of the photoelectric encoder, there is a certain error between the two amplified Moiré fringe signals output by the reading head of the photoelectric encoder and the standard sine wave signal. The amplitudes of the two Moiré fringe signals may be inconsistent, and the center points of the two signals are not necessarily 0. At this time, if formula (4) is still used to calculate the subdivision angle of the Moiré fringe signal, a large error may occur. When the error is large enough, it will cause misreading of the photoelectric encoder, resulting in the inability to use the photoelectric encoder. Summary of the Invention
[0007] To solve the above problems, the present invention provides a method for subdividing Moiré fringe signals of a photoelectric encoder, effectively improving the accuracy of the photoelectric encoder.
[0008] The method for subdividing Moiré fringe signals of the photoelectric encoder provided by the present invention corrects the Moiré fringe signals of the photoelectric encoder through the calculated correction coefficients, and then calculates the subdivision value of the corrected subdivision position using the new subdivision value calculation formula (1), including the following steps:
[0009] S1. Calculate three correction coefficients a0, b0, and c0 for subdividing the Moiré fringe signals, where a0 is the central value of the SIN signal, b0 is the central value of the COS signal, and c0 is the ratio of the amplitudes of the COS signal and the SIN signal;
[0010] S2. Collect the numerical values of the Moiré fringe signals;
[0011] S3. Correct the Moiré fringe signals using the correction coefficients, and calculate and output the subdivision value of the corrected subdivision position The calculation formula is as follows:
[0012]
[0013] Among them, S represents the voltage value of the SIN signal of the uncorrected Moiré fringe signal, C represents the voltage value of the COS signal of the uncorrected Moiré fringe signal, S' represents the voltage value of the SIN signal of the corrected subdivision position of the Moiré fringe signal, and C' represents the voltage value of the COS signal of the corrected subdivision position of the Moiré fringe signal.
[0014] Preferably, the calculation process of the correction coefficients a0, b0, and c0 is as follows:
[0015] Step S11: Build a sub - division error measurement system. Connect the motor, a high - precision reference optical encoder, and the optical encoder to be tested coaxially. Collect data of n sampling points within one period of the Moiré fringe signal of the optical encoder to be tested. Here, n is a positive integer. Among them, the data of the i - th sampling point includes: the voltage value S of the SIN signal at the i - th sampling point i , the voltage value C of the COS signal at the i - th sampling point i , the angle value θ of the reference optical encoder i , where i = 1, 2, 3...n;
[0016] Step S12: In the value combination, select a set of correction coefficients. Use formula (1) to calculate the corrected sub - division values of n sampling points. In formula (1), is replaced by represents the corrected sub - division value of the i - th sampling point. S is replaced by S i , and C is replaced by C i . A total of n sub - division values are obtained;
[0017] Step S13: Calculate the sub - division error of n acquisition points. The formula is as follows:
[0018]
[0019] Among them, represents the sub - division value of the i - th sampling point calculated in Step S12, and e i represents the sub - division error of the i - th sampling point, that is, the difference between the sub - division value of the optical encoder to be tested and the sub - division value of the reference optical encoder at the i - th sampling point;
[0020] Step S14: Calculate the mean square error σ of n sub - division errors. The formula is as follows:
[0021]
[0022] Among them, represents the average value of n sub - division errors;
[0023] Step S15: Repeat Steps S12 to S14 until the mean square error σ of all combinations of correction coefficients in the value combination is calculated. Take a0, b0, and c0 when the mean square error is the smallest as the final correction coefficients.
[0024] Preferably, the minimum value of the correction coefficient a0 is a MIN , the maximum value is a MAX , and the change amount of a0 each time is Δa. Then the number of values of a0 is 1+(a MAX -a MIN ) / Δa;
[0025] The minimum value of the correction coefficient b0 is bMIN , the maximum value is b MAX , each time when calculating, the change amount of b0 is Δb, then the number of value-taking of b0 is 1 + / (b MAX -b MIN ) / Δb;
[0026] The minimum value of the correction coefficient c0 is c MIN , the maximum value is c MAX , each time when calculating, the change amount of c0 is Δc, then the number of value-taking of c0 during testing is 1 + (c MAX -c MIN ) / Δc. During the calculation process of the correction coefficients a0, b0 and c0, it is necessary to ensure that the value of c0 is greater than 0, then the number of value-taking combinations of a0, b0 and c0 is (1 + (a MAX -a MIN ) / Δa)*(1 + (b MAX -b MIN ) / Δb)*(1 + (c MAX -c MIN ) / Δc).
[0027] Preferably, the method for selecting the final correction coefficient further includes:
[0028] Taking the correction coefficient when the average error value is the smallest as the final correction coefficient;
[0029] Taking the correction coefficient when the peak-valley value of the subdivision error is the smallest as the final correction coefficient.
[0030] An angular displacement measuring device using the subdivision method of the Moiré fringe signal of an optoelectronic encoder.
[0031] A linear displacement measuring device using the subdivision method of the Moiré fringe signal of an optoelectronic encoder.
[0032] Compared with the prior art, the present invention can achieve the following beneficial effects:
[0033] The present invention can eliminate or reduce the subdivision error caused by the unequal amplitudes of the two Moiré fringe signals and the non-zero signal center point, that is, eliminate or reduce the zero-position error and amplitude error of the signal, and can improve the subdivision accuracy of the optoelectronic encoder as a whole, thereby improving the measurement accuracy of the optoelectronic encoder. Description of the Drawings
[0034] Figure 1 is a flowchart of the subdivision method provided by an embodiment of the present invention;
[0035] Figure 2 is a schematic diagram of the subdivision error measurement system provided by an embodiment of the present invention;
[0036] Figure 3 is a flowchart for calculating correction coefficients according to an embodiment of the present invention.
[0037] The reference numerals therein include: the photoelectric encoder to be tested 1, the reference photoelectric encoder 2, the data acquisition and processing system 3, and the computer 4. Detailed implementation manners
[0038] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the following description, the same modules are denoted by the same reference numerals. In the case of the same reference numerals, their names and functions are also the same. Therefore, their detailed descriptions will not be repeated.
[0039] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, but do not constitute a limitation to the present invention.
[0040] Figure 1 shows a flowchart of a subdivision method according to an embodiment of the present invention.
[0041] As Figure 1 shown, the subdivision method for the Moiré fringe signal of the photoelectric encoder includes the following steps:
[0042] S1. In this embodiment, first, the values of three correction coefficients a0, b0, and c0 for Moiré fringe signal subdivision need to be calculated. Among them, a0 is the center value of the SIN signal, b0 is the center value of the COS signal, and c0 is the ratio of the amplitudes of the COS signal and the SIN signal.
[0043] When the Moiré fringe signal output by the photoelectric encoder is a standard sine-cosine signal, the values of the correction coefficients a0 and b0 are 0, and the value of c0 is 1. However, during actual testing, due to errors in the installation and manufacturing processes of the photoelectric encoder, there are certain errors between the amplified two-way Moiré fringe signals output by the reading head of the photoelectric encoder and the standard sine wave signal. The amplitudes of the two-way Moiré fringe signals may be inconsistent, and the center points of the two signals are not necessarily 0. Therefore, the three correction coefficients are evenly grouped within the range of available values, with each group's value increasing by a variation amount, and then the error measurement is performed on each group of correction coefficients.
[0044] Select the minimum value of the correction coefficient a0 as a MIN , and the maximum value as a MAX . Each time when calculating, the variation amount of a0 is Δa, then the number of values of a0 is 1 + (a MAX - a MIN ) / Δa; the minimum value of the correction coefficient b0 is b MIN , and the maximum value is b MAX, the change amount of b0 during each calculation is Δb, and the number of values that b0 can take is 1 + / (b MAX -b MIN ) / Δb; the minimum value of the correction coefficient c0 is c MIN , and the maximum value is c MAX , the change amount of c0 during each calculation is Δc, then the number of values that c0 can take during testing is 1 + (c MAX -c MIN ) / Δc. During the calculation process of the correction coefficients a0, b0, and c0, it is necessary to ensure that the value of c0 is greater than 0. Then the number of combinations of the values of a0, b0, and c0 is (1 + (a MAX -a MIN ) / Δa)*(1 + (b MAX -b MIN ) / Δb)*(1 + (c MAX -c MIN ) / Δc).
[0045] In this embodiment, the contrast method and the successive approximation method are used to solve the values of a0, b0, and c0.
[0046] Figure 2 FIG. shows a subdivision error measurement system according to an embodiment of the present invention.
[0047] As Figure 2 shown:[[]]
[0048] Step S11, build a subdivision error measurement system. The subdivision error measurement system includes: a photoelectric encoder under test 1, a reference photoelectric encoder 2, a data acquisition and processing system 3, a computer 4, a motor, and a motor drive system. The motor, the high-precision reference photoelectric encoder 2, and the photoelectric encoder under test 1 are coaxially connected. During measurement, the motor drive system drives the motor to rotate. The computer 4 collects the Moiré fringe signal of the photoelectric encoder under test 1 and the angle data of the reference photoelectric encoder 2 through the data acquisition and processing system 3. The difference between the subdivision value of the photoelectric encoder under test 1 and the subdivision value of the reference photoelectric encoder 2 is the subdivision error at this subdivision point.
[0049] The angular value of a complete Moiré fringe signal period of the photoelectric encoder under test 1 is θ all , collect the data of n sampling points within one period of the Moiré fringe signal of the photoelectric encoder under test 1, where n is a positive integer, and the angular interval between every two adjacent sampling points is θ all / n. Among them, the data of the i-th sampling point includes: the voltage value S of the SIN signal of the sampling point i , the voltage value C of the COS signal of the sampling point i , the angular value θ of the reference photoelectric encoder 2 i , i = 1, 2, 3...n;
[0050] Figure 3 Shows the process of calculating the correction coefficient provided according to an embodiment of the present invention.
[0051] As Figure 3 shown:
[0052] Step S12: The computer 4 takes a set of correction coefficients from the value combinations through the data acquisition and processing system 3, calculates and stores the subdivided values after correction at n sampling points by using formula (1). In formula (1), is replaced with represents the subdivided value after correction at the i-th sampling point, S is replaced with S i and C is replaced with C i , and a total of n subdivided values are obtained; formula (1) is as follows:
[0053]
[0054] wherein, S represents the voltage value of the SIN signal of the uncorrected Moiré fringe signal, C represents the voltage value of the COS signal of the uncorrected Moiré fringe signal, S' represents the voltage value of the SIN signal at the subdivided position of the corrected Moiré fringe signal, and C' represents the voltage value of the COS signal at the subdivided position of the corrected Moiré fringe signal.
[0055] Step S13: The computer 4 calculates and stores the subdivision errors at n acquisition points through the data acquisition and processing system 3. The formula is as follows:
[0056]
[0057] wherein, represents the subdivided value at the i-th sampling point calculated in step S12, and e i represents the subdivision error at the i-th sampling point, that is, the difference between the subdivided value of the tested optical encoder 1 at the i-th sampling point and the subdivided value of the reference optical encoder 2;
[0058] Step S14: The computer 4 calculates and stores the mean square deviation σ of the n subdivision errors through the data acquisition and processing system 3. The formula is as follows:
[0059]
[0060] wherein, represents the average value of the n subdivision errors;
[0061] Step S15: Repeat steps S12 to S14 until the mean square deviation σ of all combinations of correction coefficients in the value combinations is calculated, and take a0, b0, and c0 when the mean square deviation is the smallest as the final correction coefficients.
[0062] In this embodiment, a set of calibration coefficients a0, b0, and c0 with the smallest mean square error of the subdivision error is selected as the final calibration coefficients and stored in the data acquisition and processing system 3. The average value, peak-to-valley value, or eigenvalue of other parameters of the subdivision error can also be used as the basis for selecting the final calibration coefficients. When actually calculating the calibration coefficients of the optical encoder, the value range and variation of the calibration coefficients a0, b0, and c0 can also be adjusted according to parameters such as the accuracy index of the optical encoder, and a suitable range is selected to meet the accuracy requirements without making the calculation amount too large. The number of sampling points n in one cycle of the Moiré fringe signal can also be adjusted according to needs, and a suitable value is selected, also to meet the accuracy requirements without making the calculation amount too large.
[0063] S2. After the calibration coefficients of the optical encoder are calculated, when the optical encoder actually operates, it first reads the stored calibration coefficients a0, b0, and c0, and then acquires two Moiré fringe signals.
[0064] S3. Use the calibration coefficients to correct the Moiré fringe signal, and calculate and output the subdivision value of the corrected subdivision position using formula (1).
[0065] The present invention can be used in angular displacement measurement devices, such as shaft angle optical encoders, and can also be used in linear displacement measurement devices, such as grating scales, and their working principles are the same.
[0066] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
[0067] The above specific embodiments of the present invention do not constitute a limitation to the protection scope of the present invention. Any other corresponding changes and deformations made according to the technical concept of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A subdivision method for Moiré fringe signals of an optoelectronic encoder, characterized in that, It includes the following steps: S1. Calculate three calibration coefficients a0, b0, and c0 for the subdivision of the Moiré fringe signal, where a0 is the central value of the SIN signal, b0 is the central value of the COS signal, and c0 is the ratio of the amplitudes of the COS signal and the SIN signal; S2. Collect the numerical values of the Moiré fringe signal; S3. Use the correction coefficient to correct the Moiré fringe signal, calculate and output the subdivision value of the corrected subdivision position The calculation formula is as follows: Where S represents the voltage value of the uncalibrated SIN signal of the Moiré fringe signal, C represents the voltage value of the uncalibrated COS signal of the Moiré fringe signal, S' represents the voltage value of the SIN signal at the subdivided position after calibration of the Moiré fringe signal, and C' represents the voltage value of the COS signal at the subdivided position after calibration of the Moiré fringe signal; The calculation process of the calibration coefficients a0, b0, and c0 is as follows: Step S11: Build a sub - division error measurement system, co - axially connect the motor, a high - precision reference optical encoder and the optical encoder to be tested, and collect data of n sampling points within one period of the Moiré fringe signal of the optical encoder to be tested, where n is a positive integer. Among them, the data of the i - th sampling point includes: the voltage value S of the SIN signal at the i - th sampling point i , the voltage value C of the COS signal at the i - th sampling point i , the angle value θ of the reference optical encoder i , i = 1, 2, 3...n; Step S12. Among the value combinations, select a set of the correction coefficients, and use formula (1) to calculate the corrected subdivision values of n sampling points. In formula (1), is replaced with represents the corrected subdivision value of the i-th sampling point, and S is replaced with S i , and C is replaced with C i . A total of n subdivision values are obtained; Step S13. Calculate the subdivision errors of n sampling points, and the formula is as follows: Among them, represents the subdivision value of the i-th sampling point calculated in step S12, and e i represents the subdivision error of the i-th sampling point, that is, the difference between the subdivision value of the photoelectric encoder under test at the i-th sampling point and the subdivision value of the reference photoelectric encoder; Step S14. Calculate the mean square error σ of n subdivision errors, and the formula is as follows: Among them, represents the average value of n sub-division errors; Step S15. Repeat steps S12 to S14 until the mean square error σ of all combinations of the calibration coefficients in the value combination is calculated, and take a0, b0, and c0 when the mean square error is the smallest as the final calibration coefficients.
2. The subdivision method of the Moiré fringe signal of the optoelectronic encoder according to claim 1, characterized in that, The minimum value of the correction coefficient a0 is a MIN , and the maximum value is a MAX . Each time when calculating, the change amount of a0 is Δa, then the number of value-taking of a0 is 1 + (a MAX - a MIN ) / Δa; The minimum value of the correction coefficient b0 is b MIN , and the maximum value is b MAX . Each time when calculating, the change amount of b0 is Δb, then the number of value-taking of b0 is 1 + / (b MAX - b MIN ) / Δb; The minimum value of the correction coefficient c0 is c MIN , and the maximum value is c MAX . The change amount of c0 during each calculation is Δc. Then the number of values of c0 during testing is 1 + (c MAX - c MIN ) / Δc. During the calculation process of the correction coefficients a0, b0, and c0, it is necessary to ensure that the value of c0 is greater than 0. Then the number of the value combinations of a0, b0, and c0 is (1 + (a MAX - a MIN ) / Δa) * (1 + (b MAX - b MIN ) / Δb) * (1 + (c MAX - c MIN ).
3. The subdivision method of the Moiré fringe signal of the photoelectric encoder according to claim 1, wherein The method of selecting the final calibration coefficients also includes: Taking the calibration coefficient when the average error is the smallest as the final calibration coefficient; Taking the calibration coefficient when the peak-to-valley value of the subdivision error is the smallest as the final calibration coefficient.
4. An angular displacement measuring device, characterized in that, Use the method for subdividing the Moiré fringe signal of the optoelectronic encoder according to any one of claims 1-3.
5. A linear displacement measuring device, characterized in that, Use the method for subdividing the Moiré fringe signal of the optoelectronic encoder according to any one of claims 1-3.
Citation Information
Patent Citations
Data processing method and system for absolute photoelectric axis angle encoder
CN109000689A
Photoelectric encoder moire fringe subdivision method
CN112556734A