Correction value calculation method, program, correction value calculation device, and encoder

By determining the correction value through polar coordinate calculation and the least squares method, the efficiency and accuracy problems of high-order harmonic correction in two-phase sinusoidal signals are solved, the calculation process is simplified, and efficient error correction is achieved.

CN121740104APending Publication Date: 2026-03-27MITUTOYO CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-17
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently and accurately correct high-order harmonic errors in two-phase sinusoidal signals, especially under low sampling rates and unequal spacing conditions, leading to difficulties in error detection and increased errors.

Method used

The correction value is calculated using polar coordinates and the least squares method. The correction value is determined by plotting the square radius and phase angle of the Lissajous waveform and using the least squares method. The error is reduced and the calculation process is simplified by using the cumulative calculation method.

Benefits of technology

It achieves efficient and accurate correction of high-order harmonics of two-phase sinusoidal signals under low sampling rates and unequal spacing, reducing computational resources and improving computational speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121740104A_ABST
    Figure CN121740104A_ABST
Patent Text Reader

Abstract

Provided is a correction value calculation method capable of efficiently and accurately calculating a correction value for a harmonic of an interpolation error in a two-phase sinusoidal signal by a simple method. In a correction value calculation method, a correction value for correcting a k-order harmonic component of a two-phase sinusoidal signal (X, Y) output by an encoder is calculated. The correction value calculation method comprises: a polar coordinate calculation step for calculating a square radius Ri2, which is the square of the Lissajous radius Ri corresponding to each phase angle [theta] i, for N phase angles [theta] i in a Lissajous waveform drawn from a 2-phase sinusoidal signal and the Lissajous radius Ri corresponding to each phase angle [theta] i; and a correction value calculation step for obtaining a correction value on the basis of a coefficient obtained in the approximate expression model representing the square radius R2 of the two-phase sinusoidal signal including the k-order harmonic component. In the correction value calculation step, coefficients of the approximate expression model are determined by a least square method, and the resulting correction values are accumulated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method, program, device and encoder for calculating correction values ​​for correcting two-phase sinusoidal signals. Background Technology

[0002] Traditionally, methods are known for correcting errors such as offset error, amplitude ratio error, and phase difference error in the two-phase sinusoidal signal output by an encoder. For more accurate interpolation correction, in addition to correcting these errors, it is important to reduce the higher harmonics of the two-phase sinusoidal signal.

[0003] For example, JP 2008-232649A discloses a method for correcting the second harmonic as a higher harmonic. When a two-phase sinusoidal signal contains the second harmonic, the correction value can be obtained by Fourier analysis using the characteristic that the Lissajous radius varies periodically with a period of λ / 3.

[0004] Here, electromagnetic induction encoders require more sampling time than photoelectric encoders because they detect displacement by applying an AC signal. Additionally, in low-power encoders, the sampling rate is sometimes suppressed. Encoders with such low sampling rates may not be able to sample around the desired points (e.g., zero-crossing points or points where the Lissajous waveform intersects with y = x or y = -x) and may not be able to sufficiently reduce errors.

[0005] Furthermore, when using Fourier analysis as shown in JP 2008-232649A to obtain correction values ​​for higher harmonic correction, there is a problem that Fourier analysis is difficult when the sampled data has unequal pitch. In addition, with a small number of samples, the detection error may increase. Summary of the Invention

[0006] The problem to be solved by the present invention

[0007] In view of these circumstances, one aspect of the present invention is to provide a correction value calculation method, a correction value calculation program, and a correction value calculation device, which can efficiently and accurately calculate the correction value for higher harmonics of interpolation errors in a two-phase sinusoidal signal using a simple method, and to provide an encoder equipped with such a correction value calculation device.

[0008] Technical solutions for solving the problem

[0009] To address the aforementioned problems, a correction value calculation method according to one aspect of the present invention calculates a correction value for correcting the k-th harmonic component in a two-phase sinusoidal signal (X, Y) output by an encoder. The correction value calculation method includes a polar coordinate calculation step for N phase angles θi in a Lissajous waveform plotted from the two-phase sinusoidal signal and a Lissajous radius R corresponding to each phase angle θi. i Calculate the square radius R i 2 The R i 2 It is the Lissajous radius R corresponding to each phase angle θi. i The square of the value; and the correction value calculation steps, used to determine the square radius R of a two-phase sinusoidal signal containing the kth harmonic component. 2 The coefficients obtained from the approximate expression model are used to calculate the correction value. In the correction value calculation step, the coefficients of the approximate expression model are determined by the least squares method, and the obtained correction values ​​are accumulated as correction residuals. Attached Figure Description

[0010] Figure 1 This is a block diagram showing the basic configuration of the correction value calculation device 1 of the first embodiment together with the encoder detection unit 11 and the wide-range phase angle calculation unit 50 in the encoder 10.

[0011] Figure 2 This is a flowchart illustrating the process of calculating the correction value in the first embodiment.

[0012] Figure 3 This is a block diagram showing the correction value calculation device 1a according to the second embodiment.

[0013] Figure 4 This is a flowchart illustrating the process of calculating the correction value in the second embodiment.

[0014] Figure 5A and Figure 5B This is a graph showing the two-phase sinusoidal signals before correction in the third embodiment.

[0015] Figure 6 This is a flowchart illustrating the process of calculating the correction value in the third embodiment.

[0016] Figure 7A and Figure 7B This is a graph showing the two-phase sinusoidal signal in the third embodiment, whose offset, amplitude ratio, and phase difference have been corrected.

[0017] Figure 8A and Figure 8B This is a graph showing the two-phase sinusoidal signal in the third embodiment, whose second and fifth harmonics have been further corrected. Specific Implementation

[0018] (First Embodiment)

[0019] In the following text, Figure 1 and Figure 2 The first embodiment is described based on this.

[0020] The correction value calculation device 1 calculates the correction value used to correct the two-phase sinusoidal signal at encoder 10. Figure 1 This is a block diagram showing the basic configuration of the correction value calculation device 1 of the first embodiment together with the encoder detection unit 11 and the wide-area phase angle calculation unit 50 in the encoder 10.

[0021] like Figure 1 As shown, the correction value calculation device 1 is implemented as a unit built into the encoder 10 along with the encoder detection unit 11 and the wide-area phase angle calculation unit 50. In this embodiment, the encoder 10 includes: an encoder detection unit 11 that outputs a two-phase sinusoidal signal corresponding to the displacement along the measurement direction; the correction value calculation device 1; and the wide-area phase angle calculation unit 50, which calculates (e.g., corresponding to the rotational displacement of the rotary encoder) a wide-area phase angle based on the phase angle θ calculated by the correction value calculation device 1. This serves as the final output of the encoder 10. The correction value calculation device 1 includes a correction unit 20, an error detection unit 40, and a polar coordinate transformation unit 30. The correction value calculation device 1 performs correction value calculation processing based on the two-phase sine wave signal output by the encoder detection unit 11 to calculate the correction value, and applies the pre-calculated correction value to the two-phase sine wave signal output by the encoder detection unit 11 for correction processing. In this embodiment built into the encoder 10, if the correction value can be calculated quickly enough, the correction value calculation device 1 can dynamically update the correction value while detecting displacement.

[0022] As another embodiment of the correction value calculation device 1, the correction value calculation device 1 can be implemented as a unit separate from the encoder 10. For example, the correction value calculation device 1 can be implemented using a computer separate from the encoder detection unit 11. When the encoder detection unit 11 is installed at the displacement measurement position, the correction value calculation device 1 can obtain data of the two-phase sinusoidal signal obtained by the encoder detection unit 11 in the installed state via a communication means or a storage medium, and calculate the correction value based on the obtained data. Then, the calculated correction value can be provided to the encoder detection unit 11 via a communication means or a storage medium.

[0023] The encoder detection unit 11 can use any detection principle, such as photoelectric, magnetic, or electromagnetic induction. Using the two-phase sinusoidal signal output from the encoder detection unit 11, a Lissajous waveform can be plotted (e.g., with X as the horizontal axis and Y as the vertical axis). Ideally, the Lissajous waveform should have a constant Lissajous radius R regardless of the phase angle θ. However, the two-phase sinusoidal signal output from the encoder detection unit 11 typically contains errors such as amplitude error, phase difference error, and offset; therefore, the Lissajous radius R is not constant regardless of the phase angle θ.

[0024] The analog two-phase sinusoidal signal output by the encoder detection unit 11 is sampled and digitized at a predetermined frequency by an AD converter (not shown). In this specification, the digitized data of this set of two-phase sinusoidal signals is simply referred to as "two-phase sinusoidal signals X and Y". If necessary, the digitized two-phase sinusoidal signals X and Y may be referred to as "two-phase sinusoidal signal X". i and Y i The common index is used to clearly indicate the individual data sampled simultaneously. In this specification, for the purpose of calculating the correction value, it is assumed that N pairs of digital data of two-phase sinusoidal signals X and Y are used. That is, in the two-phase sinusoidal signal X used to calculate the correction value... i and Y i In the data, i is an integer in the range of 1 to N. According to the "two-phase sinusoidal signal X..." i and Y i Other calculated parameters are also represented using indices as needed, such as the square radius R. i 2 and phase angle θ i .

[0025] Two-phase sinusoidal signals X and Y are input to correction unit 20. Correction unit 20 holds the correction value to be applied to the two-phase sinusoidal signals. The correction value is calculated by error detection unit 40. Correction unit 20 uses the two-phase sinusoidal signals X and Y to correct the correction value and outputs output signals X' and Y'. The output signals X' and Y' of correction unit 20 are input to polar coordinate conversion unit 30.

[0026] To illustrate the correction method in correction unit 20, the "least squares sine approximation" method is described. This "least squares sine approximation" method uses N sets (R 2 The amplitude of the k-th harmonic contained in the two-phase sinusoidal signal is accurately determined using the least squares method. First, the square radius R is derived for the two-phase sinusoidal signal containing the k-th harmonic. 2 The relationship between the angle θ and the Lissajous angle.

[0027] Ideal two-phase sinusoidal signals x1 and y1, and x containing higher harmonics. k and y k The two-phase sinusoidal signals X and Y can be represented by equations (1) and (2). When the radius R of the ideal two-phase sinusoidal signal is assumed to be 1, x1 and y1 are represented by equations (3) and (4), respectively.

[0028]

[0029] x1=R cosθ=cosθ…(3)

[0030] y1=R simθ=sinθ…(4)

[0031] Where R = 1

[0032] Here, the amplitude of the kth harmonic is expressed as a. k The phase difference with the first harmonic (fundamental wave) is expressed as p. k Furthermore, the phase difference between X and Y is assumed to be -π / 2 radians (-90°) or +π / 2 radians (+90°). That is, the phase difference between the harmonic amplitude and the first and higher harmonics in X is equal to the phase difference between the harmonic amplitude and the first and higher harmonics in Y. Moreover, if the phase difference between the first and second harmonics in X and Y is +π / 2 radians (+90°), then the phase difference of the higher harmonics is assumed to be -π / 2 radians (-90°), and vice versa. By introducing these assumptions, the four parameters of the higher harmonics can be reduced to two.

[0033] Under the above assumptions, if the two-phase sinusoidal signals X and Y contain only the kth harmonic, then X is as in equations (5) and (6), and Y is as in equations (7) and (8).

[0034] X = x1 + x k …(5)

[0035]

[0036] Y = y1 + y k …(7)

[0037]

[0038] Based on these equations, the square radius R can be calculated as shown in equation (9). 2 .

[0039]

[0040] In other words, the square radius R of a two-phase sinusoidal signal containing the kth harmonic.2 It can be expressed as the sum of the cosine (cosine) and sine (sinine) of (k+1)θ or (k-1)θ. The amplitude of the cosine is 2a. k cos kp k And the amplitude of the sine wave is -2a. k sinkp k .

[0041] For example, when the order of the higher harmonic is k=2 and the polarity is -90°, in the above equation (9), by setting k=2 and selecting the plus sign in the above term, the square radius R2 can be represented by cos 3θ and sin 3θ, and the correction calculation can be performed using this equation.

[0042] When A Ka and A kb As defined in equation (10), x k (Equation (6)) and y k Equation (7) can be expressed as the sum of the cosine (coskθ) term, the sine (sinkθ) term, and the constant term, as shown in equations (11) and (12). When performing numerical calculations, the expressions in equations (11) and (12) are easier to use than the expressions in the second line of equation (6) which use amplitude and phase. Therefore, the expression utilizing the sum of cosine and sine will be used below.

[0043]

[0044] Next, by using A Ka and A kb Substituting (Equation (10)) into the square radius R of the two-phase sinusoidal signal containing the kth harmonic, 2 (Equation (9)) derives, as shown in Equation (13), the square radius R for a two-phase sinusoidal signal containing the kth harmonic. 2 The relationship with the Lissajous angle θ.

[0045]

[0046] Then, using N groups (R) 2 (k±1)θ), the cosine amplitude of the k±1th harmonic in equation (13) is determined by the least squares method +2A Ka Sine amplitude -2A kb The specific calculation method is as follows.

[0047] First, assume that the data of N pairs of two-phase sinusoidal signals are given as X. i and Y i (i is an integer from 1 to N), and calculate R. i 2 and θi Because of R i 2 It is X i With Y i The sum of squares of (k±1)θ can therefore be easily calculated using equation (14). i Equation (15) can be used to calculate it.

[0048]

[0049] On the other hand, by using equation (16) as the square radius R of the two-phase sinusoidal signal containing the kth harmonic component... 2 The approximate model of R is established i 2 and (k±1)θ i The three simultaneous equations, and matrix A (k±1) The inverse matrix A (k±1) -1 Multiply by matrix B (k±1) The three variables A that serve as coefficients in the above approximation model can be determined. c(k±1) A s(k±1) and R o(k±1) As C (k±1) The elements of the matrix.

[0050]

[0051] Furthermore, by using A c(k±1) and A s(k±1) Substituting into equation (18), the correction value A can be obtained. Ka and A kb .

[0052]

[0053] In this way, the amplitude A of cos(k±1)θ in model equation (16) is calculated using the least squares method. c(k±1) The amplitude A of sin(k±1)θ s(k±1) The cosine amplitude A can be calculated. Ka and sinusoidal amplitude A kb Furthermore, by using equations (19) and (20), the two-phase sinusoidal signal X can be obtained. i and Y i The k-th harmonic component x of the data ki and y ki By using a two-phase sinusoidal signal X i and Y i By subtracting these harmonic components from the data, we can obtain the ideal sinusoidal signals x1 and y1 after removing the kth harmonic component.

[0054] x ki =A ka cos kθ i -A kb sin kθ i …(19)

[0055]

[0056] The k-th harmonic component x obtained in this way ki and y ki The θ included i Preferably, x1 and y1 are determined from x1 and y1, which do not contain higher harmonics. However, as an alternative, it is described that the two-phase sinusoidal signal data X, which contains higher harmonics, is used. i and Y i Determine θ i The method. Therefore, the method in x ki and y ki Errors are introduced during the process. These errors can be reduced by using a cumulative calculation method. Next, the cumulative calculation method for k-th harmonic correction will be explained.

[0057] The correction value A for the k-th harmonic component obtained according to the least squares sine approximation described above. Ka and A kb As shown in equation (21), A Ka Replace with corrected residual ΔA Ka and A kb Replace with corrected residual ΔA kb And as shown in equation (22), the corrected value A is obtained by summing them up. Ka and A kb Here, in equation (22), the feedback gain G is... f (where 0 < G) f ≤1) Multiply by the corrected residual ΔA Ka and ΔA kb This updates each correction value. When updating the correction value, the gain G is fed back. f Set to G f <1, to prevent the influence of the correction residual from being over-reflected in the correction value, thereby promoting the convergence of the correction residual to a value with small error.

[0058]

[0059]

[0060] Among them, 0 <G f ≤1

[0061] Then, using equations (19) and (20), based on the correction value AKa and A kb Find the kth harmonic x ki and y ki .

[0062] Furthermore, as shown in equation (23), with m as the cumulative number of operations, from X i (m) and Y i (m) (which serves as the m-th signal in the cumulative feedback loop) minus the k-th harmonic component x ki and y ki And find the (m+1)th signal X. i (m+1) and Y i (m+1). By repeating this process an expected number of times, the correction value A can be reduced. Ka and A kb The approximate error. Using this correction method, the correction value can be obtained for a two-phase sinusoidal signal that has no offset error, amplitude ratio error, or phase difference error and only contains the kth harmonic error, and the kth harmonic error can be corrected.

[0063]

[0064] Next, the correction value calculation process using the correction value calculation device 1 to calculate the correction value will be described. Figure 2 This is a flowchart illustrating the correction value calculation process in the first embodiment. The correction value calculation process is performed by the correction unit 20, the polar coordinate transformation unit 30, and the error detection unit 40. In the correction value calculation process, the correction value A of the kth harmonic is obtained from the two-phase sinusoidal signals X and Y. Ka and A kb .

[0065] When the correction value calculation process begins, the correction unit 20 first obtains the digital data (X, Y) of N pairs of two-phase sinusoidal signals X and Y, which are output data of the encoder detection unit 11 for correction. i Y i (where i is 1 to N) (step S01). The correction unit 20 can obtain the data from the encoder detection unit 11 in real time, or the encoder detection unit 11 can obtain and record the data in advance, and then the correction unit 20 obtains the data via a communication means or storage medium. Then, the polar coordinate transformation unit 30 calculates the phase angle θ for each of the N data pairs of the two-phase sinusoidal signal. i and the corresponding square radius R i 2 (Step S02; Polar coordinate calculation steps).

[0066] Then, based on each phase angle θ calculated in step S02 i Sum of square radius Ri 2 The error detection unit 40 uses the least squares sine approximation to calculate the amplitude A. c(k±1) and A s(k±1) And calculate the corrected residual ΔA Ka and ΔA kb (Step S03; Least squares sine approximation step).

[0067] Then, the calculated correction residual ΔA is used in equation (20). Ka and ΔA kb Accumulate with the correction value and update the correction value A for the kth harmonic. Ka and A kb (Step S04; Harmonic correction value calculation steps).

[0068] Next, the correction unit 20 uses the correction value A calculated by the error detection unit 40 as a basis. Ka and A kb The two-phase sinusoidal signal is corrected, and the corrected two-phase sinusoidal signal X is output. i and Y i Data (step S05; correction step).

[0069] If the calculation of the correction value is repeated (step S06; Yes), the process returns to step S02. Steps S02 to S05 are repeated as needed, and the correction value calculation process ends when it is no longer needed (step S06; No). The correction value at the end of the correction value calculation process is the final correction value. The number of times the correction value is calculated and updated can be predetermined. Alternatively, the process can be repeated until the correction residuals are sufficiently small (e.g., until they are below a predetermined threshold).

[0070] According to the correction value calculation device 1 and correction value calculation processing of the first embodiment described above, arbitrary k-th harmonic correction can be performed, even for data with unequal spacing, without using a master encoder. Therefore, high-precision correction can be performed with a small number of data points without requiring a high-precision feed mechanism or high-precision control. Furthermore, when the number of data points is increased to achieve higher precision, the square radius R... 2 The calculation can be easily performed because it is the sum of squares of two-phase sinusoidal signals. Therefore, higher harmonics of interpolation errors in two-phase sinusoidal signals can be calculated efficiently and accurately using a simple method, thereby reducing computational resources and achieving high-speed computation.

[0071] (Second Embodiment)

[0072] A second embodiment of the invention will now be described below. Compared to the first embodiment, this second embodiment performs the correction value calculation process with fewer operations and at a higher speed. Figure 3 This is a block diagram illustrating the correction value calculation device 1a according to the second embodiment. Figure 3 As shown, the configuration of the correction value calculation device 1a is generally similar to that of the first embodiment, but the difference is that the error detection unit 40a calculates the correction value by additionally using two-phase sinusoidal signals X' and Y'. However, since the other configurations are the same, the following description mainly focuses on the operation in the correction value calculation process of the second embodiment.

[0073] In the first embodiment described above, in order to determine the correction value A Ka and A kb Trigonometric calculations are required. In contrast, in the second embodiment, the calculation is simplified by replacing the trigonometric functions with polynomials of two-phase sinusoidal signals X and Y. The calculation method is illustrated below using an example where the harmonic to be removed is the second harmonic (k = 2, polarity -90°). First, the two-phase sinusoidal signal X containing the second harmonic component is represented by equation (24), and the second harmonic component x2 is represented by equation (25). Similarly, the two-phase sinusoidal signal Y containing the second harmonic component is represented by equation (26), and the second harmonic component y2 is represented by equation (27).

[0074] X = x1 + x2…(24)

[0075] x² = a² cos 2(θ + p²)…(25)

[0076] Y = y1 + y2…(26)

[0077] y2=-a2 sin 2(θ+p2)…(27)

[0078] Next, calculate the two-phase sinusoidal signal X for i = 1, 2, ..., N. i and Y i The N pairs of data are normalized to a 1-neighborhood (in other words, ΣR i 2 A two-phase sinusoidal signal X' (N≈1) i and Y' i The data. The normalization method is arbitrary, but for example, it is desirable to use the following method for normalization: First, predetermine the amplitude normalization coefficient K such that R=1 when the relative position between the encoder scale and the reader head is the design reference position. x Then, the amplitude normalization coefficient K is calculated using equations (28) and (29). x Applied to data X i and Y i To obtain the data X'i and Y' i Alternatively, if the square radius R i 2 The average value can be considered as 1, then the two-phase sinusoidal data X i and Y i Can be used as X' i and Y' i Instead of normalizing.

[0079] X′ i =K x *X i …(28)

[0080] Y′ i =K x *Y i …(29)

[0081] Then, for the normalized two-phase sinusoidal signal X' i and Y' i R is obtained using equations (30) and (31) respectively. i 2 and θ i .

[0082]

[0083] Then, in order to analyze the data (R) i 2 ,3θ i Applying the least squares sine approximation of equation (32) as the model equation, i = 1, 2, ..., N, solve the simultaneous equations shown by the matrix operations of equation (33) to obtain matrix C3, and thus obtain A. c3 and A s3 At this stage, as shown in equations (34) and (35), the triple angle formulas for trigonometric functions are applied, and in addition, cosθ i and sinθ i Use X' respectively i and Y' i To approximate, the trigonometric functions contained in each element of the matrix are replaced by X'. i and Y' i The polynomial. In this way, the calculation can be simplified. As shown in equations (34) and (35), cos3θ i The approximate value should be abbreviated as CS3. i And sin3θ i The approximate value is SN3 i .

[0084]

[0085] Then, similar to the case where k=2 in equations (19) to (23) in the first embodiment, X can be obtained by equations (36) to (42) through m cumulative operations of second harmonic correction. i '(m+1) and Y i '(m+1). In other words, the corrected residual ΔA is obtained using equation (36). 2a and ΔA 2b And the corrected residual ΔA is used in equation (37). 2a and ΔA 2b To update correction value A 2a and A 2b .

[0086]

[0087] Among them, 0 <G f ≤1

[0088] Then, use the correction value A 2a and A 2b The second harmonic x is obtained using equations (38) and (39). 2i and y 2i In x 2i and y 2i In the calculation, as shown in equations (40) and (41), by using the double-angle formula of trigonometric functions, X i 'and Y i The polynomial is used to approximate cos2θ. i and sin2θ i The term can simplify the calculation. As shown in equations (40) and (41), cos2θ i The approximate value should be abbreviated as CS2. i And sin2θ i The approximate value is abbreviated as SN2. i .

[0089]

[0090] Furthermore, as shown in equation (42), from X i (m) and Y i (m) (which serves as the m-th signal in the cumulative feedback loop) minus the 2nd harmonic x 2i and y 2i And find the (m+1)th signal X. i(m+1) and Y i(m+1) By repeating this process an expected number of times, the correction value A can be reduced. 2a and A 2b The approximate error.

[0091]

[0092] Next, the correction value calculation process using the correction value calculation device 1a will be described. Figure 4 This is a flowchart illustrating the correction value calculation process in the second embodiment. The correction value calculation process is performed by the correction unit 20, the polar coordinate transformation unit 30, and the error detection unit 40a.

[0093] When the correction value calculation process begins, the correction unit 20 first obtains N pairs of two-phase sinusoidal signals X and Y (Xi, Yj, Yi) as output data from the encoder detection unit 11 for correction. i Y i Where i is 1 to N) digital data (step S11). The correction unit 20 can obtain this data in real time from the encoder detection unit 11, or the encoder detection unit 11 can obtain and record the data in advance, and then the correction unit 20 obtains the data via a communication means or storage medium. Next, the correction unit 20 will X i and Y i Transform into X' i and Y' i , such that ΣR i 2 The relationship / N≈1 is established (step S12). Therefore, the amplitude of the two-phase sinusoidal signal is adjusted to satisfy condition R. 2 =1. After the transformation by the correction unit 20, the polar coordinate transformation unit 30 transforms from X' i and Y' i Calculate the phase angle θ for each of the N data pairs of the two-phase sinusoidal signal. i and the corresponding square radius R i 2 (Step S13).

[0094] Then, based on the two-phase sinusoidal signal X' i and Y' i Sum of square radius R i 2 The error detection unit 40a uses equations (33) to (35) to calculate the cosine amplitude A by the least squares sine approximation. c3 and sinusoidal amplitude A s3 The corrected residual ΔA is calculated using equations (36) and (37). 2a and ΔA 2b (Step S14).

[0095] Then, the corrected residual ΔA is calculated by summing. 2a and ΔA 2b To update correction value A 2a and A 2b (Step S15).

[0096] Next, the correction unit 20, based on the error detection unit 40a, calculates the value for the second harmonic A. 2a and A 2b The correction value is used to calculate x 2i and y 2i And by subtracting x from the two-phase sinusoidal signal 2i and y 2i To correct the two-phase sinusoidal signal X' i and Y' i (Step S16)

[0097] If the correction value is recalculated (step S17; yes), the process returns to step S13. Steps S13 to S16 are repeated as needed, and the correction value calculation process ends when it is no longer needed (step S17; no). The correction value at the end of the correction value calculation process is the final correction value. The number of times the correction value is recalculated and updated can be predetermined. Alternatively, the process can be repeated until the correction residuals are sufficiently small (e.g., until they are below a predetermined threshold).

[0098] In the second embodiment described above, the trigonometric function appearing in the calculation of the correction value for the second harmonic is replaced with X. i and Y i The polynomial is used to simplify the calculation. However, the same simplification can also be applied in the calculation when correcting harmonics other than the second harmonic. That is, when the order of the harmonic to be corrected is k, the trigonometric function (i.e., cos(k+1)θ) that appears in equations (17), (19) and (20) in the first embodiment is used. i sin(k+1)θ i cos kθ i and sin kθ i () can be expressed using well-known formulas for k-fold and k+1-fold angles of trigonometric functions, replacing them with cosθ. i and sinθ i Furthermore, cosθ i and sinθ i Approximated as X i and Y i Thus, by replacing the trigonometric functions with X i 'and Y i The degree of k is simplified by using polynomials. Unless other constraints exist, such as computational resources or computation time, there is no upper limit to the degree of k. If y k Having with x k If the polarities are opposite (i.e., the phase shifts are in opposite directions), then R 2The fluctuation will be the (k-1)th. At this point, for any integer k≥4, the correction can be performed in the same way as in the case of positive polarity.

[0099] In other words, equation (17) can be simplified to equations (43) to (45).

[0100]

[0101] Note that in equations (44) and (45), [x] is the Gaussian symbol representing the largest integer not exceeding x.

[0102] Equations (19) and (20) can be simplified to equations (46) to (49).

[0103]

[0104] Note that in equations (48) and (49), [x] is the Gaussian symbol representing the largest integer not exceeding x.

[0105] Table 1 shows the polynomials X' and Y' that can replace cos kθ and sin kθ (k = 1 to 6) and their abbreviation symbols.

[0106] (Table 1)

[0107]

[0108] In this way, according to this embodiment, the correction value can be obtained through simplified calculations that do not include trigonometric functions. Simplified calculations that do not include trigonometric functions result in shorter computation time and reduced computational resources, thereby allowing implementation in low-cost, compact, and low-power embedded devices. Furthermore, as in the first embodiment, the correction values ​​for higher harmonics of interpolation errors in a two-phase sinusoidal signal can be calculated efficiently and accurately using a simple method.

[0109] (Third Embodiment)

[0110] In the following text, based on Figures 5A to 8B The third embodiment of the present invention is described below.

[0111] In the first and second embodiments described above, for ease of explanation, only higher harmonics were corrected for two-phase sinusoidal signals that did not contain errors in offset, amplitude ratio, and phase difference. In this embodiment, a correction method for two-phase sinusoidal signals containing errors in offset, amplitude ratio, and phase difference, excluding higher harmonics, will be described. Furthermore, in this embodiment, actual measurement data obtained from a real electromagnetic induction encoder will be used to illustrate the correction effect. Since the configuration of the correction value calculation device 1a is the same as in the second embodiment, the operation in the correction value calculation process of the third embodiment will be mainly described below.

[0112] Figure 5A and Figure 5B This is a graph showing the error contained in the two-phase sinusoidal signal before correction in the third embodiment. Figure 5A Show the position on the horizontal axis, and Figure 5B The horizontal axis represents frequency (spatial frequency). Figure 5A The Fourier transform of the waveform. For example... Figure 5B As shown, the two-phase sinusoidal signal used in the third embodiment includes offset error (represented as DC in the figures) and amplitude ratio and phase difference errors (represented as AM / PM in the figures). Furthermore, compared to other harmonics, the two-phase sinusoidal waveform signal contains a higher proportion of the 2nd (k+1=3) and 5th (k+1=6) harmonics. Therefore, depending on the detection method and the environment in which the encoder is used, the two-phase sinusoidal signal may contain certain harmonic components as errors. In this embodiment, corrections are performed to remove the 2nd and 5th harmonics, which are present in greater quantities than other harmonics. In addition to harmonic corrections, corrections are also performed for offset error, amplitude ratio error, and phase difference error.

[0113] Figure 6 This is a flowchart illustrating the correction value calculation process in the third embodiment. The correction value calculation process is performed by the correction unit 20, the polar coordinate transformation unit 30, and the error detection unit 40a.

[0114] When the correction value calculation process begins, the correction unit 20 first obtains N pairs of two-phase sinusoidal signals X and Y (Xi, Yj, Yi) as output data from the encoder detection unit 11 for correction. i Y i Where i is digital data from 1 to N (step S21). The correction unit 20 can obtain this data in real time from the encoder detection unit 11, or the encoder detection unit 11 can obtain and record the data in advance, and then the correction unit 20 obtains the data via a communication means or storage medium. Next, the correction unit 20 calculates and applies the amplitude normalization coefficient K according to equations (28) and (29). x This makes the square radius R i 2 The average becomes 1 (i.e., ΣR i 2 / N≈1), and X i and Y i Convert to X' i and Y' i (Step S22). In this way, coarse adjustment of the amplitude of the two-phase sinusoidal signal is performed to satisfy condition R. 2 =1. Subsequently, the polar coordinate transformation unit 30 is based on X' i and Y' iFor each of the N data pairs of a two-phase sinusoidal signal, calculate the phase angle θ. i and the corresponding square radius R i 2 (Step S23).

[0115] Next, in order to meet R with higher precision 2 Given the condition that = 1, calculate the amplitude normalization coefficient K. x Error (corrected residual) ΔK x and compared with the existing amplitude normalization coefficient K x Accumulate (step S24).

[0116] Then, the correction values ​​for the offset, amplitude ratio, and phase difference errors are obtained by any method (step S25). For example, the error detection unit 40a may also use the method described in Japanese Patent Application No. 2023-109451, which was not published on the filing date (priority date) of this application, to calculate the correction residuals for the offset, amplitude ratio, and phase difference errors, and update the correction values ​​based on the correction residuals.

[0117] Then, in order to calculate the correction value for the second harmonic, the error detection unit 40a uses the least squares sine approximation and trigonometric functions of 3θ to calculate the value representing R. 2 The cosine amplitude A in the model equation c3 and sinusoidal amplitude A s3 And calculate the corrected residual ΔA 2a and ΔA 2b Furthermore, the accumulated corrected residual ΔA 2a and ΔA 2b To determine the correction value A for the second harmonic. 2a and A 2b (Step S26).

[0118] Then, in order to calculate the correction value for the 5th harmonic, the error detection unit 40a uses the least squares sine approximation and a 6θ trigonometric function to calculate the value representing R. 2 The cosine amplitude A in the model equation c5 and sinusoidal amplitude A s5 And calculate the corrected residual ΔA 5a and ΔA 5b Furthermore, the accumulated corrected residual ΔA 5a and ΔA 5b To determine the correction value A for the 5th harmonic. 5a and A 5b (Step S26).

[0119] Next, the correction unit 20 applies the correction values ​​obtained in each step to the two-phase sinusoidal signal to perform correction (step S28). That is, the correction unit 20 applies the error ΔK based on the amplitude normalization coefficient obtained in step S23. x To correct the amplitude normalization coefficient K x Furthermore, the correction unit 20 corrects the offset, amplitude ratio, and phase difference based on the correction values ​​for the offset, amplitude ratio, and phase difference obtained in step S24. Additionally, the correction unit 20 corrects the offset, amplitude ratio, and phase difference based on the correction value A for the second harmonic calculated in step S25. 2a and A 2b To calculate the second harmonic x 2i and y 2i Furthermore, the second harmonic correction is performed by subtracting these values ​​from the two-phase sinusoidal signals. Additionally, the correction unit 20 uses the correction value A for the fifth harmonic calculated in step S26. 5a and A 5b To calculate the second harmonic x 5i and y 5i Furthermore, the fifth harmonic correction is performed by subtracting these harmonics from the two-phase sinusoidal signals. Then, the correction unit 20 outputs two-phase sinusoidal signal data X' reflecting these corrections. i and Y' i .

[0120] If the calculation and updating of the correction value are repeated (step S29; Yes), the process returns to step S22. Steps S23 to S28 are repeated as needed, and the correction value calculation process ends when it is no longer needed to be repeated (step S29; No). The correction value at the end of the correction value calculation process is the final correction value. The number of times the correction value is calculated and updated can be predetermined. Alternatively, the process can be repeated until the correction residuals are sufficiently small (e.g., until they are below a predetermined threshold).

[0121] The effects of correction using the method of this embodiment are described below. Figure 5B As shown, the error frequency components contained in the two-phase sinusoidal signal before correction include offset error (represented as DC in the figure), amplitude ratio and phase difference error (represented as AP / PM in the figure), and the second and fifth harmonics. Meanwhile, when the offset, amplitude ratio, and phase difference correction values ​​calculated in step S23 are applied to the two-phase sinusoidal signal, the residual error becomes... Figure 7A The waveforms shown are Figure 7B The spectrum shown has its error components of offset, amplitude ratio, and phase difference sufficiently reduced to be submerged in the noise substrate.

[0122] Furthermore, when the correction values ​​for the second harmonic calculated in step S24 and the correction values ​​for the fifth harmonic calculated in step S25 are applied to a two-phase sinusoidal signal, the residual error becomes Figure 8A The waveform shown, and Figure 8B The spectrum shown has the second and fifth harmonic components significantly reduced and submerged in the noise floor.

[0123] according to Figure 5A , Figure 5B , Figure 7A , Figure 7B , Figure 8A , Figure 8B As can be seen, the method according to this embodiment, in addition to offset correction, amplitude ratio error correction, and phase difference error correction, also performs high-order harmonic correction for the second and fifth harmonics, thereby significantly reducing the corresponding errors. Therefore, it can be seen that the correction method of the present invention works effectively in actual encoders.

[0124] In the third embodiment, when calculating the correction values ​​for the higher harmonics of the 2nd and 5th harmonics, the method described in the second embodiment, which uses polynomial approximations of trigonometric functions of X' and Y' to simplify the calculation, is used. As can be seen from the above error reduction effect, sufficient correction accuracy can be achieved even when the calculation is simplified using the method described in the second embodiment.

[0125] (Variations on the embodiment)

[0126] Although embodiments have been described above, the present invention is not limited to these examples. For instance, the first to third embodiments described above were illustrated using an electromagnetic induction encoder as an example; however, they are not limited to electromagnetic induction encoders and can also be applied to interpolation correction of encoders of other detection types (optical, magnetic, etc.) with two-phase sinusoidal signals. Furthermore, the encoder to which the present invention is applied can be a rotary encoder or a linear encoder. For example, in a linear encoder, when there is a cause of periodic variation in the guide mechanism, by applying the correction value calculation processing of this embodiment, the correction value can be calculated while reducing the periodic variation.

[0127] In the above embodiments, the Lissajous signal rotation number n is calculated in the wide-area phase angle calculation unit 50. i And the phase angle θ are obtained The case described here is for illustrative purposes, but it can also be obtained using other methods. For example, in an absolute encoder, It can be obtained through absolute detection.

[0128] In the third embodiment described above, equidistant data is used to evaluate the effectiveness of the correction. However, when performing calculations using the least-squares sine approximation, unequal-spaced data can also be used, achieving the same approximation accuracy as that obtained with equidistant data. With unequal-spaced data, a position reference is not required, thus enabling autonomous self-calibration. Corrections are performed in the order of offset error, amplitude ratio error, phase difference error, second harmonic error, and fifth harmonic error; however, the terms to be corrected and the order of correction are not limited to the above and are arbitrary.

[0129] In addition, in the first to third embodiments, other harmonics such as the 3rd, 4th, and 6th harmonics are not corrected. Instead, harmonics of any number (the number that is easily contained in the two-phase sine wave signal, depending on the characteristics of the encoder and the environment in which the encoder is used) can be selected and corrected.

[0130] In the third embodiment, the amplitude normalization coefficient K will be used. x Amplitude normalization, which normalizes the amplitude to 1, is divided into two stages. However, depending on the correction term, target error, or the amplitude of the signal before normalization, either or both of the amplitude normalization stages can be omitted.

[0131] Any addition, deletion, and design modification of the constituent elements in the embodiments that can be conceived by those skilled in the art, as well as any combination of features of the embodiments, may fall within the scope of the present invention, provided that they contain the spirit of the present invention.

[0132] The following appendix further discloses the above embodiments.

[0133] (Appendix 1) A method for calculating a correction value, the method calculating the correction value for the kth harmonic component in a two-phase sinusoidal signal (X, Y) output by an encoder, comprising:

[0134] Polar coordinate calculation steps are used for N phase angles θ in a Lissajous waveform plotted from two-phase sinusoidal signals. i and with each phase angle θ i The corresponding Lissajous radius R i Calculate the square radius R i 2 The square radius R i 2 It is with each phase angle θ i The corresponding Lissajous radius R i The square of; and

[0135] The correction value calculation step is used to calculate the phase angle θ based on the phase angle θ calculated in the polar coordinate calculation step. i and each phase angle θ i The corresponding square radius Ri 2 Find the square radius R of a two-phase sinusoidal signal containing the kth harmonic component. 2 The coefficients in the approximate expression model are used to calculate the correction value based on the obtained coefficients.

[0136] In the step of calculating the correction value, the coefficients of the approximate expression model are determined by the least squares method, and the obtained correction value is accumulated as the correction residual.

[0137] (Appendix 2) According to the correction value calculation method described in Appendix 1, in the correction value calculation steps:

[0138] Based on the phase angle θ calculated through polar coordinate calculation steps i and phase angle θ i The corresponding square radius R i 2 Cosine amplitude A Ka Correction residual ΔA Ka and sinusoidal amplitude A kb Correction residual ΔA kb The calculation is performed, where equations (11) and (12) represent the k-th harmonic components contained in the two-phase sinusoidal signal (X, Y), and the cosine amplitude A is calculated. Ka and sinusoidal amplitude A kb It is calculated based on each corrected residual;

[0139]

[0140]

[0141] Using equation (16) as the square radius R 2 The approximate expression model uses the phase angle (k±1)θ i and phase angle (k±1)θ i The corresponding square radius R i 2 The coefficient A in equation (16) is determined by the least squares method. c(k±1) and A s(k±1) ;as well as

[0142]

[0143] Based on the calculated coefficient A c(k±1) and A s(k±1) Cosine amplitude A Ka Correction residual ΔA Ka and sinusoidal amplitude A kb Correction residual ΔA kb It is obtained using equation (21)

[0144]

[0145] (Appendix 3) According to the correction value calculation method in Appendix 2, in the correction value calculation steps, the coefficient A in equation (16) c(k±1) and A s(k±1) Using equation (17), it is found to be C. (k±1) Matrix elements

[0146]

[0147] (Appendix 4) According to the correction value calculation method described in Appendix 2, in the correction value calculation step, the coefficient A in equation (16) c(k±1) and A s(k±1) Using equations (43) to (45), it is found that C is... (k±1) The elements of the matrix,

[0148]

[0149] In equations (44) and (45), [x] is the Gaussian symbol representing the largest integer not exceeding x.

[0150] (Appendix 5) The method for calculating the correction value according to Appendix 4 also includes a correction step for correcting the two-phase sinusoidal signal based on the correction value.

[0151] In the correction step, the kth harmonic x ki and y ki It was obtained using equations (46) to (49).

[0152]

[0153] In equations (48) and (49), [x] is the Gaussian symbol representing the largest integer not exceeding x, and

[0154] x is obtained by subtracting the corresponding data from the two-phase sinusoidal signals. ki and y ki The two-phase sinusoidal signals are corrected.

[0155] (Appendix 6) The method for calculating the correction value according to any one of Appendices 1 to 5 further includes a correction step for correcting the two-phase sinusoidal signal based on the correction value.

[0156] The correction value calculation step is then applied again to the two-phase sinusoidal signal corrected by the correction step to update the correction value.

[0157] (Appendix 7) The correction value is calculated according to the method in Appendix 6, wherein the correction value is updated using equation (22).

[0158]

[0159] (Appendix 8) A program that causes a computer to perform the correction value calculation method according to Appendix 1.

[0160] (Appendix 9) A correction value calculation device for calculating correction values ​​used to correct a two-phase sinusoidal signal (X, Y) output by an encoder, comprising:

[0161] The polar coordinate transformation unit is used for N phase angles θ in a Lissajous waveform plotted from two-phase sinusoidal signals. i and with each phase angle θ i The corresponding Lissajous radius R i Calculate the square radius R i 2 The square radius R i 2 It is with each phase angle θ i The corresponding Lissajous radius R i The square of; and

[0162] An error detection unit is used to detect the phase angle θ calculated by the polar coordinate transformation unit. i and with each phase angle θ i The corresponding square radius R i 2 Find the square radius R of a two-phase sinusoidal signal containing the kth harmonic component. 2 The coefficients in the approximate expression model are used to calculate the correction value based on the obtained coefficients.

[0163] The error detection unit determines the coefficients of the approximate expression model using the least squares method, and calculates the correction value by accumulating the determined correction values ​​as correction residuals.

[0164] (Appendix 10) The correction value calculation device according to Appendix 9, wherein the error detection unit:

[0165] Based on the phase angle θ calculated by the polar coordinate transformation unit i and phase angle θ i The corresponding square radius R i 2 Calculate the cosine amplitude A Ka Correction residual ΔA Ka and sinusoidal amplitude A kb Correction residual ΔA kb Equations (11) and (12) are used to represent the k-th harmonic components contained in the two-phase sinusoidal signal (X, Y), and the cosine amplitude A is calculated based on each correction residual. Ka and sinusoidal amplitude A kb;

[0166] x k =+A ka cos kθ-A kb sin kθ…(11)

[0167]

[0168] Using equation (16) as the square radius R 2 The approximate expression model uses the phase angle (k±1)θ i and phase angle (k±1)θ i The corresponding square radius R i 2 The coefficient A in equation (16) is determined by the least squares method. c(k±1) and A s(k±1) ;as well as

[0169] R 2 =R o(k±1) +A c(k±1) cos(k±1)θ+A s(k±1) sin(k±1)θ…(16)

[0170] Based on the calculated coefficient A c(k±1) and A s(k±1) The cosine amplitude A is obtained using equation (21). Ka Correction residual ΔA Ka and sinusoidal amplitude A kb Correction residual ΔA kb

[0171]

[0172] (Appendix 11) According to the correction value calculation device in Appendix 10, the error detection unit uses equation (17) to calculate the coefficient A in equation (16). c(k±1) and A s(k±1) As C (k±1) Matrix elements

[0173]

[0174] (Appendix 12) According to the correction value calculation device in Appendix 10, the error detection unit uses equations (43) to (45) to calculate the coefficient A in equation (16). c(k±1) and A s(k±1) As C (k±1) The elements of the matrix,

[0175]

[0176] In equations (44) and (45), [x] is the Gaussian symbol representing the largest integer not exceeding x.

[0177] (Appendix 13) The correction value calculation device according to Appendix 10 further includes a correction unit for correcting the two-phase sinusoidal signals based on the correction value.

[0178] Among them, the correction unit:

[0179] The kth harmonic x is obtained using equations (46) to (49). ki and y ki ,

[0180]

[0181] In equations (48) and (49), [x] is the Gaussian symbol representing the largest integer not exceeding x; and

[0182] x is obtained by subtracting the corresponding data from the two-phase sinusoidal signals. ki and y ki To correct the two-phase sinusoidal signal.

[0183] (Appendix 14) The correction value calculation device according to Appendix 10 further includes a correction unit for correcting the two-phase sinusoidal signals based on the correction value.

[0184] The polar coordinate transformation unit calculates the square radius R for the two-phase sinusoidal signal corrected by the correction unit. 2 The square radius R 2 It is the square of the Lissajous radius R corresponding to each phase angle θ.

[0185] The error detection unit is based on each phase angle θ and squared radius R calculated by the polar coordinate transformation unit. 2 Calculate the new correction value and update the correction value.

[0186] (Appendix 15) According to the correction value calculation device in Appendix 14, the error detection unit updates the correction value using equation (22).

[0187]

[0188] (Appendix 16) An encoder, comprising: a calibration value calculation device according to any one of Appendices 9 to 15; and

[0189] The encoder detection unit outputs a two-phase sinusoidal signal in response to displacement along the measurement direction, wherein the correction value calculation device performs:

[0190] The correction value calculation process calculates the correction value based on the two-phase sinusoidal signal output by the encoder detection unit; and

[0191] The correction process applies the calculated correction value to the two-phase sinusoidal signal output by the encoder detection unit.

Claims

1. A method for calculating a correction value, comprising calculating a correction value used to correct the k-th harmonic component in a two-phase sinusoidal signal (X, Y) output by an encoder, comprising: The polar coordinate calculation step is used for N phase angles θ in the Lissajous waveform plotted from the two-phase sinusoidal signals. i and with each phase angle θ i The corresponding Lissajous radius Ri, calculate the square radius Ri. 2 The square radius Ri 2 It is with each phase angle θ i The corresponding Lissajous radius Ri squared; as well as The correction value calculation step is used to calculate the phase angle θ based on the polar coordinate calculation step. i and with each phase angle θ i The corresponding square radius Ri 2 Find the square radius R of a two-phase sinusoidal signal containing the kth harmonic component. 2 The coefficients in the approximate expression model are used to calculate the correction value. In the step of calculating the correction value, the coefficients of the approximate expression model are determined by the least squares method, and the obtained correction value is accumulated as the correction residual.

2. The correction value calculation method according to claim 1, in, In the correction value calculation step: Based on the phase angle θ calculated through the polar coordinate calculation step i and the phase angle θ i The corresponding square radius R i 2 Cosine amplitude A Ka Correction residual ΔA Ka and sinusoidal amplitude A kb Correction residual ΔA kb The calculation is performed, where equations (11) and (12) represent the k-th harmonic components contained in the two-phase sinusoidal signal (X, Y), and the cosine amplitude A is calculated. Ka and the sinusoidal amplitude A kb It is calculated based on each corrected residual; x k =+A ka coskθ-A kb sinkθ…(11) Using equation (16) as the square radius R 2 The approximate expression model uses each phase angle (k±1)θ i and phase angle (k±1)θ i The corresponding square radius Ri 2 The coefficient A in equation (16) is determined by the least squares method. c(k±1) and A s(k±1) ;as well as R 2 =R o(k±1) +A c(k±1) cos(k±1)θ+A s(k±1) sin(k±1)θ…(16) Based on the calculated coefficient A c(k±1) and A s(k±1) The cosine amplitude A Ka Correction residual ΔA Ka and the sinusoidal amplitude A kb Correction residual ΔA kb It is obtained using equation (21) 3. The method for calculating the correction value according to claim 2, wherein, In the step of calculating the correction value, The coefficient A in equation (16) c(k±1) and A s(k±1) Using equation (17), it is found to be C. (k±1) Matrix elements A (k±1) ·C 1(k±1) )=B (k±1) C (k±1) =A (k±1) -1 ·B (k±1) …(17)。 4. The method for calculating the correction value according to claim 2, wherein, In the step of calculating the correction value, the coefficient A in equation (16) c(k±1) and A s(k±1) Using equations (43) to (45), it is found that C is... (k±1) The elements of the matrix, A (k±1) ·C (k±1) =B (k±1) C (k±1) =A (k±1) -1 ·B (k±1) …(43) In equations (44) and (45), [x] is the Gaussian symbol representing the largest integer not exceeding x.

5. The correction value calculation method according to claim 4 further includes a correction step for correcting the two-phase sinusoidal signals based on the correction value. in, In the correction step, the kth harmonic x ki and y ki It was obtained using equations (46) to (49). x ki =A ka CSk i -A kb SNk i …(46) In equations (48) and (49), [x] is the Gaussian symbol representing the largest integer not exceeding x, and x is obtained by subtracting the corresponding data from the two-phase sinusoidal signals. ki and y ki The two-phase sinusoidal signals are corrected.

6. The method for calculating the correction value according to claim 1 or 2 further includes a correction step for correcting the two-phase sinusoidal signals based on the correction value. in, The correction value calculation step is then applied again to the two-phase sinusoidal signal corrected by the correction step to update the correction value.

7. The method for calculating the correction value according to claim 6, wherein, The correction value is updated using equation (22). Among them, 0 <G f ≤1.

8. A program that enables a computer to perform the correction value calculation method as described in claim 1.

9. A correction value calculation device for calculating correction values ​​used to correct a two-phase sinusoidal signal (X, Y) output by an encoder, comprising: The polar coordinate transformation unit is used for the N phase angles θ in the Lissajous waveform plotted from the two-phase sinusoidal signals. i and with each phase angle θ i The corresponding Lissajous radius R i Calculate the square radius R i 2 The square radius R i 2 It is with each phase angle θ i The corresponding Lissajous radius R i The square of; as well as An error detection unit is used to detect the phase angle θ calculated by the polar coordinate transformation unit. i and with each phase angle θ i The corresponding square radius Ri 2 Find the square radius R of a two-phase sinusoidal signal containing the kth harmonic component. 2 The coefficients in the approximate expression model are used to calculate the correction value. The error detection unit determines the coefficients of the approximate expression model using the least squares method, and calculates the correction value by accumulating the determined correction values ​​as correction residuals.

10. The correction value calculation device according to claim 9, wherein, The error detection unit: Based on the phase angle θ calculated by the polar coordinate transformation unit i and the phase angle θ i The corresponding square radius R i 2 Calculate the cosine amplitude A Ka Correction residual ΔA Ka and sinusoidal amplitude A kb Correction residual ΔA kb In this context, equations (11) and (12) are used to represent the k-th harmonic components contained in the two-phase sinusoidal signal (X, Y), and the cosine amplitude A is calculated based on each correction residual. Ka and the sinusoidal amplitude A kb ; x k =+A ka coskθ-A kb sinkθ…(11) Using equation (16) as the square radius R 2 The approximate expression model uses the phase angle (k±1)θ i and phase angle (k±1)θ i The corresponding square radius Ri 2 The coefficient A in equation (16) is determined by the least squares method. c(k±1) and A s(k±1) ;as well as R 2 =R o(k±1) +A c(k±1) cos(k±1)θ+A s(k±1) sin(k±1)θ…(16) Based on the calculated coefficient A c(k±1) and A s(k±1) The cosine amplitude A is obtained using equation (21). Ka Correction residual ΔA Ka and the sinusoidal amplitude A kb Correction residual ΔA kb 11. The correction value calculation device according to claim 10, wherein, The error detection unit uses equation (17) to calculate the coefficient A in equation (16). c(k±1) and A s(k±1) As C (k±1) Matrix elements A (k±1) ·C 1(k±1) =B (k±1) C (k+1 )=A (k±1) -1 ·B (k±1) …(17)。 12. The correction value calculation device according to claim 10, wherein, The error detection unit uses equations (43) to (45) to calculate the coefficient A in equation (16). c(k±1) and A s(k±1) As C (k±1) The elements of the matrix, A (k±1) ·C (k±1) =B (k±1) C (k±1) =A (k±1) -1 ·B (k±1) …(43) In equations (44) and (45), [x] is the Gaussian symbol representing the largest integer not exceeding x.

13. The correction value calculation device according to claim 12 further includes a correction unit for correcting the two-phase sinusoidal signals based on the correction value. in, In the correction unit: The kth harmonic x is obtained using equations (46) to (49). ki and y ki , x ki =A ka CSk i -A kb SNk i …(46) In equations (48) and (49), [x] is the Gaussian symbol representing the largest integer not exceeding x; and x is obtained by subtracting the corresponding data from the two-phase sinusoidal signals. ki and y ki To correct the two-phase sinusoidal signals.

14. The correction value calculation device according to any one of claims 9 to 13, further comprising a correction unit for correcting the two-phase sinusoidal signals based on the correction value. The polar coordinate transformation unit calculates the square radius R for the two-phase sinusoidal signal corrected by the correction unit. 2 The square radius R 2 It is the square of the Lissajous radius R corresponding to each phase angle θ, and The error detection unit is based on each phase angle θ and square radius R calculated by the polar coordinate transformation unit. 2 To calculate the new correction value and update the correction value.

15. The correction value calculation device according to claim 14, wherein, The error detection unit updates the correction value using equation (22). Among them, 0 <G f ≤1.

16. An encoder, comprising: The correction value calculation device according to any one of claims 9 to 13; as well as The encoder detection unit outputs a two-phase sinusoidal signal in response to displacement along the measurement direction. The correction value calculation device performs the following: The correction value calculation process is based on the two-phase sinusoidal signal output by the encoder detection unit to calculate the correction value; as well as The correction process involves applying the calculated correction value to the two-phase sinusoidal signal output by the encoder detection unit.

Citation Information

Patent Citations

  • Position detection device

    JP2008232649A

  • Manufacturing method of thermoelectric conversion module

    JP2023109451A