Correction value calculation method, correction value calculation program, correction value calculation device, and encoder
The correction value calculation method addresses inefficiencies in existing error correction for two-phase sinusoidal signals by using a least squares approach to calculate correction coefficients, achieving high precision and reduced resource usage.
Patent Information
- Application Number
- JP2023109451
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-03
- Publication Date
- 2025-01-17
AI Technical Summary
Existing methods for correcting errors in two-phase sinusoidal signals, such as offset, amplitude ratio, and phase difference errors, are inefficient and inaccurate, particularly in encoders with low sampling rates or fluctuating signal strengths, leading to insufficient error reduction.
A correction value calculation method using a least squares method to calculate correction coefficients based on phase angles and squared radii in a Lissajous waveform, incorporating a polar coordinate conversion and error detection process to correct offset, amplitude ratio, and phase difference errors in two-phase sinusoidal signals.
The method enables efficient and accurate correction of interpolation errors in two-phase sinusoidal signals, reducing calculation resources and costs, and achieving high precision without the need for a master encoder or highly accurate feeding mechanisms.
Smart Images

Figure 2025007813000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a correction value calculation method, a correction value calculation program, a correction value calculation device, and an encoder for correcting a two-phase sinusoidal signal. [Background technology]
[0002] Conventionally, there are known methods for correcting errors such as offset error, amplitude ratio error, and phase difference error in a two-phase sinusoidal signal output by an encoder.
[0003] For example, Patent Document 1 describes an invention that detects the third harmonic components of a two-phase sinusoidal signal, and calculates and corrects the offset error, amplitude ratio error, and phase difference error. In the invention described in Patent Document 1, the offset error and amplitude ratio error are obtained from four zero-crossing points that cross the X-axis or Y-axis in a Lissajous signal using a two-phase sinusoidal signal, so if the data used to calculate the correction coefficient does not include data sampled near the zero-crossing points, the error cannot be sufficiently reduced. In addition, the phase difference error is obtained from the four points where the Lissajous signal using a two-phase sinusoidal signal intersects with the lines y=x and y=-x, but in order to reduce the error, it is necessary to sample near the points where the signal intersects with the lines.
[0004] Here, because an electromagnetic induction encoder detects displacement by driving an AC signal, it takes longer to sample than a photoelectric encoder. Also, low-power encoders may have a reduced sampling rate. Such encoders with low sampling rates may not be able to sample near desired points (for example, zero crossing points or points where y=x and y=-x intersect), and there is a risk that errors may not be reduced sufficiently.
[0005] Patent Document 2 discloses a method for detecting third-order harmonic components by Fourier analysis using equal-pitch data. In this method, one revolution of the Lissajous signal is equally divided, and all sections are subjected to Fourier analysis. With this method, if the sampling rate is low, it takes time to complete sampling of all sections, and the frequency of updating the Fourier analysis decreases. For this reason, there is a problem that it is difficult to employ Fourier analysis for detecting offset errors, amplitude ratio errors, and phase difference errors.
[0006] Patent Document 3 discloses a method of approximating two-phase sinusoidal signals X and Y to an equation of the sum of a sine wave and a cosine wave separately by the least squares method. In order to reduce the interpolation error related to the amplitude, the amplitude ratio between the two-phase sine waves needs to be set to 1. However, the method of Patent Document 3, which uses the least squares method to approximate the two-phase sine waves separately without considering the relative relationship between them, has a problem of low efficiency in detecting the interpolation error related to the amplitude ratio. [Prior art documents] [Patent documents]
[0007] [Patent Document 1] JP 2006-112862 A [Patent Document 2] JP 2006-112859 A [Patent Document 3] JP 2007-327770 A Summary of the Invention [Problem to be solved by the invention]
[0008] In view of this situation, the present invention aims to provide a correction value calculation method, a correction value calculation program, and a correction value calculation device that can calculate correction coefficients for correcting the interpolation error of a two-phase sinusoidal signal in a simple, efficient and highly accurate manner, as well as an encoder equipped with the correction value calculation device. [Means for solving the problem]
[0009] In order to solve the above problem, a correction value calculation method according to an embodiment of the present invention calculates a correction value for correcting a two-phase sinusoidal signal (X, Y) output by an encoder. The correction value calculation method calculates N phase angles θ in a Lissajous waveform drawn by the two-phase sinusoidal signal. i and each phase angle θ i The corresponding Lissajous radius R i For each phase angle θ i The corresponding Lissajous radius R i The squared radius R i 2 A polar coordinate calculation step for calculating each phase angle θ i and the phase angle θ i The squared radius R corresponding to i 2 Based on this, at least the offset error C of the signal X that is a two-phase sinusoidal signal is x The correction residual ΔC x and the offset error C of the signal Y y The correction residual ΔC y , the amplitude ratio error K between signal X and signal Y a The correction residual ΔK a , and the phase difference error P between signals X and Y y Correction residual ΔP y and a correction value calculation step of calculating each correction value based on each correction residual. 2 The coefficients in the approximate model expressed as trigonometric functions that include the phase angle θ as an argument are i and each phase angle θ i The squared radius R corresponding to i 2 and a correction residual is calculated from the obtained coefficients by the least squares method.
[0010] Moreover, a program according to an embodiment of the present invention causes a computer to execute the above-described correction value calculation method.
[0011] Moreover, a correction value calculation device according to an embodiment of the present invention calculates a correction value for correcting a two-phase sinusoidal signal (X, Y) output by an encoder. The correction value calculation device calculates N phase angles θ in a Lissajous waveform drawn by the two-phase sinusoidal signal. i and each phase angle θ i The corresponding Lissajous radius R i For each phase angle θ i The corresponding Lissajous radius R i The squared radius R i 2 and a polar coordinate conversion unit for calculating each phase angle θ i and the phase angle θ i The squared radius R corresponding to i 2 Based on this, at least the offset error C of the signal X that is a two-phase sinusoidal signal is x The correction residual ΔC x and the offset error C of the signal Y y The correction residual ΔC y , the amplitude ratio error K between signal X and signal Y a The correction residual ΔK a , and the phase difference error P between signals X and Y y Correction residual ΔP y and an error detection unit that calculates each correction value based on each correction residual. 2 The coefficients in the approximate model expressed as trigonometric functions that include the phase angle θ as an argument are i and each phase angle θ i The squared radius R corresponding to i 2 and the correction residual is calculated from the obtained coefficients by the least squares method.
[0012] An encoder according to an embodiment of the present invention includes the above-mentioned correction value calculation device and an encoder detector that outputs a two-phase sinusoidal signal corresponding to a displacement along a measurement direction. The correction value calculation device performs a correction value calculation process that calculates a correction value based on the two-phase sinusoidal signal output by the encoder detector, and a correction process that applies the calculated correction value to the two-phase sinusoidal signal output by the encoder detector. [Brief description of the drawings]
[0013] [Figure 1] 1 is a block diagram showing a basic configuration of a correction value calculation device 1 according to a first embodiment, together with an encoder detection section 11 and a wide-area phase angle calculation section 50 in an encoder 10. FIG. [Diagram 2] 5 is a flowchart showing a procedure for a correction value calculation process in the first embodiment. [Diagram 3] 4 is a graph in which two-phase sinusoidal signals Xi, Yi before and after correction are plotted as Lissajous waveforms for the correction value calculation device 1 according to the first embodiment. [Figure 4] FIG. 11 is a graph in which two-phase sinusoidal signals Xi, Yi before and after correction are converted into phase angle θi and squared radius R2i, and plotted with θ on the horizontal axis and R2 on the vertical axis, for the correction value calculation device 1 according to the first embodiment. [Diagram 5] 11 is a graph in which the standard deviation of R2 is plotted against the cumulative number of times M the correction value calculation has been applied, with the horizontal axis being related to the correction value calculation device 1 according to the first embodiment. [Figure 6] 1 is a graph in which the horizontal axis indicates the cumulative number of times M the correction value calculation has been applied, with respect to offset errors Cx and Cy, for the correction value calculation device 1 according to the first embodiment. [Figure 7] 1 is a graph in which the amplitude ratio error Ka is plotted against the cumulative number of times M the correction value calculation has been applied, with the horizontal axis being related to the correction value calculation device 1 according to the first embodiment. [Figure 8] 1 is a graph in which the phase difference error Py is plotted against the cumulative number of times M the correction value calculation has been applied, with the horizontal axis being related to the correction value calculation device 1 according to the first embodiment. [Figure 9] 11 is a graph in which two-phase sinusoidal signals Xi, Yi before and after correction are plotted as Lissajous waveforms for the correction value calculation device 1 according to the second embodiment. [Figure 10] FIG. 11 is a graph in which two-phase sinusoidal signals Xi, Yi before and after correction are converted into phase angle θi and squared radius R2i, and plotted with θ on the horizontal axis and R2 on the vertical axis, for the correction value calculation device 1 according to the second embodiment. [Figure 11] 13 is a graph in which the standard deviation of R2 is plotted against the cumulative number of times M the correction value calculation is applied, with the horizontal axis being related to the correction value calculation device 1 according to the second embodiment. [Figure 12] 11 is a graph in which the horizontal axis indicates the cumulative number of times M the correction value calculation has been applied, with respect to offset errors Cx and Cy, for the correction value calculation device 1 according to the second embodiment. [Figure 13] 11 is a graph in which the amplitude ratio error Ka is plotted against the cumulative number of times M the correction value calculation has been applied, with the horizontal axis being related to the correction value calculation device 1 according to the second embodiment. [Figure 14] 11 is a graph in which the phase difference error Py is plotted against the cumulative number of times M the correction value calculation has been applied, with the horizontal axis being related to the correction value calculation device 1 according to the second embodiment. [Figure 15] 1 is a diagram showing a schematic diagram of a state in which a rotor is tilted with respect to a stator in a rotary encoder; [Figure 16] 11 is a graph showing fluctuations in signal strength of two-phase sinusoidal signals with respect to rotational displacement φ when the rotor is tilted. [Figure 17] FIG. 11 is a block diagram showing a basic configuration of a correction value calculation device 1a according to a third embodiment, together with an encoder detection unit 11 in an encoder 10. [Figure 18] 10 is a flowchart showing a procedure for a correction value calculation process in the second embodiment. [Figure 19] 13 is a graph in which the square radius Ri2 of the signal intensity before correction is plotted with the horizontal axis representing the rotor displacement φ, for the correction value calculation device 1a according to the third embodiment. [Figure 20] 13 is a graph in which the square radius RLCi2 after the application of the signal intensity correction is plotted with the horizontal axis representing the rotor displacement φ, for the correction value calculation device 1a according to the third embodiment. [Figure 21] 13 is a graph in which the square radius Ri2 of the signal intensity before correction is plotted with the horizontal axis representing the phase angle θ, for the correction value calculation device 1a according to the third embodiment. [Figure 22]13 is a graph in which the square radius RLCi2 after signal intensity correction is plotted with the horizontal axis representing the phase angle θ, for the correction value calculation device 1a according to the third embodiment. [Diagram 23] FIG. 13 is a graph in which the square radius Ri2 after correction, which is obtained by applying a correction value calculated using the square radius RLCi2 after correction of signal strength to two-phase sinusoidal signals Xi and Yi, is plotted with the phase angle θ on the horizontal axis, for the correction value calculation device 1a according to the third embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] [First embodiment] Hereinafter, the first embodiment will be described with reference to FIGS.
[0015] The correction value calculation device 1 calculates a correction value for correcting a two-phase sinusoidal signal in an encoder. Fig. 1 is a block diagram showing the basic configuration of the correction value calculation device 1 according to the first embodiment, together with an encoder detection unit 11 and a wide-area phase angle calculation unit 50 in an encoder 10.
[0016] In the example shown in FIG. 1, the correction value calculation device 1 is implemented in a form built into the encoder 10 together with the encoder detection unit 11 and the wide-area phase angle calculation unit 50. In this embodiment, the encoder 10 includes the encoder detection unit 11 that outputs a two-phase sinusoidal signal corresponding to a displacement along a measurement direction, the correction value calculation device 1, and a wide-area phase angle calculation unit 50 that calculates a wide-area phase angle φ (e.g., equivalent to a rotational displacement of a rotary encoder) that is the final output of the encoder 10 from the phase angle θ calculated by the correction value calculation device 1. The correction value calculation device 1 includes a correction unit 20, an error detection unit 40, and a polar coordinate conversion unit 30. The correction value calculation device 1 performs a correction value calculation process that calculates a correction value based on the two-phase sinusoidal signal output by the encoder detection unit 11, and a correction process that applies a correction value calculated in advance to the two-phase sinusoidal signal output by the encoder detection unit 11. In such an implementation form in which the correction value calculation device 1 is built into the encoder 10, if the correction value calculation device 1 can calculate the correction value sufficiently quickly, it can dynamically update the correction value while detecting the displacement.
[0017] As another implementation form of the correction value calculation device 1, the correction value calculation device 1 may be implemented separately from the encoder 10. For example, the correction value calculation device 1 may be realized by a computer separate from the encoder detection unit 11. When the encoder detection unit 11 is installed at the displacement measurement location, the correction value calculation device 1 may acquire data of a two-phase sinusoidal signal acquired by the encoder detection unit 11 in the installed state via a communication means or a storage medium, and may calculate a correction value based on the acquired data. Then, the calculated correction value may be provided to the encoder detection unit 11 via the communication means or the storage medium.
[0018] The detection principle of the encoder detection unit 11 is not important, but may be, for example, a photoelectric type, a magnetic type, an electromagnetic induction type, or the like. A Lissajous waveform can be drawn using the two-phase sinusoidal signal output by the encoder detection unit 11 (for example, with X as the horizontal axis and Y as the vertical axis). Ideally, it is desirable for such a Lissajous waveform to have a Lissajous radius R that is constant regardless of the phase angle θ, but since the two-phase sinusoidal signal output by the encoder detection unit 11 normally contains errors such as an amplitude error, a phase difference error, and an offset, the Lissajous radius R is not constant regardless of the phase angle θ.
[0019] The analog two-phase sinusoidal signal output by the encoder detection unit 11 is sampled at a predetermined frequency and digitized by an AD converter (not shown). In this specification, a collection of data of this digitized two-phase sinusoidal signal is simply referred to as "two-phase sinusoidal signals X, Y." In addition, the digitized two-phase sinusoidal signals X, Y may be referred to as "two-phase sinusoidal signal X" to explicitly indicate the same sampled individual data as necessary. i , Y i In this specification, the calculation of the correction value will be described using N pairs of digital data of the two-phase sinusoidal signals X and Y. That is, the two-phase sinusoidal signal X used to calculate the correction value i , Y i In this data, i is an integer ranging from 0 to N-1.i , Y i For other parameters calculated from the square radius R i 2 , phase angle θ i This is expressed using subscripts as follows.
[0020] The two-phase sinusoidal signals X, Y are input to a correction unit 20. The correction unit 20 holds a correction value to be applied to the two-phase sinusoidal signals. This correction value is calculated by an error detection unit 40. The correction unit 20 corrects the two-phase sinusoidal signals X, Y using the correction value, and outputs output signals X', Y'. The output signals X', Y' from the correction unit 20 are input to a polar coordinate conversion unit 30.
[0021] The correction unit 20 corrects the offset error in the orthogonal direction of the two-phase sinusoidal signal (i.e., the offset error C x and the Y offset error C y ), and the amplitude ratio error in the orthogonal direction (Ka=A y / A x ), and the X and Y phase difference error (P y ) is used as a correction value to correct the two-phase sinusoidal signals X and Y. The two-phase sinusoidal signals X and Y having various errors are expressed as in equation (1).
number
[0022] As an example of a specific method of applying the correction value, the correction unit 20 applies the correction value to the two-phase sinusoidal signal X according to the formula (2). i and Y i and output signal (compensated two-phase sinusoidal signal) X i ' and Y i ' is a good idea.
number
[0023] In the initial state where the correction value is not calculated by the error detection unit 40, the correction unit 20 detects the two-phase sinusoidal signal X i , Yi Output signal X as is i ', Y i ', or output signal X i ', Y i For example, the initial value of the correction value is C x =0, C y =0, K a =1, P y If = 0, then in the initial state where the correction value is not calculated by the error detection unit 40, no correction is substantially performed, and the two-phase sinusoidal signal X i , Y i is the output signal X i ', Y i will be output as '.
[0024] The polar coordinate conversion unit 30 converts the output signal X of the correction unit 20 into i ', Y i ', the phase angle θ in the two-phase sinusoidal signal i and the Lissajous radius R corresponding to the phase angle i The squared radius R i 2 Calculate.
number
[0025] The wide-area phase angle calculation unit 50 calculates each phase angle θ i The wide-area phase angle φ represents a wide range of displacement that exceeds the displacement corresponding to one period of a two-phase sinusoidal signal. i Calculate the wide-area phase angle φ i is the number of periods of the two-phase sinusoidal signal from the reference displacement (origin) (number of rotations of the Lissajous signal) n i , the phase angle θ calculated by the polar coordinate conversion unit 30 i For example, in the case of an encoder in which 100 periods of a two-phase sinusoidal signal are included in one period of the wide-range phase angle φ (from 0 degrees to 360 degrees), φ i =(n i ×360+θ i ) / 100, so φ i andi and θ i The number of revolutions of the Lissajous signal n i The wide-area phase angle φ calculated by the wide-area phase angle calculation unit 50 can be counted by a known incremental up-down counter (upper counter). i is the final output of the encoder 10.
[0026] The error detection unit 40 detects the phase angle θ i and the squared radius R i 2 The error detector 40 calculates a correction value based on at least the offset error (C x and C y ), amplitude ratio error (K a ), and phase difference error (P y ) is calculated as a correction value and provided to the correction unit 20.
[0027] Specifically, the error detection unit 40 calculates the square radius R using a trigonometric function that includes the phase angle θ as an argument. 2 The coefficient A in the approximate model (equation (5) and equation (6)) c1 , A s1、 R o1 Let each of the phase angles θ and the corresponding squared radius R 2 and are calculated using the least squares method.
number
[0028] For example, the error detection unit 40 uses the formula (5) as an approximate formula model, i 2 and θ i Then, the coefficients in equation (5) can be calculated as elements of the C1 matrix using equation (7).
number
[0029] The error detection unit 40 uses the formula (6) as an approximate model and calculates R i 2 and 2θ i Then, we can create a three-variable simultaneous linear equation and determine each coefficient in equation (6) as an element of the C2 matrix using equation (8).
number
[0030] Then, the error detection unit 40 obtains each correction value (that is, the correction residual remaining in the two-phase sinusoidal signals) from the obtained coefficients using equations (9) to (12).
number
[0031] In equation (9), the offset error C of X x The reason why the above can be obtained can be explained as follows. That is, in equation (1), the offset error C x If only X and Y exist, then X and Y are expressed by equation (13).
number
[0032] Therefore, the squared radius R 2 is expressed by equation (14).
number
[0033] By comparing the coefficients of cosθ in equations (5) and (14), the relationship in equation (9) can be obtained. The offset error C y The reason why is obtained can be explained in a similar manner.
[0034] In addition, the amplitude ratio error K a The reason why A is obtained can be explained as follows. x ≠A y And Ka =A y / A x If there are no other errors, the squared radius R 2 is expressed by equation (15).
number
[0035] By comparing the coefficient of cos2θ in equation (15) and equation (6), the relationship in equation (11) is obtained.
[0036] In addition, in equation (12), the phase difference error P y The reason why the phase difference error P y If there is only one, the square radius R 2 is expressed by equation (16).
number
[0037] P y When ≒0, cos2P y ≒ 1, equation (16) can be approximated as equation (17).
number
[0038] Furthermore, P y = 0 near sin2P y ≒2P y Therefore, the relationship in equation (18) can be derived.
number
[0039] Next, a correction value calculation process for calculating a correction value using the correction value calculation device 1 configured as above will be described. FIG. 2 is a flowchart showing the procedure of the correction value calculation process in the first embodiment. The correction value calculation process is executed by the correction unit 20, the polar coordinate conversion unit 30, and the error detection unit 40. In the correction value calculation process, the offset error C x , Y offset error C y , amplitude ratio error K a , and the phase difference error P y These errors thus obtained become correction values, and are used to remove the effects of the errors from the two-phase sinusoidal signals X and Y output from the encoder detection unit 11.
[0040] Offset error C x and C y , amplitude ratio error K a , and the phase difference error P y The two-phase sinusoidal signals X and Y having the above-mentioned can be expressed as the formula (1). In the formula (1), C x =0, C y =0, K a =A y / A x =1, P y = 0 is the state with the smallest error.
[0041] When the correction value calculation process is started, the correction unit 20 first calculates N pairs of digital data of the two-phase sinusoidal signals X and Y as output data of the encoder detection unit 11 to be used for correction (X i , Y i where i is 0 to N-1) is acquired (step S01). This data may be acquired in real time from the encoder detection unit 11, or data that has been acquired and recorded in advance by the encoder detection unit 11 may be acquired via a communication means or a storage medium.
[0042] Next, the polar coordinate conversion unit 30 calculates a phase angle θ i and the corresponding squared radius R i 2 is calculated (step S02).
[0043] Next, the error detection unit 40 detects each phase angle θ i and the squared radius R i 2 Based on the above, the correction residual (ΔC x and ΔC y ), and the correction residual of the amplitude ratio error (ΔK a ), and the phase difference error correction residual (ΔP y ) is calculated (step S03).
[0044] Then, the correction unit 20 updates the correction value held therein based on the calculated correction residual of each error (step S04). f (However, <G f ≦1), each correction value is updated by equation (19). When updating the correction value by using equation (19), the feedback gain G f G f If you set it to <1, it will prevent the effect of the correction residual from being excessively reflected in the correction value, and the correction residual will be a value with a small error (ΔC x , ΔC y , and ΔP y For 0, ΔK a It is possible to make it easier to converge to 1).
number
[0045] When step 03 is performed for the first time in the correction value calculation process, a predetermined initial value (e.g., C x =0, C y =0, K a =1, P y = 0), it is advisable to apply an update based on the calculated correction residual.
[0046] Next, the correction unit 20 corrects the two-phase sinusoidal signal based on the correction value calculated by the error detection unit 40, and outputs the signal Xi ', Y i ' is output (step S05).
[0047] When the calculation of the correction value is repeated (step S06; Yes), the two-phase sinusoidal signal X i ', Y i ' to a new two-phase sinusoidal signal X i , Y i (step S07), and the process returns to step S02. Steps S02 to S05 are repeated the required number of times, and when the repetition is no longer necessary (step S06; No), the correction value calculation process ends. The correction value at the end of the correction value calculation process becomes the final correction value. The number of times that the calculation and update of the correction value is repeated may be a predetermined number of times. Alternatively, it may be repeated until the correction residual becomes sufficiently small (for example, until it falls below a predetermined threshold value). In such a correction value calculation process, the initial two-phase sinusoidal signal X i , Y i The calculation to calculate and update the correction value based on is applied cumulatively, and the correction residual is the value with the smallest error (ΔC x , ΔC y , and ΔP y For 0, ΔK a For convergence to 1).
[0048] Next, a simulation performed to confirm the effectiveness of the correction value calculation process performed by the correction value calculation device 1 according to this embodiment will be described.
[0049] When carrying out the simulation, the data to which the correction value calculation process is applied is C x =0.1, C y =0.05, A x =0.95, A y = 1.05, P y Two-phase sinusoidal signal X with an error of -0.04 i , Y iThen, the correction value calculation process of the first embodiment was applied to these 32 pieces of data. The cumulative number of times the correction was applied (the number of times the processes of steps S02 to S05 were repeated) M was set to 30.
[0050] Figure 3 shows the two-phase sinusoidal signal X before and after compensation. i , Y i 4 is a graph plotting the Lissajous waveform of the two-phase sinusoidal signal X before and after compensation. i , Y i Phase angle θ i and the squared radius R 2 i The horizontal axis is θ and the vertical axis is R 2 From these graphs, the R 2 is constant, which is close to the ideal two-phase sinusoidal signal X i , Y i It is clear that the above is obtained.
[0051] Figures 5 to 8 show the cumulative effect of the correction. 2 The standard deviation of and C x , C y , K a , and P y This is a graph in which the cumulative number of times the correction value calculation is applied M is plotted on the horizontal axis for each error. 2 The standard deviation of R becomes smaller as the cumulative application count M of the correction value calculation increases. 2 It can be seen that the variation in the two-phase sinusoidal signal X i , Y i It can be seen that the error converges to the value set when generating the data. It can be seen that the convergence is sufficient after about M = 10 cumulative applications.
[0052] According to the correction value calculation device 1 and the correction value calculation process of the first embodiment described above, the squared radius R is used instead of the radius R. 2Since the correction value can be obtained using the above formula, calculations to obtain the square root are not required, and the correction value can be obtained and corrected with high accuracy and efficiency in a simple manner. In particular, by cumulatively applying the correction value calculations, a highly accurate correction value can be obtained. Furthermore, since a master encoder that serves as a reference for correction is not required, and the correction value can be obtained from data with unequal pitches, there is no need to use a highly accurate feed mechanism or control to obtain data of a two-phase sinusoidal signal used to obtain the correction value, and costs can be reduced. Furthermore, the correction value can be obtained from fewer data points compared to conventional methods. Therefore, calculations can be accelerated while suppressing calculation resources.
[0053] Second Embodiment Next, a second embodiment of the present invention will be described. In this second embodiment, the correction value calculation process is executed at high speed with a smaller amount of calculation than in the first embodiment. Since the configuration of the correction value calculation device 1 is the same as in the first embodiment, the following mainly describes the calculation in the correction value calculation process of the second embodiment.
[0054] In the first embodiment, the squared radius R is calculated using a trigonometric function that includes the phase angle θ as an argument. 2 Equations (7) and (8) were used to find the coefficients in the approximate model (equation (5) and equation (6)) that represents the above. These equations include operations of sin and cos. In embedded digital signal processing devices such as microcontrollers, DSPs, and FPGAs, operations of sin and cos are realized using high-order polynomials, and the accuracy of the operation depends on the degree of the polynomial. For example, to obtain an accuracy of 1LSB or less in typical Q14 format fixed-point arithmetic using a polynomial obtained by Maclaurin expansion of sinθ, 11th-order polynomial operation is required. N θ i Performing high-order polynomial arithmetic on x requires an increase in computation resources or computation time, and is difficult to implement in a small, lightweight digital signal processing device such as one that is built into an encoder.
[0055] Therefore, in this embodiment, the sin and cos calculations are replaced with calculations that require less calculation. In a range in which the error is sufficiently small, the two-phase sinusoidal signal X i and Y i x divided by amplitude A i andy i can be approximated as in equation (20). A high-precision encoder can measure the amplitude A of the signal X even before compensation. x and the amplitude A of the signal Y y These are close to the nominal design value A of the amplitude. nom Therefore, if the common (average) amplitude of signals X and Y is A, then cosθ i x i , sinθ i y i Approximate to.
number
[0056] In this way, under the constraint of using a high-precision encoder with a small error to the extent that the approximation of Equation (20) can be applied even before correction, the phase angle θ i The trigonometric functions of x i andy i The amount of calculation is reduced by replacing the calculation with the calculation of x i andy i In order to perform the calculation using the phase angle θ i Instead, the phase angle θ i Represents x i andy i These are input to the error detection unit 40.
[0057] The error detection unit 40 of the second embodiment uses cosθ i x i , sinθ i y i Each coefficient in equation (5) is calculated using equation (21) obtained by substituting
number
[0058] The error detection section 40 can obtain each coefficient in equation (5) as an element of the C1 matrix using equation (21) with a smaller amount of calculation than equation (7).
[0059] For equation (8), the double angle formula is cos2θ i and sin2θ i , x i andy i can be expressed as equation (22) using
number
[0060] The error detection section 40 of the second embodiment calculates each coefficient in equation (6) using equation (23), which is obtained by substituting equation (22) into equation (8).
number
[0061] Using equation (23), the error detection section 40 can determine the coefficients in equation (6) as elements of the C2 matrix with a smaller amount of calculation than equation (8).
[0062] The error detection unit 40 obtains each correction value (i.e., correction residuals remaining in the two-phase sinusoidal signals) from the obtained coefficients, as in the first embodiment. At this time, in the first embodiment, the correction values are obtained by the formulas (9) to (12).
[0063] Here, among the formulas (9) to (12) for calculating the correction values, the formula (11) includes a square root operation, which increases the amount of calculation. For this reason, in this embodiment, the calculation of the formula (11) is simplified. That is, the square root of 1+x (√(1+x)) is expanded into the Maclaurin expansion to obtain the formula (24).
number
[0064] In equation (24), x=-2A c2 Then, the calculation including the square root in equation (11) can be approximated by a polynomial as in equation (25).
number
[0065] When using a high-precision encoder with small error, ΔK a ≒ 1, i.e., A c2 Therefore, in the Q14 format, sufficient accuracy can be obtained with expansion up to the second order. Therefore, the amount of calculation can be reduced by simplifying equation (11) to equation (26).
number
[0066] The correction value calculation process for calculating the correction value using the correction value calculation device 1 can be realized in the same procedure as the correction value calculation process in the first embodiment shown in FIG. 2, except that equations (21), (23), and (26) are used instead of equations (7), (8), and (11), respectively.
[0067] Next, a simulation performed to confirm the effectiveness of the correction value calculation process performed by the correction value calculation device 1 according to this embodiment will be described.
[0068] When carrying out the simulation, the data to which the correction value calculation process is applied is C x =0.1, C y =0.05, A x =0.95, A y = 1.05, P y Two-phase sinusoidal signal X with an error of -0.04 i , Y i Thirty-two points were randomly generated (that is, N=32). Then, the correction value calculation process of the second embodiment was applied to these 32 pieces of data. The cumulative number of times correction was applied (the number of times the processes of steps S02 to S04 were repeated) M was set to 30.
[0069] Figure 9 shows the two-phase sinusoidal signal X before and after compensation. i , Y i FIG. 10 shows a graph plotting a two-phase sinusoidal signal X before and after compensation. i , Y i Phase angle θ i and the squared radius R 2 i The horizontal axis is θ and the vertical axis is R 2 From these graphs, the R 2 is constant, which is close to the ideal two-phase sinusoidal signal X i , Y i It is clear that the above is obtained.
[0070] Figures 11 to 14 show the cumulative effect of corrections. 2 The standard deviation of and C x , C y , K a , and P y This is a graph in which the cumulative number of times the correction value calculation is applied M is plotted on the horizontal axis for each error. 2 The standard deviation of R becomes smaller as the cumulative application count M of the correction value calculation increases. 2 It can be seen that the variation in the two-phase sinusoidal signal X i , Y i It can be seen that the error converges to the value set when generating the data. It can be seen that the convergence is sufficient after about M = 10 cumulative applications.
[0071] According to the correction value calculation device 1 and the correction value calculation process of the second embodiment described above, it is possible to calculate the correction value efficiently and with high accuracy by simple calculations using only four arithmetic operations, without the need for calculations to obtain sine functions, cosine functions, and square roots. Therefore, it is possible to speed up the calculations while suppressing the calculation resources, and it is possible to apply the correction value calculation process to a small and lightweight digital signal processing device that is built into an encoder and dynamically updates the correction value.
[0072] Third Embodiment Next, a third embodiment of the present invention will be described with reference to FIGS.
[0073] The correction value calculation method of the first embodiment described above is effective when the encoder detection unit 11 has a measurement range within one period of the two-phase sinusoidal signal, or when there is small fluctuation in the intensity of the signal output by the encoder detection unit 11. However, when there is large fluctuation in the signal intensity in the measurement range of displacement exceeding one period of the two-phase sinusoidal signal, the correction value calculation method of the first embodiment may not be able to obtain a correction value with sufficient accuracy.
[0074] For example, assume that the rotor 200 is provided with a large number of rotor graduations 210, and the stator detector 310 of the stator 300 reads the opposing rotor graduations 210 to output a two-phase sinusoidal signal. In such a rotary encoder detector 110, a two-phase sinusoidal signal with a period corresponding to the number of rotor graduations 210 is output during one rotation of the rotor 200. For example, if the rotor 200 is provided with 100 rotor graduations 210, 100 periods of the two-phase sinusoidal signal are output (therefore, the Lissajous waveform rotates 100 times) during one rotation of the rotational displacement φ from 0 degrees to 360 degrees. As shown in FIG. 15, when the rotor 200 is tilted with respect to the stator 300, the distance between the stator detector 310 and the rotor graduations 210 changes depending on the rotational displacement φ of the rotor 200. Accordingly, the signal strength of the two-phase sinusoidal signal also changes depending on the rotational displacement φ, and the squared radius R 216, the signal pitch also fluctuates in a longer period. That is, at a rotational displacement φ where the distance between the stator detector 310 and the rotor scale 210 becomes closer, the signal strength (and the squared radius R 2 ) becomes larger, and the signal strength (and the squared radius R 2 Similar fluctuations in signal strength can occur in various encoders other than electromagnetic induction type rotary encoders due to misalignment caused by insufficient adjustment during installation of the guide mechanism that mounts the encoder.
[0075] The squared radius R obtained from the signal output by the actual encoder detector 11 2 In this case, the fluctuations due to the interpolation error of the two-phase sinusoidal signal and the fluctuations due to the signal strength fluctuations are mixed, making it difficult to separate the two, and as a result, it is difficult to calculate the correction value of the two-phase sinusoidal signal with high accuracy.
[0076] In the correction value calculation device 1 according to the third embodiment, the fluctuation due to the signal strength fluctuation has a long period exceeding the period of the two-phase sinusoidal signal, whereas the fluctuation due to the interpolation error has a short period equal to or shorter than the period of the two-phase sinusoidal signal. 2 Reduce the effects of wide variations in
[0077] FIG. 17 is a block diagram showing the basic configuration of the correction value calculation device 1a according to the third embodiment together with the encoder detection unit 11. In the example shown in FIG. 17, the correction value calculation device 1a is implemented in a form built into the encoder 10 together with the encoder detection unit 11, but the correction value calculation device 1 may be implemented separately from the encoder 10, as in the first embodiment. In this embodiment, the correction value calculation device 1a corrects fluctuations in signal strength over a wide range exceeding the displacement corresponding to one period of the two-phase sinusoidal signal, and can obtain a highly accurate correction value. In order to achieve this, the correction value calculation device 1a of the third embodiment is characterized in that it includes a signal strength correction unit 60 in addition to the configuration of the correction value calculation device 1 in the first embodiment. Below, the configuration different from the correction value calculation device 1 in the first embodiment will be described in detail, and the same reference numerals will be used to designate the configuration common to the correction value calculation device 1 in the first embodiment, and the description thereof will be omitted here.
[0078] As in the first embodiment, the two-phase sinusoidal signals X and Y are input to a correction unit 20. The correction unit 20 holds a correction value to be applied to the two-phase sinusoidal signals. The correction unit 20 corrects the two-phase sinusoidal signals X and Y using the correction value, and outputs output signals X' and Y'. The output signals X' and Y' of the correction unit 20 are input to a polar coordinate conversion unit 30. The polar coordinate conversion unit 30 converts the output signal X of the correction unit 20 into i ', Y i ', the phase angle θ in the two-phase sinusoidal signal i and the Lissajous radius R corresponding to the phase angle i The squared radius R i 2 Calculate.
[0079] The phase angle θ calculated by the polar coordinate conversion unit 30 i is input to the error detection unit 40 and the wide-area phase angle calculation unit 50, similarly to the correction value calculation device 1 of the first embodiment. In addition, the squared radius R i 2 is input to the signal intensity correction unit 60.
[0080] The wide-area phase angle calculation unit 50 calculates each phase angle θ i The wide-area phase angle φ represents a wide range of displacement that exceeds the displacement corresponding to one period of a two-phase sinusoidal signal. i Calculate the wide-area phase angle φ i is the number of periods of the two-phase sinusoidal signal from the reference displacement (origin) (number of rotations of the Lissajous signal) n i , the phase angle θ calculated by the polar coordinate conversion unit 30 i Therefore, for example, the wide-area phase angle φ i In the case of an encoder in which 100 periods of two-phase sinusoidal signals are included in one period (0 degrees to 360 degrees), φ i =(n i ×360+θ i ) / 100, so φ i and i and θ i The number of revolutions of the Lissajous signal n i can be counted by a known incremental up-down counter (upper counter). In the first embodiment, the wide-area phase angle calculation unit 50 is not included in the correction value calculation device 1 but exists as a component of the encoder 10, but in the third embodiment, the wide-area phase angle calculation unit 50 is a component of the correction value calculation device 1a.
[0081] As described below in detail, the signal intensity correction unit 60 calculates the squared radius R i 2 and the wide-area phase angle φ input from the wide-area phase angle calculation unit 50. i Using the squared radius R 2 The coefficients in the approximate model that expresses the above as a trigonometric function of the wide-area phase angle φ are calculated by the least squares method, and each wide-area phase angle φ i The signal strength correction value R Ci 2 Then, the signal strength correction value R Ci 2 Based on each wide-area phase angle φ i The squared radius R corresponding to i 2 Correct the following.
[0082] Square radius R 2The long-period fluctuation of can be approximately expressed by the sum of its harmonics, with one rotation of the wide-area phase angle φ as the fundamental frequency. 2 It is advisable to use equation (27) as an approximate model that expresses the above as a trigonometric function of the wide-area phase angle φ.
number
[0083] In equation (27), k ranges from 1 to N L is an integer, and N L is the order of the highest harmonic used in the approximation. L Increasing the coefficient a increases the accuracy of the approximation. k and b k , and the signal strength correction value R Ci 2 The amount of calculation required to find N L is determined by considering the trade-off between accuracy and computational complexity. For example, N L It is advisable to set it to 3 and use an approximate model that includes up to the third harmonics.
[0084] The signal strength correction unit 60 is L For each k up to k and b k , is expressed as R k It can be calculated as an element of a matrix.
number
[0085] The signal intensity correction unit 60 calculates the obtained coefficient a k and b k From the above, each wide-area phase angle φ i The signal strength correction value R Ci 2 Calculate.
number
[0086] Furthermore, the signal strength correction unit 60 calculates a signal strength correction value R Ci 2 The squared radius R i 2 Each wide-area phase angle φ i The corrected squared radius R LCi 2 and inputs it to the error detection unit 40.
number
[0087] The error detection unit 40 detects the phase angle θ i and the squared radius R after correction by the signal intensity correction unit 60 LCi 2 Using these, the correction value is calculated in the same manner as the signal intensity correction unit 60 in the first embodiment.
[0088] FIG. 18 is a flowchart showing the procedure of the correction value calculation process performed by the correction value calculation device 1a of the third embodiment configured as described above.
[0089] When the correction value calculation process is started, the correction unit 20 first selects N pairs of digital data of two-phase sinusoidal signals X and Y (X i , Y i where i is 0 to N-1) is acquired (step S11). This data may be acquired in real time from the encoder detection unit 11, or data that has been acquired and recorded in advance by the encoder detection unit 11 may be acquired via a communication means or a storage medium.
[0090] Next, the polar coordinate conversion unit 30 calculates a phase angle θ i and the corresponding squared radius R i 2(Step S12). Next, the wide-area phase angle calculation unit 50 calculates the wide-area phase angle φ that represents a displacement angle in a wide range exceeding one period of the two-phase sinusoidal signal (Step S13). The signal strength correction unit 60 calculates each wide-area phase angle φ for correcting the fluctuation in signal strength over a wide range. i The signal strength correction value R Ci 2 Then, the corresponding squared radius R i 2 Correct the R LCi 2 is calculated (step S14).
[0091] Next, each phase angle θ calculated in step S12 i and the squared radius R corrected in step S14. LCi 2 Based on this, the error detection unit 40 detects the correction residual (ΔC x and ΔC y ), and the correction residual of the amplitude ratio error (ΔK a ), and the phase difference error correction residual (ΔP y ) is calculated (step S15). Then, the correction value held by the correction unit 20 is updated based on the calculated correction residual of each error (step S16). As in the first embodiment, the error detection unit 40 may update each correction value by using equation (19).
[0092] Next, the correction unit 20 corrects the two-phase sinusoidal signal based on the correction value calculated by the error detection unit 40, and outputs the signal X i ', Y i ' is output (step S17).
[0093] When the calculation of the correction value is repeated (step S18; Yes), the two-phase sinusoidal signal X i ', Y i ' to a new two-phase sinusoidal signal X i , Y i(step S19), and the process returns to step S12. Steps S12 to S17 are repeated the required number of times, and when the repetition is no longer necessary (step S18; No), the correction value calculation process ends. The correction value at the end of the correction value calculation process becomes the final correction value. The number of times that the calculation and update of the correction value is repeated may be a predetermined number of times. Alternatively, it may be repeated until the correction residual becomes sufficiently small (for example, until it falls below a predetermined threshold value). According to this correction value calculation process, the squared radius R 2 It is possible to obtain a highly accurate correction value by eliminating the influence of a wide range of fluctuations in the two-phase sinusoidal signals X and Y. In addition, as in the first embodiment, the calculations for calculating and updating the correction value based on the two-phase sinusoidal signals X and Y are applied cumulatively, and the correction residual is a value with a small error (ΔC x , ΔC y , and ΔP y For 0, ΔK a For convergence to 1).
[0094] Next, an example will be described in which the correction value calculation process by the correction value calculation device 1a according to this embodiment is applied to two-phase sinusoidal signals X and Y output from an actual electromagnetic induction type rotary encoder. This encoder is configured to output 100 periods of two-phase sinusoidal signals while the rotor displacement φ changes in one period (i.e., from 0 degrees to 360 degrees).
[0095] Figure 19 shows the square radius R of the signal strength calculated from two-phase sinusoidal signals X and Y before correction. i 2 The horizontal axis is plotted as rotor displacement (i.e., wide-area phase angle) φ. As φ changes from 0 degrees to 360 degrees, the squared radius R before correction 2 fluctuates greatly over a long period, and short-period fluctuations of the two-phase sinusoidal signal are superimposed on these large fluctuations.
[0096] Figure 20 shows the squared radius R before correction in Figure 19. i 2 The square radius R after the signal strength correction by the signal strength correction unit 60 is applied to LCi 24 is a graph plotting the rotor displacement φ on the horizontal axis. It can be seen that the long-term fluctuations are suppressed by the correction.
[0097] Figure 21 shows the squared radius R before signal strength correction. i 2 The horizontal axis is the phase angle θ. The signal strength fluctuates greatly within one rotation of the rotor. This is due to the square radius R 2 In this state, the error detection unit 40 cannot calculate the correction value with high accuracy.
[0098] Figure 22 shows the squared radius R after correcting the signal intensity. LCi 2 The horizontal axis is the phase angle θ. The signal strength fluctuation over a wide range is suppressed, and the R due to the interpolation error is reduced. 2 It can be seen that the change in R LCi 2 By using this, the error detection unit 40 can calculate the correction value with high accuracy.
[0099] Figure 23 shows the squared radius R after signal strength correction. LCi 2 The error detection unit 40 calculates a correction value using the above, and the correction value is input to the two-phase sinusoidal signal X i , Y i The squared radius R after correction applied to i 2 This is a graph plotting the phase angle θ on the horizontal axis. i 2 is the phase angle θ i The results are almost constant and do not depend on the input signal, which indicates that the two-phase sinusoidal signal correction to reduce the interpolation error can be achieved with high accuracy.
[0100] According to the correction value calculation device 1a and the correction value calculation process of the third embodiment described above, when the signal strength of the signal output by the encoder fluctuates over a wide range exceeding one period of the two-phase sinusoidal signal, the effect of the fluctuation in signal strength can be suppressed and the correction value can be calculated. According to equation (28), the coefficients required to calculate the correction value can be obtained by a simple matrix operation.
[0101] [Modifications of the embodiment] Although the present embodiment has been described above, the present invention is not limited to this example. For example, in the above third embodiment, the correction value calculation device 1a is applied to a rotary encoder, but the encoder may be a linear encoder. In a linear encoder, if a guide mechanism has a periodic fluctuation factor, the correction value can be calculated after reducing the periodic fluctuation by applying the correction value calculation process of the present embodiment.
[0102] In each of the above embodiments, in the wide-area phase angle calculation unit 50, φ is calculated based on the number of rotations n of the Lissajous signal. i and the phase angle θ, but φ may be obtained by other methods. For example, in an absolute type encoder, φ may be obtained by absolute detection.
[0103] Furthermore, any combination of features of the above-described embodiments, in which a person of ordinary skill in the art has appropriately added or deleted components or modified the design, is also included within the scope of the present invention as long as it contains the gist of the present invention. [Explanation of symbols]
[0104] 1, 1a Correction value calculation device 10 Encoders 11 Encoder detector 20 Correction section 30 Polar coordinate conversion section 40 Error detection section 50 Wide-area phase angle calculation section 60 Signal strength correction unit 100 Rotary Encoder 200 rotors 210 Rotor scale 300 Stator 310 Stator detector
Claims
1. A correction value calculation method for calculating a correction value for correcting a two-phase sinusoidal signal (X, Y) output by an encoder, comprising: N phase angles θ in the Lissajous waveform drawn by the two-phase sinusoidal signal i and each phase angle θ i The corresponding Lissajous radius R i For each phase angle θ i The Lissajous radius R i The squared radius R i 2 A polar coordinate calculation step for calculating Each phase angle θ calculated in the polar coordinate calculation step i and the phase angle θ i The squared radius R i 2 Based on the above, at least the offset error C of the signal X that constitutes the two-phase sinusoidal signal is calculated. x Correction residual ΔC x and the offset error C of the signal Y y Correction residual ΔC y , the amplitude ratio error K between the signals X and Y a Correction residual ΔK a , and the phase difference error P y Correction residual ΔP y and calculating each correction value based on each correction residual, The correction value calculation step includes: The squared radius R 2 The coefficients in the approximate model expressed as trigonometric functions that include the phase angle θ as an argument are i and each phase angle θ i The squared radius R i 2 and determining the correction residual from the obtained coefficients by a least squares method using the above.
2. The correction value calculation step includes: Formulas (5) and (6) are used as the approximate model, [0010] Coefficient A in the formula (5) c1 and A s1 is expressed as C by the formula (7). 1 Calculate as a matrix element, [0025] Coefficient A in the formula (6) c2 and A s2 is expressed as C by the formula (8). 2 Calculate as a matrix element, [0030] The obtained coefficient A c1 , A s1 , A c2 and A s2 Then, each correction value is calculated using equations (9) to (12). [0045] 2. The correction value calculation method according to claim 1.
3. In the polar coordinate calculation step, A is the amplitude of the two-phase sinusoidal signal, and sinθ is calculated by the formula (20). i and cosθ i x obtained by approximating i and y i Phase angle θ i The data is calculated as [0050] The correction value calculation step includes: Formulas (5) and (6) are used as the approximate model, [006] Coefficient A in the formula (5) c1 and A s1 is expressed as C by the formula (21). 1 Calculate as a matrix element, [0070] Coefficient A in the formula (6) c2 and A s2 is expressed as C by the formula (23). 2 Calculate as a matrix element, [0080] The obtained coefficient A c1 , A s1 , A c2 and A s2 Then, each correction residual is calculated using equations (9), (10), (26), and (12). [0090] 2. The correction value calculation method according to claim 1.
4. a correction step of correcting the two-phase sinusoidal signal based on the correction value, 4. The correction value calculation method according to claim 1, further comprising the step of: applying the correction value calculation step again to the two-phase sinusoidal signal corrected in the correction step, thereby updating the correction value.
5. Each correction value is updated according to equation (19). [0010] 5. The correction value calculation method according to claim 4.
6. The encoder is capable of detecting a wide range of displacement exceeding a displacement corresponding to one period of a two-phase sinusoidal signal, Each phase angle θ i The wide-area phase angle φ, which represents the wide-area displacement corresponding to i A wide-area phase angle calculation step of calculating The squared radius R 2 The coefficient in the approximate model expressing the above by a trigonometric function of the wide-area phase angle φ is the square radius R i 2 and the wide-area phase angle φ i and the wide-area phase angle φ i and calculating a signal strength correction value corresponding to each of the wide-area phase angles φ based on the signal strength correction value. i The squared radius R i 2 A signal intensity correction step of correcting Further equipped with The correction value calculation step calculates the square radius R i 2 The squared radius R LCi 2 2. The method according to claim 1, further comprising the step of: calculating the correction value based on the following:
7. The signal intensity correction step includes: Formula (27) is expressed as the square radius R 2 is an approximate model expressed as a trigonometric function of the wide-area phase angle φ, ##EQU00011## Coefficient a in the formula (27) k and b k (where k is from 1 to N L is an integer, and N L is the order of the higher harmonic when used for approximation), is expressed as R k Calculate as a matrix element, ##EQU00012## The obtained coefficient a k and b k From the above, each wide-area phase angle φ i The signal strength correction value R Ci 2 Calculate ##EQU00013## According to the formula (30), the signal strength correction value R Ci 2 The square radius R i 2 Each wide-area phase angle φ i The corrected squared radius R LCi 2 Calculate ##EQU14## 7. The correction value calculation method according to claim 6.
8. A program for causing a computer to execute the correction value calculation method according to claim 1 .
9. A correction value calculation device that calculates a correction value for correcting a two-phase sinusoidal signal (X, Y) output by an encoder, comprising: N phase angles θ in the Lissajous waveform drawn by the two-phase sinusoidal signal i and each phase angle θ i The corresponding Lissajous radius R i For each phase angle θ i The Lissajous radius R i The squared radius R i 2 A polar coordinate conversion unit that calculates Each phase angle θ calculated by the polar coordinate conversion unit i and the phase angle θ i The squared radius R i 2 Based on the above, at least the offset error C of the signal X that constitutes the two-phase sinusoidal signal is calculated. x Correction residual ΔC x and the offset error C of the signal Y y Correction residual ΔC y , the amplitude ratio error K between the signals X and Y a Correction residual ΔK a , and the phase difference error P y Correction residual ΔP y and an error detection unit that calculates each correction value based on each correction residual, The error detection unit The squared radius R 2 The coefficients in the approximate model expressed as trigonometric functions that include the phase angle θ as an argument are i and each phase angle θ i The squared radius R i 2 and determining the correction residual from the obtained coefficients by a least squares method using the above.
10. The error detection unit Formulas (5) and (6) are used as the approximate model, ##EQU00015## Coefficient A in the formula (5) c1 and A s1 is expressed as C by the formula (7). 1 Calculate as a matrix element, ##EQU00016## Coefficient A in the formula (6) c2 and A s2 is expressed as C by the formula (8). 2 Calculate as a matrix element, ##EQU00017## The obtained coefficient A c1 , A s1 , A c2 and A s2 Then, each correction value is calculated using equations (9) to (12). [0018] 10. The correction value calculation device according to claim 9.
11. The polar coordinate conversion unit converts A into sinθ using equation (20) with A being the amplitude of the two-phase sinusoidal signal. i and cosθ i x obtained by approximating i and y i Phase angle θ i The data is calculated as [0019] The error detection unit Formulas (5) and (6) are used as the approximate model, [0020] Coefficient A in the formula (5) c1 and A s1 is expressed as C by the formula (21). 1 Calculate as a matrix element, ##EQU00021## Coefficient A in the formula (6) c2 and A s2 is expressed as C by the formula (23). 2 Calculate as a matrix element, [0022] The obtained coefficient A c1 , A s1 , A c2 and A s2 Then, each correction residual is calculated using equations (9), (10), (26), and (12). [0023] 10. The correction value calculation device according to claim 9.
12. a correction unit that corrects the two-phase sinusoidal signal based on the correction value, The polar coordinate conversion unit converts the two-phase sinusoidal signal corrected by the correction unit into a squared radius R which is the square of the Lissajous radius R corresponding to each phase angle θ. 2 Calculate The error detection unit detects each phase angle θ calculated by the polar coordinate conversion unit and the squared radius R corresponding to the phase angle θ. 2 12. The correction value calculation device according to claim 9, further comprising: a correction value calculation unit that calculates a new correction value based on the above-mentioned correction value and updates the correction value.
13. The error detection unit updates the correction value according to equation (19). [0024] 13. The correction value calculation device according to claim 12.
14. The encoder is capable of detecting a displacement in a wider range than a displacement corresponding to one period of a two-phase sinusoidal signal, Each phase angle θ i The wide-area phase angle φ corresponding to the wide-area displacement i A wide-area phase angle calculation unit that calculates The squared radius R 2 The coefficient in the approximate model expressing the above by a trigonometric function of the wide-area phase angle φ is the square radius R i 2 and the wide-area phase angle φ i and the wide-area phase angle φ i and calculating a signal strength correction value corresponding to each of the wide-area phase angles φ based on the signal strength correction value. i The squared radius R i 2 and a signal intensity correction unit for correcting the signal intensity, The error detection unit detects the square radius R i 2 The squared radius R LCi 2 10. The correction value calculation device according to claim 9, wherein the correction value is calculated based on the following:
15. The signal intensity correction unit Formula (27) is expressed by the squared radius R 2 is an approximate model expressed as a trigonometric function of the wide-area phase angle φ, [0025] Coefficient a in the formula (27) k and bk, where k ranges from 1 to N L is an integer, and N L is the order of the higher harmonic when used for approximation), is expressed as R k Calculate as a matrix element, [0026] The obtained coefficient a k and b k From the above, each wide-area phase angle φ i The signal strength correction value R Ci 2 Calculate [0027] According to the formula (30), the signal strength correction value R Ci 2 The square radius R 2 Each wide-area phase angle φ i The corrected squared radius R LCi 2 Calculate [0028] 15. The correction value calculation device according to claim 14.
16. A correction value calculation device according to any one of claims 9 to 11, an encoder detector that outputs a two-phase sinusoidal signal corresponding to a displacement along a measurement direction; With The correction value calculation device includes: a correction value calculation process for calculating a correction value based on the two-phase sinusoidal signal output by the encoder detection unit; and performing a correction process of applying a calculated correction value to the two-phase sinusoidal signal output by the encoder detection unit.
Citation Information
Patent Citations
Encoder output signal corrector
JP2006112859A
Encoder output signal corrector and method
JP2006112862A
Output signal correcting device and output signal correcting method of digital scale
JP2007327770A