[go: up one dir, main page]

WO2024114786A1 - Method for determining state of code disc, angle measurement method and lidar - Google Patents

Method for determining state of code disc, angle measurement method and lidar Download PDF

Info

Publication number
WO2024114786A1
WO2024114786A1 PCT/CN2023/135817 CN2023135817W WO2024114786A1 WO 2024114786 A1 WO2024114786 A1 WO 2024114786A1 CN 2023135817 W CN2023135817 W CN 2023135817W WO 2024114786 A1 WO2024114786 A1 WO 2024114786A1
Authority
WO
WIPO (PCT)
Prior art keywords
angle
motor
code disc
time point
dirty
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/135817
Other languages
French (fr)
Inventor
Congbo SHI
Shaoqing Xiang
Yuqiang Zhang
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hesai Technology Co Ltd
Original Assignee
Hesai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hesai Technology Co Ltd filed Critical Hesai Technology Co Ltd
Publication of WO2024114786A1 publication Critical patent/WO2024114786A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P21/00Arrangements or methods for the control of electric machines by vector control, e.g. by control of field orientation
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/06Systems determining position data of a target
    • G01S17/08Systems determining position data of a target for measuring distance only
    • G01S17/10Systems determining position data of a target for measuring distance only using transmission of interrupted, pulse-modulated waves
    • G01S17/14Systems determining position data of a target for measuring distance only using transmission of interrupted, pulse-modulated waves wherein a voltage or current pulse is initiated and terminated in accordance with the pulse transmission and echo reception respectively, e.g. using counters
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/06Systems determining position data of a target
    • G01S17/42Simultaneous measurement of distance and other co-ordinates
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/50Systems of measurement based on relative movement of target
    • G01S17/58Velocity or trajectory determination systems; Sense-of-movement determination systems
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/88Lidar systems specially adapted for specific applications
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/48Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
    • G01S7/481Constructional features, e.g. arrangements of optical elements
    • G01S7/4817Constructional features, e.g. arrangements of optical elements relating to scanning
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S7/00Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
    • G01S7/48Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
    • G01S7/497Means for monitoring or calibrating

Definitions

  • This disclosure relates to a field of three-dimensional detection, in particular to methods for determining a state of a code disc of a photoelectric encoder, angle measurement methods and LiDARs.
  • Photoelectric encoders are sensors that can convert a mechanical geometric displacement of an output shaft into a pulse digital signal, through optical-electrical conversion.
  • the photoelectric encoder can include a photoelectric code disc and a photoelectric detection device.
  • the photoelectric code disc can be a circular plate with a certain diameter. Several rectangular holes can be equally arranged on the circular plate.
  • the detection device can detect and output a corresponding pulse signal when the motor rotates. Typically, two square wave signals A and B with a certain phase difference therebetween can be output. The rotation direction of the motor can be determined through the two output signals.
  • FIG. 1 and FIG. 2 illustrates example waveform signals output by photoelectric sensor when the code disc is clean or the code disc is dirty.
  • a typical photoelectric encoder can include a light source, such as an LED, a code disc, and a photoelectric sensor. Small holes evenly arranged on the code disc. The light beam emitted by the light source can pass through the small holes on the code disc and be illuminated onto the photoelectric sensor, generating pulse signals. These pulse signals can be sent to a data processing device to determine a rotation speed of the code disc and a current angular orientation.
  • two photoelectric sensors A and B with a certain phase difference can be used.
  • the direction of the motor can be determined by analyzing the output signals of both sensors.
  • a mechanical rotating LiDAR objects in the surroundings can be detected by a 360° rotation.
  • a LiDAR of a rotating mirror type can use a motor to drive the rotating mirror.
  • the code disc can be used for the angle measurement of the mechanical rotating LiDAR and the LiDAR with a rotating mirror. The accuracy of the angle measurement is important to the determination of the rotation angle of the LiDAR in real time, and is crucial for determining the transmitting and receiving directions of the laser.
  • the code disc of the photoelectric encoder is easily to be dirty. Once it is dirty, the accuracy of angle measurement can be decreased. Still referring to FIG. 2, waveform 2 output by the photoelectric sensor B is significantly different from a normal waveform because of the dirt. For example, the entire waveform is significantly delayed in the time domain, and the pulse width decreases.
  • the angle error caused by the dirty code disc can be accumulated.
  • the accumulated error can cause the angle of the code disc to deviate further from the true angle.
  • FIG. 3 illustrates, from top to bottom, an output signal 31 of the code disc when it is not dirty, an output signal 32 of the code disc when it is dirty, and the angle result 33 of the code disc determined based on the output signal 32.
  • Angle measurement of the code disc takes a rising edge triggering rule.
  • a first rising edge indicates an angle ⁇ 1
  • a second rising edge indicates an angle ⁇ 2
  • an i th rising edge indicates an angle ⁇ i
  • a (i+1) th rising edge indicates an angle ⁇ i+1 ....
  • the dirty area shown in the output signal 32 is visible. For example, when the code track on the code disc corresponding to angles ⁇ i+1 ⁇ i+4 is dirty, the output signal of the code disc changes from the output signal 31 to the output signal 32, the rising edges corresponding to ⁇ i+1 ⁇ i+4 are missing.
  • an angle which is supposed to be ⁇ i+4 based on the output signal 31, is determined to be ⁇ i+2 based on the rising edge, due to blocking by the dirty area. Further, if the error continues to be accumulated in this way, the subsequent results would continue to be accumulated on basis of the error. The difference between the rotation angle of the motor reflected by the code disc and the true angle becomes larger and larger.
  • the angle from the code disc is used for motor control, which greatly increases the possibility of motor stalling or abnormality in rotation speed. How to identify in time when the code disc is dirty and provide angle measurement results with relatively high accuracy has become an urgent problem to be solved.
  • this disclosure provides a method for determining a state of a code disc of a photoelectric encoder.
  • the code disc rotates with a rotor of a motor.
  • the motor further includes a Hall sensor.
  • the method includes: S101: determining an angle at which the motor is located at a preset time point based on an output signal of the Hall sensor; S102: determining the angle at which the motor is located at the preset time point based on an output of the photoelectric encoder; and S103: determining whether the code disc is dirty based on the angles determined in steps S101 and S102.
  • the preset time point is a time point when a jump occurs in the output signal of the Hall sensor.
  • the step S103 includes: determining that the code disc is dirty when a difference between the angle calculated in the step S101 and the angle calculated in the step S102 exceeds a predetermined threshold.
  • this disclosure also provides an angle measurement method for a motor.
  • a photoelectric encoder and a Hall sensor are provided on the motor.
  • the angle measurement method includes: S201: determining an angle at which the motor is located at a preset time point based on an output signal of the Hall sensor; S202: determining the angle at which the motor is located at the preset time point based on an output of the photoelectric encoder; S203: determining whether a code disc of the photoelectric encoder is dirty based on the angles calculated in steps S201 and S202; and S204: when the code disc is dirty, determining an angle of the motor at a subsequent time point by using the output signal of the Hall sensor or by using the output of the code disc before the code disc is dirty.
  • the preset time point is a time point when a jump occurs in the output signal of the Hall sensor.
  • the step S203 includes: determining that the code disc is dirty at a current position when a difference between the angle calculated in step S201 and the angle calculated in step S202 exceeds a predetermined threshold.
  • the angle measurement method further includes: when the code disc is not dirty, determining the angle of the motor based on the output of the photoelectric encoder.
  • the output signal of the Hall sensor includes a first state and a second state, and a time point when the output signal of the Hall sensor jumps from the first state to the second state is a first time point
  • the S204 further includes: when the code disc is detected to be dirty during the first state, determining, before the first time point, the angle of the motor at a subsequent time point by using the output signal of the Hall sensor or by using the output of the code disc at a latest time point before the code disc is dirty, and taking the angle of the motor at the subsequent time point as a measurement result.
  • the angle measurement method further includes: at the first time point, correcting an angle measurement result from the code disc based on an angle measurement result from the Hall sensor.
  • the angle measurement method further includes: S206: after the first time point, calculating an angle at which the motor is located at a second time point based on the output signal of the Hall sensor; S207: calculating an angle at which the motor is located at the second time point based on the output of the photoelectric encoder; S208: determining whether the code disc of the photoelectric encoder is dirty based on the angles calculated in steps S206 and S207; S210: when the code disc is dirty, calculating the angle of the motor by using the output signal of the Hall sensor after the second time point; otherwise, calculating the angle of the motor by using the output of the photoelectric encoder.
  • the angle measurement method further includes: when the code disc is dirty, using the output of the Hall sensor to perform Field Oriented Control for the motor; when the code disc is not dirty, using the output of the photoelectric encoder to perform Field Oriented Control for the motor.
  • this disclosure also provides a LiDAR, including: an opto-mechanical rotor; and a motor, a photoelectric encoder, and a controller.
  • the opto-mechanical rotor is installed on an output shaft of the motor and is driven to rotate by the motor.
  • the motor includes a Hall sensor.
  • the photoelectric encoder is installed on the output shaft of the motor.
  • the controller is electrically coupled to the Hall sensor and the photoelectric encoder, and is configured to calculate an angle of the output shaft of the motor based on the output signal of the photoelectric encoder and the output signal of the Hall sensor respectively, wherein, the controller is configured to perform the following operations: S201: determining an angle at which the motor is located at a preset time point based on an output signal of the Hall sensor; S202: determining the angle at which the motor is located at the preset time point based on an output of the photoelectric encoder; S203: determining whether a code disc of the photoelectric encoder is dirty based on the angles calculated in operations S201 and S202; and S204: when the code disc is dirty, determining an angle of the motor at a subsequent time point by using the output signal of the Hall sensor or by using the output of the code disc before the code disc is dirty.
  • the preset time point is a time point when a jump occurs in the output signal of the Hall sensor.
  • the controller is configured to determine that the code disc is dirty at a current position when a difference between the angle calculated in operation S201 and the angle calculated in operation S202 exceeds a predetermined threshold.
  • the controller is configured to determine the angle of the motor based on the output of the photoelectric encoder when the code disc is not dirty.
  • the output signal of the Hall sensor includes a first state and a second state, and a time point when the output signal of the Hall sensor jumps from the first state to the second state is a first time point
  • the controller is configured to: when the code disc is determined to be dirty during the first state, determine, before the first time point, the angle of the motor at a subsequent time point by using the output signal of the Hall sensor or by using the output of the code disc at a latest time point before the code disc is dirty, and take the angle of the motor at the subsequent time point as a measurement result.
  • the controller is configured to correct, at the first time point, an angle measurement result from the code disc based on an angle measurement result from the Hall sensor.
  • the controller is configured to perform the following operations: S206: after the first time point, calculate an angle at which the motor is located at a second time point based on the output signal of the Hall sensor; S207: calculate an angle at which the motor is located at the second time point based on the output of the photoelectric encoder; S208: determine whether the code disc of the photoelectric encoder is dirty based on the angles calculated in operations S206 and S207; S210: when the code disc is dirty, calculate the angle of the motor by using the output signal of the Hall sensor after the second time point; otherwise, calculate the angle of the motor by using the output of the photoelectric encoder.
  • the controller is configured to perform Field Oriented Control for the motor by using the output of the Hall sensor when the code disc is dirty; perform Field Oriented Control for the motor by using the output of the photoelectric encoder when the code disc is not dirty.
  • this disclosure provides a method, including: determining a first angle, a motor is located at the first angle at a preset time point based on an output signal of a Hall sensor; determining a second angle, the motor is located at the second angle at the preset time point based on an output of a photoelectric encoder; determining, based on the first angle and the second angle, whether a code disc is dirty.
  • the photoelectric encoder includes the code disc.
  • the code disc rotates with a rotor of the motor.
  • the motor includes the Hall sensor.
  • the preset time point is the time point when a jump occurs in the output signal of the Hall sensor.
  • determining, based on the first angle and the second angle, whether a code disc is dirty comprises: determining the code disc is dirty when a difference between the first angle and the second angle exceeds a predetermined threshold.
  • the method further includes: before the code disc is determined to be dirty, determining, based on the output signal of a Hall sensor or the output signal of the code disc, an angle of the motor at a subsequent time point.
  • the method further includes: based on a determination that the code disc is not dirty, determining, based on the output of the photoelectric encoder, the angle of the motor.
  • the method further includes: the output signal of the Hall sensor comprises a first state and a second state, the preset time point comprises a first time point, the first time point is a time point when the output signal of the Hall sensor jumps from the first state to the second state, and the determining, based on the output signal of a Hall sensor or the output signal of the code disc, an angle of the motor at a subsequent time point comprises: before the first time point and based on a determination that the code disc is dirty during the first state, determining the angle of the motor at a subsequent time point based on the output signal of the Hall sensor or the output signal of the code disc at a latest time point before the code disc is determined to be dirty, and taking the angle of the motor at the subsequent time point as a measurement result.
  • the method further includes: correcting, based on an angle measurement result from the Hall sensor, an angle measurement result from the code disc at the first time point.
  • the method further inlcudes: determining, based on the output signal of the Hall sensor, a third angle, wherein the motor is located at the third angle at a second time point, and the second time point is later than the first time point; determining, based on the output signal of the photoelectric encoder, a fourth angle, wherein the motor is located at the fourth angle at the second time point; and determining, based on the third angle and the fourth angle, the code disc of the photoelectric encoder is dirty.
  • the method further includes: based on a determination that the code disc is dirty, determining the angle of the motor after the second time point based on the output signal of the Hall sensor; or based on a determination that the code disc is not dirty, determining, the angle of the motor after the second time point based on the output signal of the photoelectric encoder.
  • the method further includes: performing, based on the output signal of the Hall sensor, field-oriented control for the motor when the code disc is determined to be dirty.
  • the method further includes: performing, based on the output signal of the photoelectric encode, field-oriented control for the motor when the code disc is determined to be not dirty.
  • the code disc of the photoelectric encoder is dirty can be determined in time.
  • the Hall sensor can be used to calibrate the code disc.
  • the accurate angle measurement results can be obtained by using the code disc after the dirty area is skipped. Efficient feedback control can be performed on the motor, cost can be saved and dirt can be resisted.
  • FIG. 1 illustrates an example waveform signal output by the photoelectric sensor when the code disc is not dirty.
  • FIG. 2 illustrates an example waveform signal output by the photoelectric sensor when the code disc is dirty.
  • FIG. 3 illustrates an example of influencing on the angle calculation caused by dirt on the code disc of the photoelectric encoder.
  • FIG. 4 shows an example structural diagram of some components including a motor, a Hall sensor, and a photoelectric encoder, consistent with some embodiments of this disclosure.
  • FIG. 5 illustrates an example method for determining a state of a code disc of a photoelectric encoder, consistent with some embodiments of this disclosure.
  • FIG. 6 illustrates example output signals of three Hall sensors during one rotation cycle T of the motor.
  • FIG. 7 shows an example schematic diagram illustrating the output signal of the photoelectric encoder.
  • FIG. 8 illustrates an example angle measurement method for a motor, consistent with some embodiments of this disclosure.
  • FIG. 9 shows an example signal sequence diagram, consistent with some embodiments of this disclosure.
  • FIG. 10 illustrates an example angle measurement method for a motor, consistent with some embodiments of this disclosure.
  • FIG. 11 shows a schematic diagram illustrating an example perspective structure of a LiDAR from top view, consistent with some embodiments of this disclosure.
  • orientation or position relations denoted by the terms “central” “longitudinal” “latitudinal” “length” “width” “thickness” “above” “below” “front” “rear” “left” “right” “vertical” “horizontal” “top” “bottom” “inside” “outside” “clockwise” “counterclockwise” and the like are based on the orientation or position relations, consistent with some accompanying drawings, and are used only for the purpose of facilitating description of this disclosure and simplification of the description, instead of indicating or suggesting that the denoted devices or elements must be oriented specifically, or configured or operated in a specific orientation. Thus, these terms should not be construed to limit this disclosure.
  • first and second are only used for the purpose of description, rather than indicating or suggesting relative importance or implicitly indicating the number of the denoted technical features. Accordingly, features defined with “first” and “second” can, expressly or implicitly, include one or more of the features.
  • plurality means two or more, unless otherwise defined explicitly and specifically.
  • connection should be broadly understood as, for example, fixed connection, detachable connection, or integral connection; or mechanical connection, electrical connection or intercommunication; or direct connection, or indirect connection via an intermediary medium; or internal communication between two elements or interaction between two elements.
  • installation detachable connection, or integral connection
  • mechanical connection electrical connection or intercommunication
  • direct connection or indirect connection via an intermediary medium
  • internal communication between two elements or interaction between two elements.
  • first feature is “on” or “beneath” a second feature
  • this can cover direct contact between the first and second features, or contact via another feature therebetween, other than the direct contact.
  • first feature is “on” , “above” , or “over” a second feature, this can cover the case that the first feature is right above or obliquely above the second feature, or just indicate that the level of the first feature is higher than that of the second feature.
  • first feature is “beneath” , “below” , or “under” a second feature, this can cover the case that the first feature is right below or obliquely below the second feature, or just indicate that the level of the first feature is lower than that of the second feature.
  • multiple in this disclosure refers to a number of two or more.
  • multiple objects can include two objects, or more than two objects.
  • at least one in this disclosure refers to a number of one or more.
  • at least one object can include one object, or two objects, or ten objects, or the like.
  • This disclosure provides a method for determining a state of the code disc of the photoelectric encoder, and an angle measurement method for a motor.
  • FIG. 4 shows an example structural diagram of some components including a motor, a Hall sensor, and a photoelectric encoder, consistent with some embodiments of this disclosure.
  • the components can be used to implement the methods, consistent with some embodiments of this disclosure.
  • the left side of FIG. 4 shows a horizontal sectional view of the motor.
  • the motor includes a stator and a rotor, and the stator includes coil windings.
  • a coil winding is provided every 120 degrees, and a total of three coil windings are provided, such as U-phase winding, V-phase winding and W-phase winding.
  • the energized phase or coil current of each winding can be controlled, and the currents can be respectively referred to as U-phase current, V-phase current and W-phase current. These coils can be configured to generate magnetic flux when energized.
  • the rotor includes permanent magnets, as indicated by the magnets represented by N and S in FIG. 4. One pole pair of magnets are shown in FIG. 4, but more pole pairs can be provided in actual configurations. Similarly, more coil windings can also be provided, as long as the reversal speed and frequency of the current in the coil windings are matched with the rotor, so that the rotor can be continuously driven to rotate.
  • FIG. 5 illustrates an example method for determining a state of a code disc of a photoelectric encoder, consistent with some embodiments of this disclosure.
  • an example method 100 for determining a state of a code disc of a photoelectric encoder is provided.
  • Step S101 an angle at which the motor is located at a preset time point is determined based on an output signal of the Hall sensors.
  • the three Hall sensors can correspond to a U-phase winding, a V-phase winding, and a W-phase winding, respectively.
  • the three Hall sensors are in six states sequentially, from state 0 to state 5. For example, in state 0, the outputs of the three Hall sensors are (0, 0, 0) . In state 1, the outputs of the three Hall sensors are (1, 0, 0) . In state 2, the outputs of the three Hall sensors are (1, 1, 0) . In state 3, the outputs of the three Hall sensors are (1, 1, 1) . In state 4, the outputs of the three Hall sensors are (0, 1, 1) . In state 5, the outputs of the three Hall sensors are (0, 0, 1) . Then, it enters state 0 again in the next rotation cycle.
  • the preset time point is a time point when a jump occurs in the output signal of the Hall sensor, for example, a time point when a transition between various states occurs as shown in FIG. 6.
  • the angle at which the motor is located at that time point is determined. For example, at timestamp t1, the Hall sensor has just entered the state 0, and the angle of the motor at this time point can be determined.
  • the Hall sensor enters state 1 from state 0, and the angle of the motor at this time point can also be determined.
  • the minimum mechanical angle that can be identified by the Hall sensor in the installation structure as shown in FIG. 6 can be 7.5°.
  • two adjacent states are spaced apart by 7.5°.
  • the motor rotates to the position of 0°.
  • the motor rotates to the position of 7.5°.
  • the motor rotates to the position of 15°.
  • the angle at which the motor is located at the preset time point can be determined, based on the output signal of the Hall sensor by using the angular position corresponding to the output signal of the Hall sensor at the time point of the previous jump, plus the product of the known angular speed of the motor and the duration (e.g., the time between the preset time point and the time point of the previous jump) .
  • step S102 the angle at which the motor is located at the preset time point is determined based on an output of the photoelectric encoder.
  • a photoelectric encoder is provided on the output shaft of the motor.
  • the photoelectric encode includes a light source, a code disc, a photosensitive device (e.g., as an encoder) and an output circuit.
  • the code disc is provided with a plurality of openings along a circumference direction.
  • the light source and the photosensitive device are respectively arranged on both sides of the code disc.
  • the output signal of the photosensitive device can include a series of square wave signals, the current angle of the code disc and the motor can be determined through the output circuit.
  • the light source and the photosensitive device are respectively arranged on both sides of the code disc referring to FIG. 4.
  • the light source and the photosensitive device can also be provided on the same side of the code disc, the details are not described herein again.
  • FIG. 7 shows an example schematic diagram illustrating the output signal of the photoelectric encoder.
  • a pulse counter can be provided in the photoelectric encoder to count pulses of output signal of the photoelectric encoder. Each pulse corresponds to a certain rotation angle of the motor. The rotation angle can be determined based on the rotation speed of the motor and the number of openings on the code disc. The rotation angle of the code disc can be determined by obtaining the pulse count accumulated at the preset time point. Further, the angle of the motor at the preset time point can be determined.
  • step S103 whether the code disc is dirty is determined based on the angles determined by steps S101 and S102.
  • the code disc is coaxial with the motor.
  • the Hall sensor and the code disc can be calibrated, the error between the actual relative position and the expected relative position of the Hall sensor and the code disc can be within the preset range (e.g., no more than 0.1°) .
  • each state jump of the Hall sensor has a corresponding relationship to a certain code track on the code disc in terms of position.
  • the code track position at which the code disc is positioned and the angle of the motor at this time point can be determined based on the corresponding relationship.
  • the code track position at which the code disc is currently located and the angle of the code disc can also be determined.
  • the code track positions determined in the two ways are different or by comparing the deviation of the angles of the motor determined in the two ways, whether the code disc of the photoelectric encoder is dirty can be determined.
  • the angles determined in the steps S101 and S102 shall satisfy a preset matching relationship. And, their relative position also has a matching relationship. For example, at the time point when the output signal of the Hall sensor jumps from state 1 to state 2, the code disc can be rotated to the 211 th code track.
  • the code disc is dirty, there can be a relatively large deviation between the angle calculated by the Hall sensor and the angle calculated by the photoelectric encoder, which can exceed the preset threshold.
  • the pulses e.g., ⁇ i+2 and ⁇ i+3
  • the counting result is three, instead of the expected result of five, which leads to an error or deviations in the angle of the motor determined based on the output signal of the photoelectric encoder, as well as a large deviation between the angle of the motor determined based on the output signal of the photoelectric encoder and the angle of the motor determined based on the output signal of the Hall sensor.
  • the code disc is dirty can be determined when the difference between the angles determined based on the photoelectric encoder and the Hall sensor exceeds the preset threshold.
  • the code disc is not dirty can be determined when the difference between angles determined based on the photoelectric encoder and the Hall sensor exceeds the preset threshold.
  • the preset threshold can be set, referring to the measuring errors.
  • steps S101 and S102 are executed are not used to limit this disclosure. These steps can be executed successively in any order or can be executed simultaneously.
  • FIG. 8 illustrates an example angle measurement method for a motor, consistent with some embodiments of this disclosure. Referring to FIG. 8, an example angle measurement method 200 for a motor is provided, and a photoelectric encoder and a Hall sensor are provided on the motor.
  • step S201 an angle at which the motor is located at a preset time point is determined, based on an output signal of the Hall sensor.
  • step S202 an angle at which the motor is located at the preset time point is determined, based on an output signal of the photoelectric encoder.
  • step S203 whether the code disc of the photoelectric encoder is dirty is determined, based on the angles calculated in steps S201 and S102.
  • Steps S201, S202, and S203 can refer to the description related to the steps S101, S102, and S103 of example method 100, which are not be described herein again.
  • the preset time point can be a time point when a jump occurs in the output signal of the Hall sensor.
  • the angle of the motor can be calculated in two ways respectively. Whether the code disc is dirty or not is determined based on whether the two calculated angles match with each other. For example, when the difference between the angle calculated in step S201 and the angle calculated in step S202 exceeds a preset threshold, the code disc is dirty at its current position can be determined.
  • step S204 when the code disc is dirty, an angle of the motor at a subsequent time point is determined by using the output signal of the Hall sensor, or by using the output of the code disc before the code disc is dirty.
  • step S203 When it is determined at step S203 that the code disc is dirty, if the current output signal of the code disc is still used to determine the subsequent angle of the motor, relatively large calculation errors and accumulative errors can be caused.
  • the angle of the motor at a subsequent time point can be determined by using the output signal of the Hall sensor when the code disc is determined to be dirty. The accuracy of the measurement can be improved.
  • the term “asubsequent time point” and “the subsequent time point” can include one subsequent time point, or more than one subsequent time points.
  • FIG. 9 shows an example signal sequence diagram, consistent with some embodiments of this disclosure.
  • the state of the Hall sensor of the motor jumps at timestamp t 0 , t 1 , t 2 , t 3 , t 4 and t 5 , which can refer to the description related to FIG. 6.
  • the bottom of FIG. 9 shows the change of angle of the motor over time, which is plotted based on the output signal of the code disc after the code disc is dirty.
  • the code tracks of the code disc corresponding to the motor rotation angles of ⁇ i+1 ⁇ i+3 are dirty.
  • the output signal of the Hall sensor is maintained at the state 0.
  • the steps S201, S202 and S203 are performed once or repeatedly to determine whether the code disc is dirty.
  • the angle of the motor at a subsequent time point can be calculated by ( ⁇ 1 + ⁇ t i ) , where ⁇ 1 is the angle of the motor calculated based on the output signal of the Hall sensor at timestamp t 0 , ⁇ is the angular velocity of the motor, ⁇ t i is the duration from timestamp t 0 ′ to timestamp t 0 .
  • the results of the Hall sensor can be used, for example, the results of the Hall sensor can be used to interpolate. For example, when it is determined that the code disc is dirty at timestamp t 0 ′ between timestamp t 0 and timestamp t 1 , the accuracy of calculating the angle of the motor based on the output signal of the code disc is decreased.
  • the angle of the motor at the subsequent time point can also be determined based on the output signal of the code disc before the code disc is dirty.
  • the angle of the motor at a subsequent timestamp can be calculated by ( ⁇ 1 ′+ ⁇ t i ) ; where ⁇ 1 ′ is the angle of the motor calculated based on the output signal of the code disc of the photoelectric sensor at the timestamp t 0 , ⁇ is the angular velocity of the motor, ⁇ t i is the duration from the timestamp t 0 ′ to the timestamp t 0 .
  • the angle of motor can be determined based on the output of the photoelectric encoder.
  • the measurement accuracy of the photoelectric encoder is high, so the angular position of the motor is continuously calculated by using the output signal of the photoelectric encoder when the code disc is not dirty.
  • the angle of the motor at a subsequent time point can be determined and used as the measuring result, based on the output signal of the Hall sensor or based on the output signal of the code disc at a latest time point before the code disc is dirty.
  • the Hall sensor is made of magnetic material, the Hall sensor is not easy to absorb dirt, so the Hall sensor is not easily affected by dirt. The reliability of angle measurement can be improved or ensured by using the Hall sensor in angle measurement.
  • the angle measurement result from the code disc can be corrected based on the angle measurement result from the Hall sensor, at the time point when the output signal of the Hall sensor changes to the next state, to decrease or avoid continuous accumulation of errors caused by the dirty code disc.
  • the output signal of the Hall sensor includes state 1 and state 2, it is detected that the code disc is dirty during state 1, and the time point when the output signal jumps from state 1 to state 2 is taken as the first timestamp t 1 .
  • the S204 can include: before the first timestamp t 1 , the angle of the motor at a subsequent time point is determined by using the output signal of the Hall sensor or by using the output signal of the code disc at a latest time point before the code disc is dirty, and the angle of the motor at the subsequent time point is taken as a measurement result.
  • the angle measurement result from the code disc can be corrected based on the angle measurement result from the Hall sensor.
  • the relative position of the code disc and the Hall sensor is fixed and known, for example, at the timestamp t 1 (i.e., when the output signal jumps from state 0 to state 1) , the angular position of the motor calculated based on the Hall sensor is 15°, the code disc should be located on the 101 st code track ideally (ideally, the result of the calculation shall also be 15°) .
  • due to the dirt of the code disc 12° is obtained by using the rising edges of the output result of the code disc. Then, the angle of the code disc at timestamp t 1 is corrected to 15°.
  • the calculation is performed by taking 15°instead of 12°, as a starting point to perform interpolation for subsequent time points.
  • the accumulation of errors can be decreased or avoided.
  • the position of the motor at timestamp t0′ can be calculated in accordance with (15°+ ⁇ (t 1 ′-t 1 ) ) .
  • a code track of the code disc corresponding to an angle range of ⁇ i+1 - ⁇ i+3 is dirty, at timestamp t 0 , the code disc is not dirty, and the rotation angle of the motor can be correctly determined as ⁇ i+1 based on the output signal of the code disc.
  • the rotation angle of the motor is incorrectly determined as ⁇ i+1 based on the output signal of the code disc.
  • the output signal does not have the same number of rising edges as that when it is not dirty. If the code disc is not corrected at this time, the errors can be accumulated continually.
  • the angle of the motor is determined as ⁇ i+2 based on the output signal generated when the code disc is dirty.
  • the errors are accumulated continually, so that the angle deviation between the angle of the motor determined based on the code disc and the actual angle of the code disc can become larger.
  • the LiDAR transmits and receives laser at a preset angular position to perform ranging. If the angle cannot be measured correctly, the orientation of the transmission-and-reception ranging can be wrong, and the subsequent point cloud map generated based on the ranging results can be wrong as well.
  • the rotation angle of the motor determined based on output signal of the code disc can be corrected, based on the relative position relationship between the code disc and the Hall sensor.
  • the relative position relationship can be determined during installation or calibration. Still referring to FIG. 9, the rotation angle of the motor is corrected to ⁇ i+2 . If the code disc is no longer dirty on the code track corresponding to the angle range of ⁇ i+2 ⁇ ⁇ i+3 , the angle is determined by taking the corrected angle as the starting point, and there can be no deviation. For example, as shown in FIG. 9, from timestamp t 2 , the code tracks that the code disc is rotated over are not dirty any more (e.g., the dirty area has been rotated over) .
  • the rotation angle of the motor is corrected to ⁇ i+4 based on the Hall sensor.
  • the subsequent output signal of the code disc is restored to an output when it is not dirty, the rotation angle of the motor determined by the output of the code disc can be accurate and correct.
  • the angle measurement result from the code disc can be corrected accordingly by using the angle measurement result from the Hall sensor.
  • the continuous accumulation of errors due to the dirty code disc can be reduced or avoided,
  • the error correction can be realized in time.
  • the output of the code disc can be used to determine the rotation angle of the motor again. High-precision angle measurement can continue to be provided.
  • the dirty area of the code disc is relatively small (e.g., the dirty area occupies the code disc about four or five code tracks) , but the deviation in measuring the angle of the motor can become larger due to the accumulation of errors.
  • the error can be corrected in time in some embodiments of this disclosure.
  • the replacement of the code track can be decreased or avoided, the accuracy and safety of the angle measurement can be improved or ensured when the dirty area is small.
  • the method 200 can include the following steps.
  • an angle at which the motor is located at a second time point is calculated, based on the output signal of the Hall sensor; the second time point is any time point between the timestamp t 1 and the timestamp t 2 as shown in FIG. 9.
  • an angle at which the motor is located at the second time point is calculated based on the output of the photoelectric encoder.
  • the steps S206, S207, and S208 can be performed once or repeatedly to determine whether the code disc is still dirty. After entering a new state, it is continuously determined whether code disc is dirty. If the code disc is dirty, the data of the Hall sensor is used to calculate the angle of the motor; if the code disc is not dirty, the angle of the motor is calculated repeatedly by using the output of the photoelectric sensor, and a correction is made to the code disc when it jumps to the next state.
  • high-precision angle measurement is achieved by the code disc, while the angle of the code disc is corrected by the output signal of the Hall sensor (e.g., through a time point when the state of the output signal of the Hall sensor changes) .
  • the influence of the dirty code disc can be reduced. For example, in FIG. 9, at timestamp t1, the angle of the code disc at this time point is ⁇ i+2 , the code disc takes ⁇ i+2 as the starting point, the previous wrong angles are not accumulated.
  • the calculation results of the Hall sensor and the code disc can be compared.
  • the calculation results of the Hall sensor can be used, to improve or ensure the reliability of the code disc (e.g., to improve or ensure the possibility of the code disc still work when the code disc is dirty) , and to decrease or avoid the accumulated error caused by the dirt of the code disc, as the angle of the code disc can be corrected when the state jumps.
  • current in each coil winding can be controlled by a controller based on the current position of the rotor, the magnetic field generated by the coil winding changes.
  • the permanent magnet of the rotor can be driven to rotate.
  • the control process for the motor can be referred to Field Oriented Control (FOC) , for example, the motor rotor can be driven based on the current position of the rotor by controlling the relative amplitude and on-off of the current in the U phase winding, V phase winding and W phase winding in real time.
  • FOC Field Oriented Control
  • Vector control FOC is a control method for three-phase current vector.
  • the three-phase current vector is transformed into a rotating two-phase DC scalar, to control the exciting current iM and torque current Ti respectively.
  • the speed regulation performance of the asynchronous motor is similar to that of the DC motor.
  • Vector control can be referred to Field Oriented Control.
  • the output result of the Hall sensor can be continuously used for the Field Oriented Control for the motor, the stability and reliability of the FOC control can be improved.
  • the output of the Hall sensor can be used to perform the Field Oriented Control for the motor when the code disc is dirty; the output of the photoelectric encoder can be used to perform the Field Oriented Control for the motor when the code disc is not dirty.
  • FIG. 10 illustrates an example angle measurement method 300 for a motor consistent with some embodiments of this disclosure. Referring to FIG. 10, the example angle measurement method 300 is described.
  • step S301 the example angle measurement method 300 starts.
  • step S302 from a first jump point of the Hall sensor, whether the code disc is dirty is once or repeated determined through, for example, the steps S101, S102, and S103, or steps S201, S202, and S203 above.
  • the angle of the motor can be determined by the output signal of the photoelectric encoder and the output signal of the Hall sensor, respectively. The two angles determined can be cross-checked. When there is a deviation between the angles of the motor determined in the above two ways or when the deviation exceeds a threshold, the code disc can be determined to be dirty. Or it is determined that the code disc is not dirty when there is no deviation between the angles of the motor determined in the above two ways or when the deviation does not exceed the threshold. If the code disc is determined to be dirty, the method proceeds to step S303, or if the code disc is determined to be not dirty, the method proceeds to step S304.
  • step S303 before the second jump point, the angle of the motor is calculated by using the output signal of the Hall sensor, and then the method proceeds to step S305.
  • step S303 because the code disc is determined to be dirty, the angle of the motor is calculated by using the output signal of the Hall sensor instead of the output signal of the photoelectric encoder.
  • step S305 at the second jump point, the angle of the motor calculated based on the output signal of the Hall sensor is used to correct the angle of the code disc to decrease or avoid accumulation of errors caused by the dirty code disc, and then the method proceeds to step S306.
  • step S304 because the code disc is not dirty, the angle of motor is calculated by using the output signal of the photoelectric encoder, and then the method proceeds to step S306.
  • step S306 starting from the second jump point of the Hall sensor, that is, during state 2, whether the code disc is dirty is continuously determined. If the code disc is determined to be dirty, the method proceeds to Step S307. Or if the code disc is determined to be not dirty, the method proceeds to Step S308.
  • step S307 before the third jump point, the angle of the motor is calculated by using the output signal of the Hall sensor, and the method proceeds to step S309, in which, at the third jump point, the angle of the code disc is corrected to avoid accumulation of errors caused by the dirty code disc.
  • the angle of the motor can be calculated by using the output signal of the photoelectric encoder.
  • step S302 determines whether the code disc is dirty during the state 0 from the first jump point of the Hall sensor.
  • FIG. 11 shows a schematic diagram illustrating an example perspective structure of a LiDAR from top view, consistent with some embodiments of this disclosure.
  • an example perspective structure of the LiDAR from top view is provided.
  • a housing of the light detection device is not shown in the drawings.
  • the lateral plane can be a plane perpendicular to a height direction of the light detection device, such as a horizontal plane or other plane.
  • the light detection device 30 includes a window 31.
  • a transmitted signal can be transmitted and an echo signal can be received through the window 31.
  • the echo signal is generated by the transmitted signal after being reflected on an object.
  • the window 31 can be provided with a planar window glass.
  • the window 31 can also be of a curved structure.
  • the light detecting device 30 includes a light transmitting end 32 and a light detecting end 33.
  • the light transmitting end 32 is configured to output a transmitted signal.
  • the light detecting end 33 is configured to detect the echo signal of the transmitted signal.
  • a space can be formed inside the housing for arranging the light transmitting end 32 and the light detecting end 33.
  • the light transmitting end 32 can include an array of light transmitters.
  • each light transmitter can include a laser, such as a vertical cavity surface emitting laser (VCSEL) , or an edge emitting laser (EEL) , or the like.
  • VCSEL vertical cavity surface emitting laser
  • EEL edge emitting laser
  • the light detection end 33 can include an array of light detectors, the light detectors (can also be called as detectors, or photoelectric detectors) can be implemented by some components, such as avalanche photo diodes (APD) , Silicon Photo Multiplier (SiPM) , an array of SPAD (s) or the like.
  • APD avalanche photo diodes
  • SiPM Silicon Photo Multiplier
  • SPAD SPAD
  • the LiDAR 30 further includes a light signal redirection member 41.
  • Redirection can refer to process the optical signal through light reflection, refraction, transmission, or the like, to change/deflect the direction of the input light signal and re-determine the transmission direction of the output light signal.
  • the light signal redirection member 41 is configured to rotate, continuously deflect the transmitted signal during the rotation process, the transmitted signal is emitted from the window 31 of the light detection device 30 to achieve a scanning of the field of view in the second direction and redirection of the echo signal, so that the echo signal is transmitted to the light detection end 32.
  • the motion of the light signal redirection member 41 varies.
  • the light signal redirection assembly 34 can be rotatable (e.g., the light signal redirection assembly is a rotating mirror in a scanning LiDAR of rotating mirror type) .
  • the rotating mirror can be driven to rotate by a motor, such as a rotation of 300° or 360° in a clockwise direction, or a reciprocal motion (e.g., rotation back and forth between -50° and +50°) , to cover the horizontal field of view of the LiDAR.
  • a motor such as a rotation of 300° or 360° in a clockwise direction, or a reciprocal motion (e.g., rotation back and forth between -50° and +50°) , to cover the horizontal field of view of the LiDAR.
  • a Hall sensor (not shown in FIG. 11) and a photoelectric encoder (not shown in FIG. 11) can be provided in the motor, and the photoelectric encoder can be installed on the output shaft of the motor.
  • the rotating member 41 rotates under control, the example in FIG. 11 illustrates one-dimensional rotation in a lateral plane (in the counterclockwise direction indicated by the arrow in the FIG. 11) so that scanning of the horizontal field of view (relative to the direction of the vertical field of view) can be achieved.
  • the scanning way is not limited in this disclosure.
  • the angle of the orientation of the light detection device can also be changed. For example, as compared to FIG. 11, the scanning of the vertical field of view by one-dimensional rotation of the rotating member is achieved by rotating 90 degrees, the scanning of the horizontal field of view also can be performed by the light transmitters arranged in "row” instead of in "column” .
  • the rotating member 41 can be placed outside the rotating shaft of a motor.
  • the rotating member 41 can rotate along with the rotation of the rotating shaft driven by the motor.
  • the rotating member 41 can include at least one reflection surface, the at least one reflection surface is used by an optical path of the transmitted signal and an optical path of the received signal. When there is only one reflection surface, the optical path of transmitted signal and the optical path of received signal can share this reflection surface. When there are more than one refection surfaces, the optical path of the transmitted signal and the optical path of the received signal may not share the same reflection surface of the rotating member 41. Still referring to FIG. 11, the rotating member 41 is illustrated as a rectangular body, the two opposite vertical sides 411 and 412 can be reflection surfaces.
  • the transmitted signal can be deflected by the reflection surface 411 to the window 31, and the transmitted signal can pass through the window 31 and can be transmitted to environment outside the light detection device for detection. If the transmitted signal encounters an obstacle and generates an echo signal, the echo signal is incident on the reflection surface 411 through window 31, and then incident on the detector 33 after being deflected by the reflection surface 411.
  • the first redirection member 42 is located in the optical path of the transmitted signal and the optical path of the received signal.
  • the first redirection member 42 can be configured to output the transmitted signal to the rotating member 41, and form a passage portion for the echo signal to pass through.
  • the first redirection member 42 can be implemented by a mirror, which can have one reflection surface 421.
  • the reflection surface 421 is used to reflect the transmitted signal transmitted from the light transmitting end 32 onto the rotating member 41, and when the rotating member 41 is rotated to a preset position (e.g., the position shown in FIG. 11) , the reflection surface 411 or 412 of the rotating member 41 can receive the transmitted signal and deflect it to the window, and the transmitted signal is emitted to the outside.
  • the passage portion is shown as gaps 43 located on two sides of the first redirection member 42.
  • the gap can be formed between the first redirection member 42 and the inner wall of the housing of the light detection device. Or the gap can be formed between the first redirection member 42 and other parts arranged within the housing (e.g., a bracket, or the like) .
  • the echo signal in the optical path of the received signal, is reflected by the reflection surface 411 of the rotating member 41 and transmitted to the first redirection member 42.
  • the echo signal passes through the gaps 43 on the side of the first redirection member 42 and is received by the light detection end 33.
  • the rotating member 41 can be rotated continuously to transmit the transmitted signal and receive the echo signal at different time points.
  • the rotating member 41 can also be rotated in a reciprocating manner to transmit the transmitted signal and receive the echo signal at different time points.
  • the rotation speed of the rotating member 41, the number of reflection surfaces, and the switching speed for transmission of the adjacent lasers can affect the frame rate of point cloud detection of the LiDAR, and the factors can be coordinated to achieve the detection in a preset frame rate. When the detection frame rate is fixed, the larger the number of reflection surfaces is, the lower the desired rotation speed is.
  • the rotation speed of the rotating member 41 and the number of reflection surfaces can be set based on the actual detection requirements.
  • the number of reflection surfaces can be associated with the structure of the rotating member 41, which can be at least two, such as two, three, four or more.
  • the rotating member 41 can be a prism.
  • the cross section of the rotating member 41 can be axisymmetric or centrosymmetric to achieve uniform transmission and reception of light signals over time.
  • the rotating member 41 is a prism with a rectangular cross-section as shown in FIG. 11, the two opposite surfaces of the rotating member 41 can be the reflection surfaces.
  • the rotating member 41 is a prism with a square cross-section, and four sides of the rotating member 41 can be reflection surfaces.
  • the rotating member 41 is a prism with an equilateral triangular cross-section, and three sides of the rotating member 41 can be reflection surfaces.
  • Rotating member 41 can also be implemented by a prism having a polygon cross section with more sides (e.g., a pentagon, a hexagon, or the like) , this disclosure is not limited.
  • the LiDAR can further include a controller, the controller can be electrically coupled to the Hall sensor and the photoelectric encoder, and can be configured to calculate an angle of the output shaft of the motor based on the output signal of the photoelectric encoder and the output signal of the Hall sensor.
  • the controller is configured to perform the following operations.
  • the controller determines an angle at which the motor is located at a preset time point based on an output signal of the Hall sensor.
  • the controller determines the angle at which the motor is located at the preset time point based on an output signal of the photoelectric encoder.
  • the controller determines whether a code disc of the photoelectric encoder is dirty based on the angles calculated in operations S101 and S102.
  • the preset time point is a time point when a jump occurs in the output signal of the Hall sensor.
  • the controller can be configured to determine that the code disc is dirty at a current position when a difference between the angle calculated in step S201 and the angle calculated in step S202 exceeds a preset threshold.
  • the controller can be configured to determine the angle of the motor according to the output of the photoelectric encoder when the code disc is not dirty.
  • the output signal of the Hall sensor includes a first state and a second state, and a time point when the output signal of the Hall sensor jumps from the first state to the second state is a first time point
  • the controller can be configured to: when the code disc is detected to be dirty during the first state, determine, before the first time point, the angle of the motor at a subsequent time point by using the output signal of the Hall sensor or the output of the code disc at a latest time point before the code disc is dirty, and take the angle of the motor at the subsequent time point as a measurement result.
  • the result of Hall sensor when being used in the LiDAR, if it is determined that the code disc is dirty, the result of Hall sensor can be used to interpolate during the first state (e.g., ( ⁇ 1 + ⁇ t i ) ( ⁇ is a rotation speed) ) to perform the FOC control for the motor and provide the information of the angle to the LiDAR, to control the transmission-and-reception ranging.
  • the angle measurement results from the code disc are ignored.
  • ⁇ t i is a time difference from time point T 1
  • the rotation speed ⁇ of the motor is uniform by default.
  • the controller can be configured to correct, at the first time point, an angle measurement result from the code disc according to an angle measurement result from the Hall sensor.
  • the controller can be configured to perform the following operations.
  • the controller calculates an angle at which the motor is located at a second time point based on the output signal of the Hall sensor.
  • the controller calculates an angle at which the motor is located at the second time point based on the output of the photoelectric encoder.
  • the controller determines whether the code disc of the photoelectric encoder is dirty based on the angles calculated in operations S206 and S207.
  • the controller calculates the angle of the motor by using the output signal of the Hall sensor after the second time point; or when the code disc is determined to be not dirty, calculate the angle of the motor by using the output of the photoelectric encoder.
  • the controller can be configured to perform Field Oriented Control for the motor by using the output of the Hall sensor when the code disc is dirty; perform Field Oriented Control for the motor by using the output of the photoelectric encoder when the code disc is not dirty.
  • the angle of the motor can be obtained more accurately, and the motor can be controlled more precisely.
  • the influence of angle errors caused by dirty code disc of the photoelectric encoder and accumulative errors, can be reduced or avoided.
  • This is advantageous in controlling the LiDAR.
  • a laser can be accurately controlled to transmit a detection light beam at a certain accurate angular position, control a detection unit to receive echo, and match the distance measurement results with the angles in the process of data processing to obtain an accurate three-dimensional point cloud map of the surrounding environment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Power Engineering (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)
  • Optical Transform (AREA)

Abstract

Provided herein is a method for determining a state of a code disc of a photoelectric encoder, an angle measurement method for a motor and a LiDAR. The code disc rotates with a rotor of a motor, and the motor includes a Hall sensor. The method for determining a state of a code disc of a photoelectric encoder includes determining a first angle at which the motor is located at a preset time point based on an output signal of the Hall sensor (S101); determining a second angle at which the motor is located at the preset time point based on an output of the photoelectric encoder (S102); and determining whether the code disc is dirty based on the first angle and the second angle (S103).

Description

METHOD FOR DETERMINING STATE OF CODE DISC, ANGLE MEASUREMENT METHOD AND LIDAR
CROSS-REFERENCE TO RELATED APPLICATION (S)
This application claims priority to Chinese Patent Application No. 202211537407.9, filed on December 1, 2022, the content of which is incorporated herein by reference in its entirety.
TECHNICAL FIELD
This disclosure relates to a field of three-dimensional detection, in particular to methods for determining a state of a code disc of a photoelectric encoder, angle measurement methods and LiDARs.
BACKGROUND
Photoelectric encoders are sensors that can convert a mechanical geometric displacement of an output shaft into a pulse digital signal, through optical-electrical conversion. The photoelectric encoder can include a photoelectric code disc and a photoelectric detection device. The photoelectric code disc can be a circular plate with a certain diameter. Several rectangular holes can be equally arranged on the circular plate. As the photoelectric code disc is coaxial with the motor, the detection device can detect and output a corresponding pulse signal when the motor rotates. Typically, two square wave signals A and B with a certain phase difference therebetween can be output. The rotation direction of the motor can be determined through the two output signals.
Currently, photoelectric encoders are widely used in various angle measurement and control schemes. FIG. 1 and FIG. 2 illustrates example waveform signals output by photoelectric sensor when the code disc is clean or the code disc is dirty. Referring to FIG. 1, a typical photoelectric encoder can include a light source, such as an LED, a code disc, and a photoelectric sensor. Small holes evenly arranged on the code disc. The light beam emitted by the light source can pass through the small holes on the code disc and be illuminated onto the photoelectric sensor, generating pulse signals. These pulse signals can be sent to a data processing device to determine a rotation speed of the code disc and a current angular orientation. Referring to FIG. 2, two photoelectric sensors A and B with a certain phase difference can be used. The direction of the motor can be determined by analyzing the output signals of both sensors. For a mechanical rotating LiDAR, objects in the surroundings can be detected by a 360° rotation. A LiDAR of a rotating mirror type can use a motor to drive the rotating mirror. The code disc can be used for the angle measurement of the mechanical rotating LiDAR and the LiDAR with a rotating mirror. The accuracy of the angle measurement is important to the determination of the rotation angle of the LiDAR in real time, and is crucial for determining the  transmitting and receiving directions of the laser.
The code disc of the photoelectric encoder is easily to be dirty. Once it is dirty, the accuracy of angle measurement can be decreased. Still referring to FIG. 2, waveform 2 output by the photoelectric sensor B is significantly different from a normal waveform because of the dirt. For example, the entire waveform is significantly delayed in the time domain, and the pulse width decreases.
Furthermore, the angle error caused by the dirty code disc can be accumulated. In the cases that there are multiple dirty areas or there is a large dirty area, the accumulated error can cause the angle of the code disc to deviate further from the true angle. For example, FIG. 3 illustrates, from top to bottom, an output signal 31 of the code disc when it is not dirty, an output signal 32 of the code disc when it is dirty, and the angle result 33 of the code disc determined based on the output signal 32.Angle measurement of the code disc takes a rising edge triggering rule. As illustrated in the output signal 31, a first rising edge indicates an angle δ1, a second rising edge indicates an angle δ2, ..., an ith rising edge indicates an angle δi, a (i+1) th rising edge indicates an angle δi+1.... The dirty area shown in the output signal 32 is visible. For example, when the code track on the code disc corresponding to angles δi+1~δi+4 is dirty, the output signal of the code disc changes from the output signal 31 to the output signal 32, the rising edges corresponding to δi+1~δi+4 are missing. In this case, based on the rising edge triggering rule, it can be seen from the result 33 that: an angle, which is supposed to be δi+4 based on the output signal 31, is determined to be δi+2 based on the rising edge, due to blocking by the dirty area. Further, if the error continues to be accumulated in this way, the subsequent results would continue to be accumulated on basis of the error. The difference between the rotation angle of the motor reflected by the code disc and the true angle becomes larger and larger.
In the existing technology, the angle from the code disc is used for motor control, which greatly increases the possibility of motor stalling or abnormality in rotation speed. How to identify in time when the code disc is dirty and provide angle measurement results with relatively high accuracy has become an urgent problem to be solved.
SUMMARY
In a first aspect, this disclosure provides a method for determining a state of a code disc of a photoelectric encoder. The code disc rotates with a rotor of a motor. The motor further includes a Hall sensor. The method includes: S101: determining an angle at which the motor is located at a preset time point based on an output signal of the Hall sensor; S102: determining the angle at which the motor is located at the preset time point based on an output of the photoelectric encoder; and S103: determining whether the code disc is dirty based on the angles determined in steps S101 and S102.
Optionally, the preset time point is a time point when a jump occurs in the output signal of the Hall sensor.
Optionally, the step S103 includes: determining that the code disc is dirty when a difference between the angle calculated in the step S101 and the angle calculated in the step S102 exceeds a predetermined threshold.
In a second aspect, this disclosure also provides an angle measurement method for a motor. A photoelectric encoder and a Hall sensor are provided on the motor. The angle measurement method includes: S201: determining an angle at which the motor is located at a preset time point based on an output signal of the Hall sensor; S202: determining the angle at which the motor is located at the preset time point based on an output of the photoelectric encoder; S203: determining whether a code disc of the photoelectric encoder is dirty based on the angles calculated in steps S201 and S202; and S204: when the code disc is dirty, determining an angle of the motor at a subsequent time point by using the output signal of the Hall sensor or by using the output of the code disc before the code disc is dirty.
Optionally, the preset time point is a time point when a jump occurs in the output signal of the Hall sensor.
Optionally, the step S203 includes: determining that the code disc is dirty at a current position when a difference between the angle calculated in step S201 and the angle calculated in step S202 exceeds a predetermined threshold.
Optionally, the angle measurement method further includes: when the code disc is not dirty, determining the angle of the motor based on the output of the photoelectric encoder.
Optionally, the output signal of the Hall sensor includes a first state and a second state, and a time point when the output signal of the Hall sensor jumps from the first state to the second state is a first time point, and the S204 further includes: when the code disc is detected to be dirty during the first state, determining, before the first time point, the angle of the motor at a subsequent time point by using the output signal of the Hall sensor or by using the output of the code disc at a latest time point before the code disc is dirty, and taking the angle of the motor at the subsequent time point as a measurement result.
Optionally, the angle measurement method further includes: at the first time point, correcting an angle measurement result from the code disc based on an angle measurement result from the Hall sensor.
Optionally, the angle measurement method further includes: S206: after the first time point, calculating an angle at which the motor is located at a second time point based on the output signal of the Hall sensor; S207: calculating an angle at which the motor is located at the second time point based on the output of the photoelectric encoder; S208: determining whether the code disc of the photoelectric encoder is dirty based on the angles calculated in steps S206 and S207; S210: when the code disc is dirty, calculating the angle of the motor by using the output signal of the Hall sensor after  the second time point; otherwise, calculating the angle of the motor by using the output of the photoelectric encoder.
Optionally, the angle measurement method further includes: when the code disc is dirty, using the output of the Hall sensor to perform Field Oriented Control for the motor; when the code disc is not dirty, using the output of the photoelectric encoder to perform Field Oriented Control for the motor.
In a third aspect, this disclosure also provides a LiDAR, including: an opto-mechanical rotor; and a motor, a photoelectric encoder, and a controller. The opto-mechanical rotor is installed on an output shaft of the motor and is driven to rotate by the motor. The motor includes a Hall sensor. The photoelectric encoder is installed on the output shaft of the motor. The controller is electrically coupled to the Hall sensor and the photoelectric encoder, and is configured to calculate an angle of the output shaft of the motor based on the output signal of the photoelectric encoder and the output signal of the Hall sensor respectively, wherein, the controller is configured to perform the following operations: S201: determining an angle at which the motor is located at a preset time point based on an output signal of the Hall sensor; S202: determining the angle at which the motor is located at the preset time point based on an output of the photoelectric encoder; S203: determining whether a code disc of the photoelectric encoder is dirty based on the angles calculated in operations S201 and S202; and S204: when the code disc is dirty, determining an angle of the motor at a subsequent time point by using the output signal of the Hall sensor or by using the output of the code disc before the code disc is dirty.
Optionally, the preset time point is a time point when a jump occurs in the output signal of the Hall sensor.
Optionally, the controller is configured to determine that the code disc is dirty at a current position when a difference between the angle calculated in operation S201 and the angle calculated in operation S202 exceeds a predetermined threshold.
Optionally, the controller is configured to determine the angle of the motor based on the output of the photoelectric encoder when the code disc is not dirty.
Optionally, the output signal of the Hall sensor includes a first state and a second state, and a time point when the output signal of the Hall sensor jumps from the first state to the second state is a first time point, wherein, the controller is configured to: when the code disc is determined to be dirty during the first state, determine, before the first time point, the angle of the motor at a subsequent time point by using the output signal of the Hall sensor or by using the output of the code disc at a latest time point before the code disc is dirty, and take the angle of the motor at the subsequent time point as a measurement result.
Optionally, the controller is configured to correct, at the first time point, an angle  measurement result from the code disc based on an angle measurement result from the Hall sensor.
Optionally, the controller is configured to perform the following operations: S206: after the first time point, calculate an angle at which the motor is located at a second time point based on the output signal of the Hall sensor; S207: calculate an angle at which the motor is located at the second time point based on the output of the photoelectric encoder; S208: determine whether the code disc of the photoelectric encoder is dirty based on the angles calculated in operations S206 and S207; S210: when the code disc is dirty, calculate the angle of the motor by using the output signal of the Hall sensor after the second time point; otherwise, calculate the angle of the motor by using the output of the photoelectric encoder.
Optionally, the controller is configured to perform Field Oriented Control for the motor by using the output of the Hall sensor when the code disc is dirty; perform Field Oriented Control for the motor by using the output of the photoelectric encoder when the code disc is not dirty.
In a fourth aspect, this disclosure provides a method, including: determining a first angle, a motor is located at the first angle at a preset time point based on an output signal of a Hall sensor; determining a second angle, the motor is located at the second angle at the preset time point based on an output of a photoelectric encoder; determining, based on the first angle and the second angle, whether a code disc is dirty. The photoelectric encoder includes the code disc. The code disc rotates with a rotor of the motor. The motor includes the Hall sensor.
Optionally, the preset time point is the time point when a jump occurs in the output signal of the Hall sensor.
Optionally, determining, based on the first angle and the second angle, whether a code disc is dirty comprises: determining the code disc is dirty when a difference between the first angle and the second angle exceeds a predetermined threshold.
Optionally, the method further includes: before the code disc is determined to be dirty, determining, based on the output signal of a Hall sensor or the output signal of the code disc, an angle of the motor at a subsequent time point.
Optionally, the method further includes: based on a determination that the code disc is not dirty, determining, based on the output of the photoelectric encoder, the angle of the motor.
Optionally, the method further includes: the output signal of the Hall sensor comprises a first state and a second state, the preset time point comprises a first time point, the first time point is a time point when the output signal of the Hall sensor jumps from the first state to the second state, and the determining, based on the output signal of a Hall sensor or the output signal of the code disc, an angle of the motor at a subsequent time point comprises: before the first time point and based on a determination that the code disc is dirty during the first state, determining the angle of the motor at a subsequent time point based on the output signal of the Hall sensor or the output signal of the code  disc at a latest time point before the code disc is determined to be dirty, and taking the angle of the motor at the subsequent time point as a measurement result.
Optionally, the method further includes: correcting, based on an angle measurement result from the Hall sensor, an angle measurement result from the code disc at the first time point.
Optionally, the method further inlcudes: determining, based on the output signal of the Hall sensor, a third angle, wherein the motor is located at the third angle at a second time point, and the second time point is later than the first time point; determining, based on the output signal of the photoelectric encoder, a fourth angle, wherein the motor is located at the fourth angle at the second time point; and determining, based on the third angle and the fourth angle, the code disc of the photoelectric encoder is dirty.
Optionally, the method further includes: based on a determination that the code disc is dirty, determining the angle of the motor after the second time point based on the output signal of the Hall sensor; or based on a determination that the code disc is not dirty, determining, the angle of the motor after the second time point based on the output signal of the photoelectric encoder.
Optionally, the method further includes: performing, based on the output signal of the Hall sensor, field-oriented control for the motor when the code disc is determined to be dirty.
Optionally, the method further includes: performing, based on the output signal of the photoelectric encode, field-oriented control for the motor when the code disc is determined to be not dirty.
Without changing the hardware design of the product, whether the code disc of the photoelectric encoder is dirty can be determined in time. The Hall sensor can be used to calibrate the code disc. The accurate angle measurement results can be obtained by using the code disc after the dirty area is skipped. Efficient feedback control can be performed on the motor, cost can be saved and dirt can be resisted.
BRIEF DESCRIPTION OF THE DRAWINGS
The drawings are used to provide further understanding to this disclosure and form a part of this specification, and the drawings together with the embodiments of this disclosure are used to explain this disclosure, which do not limit this disclosure. In the drawings:
FIG. 1 illustrates an example waveform signal output by the photoelectric sensor when the code disc is not dirty.
FIG. 2 illustrates an example waveform signal output by the photoelectric sensor when the code disc is dirty.
FIG. 3 illustrates an example of influencing on the angle calculation caused by dirt on the code disc of the photoelectric encoder.
FIG. 4 shows an example structural diagram of some components including a motor, a Hall sensor, and a photoelectric encoder, consistent with some embodiments of this disclosure.
FIG. 5 illustrates an example method for determining a state of a code disc of a photoelectric encoder, consistent with some embodiments of this disclosure.
FIG. 6 illustrates example output signals of three Hall sensors during one rotation cycle T of the motor.
FIG. 7 shows an example schematic diagram illustrating the output signal of the photoelectric encoder.
FIG. 8 illustrates an example angle measurement method for a motor, consistent with some embodiments of this disclosure.
FIG. 9 shows an example signal sequence diagram, consistent with some embodiments of this disclosure.
FIG. 10 illustrates an example angle measurement method for a motor, consistent with some embodiments of this disclosure.
FIG. 11 shows a schematic diagram illustrating an example perspective structure of a LiDAR from top view, consistent with some embodiments of this disclosure.
DETAILED DESCRIPTION
In the following, some embodiments are provided to understand the disclosure. The methods provided in this disclosure can include more or less steps, the apparatus provided in this disclosure can include more or less parts. Accordingly, the drawings and descriptions are to be regarded as illustrative and not restrictive.
In this disclosure, the orientation or position relations denoted by the terms “central” “longitudinal” “latitudinal” “length” “width” “thickness” “above” “below” “front” “rear” “left” “right” “vertical” “horizontal” “top” “bottom” “inside” “outside” “clockwise” “counterclockwise” and the like are based on the orientation or position relations, consistent with some accompanying drawings, and are used only for the purpose of facilitating description of this disclosure and simplification of the description, instead of indicating or suggesting that the denoted devices or elements must be oriented specifically, or configured or operated in a specific orientation. Thus, these terms should not be construed to limit this disclosure. The terms as “first” and “second” are only used for the purpose of description, rather than indicating or suggesting relative importance or implicitly indicating the number of the denoted technical features. Accordingly, features defined with “first” and “second” can, expressly or implicitly, include one or more of the features. In the description of this disclosure, “plurality” means two or more, unless otherwise defined explicitly and specifically.
In this disclosure, unless otherwise specified and defined explicitly, such terms as  “installation” “coupling” and “connection” should be broadly understood as, for example, fixed connection, detachable connection, or integral connection; or mechanical connection, electrical connection or intercommunication; or direct connection, or indirect connection via an intermediary medium; or internal communication between two elements or interaction between two elements. For those skilled in the art, the meanings of such terms herein can be construed in light of the circumstances.
In this disclosure, unless otherwise specified and defined explicitly, if a first feature is “on” or “beneath” a second feature, this can cover direct contact between the first and second features, or contact via another feature therebetween, other than the direct contact. Furthermore, if a first feature is “on” , “above” , or “over” a second feature, this can cover the case that the first feature is right above or obliquely above the second feature, or just indicate that the level of the first feature is higher than that of the second feature. If a first feature is “beneath” , “below” , or “under” a second feature, this can cover the case that the first feature is right below or obliquely below the second feature, or just indicate that the level of the first feature is lower than that of the second feature.
The term “multiple” in this disclosure refers to a number of two or more. For example, multiple objects can include two objects, or more than two objects. The term “at least one” in this disclosure refers to a number of one or more. For example, at least one object can include one object, or two objects, or ten objects, or the like.
The disclosure below provides many different embodiments or examples so as to realize different structures described herein. In order to simplify the disclosure, the description of the parts and arrangements embodied in specific examples is given by the following. They are only some examples, not intended to limit this disclosure. Besides, this disclosure can repeat a reference number and/or reference letter in different examples, and such repeat is for the purpose of simplification and clarity, which does not represent any relation among various embodiments and/or arrangements as discussed. In addition, this disclosure provides examples of various specific processes and materials, but those skilled in the art can also be aware of application of other processes and/or use of other materials.
This disclosure is described as follows in conjunction with the drawings.
This disclosure provides a method for determining a state of the code disc of the photoelectric encoder, and an angle measurement method for a motor. By using a Hall sensor already included in the motor, whether the code disc is dirty can be determined by using both an output signal of the Hall sensor as well as an output signal of the photoelectric encoder, and in the case that the code disc is dirty, an angle of the code disc can be corrected in time, the problem due to accumulation of errors can be avoided or decreased.
FIG. 4 shows an example structural diagram of some components including a motor, a Hall  sensor, and a photoelectric encoder, consistent with some embodiments of this disclosure. The components can be used to implement the methods, consistent with some embodiments of this disclosure. The left side of FIG. 4 shows a horizontal sectional view of the motor. Referring to FIG. 4, the motor includes a stator and a rotor, and the stator includes coil windings. For example, in the motor, a coil winding is provided every 120 degrees, and a total of three coil windings are provided, such as U-phase winding, V-phase winding and W-phase winding. The energized phase or coil current of each winding can be controlled, and the currents can be respectively referred to as U-phase current, V-phase current and W-phase current. These coils can be configured to generate magnetic flux when energized. The rotor includes permanent magnets, as indicated by the magnets represented by N and S in FIG. 4. One pole pair of magnets are shown in FIG. 4, but more pole pairs can be provided in actual configurations. Similarly, more coil windings can also be provided, as long as the reversal speed and frequency of the current in the coil windings are matched with the rotor, so that the rotor can be continuously driven to rotate.
In the field of LiDAR, high accuracy is required, such as a resolution of 0.1°. A photoelectric encoder with required accuracy can be used to monitor the position of the permanent magnet rotor in real-time, to determine a commutation time of current in the coil windings. However, once the code disc is dirty, the accuracy of the angle measurement result of the motor can be decreased. As a result, it is difficult for the transmission-and-reception ranging of the LiDAR to occur in an expected direction, which affects the effect of a point cloud map generated after the LiDAR’s ranging.
FIG. 5 illustrates an example method for determining a state of a code disc of a photoelectric encoder, consistent with some embodiments of this disclosure.
Referring to FIG. 5, an example method 100 for determining a state of a code disc of a photoelectric encoder is provided.
At Step S101, an angle at which the motor is located at a preset time point is determined based on an output signal of the Hall sensors.
Referring back to FIG. 4, taking a motor provided with three Hall sensors as an example, the three Hall sensors can correspond to a U-phase winding, a V-phase winding, and a W-phase winding, respectively. Referring to FIG. 6, during one rotation cycle T of the motor, the three Hall sensors are in six states sequentially, from state 0 to state 5. For example, in state 0, the outputs of the three Hall sensors are (0, 0, 0) . In state 1, the outputs of the three Hall sensors are (1, 0, 0) . In state 2, the outputs of the three Hall sensors are (1, 1, 0) . In state 3, the outputs of the three Hall sensors are (1, 1, 1) . In state 4, the outputs of the three Hall sensors are (0, 1, 1) . In state 5, the outputs of the three Hall sensors are (0, 0, 1) . Then, it enters state 0 again in the next rotation cycle.
The preset time point is a time point when a jump occurs in the output signal of the Hall sensor, for example, a time point when a transition between various states occurs as shown in FIG. 6.  When the state of output of the Hall sensor changes, the angle at which the motor is located at that time point is determined. For example, at timestamp t1, the Hall sensor has just entered the state 0, and the angle of the motor at this time point can be determined. For example, at timestamp t2, the Hall sensor enters state 1 from state 0, and the angle of the motor at this time point can also be determined.
In some embodiments, still referring to FIG. 6, the minimum mechanical angle that can be identified by the Hall sensor in the installation structure as shown in FIG. 6 can be 7.5°. For example, two adjacent states are spaced apart by 7.5°. For example, at timestamp t1 corresponding to the starting position of state 0, the motor rotates to the position of 0°. At timestamp t2 when the Hall sensor just changes to the state 1, the motor rotates to the position of 7.5°. At timestamp t3 when the Hall sensor just changes to the state 2, the motor rotates to the position of 15°.
This disclosure is not limited to the above setting the preset time point ways. In addition to jump time point of the state, other time points can also be used as the preset time point. In this case, the angle at which the motor is located at the preset time point can be determined, based on the output signal of the Hall sensor by using the angular position corresponding to the output signal of the Hall sensor at the time point of the previous jump, plus the product of the known angular speed of the motor and the duration (e.g., the time between the preset time point and the time point of the previous jump) .
At step S102, the angle at which the motor is located at the preset time point is determined based on an output of the photoelectric encoder.
Still referring to FIG. 4, a photoelectric encoder is provided on the output shaft of the motor. The photoelectric encode includes a light source, a code disc, a photosensitive device (e.g., as an encoder) and an output circuit. The code disc is provided with a plurality of openings along a circumference direction. The light source and the photosensitive device are respectively arranged on both sides of the code disc. When the code disc rotates with the output shaft of the motor, the light emitted by the light source is blocked by the code disc and the light cannot be incident on the photosensitive device, or the light emitted by the light source passes through the openings on the code disc and the light is incident on the photosensitive device. The output signal of the photosensitive device can include a series of square wave signals, the current angle of the code disc and the motor can be determined through the output circuit. In addition, the light source and the photosensitive device are respectively arranged on both sides of the code disc referring to FIG. 4. The light source and the photosensitive device can also be provided on the same side of the code disc, the details are not described herein again.
FIG. 7 shows an example schematic diagram illustrating the output signal of the photoelectric encoder. A pulse counter can be provided in the photoelectric encoder to count pulses  of output signal of the photoelectric encoder. Each pulse corresponds to a certain rotation angle of the motor. The rotation angle can be determined based on the rotation speed of the motor and the number of openings on the code disc. The rotation angle of the code disc can be determined by obtaining the pulse count accumulated at the preset time point. Further, the angle of the motor at the preset time point can be determined.
At step S103: whether the code disc is dirty is determined based on the angles determined by steps S101 and S102.
Still referring to FIG. 4, after the LiDAR has been assembled, or after the photoelectric encoder has been installed on the output shaft of the motor, the code disc is coaxial with the motor. The Hall sensor and the code disc can be calibrated, the error between the actual relative position and the expected relative position of the Hall sensor and the code disc can be within the preset range (e.g., no more than 0.1°) . After being installed on the motor, each state jump of the Hall sensor has a corresponding relationship to a certain code track on the code disc in terms of position. After determining current state of the Hall sensor based on the output signal of the Hall sensor, the code track position at which the code disc is positioned and the angle of the motor at this time point can be determined based on the corresponding relationship. By using the pulse signal output by the encoder, the code track position at which the code disc is currently located and the angle of the code disc can also be determined. By determining whether the code track positions determined in the two ways are different or by comparing the deviation of the angles of the motor determined in the two ways, whether the code disc of the photoelectric encoder is dirty can be determined.
When the code disc is not dirty, the angles determined in the steps S101 and S102 (e.g., the angle of the motor determined based on the output signal of the Hall sensor and the angle of the motor determined based on the output signal of the photoelectric encoder) shall satisfy a preset matching relationship. And, their relative position also has a matching relationship. For example, at the time point when the output signal of the Hall sensor jumps from state 1 to state 2, the code disc can be rotated to the 211th code track. When the code disc is dirty, there can be a relatively large deviation between the angle calculated by the Hall sensor and the angle calculated by the photoelectric encoder, which can exceed the preset threshold.
For example, still referring to FIG. 3, when the code disc is dirty, the pulses (e.g., δi+2 and δi+3) disappear due to the dirt, which are supposed to be appear. When counting the pulses, the counting result is three, instead of the expected result of five, which leads to an error or deviations in the angle of the motor determined based on the output signal of the photoelectric encoder, as well as a large deviation between the angle of the motor determined based on the output signal of the photoelectric encoder and the angle of the motor determined based on the output signal of the Hall sensor.
In some embodiments, considering that there can actually be some measuring error, in step S103, the code disc is dirty can be determined when the difference between the angles determined based on the photoelectric encoder and the Hall sensor exceeds the preset threshold. Or the code disc is not dirty can be determined when the difference between angles determined based on the photoelectric encoder and the Hall sensor exceeds the preset threshold. For example, the preset threshold can be set, referring to the measuring errors.
It is determined whether the absolute value |θ-δ| of the difference between the angles measured based on the photoelectric encoder and the Hall sensor is greater than the threshold Thr, where θ is the angle of the motor determined based on the output signal of the Hall sensor, and δ is the angle of the motor determined based on the output signal of the photoelectric encoder. If |θ-δ| is greater than the threshold Thr, the code disc is dirty can be determined, which can affect pulse counting and angle measurement. If |θ-δ| is not greater than the threshold Thr, the code disc is not dirty can be determined.
In some embodiments, the order in which steps S101 and S102 are executed is not used to limit this disclosure. These steps can be executed successively in any order or can be executed simultaneously.
In some embodiments, whether a code disc is dirty can be determined by a Hall sensor installed on the motor. FIG. 8 illustrates an example angle measurement method for a motor, consistent with some embodiments of this disclosure. Referring to FIG. 8, an example angle measurement method 200 for a motor is provided, and a photoelectric encoder and a Hall sensor are provided on the motor.
At step S201, an angle at which the motor is located at a preset time point is determined, based on an output signal of the Hall sensor.
At step S202, an angle at which the motor is located at the preset time point is determined, based on an output signal of the photoelectric encoder.
At step S203, whether the code disc of the photoelectric encoder is dirty is determined, based on the angles calculated in steps S201 and S102.
Steps S201, S202, and S203 can refer to the description related to the steps S101, S102, and S103 of example method 100, which are not be described herein again. The preset time point can be a time point when a jump occurs in the output signal of the Hall sensor. For example, when a jump occurs in the output signal of the Hall sensor, the angle of the motor can be calculated in two ways respectively. Whether the code disc is dirty or not is determined based on whether the two calculated angles match with each other. For example, when the difference between the angle calculated in step S201 and the angle calculated in step S202 exceeds a preset threshold, the code disc is dirty at its current position can be determined.
At step S204: when the code disc is dirty, an angle of the motor at a subsequent time point is determined by using the output signal of the Hall sensor, or by using the output of the code disc before the code disc is dirty.
When it is determined at step S203 that the code disc is dirty, if the current output signal of the code disc is still used to determine the subsequent angle of the motor, relatively large calculation errors and accumulative errors can be caused. The angle of the motor at a subsequent time point can be determined by using the output signal of the Hall sensor when the code disc is determined to be dirty. The accuracy of the measurement can be improved. In this disclosure, the term “asubsequent time point” and “the subsequent time point” can include one subsequent time point, or more than one subsequent time points.
FIG. 9 shows an example signal sequence diagram, consistent with some embodiments of this disclosure. Referring to FIG. 9, the state of the Hall sensor of the motor jumps at timestamp t0, t1, t2, t3, t4 and t5, which can refer to the description related to FIG. 6. The bottom of FIG. 9 shows the change of angle of the motor over time, which is plotted based on the output signal of the code disc after the code disc is dirty. The code tracks of the code disc corresponding to the motor rotation angles of δi+1~δi+3 are dirty. In the process of t0-t1, the output signal of the Hall sensor is maintained at the state 0. In this process, the steps S201, S202 and S203 are performed once or repeatedly to determine whether the code disc is dirty. When it is determined that the code disc is dirty, for example, when determining that a position of the code disc corresponding to timestamp t0′ (e.g., the timestamp t0′ is between timestamp t0 and timestamp t1) is dirty, the angle of the motor at a subsequent time point can be calculated by (θ1 +ωΔti) , where θ1 is the angle of the motor calculated based on the output signal of the Hall sensor at timestamp t0, ω is the angular velocity of the motor, Δti is the duration from timestamp t0′ to timestamp t0. Therefore, when determining that the code disc is dirty, from the start of the determination until the next state jump (timestamp t1) , the results of the Hall sensor can be used, for example, the results of the Hall sensor can be used to interpolate. For example, when it is determined that the code disc is dirty at timestamp t0′ between timestamp t0 and timestamp t1, the accuracy of calculating the angle of the motor based on the output signal of the code disc is decreased. At this time, the angle of the motor θ1 at timestamp t0 calculated based on the output of the Hall sensor at timestamp t0 is 120 degree, and the time interval between timestamp t0′ and timestamp t0 is 10ms; the angular velocity ω is 40π rad/s (20Hz) , so the position of the motor at timestamp t0′ can be determined as 120+40π*10-4* (360/2π) =120.72 degree.
In some embodiments, when the code disc is dirty, in addition to using the output signal of the Hall sensor to determine the angle of the motor at the subsequent time point, the angle of the motor at the subsequent time point can also be determined based on the output signal of the code disc before the code disc is dirty. For example, when it is determined that the code disc is dirty at a  timestamp t0′ between timestamp t0 and timestamp t1, and the position of the code disc corresponding to timestamp t0 is not dirty, which can be used to accurately locate the angular position of the motor, the angle of the motor at a subsequent timestamp can be calculated by (θ1′+ωΔti) ; where θ1′ is the angle of the motor calculated based on the output signal of the code disc of the photoelectric sensor at the timestamp t0, ω is the angular velocity of the motor, Δti is the duration from the timestamp t0′ to the timestamp t0.
In some embodiments, when it is determined that the code disc is not dirty (e.g., when the code disc is not dirty is determined in step S203) , the angle of motor can be determined based on the output of the photoelectric encoder. The measurement accuracy of the photoelectric encoder is high, so the angular position of the motor is continuously calculated by using the output signal of the photoelectric encoder when the code disc is not dirty.
In some embodiments, when it is determined during one state of the Hall sensor that the code disc is dirty, during that state (e.g., before the output signal of the Hall sensor changes to a next state) , the angle of the motor at a subsequent time point can be determined and used as the measuring result, based on the output signal of the Hall sensor or based on the output signal of the code disc at a latest time point before the code disc is dirty. The Hall sensor is made of magnetic material, the Hall sensor is not easy to absorb dirt, so the Hall sensor is not easily affected by dirt. The reliability of angle measurement can be improved or ensured by using the Hall sensor in angle measurement. The angle measurement result from the code disc can be corrected based on the angle measurement result from the Hall sensor, at the time point when the output signal of the Hall sensor changes to the next state, to decrease or avoid continuous accumulation of errors caused by the dirty code disc.
Still referring to FIG. 9, the output signal of the Hall sensor includes state 1 and state 2, it is detected that the code disc is dirty during state 1, and the time point when the output signal jumps from state 1 to state 2 is taken as the first timestamp t1. The S204 can include: before the first timestamp t1, the angle of the motor at a subsequent time point is determined by using the output signal of the Hall sensor or by using the output signal of the code disc at a latest time point before the code disc is dirty, and the angle of the motor at the subsequent time point is taken as a measurement result.
In some embodiments, at the first timestamp t1, the angle measurement result from the code disc can be corrected based on the angle measurement result from the Hall sensor. For example, the relative position of the code disc and the Hall sensor is fixed and known, for example, at the timestamp t1 (i.e., when the output signal jumps from state 0 to state 1) , the angular position of the motor calculated based on the Hall sensor is 15°, the code disc should be located on the 101st code track ideally (ideally, the result of the calculation shall also be 15°) . However, due to the dirt of the code disc, 12° is obtained by using the rising edges of the output result of the code disc. Then, the angle of  the code disc at timestamp t1 is corrected to 15°. The calculation is performed by taking 15°instead of 12°, as a starting point to perform interpolation for subsequent time points. The accumulation of errors can be decreased or avoided. For example, at timestamp t1′ between timestamp t1 to timestamp t2, the position of the motor at timestamp t0′ can be calculated in accordance with (15°+ω (t1′-t1) ) .
Still referring to FIG. 9, a code track of the code disc corresponding to an angle range of δi+1i+3 is dirty, at timestamp t0, the code disc is not dirty, and the rotation angle of the motor can be correctly determined as δi+1 based on the output signal of the code disc. At timestamp t1, the code track is dirty, the rotation angle of the motor is incorrectly determined as δi+1 based on the output signal of the code disc. As the dirt covers the code track, the output signal does not have the same number of rising edges as that when it is not dirty. If the code disc is not corrected at this time, the errors can be accumulated continually. And at timestamp t2, based on the rising edge triggering rule, the angle of the motor is determined as δi+2 based on the output signal generated when the code disc is dirty. The errors are accumulated continually, so that the angle deviation between the angle of the motor determined based on the code disc and the actual angle of the code disc can become larger. The LiDAR transmits and receives laser at a preset angular position to perform ranging. If the angle cannot be measured correctly, the orientation of the transmission-and-reception ranging can be wrong, and the subsequent point cloud map generated based on the ranging results can be wrong as well.
In some embodiments, at timestamp t1, the rotation angle of the motor determined based on output signal of the code disc can be corrected, based on the relative position relationship between the code disc and the Hall sensor. The relative position relationship can be determined during installation or calibration. Still referring to FIG. 9, the rotation angle of the motor is corrected to δi+2. If the code disc is no longer dirty on the code track corresponding to the angle range of δi+2~δi+3, the angle is determined by taking the corrected angle as the starting point, and there can be no deviation. For example, as shown in FIG. 9, from timestamp t2, the code tracks that the code disc is rotated over are not dirty any more (e.g., the dirty area has been rotated over) . At timestamp t2, the rotation angle of the motor is corrected to δi+4 based on the Hall sensor. The subsequent output signal of the code disc is restored to an output when it is not dirty, the rotation angle of the motor determined by the output of the code disc can be accurate and correct.
In some embodiments, once the code disc is determined to be dirty, the angle measurement result from the code disc can be corrected accordingly by using the angle measurement result from the Hall sensor. The continuous accumulation of errors due to the dirty code disc can be reduced or avoided, The error correction can be realized in time. In addition, once the code disc has rotated over the dirty area, the output of the code disc can be used to determine the rotation angle of the motor again. High-precision angle measurement can continue to be provided. In some possible implementations, the dirty area of the code disc is relatively small (e.g., the dirty area occupies the  code disc about four or five code tracks) , but the deviation in measuring the angle of the motor can become larger due to the accumulation of errors. The error can be corrected in time in some embodiments of this disclosure. The replacement of the code track can be decreased or avoided, the accuracy and safety of the angle measurement can be improved or ensured when the dirty area is small.
In some embodiments, after the first timestamp t1, the method 200 can include the following steps.
At S206: an angle at which the motor is located at a second time point is calculated, based on the output signal of the Hall sensor; the second time point is any time point between the timestamp t1 and the timestamp t2 as shown in FIG. 9.
At S207: an angle at which the motor is located at the second time point is calculated based on the output of the photoelectric encoder.
At S208: whether the code disc of the photoelectric encoder is dirty is determined based on the angles calculated in steps S206 and S207.
At S210: when the code disc is dirty, the angle of the motor by using the output signal of the Hall sensor is calculated after the second time point; when the code disc is not dirty, the angle of the motor is calculated by using the output of the photoelectric encoder.
During the state 1 in FIG. 9, the steps S206, S207, and S208 can be performed once or repeatedly to determine whether the code disc is still dirty. After entering a new state, it is continuously determined whether code disc is dirty. If the code disc is dirty, the data of the Hall sensor is used to calculate the angle of the motor; if the code disc is not dirty, the angle of the motor is calculated repeatedly by using the output of the photoelectric sensor, and a correction is made to the code disc when it jumps to the next state.
In some embodiments, high-precision angle measurement is achieved by the code disc, while the angle of the code disc is corrected by the output signal of the Hall sensor (e.g., through a time point when the state of the output signal of the Hall sensor changes) . The influence of the dirty code disc can be reduced. For example, in FIG. 9, at timestamp t1, the angle of the code disc at this time point is δi+2, the code disc takes δi+2 as the starting point, the previous wrong angles are not accumulated.
In some embodiments, in a case that the measured data for angle of the motor exists some problem after the code disc is dirty and the deviation data is continuously to be accumulated due to the dirt effect of the code disc, the calculation results of the Hall sensor and the code disc can be compared. When the calculation results of the Hall sensor and the code disc do not match, the calculation results of the Hall sensor can be used, to improve or ensure the reliability of the code disc (e.g., to improve or ensure the possibility of the code disc still work when the code disc is dirty) , and  to decrease or avoid the accumulated error caused by the dirt of the code disc, as the angle of the code disc can be corrected when the state jumps.
In addition, during operation of the motor, current in each coil winding can be controlled by a controller based on the current position of the rotor, the magnetic field generated by the coil winding changes. The permanent magnet of the rotor can be driven to rotate. The control process for the motor can be referred to Field Oriented Control (FOC) , for example, the motor rotor can be driven based on the current position of the rotor by controlling the relative amplitude and on-off of the current in the U phase winding, V phase winding and W phase winding in real time. Vector control FOC is a control method for three-phase current vector. The three-phase current vector is transformed into a rotating two-phase DC scalar, to control the exciting current iM and torque current Ti respectively. Thus, the speed regulation performance of the asynchronous motor is similar to that of the DC motor. Vector control can be referred to Field Oriented Control.
In some embodiments, as the output result of the Hall sensor is relatively more reliable, the output result of the Hall sensor can be continuously used for the Field Oriented Control for the motor, the stability and reliability of the FOC control can be improved.
In some embodiments, the output of the Hall sensor can be used to perform the Field Oriented Control for the motor when the code disc is dirty; the output of the photoelectric encoder can be used to perform the Field Oriented Control for the motor when the code disc is not dirty.
FIG. 10 illustrates an example angle measurement method 300 for a motor consistent with some embodiments of this disclosure. Referring to FIG. 10, the example angle measurement method 300 is described.
At step S301, the example angle measurement method 300 starts.
At step S302, from a first jump point of the Hall sensor, whether the code disc is dirty is once or repeated determined through, for example, the steps S101, S102, and S103, or steps S201, S202, and S203 above.
The angle of the motor can be determined by the output signal of the photoelectric encoder and the output signal of the Hall sensor, respectively. The two angles determined can be cross-checked. When there is a deviation between the angles of the motor determined in the above two ways or when the deviation exceeds a threshold, the code disc can be determined to be dirty. Or it is determined that the code disc is not dirty when there is no deviation between the angles of the motor determined in the above two ways or when the deviation does not exceed the threshold. If the code disc is determined to be dirty, the method proceeds to step S303, or if the code disc is determined to be not dirty, the method proceeds to step S304.
At step S303, before the second jump point, the angle of the motor is calculated by using the output signal of the Hall sensor, and then the method proceeds to step S305.
At step S303, because the code disc is determined to be dirty, the angle of the motor is calculated by using the output signal of the Hall sensor instead of the output signal of the photoelectric encoder. At step S305, at the second jump point, the angle of the motor calculated based on the output signal of the Hall sensor is used to correct the angle of the code disc to decrease or avoid accumulation of errors caused by the dirty code disc, and then the method proceeds to step S306.
At step S304, because the code disc is not dirty, the angle of motor is calculated by using the output signal of the photoelectric encoder, and then the method proceeds to step S306.
At step S306, starting from the second jump point of the Hall sensor, that is, during state 2, whether the code disc is dirty is continuously determined. If the code disc is determined to be dirty, the method proceeds to Step S307. Or if the code disc is determined to be not dirty, the method proceeds to Step S308.
At step S307, before the third jump point, the angle of the motor is calculated by using the output signal of the Hall sensor, and the method proceeds to step S309, in which, at the third jump point, the angle of the code disc is corrected to avoid accumulation of errors caused by the dirty code disc.
At step S308, because the code disc is not dirty, the angle of the motor can be calculated by using the output signal of the photoelectric encoder.
The determination process performed during the state 0 and state 1 of the Hall sensor has been described as above. For other states, the same steps can be performed repeatedly until all the states of the Hall sensor are traversed, and the method returns to step S302 to determine whether the code disc is dirty during the state 0 from the first jump point of the Hall sensor.
FIG. 11 shows a schematic diagram illustrating an example perspective structure of a LiDAR from top view, consistent with some embodiments of this disclosure. Referring to FIG. 11, an example perspective structure of the LiDAR from top view is provided. For clarity, a housing of the light detection device is not shown in the drawings. The lateral plane can be a plane perpendicular to a height direction of the light detection device, such as a horizontal plane or other plane.
The light detection device 30 includes a window 31. A transmitted signal can be transmitted and an echo signal can be received through the window 31. The echo signal is generated by the transmitted signal after being reflected on an object. In some embodiments, the window 31 can be provided with a planar window glass. In some embodiments, the window 31 can also be of a curved structure. The light detecting device 30 includes a light transmitting end 32 and a light detecting end 33.The light transmitting end 32 is configured to output a transmitted signal. The light detecting end 33 is configured to detect the echo signal of the transmitted signal. In some embodiments, a space can be formed inside the housing for arranging the light transmitting end 32 and the light detecting end 33. The light transmitting end 32 can include an array of light transmitters. Through the  arrangement of line array of light transmitters, 1D solid-state scanning in a column direction (corresponding to a vertical field of view) can be achieved. In some embodiments, adjacent rows of light transmitters can also be staggered in the row direction, which is not described in detail here. In some embodiments, each light transmitter can include a laser, such as a vertical cavity surface emitting laser (VCSEL) , or an edge emitting laser (EEL) , or the like. Similarly, The light detection end 33 can include an array of light detectors, the light detectors (can also be called as detectors, or photoelectric detectors) can be implemented by some components, such as avalanche photo diodes (APD) , Silicon Photo Multiplier (SiPM) , an array of SPAD (s) or the like.
The LiDAR 30 further includes a light signal redirection member 41. Redirection can refer to process the optical signal through light reflection, refraction, transmission, or the like, to change/deflect the direction of the input light signal and re-determine the transmission direction of the output light signal. In addition, the light signal redirection member 41 is configured to rotate, continuously deflect the transmitted signal during the rotation process, the transmitted signal is emitted from the window 31 of the light detection device 30 to achieve a scanning of the field of view in the second direction and redirection of the echo signal, so that the echo signal is transmitted to the light detection end 32. The motion of the light signal redirection member 41 varies.
In some embodiments, the light signal redirection assembly 34 can be rotatable (e.g., the light signal redirection assembly is a rotating mirror in a scanning LiDAR of rotating mirror type) .
If the light signal redirection assembly is a rotating mirror, the rotating mirror can be driven to rotate by a motor, such as a rotation of 300° or 360° in a clockwise direction, or a reciprocal motion (e.g., rotation back and forth between -50° and +50°) , to cover the horizontal field of view of the LiDAR. A Hall sensor (not shown in FIG. 11) and a photoelectric encoder (not shown in FIG. 11) can be provided in the motor, and the photoelectric encoder can be installed on the output shaft of the motor.
The rotating member 41 rotates under control, the example in FIG. 11 illustrates one-dimensional rotation in a lateral plane (in the counterclockwise direction indicated by the arrow in the FIG. 11) so that scanning of the horizontal field of view (relative to the direction of the vertical field of view) can be achieved. It is understood that although the examples illustrates that the scanning of the vertical field of view is achieved by the light transmitters arranged in a column direction, and the scanning of the horizontal field of view is achieved by one-dimensional lateral rotation of the rotating member, the scanning way is not limited in this disclosure. In some embodiments, the angle of the orientation of the light detection device can also be changed. For example, as compared to FIG. 11, the scanning of the vertical field of view by one-dimensional rotation of the rotating member is achieved by rotating 90 degrees, the scanning of the horizontal field of view also can be performed by the light transmitters arranged in "row" instead of in "column" .
In some embodiments, the rotating member 41 can be placed outside the rotating shaft of a motor. The rotating member 41 can rotate along with the rotation of the rotating shaft driven by the motor. The rotating member 41 can include at least one reflection surface, the at least one reflection surface is used by an optical path of the transmitted signal and an optical path of the received signal. When there is only one reflection surface, the optical path of transmitted signal and the optical path of received signal can share this reflection surface. When there are more than one refection surfaces, the optical path of the transmitted signal and the optical path of the received signal may not share the same reflection surface of the rotating member 41. Still referring to FIG. 11, the rotating member 41 is illustrated as a rectangular body, the two opposite vertical sides 411 and 412 can be reflection surfaces. When the rotating member 41 is rotated to a preset position (e.g., the position shown in the drawings) , the transmitted signal can be deflected by the reflection surface 411 to the window 31, and the transmitted signal can pass through the window 31 and can be transmitted to environment outside the light detection device for detection. If the transmitted signal encounters an obstacle and generates an echo signal, the echo signal is incident on the reflection surface 411 through window 31, and then incident on the detector 33 after being deflected by the reflection surface 411.
The first redirection member 42 is located in the optical path of the transmitted signal and the optical path of the received signal. The first redirection member 42 can be configured to output the transmitted signal to the rotating member 41, and form a passage portion for the echo signal to pass through. In some embodiments, referring to FIG. 11, the first redirection member 42 can be implemented by a mirror, which can have one reflection surface 421. In the optical path of the transmitted signal, the reflection surface 421 is used to reflect the transmitted signal transmitted from the light transmitting end 32 onto the rotating member 41, and when the rotating member 41 is rotated to a preset position (e.g., the position shown in FIG. 11) , the reflection surface 411 or 412 of the rotating member 41 can receive the transmitted signal and deflect it to the window, and the transmitted signal is emitted to the outside.
In some embodiments, referring to FIG. 11, the passage portion is shown as gaps 43 located on two sides of the first redirection member 42. The gap can be formed between the first redirection member 42 and the inner wall of the housing of the light detection device. Or the gap can be formed between the first redirection member 42 and other parts arranged within the housing (e.g., a bracket, or the like) . In a structure illustrated in FIG. 11, in the optical path of the received signal, the echo signal is reflected by the reflection surface 411 of the rotating member 41 and transmitted to the first redirection member 42. The echo signal passes through the gaps 43 on the side of the first redirection member 42 and is received by the light detection end 33.
The rotating member 41 can be rotated continuously to transmit the transmitted signal and receive the echo signal at different time points. The rotating member 41 can also be rotated in a  reciprocating manner to transmit the transmitted signal and receive the echo signal at different time points. The rotation speed of the rotating member 41, the number of reflection surfaces, and the switching speed for transmission of the adjacent lasers can affect the frame rate of point cloud detection of the LiDAR, and the factors can be coordinated to achieve the detection in a preset frame rate. When the detection frame rate is fixed, the larger the number of reflection surfaces is, the lower the desired rotation speed is. The rotation speed of the rotating member 41 and the number of reflection surfaces can be set based on the actual detection requirements. The number of reflection surfaces can be associated with the structure of the rotating member 41, which can be at least two, such as two, three, four or more.
In some embodiments, the rotating member 41 can be a prism. The cross section of the rotating member 41 can be axisymmetric or centrosymmetric to achieve uniform transmission and reception of light signals over time. For example, in the case that the rotating member 41 is a prism with a rectangular cross-section as shown in FIG. 11, the two opposite surfaces of the rotating member 41 can be the reflection surfaces. In some embodiments, the rotating member 41 is a prism with a square cross-section, and four sides of the rotating member 41 can be reflection surfaces. In some embodiments, the rotating member 41 is a prism with an equilateral triangular cross-section, and three sides of the rotating member 41 can be reflection surfaces. In the rotation process, the three reflection surfaces can be used in turn for transmitting light signals successively, and there are no sides that are not used for light signal transmission. Rotating member 41 can also be implemented by a prism having a polygon cross section with more sides (e.g., a pentagon, a hexagon, or the like) , this disclosure is not limited.
In some embodiments, the LiDAR can further include a controller, the controller can be electrically coupled to the Hall sensor and the photoelectric encoder, and can be configured to calculate an angle of the output shaft of the motor based on the output signal of the photoelectric encoder and the output signal of the Hall sensor. The controller is configured to perform the following operations.
At step S201, the controller determines an angle at which the motor is located at a preset time point based on an output signal of the Hall sensor.
At step S202, the controller determines the angle at which the motor is located at the preset time point based on an output signal of the photoelectric encoder.
At step S203, the controller determines whether a code disc of the photoelectric encoder is dirty based on the angles calculated in operations S101 and S102.
S204: when the code disc is dirty, the controller determines an angle of the motor at a subsequent time point by using the output signal of the Hall sensor or the output of the code disc before the code disc is dirty.
In some embodiments, the preset time point is a time point when a jump occurs in the output signal of the Hall sensor.
In some embodiments, the controller can be configured to determine that the code disc is dirty at a current position when a difference between the angle calculated in step S201 and the angle calculated in step S202 exceeds a preset threshold.
In some embodiments, the controller can be configured to determine the angle of the motor according to the output of the photoelectric encoder when the code disc is not dirty.
In some embodiments, the output signal of the Hall sensor includes a first state and a second state, and a time point when the output signal of the Hall sensor jumps from the first state to the second state is a first time point, wherein, the controller can be configured to: when the code disc is detected to be dirty during the first state, determine, before the first time point, the angle of the motor at a subsequent time point by using the output signal of the Hall sensor or the output of the code disc at a latest time point before the code disc is dirty, and take the angle of the motor at the subsequent time point as a measurement result.
In some embodiments, when being used in the LiDAR, if it is determined that the code disc is dirty, the result of Hall sensor can be used to interpolate during the first state (e.g., (θ1+ ωΔti) (ω is a rotation speed) ) to perform the FOC control for the motor and provide the information of the angle to the LiDAR, to control the transmission-and-reception ranging. The angle measurement results from the code disc are ignored. Δti is a time difference from time point T1, and the rotation speed ω of the motor is uniform by default.
In some embodiments, the controller can be configured to correct, at the first time point, an angle measurement result from the code disc according to an angle measurement result from the Hall sensor.
In some embodiments, the controller can be configured to perform the following operations.
At step S206, after the first time point, the controller calculates an angle at which the motor is located at a second time point based on the output signal of the Hall sensor.
At step S207, the controller calculates an angle at which the motor is located at the second time point based on the output of the photoelectric encoder.
At step S208, the controller determines whether the code disc of the photoelectric encoder is dirty based on the angles calculated in operations S206 and S207.
At step S210, when the code disc is determined to be dirty, the controller calculates the angle of the motor by using the output signal of the Hall sensor after the second time point; or when the code disc is determined to be not dirty, calculate the angle of the motor by using the output of the photoelectric encoder.
In some embodiments, the controller can be configured to perform Field Oriented Control  for the motor by using the output of the Hall sensor when the code disc is dirty; perform Field Oriented Control for the motor by using the output of the photoelectric encoder when the code disc is not dirty.
In some embodiments, the angle of the motor can be obtained more accurately, and the motor can be controlled more precisely. The influence of angle errors caused by dirty code disc of the photoelectric encoder and accumulative errors, can be reduced or avoided. This is advantageous in controlling the LiDAR. For example, a laser can be accurately controlled to transmit a detection light beam at a certain accurate angular position, control a detection unit to receive echo, and match the distance measurement results with the angles in the process of data processing to obtain an accurate three-dimensional point cloud map of the surrounding environment.
Some embodiments are provided in this disclosure, which is not intended to limit this disclosure. Detailed descriptions have been provided for the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or equivalently alternations can be made to some of the technical features. Any modifications, equivalent alternations, improvements, or the like made within the spirit and principle of this disclosure should be included within the protection scope of this invention.

Claims (29)

  1. A method for determining a state of a code disc of a photoelectric encoder, wherein the code disc rotates with a rotor of a motor, and the motor further comprises a Hall sensor, the method comprising:
    S101: determining an angle at which the motor is located at a preset time point based on an output signal of the Hall sensor;
    S102: determining the angle at which the motor is located at the preset time point based on an output of the photoelectric encoder; and
    S103: determining whether the code disc is dirty based on the angles determined in steps S101 and S102.
  2. The method of claim 1, wherein the preset time point is a time point when a jump occurs in the output signal of the Hall sensor.
  3. The method of claim 1 or 2, wherein the step S103 comprises: determining that the code disc is dirty when a difference between the angle determined in the step S101 and the angle determined in the step S102 exceeds a predetermined threshold.
  4. An angle measurement method for a motor, wherein a photoelectric encoder and a Hall sensor are provided on the motor, and the angle measurement method comprises:
    S201: determining an angle at which the motor is located at a preset time point based on an output signal of the Hall sensor;
    S202: determining the angle at which the motor is located at the preset time point based on an output of the photoelectric encoder;
    S203: determining whether a code disc of the photoelectric encoder is dirty based on the angles determined in steps S201 and S202; and
    S204: when the code disc is determined to be dirty, determining an angle of the motor at a subsequent time point based on the output signal of the Hall sensor or based on the output signal of the code disc before the code disc is dirty.
  5. The angle measurement method of claim 4, wherein the preset time point is a time point when a jump occurs in the output signal of the Hall sensor.
  6. The angle measurement method of claim 4 or 5, wherein the step S203 comprises: determining that the code disc is dirty at a current position when a difference between the angle  determined in step S201 and the angle determined in step S202 exceeds a predetermined threshold.
  7. The angle measurement method of any of claims 4 to 6, further comprising: when the code disc is determined to be not dirty, determining the angle of the motor based on the output of the photoelectric encoder.
  8. The angle measurement method of any of claims 4 to 7, wherein the output signal of the Hall sensor comprises a first state and a second state, and a first time point is a time point when the output signal of the Hall sensor jumps from the first state to the second state, and the S204 further comprises:
    when the code disc is determined to be dirty during the first state, determining, before the first time point, the angle of the motor at a subsequent time point based on the output signal of the Hall sensor or the output of the code disc at a latest time point before the code disc is determined to be dirty, and taking the angle of the motor at the subsequent time point as a measurement result.
  9. The angle measurement method of claim 8, further comprising: at the first time point, correcting an angle measurement result from the code disc based on an angle measurement result from the Hall sensor.
  10. The angle measurement method of claim 9, further comprising:
    S206: after the first time point, determining an angle at which the motor is located at a second time point based on the output signal of the Hall sensor;
    S207: determining an angle at which the motor is located at the second time point based on the output of the photoelectric encoder;
    S208: determining whether the code disc of the photoelectric encoder is dirty based on the angles determined in steps S206 and S207;
    S210: when the code disc is determined to be dirty, determining the angle of the motor based on the output signal of the Hall sensor after the second time point; when the code disc is determined to be not dirty, determining the angle of the motor based on the output of the photoelectric encoder.
  11. The angle measurement method of claim 4 or 5, further comprising: when the code disc is determined to be dirty, performing field-oriented control for the motor, based on the output signal of the Hall sensor; or when the code disc is determined to be not dirty, performing field-oriented control for the motor, based on the output signal of the photoelectric encoder.
  12. A LiDAR, comprising:
    an opto-mechanical rotor;
    a motor, wherein the opto-mechanical rotor is installed on an output shaft of the motor and is driven to rotate by the motor, wherein, the motor comprises a Hall sensor;
    a photoelectric encoder, wherein the photoelectric encoder is installed on the output shaft of the motor.
    a controller, wherein the controller is electrically coupled to the Hall sensor and the photoelectric encoder, and is configured to calculate an angle of the output shaft of the motor based on the output signal of the photoelectric encoder and the output signal of the Hall sensor respectively, wherein, the controller is configured to perform the following operations:
    S201: determining an angle at which the motor is located at a preset time point based on an output signal of the Hall sensor;
    S202: determining the angle at which the motor is located at the preset time point based on an output of the photoelectric encoder;
    S203: determining whether a code disc of the photoelectric encoder is dirty based on the angles calculated in operations S201 and S202; and
    S204: when the code disc is dirty, determining an angle of the motor at a subsequent time point by using the output signal of the Hall sensor or by using the output of the code disc before the code disc is dirty.
  13. The LiDAR of claim 12, wherein the preset time point is a time point when a jump occurs in the output signal of the Hall sensor.
  14. The LiDAR of claim 12 or 13, wherein the controller is configured to determine that the code disc is dirty at a current position when a difference between the angle determined in S201 and the angle determined in S202 exceeds a predetermined threshold.
  15. The LiDAR of claim 12 or 13, wherein the controller is configured to determine the angle of the motor based on the output of the photoelectric encoder when the code disc is determined to be not dirty.
  16. The LiDAR of claim 12 or 13, wherein the output signal of the Hall sensor comprises a first state and a second state, and a time point when the output signal of the Hall sensor jumps from the first state to the second state is a first time point, wherein, the controller is configured to:
    when the code disc is determined to be dirty during the first state, determine, before the first  time point, the angle of the motor at a subsequent time point based on the output signal of the Hall sensor or by using the output of the code disc at a latest time point before the code disc is determined to be dirty, and take the angle of the motor at the subsequent time point as a measurement result.
  17. The LiDAR of claim 16, wherein the controller is configured to correct, at the first time point, an angle measurement result from the code disc based on an angle measurement result from the Hall sensor.
  18. The LiDAR of claim 17, wherein the controller is configured to perform the following operations:
    S206: after the first time point, calculate an angle at which the motor is located at a second time point based on the output signal of the Hall sensor;
    S207: determine an angle at which the motor is located at the second time point based on the output of the photoelectric encoder;
    S208: determine whether the code disc of the photoelectric encoder is dirty based on the angles calculated in operations S206 and S207;
    S210: when the code disc is determined to be dirty, determine the angle of the motor based on the output signal of the Hall sensor after the second time point; or when the code disc is determined to be not dirty, determine the angle of the motor based on the output of the photoelectric encoder.
  19. The LiDAR of claim 12 or 13, wherein the controller is configured to perform Field Oriented Control for the motor based on the output of the Hall sensor when the code disc is determined to be dirty; perform Field Oriented Control for the motor based on the output of the photoelectric encoder when the code disc is determined to be not dirty.
  20. A method, comprising:
    determining a first angle, wherein a motor is located at the first angle at a preset time point based on an output signal of a Hall sensor;
    determining a second angle, wherein the motor is located at the second angle at the preset time point based on an output of a photoelectric encoder;
    determining, based on the first angle and the second angle, whether a code disc is dirty, wherein the photoelectric encoder comprises the code disc, the code disc rotates with a rotor of the motor, and the motor comprises the Hall sensor.
  21. The method of claim 20, wherein the preset time point is the time point when a jump  occurs in the output signal of the Hall sensor.
  22. The method of claim 20 or 21, wherein determining, based on the first angle and the second angle, whether a code disc is dirty comprises:
    determining the code disc is dirty when a difference between the first angle and the second angle exceeds a predetermined threshold.
  23. The method of any of claims 20 to 22, further comprising:
    before the code disc is determined to be dirty, determining, based on the output signal of a Hall sensor or the output signal of the code disc, an angle of the motor at a subsequent time point.
  24. The method of any of claims 20 to 23, further comprising:
    based on a determination that the code disc is not dirty, determining, based on the output of the photoelectric encoder, the angle of the motor.
  25. The method of any of claims 20 to 24, wherein the output signal of the Hall sensor comprises a first state and a second state,
    the preset time point comprises a first time point, wherein the first time point is a time point when the output signal of the Hall sensor jumps from the first state to the second state, and
    the determining, based on the output signal of a Hall sensor or the output signal of the code disc, an angle of the motor at a subsequent time point comprises:
    before the first time point and based on a determination that the code disc is dirty during the first state, determining the angle of the motor at a subsequent time point based on the output signal of the Hall sensor or the output signal of the code disc at a latest time point before the code disc is determined to be dirty, and taking the angle of the motor at the subsequent time point as a measurement result.
  26. The method of claim 25, further comprising:
    correcting, based on an angle measurement result from the Hall sensor, an angle measurement result from the code disc at the first time point.
  27. The method of claim 26, further comprising:
    determining, based on the output signal of the Hall sensor, a third angle, wherein the motor is located at the third angle at a second time point, and the second time point is later than the first time point;
    determining, based on the output signal of the photoelectric encoder, a fourth angle, wherein the motor is located at the fourth angle at the second time point; and
    determining, based on the third angle and the fourth angle, the code disc of the photoelectric encoder is dirty.
  28. The method of claim 27, further comprising:
    based on a determination that the code disc is dirty, determining the angle of the motor after the second time point based on the output signal of the Hall sensor; or
    based on a determination that the code disc is not dirty, determining, the angle of the motor after the second time point based on the output signal of the photoelectric encoder.
  29. The method of claim 28, further comprising:
    performing, based on the output signal of the Hall sensor, field-oriented control for the motor when the code disc is determined to be dirty; or
    performing, based on the output signal of the photoelectric encode, field-oriented control for the motor when the code disc is determined to be not dirty.
PCT/CN2023/135817 2022-12-01 2023-12-01 Method for determining state of code disc, angle measurement method and lidar Ceased WO2024114786A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211537407.9 2022-12-01
CN202211537407.9A CN118131249A (en) 2022-12-01 2022-12-01 Method for determining code wheel state, angle measurement method and laser radar

Publications (1)

Publication Number Publication Date
WO2024114786A1 true WO2024114786A1 (en) 2024-06-06

Family

ID=91238688

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/135817 Ceased WO2024114786A1 (en) 2022-12-01 2023-12-01 Method for determining state of code disc, angle measurement method and lidar

Country Status (2)

Country Link
CN (1) CN118131249A (en)
WO (1) WO2024114786A1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102010046251A1 (en) * 2010-09-22 2012-03-22 Leopold Kostal Gmbh & Co. Kg Rotational position measuring device for rotor, has magnetic sensor arranged around specified range opposite to optical code-disk sensor, and evaluation unit determining measurement for displacement of rotor from output signals of sensors
KR20150078652A (en) * 2013-12-31 2015-07-08 현대자동차주식회사 Method and apparatus for controlling of motor driving power steering system
US20180057040A1 (en) * 2016-08-26 2018-03-01 Hyundai Mobis Co., Ltd. Control apparatus and method of motor driven power steering system
CN208015539U (en) * 2018-02-10 2018-10-26 深圳中菱科技有限公司 Servo-type disc type wheel hub motor
CN110794383A (en) * 2019-11-07 2020-02-14 上海禾赛光电科技有限公司 Code disc, photoelectric encoder and laser radar
CN112187135A (en) * 2020-09-03 2021-01-05 深圳市优必选科技股份有限公司 Chassis motor control method, chassis motor control device, robot, and medium
KR20220114773A (en) * 2021-02-09 2022-08-17 효성티앤에스 주식회사 Method for judging abnormal condition of encoder
US20220334222A1 (en) * 2021-04-16 2022-10-20 Hl Klemove Corp. Lidar apparatus and control method thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102010046251A1 (en) * 2010-09-22 2012-03-22 Leopold Kostal Gmbh & Co. Kg Rotational position measuring device for rotor, has magnetic sensor arranged around specified range opposite to optical code-disk sensor, and evaluation unit determining measurement for displacement of rotor from output signals of sensors
KR20150078652A (en) * 2013-12-31 2015-07-08 현대자동차주식회사 Method and apparatus for controlling of motor driving power steering system
US20180057040A1 (en) * 2016-08-26 2018-03-01 Hyundai Mobis Co., Ltd. Control apparatus and method of motor driven power steering system
CN208015539U (en) * 2018-02-10 2018-10-26 深圳中菱科技有限公司 Servo-type disc type wheel hub motor
CN110794383A (en) * 2019-11-07 2020-02-14 上海禾赛光电科技有限公司 Code disc, photoelectric encoder and laser radar
CN112187135A (en) * 2020-09-03 2021-01-05 深圳市优必选科技股份有限公司 Chassis motor control method, chassis motor control device, robot, and medium
KR20220114773A (en) * 2021-02-09 2022-08-17 효성티앤에스 주식회사 Method for judging abnormal condition of encoder
US20220334222A1 (en) * 2021-04-16 2022-10-20 Hl Klemove Corp. Lidar apparatus and control method thereof

Also Published As

Publication number Publication date
CN118131249A (en) 2024-06-04

Similar Documents

Publication Publication Date Title
US7492444B2 (en) Electric optical distance meter
KR101521356B1 (en) Distance measurement apparatus, distance measurement method, and computer-readable storage medium
US11543503B2 (en) Multi-line laser radar
JP5932371B2 (en) Shape measuring device
US20160146638A1 (en) Rotary Encoder
US5724123A (en) Distance measuring equipment for detecting a scanning direction
JP2009229255A (en) Scanning range finder
CN107314740B (en) Position calibration system and calibration method of double-vibrating-mirror scanning system
US9163959B2 (en) Position detecting device using reflection type photosensor
JP3137307B2 (en) Omnidirectional distance detector
US20130346019A1 (en) Signal processing device of scanning-type distance measurement device, signal processing method, and scanning-type distance measurement device
JP2017062398A (en) Rotation angle detector and laser radar device
CN114930188B (en) LIDAR shielding detection method and system
CN115902837A (en) Calibration method of laser radar, laser radar and calibration system
WO2024114786A1 (en) Method for determining state of code disc, angle measurement method and lidar
JP2014194380A (en) Laser measurement apparatus
CN215064355U (en) Displacement sensor based on photodetector array
CN115825971A (en) Scanning type laser radar based on SPAD chip
WO2021056470A1 (en) Motor module, scanning module, distance measuring device, and control methods
KR101989138B1 (en) Electrical angle estimation method for sinusoidal drive of Brushless DC Motor and motor control system using the method
JPWO2018008393A1 (en) Laser radar equipment
CN114729993A (en) Distance measuring device
CN111684237B (en) Detection method, detection device and laser radar
US20060219875A1 (en) Beam irradiation device
WO2024120372A1 (en) Position detection device for a rotating mechanism of a lidar and self-diagnostic method therefor, and lidar

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23896928

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 23896928

Country of ref document: EP

Kind code of ref document: A1