Abstract:
An absolute position encoder for detecting the position of a moving object includes a coding part attached to the moving object which receives sinusoidal and cosinusoidal signals through channels. Each channel receiving signals having a different number of cycles from the other channels per unit of movement of the object. The signals received by each channel are converted to digital form by an analog to digital (AD) converter and stored in a ROM. Discrepancies between the sinusoidal and cosinusoidal phase are corrected digitally by comparing the digital results of the channels, adjusting the data from higher-order channels to conform to that of adjacent lower-order channels, and finally combining the data for each channel to obtain the absolute position of the moving object.

Description:
BACKGROUND OF THE INVENTION 
     Field of the Invention 
     This invention relates to an absolute position encoder and, more particularly, to an absolute position encoder capable of detecting, as an absolute position, the rotational position of a rotary shaft of a motor or the like which drives a machine tool, etc. 
     Description of the Related Art 
     In general, an absolute position encoder has a rotary coding disk fixed to a rotary shaft and a plurality of slit arrays (channels) in accordance with binary notation or Gray binary notation provided in conformity with the resolution desired, and the rotational position of the rotary coding disk is detected as an absolute position by detecting, by means of a light-receiving element (photoelectric transducer element) an amount of light from a light-emitting element that has passed through each channel formed in the rotary coding disk and a stationary slit opposing each channel. 
     In order to increase detecting precision (resolution), it is necessary to increase the number of channels. For example, in order to detect angular information in which one revolution is divided into 4096, i.e., 2 12 , parts, it is required that the number of channels be 12 (a 12-bit code is necessary), thus necessitating a coding disk of a correspondingly large size. 
     In order to avoid this problem, it has been considered to provide the rotary coding disk with sinusoidal patterns in a plurality of channels so as to obtain a plurality of sinusoidal outputs having different cycles per revolution (e.g., a pattern through which one cycle of a sinusoidal output is obtained per revolution is provided as a first channel, a pattern through which 16 cycles of a sinusoidal output is obtained per revolution is provided as a second channel, and a pattern through which 256 cycles of a sinusoidal output is obtained per revolution is provided as a third channel), interpolate the angular information in one wavelength of each channel 16 items at a time, and successively combine the interpolated data of each channel thus obtained, whereby the rotational position of the coding disk is detected as an absolute position. 
     In such a case, the number of channels for obtaining the same resolution is smaller than that needed in a case where the channels are formed in accordance with the above-mentioned binary methods (e.g., in order to perform detection by dividing one revolution into 2 12  parts, three channels will suffice, as set forth above), thereby making it possible to reduce the size of the rotary coding disk. 
     FIG. 2 exemplifies an absolute position encoder adapted to detect the angular information of such a rotary coding disk, in which the rotary disk used has plural channels of sinusoidal patterns the numbers of cycles whereof differ. FIG. 2 illustrates a case in which, in addition to the above-mentioned first, second and third channels (represented by 1λ, 16λ and 256λ, respectively), there is provided a fourth channel (represented by 4096λ, by which a sinusoidal output of 4096 cycles is obtained), wherein the inputs are sinusoidal signals 1λ sin, 16λsin, 256λsin and 4096λsin from the respective channels and cosinusoidal signals 1λcos, 16λcos, 256λcos and 4096λcos having an electrical phase difference of 90° relative to respective ones of the sinusoidal signals. By way of example, the cosinusoidal signals are obtained by using a light-receiving element to detect and photo electrically convert light which has passed through a stationary slit electrically displaced by 90° from the stationary slit for the sinusoidal signals. 
     Numerals 11 through 14 denote amplifiers for amplifying respective ones of the sinusoidal signals 1λsin through 4096λsin, 21 through 24 analog switches for channel selection connected to the output sides of respective ones of the amplifiers 11 through 14, 16 through 19 amplifiers for amplifying the cosinusoidal signals 1λcos through 4096λcos, and 26 through 29 analog switches for channel selection connected to the output sides of respective ones of the amplifiers 16 through 19. 
     Assume now with regard to detecting information relating to the angle of the rotary coding disk that switches 21 and 26 are turned on. In such case, after the sinusoidal signal 4096λsin and cosinusoidal signal 4096λcos from the signal detectors (the corresponding light receiving elements) are amplified by the corresponding amplifiers 11, 16, the amplified signals pass through the switches 21, 26 and enter AD (analog to digital) converters 31, 32, respectively. Each of the AD converters 31, 32 converts its input into digital data of a prescribed number of bits in conformity with the required resolution and supplies this digital data (so-called sine data X s  and cosine data X c ) to a ROM 41 as address inputs (e.g., row-and column address inputs). Values obtained by multiplying tan -1  (Xs/Xc) by a suitable constant are converted into binary numbers stored in the ROM 41 in accordance with designated addresses where an address is designated by the sine data X s  and cosine data X c . 
     More specifically, assume that the input sinusoidal signal 4096λsin is 0.5V and that the cosinusoidal signal 4096λcos is also 0.5V. In such case, these signals are each converted into a prescribed digital quantity, e.g., &#34;0100&#34; by the respective AD converters 31, 32 (i.e., the sine data X s  and cosine data X c  inputted to the ROM 4 are assumed to be &#34;0100&#34;). Accordingly, if such sine data and cosine data are entered as the address signals, the data in the ROM stored at the corresponding address will be a value (=1/8) converted into a binary number having a suitable number of bits, e.g., a 10-bit binary number &#34;0010000000&#34;, the value (1/8) being obtained by multiplying tan -1  =45° by 1/36, which serves as a constant. From among this 10-bit stored data, the four higher-order bits, for example, namely &#34;0010&#34;, are read out and latched in a latch circuit 51. In this case, angular information in one wavelength regarding the corresponding channel (i.e., 4096λ) is extracted as interpolated data divided into 16 parts. 
     Next, the channel selection switches are changed over from 21, 26 to 22, 27, the sinusoidal signal 256λsin and cosinusoidal signal 256λcos which enter at this time are similarly converted into digital data by the AD converters 31, 32, the sine data and cosine data thus obtained are used as address signals for the ROM 41 to again read out 10-bit data corresponding to the address in the manner set forth above, and the data consisting of the four higher-order bits is latched in a latch circuit 52. 
     Thereafter, and in similar fashion, the channel selection switches are successively changed over to 23, 28 and then to 24, 29, the sine data and cosine data obtained by AD-converting the entering signals 16sin, 16λcos and then 1λsin, 1λcos are successively used as address signals of the ROM 41 to read out the ROM data corresponding to these addresses, and the four higher-order bits of the read data are successively latched in latch circuits 53, 54. 
     Thus, the channels (four channels in this case) are successively changed over, and ROM data read out using the two-phase input signals (the sinusoidal and cosinusoidal signals) of each channel as the prescribed address data is successively latched in the latch circuits. By combining the data in the latch circuits 51-54, information indicative of the angle of the rotary coding disk can be detected with 16-bit data using the data (the data on the higher-order bit side) latched in the latch circuit 54 to the data ((the data on the lower-order bit side) latched in the latch circuit 51. In this case, the absolute position of the disk can be detected, with the number of divisions per revolution being 2 16  (i.e., a resolution of 2 16  revolution). 
     FIG. 3 is a view for describing the absolute position data obtained by the foregoing operation. Let A 4  represent a hexadecimal numeric value of the four higher-order bits of interpolated data D 4  in the least significant channel (4096λ channel), A 3  a hexadecimal numeric value of the four higher-order bits of interpolated data D 3  in the 256λ channel, A 2  a hexadecimal numeric value of the four higher-order bits of interpolated data D 2  in the 16λ channel, and A 1  a hexadecimal numeric value of interpolated data D 1  in the most significant channel (1λ channel). In such case, the absolute position data is as follows, expressed in hexadecimal notation: 
     
         A.sub.1 ·16.sup.-1 +A.sub.2 ·16.sup.-2 +A.sub.3 ·16.sup.-3 +A.sub.4 ·16.sup.-4 
    
     It should be noted that if a hexadecimal numeric value A i  (i=1-4) is expressed as follows using binary notation: 
     
         A.sub.i =a.sub.i3 ·2.sup.3 +a.sub.i2 ·2.sup.2 +a.sub.i1 ·2.sup.1 +a.sub.i0 
    
     then the absolute position data may written as follows: ##EQU1## 
     Ideally, the sinusoidal signals 1λsin, 16λsin, 256λsin and 4096λsin in the respective channels are required to cross the zero simultaneously at predetermined point in the rotated period, as shown in FIG. 4 (in which only 256λsin and 4096λsin are illustrated). More specifically, (i) with regard to two mutually adjacent channels, sinusoidal signals of the higher-order channel and lower-order channel are required to cross zero simultaneously every 16 cycles of the lower-order channel, and (ii) it is required that the sinusoidal signal and cosinusoidal signal of each channel possess an accurate phase difference of 90° in terms of the electric angle. 
     However, (i) and (ii) cannot reliably be satisfied at the outset owing to errors in forming the sinusoidal pattern in each channel. That is, as shown in FIG. 5, a phase error P E  resides between the zero cross points of the sinusoidal or cosinusoidal signals of mutually adjacent channels, and the phase between sinusoidal and cosinusoidal signals cannot be made exactly 90°. 
     Consequently, the conventional practice is to provide means for adjusting, in analog fashion, the phases of the sinusoidal signal and cosinusoidal signal, which are the outputs of the light-emitting elements, use the adjusting means, while observing the sinusoidal signal of each channel using a synchroscope or the like, to effect an adjustment in such a manner that the zero-crossing point of the higher-order channel (the longer period) is made to coincide with the zero-crossing point of the adjacent lower order channel (the shorter period side) at a predetermined point in the rotation period, then similarly advance the phase of the cosinusoidal signal on the longer period to be 90° ahead of the sinusoidal signal, and thereafter perform adjustment in such a manner that the zero-crossing points of the cosinusoidal signals of the mutually adjacent channels coincide. 
     However, the analog adjustment is troublesome. Moreover, adjustment errors occur, as a result of which absolute position cannot be detected accurately. 
     SUMMARY OF THE INVENTION 
     Accordingly, an object of the present invention is to provide an absolute position encoder in which phase can be adjusted digitally, automatically and which reduces adjustment error to. 
     DISCLOSURE OF THE INVENTION 
     The present invention provides an absolute position encoder in which sinusoidal and cosinusoidal signals are output in each of a plurality of channels having a numbers of cycles that differ from one another, a prescribed number of items of position information are interpolated in one wavelength of each channel, and m higher-order bits of the interpolated data in each channel are combined to output an absolute position of a rotary coding disk. 
     In the present invention, corrective data is obtained which will reduce, below a predetermined value, a difference between higher-order n-bit data in the interpolated data in a lower-order channel having a large number of cycles and lower-order n-bit data in the interpolated data in the adjacent higher-order channel having a small number of cycles. The interpolated data of the adjacent higher-order channel is corrected by the corrective data, and the m higher-order bits of the interpolated data of each channel after correction are combined to detect absolute position. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a block diagram showing the principal portions of an absolute position encoder according to the present invention; 
     FIG. 2 is a block diagram for describing the principle of absolute position detection performed by an absolute position encoder; 
     FIG. 3 is a view for describing the structure of absolute position data; and 
     FIGS. 4 and 5 are views for describing the background of the present invention. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Described first will be the general features of an angle data correction method used in the absolute position encoder of the present invention. 
     (i) If the zero-crossing points of the sinusoidal signals of two mutually adjacent channels coincide every predetermined number of cycles (e.g., every 16 cycles) of the lower order channel signal and (ii) the phases of the sinusoidal signal and cosinusoidal signal of the same channel are accurately displaced from each other by 90°, then the following will hold with regard to the interpolated data D1-D4 (see FIG. 3) of the respective channels read out of the ROM 41 (FIG. 2): 
     &#34;Six-bit data B i  starting from the (m+1)th bit (fifth bit) of the higher-order channel of two mutually adjacent channels and higher-order six-bit data A i+1  &#39; (i =1, 2, 3) of the lower-order channel will coincide.&#34; 
     In other words, the larger the phase shift of between (i) and (ii), the larger will be the absolute value of the difference between the data B i  and A i+1  &#39;. 
     In accordance with the present invention, therefore, 
     (a) an initial value C i  of corrective data is set at zero, and a difference ΔC i  is computed, at predetermined sampling times, between data B i  in interpolated data D i  of the higher-order channel and data B i+1  &#39; in interpolated data D i+1  of the lower-order channel; 
     (b) C i  +ΔC i  is used as new corrective data (C i  +ΔC i  →C i ) if the absolute value of the difference is greater than a set value; 
     (c) the interpolated data D i  of the higher-order channel at the next sampling time is corrected (D i  +C i  →D i ) using the corrective data C i , and similar processing is subsequently executed to obtain corrective data which will make the absolute value of the difference ΔC i  less than a predetermined value; 
     (d) corrective data is similarly obtained for all mutually adjacent channels; and 
     (e) in detecting the absolute position of a rotary shaft, the interpolated data D i  is corrected by the corrective data C i  and the four higher-order bits of the interpolated data of the respective channels after correction is combined to generate and output data indicative of the absolute position of the rotary shaft. 
     FIG. 1 is a block diagram showing the principal portions of an absolute position encoder according to the present invention. 
     Numeral 1 denotes a ROM in which the interpolated data of each channel is stored. This ROM 1 has the same construction as that of ROM 41 shown in FIG. 2 and has the same stored contents. Numerals 2a-2b denote interpolated data memory units which store, at predetermined sampling times, the interpolated data (assumed to be 10-bit data) D 4 , D 3 , D 2 , D 1  of the 1λ through 4096λ channels read out of the ROM 1. For the details of the interpolated data D i  of each channel, see FIG. 3. 
     Numerals 3a-3c denote angle data correction units which, based on the corrective data C i  between mutually adjacent channels, corrects the interpolated data D i  of the higher-order channel in accordance with the following equation: 
     
         D.sub.i +C.sub.i →D.sub.i &#39;. . .                    (1) 
    
     Numeral 4 denotes an angle data changeover unit for changing over and outputting the two items of interpolated data D i  &#39;, D i+1  &#39; of predetermined mutually adjacent channels when the corrective data C i  between each of the mutually adjacent channels is obtained. Numeral 5a designates a higher-order six-bit output unit for outputting higher-order six-bit data A i+1  &#39; of the interpolated data D i+1  &#39; of the lower-order channel, and 5b designates a lower-order six-bit output unit for outputting lower-order six-bit data B i  of the interpolated data D i  &#39; of the upper-order channel. Numeral 6 denotes a subtracting arithmetic unit for calculating the difference ΔC i  between data A i+1  &#39; and B i  in accordance with the following equation: 
     
         A.sub.i+1 &#39;-B.sub.i →ΔC.sub.i. . .            (2) 
    
     Numeral 7 represents an error monitoring unit for checking to see whether the absolute value |ΔC i  | of the difference ΔC i  is less than a set value, 8 a corrective data arithmetic unit, and 9 a corrective data memory unit. The corrective data memory unit 8 updates the corrective data C i  between the mutually adjacent channels in accordance with the following equation: 
     
         C.sub.i +ΔC.sub.i →C.sub.i . . .              (3) 
    
     and stores the updated data in the corrective data memory unit 9. Numeral 10 denotes an absolute position data output unit for combining the higher-order four bits A 1  -A 4  of the interpolated data D 1  &#39;-D 4  &#39; of respective channels, and for outputting 16-bit binary absolute position data. 
     The overall operation of FIG. 1 will now be described. 
     (a) Corrective data decision processing 
     During corrective data decision processing, the initial values of the corrective data C 3 , C 2 , C 1  between all of the mutually adjacent channels are set to zero and decisions are made successively starting from the corrective data C 3  of the adjacent channel on the side of the least significant channel. The interpolated data D 1 , D 2 , D 3 , D 4  of the respective channels is read out of the ROM 1 every predetermined sampling time and stored in the memory units 2a-2d, just as in the conventional method of FIG. 2. 
     (a) First, on the assumption that the lower-order channel is the 4096λ channel and the higher-order channel is the 256λ channel, the corrective operation of Eq. (1) is applied to the interpolated data D 3  of the higher-order channel at the predetermined sampling time to generate interpolated data D 3  &#39;. It should be noted that D 4  is regarded as being D 4  &#39; without a correction being applied to the interpolated data D 4  of the least significant channel. 
     (b) Next, the angle data changeover unit 4 selects the interpolated data D 4  &#39;, D 3  &#39; of the lower- and higher-order channels after correction and outputs these data to the higher-order six-bit output unit 5a and lower-order six-bit output unit 6a, respectively. 
     (c) The higher-order six-bit output unit 5a outputs higher-order six-bit data A 4  &#39; of the interpolated data D 4  &#39; of the lower-order channel, and the lower-order six-bit output unit 5b outputs lower order six-bit data B 3  &#39; of the interpolated data D 3  &#39; of the higher-order channel. 
     (d) The difference arithmetic unit 6 calculates the difference ΔC 3  between the data A 4  &#39; and data B 3  in accordance with Eq. (2) and inputs the difference to the error monitoring unit 7 and corrective data arithmetic unit 8. 
     (e) The error monitoring unit 7 checks to determine whether the absolute value of the difference C 3  is less that the set value, and applies a corrective data update command REN to the corrective data arithmetic unit 8. 
     (f) When the corrective data update command REN is generated, the corrective data arithmetic unit adopts C 3  +ΔC 3  as new corrective data (C 3  +ΔC 3  →C 3 ) in accordance with Eq. (3) and stores the new corrective data in the corrective data memory unit 9. 
     Thereafter, when the next sampling time arrives, processing from the aforementioned step (a) is repeated. When the difference ΔC 3  falls below the set value, the corrective data update command REN is not generated and the processing for setting the corrective data C 3  is ended. 
     When the corrective data C 3  between the least significant channel and the channel adjacent thereto has been decided by the foregoing operation, the corrective data C 2  is subsequently decided using the interpolated data D 3 , D 2  in the same manner, the corrective data C 1  is similarly decided using the interpolated data D 2 , D 1 , and corrective data decision processing is terminated. 
     In the foregoing, the corrective data is decided by reading the interpolated data D 4  -D 1  of the respective channels out of the ROM every predetermined sampling time. However, an arrangement can be used in which the foregoing processing is executed to decide the corrective data without altering the interpolated data D 4  -D 1  of the respective channels at the predetermined times. 
     (b) Absolute position data output processing 
     In detecting the absolute position of the rotary shaft, the interpolated data D 1  -D 3  in the respective channels is corrected (D 4  is not corrected) by the corrective data C 1  -C 3  at the predetermined sampling times, and the interpolated data D 1  &#39;-D 4  &#39; of the respective channels is input to the absolute position data output unit 10. The latter combines the four higher-order bits of the interpolated data D 1  &#39;-D 4  &#39; on the respective channels just as in the prior-art method and outputs absolute position data expressed in the form of a 16-bit binary number. 
     In the foregoing, it is so arranged that the processing for deciding the corrective data C i  is terminated when |ΔC i  | falls below the set value in the error monitoring unit 7. It is also permissible to adopt the following arrangement: Specifically, it can be so arranged that the corrective data C i  is updated in accordance with Eq. (3) in a case where the absolute value |ΔC i  | of the difference is smaller than that which prevailed one sampling instant earlier, whereas if the absolute value is larger than that which prevailed one sampling instant earlier, this value |ΔC i  | one sampling earlier is regarded as being minimum and corrective data decision processing is terminated. Furthermore, even though the foregoing is a case where the present invention is applied to an optical sensor, it can be applied also to a magnetic sensor. 
     Further, even though the foregoing describes a rotary-type absolute position encoder, applying the present invention to a linear-type detector such as a linear scale will make it possible to similarly construct a more accurate linear-type absolute position encoder. 
     Thus, in accordance with the present invention, it is arranged to calculate the difference ΔC i  between higher-order six-bit data of interpolated data in a lower-order channel and six-bit data starting from a fifth bit of interpolated data in a higher-order channel, obtain corrective data C i  which will bring the difference below a predetermined value or minimize the corrective data, correct the interpolated data in the adjacent higher-order channel by the corrective data C i , and combine the four higher-order bits of the interpolated data of each channel after correction, thereby detecting the absolute position of a rotary shaft. As a result, phase can be adjusted digitally and automatically, and the phase adjustment can be performed so as to minimize adjustment error, thereby making possible high precise detection of absolute position.