Methods for fabricating grating sensors, methods for measuring displacement, and grating sensors.
By using a grating sensor fabrication method, a unique sliding window array is generated, and grating images are acquired using optical conversion elements to achieve high-precision displacement measurement. This solves the problems of high processing difficulty and high cost in existing technologies and is suitable for cost-sensitive industrial applications.
Patent Information
- Application Number
- CN202511225543.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-29
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-08-29
AI Technical Summary
When existing grating sensors reduce the grating constant or increase the subdivision factor, the manufacturing difficulty and cost increase dramatically, and the signal stability is poor, making it difficult to achieve high-precision displacement measurement.
A method for fabricating a grating sensor is employed, which generates a unique sliding window array by determining the width and spacing of the grating fringes, acquires grating images using an optical conversion element, calculates the fringe center position, and achieves absolute position recognition and displacement measurement.
It reduces the precision requirements of processing equipment, simplifies the manufacturing process, lowers costs, and improves measurement accuracy and robustness, making it suitable for cost-sensitive industrial applications.
Smart Images

Figure CN120703902B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of measuring instrument technology, and in particular to a method for preparing a grating sensor, a displacement measurement method, and a grating sensor. Background Technology
[0002] A grating sensor is a sensor that utilizes the optical properties of a grating to achieve high-precision measurement of physical quantities such as displacement, velocity, and angle. It is widely used in CNC machine tools, precision instruments, and automated equipment. A grating sensor mainly consists of two parts: a main grating and an indicator grating.
[0003] The main grating is a transparent thin film or metal sheet with uniform parallel gratings. The spacing between the gratings is called the "grating constant", which is usually 0.01mm to 0.1mm. Its length is consistent with the measurement range and it is fixed on the object being measured.
[0004] Indicator grating: The grating density is the same as the main grating, the grating direction is slightly tilted, and it is fixed to the reading head of the sensor and does not move with the object being measured.
[0005] When the main grating and the indicator grating overlap and the grating lines form a small angle, light passing through the grating will form alternating bright and dark stripes, i.e., moiré fringes, which is the basis for the measurement of the grating sensor.
[0006] To improve the accuracy of a grating, the "grating constant" can be reduced or the "subdivision factor" can be increased.
[0007] The reduction of the grating constant directly depends on the precision of the scribing. The smaller the scribing spacing, the more exponentially the requirements for processing equipment and processes increase. Grating scribing needs to ensure uniformity in linewidth, parallelism, and depth consistency. When the grating constant shrinks to the micrometer or even sub-micrometer level, the scribing width may be only 0.25 μm. At this point, any minute processing vibration, temperature fluctuation, or tool / laser beam drift will cause distortion in the scribing shape. For long-stroke measurements, reducing the grating constant requires ensuring that the cumulative error of the scribing spacing over the entire length is <1 μm. This demands extremely high levels of straightness in the guide rails and positional accuracy in the drive system of the processing equipment, and even minor deformations of mechanical components can disrupt consistency. After reducing the grating constant, the contrast of the moiré fringes decreases, easily causing unstable fringe signals; processing cycles lengthen, scrap rates increase, leading to a sharp increase in costs: high-precision scribing machines can cost millions of dollars each, and can only process gratings a few centimeters long per hour; the time costs for material selection and post-processing inspection increase significantly, making mass production extremely difficult.
[0008] The precision of subdivision directly depends on the sinusoidal nature and symmetry of the moiré fringes. However, real signals often have distortions. The higher the subdivision factor, the more stringent the requirements for signal quality. Furthermore, the slight influence of environmental factors on the signal will be amplified by high subdivision, leading to unstable subdivision results. Small drifts in the signal will also cause fluctuations in the subdivision results.
[0009] In conclusion, whether reducing the "grating constant" or increasing the "subdivision factor", both require an exponential increase in the precision of materials or hardware, which undoubtedly poses a huge challenge to processing difficulty, production cost and subsequent maintenance. Summary of the Invention
[0010] The technical problem to be solved by the present invention is to provide a method for preparing a grating sensor, a method for measuring displacement, and a grating sensor, in view of the above-mentioned defects of the prior art.
[0011] To achieve the above objectives, in a first aspect, the present invention provides a method for fabricating a grating sensor, the method comprising the following steps:
[0012] Step A1: Determine the width value of the grating stripes based on the width value of a single pixel of the optical conversion element;
[0013] Step A2: Determine the minimum spacing between adjacent grating stripes based on the width value of the grating stripes;
[0014] Step A3: Based on the minimum spacing between adjacent fringes, the preset sliding window order K, the size and range of the optical conversion element, generate an array D of adjacent fringe distances for the grating, denoted as D=[d1, d2, ..., d]. M The adjacent fringe distance array D of the grating is a unique sliding window array of order K, that is, the subarray obtained by traversing with a sliding window of length K appears only once in the adjacent fringe distance array D of the grating.
[0015] Step A4: Determine the center position of each fringe in the grating according to the adjacent fringe distance array D;
[0016] Step A5: Process all stripes on the grating according to the center position of each stripe, the width value of the grating stripe, and the preset grating stripe length value.
[0017] In the grating sensor fabrication method of the present invention, in step A1, the width value of the grating stripes is 3 to 20 times the width value of a single pixel of the optical conversion element;
[0018] In step A2, the minimum spacing between adjacent stripes of the grating is 1.2-2.5 times the width of the grating stripe;
[0019] In step A3, the generated array D of adjacent grating stripe distances needs to satisfy the following condition: the sum of any K consecutive elements is less than the length of the optical conversion element.
[0020] Secondly, the present invention provides a method for measuring the displacement of a grating sensor, applied to a grating sensor prepared by the grating sensor preparation method described above, the method comprising the following steps:
[0021] Step B1: At the first measurement position, a target region is determined from the grating image acquired by the optical conversion element 3. The target region includes an image with at least K+1 stripes. The image with K+1 consecutive stripes is selected as the first calculation region, and a first offset value do and a first index value r are calculated for the first calculation region. The first offset value do is the distance from the center position of the first stripe image in the first calculation region to the starting point of the target region, and the first index value r is the index value of the first element in the first distance array D1 between the center positions of adjacent stripe images in the first calculation region in the grating adjacent stripe distance array D.
[0022] Step B2: At the second measurement position, select an image of K+1 consecutive stripes in the target area as the second calculation area, and calculate the second offset value do and the second index value u of the second calculation area.
[0023] Step B3: Calculate the displacement value d based on the first offset value do, the second offset value ds, the first index value r, the second index value u, and the grating adjacent fringe distance array D. total and displacement direction; the specific method is as follows:
[0024] d total =ds-do+dv;
[0025] When r > u, dv = ;
[0026] When r=u, dv=0;
[0027] When r < u, dv = .
[0028] In the grating sensor displacement measurement method of the present invention, the specific method for selecting the image of K+1 consecutive stripes as the first calculation region in step B1 is as follows:
[0029] A brightness threshold is determined based on the brightness of the center position of each stripe image in the target area or the global area. Within the target area, K+1 consecutive stripes whose brightness at the center position exceeds the brightness threshold are selected as the first calculation area.
[0030] The target region includes a first calculation region and at least one first correction region. The first correction region includes at least one stripe image and is used to correct the first index value r.
[0031] In the grating sensor displacement measurement method of the present invention, in step B1, the method for calculating the first offset value do and the first index value r of the first calculation region is as follows:
[0032] Calculate the centroid coordinates of K+1 stripe images in the first calculation region, and obtain the first offset value do based on the centroid coordinates of the first stripe image and the starting coordinates of the target region.
[0033] The distance between the center positions of adjacent fringe images is calculated sequentially based on the centroid position coordinates, and the first distance array D1 is obtained by combining them in order. The first distance array D1 is compared with the grating adjacent fringe distance array D, and the index value of the first element in the first distance array D1 in the grating adjacent fringe distance array D is determined as the first index value r.
[0034] The method for calculating the second offset value ds and the second index value u of the second calculation region is the same as the method for calculating the first offset value do and the first index value r of the first calculation region in step B1.
[0035] In the grating sensor displacement measurement method of the present invention, the method for comparing the first distance array D1 with the grating adjacent fringe distance array D to determine the index value of the first element in the first distance array D1 in the grating adjacent fringe distance array D is as follows:
[0036] Traverse the adjacent fringe distance array D of the grating, and take K consecutive values from it each time as a temporary array. If the value of the temporary array is exactly the same as the first distance array D1, then return the index value of the first element in the temporary array in the adjacent fringe distance array D of the grating.
[0037] In the grating sensor displacement measurement method of the present invention, the method for comparing the first distance array D1 with the grating adjacent fringe distance array D to determine the index value of the first element in the first distance array D1 in the grating adjacent fringe distance array D is as follows:
[0038] Traverse the adjacent fringe distance array D of the grating, and take K consecutive values from it each time as a temporary array. Calculate the overall error between the temporary array and the first distance array D1, and return the index value of the first element in the temporary array corresponding to the minimum overall error in the adjacent fringe distance array D of the grating.
[0039] In the grating sensor displacement measurement method of the present invention, after step B3, a displacement correction factor W is calculated based on the first distance array D1, the first index value r, the first distance array D2, the first index value u, and the grating adjacent fringe distance array D, and the displacement value d is corrected based on the correction factor W. total The specific formula is as follows:
[0040] D1=[dt1,dt2,...,dt K ],
[0041] D2=[ds1,ds2,...,ds K ],
[0042] W1=(dt1+dt2+...+dt K ) / (d r +d r+1 +...+d r+K-1 ),
[0043] Or W1=Sqrt((dt1) 2 +dt2 2 +...+dt K 2 ) / (d r 2 +d r+1 2 +...+d r+K-1 2 )),
[0044] W2=(ds1+ds2+...+ds K ) / (d u +d u+1 +...+d u+K-1 ),
[0045] Or W2=Sqrt((ds1 2 +ds2 2 +...+ds K 2 ) / (d u 2 +d u+1 2 +...+d u+K-1 2 )),
[0046] W = W1, or W = (W1 + W2) / 2, or W = Sqrt((W1 + W2) / 2) 2 +W2 2 ) / 2), or W=Min(W1,W2), or W=Max(W1,W2);
[0047] Corrected total displacement d of the objecttotal =ds-do+W*dv.
[0048] Thirdly, the present invention also provides a grating sensor, including a light-emitting device, a grating, an optical conversion element, a hardware circuit board, a housing, a control device, and an input / output device;
[0049] The grating has multiple stripes arranged in parallel, and the extension direction of the stripes is perpendicular to the length direction of the grating.
[0050] The array D of adjacent grating fringe distances is a unique sliding window array of order K, meaning that the subarray obtained by traversing the array with a sliding window of length K appears only once in the array;
[0051] The light-emitting device is fixed to the outer casing;
[0052] The optical conversion element is fixed on the hardware circuit board, and the hardware circuit board is fixed on the housing; the optical conversion element is arranged along a direction perpendicular to the optical axis of the light-emitting device after reflection or transmission through the grating and parallel to the length of the grating.
[0053] The light emitted by the light-emitting device forms a grating image within the optical conversion element after passing through the grating;
[0054] The hardware circuit board is used to receive the grating image data output by the optical conversion element and transmit it to the control device.
[0055] The control device calculates the displacement based on the grating image data;
[0056] The input / output device is used to set parameters and display displacement calculation results.
[0057] In the grating sensor of the present invention, the light-emitting device and the optical conversion element are located on the same side of the grating, and the stripes on the grating are reflective stripes or non-reflective stripes. The parallel light emitted by the light-emitting device is reflected by the grating and received by the optical conversion element on the same side to form a grating image.
[0058] or:
[0059] The light-emitting device and the optical conversion element are located on opposite sides of the grating, and the stripes on the grating are either light-transmitting stripes or opaque stripes.
[0060] The present invention has the following beneficial effects:
[0061] The grating sensor provided by this invention requires only one grating with multiple parallel stripes, the stripes extending perpendicularly to the length of the grating. The spacing between adjacent stripes forms a unique K-order sliding window array D, meaning that all subarrays obtained by traversing this spacing array with a sliding window of length K are unique within this array. During measurement, images of K+1 consecutive stripes are acquired at different measurement positions using an optical conversion element. The center-to-center spacing between adjacent stripe images is calculated to form a local spacing sequence, which is then matched with the preset grating stripe spacing array D to determine the sensor's absolute position on the grating, and the displacement is further calculated. Compared to traditional grating sensors, this invention utilizes a stripe coding pattern with unique sliding window characteristics to achieve direct identification of the absolute position without relying on high-precision subdivision circuits or complex signal processing algorithms. Because the requirements for stripe edge sharpness and geometric accuracy are significantly reduced, high-precision displacement measurement can be achieved even with wide stripes and relatively low processing precision, effectively reducing grating manufacturing costs.
[0062] In summary, the grating sensor of this invention has a simple structure, a straightforward fabrication process, and low precision requirements for processing equipment, making it highly practical and scalable. It is suitable for cost-sensitive industrial applications requiring high measurement accuracy. Furthermore, the displacement calculation method of this invention is simple, efficient, and robust, requiring no complex signal processing algorithms, and is well-suited for high-speed, real-time applications. Attached Figure Description
[0063] The accompanying drawings, which are provided to further illustrate the invention and constitute a part of this invention, are illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention.
[0064] Figure 1 This is a schematic diagram of the grating sensor structure provided in Embodiment 1 of the present invention.
[0065] Figure 2 This is a schematic diagram of the steps involved in fabricating a grating sensor according to Embodiment 1 of the present invention.
[0066] Figure 3 This is a schematic diagram of the displacement measurement method using a grating sensor provided in Embodiment 1 of the present invention.
[0067] Figure 4-6 This is a schematic diagram of a grating image provided in Embodiment 1 of the present invention.
[0068] Figure 7 This is a schematic diagram of the grating sensor structure provided in Embodiment 4 of the present invention.
[0069] In the attached drawings: 1. Light-emitting device; 2. Grating; 3. Optical conversion element; 4. Hardware circuit board; 5. Housing; 6. Control device; 7. Input / output device. Detailed Implementation
[0070] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0071] The embodiments of the present invention will now be described in further detail with reference to the accompanying drawings. It should be understood that the embodiments described herein are for illustrative and explanatory purposes only and are not intended to limit the scope of the invention.
[0072] Example 1
[0073] like Figure 1 As shown, this embodiment provides a grating sensor, including a light-emitting device 1, a grating 2, an optical conversion element 3, a hardware circuit board 4, a housing 5, a control device 6, and an input / output device 7. The grating 2 has multiple parallel stripes, the extension direction of which is perpendicular to the length direction of the grating 2. The distance array D between adjacent stripes is a unique sliding window array of order K, meaning that the subarray obtained by traversing this array with a sliding window of length K appears only once in the array. The light-emitting device 1 is fixed to the housing 5. The optical conversion element 3 is fixed to the hardware circuit board 4, which in turn is fixed to the housing 5. The optical conversion element 3 is arranged along a direction perpendicular to the optical axis of the light-emitting device 1 after reflection or transmission through the grating 2 and parallel to the length direction of the grating 2. The light emitted by the light-emitting device 1 forms a grating image within the optical conversion element 3 after passing through the grating 2. The hardware circuit board 4 receives the grating image data output by the optical conversion element 3 and transmits it to the control device 6. The control device 6 calculates the displacement based on the grating image data. The input / output device 7 is used to set parameters and display the displacement calculation results.
[0074] In this embodiment, the light-emitting device 1 is an LED or laser light source.
[0075] like Figure 1As shown, in this embodiment, the light-emitting device 1 and the optical conversion element 3 are located on the same side of the grating 2. The stripes on the grating 2 are reflective or non-reflective stripes. The light emitted by the light-emitting device 1 is reflected by the grating 2 and received by the optical conversion element 3 on the same side to form a grating image. The arrangement of the light-emitting device 1 and the optical conversion element 3 on the same side of the grating 2 is suitable for situations where single-sided installation is limited. Compared to situations where the light-emitting device 1 and the optical conversion element 3 are located on opposite sides of the grating 2, this arrangement offers stronger resistance to environmental interference such as dust and oil.
[0076] There is no need for an additional collimating lens to generate parallel light between the light-emitting device 1 and the grating 2, or a collimating lens to generate parallel light can be placed there.
[0077] The grating 2 is typically made of metal or a substrate material coated with a metal film. Reflective and / or non-reflective stripes are arranged according to a preset pattern on the grating 2; for example, the etched lines are reflective stripes, while the non-etched lines are non-reflective, or vice versa. Light emitted from the light-emitting device 1 enters from one side of the grating 2. After the light hits the surface of the grating 2, the reflective stripes reflect the light, thus forming a light spot on the optical conversion element 3, while the non-reflective stripes absorb or scatter the light, thus forming a shadow on the optical conversion element 3.
[0078] Specifically, the array D of adjacent grating fringe distances is a unique sliding window array of order K, meaning that the subarray obtained by traversing this array with a sliding window of length K appears only once in the array. Assuming the total number of fringes on grating 2 is M+1, then the array D of adjacent grating fringe distances is [d1, d2, ..., d...]. M ], where d1 is the distance between the center of the first fringe and the center of the second fringe, d2 is the distance between the center of the second fringe and the center of the third fringe, and so on, d MLet be the distance between the center position of the Mth fringe and the center position of the (M+1)th fringe. When traversing the adjacent fringe distance array D of the grating with a sliding window of length K, each time a subarray containing K elements is obtained, and each subarray appears only once in the adjacent fringe distance array D. Therefore, by calculating the distance between the center positions of adjacent fringes through the images of K+1 consecutive fringes, the absolute position of these fringes on the grating 2 can be determined, thereby realizing displacement measurement. To reduce the manufacturing difficulty of the grating 2, the width of each fringe on the grating 2 is equal. Because the determination of the absolute position depends on the distance between the center positions of adjacent fringes, and in the fringe processing process, the center position of each fringe is first determined, and then fringe of a preset width is processed based on the center position, so even if there is a large processing error in the width of the fringe or the size of the burrs on the edge of the fringe is large, as long as the accuracy of the center position of each fringe is sufficient, the accuracy of displacement measurement can be guaranteed. In addition, in this embodiment of the invention, there is no special requirement for the length of the fringe, as long as the fringe can form a clear image on the optical conversion element 3, that is, the length of the fringe needs to be greater than the pixel height of the optical conversion element 3. The pixel height of optical conversion element 3 is typically 50 to 150 micrometers.
[0079] Compared to traditional grating sensors that use moiré fringes, the grating sensor in this embodiment only requires a grating scale with a cleverly designed fringe spacing to achieve accurate displacement calculation. The fringe width can be designed to be relatively large, and the requirements for fringe processing accuracy are not high. This significantly improves the yield of grating sensor products, reduces the processing difficulty and cost of fringe, shortens the quality inspection process, and improves processing efficiency.
[0080] In this embodiment, the width of the grating stripes is 3 to 20 times the width of a single pixel of the optical conversion element. The width of a single pixel of the optical conversion element, i.e., the pixel size, is a key parameter with a wide range of values, determined after the element is selected. If the width of the grating stripes is too small, it is difficult to accurately calculate the centroid coordinates of a single stripe image; if the width is too large, the image of the stripes captured by the optical conversion element lacks obvious peaks and troughs, affecting measurement accuracy. Experimental verification shows that when the width of the grating stripes is 3 to 20 times the width of a single pixel of the optical conversion element, a more ideal grating image can be obtained, ensuring measurement accuracy.
[0081] If the distance between adjacent stripes in grating 2 is too small, the light emitted by the light-emitting device will diffract after passing through the adjacent stripes, illuminating the entire optical conversion element 3 and making it impossible to acquire an image of grating 2. If the distance between adjacent stripes is too large, the number of stripes per unit area of the optical conversion element 3 will decrease, which is not conducive to product miniaturization and also increases the cost. In this embodiment, the minimum spacing between adjacent stripes of the grating is 1.2-2.5 times the width of the grating stripes.
[0082] The grating sensor in this embodiment can be used as a grating ruler. For example, the grating 2 is fixed on a machine tool guide rail, and the light-emitting device 2, optical conversion element 3, hardware circuit board 4 and housing 5 are made into a reading head, which moves along the length of the grating 2.
[0083] The grating sensor in this embodiment can also be used as a contact displacement meter. In this case, the grating 2 moves in a predetermined direction through a structural component such as a bearing, and its end is connected to a probe. The probe can extend out of the housing 5. An elastic body such as a spring or a pneumatic valve can be provided between the grating 2 and the housing 5 to offset the probe in the extension direction.
[0084] In this embodiment, the optical conversion element 3 is an image sensor, comprising optical conversion units arranged at predetermined intervals, such as a complementary metal-oxide-semiconductor image sensor, a charge-coupled device image sensor, etc. The plurality of optical conversion units constituting the optical conversion element 3 are arranged along a length direction perpendicular to the optical path and parallel to the grating 2. The optical conversion element 3 is attached to the hardware circuit board 4 by means of patching or soldering and is electrically connected to the hardware circuit board 4. Light from the light-emitting device 1 passes through the grating 2 with a specific pattern as described above, forming a grating pattern in a corresponding region on the optical conversion element 3.
[0085] like Figure 2 As shown, this embodiment also provides a method for fabricating a grating sensor, wherein the method for fabricating a grating sensor includes the following steps:
[0086] Step A1: Determine the width value of the grating stripes based on the width value of a single pixel of the optical conversion element.
[0087] In this embodiment of the invention, in step A1, the width of the grating stripe is 3 to 20 times the width of a single pixel of the optical conversion element.
[0088] Step A2: Determine the minimum spacing between adjacent grating stripes based on the width value of the grating stripes.
[0089] In this embodiment, in step A2, the minimum spacing between adjacent stripes of the grating is 1.2-2.5 times the width of the grating stripe.
[0090] Step A3: Based on the minimum spacing between adjacent fringes, the preset sliding window order K, the size and range of the optical conversion element, generate an array D of adjacent fringe distances for the grating, denoted as D=[d1, d2, ..., d]. M The grating adjacent fringe distance array D is a unique sliding window array of order K, that is, the subarray obtained by traversing with a sliding window of length K appears only once in the grating adjacent fringe distance array D.
[0091] This embodiment does not impose any special restrictions on the specific algorithm for generating the adjacent fringe distance array D of the grating, as long as the generated array is a unique sliding window array of order K. To obtain a sufficient number of fringe images for accurate displacement calculation, the generated adjacent fringe distance array D needs to satisfy the following condition: the sum of any K consecutive elements is less than the length of the optical conversion element. The range of the grating is approximately equal to the sum of the values of all elements in the adjacent fringe distance array D.
[0092] Step A4: Determine the center position of each fringe in the grating according to the adjacent fringe distance array D;
[0093] Step A5: Process all stripes on the grating according to the center position of each stripe, the width value of the grating stripe, and the preset grating stripe length value.
[0094] In one specific embodiment of this example, the width of a single pixel of the optical conversion element is 10 micrometers, the width of the grating stripes is 180 micrometers, K=3, M=6, D=[270,300,330,290,350,310], and the sliding window subarray is: [270,300,330], [300,330,290], [330,290,350], [290,350,310], and the center positions of the 7 stripes are 90μm, 540μm, 1020μm, 1530μm, 2000μm, 2530μm, and 3020μm respectively.
[0095] In another specific embodiment of this example, the width of a single pixel of the optical conversion element is 6 micrometers, the width of the grating stripes is 150 micrometers, K=4, M=9, D=[225,250,280,300,240,260,290,310,230], and the sliding window subarray is: [225,250,280,300], [250,280,300,240], [280 The center positions of the 10 stripes are 75μm, 450μm, 850μm, 1280μm, 1730μm, 2120μm, 2530μm, 2970μm, 3430μm, and 3810μm, respectively.
[0096] In this embodiment, after calculating the distance array D between adjacent grating fringes, the center position of each fringe can be determined. Then, by combining the fringe width value determined in step A1 and the preset grating fringe length value, all the fringe can be processed. After the center position of the fringe is determined, if there is an error in the processing, the error is usually symmetrical about the center position. For example, if the width on one side of the center position is 5% smaller than the design value, the width on the other side is also 5% smaller than the design value. Therefore, even if there are errors in the processing of the fringe width and length, the displacement can still be accurately calculated later by using the center position of the fringe.
[0097] The grating sensor in this embodiment has a simple structure, a simple manufacturing process, and low requirements for the precision of processing equipment. It has high practicality and scalability, and is suitable for industrial applications that are cost-sensitive and require high measurement accuracy.
[0098] In this embodiment, information such as the preset sliding window order K of the grating sensor, the size of the optical conversion element, the distance array D between adjacent grating fringes, and the fringe width are stored in a non-volatile memory on the hardware circuit board 4 or in the control device 6. The control device 6 can then perform displacement measurement based on this information. Specifically, for example... Figure 3 As shown, the displacement measurement method using a grating sensor includes the following steps:
[0099] Step B1: At the first measurement position, a target region is determined from the grating image acquired by the optical conversion element 3. The target region includes an image with at least K+1 stripes. The image with K+1 consecutive stripes is selected as the first calculation region, and a first offset value do and a first index value r are calculated for the first calculation region. The first offset value do is the distance from the center position of the first stripe image in the first calculation region to the starting point of the target region, and the first index value r is the index value of the first element in the first distance array D1 between the center positions of adjacent stripe images in the first calculation region in the grating adjacent stripe distance array D.
[0100] The first measurement position is the starting point of the displacement and can be any position on the grating 2. First, the target region needs to be determined from the grating image acquired by the optical conversion element 3. Then, the absolute position corresponding to the first measurement position is calculated based on the fringe image of the first measurement position within the target region. For example... Figure 4 The diagram shows a grating image obtained by the optical conversion element. The X-axis represents the pixel position on the optical conversion element 3, and the Y-axis represents the pixel brightness at that position. The width Dt of the target region must satisfy: Dt ≥ Max That is, the width of the target area is not less than the maximum value of the sum of K+1 consecutive distances in the distance array D of adjacent grating fringes, so that at least K+1 fringes can be found in the target area. The starting point of the target area can be flexibly determined according to the distribution of peaks in the grating image, so that the target area can cover the K+1 consecutive fringes with the largest brightness value. Usually, the middle position of the optical conversion element 3 is selected as the target area.
[0101] After the target region is determined, the region containing K+1 stripe images needs to be selected as the first calculation region. In some embodiments of the present invention, in step B1, at the first measurement position, the target region includes the first calculation region and at least one first correction region, the first correction region including at least one stripe image, and the first correction region is used to correct the first index value r.
[0102] In this embodiment, the specific method for selecting the image with K+1 consecutive stripes as the first calculation region in step B1 is as follows:
[0103] A brightness threshold is determined based on the brightness of the center position of each stripe image in the target region or global region. Within the target region, K+1 consecutive stripes whose brightness at the center position exceeds the brightness threshold are selected as the first calculation region. The global region refers to the entire coverage area along the X-axis. Figure 5This is a schematic diagram of the grating image at the first measurement position. The boxes represent the target area, which includes 5 stripe images (numbered 1, 2, 3, 4, and 5 within the boxes in the diagram each correspond to one stripe image). Assume the X-axis coordinate range of the target area is [600, 800], and the global area's X-axis coordinate range is [0, 1350], in μm, with K=3. Assume the minimum brightness value at the center of each stripe image in the global area is gmin=950, and the maximum brightness value is gmax=2450. Assume the brightness threshold is gs=(gmin+gmax) / 2=1550. Identify the first K+1=4 consecutive sub-regions whose brightness exceeds the specific value gs as the main calculation area. For example, select... Figure 5 The four consecutive stripe image regions 1, 2, 3, and 4 are used as the first calculation region, while region 5 is used as the correction region.
[0104] In this embodiment, the method for calculating the first offset value do and the first index value r of the first calculation region in step B1 is as follows:
[0105] Calculate the centroid coordinates of K+1 stripe images in the first calculation region, and obtain the first offset value do based on the centroid coordinates of the first stripe image and the starting coordinates of the target region.
[0106] The distance between the center positions of adjacent fringe images is calculated sequentially based on the centroid position coordinates, and the first distance array D1 is obtained by combining them in order. The first distance array D1 is compared with the grating adjacent fringe distance array D, and the index value of the first element in the first distance array D1 in the grating adjacent fringe distance array D is determined as the first index value r.
[0107] by Figure 5 For example, the centroid coordinates of fringe images 1, 2, 3, and 4 are calculated respectively. The X-coordinates of the centroid coordinates are denoted as xo1, xo2, xo3, and xo4 respectively. The distances between the center positions of adjacent fringes are: dt1 = xo2 - xo1, dt2 = xo3 - xo2, dt3 = xo4 - xo3. The first offset value do = xo1 - x0, where x0 is the starting position coordinate of the selected target area. This can be recorded in the control device 6 during the initialization of the grating sensor, or it can be specified as needed, for example, by specifying the position coordinates of the target area through the input / output device 7, including the starting position x0 of the target area. The first distance array D1 is denoted as D1 = [dt1, dt2, dt3]. Then, D1 is compared with the elements in the distance array D between adjacent fringes of the grating to determine the index value r of dt1 in D.
[0108] In this embodiment, the method for comparing the first distance array D1 with the adjacent fringe distance array D of the grating to determine the index value of the first element in the first distance array D1 in the adjacent fringe distance array D of the grating is as follows:
[0109] Traverse the adjacent fringe distance array D of the grating, and take K consecutive values from it each time as a temporary array. If the value of the temporary array is exactly the same as the first distance array D1, then return the index value of the first element in the temporary array in the adjacent fringe distance array D of the grating.
[0110] by Figure 5 For example, the first distance array D1 is compared with each of the temporary arrays one by one. The comparison is considered successful only when the order and value of each element are exactly the same. For example, dt1=d r ,dt2=d r+1 ,dt3=d r+2 Then, the first index value can be determined as r. If the first index value r cannot be obtained from the fringe image of the first calculation region, then the first index value r is determined by combining a portion of the fringe image of the first calculation region with a portion of the image of the adjacent correction region. For example, Figure 5 If the first index value r cannot be determined using stripe images 1, 2, 3, and 4, then you can try determining the first index value r using stripe images 2, 3, 4, and 5 consecutively. Alternatively, even if the first index value r is determined using stripe images 1, 2, 3, and 4, you can determine a new index value using stripe images 2, 3, 4, and 5 to verify whether the first index value r is correct.
[0111] Step B2: At the second measurement position, select an image of K+1 consecutive stripes in the target area as the second calculation area, and calculate the second offset value do and the second index value u of the second calculation area.
[0112] The second measurement position is the endpoint of the displacement. At the second measurement position, the target area selected at the first measurement position is still used. However, due to the non-uniformity of the fringe spacing, the number of fringe images within the target area may differ from that at the first measurement position, and the positions of the fringes relative to the starting point of the target area may also differ. Therefore, at the second measurement position, it is necessary to reselect K+1 fringe images as the second calculation area.
[0113] The method for selecting an image of K+1 consecutive stripes in the target region as the second calculation region is the same as the method for selecting an image of K+1 consecutive stripes as the first calculation region in step B1. At the second measurement position, the target region includes a second calculation region and at least one second correction region. The second correction region includes at least one stripe image and is used to correct the second index value u. The method for calculating the second offset value ds and the second index value u of the second calculation region is the same as the method for calculating the first offset value do and the first index value r of the first calculation region in step B1.
[0114] Figure 6 This is a schematic diagram of the grating image at the second measurement position. The box represents the target area, which includes six fringe images. The brightness difference at the center of each fringe image is not significant. One to four consecutive fringe images can be selected as the second calculation area, or two to five or three to six consecutive fringe images can be selected. The fringe image area outside the second calculation area is used as the second correction area. Taking two to five consecutive fringe images as the second calculation area as an example, the centroid coordinates of areas 2, 3, 4, and 5 are calculated respectively. The X-coordinates of the centroid coordinates are denoted as xs1, xs2, xs3, and xs4, respectively. The distances between the center positions of adjacent fringes are ds1 = xs2 - xs1, ds2 = xs3 - xs2, and ds3 = xs4 - xs3, respectively. The second offset value is ds = xs1 - x0. The second distance array D2 is denoted as D2=[ds1, ds2, ds3]. Then, D2 is compared with the elements in the adjacent stripe distance array D of the grating to determine the index value u of ds1 in D.
[0115] Step B3: Calculate the displacement value d based on the first offset value do, the second offset value ds, the first index value r, the second index value u, and the grating adjacent fringe distance array D. total And the direction of displacement. The specific method is as follows:
[0116] d total =ds-do+dv;
[0117] When r > u, dv = ;
[0118] When r=u, dv=0;
[0119] When r < u, dv =
[0120] When d total When d > 0, the object moves in the positive direction. total When d < 0, the object moves in the opposite direction. total When the value is 0, the object does not move. Here, "positive" and "negative" simply refer to two relative directions, not specific directions. In practical applications, either the grating 2 or the outer shell 5 may be fixed, while there is relative motion between the grating 2 and the outer shell 5.
[0121] The grating sensor displacement measurement method provided in this embodiment first determines the target region from the grating image acquired by the optical conversion element at a first measurement position, selects at least K+1 stripes from the image, calculates the distance between the center positions of adjacent images, and compares it with the distance array D between adjacent grating stripes to obtain a first offset value and a first index value. Then, at a second measurement position, a second offset value and a second index value are obtained. Finally, the displacement is calculated based on the data obtained from the first and second measurement positions. This method is simple, efficient, and robust, requiring no complex signal processing algorithms, and is suitable for high-speed, real-time applications.
[0122] In this embodiment, the absolute position is calculated based on the distance between the center positions of the stripe image. It is understood that the stripes can be reflective or non-reflective (light-absorbing), so the stripe image can be a light spot or a shadow. If the stripe is a light spot, the center position of the stripe image is the brightest point; if the stripe is a shadow, the center position of the stripe image is the darkest point. For ease of calculation, a backlight spot can be generated by subtracting the brightness of the shadow stripe image from a specific brightness value, and its calculation method is the same as that of the light spot stripe. The first and second calculation regions need to be selected according to the type of stripe image, and the center position of the stripe image needs to be determined.
[0123] The displacement measurement accuracy of the grating sensor in this embodiment is determined by the pixel width, stripe width, and stripe spacing of the optical conversion element 3. With a fixed pixel width, the accuracy is typically one-fifth to one-twentieth of the pixel width. Compared to traditional grating sensors, the grating sensor in this embodiment uses stripe lines with a built-in pattern. Since there are no particularly strict requirements on the edges and dimensions of the stripes, the cost of the grating sensor can be significantly reduced. In scenarios where the grating lines are wide and the accuracy is poor, the overall calculation accuracy is improved without using a subdivision algorithm. For example, with a stripe width of 200 micrometers and a pixel width of 10 micrometers, an accuracy of 1 micrometer can be achieved.
[0124] Example 2
[0125] In Example 1, the index value is determined by directly comparing the first distance array D1, the second distance array D2, and the adjacent fringe distance array D of the grating. However, if various errors cause the X-coordinate of the centroid of each fringe to be a non-integer, resulting in the values in the first distance array D1 and the second distance array D2 also being non-integers, or even if they are integers, a completely identical subarray cannot be found in the adjacent fringe distance array D of the grating through direct numerical comparison, then the index value cannot be obtained. Figure 5 , Figure 6For example, based on Embodiment 1, xo1, xo2, xo3, xo4 and xs1, xs2, xs3, xs4 may not be integers, which means that dt1, dt2, dt3 and ds1, ds2, ds3 may also not be integers. Therefore, the corresponding first index value r and second index value u may not be found in the grating adjacent fringe distance array D.
[0126] In this embodiment, the above-mentioned problem is improved. Specifically, in this embodiment, the method for comparing the first distance array D1 with the adjacent fringe distance array D of the grating to determine the index value of the first element in the first distance array D1 in the adjacent fringe distance array D of the grating is as follows:
[0127] Traverse the adjacent fringe distance array D of the grating, and take K consecutive values from it each time as a temporary array. Calculate the overall error between the temporary array and the first distance array D1, and return the index value of the first element in the temporary array corresponding to the minimum overall error in the adjacent fringe distance array D of the grating.
[0128] Taking K=3 as an example, since the distance array D between adjacent grating fringes is a unique sliding window array of order K, it cannot match dt1 or ds1 individually. The overall similarity of the K tuples must be used as the basis for judgment to avoid mismatches caused by approximation errors of a single element. Let the error e(df, di) = df - di, where df is the actual distance difference between dt1, dt2, dt3 or ds1, ds2, ds3, etc., and di is the temporary array in D. Then, by traversing all temporary arrays of length K in D through the sliding window, the overall similarity is calculated:
[0129] For the target triple (e.g., [dt1, dt2, dt3]), iterate through all sliding windows of length 3 in D [d n , d n+1 ,d n+2 (n ranges from 1 to M-2), calculate the overall error between the subarray within the window and the target triplet, and select the window with the smallest overall error as the approximate match. The overall error can be calculated using any of the following methods:
[0130] 1. Average error: En = {e(dt1,dt2)} n )+e(dt2,d n+1 )+e(dt3,d n+2 )} / 3
[0131] 2. Root mean square error: En = Sqrt({e(dt1,dt2)} n ) 2 +e(dt2,d n+1 ) 2 +e(dt3,d n+2 ) 2} / 3)
[0132] 3. Maximum error: En = Max(e(dt1,dt2)) n ), e(dt2,d n+1 ), e(dt3,d n+2 ))
[0133] The window with the smallest En can be directly selected as the optimal solution, or a maximum acceptable overall error threshold T can be set. If the En of a certain window is less than or equal to T, then the window is considered a valid approximate match. If multiple valid windows exist, the window with the smallest En is selected as the optimal solution. If the En of all windows is greater than T, an error is reported, and the grating 2 is checked for damage or whether the value of T is set correctly. Typically, T is required to be less than or equal to min(dm) / 2, where dm is any element in the array of adjacent fringe distances D of the grating.
[0134] The displacement measurement method using a grating sensor provided in this embodiment further improves the robustness and measurement accuracy of the displacement measurement algorithm.
[0135] Example 3
[0136] This embodiment, based on Embodiment 2, further corrects the displacement measurement results to improve the accuracy of displacement calculation.
[0137] Specifically, the displacement correction factor W is calculated based on the first distance array D1, the first index value r, the first distance array D2, the first index value u, and the grating adjacent fringe distance array D, and the displacement value d is corrected based on the correction factor W. total The specific formula is as follows:
[0138] D1=[dt1,dt2,...,dt K ],
[0139] D2=[ds1,ds2,...,ds K ],
[0140] W1=(dt1+dt2+...+dt K ) / (d r +d r+1 +...+d r+K-1 ),
[0141] Or W1=Sqrt((dt1) 2 +dt2 2 +...+dt K 2 ) / (d r 2 +d r+1 2 +...+d r+K-1 2)),
[0142] W2=(ds1+ds2+...+ds K ) / (d u +d u+1 +...+d u+K-1 )
[0143] Or W2=Sqrt((ds1 2 +ds2 2 +...+ds K 2 ) / (d u 2 +d u+1 2 +...+d u+K-1 2 ))
[0144] W = W1, or W = (W1 + W2) / 2, or W = Sqrt((W1 + W2) / 2) 2 +W2 2 ) / 2), or W=Min(W1,W2), or W=Max(W1,W2);
[0145] Corrected total displacement d of the object total =ds-do+W*dv.
[0146] In one specific embodiment of this example, the width of a single pixel of the optical conversion element is 10 micrometers, the width of the grating stripes is 180 micrometers, K=3, M=6, D=[270,300,330,290,350,310], the middle region of the optical conversion element is selected, and the X-axis coordinate range [400μm,1600μm] is taken as the target region. Through global grating image brightness analysis, the global brightness range is 950-2450, and the mean is taken +100 to filter clear stripes, resulting in a brightness threshold gs of 1600. The displacement correction factor is calculated as W=(W1+W2) / 2. The target region contains stripes 2, 3, 4, and 5, and the first calculation region is determined to be the image region of stripes 2-5, with stripes 1 and 6 as the first correction region.
[0147] Using a brightness-weighted algorithm, the centroid X coordinates of stripes 2-5 are 542μm, 1018μm, 1531μm, and 2002μm, respectively; the first offset value do = 542-400 = 142μm; dt1 = 1018-542 = 276μm, dt2 = 1531-1018 = 313μm, and dt3 = 2002-1531 = 471μm, so D1 = [276, 313, 471].
[0148] The method for matching the first index value r is as follows: traverse the array D of adjacent stripe distances of the grating, take 3 consecutive elements as subarrays, and calculate the root mean square error (En) between each subarray and D1. The results are: En≈82.3 for subarray [270,300,330]; En≈138.5 for subarray [300,330,290]; En≈105.1 for subarray [330,290,350]; En≈121.7 for subarray [290,350,310]. The subarray with the smallest En is [270,300,330], and the index of its first element in D is 1. Therefore, the first index value r=1.
[0149] After the object under test moves, a grating image is acquired at the second measurement position. The target area is still [400μm, 1600μm]. At this time, the area is covered by stripes 4, 5, 6, and 7, and stripe 3 is used as the second correction area.
[0150] Using a brightness-weighted algorithm, the centroid X coordinates of stripes 4-7 are obtained as 1529μm, 2001μm, 2533μm, and 3019μm, respectively; the second offset value ds=1129μm; ds1=2001-1529=472μm, ds2=2533-2001=532μm, ds3=3019-2533=486μm, therefore D2=[472,532,486].
[0151] The method for matching the second index value u is as follows: traverse the distance array D between adjacent stripes of the grating, take 3 consecutive elements as subarrays, and calculate the root mean square error (En) between each subarray and D2. Among them, the subarray [290,350,310] has the smallest En≈178.2, so the second index value u=4.
[0152] Since the first index value r=1 < the second index value u=4, dv=-900μm. W≈1.373. dtotal=-248.7μm. Displacement direction: dtotal<0, the measured object is determined to be moving in the opposite direction, with an actual displacement of 248.7μm.
[0153] Example 4
[0154] like Figure 7 The diagram shown is a structural schematic of the grating sensor provided in this embodiment. The difference between the grating sensor in Embodiment 1 and the grating sensor in Embodiment 2 is that the light-emitting device 1 and the optical conversion element 3 are located on both sides of the grating 2, and the stripes on the grating 2 are light-transmitting stripes or light-opaque stripes.
[0155] In this embodiment, the stripes may be translucent stripes or opaque (light-absorbing) stripes, so the stripe image may be a light spot or a shadow. If the stripe is a light spot, the center position of the stripe image is a point with high brightness; if the stripe is a shadow, the center position of the stripe image is a point with low brightness. The first and second calculation regions need to be selected based on the type of stripe image, and the center position of the stripe image needs to be determined.
[0156] The above are merely specific embodiments of the present invention and should not be construed as limiting the scope of the present invention. Equivalent variations made by those skilled in the art based on this invention, as well as changes well-known to those skilled in the art, should still fall within the scope of the present invention.
Claims
1. A method for measuring displacement using a grating sensor, characterized in that, The displacement measurement method using the grating sensor includes the following steps: Step B1: At the first measurement position, a target region is determined from the grating image acquired by the optical conversion element. The target region includes an image with at least K+1 stripes. The image with K+1 consecutive stripes is selected as the first calculation region. The first offset value do and the first index value r of the first calculation region are calculated. The first offset value do is the distance from the center position of the first stripe image in the first calculation region to the starting point of the target region. The first index value r is the index value of the first element in the first distance array D1 between the center positions of adjacent stripe images in the first calculation region in the grating adjacent stripe distance array D. Step B2: At the second measurement position, select an image of K+1 consecutive stripes in the target area as the second calculation area, and calculate the second offset value ds and the second index value u of the second calculation area. Step B3: Calculate the displacement value d based on the first offset value do, the second offset value ds, the first index value r, the second index value u, and the grating adjacent fringe distance array D. total The specific method is as follows: d total =ds-do+dv; When r > u, dv = ; When r=u, dv=0; When r < u, dv = ; In step B1, the specific method for selecting the image with K+1 consecutive stripes as the first calculation region is as follows: A brightness threshold is determined based on the brightness of the center position of each stripe image in the target area or the global area. Within the target area, K+1 consecutive stripes whose brightness at the center position exceeds the brightness threshold are selected as the first calculation area. In step B1, the method for calculating the first offset value do and the first index value r of the first calculation region is as follows: Calculate the centroid coordinates of K+1 stripe images in the first calculation region, and obtain the first offset value do based on the centroid coordinates of the first stripe image and the starting coordinates of the target region. The distance between the center positions of adjacent fringe images is calculated sequentially based on the centroid position coordinates, and the first distance array D1 is obtained by combining them in order. The first distance array D1 is compared with the grating adjacent fringe distance array D, and the index value of the first element in the first distance array D1 in the grating adjacent fringe distance array D is determined as the first index value r. The method for calculating the second offset value ds and the second index value u of the second calculation region is the same as the method for calculating the first offset value do and the first index value r of the first calculation region in step B1.
2. The displacement measurement method of the grating sensor according to claim 1, characterized in that, The target region includes a first calculation region and at least one first correction region. The first correction region includes at least one stripe image and is used to correct the first index value r.
3. The displacement measurement method of the grating sensor according to claim 1, characterized in that, The method for comparing the first distance array D1 with the adjacent fringe distance array D of the grating to determine the index value of the first element in the first distance array D1 in the adjacent fringe distance array D of the grating is as follows: Traverse the adjacent fringe distance array D of the grating, and take K consecutive values from it each time as a temporary array. If the value of the temporary array is exactly the same as the first distance array D1, then return the index value of the first element in the temporary array in the adjacent fringe distance array D of the grating.
4. The displacement measurement method of the grating sensor according to claim 1, characterized in that, The method for comparing the first distance array D1 with the adjacent fringe distance array D of the grating to determine the index value of the first element in the first distance array D1 in the adjacent fringe distance array D of the grating is as follows: Traverse the adjacent fringe distance array D of the grating, and take K consecutive values from it each time as a temporary array. Calculate the overall error between the temporary array and the first distance array D1, and return the index value of the first element in the temporary array corresponding to the minimum overall error in the adjacent fringe distance array D of the grating.
5. The grating sensor displacement measurement method according to claim 4, characterized in that, After step B3, the displacement correction factor W is calculated based on the first distance array D1, the first index value r, the first distance array D2, the first index value u, and the grating adjacent fringe distance array D. The displacement value d is then corrected based on the correction factor W. total The specific formula is as follows: D1=[dt1,dt2,...,dt K ], D2=[ds1,ds2,...,ds K ], W1=(dt1+dt2+...+dt K ) / (d r +d r+1 +...+d r+K-1 ), Or W1=Sqrt((dt1) 2 +dt2 2 +...+dt K 2 ) / (d r 2 +d r+1 2 +...+d r+K-1 2 )), W2=(ds1+ds2+...+ds K ) / (d u +d u+1 +...+d u+K-1 ), Or W2=Sqrt((ds1 2 +ds2 2 +...+ds K 2 ) / (d u 2 +d u+1 2 +...+d u+K-1 2 )), W = W1, or W = (W1 + W2) / 2, or W = Sqrt((W1 + W2) / 2) 2 +W2 2 ) / 2), or W=Min(W1,W2), or W=Max(W1,W2); Corrected total displacement d of the object total =ds-do+W*dv.
6. A grating sensor for implementing the grating sensor displacement measurement method as described in any one of claims 1-5, characterized in that, It includes a light-emitting device (1), a grating (2), an optical conversion element (3), a hardware circuit board (4), a housing (5), a control device (6), and an input / output device (7). Multiple stripes are arranged in parallel on the grating (2), and the extension direction of the stripes is perpendicular to the length direction of the grating (2). The array D of adjacent grating fringe distances is a unique sliding window array of order K, meaning that the subarray obtained by traversing the array with a sliding window of length K appears only once in the array; The light-emitting device (1) is fixed on the outer casing (5); The optical conversion element (3) is fixed on the hardware circuit board (4), and the hardware circuit board (4) is fixed on the outer shell (5); the optical conversion element (3) is arranged in a direction perpendicular to the optical axis of the light-emitting device (1) after reflection or transmission through the grating (2) and parallel to the length of the grating (2); The light emitted by the light-emitting device (1) passes through the grating (2) and forms a grating image in the optical conversion element (3); The hardware circuit board (4) is used to receive the grating image data output by the optical conversion element (3) and transmit it to the control device (6). The control device (6) calculates the displacement based on the grating image data; The input / output device (7) is used to set parameters and display displacement calculation results.
7. The grating sensor according to claim 6, characterized in that, The light-emitting device (1) and the optical conversion element (3) are located on the same side of the grating (2). The stripes on the grating (2) are reflective or non-reflective stripes. The parallel light emitted by the light-emitting device (1) is reflected by the grating (2) and received by the optical conversion element (3) on the same side to form a grating image. or: The light-emitting device (1) and the optical conversion element (3) are located on both sides of the grating (2), and the stripes on the grating (2) are light-transmitting stripes or opaque stripes.
8. A method for fabricating a grating sensor, used to fabricate the grating sensor as described in any one of claims 6-7, characterized in that, The method for fabricating the grating sensor includes the following steps: Step A1: Determine the width value of the grating stripes based on the width value of a single pixel of the optical conversion element; Step A2: Determine the minimum spacing between adjacent grating stripes based on the width value of the grating stripes; Step A3: Based on the minimum spacing between adjacent fringes, the preset sliding window order K, the size and range of the optical conversion element, generate an array D of adjacent fringe distances for the grating, denoted as D=[d1, d2, ..., d]. M The adjacent fringe distance array D of the grating is a unique sliding window array of order K, that is, the subarray obtained by traversing with a sliding window of length K appears only once in the adjacent fringe distance array D of the grating. Step A4: Determine the center position of each fringe in the grating according to the adjacent fringe distance array D; Step A5: Process all stripes on the grating according to the center position of each stripe, the width value of the grating stripe, and the preset grating stripe length value.
9. A method for fabricating a grating sensor according to claim 8, characterized in that, In step A1, the width of the grating stripe is 3 to 20 times the width of a single pixel of the optical conversion element; In step A2, the minimum spacing between adjacent stripes of the grating is 1.2-2.5 times the width of the grating stripe; In step A3, the generated array D of adjacent grating stripe distances needs to satisfy the following condition: the sum of any K consecutive elements is less than the length of the optical conversion element.
Citation Information
Patent Citations
Absolute grating ruler system
CN120027709A
Displacement measuring device and display method
JP2022026082A