Method for quickly and accurately judging waveform quality of magnetic ring encoder

By determining the reference reference for the magnetic ring encoder waveform and setting flexible evaluation thresholds, multi-dimensional waveform evaluation is carried out, which solves the problem of inefficient judgment of the waveform distortion degree of magnetic ring encoder in the prior art, and improves the accuracy of judgment and product quality.

CN120101855APending Publication Date: 2025-06-06DONGGUAN ABBAS PRECISION TRANSMISSION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510243965.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-03
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The existing methods for judging the degree of phase distortion of the waveform of phase A and B phases of magnetic ring encoder are relatively primitive and inefficient, slow speed and susceptible to interference from human subjective factors, resulting in misjudgment, affecting product quality and the stability of the motor control system.

Method used

By determining the reference standard for the A and B waveforms of the magnetic ring encoder phase A and B waveforms in a stable state, and setting a flexibly adjustable evaluation threshold for key feature parameters, multi-dimensional waveform evaluation is performed, including the judgment of time value length, feature point lag and feature point sequence.

Benefits of technology

It improves the accuracy of judging the quality of magnetic ring encoder waveform, effectively avoids misjudgment caused by subjective factors, ensures that only encoder waveforms that meet quality standards are judged as good products, and improves product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120101855A_ABST
    Figure CN120101855A_ABST
Patent Text Reader

Abstract

The invention discloses a method for quickly and accurately judging the waveform quality of a magnetic ring encoder, which relates to the technical field of magnetic ring encoder detection and comprises the following steps of: S1, determining a reference: acquiring parameters of A-phase and B-phase waveforms of the magnetic ring encoder in a stable state, and determining the reference for judging the waveform quality based on the parameters; s2, setting a judgment threshold: setting a corresponding judgment threshold for the key characteristic parameters influencing the waveform quality of the phase A and the phase B, the judgment threshold being used for defining whether the waveform meets the requirement or not; s3, waveform judgment is executed, wherein the actual characteristic parameters of the A-phase waveform and the B-phase waveform of the magnetic ring encoder are compared with the reference standard and the judgment threshold value, and the advantages and disadvantages of the waveforms are judged according to the comparison result; s4, reverse test judgment: under a motor reverse working condition, repeating the judgment steps, and performing reverse test judgment on A-phase and B-phase waveforms of the magnetic ring encoder; the tolerance range of the phase difference is set, the quality of the encoder is monitored, and the phenomenon of ambiguity is completely eradicated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of magnetic ring encoder detection, in particular to a method for quickly and accurately judging the quality of a magnetic ring encoder waveform. Background Art

[0002] In the field of modern industrial automation and precision control, the motor is the core driving component, and the accurate monitoring and control of its operating status is crucial. Magnetic ring encoders have become the commonly used incremental encoders at the rear end of motors due to their many advantages, such as low price, high reliability, no contact and no wear, good anti-oil and dust (except ferromagnetic dust) performance, and ruggedness and durability. They are widely used in various motor control systems.

[0003] Magnetic ring encoders usually provide a certain PPR (pulse per revolution) pulse signal to the motor. Common output modes include providing only one Hall signal, or providing two orthogonal square wave Hall signals for phase A and phase B. In the solution that relies on two orthogonal square wave Hall signals for phase A and phase B, the waveform under ideal conditions should have specific rules and characteristics, such as Figure 1 As shown in the figure, in the standard waveforms of phase A and phase B, the EF time value length is equal to the FG time value length, which means that the encoder magnetic ring is magnetized evenly, and the A-way Hall device senses the S pole and N pole symmetrically; the same is true for B-way. At the same time, when point e is in the middle of EF, point F is in the middle of ef, point f is in the middle of FG, and point G is in the middle of fg, it indicates that the magnetic ring is magnetized evenly, the installation angle position of the two Hall devices AB is normal, and the sensitivity consistency is good. Such an ideal waveform can provide reliable data support for the precise control of the motor and help the control system accurately determine the running direction and speed of the motor.

[0004] However, in actual production and application, due to the influence of various factors, the A-phase and B-phase waveforms output by the magnetic ring encoder are often difficult to reach the ideal state. Among them, the unevenness of the magnetic ring magnetization and the asymmetry of the Hall device are the main reasons for the waveform distortion. The degree of this waveform distortion varies, such as Figure 2 As shown, in the mild case, the sensitivity of the S and N poles of the Hall device in path A is inconsistent, resulting in asymmetric high and low level values. Although the waveform is not beautiful, it can still be used; Figure 3 As shown in the figure, in severe cases, if the S and N sensitivities of the two Hall devices AB are seriously asymmetric, the waveform will be seriously distorted, which may cause the MCU to be unable to normally determine the direction of the motor; even worse, if Figure 4 As shown, when the magnetization poles are uneven and the S and N sensitivities of the Hall devices are seriously asymmetric, a chaotic waveform will be generated, making it impossible for the MCU to judge the direction of the motor's operation based on the waveform.

[0005] In the past, the method of judging the phase distortion of the A-phase and B-phase waveforms of the magnetic ring encoder was relatively primitive and inefficient. Usually, a dual-trace oscilloscope was used to display the AB two-phase waveform, and then the phase distortion of the waveform was judged by human visual observation. This method is not only slow and greatly affects production efficiency, but also is easily interfered by human subjective factors, leading to misjudgment. Misjudgment may cause products that do not meet quality standards to enter the market, affect the performance and stability of the entire motor control system, and even cause safety hazards.

[0006] As industrial production continues to increase its requirements for motor control accuracy and stability, existing judgment methods can no longer meet actual needs. Therefore, there is an urgent need for a method that can quickly and accurately judge the quality of the A-phase and B-phase waveforms of the magnetic ring encoder. This method should be able to effectively avoid product quality problems caused by waveform misjudgment and ensure the stable and reliable operation of the motor control system, which is of great practical significance for improving industrial production efficiency and product quality. Summary of the invention

[0007] In order to overcome the above-mentioned shortcomings, the present invention aims to provide a technical solution that can solve the above-mentioned problems.

[0008] A method for quickly and accurately judging the quality of a magnetic ring encoder waveform, comprising: S1. Determine the reference benchmark: obtain the parameters of the A-phase and B-phase waveforms of the magnetic ring encoder in a stable state, and determine the reference benchmark for judging the quality of the waveform based on the parameters; S2. Setting a judgment threshold: setting a corresponding judgment threshold for key characteristic parameters that affect the quality of the A-phase and B-phase waveforms, wherein the judgment threshold is used to determine whether the waveforms meet the requirements; S3, perform waveform evaluation: compare the actual characteristic parameters of the A-phase and B-phase waveforms of the magnetic ring encoder with the reference benchmark and the evaluation threshold, and judge the quality of the waveforms based on the comparison results; S4. Reverse test evaluation: Under the motor reverse working condition, repeat the above evaluation steps to perform reverse test evaluation on the A-phase and B-phase waveforms of the magnetic ring encoder.

[0009] As a further solution of the present invention: in the step of determining the reference benchmark, in the production process of the motor with the magnetic ring encoder, the MCU only analyzes the magnetic ring encoder signal, and when the speed of the motor under test is stable under a certain voltage drive, the time values ​​of multiple continuous complete square waves in the waveform are recorded, and the average value of these time values ​​is calculated, and the average value is used as the benchmark, and half of the benchmark is taken as the ideal time value length of EF, FG, ef, and fg; Among them, EG or eg in the waveform is a complete square wave cycle, EF and FG are the time value length identifiers representing the waveform characteristic time period in the A phase time domain, and ef and fg are the time value length identifiers representing the waveform characteristic time period in the B phase time domain.

[0010] As a further solution of the present invention: in the step of setting the judgment threshold, the key characteristic parameters include: The degree of closeness between the actual duration length of EF, FG, ef, and fg and the ideal duration length; The hysteresis of point e lagging behind point E, point F lagging behind point e, point f lagging behind point F, point G lagging behind point f, and point g lagging behind point G; E, e, F, f, G, g is the order in which the feature points appear.

[0011] As a further solution of the present invention: in the step of performing waveform evaluation, S301, based on the time value length judgment: if the actual time value length of any one of EF, FG, ef, and fg is close to twice the set ideal time value length, or the actual time value length of any one of EF, FG, ef, and fg is almost equal to zero, it is determined that the signal distortion is serious and the waveform of the magnetic ring encoder is bad; S302, judging based on the hysteresis of the characteristic points: if the hysteresis of point e lagging behind point E, point F lagging behind point e, point f lagging behind point F, point G lagging behind point f, and point g lagging behind point G is less than the allowable range of the hysteresis set in the judging threshold step, it is judged that the signal is unreliable and the waveform of the magnetic ring encoder is bad; S303, judging based on the sequence of characteristic points: if the sequence of the characteristic points E, e, F, f, G, and g does not conform to the normal sequence, it is judged to be a disordered waveform and the waveform of the magnetic ring encoder is bad; When the waveform of the magnetic ring encoder does not show any of the bad judgment situations among S301, S302, and S303, the waveform of the magnetic ring encoder is judged to be good, and the signal of the good magnetic ring encoder can be normally read by the customer's MCU.

[0012] As a further solution of the present invention: during the motor reversal test, the evaluation criteria described in claims 2 to 4 are executed in reverse.

[0013] As a further solution of the present invention: the evaluation threshold is expressed as a percentage or an angle.

[0014] As a further solution of the present invention: for different types of magnetic ring encoders or motors in different application scenarios, the judgment threshold can be adjusted independently to meet diverse practical needs.

[0015] As a further solution of the present invention: the number of recorded complete square waves is not less than 3 to ensure the accuracy and reliability of the reference benchmark.

[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention determines the reference benchmark by accurately obtaining the parameters of the A-phase and B-phase waveforms of the magnetic ring encoder in a stable state, sets a flexibly adjustable judgment threshold for key characteristic parameters, and then performs multi-dimensional waveform judgment. Compared with the traditional manual naked eye judgment method, the present invention greatly improves the accuracy of judgment, effectively avoids misjudgment caused by subjective factors, ensures that only encoder waveforms that truly meet quality standards are judged as good products, and improves product quality.

[0017] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0019] Figure 1 It is a schematic diagram of the standard waveform of the A phase and the B phase of the magnetic ring encoder in the present invention; Figure 2-4 It is a waveform diagram of the actual application of the A phase and the B phase of the magnetic ring encoder in the present invention; Figure 5 It is a schematic diagram of the steps of the present invention. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0021] See also Figure 1-5 In an embodiment of the present invention, a method for quickly and accurately judging the quality of a magnetic ring encoder waveform includes: Determine the reference benchmark (S1): During the production process of motors with magnetic ring encoders, let the MCU focus on analyzing the signals of the magnetic ring encoder. When the motor under test reaches a stable speed under a certain voltage drive, record the time values ​​of multiple (no less than 3, to ensure accuracy and reliability) continuous complete square waves in the A-phase and B-phase waveforms of the magnetic ring encoder. Calculate the average value of these time values, use the average value as the benchmark, and then take half of the benchmark as the ideal time value length of EF, FG, ef, and fg. Among them, EG or eg in the waveform represents a complete square wave cycle, EF and FG are the time value length identifiers representing the waveform feature time period in the A-phase time domain, and ef and fg are the time value length identifiers representing the waveform feature time period in the B-phase time domain.

[0022] Set the judgment threshold (S2): Set the judgment threshold (also called window value) for the key characteristic parameters that affect the quality of the A-phase and B-phase waveforms. These key characteristic parameters include: the degree of proximity between the actual time length of EF, FG, ef, and fg and the ideal time length; the lag of point e to point E, point F to point e, point f to point F, point G to point f, and point g to point G; the order in which the characteristic points E, e, F, f, G, and g appear. The judgment threshold can be flexibly set in the form of percentage or angle according to actual needs, and these judgment thresholds can be adjusted independently for different types of magnetic ring encoders or motors in different application scenarios to meet diverse actual needs.

[0023] Execute waveform evaluation (S3): Judgment based on time length (S301): Compare the actual time lengths of EF, FG, ef, and fg in the A-phase and B-phase waveforms of the magnetic ring encoder with the ideal time lengths. If the actual time length of any one of EF, FG, ef, and fg is close to (the degree of closeness is within the set error range, such as ±[X]% of twice the ideal time length) twice the set ideal time length, or the actual time length of any one of EF, FG, ef, and fg is almost equal to zero (when it is less than [X]% of the ideal time length, it is considered to be almost equal to zero), then it is determined that the signal distortion is serious and the magnetic ring encoder waveform is bad.

[0024] Determination based on the hysteresis of the characteristic points (S302): Compare the actual hysteresis of point e lagging behind point E, point F lagging behind point e, point f lagging behind point F, point G lagging behind point f, and point g lagging behind point G with the hysteresis allowable range determined in the step of setting the judgment threshold. If the actual hysteresis is less than the allowable range, it is determined that the signal is unreliable and the waveform of the magnetic ring encoder is bad.

[0025] Determine based on the sequence of characteristic points (S303): Check the sequence of the E, e, F, f, G, and g characteristic points. If the sequence does not conform to the normal sequence (under the ideal waveform, the characteristic points of phase A and phase B should appear in a specific sequence, such as when the rising edge of the A phase waveform is triggered, the B phase waveform is in a specific phase, and the corresponding characteristic points appear in sequence, refer to Figure 1 As shown in the figure), it is judged to be a chaotic waveform and the waveform of the magnetic ring encoder is bad.

[0026] When the waveform of the magnetic ring encoder does not show any of the above-mentioned bad judgment situations, the waveform of the magnetic ring encoder is judged to be good, and the signal of the good magnetic ring encoder can be normally read by the customer's MCU.

[0027] Reverse test evaluation (S4): Repeat the above evaluation steps under the condition of motor reverse rotation to perform reverse test evaluation on the A-phase and B-phase waveforms of the magnetic ring encoder. The evaluation criteria are opposite to those of the forward test to ensure that the waveform quality can be accurately judged under different motor running directions.

[0028] The specific implementation methods are as follows: 1. Detailed implementation of determining the reference benchmark (S1) Hardware connection and equipment preparation: On the motor production line, select suitable test fixtures and firmly install the motor with magnetic ring encoder on the test platform. Use a dedicated cable to connect the motor's magnetic ring encoder to the MCU development board with signal acquisition and processing capabilities to ensure a stable connection and normal signal transmission. At the same time, prepare a stable power supply device to provide an adjustable drive voltage for the motor.

[0029] Motor drive and stable operation: Use programming software to initialize and configure the MCU, and set it to only receive and analyze the signal of the magnetic ring encoder. Apply a suitable initial drive voltage to the motor through the power supply device. For example, for a common DC motor, the initial voltage can be set to 12V. After starting the motor, observe the running status of the motor and use a speed measuring instrument (such as a laser tachometer) to monitor the motor speed. Since the motor speed will fluctuate during the startup process, it is necessary to wait for a while until the motor speed stabilizes. Generally speaking, small motors may reach a stable speed within a few seconds, while large motors may take tens of seconds. The specific time can be determined according to the specifications and characteristics of the motor. In a stable state, the motor speed fluctuation should be controlled within a very small range, such as ±5 rpm.

[0030] Signal acquisition and calculation: When the motor speed is stable, the timer module inside the MCU is used to accurately time the waveform signals output by the A-phase and B-phase of the magnetic ring encoder. Taking the recording of the A-phase waveform as an example, when the rising edge of the A-phase waveform is detected, the timer is started to start timing. When the next rising edge is detected, the timer is stopped to obtain the time value of this complete square wave, which is recorded as T1. According to this method, the time values ​​of multiple (no less than 3, here 5 are recorded as an example) complete square waves are recorded continuously, which are T1, T2, T3, T4, and T5 respectively. Then, the average value of these time values ​​is calculated by the calculation function of the MCU, and the calculation formula is T = (T1 + T2 + T3 + T4 + T5) / 5. Take it as the reference value, take half of it to get the ideal time value length of EF and FG in the A-phase waveform, that is, ideal EF = ideal FG = T / 2. In the same way, the B-phase waveform is processed to get the ideal time value length of ef and fg.

[0031] 2. Detailed implementation of setting the judgment threshold (S2) Analyze application requirements and encoder characteristics: According to the expected application scenarios and control accuracy requirements of the motor, combined with the technical specifications of the magnetic ring encoder used, determine the threshold of the key characteristic parameters that affect the waveform quality. For example, motors used for high-precision positioning in industrial automation have high requirements for encoder waveform accuracy; while in some fan motor application scenarios with relatively low accuracy requirements, the threshold can be appropriately relaxed. At the same time, due to differences in their internal structure and manufacturing process, different models of magnetic ring encoders have different tolerances for waveform characteristic parameters.

[0032] Determine the threshold form and specific value: Regarding the degree of closeness between the actual duration length of EF, FG, ef, and fg and the ideal duration length: the error range is set in percentage. Assuming that in a certain application scenario, after testing and analysis, it is determined that when the actual duration length is within ±15% of twice the ideal duration length, the waveform can still meet the motor control requirements. That is, when 0.85*2*ideal EF≤actual EF≤1.15*2*actual EF (the same applies to other time periods FG, ef, and fg), the duration length of this period is considered to be within an acceptable range; if it exceeds this range, it is determined that the signal may be distorted.

[0033] For the hysteresis of the characteristic point: set the allowable range in degrees as the unit of measurement. Due to factors such as the installation position of the magnetic ring encoder and the mechanical vibration of the motor during operation, the characteristic point will have hysteresis. Through simulation and actual testing of the motor control system, determine the allowable range of hysteresis such as point e lagging behind point E, point F lagging behind point e, etc. For example, set the allowable hysteresis to 8°, that is, when the actual hysteresis is less than 8°, it is necessary to further combine other judgment conditions to determine the quality of the waveform; if it is greater than or equal to 8°, it may affect the accuracy of motor control and requires special attention.

[0034] Regarding the sequence of characteristic points: Based on the working principle of the magnetic ring encoder and the phase relationship of the ideal waveform, the order of appearance of the characteristic points E, e, F, f, G, and g under normal circumstances is clarified (also the order when the motor is in forward rotation). For example, when the rising edge of the A-phase waveform is triggered, the B-phase waveform should be in a specific phase, and the corresponding characteristic points should appear in a certain order. If it is found during the monitoring process that the sequence of characteristic points does not conform to this rule, it is determined to be a chaotic waveform.

[0035] 3. Detailed implementation of waveform evaluation (S3) Real-time signal acquisition and processing: During the continuous and stable operation of the motor, the MCU collects the waveform signals of phase A and phase B of the magnetic ring encoder in real time. Through the hardware interrupt mechanism, when the rising or falling edge of the waveform is detected, the interrupt service program is triggered, and the value of the timer is read in the interrupt service program to obtain the actual time value length of EF, FG, ef, fg in the current waveform and the timestamp of each feature point, so as to calculate the actual lag of point e behind point E, point F behind point e, etc.

[0036] Judgment based on time length (S301): Compare the actual time lengths of EF, FG, ef, and fg obtained with the set ideal time lengths and their allowable error ranges. For example, if the actual time length of EF in the A-phase waveform is detected to be greater than 1.15*2*ideal EF, or less than 0.1*ideal EF (here it is assumed that less than 10% of the ideal time length is considered to be almost equal to zero), it is determined that the signal distortion is serious and the magnetic ring encoder waveform is bad. At this time, the MCU can send an alarm message to the external device through serial communication or other means to prompt the operator that there is a problem with the encoder waveform.

[0037] Judgment based on feature point hysteresis (S302): Compare the calculated hysteresis of each feature point with the set hysteresis allowable range. If the actual hysteresis of point e lagging behind point E is less than the set 8° allowable range, and the hysteresis of other related feature points is also less than the corresponding allowable range, it is necessary to further analyze in combination with other judgment conditions; if there is a feature point hysteresis greater than or equal to the allowable range, it is judged that the signal is unreliable and the waveform of the magnetic ring encoder is bad. For example, if the actual hysteresis of point F lagging behind point e is 10°, which is greater than the set 8°, it can be judged that there is a problem with the waveform.

[0038] Judgment based on the sequence of characteristic points (S303): In the process of collecting waveform signals, the order of appearance of characteristic points E, e, F, f, G, and g is monitored in real time. The actual order of appearance is compared with the pre-set normal order through a state machine or a logic judgment program. If the order is found to be inconsistent, such as when the rising edge of phase A is triggered, the characteristic points of the B-phase waveform do not appear in the expected order, it is judged to be a messy waveform and the magnetic ring encoder waveform is bad. Once it is judged to be a messy waveform, the motor operation is stopped immediately and the relevant fault information is recorded for subsequent analysis.

[0039] Comprehensive judgment and result output: If the waveform of the magnetic ring encoder does not show any of the above-mentioned bad judgment conditions, the waveform of the magnetic ring encoder is judged to be good. The MCU can store the judgment result in the internal memory, and display the judgment result to the operator through indicator lights, display screens or network communications, informing the operator that the waveform quality of the encoder is qualified, and its signal can be read normally by the customer's MCU and can be used for subsequent motor control system assembly.

[0040] 4. Detailed implementation of reversal test evaluation (S4) Motor reverse drive setting: After completing the forward test, change the polarity of the motor drive power supply or adjust the control signal of the drive circuit to make the motor enter the reverse state. Similarly, apply a stable drive voltage to the motor to ensure that the motor speed is stable during the reverse process. Similar to the forward test, wait until the motor speed is stable before performing subsequent test operations.

[0041] Reverse test evaluation execution: repeat the steps of determining the reference benchmark, setting the evaluation threshold and performing waveform evaluation during the forward test. However, during the evaluation process, due to the change in the direction of the motor, the evaluation criteria are reversed accordingly. In one implementation, in forward rotation, if the lag of a certain feature point is less than the set range, it is judged as bad, and in reverse rotation, it becomes greater than the set range and is judged as bad; for the comparison between the actual time value length of EF, FG, ef, and fg and the ideal time value length, the judgment logic also needs to be adjusted accordingly according to the waveform characteristics after the motor is reversed; in another implementation, the essence of the evaluation criteria is not changed. Whether it is forward rotation or reverse rotation, it is judged according to the evaluation criteria set during forward rotation. For example, in forward rotation, it is set that point e lags less than 5° behind point E as bad, and the same standard is used during reverse rotation. In this way, the waveform quality of the magnetic ring encoder in both the forward and reverse directions of the motor is fully detected to ensure that it can meet the motor control requirements under different working conditions.

[0042] Result recording and summary: After the reverse test is completed, the reverse test results and the forward test results are comprehensively recorded and analyzed. If the magnetic ring encoder waveform does not show any bad judgment in the forward and reverse tests, the encoder can be finally judged as a qualified product; if a bad situation occurs in any test, the encoder is judged to be unqualified. All test data and results are sorted and archived to provide a basis for subsequent product quality analysis and improvement.

[0043] In summary, the present invention determines the reference benchmark by accurately obtaining the parameters of the A-phase and B-phase waveforms of the magnetic ring encoder in a stable state, sets flexibly adjustable judgment thresholds for key characteristic parameters, and then performs multi-dimensional waveform judgment. Compared with the traditional manual visual judgment method, the present invention greatly improves the accuracy of judgment, effectively avoids misjudgment caused by subjective factors, and ensures that only encoder waveforms that truly meet quality standards are judged as good products, thereby improving product quality.

[0044] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, the embodiments should be considered exemplary and non-restrictive in all respects, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present invention.

Claims

1. A method for quickly and accurately judging the quality of a magnetic ring encoder waveform, characterized in that: include: S1. Determine the reference benchmark: obtain the parameters of the A-phase and B-phase waveforms of the magnetic ring encoder in a stable state, and determine the reference benchmark for judging the quality of the waveform based on the parameters; S2. Setting a judgment threshold: setting a corresponding judgment threshold for key characteristic parameters that affect the quality of the A-phase and B-phase waveforms, wherein the judgment threshold is used to determine whether the waveforms meet the requirements; S3, perform waveform evaluation: compare the actual characteristic parameters of the A-phase and B-phase waveforms of the magnetic ring encoder with the reference benchmark and the evaluation threshold, and judge the quality of the waveforms based on the comparison results; S4. Reverse test evaluation: Under the motor reverse working condition, repeat the above evaluation steps to perform reverse test evaluation on the A-phase and B-phase waveforms of the magnetic ring encoder.

2. A method for quickly and accurately judging the quality of a magnetic ring encoder waveform according to claim 1, characterized in that: In the step of determining the reference benchmark, in the production process of the motor with the magnetic ring encoder, the MCU only analyzes the magnetic ring encoder signal, and when the speed of the motor under test is stable under a certain voltage drive, the time values ​​of multiple continuous complete square waves in the waveform are recorded, and the average value of these time values ​​is calculated, and the average value is used as the benchmark, and half of the benchmark is taken as the ideal time value length of EF, FG, ef, and fg; Among them, EG or eg in the waveform is a complete square wave cycle, EF and FG are the time value length identifiers representing the waveform characteristic time period in the A phase time domain, and ef and fg are the time value length identifiers representing the waveform characteristic time period in the B phase time domain.

3. A method for quickly and accurately judging the quality of a magnetic ring encoder waveform according to claim 2, characterized in that: In the step of setting the judgment threshold, the key characteristic parameters include: The degree of closeness between the actual duration length of EF, FG, ef, and fg and the ideal duration length; The hysteresis of point e lagging behind point E, point F lagging behind point e, point f lagging behind point F, point G lagging behind point f, and point g lagging behind point G; E, e, F, f, G, g is the order in which the feature points appear.

4. A method for quickly and accurately judging the quality of a magnetic ring encoder waveform according to claim 3, characterized in that: In the step of performing waveform evaluation, S301, based on the time value length judgment: if the actual time value length of any one of EF, FG, ef, and fg is close to twice the set ideal time value length, or the actual time value length of any one of EF, FG, ef, and fg is almost equal to zero, it is determined that the signal distortion is serious and the waveform of the magnetic ring encoder is bad; S302, judging based on the hysteresis of the characteristic points: if the hysteresis of point e lagging behind point E, point F lagging behind point e, point f lagging behind point F, point G lagging behind point f, and point g lagging behind point G is less than the allowable range of the hysteresis set in the judging threshold step, it is judged that the signal is unreliable and the waveform of the magnetic ring encoder is bad; S303, judging based on the sequence of characteristic points: if the sequence of the characteristic points E, e, F, f, G, and g does not conform to the normal sequence, it is judged to be a disordered waveform and the waveform of the magnetic ring encoder is bad; When the waveform of the magnetic ring encoder does not show any of the bad judgment situations among S301, S302, and S303, the waveform of the magnetic ring encoder is judged to be good, and the signal of the good magnetic ring encoder can be normally read by the customer's MCU.

5. A method for quickly and accurately judging the quality of a magnetic ring encoder waveform according to claim 4, characterized in that: During the motor reversal test, the evaluation criteria described in claims 2 to 4 are executed in reverse.

6. A method for quickly and accurately judging the quality of a magnetic ring encoder waveform according to claim 3, characterized in that: The judgment threshold is expressed as a percentage or an angle.

7. A method for quickly and accurately judging the quality of a magnetic ring encoder waveform according to claim 1 or 3, characterized in that: For different types of magnetic ring encoders or motors in different application scenarios, the evaluation threshold can be adjusted independently to meet diverse practical needs.

8. The method for quickly and accurately judging the quality of the waveform of a magnetic ring encoder according to claim 1 is characterized in that: The number of complete square waves recorded shall be no less than 3 to ensure the accuracy and reliability of the reference benchmark.