Angle detection method, apparatus, device, and medium

By collecting acceleration and linear Hall data from multiple rotations while the drone is stationary, and fitting the data to obtain conversion coefficients, the problem of fluctuations in linear Hall sensor data is solved, and the accuracy of gimbal attitude angle detection is improved.

CN121557948BActive Publication Date: 2026-03-27SHENZHEN DEEPSEA LNNOVATIONS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-22
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Fluctuations in the data collected by the linear Hall sensor in gimbal attitude angle detection lead to a decrease in the accuracy of attitude angle calculation.

Method used

When the drone is stationary, the gimbal is driven to rotate by the target drive motor and acceleration and linear Hall data are collected. Roll and pitch conversion coefficients are obtained by fitting multiple rotation data, and the attitude angle of the gimbal is calculated by combining real-time linear Hall data.

Benefits of technology

This reduces the impact of data fluctuations, improves the accuracy of gimbal attitude angle detection, and ensures the accuracy of roll and pitch angles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121557948B_ABST
    Figure CN121557948B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of angle measurement, and particularly relates to an angle detection method, device, equipment and medium, the method comprising: receiving acceleration data corresponding to each rotation in multiple rotations and linear Hall data sent by a holder; obtaining the roll angle and the pitch angle of the holder after each rotation in the multiple rotations based on the acceleration data, and obtaining the mechanical angle of a target drive motor after each rotation in the multiple rotations based on the linear Hall data; obtaining a roll angle conversion coefficient and a pitch angle conversion coefficient based on the roll angle, the pitch angle of the holder and the mechanical angle of the target drive motor; and sending the roll angle conversion coefficient and the pitch angle conversion coefficient to the holder. The scheme is not affected by fluctuations in the data collected by the linear Hall sensor, and the roll angle and the pitch angle of the holder with high accuracy are obtained, thereby improving the accuracy of the detection of the attitude angle (including the roll angle and the pitch angle) of the holder.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of angle measurement, and in particular to an angle detection method, device, equipment and medium. BACKGROUND

[0002] In recent years, unmanned aerial vehicles are widely used in various industries, and images can be captured by unmanned aerial vehicles, and different scenes and targets can be analyzed according to the captured images. For example, in power line inspection, an unmanned aerial vehicle can capture a power line, and determine whether the power line has a fault according to the captured image. The gimbal is a support device for mounting and fixing a camera and other task loads of the unmanned aerial vehicle, and the shooting angle of the camera can be adjusted by adjusting the attitude angle of the gimbal to ensure that the target object to be shot is in the correct position in the image.

[0003] In related technologies, in order to detect the attitude angle of the gimbal, a mechanical coding sensor, a potential sensor or an optical sensor can be installed on the driving motor of the gimbal, and the attitude angle of the gimbal can be obtained by data collected by the above sensors. In recent years, considering that the structure of the above sensors is easy to be damaged and has a low service life, a linear Hall sensor is often installed on the driving motor of the gimbal, and the attitude angle of the gimbal, such as the roll angle and the pitch angle, can be calculated by data collected by the linear Hall sensor.

[0004] However, the applicant found that in actual use, the data collected by the linear Hall sensor often fluctuates, which may result in a large error in the attitude angle of the gimbal calculated directly based on the data collected by the linear Hall sensor, thereby reducing the accuracy of the attitude angle of the gimbal. SUMMARY

[0005] To solve the problems in the related art, the embodiments of the present disclosure provide an angle detection method, device, equipment and medium.

[0006] In a first aspect, an angle detection method is provided in the embodiments of the present disclosure, the method is applied to an upper computer, and the method comprises:

[0007] Receiving acceleration data and linear Hall data corresponding to each rotation in multiple rotations sent by the gimbal, wherein when the unmanned aerial vehicle carrying the gimbal is stationary, a target driving motor in the gimbal drives the gimbal to rotate around a target rotation shaft corresponding to the target driving motor by a target angle in a target direction every first time length, acceleration data corresponding to each rotation is collected by an acceleration sensor of the gimbal after a second time length of each rotation is completed, and linear Hall data corresponding to each rotation is collected by a linear Hall sensor arranged on a stator of the target driving motor, wherein the second time length is less than the first time length;

[0008] acquiring, based on the acceleration data corresponding to the multiple rotations, the roll angle and the pitch angle of the gimbal after each rotation in the multiple rotations, and acquiring, based on the linear Hall data corresponding to the multiple rotations, the mechanical angle of the target driving motor after each rotation in the multiple rotations;

[0009] acquiring, based on the roll angle, the pitch angle and the mechanical angle of the target driving motor after each rotation in the multiple rotations, a roll angle conversion coefficient and a pitch angle conversion coefficient, wherein the roll angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the roll angle of the gimbal, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the pitch angle of the gimbal;

[0010] sending the roll angle conversion coefficient and the pitch angle conversion coefficient to the gimbal;

[0011] The gimbal is configured to: receive the roll angle conversion coefficient and the pitch angle conversion coefficient; acquire the linear Hall data collected by the linear Hall sensor in real time, and acquire the real-time mechanical angle of the target driving motor based on the linear Hall data collected in real time; and acquire the real-time roll angle of the gimbal based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or acquire the real-time pitch angle of the gimbal based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient.

[0012] In an embodiment of the present disclosure, acquiring the roll angle conversion coefficient and the pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor after each rotation in the multiple rotations comprises:

[0013] performing a multi-order polynomial fitting based on the roll angle and the mechanical angle of the target driving motor after each rotation in the multiple rotations to obtain the roll angle conversion coefficient;

[0014] performing a multi-order polynomial fitting based on the pitch angle and the mechanical angle of the target driving motor after each rotation in the multiple rotations to obtain the pitch angle conversion coefficient.

[0015] In an embodiment of the present disclosure, the stator of the target driving motor is provided with two linear Hall sensors, and the sensing surfaces of the two linear Hall sensors are perpendicular to each other and pass through the rotating shaft of the target driving motor;

[0016] acquiring, after a second time length after each rotation is completed, the linear Hall data corresponding to the rotation through the linear Hall sensor arranged on the stator of the target driving motor, comprising:

[0017] acquiring, after a second time length after each rotation is completed, the linear Hall data corresponding to the rotation through the two linear Hall sensors.

[0018] In an embodiment of the present disclosure, the target driving motor in the gimbal drives the gimbal to rotate by a target angle in a target direction around a target rotation axis corresponding to the target driving motor every first time length, comprising:

[0019] The target driving motor drives the gimbal to rotate by a target angle in a target direction around a target rotation axis every first time length starting from an upper limit mechanical angle corresponding to the target rotation axis, until the gimbal is rotated to a lower limit mechanical angle corresponding to the target rotation axis.

[0020] In a second aspect, the present disclosure provides an angle detection method, which is applied to a gimbal, comprising:

[0021] When the unmanned aerial vehicle carrying the gimbal is stationary, the target driving motor in the gimbal is controlled to drive the gimbal to rotate by a target angle in a target direction around a target rotation axis corresponding to the target driving motor every first time length;

[0022] Acceleration data corresponding to each rotation of the plurality of rotations is collected by an acceleration sensor of the gimbal every second time length after each rotation is completed, and linear Hall data corresponding to each rotation of the plurality of rotations is collected by a linear Hall sensor arranged on a stator of the target driving motor, wherein the second time length is less than the first time length;

[0023] The acceleration data and the linear Hall data corresponding to each rotation of the plurality of rotations are sent to an upper computer;

[0024] The upper computer is configured to: based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the gimbal after each rotation of the plurality of rotations, obtain a roll angle conversion coefficient and a pitch angle conversion coefficient, wherein the roll angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the roll angle of the gimbal, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the pitch angle of the gimbal; and send the roll angle conversion coefficient and the pitch angle conversion coefficient to the gimbal;

[0025] The method further comprises:

[0026] The roll angle conversion coefficient and the pitch angle conversion coefficient are received;

[0027] The linear Hall data collected by the linear Hall sensor in real time is obtained, and the real-time mechanical angle of the target driving motor is obtained based on the linear Hall data collected in real time;

[0028] The real-time roll angle of the gimbal is obtained based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or the real-time pitch angle of the gimbal is obtained based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient.

[0029] In an embodiment of the present disclosure, the linear Hall data collected in real time by the linear Hall sensor is acquired, and before the real-time mechanical angle of the target driving motor is acquired based on the linear Hall data collected in real time, the method further comprises:

[0030] The target driving motor is controlled to rotate to the limit portion corresponding to the target rotation shaft, and a preset roll angle and / or a preset pitch angle corresponding to the limit portion are acquired;

[0031] A detection roll angle of the gimbal is acquired based on the preset mechanical angle corresponding to the limit portion and a roll angle conversion coefficient, and / or a detection pitch angle of the gimbal is acquired based on the preset mechanical angle and a pitch angle conversion coefficient;

[0032] The linear Hall data collected in real time by the linear Hall sensor is acquired, and the real-time mechanical angle of the target driving motor is acquired based on the linear Hall data collected in real time, comprising:

[0033] If the preset roll angle matches the detection roll angle, and / or the preset pitch angle matches the detection pitch angle, the linear Hall data collected in real time by the linear Hall sensor is acquired, and the real-time mechanical angle of the target driving motor is acquired based on the linear Hall data collected in real time.

[0034] In a third aspect, an angle detection device is provided in the embodiments of the present disclosure, and the device is located in a host computer, comprising:

[0035] The data receiving module is configured to receive the acceleration data corresponding to each rotation in multiple rotations and the linear Hall data sent by the gimbal, wherein when the unmanned aerial vehicle carrying the gimbal is stationary, the target driving motor in the gimbal drives the gimbal to rotate around the target rotation shaft corresponding to the target driving motor by a target angle in a target direction every first time length, the acceleration data corresponding to each rotation is collected by the acceleration sensor of the gimbal after a second time length of each rotation is completed, and the linear Hall data corresponding to each rotation is collected by the linear Hall sensor arranged on the stator of the target driving motor, wherein the second time length is less than the first time length;

[0036] The angle acquisition module is configured to acquire the roll angle and the pitch angle of the gimbal after each rotation in multiple rotations based on the acceleration data corresponding to multiple rotations, and to acquire the mechanical angle of the target driving motor after each rotation in multiple rotations based on the linear Hall data corresponding to multiple rotations;

[0037] The coefficient obtaining module is configured to obtain a roll angle conversion coefficient and a pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the holder after each rotation in the multiple rotations, wherein the roll angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the roll angle of the holder, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the pitch angle of the holder.

[0038] The coefficient sending module is configured to send the roll angle conversion coefficient and the pitch angle conversion coefficient to the holder, wherein the holder is configured to receive the roll angle conversion coefficient and the pitch angle conversion coefficient, obtain linear Hall data collected by a linear Hall sensor in real time, and obtain a real-time mechanical angle of the target driving motor based on the linear Hall data collected in real time, obtain a real-time roll angle of the holder based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or obtain a real-time pitch angle of the holder based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient.

[0039] In a fourth aspect, an angle detection device is provided in the embodiments of the present disclosure, and the device is located in a holder. The device comprises:

[0040] The motor control module is configured to control the target driving motor in the holder to drive the holder to rotate around a target rotation axis corresponding to the target driving motor by a target angle in a target direction every first time length when a holder-carrying unmanned aerial vehicle is stationary.

[0041] The first data collection module is configured to collect acceleration data corresponding to each rotation by an acceleration sensor of the holder after a second time length when each rotation is completed, and collect linear Hall data corresponding to each rotation by a linear Hall sensor arranged on a stator of the target driving motor, wherein the second time length is less than the first time length.

[0042] The data sending module is configured to send the acceleration data and the linear Hall data corresponding to each rotation in the multiple rotations to an upper computer, wherein the upper computer is configured to obtain a roll angle conversion coefficient and a pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the holder after each rotation in the multiple rotations, wherein the roll angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the roll angle of the holder, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the pitch angle of the holder, and send the roll angle conversion coefficient and the pitch angle conversion coefficient to the holder.

[0043] The coefficient receiving module is configured to receive the roll angle conversion coefficient and the pitch angle conversion coefficient.

[0044] a second data collection module configured to acquire linear hall data collected by the linear hall sensor in real time, and acquire a real-time mechanical angle of the target driving motor based on the linear hall data collected in real time;

[0045] an angle detection module configured to acquire a real-time roll angle of the holder based on the real-time mechanical angle of the target driving motor and a roll angle conversion coefficient, and / or acquire a real-time pitch angle of the holder based on the real-time mechanical angle of the target driving motor and a pitch angle conversion coefficient.

[0046] In a fifth aspect, an electronic device is provided, including a memory and a processor, wherein the memory is configured to store one or more computer instructions, and the one or more computer instructions are configured to be executed by the processor to implement the method in any one of the first aspect or the second aspect.

[0047] In a sixth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer instructions, and the computer instructions are configured to be executed by a processor to implement the method in any one of the first aspect or the second aspect.

[0048] According to the technical scheme provided in the embodiments of the present disclosure, when the unmanned aerial vehicle carrying the holder is stationary, the target driving motor in the holder drives the holder to rotate around the target rotation shaft corresponding to the target driving motor by a target angle in a target direction every first time length, the acceleration sensor of the holder collects acceleration data corresponding to each rotation after a second time length of each rotation is completed, and the linear hall sensor arranged on the stator of the target driving motor collects linear hall data corresponding to each rotation, wherein the second time length is less than the first time length; the host computer receives the acceleration data and the linear hall data corresponding to each rotation in multiple rotations sent by the holder, acquires the roll angle and the pitch angle of the holder after each rotation in multiple rotations based on the acceleration data corresponding to multiple rotations, acquires the mechanical angle of the target driving motor after each rotation in multiple rotations based on the linear hall data corresponding to multiple rotations, acquires the roll angle conversion coefficient and the pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the holder after each rotation in multiple rotations, and sends the roll angle conversion coefficient and the pitch angle conversion coefficient to the holder; the holder receives the roll angle conversion coefficient and the pitch angle conversion coefficient; acquires linear hall data collected by the linear hall sensor in real time, and acquires a real-time mechanical angle of the target driving motor based on the linear hall data collected in real time, acquires a real-time roll angle of the holder based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or acquires a real-time pitch angle of the holder based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient.

[0049] In the above scheme, by driving the gimbal to rotate every first time length around the target rotation shaft corresponding to the target driving motor to the target direction by the target driving motor in the gimbal when the unmanned aerial vehicle carrying the gimbal is stationary, collecting acceleration data corresponding to the rotation by the acceleration sensor of the gimbal after every second time length after the rotation is completed, and collecting linear Hall data corresponding to the rotation by the linear Hall sensor arranged on the stator of the target driving motor, it can be ensured that the collected acceleration data and linear Hall data will not be disturbed by the flight of the unmanned aerial vehicle, and the fluctuation of the acceleration data and linear Hall data caused by the rotation inertia is reduced, so that the collected acceleration data and linear Hall data can truly reflect the actual state of the gimbal after corresponding rotation. By obtaining the roll angle conversion coefficient and the pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the gimbal after each rotation in multiple rotations, the accidental error of single data fluctuation can be offset by using multiple sample data, so that the roll angle conversion coefficient and the pitch angle conversion coefficient can accurately reflect the mapping relationship between the mechanical angle detected by the linear Hall sensor and the actual attitude angle of the gimbal. The gimbal can obtain the real-time mechanical angle of the target driving motor based on the real-time collected linear Hall data, obtain the real-time roll angle of the gimbal based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or obtain the real-time pitch angle of the gimbal based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient, so that the converted roll angle and pitch angle will not be affected by the fluctuation of the linear Hall data itself, and the accuracy is high. Therefore, the above scheme can obtain the roll angle and pitch angle of the gimbal with high accuracy without being affected by the fluctuation of the data collected by the linear Hall sensor, thereby improving the accuracy of detecting the attitude angle (including the roll angle and the pitch angle) of the gimbal.

[0050] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0051] Other features, objects, and advantages of the present disclosure will become more apparent from the following detailed description of the non-limiting embodiments, taken in conjunction with the accompanying drawings. In the drawings:

[0052] Figure 1 A flowchart of an angle detection method according to one embodiment of the present disclosure is shown.

[0053] Figure 2 A flowchart of an angle detection method according to another embodiment of the present disclosure is shown.

[0054] Figure 3 A structural block diagram of an angle detection device according to one embodiment of the present disclosure is shown.

[0055] Figure 4 A structural block diagram of an angle detection device according to another embodiment of the disclosure is shown.

[0056] Figure 5 A structural block diagram of an electronic device according to an embodiment of the disclosure is shown.

[0057] Figure 6 A structural schematic diagram of a computer system suitable for implementing the method according to the embodiment of the disclosure is shown. DETAILED DESCRIPTION

[0058] Hereinafter, exemplary embodiments of the disclosure will be described in detail with reference to the accompanying drawings so as to be easily carried out by those skilled in the art. Also, parts irrelevant to the description of the exemplary embodiments are omitted in the drawings for the sake of clarity.

[0059] In the disclosure, it should be understood that terms such as "include" or "have" are intended to indicate that there are features, numbers, steps, actions, components, parts or combinations thereof disclosed in the specification, and do not exclude the possibility of adding one or more other features, numbers, steps, actions, components, parts or combinations thereof.

[0060] It should also be noted that the embodiments in the disclosure and the features in the embodiments can be combined with each other without conflict. The disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0061] In the disclosure, if it involves an operation of acquiring user information or user data or an operation of showing user information or user data to others, the operation is an operation authorized, confirmed by the user, or actively selected by the user.

[0062] In the related art, in order to detect the attitude angle of the holder, a mechanical coding sensor, a potential sensor or an optical sensor can be installed on the driving motor of the holder, and the attitude angle of the holder can be obtained through the data collected by the above-mentioned sensors. In recent years, considering that the structure of the above-mentioned sensor is easy to be worn and has a lower service life, a linear Hall sensor is usually installed on the driving motor of the holder, and the attitude angle of the holder such as the roll angle and the pitch angle can be calculated through the data collected by the linear Hall sensor.

[0063] However, the applicant finds that the data collected by the linear Hall sensor often fluctuates in actual use. Specifically, the core of the linear Hall sensor is a Hall element and an analog-to-digital conversion module, and the manufacturing process of the chip (such as the uniformity of the material of the Hall element and the precision of the electrode) will cause inherent errors in the sampling process. If the sampling bit number and conversion rate of the analog-to-digital conversion module do not match the demand for magnetic field change, the quantification of the magnetic field strength will not be accurate enough, which will cause the collected data to fluctuate easily. At the same time, the circuit noise (such as thermal noise and current noise) in the chip will also be superimposed in the output signal, thereby causing the data collected by the linear Hall sensor to fluctuate. In addition, a magnet cooperating with the linear Hall sensor needs to be arranged in the driving motor of the gimbal, and the magnetic field distribution of the magnet is usually difficult to achieve theoretical uniformity and stability. Specifically, the magnetizing process of the magnetic steel has differences, which may cause uneven distribution of the surface magnetic field strength and slight deviation of the magnetic field direction. Mechanical errors (such as inconsistent spacing and coaxiality deviation from the sensor) in the installation process of the magnet will also cause the magnetic field strength sensed by the linear Hall sensor to change irregularly with the rotation of the motor, thereby causing the data collected by the linear Hall sensor to fluctuate.

[0064] Since the data collected by the linear Hall sensor often fluctuates, the attitude angle of the gimbal directly calculated based on the data collected by the linear Hall sensor may have a large error, thereby reducing the accuracy of the attitude angle of the gimbal.

[0065] To solve the above problems, the present embodiment provides an angle detection method, device, equipment and medium.

[0066] According to the technical scheme provided by the embodiment of the present disclosure, when the unmanned aerial vehicle with the holder is stationary, the holder is driven by the target driving motor in the holder every first time length to rotate around the target rotating shaft corresponding to the target driving motor to the target direction by a target angle, the acceleration data corresponding to each rotation is collected by the acceleration sensor of the holder after the second time length of each rotation is completed, and the linear Hall data corresponding to each rotation is collected by the linear Hall sensor arranged on the stator of the target driving motor, wherein the second time length is less than the first time length; the host computer receives the acceleration data and the linear Hall data corresponding to each rotation in multiple rotations sent by the holder, obtains the roll angle and the pitch angle of the holder after each rotation in multiple rotations based on the acceleration data corresponding to multiple rotations, and obtains the mechanical angle of the target driving motor after each rotation in multiple rotations based on the linear Hall data corresponding to multiple rotations, obtains the roll angle conversion coefficient and the pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the holder after each rotation in multiple rotations, sends the roll angle conversion coefficient and the pitch angle conversion coefficient to the holder; the holder receives the roll angle conversion coefficient and the pitch angle conversion coefficient; obtains the linear Hall data collected by the linear Hall sensor in real time, and obtains the real-time mechanical angle of the target driving motor based on the linear Hall data collected in real time, obtains the real-time roll angle of the holder based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or obtains the real-time pitch angle of the holder based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient.

[0067] In the above scheme, by driving the gimbal to rotate every first time length around the target rotation shaft corresponding to the target driving motor to the target direction by the target driving motor in the gimbal when the unmanned aerial vehicle carrying the gimbal is stationary, collecting acceleration data corresponding to each rotation by the acceleration sensor of the gimbal after each rotation is completed for a second time length, and collecting linear Hall data corresponding to each rotation by the linear Hall sensor arranged on the stator of the target driving motor, it can be ensured that the collected acceleration data and linear Hall data will not be disturbed by the flight of the unmanned aerial vehicle, and the fluctuation of the acceleration data and linear Hall data caused by the rotation inertia is reduced, so that the collected acceleration data and linear Hall data can truly reflect the actual state of the gimbal after corresponding rotation. By obtaining the roll angle conversion coefficient and the pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the gimbal after each rotation in multiple rotations, the accidental error of single data fluctuation can be offset by using multiple sample data, so that the roll angle conversion coefficient and the pitch angle conversion coefficient can accurately reflect the mapping relationship between the mechanical angle detected by the linear Hall sensor and the actual attitude angle of the gimbal. The gimbal can obtain the real-time mechanical angle of the target driving motor based on the real-time collected linear Hall data, obtain the real-time roll angle of the gimbal based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or obtain the real-time pitch angle of the gimbal based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient, so that the converted roll angle and pitch angle will not be affected by the fluctuation of the linear Hall data itself, and the accuracy is high. Therefore, the above scheme can obtain the roll angle and pitch angle of the gimbal with high accuracy without being affected by the fluctuation of the data collected by the linear Hall sensor, thereby improving the accuracy of detecting the attitude angle (including the roll angle and the pitch angle) of the gimbal.

[0068] Figure 1 A flowchart of an angle detection method according to one embodiment of the present disclosure is shown, which is applied to a host computer. As shown in Figure 1 The angle detection method includes the following steps:

[0069] In step S101, acceleration data and linear Hall data corresponding to each rotation in multiple rotations are received from the gimbal.

[0070] Wherein, when the unmanned aerial vehicle carrying the gimbal is stationary, the target driving motor in the gimbal drives the gimbal to rotate every first time length around the target rotation shaft corresponding to the target driving motor to the target direction, the acceleration data corresponding to each rotation is collected by the acceleration sensor of the gimbal after each rotation is completed for a second time length, and the linear Hall data corresponding to each rotation is collected by the linear Hall sensor arranged on the stator of the target driving motor, wherein the second time length is less than the first time length.

[0071] In an implementation form of the present disclosure, the first time length can be 1 second, the second time length can be 0.8 second, and the target angle can be 1 degree, that is, the target driving motor in the holder can drive the holder to rotate 1 degree around the target rotation shaft corresponding to the target driving motor every 1 second, and at 0.8 second after each rotation is completed, the acceleration data corresponding to the rotation is collected through the acceleration sensor, and the linear Hall data corresponding to the rotation is collected through the linear Hall sensor.

[0072] In step S102, the roll angle and the pitch angle of the holder after each rotation of the multiple rotations are obtained based on the acceleration data corresponding to the multiple rotations, and the mechanical angle of the target driving motor after each rotation of the multiple rotations is obtained based on the linear Hall data corresponding to the multiple rotations.

[0073] In an implementation form of the present disclosure, the roll angle and the pitch angle of the holder after each rotation of the multiple rotations are obtained based on the acceleration data corresponding to the multiple rotations, which can be understood as substituting the acceleration data of each rotation of the multiple rotations into the algorithm obtained in advance to obtain the roll angle and the pitch angle of the holder after each rotation.

[0074] For example, the acceleration data corresponding to each rotation includes the acceleration acc x of the holder on the x-axis of the holder coordinate system, the acceleration acc y of the holder on the y-axis of the holder coordinate system, and the acceleration acc z of the holder on the z-axis of the holder coordinate system.

[0075] Based on The x-axis normalized acceleration component ax is calculated.

[0076] Based on The y-axis normalized acceleration component ay is calculated.

[0077] Based on The z-axis normalized acceleration component az is calculated.

[0078] Wherein ax can be understood as the relative projection ratio of gravity on the x-axis of the terrestrial coordinate system, ay can be understood as the relative projection ratio of gravity on the y-axis of the terrestrial coordinate system, and az can be understood as the relative projection ratio of gravity on the z-axis of the terrestrial coordinate system.

[0079] The pitch angle y_pitch of the holder after the rotation is calculated based on y_pitch=arcsin(-ax).

[0080] The roll angle y_roll of the holder after the rotation is calculated based on y_roll=arctan(ay / az).

[0081] In step S103, based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the gimbal after each rotation in the multiple rotations, a roll angle conversion coefficient and a pitch angle conversion coefficient are obtained.

[0082] The roll angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the roll angle of the gimbal, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the pitch angle of the gimbal.

[0083] In an implementation manner of the present disclosure, based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the gimbal after each rotation in the multiple rotations, the roll angle conversion coefficient and the pitch angle conversion coefficient are obtained, which can be realized in the following manner:

[0084] Based on the roll angle and the mechanical angle of the target driving motor of the gimbal after each rotation in the multiple rotations, a multi-order polynomial fitting is performed to obtain the roll angle conversion coefficient;

[0085] Based on the pitch angle and the mechanical angle of the target driving motor of the gimbal after each rotation in the multiple rotations, a multi-order polynomial fitting is performed to obtain the pitch angle conversion coefficient.

[0086] For example, based on the pitch angle and the mechanical angle of the target driving motor of the gimbal after each rotation in the multiple rotations, a multi-order polynomial fitting is performed to obtain the pitch angle conversion coefficient, which includes:

[0087] A third-order polynomial y pi =a p0 +a p1 x i +a p2 x i 2 +a p3 x i 3 is constructed, where y pi is the pitch angle of the gimbal after the i-th rotation, x i is the mechanical angle of the target driving motor after the i-th rotation, a p0 , a p1 , a p2 , a p3 are the pitch angle conversion coefficients.

[0088] Taking the target driving motor in the gimbal driving the gimbal to rotate n times as an example, where n>1. Based on the pitch angle of the gimbal after each rotation in the n rotations, a pitch angle matrix y_p' is constructed, based on the mechanical angle of the target driving motor after each rotation in the multiple rotations, a mechanical angle matrix x' is constructed, and a pitch angle conversion coefficient matrix a p ' is constructed.

[0089] wherein, , , wherein y_pitch n is the pitch angle of the gimbal after the nth rotation, x n is the mechanical angle of the target driving motor after the nth rotation;

[0090] calculating the pitch angle conversion coefficient matrix a p ′ that makes the residual sum of squares RSS p ′, wherein RSS p = (y_p′-x′·a p ′) 2 , the coefficients a p , a p0 , a p1 , a p2 in the coefficient matrix a p3 ′ calculated are the pitch angle conversion coefficients.

[0091] Based on the pitch angle of the gimbal and the mechanical angle of the target driving motor after each rotation in multiple rotations, a multi-order polynomial fitting is performed to obtain the roll angle conversion coefficient, including:

[0092] a third-order polynomial y ri = a r0 + a r1 x i + a r2 x i 2 + a r3 x i 3 is constructed, wherein y ri is the roll angle of the gimbal after the ith rotation, a r0 , a r1 , a r2 , a r3 are the roll angle conversion coefficients.

[0093] Taking the case that the target driving motor in the gimbal drives the gimbal to rotate n times as an example, wherein n>1. Based on the roll angle of the gimbal after each rotation in n rotations, a roll angle matrix y_r′ is constructed, and a roll angle conversion coefficient matrix a r ′ is constructed;

[0094] wherein, , , wherein y_roll n is the roll angle of the gimbal after the nth rotation;

[0095] obtaining the roll angle conversion coefficient matrix a r ′ that makes the residual sum of squares RSSr ′, where RSS r =(y_r′-x′·a r ′) 2 The calculated coefficient matrix a r The coefficient a in ′ r0 a r1 a r2 a r3 That is, the roll angle conversion factor.

[0096] In step S104, the roll angle conversion factor and the pitch angle conversion factor are sent to the gimbal.

[0097] The gimbal is configured as follows:

[0098] Receive roll angle conversion factor and pitch angle conversion factor;

[0099] The linear Hall data collected in real time by the linear Hall sensor is acquired, and the real-time mechanical angle of the target drive motor is obtained based on the real-time collected linear Hall data.

[0100] The real-time roll angle of the gimbal is obtained based on the conversion factor between the real-time mechanical angle and roll angle of the target drive motor, and / or the real-time pitch angle of the gimbal is obtained based on the conversion factor between the real-time mechanical angle and pitch angle of the target drive motor.

[0101] In one implementation of this disclosure, the real-time roll angle of the gimbal is obtained based on the conversion coefficient between the real-time mechanical angle and roll angle of the target drive motor. This can be understood as substituting the real-time mechanical angle and roll angle conversion coefficient of the target drive motor into a pre-acquired algorithm for calculation to obtain the real-time roll angle of the gimbal.

[0102] For example, it can be done through y rs =a r0 +a r1 x r +a r2 x r 2 +a r3 x r 3 The real-time roll angle y of the gimbal is calculated. rs , where x r The real-time mechanical angle of the target drive motor is used to calculate the roll angle of the gimbal.

[0103] The real-time pitch angle of the gimbal is obtained by using the conversion coefficients of the real-time mechanical angle and pitch angle of the target drive motor. This can be understood as substituting the conversion coefficients of the real-time mechanical angle and pitch angle of the target drive motor into a pre-acquired algorithm for calculation, and then calculating the real-time pitch angle of the gimbal.

[0104] Exemplarily, the real-time roll angle y ps =a p0 +a p1 x s +a p2 x s 2 +a p3 x s 3 , the real-time pitch angle y ps of the gimbal is calculated, where x s is the real-time mechanical angle of the target driving motor when the pitch angle of the gimbal is calculated.

[0105] In the above scheme, by driving the gimbal to rotate every first time length around the target rotation axis corresponding to the target driving motor by a target angle in the target direction through the target driving motor in the gimbal when the unmanned aerial vehicle carrying the gimbal is stationary, collecting acceleration data corresponding to each rotation through the acceleration sensor of the gimbal after each rotation is completed for a second time length, and collecting linear Hall data corresponding to each rotation through the linear Hall sensor arranged on the stator of the target driving motor, it can be ensured that the collected acceleration data and linear Hall data will not be disturbed by the flight of the unmanned aerial vehicle, and the fluctuation of the acceleration data and linear Hall data caused by the rotation inertia is reduced, so that the collected acceleration data and linear Hall data can truly reflect the actual state of the gimbal after corresponding rotation. By obtaining the roll angle conversion coefficient and the pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the gimbal after each rotation in multiple rotations, the accidental error of single data fluctuation can be offset by using multiple sets of sample data, so that the roll angle conversion coefficient and the pitch angle conversion coefficient can accurately reflect the mapping relationship between the mechanical angle detected by the linear Hall sensor and the actual attitude angle of the gimbal. The gimbal can obtain the real-time mechanical angle of the target driving motor based on the real-time collected linear Hall data, obtain the real-time roll angle of the gimbal based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or obtain the real-time pitch angle of the gimbal based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient, so that the calculated roll angle and pitch angle will not be affected by the fluctuation of the linear Hall data itself, and the accuracy is high. Therefore, the above scheme can obtain the roll angle and pitch angle of the gimbal with high accuracy without being affected by the fluctuation of the data collected by the linear Hall sensor, thereby improving the accuracy of detecting the attitude angle (including the roll angle and the pitch angle) of the gimbal.

[0106] In an embodiment of the present disclosure, two linear Hall sensors are arranged on the stator of the target driving motor, and the sensing surfaces of the two linear Hall sensors are perpendicular to each other and pass through the rotation axis of the target driving motor.

[0107] acquire linear Hall data corresponding to the rotation through two linear Hall sensors after a second length of time when the rotation is completed.

[0108] acquire linear Hall data corresponding to the rotation through two linear Hall sensors after a second length of time when the rotation is completed.

[0109] In an implementation manner of the present disclosure, the linear Hall data acquired by the two linear Hall sensors can be substituted into a pre-acquired algorithm to calculate the mechanical angle of the target driving motor.

[0110] For example, the electrical angle can be calculated by θ = arctan (H1 / H2), where H1 is the linear Hall data acquired by one of the two linear Hall sensors, and H2 is the linear Hall data acquired by the other of the two linear Hall sensors.

[0111] The mechanical angle X of the target driving motor is calculated based on X = θ / P - θ_offset, where P is the motor pole pair number of the target driving motor, and θ_offset is a preset motor angle compensation value.

[0112] In the above scheme, the linear Hall data corresponding to the rotation is acquired through two linear Hall sensors after a second length of time when the rotation is completed, wherein the two sensors output sinusoidal and cosine orthogonal signals with a phase difference of 90° when sensing the magnetic field. The orthogonal signals can completely cover the full angle range of the motor rotation, avoid the sensing blind area of a single sensor signal, and ensure that effective detection signals can be acquired at different mechanical angles.

[0113] In an implementation manner of the present disclosure, the target driving motor in the holder drives the holder to rotate by a target angle in a target direction around a target rotation shaft corresponding to the target driving motor every first length of time, including:

[0114] The target driving motor drives the holder to rotate by a target angle in a target direction around the target rotation shaft every first length of time starting from an upper limit mechanical angle corresponding to the target rotation shaft, until the holder rotates to a lower limit mechanical angle corresponding to the target rotation shaft.

[0115] In the above scheme, by driving the gimbal to rotate around the target rotation axis by a target angle in a target direction every first time length from an upper limit mechanical angle corresponding to the target rotation axis, until the gimbal is rotated to a lower limit mechanical angle corresponding to the target rotation axis, the data of the full stroke angle of the gimbal can be fully covered, the problem of incomplete fitting data caused by local angle omission is avoided, and the sample data in the subsequent steps can cover the full angle range of the gimbal, so that the roll angle and pitch angle conversion coefficients obtained subsequently can accurately match the angle mapping rule in the entire stroke, and the consistency of angle detection in the subsequent steps is effectively improved.

[0116] Figure 2 A flowchart of an angle detection method according to another embodiment of the present disclosure is shown, which is applied to a gimbal. As shown in Figure 2 The angle detection method comprises the following steps:

[0117] In step S201, when the unmanned aerial vehicle carrying the gimbal is stationary, a target driving motor in the gimbal is controlled to drive the gimbal to rotate around a target rotation axis corresponding to the target driving motor by a target angle in a target direction every first time length.

[0118] In step S202, after a second time length after each rotation, acceleration data corresponding to the rotation is collected by an acceleration sensor of the gimbal, and linear Hall data corresponding to the rotation is collected by a linear Hall sensor arranged on a stator of the target driving motor.

[0119] The second time length is less than the first time length.

[0120] In an implementation manner of the present disclosure, the first time length can be 1 second, the second time length can be 0.8 seconds, and the target angle can be 1 degree, that is, the target driving motor in the gimbal can drive the gimbal to rotate around the target rotation axis corresponding to the target driving motor by 1 degree in a target direction every 1 second, and after each rotation is completed, the acceleration data corresponding to the rotation is collected by the acceleration sensor every 0.8 seconds, and the linear Hall data corresponding to the rotation is collected by the linear Hall sensor.

[0121] In step S203, the acceleration data and the linear Hall data corresponding to each rotation in the multiple rotations are sent to an upper computer.

[0122] The host computer is configured to: obtain a roll angle conversion coefficient and a pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the gimbal after each of the multiple rotations, wherein the roll angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the roll angle of the gimbal, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the pitch angle of the gimbal; and send the roll angle conversion coefficient and the pitch angle conversion coefficient to the gimbal.

[0123] In an implementation form of the present disclosure, the roll angle and the pitch angle of the gimbal after each of the multiple rotations are obtained based on the acceleration data corresponding to the multiple rotations, which can be understood as substituting the acceleration data of each of the multiple rotations into the algorithm obtained in advance to obtain the roll angle and the pitch angle of the gimbal after each of the multiple rotations.

[0124] For example, the acceleration data corresponding to each of the multiple rotations includes an acceleration acc x of the gimbal on the x-axis of the gimbal coordinate system, an acceleration acc y of the gimbal on the y-axis of the gimbal coordinate system, and an acceleration acc z of the gimbal on the z-axis of the gimbal coordinate system.

[0125] Based on The x-axis normalized acceleration component ax is calculated.

[0126] Based on The y-axis normalized acceleration component ay is calculated.

[0127] Based on The z-axis normalized acceleration component az is calculated.

[0128] The ax can be understood as the relative projection ratio of the gravity on the x-axis of the terrestrial coordinate system, the ay can be understood as the relative projection ratio of the gravity on the y-axis of the terrestrial coordinate system, and the az can be understood as the relative projection ratio of the gravity on the z-axis of the terrestrial coordinate system.

[0129] The pitch angle y_pitch of the gimbal after each of the multiple rotations is calculated based on y_pitch=arcsin(-ax).

[0130] The roll angle y_roll of the gimbal after each of the multiple rotations is calculated based on y_roll=arctan(ay / az).

[0131] In an implementation form of the present disclosure, the roll angle conversion coefficient and the pitch angle conversion coefficient are obtained based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the gimbal after each of the multiple rotations, which can be realized by the following manner:

[0132] The roll angle conversion coefficient is obtained by performing multi-order polynomial fitting based on the roll angle of the holder after each rotation in multiple rotations and the mechanical angle of the target driving motor.

[0133] The pitch angle conversion coefficient is obtained by performing multi-order polynomial fitting based on the pitch angle of the holder after each rotation in multiple rotations and the mechanical angle of the target driving motor.

[0134] For example, the pitch angle conversion coefficient is obtained by performing multi-order polynomial fitting based on the pitch angle of the holder after each rotation in multiple rotations and the mechanical angle of the target driving motor, including:

[0135] A third-order polynomial y pi =a p0 +a p1 x i +a p2 x i 2 +a p3 x i 3 is constructed, where y pi is the pitch angle of the holder after the i-th rotation, and x i is the mechanical angle of the target driving motor after the i-th rotation.

[0136] Taking the target driving motor in the holder as an example, the holder is driven to rotate n times, where n>1. A pitch angle matrix y_p' is constructed based on the pitch angle of the holder after each rotation in n rotations, a mechanical angle matrix x' is constructed based on the mechanical angle of the target driving motor after each rotation in multiple rotations, and a pitch angle conversion coefficient matrix a p ' is constructed.

[0137] wherein, , , wherein, y_pitch n is the pitch angle of the holder after the n-th rotation, and x n is the mechanical angle of the target driving motor after the n-th rotation.

[0138] The pitch angle conversion coefficient matrix a p ' that minimizes the residual sum of squares RSS p is calculated, where RSS p =(y_p'-x'·a p ') 2 The coefficients a p0 , a p1 , a p2 , and a p3 in the coefficient matrix a p ' calculated are the pitch angle conversion coefficients.

[0139] Based on the pitch angle of the gimbal after each rotation in multiple rotations and the mechanical angle of the target driving motor, a multi-stage polynomial fitting is performed to obtain a roll angle conversion coefficient, including:

[0140] A third-order polynomial y ri = a r0 + a r1 x i + a r2 x i 2 + a r3 x i 3 is constructed, where y ri is the roll angle of the gimbal after the i-th rotation.

[0141] Taking the case where the target driving motor in the gimbal drives the gimbal to rotate n times as an example, where n > 1. Based on the roll angle of the gimbal after each rotation in n rotations, a roll angle matrix y_r' is constructed, and a roll angle conversion coefficient matrix a r ' is constructed.

[0142] where, , , , where y_roll n is the roll angle of the gimbal after the n-th rotation.

[0143] The roll angle conversion coefficient matrix a r ' that minimizes the residual sum of squares RSS r is obtained, where RSS r = (y_r' - x'·a r ') 2 , and the coefficients a r0 , a r1 , a r2 , a r3 in the coefficient matrix a r ' calculated are the roll angle conversion coefficients.

[0144] In step S204, the roll angle conversion coefficient and the pitch angle conversion coefficient are received.

[0145] In step S205, linear Hall data collected by a linear Hall sensor in real time is obtained, and the real-time mechanical angle of the target driving motor is obtained based on the linear Hall data collected in real time.

[0146] In step S206, the real-time roll angle of the gimbal is obtained based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or the real-time pitch angle of the gimbal is obtained based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient.

[0147] In one implementation of this disclosure, the real-time roll angle of the gimbal is obtained based on the conversion coefficient between the real-time mechanical angle and roll angle of the target drive motor. This can be understood as substituting the real-time mechanical angle and roll angle conversion coefficient of the target drive motor into a pre-acquired algorithm for calculation to obtain the real-time roll angle of the gimbal.

[0148] For example, it can be done through y rs =a r0 +a r1 x r +a r2 x r 2 +a r3 x r 3 The real-time roll angle y of the gimbal is calculated. rs , where x r The real-time mechanical angle of the target drive motor is used to calculate the roll angle of the gimbal.

[0149] The real-time pitch angle of the gimbal is obtained by using the conversion coefficients of the real-time mechanical angle and pitch angle of the target drive motor. This can be understood as substituting the conversion coefficients of the real-time mechanical angle and pitch angle of the target drive motor into a pre-acquired algorithm for calculation, and then calculating the real-time pitch angle of the gimbal.

[0150] For example, it can be done through y ps =a p0 +a p1 x s +a p2 x s 2 +a p3 x s 3 The real-time pitch angle y of the gimbal is calculated. ps , where x s The real-time mechanical angle of the target drive motor is used to calculate the pitch angle of the gimbal.

[0151] In the above scheme, by driving the gimbal to rotate every first time length around the target rotation shaft corresponding to the target driving motor to a target direction by a target driving motor in the gimbal when the unmanned aerial vehicle with the gimbal is stationary, collecting acceleration data corresponding to each rotation by an acceleration sensor of the gimbal after a second time length of each rotation is completed, and collecting linear Hall data corresponding to each rotation by a linear Hall sensor arranged on the stator of the target driving motor, it can be ensured that the collected acceleration data and linear Hall data will not be disturbed by the flight of the unmanned aerial vehicle, and the fluctuation of the acceleration data and linear Hall data caused by the rotation inertia is reduced, so that the collected acceleration data and linear Hall data can truly reflect the actual state of the gimbal after corresponding rotation. By obtaining the roll angle conversion coefficient and the pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the gimbal after each rotation in multiple rotations, the accidental error of single data fluctuation can be offset by using multiple sample data, so that the roll angle conversion coefficient and the pitch angle conversion coefficient can accurately reflect the mapping relationship between the mechanical angle detected by the linear Hall sensor and the actual attitude angle of the gimbal. The gimbal can obtain the real-time mechanical angle of the target driving motor based on the real-time collected linear Hall data, obtain the real-time roll angle of the gimbal based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or obtain the real-time pitch angle of the gimbal based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient, so that the calculated roll angle and pitch angle will not be affected by the fluctuation of the linear Hall data itself, and the accuracy is high. Therefore, the above scheme can obtain the roll angle and pitch angle of the gimbal with high accuracy without being affected by the fluctuation of the data collected by the linear Hall sensor, thereby improving the accuracy of detecting the attitude angle (including the roll angle and the pitch angle) of the gimbal.

[0152] In an embodiment of the present disclosure, before obtaining the linear Hall data collected by the linear Hall sensor in real time and obtaining the real-time mechanical angle of the target driving motor based on the real-time collected linear Hall data, the method further comprises:

[0153] controlling the target driving motor to drive the gimbal to rotate to the limit portion corresponding to the target rotation shaft, and obtaining a preset roll angle and / or a preset pitch angle corresponding to the limit portion;

[0154] obtaining a detected roll angle of the gimbal based on the preset mechanical angle corresponding to the limit portion and the roll angle conversion coefficient, and / or obtaining a detected pitch angle of the gimbal based on the preset mechanical angle and the pitch angle conversion coefficient;

[0155] obtaining the linear Hall data collected by the linear Hall sensor in real time, and obtaining the real-time mechanical angle of the target driving motor based on the real-time collected linear Hall data, comprising:

[0156] If the preset roll angle matches the detected roll angle and / or the preset pitch angle matches the detected pitch angle, linear Hall data collected by the linear Hall sensor in real time is acquired, and the real-time mechanical angle of the target drive motor is acquired based on the real-time collected linear Hall data.

[0157] In the above scheme, by controlling the gimbal to rotate to the limit position of the target rotation shaft, and taking the preset roll angle / pitch angle corresponding to the limit position as the reference, the detection angle is calculated by using the roll angle conversion coefficient / pitch angle conversion coefficient and the preset mechanical angle of the limit position. By matching the reference and the detection angle, the accuracy of the conversion coefficient is verified first. The above scheme avoids the situation that the coefficient fitted by the upper computer is directly put into use without meeting the accuracy requirements due to data fluctuations, fitting deviations and other problems, ensuring that only the coefficient meeting the accuracy requirements is used for real-time calculation, thereby improving the reliability of the gimbal attitude angle detection. At the same time, since the verification process only involves simple conversion and comparison at fixed angles, complex operations are not required, and the gimbal does not need to occupy excessive data processing resources, thereby reducing the verification cost.

[0158] Figure 3 A structural block diagram of an angle detection device according to one embodiment of the present disclosure is shown. The device is located in the upper computer, and the device can be realized by software, hardware or a combination of the two to become part or all of an electronic device.

[0159] As shown in Figure 3 The angle detection device includes:

[0160] The data receiving module 301 is configured to receive acceleration data and linear Hall data corresponding to each rotation in multiple rotations sent by the gimbal. When the unmanned aerial vehicle carrying the gimbal is stationary, the target drive motor in the gimbal drives the gimbal to rotate around the target rotation shaft corresponding to the target drive motor by a target angle in a target direction every first time length. The acceleration data corresponding to each rotation is collected by the acceleration sensor of the gimbal after a second time length after each rotation is completed, and the linear Hall data corresponding to each rotation is collected by the linear Hall sensor arranged on the stator of the target drive motor, wherein the second time length is less than the first time length.

[0161] The angle acquisition module 302 is configured to acquire the roll angle and the pitch angle of the gimbal after each rotation in multiple rotations based on the acceleration data corresponding to multiple rotations, and to acquire the mechanical angle of the target drive motor after each rotation in multiple rotations based on the linear Hall data corresponding to multiple rotations.

[0162] The coefficient obtaining module 303 is configured to obtain a roll angle conversion coefficient and a pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the holder after each rotation in the multiple rotations, wherein the roll angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the roll angle of the holder, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the pitch angle of the holder.

[0163] The coefficient sending module 304 is configured to send the roll angle conversion coefficient and the pitch angle conversion coefficient to the holder; wherein the holder is configured to receive the roll angle conversion coefficient and the pitch angle conversion coefficient; obtain linear Hall data collected by a linear Hall sensor in real time, and obtain a real-time mechanical angle of the target driving motor based on the linear Hall data collected in real time; obtain a real-time roll angle of the holder based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or obtain a real-time pitch angle of the holder based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient.

[0164] In the above scheme, when the holder-carrying unmanned aerial vehicle is stationary, the holder is driven by the target driving motor in the holder to rotate around the target rotation shaft corresponding to the target driving motor to the target direction by a target angle every first time length, the acceleration data corresponding to each rotation is collected by the acceleration sensor of the holder after a second time length after each rotation is completed, and the linear Hall data corresponding to each rotation is collected by the linear Hall sensor arranged on the stator of the target driving motor. It can be ensured that the collected acceleration data and linear Hall data will not be disturbed by the flight of the unmanned aerial vehicle, and the fluctuation of the acceleration data and linear Hall data caused by the rotation inertia is also reduced, so that the collected acceleration data and linear Hall data can truly reflect the actual state of the holder after corresponding rotation. By obtaining the roll angle conversion coefficient and the pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the holder after each rotation in the multiple rotations, a plurality of sample data can be used to offset the accidental error of single data fluctuation, so that the roll angle conversion coefficient and the pitch angle conversion coefficient can accurately reflect the mapping relationship between the mechanical angle detected by the linear Hall sensor and the actual attitude angle of the holder. The holder obtains the real-time mechanical angle of the target driving motor based on the linear Hall data collected in real time, obtains the real-time roll angle of the holder based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or obtains the real-time pitch angle of the holder based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient. It can be ensured that the converted roll angle and pitch angle will not be affected by the fluctuation of the linear Hall data itself, and the accuracy is high. Therefore, the above scheme can obtain the roll angle and pitch angle of the holder with high accuracy without being affected by the fluctuation of the data collected by the linear Hall sensor, thereby improving the accuracy of the detection of the attitude angle (including the roll angle and the pitch angle) of the holder.

[0165] Figure 4 A structural block diagram of an angle detection device according to another embodiment of the present disclosure is shown. The device is located in a gimbal, and the device can be implemented by software, hardware, or a combination of both to become part or all of an electronic device.

[0166] As shown in Figure 4 The angle detection device includes:

[0167] The motor control module 401 is configured to control the target driving motor in the gimbal to drive the gimbal to rotate around the target rotation shaft corresponding to the target driving motor by a target angle in a target direction every first time length when the unmanned aerial vehicle carrying the gimbal is stationary.

[0168] The first data acquisition module 402 is configured to acquire acceleration data corresponding to each rotation through an acceleration sensor of the gimbal every second time length after the completion of the rotation, and acquire linear Hall data corresponding to the rotation through a linear Hall sensor arranged on a stator of the target driving motor, where the second time length is less than the first time length.

[0169] The data sending module 403 is configured to send the acceleration data and the linear Hall data corresponding to each rotation in the multiple rotations to an upper computer, where the upper computer is configured to: based on the roll angle, the pitch angle, and the mechanical angle of the target driving motor of the gimbal after each rotation in the multiple rotations, obtain a roll angle conversion coefficient and a pitch angle conversion coefficient, where the roll angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the roll angle of the gimbal, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the pitch angle of the gimbal; and send the roll angle conversion coefficient and the pitch angle conversion coefficient to the gimbal.

[0170] The coefficient receiving module 404 is configured to receive the roll angle conversion coefficient and the pitch angle conversion coefficient.

[0171] The second data acquisition module 405 is configured to acquire the linear Hall data acquired by the linear Hall sensor in real time, and obtain the real-time mechanical angle of the target driving motor based on the linear Hall data acquired in real time.

[0172] The angle detection module 406 is configured to obtain the real-time roll angle of the gimbal based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or obtain the real-time pitch angle of the gimbal based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient.

[0173] In the above scheme, by driving the gimbal to rotate every first time length around the target rotation shaft corresponding to the target driving motor to the target direction by the target driving motor in the gimbal when the unmanned aerial vehicle carrying the gimbal is stationary, collecting acceleration data corresponding to the rotation by the acceleration sensor of the gimbal after every second time length of rotation is completed, and collecting linear Hall data corresponding to the rotation by the linear Hall sensor arranged on the stator of the target driving motor, it can be ensured that the collected acceleration data and linear Hall data will not be disturbed by the flight of the unmanned aerial vehicle, and the fluctuation of the acceleration data and linear Hall data caused by the rotation inertia is also reduced, so that the collected acceleration data and linear Hall data can truly reflect the actual state of the gimbal after corresponding rotation. By obtaining the roll angle conversion coefficient and the pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the gimbal after each rotation in multiple rotations, the accidental error of single data fluctuation can be offset by using multiple sets of sample data, so that the roll angle conversion coefficient and the pitch angle conversion coefficient can accurately reflect the mapping relationship between the mechanical angle detected by the linear Hall sensor and the actual attitude angle of the gimbal. The gimbal can obtain the real-time mechanical angle of the target driving motor based on the real-time collected linear Hall data, obtain the real-time roll angle of the gimbal based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or obtain the real-time pitch angle of the gimbal based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient, so that the converted roll angle and pitch angle will not be affected by the fluctuation of the linear Hall data itself, and the accuracy is high. Therefore, the above scheme can obtain the roll angle and pitch angle of the gimbal with high accuracy without being affected by the fluctuation of the data collected by the linear Hall sensor, thereby improving the accuracy of detecting the attitude angle (including the roll angle and the pitch angle) of the gimbal.

[0174] The present disclosure also discloses an electronic device, Figure 5 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0175] As Figure 5 shown, the electronic device includes a memory and a processor, wherein the memory is configured to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement a method according to an embodiment of the present disclosure.

[0176] In a first aspect, an angle detection method is provided in an embodiment of the present disclosure, which is applied to an upper computer, and the method includes:

[0177] receive acceleration data and linear hall data corresponding to each of the multiple rotations, wherein, when the gimbal-carrying unmanned aerial vehicle is stationary, a target drive motor in the gimbal drives the gimbal to rotate around a target rotation axis corresponding to the target drive motor by a target angle in a target direction every first time length, and acceleration data corresponding to each of the multiple rotations is collected by an acceleration sensor of the gimbal after a second time length after each rotation is completed, and linear hall data corresponding to each of the multiple rotations is collected by a linear hall sensor arranged on a stator of the target drive motor;

[0178] obtain a roll angle and a pitch angle of the gimbal after each of the multiple rotations based on the acceleration data corresponding to the multiple rotations, and obtain a mechanical angle of the target drive motor after each of the multiple rotations based on the linear hall data corresponding to the multiple rotations;

[0179] obtain a roll angle conversion coefficient and a pitch angle conversion coefficient based on the roll angle, the pitch angle, and the mechanical angle of the target drive motor of the gimbal after each of the multiple rotations, wherein the roll angle conversion coefficient is used to convert the mechanical angle of the target drive motor into the roll angle of the gimbal, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target drive motor into the pitch angle of the gimbal;

[0180] send the roll angle conversion coefficient and the pitch angle conversion coefficient to the gimbal;

[0181] The gimbal is configured to: receive the roll angle conversion coefficient and the pitch angle conversion coefficient; obtain linear hall data collected by the linear hall sensor in real time, and obtain a real-time mechanical angle of the target drive motor based on the linear hall data collected in real time; and obtain a real-time roll angle of the gimbal based on the real-time mechanical angle of the target drive motor and the roll angle conversion coefficient, and / or obtain a real-time pitch angle of the gimbal based on the real-time mechanical angle of the target drive motor and the pitch angle conversion coefficient.

[0182] In an embodiment of the present disclosure, obtaining the roll angle conversion coefficient and the pitch angle conversion coefficient based on the roll angle, the pitch angle, and the mechanical angle of the target drive motor of the gimbal after each of the multiple rotations comprises:

[0183] performing a multi-order polynomial fitting based on the roll angle and the mechanical angle of the target drive motor of the gimbal after each of the multiple rotations to obtain the roll angle conversion coefficient;

[0184] performing a multi-order polynomial fitting based on the pitch angle and the mechanical angle of the target drive motor of the gimbal after each of the multiple rotations to obtain the pitch angle conversion coefficient.

[0185] In an embodiment of the present disclosure, two linear Hall sensors are arranged on the stator of the target driving motor, and the sensing surfaces of the two linear Hall sensors are perpendicular to each other and pass through the rotation shaft of the target driving motor.

[0186] The linear Hall data corresponding to each rotation is collected by the linear Hall sensor arranged on the stator of the target driving motor after a second time length of each rotation is completed.

[0187] The linear Hall data corresponding to each rotation is collected by the two linear Hall sensors after a second time length of each rotation is completed.

[0188] In an embodiment of the present disclosure, the target driving motor in the holder drives the holder to rotate by a target angle in a target direction around a target rotation shaft corresponding to the target driving motor every first time length.

[0189] The target driving motor drives the holder to rotate by a target angle in a target direction around a target rotation shaft from an upper limit mechanical angle corresponding to the target rotation shaft every first time length until the holder is rotated to a lower limit mechanical angle corresponding to the target rotation shaft.

[0190] In a second aspect, an angle detection method is provided in the embodiments of the present disclosure, and the method is applied to a holder. The method comprises:

[0191] When the unmanned aerial vehicle carrying the holder is stationary, the target driving motor in the holder is controlled to drive the holder to rotate by a target angle in a target direction around a target rotation shaft corresponding to the target driving motor every first time length.

[0192] The acceleration data corresponding to each rotation in the plurality of rotations is collected by the acceleration sensor of the holder after a second time length of each rotation is completed, and the linear Hall data corresponding to each rotation in the plurality of rotations is collected by the linear Hall sensor arranged on the stator of the target driving motor, wherein the second time length is less than the first time length.

[0193] The acceleration data and the linear Hall data corresponding to each rotation in the plurality of rotations are transmitted to the upper computer.

[0194] The upper computer is configured to: based on the roll angle, the pitch angle and the mechanical angle of the target driving motor of the holder after each rotation in the plurality of rotations, obtain a roll angle conversion coefficient and a pitch angle conversion coefficient, wherein the roll angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the roll angle of the holder, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the pitch angle of the holder; and transmit the roll angle conversion coefficient and the pitch angle conversion coefficient to the holder.

[0195] The method further comprises:

[0196] receive a roll angle conversion coefficient and a pitch angle conversion coefficient;

[0197] acquire linear Hall data collected by the linear Hall sensor in real time, and acquire a real-time mechanical angle of the target driving motor based on the linear Hall data collected in real time;

[0198] acquire a real-time roll angle of the holder based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or acquire a real-time pitch angle of the holder based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient.

[0199] In an embodiment of the present disclosure, before acquiring linear Hall data collected by the linear Hall sensor in real time and acquiring a real-time mechanical angle of the target driving motor based on the linear Hall data collected in real time, the method further comprises:

[0200] control the target driving motor to drive the holder to rotate to a limit portion corresponding to the target rotation shaft, and acquire a preset roll angle and / or a preset pitch angle corresponding to the limit portion;

[0201] acquire a detected roll angle of the holder based on a preset mechanical angle corresponding to the limit portion and the roll angle conversion coefficient, and / or acquire a detected pitch angle of the holder based on the preset mechanical angle and the pitch angle conversion coefficient;

[0202] acquire linear Hall data collected by the linear Hall sensor in real time, and acquire a real-time mechanical angle of the target driving motor based on the linear Hall data collected in real time, comprising:

[0203] if the preset roll angle matches the detected roll angle and / or the preset pitch angle matches the detected pitch angle, acquire linear Hall data collected by the linear Hall sensor in real time, and acquire a real-time mechanical angle of the target driving motor based on the linear Hall data collected in real time.

[0204] Figure 6 A structural schematic diagram of a computer system suitable for implementing the method according to an embodiment of the present disclosure is shown.

[0205] As shown in Figure 6 , the computer system includes a processing unit which can execute various methods in the above embodiments according to programs stored in a read-only memory (ROM) or loaded from a storage portion into a random access memory (RAM). Various programs and data required for the operation of the computer system are also stored in the RAM. The processing unit, the ROM, and the RAM are connected to each other through a bus. An input / output (I / O) interface is also connected to the bus.

[0206] The following components are connected to the I / O interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN card, a modem, etc. The communication part performs a communication process via a network such as the Internet. A drive is also connected to the I / O interface as necessary. A removable medium such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive as necessary, so that a computer program read out therefrom is installed in the storage part as necessary. Among them, the processing unit can be implemented as a CPU, a GPU, a TPU, a FPGA, a NPU, etc.

[0207] In particular, the method described above can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for executing the methods described above. In such embodiments, the computer program can be downloaded and installed from a network via the communication part, and / or installed from a removable medium.

[0208] The flow and block diagrams in the drawings show the possible architectural, functional, and operational architectures of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flow and block diagrams can represent a module, a segment, or a portion of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession can in fact be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by dedicated hardware-based systems which perform the specified functions or operations, or combinations of hardware and software.

[0209] The units or modules involved in the embodiments of the present disclosure can be implemented by software or by programmable hardware. The described units or modules can also be arranged in a processor, and the names of these units or modules do not constitute a limitation on the units or modules themselves in some cases.

[0210] As another aspect, the disclosure also provides a computer readable storage medium, which can be the computer readable storage medium contained in the electronic device or the computer system in the above embodiments; or can be a computer readable storage medium existing separately and not assembled into a device. The computer readable storage medium stores one or more programs used by one or more processors to execute the method described in the disclosure.

[0211] The above description is merely the preferred embodiments of the disclosure and the explanation of the applied technical principles. It should be understood by those skilled in the art that the inventive scope of the disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by the combinations of the above technical features or equivalent features without departing from the inventive concept. For example, the technical solutions formed by the mutual replacement of the above features and the technical features disclosed in the disclosure (but not limited to) having similar functions.

Claims

1. An angle detection method characterized by, The method is applied to a host computer, and the method comprises: Receiving acceleration data corresponding to each rotation in multiple rotations and linear Hall data sent by a holder, wherein when the unmanned aerial vehicle carrying the holder is stationary, a target drive motor in the holder drives the holder to rotate around a target rotation shaft corresponding to the target drive motor by a target angle in a target direction every first time length, and after a second time length after each rotation is completed, acceleration data corresponding to the rotation is collected by an acceleration sensor of the holder, and linear Hall data corresponding to the rotation is collected by a linear Hall sensor arranged on a stator of the target drive motor, wherein the second time length is less than the first time length; Based on the acceleration data corresponding to the multiple rotations, the roll angle and the pitch angle of the holder after each rotation in the multiple rotations are obtained, and based on the linear Hall data corresponding to the multiple rotations, the mechanical angle of the target drive motor after each rotation in the multiple rotations is obtained; Based on the roll angle, the pitch angle of the holder and the mechanical angle of the target drive motor after each rotation in the multiple rotations, a roll angle conversion coefficient and a pitch angle conversion coefficient are obtained, wherein the roll angle conversion coefficient is used to convert the mechanical angle of the target drive motor into the roll angle of the holder, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target drive motor into the pitch angle of the holder; The roll angle conversion coefficient and the pitch angle conversion coefficient are sent to the holder; Wherein, the holder is configured to: receive the roll angle conversion coefficient and the pitch angle conversion coefficient; obtain the linear Hall data collected by the linear Hall sensor in real time, and obtain the real-time mechanical angle of the target drive motor based on the real-time collected linear Hall data; based on the real-time mechanical angle of the target drive motor and the roll angle conversion coefficient, the real-time roll angle of the holder is obtained, and / or based on the real-time mechanical angle of the target drive motor and the pitch angle conversion coefficient, the real-time pitch angle of the holder is obtained.

2. The angle detection method according to claim 1, characterized by, The method comprises: Based on the roll angle and the mechanical angle of the target drive motor after each rotation in the multiple rotations, a multi-order polynomial fitting is performed to obtain the roll angle conversion coefficient; Based on the pitch angle and the mechanical angle of the target drive motor after each rotation in the multiple rotations, a multi-order polynomial fitting is performed to obtain the pitch angle conversion coefficient.

3. The angle detection method according to claim 1, characterized by, The stator of the target drive motor is provided with two linear Hall sensors, and the sensing surfaces of the two linear Hall sensors are perpendicular to each other and pass through the rotation shaft of the target drive motor; The method comprises: Collect linear hall data corresponding to each rotation through the two linear hall sensors after a second time length of each rotation is completed.

4. The angle detection method according to claim 1, characterized by, The target driving motor in the holder drives the holder to rotate every first time length around a target rotation axis corresponding to the target driving motor to a target direction by a target angle, comprising: The target driving motor drives the holder to rotate every first time length around the target rotation axis to the target direction by a target angle from an upper limit mechanical angle corresponding to the target rotation axis, until the holder rotates to a lower limit mechanical angle corresponding to the target rotation axis.

5. An angle detection method characterized by, The method is applied to a holder, and the method comprises: When a UAV carrying the holder is stationary, a target driving motor in the holder is controlled to drive the holder to rotate every first time length around a target rotation axis corresponding to the target driving motor to a target direction by a target angle; After a second time length of each rotation is completed, acceleration data corresponding to the rotation is collected through an acceleration sensor of the holder, and linear hall data corresponding to the rotation is collected through a linear hall sensor arranged on a stator of the target driving motor, wherein the second time length is less than the first time length; Acceleration data and linear hall data corresponding to each rotation in multiple rotations are sent to an upper computer; The upper computer is configured to: based on a roll angle, a pitch angle and a mechanical angle of the target driving motor of the holder after each rotation in the multiple rotations, obtain a roll angle conversion coefficient and a pitch angle conversion coefficient, wherein the roll angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the roll angle of the holder, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the pitch angle of the holder; and send the roll angle conversion coefficient and the pitch angle conversion coefficient to the holder; The method further comprises: Receiving the roll angle conversion coefficient and the pitch angle conversion coefficient; Obtaining linear hall data collected by the linear hall sensor in real time, and obtaining a real-time mechanical angle of the target driving motor based on the linear hall data collected in real time; Based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, obtaining a real-time roll angle of the holder, and / or based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient, obtaining a real-time pitch angle of the holder.

6. The angle detection method according to claim 5, characterized by, Before the obtaining of the linear hall data collected by the linear hall sensor in real time and the obtaining of the real-time mechanical angle of the target driving motor based on the linear hall data collected in real time, the method further comprises: Controlling the target driving motor to drive the holder to rotate to a limit part corresponding to the target rotation axis, and obtaining a preset roll angle and / or a preset pitch angle corresponding to the limit part; Based on a preset mechanical angle corresponding to the limit part and the roll angle conversion coefficient, obtaining a detected roll angle of the holder, and / or based on the preset mechanical angle and the pitch angle conversion coefficient, obtaining a detected pitch angle of the holder; The linear Hall data collected by the linear Hall sensor in real time is acquired, and the real-time mechanical angle of the target driving motor is acquired based on the linear Hall data collected in real time, including: If the preset roll angle matches the detected roll angle, and / or the preset pitch angle matches the detected pitch angle, the linear Hall data collected by the linear Hall sensor in real time is acquired, and the real-time mechanical angle of the target driving motor is acquired based on the linear Hall data collected in real time.

7. An angle detecting device characterized by comprising: The device is located on a host computer, and the device includes: The data receiving module is configured to receive acceleration data and linear Hall data corresponding to each rotation in multiple rotations sent by the gimbal, wherein when the unmanned aerial vehicle carrying the gimbal is stationary, the target driving motor in the gimbal drives the gimbal to rotate around a target rotation shaft corresponding to the target driving motor by a target angle in a target direction every first time length, and the acceleration data corresponding to each rotation is collected by an acceleration sensor of the gimbal after a second time length of each rotation is completed, and the linear Hall data corresponding to each rotation is collected by a linear Hall sensor arranged on a stator of the target driving motor, wherein the second time length is less than the first time length; The angle acquisition module is configured to acquire the roll angle and the pitch angle of the gimbal after each rotation in the multiple rotations based on the acceleration data corresponding to the multiple rotations, and to acquire the mechanical angle of the target driving motor after each rotation in the multiple rotations based on the linear Hall data corresponding to the multiple rotations; The coefficient acquisition module is configured to acquire a roll angle conversion coefficient and a pitch angle conversion coefficient based on the roll angle, the pitch angle and the mechanical angle of the target driving motor after each rotation in the multiple rotations, wherein the roll angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the roll angle of the gimbal, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the pitch angle of the gimbal; The coefficient sending module is configured to send the roll angle conversion coefficient and the pitch angle conversion coefficient to the gimbal, wherein the gimbal is configured to receive the roll angle conversion coefficient and the pitch angle conversion coefficient, acquire the linear Hall data collected by the linear Hall sensor in real time, and acquire the real-time mechanical angle of the target driving motor based on the linear Hall data collected in real time; the real-time roll angle of the gimbal is acquired based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or the real-time pitch angle of the gimbal is acquired based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient.

8. An angle detection device, characterized by The device is located on a gimbal, and the device includes: The motor control module is configured to control the target driving motor in the gimbal to drive the gimbal to rotate around a target rotation shaft corresponding to the target driving motor by a target angle in a target direction every first time length when the unmanned aerial vehicle carrying the gimbal is stationary; The first data collection module is configured to collect acceleration data corresponding to each rotation by an acceleration sensor of the holder after a second time length of each completed rotation, and collect linear Hall data corresponding to each rotation by a linear Hall sensor arranged on a stator of the target driving motor, wherein the second time length is less than the first time length. The data sending module is configured to send the acceleration data and the linear Hall data corresponding to each rotation in the multiple rotations to an upper computer, wherein the upper computer is configured to: obtain a roll angle conversion coefficient and a pitch angle conversion coefficient based on a roll angle, a pitch angle and a mechanical angle of the target driving motor of the holder after each rotation in the multiple rotations, wherein the roll angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the roll angle of the holder, and the pitch angle conversion coefficient is used to convert the mechanical angle of the target driving motor into the pitch angle of the holder; and send the roll angle conversion coefficient and the pitch angle conversion coefficient to the holder. The coefficient receiving module is configured to receive the roll angle conversion coefficient and the pitch angle conversion coefficient. The second data collection module is configured to obtain linear Hall data collected by the linear Hall sensor in real time, and obtain a real-time mechanical angle of the target driving motor based on the linear Hall data collected in real time. The angle detection module is configured to obtain a real-time roll angle of the holder based on the real-time mechanical angle of the target driving motor and the roll angle conversion coefficient, and / or obtain a real-time pitch angle of the holder based on the real-time mechanical angle of the target driving motor and the pitch angle conversion coefficient.

9. An electronic device, comprising: The computer program product comprises a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method of any one of claims 1-6.

10. A computer readable storage medium having stored thereon computer instructions, wherein, The computer program product comprises a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method of any one of claims 1-6. The computer program product comprises a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Attitude angle acquisition method and apparatus, and movable device

    CN108253928A

  • Mini Pan / Tilt / Zoom position angle self-checking method and device

    CN113848998A