CN108827353B - Pseudo-random code and increment code synchronization method - Google Patents

Pseudo-random code and increment code synchronization method Download PDF

Info

Publication number
CN108827353B
CN108827353B CN201810710673.4A CN201810710673A CN108827353B CN 108827353 B CN108827353 B CN 108827353B CN 201810710673 A CN201810710673 A CN 201810710673A CN 108827353 B CN108827353 B CN 108827353B
Authority
CN
China
Prior art keywords
signal
code
pseudo
random code
detectors
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.)
Expired - Fee Related
Application number
CN201810710673.4A
Other languages
Chinese (zh)
Other versions
CN108827353A (en
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.)
Jilin University
Original Assignee
Jilin University
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 Jilin University filed Critical Jilin University
Priority to CN201810710673.4A priority Critical patent/CN108827353B/en
Publication of CN108827353A publication Critical patent/CN108827353A/en
Application granted granted Critical
Publication of CN108827353B publication Critical patent/CN108827353B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/26Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light
    • G01D5/32Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light
    • G01D5/34Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light the beams of light being detected by photocells
    • G01D5/347Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable characterised by optical transfer means, i.e. using infrared, visible, or ultraviolet light with attenuation or whole or partial obturation of beams of light the beams of light being detected by photocells using displacement encoding scales
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/26Measuring arrangements characterised by the use of optical techniques for measuring angles or tapers; for testing the alignment of axes

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Optical Transform (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

The invention discloses a method for synchronizing a pseudo-random code and an incremental code, which belongs to the technical field of angle measurement, when a sinusoidal signal is right near 0 degree, a signal A is at a rising edge, two possibilities of high or low are possible, if the signal A is judged to be high, an M signal is read in a 0-180 degree interval according to the sinusoidal signal to serve as absolute position information at the moment, otherwise, an N signal is read in a 180-360 degree interval according to the sinusoidal signal, and the N signal is shifted to the left by one bit to serve as the absolute position information at the moment. The invention adopts a mechanism that two photoelectric detectors correspond to one-bit pseudo-random code, and can directly read absolute position information without a complex discrimination mechanism in the range that the error is not more than 1/4 period. The method of the invention does not need to search the first bit of the pseudo-random code, and the code reading mechanism is simpler and faster.

Description

Pseudo-random code and increment code synchronization method
Technical Field
The invention belongs to the technical field of angle measurement, and particularly relates to a method for synchronizing pseudo-random codes and incremental codes.
Background
The double-code-channel absolute photoelectric encoder based on the pseudo-random code has the advantages of quick response, simplicity, reliability, easiness in implementation and the like of an incremental encoder, can directly output an absolute position like an absolute encoder, and effectively solves the problems of position information loss, accumulated error and the like after power failure.
Pseudo-random code coding is not a true absolute code, so in the practical application process, a complex algorithm is needed to find the first bit of the code, and then the code reading and decoding are performed in sequence.
Meanwhile, due to the time delay of the pseudo-random code reading mode, real-time synchronization with the incremental code cannot be really realized. Under the condition of high resolution of the incremental code, the pseudo-random code and the incremental code are easily matched to generate errors due to system errors, and the precision of the code is objectively limited.
Disclosure of Invention
The invention aims to provide a method for synchronizing a pseudo-random code and an incremental code, which aims to overcome the defects existing in the prior art when the pseudo-random code and the incremental code are matched at the same time.
The invention is realized by the following technical scheme:
a photoelectric encoder for pseudo-random code and incremental code matched encoding comprises a light source 1, a code disc 2, a slit 3, a photoelectric detector array 4 and a signal processing circuit 5; the light source 1 generates parallel light, the parallel light sequentially passes through the code disc 2 and the slit 3, moire fringes produced by bright and dark carving of the pseudo-random code channel 21 and the incremental code channel 22 are projected onto the photoelectric detector array 4 positioned below the slit 3, then the photoelectric detector array 4 receives and converts light signals into electric signals, finally the signals collected by the photoelectric detector array 4 are amplified and processed by the signal processing circuit 5, and two paths of square wave signals A and B and two sets of serial level signals M and N are output.
Further, the code wheel 2 includes a random code channel 21 with irregular arrangement of light and dark and an increment code channel 22 with alternate light and dark, wherein a set of light and dark increment codes corresponds to a random code with light or dark.
Further, the slit 3 comprises a window which is completely transparent and a window which is arranged between light and shade; wherein, the window which is completely transparent corresponds to the pseudo random code detector array 41 in the photodetector array 4, and the windows with alternate light and shade correspond to the incremental code detector array 42 in the photodetector array 4.
Further, the photodetector array 4 includes an incremental code detector array 42 and a pseudo-random detector array 41, in which the incremental code detector array 42 is formed by sequentially arranging a plurality of a, b, c, and d detectors, and the pseudo-random detector array 41 is formed by sequentially arranging a plurality of m and n detectors.
The A path of square wave signals are serial signals corresponding to all the a detectors, and the B path of square wave signals are serial signals corresponding to all the B detectors.
A method for synchronizing pseudo-random code and increment code includes the following steps:
step one, a signal processing circuit outputs two paths of square wave signals A and B, and the difference is 1/4 period (wherein A is a square wave signal converted from a sine signal, and B is a square wave signal converted from a cosine signal);
determining the reading selection of m and n groups of pseudo random code signals by judging the high and low levels of the A path of signals;
if the A path signal is in high level, reading signals (from left to right) corresponding to all the M photoelectric detectors, and serially outputting an analog signal M;
if the A path signal is in low level, reading signals (from left to right) corresponding to all the N photoelectric detectors, and serially outputting an analog signal N;
step three, carrying out level (high and low levels) and shift (whether to shift one bit to the left) judgment on the serial output analog signal M or N;
if the output is an analog signal M, converting the analog signal M into a digital signal, and directly outputting the result as absolute angle position information;
if the output is an analog signal N, the fourth step needs to be executed;
and step four, converting the analog signal N into a digital signal, and outputting a result obtained by shifting the digital signal to the left by one bit as absolute angle position information.
The pseudo-random code and incremental code synchronization method does not relate to the design of specific circuits and systems.
The principle of the method for synchronizing the pseudo random code and the incremental code is as follows:
one bit of pseudo-random code element on code disc corresponds to a bright and dark area of increment code, i.e. M and N bits are high or low level signals equal to a sine signal period of increment code. When the sine signal is just around 0 deg., the A signal is at the rising edge, there may be two possibilities of "high" or "low", if judged as "high", then the M signal is read in the interval of 0-180 deg. according to the sine signal as the absolute position information at that time, otherwise the N signal is read in the interval of 180-360 deg. according to the sine signal and the shifted absolute position information is selected. Therefore, the pseudo random code and the sine signal are corresponding to each other based on the sine signal. The same holds true for the fact that the pseudo-random code read out corresponds to the sinusoidal signal when it is exactly around 180.
When the phase error of the sine signal is caused by uneven carving of the code wheel and the like, according to the synchronous matching method, the condition that the exposure or the shading is incomplete exists in the photoelectric detector corresponding to the pseudo-random code, but in the practical situation, the phase error of the sine signal cannot exceed 1/4 cycle (the condition that the brightness is 50% respectively), so that the amplitude of the read signal can be judged to determine the corresponding pseudo-random code.
Compared with the prior art, the invention has the following advantages:
(1) the position relation of a code disc and a photoelectric detector is judged by adopting a sine signal interval, and pseudo-random code information is directly read, so that a simple and efficient method for synchronizing the pseudo-random code and the incremental code is provided;
(2) the mechanism that two photoelectric detectors correspond to one-bit pseudo-random code is adopted, and the absolute position information can be directly read without a complex discrimination mechanism in the range that the error is not more than 1/4 period;
(3) compared with the traditional method, the method does not need to search the first bit of the pseudo-random code, and has simpler code reading mechanism and higher speed.
Drawings
FIG. 1 is a schematic structural diagram of an optical-electrical encoder system for encoding pseudo-random codes and incremental codes in cooperation according to the present invention;
FIG. 2 is a schematic diagram of the code wheel and detector array relationship of the photoelectric encoder system of the present invention;
FIG. 3 is a flow chart of a synchronization method of a pseudo-random code and incremental code cooperative encoding photoelectric encoder system according to the present invention;
FIG. 4 is a schematic diagram showing the positional relationship between a code wheel and a photodetector array in embodiment 1 of the present invention;
FIG. 5 is a schematic diagram showing the positional relationship between a code wheel and a photodetector array in embodiment 2 of the present invention;
FIG. 6 is a schematic diagram showing the positional relationship between the code wheel and the photodetector array in embodiment 3 of the present invention;
FIG. 7 is a schematic diagram showing the positional relationship between the code wheel and the photodetector array in embodiment 4 of the present invention;
in the figure: the device comprises a light source 1, a code disc 2, a slit 3, a photoelectric detector array 4, a signal processing circuit 5, a pseudo-random code channel 21, an incremental code channel 22, a pseudo-random detector array 41 and an incremental detector array 42.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
Example 1
As shown in fig. 1, a photoelectric encoder system for pseudo-random code and incremental code cooperative encoding comprises a light source 1, a code disc 2, a slit 3, a photoelectric detector array 4 and a signal processing circuit 5; the light source 1 generates parallel light, the parallel light sequentially passes through the code wheel 2 and the slit 3, light and shade patterns of the pseudo-random code channel 21 and moire fringes produced by the incremental code channel 22 are projected onto the photoelectric detector array 4 positioned below the slit 3, the photoelectric detector array 4 receives and converts optical signals into electric signals, and finally the signal processing circuit 5 controls the electric detector array to finish signal output.
As shown in fig. 2, the corresponding relationship between the code wheel 2 and the electric detector array 4 in the present invention is: the two detectors m and n correspond to one symbol (light or dark) of the pseudo-random code channel 21; a. the four detectors b, c and d correspond to one moire cycle produced by the incremental code track 22 and the incremental slit windowing.
FIG. 4 is a schematic diagram showing the positional relationship between the code wheel 2 and the photodetector array 4 at the present time according to embodiment 1. As shown in the figure, the absolute position of the encoder is in the interval of 0-180 degrees of 10100110. The signal synchronization matching procedure proposed according to fig. 3: firstly, the signal level of a is judged to be high, the serial square wave signal M collected by the M detectors is selected to be read, the serial square wave signal M is converted into a digital signal of 10100110, the absolute angular position of the code wheel is 10100110 at the moment, and the situation is consistent with the situation of the position of the pseudo random code channel 21 in fig. 4.
Example 2
FIG. 5 is a schematic diagram showing the positional relationship between the code wheel 2 and the photodetector array 4 at the present time according to embodiment 2. As shown in the figure, the absolute position of the encoder is in the interval of 180-360 degrees of 10100110. The signal synchronization matching procedure proposed according to fig. 3: firstly, judging that the signal level A is low, selectively reading a serial square wave signal N acquired by an N detector, and converting the serial square wave signal N into a digital signal 01001100; then, the absolute position information 101000110 is read by shifting left by one. The absolute position of the encoder is now 101000110, corresponding to the position of the pseudo-random code channel 21 in FIG. 5.
Example 3:
FIG. 6 is a schematic diagram showing the positional relationship between the code wheel 2 and the photodetector array 4 at the present time according to embodiment 3. As shown in the figure, when the absolute position of the encoder is around 0 ° of 10100110, the a signal (a detector array output signal) output by the signal processing circuit 5 is at a rising edge, and the judgment level is high or low, which is a random event.
Assuming that the determination level is high, according to the signal synchronization matching step proposed in fig. 3, first, the signal level a is determined to be high, the serial square wave signal M collected by the M detectors is selected to be read, converted into a digital signal 10100110, and the absolute position information 10100110 is directly read out. The absolute position of the encoder is now 0 at 101000110, corresponding to the position of the pseudo-random code channel 21 in fig. 5.
Assuming that the determination level is low, according to the signal synchronization matching procedure proposed in fig. 3, first, the signal level a is determined to be low, the serial square wave signal N collected by the N detectors is selected to be read, converted into a digital signal of 10100110, and then shifted to the left by one bit, so as to read out the absolute position information 01010011. The absolute encoder position is now 360 at 01010011, which coincides with the 0 true position at 101000110.
As described above, it can be seen that the same situation is also true when the code wheel 2 rotates clockwise, and two types of reading modes of the pseudo random code channel 21 are generated when the signal a is in the jump moment, but the absolute position information read finally is consistent, and the practicability and feasibility of the method are not affected.
Example 4:
FIG. 7 is a schematic diagram showing the positional relationship between the code wheel 2 and the photodetector array 4 at the present time according to embodiment 4. As shown in the figure, the absolute position of the encoder is in the interval of 180-360 degrees of 10100110. However, the moire fringes received by the incremental detector 42 are shifted to the left due to the error, so that the a signal output from the signal processing circuit 5 is at a high level, and the dotted line portion in fig. 7 represents the output of the two sets of signals a and B in the positional relationship between the real code wheel 2 and the photodetector array 4. Considering that errors in the depiction of the code wheel 2 and other systematic errors may cause the signals output by the two sets A and B to be biased, the signals output by the two sets A and B are shown as solid lines in FIG. 7 (the signals of the two sets A and B have been biased to the left).
According to the signal synchronization matching procedure proposed in fig. 3, first, it is determined that the signal level a is low, the signal N collected by the N detectors is selected to be read, converted into a digital signal of 10100110, and then shifted to the left by one bit, and the absolute position information 01010011 is read. Corresponding to the left side of the position of pseudo-random code channel 21 in fig. 6.
In this case, when an error occurs in the a signal (offset to the left), the read pseudo random code channel 21 is also the wrong position (one bit wrong to the left), so that a perfect step matching of the incremental code pseudo random code is ensured. Meanwhile, according to the situation shown in fig. 6, it can be found that M or N is effectively selected by the method to be read only under the condition of complete exposure or shielding; in addition, the A signal has an error within a range of not more than 1/4 of a cycle, and even if M and N are misread, the read "0" or "1" can be determined by judgment.
The invention is applied to the actual working environment, most of the conditions are described in the embodiment 1-and the embodiment X and the embodiment Y are only in the state under the extremely special condition; in the case of embodiment Y, the error in a causes the pseudo random code to read the wrong code, but still maintains a perfect step match of the delta code pseudo random code, and is not considered to deviate from the synchronization method described in the present invention.

Claims (1)

1. A method for synchronizing pseudo-random code and increment code is characterized by comprising the following steps:
step one, a signal processing circuit outputs two paths of square wave signals A and B, and the difference is 1/4 period;
determining the reading selection of m and n groups of pseudo-random code signals by judging the high and low levels of the A path of square wave signals; the incremental code detector array is formed by sequentially arranging a plurality of detectors a, b, c and d, and the pseudo-random code detector array is formed by sequentially arranging a plurality of detectors m and n; the path A square wave signals are serial signals corresponding to all the detectors a, and the path B square wave signals are serial signals corresponding to all the detectors B;
if the A path of square wave signals are high level, reading signals corresponding to all M detectors, and serially outputting an analog signal M;
if the square wave signal of the A path is at a low level, reading signals corresponding to all N detectors, and serially outputting an analog signal N;
step three, carrying out level and shift judgment on the serial output analog signal M or N;
if the output is an analog signal M, converting the analog signal M into a digital signal, and directly outputting the result as absolute angle position information;
if the output is an analog signal N, the fourth step needs to be executed;
and step four, converting the analog signal N into a digital signal, and outputting a result obtained by shifting the digital signal to the left by one bit as absolute angle position information.
CN201810710673.4A 2018-07-03 2018-07-03 Pseudo-random code and increment code synchronization method Expired - Fee Related CN108827353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810710673.4A CN108827353B (en) 2018-07-03 2018-07-03 Pseudo-random code and increment code synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810710673.4A CN108827353B (en) 2018-07-03 2018-07-03 Pseudo-random code and increment code synchronization method

Publications (2)

Publication Number Publication Date
CN108827353A CN108827353A (en) 2018-11-16
CN108827353B true CN108827353B (en) 2020-06-02

Family

ID=64133587

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810710673.4A Expired - Fee Related CN108827353B (en) 2018-07-03 2018-07-03 Pseudo-random code and increment code synchronization method

Country Status (1)

Country Link
CN (1) CN108827353B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114413941A (en) * 2021-12-29 2022-04-29 歌尔光学科技有限公司 Photocell detection system, code control method, processing chip, device, and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101592468A (en) * 2009-06-25 2009-12-02 广州中国科学院工业技术研究院 Ring addressing method and system for pseudo-random code displacement sensor
CN101750108A (en) * 2008-12-17 2010-06-23 菲高合作社 Absolute position encoder
CN101782405A (en) * 2010-01-26 2010-07-21 中国科学院光电技术研究所 Hardware real-time verification method and system based on pseudo-random coding displacement sensor
CN102183266A (en) * 2011-03-22 2011-09-14 中国科学院光电技术研究所 Physical extraction method and system of pseudo-random coded signal
CN102788602A (en) * 2012-08-09 2012-11-21 上海微泓自动化设备有限公司 Quasi absolute type optical encoder
CN108027259A (en) * 2015-09-22 2018-05-11 三菱电机株式会社 Absolute type encoder

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101750108A (en) * 2008-12-17 2010-06-23 菲高合作社 Absolute position encoder
CN101592468A (en) * 2009-06-25 2009-12-02 广州中国科学院工业技术研究院 Ring addressing method and system for pseudo-random code displacement sensor
CN101782405A (en) * 2010-01-26 2010-07-21 中国科学院光电技术研究所 Hardware real-time verification method and system based on pseudo-random coding displacement sensor
CN102183266A (en) * 2011-03-22 2011-09-14 中国科学院光电技术研究所 Physical extraction method and system of pseudo-random coded signal
CN102788602A (en) * 2012-08-09 2012-11-21 上海微泓自动化设备有限公司 Quasi absolute type optical encoder
CN108027259A (en) * 2015-09-22 2018-05-11 三菱电机株式会社 Absolute type encoder

Also Published As

Publication number Publication date
CN108827353A (en) 2018-11-16

Similar Documents

Publication Publication Date Title
CN108362208B (en) Pseudo-random code channel grating ruler and reading method thereof
JP5021244B2 (en) Displacement detection encoder
US7013575B2 (en) Position measuring device
CN111366178B (en) Code disc, light detector, encoder and code value output, error detection and error correction method
JP2015090307A (en) Encoder, motor with the encoder, servo system, method for processing signals of the encoder
CN102788602B (en) Quasi-absolute optical encoder
JP2009075111A (en) Position measuring device
CN108827353B (en) Pseudo-random code and increment code synchronization method
EP2963393B1 (en) Absolute encoder
Bahn et al. Digital optoelectrical pulse method for Vernier-type rotary encoders
JP6149740B2 (en) Absolute encoder
US20150377654A1 (en) Method and System for Estimating Positions Using Absolute Encoders
KR20130129079A (en) Digital opto-electrical pulse application method for correcting bit error of vernier-type optical encoder
JP6413102B2 (en) Optical encoder
JP2011226864A (en) Optical absolute position length-measurement type encoder
CN110132327B (en) Photoelectric encoder
CN111307187B (en) Rapid zero-finding microminiature incremental angle sensor and measuring method thereof
JP2004144667A (en) Positional information anomaly detector
CN109443402A (en) Code disc and encoder
JP2007024878A (en) Method of determining absolute angle state of steering wheel of automobile
JP6182729B2 (en) Optical encoder
JPH0545929Y2 (en)
US20140145071A1 (en) Absolute encoder and method of obtaining absolute position
CN115112156B (en) Photoelectric coding method and device for identifying angular position of digital wheel
CN111076760B (en) Method for correcting coarse code of absolute code disc

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
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200602

Termination date: 20210703