Reflection-type grating displacement sensor and displacement measurement method
By using mobile gratings, optical reading heads and multi-module signal processing technologies in reflective grating displacement sensors, the manufacturing difficulty and cost problems caused by the increase in the logarithmic grating line of the grating in the prior art, as well as the stability and noise problems of traditional electronic subdivision technology, high-precision and low-cost displacement measurement are achieved.
Patent Information
- Application Number
- CN202411609268.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-03-28
AI Technical Summary
Existing reflective grating displacement sensors face increased manufacturing process difficulty and cost caused by the increase in the logarithm of grating lines when improving measurement accuracy and resolution, as well as the stability and noise problems existing in traditional electronic subdivision technologies.
A reflective grating displacement sensor is adopted, including a moving grating, optical reading head, signal processing module, error compensation module, angle solution module, arctangent subdivision module and counting output module. The displacement amount of the moving grating is sensed through the optical reading head, and the moiré stripe electrical signal is output, and processed through the signal processing and error compensation module, and finally the displacement measurement result is obtained through the counting output module.
High-precision displacement measurement is achieved, reducing manufacturing costs, and improving sensor stability and noise resistance.
Smart Images

Figure CN119714076A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of displacement sensors, in particular to a reflective grating displacement sensor and a displacement measurement method. Background Art
[0002] At present, common types of micro displacement sensors include potentiometer displacement sensors, inductive displacement sensors, synchro, capacitive displacement sensors, eddy current displacement sensors, Hall displacement sensors, and grating displacement sensors. Among them, grating displacement sensors are particularly popular due to their excellent stability and extremely low zero drift characteristics. They have the advantages of small size and light weight, making them a research hotspot for ultra-precision displacement measurement technology.
[0003] There are two main ways to improve the measurement accuracy and resolution of grating displacement sensors: one is to increase the number of grating line pairs, and the other is to perform electronic subdivision. The more grating line pairs a grating has, the higher the accuracy can be achieved in theory, but under the small size of existing reflective gratings and read heads, increasing the number of grating line pairs will be limited, which not only makes it difficult to improve stability, but also leads to a significant increase in the difficulty and cost of the manufacturing process. On the other hand, traditional electronic subdivision technologies, including hardware subdivision and software subdivision, also face a series of challenges. Hardware subdivision usually requires the design of complex circuits, which may introduce additional instability and noise, while software subdivision relies on the precise processing of grating moiré signals. Since the original grating moiré signals often have problems such as amplitude inconsistency, DC deviation, and orthogonal mismatch, these factors will affect the subdivision accuracy of the grating moiré fringes. Summary of the invention
[0004] In order to solve the deficiencies in the prior art, the present invention provides a reflective grating displacement sensor and a displacement measurement method, which have simple and reliable structures and high precision of displacement measurement results.
[0005] In order to achieve the above object, the specific scheme adopted by the present invention is:
[0006] A reflective grating displacement sensor, comprising: Move the grating; An optical reading head is used to sense the displacement of the moving grating when the moving grating moves synchronously with the measured object, and output the displacement as a moiré fringe electrical signal; A signal processing module, used for processing the moiré fringe electrical signal to obtain a basic measurement signal; An error compensation module, used for compensating the DC deviation and amplitude deviation of the basic measurement signal to obtain a compensated measurement signal, wherein the compensated measurement signal includes a sine phase measurement signal and a cosine phase measurement signal; An angle solving module, used for inversely solving the compensation measurement signal to obtain the sine signal value and the cosine signal value; An arctangent subdivision module is used to calculate an arctangent type measurement signal based on the sine signal value and the cosine signal value; The counting output module is used to count the arctangent measurement signal and output the displacement measurement result according to the counting result and the grating parameter of the moving grating.
[0007] As a further optimization of the above-mentioned reflective grating displacement sensor: the sensor also includes a shell, the optical reading head is fixedly arranged in the shell, the moving grating is movably arranged in the shell, and the moving grating is fixedly connected with a contact assembly, the contact assembly includes a sliding rod parallel to the moving direction of the moving grating, and the sliding rod is fixedly connected with a contact for contacting the target object to be measured after extending out of the shell.
[0008] As a further optimization of the above-mentioned reflective grating displacement sensor: the shell includes a first half shell and a second half shell that are detachably connected, a main control board is fixedly arranged inside the first half shell, the signal processing module, the error compensation module, the angle solving module, the inverse tangent subdivision module and the counting output module are all integrated on the main control board, a reset button electrically connected to the main control board is also arranged on the first half shell, and the optical reading head is fixedly arranged inside the second half shell.
[0009] As a further optimization of the above-mentioned reflective grating displacement sensor: a grating mounting assembly is arranged in the shell, and the grating mounting assembly includes a fixedly connected substrate and a connecting seat, a mounting groove for accommodating the movable grating is opened in the middle of the substrate, and the mounting groove is connected to an optical channel that passes through the surface of the substrate, and the light emitted by the optical reading head can pass through the optical channel and illuminate the movable grating, and the sliding rod is fixedly connected to the connecting seat.
[0010] As a further optimization of the above-mentioned reflective grating displacement sensor: a socket is provided on the connecting seat, the sliding rod is inserted into the socket, the socket is connected to a second through groove, and the second through groove penetrates to the surface of the connecting seat so that a part of the connecting seat forms a clamping part, and the clamping part is connected to the rest of the connecting seat by a number of fastening bolts to clamp the sliding rod.
[0011] As a further optimization of the above-mentioned reflective grating displacement sensor: the connecting seat is fixedly connected with a guide connecting rod, and the interior of the shell is provided with a guide groove extending along the moving direction of the moving grating, and the guide connecting rod extends into the guide groove.
[0012] As a further optimization of the above-mentioned reflective grating displacement sensor: the substrate is fixedly connected to a movable connecting rod, a fixed connecting rod is fixedly arranged inside the shell, and a first reset spring is connected between the fixed connecting rod and the movable connecting rod.
[0013] As a further optimization of the above-mentioned reflective grating displacement sensor: a through hole is opened on the shell, the contact assembly includes a sleeve fixedly arranged in the through hole, the sliding rod passes through the sleeve, and a sliding sleeve is fixedly sleeved on the surface of the sliding rod, and a plurality of balls are rotatably embedded in the sliding sleeve, and the balls are in contact with the inner wall of the sleeve.
[0014] A displacement measurement method, based on the above-mentioned reflective grating displacement sensor, comprises the following steps: making the moving grating contact with the measured object, and driving the moving grating to move synchronously during the movement of the measured object; The optical reading head is used to sense the displacement of the moving grating and output a moiré fringe electrical signal; The moire fringe electrical signal is processed step by step by using the signal processing module, the error compensation module, the angle solving module and the inverse tangent subdivision module to obtain an inverse tangent type measurement signal; The counting output module is used to count the arctangent measurement signal, and the displacement measurement result is output according to the counting result and the grating parameter of the moving grating.
[0015] As a further optimization of the above displacement measurement method: the method for the signal processing module to process the moiré fringe electrical signal includes signal amplification, signal filtering and noise suppression, and the signal processing module obtains a basic measurement signal after processing the moiré fringe electrical signal, and the basic measurement signal is; Among them, U1 and U2 are sine signal and cosine signal respectively, A1 and A2 are amplitudes of sine signal and cosine signal respectively, b1 and b2 are phase values, c1 and c2 are DC deviations; The method for the error compensation module to compensate the basic measurement signal includes: Among them, Amp is the amplitude deviation, Dc is the DC deviation, U max and U min are the maximum voltage value and the minimum voltage value of a single cycle in the moiré fringe electrical signal; The method for the angle solving module to reversely solve the compensation measurement signal includes: Among them, θ1 and θ2 are the arcsine and arccosine values; The method for calculating the inverse tangent type measurement signal by the inverse tangent subdivision module includes: Among them, θ3 is the inverse tangent value; The method for calculating the displacement measurement result by the counting output module includes: S = L*N+M (μm); Among them, S is the displacement measurement result, L is the pitch of the moving grating, N is the number of cycles of the moiré fringe electrical signal, and M is the displacement value of an incomplete moiré fringe electrical signal cycle.
[0016] Beneficial effects: After the present invention uses the optical reading head to obtain the moiré fringe electrical signal, it is processed by the signal processing module, and then software error compensation and subdivision processing are performed on it in turn, and finally an accurate displacement measurement result is obtained; the present invention uses a contact component to contact the target object to be measured, and the moving grating is completely arranged in the shell, which can protect the moving grating, thereby ensuring the measurement accuracy, and the sliding rod of the contact component can be easily fixed or disassembled, which is convenient for quick adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of the overall structure of the displacement sensor of the present invention; Figure 2 is a schematic diagram of the structure of the first half shell; Figure 3 is a schematic diagram of the structure of the second half shell; Figure 4 It is a schematic diagram of the setting method of the grating mounting component and the contact component; Figure 5 This is a diagram of how to set the reset button; Figure 6 is a schematic diagram of the structure of the contact component; Figure 7 It is a schematic diagram of the structure of the grating installation assembly; Figure 8 It is a schematic diagram of the connection method between the slide bar and the connecting seat; Fig. 9 It is a flow chart of the displacement measurement method of the present invention.
[0018] Description of the drawings: 1-first half shell, 2-zero reset button, 3-cable connector, 4-second half shell, 5-contact assembly, 6-connector mounting hole, 7-sealing groove, 8-main control board, 9-first notch, 10-sealing ridge, 11-optical reading head, 12-fixed plate, 13-first through groove, 14-guide groove, 15-second notch, 16-guide connecting rod, 17-grating mounting assembly, 18-movable connecting rod, 19-first reset Spring, 20-fixed connecting rod, 21-positioning ring, 22-annular accommodating groove, 23-groove, 24-second return spring, 25-limiting plate, 26-sleeve, 27-sliding sleeve, 28-ball, 29-sliding rod, 30-contact, 31-connecting seat, 32-jack, 33-second through groove, 34-clamping part, 35-fastening screw hole, 36-base plate, 37-mounting groove, 38-movable grating, 39-fastening bolt. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] like Figures 1 to 8 As shown, a reflective grating displacement sensor includes a moving grating 38, an optical reading head 11, a signal processing module, an error compensation module, an angle solving module, an inverse tangent subdivision module and a counting output module.
[0021] The moving grating 38 is used to contact or connect with the measured object, and moves synchronously with the measured object during the movement of the measured object.
[0022] The optical reading head 11 is used to sense the displacement of the moving grating 38 when the moving grating 38 moves synchronously with the measured object, and output the displacement as a moiré fringe electrical signal. In order to ensure the stability of the moiré fringe electrical signal for subsequent processing, it is necessary to keep the distance between the optical reading head 11 and the moving grating 38 within a stable range.
[0023] The signal processing module is used to process the moiré fringe electrical signal to obtain a basic measurement signal.
[0024] The error compensation module is used to compensate the DC deviation and amplitude deviation of the basic measurement signal to obtain a compensated measurement signal, and the compensated measurement signal includes a sine phase measurement signal and a cosine phase measurement signal.
[0025] The angle solving module is used to perform inverse solving of the compensation measurement signal to obtain the sine signal value and the cosine signal value.
[0026] The arc tangent subdivision module is used to calculate an arc tangent type measurement signal based on the sine signal value and the cosine signal value.
[0027] The counting output module is used to count the arctangent measurement signal and output the displacement measurement result according to the counting result and the grating parameter of the moving grating 38.
[0028] In the process of displacement measurement, the moving grating 38 is firstly brought into contact or connected with the measured object, and the length direction of the moving grating 38 is kept parallel to the moving direction of the measured object.
[0029] In the process of displacement measurement, the moving grating 38 is first contacted or connected with the measured object, and the length direction of the moving grating 38 is kept parallel to the moving direction of the measured object, so that the moving grating 38 can always cooperate with the optical reading head 11 during the synchronous movement with the measured object, so as to avoid the displacement of the moving grating 38 causing the optical reading head 11 to be unable to read the moving grating 38 smoothly. During the movement of the moving grating 38, the optical reading head 11 continuously senses the moving grating 38 and outputs the moiré fringe electrical signal. After that, the signal processing module processes the moiré fringe electrical signal to obtain a basic measurement signal. The signal processing module may include a differential operational amplifier circuit and a magnetic bead circuit, wherein the differential amplifier circuit is used to amplify, filter and suppress common mode noise of the moiré fringe electrical signal, and the magnetic bead circuit is used to eliminate high-frequency noise and absorb electrostatic pulses. The signal processing module can effectively improve the quality of the moiré fringe electrical signal, so as to facilitate subsequent processing and improve the accuracy of the displacement measurement result. Then, the basic measurement signal after signal processing is error compensated by the error compensation module, mainly compensating for DC deviation and amplitude deviation, so as to further improve the quality of the basic measurement signal and obtain a compensated measurement signal. Subsequently, the angle solution module and the inverse tangent subdivision module are used to further identify and process the compensated measurement signal to obtain an inverse tangent measurement signal that can be used to determine the displacement. Finally, the counting output module is used to count the cycles of the inverse tangent measurement signal through the counting direction discrimination algorithm, and to distinguish whether it is forward motion or reverse motion, so as to obtain the final displacement measurement result, which is expressed in the form of a vector.
[0030] The displacement sensor of the present invention also includes a housing, an optical reading head 11 is fixedly arranged in the housing, a moving grating 38 is movably arranged in the housing, and the moving grating 38 is fixedly connected to a contact assembly 5, the contact assembly 5 includes a slide bar 29 which is parallel to the moving direction of the moving grating 38, and the slide bar 29 is extended to the outside of the housing and fixedly connected to a contact 30 for contacting the measured target. Because the moving grating 38 is a precision device, if the surface of the moving grating 38 is contaminated, the optical reading head 11 will not be able to correctly sense the moving grating 38. Therefore, the present invention sets the moving grating 38 in the housing, uses the housing to protect the moving grating 38, and then sets the contact assembly 5, uses the slide bar 29 to contact or connect with the measured target, and fully realizes the protection of the moving grating 38 under the premise of ensuring that the moving grating 38 can still move synchronously with the measured target. Obviously, the slide bar 29 should be parallel to the moving grating 38, that is, the length directions of the two are parallel to each other.
[0031] In order to further protect the movable grating 38, an annular sealing ridge 10 is provided on the second half shell 4, and the sealing ridge 10 is distributed along the edge of the second half shell 4. A sealing groove 7 cooperating with the sealing ridge 10 is opened on the first half shell 1. When the first half shell 1 and the second half shell 4 are connected, the sealing ridge 10 can be inserted into the sealing groove 7, thereby closing the gap between the first half shell 1 and the second half shell 4 to prevent external dust and water vapor from entering the interior of the shell and causing damage to the movable grating 38.
[0032] The specific structure of the shell is as follows: the shell comprises a first half shell 1 and a second half shell 4 which are detachably connected, a main control board 8 is fixedly arranged inside the first half shell 1, a signal processing module, an error compensation module, an angle solving module, an inverse tangent subdivision module and a counting output module are all integrated on the main control board 8, a reset button 2 electrically connected to the main control board 8 is also arranged on the first half shell 1, an optical reading head 11 is fixedly arranged inside the second half shell 4, and a fixing plate 12 for mounting the optical reading head 11 is arranged in the second half shell 4. The reset button 2 is used to clear the existing displacement measurement results to avoid the decrease in the accuracy of the displacement measurement results due to the accumulation of errors in the subsequent measurement process.
[0033] The specific setting method of the zeroing button 2 is as follows: a groove 23 and an annular receiving groove 22 are opened on the outer wall of the first half shell 1, and the groove 23 is located at the center of the annular receiving groove 22. The groove 22 is also connected to a slideway that passes through the inner wall of the first half shell 1. The zeroing button 2 is fixedly connected to a positioning ring 21 and a plug rod on the side facing the first half shell 1, wherein the positioning ring 21 extends into the annular receiving groove 22, and the plug rod extends into the first half shell 1 after passing through the slideway, and is fixedly connected to a limiting plate 25. The positioning ring 21 and the annular receiving groove 22 are used to limit the zeroing button 2 to prevent the zeroing button 2 from twisting, the slideway and the plug rod are used to control the moving direction of the zeroing button 2, and the limiting plate 25 is used to prevent the zeroing button 2 from falling off. A second reset spring 24 is also provided in the groove 22, and the second reset spring 24 is sleeved on the plug rod to push the zeroing button 2 to reset after the zeroing button 2 is released.
[0034] The specific arrangement of the moving grating 38 in the housing is as follows: a grating mounting assembly 17 is arranged in the housing, and the grating mounting assembly 17 includes a fixedly connected substrate 36 and a connecting seat 31. A mounting groove 37 for accommodating the moving grating 38 is provided in the middle of the substrate 36, and the mounting groove 37 is connected to an optical channel that penetrates the surface of the substrate 36. The light emitted by the optical reading head 11 can pass through the optical channel and illuminate the moving grating 38. The slide bar 29 is fixedly connected to the connecting seat 31. The moving grating 38 is arranged in the mounting groove 37 of the substrate 36, and the substrate 36 can be used to further protect the moving grating 38 to avoid damage to the moving grating 38, thereby ensuring the accuracy of the displacement measurement result. On this basis, the optical channel ensures that the optical reading head 11 can smoothly sense the moving grating 38. In order to prevent the moving grating 38 from escaping from the mounting groove 37, the width of the optical channel is smaller than the width of the mounting groove 37.
[0035] The specific connection method of the slide bar 29 and the connection seat 31 is as follows: the connection seat 31 is provided with an insertion hole 32, the slide bar 29 is inserted into the insertion hole 32, the insertion hole 32 is connected with a second through slot 33, and the second through slot 33 penetrates the surface of the connection seat 31 so that a part of the connection seat 31 forms a clamping portion 34, the clamping portion 34 is connected with the rest of the connection seat 31 by a plurality of fastening bolts 39 to clamp the slide bar 29, and the clamping portion 34 is provided with a fastening screw hole 35 that matches the fastening bolt 39. With this structure, after the slide bar 29 is inserted into the insertion hole 32, the clamping portion 34 is connected with the rest of the connection seat 31 by the fastening bolt 39, so that the slide bar 29 can be clamped and fixed. Because the slide bar 29 is clamped by the clamping portion 34, its size does not have to be completely consistent with the jack 32, that is, the diameter of the slide bar 29 can be slightly smaller than the aperture of the jack 32, so that slide bars 29 of different sizes can be selected according to actual needs to cope with various actual measurement conditions. For example, when the size of the measured target is small and the moving space is also small, a slide bar 29 with a smaller diameter can be used to ensure that the slide bar 29 can smoothly enter the moving space of the measured target and contact or connect with the measured target. On the other hand, when the slide bar 29 is damaged or needs to be cleaned, the slide bar 29 can be easily removed for replacement or cleaning.
[0036] In order to further ensure the stability of the moving direction of the moving grating 38, to avoid the optical reading head 11 being unable to smoothly sense the moving grating 38 due to the deviation of the moving grating 38, or to reduce the quality of the output moiré fringe electrical signal due to the change of relative position, the connecting seat 31 is fixedly connected with a guide link 16, and the interior of the housing is provided with a guide groove 14 extending along the moving direction of the moving grating 38, the guide groove 14 is connected with a first through groove 13, the first through groove 13 penetrates the inner wall of the housing, and the width of the first through groove 13 is smaller than the width of the guide groove 14, the guide link 16 passes through the first through groove 13 and extends into the guide groove 14, and is connected with a guide slider. The cooperation of the guide groove 14 and the guide link 16 can limit the moving direction of the connecting seat 31, and because the moving grating 38 and the slide bar 29 are both connected to the connecting seat 31, the moving directions of the moving grating 38 and the slide bar 29 can be limited, so as to ensure the stability of the moving directions of the moving grating 38 and the slide bar 29.
[0037] Considering that after one measurement is completed, both the moving grating 38 and the sliding bar 29 need to be reset in order to perform the next measurement, the base plate 36 is fixedly connected with the moving connecting rod 18, and the fixed connecting rod 20 is fixedly arranged inside the housing, and the first reset spring 19 is connected between the fixed connecting rod 20 and the moving connecting rod 18. During the measurement process, the moving grating 37 and the sliding bar 29 will drive the state of the first reset spring 19 to change when they move, and the change can be in the form of stretching or compression, so that the first reset spring 19 accumulates a certain amount of energy, and after the measurement is completed and the sliding bar 29 is separated from the measured object, the first reset spring 19 can be restored and drive the moving grating 38 and the sliding bar 29 to reset, and then cooperate with the reset button 2 to reset the data, and then prepare for the next measurement.
[0038] The specific arrangement of the slide bar 29 is as follows: a through hole is provided on the housing, the contact assembly 5 includes a sleeve 26 fixedly provided in the through hole, the slide bar 29 passes through the sleeve 26, and a sliding sleeve 27 is fixedly provided on the surface of the slide bar 29, a plurality of balls 28 are rotatably embedded in the sliding sleeve 27, and the balls 28 are in contact with the inner wall of the sleeve 26. By providing the sliding sleeve 27 and the balls 28, the friction between the sleeve 26 and the slide bar 29 can be reduced, and the wear of the slide bar 29 can be reduced while ensuring that the slide bar 29 can slide smoothly.
[0039] In order to be able to output the measured displacement measurement results to the outside, for example, to a host computer or a handheld terminal, the main control board 8 is also connected to a cable connector 3, and the cable connector 3 is connected to the host computer or the handheld terminal through a cable to upload the displacement measurement results. The specific selection of the cable connector 3 and the cable can be determined according to the specific type and model of the host computer or the handheld terminal, which will not be repeated here. Correspondingly, a first notch 9 and a second notch 15 are respectively provided on the first half shell 1 and the second half shell 4. The first notch 9 and the second notch 15 form a joint mounting hole 6 after the first half shell 1 and the second half shell 4 are connected, and the cable connector 3 is fixedly arranged in the joint mounting hole 6.
[0040] The displacement measurement method is based on the above-mentioned reflective grating displacement sensor, and the method includes S1 to S4.
[0041] S1. Make the moving grating 38 contact with the measured object, and drive the moving grating 38 to move synchronously during the movement of the measured object.
[0042] S2. Use the optical reading head 11 to sense the displacement of the moving grating 38 and output a Moire fringe electrical signal.
[0043] S3. Use the signal processing module, error compensation module, angle solving module and inverse tangent subdivision module to gradually process the moiré fringe electrical signal to obtain an inverse tangent type measurement signal.
[0044] S4. Count the arctangent measurement signal using the counting output module, and output the displacement measurement result according to the counting result and the grating parameter of the moving grating 38.
[0045] The method for the signal processing module to process the moiré fringe electrical signal includes signal amplification, signal filtering and noise suppression. The signal processing module processes the moiré fringe electrical signal to obtain a basic measurement signal, and the basic measurement signal is; Among them, U1 and U2 are sine signal and cosine signal respectively, A1 and A2 are amplitudes of sine signal and cosine signal respectively, b1 and b2 are phase values, and c1 and c2 are DC deviations.
[0046] The method for the error compensation module to compensate the basic measurement signal includes:
[0047] Among them, Amp is the amplitude deviation, Dc is the DC deviation, U max and U min are the maximum and minimum voltage values of a single cycle in the moiré fringe electrical signal.
[0048] The method for the angle solving module to reversely solve the compensation measurement signal includes: Wherein, θ1 and θ2 are the arcsine and arccosine values.
[0049] The method of calculating the inverse tangent type measurement signal by the inverse tangent subdivision module includes: Wherein, θ3 is the inverse tangent value.
[0050] The counting output module calculates the displacement measurement results by: S = L*N+M (μm); Among them, S is the displacement measurement result, L is the pitch of the moving grating, N is the number of cycles of the moiré fringe electrical signal, and M is the displacement value of an incomplete moiré fringe electrical signal cycle.
[0051] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A reflective grating displacement sensor, characterized in that: include: Move the grating (38); An optical reading head (11) is used to sense the displacement of the moving grating (38) when the moving grating (38) moves synchronously with the measured object, and output the displacement as a moiré fringe electrical signal; A signal processing module, used for processing the moiré fringe electrical signal to obtain a basic measurement signal; An error compensation module, used for compensating the DC deviation and amplitude deviation of the basic measurement signal to obtain a compensated measurement signal, wherein the compensated measurement signal includes a sine phase measurement signal and a cosine phase measurement signal; An angle solving module, used for inversely solving the compensation measurement signal to obtain the sine signal value and the cosine signal value; An arctangent subdivision module is used to calculate an arctangent type measurement signal based on the sine signal value and the cosine signal value; The counting output module is used for counting the arctangent type measurement signal and outputting the displacement measurement result according to the counting result and the grating parameter of the moving grating (38).
2. A reflective grating displacement sensor as claimed in claim 1, characterized in that: The sensor further comprises a housing, the optical reading head (11) is fixedly arranged in the housing, the movable grating (38) is movably arranged in the housing, and the movable grating (38) is fixedly connected to a contact assembly (5), the contact assembly (5) comprises a slide bar (29) which is parallel to the moving direction of the movable grating (38), and the slide bar (29) is fixedly connected to a contact (30) for contacting a target object after extending out of the housing.
3. A reflective grating displacement sensor as claimed in claim 2, characterized in that: The shell comprises a first half shell (1) and a second half shell (4) which are detachably connected. A main control board (8) is fixedly arranged inside the first half shell (1). The signal processing module, the error compensation module, the angle solving module, the inverse tangent subdivision module and the counting output module are all integrated on the main control board (8). A reset button (2) electrically connected to the main control board (8) is also arranged on the first half shell (1). The optical reading head (11) is fixedly arranged inside the second half shell (4).
4. A reflective grating displacement sensor as claimed in claim 2, characterized in that: A grating mounting assembly (17) is arranged in the housing, and the grating mounting assembly (17) includes a fixedly connected substrate (36) and a connecting seat (31). A mounting groove (37) for accommodating the movable grating (38) is opened in the middle of the substrate (36), and the mounting groove (37) is connected to an optical channel that passes through the surface of the substrate (36). The light emitted by the optical reading head (11) can pass through the optical channel and illuminate the movable grating (38). The sliding rod (29) is fixedly connected to the connecting seat (31).
5. A reflective grating displacement sensor as claimed in claim 4, characterized in that: The connecting seat (31) is provided with an insertion hole (32), the sliding rod (29) is inserted into the insertion hole (32), the insertion hole (32) is connected with a second through groove (33), and the second through groove (33) penetrates to the surface of the connecting seat (31) so that a part of the connecting seat (31) forms a clamping part (34), and the clamping part (34) is connected to the rest of the connecting seat (31) by a plurality of fastening bolts (39) to clamp the sliding rod (29).
6. A reflective grating displacement sensor as claimed in claim 5, characterized in that: The connecting seat (31) is fixedly connected with a guide connecting rod (16), and a guide groove (14) extending along the moving direction of the moving grating (38) is arranged inside the housing, and the guide connecting rod (16) extends into the guide groove (14).
7. A reflective grating displacement sensor as claimed in claim 4, characterized in that: The base plate (36) is fixedly connected to a movable connecting rod (18), a fixed connecting rod (20) is fixedly arranged inside the shell, and a first return spring (19) is connected between the fixed connecting rod (20) and the movable connecting rod (18).
8. A reflective grating displacement sensor as claimed in claim 2, characterized in that: The shell is provided with a through hole, the contact assembly (5) comprises a sleeve (26) fixedly arranged in the through hole, the slide rod (29) passes through the sleeve (26), and a sliding sleeve (27) is fixedly sleeved on the surface of the slide rod (29), a plurality of balls (28) are rotatably embedded in the sliding sleeve (27), and the balls (28) are in contact with the inner wall of the sleeve (26).
9. A displacement measurement method, characterized in that: Based on a reflective grating displacement sensor as claimed in any one of claims 1 to 8, the method comprises the following steps: The movable grating (38) is brought into contact with the measured object, and the movable grating (38) is driven to move synchronously during the movement of the measured object; The optical reading head (11) is used to sense the displacement of the moving grating (38) and output a moiré fringe electrical signal; The moire fringe electrical signal is processed step by step by using the signal processing module, the error compensation module, the angle solving module and the inverse tangent subdivision module to obtain an inverse tangent type measurement signal; The counting output module is used to count the arctangent type measurement signal, and the displacement measurement result is output according to the counting result and the grating parameter of the moving grating (38).
10. The displacement measurement method according to claim 9, characterized in that: The method for the signal processing module to process the moiré fringe electrical signal includes signal amplification, signal filtering and noise suppression. The signal processing module processes the moiré fringe electrical signal to obtain a basic measurement signal, and the basic measurement signal is: Among them, U1 and U2 are sine signal and cosine signal respectively, A1 and A2 are amplitudes of sine signal and cosine signal respectively, b1 and b2 are phase values, c1 and c2 are DC deviations; The method for the error compensation module to compensate the basic measurement signal includes: Among them, Amp is the amplitude deviation, Dc is the DC deviation, U max and U min are the maximum voltage value and the minimum voltage value of a single cycle in the moiré fringe electrical signal; The method for the angle solving module to reversely solve the compensation measurement signal includes: Among them, θ1 and θ2 are the arcsine and arccosine values; The method for calculating the inverse tangent type measurement signal by the inverse tangent subdivision module includes: Among them, θ3 is the inverse tangent value; The method for calculating the displacement measurement result by the counting output module includes: S = L*N+M (μm); Wherein, S is the displacement measurement result, L is the grating pitch of the moving grating (37), N is the number of cycles of the moiré fringe electrical signal, and M is the displacement value of the incomplete moiré fringe electrical signal cycle.