Method for improving precision of encoder

By acquiring and calibrating the amplitude and phase of the encoder signal, the signal gain and offset correction is used to correct the signal gain and offset, which solves the problem of unreal-time signal calibration in the prior art, and improves the encoder accuracy and improves the resolution .

CN119223206APending Publication Date: 2024-12-31JILIN UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411556472.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

In the prior art, the two-way sine and cosine signal phase calibration lacks an effective method of simple operation and high real-time operation, which affects the improvement of encoder accuracy.

Method used

The analog signal amplitude is collected through the code channel signal analog-to-digital conversion unit, the signal gain is calculated and calibrated, the signal offset is corrected, the signal is divided and the software algorithm compensation is performed, and the orthogonality and symmetry of the signal are realized by using the DSP28335 central processor to improve the orthogonality and symmetry of the signal. Encoder accuracy.

Benefits of technology

High-precision calibration of sinusoidal and cosine signals is achieved, the resolution and measurement accuracy of the encoder are improved, the input signals of the subdivided program have good orthogonality and symmetry, and the overall accuracy of the encoder is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119223206A_ABST
    Figure CN119223206A_ABST
Patent Text Reader

Abstract

The invention relates to a method for improving the precision of an encoder, relates to the technical field of circuit systems, and aims to solve the technical problem that an effective method which is simple and reliable in operation and high in real-time performance does not exist in phase calibration of two paths of sine and cosine signals in the prior art. The method comprises the following steps: collecting the amplitude of an analog signal; gains of sine / cosine signals are calculated and amplified to ideal amplitudes; revising the sinusoidal signal again; equally dividing the fine code signal into a specific number of parts; and respectively calibrating a long period and a short period, and carrying out software algorithm compensation on an error fitting curve. According to the method for improving the precision of the encoder, on the basis of an MR3 + DSP28335 technology, two paths of sine / cosine original analog signals are subjected to hardware adjustment, and then the amplitude, the direct current and the phase are revised again by adopting a software algorithm, so that the two paths of analog signals entering a subdivision program have good orthogonality and symmetry, and the subdivision precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of circuit systems, and in particular to a method for improving the accuracy of an encoder. Background Art

[0002] The photoelectric shaft angle encoder is a representative angular displacement sensor that is currently widely used. Many automated control systems rely on photoelectric shaft angle encoders, while also placing higher requirements on the angle measurement accuracy and resolution of the photoelectric encoders.

[0003] The encoder accuracy consists of large-angle measurement accuracy and single-signal period measurement accuracy. The large-angle measurement accuracy mainly depends on the eccentricity of the code disk relative to the bearing, commonly known as code disk eccentricity; the single-signal period measurement accuracy depends on the sinusoidal scanning signal and its subdivision circuit quality.

[0004] The factors that affect the measurement accuracy of a single signal period include: the size of the signal period, the sinusoidality of the signal, the orthogonality of the signal, the symmetry of the signal, and the stability and dynamic performance of the subsequent circuit processing of the analog signal.

[0005] After an encoder is mechanically assembled and adjusted, the method by which the processing circuit can improve the encoder's accuracy is mainly implemented in three stages through a combination of software and hardware.

[0006] The first stage is the calibration of the original signal before data processing: sine and cosine phase calibration, sine and cosine offset calibration, and sine and cosine gain calibration.

[0007] The second stage is the calibration of algorithms in data processing: calibration of segmentation program algorithms and mathematical models.

[0008] The third stage is the accuracy compensation after data processing: the accuracy compensation is divided into long-period error compensation and short-period error compensation.

[0009] In the past, engineering circuits mostly used hardware methods to manually adjust the DC level and signal amplitude. In engineering design, there was no effective method that was simple, reliable, and highly real-time for phase calibration of two-way sine and cosine signals. Summary of the invention

[0010] The present invention aims to solve the technical problem that there is no effective method for phase calibration of two-way sine and cosine signals in the prior art that is simple, reliable and highly real-time, and provides a method for improving the accuracy of an encoder.

[0011] In order to solve the above technical problems, the technical solutions of the present invention are as follows:

[0012] A method for improving encoder accuracy comprises the following steps:

[0013] Step i: collecting the amplitude of the analog signal through the code channel signal analog-to-digital conversion unit;

[0014] Step ii: According to the analog signal input range, the amplitude of the analog signal collected in step i is used to calculate the gains of the sine and cosine signals respectively, and amplify them to the ideal amplitude;

[0015] Step iii: Re-revise the sine signal using the parameters Offset and Gain;

[0016] Step iv: Divide the SIN precision code signal and COS precision code signal into a specific number of equal parts;

[0017] Step v: Calibrate the long period and the short period respectively, and compensate the error fitting curve by software algorithm.

[0018] In the above technical solution, step i is specifically as follows:

[0019] According to the formula:

[0020] Offset=(Max-Min) / 2+Min

[0021] Wherein, Offset is the actual DC component value of the analog signal, Max and Min are the maximum and minimum values ​​of the actual DC component of the analog signal respectively;

[0022] The offset of the sine and cosine signals is calculated and calibrated to the reference point of the AD conversion digital DC component.

[0023] In the above technical solution, step ii is specifically as follows:

[0024] First, determine the ideal amplitude based on the AD analog signal input range;

[0025] Then, using the formula: Gain = V out / (Max-Min) calculates the gains of the sine and cosine signals respectively, and amplifies them to the ideal amplitude through software;

[0026] Among them, Gain is the amplification factor, Max and Min are the maximum and minimum values ​​of the actual DC component of the analog signal, V out is the ideal amplitude to be output;

[0027] In the above technical solution, step iii is specifically: subtracting the Offset value from the collected sinusoidal signal and then multiplying it by the amplification factor Gain, so that the corrected sinusoidal wave reaches the standard waveform, thereby completing the correction of the amplitude and DC level.

[0028] In the above technical solution, step iv is specifically as follows: two sinusoidal voltage signals with a phase difference of 90 degrees are converted into digital signals through a processing circuit, and the processing circuit performs arc tangent interpolation operation on the digital signals in four quadrants and divides them into 8192 equal parts.

[0029] In the above technical solution, step v is specifically:

[0030] According to the straight line slope formula: k = (y2-y1) / (x2-x1), the accuracy compensation formula is: y = k*(x-x1)+y1;

[0031] Wherein, the horizontal coordinate x represents the actual measured angle value; the vertical coordinate y represents the theoretical angle value; k represents the slope; y1, y2 represent the vertical coordinates of the first and second sampling points respectively, and x1, x2 represent the horizontal coordinates of the first and second sampling points respectively;

[0032] The compensated output angle value is calculated according to the accuracy compensation formula.

[0033] In the above technical solution, step v also includes: according to the Bessel formula:

[0034]

[0035] Among them, x i is the i-th measurement value, i=1, 2…n; is the measurement average, n is the number of measurements, and σ is the root mean square error;

[0036] Find the RMS error of the measurement.

[0037] In the above technical solution, the central processing unit applicable to the method is the DSP28335 central processing unit.

[0038] The present invention has the following beneficial effects:

[0039] The method for improving the encoder accuracy of the present invention is based on the MR3+DSP28335 technology. The two-way sine and cosine original analog signals are adjusted by hardware, and then the amplitude, DC level and phase are revised again by software algorithms, so that the two-way analog signals entering the subdivision program have good orthogonality and symmetry, so as to improve the subdivision accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0041] Figure 1 This is a schematic diagram of the structure of the MR3+DSP28335 circuit board.

[0042] Figure 2This is the basic circuit diagram of MR3.

[0043] Figure 3 It is a Lissajous diagram with a phase of 79.58 degrees for two sine and cosine signals.

[0044] Figure 4 It is a Lissajous diagram of two sine and cosine signals with a phase of 100.42 degrees.

[0045] Figure 5 It is a Lissajous diagram of two sine and cosine signals with a phase of 90 degrees.

[0046] Figure 6 Schematic diagram of sinusoidal signal offset.

[0047] Figure 7 Schematic diagram of sinusoidal signal gain.

[0048] Figure 8 Schematic diagram of the waveforms before and after correction, where (a) is the waveform before correction and (b) is the waveform after correction.

[0049] Fig. 9 Schematic diagram of the subdivision principle.

[0050] Fig.10 Schematic diagram of error compensation principle.

[0051] Fig.11 Schematic diagram of encoder error distribution. DETAILED DESCRIPTION

[0052] The inventive idea of ​​the present invention is: the method of improving the encoder accuracy of the present invention is based on the MR3+DSP28335 technology. After the two-way sine and cosine original analog signals are adjusted by hardware, they are revised again using software algorithms in terms of amplitude, DC level and phase, so that the two-way analog signals entering the subdivision program have good orthogonality and symmetry, so as to improve the subdivision accuracy.

[0053] The method for improving the accuracy of the encoder of the present invention is a sine wave subdivision method, which converts two sine wave voltage signals with a phase difference of 90 degrees into digital signals through a processing circuit. The processing circuit performs arc tangent interpolation operation on the digital signals in four quadrants and divides them into 8192 equal parts, thereby achieving a very high resolution.

[0054] The present invention is described in detail below with reference to the accompanying drawings.

[0055] The structure of the MR3+DSP28335 circuit board is as follows Figure 1As shown, the absolute encoder system is divided into the following eight units in terms of implementation function, namely, a signal extraction unit (omitted in the figure, not shown), a fine code analog signal adjustment and shaping unit (i.e., the fine code analog signal adjustment circuit MR3 in the figure), a medium fine code shaping and amplifying unit (i.e., the medium fine code shaping and amplifying circuit in the figure), a coarse code signal shaping unit (i.e., the coarse fine code shaping and amplifying circuit in the figure), a code channel signal analog-to-digital conversion unit (i.e., the AD analog-to-digital converter in the figure), a data processing unit (i.e., the DSP28355 central processing unit in the figure), a serial port output unit (i.e., the differential data interface circuit in the figure), and a secondary power supply unit (i.e., the secondary voltage stabilizing circuit in the figure).

[0056] Using the high-precision analog signal conditioning chip MR3 technology, this chip can calibrate the two-way sine and cosine signals (79.58 degrees to 110.42 degrees phase) to 90 degrees phase standard orthogonal signals. This technology was first applied to engineering encoders, with the advantages of good real-time performance and simple and convenient operation. The basic circuit of MR3 is as follows Figure 2 As shown, the phase of the two sine and cosine signals is corrected by setting the software through human-computer interaction. The Lissajous diagram of the two sine and cosine signals with a phase of 79.58 degrees before correction is shown in Figure 3 The Lissajous diagram of the two sine and cosine signals with a phase of 100.42 degrees before correction is shown in Figure 4 The Lissajous diagram of the corrected two-way sine and cosine signals with a phase of 90 degrees is shown in Figure 5 shown.

[0057] The method for improving the accuracy of the encoder of the present invention comprises the following steps:

[0058] Step i: Using the DSP28335 central processor, the amplitude of all analog signals is collected through the code channel signal analog-to-digital conversion unit.

[0059] like Figure 6 As shown, Offset is the actual DC component value of the analog signal, and 0V is the DC component reference point of the code channel signal analog-to-digital conversion unit (AD analog-to-digital converter).

[0060] The offset of the sine and cosine signals is calculated using formula (1) and calibrated to the DC component reference point of the AD converter.

[0061] Offset=(Max-Min) / 2+Min (1)

[0062] Among them, Max and Min are the maximum value and minimum value of the actual DC component of the analog signal respectively.

[0063] Step ii: According to the AD analog signal input range, the DSP28335 central processor calculates the amplitude of the analog signal collected in step i through formula (2) to calculate the gain of the sine and cosine signals, and amplifies them to the ideal amplitude through software.

[0064] Gain=V out / (Max-Min) (2)

[0065] Among them, Gain is the amplification factor, V out is the ideal output amplitude.

[0066] like Figure 7 As shown, curve A is the actual amplitude of the sine wave signal before gain, and curve B is the ideal amplitude of the sine wave signal after amplification.

[0067] Step iii: Re-adjust the sine signal using the parameters Offset and Gain.

[0068] Subtract the Offset value from the acquired sine signal and multiply it by the gain factor Gain to make the corrected sine wave reach the standard waveform. Figure 8 As shown, the amplitude and DC level correction are completed.

[0069] After the three calibration methods of software and hardware, the amplitude, DC level and phase of the sine and cosine signals are corrected before entering the subdivision program, which provides an important guarantee for improving the encoder subdivision accuracy.

[0070] Step iv: Divide the SIN precision code signal and COS precision code signal into 8192 equal parts, such as Fig. 9 shown.

[0071] In order to improve the angle measurement accuracy and resolution, it is usually necessary to interpolate and subdivide the minimum periodic grating signal of the code disk. The method of improving the encoder accuracy of the present invention is a sine wave subdivision method, which converts two sine wave voltage signals with a phase difference of 90 degrees into digital signals through a processing circuit, and the processing circuit performs arc tangent interpolation operation on the digital signal in four quadrants and divides it into 8192 equal parts, thereby achieving a very high resolution.

[0072] Among them, SIN in the SIN precision code signal identifies a sine wave, and COS in the COS precision code signal identifies a cosine wave. SIN and COS are two sine wave signals with a phase difference of 90 degrees.

[0073] Step v: Accuracy compensation.

[0074] The long period and short period are calibrated respectively, and the error fitting curve is compensated by software algorithm using DSP28335 central processor.

[0075] The accuracy compensation in this step includes: long-period error compensation and short-period error compensation; among them, the long-period error compensation is mainly to compensate for the error caused by the eccentricity of the code disk; the short-period error compensation is mainly to compensate for the error caused by the quality of the precision code signal. Fig.10 shown.

[0076] The accuracy compensation calculation is shown in formula (3) and formula (4)

[0077] The formula for the slope of a straight line is: k = (y2-y1) / (x2-x1) (3)

[0078] Precision compensation formula: y=k*(x-x1)+y1(4)

[0079] Among them, the horizontal coordinate x represents the actual measured angle value, the vertical coordinate y represents the theoretical angle value, k represents the slope, y1 and y2 represent the vertical coordinates of the first and second sampling points respectively, and x1 and x2 represent the horizontal coordinates of the first and second sampling points respectively.

[0080] The existing ultra-high precision polyhedron and autocollimator detection equipment are used to measure the angle measurement errors of 24 sampling points, and the slope of the straight line is calculated according to formula (3) between every two sampling points.

[0081] The output angle value after compensation is calculated according to formula (4). The difference between the angle value of the encoder under test and the angle value of the 24-hedron at the same position is calculated and regarded as the error value of the angle.

[0082] In the full range of 0° to 360°, one point is measured every 15°, and a total of 24 sets of encoder error data are obtained. The error distribution is as follows Fig.11 shown.

[0083] Known Bessel formula:

[0084]

[0085] Among them, x i (i=1, 2…n) is the i-th measurement value, is the measurement average, n is the number of measurements, and σ is the root mean square error.

[0086] According to the Bessel formula of formula (5), the root mean square error of the measurement can be calculated:

[0087] σ 主 ≈18.35″, σ 备 ≈17.52″.

[0088] σ 主 represents the root mean square error of the main encoder, σ 备 Represents the root mean square error of the encoder.

[0089] Simulations show that the method of the present invention is practical and effective.

[0090] The method for improving the encoder accuracy of the present invention is based on the MR3+DSP28335 technology. The two-way sine and cosine original analog signals are adjusted by hardware, and then the amplitude, DC level and phase are revised again by software algorithms, so that the two-way analog signals entering the subdivision program have good orthogonality and symmetry, so as to improve the subdivision accuracy.

[0091] Obviously, the above embodiments are merely examples for the purpose of 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 therefrom are still within the scope of protection of the invention.

Claims

1. A method for improving the accuracy of an encoder, characterized in that: The following steps are involved: Step i: collecting the amplitude of the analog signal through the code channel signal analog-to-digital conversion unit; Step ii: According to the analog signal input range, the amplitude of the analog signal collected in step i is used to calculate the gains of the sine and cosine signals respectively, and amplify them to the ideal amplitude; Step iii: Re-revise the sine signal using the parameters Offset and Gain; Step iv: Divide the SIN precision code signal and COS precision code signal into a specific number of equal parts; Step v: Calibrate the long period and the short period respectively, and compensate the error fitting curve by software algorithm.

2. The method for improving encoder accuracy according to claim 1, characterized in that: Step i is specifically as follows: According to the formula: Offset=(Max-Min) / 2+Min Wherein, Offset is the actual DC component value of the analog signal, Max and Min are the maximum and minimum values ​​of the actual DC component of the analog signal respectively; The offset of the sine and cosine signals is calculated and calibrated to the reference point of the AD conversion digital DC component.

3. The method for improving encoder accuracy according to claim 1, characterized in that: Step ii is specifically as follows: First, determine the ideal amplitude based on the AD analog signal input range; Then, using the formula: Gain = V out / (Max-Min) calculates the gains of the sine and cosine signals respectively, and amplifies them to the ideal amplitude through software; Among them, Gain is the amplification factor, Max and Min are the maximum and minimum values ​​of the actual DC component of the analog signal, V out is the ideal output amplitude.

4. The method for improving encoder accuracy according to claim 1, characterized in that: Step iii is specifically as follows: subtract the Offset value from the collected sinusoidal signal and then multiply it by the gain factor Gain, so that the corrected sinusoidal wave reaches the standard waveform, thereby completing the correction of the amplitude and DC level.

5. The method for improving encoder accuracy according to claim 1, characterized in that: Step iv is specifically as follows: two sine wave voltage signals with a phase difference of 90 degrees are converted into digital signals through a processing circuit, and the processing circuit performs arc tangent interpolation operation on the digital signals in four quadrants and divides them into 8192 equal parts.

6. The method for improving encoder accuracy according to claim 1, characterized in that: Step v is specifically as follows: According to the straight line slope formula: k = (y2-y1) / (x2-x1), the accuracy compensation formula is: y = k*(x-x1)+y1; Wherein, the abscissa x represents the actual measured angle value; the ordinate y represents the theoretical angle value; k represents the slope; y1, y2 represent the ordinates of the first and second sampling points respectively, and x1, x2 represent the abscissas of the first and second sampling points respectively; The compensated output angle value is calculated according to the accuracy compensation formula.

7. The method for improving encoder accuracy according to claim 6, characterized in that: Step v also includes: according to the Bessel formula: Among them, x i is the i-th measurement value, i=1, 2…n; is the measurement average, n is the number of measurements, and σ is the root mean square error; Find the RMS error of the measurement.

8. The method for improving encoder accuracy according to any one of claims 1 to 7, characterized in that: The method is applicable to the DSP28335 CPU.

Citation Information

Cited By

  • Bus encoder small-memory large-scale compensation table difference compensation scheme and algorithm thereof

    CN121412139A