Novel grating reading head and detection method
By integrating a multi-dimensional sensor into the grating reading head and constructing a nonlinear relationship mapping, the problems of large size, high cost, and insufficient error compensation of the grating reading head are solved, and high-precision and stable displacement measurement is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2026-01-20
- Publication Date
- 2026-04-21
AI Technical Summary
Existing grating readout heads are bulky and expensive due to their reliance on complex mechanical structures. Furthermore, traditional linear compensation methods are unable to eliminate nonlinear errors caused by the coupling of multiple physical fields such as temperature, vibration, magnetic field, and installation posture, resulting in insufficient measurement accuracy and stability under complex working conditions.
A novel grating readout head design is adopted, with a high-power LED photoelectric sensor and signal processing circuit arranged on the front of the PCB, and a 9DOF sensor, temperature sensor and vibration sensor integrated on the back of the PCB. A nonlinear relationship mapping is constructed through neural network and AIAgent to compensate for displacement data errors in real time.
It achieves miniaturization of the grating reading head and integration of multi-dimensional sensing, accurately captures the reading head status, eliminates errors introduced by differences in the installation position of external sensors, improves measurement accuracy and stability, can resolve nonlinear errors of multi-physics coupling, and enhances the stability of the system in harsh environments.
Smart Images

Figure CN121898256A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of precision displacement measurement technology, specifically to a novel grating reading head and detection method. Background Technology
[0002] Due to their high precision and high resolution, grating ruler displacement sensors are widely used in geometric measurement and control instruments and high-end equipment manufacturing. As the core component for photoelectric conversion of displacement signals, the stability of the grating readhead directly determines the final accuracy of the measurement system. However, in actual industrial settings, environmental conditions are often harsh. Temperature fluctuations, mechanical vibrations, environmental magnetic field interference, and even minor deviations during installation can all cause distortion in the readhead's output signal, thus reducing measurement accuracy.
[0003] To address these issues, existing technologies typically focus on two aspects: mechanical structure improvements and software compensation. Regarding mechanical structures, common approaches include adding locking and limiting mechanisms or designing complex adaptive servo devices, attempting to reduce vibration impacts or correct installation angles through mechanical constraints. While this method alleviates certain physical interferences to some extent, it also significantly increases the size of the reading head and complicates its internal structure. This not only increases the cost of precision machining and assembly but also makes it difficult to meet the miniaturization and integration requirements of modern precision equipment for measuring devices. Furthermore, purely mechanical structures cannot solve the temperature drift problem caused by the heating of high-power photoelectric components, nor can they shield the signal circuits from interference from strong magnetic fields.
[0004] Regarding error compensation, existing solutions mostly employ external sensors to collect environmental data and establish linear compensation models based on statistical regression methods such as least squares. However, this approach has significant limitations. First, external sensors are difficult to place close to the core heat sources (such as high-power LEDs) and signal processing circuits inside the reading head, resulting in thermal conduction lag in the collected temperature data and an inability to accurately reflect the real-time thermal operating state of the reading head. Furthermore, external attitude sensors, due to variations in installation location, struggle to accurately capture minute rotations or tilts of the reading head. Second, errors in actual operating conditions are not independent; temperature changes cause micro-deformations in the structure, altering the vibration response, and magnetic field interference fluctuates with attitude changes. These factors exhibit highly nonlinear coupling. Traditional linear compensation models or single-variable correction methods struggle to resolve such complex, cross-sensitive errors, making it difficult to fundamentally improve the accuracy and stability of the measurement system under complex conditions involving multi-physics coupling.
[0005] Therefore, this invention proposes a novel grating reading head and detection method to overcome the shortcomings of the prior art. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides a novel grating reading head and detection method, which solves the problems of insufficient measurement accuracy and stability under complex working conditions caused by the large size and high cost of existing grating reading heads due to their reliance on complex mechanical structures, and the difficulty of eliminating nonlinear errors caused by the coupling of multiple physical fields such as temperature, vibration, magnetic field and installation posture using traditional linear compensation methods.
[0007] To achieve the above objectives, the first aspect of the present invention provides a novel grating reading head, comprising a novel grating reading head and a data output interface; The front of the novel grating reading head is provided with a grating reading head measurement component, which includes a high-power LED photoelectric sensor and a signal processing circuit for performing micro-displacement measurement and signal processing. The back of the novel grating reading head is provided with a sensor assembly, which includes a 9DOF sensor, a temperature sensor, and a vibration sensor, used to detect the real-time attitude of the novel grating reading head, the magnetic field of each degree of freedom, and the temperature and vibration data of the grating reading head measurement component. The data output interface is located on the new type of grating reading head and is used to output the displacement data of the grating reading head measurement component and the system environment parameters detected by the sensor component.
[0008] Preferably, the high-power LED photoelectric sensor and the signal processing circuit are electrically connected, and the signal processing circuit processes the signal from the high-power LED photoelectric sensor to obtain the displacement data.
[0009] Preferably, the 9DOF sensor is used to detect the real-time attitude of the novel grating reading head and the magnetic field of each degree of freedom; The temperature sensor is used to detect the temperature data of the high-power LED photoelectric sensor and the signal processing circuit. The vibration sensor is used to detect vibration data from the novel grating reading head.
[0010] Preferably, the data output interface is configured to simultaneously output the real-time displacement data, the real-time attitude of the novel grating reading head, and system environmental parameters.
[0011] Preferably, the body of the novel grating reading head is a PCB circuit board, and the heat generated by the high-power LED photoelectric sensor is transferred to the temperature sensor located on the back through the PCB circuit board.
[0012] A second aspect of the present invention provides a novel detection method for a grating reading head, comprising the following steps: Through preliminary experiments, a nonlinear mapping between the parameters affecting the accuracy of the grating readhead and the output error of the readhead was constructed using neural networks and AIAgent. The grating reading head measurement component acquires displacement data, the sensor component acquires system environmental parameters in real time, and the new grating reading head simultaneously outputs real-time displacement data and the actual system environmental parameters of the reading head through the data output interface. The processor receives the displacement data and the system environment parameters, inputs the system environment parameters into the nonlinear relationship mapping to obtain the error compensation amount, and uses the error compensation amount to compensate and process the displacement data; The processed displacement data is output to the display module as the actual displacement result.
[0013] Preferably, the parameters for the accuracy of the grating reading head include: real-time attitude and magnetic field of each degree of freedom acquired by the 9DOF sensor, temperature data acquired by the temperature sensor, and vibration data acquired by the vibration sensor.
[0014] Preferably, the nonlinear relationship mapping is used to correct the reading head output error caused by the coupling of temperature data, magnetic field, vibration data and installation error.
[0015] Preferably, the sensor assembly directly measures the system environmental parameter information of the novel grating readhead body.
[0016] Preferably, the neural network and AIAgent are used to process the highly nonlinear coupling system between the parameters affecting the accuracy of the grating readhead and the output error of the readhead.
[0017] This invention provides a novel grating reading head and detection method. It has the following beneficial effects: 1. This invention achieves miniaturization and multi-dimensional sensing integration of the grating reading head through a front and back circuit layout. The photoelectric measurement components are arranged on the front of the PCB, while the 9DOF, temperature, and vibration sensors are integrated on the back of the PCB. This replaces the traditional bulky mechanical adjustment structure and external sensor solution, reducing hardware costs and size while enabling in-situ detection of the reading head's status. The sensor components directly collect the vibration and attitude data of the reading head itself, eliminating detection errors introduced by differences in the installation position of external sensors and improving the spatial consistency of the basic data.
[0018] 2. This invention solves the problem of temperature drift monitoring in grating measurement by utilizing the specific thermal conductivity structure of a PCB circuit board. A direct heat conduction path is established from the high-power LED heat source on the front side to the temperature sensor on the back side through the PCB's copper foil and thermal vias. This allows the temperature sensor to directly read the board-level temperature, characterizing the actual operating conditions of the optoelectronic components and processing circuitry, avoiding numerical lag and deviation caused by measuring ambient air temperature. Accurate heat source temperature data provides a reliable physical basis for subsequently eliminating measurement errors caused by thermal deformation and device temperature drift.
[0019] 3. This invention improves measurement accuracy and generalization ability under complex working conditions by constructing a nonlinear relationship mapping model. Unlike traditional linear regression compensation based on the least squares method, this invention utilizes neural networks and AI agents to handle the highly nonlinear coupling relationship between temperature, magnetic field, vibration, and installation attitude. It can analyze the composite errors caused by the combined effects of multiple interference factors and perform real-time reasoning and correction in actual measurements, effectively overcoming the shortcomings of single-variable compensation in handling cross-sensitive errors and enhancing the system's stability in harsh industrial environments. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of the novel grating reading head of the present invention; Figure 2 This is a schematic diagram of the novel grating reading head detection method of the present invention; Figure 3 This is a schematic diagram of the detection method of the present invention.
[0021] Among them, 100 is a new type of grating reading head; 110 is a grating reading head measurement component; 111 is a high-power LED photoelectric sensor; 112 is a signal processing circuit; 120 is a data output interface; 130 is a sensor component; 131 is a 9DOF sensor; 132 is a temperature sensor; and 133 is a vibration sensor. Detailed Implementation
[0022] The technical solutions in 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, and 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.
[0023] Please refer to the attached document. Figure 1 This embodiment provides a novel grating reading head, including a novel grating reading head 100, a grating reading head measurement assembly 110, a sensor assembly 130, and a data output interface 120. The front side of the new grating reading head 100 is provided with a grating reading head measurement component 110, which includes a high-power LED photoelectric sensor 111 and a signal processing circuit 112 for performing micro-displacement measurement and signal processing. The high-power LED photoelectric sensor 111 is electrically connected to the signal processing circuit 112. The signal processing circuit 112 processes the signal from the high-power LED photoelectric sensor 111 to obtain displacement data.
[0024] In one specific embodiment, the signal processing circuit 112 specifically includes a differential amplifier circuit, a filter circuit, and a shaping and direction determination circuit. The high-power LED photoelectric sensor 111 emits a light signal, which is modulated by a grating ruler and converted into an electrical signal. This electrical signal is then sequentially amplified by the differential amplifier circuit, its noise is removed by the filter circuit, and its analog signal is converted into a digital pulse signal by the shaping and direction determination circuit to determine the displacement direction, ultimately generating the original displacement data. The grating reading head measurement assembly 110 is mainly used in geometric measurement and control instruments, high-end equipment manufacturing, and automatic precision testing fields to achieve high-precision micro-displacement measurement.
[0025] The back of the novel grating reading head 100 is provided with a sensor assembly 130, which includes a 9DOF sensor 131, a temperature sensor 132 and a vibration sensor 133, for detecting the real-time attitude of the novel grating reading head 100, the magnetic field of each degree of freedom, and the temperature and vibration data of the grating reading head measurement assembly 110. The 9DOF sensor 131 is used to detect the real-time attitude and magnetic field of each degree of freedom of the new grating readhead 100; Temperature sensor 132 is used to detect temperature data of high-power LED photoelectric sensor 111 and signal processing circuit 112; Vibration sensor 133 is used to detect vibration data of novel grating readout head 100.
[0026] In one specific embodiment, the 9DOF sensor 131 integrates a three-axis accelerometer, a three-axis gyroscope, and a three-axis magnetometer, which can respectively measure the linear acceleration, angular velocity, and magnetic field direction of the reading head, thereby accurately capturing the tilt, rotational attitude, and environmental magnetic field interference of the reading head during installation or operation. Since the sensor assembly 130 is directly arranged on the back of the reading head circuit board, compared with traditional external sensors, this embodiment can directly measure the system environmental parameter information of the reading head body, avoiding the problems of low temperature measurement due to the distance of external sensors from the heat source, or inaccurate attitude measurement due to differences in installation position, thus achieving accurate capture of temperature, magnetic field, vibration, and installation (rotational tilt) errors.
[0027] The data output interface 120 is provided on the new type of grating reading head 100 and is used to output the displacement data of the grating reading head measurement component 110 and the system environment parameters detected by the sensor component 130. The data output interface 120 is configured to simultaneously output real-time displacement data, the real-time attitude of the new grating reading head 100, and system environmental parameters.
[0028] In one specific embodiment, the data output interface 120 can take various physical forms such as connectors, wire harnesses, or power strips. Its specific location (e.g., top, bottom, or side) and shape within the novel grating readhead 100 can be flexibly arranged according to actual installation requirements. During actual operation, this interface serves as a unified data channel, synchronously transmitting the raw displacement data collected by the grating readhead measurement component 110 and system environmental parameters such as temperature, vibration, attitude, and magnetic field collected by the sensor component 130. This provides a time-synchronized data foundation for subsequent nonlinear error compensation using neural networks and AI agents.
[0029] The main body of the new grating reading head 100 is a PCB circuit board. The heat generated by the high-power LED photoelectric sensor 111 is transferred to the temperature sensor 132 located on the back through the PCB circuit board.
[0030] In one specific embodiment, the body of the novel grating reading head 100 can be manufactured using processes such as aluminum substrate, flexible PCB, or FFC (flexible flat cable). The high-power LED photoelectric sensor 111 generates heat during operation, which is directly transferred to the temperature sensor 132 on the back side via the excellent thermal conductivity of the PCB circuit board. This heat conduction structure design ensures that the data measured by the temperature sensor 132 accurately reflects the actual operating temperature of the main heat source (photoelectric sensor) and signal processing circuitry, rather than the ambient air temperature, thus providing an accurate physical basis for resolving temperature drift errors. Furthermore, mechanical structures can be added as needed for protection and ease of installation, such as adding threaded holes or a housing; these auxiliary structures do not alter the core of the circuit layout on both sides.
[0031] Reference Appendix Figure 2 -Appendix Figure 3 This invention provides a novel detection method for a grating readout head, which operates in a measurement system comprising a novel grating readout head 100, a processor, and a display and storage module. The novel grating readout head 100, as a front-end sensing device, utilizes a front- and back-side circuit layout structure to achieve synchronous acquisition of displacement signals and multi-dimensional environmental physical quantities at the physical level. The processor, as a data processing center, calculates and corrects multi-physics coupling errors by running a specific algorithm model.
[0032] The detection method specifically includes the following steps: S1. Constructing an error prediction model. In the pre-experimental stage before formal measurement, neural networks and AIAgent technology are used to analyze the correlation between the accuracy parameters of the grating readhead and the output error of the readhead, and to construct a nonlinear relationship mapping between the parameters and the error.
[0033] S2, synchronous acquisition of multi-dimensional data. During the actual measurement process, the grating readhead measurement component 110 acquires the raw displacement data of the measured displacement, and the sensor component 130 acquires the system environmental parameters reflecting the status of the readhead body in real time. The new grating readhead 100 packages and outputs the real-time displacement data and system environmental parameters through the data output interface 120.
[0034] S3, Perform real-time compensation calculation. The processor receives displacement data and system environment parameters via a communication link, substitutes the system environment parameters as input variables into the nonlinear relationship mapping constructed in step S1, and calculates the corresponding error compensation amount. The processor uses this error compensation amount to correct the original displacement data.
[0035] S4 outputs the actual measurement result. The processor transmits the compensated displacement data to the display module or storage module as the final actual displacement result for the user to read or for the device to retrieve.
[0036] In this embodiment, the process of constructing the nonlinear relationship mapping model mainly involves establishing a mathematical correlation between multidimensional environmental parameters and displacement measurement errors. This process is typically performed during the calibration phase before the grating reading head leaves the factory or during periodic maintenance and calibration, and specifically includes the following steps: S101. Construct a high-precision calibration experimental platform. The novel grating readhead 100 to be calibrated is mounted on a precision displacement platform. This platform is equipped with a reference measuring device (such as a dual-frequency laser interferometer) with a measurement accuracy at least an order of magnitude higher than that of the grating readhead to provide the true displacement value. During the motion, the grating readhead measuring component 110 and the reference measuring device sample synchronously; the difference between their readings is the output error to be compensated.
[0037] S102, Multi-dimensional environmental parameter traversal and data acquisition. The physical environment of the new grating reading head 100 is actively altered using environmental simulation equipment, covering a preset operating range. Specifically, this includes: adjusting the ambient temperature using a temperature control chamber to ensure the circuit board and photoelectric components experience the complete operating temperature range; applying excitation signals of different frequencies and amplitudes using a vibration table; changing the strength and direction of the surrounding magnetic field using a magnetic field generating coil; and fine-tuning the installation angle (including pitch, yaw, and roll) of the reading head relative to the grating ruler using a multi-axis turntable.
[0038] During this period, sensor assembly 130 continuously collects multi-dimensional system environmental parameters, including acceleration, angular velocity, magnetic field strength, plate temperature, and vibration characteristics. The data acquisition system timestamps the system environmental parameters (input quantities) at the same moment with the readhead output error (target quantity) to generate a sample dataset for model training.
[0039] S103, Construct the neural network model architecture. The neural network structure is determined based on the dimensions of the collected data. In this embodiment, a backpropagation (BP) neural network or a long short-term memory (LSTM) network with a deep structure is preferred. The input layer nodes correspond to the multi-dimensional feature vectors such as temperature, vibration, attitude, and magnetic field, while the output layer nodes correspond to the displacement error values.
[0040] The specific number of layers in the neural network and the selection of activation functions (such as ReLU or Sigmoid) can be conventionally designed by those skilled in the art based on the data scale and fitting accuracy requirements. These are well-known techniques in the field and will not be elaborated further.
[0041] S104, Model training and parameter optimization using AIAgent. The dataset obtained in step S102 is input into the neural network. Unlike traditional gradient descent training, this embodiment introduces AIAgent (intelligent agent module) as the monitoring and decision-making unit for the training process. This AIAgent integrates global optimization strategies (such as Genetic Algorithm (GA), Particle Swarm Optimization (PSO), or Bayesian optimization). During training, the AIAgent monitors the network's loss function in real time. When it gets stuck in a local minimum, it automatically adjusts the learning rate or reinitializes some weights and thresholds to find the global optimum.
[0042] This mechanism establishes a nonlinear relationship mapping that can accurately characterize the coupling properties of multi-physics fields. This mapping can not only fit the influence of a single physical quantity, but also analyze the comprehensive impact of complex coupling factors, such as minute attitude changes caused by vibration at high temperatures, on the measurement accuracy of gratings. This is something that traditional linear compensation equations cannot achieve.
[0043] S105, Model Validation and Parameter Deployment. The trained model is validated using reserved test set data, and the residual between the predicted error and the actual error is calculated. When the residual meets a preset accuracy target (e.g., ±0.1μm), all weight matrices, bias terms, and network structure parameters of the neural network are extracted, converted into a format readable by the embedded system (such as C arrays or binary files), and burned into the processor storage space connected to the new type of grating readhead for subsequent real-time compensation calculations. After completing the construction and deployment of the nonlinear relationship mapping model, the new grating reading head enters the actual measurement and operation stage. This step mainly describes how to achieve the synchronous acquisition and output of displacement data and multi-dimensional environmental parameters using the front and back circuit layout. The specific process includes: S201, Photoelectric Conversion and Processing of the Original Displacement Signal. The grating readhead measuring assembly 110 is powered on, and the high-power LED photoelectric sensor 111 emits a light beam. After being modulated by the grating lines of the grating ruler, it forms a moiré fringe light signal. The photoelectric receiving array receives this light signal and converts it into an analog electrical signal. The signal processing circuit 112 receives the analog electrical signal and performs signal conditioning: a differential amplifier circuit amplifies the weak signal and suppresses common-mode noise; a filter circuit filters out high-frequency electromagnetic interference noise; and a shaping and direction-determining circuit uses a comparator to convert the sinusoidal analog signal into a digital pulse signal containing phase A and phase B. The counter calculates the real-time original displacement count value based on the phase difference and number of pulses.
[0044] S202, In-situ sensing of the state of the reading head body. This step is performed in parallel with S201, and the sensor assembly 130 located on the back of the novel grating reading head 100 collects physical state data of the reading head body.
[0045] Regarding temperature data, since the body of the new grating reading head 100 uses a PCB circuit board (such as FR-4 fiberglass board or metal substrate), the circuit board serves as the heat transfer medium. The heat generated by the operation of the high-power LED photoelectric sensor 111 and signal processing circuit 112 on the front side is directly conducted to the temperature sensor 132 on the back side through the copper foil and thermal vias of the PCB board layer.
[0046] Temperature sensor 132 directly measures the plate temperature value corresponding to the conducted heat, which characterizes the real-time thermal operating point of the optoelectronic component and processing circuit.
[0047] Regarding attitude and magnetic field data, the 9DOF sensor 131 integrates a three-axis accelerometer to detect the linear acceleration components of the reading head along the X, Y, and Z axes; a three-axis gyroscope detects the angular velocity of the reading head rotating around each axis; and the processor uses attitude calculation algorithms (such as complementary filtering or Kalman filtering) to fuse the angular velocity and acceleration data to calculate the tilt angle of the reading head relative to the direction of gravity (including pitch, roll, and yaw). A triaxial magnetometer measures the strength of the ambient magnetic field and the direction of the magnetic field lines around the reading head.
[0048] Regarding vibration data, the vibration sensor 133 (e.g., a MEMS piezoelectric vibration sensor) picks up the mechanical vibration signal of the reading head body and converts it into vibration frequency and vibration amplitude data.
[0049] S203, Data timing alignment and synchronous output. The main control unit (e.g., MCU microcontroller or FPGA field-programmable gate array) inside the new grating read head 100 uses a unified hardware clock source to trigger sampling. At the same sampling moment, the main control unit simultaneously reads the displacement count value generated in step S201 and the system environment parameters acquired in step S202.
[0050] Subsequently, the main control unit constructs a data frame according to a preset communication protocol format. This data frame includes: a frame header, displacement data field, temperature data field, 9DOF attitude data field, vibration data field, and a checksum (such as CRC check). The data output interface 120 serves as the physical transmission channel, configured as a serial communication interface (such as RS485, RS232), an industrial bus interface (such as CAN Bus), or a differential signal interface, to send the encapsulated data frame to an external processor in real time.
[0051] This mechanism ensures that each set of output displacement data strictly corresponds to the current temperature, magnetic field, vibration, and attitude state, providing a time-synchronized data foundation for subsequent nonlinear error compensation.
[0052] After acquiring synchronized raw displacement data and system environment parameters through the data output interface, the system enters the real-time error compensation calculation stage. This stage is executed by a processor that establishes a communication connection with the new grating readout head 100. The processor can be configured as an industrial PC (IPC) of the CNC system, a DSP (Digital Signal Processor) on a motion control card, or a dedicated ARM architecture embedded processor. The specific process of real-time error compensation calculation includes: S301, Data Reception and Protocol Parsing. The processor receives data frames from the new type of grating readhead 100 via a physical communication interface (such as an RS485 serial port or an EtherCAT bus interface). The processor runs the communication driver to verify and unpack the data frames according to a predefined communication protocol (such as the Modbus protocol or a custom binary protocol). The processor extracts the original displacement count value at the same sampling time and system environment parameters from the payload of the data frame.
[0053] The system environmental parameters are parsed into specific physical quantity values, including: temperature values representing the thermal state, triaxial acceleration and angular velocity values representing the motion state, and triaxial magnetic field strength values representing the electromagnetic environment.
[0054] S302, Nonlinear Mapping Inference. The processor loads a pre-stored nonlinear relation mapping model. This model is based on the neural network and AIAgent trained in the aforementioned pre-experiment phase and has been converted into an inference format executable by the embedded system (e.g., TensorFlow Lite Micro model format or weight matrix in C language array form).
[0055] The processor normalizes the system environment parameters (including temperature, vibration, magnetic field, and attitude angles calculated from 9DOF data) obtained in step S301 and constructs them as an input vector. Subsequently, the processor performs neural network inference operations. Specifically, the processor uses stored weight matrices and bias vectors to perform matrix multiplication and addition operations on the input vector, and introduces nonlinear factors through nonlinear activation functions (such as ReLU or the Sigmoid function). Through layer-by-layer computation of the multi-layer network, the model can accurately characterize the highly nonlinear coupling relationship between temperature, magnetic field, vibration data, and installation attitude (installation error). For example, the model can calculate the combined displacement deviation value generated by the slight structural deformation caused by vibration at a specific temperature, superimposed with magnetic field interference. The final output of the inference operation is the current error compensation amount.
[0056] S303, Correction and Compensation of Displacement Data. The processor reads the raw displacement data extracted in step S301 and corrects it using the error compensation amount output in step S302. The correction algorithm performs algebraic addition or subtraction operations based on the mathematical symbols defined by the error (e.g., true displacement = original displacement - prediction error).
[0057] Through this step, the processor achieves real-time correction of the reading head output error caused by the coupling of four factors as defined in the claims: temperature, magnetic field, vibration, and installation error (manifested as attitude tilt). This data-driven nonlinear correction method effectively eliminates the cross-sensitivity error, which is difficult to handle by traditional linear compensation methods, thereby restoring the actual physical displacement of the grating ruler.
[0058] S304, Post-processing and Output of Data. To meet the requirements of backend applications, the processor performs digital filtering on the corrected displacement data (e.g., moving average filtering or median filtering) to remove computational noise. Subsequently, the processor converts the processed displacement data into a standard position feedback signal (e.g., a TTL pulse signal or floating-point coordinate values transmitted via a bus), which is then transmitted to the display module for display or to the motion controller as feedback input for the position loop, serving as the final true displacement result.
[0059] After the processor completes real-time error compensation calculations to obtain high-precision displacement values, the detection method enters the final stage of outputting the actual displacement results. This stage converts the digital results in the computational domain into a form in the physical world that can be perceived by operators or used by subsequent devices. The specific implementation process includes the following steps: S401, Data Formatting and Transmission Control. The processor encapsulates the compensated displacement data calculated in step S3 according to a protocol. Depending on the specific interface type of the display module, the processor converts the displacement data into corresponding drive signals or communication messages. When the display module is a traditional digital display (DRO) panel, the processor converts the floating-point displacement data into a serial data stream containing segment code control information (such as SPI or I2C signals), or into BCD code parallel signals. When the display module is a PC-based host computer software interface or the screen of a CNC system, the processor encapsulates the displacement data into standard human-machine interface interaction protocol messages (such as Modbus TCP messages or JSON format data packets) and sends them via the network port or USB interface.
[0060] S402, Real-time driving and presentation of the display module. The display module receives the driving signal or message sent in step S401 and refreshes the current display content. The display module is specifically implemented as a liquid crystal display (LCD), a light-emitting diode display panel (LED), an organic light-emitting diode screen (OLED), or a graphical user interface (GUI) on a computer monitor. The display module presents the displacement data in real-time in digital form on the interface; this value is the true displacement result after removing environmental coupling errors.
[0061] To meet the comprehensive information requirements of industrial sites, the display module can also be configured for split-screen or multi-line display modes. In addition to displaying the actual displacement results of the display core, the module can simultaneously display system environmental parameters collected by the sensor component 130 and analyzed by the processor, such as the current reading head temperature, vibration amplitude status indicators, and attitude tilt warning icons. This integrated display method allows operators to intuitively assess the reliability of the current measurement. The specific circuit driving method and interface refresh logic of the display module can be conventionally designed by those skilled in the art based on the selected screen specifications; these are well-known technologies in the field and will not be elaborated upon here.
[0062] S403, the final application of the actual displacement result. The displacement data output by the display module is defined as the actual displacement result, which is directly used as the reference for precision machining or measurement. In manual machining scenarios, the operator moves the machine tool table according to the values on the display module to achieve precise positioning. In automated machining scenarios, although the claims mainly limit the display module, the actual displacement result is usually synchronously fed back to the servo control loop of the CNC system. At this time, the display module acts as a monitoring terminal, used by engineers to verify the position deviation during the machining process in real time. Through the above steps, the system completes the entire process from multi-dimensional physical quantity perception to high-precision displacement output, effectively solving the technical problem of reading distortion caused by environmental interference in complex working conditions by traditional grating reading heads.
Claims
1. A novel grating reading head, comprising a novel grating reading head (100) and a data output interface (120), characterized in that, The front side of the novel grating reading head (100) is provided with a grating reading head measurement component (110), which includes a high-power LED photoelectric sensor (111) and a signal processing circuit (112) for performing micro-displacement measurement and signal processing. The back of the novel grating reading head (100) is provided with a sensor assembly (130), which includes a 9DOF sensor (131), a temperature sensor (132) and a vibration sensor (133), used to detect the real-time attitude of the novel grating reading head (100), the magnetic field of each degree of freedom, and the temperature and vibration data of the grating reading head measurement assembly (110); The data output interface (120) is located on the new type of grating reading head (100) and is used to output the displacement data of the grating reading head measurement component (110) and the system environment parameters detected by the sensor component (130).
2. The novel grating reading head according to claim 1, characterized in that, The high-power LED photoelectric sensor (111) and the signal processing circuit (112) are electrically connected. The signal processing circuit (112) processes the signal from the high-power LED photoelectric sensor (111) to obtain the displacement data.
3. The novel grating reading head according to claim 1, characterized in that, The 9DOF sensor (131) is used to detect the real-time attitude and magnetic field of each degree of freedom of the novel grating readhead (100); The temperature sensor (132) is used to detect the temperature data of the high-power LED photoelectric sensor (111) and the signal processing circuit (112); The vibration sensor (133) is used to detect vibration data of the novel grating reading head (100).
4. The novel grating reading head according to claim 1, characterized in that, The data output interface (120) is configured to simultaneously output the real-time displacement data, the real-time attitude of the novel grating reading head (100), and system environment parameters.
5. A novel grating reading head according to claim 1, characterized in that, The body of the novel grating reading head (100) is a PCB circuit board, and the heat generated by the high-power LED photoelectric sensor (111) is transferred to the temperature sensor (132) located on the back through the PCB circuit board.
6. A novel detection method for a grating reading head, characterized in that, Includes the following steps: Through preliminary experiments, a nonlinear mapping between the parameters affecting the accuracy of the grating readhead and the output error of the readhead was constructed using neural networks and AIAgent. The grating reading head measurement component (110) acquires displacement data of the measured displacement, the sensor component (130) acquires system environmental parameters in real time, and the new grating reading head (100) outputs real-time displacement data and actual system environmental parameters of the reading head simultaneously through the data output interface (120). The processor receives the displacement data and the system environment parameters, inputs the system environment parameters into the nonlinear relationship mapping to obtain the error compensation amount, and uses the error compensation amount to compensate and process the displacement data; The processed displacement data is output to the display module as the actual displacement result.
7. The detection method of a novel grating reading head according to claim 6, characterized in that, The parameters of the accuracy of the grating reading head include: real-time attitude and magnetic field of each degree of freedom collected by the 9DOF sensor (131), temperature data collected by the temperature sensor (132), and vibration data collected by the vibration sensor (133).
8. The detection method of a novel grating reading head according to claim 6, characterized in that, The nonlinear relationship mapping is used to correct the reading head output error caused by the coupling of temperature data, magnetic field, vibration data and installation error.
9. The detection method of a novel grating reading head according to claim 6, characterized in that, The sensor assembly (130) directly measures the system environmental parameter information of the novel grating readhead (100) body.
10. The detection method of a novel grating reading head according to claim 6, characterized in that, The neural network and AIAgent are used to process the highly nonlinear coupling system between the parameters affecting the accuracy of the grating readhead and the output error of the readhead.