CN114499697A - Motor encoder decoding method and device, electronic equipment and storage medium - Google Patents

Motor encoder decoding method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114499697A
CN114499697A CN202210007102.0A CN202210007102A CN114499697A CN 114499697 A CN114499697 A CN 114499697A CN 202210007102 A CN202210007102 A CN 202210007102A CN 114499697 A CN114499697 A CN 114499697A
Authority
CN
China
Prior art keywords
increment value
pulse
pulse edge
encoder
edge increment
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
CN202210007102.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.)
Suzhou Weichuang Electrical Technology Co ltd
Original Assignee
Suzhou Weichuang Electrical Technology 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 Suzhou Weichuang Electrical Technology Co ltd filed Critical Suzhou Weichuang Electrical Technology Co ltd
Priority to CN202210007102.0A priority Critical patent/CN114499697A/en
Publication of CN114499697A publication Critical patent/CN114499697A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B14/00Transmission systems not characterised by the medium used for transmission
    • H04B14/02Transmission systems not characterised by the medium used for transmission characterised by the use of pulse modulation
    • H04B14/06Transmission systems not characterised by the medium used for transmission characterised by the use of pulse modulation using differential modulation, e.g. delta modulation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B14/00Transmission systems not characterised by the medium used for transmission
    • H04B14/02Transmission systems not characterised by the medium used for transmission characterised by the use of pulse modulation
    • H04B14/04Transmission systems not characterised by the medium used for transmission characterised by the use of pulse modulation using pulse code modulation
    • H04B14/046Systems or methods for reducing noise or bandwidth

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

The application relates to a motor encoder decoding method, a motor encoder decoding device, electronic equipment and a storage medium, wherein the method comprises the following steps: determining a pulse edge increment value of an encoder, wherein the pulse edge increment value is determined according to the level states of an A-phase pulse and a B-phase pulse of the encoder which are currently collected, and the pulse edge increment value is used for determining the increasing and decreasing directions of the position of a motor; determining a processing strategy of the pulse edge increment value according to the increasing and decreasing direction determined by the pulse edge increment value and the position recording direction of the encoder; and processing the pulse edge increment value according to the processing strategy so as to decode the encoder, and determining the processing strategy of the pulse edge increment value according to the increasing and decreasing direction determined by the pulse edge increment value and the position recording direction of the encoder, so that the phenomena of burr interference and edge jumping caused by directly outputting the pulse edge increment value are avoided, and the decoding accuracy of the encoder is improved.

Description

Motor encoder decoding method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of motor encoder technologies, and in particular, to a motor encoder decoding method and apparatus, an electronic device, and a storage medium.
Background
The motor closed-loop vector control system with the position sensor is increasingly applied to industrial transmission systems because of the advantages of wide speed regulation range, excellent dynamic performance, large low-frequency moment and the like. The feedback link of motor position speed measurement is an indispensable part in realizing a closed-loop vector control system, and the processing effect of the feedback link can greatly influence the performance of motor control, such as speed stabilization precision, speed pulsation, step dynamic response and the like.
In the related technology, the encoder is decoded by AB orthogonal pulses, so that the increasing and decreasing directions of the motor position are obtained, and the motor has good resolution and anti-interference capability, so that the motor is widely applied to motor transmission occasions. Then, most pulse type position signals are affected by mechanical jitter, electrical interference, a jump boundary condition and the like, and the AB orthogonal pulse also shows the problems of interference pulse and edge jump jitter.
Disclosure of Invention
The application provides a motor encoder decoding method, a motor encoder decoding device, electronic equipment and a storage medium, and aims to solve the problem that the increasing and decreasing directions of motor positions cannot be accurately acquired in the related art.
In a first aspect, the present application provides a motor encoder decoding method, including: determining a pulse edge increment value of an encoder, wherein the pulse edge increment value is determined according to the level states of an A-phase pulse and a B-phase pulse of the encoder which are currently collected, and the pulse edge increment value is used for determining the increasing and decreasing directions of the position of a motor; determining a processing strategy of the pulse edge increment value according to the increasing and decreasing direction determined by the pulse edge increment value and the position recording direction of the encoder; processing the pulse edge increment value according to the processing strategy to decode the encoder.
In a second aspect, the present application provides a motor encoder decoding device, comprising: the determining module is used for determining a pulse edge increment value of the encoder, wherein the pulse edge increment value is determined according to the level states of an A-phase pulse and a B-phase pulse of the encoder which are currently collected, and the pulse edge increment value is used for determining the increasing and decreasing directions of the position of the motor; the strategy module is used for determining the processing strategy of the pulse edge increment value according to the increasing and decreasing direction determined by the pulse edge increment value and the position recording direction of the encoder; and the processing module is used for processing the pulse edge increment value according to the processing strategy so as to decode the encoder.
In a third aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the steps of the motor encoder decoding method according to any one of the embodiments of the first aspect when executing the program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method for decoding a motor encoder according to any of the embodiments of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
the motor encoder decoding method provided by the embodiment of the application comprises the following steps: determining a pulse edge increment value of an encoder, wherein the pulse edge increment value is determined according to the level states of an A-phase pulse and a B-phase pulse of the encoder which are currently collected, and the pulse edge increment value is used for determining the increasing and decreasing directions of the position of a motor; determining a processing strategy of the pulse edge increment value according to the increasing and decreasing direction determined by the pulse edge increment value and the position recording direction of the encoder; and processing the pulse edge incremental value according to the processing strategy so as to decode the encoder, determining the pulse edge incremental value according to the increasing and decreasing direction determined by the pulse edge incremental value and the position recording direction of the encoder, avoiding the phenomena of burr interference and edge jumping caused by directly outputting the pulse edge incremental value, improving the accuracy of decoding the encoder and further achieving the effect of accurately acquiring the position of the motor.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic basic flowchart of a decoding method of a motor encoder according to an embodiment of the present disclosure;
FIG. 2 is a basic diagram illustrating the level states of an A-phase pulse and a B-phase pulse according to an embodiment of the present disclosure;
FIG. 3 is a basic diagram of adding a pulse deviation value to a pulse edge increment value according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a basic structure of a decoding apparatus of a motor encoder according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all 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 application.
Fig. 1 is a schematic basic flow chart of a decoding method of a motor encoder according to an embodiment of the present application, which includes but is not limited to:
s101, determining a pulse edge increment value of an encoder;
it should be understood that, the pulse edge increment value is determined according to the level states of the currently acquired a-phase pulse and B-phase pulse of the encoder, and the pulse edge increment value is used for determining the increasing and decreasing directions of the motor position, wherein the increasing and decreasing directions of the electrode position are positive or negative.
It should be understood that the decoding method for the motor encoder provided in this embodiment is applied to an encoder, where the encoder may emit A, B two paths of orthogonal pulses, that is, the phase difference between the a-phase pulse and the B-phase pulse is 90, and it should be understood that the edge count of the A, B-phase pulse may be obtained by using an orthogonal decoding circuit (a functional module built by a logic device such as a dedicated peripheral of a Micro Controller Unit (MCU) or a Complex Programmable Logic Device (CPLD)).
S102, determining a processing strategy of the pulse edge increment value according to the increasing and decreasing direction determined by the pulse edge increment value and the position recording direction of the encoder;
it should be understood that the position recording direction of the encoder is positive or negative, wherein the position recording direction of the encoder is the increasing and decreasing direction of the electrode position recorded immediately before, that is, when the pulse edge increment value of the output of the last recording is positive, the position recording direction of the encoder is positive, and when the pulse edge increment value of the output of the last recording is negative, the position recording direction of the encoder is negative.
S103, processing the pulse edge increment value according to the processing strategy so as to decode the encoder.
And processing the pulse edge increment value according to the processing strategy so as to decode the encoder and further accurately acquire the position of the motor.
In some examples of this embodiment, determining the pulse edge increment value for the encoder comprises: an a-phase pulse and a B-phase pulse, as shown in fig. 2, when the level state of the a-phase pulse is a rising edge and the level state of the B-phase pulse is kept unchanged, determining that the pulse edge increment value is 1; when the level state of the A-phase pulse is a falling edge and the level state of the B-phase pulse is kept unchanged, determining that the increment value of the pulse edge is-1; when the level state of the A-phase pulse is kept unchanged and the level state of the B-phase pulse is a rising edge, determining that the pulse edge increment value is 1; and when the level state of the A-phase pulse is kept unchanged and the level state of the B-phase pulse is a falling edge, determining that the pulse edge increment value is-1.
It should be understood that when the pulse edge increment value is-1, the increasing and decreasing directions of the motor position are negative; when the increment value of the pulse edge is 1, the increasing and decreasing directions of the motor position are positive; when the level state of the A-phase pulse is kept unchanged and the level state of the B-phase pulse is kept unchanged, the pulse edge increment value is determined to be 0, and when the pulse edge increment value is 0, the increasing and decreasing directions of the motor position are unchanged.
In some examples of this embodiment, the determining the pulse edge increment value according to the increasing and decreasing direction determined by the pulse edge increment value and the position recording direction of the encoder includes: and when the increasing and decreasing direction determined by the pulse edge increment value is the same as the position recording direction of the encoder, determining the processing strategy as outputting the pulse edge increment value to record the position of the encoder. It should be understood that, when the increasing and decreasing direction determined by the pulse edge increment is the same as the position recording direction of the encoder, it indicates that the increasing and decreasing direction of the motor position is not changed, and is a continuous increment or a continuous decrement, and at this time, the pulse edge increment value is directly output and recorded, so as to decode the encoder according to the position recording.
As a specific example, when the increasing/decreasing direction determined according to the pulse edge increment value is positive, the pulse edge increment value recorded last time in the position recording of the encoder is also positive, and the position recording direction of the encoder is determined to be positive, the processing strategy is determined to directly output the pulse edge increment value to record the pulse edge increment value; for another example, when the increasing/decreasing direction determined from the pulse edge increment value is negative, the pulse edge increment value recorded last in the position recording of the encoder is also negative, and the position recording direction of the encoder is determined to be negative at this time, the determination processing strategy is to output the pulse edge increment value directly to record the pulse edge increment value at this time.
In some examples of this embodiment, the determining the pulse edge increment value according to the increasing and decreasing direction determined by the pulse edge increment value and the position recording direction of the encoder includes: when the increasing and decreasing direction determined by the pulse edge increment value is opposite to the position recording direction of the encoder and the absolute value of the pulse edge increment value is greater than 1, determining the processing strategy of the pulse edge increment value as that, and outputting the pulse edge increment value; when the absolute value of the pulse edge increment value is greater than 1, the change of the increasing and decreasing directions of the motor position is indicated, and at the moment, the pulse edge increment value is directly output so that the position recording direction of the encoder is changed into the increasing and decreasing directions determined by the pulse edge increment value.
In some examples of this embodiment, the determining the pulse edge increment value according to the increasing and decreasing direction determined by the pulse edge increment value and the position recording direction of the encoder includes: when the increase and decrease direction determined by the pulse edge increment value is opposite to the position recording direction of the encoder and the absolute value of the pulse edge increment value is 1, acquiring the pulse deviation of the encoder, wherein the pulse deviation is used for recording the pulse edge increment value which is not output; and determining the processing strategy of the pulse edge increment value according to the pulse deviation. It should be understood that, when the increasing and decreasing direction determined by the pulse edge increment is opposite to the position recording direction of the encoder, and the absolute value of the pulse edge increment value is 1, it indicates that the increasing and decreasing direction of the motor position may change at this time, and therefore, it is necessary to obtain the pulse deviation of the encoder at this time, and determine whether the increasing and decreasing direction of the motor position changes or not by using the pulse deviation. Specifically, for example, when the increasing and decreasing direction determined by the pulse edge increment value is positive, and the pulse edge increment value recorded last time in the position recording of the encoder is negative, that is, the position recording direction of the encoder is negative, and the increasing and decreasing direction determined by the pulse edge increment value is opposite to the position recording direction of the encoder, the pulse deviation of the encoder is obtained, and it is determined whether the increasing and decreasing direction of the motor position of the motor is actually changed, so as to avoid the problem that the increasing and decreasing direction of the motor position is erroneously determined to be changed due to jitter problems such as interference pulses and edge jump when the increasing and decreasing direction of the motor position is not changed, thereby causing errors.
In some examples of this embodiment, the processing strategy for determining the pulse edge increment value from the pulse deviation comprises: when the value of the pulse deviation of the encoder is 0, the processing strategy of determining the pulse edge increment value is to add the pulse edge increment value to the pulse deviation of the encoder so that the value of the pulse deviation of the encoder is more 1. It should be understood that, as shown in fig. 2, when the increasing/decreasing direction determined by the pulse edge increment value is opposite to the position recording direction of the encoder, and the value of the pulse deviation of the encoder is 0, it indicates that the increasing/decreasing direction determined by the pulse edge increment value is the first time opposite to the position recording direction of the encoder, and the direction is not continuously opposite to the position recording direction of the encoder, and at this time, there may be a jitter problem such as disturbance pulse and edge jump, and the increasing/decreasing direction of the motor position is erroneously determined to be changed, and therefore, in order to eliminate jitter stability at this time, the processing strategy for determining the pulse edge increment value is to add the pulse edge increment value to the pulse deviation of the encoder, to be recorded as a pulse deviation, so that the value of the pulse deviation of the encoder becomes 1, and judging the processing mode of the pulse edge increment value according to the subsequent result.
Specifically, the decoding method for the motor encoder according to this embodiment introduces the concept of pulse deviation, sets the default value of the pulse deviation to be 0, and only when the increase/decrease direction determined by the pulse edge increment value is opposite to the position recording direction of the encoder, modifies the value of the pulse deviation to be 1 to record the pulse edge increment value, thereby avoiding directly outputting the pulse edge increment value, and further avoiding the phenomena of burrs and edge jitter caused by directly outputting the pulse edge increment value when the increase/decrease direction of the position of the motor is not determined to be changed.
In some examples of this embodiment, the processing strategy for determining the pulse edge increment value from the pulse deviation comprises: when the value of the pulse deviation is 1, the processing strategy of determining the pulse edge increment value is to output the pulse edge increment value so as to change the position recording direction of the encoder to an increasing or decreasing direction according to the pulse edge increment value. It should be understood that when the increasing and decreasing direction determined by the pulse edge increment value is opposite to the position recording direction of the encoder, and the value of the pulse deviation of the encoder is 1, it indicates that the increasing and decreasing direction determined by the pulse edge increment value at this time is continuously opposite to the position recording direction of the encoder, and at this time, the processing strategy for determining the pulse edge increment value is to output the pulse edge increment value, and it should be understood that, when the pulse edge increment value is output, the position recording direction of the encoder is also changed to the direction determined by the pulse edge increment value, as shown in fig. 2, and the effect of changing the position recording direction of the encoder to the increasing and decreasing direction determined by the pulse edge increment value is achieved. And then, the pulse edge increment is output only when the increase and decrease direction determined by the pulse edge increment value is determined and the situation opposite to the position recording direction of the encoder continuously occurs, so that the problem of burrs caused by directly outputting the pulse edge increment when the edge pulse shakes once is avoided, and the increase and decrease direction of the position of the motor is reflected more accurately.
In some examples of this embodiment, outputting the pulse edge increment value comprises: adding the value of the pulse offset to the pulse edge increment value, as shown in fig. 3, so that the output pulse edge increment value includes the pulse offset, wherein the left side of fig. 3 is the content output when the jitter is eliminated without using the motor encoder decoding method provided by the present example; after adding the value of the pulse deviation to the pulse edge increment value, clearing the pulse deviation of the encoder; it is understood that the situation that the pulse edge increment value is lost due to the commutation is avoided by adding the value of the pulse deviation to the pulse edge increment value, and by the method, not only can the glitch interference and the edge jump caused by the jitter problems such as interference pulse and edge jump be eliminated, but also the situation that the pulse edge increment value is lost during the commutation can not occur, so that the accuracy of decoding the encoder is improved.
In some examples of this embodiment, the pulse edge increment value is processed according to the processing strategy, so that when the encoder is decoded, if the increase/decrease direction determined by the pulse edge increment value is the same as the position recording direction of the encoder, the processing strategy is determined to output the pulse edge increment value, and when the pulse edge increment value is recorded, after the pulse edge increment value is output, zero clearing is also performed on a value of a pulse deviation, thereby avoiding an influence of the value of the pulse deviation on the processing strategy for determining a next pulse edge increment value.
The motor encoder decoding method provided by the embodiment comprises the following steps: determining a pulse edge increment value of an encoder, wherein the pulse edge increment value is determined according to the level states of an A-phase pulse and a B-phase pulse of the encoder which are currently collected, and the pulse edge increment value is used for determining the increasing and decreasing directions of the position of a motor; determining a processing strategy of the pulse edge increment value according to the increasing and decreasing direction determined by the pulse edge increment value and the position recording direction of the encoder; and processing the pulse edge incremental value according to the processing strategy so as to decode the encoder, determining the pulse edge incremental value according to the increasing and decreasing direction determined by the pulse edge incremental value and the position recording direction of the encoder, avoiding the phenomena of burr interference and edge jumping caused by directly outputting the pulse edge incremental value, improving the accuracy of decoding the encoder and further achieving the effect of accurately acquiring the position of the motor.
For better understanding of the present invention, the present embodiment provides a more specific example to illustrate the present invention, and the present example provides a motor encoder decoding method, which includes:
step 1: and judging whether the increasing and decreasing direction corresponding to the pulse edge increment value is positive or not. If yes, executing step 2; if negative, executing step 6.
Step 2: it is determined whether the position recording direction of the encoder is the forward direction. If not, executing step 3; if the direction is positive, step 5 is executed.
And 3, step 3: the direction record is positive. Judging whether the increment value of the pulse edge is 1 or not, if so, executing the step 4; if not 1, executing step 11.
And 4, step 4: and clearing the increment value of the pulse edge, adding 1 to the pulse deviation, and executing the 11 th step.
And 5, step 5: it is determined whether the pulse deviation is 0. If not, the pulse deviation is reset, the increment value of the pulse edge is added by 1, and the step 11 is executed; if 0, execute step 11.
And 6, step 6: it is determined whether the pulse edge increment value is-1. If the value is-1, executing the step 7; if not-1, executing step 11.
And 7, step 7: it is judged whether or not the position recording direction of the encoder is reverse. If not, executing the step 8; if the direction is reverse, step 10 is executed.
And 8, step 8: the position recording direction of the encoder is set to be reverse. Judging whether the increment value of the pulse edge is-1 or not, and if so, executing the step 9; if not-1, executing step 11.
Step 9: and clearing the increment value of the pulse edge, and carrying out the 11 th step by subtracting 1 from the pulse deviation.
Step 10: it is determined whether the pulse deviation is 0. If not, the pulse deviation is reset, the increment value of the pulse edge is reduced by 1, and the step 11 is executed; if 0, directly executing step 11.
And 11, step 11: and outputting the pulse edge increment value after the dithering treatment.
Fig. 2 shows the output pulse and velocity measurement results of the encoder before and after the method of the present invention is used, the left side shows the output pulse and velocity measurement results when the method of the present invention is not used, and the right side shows the output pulse and velocity measurement results when the method of the present invention is used. It can be seen from the right that the pulse increment (debounce) accounts for the edge deviation due to commutation. In the embodiment, when the motor runs at a low speed, interference burrs can be removed, and the condition of pulse loss does not occur during commutation.
Based on the same concept, as shown in fig. 4, the present embodiment further provides a motor encoder decoding apparatus, which includes but is not limited to:
the device comprises a determining module 1, a detecting module and a judging module, wherein the determining module is used for determining a pulse edge increment value of an encoder, the pulse edge increment value is determined according to the level states of an A-phase pulse and a B-phase pulse of the encoder which are currently collected, and the pulse edge increment value is used for determining the increasing and decreasing directions of the position of a motor;
a strategy module 2, configured to determine a processing strategy for the pulse edge increment value according to an increase/decrease direction determined by the pulse edge increment value and a position recording direction of the encoder;
and the processing module 3 is configured to process the pulse edge increment value according to the processing strategy so as to decode the encoder.
As shown in fig. 5, an electronic device according to an embodiment of the present application includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, where the processor 111, the communication interface 112, and the memory 113 complete mutual communication via the communication bus 114,
a memory 113 for storing a computer program;
in an embodiment of the present application, the processor 111, when configured to execute the program stored in the memory 113, is configured to implement the steps of the motor encoder decoding method provided in any one of the foregoing method embodiments.
The present application also provides a computer readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the motor encoder decoding method provided in any one of the foregoing method embodiments.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A motor encoder decoding method, comprising:
determining a pulse edge increment value of an encoder, wherein the pulse edge increment value is determined according to the level states of an A-phase pulse and a B-phase pulse of the encoder which are currently collected, and the pulse edge increment value is used for determining the increasing and decreasing directions of the position of a motor;
determining a processing strategy of the pulse edge increment value according to the increasing and decreasing direction determined by the pulse edge increment value and the position recording direction of the encoder;
processing the pulse edge increment value according to the processing strategy to decode the encoder.
2. The motor encoder decoding method of claim 1, wherein the processing strategy for determining the pulse edge increment value based on the determined increase and decrease direction of the pulse edge increment value and the position recording direction of the encoder comprises:
and when the increasing and decreasing direction determined by the pulse edge increment value is the same as the position recording direction of the encoder, determining the processing strategy as outputting the pulse edge increment value to record the pulse edge increment value.
3. The motor encoder decoding method of claim 1, wherein the processing strategy for determining the pulse edge increment value based on the determined increase and decrease direction of the pulse edge increment value and the position recording direction of the encoder comprises:
and when the increasing and decreasing direction determined by the pulse edge increment value is opposite to the position recording direction of the encoder and the absolute value of the pulse edge increment value is greater than 1, determining the processing strategy of the pulse edge increment value as that, and outputting the pulse edge increment value.
4. The motor encoder decoding method of claim 1, wherein the processing strategy for determining the pulse edge increment value based on the determined increase and decrease direction of the pulse edge increment value and the position recording direction of the encoder comprises:
when the increase and decrease direction determined by the pulse edge increment value is opposite to the position recording direction of the encoder and the absolute value of the pulse edge increment value is 1, acquiring the pulse deviation of the encoder, wherein the pulse deviation is used for recording the pulse edge increment value which is not output;
and determining the pulse edge increment value according to the pulse deviation.
5. The motor encoder decoding method of claim 4, wherein the processing strategy for determining the pulse edge increment value from the pulse deviation comprises:
when the value of the pulse deviation of the encoder is 0, the processing strategy of determining the pulse edge increment value is to add the pulse edge increment value to the pulse deviation of the encoder so that the value of the pulse deviation of the encoder is more 1.
6. The motor encoder decoding method of claim 4, wherein the processing strategy for determining the pulse edge increment value from the pulse deviation comprises:
when the value of the pulse deviation is 1, the processing strategy for determining the pulse edge increment value is to output the pulse edge increment value so as to change the position recording direction of the encoder to the increasing or decreasing direction determined by the pulse edge increment value.
7. The motor encoder decoding method of claim 6, wherein outputting the pulse edge increment value comprises:
adding a value of the pulse offset to the pulse edge increment value such that the output pulse edge increment value comprises the pulse offset;
and after the value of the pulse deviation is added to the pulse edge increment value, clearing the pulse deviation of the encoder.
8. A motor encoder decoding device, comprising:
the determining module is used for determining a pulse edge increment value of the encoder, wherein the pulse edge increment value is determined according to the level states of an A-phase pulse and a B-phase pulse of the encoder which are currently collected, and the pulse edge increment value is used for determining the increasing and decreasing directions of the position of the motor;
the strategy module is used for determining the processing strategy of the pulse edge increment value according to the increasing and decreasing direction determined by the pulse edge increment value and the position recording direction of the encoder;
and the processing module is used for processing the pulse edge increment value according to the processing strategy so as to decode the encoder.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the motor encoder decoding method of any one of claims 1 to 7 when executing a program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the motor encoder decoding method according to any one of claims 1 to 7.
CN202210007102.0A 2022-01-05 2022-01-05 Motor encoder decoding method and device, electronic equipment and storage medium Pending CN114499697A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210007102.0A CN114499697A (en) 2022-01-05 2022-01-05 Motor encoder decoding method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210007102.0A CN114499697A (en) 2022-01-05 2022-01-05 Motor encoder decoding method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114499697A true CN114499697A (en) 2022-05-13

Family

ID=81509957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210007102.0A Pending CN114499697A (en) 2022-01-05 2022-01-05 Motor encoder decoding method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114499697A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726115A (en) * 2020-05-15 2020-09-29 中国空气动力研究与发展中心低速空气动力研究所 Frequency division and counting system and method for pulse signals of rotary pulse encoder
CN111953353A (en) * 2020-08-21 2020-11-17 烟台艾睿光电科技有限公司 Decoding method and related device of incremental encoder
CN112117994A (en) * 2020-09-21 2020-12-22 青岛中加特电气股份有限公司 Decoding method of incremental encoder

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111726115A (en) * 2020-05-15 2020-09-29 中国空气动力研究与发展中心低速空气动力研究所 Frequency division and counting system and method for pulse signals of rotary pulse encoder
CN111953353A (en) * 2020-08-21 2020-11-17 烟台艾睿光电科技有限公司 Decoding method and related device of incremental encoder
CN112117994A (en) * 2020-09-21 2020-12-22 青岛中加特电气股份有限公司 Decoding method of incremental encoder

Similar Documents

Publication Publication Date Title
JP4835606B2 (en) Rotating body phase / speed detector
CN111308339A (en) Servo motor testing method, device and equipment and computer storage medium
CN102946220B (en) Speed Regulation System Based on DC Motor and method for control speed
CN114499697A (en) Motor encoder decoding method and device, electronic equipment and storage medium
CN110806225B (en) System and method for detecting disconnection position of incremental encoder
CN110806224B (en) Incremental encoder position correction system and method
CN107508520B (en) Permanent magnet motor control method and device
JP2019115094A (en) Semiconductor device and rotational abnormality detection method therefor
CN111181469A (en) Servo driver position feedback abnormal jump multi-period joint detection processing method
JP2001249154A (en) Disconnection detecting device for encoder and method for disconnection detection
CN116338231A (en) Motor rotation speed measuring method and device, terminal equipment and storage medium
CN110912488B (en) Motor control method and system
JP6000652B2 (en) Pulse motor control device and pulse signal generation method
CN112698566B (en) High-fidelity high-fault-tolerance incremental encoder measuring method for continuously variable transmission
US11797463B2 (en) Signal generation device
JP2014202675A (en) Rotation speed detection apparatus and rotation speed detection method
CN117200939B (en) Signal decoding method, device and equipment of PSI5 interface and storage medium
KR100383994B1 (en) A error detecting method of incremental encoder
KR940022059A (en) Encoder Output Error Compensation Method
JPH0560571A (en) Method for detecting abnormality of encoder
KR20230101307A (en) Apparatus for compensating error of pwm signal of motor driving circuit and method thereof
JP3460675B2 (en) A moving direction detecting device using an optical encoder and a moving direction detecting method using an optical encoder.
CN115963776A (en) Method, device and processor for realizing spindle positioning control processing under condition of no external sensor and computer readable storage medium thereof
JP2006217155A (en) Comparator, and apparatus and method of processing signal
JP2022098537A (en) Electronic control device and method for detecting operation of motor

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