CN113884124A - Self-diagnosis method and control device for incremental encoder - Google Patents

Self-diagnosis method and control device for incremental encoder Download PDF

Info

Publication number
CN113884124A
CN113884124A CN202111266607.0A CN202111266607A CN113884124A CN 113884124 A CN113884124 A CN 113884124A CN 202111266607 A CN202111266607 A CN 202111266607A CN 113884124 A CN113884124 A CN 113884124A
Authority
CN
China
Prior art keywords
phase
signal
incremental encoder
pulse
pulse signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111266607.0A
Other languages
Chinese (zh)
Inventor
吴朝伟
王元彬
许少强
陈兆先
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhi Robot Technology Shenzhen Co Ltd
Original Assignee
Huizhi Robot Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhi Robot Technology Shenzhen Co Ltd filed Critical Huizhi Robot Technology Shenzhen Co Ltd
Priority to CN202111266607.0A priority Critical patent/CN113884124A/en
Publication of CN113884124A publication Critical patent/CN113884124A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D18/00Testing or calibrating apparatus or arrangements provided for in groups G01D1/00 - G01D15/00

Abstract

The invention provides a self-diagnosis method and a control device of an incremental encoder, wherein the method comprises the following steps: collecting an electric pulse signal of the incremental encoder, and judging whether the pulse signal is triggered; if pulse signal triggering is acquired, judging the signal type; if the collected signal is judged to be an A-phase pulse signal or a B-phase pulse signal, whether the Z phase is in fault is detected through the AB-phase pulse signal; if the acquired signal is judged to be a Z-phase pulse signal, detecting whether the AB phase fails or not through the Z-phase pulse signal; and if the pulse signal is not acquired for triggering, detecting whether the AB phase and the Z phase are in full fault or not through the output power of the motor and the speed of the incremental encoder. The method can cover all faults of the encoder, can set the diagnosis precision, cannot generate the situation of fault false alarm, can accurately analyze the faults of the incremental encoder, and can report fault information in time.

Description

Self-diagnosis method and control device for incremental encoder
Technical Field
The invention belongs to the technical field of encoders, and particularly relates to a self-diagnosis method and a control device of an incremental encoder.
Background
With the increasing development of control technology, the application of the incremental encoder is more and more extensive, from the control of an industrial machine tool motor, the control of robot joint motion and the control of a balance car, the body shadow of the incremental encoder can be seen, the incremental encoder is used as a sensor for measuring speed and rotating angle, and if the incremental encoder fails, unforeseen consequences can occur, so that the self-diagnosis method of the incremental encoder is particularly important.
The communication between the incremental encoder and the controller is not through a general communication protocol, but through converting the position change of the encoder into a pulse signal, the controller judges the rotation angle of the encoder through the pulse signal, and the pulse signal does not contain fault information, so that when the encoder has a fault, such as disconnection, the controller cannot directly identify the fault.
When the incremental encoder is used, a self-diagnosis method is not used, once the encoder fails, the controller reads wrong corner information, the control system can generate unforeseen consequences, for example, when the robot chassis uses the incremental encoder to perform closed-loop control on the speed of the wheel motor, if AB is disconnected, the controller controls the wheel motor to rotate, the speed acquired by the controller is 0, the controller increases the output of the motor through a closed-loop control algorithm, so that the speed of the wheel reaches a set speed, but the measured speed is always 0 because the encoder is in a failure state, and finally, the phenomenon of equipment runaway occurs, which is very dangerous.
In the existing incremental encoder self-diagnosis scheme, the B-phase broken line is judged when the signal continuously acquired by the A-phase reaches a certain threshold value, and the A-phase broken line is judged when the signal continuously acquired by the B-phase reaches a certain threshold value, so that the method has the defects that misjudgment can occur, for example, when the encoder continuously rotates in a small amplitude around a certain position, one continuous pulse occurs, and the other phase does not have the pulse, the encoder fault can be judged by the method, but actually does not have the fault; and the existing incremental encoder is not effective for the case where the ABZ phase is completely open.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a self-diagnosis method of an incremental encoder, which comprises the following steps:
collecting an electric pulse signal of the incremental encoder, and judging whether the pulse signal is triggered;
if pulse signal triggering is acquired, judging the signal type;
if the collected signal is judged to be an A-phase pulse signal or a B-phase pulse signal, whether the Z phase is in fault is detected through the AB-phase pulse signal;
if the acquired signal is judged to be a Z-phase pulse signal, detecting whether the AB phase fails or not through the Z-phase pulse signal;
and if the pulse signal is not acquired for triggering, detecting whether the AB phase and the Z phase are in full fault or not through the output power of the motor and the speed of the incremental encoder.
Specifically, if the collected signal is an a-phase or B-phase pulse signal, detecting whether the Z-phase fault occurs through the AB-phase pulse signal includes:
comparing whether the phase A signal is ahead or the phase B signal is ahead, and judging the steering of the incremental encoder;
the count of the AB phase pulse signals comprises rising edges and/or falling edges of the A phase signals and the B phase signals;
if the incremental encoder rotates forwards, the counting value of the AB phase pulse counter is increased by one;
if the incremental encoder is reversed, subtracting one from the count value of the AB phase pulse counter;
and the addition or subtraction of the counting value of the AB phase pulse counter is the change quantity of the counting value of the AB phase pulse counter.
Specifically, if the acquired signal is a Z-phase pulse signal, detecting whether the AB phase fails through the Z-phase pulse signal includes:
counting the Z-phase pulse signal is one of a rising edge and a falling edge of the Z-phase signal, and if the Z-phase pulse signal is acquired, the counting value of the Z-phase pulse counter is increased by one no matter the incremental encoder rotates forwards or backwards;
the counting value of the Z-phase pulse counter is increased by one, namely when the Z-phase pulse signal is acquired, the current rotation direction of the incremental encoder is acquired and stored;
and judging whether the rotation directions of the incremental encoder are the same when the pulse triggering is carried out at the time and the pulse triggering is carried out at the last time.
Further, the counting of the AB-phase pulse signals including rising edges and/or falling edges of the a-phase signals, the B-phase signals including:
the AB-phase pulse signal count only comprises one of a rising edge of the A-phase signal, a falling edge of the A-phase signal, a rising edge of the B-phase signal and a falling edge of the B-phase signal;
or, the AB phase pulse signal count includes only rising edges of the A phase signal and the B phase signal;
or, the AB phase pulse signal count includes only the falling edges of the A phase signal and the B phase signal;
or, the AB phase pulse signal count includes rising edges and falling edges of the A phase signal and the B phase signal.
Specifically, when the pulse triggering at this time and the pulse triggering at the last time are judged, whether the rotation directions of the incremental encoder are the same or not includes:
when the current pulse trigger is opposite to the last pulse trigger, the rotation direction of the incremental encoder is opposite, and if the count value variation of the AB phase pulse counter is not 0, an AB phase fault is prompted;
when the pulse is triggered at the time of the current time and the last time, the rotation direction of the incremental encoder is the same, the counting of the AB phase pulse signals comprises the A phase signals and the rising edge and the falling edge of the B phase signals, and if the count value variation of the AB phase pulse counter is not equal to the 4-time value of the resolution of the incremental encoder, the AB phase fault is prompted.
Preferably, a first error threshold is set, and if the count value variation of the AB phase pulse counter is not 0 and the error reaches the first error threshold, an AB phase fault is prompted; and setting a second error threshold, and prompting an AB phase fault if the difference between the count value variation of the AB phase pulse counter and the 4-time resolution value of the incremental encoder reaches the second error threshold.
Further, if the collected signal is an a-phase or B-phase pulse signal, detecting whether the Z-phase is faulty through the AB-phase pulse signal further includes:
when the counting of the AB-phase pulse signals comprises the rising edges and the falling edges of the A-phase signals and the B-phase signals, if the variation of the counting value of the AB-phase pulse counter reaches four times of the resolution of the incremental encoder, the counting increment of the Z-phase pulse counter is less than one, and a Z-phase fault is prompted;
or, when the count of the AB-phase pulse signal only includes the rising edges of the a-phase signal and the B-phase signal, or the count of the AB-phase pulse signal only includes the falling edges of the a-phase signal and the B-phase signal, if the count value variation of the AB-phase pulse counter reaches twice of the resolution of the incremental encoder, the count increment of the Z-phase pulse counter is less than one, and a Z-phase fault is prompted;
or when the AB-phase pulse signal count only comprises one of the rising edge of the A-phase signal, the falling edge of the A-phase signal, the rising edge of the B-phase signal and the falling edge of the B-phase signal, if the count value variation of the AB-phase pulse counter reaches one time of the resolution of the incremental encoder, the count increment of the Z-phase pulse counter is smaller than one, and a Z-phase fault is prompted.
Specifically, if the pulse signal trigger is not acquired, detecting whether the AB phase and the Z phase are full faults or not through the output power of the motor and the speed of the incremental encoder comprises the following steps:
presetting a power detection value P and a time detection value T;
when the output power of the motor driver reaches the power detection value P, the accumulated time reaches the time detection value T and the motor is not locked up, calculating the rotating speed of the incremental encoder;
and if the AB phase fault and the Z phase fault are not detected and the rotating speed of the incremental encoder is 0, prompting that all the AB phase and the Z phase have faults at the moment.
The invention further provides a control device, which is used for realizing the steps in the method, and the control device comprises a controller, a motor driver, a motor and an incremental encoder, wherein the controller is connected with the motor driver and the incremental encoder, the motor driver is connected with the motor, a rotating shaft of the incremental encoder is connected with a rotating shaft of the motor, the controller controls the motor to rotate through the motor driver, the motor rotates and simultaneously drives the incremental encoder to rotate, and the incremental encoder transmits the measured information of the motor to the controller.
Further, the control device is a robot.
In addition, the invention also provides a control system which is loaded with a program and can realize the steps in the method.
The invention has at least the following beneficial effects:
1. whether the Z phase is in fault can be detected through the AB phase pulse signal;
2. whether the AB phase fails or not can be detected through the Z-phase pulse signal;
3. the detection of the ABZ phase full fault condition is realized through a preset motor output power detection value and an incremental encoder speed detection value;
and 4, the AB phase pulse signal has multiple counting modes and is flexible.
Therefore, the method realizes the self-diagnosis function of the incremental encoder by analyzing the ABZ phase waveform of the incremental encoder without adding other external equipment, detects whether the Z phase is in fault or not by AB phase pulse counting, detects whether the AB phase is in fault or not by Z phase pulse counting, and finally analyzes whether the ABZ three-phase full-break fault occurs or not by the output power of the motor and the speed of the encoder. The method can cover all faults of the encoder, can set the diagnosis precision, cannot generate the situation of fault false alarm, can accurately analyze the fault of the incremental encoder, and can report fault information in time.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a waveform diagram of an ABZ phase pulse signal of an incremental encoder;
FIG. 2 is a flow chart illustrating a self-diagnosis method for an incremental encoder according to the present invention;
FIG. 3 is a schematic view of a specific flow chart of a self-diagnosis method for an incremental encoder according to the present invention;
fig. 4 is a schematic structural diagram of a control device according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The rotating shaft of the incremental encoder is connected with the rotating shaft of the motor, the incremental encoder is used for detecting information of the motor, the motor rotates to drive the incremental encoder to rotate, and when the incremental encoder rotates, the A phase, the B phase and the Z phase can generate pulse waveforms, and the waveforms are shown in figure 1. And the number of the square waves generated by the phase A or the number of the square waves generated by the phase B is equal to the resolution of the incremental encoder, and the phase difference between the phase A signal waveform and the phase B signal waveform is 90 degrees at each turn of the incremental encoder.
Further, whether the incremental encoder is in forward or reverse rotation can be determined by determining whether the a-phase signal precedes or the B-phase signal precedes; and the Z-phase pulse represents the null reference bit, which produces a square wave for each revolution of the incremental encoder. The controller obtains the rotation angle and the speed of the motor through pulse signals of the incremental encoder, and performs speed closed-loop control through the obtained actual speed.
The incremental encoder and the controller are communicated through pulse signals, and the pulse signals cannot contain fault information, so that the controller cannot identify when the incremental encoder fails. The invention can judge whether the encoder has a fault or not through the waveform of the incremental encoder, and the control system can immediately process the fault when the fault occurs, thereby avoiding the accident caused by the fault of the incremental encoder.
The invention provides a self-diagnosis method of an incremental encoder, which is characterized in that whether Z phase is in fault or not is detected through AB phase pulse counting, whether AB phase is in fault or not is detected through Z phase pulse counting, and whether ABZ three-phase full-break fault occurs or not is analyzed through motor output power and encoder speed.
In this embodiment, the number of pulses of the AB phase of one revolution of the encoder is 4 times of the resolution of the encoder, and in practice, quadruple frequency counting is adopted; in addition, other frequency doubling counting modes can be adopted, for example, the AB phase pulse signal counting only comprises the rising edges of the A phase signal and the B phase signal, or the AB phase pulse signal counting only comprises the falling edges of the A phase signal and the B phase signal, then the frequency doubling counting can be adopted, and the pulse number of the AB phase in one circle of the encoder is 2 times of the resolution of the encoder; or the AB phase pulse signal count only comprises one of the rising edge of the A phase signal, the falling edge of the A phase signal, the rising edge of the B phase signal and the falling edge of the B phase signal, a frequency doubling count can be adopted at the moment, and the number of pulses of the AB phase in one revolution of the encoder is 1 time of the resolution of the encoder.
The self-diagnosis method of the incremental encoder of the embodiment comprises the following steps:
s100: the controller controls the motor to rotate, and the motor drives the encoder to rotate.
The rotating shaft of the incremental encoder is connected with the rotating shaft of the motor, the controller controls the motor to rotate to drive the incremental encoder to rotate, when the incremental encoder rotates, the A phase, the B phase and the Z phase generate pulse waveforms, and the step S110 is entered.
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating a self-diagnosis method of an incremental encoder according to the present embodiment, where the flow chart includes:
s110: and collecting the electric pulse signals of the incremental encoder and judging whether the pulse signals are triggered.
Specifically, the A-phase, B-phase and Z-phase pulses of the incremental encoder are detected by the controller.
When the pulse signal trigger is acquired in step S110, the process goes to step S120, and when the pulse signal trigger is not acquired in step S110, the process goes to step S150.
S120: and judging the type of the signal.
When the step S120 determines that the acquired signal is an a-phase or B-phase pulse signal, the process proceeds to step S130, and when the step S120 determines that the acquired signal is a Z-phase pulse signal, the process proceeds to step S140.
The steering of the incremental encoder can be judged by comparing whether the A phase signal is in front of the B phase signal; the count of the Z-phase pulse signal can only be one of a rising edge or a falling edge of the Z-phase pulse signal.
And when AB phase pulse signals are acquired, judging the rotation direction of the encoder through the AB phase pulses, and counting the pulses at the same time. If the incremental encoder rotates forwards, the counting value of the AB phase pulse counter is increased by one; if the incremental encoder is reversed, the counting value of the AB phase pulse counter is reduced by one. And the addition or subtraction of the counting value of the AB phase pulse counter is the change quantity of the counting value of the AB phase pulse counter.
When the Z-phase pulse signal is collected, the counting value of the Z-phase pulse counter is increased by one no matter the incremental encoder rotates forwards or reversely.
It should be noted that, some controllers have an encoder interface, and can directly read the values of the AB phase pulses and the encoder direction.
S130: and detecting whether the Z phase is failed or not through the AB phase pulse signal.
When the variation of the count value of the AB-phase pulse counter reaches four times of the resolution of the incremental encoder, namely the incremental encoder rotates for one circle, the change of the count value of the Z-phase pulse counter is checked, and at the moment, the count of the Z-phase pulse counter is increased by more than or equal to one. And if the count of the Z-phase pulse counter is increased by less than one, prompting the Z-phase fault.
Specifically, the AB phase pulse counter count value changes to a case of an accumulated incremental change or an accumulated decremental change.
If the encoder does not rotate one turn and then rotates back and forth in the opposite direction, the count increment of the Z-phase pulse counter is not necessarily equal to one, and there are cases that the count is greater than one.
S140: and detecting whether the AB phase is failed or not through the Z-phase pulse signal.
When a Z-phase pulse signal is present, look at the current encoder turn:
if the direction of the Z-phase pulse trigger at the time is opposite to that of the Z-phase pulse trigger at the last time, the rotation angle of the incremental encoder can be judged to be 0, the count value variation of the AB-phase pulse counter during the two times of Z-phase pulse triggers is checked, and the count value variation of the AB-phase pulse counter is required to be 0. If the count value variation of the AB phase pulse counter is not 0, prompting an AB phase fault;
if the direction of the Z-phase pulse trigger at the time is the same as the direction of the Z-phase pulse trigger at the last time, the incremental encoder can be judged to rotate for one circle, the count value variation of the AB-phase pulse counter when the Z-phase pulse trigger is performed twice is checked, and the count value variation of the AB-phase pulse counter is equal to the resolution 4 times of the incremental encoder. And if the count value variation of the AB phase pulse counter is not equal to the 4 times value of the resolution of the incremental encoder, prompting the AB phase fault.
Preferably, a reasonable error threshold can be set according to the use requirement:
if the direction of the Z-phase pulse trigger at the time is opposite to that of the Z-phase pulse trigger at the last time, the rotation angle of the incremental encoder can be judged to be 0, the count value variation of the AB-phase pulse counter during the two times of Z-phase pulse triggers is checked, a first error threshold value is preset, the count value variation of the AB-phase pulse counter is 0 or close to 0, and when the count value variation of the AB-phase pulse counter is not 0, the error is smaller than the first error threshold value. If the count value variation of the AB phase pulse counter is not 0 and the error reaches a first error threshold value, prompting an AB phase fault;
if the direction of the Z-phase pulse trigger at the time is the same as the direction of the Z-phase pulse trigger at the last time, the incremental encoder can be judged to rotate for one circle, the count value variation of the AB-phase pulse counter when the Z-phase pulse triggers twice is checked, a second error threshold value is preset, and the error between the count value variation of the AB-phase pulse counter and the resolution 4 times value of the incremental encoder is smaller than the second error threshold value. And if the error between the count value variation of the AB phase pulse counter and the 4-time value of the resolution of the incremental encoder reaches a second error threshold value, prompting the AB phase fault.
Further, the first error threshold and the second error threshold may be equal.
S150: and detecting whether the AB phase and the Z phase are in full fault or not through the output power of the motor and the speed of the encoder.
Presetting a power detection value P and a time detection value T. And when the output power of the motor driver reaches the power detection value P, the accumulated time reaches the time detection value T and the motor is not locked, calculating the rotating speed of the incremental encoder, and if the rotating speed of the incremental encoder is 0 and AB phase faults and Z phase faults are not detected, prompting that all the AB phase and Z phase faults exist at the moment.
With reference to fig. 3, in this embodiment, when the pulse signal trigger is acquired in step S110, go to step S120, and when the pulse signal trigger is not acquired in step S110, go to step S151; when the step S120 determines that the acquired signal is an a-phase or B-phase pulse signal, the process proceeds to step S131, and when the step S120 determines that the acquired signal is a Z-phase pulse signal, the process proceeds to step S141.
S131: and judging the rotation direction of the encoder.
If the rotation direction of the encoder is reversed, go to step S132; or the encoder rotation direction is normal, and the process proceeds to step S134.
S132: the count value of the AB phase pulse counter is decremented by one, and the process proceeds to step S133.
S133: and judging whether the accumulated count of the counter is decreased to four times of the resolution of the encoder or not, wherein the count of the Z-phase pulse is more than or equal to one.
If the determination result is negative, go to step S136; if the determination result is yes, the process returns to step S100.
S134: the count value of the AB phase pulse counter is incremented by one, and the process proceeds to step S135.
S135: and judging whether the accumulated increment of the counter reaches four times of the resolution of the encoder or not, and judging whether the pulse count of the Z phase is more than or equal to one or not.
If the determination result is negative, go to step S136; if the determination result is yes, the process returns to step S100.
S136: and prompting a Z-phase fault.
S141: the Z-phase pulse counter counts up by one, and the process proceeds to step S142.
S142: and acquiring and storing the current encoder rotation direction, and entering step S143.
S143: and judging whether the turning direction during the pulse triggering is the same as the rotating direction of the last pulse triggering encoder.
If the determination result is negative, go to step S144; if the determination result is yes, the process proceeds to step S145.
S144: and judging whether the variation of the AB phase pulse counter is 0 or not.
If the determination result is negative, go to step S146; if the determination result is yes, the process returns to step S100.
Preferably, a first error threshold is preset, whether the error of the count value variation of the AB phase pulse counter reaches the first error threshold is determined, and if yes, the process goes to step S146; if the determination result is negative, the process returns to step S100.
S145: it is determined whether the AB phase pulse counter variation is four times the encoder resolution.
If the determination result is negative, go to step S146; if the determination result is yes, the process returns to step S100.
Preferably, a second error threshold is preset, whether the error between the variation of the AB phase pulse counter and the 4-fold value of the resolution of the encoder reaches the second error threshold is determined, and if yes, the process goes to step S146; if the determination result is negative, the process returns to step S100.
S146: and prompting the AB phase fault.
S151: and when the output power of the motor reaches a preset value, the accumulated time reaches the preset value and the motor is not locked, judging whether the rotating speed measured by the incremental encoder is 0.
It should be noted that the preset value reached by the output power of the motor is the preset power detection value P and the time detection value T described above.
At this time, the rotation speed of the incremental encoder is calculated, and whether the rotation speed of the incremental encoder is 0 and whether an AB phase fault and a Z phase fault exist is judged.
If the judgment result is that the rotating speed of the encoder is 0 and the AB phase fault and the Z phase fault do not occur, the step S152 is carried out; otherwise, the procedure returns to step S100.
S152: and prompting the faults of all the phases AB and Z.
Referring to fig. 4, the present invention also provides a control device 200, the control device 200 including a controller 210, a motor driver 220, a motor 230, and an incremental encoder 240. The controller 210 is connected to a motor driver 220 and the incremental encoder 240, the motor driver 220 is connected to the motor 230, and a rotating shaft of the incremental encoder 240 is connected to a rotating shaft of the motor 230.
The controller 210 controls the motor 230 to rotate through the motor driver 220, the motor 230 rotates and drives the incremental encoder 240 to rotate, and the incremental encoder 240 transmits the measured information of the motor 230 to the controller 210, so as to implement the steps in the incremental encoder self-diagnosis method.
It should be noted that the control device 200 may be a device including an incremental encoder and a motor, such as any type of robot, and is not limited in the embodiment of the present invention.
In addition, the invention also provides a control system which is loaded with a program and can realize the steps in the self-diagnosis method of the incremental encoder.
In summary, the invention realizes the self-diagnosis function of the incremental encoder by analyzing the ABZ phase waveform of the incremental encoder without adding other external devices, detects whether the Z phase is in fault or not by counting the AB phase pulses, detects whether the AB phase is in fault or not by counting the Z phase pulses, and finally analyzes whether the ABZ three-phase full-break fault occurs or not by the output power of the motor and the speed of the encoder. The method can cover all faults of the encoder, can set the diagnosis precision, cannot generate the situation of fault false alarm, can accurately analyze the fault of the incremental encoder, and can report fault information in time.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A method of incremental encoder self-diagnostics, the method comprising:
collecting an electric pulse signal of the incremental encoder, and judging whether the pulse signal is triggered;
if pulse signal triggering is acquired, judging the signal type;
if the collected signal is judged to be an A-phase pulse signal or a B-phase pulse signal, whether the Z phase is in fault is detected through the AB-phase pulse signal;
if the acquired signal is judged to be a Z-phase pulse signal, detecting whether the AB phase fails or not through the Z-phase pulse signal;
and if the pulse signal is not acquired for triggering, detecting whether the AB phase and the Z phase are in full fault or not through the output power of the motor and the speed of the incremental encoder.
2. The self-diagnosis method of the incremental encoder according to claim 1, wherein the step of detecting whether the Z phase is faulty or not by using the AB phase pulse signal if the acquired signal is determined to be the a phase or B phase pulse signal comprises:
comparing whether the phase A signal is ahead or the phase B signal is ahead, and judging the steering of the incremental encoder;
the count of the AB phase pulse signals comprises rising edges and/or falling edges of the A phase signals and the B phase signals;
if the incremental encoder rotates forwards, the counting value of the AB phase pulse counter is increased by one;
if the incremental encoder is reversed, subtracting one from the count value of the AB phase pulse counter;
and the addition or subtraction of the counting value of the AB phase pulse counter is the change quantity of the counting value of the AB phase pulse counter.
3. The incremental encoder self-diagnostic method of claim 2, wherein counting the AB phase pulse signals comprises a rising edge and/or a falling edge of the a phase signal, the B phase signal comprises:
the AB-phase pulse signal count only comprises one of a rising edge of the A-phase signal, a falling edge of the A-phase signal, a rising edge of the B-phase signal and a falling edge of the B-phase signal;
or, the AB phase pulse signal count includes only rising edges of the A phase signal and the B phase signal;
or, the AB phase pulse signal count includes only the falling edges of the A phase signal and the B phase signal;
or, the AB phase pulse signal count includes rising edges and falling edges of the A phase signal and the B phase signal.
4. The self-diagnosis method of the incremental encoder according to claim 2, wherein the step of detecting whether the AB phase fails or not through the Z-phase pulse signal if the acquired signal is the Z-phase pulse signal comprises the steps of:
counting the Z-phase pulse signal is one of a rising edge and a falling edge of the Z-phase signal, and if the Z-phase pulse signal is acquired, the counting value of the Z-phase pulse counter is increased by one no matter the incremental encoder rotates forwards or backwards;
the counting value of the Z-phase pulse counter is increased by one, namely when the Z-phase pulse signal is acquired, the current rotation direction of the incremental encoder is acquired and stored;
and judging whether the rotation directions of the incremental encoder are the same when the pulse triggering is carried out at the time and the pulse triggering is carried out at the last time.
5. The method for self-diagnosis of an incremental encoder according to claim 4, wherein the step of determining whether the incremental encoder has the same rotation direction when the pulse trigger is performed this time and when the pulse trigger is performed last time comprises the following steps:
when the current pulse trigger is opposite to the last pulse trigger, the rotation direction of the incremental encoder is opposite, and if the count value variation of the AB phase pulse counter is not 0, an AB phase fault is prompted;
when the pulse is triggered at the time of the current time and the last time, the rotation direction of the incremental encoder is the same, the counting of the AB phase pulse signals comprises the A phase signals and the rising edge and the falling edge of the B phase signals, and if the count value variation of the AB phase pulse counter is not equal to the 4-time value of the resolution of the incremental encoder, the AB phase fault is prompted.
6. The self-diagnosis method of the incremental encoder according to claim 4, wherein if the acquired signal is an a-phase or B-phase pulse signal, detecting whether the Z-phase is faulty or not by using the AB-phase pulse signal further comprises:
when the counting of the AB-phase pulse signals comprises the rising edges and the falling edges of the A-phase signals and the B-phase signals, if the variation of the counting value of the AB-phase pulse counter reaches four times of the resolution of the incremental encoder, the counting increment of the Z-phase pulse counter is less than one, and a Z-phase fault is prompted;
or, when the count of the AB-phase pulse signal only includes the rising edges of the a-phase signal and the B-phase signal, or the count of the AB-phase pulse signal only includes the falling edges of the a-phase signal and the B-phase signal, if the count value variation of the AB-phase pulse counter reaches twice of the resolution of the incremental encoder, the count increment of the Z-phase pulse counter is less than one, and a Z-phase fault is prompted;
or when the AB-phase pulse signal count only comprises one of the rising edge of the A-phase signal, the falling edge of the A-phase signal, the rising edge of the B-phase signal and the falling edge of the B-phase signal, if the count value variation of the AB-phase pulse counter reaches one time of the resolution of the incremental encoder, the count increment of the Z-phase pulse counter is smaller than one, and a Z-phase fault is prompted.
7. The self-diagnosis method of the incremental encoder according to claim 1, wherein the step of detecting whether the AB phase and the Z phase have full faults or not through the output power of the motor and the speed of the incremental encoder if the pulse signal trigger is not acquired comprises the following steps:
presetting a power detection value P and a time detection value T;
when the output power of the motor driver reaches the power detection value P, the accumulated time reaches the time detection value T and the motor is not locked up, calculating the rotating speed of the incremental encoder;
and if the AB phase fault and the Z phase fault are not detected and the rotating speed of the incremental encoder is 0, prompting that all the AB phase and the Z phase have faults at the moment.
8. The self-diagnosis method of an incremental encoder according to claim 5, wherein when the pulse trigger of this time is opposite to the pulse trigger of the last time, the incremental encoder rotates in a direction opposite to the rotation direction of the incremental encoder, and if the change amount of the count value of the AB-phase pulse counter is not 0, the method for prompting the AB-phase fault further comprises:
and setting a first error threshold, and prompting the AB phase fault if the count value variation of the AB phase pulse counter is not 0 and the error reaches the first error threshold.
9. The self-diagnosis method of an incremental encoder according to claim 5, wherein when the pulse trigger of this time is the same as the pulse trigger of the last time, the rotation direction of the incremental encoder is the same, and when the count of the AB-phase pulse signal includes the rising edge and the falling edge of the a-phase signal and the B-phase signal, if the count variation of the AB-phase pulse counter is not equal to the 4-times resolution value of the incremental encoder, the method for prompting the AB-phase fault further comprises:
and setting a second error threshold, and prompting an AB phase fault if the difference between the count value variation of the AB phase pulse counter and the 4-time resolution value of the incremental encoder reaches the second error threshold.
10. A control device for implementing the steps of the method according to any one of claims 1 to 9, wherein the control device comprises a controller, a motor driver, a motor, and an incremental encoder, the controller is connected to the motor driver and the incremental encoder, the motor driver is connected to the motor, a rotating shaft of the incremental encoder is connected to a rotating shaft of the motor, the controller controls the motor to rotate through the motor driver, the motor rotates and drives the incremental encoder to rotate, and the incremental encoder transmits the measured information of the motor to the controller.
CN202111266607.0A 2021-10-28 2021-10-28 Self-diagnosis method and control device for incremental encoder Pending CN113884124A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111266607.0A CN113884124A (en) 2021-10-28 2021-10-28 Self-diagnosis method and control device for incremental encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111266607.0A CN113884124A (en) 2021-10-28 2021-10-28 Self-diagnosis method and control device for incremental encoder

Publications (1)

Publication Number Publication Date
CN113884124A true CN113884124A (en) 2022-01-04

Family

ID=79014158

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111266607.0A Pending CN113884124A (en) 2021-10-28 2021-10-28 Self-diagnosis method and control device for incremental encoder

Country Status (1)

Country Link
CN (1) CN113884124A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114543864A (en) * 2022-02-11 2022-05-27 深圳市禾望电气股份有限公司 Incremental encoder fault diagnosis method based on FPGA

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002145552A (en) * 2000-11-14 2002-05-22 Mitsubishi Electric Corp Safety device for elevator
CN2938035Y (en) * 2006-07-28 2007-08-22 上海梅山钢铁股份有限公司 Pulse detection device of incremental photoelectric coder
KR20100138052A (en) * 2009-06-24 2010-12-31 엘에스산전 주식회사 Apparatus for detecting error using z phase pulse signal
CN103076036A (en) * 2012-12-31 2013-05-01 深圳市配天数控科技有限公司 Incremental encoder disconnection detection method and system
CN110487316A (en) * 2019-09-09 2019-11-22 配天机器人技术有限公司 The fault detection method and robot of incremental encoder
CN110806225A (en) * 2019-11-12 2020-02-18 华大半导体(成都)有限公司 System and method for detecting disconnection position of incremental encoder
CN111367300A (en) * 2020-05-27 2020-07-03 弗徕威智能机器人科技(上海)有限公司 Obstacle detection method for multi-path ultrasonic waves, mobile robot, and storage medium
CN111504353A (en) * 2020-04-28 2020-08-07 浙江大学 Encoder zero signal loss compensation device and method
CN113295197A (en) * 2021-07-23 2021-08-24 明峰医疗系统股份有限公司 Counting correction method and counting system of incremental encoder

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002145552A (en) * 2000-11-14 2002-05-22 Mitsubishi Electric Corp Safety device for elevator
CN2938035Y (en) * 2006-07-28 2007-08-22 上海梅山钢铁股份有限公司 Pulse detection device of incremental photoelectric coder
KR20100138052A (en) * 2009-06-24 2010-12-31 엘에스산전 주식회사 Apparatus for detecting error using z phase pulse signal
CN103076036A (en) * 2012-12-31 2013-05-01 深圳市配天数控科技有限公司 Incremental encoder disconnection detection method and system
CN110487316A (en) * 2019-09-09 2019-11-22 配天机器人技术有限公司 The fault detection method and robot of incremental encoder
CN110806225A (en) * 2019-11-12 2020-02-18 华大半导体(成都)有限公司 System and method for detecting disconnection position of incremental encoder
CN111504353A (en) * 2020-04-28 2020-08-07 浙江大学 Encoder zero signal loss compensation device and method
CN111367300A (en) * 2020-05-27 2020-07-03 弗徕威智能机器人科技(上海)有限公司 Obstacle detection method for multi-path ultrasonic waves, mobile robot, and storage medium
CN113295197A (en) * 2021-07-23 2021-08-24 明峰医疗系统股份有限公司 Counting correction method and counting system of incremental encoder

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114543864A (en) * 2022-02-11 2022-05-27 深圳市禾望电气股份有限公司 Incremental encoder fault diagnosis method based on FPGA
CN114543864B (en) * 2022-02-11 2023-08-29 深圳市禾望电气股份有限公司 FPGA-based incremental encoder fault diagnosis method

Similar Documents

Publication Publication Date Title
JP3362537B2 (en) Fail-safe control of drive motor for electric vehicles
US10040475B2 (en) Malfunction detection device for resolver
US10960922B2 (en) Fault tolerant field oriented control for electric power steering
US7973504B2 (en) Electric power steering control
CN102597709B (en) Rotation angle detection device
CN103441712B (en) Encoder fault self-diagnosing method in servo drive system
JP5163963B2 (en) Abnormality monitoring device
CN101197555A (en) Electric car motor control method and fault-tolerance processing method for its rotor position detection
CN104242774A (en) Motor phase current prediction and diagnosis method
CN113884124A (en) Self-diagnosis method and control device for incremental encoder
CN110487316B (en) Fault detection method of incremental encoder and robot
EP3255385B1 (en) A controller to reduce integral non-linearity errors of a magnetic rotary encoder
CN103868446A (en) Steering wheel position detection circuit and steering wheel position detection method of EPS (Electric Power Steering) system
CN104426439A (en) Method and apparatus for monitoring rotational position of an electric machine
CN109884437A (en) A kind of Rotary transformer system fault detection method and device and controller
CN116155170B (en) Servo diagnosis method, apparatus, device and readable storage medium
CN110971155B (en) PMSM control method for redundant position signals
JP3903478B2 (en) Control device for permanent magnet type synchronous motor
CN115667852B (en) Monitoring control device and monitoring control method
US20230042139A1 (en) System and Method for Monitoring a Failsafe Function of Sensors in a Motor
JP2001249154A (en) Disconnection detecting device for encoder and method for disconnection detection
JP2003302421A (en) Diagnostic device for revolution sensor
JPH0712589A (en) Malfunction detector for magnetic type encoder
CN112436761B (en) Magnetic steel crushing diagnosis method and diagnosis system for brushless motor position sensor
JPH0425495B2 (en)

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination