Encoder device
By designing dense ruler line patterns on the encoder ruler and using the image sensor and position analyzer of the reader for error correction, the problem of degradation of measurement performance caused by removing too many ruler lines is solved, achieving high-precision position measurement and maximization of ruler length.
Patent Information
- Application Number
- CN202380064726.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-09-08
- Filing Date
- 2023-09-06
- Publication Date
- 2025-04-18
AI Technical Summary
Prior art Incremental measurements are usually very accurate when using the type arrangement described in WO2010/116144 or WO2010/139964, but if too many adjacent ruler lines are removed from the ruler, position measurement performance may be reduced, resulting in the maximum possible reduction of the scale length.
By designing a sufficiently dense ruler line pattern on the encoder ruler, ensuring that the ruler line is evenly distributed along the entire length, reducing the negative impact of removing ruler lines on measurement performance. At the same time, an image sensor and position analyzer of the reader are used to calculate the absolute and incremental positions of the reader relative to the encoder ruler by capturing snapshot images and applying error correction.
Effectively reduce the negative impact of removing the ruler line on measurement performance, ensure high-precision incremental and absolute position measurements, while maximizing the scale length.
Smart Images

Figure CN119856037A_ABST
Abstract
Description
[0001] The present invention relates to an encoder apparatus and in particular to a readhead for reading an encoder scale in which absolute position information is embedded in a series of substantially periodic scale markings.
[0002] Position encoders for measuring the relative position between two movable objects are known. Typically, an encoder scale comprising a series of markings is provided on one object, and a readhead for reading these markings is provided on the other object.
[0003] Position encoders are generally classified as incremental position encoders or absolute position encoders. In an incremental position encoder, the scale has a series of periodic scale marks that are detected by a read head. Any incremental movement of the scale relative to the read head is measured to allow the change in relative position to be established, and its accuracy is usually much greater than the period of the scale marks. In an absolute encoder, the read head measures relative displacement by detecting a unique series of scale marks (e.g., a code) and converting these codes into absolute positions. This generally provides a lower resolution measurement than an incremental encoder, but has the advantage that the absolute position of the read head relative to the scale is clearly known. It is also known to provide an encoder arrangement in which the absolute scale track is positioned parallel to the incremental scale track. This allows the higher position resolution of the incremental encoder to be combined with the benefits of the absolute position measurement. In other words, the absolute position measurement is "fine-tuned" using the higher accuracy incremental position measurement.
[0004] US7499827 describes embedding absolute position data into an incremental scale by removing scale lines. The entire scale maintains sufficient periodicity to provide incremental information, but omitted scale lines can also be detected and codewords defining absolute position information extracted therefrom. WO2010 / 116144 describes an improved method for reading such a scale using a snapshot image capture process, and WO2010 / 139964 describes the use of an extrapolation process to reduce spurious measurement errors in such a snapshot image capture process. Arrangements of the type described in WO2010 / 116144 and WO2010 / 139964 are also used in the so-called "RESOLUTE" series of optical encoders sold by Renishaw plc of Warton-under-Edge, UK.
[0005] The inventors have found that although incremental measurements are generally very accurate and robust when using arrangements of the type described in WO2010 / 116144 or WO2010 / 139964, position measurement performance may be reduced if too many adjacent scale lines are removed from the scale. This effect can be minimised by carefully designing the scale line pattern provided on the encoder scale to ensure that the distribution of the scale lines along the entire length of the scale is sufficiently dense. However, this limits the total number of unique absolute codewords that can be embedded in the scale, thereby reducing the maximum possible scale length.
[0006] According to a first aspect of the present invention, there is provided a read head for reading an encoder scale having a series of scale marks arranged in a generally periodic pattern encoding incremental position information, the series of scale marks also including embedded scale features encoding absolute position information, the read head comprising: an image sensor comprising a plurality of sensor elements for capturing a snapshot image of a portion of the encoder scale; and a position analyzer for determining a position of the read head relative to the encoder scale based on the captured snapshot image, the position analyzer comprising: (i) an absolute position extractor, wherein the absolute position extractor comprises: said absolute position extractor being configured to identify said embedded scale features in said snapshot image and to calculate therefrom the absolute position of said read head relative to said encoder scale, and (ii) an incremental position extractor being configured to calculate a global phase value describing the incremental position of said read head relative to said encoder scale by analysing said substantially periodic pattern of scale marks present in said snapshot image, characterised in that said incremental position extractor is configured to apply error correction when calculating said global phase value, the error correction applied taking into account variations in the contributions of different ones of said plurality of sensor elements to the calculated global phase value.
[0007] The present invention therefore relates to a readhead for reading an incremental scale comprising embedded absolute information. In other words, a readhead is provided which is arranged to read an encoder scale in which absolute information is embedded within a substantially periodic series of scale marks by providing detectable changes in the series of scale marks. In a preferred embodiment described in more detail below, such an encoder scale may comprise a substantially periodic series of scale lines, certain of which are omitted to encode information data bits which allow absolute position to be determined. For the avoidance of any doubt, it should be noted that this first aspect of the invention extends to the readhead and does not extend to the encoder scale which the readhead is arranged to read.
[0008] The read head includes an image sensor including a plurality of sensor elements or pixels. The image sensor is configured to allow a snapshot image of a portion of the encoder scale to be captured. For example, the image sensor may include a linear array of sensor elements configured to capture a one-dimensional image of the encoder scale. In a preferred embodiment, the image sensor is an optical sensor (i.e., it can detect electromagnetic radiation in the form of visible light or non-visible light). Thus, the image sensor captures a snapshot image, which is an image captured over a certain period of time. The snapshot image may be captured by activating the sensor element to make it sensitive to electromagnetic radiation (e.g., by appropriately gating the sensor element) over a certain period of time, and / or activating a suitable electromagnetic radiation source that illuminates the encoder scale over a certain period of time (e.g., by "flashing" the light source for a desired duration). Thus, the snapshot image is an image of the scale captured during a certain exposure time. Of course, a series of such snapshot images may be captured and each image may be analyzed to extract position information. As explained below, the exposure time may also be adjusted to optimize the captured snapshot image for the relative speed of the read head and the encoder scale.
[0009] The readhead also includes a position analyzer for analyzing the snapshot images captured by the image sensor to provide a measurement of the position of the encoder scale relative to the readhead. The position analyzer is configured to determine such position by analyzing the captured snapshot images using both incremental position extraction techniques and absolute position extraction techniques. In particular, the position analyzer includes an incremental position extractor and an absolute position extractor configured to determine the incremental position and the absolute position, respectively. It should be noted that the incremental position extractor and the absolute position extractor do not need to be separate electronic units, but can be implemented by a single processor arrangement, such as a digital signal processor (DSP), a field programmable gate array (FPGA), or an application specific integrated circuit (ASIC) or the like.
[0010] The incremental position extractor is configured to determine the relative (incremental) position of the readhead and the encoder scale by establishing an overall or global phase of a generally periodic pattern of scale markings present in the snapshot image. As explained in more detail below, the incremental position extractor may use a discrete Fourier transform (DFT) to provide a global phase value describing the relative position of the encoder scale and the readhead. The incremental position defined by the global phase value may have a higher resolution than the scale period.
[0011] The absolute position extractor is configured to identify embedded scale features within a generally periodic pattern of scale markings. For example, the presence or omission of scale markings can be used to encode different data bits. Codewords formed from a plurality of such data bits can be embedded in the encoder scale, wherein the absolute position extractor stores a reference table or similar table defining the absolute position encoded by each codeword. This allows the absolute (unique) position to be measured.
[0012] As explained above, in prior art readheads, there may be various factors that reduce the accuracy of the global phase value extracted by the incremental position extractor. These factors may include inherent variations on the image sensor (e.g., variations in sensitivity or gain of different sensor elements) and / or code feedthrough effects, where embedded absolute information (e.g., due to multiple missing scale marks) changes the extent to which each subset of sensor elements contributes to the global phase value. The readhead of the present invention mitigates these effects by configuring the incremental position extractor to apply error correction when calculating the global phase value, which error correction takes into account the variation in the contribution of different sensor elements in the plurality of sensor elements to the calculated global phase value. As explained below, such error correction may be applied in various ways. For example, correction may be applied to the output of each sensor element individually, and / or the real phase component and the imaginary phase component extracted from the captured snapshot image may be offset before calculating the global phase value. In this way, fixed pattern noise and / or code feedthrough effects may be reduced or removed from the calculated global phase value, thereby improving the measurement accuracy of the readhead.
[0013] The error correction applied by the incremental position extractor may depend on a series of scale marks present in the captured snapshot image. Advantageously, the error correction applied by the incremental position extractor depends on embedded scale features identified in the snapshot image by the absolute position extractor. In other words, embedded scale features identified in the captured snapshot image (such as missing scale lines in which absolute position codewords are embedded) may be used to provide or select an error correction that takes into account the effect of such embedded scale features on the global phase value.
[0014] In a preferred embodiment, the error correction applied by the incremental position extractor takes into account the variation in the density of scale features across the snapshot image. In other words, the error correction applied is based on the distribution of the density of scale features across the snapshot image. For example, the relative density of scale features (e.g., the density of scale lines) in different portions of the captured snapshot image can be used to estimate the relative contribution of such different portions of the snapshot image to the calculated global phase value. In one example, the snapshot image can be divided into five portions (i.e., five different portions), wherein each fifth of the snapshot image is collected by one fifth of the sensor elements of the image sensor. The density of scale features in each fifth of the snapshot image can be determined (e.g., based on an analysis performed by the absolute position extractor), and an error correction in the form of weighting or phase adjustment can be applied when calculating the global phase value, which error correction takes into account the different feature densities (e.g., different numbers of scale lines) in different fifths of the snapshot image.
[0015] In addition to or in lieu of taking into account differences in global phase values extracted from different encoder scale portions encoding different absolute data, the present invention also allows compensation for noise within the read head. In particular, the error correction applied by the incremental position extractor can therefore take into account any offset and / or gain variations between the outputs of multiple sensor elements. For example, fixed pattern noise (FPN) can be associated with image sensors. For optical image sensors, this fixed pattern noise can cause the outputs from different sensor elements to offset from each other, even in the absence of any light falling on the image sensor at all. This may be caused by inherent differences between the sensor elements (e.g., due to manufacturing variations, etc.) and / or differences in the electronics used to read the sensor elements. The electronic gains of different sensor elements may also be slightly different. The error correction applied by the incremental position extractor can reduce or remove this effect from the calculated global phase value.
[0016] The incremental position extractor may be configured to analyze the captured image using frequency analysis. More specifically, the captured image may be analyzed using spatial frequency analysis. For example, the incremental position extractor may analyze the captured snapshot image using Fourier transform techniques. Advantageously, the incremental position extractor is configured to analyze the captured snapshot image using discrete Fourier transform to calculate the global phase value. The snapshot image captured by the image sensor includes multiple sensor output values from multiple sensor elements. The incremental position extractor may implement discrete Fourier transform analysis, wherein each of the multiple sensor output values is multiplied by the corresponding values in the cosine lookup table and the sine lookup table to provide a real phase component and an imaginary phase component from which the global phase value is calculated. In other words, the sensor output value may be multiplied by the value in the cosine lookup table and summed to provide a real value, and the same sensor output value may be multiplied by the value in the sine lookup table and summed to provide a real value. Then, the real value and the imaginary value may be used together to provide a global phase value. Error correction may be applied before, during, or after the frequency analysis process.
[0017] In one embodiment, the incremental position extractor is configured to apply error correction by applying an error map or error function to the values contained in the cosine lookup table and the sine lookup table. In other words, some or all of the values contained in the cosine lookup table and / or the sine lookup table can be adjusted. Error correction can be applied alternatively by using an error map or error function when generating the cosine lookup table and the sine lookup table. It should be noted that the strict definition of the discrete Fourier transform requires the use of numerical values that define the sine variation function. However, the term "discrete Fourier transform" as used herein is intended to also cover transformations in which numerical values have been adjusted to apply error correction. The adjustment applied to the numerical value can include adding or subtracting an error value and / or multiplying or dividing by an error value. The numerical value of the sine variation function that defines the discrete Fourier transform can be calculated as needed, or stored in a lookup table. The applied error value can be stored in a table and / or calculated using a function.
[0018] Alternatively, error correction can be applied by selecting or generating appropriate cosine lookup tables and sine lookup tables that incorporate different error corrections. For example, a variety of different error corrections can be applied to create a set of cosine and sine lookup tables that each embody a different error correction. Multiple sets of cosine and sine lookup tables can be stored by the incremental position extractor (e.g., stored in a memory). The incremental position extractor can be configured to select one of the sets of these cosine and sine lookup tables that will apply the desired correction when used to calculate the global phase value. For example, a pair of cosine and sine lookup tables can be selected based on a codeword embedded in the encoder scale or a density distribution of scale features on a captured snapshot image. The selection can also or alternatively be based on setup factors, such as the travel height (spacing) of the read head relative to the encoder scale, operating temperature, etc.
[0019] In a further alternative embodiment, the incremental position extractor may be configured to apply error correction by adjusting the value after the sensor output value is multiplied by the cosine lookup table and the sine lookup table. For example, the real phase component and the imaginary phase component may be adjusted to apply error correction before calculating the global phase value. For example, an offset may be applied to the real phase component and the imaginary phase component before the components are used to calculate the global phase value. In order to compensate for fixed pattern noise, a single offset may be applied. If the fixed pattern noise changes, for example, due to a change in the configuration of the read head and / or the scale, such a single offset may be recalculated. If the error correction is to take into account code feedthrough, etc., the offset applied to the real phase and the imaginary phase may be adjusted during use (e.g., based on a codeword embedded in the encoder scale or a density distribution of scale features on a captured snapshot image). In an alternative embodiment, the incremental position extractor may be configured to adjust a preliminary global phase value derived from the real phase component and the imaginary phase component to generate a global phase value. For example, a phase shift may be added to the preliminary global phase value to generate a global phase value.
[0020] The applied error corrections may be calculated prior to using a readhead with an encoder scale. For example, sine and cosine lookup tables or offset values for real and imaginary components used to calculate a global phase value may be calculated prior to using the readhead to measure position relative to the encoder scale. The error corrections may be calculated during manufacture of the readhead (e.g., in a manufacturing setting). The error corrections may be calculated after the readhead is manufactured but prior to mounting the readhead. For example, the error corrections may be calculated prior to mounting the readhead on a device that also includes a scale that the readhead will read to collect position measurements. Thus, a readhead may be provided in which one or more (pre-calculated) error corrections are stored.
[0021] The error correction may be calculated during use (i.e., when the readhead is mounted to measure its position relative to the encoder scale). Advantageously, the incremental position extractor is configured to calculate the error correction based on one or more captured snapshot images of the encoder scale during use (i.e., during use of the readhead with the encoder scale). For example, the error correction may be determined by analyzing a substantially periodic pattern of scale markings in a plurality of sub-regions of each snapshot image and determining the apparent phase difference in the substantially periodic pattern of scale markings between the sub-regions. In other words, one or more of the captured snapshot images may be decomposed into sub-regions. Fourier analysis may then be performed on each sub-region in the snapshot image to obtain a local phase value for each sub-region. The differences in the local phase values and how these differences will affect the global phase value extracted from the analysis of the entire snapshot image may then be established. This may then be used to construct an error map or error function that describes how the global phase value will vary based on the relative contributions of different sub-regions to the global phase value. Error correction may then be applied based on the absolute information embedded in the encoder scale to account for variations in the density of scale features (e.g., scale lines) on the snapshot images. Thus, the incremental position extractor may be configured to generate and update error corrections "on the fly" (ie, as its position relative to the encoder scale is measured using the readhead).
[0022] The read head may include any type of image sensor. The image sensor may sense a magnetic field (i.e., as part of a magnetic encoder device). The image sensor may include an electromagnetic sensor. In a preferred embodiment, the image sensor is an optical image sensor. The optical image sensor may sense light of any suitable wavelength (e.g., from ultraviolet to infrared). The image sensor includes an array of sensor elements. The image sensor may include a two-dimensional array of sensor elements. In a preferred embodiment, the image sensor may include a one-dimensional array of sensor elements (i.e., a linear array). The shape of these sensor elements may be generally rectangular. The rectangular sensor elements may be placed side by side to form a linear array, wherein the major axis of the rectangle extends perpendicular to the linear axis along which the sensor elements are distributed. As described above, the image sensor is arranged to capture a snapshot image of a portion of the encoder scale. If an optical image sensor is provided, the optical image sensor may include suitable optics for imaging the portion of the encoder scale. The field of view may be sufficient to capture a plurality of scale marks. For example, there may be enough scale marks in the snapshot image to extract enough data bits to allow the absolute position to be determined.
[0023] The readhead may include an output for outputting measurement information. Position information may be output according to a standard encoder output protocol. The readhead may output such information in a digital format. An interface may be provided to receive output from the readhead.
[0024] According to another aspect of the invention, there is provided an encoder apparatus comprising a readhead according to the first aspect of the invention and an encoder scale. The encoder scale has a series of scale marks arranged in a generally periodic pattern encoding incremental position information. The series of scale marks also includes embedded scale features encoding absolute position information. In a preferred embodiment, the series of scale marks may include a series of scale lines.
[0025] Advantageously, the embedded scale features include omitted scale marks. In other words, data bits can be encoded in the scale by omitting scale marks from an otherwise regularly spaced series of scale marks. For example, the scale features may include scale lines, and data bits can be encoded in the scale by omitting certain scale lines. The scale lines may be transmissive lines disposed on an otherwise opaque substrate, or they may be opaque lines disposed on an otherwise optically transparent substrate. Alternatively, the scale lines may be optically reflective lines disposed on an otherwise non-reflective substrate, or they may be non-reflective lines disposed on an otherwise optically reflective substrate. The number of omitted scale marks may be selected so that sufficient scale marks are retained to allow a substantially periodic pattern to be extracted from a snapshot image captured by an image sensor of the read head of a portion of the encoder scale.
[0026] According to another aspect of the invention, there is provided a method of analyzing a snapshot image of an encoder scale captured by a readhead, the encoder scale having a series of scale marks arranged in a generally periodic pattern encoding incremental position information, the series of scale marks also including embedded scale features encoding absolute position information,
[0027] The method comprises the following steps:
[0028] (i) identifying any embedded scale features present in the snapshot image and calculating therefrom the absolute position of the readhead relative to the encoder scale,
[0029] (ii) calculating a global phase value describing the incremental position of the readhead relative to the encoder scale by analysing a substantially periodic pattern of scale markings present in the snapshot images, and
[0030] (iii) determining the position of the readhead relative to the encoder scale based on the absolute position calculated in step (i) and the global phase value calculated in step (ii),
[0031] Characterized in that step (ii) comprises applying an error correction when calculating the global phase value, the error correction taking into account the variation of the contribution of different regions of the snapshot image to the calculated global phase value.
[0032] Steps (i) and (ii) may be performed in any order or simultaneously. The method may be performed using a readhead according to the first aspect of the invention. The method may include an initial step (i.e., prior to steps (i) and (ii)) of capturing a snapshot image of the encoder scale. The method may include any of the features described above for the apparatus.
[0033] A read head for reading an encoder scale is also described herein. The encoder scale may have a series of scale marks. The scale marks may be arranged in a generally periodic pattern that encodes incremental position information. The series of scale marks may include embedded scale features that encode absolute position information. The read head may include an image sensor. The image sensor may include a plurality of sensor elements. The image sensor may be configured to capture a snapshot image of a portion of the encoder scale. The read head may include a position analyzer for determining the position of the read head relative to the encoder scale based on the captured snapshot image. The position analyzer may include an absolute position extractor configured to identify embedded scale features in the snapshot image. The absolute position extractor may calculate the absolute position of the read head relative to the encoder scale based on the identified embedded scale features. The read head may include an incremental position extractor configured to determine the incremental position of the read head relative to the scale. The incremental position extractor may be configured to calculate a global phase value describing the incremental position of the read head relative to the encoder scale. The global phase value may be calculated by the incremental position extractor by analyzing a substantially periodic pattern of scale markings present in the snapshot image. The incremental position extractor may be configured to apply error correction when calculating the global phase value. The applied error correction may take into account variations in contributions of different sensor elements of the plurality of sensor elements to the calculated global phase value.
[0034] The invention will now be described, by way of example only, with reference to the accompanying drawings, in which:
[0035] Figure 1 shows an embedded absolute encoder device in which the scale lines are omitted to encode absolute position information,
[0036] Figure 2 Shown in more detail Figure 1 Encoder read heads of the type shown,
[0037] Figure 3 shows an absolute ruler, where the missing ruler lines encode absolute position information,
[0038] Figure 4a and Figure 4b shows a portion of an encoder scale and the associated intensity distribution of a snapshot image captured by an imaging sensor,
[0039] Figure 5 shows how data bits can be extracted from an encoder scale.
[0040] Figure 6 shows the effect of lens distortion on the periodic intensity variations measured by the imaging sensor,
[0041] Figure 7 shows how an image sensor can be divided into multiple segments to allow the generation of lens distortion error maps,
[0042] Figure 8 shows how the Lissajous shift can correct the global phase value, and
[0043] Fig. 9 It is shown how the extracted incremental position information and absolute position information can be combined.
[0044] refer to Figure 1 , shows an overall view of an encoder device 2, which includes a read head 4 and a scale 6. The read head 4 and the scale 6 are respectively mounted to a first object and a second object (not shown) in use. The read head 4 can move back and forth along the scale 6. In particular, the read head 4 can move relative to the scale 6 along the x-axis shown in the figure.
[0045] The scale 6 is an absolute scale comprising a scale track 7 comprising a series of scale lines extending perpendicular to the direction of movement of the read head; that is, the scale lines extend along the y-axis indicated in the figure. In this example, the scale lines comprise a series of reflective lines 8 and non-reflective lines 10. The reflective lines 8 and non-reflective lines 10 are generally arranged in an alternating manner with a predetermined period. However, the non-reflective lines 10 are chosen to be omitted from the scale track 7 so that absolute position data is encoded in the track 7. For example, the presence of a non-reflective line can be used to represent a "1" bit, while the absence of a non-reflective line can represent a "0" bit. The encoded absolute position data can be provided in the form of a pseudo-random sequence or a discrete codeword.
[0046] Figure 2 The internal components of the readhead 4 are shown in more detail. The readhead 4 comprises a light source in the form of a light emitting diode ("LED") 12, a collimating lens 13, a beam splitter assembly 15 having a reflective surface 17 and a beam splitting surface 19. An imaging lens 21 and a complementary metal oxide semiconductor ("CMOS") image sensor 20 are also provided.
[0047] In use, the collimating lens 13 collimates the light emitted from the LED 12 into a beam 23, which is then reflected by the reflective surface 17 of the beam splitter assembly toward the beam splitting surface 19. The beam splitting surface 19 reflects the beam 23 toward the scale 6 via the window 22. The light reflected from the scale 6 passes back through the window 22 and toward the beam splitting surface 19, which allows the reflected light to pass directly through. The reflected light then passes through the imaging lens 21, which forms an image of the scale 6 on the image sensor 20.
[0048] In this example, the CMOS image sensor 20 is a one-dimensional sensor array. In particular, the CMOS image sensor 20 includes a single row of 256 elongated pixels (sensor elements), the length of which extends parallel to the length of the reflective line 8 and the non-reflective line 10. A signal processor 24 (such as a DSP, FPGA or ASIC) is arranged to receive data from the image sensor 20. The signal processor 24 is configured to analyze the captured scale image, and the interface 38 outputs position information on the data bus 40.
[0049] The readhead 4 is configured to implement a snapshot image capture process, which is described in more detail in WO2010 / 116144. The LED 12 is connected to the signal processor 24 so that the LED 12 can be activated ("flashed") on demand by the signal processor 24. The image sensor 20 is also connected to the signal processor 24 to allow a snapshot image of a portion of the scale to be captured on demand (for example, when a position measurement is required). As also described in detail in WO2010 / 116144, the duration of the LED flashing can be selected based on the relative speed of the scale and the readhead to maximize the signal-to-noise ratio of the image while minimizing image blur. For example, the LED 12 and the electronic shutter can be driven for approximately 100ns, resulting in the snapshot image being captured within ±20ns in time and without motion blur. Of course other readhead configurations are also possible.
[0050] Figure 3 Can be referenced with Figure 2 Micrograph of a portion of a scale used with a readhead of the type described. The scale consists of dark scale lines on a bright substrate, with a basic scale period of 30 μm. As can be seen from the figure, selected scale lines are omitted in order to encode absolute position information. However, a roughly (overall) repeating scale line pattern is still present.
[0051] Figure 4a yes Figure 3 Schematic diagram of a portion of an encoder scale 50 of the type shown. A generally periodic array of dark (non-reflective) scale lines 52 is provided on a reflective (bright) substrate 54, with some lines omitted to encode absolute data bits.
[0052] Figure 4bShows that reading Figure 4a The scale is based on the reference Figure 2 The light intensity pattern (ie, snapshot image) captured by the image sensor 20 of a readhead 4 of the type described. The valleys (depressions) in the received light intensity correspond to the reductions in reflected light caused by the dark scale lines 52.
[0053] As will be explained in more detail below, the signal processor 24 of the readhead 4 analyses the captured snapshot images to extract both incremental position information and absolute position information.
[0054] The incremental position information is determined from the intensity pattern of the captured image using a discrete Fourier transform (DFT) at the scale line frequency. The real and imaginary components of the DFT allow the total or global phase of the captured image to be extracted (i.e., a global phase value is calculated from all the information in the captured image), giving incremental position values that are a fraction of the basic scale period. For example, for Figure 3 The basic scale period shown is 30 μm, the incremental positions are values between 0 and 30 μm, and the resolution is better than 1 nm.
[0055] The global phase information is also used to locate the center of each potential line on the scale. A correlation is then performed on the captured image at each of these locations to determine if a dark line is present. In this example, each captured image of the scale extends approximately 2mm in the measurement direction, which allows the extraction of a 65-bit binary number corresponding to the scale pattern captured by the snapshot image (i.e., the snapshot image is of the portion of the scale directly below the read head). Only a quarter of these 65 bits are required to define a unique position, with the remaining bits providing redundant information so that the correct position can be determined even if a portion of the scale is obscured. The signal processor 24 then uses an appropriate error correction analysis to account for any incorrectly identified bits to convert the bit sequence into a coarse absolute position of the read head. This process allows the read head position to be found with an accuracy to within one scale period, for Figure 3 The scale shown has a period within 30 μm.
[0056] The coarse absolute position (ie an integer number of scale periods) is then combined with the global phase information (ie the resolution of which is much smaller than the scale period) by the signal processor 24. The readhead can then output a high resolution absolute position.
[0057] The measurement performance of the above devices can be affected by code feedthrough errors. Code feedthrough errors occur due to the embedding of absolute codes in an otherwise incremental scale (e.g. by omitting scale lines), combined with spatial non-uniformities on the optical imaging arrangement and / or image detection system. For example, distortions in the imaging lens of the system are almost unavoidable. If the imaging lens does contain such manufacturing errors or inherent distortions due to its design, the imaging light will not be imaged uniformly on the image sensor. This means that if a perfectly periodic scale pattern is imaged, the imaged pattern will have slightly different periods across the image sensor.
[0058] refer to Figure 5 , the concept of code feedthrough can be illustrated by considering a portion of a scale having five scale line positions (i.e., scale line positions that define the scale period) spaced equidistantly. Four of the scale lines are present, but one of the scale lines is omitted. For each portion of the scale that includes a scale line, the intensity variation at the relevant portion of the sensor includes a cosine wave and is encoded as a "1" bit. These cosine portions are labeled 50a, 50b, 50c, and 50e. For portions of the scale where no scale lines are present, there is a flat light intensity encoded as a "0" bit. This flat portion is labeled 50d. It should be noted that the period of the scale does not need to match the period of the sensor element array of the sensor on which the light falls, and therefore the intensity pattern of each of the five illustrated portions of the scale can fall on multiple sensor elements.
[0059] The four cosine wave portions 50a, 50b, 50c and 50e present in the image contribute to the global phase value extracted by the DFT analysis, but the flat intensity region 50d without the scale lines does not contribute to the global phase value. This means that when the scale encodes the codeword "11101", certain areas of the scale image will contribute to the global phase value. If different codewords are to be encoded in the scale, different areas of the scale image will contribute to the global phase value. It can therefore be seen that reading different codewords will cause different areas of the image to contribute to the measured global phase value, and therefore different sources of error may exist for different codewords.
[0060] As an example, any imaging optics may inherently introduce image distortion. Such distortion in the imaging optics introduces variations to the calculated global phase value, which is dependent on the codeword being imaged. In other words, each cosine wave contributes to the global phase of the image. If the contribution of each cosine wave is slightly offset in space due to lens distortion, then each cosine wave or "1" bit adds a position error that is equal to the distortion at the location of that data bit in the image. Therefore, the total position error is the average of the distortion values at each 1 bit. Therefore, the total position error produced by such distortion in the imaging optics is codeword dependent.
[0061] For a scale where there are no 0 bits (i.e. a purely incremental scale), the effect of the above lens distortion will be constant because the code pattern across the sensor is constant (i.e. due to all 1 bits there is a continuous cosine wave on the sensor regardless of which part of the scale is read). However, in order to encode the data bits, 0 bits must be added to the image. Therefore, the average value of the distortion contribution of the 1 bits and therefore the total position error will vary as the code in the image changes. This means that the effect of lens distortion is a position dependent error, which can also be referred to as a code feedthrough error, because the code in the image feeds through to the position calculated by the read head.
[0062] refer to Figure 6 , the effects of this lens distortion will be described in more detail. Figure 6 The top row 60 of shows the effective width of the sensing scale periods 62a-62m of the scale. The scale itself may be completely periodic, but the lens distortion causes the images of the various scale periods formed on the sensor to vary across the sensor. As shown, the size of the regions gradually varies, and those regions on the left (e.g., sensing scale periods 62a-62g) cause the measured incremental position to be tilted to the right, while those regions on the right (e.g., sensing scale periods 62h-62m) cause the measured incremental position to be tilted to the left. The bottom row 64 shows the scale periods 66a-66m that would be formed if the image was not distorted. The center curve 68 shows the local position changes to the right and left that occur for each imaged scale period due to lens distortion.
[0063] It can be seen that if a scale is provided which is encoded with only 1 bit (i.e. so that scale periods 62a-62m each contain one waveform repetition), the effect of the lens distortion will be averaged over the entire image and the measured position (i.e. the global phase value derived from the DFT analysis) will be the same as it would be measured in the absence of any lens distortion. However, in the extreme case, if sensing scale periods 62a-62g contain a cosine wave (i.e. encoded as 1 bit), but sensing scale periods 62h-62m are all flat intensity (i.e. encoded as 0 bits), then the measured position (i.e. as indicated by the global phase value extracted by the DFT analysis) will be skewed to the right. It can therefore be seen that position errors due to lens distortion introduce errors associated with the codeword.
[0064] The signal processor 24 of the readhead uses spatial Fourier analysis to calculate a global phase value (i.e., which provides incremental position measurements). In particular, the global phase value is calculated based on a discrete Fourier transform (DFT) performed at a carrier frequency equal to the scale line frequency. In digital signal processing systems, fixed point mathematics is used to approximate the DFT. Therefore, the DFT consists of multiplication and accumulation of the image with a sine or cosine lookup table (LUT). In other words, the n individual light intensity values captured from each pixel of the sensor (i.e., the "image(n)" values contained in equations 1a and 1b below) are multiplied by the corresponding coefficients in the cosine LUT and sine LUT, and the summation is performed to produce real and imaginary phase components. This is mathematically described in equations (1a) and (1b) below:
[0065] Real part = ∑ n Image(n).LUT COS (n) (1a)
[0066] Imaginary part = ∑ n Image(n).LUT SIN (n) (1b)
[0067] Corrections to compensate for the above-described lens distortion or similar conditions may be implemented by distorting the sine and cosine waves used in the Fourier analysis. In other words, the cosine and sine waves may be distorted in the same way that the collected snapshot images are distorted by the lens, and the resulting real and imaginary components, and therefore positions, will no longer have code feedthrough errors. In the above-described DFT analysis, such adjustments may include applying appropriate corrections to the sine and cosine LUTs (e.g., defined in an error map or error function).
[0068] There are a number of ways in which distortion can be measured to allow appropriate compensation to be applied. For example, distortion can be calculated and used "on the fly." Such on-the-fly measurement is advantageous because distortion can vary with installation and operating tolerances (such as the distance between the scale and the readhead). In other words, the encoder readhead may include the ability to measure and compensate for distortion while the encoder is operating.
[0069] refer to Figure 7 , an example of how instantaneous measurement of lens distortion may be performed will be described. In this example, the illustrated image sensor 70 (which may be included in a read head of the type described above) comprises a linear array of 256 sensor elements (pixels). The sensor elements are conceptually divided into five groups 72a-72e, each group containing approximately equal numbers of sensor elements.
[0070] The images of the scale generated by each of the five groups of sensor elements 72a-72e are analyzed separately using DFT to extract phase values. In other words, five separate phase values are calculated from the outputs of the five groups of sensor elements 72a to 72e. to This is possible because each fifth of the scale typically includes a sufficient number of scale periods to allow phase information to be extracted. A global phase value can also be calculated from all sensor elements in these five groups.
[0071] If the optical imaging system is perfect, the phase value to will be identical to each other and to the global phase value. Therefore, any differences in the measured phase between different sensor element groups provide a measure of the effective distortion of the image of each sensor group. A correction can then be applied to the Fourier coefficients used to extract phase information from pixels in the various sensor groups to account for any measured phase differences between the sensor groups.
[0072] It should be noted that an absolute code embedded in the scale being read can also affect the phase value measurement. For example, if there are a large number of adjacent missing scale lines (encoded as 0 bits), or if there is contamination on certain parts of the scale, the phase information for one or more groups of sensor elements 72a-72e may not be extracted, or the noise of such phase measurements may be unacceptably high. Therefore, an averaging method can be used to establish the average phase difference between the five groups of sensor elements as the scale is moved back and forth relative to the read head. The phase difference can then be updated during use.
[0073] While the above approach ensures that optimal performance is maintained, it is also possible to calculate and program distortion when the encoder readhead is manufactured. Such distortion corrections can be, for example, theoretical inherent lens distortion, average distortion measured for many readhead units, or unique distortion calculated for each readhead. It is also possible to pre-calculate multiple distortion corrections for variations in readhead setup conditions. For example, multiple error maps or error functions can be calculated for different ride heights, temperatures, scale types, etc.
[0074] It should be noted that although lens distortion is described above, there may be other similar sources of errors associated with the codewords. For example, any variation in the spacing or size of the sensor elements will have a similar effect to lens distortion.
[0075] refer to Figure 8 , it will now be described how similar methods may be used to additionally or alternatively compensate for fixed noise.
[0076] Each sensor element (pixel) of an image sensor has an associated offset. This is the signal level read from the pixel when no light is present. Ideally, these offset values are uniform across the entire image sensor, but slight variations in the image sensor manufacturing process can cause perturbations in both the offset and gain of each pixel. Additional analog circuitry can also add offset and / or gain to the image. This fixed pattern noise (FPN) is independent of the position of the read head relative to the scale, nor is it related to the scale pattern being read. Instead, it adds an offset to the real and imaginary components of the discrete Fourier transform. When the real and imaginary parts are plotted relative to each other, they form a Lissajous with an offset center. This produces an error that circulates with the same period as the scale period. Figure 8 This offset Lissajous 80 is shown in FIG.
[0077] The offset caused by fixed pattern noise is measurable and / or calculable. Therefore, it can be corrected by removing the real and imaginary components of the offset from the DFT calculation before calculating the phase. This effectively shifts the Lissajous center to provide a centered Lissajous 82.
[0078] The offset may be calculated in a number of ways, which are described below.
[0079] The offset can be measured "on the fly". For example, the non-zero center of the Lissajous can be iteratively modified using calculations from the history of measured points. The new non-zero center can then be calculated and added to the current offset being corrected. This iterative approach can improve the correction over time.
[0080] Alternatively, any basic offset resulting from the mathematical operation of the discrete Fourier transform can be calculated. For example, the FPN of the image sensor can be measured during a calibration procedure that includes taking images in the dark. Alternatively, the calibration procedure can involve using the average of multiple images taken in the dark. This can be done in production. The resulting offset can then be calculated as:
[0081]
[0082] It should be noted that each pixel of the image sensor also has an associated gain, and in practice, the gain of pixels will be slightly different from each other. Although the math becomes slightly more complicated, gain variability or photo response non-uniformity (PRNU) contributes to scale period error and half-scale period error. If necessary, this gain variability can be corrected by dividing the LUT component by the gain of its corresponding pixel. Therefore, if necessary, pixel gain variations can also be removed by this approach.
[0083] It should be further noted that because the DFT is performed using lookup tables that approximate trigonometric functions, they are not perfect and errors in the approximation may introduce offsets. In particular, if the sum of the lookup table is not zero, the intensity offset of the image (i.e., the DC component) will not be removed by the DFT calculation and will result in an offset in the real and imaginary components as follows:
[0084]
[0085] refer to Fig. 9 , the processing of the captured snapshot images will be described in more detail. Figure 2 As mentioned, the snapshot images of the scale collected by the image sensor 20 of the readhead 4 are passed to a signal processor 24. The configuration of such a signal processor which allows the position to be calculated from the acquired snapshot images will be outlined below.
[0086] Each snapshot image generated by the image sensor includes a set of image intensity values 90 that have been read from each of the n sensor elements of the image sensor (e.g., 256 sensor elements of the image sensor 20). The image intensity values 90 (which are represented as I1 to In and together form the captured snapshot image) are passed to a position analyzer, which can be implemented by a suitable signal processor. The position analyzer 91 includes an absolute position extractor 92 and an incremental position extractor 94.
[0087] The incremental position extractor 94 implements a DFT by multiplying the set of image intensity values 90 by a set of sine coefficients 96 and respectively by a set of cosine coefficients 98. These may be provided as a lookup table comprising cosine coefficients and sine coefficients. The set of sine coefficients 96 and the set of cosine coefficients 98 are stored in a local memory accessible to the signal processor. In particular, the first image intensity value I1 is multiplied by the first sine coefficient S1 and the first cosine coefficient C1, respectively, the second image intensity value I2 is multiplied by the second sine coefficient S2 and the second cosine coefficient C2, respectively, and so on.
[0088] The resulting values from the cosine analysis are then summed (i.e. the values I1×C1, I2×C2, ...., In×Cn are summed) to provide the real Fourier component of the phase (Re). The resulting values from the sine analysis are summed (i.e. the values I1×S1, I2×S2, ...., In×Sn are summed) to provide the imaginary Fourier component of the phase (Im). Together the real and imaginary values allow a global phase value Φ to be calculated. The global phase value Φ (i.e. an angle between 0° and 360°) provides a measure of the position of the readhead relative to the scale at a resolution much finer than the period of the scale.
[0089] An absolute position extractor 92 also receives the set of image intensity values 90 and performs an analysis (using the global phase value Φ incremental position, extractor 94 to identify the different scale line positions) to determine if a scale line is present at each scale line position. A 65-bit binary number 100 is extracted (note that the period of the sensor elements is approximately one quarter of the pitch of the scale) and compared to a set of code words stored in an absolute lookup table 102. One or more code words are identified in the binary number 100 and this provides an absolute position measurement (A) that defines the position of the readhead relative to the scale with an accuracy of up to one scale period.
[0090] The global phase value Φ is then combined with the absolute position measurement A to produce an absolute measured position P output from the position analyzer 91. Although not shown in the figure, such a position measurement may be output via an appropriate data bus (e.g., the read head may include an appropriate data bus interface). The position measurement may be output on demand or periodically.
[0091] As explained above, various errors are removed from the position calculation by adjusting the sine coefficients 96 and cosine coefficients 98 used to generate the global phase value Φ. Therefore, the position analyzer 91 can store a plurality of sine and cosine lookup tables or functions that include coefficients that have been corrected to account for the errors. Alternatively, an error map or error function can be generated by or passed to the position analyzer 91 that is used to appropriately adjust the various coefficients (S1, S2, S3, etc. and C1, C2, C3, etc.) of the sine and cosine LUTs.
[0092] It should be noted that in order to reduce spurious errors, the readhead may calculate the absolute position output by linear extrapolation from the two most recent previous position readings. In other words, the absolute position derived from each snapshot image of the scale may not always provide the position value output by the encoder. For example, additional processing may be performed before the readhead outputs any position value. This is described in more detail in WO2010 / 139964.
[0093] Although the above embodiments include reflective encoders, the present invention may be used with transmissive encoder devices (where light is transmitted through the scale rather than reflected from the scale). In the described embodiments, the scale is a linear scale. However, it will be appreciated that the scale may be a rotary scale. Furthermore, the scale described enables measurement in only a single dimension. However, it will be appreciated that this is not necessarily the case, for example, the scale may enable measurement in two dimensions. For example, a two-dimensional image sensor may be provided.
Claims
1. A readhead for reading an encoder scale having a series of scale marks arranged in a generally periodic pattern encoding incremental position information, the series of scale marks also including embedded scale features encoding absolute position information, The reading head comprises: an image sensor comprising a plurality of sensor elements for capturing a snapshot image of a portion of the encoder scale, and A position analyzer, the position analyzer being used to determine the position of the read head relative to the encoder scale based on the captured snapshot image, the position analyzer comprising: (i) an absolute position extractor configured to identify the embedded scale features in the snapshot image and calculate therefrom the absolute position of the readhead relative to the encoder scale, and (ii) an incremental position extractor configured to calculate a global phase value describing the incremental position of the readhead relative to the encoder scale by analyzing the substantially periodic pattern of scale marks present in the snapshot image, The incremental position extractor is configured to apply an error correction when calculating the global phase value, the applied error correction taking into account variations in contributions of different sensor elements of the plurality of sensor elements to the calculated global phase value.
2. The reading head according to claim 1, wherein: The error correction applied by the incremental position extractor depends on the embedded scale features identified in the snapshot image by the absolute position extractor.
3. A readhead according to any preceding claim, wherein The error correction applied by the incremental position extractor accounts for variations in scale feature density across the snapshot images.
4. A readhead according to any preceding claim, wherein The error correction applied by the incremental position extractor accounts for any offset or gain variations between the outputs of the plurality of sensor elements.
5. A readhead according to any preceding claim, wherein The incremental position extractor is configured to analyze the captured snapshot images using spatial frequency analysis to calculate the global phase value.
6. The reading head according to claim 5, wherein: The snapshot image captured by the image sensor includes a plurality of sensor output values from the plurality of sensor elements, and the incremental position extractor is configured to perform a discrete Fourier transform analysis in which each of the plurality of sensor output values is multiplied by a corresponding value in a cosine lookup table and a sine lookup table to provide a real phase component and an imaginary phase component from which the global phase value is calculated.
7. The reading head according to claim 6, wherein: The incremental position extractor is configured to apply the error correction by applying an error map or an error function to the values contained in the cosine lookup table and the sine lookup table, or by applying an error map or an error function when generating the cosine lookup table and the sine lookup table.
8. The reading head according to claim 6, wherein: The incremental position extractor is configured to apply the error correction by selecting a cosine lookup table and a sine lookup table from a plurality of different cosine lookup tables and sine lookup tables that incorporate different error corrections.
9. The reading head according to claim 6, wherein: The incremental position extractor is configured to apply the error correction in one of two ways: adjusting the real phase component and the imaginary phase component before calculating the global phase value to generate the global phase value, or adjusting a preliminary global phase value derived from the real phase component and the imaginary phase component to generate the global phase value.
10. A readhead according to any preceding claim, wherein The applied error correction is calculated prior to using the readhead with the encoder scale.
11. A read head according to any one of claims 1 to 9, wherein: The incremental position extractor is configured to calculate the error correction based on one or more captured snapshot images of the encoder scale during use of the readhead having an encoder scale, the error correction being determined by analyzing a substantially periodic pattern of scale markings in a plurality of sub-regions of each snapshot image and determining an apparent phase difference in the substantially periodic pattern of scale markings between the sub-regions.
12. A readhead according to any preceding claim, wherein The image sensor is an optical image sensor configured to read an optical encoder scale, the optical image sensor comprising a plurality of optical sensor elements.
13. An encoder device comprising a readhead according to any preceding claim and an encoder scale having a series of scale marks arranged in a generally periodic pattern that encode incremental position information, the series of scale marks also including embedded scale features that encode absolute position information.
14. The encoder device according to claim 13, wherein: The embedded scale feature includes omitted scale markings.
15. A method of analyzing a snapshot image of an encoder scale captured by a readhead, the encoder scale having a series of scale marks arranged in a generally periodic pattern encoding incremental position information, the series of scale marks also including embedded scale features encoding absolute position information, The method comprises the following steps: (i) identifying any embedded scale features present in the snapshot image and calculating therefrom the absolute position of the readhead relative to the encoder scale, (ii) calculating a global phase value describing the incremental position of the readhead relative to the encoder scale by analysing a substantially periodic pattern of scale markings present in the snapshot images, and (iii) determining the position of the readhead relative to the encoder scale based on the absolute position calculated in step (i) and the global phase value calculated in step (ii), Characterized in that step (ii) comprises applying an error correction when calculating the global phase value, the error correction taking into account the variation of the contribution of different regions of the snapshot image to the calculated global phase value.
Citation Information
Patent Citations
Absolute position measurement
US7499827B2
Position encoder apparatus
WO2010116144A2
Position measurement encoder and method of operation
WO2010139964A2