Grating encoder electromagnetic interference reliability quantitative evaluation method and test system
By analyzing the output signal of the grating encoder under electromagnetic interference, calculating the duty cycle error and phase offset degree, the problem of insufficient reliability evaluation of the electromagnetic interference of the grating encoder is solved, and the reliability evaluation of the encoder in different environments is achieved, which improves the accuracy and reliability of the test.
Patent Information
- Application Number
- CN202510035829.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-05-13
AI Technical Summary
In the prior art, there is little evaluation of the reliability of grating encoder under different working environment stresses, especially insufficient research on electromagnetic interference, resulting in a high proportion of faults caused by electromagnetic interference in practical applications of encoders.
A quantitative evaluation method for electromagnetic interference reliability of grating encoder is proposed. By obtaining the output signal of grating encoder under electromagnetic interference, the duty cycle error and phase offset degree of the two-phase square wave signal are calculated, and it is used to evaluate the electromagnetic interference reliability of encoder.
This method can effectively evaluate the reliability of grating encoder under electromagnetic interference, simplify the detection process, reduce measurement errors, improve the accuracy and reliability of the test, and is suitable for grating encoders of different models and sizes.
Smart Images

Figure CN119986187A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of encoders, and relates to a reliability evaluation method of encoders, and in particular to a quantitative evaluation method and a test system for electromagnetic interference reliability of a grating encoder. Background Art
[0002] Grating encoder is a sensor used for motion control, which converts the mechanical position change signal of an object into an electrical signal output, and the electrical signal serves as the feedback signal for controlling the motion control device. Grating encoder integrates optics, mechanics and electronics, has high detection accuracy, and is widely used in high-end CNC equipment that requires precise control of positioning and speed, such as CNC machine tools, industrial robots, etc. As an important motion control link in CNC equipment, the reliability of grating encoder will have an important impact on the reliability and performance of the whole machine. At present, the research on grating encoders is mostly focused on improving the accuracy and resolution of encoders, reducing the size of encoders, improving the grating level, and increasing measurement accuracy. There is little understanding of the reliability level of grating encoders under different working environment stresses. Mastering the reliability level of encoders is of great significance to the evaluation of the reliability and maintenance of the whole machine.
[0003] Reliability testing can effectively reveal defects and deficiencies in product design, processing and manufacturing, and the reliability data obtained from the test also provides an important basis for subsequent reliability assessment, modeling and redesign. Through in-depth analysis of the main failure modes and causes of various encoder components, it is found that the sensitive stress of the encoder's internal components mainly includes factors such as temperature, humidity, vibration, oil pollution and electrical stress.
[0004] In the related technologies, the individual or combined effects of temperature, humidity and vibration have been widely studied, while the research on the sensitive factor of electrical stress is relatively insufficient. However, in practical applications, the failure rate of grating encoders caused by electromagnetic interference cannot be ignored. Problems such as internal interconnection caused by high voltage, metal interdiffusion of electrical contacts and electrostatic damage may occur, thus causing electromagnetic interference. Therefore, it is necessary to carry out research on electromagnetic interference, develop reliability test equipment and related technologies for grating encoders with electromagnetic interference simulation capabilities, conduct laboratory reliability bench tests, and conduct systematic theoretical analysis of the obtained performance degradation data to complete the reliability evaluation of grating encoders. Summary of the invention
[0005] In view of this, the present invention discloses a quantitative evaluation method and a test system for electromagnetic interference reliability of a grating encoder, which can solve the deficiencies existing in the related art.
[0006] To achieve the above purpose, the present invention discloses the following technical solutions: According to a first aspect of the present invention, a quantitative evaluation method for electromagnetic interference reliability of a grating encoder is proposed, the method comprising: Acquire an output signal of the grating encoder under electromagnetic interference, wherein the output signal includes time series data corresponding to a two-phase square wave signal; Calculating a duty cycle error and a phase shift degree of the two-phase square wave signal according to the output signal, and determining the duty cycle error as a uniformity error of the two-phase square wave signal, and determining the phase shift degree as an orthogonality error of the two-phase square wave signal; The electromagnetic interference reliability of the grating encoder is evaluated based on the uniformity error and the orthogonality error.
[0007] According to a second aspect of the present invention, a quantitative evaluation device for electromagnetic interference reliability of a grating encoder is provided, the device comprising: An acquisition unit: acquiring an output signal of the grating encoder under electromagnetic interference, wherein the output signal includes time series data corresponding to a two-phase square wave signal; A calculation unit: calculates the duty cycle error and the phase shift degree of the two-phase square wave signal according to the output signal, and determines the duty cycle error as the uniformity error of the two-phase square wave signal, and determines the phase shift degree as the orthogonality error of the two-phase square wave signal; An evaluation unit is configured to evaluate the electromagnetic interference reliability of the grating encoder according to the uniformity error and the orthogonality error.
[0008] According to a third aspect of the present invention, a test system for electromagnetic interference reliability of a grating encoder is provided, the system comprising a main body, an electromagnetic interference test device, and a detection control system; The main body includes a ground reference plane, a wooden table, an insulating pad, a grating encoder and its clamp and a drive unit; the grating encoder and its clamp and drive unit include a motor mounting plate, an isolation cover, a servo motor, a coupling, and a grating encoder mounting plate; The ground reference plane is a metal thin plate, the wooden table is placed on the surface of the ground reference plane, and a horizontal coupling plate is provided on the tabletop of the wooden table; The insulating pad is used to isolate the grating encoder and its clamping and driving unit from the horizontal coupling plate.
[0009] According to a fourth aspect of the present invention, an electronic device is provided, comprising: processor; a memory for storing processor-executable instructions; The processor implements the steps of the method described in the first aspect by running the executable instructions.
[0010] According to a fifth aspect of the present invention, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
[0011] It can be seen from the above technical solutions that the quantitative evaluation method and test system for electromagnetic interference reliability of a grating encoder disclosed in the present invention have the following beneficial effects: (1) The grating encoder reliability test system can effectively simulate the rotation speed and various electromagnetic interference conditions under actual working conditions, and conduct a comprehensive evaluation of the grating encoder's electrostatic discharge interference resistance, electrical fast transient pulse group interference resistance, and surge (impact) interference resistance.
[0012] (2) The evaluation method of the present invention uses uniformity error and orthogonality error to evaluate the output accuracy of the incremental grating encoder, avoiding the complexity and high cost of direct testing using a dedicated test bench and simplifying the testing process. At the same time, the method effectively reduces the measurement error caused by frequent disassembly and assembly, thereby improving the accuracy and reliability of the test.
[0013] (3) The test system of the present invention is highly interchangeable and has a wide range of uses. It can test grating encoders of different models and sizes. It only needs to replace the grating encoder clamping mechanism and coupling, which reflects the versatility and flexibility of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a schematic diagram of a testing system for electromagnetic interference reliability of a grating encoder provided by an exemplary embodiment.
[0015] Figure 2 It is a schematic diagram of a grating encoder and its clamping and driving unit provided by an exemplary embodiment.
[0016] Figure 3 It is a flow chart of a quantitative evaluation method of electromagnetic interference reliability of a grating encoder provided by an exemplary embodiment.
[0017] Figure 4 It is a schematic diagram of evaluating reliability based on a model provided by an exemplary embodiment.
[0018] Figure 5 It is a schematic structural diagram of a device provided by an exemplary embodiment.
[0019] Figure 6 It is a block diagram of a quantitative evaluation device for electromagnetic interference reliability of a grating encoder provided by an exemplary embodiment. DETAILED DESCRIPTION
[0020] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of the present invention as detailed in the appended claims.
[0021] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in the present invention. In some other embodiments, the steps included in the method may be more or less than those described in the present invention. In addition, a single step described in the present invention may be decomposed into multiple steps for description in other embodiments; and multiple steps described in the present invention may be combined into a single step for description in other embodiments.
[0022] To further illustrate the present invention, the following examples are provided: Grating encoder is a sensor used for motion control, which converts the mechanical position change signal of an object into an electrical signal output, and the electrical signal serves as the feedback signal for controlling the motion control device. Grating encoder integrates optics, mechanics and electronics, has high detection accuracy, and is widely used in high-end CNC equipment that requires precise control of positioning and speed, such as CNC machine tools, industrial robots, etc. As an important motion control link in CNC equipment, the reliability of grating encoder will have an important impact on the reliability and performance of the whole machine. At present, the research on grating encoders is mostly focused on improving the accuracy and resolution of encoders, reducing the size of encoders, improving the grating level, and increasing measurement accuracy. There is little understanding of the reliability level of grating encoders under different working environment stresses. Mastering the reliability level of encoders is of great significance to the evaluation of the reliability and maintenance of the whole machine.
[0023] Reliability testing can effectively reveal defects and deficiencies in product design, processing and manufacturing, and the reliability data obtained from the test also provides an important basis for subsequent reliability assessment, modeling and redesign. Through in-depth analysis of the main failure modes and causes of various encoder components, it is found that the sensitive stress of the encoder's internal components mainly includes factors such as temperature, humidity, vibration, oil pollution and electrical stress.
[0024] In the related technologies, the individual or combined effects of temperature, humidity and vibration have been widely studied, while the research on the sensitive factor of electrical stress is relatively insufficient. However, in practical applications, the failure rate of grating encoders caused by electromagnetic interference cannot be ignored. Problems such as internal interconnection caused by high voltage, metal interdiffusion of electrical contacts and electrostatic damage may occur, thus causing electromagnetic interference. Therefore, it is necessary to carry out research on electromagnetic interference, develop reliability test equipment and related technologies for grating encoders with electromagnetic interference simulation capabilities, conduct laboratory reliability bench tests, and conduct systematic theoretical analysis of the obtained performance degradation data to complete the reliability evaluation of grating encoders.
[0025] In order to solve the deficiencies in the related art, the present invention proposes a quantitative evaluation method for the electromagnetic interference reliability of a grating encoder.
[0026] Figure 1 FIG. 1 is a schematic diagram of a test system for electromagnetic interference reliability of a grating encoder provided by an exemplary embodiment. Figure 1 As shown, the system includes a main body, an electromagnetic interference test device, and a detection control system; The main body includes a ground reference plane 1, a wooden table 2, an insulating pad 4, a grating encoder and its clamp and a drive unit 5. Figure 2 As shown, the grating encoder and its clamping and driving unit 5 include a motor mounting plate 501 , an isolation cover 502 , a servo motor 503 , a coupling 504 , and a grating encoder mounting plate 505 .
[0027] The ground reference plane 1 is a copper or aluminum metal sheet with a minimum thickness of 0.25 mm, and its potential is used as a common reference potential. A 0.8 m high wooden table 2 is placed on its surface, and a horizontal coupling plate 3 with an area of 1.6 m x 0.8 m is placed on the tabletop. The grating encoder and its clamp and drive unit 5 are isolated from the horizontal coupling plate 3 by a 0.5 mm thick insulating pad 4. A vertical coupling plate 6 with a size of 0.5 m x 0.5 m is placed on the insulating pad 4 parallel to the grating encoder 506 and keeps a distance of 0.1 m from the grating encoder 506.
[0028] The grating encoder and its clamp and drive unit 5 are placed on the insulating pad 4 to realize the installation and drive of the grating encoder. The grating encoder 506 is fixed on the grating encoder mounting plate 505 by bolt connection. The coupling 504 is used to connect the grating encoder 506 and the servo motor 503. The servo motor 503 is fixed on the motor mounting plate 501 by bolt connection. The isolation cover 502 is used to isolate the servo motor 503 to prevent its electromagnetic interference from having additional impact on the detection result of the grating encoder.
[0029] The electromagnetic interference test device comprises a horizontal coupling plate 3 , a vertical coupling plate 6 , a combined interference generator 7 , and a capacitive coupling clamp 8 .
[0030] The electromagnetic interference test includes three parts: electrostatic discharge immunity test, electrical fast transient pulse group immunity test, and surge (impact) immunity test: in the electrostatic discharge immunity test, the horizontal coupling plate 3 and the vertical coupling plate 6 are respectively connected to the ground reference plane 1 through a cable with a resistor (470kΩ*2), the ground reference plane 1 is grounded, and the power supply end of the grating encoder 506 is connected to the power supply module 11; in the electrical fast transient pulse group immunity test, the horizontal coupling plate 3 and the ground reference plane 1 are directly connected by a cable, so that the horizontal coupling plate 3 and the ground reference plane 1 have the same potential, the ground reference plane 1 is grounded, and the power supply end of the grating encoder 506 is connected to the power supply module 11; in the surge (impact) immunity test, the power supply end of the grating encoder 506 is connected to the combined interference generator 7; The detection control system includes a grating encoder signal acquisition module 9, a grating encoder control module 10, a power supply module 11 and an industrial computer 12; the grating encoder signal acquisition module 9 includes an acquisition chassis and an encoder signal acquisition card; the grating encoder control module 10 includes a servo driver and a PLC; the industrial computer 12 is used for sending and receiving data and instructions; The detection and control system is integrated into a control box; the grating encoder signal acquisition module 9 is used to collect performance data of the grating encoder 506, and completes the grating encoder output signal information acquisition through the encoder signal acquisition card and the matching acquisition chassis, and stores the data in the industrial computer 12; the grating encoder control module 10 is used to drive and control the servo motor, thereby realizing the speed control of the grating encoder 506, the PLC is used to input the control signal, and the servo driver is used to receive the control signal and convert it into precise movement of the motor.
[0031] The test process based on this test system is as follows: The electromagnetic interference reliability test method of a grating encoder specifically includes the following process: Step 102, preparation before testing: select a suitable grating encoder as the test object and install it correctly; complete the connection of the grating encoder drive control and data acquisition.
[0032] Step 102, test plan formulation: determine the test parameters. The grating encoder electromagnetic interference test includes three parts of test content. The specific test parameters are as follows: Electrostatic discharge immunity test: such as rotation speed, electrostatic output voltage, discharge time interval, test times, etc.; Electrical fast transient pulse group immunity test: such as speed, electrical fast transient pulse group output voltage, pulse frequency, number of pulses in each pulse group, pulse group period, interference time, etc.; Surge (impact) immunity test: such as rotation speed, open circuit voltage or short circuit current, number of tests, surge time interval, etc.
[0033] Step 102, the test starts: first, the servo motor is controlled to realize the grating encoder drive, and then the combined interference generator generates electromagnetic interference.
[0034] Step 104, data acquisition and monitoring: real-time monitoring of the working status of the grating encoder; acquisition of output signal data of the grating encoder.
[0035] Step 106, end of test: after completing the predetermined number of tests, stop the combined interference generator and the servo motor, and finally turn off the power of the test system.
[0036] Step 108, data collation: Analyze the test data, evaluate the performance and reliability of the grating encoder in electromagnetic interference, and identify the problems and failure modes that may occur in the grating encoder in electrostatic interference.
[0037] Step 110, report writing: write a test report including test results, data analysis, conclusions and recommendations.
[0038] Step 112, subsequent improvement: based on the test evaluation results, propose improvement measures for the grating encoder and make necessary design modifications and optimizations to improve the reliability of the grating encoder in actual electromagnetic interference.
[0039] In this embodiment, the anti-electromagnetic interference capability test is intended to evaluate the working stability and reliability of the grating encoder in an electromagnetic interference environment to determine its performance under specific interference conditions. During the test, electromagnetic interference signals of different intensities are gradually applied, and the output signal of the encoder under interference is recorded in real time. By analyzing the performance of the encoder under various interference conditions, its anti-interference capability is evaluated, with a focus on instantaneous performance. This test is suitable for scenarios where it is necessary to verify whether the product can work normally in an electromagnetic interference environment. The purpose of the accelerated performance degradation test is to accelerate the performance degradation process of the grating encoder by increasing the electromagnetic interference stress level while keeping the failure mechanism unchanged. This test usually lasts for a long time in order to deeply analyze the failure mode and life prediction of the encoder under design and use stress. Focusing on long-term reliability and expected service life, this type of test is suitable for evaluating the reliability and life of the product during long-term use, and is usually performed during the product development stage to verify and improve the reliability of the product. The outer layer of the isolation cover is made of insulating material to ensure the safety of the external environment and electrical isolation; the middle layer adds absorbing materials (such as ferrite or conductive foam) to absorb part of the electromagnetic waves; the inner layer uses metal materials with high conductivity and is coated with a conductive coating to further enhance the electromagnetic shielding effect and reduce the conduction of electromagnetic interference. The structural design of the cover body at the sharp edges adopts chamfering to reduce the reflection and local interference of electromagnetic waves, while reducing the local electric field strength. In terms of grounding design, a grounding port is designed in the low-potential area of the conductive layer to ensure that electromagnetic interference can be effectively exported. In order to maximize the interference shielding capability of the isolation cover, the grounding cables are all shielded cables to ensure that electromagnetic interference can be quickly and effectively eliminated, further ensuring the reliability of the test results.
[0040] Figure 3 The flowchart of a quantitative evaluation method of electromagnetic interference reliability of a grating encoder provided by an exemplary embodiment, wherein the distribution network includes photovoltaic nodes and non-photovoltaic nodes. Figure 3 As shown, the method may include the following steps: Step 302, obtaining an output signal of the grating encoder under electromagnetic interference, wherein the output signal includes time series data corresponding to a two-phase square wave signal; Step 304, calculating the duty cycle error and the phase shift degree of the two-phase square wave signal according to the output signal, and determining the duty cycle error as the uniformity error of the two-phase square wave signal, and determining the phase shift degree as the orthogonality error of the two-phase square wave signal; Step 306: Evaluate the electromagnetic interference reliability of the grating encoder according to the uniformity error and the orthogonality error.
[0041] In this embodiment, the output accuracy of the incremental grating encoder is evaluated by using uniformity error and orthogonality error, thereby avoiding the complexity and high cost of direct detection using a dedicated test bench and simplifying the detection process. At the same time, this method effectively reduces the measurement error caused by frequent disassembly and assembly, thereby improving the accuracy and reliability of the test.
[0042] In one embodiment, the two-phase square wave signals are respectively a first square wave signal and a second square wave signal; and the step of calculating the duty cycle error and the phase shift degree of the two-phase square wave signals according to the output signal comprises: Determine the first and second moments of the peaks of two adjacent cycles in the first square wave signal according to the output signal, and determine the third and fourth moments when the troughs of the second square wave signal intersect with the troughs and peaks of the first square wave signal; calculate the duty cycle error and phase shift degree of the two-phase square wave signal according to the first, second, third and fourth moments.
[0043] Furthermore, the formula used to calculate the duty cycle error and phase shift degree of the two-phase square wave signal according to the first moment, the second moment, the third moment, and the fourth moment is: Among them, J is used to characterize the duty cycle error, Y is used to characterize the phase shift degree, and T1, T2, T3, and T4 are used to characterize the first moment, the second moment, the third moment, and the fourth moment, respectively.
[0044] Usually, J and Y do not change with the decrease or increase of the speed. And in general, within one rotation of the encoder, the maximum percentage of J and Y is the test value of uniformity error and orthogonality error, which is used to measure the output accuracy of the grating encoder.
[0045] In one embodiment, the evaluating the electromagnetic interference reliability of the grating encoder based on the uniformity error and the orthogonality error includes: obtaining a preset first threshold and a second threshold, and determining that the electromagnetic interference reliability of the grating encoder does not meet expectations when the uniformity error reaches the first threshold or the orthogonality error reaches the second threshold; or, performing a weighted summation of the uniformity error and the orthogonality error to obtain a total error value, and determining that the electromagnetic interference reliability of the grating encoder does not meet expectations when the total error value reaches a preset third threshold; or, inputting the uniformity error and the orthogonality error into a pre-trained evaluation model, and evaluating the electromagnetic interference reliability of the grating encoder according to the evaluation model.
[0046] Before inputting the uniformity error and the orthogonality error into the pre-trained evaluation model, it also includes: generating simulation data according to the pre-trained sequence generator and sequence discriminator, and inputting the simulation data into the evaluation model; inputting the uniformity error and the orthogonality error into the pre-trained evaluation model, and evaluating the electromagnetic interference reliability of the grating encoder according to the evaluation model, including: evaluating the electromagnetic interference reliability of the grating encoder according to the simulation data, the uniformity error and the orthogonality error.
[0047] The evaluation model is a CNN-BayesTransformer model.
[0048] like Figure 4 As shown in the figure, the reliability assessment based on the model specifically includes the following steps: Signal acquisition and processing: Collect the output signals of the incremental grating encoder to ensure that sufficient sample data is collected under different working conditions, and perform data cleaning, noise reduction, outlier removal and other operations on the original signal to improve data quality. Convert the pre-processed data into uniformity error and orthogonality error to better characterize the performance degradation of the encoder; Random noise: Random numbers are drawn from a standard normal distribution. These noises are used to provide diversity to the sequence generator. By introducing random noise, the model is able to explore a wider range of data distributions, thereby generating more diverse time series data, preventing the sequence generator from relying solely on training data, thereby improving the generalization ability of generated data; Sequence generator: Adopts the bidirectional long short-term memory network (Bi-LSTM) architecture to convert the input random noise into time series data. The sequence generator captures the dependencies and patterns in the time series by learning the characteristics of the training data, and generates sequences similar to the real data, thereby providing high-quality input for the subsequent sequence discriminator. Bi-LSTM can effectively capture the contextual information of the sequence, improve the ability to capture long dependencies, and improve the quality of generated data; Generate data: After the sequence generator is trained, it is used to generate new time series data, and these generated data are input into the discriminator for true or false judgment; Sequence discriminator: It also uses the bidirectional long short-term memory network (Bi-LSTM) architecture to learn the distribution characteristics of real data and evaluate the authenticity of the input sequence to distinguish between real data and generated data; Whether the loss function meets the preset requirements: During the training process, monitor the loss functions of the sequence generator and sequence discriminator. The loss function usually includes generator loss and discriminator loss, which respectively reflect the quality of the data generated by the generator and the recognition ability of the discriminator. By setting the preset loss threshold, it is judged whether the training effect of the model meets the requirements. If the loss function does not meet the preset standard, it is necessary to continue training and adjust the model parameters to ensure that the performance of the generator and discriminator are improved simultaneously; Output simulation data: When the loss functions of the sequence generator and sequence discriminator meet the preset requirements, the generated simulation data are output. These data should be similar to the real data in statistical characteristics to ensure their effectiveness and reliability in practical applications. The simulation data and real data are used together for subsequent analysis and model training to help improve the performance of the overall model; (The method used to generate simulation data is the Time GAN data enhancement method) Dataset division: Divide the simulated and real data into training sets and test sets. The common data division ratio is 80% for training sets and 20% for test sets, or 70% for training sets and 30% for test sets, to ensure that the model can learn effective features in the training phase, and evaluate the generalization ability of the model in the test phase to avoid overfitting. CNN-BayesTransformer model construction: The constructed CNN-BayesTransformer model uses the advantages of convolutional neural network (CNN) in local feature extraction as the basis for feature extraction. At the same time, it combines the Transformer's ability to capture long-distance dependencies and the Bayesian inference advantage in modeling model uncertainty, thereby effectively capturing the temporal characteristics and uncertainties in the data;
[0049] Model training: Use conventional optimization algorithms (such as Adam) to update CNN parameters, and use Bayesian inference methods to update Transformer parameters. Select appropriate loss functions to evaluate model performance. During the training process, adjust hyperparameters to improve the model's learning effect, ensuring that the model can effectively learn data features and adapt to complex time series patterns. Model evaluation: Use the test set to evaluate the trained CNN-Bayes Transformer model to understand the performance of the trained CNN-Bayes Transformer model on unseen data signals and determine whether it meets expectations. If the trained CNN-Bayes Transformer model meets expectations, the evaluation ends. Otherwise, the model training is repeated. Reliability evaluation: The reliability of the grating encoder is evaluated based on the output results of the CNN-Bayes Transformer model, and the uniformity error and orthogonality error are analyzed to determine the reliability of the encoder under different working conditions; Uncertainty Analysis: Uncertainty analysis is performed to calculate the confidence intervals of the prediction results of the CNN-Bayes Transformer model, evaluate the credibility of the prediction results, help identify potential risks and sources of errors, provide more in-depth information for decision-making, and ensure a comprehensive understanding and evaluation of the encoder performance in practical applications. Figure 5 is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 5 At the hardware level, the device includes a processor 502, an internal bus 504, a network interface 506, a memory 508, and a non-volatile memory 510, and may also include hardware required for other functions. One or more embodiments of the present invention may be implemented based on software, such as the processor 502 reading the corresponding computer program from the non-volatile memory 510 into the memory 508 and then running it. Of course, in addition to the software implementation, one or more embodiments of the present invention do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or logic devices.
[0050] Please refer to Figure 6 , a quantitative evaluation device for electromagnetic interference reliability of grating encoder can be applied to Figure 6 In the device shown, to implement the technical solution of the present invention, the device may include: An acquisition unit 602 is used to acquire an output signal of the grating encoder under electromagnetic interference, wherein the output signal includes time series data corresponding to a two-phase square wave signal; A calculation unit 604 is used to calculate the duty cycle error and the phase shift degree of the two-phase square wave signal according to the output signal, and determine the duty cycle error as the uniformity error of the two-phase square wave signal, and determine the phase shift degree as the orthogonality error of the two-phase square wave signal; The evaluation unit 606 is used to evaluate the electromagnetic interference reliability of the grating encoder according to the uniformity error and the orthogonality error.
[0051] Optionally, the two-phase square wave signals are respectively a first square wave signal and a second square wave signal; the calculation unit 604 is specifically used for: Determine, according to the output signal, a first moment and a second moment of the peaks of two adjacent periods in the first square wave signal, and a third moment and a fourth moment when the trough of the second square wave signal intersects with the trough and the peak of the first square wave signal; The duty cycle error and the phase shift degree of the two-phase square wave signal are calculated according to the first moment, the second moment, the third moment, and the fourth moment.
[0052] Optionally, the formula used to calculate the duty cycle error and phase shift degree of the two-phase square wave signal according to the first moment, the second moment, the third moment, and the fourth moment is: Among them, J is used to characterize the duty cycle error, Y is used to characterize the phase shift degree, and T1, T2, T3, and T4 are used to characterize the first moment, the second moment, the third moment, and the fourth moment, respectively.
[0053] Optionally, the evaluation unit 606 is specifically configured to: Obtain a preset first threshold and a second threshold, and when the uniformity error reaches the first threshold or the orthogonality error reaches the second threshold, determine that the electromagnetic interference reliability of the grating encoder does not meet expectations; or, perform weighted summation of the uniformity error and the orthogonality error to obtain a total error value, and when the total error value reaches a preset third threshold, determine that the electromagnetic interference reliability of the grating encoder does not meet expectations; or, input the uniformity error and the orthogonality error into a pre-trained evaluation model, and evaluate the electromagnetic interference reliability of the grating encoder according to the evaluation model.
[0054] Optionally, before the uniformity error and the orthogonality error are input into the pre-trained evaluation model, the method further includes: an input unit 608, configured to generate simulation data according to the pre-trained sequence generator and sequence discriminator, and input the simulation data into the evaluation model; The evaluation unit 606 is specifically used to evaluate the electromagnetic interference reliability of the grating encoder according to the simulation data, the uniformity error and the orthogonality error.
[0055] Optionally, the evaluation model is a CNN-BayesTransformer model.
[0056] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0057] In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0058] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0059] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0060] With respect to the computer-readable medium (or computer-readable storage medium) as described above or in any other form, computer instructions may be stored thereon, and when the instructions are executed by a processor, one or more of the above-mentioned embodiments are implemented, thereby realizing the technical solution of the present invention.
[0061] The present invention also proposes a computer program, which, when executed by a processor, implements one or more of the above embodiments, thereby realizing the technical solution of the present invention. The computer program may be specifically recorded in the above or any other form of computer-readable medium, and the present invention is not limited thereto.
[0062] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0063] The above describes specific embodiments of the present invention. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0064] The terms used in one or more embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present invention. The singular forms of "a", "said" and "the" used in one or more embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0065] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of the present invention, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0066] The above description is merely a preferred embodiment of one or more embodiments of the present invention and is not intended to limit one or more embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present invention shall be included in the scope of protection of one or more embodiments of the present invention.
Claims
1. A quantitative evaluation method for electromagnetic interference reliability of a grating encoder, characterized in that: The method comprises: Acquire an output signal of the grating encoder under electromagnetic interference, wherein the output signal includes time series data corresponding to a two-phase square wave signal; Calculating a duty cycle error and a phase shift degree of the two-phase square wave signal according to the output signal, and determining the duty cycle error as a uniformity error of the two-phase square wave signal, and determining the phase shift degree as an orthogonality error of the two-phase square wave signal; The electromagnetic interference reliability of the grating encoder is evaluated based on the uniformity error and the orthogonality error.
2. The method according to claim 1, characterized in that The two-phase square wave signals are respectively a first square wave signal and a second square wave signal; and the step of calculating the duty cycle error and the phase shift degree of the two-phase square wave signals according to the output signal comprises: Determine, according to the output signal, a first moment and a second moment of the peaks of two adjacent periods in the first square wave signal, and a third moment and a fourth moment when the trough of the second square wave signal intersects with the trough and the peak of the first square wave signal; The duty cycle error and the phase shift degree of the two-phase square wave signal are calculated according to the first moment, the second moment, the third moment, and the fourth moment.
3. The method according to claim 2, characterized in that The formula used to calculate the duty cycle error and phase shift degree of the two-phase square wave signal according to the first moment, the second moment, the third moment, and the fourth moment is: Among them, J is used to characterize the duty cycle error, Y is used to characterize the phase shift degree, and T1, T2, T3, and T4 are used to characterize the first moment, the second moment, the third moment, and the fourth moment, respectively.
4. The method according to claim 1, characterized in that: The evaluating the electromagnetic interference reliability of the grating encoder according to the uniformity error and the orthogonality error includes: Obtaining a preset first threshold and a second threshold, and determining that the electromagnetic interference reliability of the grating encoder does not meet expectations when the uniformity error reaches the first threshold or the orthogonality error reaches the second threshold; or performing a weighted summation of the uniformity error and the orthogonality error to obtain a total error value, and determining that the electromagnetic interference reliability of the grating encoder does not meet expectations when the total error value reaches a preset third threshold; or, The uniformity error and the orthogonality error are input into a pre-trained evaluation model, and the electromagnetic interference reliability of the grating encoder is evaluated according to the evaluation model.
5. The method according to claim 4, characterized in that Before inputting the uniformity error and the orthogonality error into the pre-trained evaluation model, the method further includes: generating simulation data according to the pre-trained sequence generator and sequence discriminator, and inputting the simulation data into the evaluation model; The uniformity error and the orthogonality error are input into a pre-trained evaluation model, and the electromagnetic interference reliability of the grating encoder is evaluated according to the evaluation model, including: evaluating the electromagnetic interference reliability of the grating encoder according to the simulation data, the uniformity error and the orthogonality error.
6. The method according to claim 1, characterized in that The evaluation model is a CNN-BayesTransformer model.
7. A quantitative evaluation device for electromagnetic interference reliability of a grating encoder, characterized in that: The device comprises: An acquisition unit: acquiring an output signal of the grating encoder under electromagnetic interference, wherein the output signal includes time series data corresponding to a two-phase square wave signal; A calculation unit: calculates the duty cycle error and the phase shift degree of the two-phase square wave signal according to the output signal, and determines the duty cycle error as the uniformity error of the two-phase square wave signal, and determines the phase shift degree as the orthogonality error of the two-phase square wave signal; An evaluation unit is configured to evaluate the electromagnetic interference reliability of the grating encoder according to the uniformity error and the orthogonality error.
8. A test system for electromagnetic interference reliability of a grating encoder, characterized in that: The system includes a main body, an electromagnetic interference test device, and a detection and control system; The main body includes a ground reference plane, a wooden table, an insulating pad, a grating encoder and its clamp and a drive unit; the grating encoder and its clamp and drive unit include a motor mounting plate, an isolation cover, a servo motor, a coupling, and a grating encoder mounting plate; The ground reference plane is a metal thin plate, the wooden table is placed on the surface of the ground reference plane, and a horizontal coupling plate is provided on the tabletop of the wooden table; The insulating pad is used to isolate the grating encoder and its clamping and driving unit from the horizontal coupling plate.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the steps of the method according to any one of claims 1 to 6 by running the executable instructions.
10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.