Method for determining position information of encoder, encoder and servo motor
By adding a second track to the encoder code disk, acquiring sine and cosine signals and square wave signals, and calculating the absolute and vernier position values, the problem of low detection accuracy of the encoder under high scribe line density is solved, achieving higher scribe line density and accuracy.
Patent Information
- Application Number
- CN202410957081.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2026-01-27
AI Technical Summary
Existing encoders are susceptible to assembly errors and signal noise when the scribing density is high, leading to position calculation errors and low detection accuracy.
A second track is added to the encoder's code disk as a vernier track. By acquiring the sine and cosine signals of the first track and the square wave signal of the second track, the absolute position expression value and the vernier position expression value are calculated, thereby increasing the scribe line density.
Without reducing the size of the engraving lines, the detection accuracy of the encoder is significantly improved, and the effects of assembly errors and signal noise are reduced.
Smart Images

Figure CN121409299A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of encoder technology, and more specifically, to a method for determining the position information of an encoder, an encoder, and a servo motor. Background Technology
[0002] In related technologies, an encoder is an angle sensor used to obtain the position of a motor rotor. The encoder's code disk generally includes a main code track (M track) and a vernier code track (N track). Since the total number of lines in the M track and the N track differs by 1, let the electrical signal value of the M track be Um and the electrical signal value of the N track be Un. Therefore, Um-Un is unique at any position, and the position can be calculated through Um-Un.
[0003] When the scribing density is high, the difference between Um and Un will be very small. Under the influence of assembly errors and signal noise, it is easy to cause position calculation errors, resulting in low detection accuracy of the encoder. Summary of the Invention
[0004] This application aims to address at least one of the technical problems existing in the prior art or related technologies.
[0005] Therefore, the first aspect of this application proposes a method for determining the position information of an encoder.
[0006] The second aspect of this application proposes an encoder.
[0007] A third aspect of this application proposes a servo motor.
[0008] In view of the above, the first aspect of this application provides a method for determining the position information of an encoder. The encoder includes a code disk, which includes a first code track and a second code track. The determination method includes: acquiring a first electrical signal of the first code track and a second electrical signal of the second code track; wherein the first electrical signal is a sine / cosine signal and the second electrical signal is a square wave signal; determining an absolute position expression value corresponding to the first electrical signal and a vernier position expression value corresponding to the second electrical signal; and determining the current position information of the code disk based on the absolute position expression value and the vernier position expression value.
[0009] In this technical solution, an encoder is used to acquire angular information of a rotating object; exemplarily, it acquires the position information of a motor rotor. The encoder includes a code disk. For example, taking the detection of the motor rotor's position information by the encoder, the code disk is coaxially arranged with the motor rotor and rotates synchronously with it. The code disk has a first code track and a second code track. The first code track includes a main code track with multiple graduations. The second code track is a vernier code area track; exemplarily, this application defines the second code track as the C code track.
[0010] For example, both the first code channel and the second code channel are circular code channels, and the first code channel and the second code channel are concentrically arranged.
[0011] As the code disk rotates synchronously with the motor rotor, the encoder's photoelectric sensor obtains a first electrical signal by detecting the first code track and a second electrical signal by detecting the second code track. For example, the first electrical signal is specifically a sine and a cosine signal, that is, it includes one sine and one cosine electrical signal, and the second electrical signal is specifically a square wave signal. Therefore, a sine signal value and a cosine signal value can be obtained from the first electrical signal, and encoded information can be obtained from the second electrical signal; for example, this encoded information is Gray code.
[0012] By setting up a new second code track as the cursor area code track, assuming the number of second code tracks is n, the original code disk can be evenly divided into 2... n A repeating vernier code segment is equivalent to increasing the number of lines in the original first code track from 1 to 2. n times.
[0013] When calculating position information, an absolute position expression value is determined based on the first electrical signal of the first code channel, and a vernier position expression value is determined based on the second electrical signal of the second code channel. This absolute position expression value indicates a unique position within a vernier code segment, while the vernier position expression value indicates a position within a given range. n By combining the absolute position expression value and the vernier position expression value of a unique vernier code segment among all vernier code segments, a unique expression value can be obtained under all mechanical angles of the rotor, thus obtaining the code disk, that is, the current position information of the rotor.
[0014] The technical solution of this application increases the number of markings from 1 to 2 by setting a new second code channel and calculating the position information using the first electrical signal of the first code channel and the second electrical signal of the second code channel. n This allows for an increase in the number of scribe lines without reducing the size of the scribe lines, thereby increasing the scribe line density, reducing the impact of assembly errors and signal noise, and improving the detection accuracy of the encoder.
[0015] In addition, the method for determining the encoder position information in the above-mentioned technical solution provided in this application may also have the following additional technical features:
[0016] In some technical solutions of this application, optionally, the number of second code channels is n, and the second electrical signal includes n signal values corresponding one-to-one with the n second code channels, where n is a positive integer; determining the absolute position expression value corresponding to the first electrical signal and the vernier position expression value corresponding to the second electrical signal includes:
[0017] The encoder determines the arctangent value of the first electrical signal; determines the absolute position expression value based on the arctangent value; and determines the corresponding encoding information based on the n signal values of the second electrical signal; and determines the vernier position expression value based on the encoding information. The encoder includes 2... n Each cursor segment represents a cursor position value indicating the encoder's 2... n One of the vernier segments.
[0018] In this technical solution, the code disk is provided with a first code track and n second code tracks (hereinafter referred to as C code tracks). The encoder's photoelectric sensor detects the first code track to obtain a first electrical signal, which is a sine and cosine signal. For example, at a certain point in time, the first electrical signal includes a sine signal value and a cosine signal value.
[0019] For example, each of the n C-code tracks includes at least one detection unit, and the detection units on the n C-code tracks are staggered. The photoelectric sensor of the encoder can obtain n signal values by detecting the n C-code tracks. These n signal values correspond one-to-one with the n C-code tracks, and the n electrical signals constitute the aforementioned second electrical signal.
[0020] For example, since the first electrical signal is a sine and cosine signal, by calculating the arctangent value of the signal value of the first electrical signal, the first electrical signal can be converted from a sine and cosine signal into a linear signal. By calculating the linear signal, the expression values of the low-position region and the middle-position region can be obtained, and the absolute position expression value can be obtained.
[0021] For example, the absolute position expression value is determined by looking up the arctangent value in the table.
[0022] For example, since the second electrical signal is a square wave signal, the encoded information consisting of n binary numbers of 0 or 1 can be obtained based on the n signal values of the second electrical signal, that is, a Gray code, thereby obtaining the cursor position expression value.
[0023] For example, the cursor position expression value is determined by looking up the above-mentioned encoded information in a table.
[0024] Because n second code tracks are set, the original code disk is divided into 2... n The repeated cursor code segment changes the absolute position representation from pointing to a position on the code disk to pointing to a position within a cursor code segment. Therefore, by combining the absolute position representation and the cursor position representation, the original number of markings can be amplified from 1 to 2. n This increases the density of the engraving lines and improves the detection accuracy of the encoder.
[0025] In some technical solutions of this application, optionally, the first code channel includes an M code channel, an N code channel, and an S code channel; determining the absolute position expression value based on the arctangent value includes: determining the first bit region expression value based on the arctangent value of the M code channel; determining the second bit region expression value based on the arctangent values of the N code channel and the S code channel; and concatenating the first bit region expression value and the second bit region expression value to obtain the absolute position expression value.
[0026] In this technical solution, the first code track includes M-track, N-track, and S-track. For example, M-track, N-track, and S-track are all coaxially arranged circular code tracks, and each second code track is coaxially arranged with the aforementioned M-track, N-track, and S-track. Taking the encoder for detecting the motor rotor position as an example, the second code track is defined as the C-track. The code disk is coaxially arranged with the motor rotor, so the code disk rotates coaxially with the rotor. The M-track, N-track, S-track, and all C-tracks on the code disk rotate coaxially with the motor rotor. Whenever the motor rotor rotates to a specific angular position, the signal of the C-track can indicate a fixed vernier code segment, while the signals of the M-track, N-track, and S-track can indicate a fixed angle within the current vernier code segment, thereby achieving accurate detection of the motor rotor angle.
[0027] Let the signal values corresponding to channel M in the first electrical signal include the sine signal value UMsinθ and the cosine signal value UMcosθ. Determine the arctangent value of channel M based on the signal values of channel M. Arctangent value based on M-code channel Determine the expression value of the first region
[0028] Similarly, suppose that in the first electrical signal, the signal values corresponding to the N-channel include the sine signal value UNsinθ and the cosine signal value UNcosθ, and the signal values corresponding to the S-channel include the sine signal value USsinθ and the cosine signal value UScosθ. Determine the arctangent value of the N-channel based on the signal values of the N-channel and the S-channel respectively. And the arctangent value of the S-code channel The second bit region expression value is obtained by using the vernier principle.
[0029] Express the value of the first region Second region expression value After splicing, the result is That is, the absolute position expression value mentioned above.
[0030] in, This indicates that the expression values of the first and second regions are concatenated in sequence. For ease of understanding, it is assumed here that... It is 10. If the value is 20, then the spliced result is... It is "1020".
[0031] The technical solution of this application obtains the absolute position expression value by calculating the first electrical signal and the vernier position expression value by calculating the second electrical signal, thereby increasing the scribing density without reducing the scribing lines, and thus improving the detection accuracy of the encoder.
[0032] In some technical solutions of this application, optionally, determining the arctangent value of the signal value of the first electrical signal includes: obtaining the sine signal value and cosine signal value corresponding to the first electrical signal; and determining the arctangent value of the signal value of the first electrical signal based on the sine signal value and cosine signal value.
[0033] In this technical solution, the first electrical signal is a sine and cosine signal, wherein the signal value of the first electrical signal at the same time includes a sine signal value and a cosine signal value. Let the sine signal value be Usinθ and the cosine signal value be Ucosθ, then the arctangent value of the first electrical signal can be calculated using the following formula (1):
[0034]
[0035] in, Usinθ is the arctangent of the first electrical signal, Usinθ is the sine signal value of the first electrical signal, and Ucosθ is the cosine signal value of the first electrical signal.
[0036] For example, the first code channel includes an M-channel, an N-channel, and an S-channel. Taking the signal values of the M-channel as including a sine signal value UMsinθ and a cosine signal value UMcosθ as an example, the arctangent value of the M-channel is...
[0037] Similarly, the arctangent value of N code channels can be calculated in the same way. arctangent value of S code channel
[0038] The embodiments of this application obtain the absolute position expression value by calculating the arctangent value of the first electrical signal, which can improve the calculation efficiency of position detection.
[0039] In some technical solutions of this application, optionally, determining the current position information of the code disk based on the absolute position expression value and the cursor position expression value includes: concatenating the absolute position expression value and the cursor position expression value to obtain the target expression value; and determining the current position information of the code disk based on the target expression value.
[0040] In this technical solution, the first code channel is assumed to include M code channel, N code channel, and S code channel, wherein the arctangent value of the signal value of the M code channel is... Based on Determine the expression value of the low-order region by referring to the table, which is the expression value of the first region mentioned above. Similarly, the arctangent value of the signal value of the N-channel is The arctangent of the signal value of the S-channel is Based on and The median expression value, i.e., the expression value of the second region mentioned above, is obtained by applying the standard principle.
[0041] Then for and By concatenating the data, the absolute positional values can be obtained. This absolute position expression value can indicate a unique absolute position within a vernier code segment.
[0042] Since the technical solution of this application divides the original code disk into n repeating vernier code areas by setting n second code tracks, the corresponding vernier position expression value can be obtained according to the encoding information of the second electrical signal. The vernier position expression value can indicate the unique vernier code area among the n vernier code areas.
[0043] For example, assuming that each of the n second code channels can be sampled to obtain an encoded value of 1 or 0, then a unified encoding method is used to obtain the encoded information of the n second code channels. The encoding information can be obtained by looking up the table. Corresponding cursor bit region expression value
[0044] After obtaining the absolute position expression value and the expression value of the free scale region Afterwards, by splicing the data, a unique target representation value that expresses the entire mechanical angle can be obtained. Let the target representation value be... but
[0045] For example, the entire code channel is divided into n equal parts by the second code channel, and n constitutes the highest bit region of the absolute position, log₂n. Assuming there are 4 second code channels, i.e., n = 4, the second code channel divides the vernier code into 8 to 16 repeated parts. Taking the division of the vernier code into 8 repeated parts as an example, each vernier code region has a unique code, so the vernier code representation value of the highest bit region is log₂16 = 4 bits. Assuming the ADC (Analog to Digital Converter) used is 12 bits... That's 12 bits. The M track of the code disk has 2048 lines, divided into 16 equal parts, each with 256 lines. This is further subdivided using sine and cosine subdivision. That's 11 bits. So the value at that position... That is, it can be expressed using 26-bit values.
[0046] The technical solution of this application increases the calculation of the pairing angle value from two parts to three parts by adding a second code channel, thus increasing the number of parts. In the high-level region, the original vernier relationship of MN=1 in the position calculation is transformed into a multi-repeating vernier segment relationship of MN=n, resulting in a larger difference in MN, more accurate calculated values, and improved product precision. Because the vernier lines are repeating segments, the calibration area can be reduced during calibration, calibration time can be shortened, and production efficiency can be improved.
[0047] A second aspect of this application provides an encoder, comprising: a code disk including a first code track and n second code tracks; a light source disposed on a first side of the code disk for emitting light signals to the code disk; and a photoelectric detection unit disposed on a second side of the code disk for generating a first electrical signal when light signals passing through the first code track are detected, and generating a second electrical signal when light signals passing through the second code tracks are detected; wherein the first electrical signal is a sine / cosine signal, and the second electrical signal is a square wave signal.
[0048] In this technical solution, the encoder includes a code disk, a light source, and a photoelectric detection unit. Taking the encoder for acquiring the rotor angle of a motor as an example, the code disk is connected to the rotor and rotates synchronously with the rotor. The code tracks on the code disk form a specific pattern. The light source emits light towards the code disk, thereby projecting the pattern of the code disk onto the photoelectric detection unit. Exemplarily, the light source can project the pattern of the code disk onto the photoelectric detection unit through transmission or reflection, thereby causing the photoelectric detection unit to generate a corresponding electrical signal.
[0049] Among them, the electrical signal generated by the light passing through the first code channel is the first electrical signal, and the electrical signal generated by the light passing through the second code channel is the second electrical signal.
[0050] For example, the technical solution of this application defines the second code track as the C code track, which is a newly added code track. As a new vernier code track, the second code track can divide the code disk, primarily the first code track, into multiple vernier code segments. Both the first and second code tracks are circular code tracks. The code disk is coaxially arranged with the motor rotor, thus rotating coaxially with the rotor. Whenever the motor rotor rotates to a specific angular position, the second electrical signal of the C code track can indicate a fixed vernier code segment, while the first electrical signal of the first code track can indicate a fixed angle within the current vernier code segment, thereby achieving accurate detection of the motor rotor angle.
[0051] For example, the number of second code channels (hereinafter referred to as C code channels) is at least two, and the detection units on at least two C code channels are misaligned.
[0052] For example, assuming there are n C-tracks, then the C-tracks can divide the code disk into 2 equal parts. n In position detection, the corresponding vernier code segment is obtained by encoding the C code channel. Then, the first electrical signal is encoded to obtain the absolute position value of that vernier code segment. At this point, the absolute position value changes from an angle corresponding to the entire code disk to an angle within a single vernier code segment. Therefore, compared to existing technologies, the technical solution of this application effectively increases the number of engraving lines by 2. n times.
[0053] For example, the photodetector is a photosensitive element. For example, the photodetector is a photovoltaic cell.
[0054] This application embodiment designs a novel code disk by adding a second code track as a new vernier code track. This vernier code track divides the code disk into multiple repeating vernier code segments, thus transforming the original M and N code tracks into similarly multiple repeating vernier code segments. By encoding the electrical signal of the second code track, the repeating vernier code segments can be distinguished, thereby achieving absolute positioning of the code disk. This increases the number of markings on the original M and N code tracks from 1 to 2. n This increases the encoder's detection accuracy by several times, thus effectively improving the encoder's accuracy.
[0055] In some technical solutions of this application, n is optionally a positive integer greater than or equal to 3; wherein, each second code track is provided with at least one etched section, and in the circumferential direction of the code disk, the etched sections on any two second code tracks are at least partially misaligned, and the photoelectric detection section is used to detect the etched sections to obtain a second electrical signal.
[0056] In this technical solution, n is a positive integer greater than or equal to 3, meaning the number of second code channels is 4 or more. Let M be the electrical signal output from detecting M code channels, and N be the electrical signal output from detecting N code channels. Position detection is then performed using the values of MN. Therefore, n C code channels can divide the code disk into 2 equal parts. n For each vernier code segment, during position detection, the corresponding vernier code segment can be obtained by encoding the C code channel. Then, by encoding MN, the MN value under that vernier code segment can be obtained, thus amplifying the value of MN by 2. n times.
[0057] Here, the second code channel is defined as the C code channel. The etched sections on at least three C code channels are misaligned. The photoelectric detection unit outputs a high level when it detects the etched section and a low level when it does not detect the etched section. Therefore, the final signal value of the second electrical signal includes a signal value composed of multiple high and low levels, which results in a square wave signal.
[0058] For example, the etched lines on the second code track are defined as etched sections, and the angle between the center line of one etched section on one second code track and the center line of one etched section on another adjacent second code track is defined as a first angle, and the first angle satisfies a preset condition.
[0059] For example, the preset condition is: α = 90° ÷ C; where α is the first angle and C is a positive integer.
[0060] For example, in n second code tracks, the maximum number of etched lines located on the same second code track is m, and m and n satisfy the following relationship: m ≥ (2 n ÷4).
[0061] For example, in a second code track, the number of etched portions is one and the length of the etched portion is half the circumference of the second code track; and / or, in a second code track, the number of etched portions is at least two, and the at least two etched portions are evenly spaced apart.
[0062] For example, the number of second code tracks is three, and the three second code tracks include a first sub-code track, a second sub-code track, and a third sub-code track arranged sequentially from the outer circle to the inner circle; wherein, the first sub-code track includes two engraved sections, which are arranged opposite to each other; the second sub-code track includes one engraved section, which at least partially overlaps with one engraved section on the first sub-code track in the radial direction of the code disk; the third sub-code track includes one engraved section, and the center line of the engraved section on the third sub-code track is perpendicular to the center line of one engraved section on the second sub-code track.
[0063] For example, the number of second code tracks is four, and the four second code tracks include a first sub-code track, a second sub-code track, a third sub-code track, and a fourth sub-code track arranged sequentially from the outer circle to the inner circle; wherein, the first sub-code track includes four engraved sections, and the four engraved sections on the first sub-code track are evenly spaced; the second sub-code track includes two engraved sections, and the two engraved sections on the second sub-code track are arranged opposite each other, and the two engraved sections on the second sub-code track at least partially overlap with the two engraved sections arranged opposite each other on the first sub-code track in the radial direction of the code disk; the third sub-code track includes one engraved section, and the engraved section on the third sub-code track at least partially overlaps with the engraved section on the second sub-code track in the radial direction of the code disk; the fourth sub-code track includes one engraved section, and the center line of the engraved section on the fourth sub-code track is perpendicular to the center line of the engraved section on the third sub-code track.
[0064] In some technical solutions of this application, optionally, the first code channel includes an M code channel, an N code channel, and an S code channel; wherein, the arctangent value of the first electrical signal corresponding to the M code channel is used to determine the first bit region expression value, the arctangent values of the first signals corresponding to the N code channel and the S code channel are used to determine the second bit region expression value, the first bit region expression value and the second bit region expression value can be spliced together to obtain the absolute position expression value, the absolute position expression value is used to combine with the vernier position expression value corresponding to the second electrical signal to obtain the current position information of the code disk.
[0065] In this technical solution, the first code channel includes an M code channel, an N code channel, and an S code channel, wherein the M code channel is the main code channel, the N code channel is the vernier code channel, and the S code channel is the segment code channel. For example, the M code channel, N code channel, and S code channel are coaxially arranged.
[0066] Let the signal values corresponding to channel M in the first electrical signal include the sine signal value UMsinθ and the cosine signal value UMcosθ. Determine the arctangent value of channel M based on the signal values of channel M. Arctangent value based on M-code channel Determine the expression value of the first region
[0067] Similarly, suppose that in the first electrical signal, the signal values corresponding to the N-channel include the sine signal value UNsinθ and the cosine signal value UNcosθ, and the signal values corresponding to the S-channel include the sine signal value USsinθ and the cosine signal value UScosθ. Determine the arctangent value of the N-channel based on the signal values of the N-channel and the S-channel respectively. And the arctangent value of the S-code channel The second bit region expression value is obtained by using the vernier principle.
[0068] Express the value of the first region Second region expression value After splicing, the result is That is, the absolute position expression value mentioned above.
[0069] in, This indicates that the expression values of the first and second regions are concatenated in sequence. For ease of understanding, it is assumed here that... It is 10. If the value is 20, then the spliced result is... It is "1020".
[0070] Optionally, in some technical solutions of this application, the encoder may further include: a signal processing unit electrically connected to the photoelectric detection unit for receiving electrical signals generated by the photoelectric detection unit; a light source driving unit electrically connected to the light source unit; and a controller electrically connected to the signal processing unit and the light source driving unit for controlling the light source driving unit to drive the light source unit to emit light signals, and determining the current position information of the code disk based on the absolute position expression value and the vernier position expression value.
[0071] In this technical solution, the signal processing unit and the controller can form the encoder's calculation unit. By processing and calculating the electrical signal generated by the photoelectric detection unit, the current code disk, i.e., the unique angle of the rotor, is obtained. The light source driving unit is electrically connected to the light source unit. For example, the light source unit can be a light-emitting diode. The light source driving unit can drive the light-emitting diode of the light source unit to emit light at a specific frequency. When the light shines on the photoelectric detection unit, it can form an electrical signal.
[0072] For example, the signal processing unit, the light source driving unit, and the controller can be fixed on the PCB (Printed Circuit Board) of the stator of the motor.
[0073] For example, the controller may integrate algorithm units such as a position calculation unit and a data compensation and fusion unit to improve the accuracy of position calculation, as well as a light source control unit to control the light source driving unit.
[0074] For example, the encoder also includes a power supply unit and a signal conversion unit, the power supply unit being used to power other components, and the signal conversion unit being able to convert analog signals into digital signals.
[0075] For example, the encoder also includes a data storage unit and a data output unit.
[0076] A third aspect of this application provides a servo motor, which includes an encoder as provided in any of the above-described technical solutions; and a motor shaft, wherein the code disk of the encoder is connected to the motor shaft. This servo motor also includes all the beneficial effects of the encoder provided in any of the above-described technical solutions, and to avoid repetition, these will not be described further here. Attached Figure Description
[0077] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0078] Figure 1 The following are schematic diagrams of the encoder structure according to some embodiments of this application;
[0079] Figure 2The diagram shows a schematic representation of the encoder disk according to some embodiments of this application;
[0080] Figure 3 A flowchart illustrating a method for determining encoder position information according to some embodiments of this application is shown;
[0081] Figure 4 The diagram shows waveforms of the first electrical signal according to some embodiments of this application;
[0082] Figure 5 The diagram shows waveforms of the second electrical signal according to some embodiments of this application;
[0083] Figure 6 Waveform diagrams of linear signals from some embodiments of this application are shown;
[0084] Figure 7 A schematic diagram of position detection signals according to some embodiments of this application is shown;
[0085] Figure 8 Flowcharts illustrating location information calculation methods according to some embodiments of this application are shown;
[0086] Figure 9 The diagram shows a structural block diagram of a location information determination device according to some embodiments of this application;
[0087] Figure 10 A structural block diagram of a location information determination device according to some embodiments of this application is shown.
[0088] Figure label:
[0089] 100 Encoder, 102 Code disk, 1022 First code track, 1024 Second code track, 10242 Engraving section, 104 Light source section, 106 Photoelectric detection section, 108 Signal processing unit, 110 Light source drive unit, 112 Controller; 202 Motor shaft. Detailed Implementation
[0090] To better understand the above-mentioned objectives, features, and advantages of this application, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0091] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, this application may also be implemented in other ways different from those described herein. Therefore, the scope of protection of this application is not limited to the specific embodiments disclosed below.
[0092] The following reference Figures 1 to 10This application describes a method for determining encoder position information, an encoder, and a servo motor according to some embodiments thereof.
[0093] In some embodiments of this application, a method for determining the position information of an encoder is provided. This method is applied to an encoder. Figure 1 The following are schematic diagrams of the encoder structure according to some embodiments of this application. Figure 2 The following are schematic diagrams illustrating the structure of the encoder disks according to some embodiments of this application, such as... Figure 1 and Figure 2 As shown, the encoder 100 includes a code disk 102, which includes a first code track 1022 and a second code track 1024.
[0094] Figure 3 A flowchart illustrating the determination method of some embodiments of this application is shown, such as... Figure 3 As shown, the determination method includes:
[0095] Step 302: Acquire the first electrical signal of the first code channel and the second electrical signal of the second code channel; wherein the first electrical signal is a sine / cosine signal and the second electrical signal is a square wave signal;
[0096] Step 304: Determine the absolute position expression value corresponding to the first electrical signal and the vernier position expression value corresponding to the second electrical signal;
[0097] Step 306: Determine the current position information of the encoder disk based on the absolute position expression value and the cursor position expression value.
[0098] In this embodiment, the encoder is used to acquire angular information of a rotating object; exemplarily, it acquires the position information of a motor rotor. The encoder includes a code disk. For example, taking the detection of the motor rotor's position information by the encoder as an example, the code disk is coaxially arranged with the motor rotor and rotates synchronously with it. The code disk has a first code track and a second code track. The first code track includes a main code track and has multiple graduations. The second code track is a vernier code area track; exemplarily, in this embodiment, the second code track is defined as the C code track.
[0099] For example, both the first code channel and the second code channel are circular code channels, and the first code channel and the second code channel are concentrically arranged.
[0100] As the code disk rotates synchronously with the motor rotor, the encoder's photoelectric sensor obtains a first electrical signal by detecting the first code track, and simultaneously obtains a second electrical signal by detecting the second code track. For example, Figure 4 The following diagram illustrates waveforms of the first electrical signal in some embodiments of this application, such as... Figure 4As shown, the first electrical signal is specifically a sine and a cosine signal, that is, it includes a sine electrical signal and a cosine electrical signal, and the second electrical signal is specifically a square wave signal. Therefore, a sine signal value and a cosine signal value can be obtained from the first electrical signal.
[0101] For example, Figure 5 The following are waveform diagrams of the second electrical signal according to some embodiments of this application, such as... Figure 5 As shown, the second signal is a square wave signal. An encoded information can be obtained through the second electrical signal. For example, the encoded information is Gray code.
[0102] By setting up a new second code track as the cursor area code track, assuming the number of second code tracks is n, the original code disk can be evenly divided into 2... n A repeating vernier code segment is equivalent to increasing the number of lines in the original first code track from 1 to 2. n times.
[0103] When calculating position information, an absolute position expression value is determined based on the first electrical signal of the first code channel, and a vernier position expression value is determined based on the second electrical signal of the second code channel. This absolute position expression value indicates a unique position within a vernier code segment, while the vernier position expression value indicates a position within a given range. n By combining the absolute position expression value and the vernier position expression value of a unique vernier code segment among all vernier code segments, a unique expression value can be obtained under all mechanical angles of the rotor, thus obtaining the code disk, that is, the current position information of the rotor.
[0104] This embodiment of the application, by setting a new second code track and calculating the position information using the first electrical signal of the first code track and the second electrical signal of the second code track, can increase the number of markings from 1 to 2. n This allows for an increase in the number of scribe lines without reducing the size of the scribe lines, thereby increasing the scribe line density, reducing the impact of assembly errors and signal noise, and improving the detection accuracy of the encoder.
[0105] In some embodiments of this application, optionally, the number of second code channels is n, and the second electrical signal includes n signal values corresponding one-to-one with the n second code channels, where n is a positive integer; determining the absolute position expression value corresponding to the first electrical signal and the vernier position expression value corresponding to the second electrical signal includes:
[0106] The encoder determines the arctangent value of the first electrical signal; determines the absolute position expression value based on the arctangent value; and determines the corresponding encoding information based on the n signal values of the second electrical signal; and determines the vernier position expression value based on the encoding information. The encoder includes 2... n Each cursor segment represents a cursor position value indicating the encoder's 2... nOne of the vernier segments.
[0107] In this embodiment, the code disk is provided with a first code track and n second code tracks (hereinafter referred to as C code tracks). The encoder's photoelectric sensor detects the first code track to obtain a first electrical signal, which is a sine and cosine signal. For example, at a certain point in time, the first electrical signal includes a sine signal value and a cosine signal value.
[0108] For example, each of the n C-code tracks includes at least one detection unit, and the detection units on the n C-code tracks are staggered. The photoelectric sensor of the encoder can obtain n signal values by detecting the n C-code tracks. These n signal values correspond one-to-one with the n C-code tracks, and the n electrical signals constitute the aforementioned second electrical signal.
[0109] For example, Figure 6 Waveform diagrams of linear signals from some embodiments of this application are shown, such as... Figure 6 As shown, since the first electrical signal is a sine / cosine signal, by calculating the arctangent value of the first electrical signal, it is possible to convert the first electrical signal from a sine / cosine signal into a cosine signal. Figure 6 The linear signal shown can be used to obtain the expression values of the low-order and mid-order regions, thus yielding the absolute position expression value. For example, the absolute position expression value is determined by looking up the arctangent value in a table.
[0110] For example, since the second electrical signal is a square wave signal, the encoded information consisting of n binary numbers of 0 or 1 can be obtained based on the n signal values of the second electrical signal, that is, a Gray code, thereby obtaining the cursor position expression value.
[0111] For example, the cursor position expression value is determined by looking up the above-mentioned encoded information in a table.
[0112] For example, Figure 7 Schematic diagrams of position detection signals from some embodiments of this application are shown, such as... Figure 7 As shown, the detection signals include M for channel M, N for channel N, S for channel S, and C for the C code area. The C code area comprises N channels C, corresponding to C1, C2, ..., Cn. Because n second channels are added, the original code disk is divided into 2... n The repeated cursor code segment changes the absolute position representation from pointing to a position on the code disk to pointing to a position within a cursor code segment. Therefore, by combining the absolute position representation and the cursor position representation, the original number of markings can be amplified from 1 to 2. n This increases the density of the engraving lines and improves the detection accuracy of the encoder.
[0113] In some embodiments of this application, optionally, the first code channel includes an M code channel, an N code channel, and an S code channel; determining the absolute position expression value based on the arctangent value includes: determining the first bit region expression value based on the arctangent value of the M code channel; determining the second bit region expression value based on the arctangent values of the N code channel and the S code channel; and concatenating the first bit region expression value and the second bit region expression value to obtain the absolute position expression value.
[0114] In this embodiment, the first code track includes an M-track, an N-track, and an S-track. Exemplarily, the M-track, N-track, and S-track are all coaxially arranged circular code tracks, and each second code track is coaxially arranged with the aforementioned M-track, N-track, and S-track. Taking the encoder for detecting the motor rotor position as an example, the second code track is defined as the C-track. The code disk is coaxially arranged with the motor rotor, so the code disk rotates coaxially with the rotor. The M-track, N-track, S-track, and all C-tracks on the code disk rotate coaxially with the motor rotor. Whenever the motor rotor rotates to a specific angular position, the signal of the C-track can indicate a fixed vernier code segment, while the signals of the M-track, N-track, and S-track can indicate a fixed angle within the current vernier code segment, thereby achieving accurate detection of the motor rotor angle.
[0115] Let the signal values corresponding to channel M in the first electrical signal include the sine signal value UMsinθ and the cosine signal value UMcosθ. Determine the arctangent value of channel M based on the signal values of channel M. Arctangent value based on M-code channel Determine the expression value of the first region
[0116] Similarly, suppose that in the first electrical signal, the signal values corresponding to the N-channel include the sine signal value UNsinθ and the cosine signal value UNcosθ, and the signal values corresponding to the S-channel include the sine signal value USsinθ and the cosine signal value UScosθ. Determine the arctangent value of the N-channel based on the signal values of the N-channel and the S-channel respectively. And the arctangent value of the S-code channel The second bit region expression value is obtained by using the vernier principle.
[0117] Express the value of the first region Second region expression value After splicing, the result is That is, the absolute position expression value mentioned above.
[0118] in, This indicates that the expression values of the first and second regions are concatenated in sequence. For ease of understanding, it is assumed here that... It is 10. If the value is 20, then the spliced result is... It is "1020".
[0119] The embodiments of this application obtain the absolute position expression value by calculating the first electrical signal and the vernier position expression value by calculating the second electrical signal, thereby increasing the scribing density without reducing the scribing lines, and thus improving the detection accuracy of the encoder.
[0120] In some embodiments of this application, optionally, determining the arctangent value of the signal value of the first electrical signal includes: obtaining the sine signal value and cosine signal value corresponding to the first electrical signal; and determining the arctangent value of the signal value of the first electrical signal based on the sine signal value and cosine signal value.
[0121] In this embodiment, the first electrical signal is a sine and cosine signal, wherein the signal value of the first electrical signal at the same time includes a sine signal value and a cosine signal value. Let the sine signal value be Usinθ and the cosine signal value be Ucosθ, then the arctangent value of the first electrical signal can be calculated using the following formula (1):
[0122]
[0123] in, Usinθ is the arctangent of the first electrical signal, Usinθ is the sine signal value of the first electrical signal, and Ucosθ is the cosine signal value of the first electrical signal.
[0124] For example, the first code channel includes an M-channel, an N-channel, and an S-channel. Taking the signal values of the M-channel as including a sine signal value UMsinθ and a cosine signal value UMcosθ as an example, the arctangent value of the M-channel is...
[0125] Similarly, the arctangent value of N code channels can be calculated in the same way. arctangent value of S code channel
[0126] The embodiments of this application obtain the absolute position expression value by calculating the arctangent value of the first electrical signal, which can improve the calculation efficiency of position detection.
[0127] In some embodiments of this application, optionally, determining the current position information of the encoder disk based on the absolute position expression value and the cursor position expression value includes: concatenating the absolute position expression value and the cursor position expression value to obtain a target expression value; and determining the current position information of the encoder disk based on the target expression value.
[0128] In this embodiment, the first code channel is assumed to include an M code channel, an N code channel, and an S code channel, wherein the arctangent value of the signal value of the M code channel is... Based on Determine the expression value of the low-order region by referring to the table, which is the expression value of the first region mentioned above. Similarly, the arctangent value of the signal value of the N-channel is The arctangent of the signal value of the S-channel is Based on and The median expression value, i.e., the expression value of the second region mentioned above, is obtained by applying the standard principle.
[0129] Then for and By concatenating the data, the absolute positional values can be obtained. This absolute position expression value can indicate a unique absolute position within a vernier code segment.
[0130] Since the embodiments of this application set n second code tracks, the original code disk is divided into n repeating vernier code areas, and the corresponding vernier position expression value can be obtained according to the encoding information of the second electrical signal, the vernier position expression value can indicate the unique vernier code area among the n vernier code areas.
[0131] For example, assuming that each of the n second code channels can be sampled to obtain an encoded value of 1 or 0, then a unified encoding method is used to obtain the encoded information of the n second code channels. The encoding information can be obtained by looking up the table. Corresponding cursor bit region expression value
[0132] After obtaining the absolute position expression value and the expression value of the free scale region Afterwards, by splicing the data, a unique target representation value that expresses the entire mechanical angle can be obtained. Let the target representation value be... but
[0133] For example, the entire code channel is divided into n equal parts by the second code channel, and n constitutes the highest bit region of the absolute position, log₂n. Assuming there are 4 second code channels, i.e., n = 4, the second code channel divides the vernier code into 8 to 16 repeated parts. Taking the division of the vernier code into 8 repeated parts as an example, each vernier code region has a unique code, so the vernier code representation value of the highest bit region is log₂16 = 4 bits. Assuming the ADC (Analog to Digital Converter) used is 12 bits... That's 12 bits. The M track of the code disk has 2048 lines, divided into 16 equal parts, each with 256 lines. This is further subdivided using sine and cosine subdivision. That's 11 bits. So the value at that position... That is, it can be expressed using 26-bit values.
[0134] This application embodiment increases the calculation of the pairing angle value from two parts to three parts by adding a second code channel, thus increasing the number of parts. In the high-level region, the original vernier relationship of MN=1 in the position calculation is transformed into a multi-repeating vernier segment relationship of MN=n, resulting in a larger difference in MN, more accurate calculated values, and improved product precision. Because the vernier lines are repeating segments, the calibration area can be reduced during calibration, calibration time can be shortened, and production efficiency can be improved.
[0135] In some embodiments of this application, such as Figure 1 As shown, the encoder 100 is divided into two parts: a stator and a rotor. The calculation unit is fixed on the PCB of the stator. Figure 2 As shown, the encoder disk 102 of the rotor is designed with a specific pattern. The light source projects the pattern of the encoder disk 102 onto the photocell. The photocell acts as a photosensitive element, converting the transmitted pattern of the encoder disk 102 into an electrical signal. The calculation unit processes and calculates the current angle position and outputs it.
[0136] The specially designed code disk pattern includes a C-code area. The C-code area is a coarse code track containing multiple code tracks, the number of which corresponds one-to-one with the C-code area window of the photovoltaic cell. After conversion by the photovoltaic cell, it outputs a square wave signal. The combination of multiple code tracks in the C-code area divides the vernier code track composed of M, N, and S into n repeated vernier code tracks. The specific number of n is related to the number of code tracks in the C-code area.
[0137] The remaining patterns include M-channel, N-channel, and S-channel. The M-channel and N-channel form the vernier channel, and the S-channel is its compensation channel. The M, N, and S channels are all subdivided channels, and after being converted by the photovoltaic cell, they output the sine and cosine signals of their respective channels.
[0138] The calculation unit performs comprehensive calculations on the electrical signals of the M-channel, N-channel, S-channel, and C-channel, and finally outputs the current absolute position.
[0139] The method for calculating the position of 1 / n vernier track is as follows:
[0140] The projection of the M-channel is processed by a photovoltaic cell and outputs sine and cosine signals. The sine voltage UMsinθ and cosine voltage UMcosθ at the current position are obtained by ADC sampling. The same method is used to obtain the UNsinθ, UNcosθ, USsinθ, and UScosθ at the current position of the N-channel and S-channel.
[0141] pass The acquired sine and cosine signals of M, N, and S are converted into linear signals. The corresponding low-order data of the current position is obtained by calculating the linear signals. Look up the expression values of the low-order region in the table Obtain using the same method. and The corresponding value of the median data at that position is obtained by using the vernier principle. Median expression value obtained by table lookup Bundle and By splicing the data, we obtain the current absolute position. Since its vernier has n duplicates, the current absolute position will have n identical points across the entire mechanical angle.
[0142] Obtaining the absolute position across the entire mechanical angle:
[0143] The entire code channel is divided into n equal parts by the C code area, and n constitutes the highest bit area log2n of the absolute position. Then, the electrical signal of the C code area is sampled. Multiple channels synchronously sample the signals of all code channels in the C code area. The 1 or 0 values obtained from each channel are combined, and a unified encoding method is used to obtain the unique C code area code for the current position. Look up the table to obtain the specific location expression value of the high-order region. By concatenating this value with the 1 / n cursor position value already obtained above, a unique representation of that point across the entire mechanical angle is formed.
[0144] By adding a C-code area signal, the vernier code track is divided into n repeated segments. This transforms the original vernier relationship of MN=1 in position calculation into a multi-repeated vernier segment relationship of MN=n, resulting in a larger difference in MN, more accurate calculated values, and improved product precision. Because the vernier lines are repeated segments, the calibration area can be reduced during calibration, calibration time can be shortened, and production efficiency can be improved.
[0145] For example, the entire code channel is divided into n equal parts by the second code channel, and n constitutes the highest bit region of the absolute position, log₂n. Assuming there are 4 second code channels, i.e., n = 4, the second code channel divides the vernier code into 8 to 16 repeated parts. Taking the division of the vernier code into 8 repeated parts as an example, each vernier code region has a unique code, so the vernier code representation value of the highest bit region is log₂16 = 4 bits. Assuming the ADC (Analog to Digital Converter) used is 12 bits... That's 12 bits. The M track of the code disk has 2048 lines, divided into 16 equal parts, each with 256 lines. This is further subdivided using sine and cosine subdivision. That's 11 bits. So the value at that position... That is, it can be expressed using 26-bit values.
[0146] For example, Figure 8Flowcharts illustrating location information calculation methods in some embodiments of this application are shown, such as... Figure 8 As shown, the method includes:
[0147] Step 802: Obtain the sine and cosine electrical signals of the M-channel, S-channel, and N-channel;
[0148] Step 804: Calculate the arctangent values of the M-channel, S-channel, and N-channel electrical signals;
[0149] Step 806, Calculation The low-position angle value can be obtained by looking up the table.
[0150] Step 808, Calculation Look up the midpoint angle value in the table
[0151] Step 810, sample the C code area The high-level angle value can be obtained by looking up the table.
[0152] Step 812, calculate the angle value
[0153] In some embodiments of this application, a servo motor is provided, such as Figure 1 As shown, the servo motor includes an encoder 100 as provided in any of the above technical solutions; and a motor shaft 202, with the code disk 102 of the encoder 100 connected to the motor shaft 202. This servo motor also includes all the beneficial effects of the encoder provided in any of the above technical solutions, which will not be repeated here to avoid repetition.
[0154] In some embodiments of this application, an encoder position information determination device is provided. The encoder includes a code disk, which includes a first code track and a second code track. Figure 9 Structural block diagrams of location information determination devices according to some embodiments of this application are shown, such as... Figure 9 As shown, the determining device 900 includes: an acquisition module 902, used to acquire a first electrical signal of a first code channel and a second electrical signal of a second code channel; wherein the first electrical signal is a sine / cosine signal and the second electrical signal is a square wave signal; a determining module 904, used to determine the absolute position expression value corresponding to the first electrical signal and the vernier position expression value corresponding to the second electrical signal; and to determine the current position information of the code disk based on the absolute position expression value and the vernier position expression value.
[0155] In this embodiment, the encoder is used to acquire angular information of a rotating object; exemplarily, it acquires the position information of a motor rotor. The encoder includes a code disk. For example, taking the detection of the motor rotor's position information by the encoder as an example, the code disk is coaxially arranged with the motor rotor and rotates synchronously with it. The code disk has a first code track and a second code track. The first code track includes a main code track and has multiple graduations. The second code track is a vernier code area track; exemplarily, in this embodiment, the second code track is defined as the C code track.
[0156] For example, both the first code channel and the second code channel are circular code channels, and the first code channel and the second code channel are concentrically arranged.
[0157] As the code disk rotates synchronously with the motor rotor, the encoder's photoelectric sensor obtains a first electrical signal by detecting the first code track and a second electrical signal by detecting the second code track. For example, the first electrical signal is specifically a sine and a cosine signal, that is, it includes one sine and one cosine electrical signal, and the second electrical signal is specifically a square wave signal. Therefore, a sine signal value and a cosine signal value can be obtained from the first electrical signal, and encoded information can be obtained from the second electrical signal; for example, this encoded information is Gray code.
[0158] By setting up a new second code track as the cursor area code track, assuming the number of second code tracks is n, the original code disk can be evenly divided into 2... n A repeating vernier code segment is equivalent to increasing the number of lines in the original first code track from 1 to 2. n times.
[0159] When calculating position information, an absolute position expression value is determined based on the first electrical signal of the first code channel, and a vernier position expression value is determined based on the second electrical signal of the second code channel. This absolute position expression value indicates a unique position within a vernier code segment, while the vernier position expression value indicates a position within a given range. n By combining the absolute position expression value and the vernier position expression value of a unique vernier code segment among all vernier code segments, a unique expression value can be obtained under all mechanical angles of the rotor, thus obtaining the code disk, that is, the current position information of the rotor.
[0160] This embodiment of the application, by setting a new second code track and calculating the position information using the first electrical signal of the first code track and the second electrical signal of the second code track, can increase the number of markings from 1 to 2. n This allows for an increase in the number of scribe lines without reducing the size of the scribe lines, thereby increasing the scribe line density, reducing the impact of assembly errors and signal noise, and improving the detection accuracy of the encoder.
[0161] In some embodiments of this application, optionally, the number of second code tracks is n, and the second electrical signal includes n signal values corresponding one-to-one with the n second code tracks, where n is a positive integer; the determining module is further configured to determine the arctangent value of the signal value of the first electrical signal; determine the absolute position expression value based on the arctangent value; and determine the corresponding encoding information based on the n signal values of the second electrical signal; and determine the cursor position expression value based on the encoding information; wherein, the encoder includes 2 n Each cursor segment represents a cursor position value indicating the encoder's 2... n One of the vernier segments.
[0162] In this embodiment, the code disk is provided with a first code track and n second code tracks (hereinafter referred to as C code tracks). The encoder's photoelectric sensor detects the first code track to obtain a first electrical signal, which is a sine and cosine signal. For example, at a certain point in time, the first electrical signal includes a sine signal value and a cosine signal value.
[0163] For example, each of the n C-code tracks includes at least one detection unit, and the detection units on the n C-code tracks are staggered. The photoelectric sensor of the encoder can obtain n signal values by detecting the n C-code tracks. These n signal values correspond one-to-one with the n C-code tracks, and the n electrical signals constitute the aforementioned second electrical signal.
[0164] For example, since the first electrical signal is a sine and cosine signal, by calculating the arctangent value of the signal value of the first electrical signal, the first electrical signal can be converted from a sine and cosine signal into a linear signal. By calculating the linear signal, the expression values of the low-position region and the middle-position region can be obtained, and the absolute position expression value can be obtained.
[0165] For example, the absolute position expression value is determined by looking up the arctangent value in the table.
[0166] For example, since the second electrical signal is a square wave signal, the encoded information consisting of n binary numbers of 0 or 1 can be obtained based on the n signal values of the second electrical signal, that is, a Gray code, thereby obtaining the cursor position expression value.
[0167] For example, the cursor position expression value is determined by looking up the above-mentioned encoded information in a table.
[0168] Because n second code tracks are set, the original code disk is divided into 2... n The repeated cursor code segment changes the absolute position representation from pointing to a position on the code disk to pointing to a position within a cursor code segment. Therefore, by combining the absolute position representation and the cursor position representation, the original number of markings can be amplified from 1 to 2. n This increases the density of the engraving lines and improves the detection accuracy of the encoder.
[0169] In some embodiments of this application, optionally, the first code channel includes an M code channel, an N code channel, and an S code channel; the determining module is further configured to determine the first bit region expression value based on the arctangent value of the M code channel; and to determine the second bit region expression value based on the arctangent values of the N code channel and the S code channel.
[0170] The determining device also includes a processing module for splicing the first region expression value and the second region expression value to obtain the absolute position expression value.
[0171] In this embodiment, the first code track includes an M-track, an N-track, and an S-track. Exemplarily, the M-track, N-track, and S-track are all coaxially arranged circular code tracks, and each second code track is coaxially arranged with the aforementioned M-track, N-track, and S-track. Taking the encoder for detecting the motor rotor position as an example, the second code track is defined as the C-track. The code disk is coaxially arranged with the motor rotor, so the code disk rotates coaxially with the rotor. The M-track, N-track, S-track, and all C-tracks on the code disk rotate coaxially with the motor rotor. Whenever the motor rotor rotates to a specific angular position, the signal of the C-track can indicate a fixed vernier code segment, while the signals of the M-track, N-track, and S-track can indicate a fixed angle within the current vernier code segment, thereby achieving accurate detection of the motor rotor angle.
[0172] Let the signal values corresponding to channel M in the first electrical signal include the sine signal value UMsinθ and the cosine signal value UMcosθ. Determine the arctangent value of channel M based on the signal values of channel M. Arctangent value based on M-code channel Determine the expression value of the first region
[0173] Similarly, suppose that in the first electrical signal, the signal values corresponding to the N-channel include the sine signal value UNsinθ and the cosine signal value UNcosθ, and the signal values corresponding to the S-channel include the sine signal value USsinθ and the cosine signal value UScosθ. Determine the arctangent value of the N-channel based on the signal values of the N-channel and the S-channel respectively. And the arctangent value of the S-code channel The second bit region expression value is obtained by using the vernier principle.
[0174] Express the value of the first region Second region expression value After splicing, the result is That is, the absolute position expression value mentioned above.
[0175] in, This indicates that the expression values of the first and second regions are concatenated in sequence. For ease of understanding, it is assumed here that... It is 10. If the value is 20, then the spliced result is... It is "1020".
[0176] The embodiments of this application obtain the absolute position expression value by calculating the first electrical signal and the vernier position expression value by calculating the second electrical signal, thereby increasing the scribing density without reducing the scribing lines, and thus improving the detection accuracy of the encoder.
[0177] In some embodiments of this application, the acquisition module is further configured to acquire the sine signal value and cosine signal value corresponding to the first electrical signal; the determination module is further configured to determine the arctangent value of the signal value of the first electrical signal based on the sine signal value and the cosine signal value.
[0178] In this embodiment, the first electrical signal is a sine and cosine signal, wherein the signal value of the first electrical signal at the same time includes a sine signal value and a cosine signal value. Let the sine signal value be Usinθ and the cosine signal value be Ucosθ, then the arctangent value of the first electrical signal can be calculated using the following formula (1):
[0179]
[0180] in, Usinθ is the arctangent of the first electrical signal, Usinθ is the sine signal value of the first electrical signal, and Ucosθ is the cosine signal value of the first electrical signal.
[0181] For example, the first code channel includes an M-channel, an N-channel, and an S-channel. Taking the signal values of the M-channel as including a sine signal value UMsinθ and a cosine signal value UMcosθ as an example, the arctangent value of the M-channel is...
[0182] Similarly, the arctangent value of N code channels can be calculated in the same way. arctangent value of S code channel
[0183] The embodiments of this application obtain the absolute position expression value by calculating the arctangent value of the first electrical signal, which can improve the calculation efficiency of position detection.
[0184] In some embodiments of this application, optionally, determining the current position information of the encoder disk based on the absolute position expression value and the cursor position expression value includes: concatenating the absolute position expression value and the cursor position expression value to obtain a target expression value; and determining the current position information of the encoder disk based on the target expression value.
[0185] In this embodiment, the first code channel is assumed to include an M code channel, an N code channel, and an S code channel, wherein the arctangent value of the signal value of the M code channel is... Based on Determine the expression value of the low-order region by referring to the table, which is the expression value of the first region mentioned above. Similarly, the arctangent value of the signal value of the N-channel is The arctangent of the signal value of the S-channel is Based on and The median expression value, i.e., the expression value of the second region mentioned above, is obtained by applying the standard principle.
[0186] Then for and By concatenating the data, the absolute positional values can be obtained. This absolute position expression value can indicate a unique absolute position within a vernier code segment.
[0187] Since the embodiments of this application set n second code tracks, the original code disk is divided into n repeating vernier code areas, and the corresponding vernier position expression value can be obtained according to the encoding information of the second electrical signal, the vernier position expression value can indicate the unique vernier code area among the n vernier code areas.
[0188] For example, assuming that each of the n second code channels can be sampled to obtain an encoded value of 1 or 0, then a unified encoding method is used to obtain the encoded information of the n second code channels. The encoding information can be obtained by looking up the table. Corresponding cursor bit region expression value
[0189] After obtaining the absolute position expression value and the expression value of the free scale region Afterwards, by splicing the data, a unique target representation value that expresses the entire mechanical angle can be obtained. Let the target representation value be... but
[0190] For example, the entire code channel is divided into n equal parts by the second code channel, and n constitutes the highest bit region of the absolute position, log₂n. Assuming there are 4 second code channels, i.e., n = 4, the second code channel divides the vernier code into 8 to 16 repeated parts. Taking the division of the vernier code into 8 repeated parts as an example, each vernier code region has a unique code, so the vernier code representation value of the highest bit region is log₂16 = 4 bits. Assuming the ADC (Analog to Digital Converter) used is 12 bits... That's 12 bits. The M track of the code disk has 2048 lines, divided into 16 equal parts, each with 256 lines. This is further subdivided using sine and cosine subdivision. That's 11 bits. So the value at that position... That is, it can be expressed using 26-bit values.
[0191] This application embodiment increases the calculation of the pairing angle value from two parts to three parts by adding a second code channel, thus increasing the number of parts. In the high-level region, the original vernier relationship of MN=1 in the position calculation is transformed into a multi-repeating vernier segment relationship of MN=n, resulting in a larger difference in MN, more accurate calculated values, and improved product precision. Because the vernier lines are repeating segments, the calibration area can be reduced during calibration, calibration time can be shortened, and production efficiency can be improved.
[0192] In some embodiments of this application, a device for determining location information is provided. Figure 10 Structural block diagrams of location information determination devices according to some embodiments of this application are shown, such as... Figure 10 As shown, the determining device 1000 includes: a memory 1002 for storing programs or instructions; and a processor 1004 for executing the program or instructions to implement the steps of the encoder position information determining method provided in any of the above embodiments. Therefore, it also includes all the beneficial effects of the encoder position information determining method provided in any of the above embodiments, and will not be described again here to avoid repetition.
[0193] In some embodiments of this application, a readable storage medium is provided that stores a program or instructions. When the program or instructions are executed by a processor, they implement the steps of the encoder position information determination method provided in any of the above embodiments. Therefore, it also includes all the beneficial effects of the encoder position information determination method provided in any of the above embodiments. To avoid repetition, these will not be repeated here.
[0194] In some embodiments of this application, an encoder is provided, including a location information determination device as provided in any of the above embodiments; and / or a readable storage medium as provided in any of the above embodiments. Therefore, the encoder also includes all the beneficial effects of the location information determination device as provided in any of the above embodiments and / or the readable storage medium as provided in any of the above embodiments. To avoid repetition, these will not be repeated here.
[0195] In some embodiments of this application, optionally, such as Figure 1 and Figure 2As shown, the encoder 100 further includes: a code disk 102, which is used to connect to the rotor and rotate synchronously with the rotor, the code disk 102 including a first code track 1022 and n second code tracks 1024; a light source 104, which is disposed on the first side of the code disk 102 and is used to emit light signals to the code disk 102; and a photoelectric detection unit 106, which is disposed on the second side of the code disk 102 and is used to generate a first electrical signal when a light signal passing through the first code track 1022 is detected, and to generate a second electrical signal when a light signal passing through the second code track 1024 is detected; wherein, the first electrical signal is a sine / cosine signal and the second electrical signal is a square wave signal.
[0196] In this embodiment, the encoder 100 includes a code disk 102, a light source 104, and a photoelectric detection unit 106. Taking the encoder 100 for acquiring the rotor angle of a motor as an example, the code disk 102 is connected to the rotor and rotates synchronously with the rotor. The code tracks on the code disk 102 form a specific pattern. The light source emits light towards the code disk 102, thereby projecting the pattern of the code disk 102 onto the photoelectric detection unit 106. Exemplarily, the light source can project the pattern of the code disk 102 onto the photoelectric detection unit 106 through transmission or reflection, thereby causing the photoelectric detection unit 106 to generate a corresponding electrical signal.
[0197] The electrical signal generated by the light passing through the first code channel 1022 is the first electrical signal, and the electrical signal generated by the light passing through the second code channel 1024 is the second electrical signal.
[0198] For example, in this embodiment of the application, the second code track 1024 is defined as the C code track. The second code track 1024 is a newly added code track. As a new vernier code track, the second code track 102 can divide the code disk 102, mainly the first code track 1022, into multiple vernier code segments. Both the first code track 1022 and the second code track 1024 are circular code tracks. The code disk 102 is coaxially arranged with the motor rotor, so the code disk 102 rotates coaxially with the rotor. Whenever the motor rotor rotates to a specific angular position, the second electrical signal of the C code track can indicate a fixed vernier code segment, while the first electrical signal of the first code track 1022 can indicate a fixed angle within the current vernier code segment, thereby achieving accurate detection of the motor rotor angle.
[0199] For example, the number of second code channels 1024 (hereinafter referred to as C code channels) is at least two, and the detection units on at least two C code channels are misaligned.
[0200] For example, assuming there are n C-code channels, then the C-code channels can divide the code disk 102 into 2 equal parts. nDuring position detection, the corresponding vernier code segment is obtained by encoding the C code channel. Then, the first electrical signal is encoded to obtain the absolute position value of that vernier code segment. At this point, the absolute position value changes from an angle corresponding to the overall code disk 102 to an angle within a single vernier code segment. Therefore, compared to existing technologies, this embodiment effectively increases the number of engraving lines by 2. n times.
[0201] For example, the photoelectric detection unit 106 is a photosensitive element. For example, the photoelectric detection unit 106 is a photovoltaic cell.
[0202] This application embodiment designs a completely new code disk 102, adding a second code track 1024 as a new vernier code track. This vernier code track can divide the code disk 102 into multiple repeating vernier code segments, making the original M and N code tracks also become multiple repeating vernier code segments. By encoding the electrical signal of the second code track 1024, the repeating multiple vernier code segments can be distinguished, thereby achieving absolute positioning of the code disk 102. This increases the number of markings on the original M and N code tracks from 1 to 2. n This effectively improves the detection accuracy of encoder 100 by a factor of 100.
[0203] In some embodiments of this application, optionally, such as Figure 1 and Figure 2 As shown, n is a positive integer greater than or equal to 3; wherein, each second code track 1024 is provided with at least one etched section 10242, and in the circumferential direction of the code disk 102, the etched sections 10242 on any two second code tracks 1024 are at least partially misaligned, and the photoelectric detection unit 106 is used to detect the etched sections 10242 to obtain a second electrical signal.
[0204] In this embodiment, Figure 2 Arrow A in the diagram indicates the circumference of the code disk, where n is a positive integer greater than or equal to 3, meaning the number of the second code track 1024 is 4 or more. Let M be the electrical signal output from detecting track M, and N be the electrical signal output from detecting track N. Position detection is then performed using the values of MN. Therefore, the n C code tracks can divide the code disk 102 into 2 equal parts. n For each vernier code segment, during position detection, the corresponding vernier code segment can be obtained by encoding the C code channel. Then, by encoding MN, the MN value under that vernier code segment can be obtained, thus amplifying the value of MN by 2. n times.
[0205] Here, the second code channel 1024 is defined as the C code channel. The scribe lines 10242 on at least three C code channels are misaligned. The photoelectric detection unit outputs a high level when it detects the scribe line 10242 and outputs a low level when it does not detect the scribe line 10242. Therefore, the final signal value of the second electrical signal includes a signal value composed of multiple high and low levels, that is, a square wave signal is obtained.
[0206] For example, the scribe line on the second code track 1024 is defined as scribe line portion 10242. The angle between the center line of one scribe line portion 10242 on one second code track 1024 and the center line of another scribe line portion 10242 on another adjacent second code track 1024 is a first angle. The first angle satisfies a preset condition.
[0207] For example, the preset condition is: α = 90° ÷ C; where α is the first angle and C is a positive integer.
[0208] For example, in n second code tracks 1024, the maximum number of scribe lines 10242 disposed on the same second code track 1024 is m, and m and n satisfy the following relationship: m ≥ (2 n ÷4).
[0209] For example, in a second code track 1024, the number of etched portions 10242 is one and the length of the etched portion 10242 is half the perimeter of the second code track 1024; and / or, in a second code track 1024, the number of etched portions 10242 is at least two, and the at least two etched portions 10242 are evenly spaced.
[0210] For example, the number of second code tracks 1024 is three, and the three second code tracks 1024 include a first sub-code track, a second sub-code track, and a third sub-code track arranged sequentially from the outer circle to the inner circle; wherein, the first sub-code track includes two engraved sections 10242, which are arranged opposite to each other; the second sub-code track includes one engraved section 10242, which at least partially overlaps with one engraved section 10242 on the first sub-code track in the radial direction of the code disk 102; the third sub-code track includes one engraved section 10242, and the center line of the engraved section 10242 on the third sub-code track is perpendicular to the center line of one engraved section 10242 on the second sub-code track.
[0211] For example, the number of second code tracks 1024 is four, and the four second code tracks 1024 include a first sub-code track, a second sub-code track, a third sub-code track, and a fourth sub-code track arranged sequentially from the outer circle to the inner circle; wherein, the first sub-code track includes four etched sections 10242, and the four etched sections 10242 on the first sub-code track are evenly spaced; the second sub-code track includes two etched sections 10242, and the two etched sections 10242 on the second sub-code track are arranged opposite to each other, and the two etched sections 10242 on the second sub-code track... Two engraved portions 10242 disposed opposite to the first sub-code track at least partially overlap in the radial direction of the code disk 102; the third sub-code track includes one engraved portion 10242, and the engraved portion 10242 on the third sub-code track at least partially overlaps with one engraved portion 10242 on the second sub-code track in the radial direction of the code disk 102; the fourth sub-code track includes one engraved portion 10242, and the center line of the engraved portion 10242 on the fourth sub-code track is perpendicular to the center line of one engraved portion 10242 on the third sub-code track.
[0212] In some embodiments of this application, optionally, the first code channel 1022 includes an M code channel, an N code channel, and an S code channel; wherein, the arctangent value of the first electrical signal corresponding to the M code channel is used to determine the first bit region expression value, the arctangent value of the first signal corresponding to the N code channel and the S code channel is used to determine the second bit region expression value, the first bit region expression value and the second bit region expression value can be spliced to obtain the absolute position expression value, the absolute position expression value is used to combine with the vernier position expression value corresponding to the second electrical signal to obtain the current position information of the code disk.
[0213] In this embodiment, the first code channel 1022 includes an M code channel, an N code channel, and an S code channel, wherein the M code channel is the main code channel, the N code channel is the vernier code channel, and the S code channel is the segment code channel. Exemplarily, the M code channel, N code channel, and S code channel are coaxially arranged.
[0214] Let the signal values corresponding to channel M in the first electrical signal include the sine signal value UMsinθ and the cosine signal value UMcosθ. Determine the arctangent value of channel M based on the signal values of channel M. Arctangent value based on M-code channel Determine the expression value of the first region
[0215] Similarly, suppose that in the first electrical signal, the signal values corresponding to the N-channel include the sine signal value UNsinθ and the cosine signal value UNcosθ, and the signal values corresponding to the S-channel include the sine signal value USsinθ and the cosine signal value UScosθ. Determine the arctangent value of the N-channel based on the signal values of the N-channel and the S-channel respectively. And the arctangent value of the S-code channel The second bit region expression value is obtained by using the vernier principle.
[0216] Express the value of the first region Second region expression value After splicing, the result is That is, the absolute position expression value mentioned above.
[0217] in, This indicates that the expression values of the first and second regions are concatenated in sequence. For ease of understanding, it is assumed here that... It is 10. If the value is 20, then the spliced result is... It is "1020".
[0218] In some embodiments of this application, optionally, such as Figure 1 As shown, the encoder 100 further includes: a signal processing unit 108, which is electrically connected to the photoelectric detection unit 106 and is used to receive the electrical signal generated by the photoelectric detection unit 106; a light source driving unit 110, which is electrically connected to the light source unit 104; and a controller 112, which is electrically connected to the signal processing unit 108 and the light source driving unit 110 and is used to control the light source driving unit 110 to drive the light source unit 104 to emit light signals, and to determine the current position information of the code disk 102 based on the absolute position expression value and the vernier position expression value.
[0219] In this embodiment, the signal processing unit 108 and the controller 112 can form the calculation unit of the encoder 100. By processing and calculating the electrical signal generated by the photoelectric detection unit 106, the current code disk 102, i.e., the unique angle of the rotor, is obtained. The light source driving unit 110 is electrically connected to the light source unit 104. For example, the light source unit 104 can be a light-emitting diode. The light source driving unit 110 can drive the light-emitting diode of the light source unit 104 to emit light at a specific frequency. When the light shines on the photoelectric detection unit 106, it can form an electrical signal.
[0220] For example, the signal processing unit 108, the light source driving unit 110, and the controller 112 can be fixed on the PCB (Printed circuit board) of the stator of the motor.
[0221] For example, the controller 112 may integrate algorithm units such as a position calculation unit and a data compensation fusion unit to improve the accuracy of position calculation, as well as a light source control unit to control the light source driving unit 110.
[0222] For example, the encoder 100 also includes a power supply unit and a signal conversion unit, the power supply unit being used to power other components, and the signal conversion unit being able to convert analog signals into digital signals.
[0223] For example, encoder 100 also includes a data storage unit and a data output unit.
[0224] The methods can be implemented in various ways depending on specific features and / or example applications. For example, these methods can be implemented by a combination of hardware, firmware, and / or software. For instance, in a hardware implementation, the processor can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, electronic devices, other device units for performing the functions described above, and / or combinations thereof.
[0225] A computer-readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. A computer-readable storage medium can be an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing, but is not limited thereto. A non-exhaustive list of more specific examples of computer-readable storage media includes: portable computer floppy disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable optical disc read-only memory (CD-ROM), digital universal disk (DVD), memory cards, floppy disks, encoding mechanical devices (e.g., punched cards or grooves with raised structures for recording instructions), and any suitable combination of the foregoing. The computer-readable storage medium used herein should not be construed as the transmission of signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media, or electrical signals transmitted through wires.
[0226] In the description of this application, the term "multiple" refers to two or more. Unless otherwise expressly defined, the terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. The terms "connection," "installation," "fixing," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0227] In the description of this application, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of this application. In this application, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0228] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for determining the position information of an encoder, characterized in that, The encoder includes a code disk, the code disk including a first code track and a second code track, and the determination method includes: Acquire a first electrical signal from the first code channel and a second electrical signal from the second code channel; wherein the first electrical signal is a sine / cosine signal and the second electrical signal is a square wave signal; Determine the absolute position expression value corresponding to the first electrical signal and the vernier position expression value corresponding to the second electrical signal; The current position information of the encoder is determined based on the absolute position expression value and the cursor position expression value.
2. The determination method according to claim 1, characterized in that, The number of the second code channels is n, and the second electrical signal includes n signal values that correspond one-to-one with the n second code channels, where n is a positive integer; Determining the absolute position expression value corresponding to the first electrical signal and the vernier position expression value corresponding to the second electrical signal includes: Determine the arctangent value of the signal value of the first electrical signal; The absolute position expression value is determined based on the arctangent value; and The corresponding encoding information is determined based on the n signal values of the second electrical signal; The cursor position expression value is determined based on the encoded information; wherein, the encoder includes 2 n Each cursor segment, the cursor position expression value indicating the encoder's 2 n One of the vernier segments.
3. The determination method according to claim 2, characterized in that, The first code channel includes the M code channel, the N code channel, and the S code channel; Determining the absolute position expression value based on the arctangent value includes: The first-order region expression value is determined based on the arctangent value of the M-code channel; The second bit region representation value is determined based on the arctangent value of the N-channel and the arctangent value of the S-channel. The first bit region expression value and the second bit region expression value are concatenated to obtain the absolute position expression value.
4. The determination method according to claim 2, characterized in that, Determining the arctangent value of the signal value of the first electrical signal includes: Obtain the sine and cosine signal values corresponding to the first electrical signal; Based on the sine signal value and the cosine signal value, the arctangent value of the first electrical signal is determined.
5. The determination method according to any one of claims 1 to 4, characterized in that, Determining the current position information of the encoder based on the absolute position expression value and the cursor position expression value includes: The absolute position expression value and the cursor position expression value are concatenated to obtain the target expression value; The current position information of the code disk is determined based on the target expression value.
6. An encoder, characterized in that, include: A code disk, the code disk comprising a first code track and n second code tracks; A light source is provided on the first side of the code disk and is used to emit light signals to the code disk. A photoelectric detection unit is disposed on the second side of the code disk, and is used to generate a first electrical signal when an optical signal passing through the first code track is detected, and to generate a second electrical signal when an optical signal passing through the second code track is detected; wherein, the first electrical signal is a sine / cosine signal, and the second electrical signal is a square wave signal.
7. The encoder according to claim 6, characterized in that, n is a positive integer greater than or equal to 3; Each of the second code tracks is provided with at least one etched section, and in the circumferential direction of the code disk, the etched sections on any two second code tracks are at least partially misaligned. The photoelectric detection unit is used to detect the etched sections to obtain the second electrical signal.
8. The encoder according to claim 6, characterized in that, The first code channel includes the M code channel, the N code channel, and the S code channel; Wherein, the arctangent value of the first electrical signal corresponding to the M code channel is used to determine the first bit region expression value, and the arctangent value of the first signal corresponding to the N code channel and the S code channel is used to determine the second bit region expression value. The first bit region expression value and the second bit region expression value can be concatenated to obtain the absolute position expression value. The absolute position expression value is used to combine with the vernier position expression value corresponding to the second electrical signal to obtain the current position information of the code disk.
9. The encoder according to claim 8, characterized in that, Also includes: A signal processing unit, which is electrically connected to the photoelectric detection unit, is used to receive the electrical signal generated by the photoelectric detection unit; A light source driving unit, wherein the light source driving unit is electrically connected to the light source unit; The controller, electrically connected to the signal processing unit and the light source driving unit, is used to control the light source driving unit to drive the light source to emit the light signal, and to determine the current position information of the code disk based on the absolute position expression value and the vernier position expression value.
10. A servo motor, characterized in that, include: The encoder as described in any one of claims 6 to 9; The motor shaft is connected to the encoder's code disk.
Citation Information
Patent Citations
Vernier absolute type photoelectric encoder single-turn absolute position reading device and method
CN111366177A
Vernier absolute encoder position reading method
CN114166255A
Photoelectric encoder, motor, motor detection method and computer readable storage medium
CN115790677A
Encoder scribed line compensation method and device, absolute value encoder and storage medium
CN115854927A
Single-code-channel absolute type magnetic encoder based on partition vernier principle
CN116067402A