fig1 shows a linear encoder in accordance with the first preferred embodiment of the invention , in which encoder 1 determines the linear displacement of object 3 , which moves linearly in a direction perpendicular to the plane of the drawing . encoder 1 includes scale 5 , which is rigidly attached to object 3 by attachment 7 so that pattern 9 on scale 5 , which will be described in detail below , is carefully aligned with the direction of motion of object 3 . it is also possible to hold the scale fixed and to attach the light source and detector to the object to encode , e . g ., movement along a railroad track . scale 5 is preferably made of glass , with transparent pattern 9 on an opaque background . pattern 9 is preferably formed on top of scale 5 . stationary light source 11 , which preferably outputs visible light , illuminates scale 5 from below . other modes of illumination , such as edge illumination , can be used instead . light transmitted through scale 5 is made incident on stationary microscope arrangement ( or other optical projecting arrangement ) 13 , which projects an image of a portion of pattern 9 onto camera head 15 . in camera head 15 , ccd array 17 detects the image of the scale as individual picture elements ( pixels ). signals corresponding to the individual pixels are output by ccd array 17 to analog / digital converter 19 , which digitizes the signals to produce digital data and outputs the digital data to image memory 21 . image processor 23 analyzes the digital data stored in image memory 21 to produce absolute translational information about object 3 . fig2 shows a portion of pattern 9 . as noted above , pattern 9 is carefully aligned with direction a of movement of the object . pattern 9 includes fiducials 31 , code areas 33 , column markers 35 and row markers 37 . the fiducials are identical across all encoded positions and are arranged in a manner which is strictly periodic in direction a of movement . in the present embodiment , each of the fiducials includes three bars 39 aligned to be perpendicular to direction a , although other forms can be used as needed . column markers 35 and row markers 37 are used to relate the image of pattern 9 to the coordinate system defined by pixels of the image sensing detector 17 of fig1 . between fiducials 31 and column markers 35 are code areas 33 , which are arrays of code bits 41 . each code area 33 uniquely identifies a corresponding one of fiducials 31 . code bits 41 in each code area 33 form a binary code . any binary code which is convenient can be employed . in the present embodiment , each code area 33 includes a 4 × 3 array of code bits 41 and thus provides a 12 - bit code with 4 , 096 possible values . a single period of another possible pattern , namely , pattern 109 , is shown in greater detail in fig3 . pattern 109 is formed at a resolution of 5 μm and thus may be considered to be made of square portions which measure 5 μm on a side . each fiducial 131 includes three bars 139 which are 5 μm in width and spaced with their centers 10 μm apart . column marker 135 and row marker 137 provide column and row definitions , respectively , for code area 133 . code area 133 is shown as being for a 15 - bit code and includes code bits for the 0th through 14th bits of the coding scheme ; for clarity , only code bits 141 - 0 through 141 - 3 and 141 - 12 through 141 - 14 are labeled in the figure . the period of pattern 109 is 80 μm . fig4 shows a single period of yet another possible pattern 209 . here , fiducial 231 includes single vertical bar 239 which is 10 μm wide . code area 233 allows for a 24 - bit code with code bits for the 0th through 23rd bits of the coding scheme ; for clarity , only code bits 241 - 0 and 241 - 23 are labeled in the figure . column marker 235 and row marker 237 provide column and row definitions . the period of pattern 209 is 80 μm . fig5 a - 5o show the encoding of different values in code area 33 of fig2 . in code area 33 , cameral pixels identifying bits having a binary value of one form a region such as regions 45a - 45l , 45n and 45o ; such a region is shown in the figures as shaded for ease of understanding . when the value to be encoded is zero , as shown in fig5 m , there is , of course , no such region . the table below gives the values : ______________________________________ value expressed in value expressed in fig . binary decimal______________________________________5a 0000 0110 0000 96 5b 1111 1001 1111 3 , 999 5c 0101 1010 0101 1 , 445 5d 1010 0101 1010 2 , 650 5e 0001 0000 0000 256 5f 1000 0000 0000 2 , 048 5g 0000 0000 1000 8 5h 0000 0000 0001 1 5i 1110 1111 1111 3 , 839 5j 0111 1111 1111 2 , 047 5k 1111 1111 0111 4 , 087 5l 1111 1111 1110 4 , 094 5m 0000 0000 0000 0 5n 1111 1111 1111 4 , 095 5o 0110 1100 0001 1 , 729______________________________________ fig6 a and 6b show images of pattern 9 formed on ccd array 17 at two times as the object moves . as shown in fig6 c , which shows a magnification of region 17a of fig6 b , ccd array 17 includes an array of photodetector elements 43 which resolve the images into pixels . the array of photodetector elements defines a fixed coordinate system . individual photodetector elements 43 range in size , depending on the specific ccd array used , from 7 μm to 25 μm . in one prototype built by the inventor , individual photodetector elements 43 measured 13 . 75 μm in the direction of motion of the scale by 16 μm in the perpendicular direction . ccd array 17 may be replaced by a charge injection device ( cid ) array . in a cid , the individual elements are addressable . a cid array offers the advantage of speed , while a ccd offers the advantage of accuracy ( less noise ). still another option is to use a ram chip without a casing so that light can reach the transistors of the ram chip . while such a ram chip can achieve a color depth of only one bit ( i . e ., no gray scale ), it provides extremely high speeds ( 10 khz - 1 mhz with no penalty ) and simplified circuitry for data analysis . the manner in which encoder 1 uses pattern 9 ( 109 , 209 ) to determine the position of the object will now be explained with reference to the flow chart of fig7 . once the image is formed on ccd array 17 ( step 51 ) and information is formed for individual pixels ( step 53 ), analog / digital converter 19 digitizes the pixel information from ccd array 17 and provides that information to memory 21 . the physical locations of photodetector elements 43 of ccd array 17 are fixed references for a stationary coordinate frame used to define the positions of pattern 9 shown in fig6 a and 6b . image processor 23 , which may be any appropriately programmed computer , derives the position information for the moving object in accordance with the relationship between the coordinate frame and the pixel locations using an operation which performs two main functions : ( 1 ) identifying the image of at least one fiducial on the detector by not only finding the pattern of the fiducial itself ( step 55 ) but also by decoding the image of the pattern of code bits associated with only that fiducial , guided by the pattern of markers for those code bits ( the markers are present and identical for every fiducial ) ( step 57 ); and ( 2 ) establishing the positional relationship of that image to the stationary , reference coordinate frame given simply by pixel array indices ( step 59 ). the location of the fiducial in relation to the stationary coordinate frame and the value encoded in the code area suffice to give the location of the object ( step 61 ). the purpose of step 59 is to determine the position of the image of the fiducial with respect to the pixel coordinate frame along the direction of motion and to thereby encode the motion . any number of computational operations can be used to perform this function , including edge detection , peak detection , derivative , etc . however , the preferred embodiment of the encoding system computes the one - dimensional centroid of the fiducial in the direction of motion in the fixed coordinate system . such an encoder can also perform incremental encoding by detecting only the fiducials , as is done by conventional incremental encoders . fig8 shows components of a rotary encoder in accordance with a second preferred embodiment of the invention . the rotary encoder of the second preferred embodiment is constructed like linear encoder 1 of the first preferred embodiment , except for differences which will now be noted . in rotary encoder 301 , scale 303 is mounted to rotate coaxially with an object ( not shown ) by means , for example , of axle 307 or of a hollow bearing . scale 303 has pattern 309 formed thereon . pattern 309 is laid out in a polar rather than a cartesian coordinate frame . the scale is not required to be backlit , but can instead be edge - illuminated . as shown in fig9 each period of pattern 309 includes fiducial 331 and code area 333 . pattern 309 has a period of 60 μm . code area 333 has a 12 - bit encoding scheme with twelve pixels . of these pixels , pixels 341 - 0 , 341 - 2 , 341 - 5 , 341 - 7 and 341 - 10 indicate bit values of one and are shown in the figure as shaded for ease of understanding , while the rest indicate bit values of zero . thus , the position encoded by this code area is position no . 1 , 189 . if scale 303 is just over 10 cm in diameter , such a 12 - bit coding scheme provides an angular sensitivity of less than 20 milliarc - seconds . code area 333 could also be formed as in the first embodiment . a highly accurate , rotary version of the encoding scale can be made with an electro - optical system in the following manner , which will be described with reference to fig1 . a temporally - gated , electro - optical system writes rotary scales for rotary versions of this type of ultra - high sensitivity optical encoder . as seen in fig1 , system 1000 includes photosensitive scale substrate 1002 , which is attached to flywheel 1004 to spin with the flywheel at a highly stabilized angular rate and which has trigger mark 1006 thereon , trigger sensor 1008 to sense trigger mark 1006 and to output trigger signals , control logic ( counters and gates ) 1010 , receiving the trigger signals , to control the pulsed illumination by pulsed light source 1012 ( which may be an led or a flashlamp ) whose spectrum and brightness are capable of exposing photosensitive scale substrate 1002 , master mask 1014 and sub - master mask 1024 that govern specific locations on the substrate which will be exposed , and optics 1020 , 1022 , 1026 to relay the illuminated master mask through the sub - master mask to the scale substrate . master mask 1014 is a large version of the basic encoder pattern containing the fiducial bars , the row marker , and all code bits . it is large enough that it can be easily subapertured to allow the projection of only one marker , fiducial , or code bit at a time . that subaperturing can be handled by moving subaperturing mask 1016 around and over the master mask with motorized ( or manual ) x - y stage 1018 . reducing optics 1020 relay the master mask plane to an intermediate submaster mask plane having diffuser 1022 and submaster mask 1024 where the optical pattern is refined , redefined , or cleaned up before being relayed again by further reducing optics 1026 to the plane containing the spun photosensitive scale substrate . the relay optics for this scale encoding scheme could be done in one stage without an intermediate submaster mask . choosing which master scale patterns are projected at any time could also be accomplished near the plane of the master mask itself . each portion of a pattern is written in turn onto the scale substrate : the fiducial bars , then the marker bars , then code bit 0 , then code bit 1 , then code bit 2 , and so on . control logic 1010 controls the illumination of master mask 1014 by light source 1012 for each type of feature to be written according to rules for that type of feature after a trigger pulse generated by trigger sensor 1008 is received . the trigger occurs once per revolution of the spun platform . the rate of revolution of the spun platform is synchronized to the pulse frequency of a stable electronic master clock which controls the pulsing of the light source so that for a 12 - bit encoder , the platform revolves exactly once per 4096 clock pulses ; for an 11 - bit encoder , once per 2048 clock pulses ; for a 10 - bit encoder , once per 1024 clock pulses . the method for writing 12 bits worth ( 4096 ) of codes are as follows ( first clock pulse is # 0 , last clock pulse is # 4095 ): fiducial bars write 4096 times per trigger every clock pulse ; the accuracy with which this feature can be recorded limits the accuracy of the device ; in fact , this feature is the only one which requires critical recording . code bit 0 starting with clock pulse 0 , write 2048 times per trigger ( one clock pulse on / one clock pulse off ) ( a total of 4 , 096 clock pulses ) code bit 1 starting with clock pulse 0 , write 1024 times per trigger ( 2 clock pulses on / 2 clock pulses off ) ( a total of 4 , 096 clock pulses ) code bit 2 starting with clock pulse 0 , write 512 times per trigger ( 4 clock pulses on / 4 clock pulses off ) ( a total of 4 , 096 clock pulses ) code bit 3 starting with clock pulse 0 , write 256 times per trigger ( 8 clock pulses on / 8 clock pulses off ) ( a total of 4 , 096 clock pulses ) code bit 4 starting with clock pulse 0 , write 128 times per trigger ( 16 clock pulses on / 16 clock pulses off ) ( a total of 4 , 096 clock pulses ) code bit 5 starting with clock pulse 0 , write 64 times per trigger ( 32 clock pulses on / 32 clock pulses off ) ( a total of 4 , 096 clock pulses ) code bit 6 starting with clock pulse 0 , write 32 times per trigger ( 64 clock pulses on / 64 clock pulses off ) ( a total of 4 , 096 clock pulses ) code bit 7 starting with clock pulse 0 , write 16 times per trigger ( 128 clock pulses on / 128 clock pulses off ) ( a total of 4 , 096 clock pulses ) code bit 8 starting with clock pulse 0 , write 8 times per trigger ( 256 clock pulses on / 256 clock pulses off ) ( a total of 4 , 096 clock pulses ) code bit 9 starting with clock pulse 0 , write 4 times per trigger ( 512 clock pulses on / 512 clock pulses off ) ( a total of 4 , 096 clock pulses ) code bit 10 starting with clock pulse 0 , write 2 times per trigger ( 1024 clock pulses on / 1024 clock pulses off ) ( a total of 4 , 096 clock pulses ) code bit 11 starting with clock pulse 0 , write 1 time per trigger ( 2048 clock pulses on / 2048 clock pulses off ) ( a total of 4 , 096 clock pulses ) the pattern sizes of master and submaster masks are chosen for supplying manageable magnifications by two stages of relay and for ease of manipulating subaperturing masks in front of master masks when selecting the type of pattern feature for projection . as noted above , the projection can also be accomplished with one stage of demagnification . assuming that the code bits are the smallest limiting feature size that it is desirable to end up with on the finished encoder scale , then one can work backwards through some reasonable magnification to the submaster mask and again through another magnification to the master mask . a 4 μm square code bit on the scale is taken as the smallest feature . if the submaster mask is set to scale magnification at 20 ×, then the pattern size on the submaster mask is 80 μm . the size of the entire area of the submaster mask is then 30 times this size for the baseline encoder pattern or 2 . 4 mm . another magnification of 10 × gives a master mask pattern size of 800 μm and an overall size of the master mask of roughly 24 mm . master and submaster masks of this feature size are trivial to fabricate . as those skilled in the art who have reviewed this specification will readily appreciate , an encoder according to the present claimed invention can be optimized by choices of components , opto - mechanical layout , and scale pattern details . there is an optimum fiducial feature pattern for a given geometric / ccd configuration which yields the most reliable outcome with the highest sensitivity and accuracy with respect to position . while the configurations of fiducials 31 , 131 , 231 and 331 disclosed above have worked in laboratory trials , other fiducials may be selected to satisfy the needs of specific equipment . the use of a larger , more sophisticated ccd array allows simultaneous acquisition of several fiducial images . position data become more accurate if independent determinations can be made for the images of more than one fiducial on the array . it is preferable to select the scale pattern , optical magnification and detector geometry to provide the image of at least one fiducial ( or , even more preferably , more than one ) on the ccd array at all times with more than one fiducial in view at all times , changes in magnification can easily be corrected . thus , the system is scale invariant . absolute encoding of long linear or rotational motions with ultra - high sensitivity is possible with the present invention . encoder 1 , using the components and scale patterns disclosed above with a 12 - bit coding scheme , allows up to 4 , 096 positions spaced 80 μm apart , thus encoding motion of up to 0 . 33 m with a sensitivity of 10 nm . that is , both the sensitivity and the range are considerably increased over the prior art , even though a much coarser pattern is used on the scale . the coarser pattern allows for a decrease in both manufacturing costs and sensitivity to damage to the scale . also , encoding rates of up to one khz are possible with a ccd type image sensor . much higher encoding rates are possible with charge injection device ( cid ) or optical random access memory ( ram ) types of image sensors but with some possible degradation in accuracy and sensitivity . each additional bit in the coding scheme doubles the length of travel which can be encoded without affecting the sensitivity . a coding scheme of 16 bits would encode over 5 m , while a coding scheme of 20 bits would encode over 80 m . practical concerns for such a length would include the accuracy with which multiple scales could be joined end - to - end or with which a single large scale could be made . thermal expansion of the scale would also impair accuracy , however , the use of ultra - low - expansion ( ule ) glass as a substrate for scale 5 would reduce the effects of such thermal expansion . because the modifications noted above and other modifications are possible within the scope of the present invention , the present invention should be construed as limited only by the appended claims .