Absolute Angle Measurement Method and Photoelectric Encoder
By using the combination of M sequence encoding and feedback function in the photoelectric encoder, the problem of insufficient absolute encoding accuracy in the field of high precision is solved, and a high-precision and miniaturized photoelectric encoder is realized, reducing production costs.
Patent Information
- Application Number
- CN202211184555.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2042-09-27
AI Technical Summary
In the fields of high-precision demand such as surveying and mapping instruments, the accuracy problem of absolute coding technology needs to be solved urgently.
The M-sequence encoding method is adopted, and a feedback function is introduced during the encoding process. The encoding pattern is obtained through the raster code disk, and the decoding feedback function is used for decoding calculation, the number of decoding calculations is recorded, and the absolute angle value is calculated based on the encoding resolution.
The accuracy of absolute angle measurement is improved, and the disadvantage of the increase in code channels with the increase in accuracy of the traditional position coding method is overcome, which realizes the high precision and miniaturization of the photoelectric encoder, and reduces production costs.
Smart Images

Figure CN115597638B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of precision surveying and mapping instruments, and particularly to an absolute angle measurement method and an optoelectronic encoder. Background Art
[0002] An optoelectronic encoder is a sensor that converts the mechanical geometric displacement on the output shaft into pulses or digital quantities through optoelectronic conversion, and is a widely used sensor at present. The optoelectronic encoder is the most basic displacement and angle measurement instrument, which uses optoelectronic technology for non-contact measurement. The optoelectronic encoder consists of a light source, a grating code disk, and photosensitive elements. Among them, the grating code disk has several rectangular holes opened on a circular plate with a certain diameter. The optoelectronic encoder can be divided into an incremental counting method and an absolute coding method according to the measurement method. The absolute coding is further divided into single-track coding and multi-track coding. Among them, the single-track absolute coding method is a popular research topic at home and abroad, which has the advantages of stable and reliable data, easy miniaturization, wide application range, low cost, and resource saving. For the single-track coding method, the current urgent problem to be solved is the accuracy problem. In fields with high accuracy requirements such as surveying and mapping instruments, the application of absolute coding technology is particularly important. Summary of the Invention
[0003] In a first aspect, this application provides an absolute angle measurement method for an optoelectronic encoder, including:
[0004] Obtaining an encoding pattern on the grating code disk of the optoelectronic encoder, where the encoding pattern carries encoding information for encoding the absolute angle based on the M sequence;
[0005] Performing decoding calculation on the encoding information of the encoding pattern by using a decoding feedback function, and recording the number of decoding calculations;
[0006] Calculating an absolute angle value according to the number of decoding calculations and a preset absolute angle encoding resolution.
[0007] In an optional implementation manner, before obtaining the encoding pattern on the grating code disk of the optoelectronic encoder, it further includes:
[0008] Storing a preset initial value in each stage of an N-stage shift register, where N is a positive integer;
[0009] If a clock signal is received, performing a feedback operation in a target register of the N-stage shift register to obtain a feedback value;
[0010] Inputting the feedback value into the first-stage shift register, and each stage of the shift register sequentially inputs the output value to the next-stage shift register from low to high until the last-stage shift register to obtain an M sequence; wherein, the code track of the grating code disk is etched according to the encoding rule corresponding to the M sequence;
[0011] Obtain the encoded pattern formed by the code tracks of the grating code disk under the illumination of a light source.
[0012] In an alternative embodiment, performing a feedback operation in a target register of the N-stage shift register to obtain a feedback value includes:
[0013] Taking the characteristic polynomial corresponding to the shift register as the primitive polynomial;
[0014] Calculating the coefficients of the primitive polynomial in the target register of the N-stage shift register to obtain a feedback value.
[0015] In an alternative embodiment, the M sequence is a periodic coding sequence with a cycle period of 2 N -1.
[0016] In an alternative embodiment, decoding and calculating the encoded information of the encoded pattern by using a decoding feedback function and recording the number of decoding calculations includes:
[0017] Determine the decoding feedback function according to the encoding feedback function used when performing the feedback operation;
[0018] Perform decoding calculation on the M sequence encoded information of the encoded pattern by using the decoding feedback function to obtain a decoded sequence;
[0019] Determine whether the decoded sequence is consistent with a preset zero-bit code;
[0020] If so, stop the decoding calculation and record the number of decoding calculations;
[0021] If not, perform decoding calculation on the M sequence encoded information again by using the decoding feedback function until the decoded sequence is consistent with the zero-bit code, and record the number of decoding calculations.
[0022] In an alternative embodiment, determining the decoding feedback function according to the encoding feedback function used when performing the feedback operation includes:
[0023] Taking the reciprocal polynomial corresponding to the primitive polynomial of the shift register as the decoding feedback function.
[0024] In an alternative embodiment, the feedback operation is an exclusive OR operation.
[0025] In an alternative embodiment, the primitive polynomial is:
[0026] f(x) = x n + c n-1 x n-1 + c n-2 x n-2 ··· + c1 x + c 0 ;
[0027] Among them, f(x) represents a primitive polynomial, x represents the independent variable, n, n - 1, n - 2, 1, 0 respectively represent the levels of each of the target registers from high to low, and C n-1 , C n-2 , C 1 , C 0 respectively represent the coefficients of each of the target registers from high to low.
[0028] In a second aspect, the present application provides an optoelectronic encoder, including an optical collimation device, a grating code disk, an optical imaging device, and a linear array CCD processing module;
[0029] The optical collimation device is used to collimate the optical signal emitted by the light source, so as to obtain the encoded pattern formed after the optical signal uniformly irradiates on the grating code disk, and the encoded pattern carries the encoded information for encoding the absolute angle based on the M sequence;
[0030] The optical imaging device is used to magnify the encoded pattern;
[0031] The linear array CCD processing module is used to perform decoding calculation on the encoded information of the obtained encoded pattern by using a decoding feedback function, and record the number of decoding calculations; and calculate the absolute angle value according to the number of decoding calculations and the preset absolute angle encoding resolution.
[0032] In an optional implementation manner, the grating code disk is a grating code disk formed after etching the code track according to the encoding rule corresponding to the M sequence.
[0033] The embodiments of the present application have the following beneficial effects:
[0034] The embodiments of the present application adopt M sequence encoding and introduce a feedback function during the M sequence encoding process, so that the optoelectronic encoder can obtain a high-precision encoded pattern, perform decoding processing on the encoded pattern to calculate the absolute angle value, and improve the absolute angle measurement accuracy; and based on the single-track absolute position encoding method of the M sequence, it overcomes the disadvantages of the traditional position encoding method that as the precision increases, the number of tracks of the grating code disk increases and it is not easy to implement in terms of technology, reduces the size of the code disk, realizes the high-precision and miniaturization of the optoelectronic encoder, and reduces the production cost. Description of the Drawings
[0035] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings required to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the protection scope of the present application. In each drawing, similar components are numbered similarly.
[0036] Figure 1 Shows a first schematic structural diagram of an optoelectronic encoder in an embodiment of the present application;
[0037] Figure 2 Shows a schematic structural diagram of a grating code disk in an embodiment of the present application;
[0038] Figure 3 Shows a second schematic structural diagram of an optoelectronic encoder in an embodiment of the present application;
[0039] Figure 4 Shows a first schematic diagram of an implementation manner of an absolute angle measurement method in an embodiment of the present application;
[0040] Figure 5 Shows a second schematic diagram of an implementation manner of an absolute angle measurement method in an embodiment of the present application;
[0041] Figure 6 Shows a schematic structural diagram of a six - stage shift register in an embodiment of the present application;
[0042] Figure 7 Shows a third schematic diagram of an implementation manner of an absolute angle measurement method in an embodiment of the present application;
[0043] Figure 8 Shows a schematic structural diagram of a four - stage shift register in an embodiment of the present application;
[0044] Figure 9 Shows an example of a correspondence table between an absolute angle value and a code in an embodiment of the present application;
[0045] Figure 10 Shows an example of a correspondence table between a code, the number of encoding and decoding calculations, and an absolute angle value in an embodiment of the present application. Detailed implementation manners
[0046] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments.
[0047] Generally, the components of the embodiments of the present application described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application claimed, but merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts belong to the scope of protection of the present application.
[0048] As used hereinafter, the terms "comprising", "having" and their cognates that can be used in various embodiments of the present application are only intended to indicate specific features, numbers, steps, operations, elements, components or combinations of the foregoing items, and should not be construed as precluding the existence or adding the possibility of one or more other features, numbers, steps, operations, elements, components or combinations of the foregoing items.
[0049] In addition, the terms "first", "second", "third", etc. are only used for differentiating descriptions and cannot be construed as indicating or implying relative importance.
[0050] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art to which the various embodiments of the present application belong. The terms (such as those defined in a commonly used dictionary) will be construed to have the same meaning as the contextual meaning in the relevant technical field and will not be construed to have an idealized meaning or an overly formal meaning unless clearly defined in the various embodiments of the present application.
[0051] Please refer to Figure 1 , this embodiment provides an optoelectronic encoder, which includes an optical collimation device 10, a grating code disk 20, an optical imaging device 30, and a linear array CCD processing module 40.
[0052] Exemplarily, the optical collimation device 10 is used to collimate the optical signal emitted by the light source so that the optical signal uniformly irradiates the grating code disk 20 (hereinafter may be simply referred to as the code disk); the grating code disk is used to generate an encoded pattern with absolute angle information according to the optical signal by using the M-sequence coding method; the optical imaging device 30 is used to magnify the encoded pattern; the linear array CCD processing module 40 is used to perform decoding calculation on the M-sequence coding information in the obtained magnified encoded pattern by using a decoding feedback function until the sequence obtained after decoding is consistent with a preset zero-bit code, record the number of decoding calculations, and perform a product operation on the number of decoding calculations and a preset absolute angle coding resolution to obtain an absolute angle value.
[0053] It can be understood that the light emitted by the light source forms parallel light after being collimated by the optical collimation device 10. When the parallel light passes through the absolute code tracks etched on the grating code disk 20 according to the coding rules corresponding to the M-sequence, since there are light-transmitting and light-blocking parts arranged regularly on each code track, light-transmitting and light-blocking bright and dark stripe patterns, that is, encoded patterns (as Figure 2 shown) are formed. The optical imaging device 30 images and magnifies the encoded pattern, and the linear array CCD processing module 40 performs decoding processing on the obtained magnified encoded pattern to obtain the absolute position corresponding to the grating code disk 20.
[0054] In addition, as Figure 3 shown, the grating code disk 20 is fixedly installed on the metal rod 50 by bolts, and taking the metal rod 50 as the rotation center, the grating code disk 20 can rotate around the rotation center, and its rotation center is on the same axis as the center of the grating code disk 20, and the encoded patterns obtained at different rotation angles are different.
[0055] Based on the above optoelectronic encoder, please refer to Figure 4 , this embodiment also provides an absolute angle measurement method, including:
[0056] S100, obtaining the encoded pattern on the grating code disk of the optoelectronic encoder, where the encoded pattern carries encoded information for encoding the absolute angle based on the M sequence.
[0057] S200, performing decoding calculation on the encoded information of the encoded pattern by using a decoding feedback function, and recording the number of decoding calculations.
[0058] S300, calculating the absolute angle value according to the number of decoding calculations and the preset absolute angle encoding resolution.
[0059] The optoelectronic encoder obtains the encoded pattern formed by the light source irradiating on the grating code disk through the grating code disk; then, a decoding feedback function is used to perform decoding calculation on the encoded information in the encoded pattern until the sequence obtained after decoding is consistent with the preset zero-bit encoding, and the number of decoding calculations is recorded, and the absolute angle value is obtained by performing a product operation according to the preset absolute angle encoding resolution and the number of decoding calculations.
[0060] Among them, the absolute code track is etched on the surface of the circular glass of the grating code disk. The absolute code track is encoded by the M sequence. This absolute angle encoding has the characteristic of pseudo-randomness. The design of this absolute angle encoding depends on the shift register that generates this absolute angle encoding. When the light source is collimated by an optical collimation device and then irradiates on the code track of the grating code disk, an encoded pattern of light and dark can be generated. The encoded pattern of light and dark can be converted into a corresponding digital quantity for representation. For example, the optical signal output by the light-transmitting part of the code disk is represented by the digital quantity "1", and the optical signal output by the light-impermeable part of the code disk is represented by the digital quantity "0". Thus, the encoded pattern of light and dark can be correspondingly converted into a digital sequence of "0" and "1" alternating. Furthermore, the digital sequence can be decoded until the decoded sequence obtained after decoding is consistent with the preset zero-bit encoding.
[0061] Further, please refer to Figure 5 , this embodiment specifically further includes the following steps:
[0062] S400, store a preset initial value in each stage of the N-stage shift register, where N is a positive integer.
[0063] S500, if a clock signal is received, perform a feedback operation in the target register of the N-stage shift register to obtain a feedback value.
[0064] S600, input the feedback value into the first-stage shift register, and each stage of the shift register sequentially inputs the output value to the next-stage register from low to high until the last-stage register to obtain an M sequence; wherein, etch the code track of the grating code disk according to the coding rule corresponding to the M sequence.
[0065] S700, obtain the coding pattern formed by the code track of the grating code disk under the illumination of a light source.
[0066] In this embodiment, through an N-stage shift register (linear feedback shift register), a feedback network composed of several shift registers in the N-stage shift register that perform feedback operations, and a clock signal, an M sequence can be generated, and the M sequence is a coding sequence. The coding principle is as follows: store a preset initial value in each stage of the N-stage shift register and wait for the corresponding clock signal to perform a shift coding operation according to the clock signal, where N is a positive integer. Among them, the N-stage shift register also includes a shift register participating in the feedback operation, that is, the target register. The target register inputs the feedback value after the feedback operation into the first-stage shift register, and the output value in each stage of the shift register is used as the input value and input into the next-stage shift register until the last-stage shift register. The output of the last-stage shift register is a periodic coding sequence with a cycle of 2 N -1. After 2 N -1 clock signals, a periodic coding sequence (M sequence) with a length of 2 N -1 is output.
[0067] Further, etch the code track of the grating code disk according to the coding rule corresponding to the M sequence, that is, etch the code track of the grating code disk using the M sequence coding rule. After etching, on each code track of the grating code disk, there are parts of light transmission and non-light transmission arranged according to a certain rule, so that when the code track is irradiated by a light source, the absolute angle can be encoded based on the M sequence to obtain coding information, and then a coding pattern including the coding information is generated correspondingly; the coding pattern is a stripe pattern of light and dark.
[0068] For example, as Figure 6As shown, there is a six - stage shift register. The shift register is given an initial value from low to high in sequence: 101001. Among them, the sixth - stage, fifth - stage, third - stage, and second - stage shift registers participate in the feedback operation, that is, the sixth - stage, fifth - stage, third - stage, and second - stage shift registers are the target registers for performing the feedback operation. The clock signal triggers each target register to store the operation result (feedback value) of its feedback operation in the first - stage shift register. The output value of each stage of the shift register is input to the next - stage shift register. The output value of the sixth - stage shift register is directly output as the symbol of the coding sequence, and finally a coding sequence with a cycle of 2 6 ^6 - 1 = 63 is obtained: 101001111110100000111000010010001101100101101011101111001100010.
[0069] In this embodiment, the feedback operation performed by the target register is an exclusive - or operation. For the target shift registers in the six - stage shift register, the coding feedback function referred to when performing the feedback operation is: f(x)=(2, 3, 5, 6). When performing M - sequence coding, the characteristic polynomial corresponding to the decoding feedback function of the shift register is the primitive polynomial, specifically: f(x)=x 6 ^6 + x 5 ^5 + x 3 ^3 + x 2 ^2 + 1. Calculate the coefficients of the primitive polynomial in the target registers of the N - stage shift register to obtain the feedback value. The target register inputs the feedback value to the first - stage shift register, and the output value in each stage of the shift register is used as the input value and input to the next - stage shift register. The value in the last - stage register is directly output. After 2 N ^6 - 1 clock high - pulse signals, a periodic sequence with a length of 2 N ^6 - 1 is output to obtain the M - sequence coding. That is, by completing the solution of the coefficients of the primitive polynomial, the absolute - angle coding can be realized, thereby generating the M - sequence coding information.
[0070] Furthermore, since the code track reflecting the angle coding is etched on the grating code disk, through its light - transmitting and non - light - transmitting characteristics, it represents "0" and "1" in the coding respectively. Furthermore, the values of the coefficients of the characteristic polynomial have only two cases, namely "0" or "1", that is, whether this stage of the register participates in the feedback operation. Therefore, the primitive polynomial required for coding is the primitive polynomial in the binary field.
[0071] It can be understood that the primitive polynomial is f(x)=x n ^6 + c n-1 x n-1 ^5 + c n-2 x n-2 ··· + c 1 x + c0 ; f(x) represents a primitive polynomial, x represents the independent variable, n, n - 1, n - 2, 1, 0, etc. respectively represent the levels of target registers from high to low, and C n-1 , C n-2 , C 1 , C 0 respectively represent the coefficients of target registers from high to low. For example, for a six - stage shift register, its primitive polynomial is f(x) = x 6 +x 5 +x 3 +x 2 +1.
[0072] In one embodiment, as Figure 7 shown, step S200 of this embodiment further specifically includes the following steps:
[0073] S210, determine the decoding feedback function according to the coding feedback function used in the execution of the feedback operation;
[0074] S220, use the decoding feedback function to perform decoding calculation on the M - sequence coding information of the coding pattern to obtain a decoding sequence;
[0075] S230, determine whether the decoding sequence is consistent with the preset zero - bit coding;
[0076] S240, if the decoding sequence is consistent with the zero - bit coding, stop the decoding calculation and record the number of decoding calculations;
[0077] S250, if the decoding sequence is not consistent with the preset zero - bit coding, use the decoding feedback function to perform another decoding calculation on the M - sequence coding information until the decoding sequence is consistent with the zero - bit coding, and record the number of decoding calculations.
[0078] Since the opposite polynomial of a primitive polynomial is still a primitive polynomial; if the coefficients of a pair of polynomials are reciprocal to each other, then this pair of polynomials is a reciprocal polynomial. Based on this principle, the decoding of absolute - angle coding can be realized, that is, the decoding process is performed on the M - sequence coding information corresponding to the coding pattern formed by the grating code disk. Specifically, determine the decoding feedback function corresponding to the inverse polynomial of the polynomial used in M - sequence coding, perform operations on the M - sequence coding information according to the logic of the decoding feedback function to obtain a decoding sequence, and record the number of decoding calculations. Repeat the above steps in this way until the decoding sequence is the same as the preset zero - bit coding. Multiply the number of decoding calculations by the preset absolute - angle coding resolution to obtain the absolute - angle value corresponding to the current M - sequence coding information. Among them, the absolute - angle coding resolution is determined by the number of levels of the shift register used in coding.
[0079] Specifically, according to the coding feedback function (the polynomial used during coding), determine the corresponding decoding feedback function. Additionally, first determine whether the coding sequence corresponding to the current M-sequence coding information is consistent with the preset zero-bit coding. If it is consistent, stop the decoding calculation to calculate the absolute angle value. If it is inconsistent, use the decoding feedback function to perform decoding calculation on the M-sequence coding information to obtain a decoded sequence until the obtained decoded sequence is consistent with the zero-bit coding, and record the number of decoding calculations to calculate the corresponding absolute angle value.
[0080] For example, as Figure 8 shown, taking the primitive polynomial f(x) = x 4 + x 3 + 1 as an example, construct a four-stage shift register for generating M-sequence coding. Sequentially assign a preset initial value of 1100 to each stage of the shift register from low to high. Among them, the third and fourth stages of the shift register are the target registers for performing feedback operations. After passing through the last stage of the shift register, the finally output coding sequence is: 001101011110001. According to the preset coding and angle position correspondence table as Figure 9 shown, its corresponding angle resolution is 24°. Assume that the currently read coding is a 4 a 3 a 2 a 1 , and the feedback function selected for decoding is The entire decoding process is as follows:
[0081] (1) Compare a 4 a 3 a 2 a 1 with the zero-bit coding. If it is inconsistent, execute step (2);
[0082] (2) Extract the lowest three bits of the currently read coding. The highest bit of the coding (a 4 ) is calculated by the decoding feedback function and added to the highest bit of the coding, that is, combine the highest bit of the coding calculated by the decoding feedback function with the original lowest three bits of the coding to form a new coding, record the number of decoding calculations, and repeat step (1);
[0083] (3) After repeating steps (1) and (2), if the obtained new coding is consistent with the zero-bit, multiply the number of decoding calculations by the absolute angle coding resolution determined according to the number of stages of the shift register used. The product result is the absolute angle value corresponding to the currently read coding.
[0084] It can be understood that in step (2) of this decoding process, if the shift register used during coding is an N-stage shift register, assume that the currently read coding is an …a 4 a 3 a 2 a 1 , the lower n - 1 bits of the currently read code are extracted, and the highest bit of the code (a n ) is calculated by the decoding feedback function corresponding to the N - stage shift register. The calculated highest bit and the original lower n - 1 bits of the code are combined to form a new code, and the number of decoding calculations is recorded.
[0085] As Figure 10 shown, the value obtained by multiplying the number of decoding calculations by the corresponding absolute angle coding resolution is the absolute angle value corresponding to the M - sequence coding information read on the current grating code disk.
[0086] The absolute angle measurement method provided by the embodiments of the present application uses M - sequence coding for the optoelectronic encoder, introduces a feedback function during the coding process, and a new code is obtained every time the code moves one bit backward. It has certain advantages in absolute angle measurement, improving the absolute angle measurement accuracy; and based on the single - track absolute position coding of the M - sequence, it overcomes the disadvantages of the traditional position coding that the number of tracks of the grating code disk increases with the improvement of accuracy and is not easy to implement in terms of technology, reduces the size of the code disk, and realizes the high - precision and miniaturization of the optoelectronic encoder; in addition, the number of stages of the feedback shift register in this embodiment determines the size of the absolute angle coding resolution. The higher the resolution, the higher the measurement accuracy. Therefore, feedback shift registers with different numbers of stages can be selected according to requirements to achieve measurement requirements with different resolutions. The higher the number of stages, the higher the resolution, thereby effectively improving the measurement accuracy of the absolute angle and realizing high - resolution measurement.
[0087] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in alternative implementations, the functions marked in the blocks can occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0088] In addition, in each embodiment of the present application, the various functional modules or units can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.
[0089] If the above functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0090] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application.
Claims
1. An absolute angle measurement method, characterized in that, for an optoelectronic encoder, it includes: Obtaining the coding pattern on the grating code disk of the optoelectronic encoder, where the coding pattern carries coding information for encoding the absolute angle based on the M sequence; the M sequence is determined based on the feedback value obtained by the target register of the N-stage shift register performing a feedback operation after receiving a clock signal; Performing decoding calculation on the coding information of the coding pattern using a decoding feedback function, and recording the number of decoding calculations; wherein, according to the coding feedback function used by the target register of the N-stage shift register when performing a feedback operation after receiving a clock signal, the decoding feedback function is determined; performing iterative decoding calculation on the M sequence coding information of the coding pattern using the decoding feedback function to obtain a decoding sequence; when the decoding sequence is consistent with a preset zero-bit coding, recording the number of decoding calculations; Calculating the absolute angle value according to the number of decoding calculations and a preset absolute angle coding resolution.
2. The absolute angle measurement method according to claim 1, characterized in that, Before obtaining the coding pattern on the grating code disk of the optoelectronic encoder, it further includes: Storing a preset initial value in each stage of the N-stage shift register, where N is a positive integer; If a clock signal is received, performing a feedback operation in the target register of the N-stage shift register to obtain a feedback value; Inputting the feedback value into the first-stage shift register, and each stage of the shift register sequentially inputs the output value to the next-stage shift register from low to high until the last-stage shift register to obtain an M sequence; wherein, etching the code track of the grating code disk according to the coding rule corresponding to the M sequence; Obtaining the coding pattern formed by the code track of the grating code disk under the irradiation of a light source.
3. The absolute angle measurement method according to claim 2, characterized in that, Performing a feedback operation in the target register of the N-stage shift register to obtain a feedback value includes: Taking the characteristic polynomial corresponding to the shift register as a primitive polynomial; Calculating the coefficients of the primitive polynomial in the target register of the N-stage shift register to obtain a feedback value.
4. The absolute angle measurement method according to claim 2, characterized in that, The M sequence is a periodic coding sequence with a cycle period of 2 N -1.
5. The absolute angle measurement method according to claim 2, characterized in that, Recording the number of decoding calculations when the decoding sequence is consistent with a preset zero-bit coding includes: Judging whether the decoding sequence is consistent with a preset zero-bit coding; If so, stopping the decoding calculation and recording the number of decoding calculations; If not, performing a re-decoding calculation on the M sequence coding information using the decoding feedback function until the decoding sequence is consistent with the zero-bit coding, and recording the number of decoding calculations.
6. The absolute angle measurement method according to claim 5, characterized in that, Determining the decoding feedback function according to the coding feedback function used when performing the feedback operation includes: Taking the inverse polynomial corresponding to the primitive polynomial of the shift register as the decoding feedback function.
7. The absolute angle measurement method according to claim 2, characterized in that, The feedback operation is an exclusive OR operation.
8. The absolute angle measurement method according to claim 3, characterized in that, the primitive polynomial is: f(x) = x n + c n-1 x n-1 + c n-2 x n-2 ··· + c 1 x + c 0 ; Among them, f(x) represents a primitive polynomial, x represents the independent variable, n, n - 1, n - 2, 1, 0 respectively represent the levels of each of the target registers from high to low, C n-1 , C n-2 , C 1 , C 0 respectively represent the coefficients of each of the target registers from high to low.
9. An optoelectronic encoder, characterized in that, it includes an optical collimation device, a grating code disk, an optical imaging device, and a linear array CCD processing module; the optical collimation device is used to collimate the optical signal emitted by the light source to obtain an encoded pattern formed after the optical signal uniformly irradiates the grating code disk, and the encoded pattern carries encoded information for encoding the absolute angle based on the M sequence; the M sequence is determined based on the feedback value obtained by the target register of the N-stage shift register performing a feedback operation after receiving a clock signal; the optical imaging device is used to magnify the encoded pattern; the linear array CCD processing module is used to perform decoding calculation on the encoded information of the obtained encoded pattern by using a decoding feedback function and record the number of decoding calculations; wherein, the decoding feedback function is determined according to the encoding feedback function used when the target register of the N-stage shift register performs a feedback operation after receiving a clock signal; the M sequence encoded information of the encoded pattern is iteratively decoded by using the decoding feedback function to obtain a decoded sequence; when the decoded sequence is consistent with a preset zero-bit code, the number of decoding calculations is recorded; and the absolute angle value is calculated according to the number of decoding calculations and a preset absolute angle encoding resolution.
10. The optoelectronic encoder according to claim 9, characterized in that, the grating code disk is a grating code disk formed by etching the code track according to the encoding rule corresponding to the M sequence.
Citation Information
Patent Citations
Pseudo random code shaft angle measuring device
CN2583635Y