Disclosure of Invention
In order to overcome the defects of the prior art, the linear array image sensor is adopted to realize the identification and subdivision of the displacement, and higher resolution and measurement precision can be realized compared with the traditional technology. And the image recognition system adopts full digital operation, so that the anti-interference capability is stronger and the service life is longer. In order to achieve the purpose, the invention adopts the following specific technical scheme:
an absolute grating scale comprising: the scale, the sliding guide rail and the reading head arranged on the sliding guide rail;
the sliding guide rail is parallel to the extending direction of the scale body of the scale and is vertical to the coding marking surface of the scale body(ii) a The numerical values represented by any N adjacent coding marked lines in the M coding marked lines on the ruler form a group containing N coding elements Xi,Xi+1,…,Xi+N-2,Xi+N-1Obtaining a coded value C of the corresponding coded value, wherein i is 1, 2, …, M;
and (3) calculating and acquiring a subdivision value S by using an image acquired by a reading head through an equation (1):
in the formula, Z1And Z2Respectively the centroid positions of two adjacent coding marked lines;
Zcrepresenting a center point of the image;
K=2Mrepresents the subdivision factor;
and combining the subdivision value S with the decoding value C to obtain a linear displacement measurement value Data.
Preferably, the M coding marked lines on the ruler body are positioned on the same transverse shaft, the coding marked lines are transparent rectangular marked lines, and the distances between the centers of mass are the same.
Preferably, the coding markings comprise a wide coding marking and a narrow coding marking; the wide code scale line represents code element "1", and the narrow code scale line represents code element "0".
Preferably, the width D of the wide code reticle1Not more than L/M; width D of narrow coded reticle2Not more than L/2M; l is the measurement length.
Preferably, N is the number of binary bits of the number M of coded markings, M being 2NAnd N is a preset value.
Preferably, the ith symbol XiCalculated from the following formula:
in the formula (I), the compound is shown in the specification,
representing an exclusive or operation;
a1~aNthe coefficients are respectively calculated to have values of "1" or "0", and are not all "0".
Preferably, the measurement Data is calculated by:
Data=C×K+S (3)。
preferably, the reading head comprises: the linear array image sensor, the data processing circuit, the light emitting module and the sliding support;
the linear array image sensor and the light-emitting module are respectively positioned at the upper side and the lower side of the scale through the support of the sliding support and are close to the scale, so that the image receiving of the coding mark line is realized;
the pixel arrangement direction of the linear array image sensor is parallel to the arrangement direction of the coding marked lines;
the light emitting module is used for providing light rays penetrating through the coding marked line;
the data processing circuit is used for receiving the image data of the linear array image sensor, and performing subdivision operation according to the image data to realize decoding operation.
Preferably, the light emitting module can cover parallel light sources of N adjacent code marked lines, and the diameter of a light spot emitted by the light emitting module is not less than N.L/M.
Preferably, the device also comprises an output cable which is connected with the reading head and outputs the measurement Data obtained by calculation processing.
The invention can obtain the following technical effects:
1. the linear array image sensor is adopted to realize the identification and subdivision of the displacement, and higher resolution and measurement precision can be realized compared with the traditional technology.
2. The full-digital operation image recognition system is adopted, so that the anti-jamming capability is stronger and the service life is longer.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention.
The invention aims to provide an image type high-resolution absolute grating scale, which can simply and conveniently realize image recognition of a coding marking on the scale, and further realize high-resolution and high-precision linear displacement measurement. The absolute grating ruler provided by the invention will be described in detail through specific embodiments.
As shown in fig. 1, comprises a scale 1, a reading head 2 and a sliding guide rail 4; the sliding guide rail 4 is positioned on the scale 1, is parallel to the extending direction of the scale body 11 and is vertical to the surface of the scale body 11 with the coded marked lines 12; the reading head 2 is mounted on the slide rail 4 and can linearly move along the slide rail 4.
A group of numerical values containing N coding elements X is formed by numerical values represented by any N adjacent coding marked lines 12 in M coding marked lines 12 on the ruler body 11i,Xi+1,…,Xi+N-2,Xi+N-1(i-1, 2, …, M), and obtaining a decoding value C of the corresponding encoding value by looking up a table;
and then, obtaining a subdivision value S through calculation by utilizing an image acquired by the reading head 2, and combining the subdivision value S with the decoding value C to obtain a linear displacement measurement value Data of the grating ruler.
In another embodiment of the invention, the readhead 2 is used to achieve a searchlight on the scale 1, and the readhead 2 will always maintain a searchlight on the scale 1 as the readhead 2 moves along the sliding guide 4.
In a preferred embodiment of the present invention, as shown in FIG. 2, the scale body 11 of the scale 1 has M code marks 12 on the same horizontal axis, in terms of X1~XMThe coding marked lines 12 are all transparent rectangular marked lines, and the distances between the centers of mass are the same. And if the measurement length of the absolute grating ruler is L, the distance between the centroids of the adjacent code marked lines 12 is L/M.
With continued reference to fig. 2, the code reticle 12 contains a wide code reticle 121 representing a code element of "1" and a narrow code reticle 122 representing a code element of "0". Wherein, the width D of the wide code marking 1211Not more than L/M; width D of narrow code reticle 1222Not more than L/2M.
The values represented by the wide code markings 121 and the narrow code markings 122 form a group of N-bit shift cyclic codes, where N is the number of binary bits of the number M of code markings 12, and N is a preset value.
In a preferred embodiment of the invention, the coding element X is setiFor the value represented by the i-th code mark 12 (i ═ 1, 2, …, M), the N code marks 12 that are successively adjacent will form a group of code values, denoted by { X {i,Xi+1,…,Xi+N-2,Xi+N-1H, then the ith value X in the set of encoded valuesiCan be calculated by the formula (2):
in the formula (I), the compound is shown in the specification,
representing an exclusive or operation;
a1~aNare respectively an arithmetic coefficient, the value of which is "1 "is alternatively" 0 "and not all" 0 ".
Calculate each bit X in turniAnd the coefficient a is appropriately selected1~aNCan be calculated to a value of at most 2NAn encoded value. The corresponding value of i is the decoded value C.
In another embodiment of the invention, given different values of N, the corresponding coefficient values are: that is, when N is 7, a1~a7={1,0,1,0,1,1,1};
When N is 8, a1~a8={1,0,0,0,1,1,1,0,1};
When N is 9, a1~a9={1,0,0,0,0,1,0,0,0,1};
When N is 10, a1~a10={1,0,0,0,0,0,0,1,0,0,1}。
In a preferred embodiment of the present invention, as shown in fig. 3, the reading head 2 comprises a line image sensor 21, a data processing circuit 22, a light emitting module 23 and a sliding support 24.
The linear array image sensor 21 and the light-emitting module 23 are respectively positioned at the upper side and the lower side of the scale 1 through the support of the sliding support 24;
the linear array image sensor 21 is close to the scale 1, does not influence sliding, and realizes image receiving of the coding marked line 12; the pixel arrangement direction of the linear array image sensor 21 is parallel to the arrangement direction of the coding marked lines 12;
the light emitting module 23 is used for providing light rays penetrating the code marked line 12;
the data processing circuit 22 receives image data of the line image sensor 21, performs a subdivision operation on the image data, and performs a decoding operation.
In another embodiment of the present invention, the preset threshold Th ═ D (D)1+D2) The data processing circuit 22 performs binarization on the received image data, and determines that the symbol is "1" when the width of the collected code mark line 12 is larger than Th value and "0" when the width is smaller. N adjacent code elements X in each image acquisitioni,Xi+1,…,Xi+N-2,Xi+N-1Combining into a set of encoded values, and then looking up the corresponding decoding table (see table 1), the corresponding decoding value C, denoted as C ═ i, can be obtained.
Fig. 4 illustrates the subdivision principle of an embodiment of the invention, see fig. 4:
setting the position of the central line of the image as ZcThen the pixel values of the two code reticle 12 on either side of the position C adjacent thereto are retained according to the algorithm. Respectively calculating the centroid positions of the two coding marked lines 12 by adopting a centroid algorithm, and respectively recording the centroid positions as Z1And Z2Then, the subdivision operation can be expressed as equation (1):
combining the subdivision value S in equation (1) with the decoding value C, the linear displacement measurement value of the absolute grating scale can be obtained as follows:
Data=C×K+S (3)。
in a preferred embodiment of the present invention, the present invention further comprises an output cable 3 interconnected with the reading head 2 for outputting the calculated linear displacement measurement Data.
Fig. 5 shows a schematic structural diagram of another embodiment of the present invention, which includes: scale 1, reading head 2, output cable 3 and sliding guide 4.
In the reading head 2, the line image sensor 21 and the light emitting module 23 are located on the same side of the scale 1. The scale body 11 of the scale 1 is made of reflective materials, and the code marked lines 12 are made of non-reflective materials. The parallel light emitted by the light emitting module 23 is reflected by the ruler body 11, and then the pattern of the coding marked line 12 is reflected to the linear array image sensor 21, so that emission imaging is realized. And the current linear displacement information is obtained through the acquisition of the linear array image sensor 21 and the operation of the processing circuit 22.
Table 1 coding table N-7
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
The above embodiments of the present invention should not be construed as limiting the scope of the present invention. Any other corresponding changes and modifications made according to the technical idea of the present invention should be included in the protection scope of the claims of the present invention.