An angle determination method and apparatus, and a terminal device
By using multiple readers to merge or interpolate in the photoelectric encoder, the problems of high difficulty and high cost in manufacturing high-precision code disks are solved, achieving the effect of improving angle measurement accuracy and reducing costs without increasing the number of code tracks.
Patent Information
- Application Number
- CN202210007484.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-04
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2042-01-04
AI Technical Summary
In existing photoelectric encoders used in mechanical rotating lidar, the high-precision code disks are difficult and costly to manufacture, making it difficult to meet the requirements for angular measurement accuracy.
At least two code readers are used to read the angle information, and the rotation angle is determined by merging or interpolation, which reduces the requirement for the accuracy of the code disk and improves the accuracy of angle measurement.
Without increasing the number of code tracks, it effectively improves angle measurement accuracy, reduces reading errors, lowers the accuracy requirements for code disk and motor rotation, and reduces costs.
Smart Images

Figure CN116429153B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of optoelectronic technology, and in particular to an angle determination method, apparatus, and terminal equipment. Background Technology
[0002] An optical encoder is an electronic device that converts the mechanical geometric displacement of an output shaft into pulses or digital signals through photoelectric conversion. Currently, optical encoders are widely used in various angle measurement and control schemes. A typical optical encoder usually includes a light source, a code disk, and a photoelectric sensor. The code disk typically has evenly arranged small holes. The light beam emitted by the light source passes through these holes and illuminates the photoelectric sensor, generating a pulse signal. This pulse signal can be sent to a data processing device to determine the rotational speed of the code disk and the current angular orientation. The code disk typically has a zero-degree position, which serves as a reference for the code disk's angular orientation.
[0003] Mechanical rotating lidar can detect surrounding objects by rotating 360°. To pinpoint the lidar's rotation angle in real time, an optical encoder is needed to measure the angle and determine the laser's emission and reception directions. Mechanical lidar can achieve a horizontal angular resolution of 0.1°. However, using 0.1° as the code disk's scale interval results in excessively high precision, increased manufacturing difficulty, and higher costs.
[0004] There is an urgent need for a method to determine the angle that can reduce the requirement for the accuracy of the encoder, and allow the use of a low-precision encoder to meet the angle measurement accuracy requirements of lidar. Summary of the Invention
[0005] The technical problem solved by this invention is to provide an angle determination method, apparatus, and terminal equipment that can reduce the requirement for code disk accuracy and effectively improve angle measurement accuracy without increasing the number of code tracks.
[0006] To address the aforementioned technical problems, embodiments of the present invention provide an angle determination method, comprising: using a code disk and at least two code readers to read angle information, wherein an interval is set between the at least two code readers, the interval being an integer multiple or a non-integer multiple of the width of a single code track on the code disk, and the code track width being the angle value corresponding to the code track; and determining a rotation angle based on the angle information read by the at least two code readers.
[0007] Optionally, the reading angle information by the code reader includes: determining the interval angle between the zero-position code reader and other code readers, wherein the zero-position code reader is the code reader located at a set zero-degree position among the at least two code readers; the code reader determines the code disk reading based on the angle information pulse signal it reads and the width of each code track of the code disk; and reading the angle information based on the interval angle and the code disk reading.
[0008] Optionally, the interval between the at least two barcode readers is a non-integer multiple of the width of a single barcode track; determining the rotation angle based on the angle information read by the at least two barcode readers includes: merging the angle information pulse signals read by the at least two barcode readers to obtain a merged pulse signal; and determining the rotation angle based on the angle information corresponding to the merged pulse signal.
[0009] Optionally, the positional interval between the at least two code readers is an integer multiple of the width of a single code track; the reading angle information by the code reader further includes: obtaining a preset precision, the preset precision being less than the width of a single code track; calculating a preset interpolation angle within each code track based on the angle information and the preset precision; and adding the preset interpolation angle to the angle information.
[0010] Optionally, determining the rotation angle based on the angle information read by at least two barcode readers includes: the at least two barcode readers respectively acquire angle information; and taking the average of the angle information acquired by the at least two barcode readers at a certain rotation orientation to determine the rotation angle at that orientation.
[0011] Optionally, at least one pair of readers in the reader is spaced 180° apart.
[0012] Optionally, before the reader reads the angle information, the method further includes: determining the width of each code track on the code disk.
[0013] Optionally, determining the width of each code track includes: measuring a portion of the code track width of the code disk; determining the ratio of the reading time of an unmeasured code track to that of a measured code track at the same rotation speed to obtain a code track width ratio; and determining the width of all code tracks based on the measured portion of the code track width and the code track width ratio.
[0014] Optionally, determining the width of each code track includes: obtaining the rotation speed of the same code track at different rotation positions; fitting a speed-time curve based on the rotation speed; obtaining the reading duration and reading time of other code tracks; determining the speed fitting value of the reading time of a certain code track based on the speed-time curve, and using the product of the speed fitting value and the reading duration of the code track as the width of the code track.
[0015] To address the aforementioned technical problems, this invention provides an angle determination device, comprising: a reading module for acquiring angle information; wherein the reading module includes a code disk and at least two code readers, with a gap between the at least two code readers, the gap being an integer multiple or a non-integer multiple of the width of a single code track on the code disk, and the code track width being the angle value corresponding to the code track; and a rotation angle determination module for determining a rotation angle based on the angle information acquired by the reading module.
[0016] Optionally, the reading module further includes a calculation unit; the calculation unit calculates a preset interpolation angle according to a preset precision, the preset precision being less than the width of a single code track; the angle information read by the reading module also includes the preset interpolation angle.
[0017] To address the aforementioned technical problems, embodiments of the present invention provide a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, performs the steps of the aforementioned angle determination method.
[0018] To address the aforementioned technical problems, this invention provides a terminal device including a memory and a processor. The memory stores a computer program that can run on the processor, and when the processor runs the computer program, it executes the steps of the aforementioned angle determination method.
[0019] Optionally, the terminal device is a mechanically rotating lidar, with a code disk and at least two code readers mounted on the terminal device.
[0020] Compared with the prior art, the technical solution of the embodiments of the present invention has the following beneficial effects:
[0021] In this embodiment of the invention, at least two code readers are used to read angle information, and then the rotation angle is determined based on the angle information read by the at least two code readers. By adopting the above scheme, the reading angles of multiple code readers can be combined, thereby reducing the requirement for code disk accuracy. Without increasing the number of code tracks, the angle measurement accuracy is effectively improved, and there is no need to improve the speed accuracy of motor rotation.
[0022] Furthermore, when the interval between multiple code readers is a non-integer multiple of the width of a single code track, the angle information pulse signals read by at least two code readers are merged to obtain a merged pulse signal; the rotation angle is determined based on the angle information corresponding to the merged pulse signal. Since the number of angle information contained in the merged pulse signal is an integer multiple of the number of angle information contained in the pulse signal obtained by a single code reader, it is equivalent to converting an N-line code disk to an m×N-line code disk (where m is the number of code readers), effectively improving the angle measurement accuracy without increasing the number of code tracks.
[0023] Furthermore, when the interval between multiple barcode readers is a non-integer multiple of the width of a single barcode track, a preset precision is obtained, wherein the preset precision is less than the width of a single barcode track; based on the angle information and the preset precision, a preset interpolation angle within each barcode track is calculated. Using the above scheme, the number of reports can be increased during the measurement process, effectively improving angle measurement accuracy without increasing the number of barcode tracks. Furthermore, by averaging the angle information obtained by at least two barcode readers at a certain rotational azimuth as the rotation angle for that azimuth, compared to using only a single barcode reader, reading errors can be further reduced, and measurement accuracy improved.
[0024] Furthermore, at least one pair of readers in the reader is spaced 180° apart, which can reduce or offset the reader reading error caused by the shaking of the terminal device's shaft due to vibration, and further improve the accuracy of angle measurement.
[0025] Furthermore, by employing the ratio method or the velocity fitting method, the width of each track on the code disk is accurately measured, effectively reducing the measurement error caused by inaccurate track width measurement and further improving the accuracy of angle measurement. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of the code disk of a photoelectric encoder according to an embodiment of the present invention;
[0027] Figure 2 This is a flowchart of an angle determination method according to an embodiment of the present invention;
[0028] Figure 3 This is a flowchart of another angle determination method in an embodiment of the present invention;
[0029] Figure 4 This is a schematic diagram of an angle information pulse signal read by a code reader in an embodiment of the present invention;
[0030] Figure 5 This is a flowchart of another angle determination method in an embodiment of the present invention;
[0031] Figure 6 This is a schematic diagram of an angle information pulse signal read by another code reader in an embodiment of the present invention;
[0032] Figure 7 This is a side view of an encoder rotating normally in an embodiment of the present invention;
[0033] Figure 8 This is a side view of the encoder rotating when the shaft of the terminal device shakes in an embodiment of the present invention;
[0034] Figure 9 This is a schematic diagram of a velocity-time curve in an embodiment of the present invention;
[0035] Figure 10 This is a schematic diagram of the structure of an angle determining device according to an embodiment of the present invention. Detailed Implementation
[0036] In existing technologies, photoelectric encoders are used to measure angles to determine the rotation angle of the terminal device's main body relative to the encoder. For example, this can be used to determine the emission and reception directions of laser light in a lidar system. A photoelectric encoder typically includes a code disk and a reader. Taking mechanical radar as an example, its horizontal angular resolution can reach 0.1°. However, using 0.1° as the code disk's scale interval places excessively high precision requirements on the code disk. Compared to low-precision code disks, high-precision code disks are more difficult and costly to manufacture, and also place higher demands on the design of the code disk's reading circuitry. Therefore, a method is needed to achieve the required angle measurement accuracy using a low-precision code disk.
[0037] Reference Figure 1 , Figure 1 This is a schematic diagram of the code disk of a photoelectric encoder according to an embodiment of the present invention.
[0038] like Figure 1 As shown, the code disk of the photoelectric encoder may include a circular disk body 101. Multiple encoding holes 102 are distributed along the edge of the disk body 101, and the multiple encoding holes 102 and the scale between adjacent encoding holes together form the code track of the code disk. Ideally, the multiple encoding holes 102 are evenly distributed. The encoding holes 102 allow light beams to pass through, while the portions between adjacent encoding holes 102 do not allow light beams to pass through. One encoding hole 102 is missing at position 103; this position is designated as zero degree during code disk rotation, and can also be referred to as the zero position of the code disk, or the zero scale of the code disk.
[0039] A light source and a photoelectric sensor are set on the same side of the disk 101. When a light beam is incident on the photoelectric sensor, the photoelectric sensor generates a pulse. For example, if the light hits the scale on the code disk that is blocked and is reflected back, it is received by the photoelectric sensor and outputs a high level; if the light hits the small hole and passes through without being reflected back, it is not received by the photoelectric sensor and outputs a low level.
[0040] It should be noted that, in another specific application, opposing light sources and photoelectric sensors can be respectively set on both sides of the disk 101. When a light beam is incident on the photoelectric sensor, the photoelectric sensor will generate pulses. Therefore, when the code disk rotates around the axis passing through its center, the light beam emitted by the light source will be continuously blocked, projected, blocked, and projected by the code disk, thereby generating a pulse sequence on the photoelectric sensor.
[0041] In existing angle measurement schemes, high-precision code disks are used to obtain more accurate angle measurement information. Generally, the accuracy of the code disk needs to be higher than the horizontal angle measurement accuracy requirements of the radar system. However, the accuracy of the code disk is affected by the density and size of the encoding holes 102. The higher the accuracy requirement, the greater the manufacturing difficulty and the higher the cost.
[0042] Another existing angle measurement scheme uses a low-precision encoder in conjunction with other high-precision position sensors, such as Hall sensors, to indirectly improve the accuracy of angle measurement by controlling the stability of the rotation speed. However, this method has high redundancy, poor performance, and high cost.
[0043] In this embodiment of the invention, at least two code readers are used to read angle information, and then the rotation angle is determined based on the angle information read by the at least two code readers. The reading angles of multiple code readers can be combined, thereby reducing the requirement for code disk accuracy and effectively improving angle measurement accuracy without increasing the number of code tracks.
[0044] To make the above-mentioned objectives, features and beneficial effects of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0045] Reference Figure 2 , Figure 2 This is a flowchart of an angle determination method according to an embodiment of the present invention. The angle determination method may include steps S21 to S22:
[0046] Step S21: Use a code disk and at least two code readers to read angle information, wherein an interval is set between the at least two code readers, the interval being an integer multiple or a non-integer multiple of the width of a single code track of the code disk, and the width of the code track being the angle value corresponding to the code track;
[0047] Step S22: Determine the rotation angle based on the angle information read by the at least two code readers.
[0048] In the specific implementation of step S21, the angle determination method can be applied to a terminal device, which can be a lidar, such as a mechanical rotating lidar.
[0049] The code disk and at least two code readers can be installed on the terminal device. The code disk is fixed on the rotating device of the terminal device, and the code readers are fixed on the fixing device of the terminal device, such as a base, a housing, or a structure that is stationary relative to the base. The code readers obtain angle information pulse signals to obtain the code disk reading, and then obtain the angle information.
[0050] In the specific implementation of step S22, the rotation angle is determined based on the angle information read by the at least two code readers.
[0051] The rotation angle can be the rotation angle of the rotating device of the terminal device (such as a mechanical rotating lidar) relative to the fixed device of the terminal device.
[0052] In this embodiment of the invention, at least two code readers are used to read angle information, and then the rotation angle is determined based on the angle information read by the at least two code readers. By adopting the above scheme, the reading angles of multiple code readers can be combined, thereby effectively improving the angle measurement accuracy without increasing the number of code tracks.
[0053] Furthermore, the step of the barcode reader reading angle information may include: determining the interval angle between the zero-position barcode reader and other barcode readers, wherein the zero-position barcode reader is the barcode reader located at a set zero-degree position among at least two barcode readers; the barcode reader determines the barcode disk reading based on the angle information pulse signal it reads and the width of each barcode track on the barcode disk, and then reads the angle information based on the interval angle and the barcode disk reading.
[0054] It should be noted that at the zero mark of the code disk, the periodicity of the angle signal is disrupted due to the lack of encoding holes, resulting in the absence of a pulse and thus creating a relatively wide black area (or white area, depending on the code disk design) in the waveform signal. Since the black area (or white area) at the zero mark is several times the normal value, it can be used to identify the zero-degree position. The reader determines the code disk reading based on the angle information pulse signal it reads and the width of each code track. Specifically, the sum of the widths of all code tracks between the reading position and the zero mark of the code disk is used as the code disk reading. Further, the angle information read is determined based on this code disk reading and the interval angle. For example, if the current interval between the reader and the zero-position reader is 30°, and the current code disk reading is 10°, then the angle information is 40°.
[0055] Option 1
[0056] In Scheme 1, the interval between at least two readers is a non-integer multiple of the width of a single code track on the code disk.
[0057] When determining the code disk reading, the code reader calculates the mechanical angle rotated by the code disk based on the angle values corresponding to the rising and falling edges of the read angle information pulse signal. Therefore, the density of rising and falling edges affects the measurement accuracy of the angle. Furthermore, when the interval between at least two code readers is a non-integer multiple of the width of a single code track, the angle information pulse signals read by the at least two code readers are combined to obtain a combined pulse signal, and the rotation angle is determined based on the angle information corresponding to the combined pulse signal.
[0058] The following combination Figure 3 and Figure 4 Describe Option 1.
[0059] Figure 3 This is a flowchart of another angle determination method in an embodiment of the present invention. The other angle determination method may include steps S31 to S35:
[0060] Step S31: Use a code disk and at least two code readers to read angle information, wherein the interval between the at least two code readers is a non-integer multiple of the width of a single code track on the code disk, and the width of the code track is the angle corresponding to the code track;
[0061] Step S32: Determine the interval angle between the zero-position reader and other readers, wherein the zero-position reader is the reader located at a set zero-degree position among the at least two readers;
[0062] Step S33: The code reader determines the code disk reading based on the angle information pulse signal it reads and the code disk width of each code track, and reads the angle information based on the interval angle and the code disk reading;
[0063] Step S34: Combine the angle information pulse signals read by the at least two code readers to obtain a combined pulse signal;
[0064] Step S35: Determine the rotation angle based on the angle information corresponding to the merged pulse signal.
[0065] Figure 4 This is a schematic diagram of an angle information pulse signal read by a code reader in an embodiment of the present invention. (Refer to...) Figure 4 The example uses two code readers, with the interval between them being (m+0.5)×w, where w represents the average code track width and m is a non-negative integer, such as 0, 1, 2, 3, etc.
[0066] It is understandable that for an N-line encoder, w = 360° / N.
[0067] Specifically, by using two code readers to read the code disk, the following can be obtained: Figure 4 The waveform signal is shown in the image. Figure 4 As shown by the dashed line, the edges of the angle information pulse signals read by the two readers differ by half a phase.
[0068] like Figure 4 As shown, the angle information pulse signals from two code readers are merged. The number of rising and falling edges in the merged pulse signal is twice that of the angle information pulse signal read by a single code reader. Since the angle information is reported based on the merged pulse signal during the code reader's reporting process, the number of reports is effectively doubled, thus doubling the angle measurement accuracy.
[0069] Understandably, when a larger number of code readers are set up, and the angle information pulse signals read by each code reader have a phase difference, the number of reports is the number of reports by a single code reader multiplied by the number of code readers. This is equivalent to equating an N-line code disk to an m×N-line code disk (where m is the number of code readers). For example, if the number of lines N on the code disk is greater than 30, and there are four code readers, the intervals between three code readers and the zero-position code reader are (10+0.25)×w, (20+0.5)×w, and (30+0.75)×w, respectively.
[0070] In this embodiment of the invention, when the interval between multiple code readers is a non-integer multiple of the width of a single code track, the angle information pulse signals read by at least two code readers are merged to obtain a merged pulse signal; the rotation angle is determined based on the angle information corresponding to the merged pulse signal. By adopting the above scheme, since the number of rising and falling edges of the merged pulse signal increases by an integer multiple, it is equivalent to converting an N-line code disk to an m×N-line code disk (where m is the number of code readers), effectively improving angle measurement accuracy without increasing the number of code tracks.
[0071] Option 2
[0072] In Scheme 2, the positional interval between at least two readers is an integer multiple of the width of a single code track.
[0073] The following combination Figure 5 and Figure 6 Scheme 2 is described.
[0074] Figure 5 This is a flowchart of another angle determination method in an embodiment of the present invention. The other angle determination method may include steps S51 to S58:
[0075] Step S51: Use a code disk and at least two code readers to read angle information, wherein the interval between the at least two code readers is an integer multiple of the width of a single code track of the code disk, and the width of the code track is the angle corresponding to the code track;
[0076] Step S52: Determine the interval angle between the zero-position barcode reader and other barcode readers, wherein the zero-position barcode reader is the barcode reader located at a set zero-degree position among the at least two barcode readers;
[0077] Step S53: The code reader determines the code disk reading based on the angle information pulse signal it reads and the code disk width of each code track, and reads the angle information based on the interval angle and the code disk reading;
[0078] Step S54: Obtain a preset precision, the preset precision being less than the width of a single code track; calculate a preset interpolation angle within each code track based on the angle information and the preset precision, and add the preset interpolation angle to the angle information;
[0079] Step S55: The at least two readers respectively acquire angle information, and the average value of the angle information acquired by the at least two readers under a certain rotation position is determined as the rotation angle of that position.
[0080] Reference Figure 6 , Figure 6 This is a schematic diagram of an angle information pulse signal read by another code reader in an embodiment of the present invention. Figure 6 In this example, two code readers are used as an illustration, and the interval between the two code readers is m×w, where w represents the average code track width and m is a positive integer, such as 1, 2, 3, etc.
[0081] It is understandable that for an N-line encoder, w = 360° / N.
[0082] Specifically, by using two code readers to read the code disk, the following can be obtained: Figure 6 The waveform signal is shown in the image. Figure 6 As shown by the dashed line, the phases of the angle information pulse signals read by the two code readers are consistent.
[0083] When determining the code disk reading, the code reader calculates the mechanical angle rotated by the code disk based on the angle values corresponding to the rising and falling edges in the read waveform signal. Therefore, the density of rising and falling edges will affect the measurement accuracy of the code disk angle.
[0084] Furthermore, when the interval between at least two code readers is an integer multiple of the width of a single code track, a preset precision is obtained. Based on the interval angle, the code disk reading, and the preset precision, a preset interpolation angle within each code track is calculated, wherein the preset precision is less than the width of a single code track. When reporting angle information, the code reader reports the preset interpolation angle within each code track in addition to reporting it at the rising and falling edges.
[0085] In a non-limiting example, if the code track width is 1° and the preset accuracy can be a value less than 1°, such as 0.4°, then each reader will report at the following positions: 0.4°, 1°, 1.4°, 2°, 2.4°, 3°, ... Compared to reporting only at 1°, 2°, 3°, ..., this increases the number of reports, i.e., increases the accuracy of angle measurement.
[0086] In this embodiment of the invention, when the interval between multiple code readers is a non-integer multiple of the width of a single code track, a preset precision is obtained, wherein the preset precision is less than the width of a single code track; based on the angle information and the preset precision, a preset interpolation angle within each code track is calculated, and the preset interpolation angle is added to the angle information. Using this scheme, the number of reports during the measurement process can be increased, effectively improving angle measurement accuracy without increasing the number of code tracks.
[0087] Furthermore, the step of determining the rotation angle based on the angle information read by at least two barcode readers may include: the at least two barcode readers respectively acquiring angle information; and taking the average value of the angle information acquired by the at least two barcode readers at a certain rotation orientation to determine the rotation angle at that orientation.
[0088] In a non-limiting example, with a code track width of 1°, a preset interpolation angle of 0.4°, and a positional interval of 5 code tracks between the first reader (i.e., the zero-position reader) and the second reader, the second reader will report at 5.4° around the time the first reader reports at 10.4°. Adding the positional interval (5 code track widths between 6° and 10°) to the code disk reading angle of the second reader allows mapping the second reader's 5.4° to the code track of the first reader (i.e., the code track to which 10.4° belongs), thus obtaining the mapped angle.
[0089] In this embodiment of the invention, since each barcode reader will have a certain error when reading, the average value of the angle information obtained by at least two barcode readers at a certain rotation position is taken as the rotation angle of that position. This can combine the reading angles of multiple barcode readers, reduce reading errors, and further improve the angle measurement accuracy.
[0090] Furthermore, at least one pair of readers in the reader is spaced 180° apart.
[0091] Under vibration, the shaft of the terminal device will wobble, causing a change in the distance between the code disk and the reader, and consequently, a change in the reader's output signal. For a single reader, such a change cannot be reduced or eliminated at all. However, a pair of readers spaced 180° apart can greatly reduce this effect.
[0092] Combined with reference Figure 7 and Figure 8 , Figure 7 This is a side view of an encoder rotating normally according to an embodiment of the present invention. Figure 8 This is a side view of the encoder rotating when the shaft of the terminal device shakes in an embodiment of the present invention.
[0093] As shown in the figure, barcode readers 611 and 612 are placed 180° apart. When the code disk 620 rotates normally, it is perpendicular to the shaft 630 of the terminal device. When the shaft 630 of the terminal device shakes, the code disk 620 tilts towards the barcode reader 611. Since the path of the light emitted by the barcode reader hitting the code disk and returning is shortened, the barcode reader 611 will obtain the reflected light earlier, that is, obtain the edge information of the code track (the position of the output angle information) earlier, and the output angle is A0+ΔA. Conversely, the barcode reader 612 will obtain the edge information of the code track later, and the output angle is A1-ΔA.
[0094] Furthermore, by averaging the reading angles of the code disks read by pairs of code readers with a position interval of 180°, the resulting angle is (A0+A1) / 2, which can eliminate the error of ΔA.
[0095] In this embodiment of the invention, at least one pair of readers is spaced 180° apart, which can reduce or cancel the error of the output signal when the rotating shaft of the terminal device shakes due to vibration, thereby further improving the accuracy of angle measurement.
[0096] Furthermore, before the reader reads the angle information, the angle determination method may also include: determining the width of each code track of the code disk.
[0097] It should be noted that code disk calibration is a method to obtain the true width of each code track; typically, we assume that the speed is stable within one revolution of the radar, that is, at a rotational speed v, the angle w of any code track on the code disk is... i and the time t that has elapsed i ,have:
[0098] w i =v×t i
[0099] If the rotation speed fluctuates, the measurement time will also fluctuate to some extent.
[0100] w i =(v+Δv) i )×(t i +Δt i )
[0101] Looking at it from one circumference, we have:
[0102]
[0103] If the rotational speed fluctuates by Δv i If the rotational inertia is sufficiently small (the moment of inertia is sufficiently large), meaning the rotational speed is relatively stable, then (v + Δv) i Approximately constant:
[0104]
[0105] Therefore, we get:
[0106] Therefore, code disk calibration is actually the process of obtaining the time value of each code track under the premise that the rotation speed is stable enough, which completes the calibration of the code disk. However, under normal circumstances, the rotation speed will fluctuate. After calibrating the code disk under different rotation speed fluctuations within a 360° range, there will be a cumulative deviation in the radar horizontal angle.
[0107] Unstable rotation speed will affect the calibration results. During the calibration process, the difference between the calculated angle value and the actual angle value measured by the external protractor is expressed as the cumulative error of the encoder calibration.
[0108] For a uniform encoder, taking 470 tracks as an example, if the radar rotation speed decreases uniformly from 600 RPM to 599 RPM over one revolution (i.e., a speed change of 1 RPM), the maximum cumulative error of the encoder calibration table is close to 0.08°. Specifically, when the rotation speed decreases uniformly from 600 rpm to 599 rpm, the average rotation speed used in the calculation is 599.5 rpm. Therefore, the error between the actual value and the calculated value will go through a process of first increasing and then decreasing. So, when the rotation speed changes by 1 RPM, the maximum cumulative error can reach 0.08°.
[0109] For a uniform encoder, taking a code track of 470 as an example, the radar rotation speed decreases uniformly from 600 RPM to 599 RPM in half a cycle, and then increases back to 600 RPM in the second half cycle. The cumulative error of the encoder calibration table is close to 0.04°.
[0110] Due to the limited accuracy of the motor control algorithm and the basic requirement of radar speed generally being [-3,3] rpm, based on the above analysis, the worst encoder calibration result will cause the cumulative error of the radar's horizontal angle to reach 0.24°, which no longer meets the radar's horizontal angle accuracy requirement (0.2°). Therefore, a more accurate method is needed to determine the encoder track width.
[0111] In a first specific embodiment of the present invention, calibration accuracy can be improved based on the code track width ratio between different code tracks. Specifically, the width of a portion of the code tracks on the code disk is measured; at the same rotational speed, the ratio of the reading time of an unmeasured code track to that of a measured code track is determined to obtain the code track width ratio; the code track width of all code tracks is determined based on the measured partial code track width and the code track width ratio.
[0112] Specifically, in a dual-reader system, assuming the angle difference between the two readers is θ, or the interval is m code tracks, then at any given time (the same time), the code track widths of the two code tracks satisfy:
[0113]
[0114] At this time, Δv i and Δv i+m Very close, or even identical, therefore:
[0115]
[0116] Therefore, we can obtain the ratio of these two code track widths, and by analogy, we can obtain the ratio of all code track widths with a period of m.
[0117] In a non-limiting embodiment, if there are 20 code tracks and the two readers are spaced 10 code tracks apart, the width ratio between the two code tracks can be obtained through the above time ratio. That is, the width value of all code tracks can be measured without rotating a full circle. Compared with measuring a full circle, there may be more speed changes, causing greater calibration error. Reducing the rotation angle can reduce the calibration error.
[0118] In a non-limiting example, the number of readers is 2, and the interval between two readers is m code tracks; wherein the width of the first m code tracks can be used to represent the width of the other code tracks.
[0119] Specifically, the ratio between all code channels and the first m code channels can be calculated through proportional relationships, thereby indirectly calculating the code channel width of all code channels.
[0120] The width of the first m code channels can be calculated using the aforementioned formula:
[0121]
[0122] Where n represents the number of code channels, and m ≤ n.
[0123] It should be noted that the width of the first m code tracks can also be calculated by multiplying the average speed of the first m code tracks by their corresponding time. Therefore, the calibration table error caused by speed variations only exists within the first m code tracks.
[0124] Assuming θ = 30°, using the above method, the calibration error caused by speed fluctuations can be reduced by 12 times, greatly improving the accuracy of calibration.
[0125] In a second specific embodiment of the present invention, the calibration accuracy can also be improved based on the speed ratio.
[0126] Specifically, the step of determining the width of each code track may include: obtaining the rotation speed of the same code track at different rotation positions; fitting a speed-time curve based on the rotation speed; obtaining the reading duration and reading time of other code tracks; determining the speed fitting value of the reading time of a certain code track based on the fitted speed-time curve, and using the product of the speed fitting value and the reading duration of the code track as the width of the code track.
[0127] For the same code track, when two readers pass by one after the other, the speed change can be calculated, and thus the Δv with a period of m can be determined. i Corrections are made to reduce the error caused by speed fluctuations within a single lap. Specifically, this is achieved as follows:
[0128] Assuming the angle difference between the two readers is θ, when the code track ω i When the code passes through two readers in a time-division manner, the code channel width is denoted as t. i_ ,t i_ If the rotational speed is stable and the responses of the two code readers are completely identical, then:
[0129] t i_1 =t i_
[0130] Considering that electronic signals are unlikely to introduce errors exceeding 1µs (under non-vibration conditions), and 1µs corresponds to 0.0036° at a 10Hz rotational speed, which is negligible; however, rotational speed stability cannot be guaranteed, so the ratio of rotational speeds separated by an angle θ can be obtained:
[0131]
[0132] Reference Figure 9 , Figure 9 This is a schematic diagram of a fitted velocity-time curve in an embodiment of the present invention.
[0133] As shown in the figure, the speed of channel 1 when it passes the first reader is 100, and the speed of channel 10 when it passes the second reader is 110. The fitted speed-time curve shown in the figure can be obtained by linear fitting. Then, the fitted speed-time curve can be used to indirectly obtain the fitted speed value of each channel in a set of channels (several channels within the angle θ, 10 in the example above) when it passes the first reader.
[0134] Using the above method, the calibration error caused by speed fluctuations can be limited to within the θ angle, which can also improve the calibration accuracy.
[0135] Reference Figure 10 , Figure 10 This is a schematic diagram of an angle determining device according to an embodiment of the present invention. The angle determining device may include:
[0136] The reading module 100 is used to acquire angle information; wherein, the reading module includes a code disk and at least two code readers, and there is a gap between the at least two code readers, the gap being an integer multiple or a non-integer multiple of the width of a single code track of the code disk, and the code track width being the angle value corresponding to the code track;
[0137] The rotation angle determination module 200 determines the rotation angle based on the angle information obtained by the reading module 100.
[0138] about Figure 10 For more information on the working principle, operation mode, and beneficial effects of the angle-determining device shown, please refer to the above section on... Figures 1 to 9 The relevant descriptions will not be repeated here.
[0139] This invention also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it performs the steps of the angle determination method described above. The storage medium may include ROM, RAM, a magnetic disk, or an optical disk, etc. The computer-readable storage medium may also include non-volatile memory or non-transitory memory, etc.
[0140] This invention also provides a terminal device, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor runs the computer program, it executes the steps of the angle determination method described above. The terminal includes, but is not limited to, terminal devices such as lidar and servers.
[0141] Furthermore, the terminal device can be a mechanically rotating lidar, and the at least two code readers are mounted on the main body of the terminal device.
[0142] It should be understood that in the embodiments of this application, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0143] It should also be understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0144] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article indicates that the preceding and following related objects have an "or" relationship.
[0145] In the embodiments of this application, "multiple" refers to two or more.
[0146] The descriptions of "first," "second," etc., appearing in the embodiments of this application are for illustrative purposes and to distinguish the objects being described. They have no order and do not indicate any special limitation on the number of devices in the embodiments of this application, nor do they constitute any limitation on the embodiments of this application.
[0147] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.
Claims
1. A method of angle determination, characterized by, The application comprises: reading angle information by using a code disc and at least two code readers, wherein an interval is set between the at least two code readers, the interval is an integer multiple or a non-integer multiple of a single code track width of the code disc, and the code track width is an angle value corresponding to a code track; determining a rotation angle according to the angle information read by the at least two code readers; wherein the reading of the angle information by the code readers comprises: determining an interval angle between a zero-position code reader and other code readers, wherein the zero-position code reader is a code reader located at a set zero-degree position among the at least two code readers; the code readers determine a code disc reading according to an angle information pulse signal read by the code readers and each code track width of the code disc; reading angle information according to the interval angle and the code disc reading; in response to the interval between the at least two code readers being an integer multiple of the single code track width, the reading of the angle information by the code readers further comprises: obtaining a preset precision, the preset precision being smaller than the code track width of a single code track; calculating a preset interpolation angle in each code track according to the angle information and the preset precision; adding the preset interpolation angle to the angle information.
2. The angle determination method of claim 1, wherein the interval between the at least two code readers is a non-integer multiple of the single code track width; the determination of the rotation angle according to the angle information read by the at least two code readers comprises: merging the angle information pulse signals read by the at least two code readers to obtain a merged pulse signal; determining a rotation angle based on the angle information corresponding to the merged pulse signal.
3. The angle determination method of claim 1, wherein the determination of the rotation angle according to the angle information read by the at least two code readers comprises: the at least two code readers respectively obtain angle information; averaging the angle information respectively obtained by the at least two code readers at a certain rotation position to determine a rotation angle at the position.
4. The angle determination method according to any one of claims 1 to 3, characterized in that, the interval between at least one pair of code readers among the code readers is 180°.
5. The angle determination method of claim 1, wherein before the reading of the angle information by the code readers, further comprising: determining the code track width of each code track of the code disc.
6. The angle determination method of claim 5, wherein, the determination of the code track width of each code track comprises: measuring partial code track widths of the code disc; determining a code track width ratio of an unmeasured code track to a certain measured code track at the same rotation speed; determining the code track width of all code tracks according to the measured partial code track widths and the code track width ratio.
7. The angle determination method of claim 5, wherein, the determination of the code track width of each code track comprises: obtaining rotation speeds of a same code track at different rotation positions; fitting a speed-time curve according to the rotation speeds; obtaining a reading duration and a reading time of other code tracks; determining a speed fitting value of a reading time of a certain code track according to the speed-time curve, and taking a product of the speed fitting value and the reading duration of the code track as the code track width of the code track.
8. An angle determining device, characterized in that The application comprises: a reading module for obtaining angle information; wherein the reading module comprises a code disc and at least two code readers, an interval is set between the at least two code readers, the interval is an integer multiple or a non-integer multiple of a single code track width of the code disc, and the code track width is an angle value corresponding to a code track; a rotation angle determination module for determining a rotation angle according to the angle information obtained by the reading module; wherein the reading module performs the following steps: determining a spacing angle between a zero-position reader and other readers, wherein the zero-position reader is a reader among the at least two readers located at a set zero-degree position; the readers determine a code disc reading according to angle information pulse signals read by the readers and widths of each track of the code disc; reading angle information according to the spacing angle and the code disc reading; in response to a position spacing between the at least two readers being an integer multiple of the single track width, the reading module further comprises a calculation unit configured to calculate a preset interpolation angle in each track according to the angle information and a preset precision, wherein the preset precision is less than the track width of the single track; and the angle information read by the reading module further comprises the preset interpolation angle.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, performs the steps of the angle determination method of any one of claims 1 to 3. 10.A terminal device, comprising a memory and a processor, wherein a computer program capable of running on the processor is stored on the memory, and characterized in that, The processor, when executing the computer program, performs the steps of the angle determination method of any one of claims 1 to 3.
11. The terminal device according to claim 10, characterized by The terminal device is a mechanical rotary laser radar, and the code disc and the at least two readers are installed on the terminal device.
Citation Information
Patent Citations
Rotary encoder
CN110375776A
encoder
CN110785633A