A method and system for improving the CT rotation control accuracy based on an optical grating scale
Patent Information
- Application Number
- CN202411870896.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2044-12-18
AI Technical Summary
The signal processing method of the existing grating scale system is simple, resulting in unstable signal amplitude, low processing efficiency and limited measurement accuracy, especially in high-speed or high-precision applications.
By converting the two square wave signals with a phase difference of 90 degrees from the grating scale into four pulse signals, the 4-fold frequency output of the signal is achieved, thereby improving the measurement accuracy and control accuracy.
It significantly improves the measurement accuracy and control accuracy of the grating scale, while reducing manufacturing costs, meets the demand for high-precision measurements of high-speed CT equipment, and provides a cost-effective and efficient solution for the fields of industrial automation and precision measurement.
Smart Images

Figure CN119861093A8_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal processing, and in particular to a method and system for improving the rotation control accuracy of a CT based on a grating ruler. Background Art
[0002] In the field of modern industrial automation and precision measurement, the demand for accurate measurement of position and displacement is growing. As a high-precision position detection device, grating rulers are widely used in CNC machine tools, precision measuring instruments and other fields due to their high measurement accuracy and good stability. Grating rulers convert displacement into electrical signals through the principle of photoelectric conversion, thereby realizing accurate measurement of displacement. Traditional grating ruler systems output square wave signals, which can provide absolute position information about displacement, but are limited by signal processing technology and electronic circuits, and the utilization efficiency and measurement accuracy of these signals need to be improved. In the prior art, the signal processing method is relatively simple, and is usually used directly to drive subsequent counting circuits or logic judgment circuits to achieve position measurement and control. However, this direct application method has some limitations: for example, the signal amplitude is unstable: due to environmental factors and power supply fluctuations, the signal amplitude may change, affecting the measurement accuracy. Low signal processing efficiency: the characteristics of the signal phase difference cannot be fully utilized, limiting the flexibility and efficiency of signal processing. Limited measurement accuracy: due to the simplicity of the signal processing method, higher-precision position measurement cannot be achieved, especially in high-speed or high-precision applications. Summary of the invention
[0003] In view of this, the present invention proposes a method and system for improving the CT rotation control accuracy based on a grating ruler, which can convert two square wave signals with a phase difference of 90 degrees output by the grating ruler into four pulse signals, realizing the 4-fold frequency output of the signal, thereby significantly improving the measurement accuracy and control accuracy of the grating ruler. The present invention provides the following technical solutions:
[0004] A method for improving the CT rotation control accuracy based on a grating ruler, the method comprising:
[0005] Receive the original square waves of two signals with a phase difference of 90 degrees output by the grating ruler; invert the original square wave to obtain a negated square wave; delay the original square wave to obtain a delayed square wave; invert the delayed square wave to obtain a delayed negated square wave; perform operations based on the original square wave, negated square wave, delayed square wave and delayed negated square wave of a single signal to obtain a pulse square wave of a single signal; perform OR operations on the pulse square waves of the two signals to combine and output a high-precision pulse square wave; collect the rising edge of the high-precision pulse square wave to obtain a high-precision grating ruler signal.
[0006] Optionally, the method of performing operations based on the original square wave, the negated square wave, the delayed square wave and the delayed negated square wave of a single-channel signal to obtain a pulse square wave of a single-channel signal includes: performing an AND operation on the original square wave and the delayed negated square wave, and outputting a first pulse square wave; performing an AND operation on the negated square wave and the delayed square wave, and outputting a second pulse square wave; performing an OR operation on the first pulse square wave and the second pulse square wave, and outputting a third pulse square wave of the single-channel signal.
[0007] Optionally, the method of performing an OR operation on the pulse square waves of two signals to combine and output a high-precision pulse square wave includes: performing an OR operation on the third pulse square waves of two single signals to combine and output a high-precision pulse square wave.
[0008] Optionally, the method of performing operations based on the original square wave, the negated square wave, the delayed square wave and the delayed negated square wave of a single-channel signal to obtain a pulse square wave of a single-channel signal includes: performing an AND operation on the original square wave and the delayed negated square wave, and outputting a first pulse square wave; performing an AND operation on the negated square wave and the delayed square wave, and outputting a second pulse square wave.
[0009] Optionally, the method of performing an OR operation on the pulse square waves of two signals to combine and output a high-precision pulse square wave includes: performing an OR operation on the first pulse square wave and the second pulse square wave of two single signals to combine and output a high-precision pulse square wave.
[0010] Optionally, the method of delaying the original square wave to obtain a delayed square wave includes: delaying the original square waves of two signals simultaneously through a synchronous timing circuit to obtain delayed square waves of the two signals with the same delay.
[0011] Optionally, after delaying the original square wave to obtain the delayed square wave, the method further comprises: eliminating noise of the delayed square wave by a filtering circuit.
[0012] The present invention further discloses a system for improving the CT rotation control accuracy based on a grating ruler, comprising: a signal conditioning module, used for receiving the original square waves of two signals with a phase difference of 90 degrees output by the grating ruler; an inversion module, used for inverting the original square wave to obtain an inverted square wave; and also used for inverting the delayed square wave to obtain a delayed inverted square wave; a delay module, used for delaying the original square wave to obtain a delayed square wave; an operation module, used for performing operations based on the original square wave, the inverted square wave, the delayed square wave and the delayed inverted square wave of a single signal to obtain a pulse square wave of a single signal; and also used for performing an OR operation on the pulse square waves of the two signals to combine and output a high-precision pulse square wave; a signal acquisition module, used for acquiring the rising edge of the high-precision pulse square wave to obtain a high-precision grating ruler signal.
[0013] The present invention further discloses a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method for improving the CT rotation control accuracy of a grating ruler as described above is implemented.
[0014] The present invention further discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for improving the CT rotation control accuracy of the grating ruler described above is implemented.
[0015] According to the technical solution of the present invention, by converting two square wave signals with a phase difference of 90 degrees output by the grating ruler into four pulse signals, a 4-fold frequency output of the signal is achieved, thereby significantly improving the measurement accuracy and control accuracy of the grating ruler, while reducing the manufacturing cost. Without increasing the grating hole density, the demand for high-precision measurement of high-speed CT equipment is met by adding a small amount of circuits, providing an economical and efficient solution for the fields of industrial automation and precision measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] For the purpose of illustration and not limitation, the present invention is now described in conjunction with the embodiments of the present invention and the accompanying drawings, in which:
[0017] Figure 1 It is a schematic flow chart of a method for improving the CT rotation control accuracy of a grating ruler in an embodiment of the present invention;
[0018] Figure 2 It is a schematic diagram of a system module for improving the CT rotation control accuracy of a grating ruler in an embodiment of the present invention;
[0019] Figure 3 is a schematic structural diagram of an electronic device in an embodiment of the present invention;
[0020] Figure 4 Schematic diagram of the circuit structure in an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the implementation mode of the present application will be clearly and completely described below in conjunction with the drawings in the implementation mode of the present application. Obviously, the described implementation mode is only a part of the implementation mode of the present application, not all the implementation modes. Based on the implementation mode in the present application, all other implementation modes obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application.
[0022] It should be noted that the terms "first", "second", etc. in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0023] It should be noted that, in the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other. The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0024] refer to Figure 1 and Figure 4 This embodiment discloses a method for improving the CT rotation control accuracy based on a grating ruler, the method comprising:
[0025] S100: Receive the original square wave of two signals with a phase difference of 90 degrees output by the grating ruler. It should be understood that the grating rulers and other equipment used in different CTs may be different. The two signals with a phase difference of 90 degrees in this embodiment are only exemplary and can be modified accordingly according to the output of different grating rulers. This embodiment does not limit it. Figure 4 The circuit structure diagram in this embodiment is shown. The A signal and the B signal in the figure are the two signals mentioned above. After receiving the original square waves of the two signals, the peak voltages of the square waves of the two signals are adjusted through the signal conditioning circuit to ensure the stability and reliability of the signals in subsequent processing. After the signal conditioning is completed, the same operation is performed on the A signal and the B signal.
[0026] S200: Invert the original square wave to obtain a negated square wave. It should be understood that this step is to perform an inversion operation on the A signal and the B signal of the original square wave, which is implemented by a direction inversion circuit in the circuit structure, that is, the high level part of the original square wave is converted into a low level part, and the low level part is converted into a high level part by the direction inversion circuit, so as to obtain a negated square wave signal with a logic value opposite to that of the original square wave, and ensure that the inversion operation of the two signals (A path and B path) is performed synchronously.
[0027] S300: Delay the original square wave to obtain a delayed square wave. The original square wave is processed by the adjustable delay circuit in the circuit structure to delay the signal as a whole for a specified time while maintaining the phase continuity of the square wave to obtain a delayed square wave. The adjustable delay circuit includes a synchronous timing circuit to achieve synchronous control of the delay operations of the two signals to ensure the phase consistency of the delayed signals. It also includes a delay time control module that dynamically adjusts the delay amplitude according to preset delay parameters to ensure that the generated delayed square wave matches the timing of the subsequent processing circuit. The adjustable delay circuit also includes a signal integrity maintenance module, which is used to suppress signal noise during the delay process, avoid waveform distortion, and ensure the consistency of the waveform characteristics of the delayed square wave and the original square wave.
[0028] S400: Invert the delayed square wave to obtain a delayed inverted square wave. Before inverting the delayed square wave, the delayed square wave is filtered by the filtering circuit in the circuit structure, and the inverting operation of the filtered delayed square wave is realized by the direction inverting circuit in the circuit structure. Exemplarily, the voltage signal of the delayed square wave is logically inverted by a logic inverter, and the high level part of the delayed square wave is converted to a low level, and the low level part is converted to a high level to generate a delayed inverted square wave. At the same time, the inversion operation is ensured to be synchronized with the delay operation, so that the waveform characteristics of the delayed square wave and the delayed inverted square wave are consistent in timing. In the inversion process, the edge characteristics of the signal are optimized to eliminate the spike or noise interference introduced by the inversion operation, and to ensure the smoothness of the waveform of the delayed inverted square wave.
[0029] S500: Perform operations based on the original square wave, the negated square wave, the delayed square wave and the delayed negated square wave of the single-channel signal to obtain a pulse square wave of the single-channel signal. Specifically, the operation method includes performing an AND operation on the original square wave and the delayed negated square wave through a logic AND unit in the circuit structure, and outputting a first pulse square wave; performing an AND operation on the negated square wave and the delayed square wave through a logic AND unit in the circuit structure, and outputting a second pulse square wave; performing an OR operation on the first pulse square wave and the second pulse square wave through a logic OR unit in the circuit structure, and outputting a third pulse square wave of the single-channel signal. In one or more embodiments, it is also possible to perform an AND operation on the original square wave and the delayed negated square wave, and output a first pulse square wave; and perform an AND operation on the negated square wave and the delayed square wave, and output a second pulse square wave.
[0030] S600: Perform an OR operation on the pulse square waves of the two signals to combine and output a high-precision pulse square wave. Specifically, after outputting the third pulse square wave of the single-channel signal, perform an OR operation on the third pulse square waves of the two single-channel signals to combine and output a high-precision pulse square wave, that is, to achieve a combined output of 4 times the edge pulse output. Similarly, the first pulse square wave and the second pulse square wave of the two single-channel signals can also be ORed to combine and output a high-precision pulse square wave.
[0031] S700: Collect the rising edge of the high-precision pulse square wave to obtain a high-precision grating ruler signal.
[0032] This embodiment further discloses a system for improving the CT rotation control accuracy based on a grating ruler, including:
[0033] The signal conditioning module 21 is used to receive the original square waves of two signals output by the grating ruler with a phase difference of 90 degrees.
[0034] The negation module 22 is used to negate the original square wave to obtain a negated square wave; and is also used to negate the delayed square wave to obtain a delayed negated square wave.
[0035] The delay module 23 is used to delay the original square wave to obtain a delayed square wave. Specifically: through a synchronous timing circuit, the original square waves of the two signals are delayed simultaneously to obtain delayed square waves of the two signals with the same delay; it is also used to eliminate noise of the delayed square wave through a filtering circuit.
[0036] The operation module 24 is used to perform operations based on the original square wave, the negated square wave, the delayed square wave and the delayed negated square wave of the single-channel signal to obtain the pulse square wave of the single-channel signal; it is also used to perform an OR operation on the pulse square waves of the two-channel signals to combine and output a high-precision pulse square wave; it is also used to perform an AND operation on the original square wave and the delayed negated square wave, and output a first pulse square wave; perform an AND operation on the negated square wave and the delayed square wave, and output a second pulse square wave; perform an OR operation on the first pulse square wave and the second pulse square wave, and output a third pulse square wave of the single-channel signal; perform an OR operation on the third pulse square waves of the two single-channel signals, and output a high-precision pulse square wave. It is also used to perform an AND operation on the original square wave and the delayed negated square wave, and output a first pulse square wave; perform an AND operation on the negated square wave and the delayed square wave, and output a second pulse square wave; perform an OR operation on the first pulse square wave and the second pulse square wave of the two single-channel signals, and output a high-precision pulse square wave.
[0037] The signal acquisition module 25 is used to acquire the rising edge of the high-precision pulse square wave to obtain a high-precision grating ruler signal.
[0038] Figure 3 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as Figure 3 As shown, the electronic device 50 includes: a processor 501 (processor), a memory 502 (memory) and a bus 503;
[0039] The processor 501 and the memory 502 communicate with each other via the bus 503 ; the processor 501 is used to call program instructions in the memory 502 to execute the methods provided by the above-mentioned method implementation methods.
[0040] This embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions. The computer instructions enable a computer to execute the methods provided by the above-mentioned method embodiments.
[0041] A person skilled in the art can understand that all or part of the steps for implementing the above-mentioned method implementation method can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium, which, when executed, executes the steps of the above-mentioned method implementation method; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various storage media that can store program codes.
[0042] The device implementation described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present implementation scheme. Those of ordinary skill in the art may understand and implement it without creative effort.
[0043] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each implementation method or some parts of the implementation method.
[0044] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for improving the CT rotation control accuracy based on a grating ruler, characterized in that: The method comprises: Receive the original square waves of two signals with a phase difference of 90 degrees output by the grating ruler; Inverting the original square wave to obtain a negated square wave; Delaying the original square wave to obtain a delayed square wave; Inverting the delayed square wave to obtain a delayed inverted square wave; Performing calculations based on the original square wave, the negated square wave, the delayed square wave and the delayed negated square wave of the single-channel signal to obtain a pulse square wave of the single-channel signal; Perform OR operation on the pulse square waves of two signals to combine and output a high-precision pulse square wave; The rising edge of the high-precision pulse square wave is collected to obtain a high-precision grating ruler signal.
2. The method for improving the CT rotation control accuracy based on a grating ruler according to claim 1 is characterized in that: The method for obtaining a pulse square wave of a single-channel signal by performing calculations based on the original square wave, the negated square wave, the delayed square wave and the delayed negated square wave of the single-channel signal comprises: Performing an AND operation on the original square wave and the delayed inverted square wave, and outputting a first pulse square wave; Performing an AND operation on the negated square wave and the delayed square wave, and outputting a second pulse square wave; An OR operation is performed on the first pulse square wave and the second pulse square wave, and a third pulse square wave of a single-channel signal is output.
3. The method for improving the CT rotation control accuracy based on a grating ruler according to claim 2 is characterized in that: The method of performing an OR operation on the pulse square waves of two signals to combine and output a high-precision pulse square wave includes: An OR operation is performed on the third pulse square waves of the two single-channel signals to combine and output a high-precision pulse square wave.
4. The method for improving the CT rotation control accuracy based on a grating ruler according to claim 1 is characterized in that: The method for obtaining a pulse square wave of a single-channel signal by performing calculations based on the original square wave, the negated square wave, the delayed square wave and the delayed negated square wave of the single-channel signal comprises: Performing an AND operation on the original square wave and the delayed inverted square wave, and outputting a first pulse square wave; An AND operation is performed on the negated square wave and the delayed square wave, and a second pulse square wave is output.
5. The method for improving the CT rotation control accuracy based on a grating ruler according to claim 4 is characterized in that: The method of performing an OR operation on the pulse square waves of two signals to combine and output a high-precision pulse square wave includes: An OR operation is performed on the first pulse square wave and the second pulse square wave of two single-channel signals to combine and output a high-precision pulse square wave.
6. The method for improving the CT rotation control accuracy based on a grating ruler according to claim 1 is characterized in that: The method of delaying the original square wave to obtain a delayed square wave comprises: The original square waves of the two signals are delayed simultaneously by a synchronous timing circuit to obtain delayed square waves of the two signals with the same delay.
7. The method for improving the CT rotation control accuracy based on a grating ruler according to claim 1 is characterized in that: After delaying the original square wave to obtain the delayed square wave, the method further includes: The noise of the delayed square wave is eliminated by a filtering circuit.
8. A system for improving the CT rotation control accuracy based on a grating ruler, characterized in that: include: The signal conditioning module is used to receive the original square waves of two signals output by the grating ruler with a phase difference of 90 degrees; A negation module, used for negating the original square wave to obtain a negated square wave; and also used for negating the delayed square wave to obtain a delayed negated square wave; A delay module, used for delaying the original square wave to obtain a delayed square wave; A calculation module, used for performing calculation based on the original square wave, the negated square wave, the delayed square wave and the delayed negated square wave of the single-channel signal to obtain a pulse square wave of the single-channel signal; It is also used to perform an OR operation on the pulse square waves of two signals to combine and output a high-precision pulse square wave; The signal acquisition module is used to collect the rising edge of the high-precision pulse square wave to obtain a high-precision grating ruler signal.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.