WO2022087977A1 - 云台的控制方法、云台、设备和存储介质 - Google Patents

云台的控制方法、云台、设备和存储介质 Download PDF

Info

Publication number
WO2022087977A1
WO2022087977A1 PCT/CN2020/124915 CN2020124915W WO2022087977A1 WO 2022087977 A1 WO2022087977 A1 WO 2022087977A1 CN 2020124915 W CN2020124915 W CN 2020124915W WO 2022087977 A1 WO2022087977 A1 WO 2022087977A1
Authority
WO
WIPO (PCT)
Prior art keywords
signal
motor
angle
electrical
converted
Prior art date
Application number
PCT/CN2020/124915
Other languages
English (en)
French (fr)
Inventor
龙彪
吕锦贤
Original Assignee
深圳市大疆创新科技有限公司
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 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2020/124915 priority Critical patent/WO2022087977A1/zh
Priority to CN202080066653.3A priority patent/CN114585881A/zh
Publication of WO2022087977A1 publication Critical patent/WO2022087977A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D5/00Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable
    • G01D5/12Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means
    • G01D5/14Mechanical means for transferring the output of a sensing member; Means for converting the output of a sensing member to another variable where the form or nature of the sensing member does not constrain the means for converting; Transducers not specially adapted for a specific variable using electric or magnetic means influencing the magnitude of a current or voltage

Definitions

  • the invention relates to the technical field of device control, and in particular, to a control method of a PTZ, a PTZ, a device and a storage medium.
  • Movable platforms such as drones, unmanned vehicles, and self-moving robots have been widely used.
  • drones can be connected with shooting equipment, so that drones can be used in many fields such as street view shooting, power inspection, traffic monitoring, post-disaster rescue and so on.
  • the gimbal needs to be reset before entering the attitude control state.
  • the reset process can be as follows: the gimbal receives a start signal, and the motor configured on the gimbal starts to rotate toward the mechanical limit structure disposed near the motor.
  • the motor collides with the mechanical limit structure the corresponding relationship between the mechanical angle and the electrical angle of the motor when the motor is located in the mechanical limit structure can be obtained, so that the reset is completed and the gimbal is successfully started. This way of realizing reset by colliding with the mechanical limit structure will greatly reduce the reset speed of the gimbal.
  • the present invention provides a control method of a pan-tilt, a pan-tilt, equipment and a storage medium, which are used to improve the reset speed of the pan-tilt.
  • the first aspect of the present invention is to provide a control method of a pan/tilt head, the pan/tilt head comprising a pan/tilt head body, a motor for adjusting the posture of the pan/tilt head body, a photoelectric sensor and a photoelectric code disc; the photoelectric code disc rotates together with the rotating part of the motor; the photoelectric sensor is used to obtain the signal generated by the photoelectric code disc;
  • the method includes:
  • the rotation direction and the first signal determine the electrical angle corresponding to the jump point in the first signal, and the electrical angle is the rotation angle of the photoelectric encoder
  • the rotation of the motor is controlled according to the mechanical angle.
  • the second aspect of the present invention is to provide a pan/tilt head, the pan/tilt head comprising: a pan/tilt head body, a motor for adjusting the posture of the pan/tilt head body, a photoelectric sensor, a photoelectric code disc and a control device; the photoelectric code The disk rotates together with the rotating part of the motor; the photoelectric sensor is used to acquire the signal generated by the photoelectric code disk;
  • control device includes a memory and a processor
  • the memory for storing computer programs
  • the processor is configured to run a computer program stored in the memory to achieve:
  • the rotation direction and the first signal determine the electrical angle corresponding to the jump point in the first signal, where the electrical angle is the rotation angle of the photoelectric encoder
  • the rotation of the motor is controlled according to the mechanical angle.
  • the third aspect of the present invention is to provide a control device for a pan/tilt, the pan/tilt includes a pan/tilt body, the motor for adjusting the posture of the pan/tilt body, the photoelectric sensor and the photoelectric code disc ;
  • the photoelectric code disc rotates together with the rotating part of the motor; the photoelectric sensor is used to obtain the signal generated by the photoelectric code disc;
  • the device includes:
  • a processor for running a computer program stored in the memory to achieve:
  • the rotation direction and the first signal determine the electrical angle corresponding to the jump point in the first signal, where the electrical angle is the rotation angle of the photoelectric encoder
  • the rotation of the motor is controlled according to the mechanical angle.
  • a fourth aspect of the present invention is to provide a computer-readable storage medium, the storage medium is a computer-readable storage medium, and program instructions are stored in the computer-readable storage medium, and the program instructions are used in the first aspect.
  • the present invention provides a pan-tilt control method, pan-tilt, equipment and storage medium.
  • the pan-tilt includes a pan-tilt body, a motor, a photoelectric sensor and a photoelectric code disc. The rotating parts of the motor rotate together, and the photoelectric sensor is used to obtain the signal generated by the photoelectric encoder.
  • the corresponding control method is: in response to the start-up operation of the pan/tilt, determine the rotation direction of the motor, and make the motor rotate according to the rotation direction.
  • the first signal output by the photoelectric sensor is acquired, and according to the rotation direction of the motor and the first signal, the electrical angle corresponding to the jump point in the first signal is determined, and the electrical angle is the rotation angle of the photoelectric code disc.
  • the mechanical angle of the trip point that is, the rotation angle of the motor.
  • the corresponding relationship between the electrical angle and the mechanical angle can be obtained, thereby completing the reset of the gimbal.
  • the rotation of the motor can be further controlled according to the mechanical angle, so that the gimbal enters the attitude control state.
  • the motor when the gimbal is reset, the motor only needs to rotate from the current position in the rotation direction until the first signal has a jump point, the motor does not need to hit the mechanical limit structure, and the rotation angle of the motor is smaller than the motor hits the mechanical limit from the current position.
  • the rotation angle of the bit structure improves the reset speed of the gimbal.
  • FIG. 1 is a schematic flowchart of a method for controlling a pan/tilt according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a motor in a gimbal provided by an embodiment of the present invention
  • 3 is a schematic diagram of the respective output signals of the photoelectric sensor and the magnetic field sensor in the PTZ;
  • FIG. 5 is a schematic flowchart of another control method of a pan/tilt according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of the respective output signals of the photoelectric sensor and the magnetic field sensor in the PTZ;
  • FIG. 7 is a flowchart of a method for determining a preset electrical angle and a preset electrical period according to an embodiment of the present invention
  • Figure 9 is a schematic diagram of the output signal of the photoelectric sensor when the photoelectric encoder is polluted
  • FIG. 10 is a schematic flowchart of another method for controlling a pan/tilt according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a control device for a pan/tilt according to an embodiment of the present invention.
  • FIG. 12 is a schematic structural diagram of a pan/tilt according to an embodiment of the present invention.
  • FIG. 13 is a schematic structural diagram of a control device of a pan/tilt according to an embodiment of the present invention.
  • the reset process of the pan/tilt may also be briefly introduced.
  • the gimbal In practical applications, the gimbal must be reset first, and then enter the attitude control stage, that is, the stage of adjusting its own attitude according to the control command.
  • the reset process as mentioned in the background art, it can usually be realized by the collision between the motor and the mechanical limit structure. Since the mechanical limit structure is fixed, when the motor hits the mechanical limit structure, the rotation angle of the motor is a fixed preset angle, and the electrical angle of the motor when the motor is in the mechanical limit structure can be further obtained.
  • the corresponding relationship between the angle and the mechanical angle specifically, the only corresponding relationship between the electrical integration angle and the mechanical angle, so as to complete the reset.
  • the electrical integration angle reference may be made to the descriptions in the following embodiments.
  • the control method of the pan/tilt provided by the embodiment of the present invention may be used.
  • the controller can further respond to the control command generated by the user according to the corresponding relationship between the mechanical angle and the electrical angle, and control the rotation of the motor to control the attitude of the gimbal.
  • the mechanical limit structure is likely to be worn out, so that the motor rotates too much when it collides with the mechanical limit structure.
  • the angle is no longer the preset angle, so that the corresponding relationship between the mechanical angle and the electrical angle is no longer accurate, making the motor rotation angle inaccurate, and ultimately leading to the inaccurate control of the gimbal attitude.
  • the motor is easily blocked by obstacles during the process of rotating the motor until it hits the mechanical limit structure.
  • the controller will mistakenly think that the motor has hit the mechanical limit structure, thus obtaining the wrong correspondence between the mechanical angle and the electrical angle, which will also lead to inaccurate attitude control of the gimbal.
  • the gimbal control method provided by the embodiment of the present invention may also be used.
  • FIG. 1 is a flowchart of a method for controlling a pan/tilt according to an embodiment of the present invention.
  • the execution subject of the control method of the PTZ is a control device. It can be understood that the control device can be implemented as software, or a combination of software and hardware.
  • the control device executes the control method of the pan-tilt, the pan-tilt can be quickly reset and the motor can be rotated accurately in the attitude control stage, so as to ensure the accuracy of the pan-tilt attitude.
  • the control device in this embodiment and the following embodiments may specifically be a pan/tilt or a controller in a movable device, and the movable device may specifically include an unmanned aerial vehicle, a self-moving robot, an unmanned vehicle, and an unmanned boat. and many more.
  • the method may include:
  • the gimbal can include the following parts: a gimbal body, a motor for adjusting the posture of the gimbal body, a photoelectric sensor and a photoelectric code disc.
  • the photoelectric code disc rotates together with the rotating parts of the motor, and the photoelectric sensor acquires the signal generated by the photoelectric code disc.
  • the positional relationship between the motor and the photoelectric encoder can be shown in Figure 2.
  • the number of motors in the gimbal may be multiple, usually three, that is, a pitch axis motor, a roll axis motor, and a pan axis motor.
  • the motors mentioned in the various embodiments of the present application may be any of the motors.
  • each motor in the pan/tilt needs to implement the control method provided by each embodiment of the present application to realize fast reset. After reset, multiple motors need to rotate at the same time to control the attitude of the gimbal, specifically to adjust the attitude of the gimbal body.
  • the user can trigger the power-on operation of the gimbal, and the control device determines the rotation direction of the motor in response to the operation. At this point, the gimbal is in the waiting state.
  • the analog signal output by the photoelectric sensor can be acquired by the control device.
  • the analog signal may be a voltage signal or a current signal. Since the motor does not rotate at this time, the analog signal should be a constant value signal. Then the control device can determine the rotation direction of the motor according to the signal value of the analog signal:
  • the signal value may be a voltage value or a current value.
  • the analog signal output by the photoelectric sensor can be converted into a digital signal, and the rotation direction of the motor can be determined according to the level state of the digital signal:
  • the level state of the digital signal is a high level, it is determined that the motor is to rotate counterclockwise at the current position. If the level state of the digital signal is a low level, it is determined that the motor rotates clockwise.
  • the photoelectric sensor may output a first signal in real time, and the first signal may be an analog signal. And with the rotation of the motor, the signal value of the first signal will change continuously, and a jump occurs when the motor rotates to a certain angle. Specifically, the jump of the signal value may be that the signal value changes from greater than the preset signal value to less than or equal to the preset signal value, or from less than or equal to the preset signal value to greater than the preset signal value.
  • the occurrence of the transition point in the first signal is realized by means of the code track on the optical code disc.
  • the signal output by the photoelectric sensor can be regarded as the signal generated by the photoelectric encoder.
  • the constant-value analog signal output by the photoelectric sensor when the motor is not rotating in step 101 can be called the second signal, and the digital signal obtained after analog-to-digital conversion is called the converted second signal.
  • the control device controls the motor to continue to rotate in this direction.
  • the motor does not need to rotate further, and the controller determines the electrical angle corresponding to the jump point.
  • the electrical angle can be the rotation angle of the photoelectric encoder, specifically, the rotation angle of the electrode pair in the motor.
  • a magnetic field sensor such as a Hall sensor
  • the magnetic field sensor can output a signal reflecting the electrical angle in real time during the rotation of the motor.
  • the control device can determine the output time corresponding to the jump point in the first signal, and find the electrical angle at the same output time in the signal output by the magnetic field sensor, that is, the electrical angle corresponding to the jump point.
  • the electrical period corresponding to the trip point can also be determined from the signal output by the magnetic field sensor.
  • the respective output signals of the photoelectric sensor and the magnetic field sensor may be as shown in FIG. 3 .
  • the mechanical angle corresponding to the jump point is determined according to the electrical angle, and the mechanical angle is the rotation angle of the motor.
  • the electrical integral angle of the jumping point can also be determined according to the electrical angle corresponding to the jumping point and the electrical period corresponding to the jumping point, and then the mechanical angle corresponding to the jumping point can be determined according to the electrical integral angle, that is, the establishment of Correspondence between the electrical integral angle and the mechanical angle at the trip point.
  • mechanical angle electrical integration angle/number of pole pairs included in the motor.
  • electrical integral angle electrical angle+360°*electrical period.
  • the gimbal can be reset successfully. And there is only one transition point in the first signal output by the photoelectric sensor, so the corresponding relationship between the electrical integration angle and the mechanical angle is also unique.
  • the motor is controlled to rotate according to the mechanical angle.
  • the motor can be controlled to rotate according to the mechanical angle, and the gimbal enters the attitude control state.
  • the control device can receive the control command issued by the user, and the control command can include the target electrical angle and the target electrical period.
  • the target mechanical angle corresponding to the electrical angle.
  • the motor can rotate the target mechanical angle to adjust the gimbal attitude, so as to complete the response to the control command issued by the user.
  • the rotation direction of the motor in response to the start-up operation of the pan/tilt head, the rotation direction of the motor is determined, and the motor is rotated according to the rotation direction.
  • the first signal output by the photoelectric sensor is acquired, and according to the rotation direction of the motor and the first signal, the electrical angle corresponding to the jump point in the first signal is determined.
  • the mechanical angle of the trip point is determined.
  • the corresponding relationship between the electrical angle and the mechanical angle can be obtained, thereby completing the reset of the gimbal.
  • the motor can be further controlled to rotate according to the mechanical angle, so that the gimbal enters the attitude control state.
  • the motor when the gimbal is reset, the motor only needs to rotate from the current position along the rotation direction until the first signal has a jump point, and the motor does not need to hit the mechanical limit structure, so that the rotation angle of the motor is smaller than the motor from the current position hits the mechanical stop. The angle that the limit structure turns, thereby improving the reset speed of the gimbal.
  • step 101 of the embodiment shown in FIG. 1 when the rotation direction of the motor is determined, analog-to-digital conversion needs to be performed on the second signal.
  • the conversion of the second signal can be achieved by means of a conversion threshold, then for the determination of the conversion threshold, as shown in FIG. 4 , an optional manner may include the following steps:
  • S201 Acquire a third signal output by the photoelectric sensor during the process of the motor rotating from the first limit angle to the second limit angle.
  • the process of determining the conversion threshold provided in this embodiment can be applied to the factory setting stage of the pan/tilt head.
  • the gimbal Before leaving the factory, the gimbal responds to the power-on operation, and the motor will rotate from the first limit angle to the second limit angle. And during the rotation process, the photoelectric sensor can output a third signal, and the third signal can also be an analog signal.
  • the two limit angles of the motor can be defined by the position of the mechanical limit structure.
  • the rotation angle range is -150° ⁇ +150°.
  • the two limit angles of the motor are also the two boundary values of the above-mentioned rotation angle range.
  • a transition threshold is determined according to the signal value in the third signal.
  • the extreme values in the third signal that is, the maximum value and the minimum value
  • the first conversion threshold is then determined according to the maximum value and the difference in the third signal
  • the second conversion threshold is determined according to the minimum value and the difference in the third signal. Wherein, the first conversion threshold is greater than the second conversion threshold.
  • analog-to-digital conversion may be performed on the second signal obtained during the user's use phase in the following manner:
  • the target signal point is set to a high level. If the signal value of the target signal point is less than the second conversion threshold, the target signal point is set to a low level. If the signal value of the target signal point is between the two switching thresholds, it is determined that the target signal point and the reference signal point have the same level value.
  • the target signal point is any signal point in the second signal.
  • the reference signal point and the target signal point correspond to adjacent output times in the second signal, and the reference signal point output time is earlier than the target signal point.
  • step 101 in the above embodiment can be continued.
  • the first signal output by the photoelectric sensor is an analog signal, and the signal value of the analog signal fluctuates. As shown in FIG. 3 , this fluctuation will interfere with the determination of the transition point.
  • the conversion threshold ie, the first conversion threshold and the second conversion threshold
  • the conversion threshold can be determined by the method shown in FIG. 4 to perform analog-to-digital conversion on the signal, and then the transition point can be determined according to the first signal of the converted signal. . to reset.
  • FIG. 5 is a flowchart of another pan/tilt control method according to an embodiment of the present invention. As shown in Figure 5, the method may include the following steps:
  • analog-to-digital conversion can also be performed according to the first conversion threshold and the second conversion threshold to obtain the converted first signal, then the transition point in the converted first signal is actually The point in a digital signal where a level transition occurs.
  • the conversion process of the first signal is the same as the conversion process of the second signal, and for details, reference may be made to the relevant description in the embodiment shown in FIG. 4 .
  • the control device can more accurately identify the jump point according to the converted first signal.
  • the photoelectric sensor and the magnetic field sensor arranged in the pan/tilt can output signals respectively. If there is a jump point in the converted first signal, the control device can determine the output time corresponding to the jump point in the converted first signal, and find the electrical angle output at the same output time and the output time in the signal output by the magnetic field sensor.
  • the electrical period to which the electrical angle belongs that is, the electrical angle and electrical period corresponding to the trip point.
  • the first signal output by the photoelectric sensor, the converted first signal, and the signal output by the magnetic field sensor may be as shown in FIG. 6 .
  • the content of this part is similar to the content in step 103 in the embodiment shown in FIG. 1 , and reference may be made to the above description.
  • control device may control the motor to continue to rotate in the direction determined in step 301 until there is a jump point in the converted first signal.
  • analog-to-digital conversion is first performed on the first signal output by the photoelectric sensor, and the transition point is determined in the digital signal obtained after conversion. Since the level jump of the digital signal is obviously changed, the control device can more accurately identify the unique jump point in the first signal after conversion, and obtain the accurate electrical angle and mechanical angle, so that the reset can be successfully completed. Accurately calculate the angle that the motor needs to rotate, so as to ensure that the control device can accurately respond to the control commands issued by the user and control the attitude of the gimbal.
  • the position of the motor at the trip point should be the same for each reset, whether it is the user phase or the factory setting phase.
  • the position of the motor is slightly different when the trip point occurs during each reset process, which makes the electrical angle, electrical cycle and mechanical angle corresponding to the trip point. Also different.
  • the electrical and mechanical angles of the transition points in the signal can be re-determined according to the methods provided in the above embodiments during each reset.
  • the jump point in the first signal can also be determined by means of the preset electrical angle and the preset electrical period. The corresponding electrical angle and electrical period are adjusted.
  • the pan/tilt reset can be realized in the manner shown in FIG. 1 or FIG. 5 . .
  • the electrical period to which the electrical angle corresponding to the trip point belongs can be adjusted according to the preset electrical period, and then according to the adjusted electrical period and The electrical angle corresponding to the trip point determines the mechanical angle corresponding to the trip point. Finally, the pan-tilt reset is realized according to the adjustment result.
  • the preset electrical cycle is the Pth electrical cycle
  • the difference between the electrical angle of the trip point and the preset electrical angle is less than 180°
  • the electrical cycle of the trip point is the same as the preset electrical cycle, which is the Pth electrical cycle. cycle.
  • the mechanical angle corresponding to the trip point electrical integration angle/number of pole pairs included in the motor.
  • electrical integral angle electrical angle+360°*P.
  • the difference between the electrical angle of the trip point and the preset electrical angle is greater than 180°, it is determined that the electrical cycle to which the trip point belongs is adjusted to be within the P-1th electrical cycle.
  • the mechanical angle corresponding to the trip point electrical integration angle/number of pole pairs included in the motor.
  • electrical integral angle electrical angle+360°*(P-1).
  • the preset electrical angle and the preset electrical period used in the above process can be obtained in the following manner:
  • the motor can be rotated from the first limit angle to the second limit angle, and the conversion threshold is determined according to the output third signal, and then the conversion threshold is used to adjust the first limit angle.
  • the two signals are converted from analog to digital.
  • the motor turns from the second limit angle back to the first limit angle, and the photoelectric sensor can output a fourth signal during this process, and the fourth signal is also an analog signal.
  • Analog-to-digital conversion may be performed on the fourth signal according to the conversion threshold determined in the embodiment shown in FIG. 4 , so as to obtain the converted fourth signal.
  • the execution sequence of the embodiments shown in FIG. 4 and FIG. 7 is: in the factory setting stage, the conversion threshold is determined first, and then the preset electrical angle and the preset electrical period are determined.
  • S403 Determine a transition point in the converted fourth signal according to the signal value of the converted fourth signal.
  • the transition point in the signal is determined according to the signal value of the converted fourth signal, that is, the level value.
  • the signal output by the magnetic field sensor can determine the electrical angle corresponding to the jump point, that is, the preset electrical angle; at the same time, determine the corresponding electrical angle of the jump point.
  • Electrical cycle that is, the preset electrical cycle. For the specific process, refer to the relevant description in step 103 or step 305 .
  • the preset electrical angle and the preset electrical period can be pre-generated in the factory setting stage, and the two can also be used as reference values to adjust the electrical angle and electrical period obtained by the user during the use stage, thereby further ensuring the mechanical angle Accuracy, to achieve fast reset.
  • FIG. 8 For the conversion threshold value pre-generated in the factory setting stage, in parallel with the embodiment shown in FIG. 4 , another optional generation method may be as shown in FIG. 8 , and the method may include the following steps.
  • S501 Acquire a fifth signal output by the photoelectric sensor during the process of the motor rotating from the first limit angle to the second limit angle.
  • the fifth signal here is actually the same signal as the “third signal” in the embodiment shown in FIG. 4 , but a different name is chosen to clearly illustrate the two conversion threshold generation methods. Then, the execution process of the foregoing step 501 is similar to the corresponding steps in the foregoing embodiment, and reference may be made to the relevant description in the embodiment shown in FIG. 4 , and details are not repeated here.
  • S502 Determine a differential signal corresponding to the fifth signal according to signal values of adjacent signal points in the fifth signal.
  • S503 Determine the conversion threshold according to the extreme value in the differential signal.
  • the fifth signal that is, the signal value of the reference signal point in the fifth signal is subtracted from the signal value of the target signal point, and then a differential signal is generated from the difference value corresponding to each target signal point.
  • the target signal point is any signal point in the fifth signal.
  • the reference signal point is adjacent to the output time of the target signal point, and the output time of the reference signal point is earlier than the target signal point.
  • the extreme values in the differential signal are determined, and the difference between the maximum value and the minimum value of the extreme values is calculated.
  • the third conversion threshold is determined according to the maximum value, the difference value and the preset compensation coefficient; the fourth conversion threshold value is determined according to the minimum value, the difference value and the preset compensation coefficient. Wherein, the third conversion threshold is greater than the fourth conversion threshold.
  • the default compensation system is usually set to a value less than 1, such as 0.25.
  • the second signal obtained during the user's use phase can be converted in the following manner:
  • the target signal point is set to a high level. If the signal value of the target signal point is less than the fourth conversion threshold, the target signal point is set to a low level. If the signal value of the target signal point is between the two switching thresholds, it is determined that the target signal point and the reference signal point have the same level value.
  • one of the methods shown in FIG. 4 or FIG. 8 may be selected to determine the conversion threshold according to actual requirements.
  • the first signal output by the photoelectric sensor will fluctuate, that is, the first signal may contain multiple small wave peaks and one large wave peak. crests, as shown in Figure 9, and the transition point usually occurs near the large crest. At this time, if the pan/tilt reset is implemented using the embodiment shown in FIG. 5 , these wavelet peaks will affect the determination of the transition point in the signal.
  • the method may include the following steps:
  • the conversion threshold may be obtained as shown in FIG. 4 or FIG. 8 , and analog-to-digital conversion is performed on the first signal output by the photoelectric sensor to obtain the converted first signal.
  • the maximum difference value may be determined in the differential signal, and the ratio of the signal value in the differential signal to the maximum difference value may be determined as the first weight value.
  • M is the preset coefficient
  • N is the result value. If it is determined that there is a transition point in the converted first signal according to the method in the embodiment shown in FIG. 1 or FIG. 5 , the result value is 1; otherwise, the result value is 0.
  • the probability that a transition point exists can be calculated according to the first weight value and the second weight value. For example, the sum of the two is determined as the probability of whether there is a transition point in the converted first signal.
  • the converted first signal and the differential signal are comprehensively considered, so as to ensure the accuracy of the transition point identification.
  • S606 Determine the electrical angle corresponding to the transition point in the converted first signal.
  • step 606 The execution process of the foregoing step 606 is similar to the corresponding steps in the foregoing embodiment, and reference may be made to the relevant description in the embodiment shown in FIG. 5 , and details are not repeated here.
  • S607 Determine the mechanical angle corresponding to the jumping point according to the electrical angle corresponding to the jumping point and the preset electrical period.
  • the mechanical angle corresponding to the trip point electrical integration angle/number of pole pairs included in the motor.
  • the electrical integral angle electrical angle+360°*P, and P is the preset electrical period.
  • the acquisition of the preset electrical period can also be achieved in the factory setting stage, and can be obtained together with the process of determining the conversion threshold value in the embodiment shown in FIG. 8 .
  • the signal output by the magnetic field sensor can be obtained; at the same time, the differential signal corresponding to the fourth signal output by the photoelectric sensor can also be calculated. Then, the output time corresponding to the extreme value in the differential signal is determined, and in the signal output by the magnetic field sensor, the electrical period corresponding to the extreme value is determined, that is, the preset electrical period.
  • the conversion threshold, the preset electrical angle, and the preset electrical period are obtained separately in the example shown in FIG. 5 .
  • the specific process refer to the embodiments shown in FIG. 4 and FIG. 7 , but in this embodiment are obtained in sync, which also simplifies the factory setting process.
  • the motor is controlled to continue to rotate along the rotation direction.
  • the motor reset is realized by means of the differential signal corresponding to the first signal output by the photoelectric sensor, and multiple wavelet peaks in the first signal can be eliminated through differential calculation, thereby ensuring the accuracy of the jump point determination, thus completing the PTZ reset.
  • FIG. 11 is a schematic structural diagram of a control device for a pan/tilt according to an embodiment of the present invention.
  • the present embodiment provides a control device for a pan/tilt, and the control device for the pan/tilt can perform the above
  • the control method of the PTZ specifically, the control device of the PTZ includes:
  • the direction determination module 11 is used for determining the rotation direction of the motor in response to the start-up operation of the gimbal.
  • the acquiring module 12 is configured to acquire the photoelectric sensor and output the first signal during the rotation of the motor along the rotation direction.
  • the electrical angle determination module 13 is configured to determine the electrical angle corresponding to the jump point in the first signal according to the rotation direction and the first signal, where the electrical angle is the rotation angle of the photoelectric encoder.
  • the mechanical angle determination module 14 is configured to determine the mechanical angle corresponding to the trip point according to the electrical angle, where the mechanical angle is the rotation angle of the motor.
  • the control module 15 is used to control the rotation of the motor according to the mechanical angle.
  • the pan/tilt includes a pan/tilt body, the motor for adjusting the posture of the pan/tilt body, the photoelectric sensor, and the photoelectric code disc; the photoelectric code disc follows the rotating part of the motor rotate together; the photoelectric sensor is used to acquire the signal generated by the photoelectric encoder.
  • the apparatus shown in FIG. 11 may also execute the method of the embodiment shown in FIG. 1 to FIG. 10 .
  • the apparatus shown in FIG. 11 may also execute the method of the embodiment shown in FIG. 1 to FIG. 10 .
  • parts not described in detail in this embodiment reference may be made to the related description of the embodiment shown in FIG. 1 to FIG. 10 .
  • For the execution process and technical effects of the technical solution refer to the descriptions in the embodiments shown in FIG. 1 to FIG. 10 , which will not be repeated here.
  • FIG. 12 is a schematic structural diagram of a pan/tilt according to an embodiment of the present invention; with reference to FIG. 12 , an embodiment of the present invention provides a pan/tilt.
  • the pan/tilt includes: a pan/tilt body 21 , a motor 22 for adjusting the posture of the pan/tilt body, a photoelectric sensor 23 , a photoelectric code disc 24 and a control device 25 ; the photoelectric code disc 24 follows the motor 22 .
  • the rotating parts rotate together; the photoelectric sensor 23 acquires the signal generated by the photoelectric code disc 24;
  • the control device 25 includes a memory and a processor
  • the memory 251 is used to store computer programs
  • the processor 252 is configured to run the computer program stored in the memory to realize:
  • the rotation direction and the first signal determine the electrical angle corresponding to the jump point in the first signal, where the electrical angle is the rotation angle of the photoelectric encoder
  • the rotation of the motor is controlled according to the mechanical angle.
  • the processor 252 is further configured to: acquire the second signal output by the photoelectric sensor based on the position of the motor when the power-on operation is triggered; convert the second signal according to the conversion threshold; and convert the second signal according to the converted The level state of the second signal determines the rotation direction of the motor.
  • the processor 252 is further configured to: if the level state of the second signal after the conversion is a low level, determine that the motor rotates clockwise; and if the level state of the second signal after the conversion is a low level If it is a high level, it is determined that the motor rotates counterclockwise.
  • the processor 252 is further configured to: acquire the third signal output by the photoelectric sensor during the process of the motor rotating from the first limit angle to the second limit angle ; and determining the transition threshold based on an extreme value in the third signal.
  • the processor 252 is further configured to: convert the first signal according to the conversion threshold; and if it is determined according to the signal value of the converted first signal that a transition point exists in the converted first signal, Then, in the signal output by the magnetic field sensor in the pan/tilt head, the electrical angle corresponding to the jumping point is determined.
  • the processor 252 is further configured to control the motor to continue to rotate in the rotation direction if it is determined according to the signal value of the converted first signal that there is no jump point in the converted first signal.
  • the processor 252 is further configured to: if the electrical angle corresponding to the jump point is different from the preset electrical angle, adjust the electrical period of the electrical angle corresponding to the jump point according to the preset electrical period; The electrical angle corresponding to the jumping point and the adjusted electrical period determine the mechanical angle corresponding to the jumping point.
  • the processor 252 is further configured to: acquire the output of the photoelectric sensor during the process of rotating the motor from the second limit angle to the first limit angle convert the fourth signal according to the conversion threshold; determine the transition point in the converted fourth signal according to the signal value of the converted fourth signal; and in the signal output by the magnetic field sensor , determining that the electrical angle corresponding to the jump point in the converted fourth signal is the preset electrical angle, and determining that the electrical period corresponding to the jump point in the converted fourth signal is the preset electrical period .
  • the processor 252 is further configured to: acquire the fifth signal output by the photoelectric sensor during the process of rotating the motor from the first limit angle to the second limit angle ; determining a differential signal corresponding to the fifth signal according to the signal values of adjacent signal points in the fifth signal; and determining the conversion threshold according to an extreme value in the differential signal.
  • the processor 252 is further configured to: convert the first signal according to the conversion threshold; and determine the converted first signal according to the converted first signal and the differential signal corresponding to the first signal. The probability of a jump point in the signal; if the probability is greater than or equal to a preset value, determine the electrical angle corresponding to the jump point in the converted first signal; and according to the electrical angle corresponding to the jump point and a preset electrical period to determine the mechanical angle corresponding to the trip point.
  • processor 252 is further configured to: if the probability is less than the preset value, control the motor to continue to rotate in the rotation direction.
  • the processor 252 is further configured to: acquire the signal output by the magnetic field sensor during the process of rotating the motor from the first limit angle to the second limit angle; and In the signal output by the magnetic field sensor, it is determined that the electrical period corresponding to the extreme value in the differential signal is the preset electrical period.
  • the pan/tilt shown in FIG. 12 can execute the method of the embodiment shown in FIG. 1 to FIG. 10 .
  • the structure of the control device of the PTZ shown in FIG. 13 can be implemented as an electronic device, which can be a controller in a PTZ or a movable platform, or a terminal device used by a user , a remote server, or a remote control device such as a remote control that matches the mobile platform.
  • the electronic device may include: one or more processors 31 and one or more memories 32 .
  • the memory 32 is used for storing a program that supports the electronic device to execute the control method of the pan/tilt provided in the embodiments shown in FIG. 1 to FIG. 10 .
  • the processor 31 is configured to execute programs stored in the memory 32 .
  • the program includes one or more computer instructions, wherein, when the one or more computer instructions are executed by the processor 31, the following steps can be implemented:
  • the rotation direction and the first signal determine the electrical angle corresponding to the jump point in the first signal, where the electrical angle is the rotation angle of the photoelectric encoder
  • the pan/tilt includes a pan/tilt body, the motor for adjusting the posture of the pan/tilt body, the photoelectric sensor and the photoelectric code disc; the photoelectric code disc rotates together with the rotating part of the motor ; The photoelectric sensor acquires the signal generated by the photoelectric encoder.
  • the structure of the control device of the PTZ may further include a communication interface 23 for the electronic device to communicate with other devices or a communication network.
  • the processor 31 may be configured to: obtain the second signal output by the photoelectric sensor based on the position of the motor when the power-on operation is triggered; convert the second signal according to the conversion threshold; and convert the second signal according to the converted The level state of the second signal determines the rotation direction of the motor.
  • the processor 31 may be configured to: if the level state of the second signal after the conversion is a low level, determine that the motor rotates clockwise; and if the level state of the second signal after the conversion is a low level If it is a high level, it is determined that the motor rotates counterclockwise.
  • the processor 21 may be configured to: acquire the third signal output by the photoelectric sensor during the process of the motor rotating from the first limit angle to the second limit angle ; and determining the transition threshold based on an extreme value in the third signal.
  • the processor 31 may be configured to: convert the first signal according to the conversion threshold; and if it is determined according to the signal value of the converted first signal that a transition point exists in the converted first signal, Then, in the signal output by the magnetic field sensor in the pan/tilt head, the electrical angle corresponding to the jumping point is determined.
  • the processor 31 may be configured to control the motor to continue to rotate in the rotation direction if it is determined according to the signal value of the converted first signal that there is no jump point in the converted first signal.
  • the processor 31 may be configured to: if the electrical angle corresponding to the jump point is different from the preset electrical angle, adjust the electrical period of the electrical angle corresponding to the jump point according to the preset electrical period; The electrical angle corresponding to the jumping point and the adjusted electrical period determine the mechanical angle corresponding to the jumping point.
  • the processor 21 may be configured to: acquire the output of the photoelectric sensor during the rotation of the motor from the second limit angle to the first limit angle convert the fourth signal according to the conversion threshold; determine the transition point in the converted fourth signal according to the signal value of the converted fourth signal; and in the signal output by the magnetic field sensor , determining that the electrical angle corresponding to the jump point in the converted fourth signal is the preset electrical angle, and determining that the electrical period corresponding to the jump point in the converted fourth signal is the preset electrical period .
  • the processor 31 may be configured to: acquire the fifth signal output by the photoelectric sensor during the process of rotating the motor from the first limit angle to the second limit angle ; determining a differential signal corresponding to the fifth signal according to the signal values of adjacent signal points in the fifth signal; and determining the conversion threshold according to an extreme value in the differential signal.
  • the processor 31 may be configured to: convert the first signal according to the conversion threshold; determine the converted first signal according to the converted first signal and the differential signal corresponding to the first signal. The probability of a jump point in the signal; if the probability is greater than or equal to a preset value, determine the electrical angle corresponding to the jump point in the converted first signal; and according to the electrical angle corresponding to the jump point and a preset electrical period to determine the mechanical angle corresponding to the trip point.
  • the processor 31 may be configured to: if the probability is less than the preset value, control the motor to continue to rotate in the rotation direction.
  • the processor 31 may be configured to: acquire the signal output by the magnetic field sensor during the process of rotating the motor from the first limit angle to the second limit angle; and In the signal output by the magnetic field sensor, it is determined that the electrical period corresponding to the extreme value in the differential signal is the preset electrical period.
  • the device shown in FIG. 13 can execute the method of the embodiment shown in FIG. 1 to FIG. 10 .
  • the device shown in FIG. 13 can execute the method of the embodiment shown in FIG. 1 to FIG. 10 .
  • the device shown in FIG. 13 can execute the method of the embodiment shown in FIG. 1 to FIG. 10 .
  • an embodiment of the present invention provides a computer-readable storage medium, where the storage medium is a computer-readable storage medium, and program instructions are stored in the computer-readable storage medium, and the program instructions are used to implement the cloud in FIG. 1 to FIG. 10 . control method of the console.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Studio Devices (AREA)
  • Accessories Of Cameras (AREA)

Abstract

一种云台的控制方法、设备、云台和存储介质,响应于云台的开机操作,确定电机的转动方向(S101),以使电机按照此转动方向转动。在转动过程中,获取光电传感器输出的第一信号,并确定第一信号中跳变点对应的电气角度,此电气角度为光电码盘的转动角度。再根据电气角度确定跳变点的机械角度,即电机的转动角度(S104),从而能得到电气角度和机械角度间的对应关系,以完成云台的复位。之后可以进一步根据机械角度控制电机转动(S105)。上述方法中,电机复位时只需要从当前位置沿转动方向转动直至第一信号出现跳变点即可,电机无需撞击机械限位结构,使得电机转动的角度要小于电机从当前位置撞击到机械限位结构所转过的角度,从而大大提高云台的复位速度。

Description

云台的控制方法、云台、设备和存储介质 技术领域
本发明涉及设备控制技术领域,尤其涉及一种云台的控制方法、云台、设备和存储介质。
背景技术
如无人机、无人车、自移动机器人等的可移动平台已经得到了广泛应用。以无人机为例,借助云台可以将无人机与拍摄设备连接起来,以使无人机能够应用在如街景拍摄、电力巡检、交通监视、灾后救援等的众多领域中。
现有技术中,云台需要先复位再进入姿态控制状态,复位过程可以为:云台接收启动信号,云台上配置的电机会开始向设置于电机附近的机械限位结构转动。当电机与机械限位结构发生碰撞时,可以得到当电机位于机械限位结构时,电机的机械角度与电气角度之间的对应关系,从而完成复位,云台也启动成功。这种通过碰撞机械限位结构实现复位的方式会大大降低云台的复位速度。
发明内容
本发明提供了一种云台的控制方法、云台、设备和存储介质,用于提高云台的复位速度。
本发明的第一方面是为了提供一种云台的控制方法,所述云台包括云台机体、用于调节所述云台机体姿态的电机、光电传感器以及光电码盘;所述光电码盘随所述电机的转动部件一同转动;所述光电传感器用于获取所述光电码盘产生的信号;
所述方法包括:
响应于所述云台的开机操作,确定所述电机的转动方向;
在所述电机沿所述转动方向转动的过程中,获取所述光电传感器输出的所述第一信号;
根据所述转动方向和所述第一信号,确定所述第一信号中的跳变点对应 的电气角度,所述电气角度为所述光电码盘的转动角度;
根据所述电气角度确定所述跳变点对应的机械角度,所述机械角度为所述电机的转动角度;
根据所述机械角度控制所述电机转动。
本发明的第二方面是为了提供一种云台,所述云台包括:云台机体、用于调节所述云台机体姿态的电机、光电传感器、光电码盘以及控制装置;所述光电码盘随所述电机的转动部件一同转动;所述光电传感器用于获取所述光电码盘产生的信号;
所述控制装置包括存储器和处理器;
所述存储器,用于存储计算机程序;
所述处理器,用于运行所述存储器中存储的计算机程序以实现:
响应于所述云台的开机操作,确定所述电机的转动方向;
在所述电机沿所述转动方向转动的过程中,获取所述光电传感器输出的所述第一信号;
根据所述转动方向和所述第一信号,确定所述第一信号中的跳变点对应的电气角度,所述电气角度为所述光电码盘的转动角度;
根据所述电气角度确定所述跳变点对应的机械角度,所述机械角度为所述电机的转动角度;
根据所述机械角度控制所述电机转动。
本发明的第三方面是为了提供一种云台的控制设备,所述云台包括云台机体、用于调节所述云台机体姿态的所述电机、所述光电传感器以及所述光电码盘;所述光电码盘随所述电机的转动部件一同转动;所述光电传感器用于获取所述光电码盘产生的信号;
所述设备包括:
存储器,用于存储计算机程序;
处理器,用于运行所述存储器中存储的计算机程序以实现:
响应于云台的开机操作,确定电机的转动方向;
在所述电机沿所述转动方向转动的过程中,获取光电传感器输出的第一信号;
根据所述转动方向和所述第一信号,确定所述第一信号中的跳变点对应的电气角度,所述电气角度为光电码盘的转动角度;
根据所述电气角度确定所述跳变点对应的机械角度,所述机械角度为所述电机的转动角度;
根据所述机械角度控制所述电机转动。
本发明的第四方面是为了提供一种计算机可读存储介质,所述存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,所述程序指令用于第一方面所述的云台的控制方法。
本发明提供的云台的控制方法、云台、设备和存储介质,云台包括云台机体、电机、光电传感器和光电码盘,其中,电机用于调节云台机体的姿态,光电码盘随电机的转动部件一同转动,光电传感器用于获取光电码盘产生的信号。
对于具有上述结构的云台,对应的控制方法为:响应于云台的开机操作,确定电机的转动方向,使电机按照此转动方向转动。在转动过程中,获取光电传感器输出的第一信号,并根据电机的转动方向以及第一信号,确定第一信号中跳变点对应的电气角度,此电气角度为光电码盘的转动角度。再根据电气角度确定跳变点的机械角度,即电机的转动角度。借助第一信号中唯一的跳变点,能得到电气角度和机械角度的对应关系,从而完成云台复位。复位成功后可以进一步根据机械角度控制电机转动,使云台进入姿态控制状态。
上述方法中,云台复位时电机只需要从当前位置沿转动方向转动直至第一信号出现跳变点即可,电机无需撞击机械限位结构,电机转动的角度小于电机从当前位置撞击到机械限位结构所转过的角度,提高云台的复位速度。
附图说明
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1为本发明实施例提供的一种云台的控制方法的流程示意图;
图2为本发明实施例提供的云台中电机的示意图;
图3为云台中光电传感器、磁场传感器各自输出信号的示意图;
图4为本发明实施例提供的一种转换阈值确定方式的流程图;
图5为本发明实施例提供的另一种云台的控制方法的流程示意图;
图6为云台中光电传感器、磁场传感器各自输出信号的示意图;
图7为本发明实施例提供的一种预设电气角度、预设电气周期确定方式的流程图;
图8为本发明实施例提供的另一种转换阈值确定方式的流程图;
图9为光电码盘受到污染时,光电传感器输出信号的示意图;
图10为本发明实施例提供的又一种云台的控制方法的流程示意图;
图11为本发明实施例提供的一种云台的控制装置的结构示意图;
图12为本发明实施例提供的一种云台的结构示意图;
图13为本发明实施例提供的一种云台的控制设备的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
除非另有定义,本文所使用的所有的技术和科学术语与属于本发明的技术领域的技术人员通常理解的含义相同。本文中在本发明的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本发明。
面结合附图,对本发明的一些实施方式作详细说明。在各实施例之间不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。
在对本发明实施例提供的云台的控制方法进行详细介绍之前,还可以先对云台的复位过程进行简单介绍。
在实际应用中,云台要先复位,之后才会进入姿态控制阶段,即进入根据控制指令调整自身姿态的阶段。对于复位过程,正如背景技术中提到的,通常可以通过电机与机械限位结构发生碰撞来实现。由于机械限位结构是固定的,因此,当电机撞击到机械限位结构时,电机转动的角度是一个固定的预设角度,则可以得到进一步得到电机处于机械限位结构时,电机的电气角度和机械角度之间的对应关系,具体来说是电气积分角度和机械角度之间的唯一对应关系,从而完成复位。其中,对于电气积分角度可以参见下述实施例中的描述。
由于在复位过程中,电机需要转动至与机械限位机构发生碰撞,电机转动的角度大,转动时间长,因此,导致复位速度慢。而为了提高复位速度,则可以使用本发明实施例提供的云台的控制方法。
复位成功后,控制器可以进一步根据机械角度和电气角度之间的对应关系响应用户产生的控制指令,控制电机转动,实现对云台姿态的控制。
在姿态控制阶段,一种情况,由于云台每次启动都要进行复位,并且随着复位次数的增加,机械限位结构很可能会发生磨损,从而使电机碰撞到机械限位结构时转动过的角度不再是预设角度,使得机械角度和电气角度之间的对应关系不再准确,使得电机转动的角度不准确,最终导致云台姿态的控制也不准确。
另一种情况,在电机转动至撞击到机械限位结构的过程中容易受到障碍物的阻挡。当电机撞击到障碍物时,控制器会误认为电机已经撞击到了机械限位结构,从而得到错误的机械角度和电气角度之间的对应关系,也会导致云台姿态控制的不准确。
为了得到准确的机械角度和电气角度之间的对应关系,保证云台姿态控制的准确,也可以使用本发明实施例提供的云台的控制方法。
图1为本发明实施例提供的一种云台的控制方法的流程图。该云台的控制方法的执行主体是控制设备。可以理解的是,该控制设备可以实现为软件、或者软件和硬件的组合。控制设备执行该云台的控制方法可以实现云台的快速复位以及在姿态控制阶段,电机能够准确转动,保证云台姿态的准确。本实施例以及下述各实施例中的控制设备具体来说可以是云台或者可移动设备中的控制器,可移动设备具体可以包括无人机、自移动机器人、无人车、无人船等等。具体的,该方法可以包括:
S101,响应于云台的开机操作,确定电机的转动方向。
云台可以包括以下部分:云台机体、用于调节云台机体姿态的电机、光电传感器以及光电码盘。其中,光电码盘随电机的转动部件一同转动,光电传感器获取光电码盘产生的信号。电机和光电码盘的位置关系可以如图2所示。
可选地,云台中电机的数量可以为多个,通常为3个,即俯仰轴电机,横滚轴电机以及平移轴电机。本申请各实施例中提及的电机可以是其中的任一电机。并且云台中的每个电机都需要执行本申请中各实施例提供的控制方法 实现快速复位。复位后,多个电机需要同时转动,来实现云台姿态的控制,具体来说是调整云台机体的姿态。
需要说明的有,本实施例提供的各步骤可以应用在用户对云台的实际使用阶段。
基于上述描述,用户可以触发云台的开机操作,控制设备响应于此操作来确定电机的转动方向。此时,云台处于待复位状态。
一种可选地方式,电机处于当前位置时,光电传感器输出的模拟信号可以被控制设备获取到。可选地,模拟信号可以是电压信号或者电流信号。由于此时的电机并未发生转动,因此,模拟信号应该是一个恒值信号。则控制设备可以根据模拟信号的信号值确定电机的转动方向:
若信号值大于预设值,则确定电机要在当前位置上沿逆时针转动。若信号值小于或等于预设值,则确定电机沿顺时针转动。其中,信号值可以是电压值或电流值。
另一种可选地方式,可以将光电传感器输出的模拟信号转换为数字信号,并根据数字信号的电平状态确定电机的转动方向:
若数字信号的电平状态为高电平,则确定电机要在当前位置上沿逆时针转动。若数字信号的电平状态为低电平,则确定电机沿顺时针转动。
需要说明的有,上述确定转动方向的各方式都要遵循一个原则:电机沿该转动方向转动后,能够使光电传感器输出的信号中存在跳变点。
S102,在电机沿转动方向转动的过程中,获取光电传感器输出第一信号。
电机在沿步骤101中确定出的转动方向转动的过程中,光电传感器可以实时输出第一信号,此第一信号可以为模拟信号。并且随着电机的转动,第一信号的信号值会不断变化,并在电机转动到某一角度时产生跳变。其中,信号值的跳变具体可以为信号值由大于预设信号值变为小于或等于预设信号值,或者为由小于或等于预设信号值变为大于预设信号值。可选地,第一信号中跳变点的出现是借助光电码盘上的码道实现的。并且在本实施例以及下述各实施例中,光电传感器输出的信号可认为是光电码盘产生的信号。
并且为了保证描述方式的统一,可以将步骤101中电机未转动时光电传感器输出的恒值模拟信号称为第二信号,将进行模数转换后得到的数字信号称为转换后第二信号。
S103,根据转动方向和第一信号,确定第一信号中的跳变点对应的电气 角度,电气角度为光电码盘的转动角度。
电机在沿转动方向转动过程中,一种情况,当光电传感器输出的第一信号不存在跳变点时,控制设备控制电机继续沿该方向转动。另一种情况,当光电传感器输出的第一信号中存在跳变点时,电机无需进一步转动,控制器确定此跳变点对应的电气角度。电气角度可以为光电码盘的转动角度,具体来说是电机中电极对转过的角度。
对于电气角度的确定,可选地,除了光电传感器,云台中还设置有磁场传感器,比如霍尔传感器。磁场传感器能够在电机转动过程中实时输出反映电气角度的信号。则控制设备可以确定第一信号中跳变点对应的输出时间,在磁场传感器输出的信号中找到在相同输出时间下的电气角度,也即是跳变点对应的电气角度。同时,还能从磁场传感器输出的信号中确定出跳变点对应的电气周期。其中,光电传感器和磁场传感器各自输出的信号可以如图3所示。
S104,根据电气角度确定跳变点对应的机械角度,机械角度为电机的转动角度。
进一步的,还可以根据跳变点对应的电气角度以及跳变点对应的电气周期确定跳变点的电气积分角度,再根据此电气积分角度确定跳变点对应的机械角度,也即是建立起在跳变点上,电气积分角度和机械角度之间的对应关系。具体来说,机械角度=电气积分角度/电机包含的极对数。其中,电气积分角度=电气角度+360°*电气周期。
经过上述步骤云台即可成功复位。并且在光电传感器输出的第一信号中只存在一个跳变点,因此,电气积分角度和机械角度的对应关系也是唯一的。
S105,根据机械角度控制电机转动。
复位后,即可根据机械角度控制电机转动,此时云台进入姿态控制状态。具体的,控制设备可以接收用户发出的控制指令,控制指令中可以包含目标电气角度以及目标电气周期,此时可以根据步骤104中建立起的在跳变点上的角度的对应关系,确定与目标电气角度对应的目标机械角度。电机可以转动此目标机械角度,调整云台姿态,从而完成对用户发出的控制指令的响应。
本实施例中,响应于云台的开机操作,确定电机的转动方向,使电机按照此转动方向转动。在转动过程中,获取光电传感器输出的第一信号,并根据电机的转动方向以及第一信号,确定第一信号中跳变点对应的电气角度。 再根据电气角度确定跳变点的机械角度。借助第一信号中唯一的跳变点,能得到电气角度和机械角度的对应关系,从而完成云台复位。复位成功后还可以进一步根据机械角度控制电机转动,使云台进入姿态控制状态。
上述方法中,云台复位时电机只需要从当前位置沿转动方向转动直至第一信号出现跳变点即可,电机无需撞击机械限位结构,使得电机转动的角度小于电机从当前位置撞击到机械限位结构所转过的角度,从而提高云台的复位速度。
图1所示实施例的步骤101中已经提及了在确定电机的转动方向时,需要对第二信号进行模数转换。第二信号的转换可以借助转换阈值实现,则对于转换阈值的确定,如图4所示,一种可选地方式可以包括以下步骤:
S201,获取电机由第一极限角度转动到第二极限角度的过程中,光电传感器输出的第三信号。
S202,根据第三信号中的极值,确定转换阈值。
需要说明的有,相比于图1所示实施例是应用于用户的实际使用阶段的,本实施例提供的转换阈值的确定过程可以应用于云台的出厂设置阶段。
在出厂之前,云台响应开机操作,电机会从第一极限角度转动到第二极限角度。并且在转动过程中,光电传感器可以输出第三信号,此第三信号也可以为模拟信号。
其中,电机的两个极限角度可以由机械限位结构所在的位置限定出来。在实际应用中,对于俯仰轴电机,其的转动角度范围为+45°~-135°;对于横滚轴电机,其的转动角度范围为-45°~+45°;对于平移轴电机,其的转动角度范围为-150°~+150°。电机的两个极限角度也即是上述转动角度范围的两个边界值。
接着,根据第三信号中的信号值确定转换阈值。一种可选地方式,可以先确定第三信号中的极值,即最大值和最小值,并计算出最大值和最小值的差值。再根据第三信号中的最大值和差值确定第一转换阈值,根据第三信号中的最小值和差值确定第二转换阈值。其中,第一转换阈值大于第二转换阈值。
基于得到的第一转换阈值和第二转换阈值,可以按照以下方式对在用户使用阶段获取到的第二信号进行模数转换:
若目标信号点的信号值大于第一转换阈值,则将该目标信号点置为高电平。若目标信号点的信号值小于第二转换阈值,则将该目标信号点置为低电平。若目标信号点的信号值介于两转换阈值之间,则确定目标信号点与参考信号点具有相同的电平值。其中,目标信号点为第二信号中的任一信号点。参考信号点与目标信号点在第二信号中对应于相邻的输出时间,并且参考信号点输出时间早于目标信号点。
按照上述方式转换后,即可继续执行上述实施例中的步骤101。
根据上述描述可知,光电传感器输出的第一信号是模拟信号,而模拟信号的信号值存在波动,如图3所示,这种波动会对跳变点的确定造成干扰。为了避免此问题,则先可以利用图4所示的方式确定出转换阈值(即第一转换阈值和第二转换阈值)对信号进行模数转换,再根据转换后信号第一信号确定跳变点。以实现复位。
基于上述描述,图5为本发明实施例提供的另一种云台的控制方法的流程图。如图5所示,该方法可以包括如下步骤:
S301,响应于云台的开机操作,确定电机的转动方向。
S302,在电机沿转动方向转动的过程中,获取光电传感器输出第一信号。
上述步骤301~步骤302的执行过程与前述实施例的相应步骤相似,可以参见如图1所示实施例中的相关描述,在此再不赘述。
S303,根据转换阈值,对第一信号进行转换。
在得到光电传感器输出的第一信号后,还可以根据第一转换阈值、第二转换阈值进行模数转换,以得到转换后第一信号,则转换后第一信号中的跳变点实际上是数字信号中发生电平跳变的点。第一信号的转换过程与第二信号的转换过程相同,具体可以参见图4所示实施例中的相关描述。
并且相较于模拟信号,数字信号的电平平稳,波动小,信号中的电平跳变也更明显,控制设备能够根据转换后第一信号更准确地识别出跳变点。
S304,判断转换后第一信号中是否存在跳变点,若存在,则执行步骤305~步骤307;否则执行步骤308。
S305,在云台内磁场传感器输出的信号中,确定跳变点对应的电气角度。
在电机沿转动方向转动过程中,云台内设置的光电传感器和磁场传感器可以各自输出信号。若转换后第一信号中存在跳变点,则控制设备可以确定 转换后第一信号中跳变点对应的输出时间,并在磁场传感器输出的信号中找到相同输出时间下输出的电气角度以及该电气角度所属的电气周期,也即是跳变点对应的电气角度以及电气周期。其中,光电传感器输出的第一信号、转换后第一信号以及磁场传感器输出的信号可以如图6所示。此部分内容与图1所示实施例中步骤103中的内容类似,可以参见上述描述。
S306,根据电气角度确定跳变点对应的机械角度。
S307,根据机械角度控制电机转动。
上述步骤306~步骤307的执行过程与前述实施例的相应步骤相似,可以参见如图1所示实施例中的相关描述,在此再不赘述。
S308,控制电机继续沿转动方向转动。
若转换后第一信号中不存在跳变点,则控制设备可以控制电机沿步骤301中确定出的方向继续转动,直至转换后第一信号中存在跳变点。
本实施例中,先对光电传感器输出的第一信号进行模数转换,并在转换后得到的数字信号中确定跳变点。由于数字信号的电平跳变更明显,因此,控制设备能够更准确地识别出转换后第一信号中唯一的跳变点,并得到准确地电气角度和机械角度,从而成功完成复位,同时也能准确地计算出电机需要转动的角度,从而保证控制设备能够准确地响应用户发出的控制指令,控制云台姿态。
理想状况下,无论是用户使用阶段还是出厂设置阶段,对于每次复位,出现跳变点时电机所处的位置应该是相同的。但在实际中,由于电机转动存在误差,因此,每次复位过程中,出现跳变点时电机所处的位置都有微小差异,也就使得跳变点对应的电气角度、电气周期以及机械角度也不同。则为了得到准确的电气角度和机械角度,保证复位成功,在每次复位时,都可以按照上述各实施例提供的方法重新确定信号中跳变点的电气角度和机械角度。
在图1或图5所示实施例的基础上,为了进一步保证电气角度和机械角度的准确度,可选地,还可以借助预设电气角度和预设电气周期对第一信号中跳变点对应的电气角度和电气周期进行调整。
具体地,若经过步骤103或者步骤305得到的跳变点对应的电气角度与预设电气角度相同,表示电机的转动不存在误差,则可以按照图1或图5所示的方式实现云台复位。
若得到的跳变点对应的电气角度与预设电气角度不同,表明电机转动存在误差,则可以根据预设电气周期调整跳变点对应的电气角度所属的电气周期,再根据调整后电气周期以及跳变点对应的电气角度确定跳变点对应的机械角度。最终,根据调整结果实现云台复位。
假设预设电气周期为第P个电气周期,若跳变点的电气角度与预设电气角度的差值小于180°,则确定跳变点的电气周期与预设电气周期相同,为第P个周期。此时,跳变点对应的机械角度=电气积分角度/电机包含的极对数。其中,电气积分角度=电气角度+360°*P。
若跳变点的电气角度与预设电气角度的差值大于180°,则确定跳变点所属的电气周期调整为第P-1个电气周期内。此时,跳变点对应的机械角度=电气积分角度/电机包含的极对数。其中,电气积分角度=电气角度+360°*(P-1)。
对于上述过程中使用到的预设电气角度和预设电气周期,可选地,如图7所示,可以采用以下方式得到:
S401,获取电机由第二极限角度转动到第一极限角度的过程中,光电传感器输出的第四信号。
S402,根据转换阈值转换第四信号。
需要说明的有,本实施例提供的转换阈值确定过程同样应用于云台的出厂设置阶段。
在出厂设置阶段时,如图4所示实施例中描述的,电机可以先由第一极限角度转动到第二极限角度,并根据输出的第三信号确定转换阈值,再用此转换阈值对第二信号进行模数转换。
之后,电机再从第二极限角度转回到第一极限角度,此过程中光电传感器可以输出第四信号,此第四信号也是模拟信号。可以按照图4所示实施例确定出的转换阈值对第四信号进行模数转换,从而得到转换后第四信号。
也就是说,图4和图7所示实施例的执行顺序为:在出厂设置阶段会先确定出转换阈值,再确定出预设电气角度和预设电气周期。
S403,根据转换后第四信号的信号值确定转换后第四信号中的跳变点。
S404,在磁场传感器输出的信号中,确定转换后第四信号中的跳变点对应的电气角度为预设电气角度,确定转换后第四信号中的跳变点对应的电气周期为预设电气周期。
接着,根据转换后第四信号的信号值即电平值确定信号中的跳变点。同时,还可以根据跳变点在转换后第四信号中的输出时间,在磁场传感器输出的信号确定此跳变点对应的电气角度,即预设电气角度;同时,确定此跳变点对应的电气周期,即预设电气周期。具体过程可以参见步骤103或者步骤305中的相关描述。
本实施例中,预设电气角度和预设电气周期可以在出厂设置阶段预先生成,并且还可以将二者作为参考值调整用户在使用阶段时得到的电气角度和电气周期,从而进一步保证机械角度的准确性,实现快速复位。
对于出厂设置阶段预先生成的转换阈值,与图4所示实施例并列的,另一种可选地生成方式可以如图8所示,该方式可以包括以下步骤。
S501,获取电机由第一极限角度转动到第二极限角度的过程中,光电传感器输出的第五信号。
此处的第五信号实际上与图4所示实施例中的“第三信号”是同一信号,只不过为了清楚说明两种转换阈值生成方式而选择使用不同的名称。则上述步骤501的执行过程与前述实施例的相应步骤相似,可以参见如图4所示实施例中的相关描述,在此再不赘述。
S502,根据第五信号中相邻信号点的信号值,确定第五信号对应的差分信号。
S503,根据差分信号中的极值确定转换阈值。
然后,对第五信号进行差分计算,也即是用第五信号中的参考信号点的信号值与目标信号点的信号值相减,再由每个目标信号点对应的差值生成差分信号。其中,目标信号点为第五信号中的任一信号点。在第五信号中,参考信号点与目标信号点的输出时间相邻,并且参考信号点的输出时间早于目标信号点。
接着,确定出差分信号中的极值,并计算极值中最大值和最小值之间的差值。再根据最大值、差值和预设补偿系数确定第三转换阈值;根据最小值、差值和预设补偿系数确定第四转换阈值。其中,第三转换阈值大于第四转换阈值。预设补偿系通常设置小于1的值,比如0.25。
基于得到的第三转换阈值和第四转换阈值,可以按照以下方式对在用户使用阶段获取到的第二信号进行转换:
若目标信号点的信号值大于第三转换阈值,则将该目标信号点置为高电平。若目标信号点的信号值小于第四转换阈值,则将该目标信号点置为低电平。若目标信号点的信号值介于两转换阈值之间,则确定此目标信号点与参考信号点具有相同的电平值。
需要说明的有,在实际应用中,可以根据实际需求选择使用图4或图8所示的任一方式来确定转换阈值。
另外,在实际应用中,由于光电码盘会被灰尘、水雾污染,又或者被光照干扰,使得光电传感器输出的第一信号出现波动,即第一信号中可以包含多个小波峰和一个大波峰,如图9所示,并且跳变点通常会出现在大波峰的附近。此时,若使用图5所示实施例实现云台复位,则这些小波峰会对信号中跳变点的确定产生影响。
为了避免上述问题,在采用上述图8所示方式确定转换阈值(即第三转换阈值和第四转换阈值)的基础上,图10为本发明实施例提供的又一种云台的控制方法的流程图。如图10所示,该方法可以包括如下步骤:
S601,响应于云台的开机操作,确定电机的转动方向。
S602,在电机沿转动方向转动的过程中,获取光电传感器输出第一信号。
上述步骤601~步骤602的执行过程与前述实施例的相应步骤相似,可以参见如图5所示实施例中的相关描述,在此再不赘述。
S603,根据转换阈值,对第一信号进行转换。
可选地,可以按照图4或者图8所示得到转换阈值,并对光电传感器输出的第一信号进行模数转换,以得到转换后第一信号。
S604,根据转换后第一信号以及第一信号对应的差分信号,确定转换后第一信号中存在跳变点的概率。
一方面,可以在差分信号中确定最大差分值,并将差分信号中的信号值与最大差分值的比值确定为第一权重值。另一方面,还可以计算转换后第一信号对应的第二权重值,第二权重值=M*N。其中,M为预设系数,N为结果值。若按照图1或图5所示实施例中方式确定转换后第一信号中存在跳变点,则结果值为1,否则结果值为0。
最终,可以根据第一权重值和第二权重值计算存在跳变点的概率。比如将二者之和确定为转换后第一信号中是否存在跳变点的概率。
此步骤中,在计算信号是否存在跳变点的概率时,综合考虑了转换后第一信号和差分信号,从而保证跳变点识别的准确性。
S605,判断概率是否大于或等于预设值,若是,则执行步骤606~608,否则执行步骤609。
S606,确定转换后第一信号中的跳变点对应的电气角度。
上述步骤606的执行过程与前述实施例的相应步骤相似,可以参见如图5所示实施例中的相关描述,在此再不赘述。
S607,根据跳变点对应的电气角度以及预设电气周期,确定跳变点对应的机械角度。
跳变点对应的机械角度=电气积分角度/电机包含的极对数。其中,电气积分角度=电气角度+360°*P,P为预设电气周期。
对于预设电气周期的获取,同样可以在出厂设置阶段实现,并且可以在执行图8所示实施例确定转换阈值的过程中一并得到。
可选地,电机在由第一极限角度转动到第二极限角度的过程中,可以获取磁场传感器输出的信号;同时也能计算光电传感器输出的第四信号对应的差分信号。然后,确定差分信号中极值对应的输出时间,并在磁场传感器输出的信号中,确定极值对应的电气周期,也即是预设电气周期。
需要说明的有,对于转换阈值和预设电气角度、预设电气周期,在图5所示实例中是分别得到的,具体过程可以参见图4和图7所示实施例,而在本实施例中是同步得到的,因此也能简化出厂设置的过程。
S608,根据机械角度控制电机转动。
S609,控制电机继续沿转动方向转动。
上述步骤608~步骤609的执行过程与前述实施例的相应步骤相似,可以参见如图1所示实施例中的相关描述,在此再不赘述。
本实施例中,借助光电传感器输出的第一信号对应的差分信号来实现电机复位的,通过差分计算可以消除第一信号中的多个小波峰,从而保证跳变点确定的准确性,从而完成云台复位。
图11为本发明实施例提供的一种云台的控制装置的结构示意图;参考附图11所示,本实施例提供了一种云台的控制装置,该云台的控制装置可以执行上述的云台的控制方法;具体的,云台的控制装置包括:
方向确定模块11,用于响应于云台的开机操作,确定电机的转动方向。
获取模块12,用于在所述电机沿所述转动方向转动的过程中,获取光电传感器输出所述第一信号。
电气角度确定模块13,用于根据所述转动方向和所述第一信号,确定所述第一信号中的跳变点对应的电气角度,所述电气角度为光电码盘的转动角度。
机械角度确定模块14,用于根据所述电气角度确定所述跳变点对应的机械角度,所述机械角度为所述电机的转动角度。
控制模块15,用于根据所述机械角度控制电机转动。
其中,其中,所述云台包括云台机体、用于调节所述云台机体姿态的所述电机、所述光电传感器以及所述光电码盘;所述光电码盘随所述电机的转动部件一同转动;所述光电传感器用于获取所述光电码盘产生的信号。
图11所示装置还可以执行图1~图10所示实施例的方法,本实施例未详细描述的部分,可参考对图1~图10所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1~图10所示实施例中的描述,在此不再赘述。
图12为本发明实施例提供的一种云台的结构示意图;参考附图12所示,本发明实施例的提供了一种云台。具体的,该云台包括:云台机体21、用于调节所述云台机体姿态的电机22、光电传感器23、光电码盘24以及控制装置25;所述光电码盘24随所述电机22的转动部件一同转动;所述光电传感器23获取所述光电码盘24产生的信号;
所述控制装置25包括存储器和处理器;
所述存储器251,用于存储计算机程序;
所述处理器252,用于运行所述存储器中存储的计算机程序以实现:
响应于所述云台的开机操作,确定所述电机的转动方向;
在所述电机沿所述转动方向转动的过程中,获取所述光电传感器输出的第一信号;
根据所述转动方向和所述第一信号,确定所述第一信号中的跳变点对应的电气角度,所述电气角度为所述光电码盘的转动角度;
根据所述电气角度确定所述跳变点对应的机械角度,所述机械角度为所述电机的转动角度;
根据所述机械角度控制所述电机转动。
进一步的,处理器252还用于:基于触发所述开机操作时所述电机所处的位置,获取所述光电传感器输出的第二信号;根据转换阈值转换所述第二信号;以及根据转换后第二信号的电平状态,确定所述电机的转动方向。
进一步的,处理器252还用于:若所述转换后第二信号的电平状态为低电平,则确定所述电机沿顺时针转动;以及若所述转换后第二信号的电平状态为高电平,则确定所述电机沿逆时针转动。
进一步的,在所述确定所述电机的转动方向之前,处理器252还用于:获取所述电机由第一极限角度转动到第二极限角度的过程中,所述光电传感器输出的第三信号;以及根据所述第三信号中的极值,确定所述转换阈值。
进一步的,处理器252还用于:根据所述转换阈值,对所述第一信号进行转换;以及若根据转换后第一信号的信号值确定所述转换后第一信号中存在跳变点,则在所述云台内磁场传感器输出的信号中,确定所述跳变点对应的电气角度。
进一步的,处理器252还用于:若根据转换后第一信号的信号值确定所述转换后第一信号中不存在跳变点,则控制所述电机继续沿所述转动方向转动。
进一步的,处理器252还用于:若所述跳变点对应的电气角度与预设电气角度不同,则根据预设电气周期调整所述跳变点对应的电气角度的电气周期;以及根据所述跳变点对应的电气角度以及调整后电气周期确定所述跳变点对应的机械角度。
进一步的,在所述确定所述电机的转动方向之前,处理器252还用于:获取所述电机由所述第二极限角度转动到所述第一极限角度的过程中,所述光电传感器输出的第四信号;根据所述转换阈值转换所述第四信号;根据转换后第四信号的信号值确定所述转换后第四信号中的跳变点;以及在所述磁场传感器输出的信号中,确定所述转换后第四信号中的跳变点对应的电气角度为所述预设电气角度,确定所述转换后第四信号中的跳变点对应的电气周期为所述预设电气周期。
进一步的,在所述确定所述电机的转动方向之前,处理器252还用于:获取所述电机由第一极限角度转动到第二极限角度的过程中,所述光电传感器输出的第五信号;根据所述第五信号中相邻信号点的信号值,确定所述第五信号对应的差分信号;以及根据所述差分信号中的极值确定所述转换阈值。
进一步的,处理器252还用于:根据所述转换阈值,对所述第一信号进行转换;根据转换后第一信号以及所述第一信号对应的差分信号各自,确定所述转换后第一信号中存在跳变点的概率;若所述概率大于或等于预设值,则确定所述转换后第一信号中的跳变点对应的电气角度;以及根据所述跳变点对应的电气角度以及预设电气周期,确定所述跳变点对应的机械角度。
进一步的,处理器252还用于:若所述概率小于所述预设值,控制所述电机继续沿所述转动方向转动。
进一步的,在所述确定所述电机的转动方向之前,处理器252还用于:获取所述电机由第一极限角度转动到第二极限角度的过程中,所述磁场传感器输出的信号;以及在所述磁场传感器输出的信号中,确定所述差分信号中的极值对应的电气周期为所述预设电气周期。
图12所示的云台可以执行图1~图10所示实施例的方法,本实施例未详细描述的部分,可参考对图1~图10所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1~图10所示实施例中的描述,在此不再赘述。
在一个可能的设计中,图13所示的云台的控制设备的结构可实现为一电子设备,该电子设备可以是云台或者可移动平台中的控制器,也可以是用户使用的终端设备、远端服务器,也可以是与可移动平台配套的遥控器等远程遥控设备等等。如图13所示,该电子设备可以包括:一个或多个处理器31和一个或多个存储器32。其中,存储器32用于存储支持电子设备执行上述图1~图10所示实施例中提供的云台的控制方法的程序。处理器31被配置为用于执行存储器32中存储的程序。
具体的,程序包括一条或多条计算机指令,其中,一条或多条计算机指令被处理器31执行时能够实现如下步骤:
响应于所述云台的开机操作,确定所述电机的转动方向;
在所述电机沿所述转动方向转动的过程中,获取光电传感器输出的第一信号;
根据所述转动方向和所述第一信号,确定所述第一信号中的跳变点对应的电气角度,所述电气角度为光电码盘的转动角度;
根据所述电气角度确定所述跳变点对应的机械角度,所述机械角度为所述电机的转动角度;
根据所述机械角度控制电机转动;
其中,所述云台包括云台机体、用于调节所述云台机体姿态的所述电机、所述光电传感器以及所述光电码盘;所述光电码盘随所述电机的转动部件一同转动;所述光电传感器获取所述光电码盘产生的信号。
其中,该云台的控制设备的结构中还可以包括通信接口23,用于电子设备与其他设备或通信网络通信。
进一步的,处理器31可以用于:基于触发所述开机操作时所述电机所处的位置,获取所述光电传感器输出的第二信号;根据转换阈值转换所述第二信号;以及根据转换后第二信号的电平状态,确定所述电机的转动方向。
进一步的,处理器31可以用于:若所述转换后第二信号的电平状态为低电平,则确定所述电机沿顺时针转动;以及若所述转换后第二信号的电平状态为高电平,则确定所述电机沿逆时针转动。
进一步的,在所述确定所述电机的转动方向之前,处理器21可以用于:获取所述电机由第一极限角度转动到第二极限角度的过程中,所述光电传感器输出的第三信号;以及根据所述第三信号中的极值,确定所述转换阈值。
进一步的,处理器31可以用于:根据所述转换阈值,对所述第一信号进行转换;以及若根据转换后第一信号的信号值确定所述转换后第一信号中存在跳变点,则在所述云台内磁场传感器输出的信号中,确定所述跳变点对应的电气角度。
进一步的,处理器31可以用于:若根据转换后第一信号的信号值确定所述转换后第一信号中不存在跳变点,则控制所述电机继续沿所述转动方向转动。
进一步的,处理器31可以用于:若所述跳变点对应的电气角度与预设电气角度不同,则根据预设电气周期调整所述跳变点对应的电气角度的电气周期;以及根据所述跳变点对应的电气角度以及调整后电气周期确定所述跳变点对应的机械角度。
进一步的,在所述确定所述电机的转动方向之前,处理器21可以用于:获取所述电机由所述第二极限角度转动到所述第一极限角度的过程中,所述光电传感器输出的第四信号;根据所述转换阈值转换所述第四信号;根据转换后第四信号的信号值确定所述转换后第四信号中的跳变点;以及在所述磁场传感器输出的信号中,确定所述转换后第四信号中的跳变点对应的电气角 度为所述预设电气角度,确定所述转换后第四信号中的跳变点对应的电气周期为所述预设电气周期。
进一步的,在所述确定所述电机的转动方向之前,处理器31可以用于:获取所述电机由第一极限角度转动到第二极限角度的过程中,所述光电传感器输出的第五信号;根据所述第五信号中相邻信号点的信号值,确定所述第五信号对应的差分信号;以及根据所述差分信号中的极值确定所述转换阈值。
进一步的,处理器31可以用于:根据所述转换阈值,对所述第一信号进行转换;根据转换后第一信号以及所述第一信号对应的差分信号各自,确定所述转换后第一信号中存在跳变点的概率;若所述概率大于或等于预设值,则确定所述转换后第一信号中的跳变点对应的电气角度;以及根据所述跳变点对应的电气角度以及预设电气周期,确定所述跳变点对应的机械角度。
进一步的,处理器31可以用于:若所述概率小于所述预设值,控制所述电机继续沿所述转动方向转动。
进一步的,在所述确定所述电机的转动方向之前,处理器31可以用于:获取所述电机由第一极限角度转动到第二极限角度的过程中,所述磁场传感器输出的信号;以及在所述磁场传感器输出的信号中,确定所述差分信号中的极值对应的电气周期为所述预设电气周期。
图13所示的设备可以执行图1~图10所示实施例的方法,本实施例未详细描述的部分,可参考对图1~图10所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1~图10所示实施例中的描述,在此不再赘述。
另外,本发明实施例提供了一种计算机可读存储介质,存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,程序指令用于实现上述图1~图10的云台的控制方法。
以上各个实施例中的技术方案、技术特征在与本相冲突的情况下均可以单独,或者进行组合,只要未超出本领域技术人员的认知范围,均属于本申请保护范围内的等同实施例。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改, 或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (37)

  1. 一种云台的控制方法,其特征在于,所述云台包括云台机体、用于调节所述云台机体姿态的电机、光电传感器以及光电码盘;所述光电码盘随所述电机的转动部件一同转动;所述光电传感器用于获取所述光电码盘产生的信号;
    所述方法包括:
    响应于所述云台的开机操作,确定所述电机的转动方向;
    在所述电机沿所述转动方向转动的过程中,获取所述光电传感器输出的第一信号;
    根据所述转动方向和所述第一信号,确定所述第一信号中的跳变点对应的电气角度,所述电气角度为所述光电码盘的转动角度;
    根据所述电气角度确定所述跳变点对应的机械角度,所述机械角度为所述电机的转动角度;
    根据所述机械角度控制所述电机转动。
  2. 根据权利要求1所述的方法,其特征在于,所述确定所述电机的转动方向,包括:
    基于触发所述开机操作时所述电机所处的位置,获取所述光电传感器输出的第二信号;
    根据转换阈值转换所述第二信号;
    根据转换后第二信号的电平状态,确定所述电机的转动方向。
  3. 根据权利要求2所述的方法,其特征在于,所述根据转换后第二信号的电平状态,确定所述电机的转动方向,包括:
    若所述转换后第二信号的电平状态为低电平,则确定所述电机沿顺时针转动;
    若所述转换后第二信号的电平状态为高电平,则确定所述电机沿逆时针转动。
  4. 根据权利要求2所述的方法,其特征在于,所述确定所述电机的转动方向之前,所述方法还包括:
    获取所述电机由第一极限角度转动到第二极限角度的过程中,所述光电传感器输出的第三信号;
    根据所述第三信号中的极值,确定所述转换阈值。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述转动方向和所述第一信号,确定所述第一信号中的跳变点对应的电气角度,包括:
    根据所述转换阈值,对所述第一信号进行转换;
    若根据转换后第一信号的信号值确定所述转换后的第一信号中存在跳变点,则在所述云台内磁场传感器输出的信号中,确定所述跳变点对应的电气角度。
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:
    若根据转换后第一信号的信号值确定所述转换后第一信号中不存在跳变点,则控制所述电机继续沿所述转动方向转动。
  7. 根据权利要求5所述的方法,其特征在于,所述根据所述电气角度确定所述跳变点对应的机械角度,包括:
    若所述跳变点对应的电气角度与预设电气角度不同,则根据预设电气周期调整所述跳变点对应的电气角度的电气周期;
    根据所述跳变点对应的电气角度以及调整后电气周期确定所述跳变点对应的机械角度。
  8. 根据权利要求7所述的方法,其特征在于,所述确定所述电机的转动方向之前,所述方法还包括:
    获取所述电机由所述第二极限角度转动到所述第一极限角度的过程中,所述光电传感器输出的第四信号;
    根据所述转换阈值转换所述第四信号;
    根据转换后第四信号的信号值确定所述转换后第四信号中的跳变点;
    在所述磁场传感器输出的信号中,确定所述转换后第四信号中的跳变点对应的电气角度为所述预设电气角度,确定所述转换后第四信号中的跳变点对应的电气周期为所述预设电气周期。
  9. 根据权利要求2所述的方法,其特征在于,所述确定所述电机的转动方向之前,所述方法还包括:
    获取所述电机由第一极限角度转动到第二极限角度的过程中,所述光电传感器输出的第五信号;
    根据所述第五信号中相邻信号点的信号值,确定所述第五信号对应的差分信号;
    根据所述差分信号中的极值确定所述转换阈值。
  10. 根据权利要求9所述的方法,其特征在于,所述根据所述转动方向和所述第一信号,确定所述第一信号中的跳变点对应的电气角度,包括:
    根据所述转换阈值,对所述第一信号进行转换;
    根据转换后第一信号以及所述第一信号对应的差分信号各自,确定所述转换后第一信号中存在跳变点的概率;
    若所述概率大于或等于预设值,则确定所述转换后第一信号中的跳变点对应的电气角度;
    所述根据所述电气角度确定所述跳变点对应的机械角度,包括:
    根据所述跳变点对应的电气角度以及预设电气周期,确定所述跳变点对应的机械角度。
  11. 根据权利要求10所述的方法,其特征在于,所述方法还包括:
    若所述概率小于所述预设值,控制所述电机继续沿所述转动方向转动。
  12. 根据权利要求10所述的方法,其特征在于,所述确定所述电机的转动方向之前,所述方法还包括:
    获取所述电机由第一极限角度转动到第二极限角度的过程中,所述磁场传感器输出的信号;
    在所述磁场传感器输出的信号中,确定所述差分信号中的极值对应的电气周期为所述预设电气周期。
  13. 一种云台,所述云台包括:云台机体、用于调节所述云台机体姿态的电机、光电传感器、光电码盘以及控制装置;其特征在于,
    所述光电码盘随所述电机的转动部件一同转动;
    所述光电传感器用于获取所述光电码盘产生的信号;
    所述控制装置包括存储器和处理器;
    所述存储器,用于存储计算机程序;
    所述处理器,用于运行所述存储器中存储的计算机程序以实现:
    响应于所述云台的开机操作,确定所述电机的转动方向;
    在所述电机沿所述转动方向转动的过程中,获取所述光电传感器输出的第一信号;
    根据所述转动方向和所述第一信号,确定所述第一信号中的跳变点对应的电气角度,所述电气角度为所述光电码盘的转动角度;
    根据所述电气角度确定所述跳变点对应的机械角度,所述机械角度为所述电机的转动角度;
    根据所述机械角度控制所述电机转动。
  14. 根据权利要求13所述的云台,其特征在于,所述处理器还用于:
    基于触发所述开机操作时所述电机所处的位置,获取所述光电传感器输出的第二信号;
    根据转换阈值转换所述第二信号;
    根据转换后第二信号的电平状态,确定所述电机的转动方向。
  15. 根据权利要求14所述的云台,其特征在于,所述处理器还用于:
    若所述转换后第二信号的电平状态为低电平,则确定所述电机沿顺时针转动;
    若所述转换后第二信号的电平状态为高电平,则确定所述电机沿逆时针转动。
  16. 根据权利要求14所述的云台,其特征在于,在所述确定所述电机的转动方向之前,所述处理器还用于:
    获取所述电机由第一极限角度转动到第二极限角度的过程中,所述光电传感器输出的第三信号;
    根据所述第三信号中的极值,确定所述转换阈值。
  17. 根据权利要求16所述的云台,其特征在于,所述处理器还用于:
    根据所述转换阈值,对所述第一信号进行转换;
    若根据转换后第一信号的信号值确定所述转换后第一信号中存在跳变点,则在所述云台内磁场传感器输出的信号中,确定所述跳变点对应的电气角度。
  18. 根据权利要求17所述的云台,其特征在于,所述处理器还用于:
    若根据转换后第一信号的信号值确定所述转换后第一信号中不存在跳变点,则控制所述电机继续沿所述转动方向转动。
  19. 根据权利要求17所述的云台,其特征在于,所述处理器还用于:
    若所述跳变点对应的电气角度与预设电气角度不同,则根据预设电气周期调整所述跳变点对应的电气角度的电气周期;
    根据所述跳变点对应的电气角度以及调整后电气周期确定所述跳变点对应的机械角度。
  20. 根据权利要求19所述的云台,其特征在于,在所述确定所述电机的转动方向之前,所述处理器还用于:
    获取所述电机由所述第二极限角度转动到所述第一极限角度的过程中,所述光电传感器输出的第四信号;
    根据所述转换阈值转换所述第四信号;
    根据转换后第四信号的信号值确定所述转换后第四信号中的跳变点;
    在所述磁场传感器输出的信号中,确定所述转换后第四信号中的跳变点对应的电气角度为所述预设电气角度,确定所述转换后第四信号中的跳变点对应的电气周期为所述预设电气周期。
  21. 根据权利要求14所述的云台,其特征在于,在所述确定所述电机的转动方向之前,所述处理器还用于:
    获取所述电机由第一极限角度转动到第二极限角度的过程中,所述光电传感器输出的第五信号;
    根据所述第五信号中相邻信号点的信号值,确定所述第五信号对应的差分信号;
    根据所述差分信号中的极值确定所述转换阈值。
  22. 根据权利要求21所述的云台,其特征在于,所述处理器还用于:根据所述转换阈值,对所述第一信号进行转换;
    根据转换后第一信号以及所述第一信号对应的差分信号各自,确定所述转换后第一信号中存在跳变点的概率;
    若所述概率大于或等于预设值,则确定所述转换后第一信号中的跳变点对应的电气角度;
    根据所述跳变点对应的电气角度以及预设电气周期,确定所述跳变点对应的机械角度。
  23. 根据权利要求22所述的云台,其特征在于,所述处理器还用于:若所述概率小于所述预设值,控制所述电机继续沿所述转动方向转动。
  24. 根据权利要求22所述的云台,其特征在于,在所述确定所述电机的转动方向之前,所述处理器还用于:
    获取所述电机由第一极限角度转动到第二极限角度的过程中,所述磁场传感器输出的信号;
    在所述磁场传感器输出的信号中,确定所述差分信号中的极值对应的电气周期为所述预设电气周期。
  25. 一种云台的控制设备,所述云台包括云台机体、用于调节所述云台机体姿态的所述电机、所述光电传感器以及所述光电码盘;其特征在于,
    所述光电码盘随所述电机的转动部件一同转动;
    所述光电传感器用于获取所述光电码盘产生的信号;
    所述云台的控制设备包括:
    存储器,用于存储计算机程序;
    处理器,用于运行所述存储器中存储的计算机程序以实现:
    响应于云台的开机操作,确定电机的转动方向;
    在所述电机沿所述转动方向转动的过程中,获取光电传感器输出的第一信号;
    根据所述转动方向和所述第一信号,确定所述第一信号中的跳变点对应的电气角度,所述电气角度为光电码盘的转动角度;
    根据所述电气角度确定所述跳变点对应的机械角度,所述机械角度为所述电机的转动角度;
    根据所述机械角度控制所述电机转动。
  26. 根据权利要求25所述的设备,其特征在于,所述处理器还用于:
    基于触发所述开机操作时所述电机所处的位置,获取所述光电传感器输出的第二信号;
    根据转换阈值转换所述第二信号;
    根据转换后第二信号的电平状态,确定所述电机的转动方向。
  27. 根据权利要求26所述的设备,其特征在于,所述处理器还用于:
    若所述转换后第二信号的电平状态为低电平,则确定所述电机沿顺时针转动;
    若所述转换后第二信号的电平状态为高电平,则确定所述电机沿逆时针转动。
  28. 根据权利要求26所述的设备,其特征在于,在所述确定所述电机的转动方向之前,所述处理器还用于:
    获取所述电机由第一极限角度转动到第二极限角度的过程中,所述光电传感器输出的第三信号;
    根据所述第三信号中的极值,确定所述转换阈值。
  29. 根据权利要求28所述的设备,其特征在于,所述处理器还用于:
    根据所述转换阈值,对所述第一信号进行转换;
    若根据转换后第一信号的信号值确定所述转换后第一信号中存在跳变点,则在所述云台内磁场传感器输出的信号中,确定所述跳变点对应的电气角度。
  30. 根据权利要求29所述的设备,其特征在于,所述处理器还用于:
    若根据转换后第一信号的信号值确定所述转换后第一信号中不存在跳变点,则控制所述电机继续沿所述转动方向转动。
  31. 根据权利要求29所述的设备,其特征在于,所述处理器还用于:
    若所述跳变点对应的电气角度与预设电气角度不同,则根据预设电气周期调整所述跳变点对应的电气角度的电气周期;
    根据所述跳变点对应的电气角度以及调整后电气周期确定所述跳变点对应的机械角度。
  32. 根据权利要求31所述的设备,其特征在于,在所述确定所述电机的转动方向之前,所述处理器还用于:
    获取所述电机由所述第二极限角度转动到所述第一极限角度的过程中,所述光电传感器输出的第四信号;
    根据所述转换阈值转换所述第四信号;
    根据转换后第四信号的信号值确定所述转换后第四信号中的跳变点;
    在所述磁场传感器输出的信号中,确定所述转换后第四信号中的跳变点对应的电气角度为所述预设电气角度,确定所述转换后第四信号中的跳变点对应的电气周期为所述预设电气周期。
  33. 根据权利要求26所述的设备,其特征在于,在所述确定所述电机的转动方向之前,所述处理器还用于:
    获取所述电机由第一极限角度转动到第二极限角度的过程中,所述光电传感器输出的第五信号;
    根据所述第五信号中相邻信号点的信号值,确定所述第五信号对应的差分信号;
    根据所述差分信号中的极值确定所述转换阈值。
  34. 根据权利要求33所述的设备,其特征在于,所述处理器还用于:
    根据所述转换阈值,对所述第一信号进行转换;
    根据转换后第一信号以及所述第一信号对应的差分信号各自,确定所述转换后第一信号中存在跳变点的概率;
    若所述概率大于或等于预设值,则确定所述转换后第一信号中的跳变点对应的电气角度;
    根据所述跳变点对应的电气角度以及预设电气周期,确定所述跳变点对应的机械角度。
  35. 根据权利要求34所述的设备,其特征在于,所述处理器还用于:
    若所述概率小于所述预设值,控制所述电机继续沿所述转动方向转动。
  36. 根据权利要求34所述的设备,其特征在于,在所述确定所述电机的转动方向之前,所述处理器还用于:
    获取所述电机由第一极限角度转动到第二极限角度的过程中,所述磁场传感器输出的信号;
    在所述磁场传感器输出的信号中,确定所述差分信号中的极值对应的电气周期为所述预设电气周期。
  37. 一种计算机可读存储介质,其特征在于,所述存储介质为计算机可读存储介质,该计算机可读存储介质中存储有程序指令,所述程序指令用于实现权利要求1至12中任一项所述的云台的控制方法。
PCT/CN2020/124915 2020-10-29 2020-10-29 云台的控制方法、云台、设备和存储介质 WO2022087977A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2020/124915 WO2022087977A1 (zh) 2020-10-29 2020-10-29 云台的控制方法、云台、设备和存储介质
CN202080066653.3A CN114585881A (zh) 2020-10-29 2020-10-29 云台的控制方法、云台、设备和存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/124915 WO2022087977A1 (zh) 2020-10-29 2020-10-29 云台的控制方法、云台、设备和存储介质

Publications (1)

Publication Number Publication Date
WO2022087977A1 true WO2022087977A1 (zh) 2022-05-05

Family

ID=81381749

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/124915 WO2022087977A1 (zh) 2020-10-29 2020-10-29 云台的控制方法、云台、设备和存储介质

Country Status (2)

Country Link
CN (1) CN114585881A (zh)
WO (1) WO2022087977A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391946A (zh) * 2015-12-29 2016-03-09 浙江宇视科技有限公司 一种防干涉摄像机及其防干涉方法
CN108474671A (zh) * 2017-11-14 2018-08-31 深圳市大疆创新科技有限公司 机械角度检测方法、云台及机器可读存储介质
CN109489696A (zh) * 2018-11-30 2019-03-19 高新兴科技集团股份有限公司 一种云台自检归零方法及装置
US20190186954A1 (en) * 2017-12-14 2019-06-20 Ubtech Robotics Corp Angle detection device and method of multi-turn servo, and multi-turn servo
CN110463020A (zh) * 2018-07-02 2019-11-15 深圳市大疆创新科技有限公司 电机的初始机械角度的获取方法及***

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104838325A (zh) * 2014-06-30 2015-08-12 深圳市大疆创新科技有限公司 一种云台参数调整方法、装置及云台设备
WO2020062281A1 (zh) * 2018-09-30 2020-04-02 深圳市大疆创新科技有限公司 云台的控制方法、云台、可移动平台及可读存储介质
CN111447362B (zh) * 2020-04-02 2021-04-27 浙江大华技术股份有限公司 云台电机限位方法、装置、云台摄像机及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105391946A (zh) * 2015-12-29 2016-03-09 浙江宇视科技有限公司 一种防干涉摄像机及其防干涉方法
CN108474671A (zh) * 2017-11-14 2018-08-31 深圳市大疆创新科技有限公司 机械角度检测方法、云台及机器可读存储介质
US20190186954A1 (en) * 2017-12-14 2019-06-20 Ubtech Robotics Corp Angle detection device and method of multi-turn servo, and multi-turn servo
CN110463020A (zh) * 2018-07-02 2019-11-15 深圳市大疆创新科技有限公司 电机的初始机械角度的获取方法及***
CN109489696A (zh) * 2018-11-30 2019-03-19 高新兴科技集团股份有限公司 一种云台自检归零方法及装置

Also Published As

Publication number Publication date
CN114585881A (zh) 2022-06-03

Similar Documents

Publication Publication Date Title
US10394107B2 (en) Gimbal control method, gimbal control apparatus, and gimbal
WO2017177542A1 (zh) 目标跟踪方法、装置和***
CN108521777B (zh) 云台的控制方法、云台以及无人飞行器
US20220155800A1 (en) Method and apparatus for yaw fusion and aircraft
US20220244081A1 (en) Method and apparatus for calibrating joystick and remote control device
US20210165388A1 (en) Gimbal rotation control method and apparatus, control device, and movable platform
WO2021052334A1 (zh) 一种无人飞行器的返航方法、装置及无人飞行器
WO2022087977A1 (zh) 云台的控制方法、云台、设备和存储介质
CN112136137A (zh) 一种参数优化方法、装置及控制设备、飞行器
US20010037185A1 (en) Method for determining the state variables of a moving rigid body in space
CN114476063B (zh) 一种用于地理测绘的无人机控制方法及***
WO2020019113A1 (zh) 移动机器人的控制方法、装置及移动机器人***
CN109725652B (zh) 用于无人机云台航向解算与控制的方法
US20240118596A1 (en) Gimbal control method and device
JP2006129597A (ja) 駆動方法、駆動機構及び撮像装置
CN113791640A (zh) 一种图像获取方法、装置、飞行器和存储介质
CN110622090A (zh) 云台及其校准方法、无人机和计算设备
CN112147995A (zh) 机器人的运动控制方法及装置、机器人、存储介质
CN110832274A (zh) 地面坡度计算方法、装置、设备及存储介质
WO2021217408A1 (zh) 无人机***及其控制方法和装置
CN110291013B (zh) 云台的控制方法、云台及无人飞行器
US11372316B2 (en) Lens barrel, camera body, camera system
CN114047784A (zh) 飞行器控制方法、装置、飞行器及计算机可读存储介质
WO2021102797A1 (zh) 一种云台控制方法、控制装置及控制***
CN111352090B (zh) 集成姿态***的激光雷达及控制方法

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: 20959140

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: 20959140

Country of ref document: EP

Kind code of ref document: A1