The present application claims priority under 35 U.S.C. § 119 to Japanese Patent Application No. 2018-185902 filed Sep. 28, 2018. The contents of this application are incorporated herein by reference in their entirely.
The present disclosure relates to a rotary encoder, and more particularly, to a rotary encoder capable of self-calibration.
A rotary encoder used for a surveying apparatus measures a horizontal angle and a vertical angle by using a rotary disk that rotates in conjunction with a telescope and a detector that reads a slit indicative of a scale or an angle code provided along the circumferential direction of this rotary disk.
The main causes of errors in measured values of the rotary encoder include the eccentricity of attachment of the rotary disk to a rotating shaft, and the scale or angle codes not attached at completely equal intervals.
To remove such an error, in the rotary encoder disclosed in Patent Document 1, every time the rotary disk is rotated by a predetermined angle, where a rotation angle of the rotary disk is provided as θ and an arbitrary angle from the rotation angle θ within a reading range on the detector is provided as φ, reading values f(θ+φ) and f(θ) within the reading range on the detector can be acquired, and the self-calibration of the reading value f(θ) can be carried out based on a change in a difference g(θ,φ) between the reading values f(θ+φ) and f(θ) when the rotary disk is rotated one turn.
Patent Document 1: Japanese Patent No. 4824415
However, in the rotary encoder of Patent Document 1, no consideration is given to an error caused by deflecting of the rotary disk toward and away from a light source during rotation (hereinafter referred to as “deflection”), and particularly, in the case of a rotary encoder for a surveying apparatus required to perform high precision measurement, the rotary encoder has a problem that calibration accuracy may not be sufficient.
The present invention has been made in view of the situations, and an object thereof is to provide a rotary encoder capable of carrying out highly-accurate self-calibration with consideration given to an error caused by deflection of a rotary disk.
To achieve the aforementioned object, an aspect of the present invention provides a rotary encoder including: a rotary disk with an angle code; a light source for irradiating the angle code; a detector for reading the angle code; and a processing for acquiring a reading value f(θ) based on the angle code read by the detector. The light source includes a plurality of light-emitting elements, wherein a first light-emitting element is disposed at a position corresponding to an angle θ of the rotation, wherein a second light-emitting element is disposed at a predetermined distance xL away from the first light-emitting element. Every time the rotary disk is rotated by a predetermined angle, where a rotation angle of the rotary disk is provided as θ and an arbitrary angle from the rotation angle θ within a reading range on the detector is provided as φ, the processing unit is configured to acquire reading values fI(θ+φ) and fI(θ) within a reading range on the detector in the case of using the first light-emitting element and a reading value fII(θ+φ) on the detector in the case of using the second light-emitting element, to calculate a reading value error ΔφI due to deflection at an angle θ+φ based on a difference h(θ+φ) between the reading value fII(θ+φ) and the reading value fI(θ+φ), to obtain a difference g(θ,φ) between the reading values fI(θ+φ) and fI(θ) such that the reading value error ΔφI is reflected, and to self-calibrate the reading value fI(θ) based on a change in the difference gI(θ,φ).
In another aspect, preferably, the light source includes a third light-emitting element disposed at a position symmetrical to the second light-emitting element with respect to the first light-emitting element. The processing unit is configured to acquire a reading value fI(θ−φ) within a reading range on the detector in the case of using the first light-emitting element and a reading value fIII(θ−φ) on the detector in the case of using the third light-emitting element, to calculate a reading value error Δ(−φI) due to deflection at an angle θ−φ based on a difference h(θ−φ) between the reading value fIII(θ−φ) and the reading value fI(θ−φ), to obtain a difference gI(θ, −φ) between the reading values fI(θ−φ) and fI(θ) such that the reading value error Δ(−φI) is reflected, to average changes in the difference gI(θ,φ) and the difference gI(θ, −φ), and to self-calibrate the reading value fI(θ).
According to the aspect, an object is to provide the rotary encoder capable of carrying out highly-accurate self-calibration with consideration given to an error caused by deflection of a rotary disk.
Preferred embodiments of the present invention will now be described with reference to the drawings; however, the present invention is not limited thereto. In the embodiments, the same constituent elements are denoted by the same reference numerals and will not redundantly be described.
1. Configuration of Rotary Encoder
A rotary encoder (hereinafter simply referred to as an “encoder”) 100 according to this embodiment is a so-called absolute encoder. The encoder 100 includes a rotary disk 2 fixed to a rotating shaft (not depicted), a light source 3 fixed to a rotating shaft bearing (not depicted), a detector 4 receiving the light from the light source 3 via the rotary disk 2, a converting unit 5, a processing unit 6, and a display unit 7.
The rotary disk 2 is a doughnut-shaped disk and has a periphery portion provided with slits 21 composed of narrow slits that mean 0 and wide slits that mean 1 and forming angle codes indicative of angles.
The light source 3 includes a first light-emitting element 31 and a second light-emitting element 32, and the light-emitting elements are LEDs, for example. The light-emitting elements 31, 32 are disposed to face the slits 21 of the rotary disk 2 at a predetermined distance HDL (
The detector 4 is a CCD linear sensor, for example, and is disposed on the side opposite to the light source 3 with respect to the rotary disk 2 so as to face the light source 3 at a predetermined distance HDC (
The converting unit 5 is an A/D converter and converts a detection signal from the detector 4 into a digital signal to output the signal to the processing unit 6.
The processing unit 6 is a microcontroller equipped with a ROM, a RAM, etc. for a CPU, controls light emission of the light source 3, decodes an angle code from the detection signal input from the converting unit 5, applies a known interpolation process to calculate an angle, and outputs the angle to the display unit 7 such as a liquid crystal display.
As depicted in
In this state, the first light-emitting element 31 is disposed at a position corresponding to the point A, and the second light-emitting element 32 is disposed at the predetermined distance xL away from the first light-emitting element 31 in an extending direction of the detector 4.
As depicted in
Since the reading values fI(θ) and fI(θ+φ) are periodic functions with a period of 360° and can therefore be expressed by formulas 1 and 2 by using Fourier series.
fI(θ)=θ+ΣAi*sin(iθ+αi) (1)
fI(θ+φ)=(θ+φ)+ΣAi*sin {i(θ+φ)+αi} (2)
(where i means a natural number (1, 2, 3, . . . M/2) expressing the order of a higher harmonic, Ai means amplitude of the i-th higher harmonic, αi means an initial phase of the i-th higher harmonic, and M means a scale number, which is an even number).
As depicted in
2. Calculation of Deflection Error
An influence of deflection on an angle reading value will be described with reference to
When the deflection ΔH occurs, the incident position on the rotary disk 2 of the light emitted from the first light-emitting element 31 for detection of the angle θ+φ is a point B′ shifted from the point B by a distance ΔxDI. Therefore, the angle code of the point B′ is read instead of that of the point B at the reading position BCI. Thus, the reading value fI(θ+φ) is (θ+φ)+ΔφI (
The deflection error ΔφI at the position of the angle θ+φ can be calculated as follows.
From
xCI/HLC=ΔxDI/ΔH (3)
Therefore, the deviation ΔxDI of the incident position can be expressed by formula 4.
ΔxDI=ΔH/HLC·xCI (4)
From
tan φ=xD/l (5)
The tangent of (φ+ΔφI) is expressed as formula 6 by using the deviation ΔxDI of the incident position.
tan(φ+ΔφI)=(xD−ΔxDI)/l (6)
Therefore, if ΔφI is sufficiently small, ΔφI can be approximated as in formula 7.
ΔφI≈−(ΔxDI)/1=−(ΔH/HLC)(xCI/1) (7)
The deflection is also a periodic function with a period of 360° and is therefore expressed by formula 8 by using Fourier series.
ΔφI=Σ(ΔHi/HLC)(xCI/l)*sin {i(θ+φ)+βi} (8)
By adding this formula to formula 1, a measured angle value fI(θ+φ) at the point B (angle θ+φ) with consideration given to the deflection can be expressed by formula 9.
fI(θ+φ)=θ+φ+ΣAi*sin {i(θ+φ)+αi}+Σ(ΔHi/HLC)(xCI/l)*sin {i(θ+φ)+βi} (9)
In the case of φ=0, xCI=0 is satisfied, and an error due to the deflection does not occur as expressed by formula 10. Specifically, the error due to the deflection does not affect the measurement of the angle θ itself.
fI(θ)=θ+ΣAi*sin(iθ+αi) (10)
Description will be made of the influence of the deflection ΔH in the case of obtaining the angle reading value fII(θ+φ) at the point BCII when the light is emitted by the second light-emitting element 32. The incident position on the rotary disk 2 of the light emitted from the second light-emitting element 32 is a point B″ shifted from the point B by a distance ΔxDII.
A relationship at a position of θ+φ can be expressed by formula 11 from
(xL−xCII)/HLC=−ΔxDII/ΔH (11)
Therefore, the deviation ΔxDII of the incident position can be expressed by formula 12.
ΔxDII=(ΔH/HLC)(xCII−xL) (12)
Thus, as in the case that the light is emitted by the first light-emitting element 31, the angle reading value fII(θ+φ) of the point BCII at the position of θ+φ can be expressed by formula 13.
fII(θ+φ)=−θ+φ+ΣAi*sin {i(θ+φ)+αi}+Σ(ΔHi/HLC)(xCII−xL)/l*sin {i(θ+φ)+βi} (13)
Therefore, a difference h(θ+φ) between the reading value fII(θ+φ) according to the second light-emitting element 32 and the reading value fI(θ+φ) according to the first light-emitting element 31 can be expressed by formula 14.
h(θ+φ)=fII(θ+φ)−fI(θ+φ)=Σ(ΔHi/HLC)(xCII−xCI−xL)/l*sin {i(θ+φ)+βi} (14)
From formula 8, Σ(ΔHi/HLC)*{sin {i(θ+φ)+βi}=ΔφI/(xCI/l) is acquired, and therefore, the error ΔφI of the angle reading value due to the deflection at the position of θ+φ can be expressed by formula 15.
ΔφI=xCI/(xCII−xCI−xL)*h(θ+φ) (15)
From the above, an angle reading value taking an influence of an error into consideration is obtained by fI(θ+φ)−ΔφI.
Since the distance xL between the first light-emitting element 31 and the second light-emitting element 32 is known, and the distance (angle reading position) xCI between the reading positions ACI, BCI, and the distance (angle reading position) xCII between the reading positions ACI, BCII can also be acquired, the error ΔφI of the angle reading value due to the deflection at the position of the angle θ+φ can be obtained.
3. Method of Self Calibration
A method of self-calibration of the encoder 100 according to this embodiment is the same as the method disclosed in Patent Document 1 except that the error ΔφI of the angle reading value due to the deflection is taken into consideration when the reading value fI(θ+φ) at the position of θ+φ is acquired, and the outline is as follows.
First, the difference gI(θ,φ) between the reading values fI(θ+φ) and fI(θ) can be expressed by a Fourier series as in formula 16 from formulas 1 and 2 according to the method described in Patent Document 1.
gI(θ,φ)=φ+ΣAi*sin(iθ/2)*cos {i(θ+φ/2)+αi}=B0+ΣBi*sin {iθ+γi} (16)
where
φ=Bo (17)
Ai=Bi*sin(iφ/2) (18)
αi=γi−iφ/2+π/2 (19).
Therefore, at a position with a rotation angle θj where the rotary disk 2 is rotated by a predetermined angle (e.g., 5°) obtained by dividing 360° into N equal parts, reading values fI(θj), fI(θj+φ) at points A and B are acquired. Here, j=1, 2, 3, . . . N−1. By calculating gI(θj,φ)=fI(θj+φ)−fI(θj) for each predetermined angle θj, the respective coefficients Bo, Bi, γi of the Fourier series in formula 16 can be calculated by a known method, and φ, Ai, αi can be calculated from formulas 17, 18, 19. Therefore, the true angle θ can be obtained from formula 20, which is deformation of formula 1.
θ=f(θ)−ΣAi*sin(iθ+αi)=f(θ)−E(θ) (20)
Here, E(θ) means an error function E(θ)=ΣAi*sin(iθ+αi).
4. Self-Calibration Procedures
Self-calibration procedures of the encoder 100 according to this embodiment will be described with reference to
When the self-calibration is started, in step S101, the light is emitted by the first light-emitting element 31 so as to acquire the reading values fI(θj), fI(θj+φ) of the reading positions ACI, BCI on the detector 4 and the distance (angle reading position) xCI between ACI and BCI, and this is carried out a predetermined number of times. After the measurement, the light emission of the first light-emitting element 31 is stopped.
Next, in step S102, the light is emitted by the second light-emitting element 32 so as to acquire the reading value fII(θj+φ) of the reading position BCII on the detector 4 and the distance (angle reading position) xCII between ACI and BCII, and this is carried out a predetermined number of times. After the measurement, the light emission of the second light-emitting element 32 is stopped.
Next, in step S103, averages of the reading values fI(θj), fI(θj+φ), fII(θj+φ), the distance (angle reading position) xCI between ACI and BCI, and the distance (angle reading position) xCII between ACI and BCII are calculated.
Next, in step S104, a difference h(θj+φ)=fII(θj+φ)−fI(θj+φ) between the reading values fII(θj+φ) and fI(θj+φ) at θ+φ is calculated and stored.
Next, in step S105, the error ΔφI of the angle reading value due to the deflection at the position of θ+φ is calculated by formula 15 and stored.
Next, in step S106, a difference gI(θj,φ) between the reading value fI(θj+φ)−ΔφI and the reading value fI(θ) taking the influence of the deflection into consideration is calculated and stored.
Next, in step S107, it is judged whether all possible data has been acquired, i.e., whether g(θj,φ) has been acquired for each predetermined angle θj. For example, it is judged for θ whether gI(θj,φ) has been acquired at intervals of 5° traversing 360°.
If all possible data has not been acquired (No), the process proceeds to step S107, the rotary disk 2 is manually or automatically rotated by a predetermined angle, and the process returns to step S101. Thereafter, steps S101 to S107 are repeated to obtain and store gI(θj,φ) for each predetermined angle θj.
When the predetermined number of times of data acquisition has been completed in step S109 (Yes), the process proceeds to step S108 to calculate, based on gI(θj,φ) for each predetermined angle θj, coefficients B0, Bn, γn of the Fourier series of gI(θ,φ) described in formula 16.
Next, in step S110, coefficients An, αn of the Fourier series of the error function E(θ) of the reading value f(θ) are calculated based on the coefficients B0, Bn, γn.
Next, in step S111, the error function E(θ) is obtained based on the coefficients acquired in step S110 and is stored, and the process ends.
By carrying out the automatic calibration of the encoder 100 as described above, the true angle θ can be accurately obtained from the reading value f(θ) by using formula 1 in subsequent measurements.
According to the encoder 100 according to this embodiment, when a rotation angle of the rotary disk is provided as θ and an arbitrary angle from the rotation angle θ within a reading range on the detector is provided as φ, the second light-emitting element is disposed at a predetermined distance in addition to the first light-emitting element for measuring the rotation angle θ, and this enables measurement of the angle reading value fI(θ+φ) using the first light-emitting element 31 and the angle reading value fII(θ+φ) using the second light-emitting element 32 at the position of the angle θ+φ as well as the respective angle reading positions on the detectors 4. Using these measured values and the known distance between the light-emitting elements makes it possible to obtain the error ΔφI of the angle reading value at the angle θ+φ due to the deflection at the position of the angle θ+φ.
Therefore, the error function can be calculated by using the reading value fI(θj+φ)−ΔφI taking the error ΔφI of the angle reading value due to the deflection, and the self-calibration can be carried out with this error function, which enables highly accurate self-calibration.
The third light-emitting element 33 is used for reading an angle at a position separated from the point A by the angle φ in the direction opposite to the point B, that is, at a position of an angle θ−φ. An error Δ(−φI) of an angle reading value due to the deflection at the angle θ−φ is also calculated by the same method as ΔφI.
Next, self-calibration procedures of the encoder 100a according to this embodiment will be described with reference to
When the self-calibration is started, in step S201, in addition to the process of step S101, an angle reading value fI(θj−φ) and a distance (angle reading position) xCI′ between ACI and CCI are acquired, and this is carried out a predetermined number of times. After the measurement, the light emission of the first light-emitting element 31 is stopped.
Next, in step S202, the measurement according to the second light-emitting element is carried out as in step S102.
Next, in step S203, the light is emitted by the third light-emitting element 33 so as to acquire a reading value fIII(θj−φ) of a reading position BCIII on the detector 4 and a distance (angle reading position) xCIII between ACI and BCIII, and this is carried out a predetermined number of times. After the measurement, the light emission of the third light-emitting element 33 is stopped.
Next, in step S204, averages of the reading values fI(θj), fI(θj+φ), fII(θj+φ), fIII(θj−φ) and the angle reading positions xCI, xCI′ acquired in steps S201 to S203 are calculated.
Next, in step S205, h(θj+φ) and h(θj−φ) are calculated and stored as in step S104.
Next, in step S206, the errors ΔφI, Δ(−φI) of the angle reading values due to the deflection at the respective positions of θ+φ, θ−φ are calculated and stored as in step S105.
Next, in step S207, gI(θj,φ) and gI(θj,φ) are calculated and stored as in step S106.
Thereafter, the processes in steps S208 to S211 are carried out as in steps S107 to S110 to calculate an error function of fI(θ) obtained from each of θ+φ and θ−φ.
The error function is averaged in step S212, the error function is stored in step S213, and the process ends.
According to this embodiment, since the reading errors of the reading values at the angles θ+φ and θ−φ can be averaged, higher calibration accuracy can be achieved.
Although the preferred embodiments of the present invention have been described, the embodiments are examples of the present invention and can be combined based on the knowledge of those skilled in the art, and such embodiments fall within the scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
JP2018-185902 | Sep 2018 | JP | national |
Number | Name | Date | Kind |
---|---|---|---|
7012703 | Allman | Mar 2006 | B2 |
20080149816 | Wang | Jun 2008 | A1 |
20100181468 | Nakamura | Jul 2010 | A1 |
20130124128 | Yamazaki | May 2013 | A1 |
20150247746 | Schindler | Sep 2015 | A1 |
Number | Date | Country |
---|---|---|
4824415 | Sep 2011 | JP |
Number | Date | Country | |
---|---|---|---|
20200103255 A1 | Apr 2020 | US |