Encoder and apparatus having the same
10393550 ยท 2019-08-27
Assignee
Inventors
Cpc classification
G01D5/34792
PHYSICS
International classification
Abstract
An encoder includes a scale, a detector, and a processor. The processor executes a second process while executing a first process, calculates a first relative position of one of the scale and the detector to the other of the scale and the detector when a calculation of a relative position between them starts, and then calculates a second relative position of the one to the other based on a relative displacement amount between them and the first relative position.
Claims
1. An encoder comprising: a scale that has a first periodic pattern and a second periodic pattern that has a period longer than that of the first periodic pattern; a detector movable relative to the scale, and switchable, by changing a combination of a plurality of read elements, between a first detecting state in which the detector reads the first periodic pattern and outputs a first signal having a changing period that depends on the first periodic pattern, and a second detecting state in which the detector reads the second periodic pattern and outputs a second signal having a changing period that depends on the second periodic pattern; and a processor configured to execute a first process for calculating a relative displacement amount between the scale and the detector by using one of the first signal and the second signal obtained from the detector that is set to one of the first detecting state and the second detecting state, and a second process for calculating a relative position of one of the scale and the detector relative to the other of the scale and the detector by using both of the first signal and the second signal obtained from the detector that is set to each of the first detecting state and the second detecting state, wherein the processor executes the second process while the processor executes the first process, the processor calculating a first relative position of the one to the other when the second process for calculating the relative position starts, and then calculating a second relative position of the one to the other based on the relative displacement amount and the first relative position.
2. The encoder according to claim 1, wherein the processor calculates the second relative position by adding to the first relative position a difference between the relative displacement amount between the scale and the detector when the calculation of the relative position starts and the relative displacement amount between the scale and the detector after the first relative position is calculated.
3. The encoder according to claim 1, further comprising a phase calculator configured to calculate a phase of each of the first signal and the second signal.
4. The encoder according to claim 3, further comprising a storage unit configured to store a phase calculated by the phase calculator.
5. The encoder according to claim 3, further comprising a speed calculator configured to calculate a relative moving speed between the scale and the detector based on the phase calculated by the phase calculator.
6. The encoder according to claim 1, wherein of the first detecting state and the second detecting state, a detecting state which is finally set in the second process is the same as that set in the first process.
7. The encoder according to claim 1, wherein the processor sets the first detecting state at an end of the second process.
8. The encoder according to claim 1, wherein the processor sets the first detecting state at an outset and at an end of the second process.
9. The encoder according to claim 1, wherein the processor, in the second process, calculates a relative moving speed between the scale and the detector by sampling the first signal and the second signal at a plurality of times, and calculates a phase of each of the first signal and the second signal, and calculates the first relative position based on the phase corrected with the relative moving speed and the times.
10. An apparatus comprising a movable member and an encoder configured to detect a position of the movable member, wherein the encoder includes: a scale that has a first periodic pattern and a second periodic pattern that has a period longer than that of the first periodic pattern; a detector movable relative to the scale, and switchable, by changing a combination in a plurality of read element, between a first detecting state in which the detector reads the first periodic pattern and outputs a first signal having a changing period that depends on the first periodic pattern, and a second detecting state in which the detector reads the second periodic pattern and outputs a second signal having a changing period that depends on the second periodic pattern; and a processor configured to execute a first process for calculating a relative displacement amount between the scale and the detector by using one of the first signal and the second signal obtained from the detector that is set to one of the first detecting state and the second detecting state, and a second process for calculating a relative position of one of the scale and the detector relative to the other of the scale and the detector by using both of the first signal and the second signal obtained from the detector that is set to each of the first detecting state and the second detecting state, wherein the processor executes the second process while the processor executes the first process, the processor calculating a first relative position of the one to the other when the second process for calculating the relative position starts, and then calculating a second relative position of the one to the other based on the relative displacement amount and the first relative position.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
DESCRIPTION OF THE EMBODIMENTS
(12) Referring now to the accompanying drawings, a detailed description will be given of embodiments according to the present invention. In each figure, corresponding elements will be designated by the same reference numerals, and a duplicate description thereof will be omitted.
First Embodiment
(13)
(14) In this embodiment, in an apparatus mounted with this encoder, the scale 10 is attached to an unillustrated movable member as an object of the relative position to be detected, and the sensor 20 is attached to a fixed or immovable member. Alternatively, the sensor 20 may be attached to the movable member and the scale 10 may be attached to the fixed member, and the relative position of the movable member relative to the fixed member may be detected. While this embodiment discusses a linear type encoder, a rotary type encoder may be configured similar to this embodiment.
(15)
(16) The first pitch P11 is set to about as long as the second pitch P2 (or the second pattern 12 has a period longer than that of the first pitch 11). An overall length of a range (referred to as a overall pattern length) on the scale 10 in which the first and second patterns 11 and 12 are provided in the longitudinal direction contains 79 periods of the first pattern 11 and 20 periods of the second pattern 12.
(17) The sensor 20 includes a light source 21 and a light receiver 22. The light source 21 includes a light emitting element, such as an LED, and the light receiver includes a plurality of photoelectric conversion elements (light receiving elements) configured to photoelectrically convert light emitted from the light source 21 and reflected by the reflecting parts in the first and second patterns 11 and 12. The sensor 20 can read the first and second patterns 11 and 12 based on a detecting period switching signal from the position detector 30.
(18) Next follows a description of switching of the detecting period. The sensor 20 can switch the detecting period of the light receiver 22 according to the detecting period switching signal from the position detector 30 between a first detecting period P0 that coincides with the first pitch P1 and a second detecting period 4.Math.P0 that coincides with the second pitch P2. The first detecting pitch P0 and the second detecting pitch 4.Math.P0 may have substantially the same values as those of the first and second pitches P1 and P2.
(19)
(20) As illustrated in
(21) The position detector 30 includes an A/D converter 31, a phase detector (phase calculator) 32, and a displacement amount detector 33. The A/D converter samples the first and second two-phase signals as analogue signals output from the sensor 20 and converts them into digital signals. The phase detector 32 discretely detects the phases of the first and second two-phase signals in a time direction. The displacement amount detector 33 accumulates a difference between the two continuous phases detected by the phase detector 32, and detects a displacement amount.
(22) The general controller 40 controls switching of the detecting period of the sensor 20 (an output of the detecting period switching signal from the position detector 30) and a position detection process of the position detector when a position detecting request signal is input from the system of the apparatus. The general controller 40 outputs information of the relative position of the movable member to the fixed member generated by the position detector 30 to the apparatus. The general controller 40 outputs a synchronizing signal for acquiring the first and second two-phase signals output from the sensor 20, to the position detector 30.
(23) A description will now be given of the position detecting process performed by the position detector 30. The position detecting process is divided into a first process and a second process. The first process and the second process are executed in parallel. The first process detects (calculates) the relative displacement amount between the scale 10 and the sensor 20 by using one of the first and second two-phase signals taken from the light receiver 22 in which the detecting period is set to one detecting period. The second process detects (calculates) a first position of one of the scale 10 and the sensor 20 relative to the other of the scale 10 and the sensor 20 by using both of the first and second two-phase signals taken from the light receiver 22 in which the detecting period is set to each of the first and second detecting periods. Moreover, the second process detects (calculates) a second position of one of the scale 10 and the sensor 20 relative to the other of the scale 10 and the sensor 20 by using the first relative position and the relative displacement amount. The second process according to this embodiment calculates the relative position of the scale 10 to the sensor 20.
(24) Referring now to
(25) In the step S101, the detecting period in the light receiver 22 is set to the detecting period finally set in the second process. In this embodiment, the detecting process in the light receiver 22 is set to the first detecting period P0. In other words, the first process reads the first patter 11 (or generates the first two-phase signal), but does not read the second pattern (or generate the second two-phase signal). In addition, after the detecting period in the sensor 20 is switched, a relatively long time is necessary to obtain the stable two-phase signal from the light receiver 22. The first process can be smoothly executed by maintaining the detecting period in the light receiver 22 after the second process.
(26) In the step S102, the A/D converter 31 samples the first two-phase signal acquired from the sensor 20 discretely in the time direction, and outputs an acquired digital signal to the phase detector 32.
(27) In the step S103, the phase detector 32 calculates the phase by calculating the arc tangent of the digital signal acquired from the A/D converter 31 according to the sampling of the A/D converter 31. Since the two-phase signals include a sine wave signal and a cosine wave signal, the phase can be obtained by the arc tangent calculation. The calculated phase is output to the displacement amount detector 33. In the following description, an i-th detected phase will be expressed as _i (0_i2 [rad]).
(28) In the step S104, the displacement amount detector 33 calculates the relative displacement amount between the scale 10 and the sensor 20 by using the phase acquired from the phase detector 32. Where the detecting period in the light receiver 22 is the first detecting period P0, the phase changes relative to the relative displacement amount P0 with a ratio of 2n when a relative displacement occurs in the longitudinal direction. Therefore, the relative displacement amount can be calculated by accumulating the phase changing amount.
(29) However, the phase does not continuously change and increases or decreases by 2, where the phase changes in a decreasing direction from 0 and where the phase changes in an increasing direction exceeding 2. Accordingly, a relative displacement amount x_i is calculated with the following expression (1) based on this fact, where x_0=0, and _0=0.
(30)
(31) Next follows a description of the second process.
(32) Accordingly, this embodiment executes the second process while the first process is executed.
(33) In the step S201, the general controller 40 stands by until a reference phase is settled when a synchronizing signal is generated just before the general controller 40 acquires the position detecting request signal when the position detecting request signal is input from the system in the apparatus. After the reference phase is settled, the general controller 40 instructs the position detector 30 to output the detecting state switching signal to the sensor 20. The detecting period in the light receiver 22 is switched to the first detecting period P0 according to the detecting state switching signal. Thereby, the sensor 20 outputs the first two-phase signal corresponding to the first pattern 11.
(34) In the step S202, the A/D converter 31 samples the first two-phase signal. After the first two-phase signal is sampled, the detecting period in the light receiver 22 is switched to the second detecting period 4.Math.P0. Thereby, the sensor 20 outputs the second two-phase signal corresponding to the second pattern 12. The A/D converter 31 samples the second two-phase signal. After the second two-phase signal is sampled, the detecting period in the light receiver 22 is switched to the first detecting period P0. Thereby, the sensor 20 outputs the first two-phase signal corresponding to the first pattern 11. The A/D converter 31 samples the first two-phase signal.
(35) Thus, this embodiment performs sampling three times in order of the first two-phase signal, the second two-phase signal, and the first two-phase signal. The A/D converter 31 outputs the three sets of two-phase signals converted into the digital signals to the phase detector 32. The two-phase signal is sampled at regular intervals. In the following description, the initial first two-phase signal is sampled at time 0, the next second two-phase signal is sampled at time t, and the final first two-phase signal is sampled at time 2t.
(36) In the step S203, the phase detector 32 calculates the phase of each set of two-phase signals by the arc tangent calculation to the three sets of two-phase signals. Since the two-phase signals include the sine wave signal and the cosine wave signal, the phase is calculated by the arc tangent calculation. In the following description, a phase of the initial first two-phase signal will be referred to as .sub.P1.sub._.sub.1, a phase of the second two-phase signal will be referred to as .sub.P2, and a phase of the final first two-phase signal will be referred to as .sub.P1.sub._.sub.2. The phase is expressed by a range from 0 inclusive to 2 non-inclusive, and uniquely determined in one pitch (period or cycle). Thus, the phase represents a position in one pitch.
(37) In the step S204, as illustrated in
(38) In the step S205, the displacement amount detector 33 calculates the first relative position. The displacement amount detector 33 calculates the relative displacement amount in the first process in parallel to the calculation of the first relative position.
(39) In the step S206, the displacement detector 33 calculates the second relative position by adding the relative displacement amount when the first relative position is settled, to the first relative position calculated in the step S205.
(40) This embodiment executes the second process while the first process is executed, and can highly accurately calculate the relative position.
(41) A description will now be given of a concrete calculating method of the relative position. Since the three phases .sub.P1.sub._.sub.1, .sub.P2, and .sub.P1.sub._.sub.2 are sampled at different times, where the scale 10 and the sensor 20 move relative to each other, the three phases correspond to positions that are different from one another. Accordingly, this embodiment calculates a position at the time 2t as the relative position.
(42) Both of the phases .sub.P1.sub._.sub.1 and .sub.P1.sub._.sub.2 are phases of the first two-phase signals corresponding to the first pattern 11, and have the sampling times of 0 and 2t. Thus, the relative moving speed between the scale 10 and the sensor 20 can be estimated based on the change amounts of the phases .sub.P1.sub._.sub.1 and .sub.P1.sub._.sub.2 and the time variation amounts. Where u is the relative moving speed, u is calculated by the following expression (2).
(43)
(44) Since the sampling time of the phase .sub.P2 is t, where .sub.P2.sub._.sub.2 is the phase of the second two-phase signal corresponding to the second pattern 12 at time 2t, the phase .sub.P2-2 can be calculated by adding the change amount for a time period t with the relative moving speed u to the phase .sub.P2 as in the following expression (3).
(45)
(46) The relative position is calculated with the thus obtained two phases .sub.P1.sub._.sub.1 and .sub.P1.sub._.sub.2 at time 2t.
(47) Initially, the phases of 80 periods is generated by quadrupling the phase .sub.P2.sub._.sub.2 of the second two-phase signal corresponding to the second pattern 12 with 20 periods in the overall pattern length. Then, when a difference (phase difference) between the phase with the 80 periods and the phase .sub.P1.sub._.sub.2 in the two-phase signal corresponding to the first pattern 11 with 79 periods in the overall pattern length is calculated, the phase difference is one period in the overall pattern length. One period in the overall pattern length expresses the relative position. Accordingly, .sub.v1 as this phase difference can be expressed by the following expression (4), where MOD(x, y) is a residue, x is a dividend, and y is a divisor.
.sub.V1=MOD(4.Math..sub.P2.sub._.sub.2.sub.P1.sub._.sub.2,2)(4)
(48) While the phase difference .sub.v1 denotes the relative position, use of the phases .sub.P1.sub._.sub.1 and .sub.P1.sub._.sub.2 provides a higher accuracy in one period than use of the phase difference .sub.v1. Accordingly, a relative position calculated with the phase difference .sub.v1 and the phases .sub.P1.sub._.sub.2, and .sub.P2.sub._.sub.2 is more accurate than a relative position calculated with the phase difference .sub.v1.
(49) Since the second pattern 12 contains 20 periods in the overall pattern length, the phase .sub.P2.sub._.sub.2 changes 20 times from 0 to 2 in the overall pattern length. On the other hand, since the phase difference .sub.v1 changes once from 0 to 2 in the overall pattern length, a phase change amount per unit change amount is 1/20 as long as the phase .sub.P2.sub._.sub.2. Accordingly, the number of periods is calculated for the phase .sub.P2.sub._.sub.2 from the predetermined reference position based on the phase difference .sub.v1 and the phase .sub.P2.sub._.sub.2, and the relative position is calculated with the accuracy of the phase .sub.P2.sub._.sub.2.
(50) Where m1 is the number of periods of the phase .sub.P2.sub._.sub.2, a relationship among the phase difference .sub.v1, the phase .sub.P2.sub._.sub.2, and the number of periods m1 is expressed as illustrated in
(51) Moreover, .sub.1 as a relative position calculated with the accuracy of the phase .sub.P2.sub._.sub.2 can be expressed by the following expressions (5) and (6) by using the number of periods m1 and the phase .sub.P2.sub._.sub.2, where ROUND(x) is rounding x into an integer value.
(52)
(53) Next, the first relative position .sub.2 is similarly calculated with the accuracy of the phase .sub.P2 based on the calculated relative position .sub.1 and the phase .sub.P1.sub._.sub.2. At this time, since the overall pattern length contains 79 periods of the first pattern 11, the phase .sub.2 is expressed by the following expressions (7) and (8) where m.sub.2 is the number of periods of the phase .sub.P1.sub._.sub.2.
(54)
(55) The displacement amount detector 33 calculates the second relative position .sub.3 based on the first relative position .sub.2 and the phase .sub.P1.sub._.sub.3 calculated in the first process and the following expressions (9) and (10). The phase .sub.P1.sub._.sub.3 corresponds to an m.sub.3-th period.
(56)
(57) The displacement amount detector 33 outputs the thus calculated second relative position .sub.3 to the general controller 40. The general controller 40 outputs information of the second relative position .sub.3 to the system in the apparatus. Thus, the second process ends. Thereafter, the relative position of the movable member is continuously calculated by accumulating the relative displacement amount in the first process on the basis of the second relative position .sub.3 calculated in the second process.
(58) As described above, this embodiment calculates the relative displacement amount in the first process and the relative position in the second process in parallel, and can highly precisely calculate the relative position, even where the calculating time period of the relative position is longer than the predetermined time period.
(59) This embodiment discusses the information of the relative position in the movable member output to the system in the apparatus, but this is unnecessary where the encoder outputs the position for each constant time period.
(60) While this embodiment discusses an optical encoder using reflected light from a periodic pattern in which the reflecting part and the nonreflecting part are alternately provided, this embodiment is applicable to an optical encoder using transmitting light from a periodic pattern in which a transmitting part and a non-transmitting part are alternately provided.
(61) This embodiment discusses the encoder using two periodic patterns having periods (pitches) different from each other, but may provide three or more periodic patterns having different periods as illustrated in FIG. 2C. P1, P2, and P3 illustrate three periodic patterns having periods different from one another. A position detecting error may be relaxed or a position detecting length range may be extended by increasing the periodic pattern. In this case, a two-phase signal having the shortest period among three two-phase signals corresponding to three periodic patterns is set to the first two-phase signal, and all of the two other two-phase signals are set to the second two-phase signal. The two-phase signal having the longest period among three or more two-phase signals corresponding to the three or more periodic patterns is set to the second two-phase signal, and all of the two other two-phase signals are set to the second two-phase signal.
(62) In this embodiment, the position detector 30 includes the A/D converter 31, but where another member, such as the sensor 20, has the A/D converter, the position detector 30 may include the A/D converter 31.
(63) This embodiment sets the detecting period in the light receiver 22 to the first detecting period P0 at the end of the second process, but may set the second detecting period 4.Math.P0. In this case, in the first process, the detecting period in the light receiver 22 is set to the second detecting period 4.Math.P0. After the second process, the detecting period in the light receiver 22 is maintained and the first process can be smoothly executed.
(64) The position detector 30 may include at least one of the speed detector (speed calculator) 34 and the phase storage unit 35, as illustrated in
Second Embodiment
(65) This embodiment discusses the second process different from that in the first embodiment. The first embodiment initializes the displacement amount detector 33 before the relative position is calculated, but this embodiment stores the relative displacement amount when the displacement amount detector 33 starts calculating the relative position. The first process in this embodiment is similar to that in the first embodiment and a description thereof will be omitted. This embodiment discusses only the second process.
(66)
(67) Since the steps S2001 to S2003 are the same as the steps S201 to S203 in
(68) In the step S2004, the displacement amount detector 33 stores a relative displacement amount when a calculation of the first relative position starts.
(69) In the step S2005, the displacement amount detector 33 calculates the first relative position. The displacement amount detector 33 calculates the relative displacement amount in the first process in parallel to a calculation of the first relative position.
(70) In the step S2006, the displacement amount detector 33 calculates a difference between the relative displacement amount stored in the step S2004 and a relative displacement amount when the first relative position is settled.
(71) In the step S2007, the displacement amount detector 33 calculates a second relative position by adding the difference value calculated in the step S2006 to the first relative position calculated in the step S2005.
(72) This embodiment can highly accurately calculate the relative position by executing the second process while executing the first process.
Third Embodiment
(73)
(74) In
(75) An imaging optical system 51 is housed in the lens barrel. The imaging optical system 51 includes a movable lens 52 (such as a magnification varying lens and a focus lens) that is movable in the optical axis direction by a cam formed the cam ring 50, as the cam ring 50 is rotated.
(76) A CPU 55 controls the entire system in the imaging apparatus. An image sensor 56 includes a photoelectric conversion element, such as a CCD sensor and a CMOS sensor, and photoelectrically converts an object image formed by an imaging optical system 51.
(77) As the cam ring 50 is rotated so as to move the movable lens 52, the encoder detects the absolute rotation position of the cam ring 50 (or the absolute position of the movable lens 52 in the optical axis direction), and outputs its information to the CPU 55.
(78) The CPU 55 drives an actuator configured to rotate the cam ring 50 based on the absolute position information, and moves the movable lens 52 to a target position.
(79) The encoder according to this embodiment is applicable to a variety of apparatuses, so as to detect a position of a printer head and a paper supply roller in a printer (optical apparatus), to detect a rotary position in a photosensitive drum in a copier (optical apparatus), and to detect a position of a robot arm, as well as the above imaging apparatus.
Other Embodiments
(80) Embodiment(s) of the present invention can also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as a non-transitory computer-readable storage medium) to perform the functions of one or more of the above-described embodiment(s) and/or that includes one or more circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiment(s), and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). The computer may comprise one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)), a flash memory device, a memory card, and the like.
(81) The present invention can provide an encoder that can accurately calculate a relative position irrespective of a calculating time period.
(82) While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
(83) This application claims the benefit of Japanese Patent Application No. 2016-167775, filed on Aug. 30, 2016, which is hereby incorporated by reference herein in its entirety.