PTZ control method, device, PTZ control equipment and storage medium

By obtaining and calculating the code disk count value of the gimbal, and using higher-precision attitude information for attitude control, the problem of high noise in the attitude change information of the gimbal is solved, and the attitude control effect of the gimbal is improved.

CN114115364BActive Publication Date: 2024-11-22CHONGQING EFLY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111465275.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2024-11-22
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

The gimbal is noisy during the process of posture change information processing, resulting in poor control effect.

Method used

By obtaining the target position change angle of the gimbal adjustment from the initial position state to the current position state, and obtaining the initial code disk count value, the current code disk count value is calculated to be based on the current code disk count value and the initial position state The attitude control of the gimbal is used to reduce noise by using code disk count values ​​with higher accuracy than that of IMU and other devices.

Benefits of technology

It improves the attitude control accuracy and effect of the gimbal, reduces the impact of noise, and improves control accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114115364B_ABST
    Figure CN114115364B_ABST
Patent Text Reader

Abstract

The present application proposes a gimbal control method, device, gimbal control equipment and storage medium, which relate to the field of gimbal control technology. By obtaining the target posture change angle of the gimbal from an initial posture state to a current posture state, and obtaining the initial code disk count value of an incremental encoder of the gimbal in the initial posture state, the current code disk count value of the gimbal in the current posture state is calculated according to the target posture angle and the initial code disk count value, so as to perform posture control on the gimbal based on the current code disk count value and the initial posture state; in this way, a code disk count value with higher inertial posture angle accuracy than that measured by an IMU and other equipment can be used as an input for the gimbal posture control, so as to reduce the noise input to the gimbal during posture control and improve the posture control effect of the gimbal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of pan-tilt control, and in particular to a pan-tilt control method, device, pan-tilt control equipment and storage medium. Background Art

[0002] The gimbal can be equipped with image acquisition devices such as cameras to operate, so that the image acquisition devices can conveniently perform tasks such as aerial photography and monitoring.

[0003] In some implementation schemes, the posture change information of the gimbal can be collected and processed by a motor, thereby achieving control over the posture of the gimbal.

[0004] However, in the process of processing the posture change information of the gimbal, the control effect of the gimbal is poor due to the large noise of the collected posture change information. Summary of the invention

[0005] The purpose of the present application is to provide a gimbal control method, device, gimbal control equipment and storage medium, which can improve the posture control effect of the gimbal.

[0006] In order to achieve the above purpose, the technical solution adopted in this application is as follows:

[0007] In a first aspect, the present application provides a pan-tilt control method, wherein the pan-tilt is provided with an incremental encoder; the method comprises:

[0008] Obtaining a target posture change angle of the gimbal from an initial posture state to a current posture state;

[0009] Acquire an initial code disk count value of the gimbal; wherein the initial code disk count value is a code disk count value of the incremental encoder when the gimbal is in the initial posture state;

[0010] According to the target posture change angle and the initial code disk count value, a current code disk count value when the gimbal is in the current posture state is calculated, so as to perform posture control on the gimbal based on the current code disk count value and the initial posture state.

[0011] In a second aspect, the present application provides a pan-tilt control device, wherein the pan-tilt is provided with an incremental encoder; the device comprises:

[0012] An acquisition module is used to acquire a target posture change angle of the gimbal adjusted from an initial posture state to a current posture state;

[0013] The acquisition module is also used to acquire an initial code disk count value of the gimbal; wherein the initial code disk count value is a code disk count value of the incremental encoder when the gimbal is in the initial posture state;

[0014] A processing module is used to calculate the current code disk count value of the gimbal in the current posture state according to the target posture change angle and the initial code disk count value, so as to perform posture control on the gimbal based on the current code disk count value and the initial posture state.

[0015] In a third aspect, the present application provides a gimbal control device, which includes a memory for storing one or more programs; a processor; when the one or more programs are executed by the processor, the above-mentioned gimbal control method is implemented.

[0016] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned gimbal control method when executed by a processor.

[0017] The present application provides a gimbal control method, apparatus, gimbal control device and storage medium, which obtains the target posture change angle of the gimbal from an initial posture state to a current posture state, and obtains the initial code disk count value of the incremental encoder of the gimbal in the initial posture state, thereby calculating the current code disk count value of the gimbal in the current posture state according to the target posture angle and the initial code disk count value, so as to perform posture control on the gimbal based on the current code disk count value and the initial posture state; in this way, a code disk count value with higher inertial posture angle accuracy than that measured by devices such as IMU can be used as the input of the gimbal posture control, so as to reduce the noise input to the gimbal during posture control and improve the posture control effect of the gimbal.

[0018] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A schematic structural block diagram of the pan / tilt platform provided in the present application is shown.

[0021] Figure 2An exemplary flow chart of the pan / tilt control method provided in the present application is shown.

[0022] Figure 3 A schematic diagram showing the relationship between the camera coordinate system and the gimbal.

[0023] Figure 4 A schematic diagram showing the relationship between the camera coordinate system, the base coordinate system and the gimbal.

[0024] Figure 5 An exemplary structural diagram of the pan / tilt control device provided in the present application is shown.

[0025] In the figure: 100 - PTZ control device; 101 - memory; 102 - processor; 103 - communication interface; 300 - PTZ control device; 301 - acquisition module; 302 - processing module. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below in conjunction with the drawings in some embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Generally, the components of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0027] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents some selected embodiments of the present application. All other embodiments obtained by ordinary technicians in the field without creative work based on some embodiments in the present application are within the scope of protection of the present application.

[0028] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0029] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0030] In scenarios such as the above-mentioned one where the posture of the gimbal is controlled, some implementations generally use inertial measurement devices such as IMU (Inertial Measurement Unit) to collect the posture change information of the gimbal, such as collecting the angle change information of the gimbal in the pitch direction or the roll direction, etc., so as to control the motor to adjust the posture of the gimbal according to the posture change information.

[0031] However, the posture change information collected by devices such as IMU generally contains noise and cannot directly measure the angle change value, resulting in poor control effect when the motor adjusts the posture of the gimbal according to the posture change information collected by the IMU.

[0032] Therefore, based on the defects of the above-mentioned implementation methods, a possible implementation method provided by the present application is: by obtaining the target posture change angle of the gimbal from the initial posture state to the current posture state, and obtaining the initial code disk count value of the incremental encoder of the gimbal in the initial posture state, thereby calculating the current code disk count value of the gimbal in the current posture state according to the target posture angle and the initial code disk count value, so as to perform posture control on the gimbal based on the current code disk count value and the initial posture state; thereby reducing the noise input to the gimbal during posture control and improving the posture control effect of the gimbal.

[0033] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0034] See also Figure 1 , Figure 1A schematic structural block diagram of a gimbal control device 100 provided in the present application is shown. In some embodiments, the gimbal control device 100 may include a memory 101, a processor 102 and a communication interface 103. The memory 101, the processor 102 and the communication interface 103 are electrically connected to each other directly or indirectly to realize data transmission or interaction.

[0035] The memory 101 can be used to store software programs and modules, such as program instructions / modules corresponding to the pan-tilt control device provided in this application, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101, thereby executing the steps of the pan-tilt control method provided in this application. The communication interface 103 can be used to communicate signaling or data with other node devices.

[0036] Among them, the memory 101 can be, but is not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable programmable read-only memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.

[0037] The processor 102 may be an integrated circuit chip with signal processing capability. The processor 102 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0038] Understandably, Figure 1 The structure shown is for illustration only. The pan / tilt control device 100 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown. Figure 1Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0039] Exemplarily, in some embodiments, the gimbal may be provided with an incremental encoder, which may be used to collect code disk count values ​​during the posture change of the gimbal, and send the collected code disk count values ​​to the gimbal control device 100, so that the gimbal control device 100 may control devices such as motors to adjust the posture of the gimbal according to the received code disk count values.

[0040] It can be understood that in some possible implementations, the above-mentioned gimbal control device 100 can be a control device configured as a gimbal, or a control device configured for a drone, which is not limited in the present application, or it can be other control devices external to the gimbal, which is not limited in the present application.

[0041] The following uses the above-mentioned pan-tilt control device 100 as an exemplary execution subject to exemplify the pan-tilt control method provided in the present application.

[0042] See also Figure 2 , Figure 2 An exemplary flow chart of the pan-tilt control method provided by the present application is shown, and the pan-tilt control method may include the following steps:

[0043] Step 201, obtaining a target posture change angle of the gimbal from an initial posture state to a current posture state.

[0044] Step 203, obtaining the initial code disk count value of the pan / tilt head.

[0045] Step 205, according to the target posture change angle and the initial encoder count value, calculate the current encoder count value when the gimbal is in the current posture state, so as to control the posture of the gimbal based on the current encoder count value and the initial posture state.

[0046] In some embodiments, the gimbal may be provided with an incremental encoder, for example, the gimbal may be provided with an incremental photoelectric encoder, wherein the incremental photoelectric encoder is a device that uses the principle of grating diffraction to convert the rotation angle into pulse information, thereby obtaining the measured value of the rotation angle. Compared with IMU, Hall sensor and other originals, it generally has higher angle measurement accuracy. Therefore, the incremental encoder can be used in scenarios such as motor servo system control.

[0047] In the process of executing the gimbal control method provided in the present application, when the posture of the gimbal changes, the gimbal control device can use the parameters measured by the configured devices such as IMU to obtain the target posture change angle of the gimbal from the initial posture state to the current posture state.

[0048] It should be noted that, in some possible scenarios of the present application, the above-mentioned initial posture state can be used to characterize the initial state of the gimbal when performing posture control, that is, the initial posture state can be used as the posture zero position of the gimbal.

[0049] At present, it can be understood that the initial posture state can be a posture state when the gimbal is parallel to the horizontal position, or it can be a posture state when the gimbal is in other states (such as facing a set angle), and this application does not limit this.

[0050] In addition, the gimbal control device can obtain an initial code disk count value, which can be the code disk count value of the incremental encoder when the gimbal is in an initial posture state; for example, assuming that the above-mentioned initial posture state is the posture state when the gimbal is in a horizontal state, then the initial code disk count value can be the code disk count value of the incremental encoder when the gimbal is in a horizontal state.

[0051] Then, with respect to the target posture change angle obtained by the gimbal control device, the gimbal control device can combine the target posture change angle and the initial code disk count value to calculate the current code disk count value when the gimbal is in the current posture state, thereby enabling the motor and other mechanisms to control the posture of the gimbal based on the current code disk count value and the initial posture state.

[0052] It should be noted that before executing step 201, the pan-tilt control device can also obtain a trigger information, which can be used to indicate the update of the current code disk count value of the incremental encoder, that is, after obtaining the trigger information, the pan-tilt control device can respond to the trigger information to execute the pan-tilt control method provided in this application.

[0053] For example, in some possible implementations, the trigger information may be a power-on signal of the gimbal control system; or, the trigger information may be an indication that the code disk index signal cannot be obtained; or, the trigger information may be a received instruction for indicating an update of the code disk count value of the current posture state; this application does not limit this.

[0054] In addition, in some possible scenarios, an incremental encoder can generally only measure the code disk count value corresponding to the angle change of the gimbal in one dimension. When the angle changes of the gimbal in at least two dimensions need to be measured, an incremental encoder can be set for each measurement dimension of the gimbal to measure the code disk count value corresponding to the angle change of the gimbal in each dimension, and then use the code disk count value corresponding to each dimension to control the posture of the gimbal in the corresponding dimension.

[0055] Therefore, based on the above-mentioned scheme provided in the present application, by obtaining the target posture change angle of the gimbal from the initial posture state to the current posture state, and obtaining the initial code disk count value of the incremental encoder of the gimbal in the initial posture state, the current code disk count value of the gimbal in the current posture state is calculated according to the target posture angle and the initial code disk count value, so as to perform posture control of the gimbal based on the current code disk count value and the initial posture state; in this way, the code disk count value with higher inertial posture angle accuracy than that measured by equipment such as IMU can be used as the input of the gimbal posture control, so as to reduce the noise input to the gimbal during posture control and improve the posture control effect of the gimbal.

[0056] Among them, for the initial code disk count value of the gimbal, in some possible scenarios, the code disk count value of the incremental encoder when the gimbal is in the initial posture state can be saved locally on the gimbal by pre-measurement, such as in the flash of the gimbal; thus, in some possible implementations, the gimbal control device can read the flash to see whether there is a code disk count value of the incremental encoder when the gimbal is in the initial posture state saved locally on the gimbal during the execution of step 203; when the code disk count value of the incremental encoder when the gimbal is in the initial posture state saved locally on the gimbal is read, the gimbal control device can use the read code disk count value as the initial code disk count value.

[0057] On the other hand, when the code disk count value of the incremental encoder in the initial posture state of the gimbal is not read locally, the gimbal control device can adjust the posture state of the gimbal, such as rotating at least one of the pitch axis and roll axis of the gimbal, until the code disk count value of the incremental encoder indicates an index signal of the incremental encoder, which can be used to indicate the zero position of the incremental encoder.

[0058] After the incremental encoder determines the index signal, the gimbal control device can continue to adjust the posture state of the gimbal to the initial posture state, such as adjusting the posture state of the gimbal so that the gimbal is in a horizontal position; it can be understood that when the posture state of the gimbal changes, the code disk count value indicated by the incremental encoder will also change accordingly; when the posture state of the gimbal is adjusted to the initial posture state, the code disk count value of the incremental encoder at this time can be used as the initial code disk count value, that is: the code disk count value of the incremental encoder when the gimbal is in the initial posture state is determined as the initial code disk count value.

[0059] In addition, in some possible scenarios, if the gimbal is in an initial posture state, the code disk count value of the incremental encoder indicates the index information of the incremental encoder, and the initial code disk count value is 0.

[0060] Among them, when the gimbal control device is adjusting the posture state of the gimbal so that the code disk count value of the incremental encoder indicates the index signal of the incremental encoder, it may be affected by the mechanical limit system and rotate back and forth near the mechanical limit, which will not only cause impact and damage to the mechanical limit, but also may cause loss to the motor, thereby reducing the service life of the entire gimbal system.

[0061] Therefore, after determining the initial code disk count value of the incremental code disk, the gimbal control device can use, for example, the above-mentioned method to save the initial code disk count value locally on the gimbal, so that the next time the incremental encoder is powered on, the initial posture state of the gimbal can be used as the starting state of the gimbal attitude control, and the initial code disk count value saved in the flash can be used as the zero point of the incremental encoder, without repeatedly searching for the index signal of the incremental encoder, thereby reducing the impact of mechanical limits on the gimbal system.

[0062] In addition, when executing step 201 to obtain the target posture change angle of the gimbal, an IMU can be configured on the camera lens of the gimbal so that the gimbal control device can use the parameters measured by the IMU to calculate the target posture change angle of the gimbal from the initial position state to the current posture state.

[0063] Among them, combined Figure 3 As shown, during the calculation process, the gimbal control device can pre-construct a camera coordinate system with the coordinate points of the camera lens in space, wherein the positive direction of the X-axis of the camera coordinate system can be the direction of the camera lens, and when the pitch axis and roll axis of the gimbal are both in a horizontal position, the direction of the gravity acceleration is the positive direction of the Z-axis of the camera coordinate system; in addition, when installing the IMU, the three axes of the IMU can be set to be parallel to the three axes of the camera coordinate system.

[0064] Based on this, during the execution of step 201, the gimbal control device can calculate the target posture change angle corresponding to the adjustment of the gimbal from the initial posture state to the current posture state based on the acceleration value of the gimbal in the current posture state measured by the IMU.

[0065] For example, it is assumed that the transformation matrices corresponding to the rotation of the camera coordinate system around the roll x-axis, pitch y-axis, and heading z-axis of the gimbal are:

[0066]

[0067] Where φ, θ, and ψ represent the roll angle, pitch angle, and heading angle, respectively.

[0068] Based on this, after multiplying the transformation matrices in the three directions, the transformation matrix from the camera coordinate system to the gimbal coordinate system can be expressed as:

[0069]

[0070] When the gimbal is in the initial posture state, the acceleration vectors of the three axes of the camera coordinate system can be expressed as follows:

[0071] [a x a y a z ] T =[0 0 -g] T

[0072] In the formula, a x 、a y 、a z They represent the acceleration in the x-, y-, and z-directions respectively, and g represents the acceleration due to gravity.

[0073] Based on this, when the gimbal's posture state changes, the changed acceleration vector can have the following conversion relationship:

[0074]

[0075] In the formula, a x ′、a y ′、a z ′ represents the acceleration in the x-axis, y-axis and z-axis directions after conversion.

[0076] Ω zyx Substitute the expression into the above conversion relationship and expand it to obtain the following equation relationship:

[0077]

[0078] Therefore, based on this equation, using the trigonometric function calculation formula, the calculation formulas for the pitch angle and roll angle of the gimbal can be expressed as follows:

[0079]

[0080]

[0081] Therefore, in the process of executing step 201, the PTZ control device can use the a measured by the IMU x ′、a y ′、a z ′The three parameters are substituted into the above formula to calculate the target posture change angles of the gimbal, such as the pitch angle and the roll angle.

[0082] It should be noted that since inertial measurement devices such as IMU generally have zero-point drift, the parameters directly measured by IMU generally have errors.

[0083] Therefore, in some possible implementations, the gimbal control device may further obtain a zero drift adjustment parameter corresponding to the IMU before executing step 201 .

[0084] Based on this, when executing step 201, the gimbal control device can calculate the target posture change angle corresponding to the adjustment of the gimbal from the initial posture state to the current position state based on the acceleration value of the gimbal in the current posture state measured by the IMU and the zero drift adjustment parameter.

[0085] For example, considering the zero drift of the IMU, the changed acceleration vector can have the following conversion relationship:

[0086]

[0087] In the formula, a x ′、a y ′、a z ′ represents the acceleration in the x-axis, y-axis and z-axis directions after conversion, They represent the zero drift adjustment parameters in the x-axis, y-axis, and z-axis directions respectively.

[0088] Ω zyx Substitute the expression into the above conversion relationship and expand it, and the obtained equation relationship can be expressed as follows:

[0089]

[0090] Therefore, based on this equation, using the trigonometric function calculation formula, the calculation formulas for the pitch angle and roll angle of the gimbal can be expressed as follows:

[0091]

[0092]

[0093] Therefore, in the process of executing step 201, the PTZ control device can use the a measured by the IMU x ′、a y ′、a z ′The three parameters and the obtained zero drift adjustment parameters are substituted into the above formula to calculate the target posture change angles of the gimbal, such as the pitch angle and the roll angle. In this way, in the process of calculating the target posture change angle, the accuracy of the target posture change angle can be improved by combining the zero drift adjustment parameters of the IMU.

[0094] Among them, it should be noted that, in some embodiments, the gimbal control device can adopt a method similar to the above-mentioned method of obtaining the initial code disk count value to read whether the zero drift adjustment parameters of the IMU are saved locally on the gimbal; when the saved zero drift adjustment parameters are read locally on the gimbal, step 201 is executed using the read zero drift adjustment parameters; when the saved zero drift adjustment parameters are not read locally on the gimbal, the zero drift adjustment parameters of the IMU can be calculated by collecting parameters of each axis of the IMU within a preset time period.

[0095] For example, assuming that in the process of calculating the zero drift adjustment parameters of the IMU, k acceleration measurement values ​​are collected for the three axes of the IMU within a preset time period, then the calculation method of the zero drift adjustment parameters of the IMU can be expressed as follows:

[0096]

[0097]

[0098] In the formula, when i = x, then Indicates the zero drift adjustment parameter of IMU in the x-axis direction; when i=y, then Indicates the zero drift adjustment parameter of IMU in the y-axis direction; Indicates the zero drift adjustment parameter of the IMU in the z-axis direction.

[0099] Based on this, the gimbal control device can use the calculated zero drift adjustment parameters of the IMU to execute step 201; in addition, the gimbal control device can also save the calculated zero drift adjustment parameters of the IMU locally in the gimbal, such as in the flash of the gimbal, so that before the next execution of step 201, the gimbal control device can read the zero drift adjustment parameters locally in the gimbal, and then execute step 201 using the read zero drift adjustment parameters to improve calculation efficiency.

[0100] In addition, based on the target posture change angle calculated above, the gimbal control device can calculate the current code disk count value when the gimbal is in the current posture state based on the total code disk count value of the incremental encoder rotating one circle using the following formula during the execution of step 205:

[0101]

[0102] Where N represents the total code disc count value of the incremental encoder rotating one circle, θ represents the pitch angle, and n′ i Indicates the current encoder count value in the pitch direction when the gimbal is at a pitch angle of θ, n i0 Indicates the initial code disc count value of the incremental encoder when the gimbal is in the initial posture state, n′ i Indicates the current encoder count value.

[0103] Among them, it can be understood that the above is an explanation of the calculation method of the current code disc count value in the pitch direction, taking the pitch angle as the target posture change angle as an example; for the current code disc count value in the roll direction, the pitch angle θ in the above formula can be replaced by the roll angle φ for calculation.

[0104] In addition, it should be noted that in some possible scenarios, the gimbal control device can calculate the above-mentioned target posture change angle by the method provided in this application, or it can obtain the target posture change angle by receiving the data sent by other devices. This application does not limit this.

[0105] Moreover, in the above-mentioned implementation method of combining the IMU to perform step 201, only one IMU can be used for calculation; however, in this implementation method, it is generally necessary to set the base of the gimbal to be parallel to the horizontal plane, that is, the initial posture state of the gimbal is required to be horizontal.

[0106] However, in some possible scenarios, the initial posture state of the gimbal is generally not absolutely horizontal, resulting in some errors in the calculated current code disk count value.

[0107] Therefore, in some other implementations, a dual IMU solution may be used to execute step 201; for example, in some implementations, the gimbal may be provided with a first IMU and a second IMU, wherein the first IMU may be provided at the camera lens of the gimbal, and the second IMU may be provided at the base of the gimbal.

[0108] Combination Figure 4 As shown, a camera coordinate system can be constructed in advance based on the coordinate points of the camera lens in space. The positive direction of the X-axis of the camera coordinate system can be the direction of the camera lens. When the pitch axis and roll axis of the gimbal are both in a horizontal position, the direction of the gravity acceleration is the positive direction of the Z-axis of the camera coordinate system. The three axes of the first IMU are respectively parallel to the X-axis, Y-axis, and Z-axis of the camera coordinate system. In addition, a base coordinate system can also be constructed based on the coordinate points of the base in space. The base coordinate system can be parallel to the camera coordinate system, and the positive directions of the X-axis, Y-axis, and Z-axis are also the same. In addition, the three axes of the second IMU can also be respectively parallel to the X-axis, Y-axis, and Z-axis of the base coordinate system.

[0109] Based on this, during the execution of step 201, the gimbal control device can calculate the target posture change angle corresponding to the gimbal according to the acceleration values ​​measured by the first IMU and the second IMU.

[0110] For example, it is assumed that the rotation angles of the camera coordinate system and the base coordinate system around the roll x-axis, pitch y-axis and yaw z-axis of the gimbal are expressed as φ i ,θ i, i , then the transformation matrices corresponding to each axis can be expressed as:

[0111]

[0112] In the formula, φ i ,θ i , i They respectively represent the roll angle around the x-axis, the pitch angle around the y-axis, and the heading angle around the z-axis; i=1, 2, and when i=1, it represents the parameters of the camera coordinate system, and when i=2, it represents the parameters of the base coordinate system.

[0113] Therefore, the transformation matrix from the camera coordinate system and the base coordinate system to the gimbal coordinate system is expressed as:

[0114]

[0115] In some possible scenarios, such as when the gimbal is in a horizontal state, the three-axis acceleration of the camera lens and the base can be expressed as follows:

[0116] a i =[a x a y a z ] T =[0 0 -g] T

[0117] Wherein, i=1, 2, and when i=1, it represents the parameters of the camera coordinate system, and when i=2, it represents the parameters of the base coordinate system.

[0118] Based on this, when the gimbal's posture state changes, the changed acceleration vector can have the following conversion relationship:

[0119]

[0120] In the formula, a′ xi , a′ yi , a′ zi They represent the acceleration in the x-axis, y-axis and z-axis directions after conversion respectively. When i=1, it represents the parameters of the camera coordinate system. When i=2, it represents the parameters of the base coordinate system.

[0121] Will Substitute the expression into the above conversion relationship and expand it to obtain the following equation relationship:

[0122]

[0123] Therefore, based on this equation, using the trigonometric function calculation formula, the pitch angle and roll angle of the camera lens and the base of the gimbal can be expressed as follows:

[0124]

[0125]

[0126] In the formula, φ i represents the pitch angle to the ground, θ i Indicates the ground roll angle; i = 1, 2, and when i = 1, it indicates the parameters of the camera coordinate system, and when i = 2, it indicates the parameters of the base coordinate system.

[0127] Therefore, when executing step 201, the gimbal control device can first use, for example, the above-mentioned calculation formula to calculate the first ground angle corresponding to the first IMU and the second ground angle corresponding to the second IMU according to the first acceleration value measured by the first IMU and the second acceleration value measured by the second IMU; wherein the first acceleration value is the acceleration value measured by the first IMU in the current posture state when the gimbal adjusts from the initial posture state to the current posture state, and the second acceleration value is the acceleration value measured by the second IMU when the gimbal is in the current posture state.

[0128] It can be understood that, in the above scheme, the first ground angle corresponding to the first IMU is the first ground angle corresponding to the camera lens, and the second ground angle corresponding to the second IMU is the second ground angle corresponding to the base.

[0129] In addition, in some embodiments of the present application, in the scenario where two IMUs are used to execute step 201, the gimbal control device may also adopt, for example, the above-mentioned single IMU solution, by obtaining the zero drift adjustment parameters corresponding to the first IMU and the second IMU respectively, and combining the zero drift adjustment parameters corresponding to each IMU respectively, to calculate the first ground angle corresponding to the first IMU and the second ground angle corresponding to the second IMU.

[0130] For example, assuming that the zero drift adjustment parameters of the IMU in the x-axis direction, y-axis direction, and z-axis direction are expressed as i = 1, 2, and when i = 1, it represents the parameters of the camera coordinate system, and when i = 2, it represents the parameters of the base coordinate system; then the conversion relationship of the changed acceleration vector can be expressed as follows:

[0131]

[0132] Expanding this conversion relationship, Substitute the expression into the above conversion relationship and expand it, then the obtained equation relationship can be expressed as follows:

[0133]

[0134] Therefore, based on this equation, using the trigonometric function calculation formula, the pitch angle and roll angle of the camera lens and the base of the gimbal can be expressed as follows:

[0135]

[0136]

[0137] Therefore, in the process of calculating the first ground angle corresponding to the first IMU and the second ground angle corresponding to the second IMU, the calculation accuracy of the first ground angle and the second ground angle can be improved by combining the zero drift adjustment parameters corresponding to the first IMU and the second IMU respectively.

[0138] Next, the gimbal control device may calculate a target posture change angle corresponding to the gimbal based on the calculated first angle relative to the ground and the second angle relative to the ground.

[0139] Among them, combined with the above, it can be known that the target posture change angle corresponding to the gimbal may include a first posture change angle in the pitch direction and a second posture change angle in the roll direction.

[0140] In some embodiments, taking the calculation of the first posture change angle of the gimbal in the pitch direction as an example, the above-mentioned first ground angle may include a first pitch angle in the pitch direction measured by the first IMU, and the above-mentioned second ground angle may include a second pitch angle in the pitch direction measured by the second IMU.

[0141] Among them, in some possible scenarios, there may be no relative rotation angle between the camera lens and the base on the heading axis. In this scenario, the coordinate transformation matrix from the base coordinate system to the camera coordinate system can be expressed as:

[0142]

[0143] In the formula, φ c represents the pitch angle of the camera lens relative to the base, θ c Indicates the roll angle of the camera lens relative to the base.

[0144] Since the camera lens and the base are facing the same direction to the ground, the coordinate transformation matrix of the camera coordinate system relative to the earth coordinate system can be expressed as:

[0145]

[0146] Therefore, using the coordinate transformation relationship, the transformation matrix from the base to the lens can be expressed as follows:

[0147]

[0148] In the above expression, the first row and first column elements in the matrices on both sides of the equation are equal, so the following relationship can be obtained:

[0149] cosθ c =cosθ1cosθ2cos 2 ψ1+cosθ1cosθ2sin 2 ψ1+sinθ1sinθ2

[0150] =cosθ1cosθ2+sinθ1sinθ2

[0151] =cos(θ2-θ1)

[0152] Therefore, the pitch angle of the camera lens relative to the base, that is, the deviation angle between the pitch axis of the camera lens and the zero point is:

[0153] θ c =θ2-θ1

[0154] Therefore, according to the above formula, in some embodiments, the gimbal control device can generate the first posture change angle corresponding to the gimbal according to the difference between the first pitch angle and the second pitch angle during the process of calculating the first posture change angle of the gimbal in the pitch direction.

[0155] In addition, in some other embodiments of the present application, such as in a scenario where the target posture change angle corresponding to the gimbal is the second posture change angle of the gimbal in the roll direction, the above-mentioned first ground angle may also include a first roll angle in the roll direction measured by the first IMU, and the above-mentioned second ground angle may also include a second roll angle in the roll direction measured by the second IMU.

[0156] Among them, the second column of the third row in the above conversion matrix is ​​expanded to have the following equation relationship:

[0157] sinφ c =cosφ1sinθ1sinφ2sinθ2cos 2 ψ-cosφ1sinθ1cosφ2sinψcosψ+sinφ1sinφ2sinθ2sinψcosψ-sinφ1cosφ2sin 2 ψ+cosφ1sinθ1sinφ2sinθ2sin 2 ψ+cosφ1sinθ1cosφ2sinψcosψ-sinφ1sinφ2cosθ2sinψcosψ-sinφ1cosφ2cos 2ψ+cosφ1cosθ1sinφ2cosθ2

[0158] =cosφ1sinθ1sinφ2sinθ2+sinφ1cosφ2+cosφ1cosθ1sinφ2cosθ2

[0159] Solving the above formula by inverse sine, the calculation formula for the deviation of the roll axis of the camera lens relative to the zero point can be expressed as follows:

[0160] φ c =arcsin(cosφ1sinθ1sinφ2sinθ2+sinφ1cosφ2+cosφ1cosθ1sinφ2cosθ2)

[0161] Wherein, θ1 and θ2 represent the first pitch angle and the second pitch angle, respectively, and φ1 and φ2 represent the first roll angle and the second roll angle, respectively.

[0162] Therefore, in some embodiments, when the target posture change angle corresponding to the gimbal is the second posture change angle of the gimbal in the roll direction, the formula obtained by solving the above-mentioned inverse sine can be used as a preset roll angle processing function, and the preset roll angle function is used to process the first pitch angle, the second pitch angle, the first roll angle and the second roll angle to generate the second posture change angle corresponding to the gimbal.

[0163] Next, in the above-mentioned implementation method of using two IMUs to calculate the target posture change angle, for the calculated target posture change angle, the gimbal control device can adopt a strategy similar to the implementation method of a single IMU to generate a corresponding current code disk count value based on the target posture change angle.

[0164] For example, the gimbal control device can calculate the current encoder count value when the gimbal is in the current posture state based on the following formula:

[0165]

[0166] Where N is the total code disc count value of the incremental encoder rotating one circle, and Angle is the pitch angle φ of the camera lens relative to the base. c Or roll angle θ c , i = x, y, x represents the roll axis of the gimbal, y represents the pitch axis, n i0 Indicates the initial code disc count value of the incremental encoder when the gimbal is in the initial posture state, n′ i Indicates the current encoder count value.

[0167] It should be noted that the maximum count value of one circle of the incremental encoder is generally fixed. In the process of calculating the current code disk count value when the gimbal is in the current posture state using the above-mentioned scheme provided in the present application, the calculated current code disk count value may be greater than the maximum count value of the incremental encoder, or less than 0; for example, in some scenarios, assuming that the maximum count value of one circle of the incremental encoder is 360, the current code disk count value calculated by the gimbal control device may be greater than 360 or less than 0.

[0168] However, for a current code disk count value that is greater than the maximum count value of the incremental encoder or less than 0, the current code disk count value may be beyond the index range of the motor processor's table lookup, resulting in abnormal control of the pan / tilt head.

[0169] Therefore, in some embodiments, the pan / tilt control device may further adjust the current code disk count value obtained by calculation, so that the adjusted current code disk count value is within a preset count value range.

[0170] For example, in the aforementioned example, assuming that the maximum count value of one circle of the incremental encoder is 360, and the preset count value range is [0,360], then when the current code disk count value calculated by the pan-tilt control device is not within the preset count value range, the current code disk count value can be adjusted to within the preset count value range.

[0171] Exemplarily, the gimbal control device may record a first counting threshold and a second counting threshold, the first counting threshold may be smaller than the second counting threshold, and the range interval constructed by the first counting threshold and the second counting threshold may be used as the above-mentioned preset counting value range; for example, the first counting threshold may be the above-mentioned 0, and the second counting threshold may be the above-mentioned 360.

[0172] Based on this, in the process of adjusting the current code disk count value, the pan-tilt control device can compare the current code disk count value with the first count threshold and the second count threshold. When the current code disk count value is less than the first count threshold, the current code disk count value is added to the set count adjustment step; when the current code disk count value is greater than or equal to the second count threshold, the current code disk count value can be subtracted from the set count adjustment step.

[0173] For example, the PTZ control device can adjust the current encoder count value according to the following formula:

[0174]

[0175] Where L represents the first counting threshold, M represents the second counting threshold, and n′ iIndicates the current code disk count value, n i Indicates the updated current encoder count value.

[0176] In some possible implementations, the set count adjustment compensation may be a difference between the second count threshold and the first count threshold; for example, in the aforementioned example, the set count adjustment step may be 360.

[0177] In this way, according to the above solution provided in the present application, the count value of the encoder used for posture control of the motor can be within the preset count value range, thereby avoiding abnormal control of the gimbal.

[0178] In addition, based on the same inventive concept as the above-mentioned pan / tilt control method provided in this application, please refer to Figure 5 The present application also provides a pan-tilt control device 300, which may include an acquisition module 301 and a processing module 302.

[0179] An acquisition module 301 is used to acquire a target posture change angle of the gimbal from an initial posture state to a current posture state;

[0180] The acquisition module 301 is also used to acquire the initial code disk count value of the gimbal; wherein the initial code disk count value is the code disk count value of the incremental encoder when the gimbal is in the initial posture state;

[0181] The processing module 302 is used to calculate the current code disk count value when the gimbal is in the current posture state according to the target posture change angle and the initial code disk count value, so as to control the posture of the gimbal based on the current code disk count value and the initial posture state.

[0182] Optionally, in some possible implementations, when acquiring the initial code disk count value of the PTZ, the acquisition module 301 is specifically used to:

[0183] When the code disk count value of the incremental encoder saved when the gimbal is in the initial posture state is read locally on the gimbal, the read code disk count value is used as the initial code disk count value;

[0184] When the stored code disc count value of the incremental encoder in the initial posture state of the gimbal is not read locally on the gimbal, the posture state of the gimbal is adjusted until the code disc count value of the incremental encoder indicates an index signal of the incremental encoder;

[0185] Adjusting the posture state of the gimbal to an initial posture state, and determining the code disc count value of the incremental encoder when the gimbal is in the initial posture state as the initial code disc count value;

[0186] The initial encoder count value is saved locally on the PTZ.

[0187] Optionally, in some possible implementations, the gimbal further includes an IMU;

[0188] When acquiring the target posture change angle of the gimbal from the initial posture state to the current posture state, the acquisition module 301 is specifically used to:

[0189] Based on the acceleration value of the gimbal in the current posture state measured by the IMU, the target posture change angle corresponding to the gimbal adjusting from the initial posture state to the current posture state is calculated.

[0190] Optionally, in some possible implementations, before calculating the target posture change angle corresponding to the adjustment of the gimbal from the initial posture state to the current posture state based on the acceleration value of the gimbal measured by the IMU in the current posture state, the acquisition module 301 is further used to:

[0191] Get the zero drift adjustment parameters corresponding to the IMU;

[0192] Based on the acceleration value of the gimbal in the current posture state measured by the IMU, the target posture change angle corresponding to the gimbal adjusting from the initial posture state to the current posture state is calculated, including:

[0193] Based on the acceleration value of the gimbal in the current posture state measured by the IMU and the zero drift adjustment parameter, the target posture change angle corresponding to the gimbal adjusting from the initial posture state to the current posture state is calculated.

[0194] Optionally, in some possible implementations, the gimbal is further provided with a first IMU and a second IMU;

[0195] When acquiring the target posture change angle of the gimbal from the initial posture state to the current posture state, the acquisition module 301 is specifically used to:

[0196] According to the first acceleration value measured by the first IMU and the second acceleration value measured by the second IMU, a first ground angle corresponding to the first IMU and a second ground angle corresponding to the second IMU are calculated respectively; wherein the first acceleration value is the acceleration value measured by the first IMU in the current posture state when the gimbal is adjusted from the initial posture state to the current posture state, and the second acceleration value is the acceleration value measured by the second IMU in the current posture state;

[0197] According to the first ground angle and the second ground angle, the target posture change angle corresponding to the gimbal is calculated.

[0198] Optionally, in some possible implementations, the target posture change angle includes a first posture change angle of the gimbal in a pitch direction; the first ground angle includes a first pitch angle in the pitch direction measured by a first IMU, and the second ground angle is a second pitch angle in the pitch direction measured by a second IMU;

[0199] When the acquisition module 301 calculates the target posture change angle corresponding to the gimbal according to the first ground angle and the second ground angle, it is specifically used to:

[0200] According to the difference between the first pitch angle and the second pitch angle, a first attitude change angle corresponding to the gimbal is generated.

[0201] Optionally, in some possible implementations, the target posture change angle further includes a second posture change angle of the gimbal in a roll direction; the first ground angle further includes a first roll angle in the roll direction measured by the first IMU, and the second ground angle further includes a second roll angle in the roll direction measured by the second IMU;

[0202] When the acquisition module 301 calculates the target posture change angle corresponding to the gimbal according to the first ground angle and the second ground angle, it is also used to:

[0203] The first pitch angle, the second pitch angle, the first roll angle and the second roll angle are processed using a preset roll angle processing function to generate a second posture change angle corresponding to the gimbal.

[0204] Optionally, in some possible implementations, before acquiring the target posture change angle of the gimbal adjusted from the initial posture state to the current posture state, the acquisition module 301 is further configured to:

[0205] Obtaining trigger information, where the trigger information is used to indicate updating of a current code disc count value of the incremental encoder;

[0206] The trigger information includes at least one of the following:

[0207] The gimbal control system receives a power-on signal; or, the indication information of the encoder index signal cannot be obtained; or, an instruction to update the encoder count value of the current posture state is received.

[0208] Optionally, in some possible implementations, the processing module 302 is further configured to:

[0209] The current code disk count value is adjusted so that the adjusted current code disk count value is within a preset count value range.

[0210] Optionally, in some possible implementations, the preset counting value range is a range interval formed by a first counting threshold and a second counting threshold, and the first counting threshold is less than the second counting threshold;

[0211] When adjusting the current code disk count value, the processing module 302 is specifically used to:

[0212] When the current code disk count value is less than the first count threshold, the current code disk count value is added to the set count adjustment step;

[0213] When the current code disk count value is greater than or equal to the second count threshold, the current code disk count value is subtracted from the set count adjustment step.

[0214] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are merely schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to some embodiments of the present application. In this regard, each box in the flowchart or block diagram may represent a module, a program segment or a part of a code, and the module, program segment or a part of a code includes one or more executable instructions for implementing a specified logical function.

[0215] It should also be noted that in some alternative implementations, the functions marked in the blocks may also occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the opposite order, depending on the functions involved.

[0216] It should also be noted that each box in the block diagram and / or flowchart, and combinations of boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0217] In addition, in some embodiments of the present application, the functional modules may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0218] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in some embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories, random access memories, magnetic disks or optical disks.

[0219] The above description is only a partial embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0220] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present application. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

Claims

1. A pan / tilt control method, characterized in that: The gimbal is provided with an incremental encoder, and the gimbal also includes an inertial measurement unit IMU; the method includes: Obtaining a target posture change angle of the gimbal adjusted from an initial posture state to a current posture state, wherein the target posture change angle is obtained using parameters measured by the configured IMU; When the stored code disk count value of the incremental encoder when the gimbal is in the initial posture state is read locally on the gimbal, the read code disk count value is used as the initial code disk count value; wherein the initial code disk count value is the code disk count value of the incremental encoder when the gimbal is in the initial posture state; According to the target posture change angle and the initial code disk count value, the current code disk count value of the gimbal in the current posture state is calculated, so as to perform posture control on the gimbal based on the current code disk count value and the initial posture state.

2. The method according to claim 1, characterized in that The method further comprises: When the stored code disc count value of the incremental encoder in the initial posture state of the gimbal is not read locally, the posture state of the gimbal is adjusted until the code disc count value of the incremental encoder indicates an index signal of the incremental encoder; Adjusting the posture state of the gimbal to the initial posture state, and determining the code disk count value of the incremental encoder when the gimbal is in the initial posture state as the initial code disk count value; The initial code disk count value is stored locally in the pan / tilt platform.

3. The method according to claim 1, characterized in that The step of obtaining a target posture change angle of the gimbal adjusted from an initial posture state to a current posture state includes: Based on the acceleration value of the gimbal in the current posture state measured by the IMU, a target posture change angle corresponding to the adjustment of the gimbal from an initial posture state to the current posture state is calculated.

4. The method according to claim 3, characterized in that Before calculating the target posture change angle corresponding to the adjustment of the gimbal from the initial posture state to the current posture state based on the acceleration value of the gimbal in the current posture state measured by the IMU, the method further includes: Obtain zero drift adjustment parameters corresponding to the IMU; The step of calculating a target posture change angle corresponding to adjusting the gimbal from an initial posture state to the current posture state based on the acceleration value of the gimbal in the current posture state measured by the IMU includes: Based on the acceleration value of the gimbal in the current posture state measured by the IMU and the zero drift adjustment parameter, a target posture change angle corresponding to the adjustment of the gimbal from the initial posture state to the current posture state is calculated.

5. The method according to claim 1, characterized in that The gimbal is also provided with a first IMU and a second IMU; The step of obtaining a target posture change angle of the gimbal adjusted from an initial posture state to a current posture state includes: According to the first acceleration value measured by the first IMU and the second acceleration value measured by the second IMU, a first ground angle corresponding to the first IMU and a second ground angle corresponding to the second IMU are calculated respectively; wherein, the first acceleration value is the acceleration value measured by the first IMU in the current posture state during the process of the gimbal adjusting from the initial posture state to the current posture state, and the second acceleration value is the acceleration value measured by the second IMU in the current posture state; A target posture change angle corresponding to the gimbal is calculated according to the first ground angle and the second ground angle.

6. The method according to claim 5, characterized in that The target posture change angle includes the first posture change angle of the gimbal in the pitch direction; the first ground angle includes the first pitch angle in the pitch direction measured by the first IMU, and the second ground angle is the second pitch angle in the pitch direction measured by the second IMU; The calculating, according to the first ground angle and the second ground angle, a target posture change angle corresponding to the gimbal includes: A first attitude change angle corresponding to the gimbal is generated according to a difference between the first pitch angle and the second pitch angle.

7. The method according to claim 6, characterized in that The target posture change angle also includes a second posture change angle of the gimbal in the roll direction; the first ground angle also includes a first roll angle in the roll direction measured by the first IMU, and the second ground angle also includes a second roll angle in the roll direction measured by the second IMU; The step of calculating the target posture change angle corresponding to the gimbal according to the first ground angle and the second ground angle further includes: The first pitch angle, the second pitch angle, the first roll angle and the second roll angle are processed by using a preset roll angle processing function to generate a second posture change angle corresponding to the gimbal.

8. The method according to claim 1, characterized in that Before obtaining the target posture change angle of the gimbal adjusted from the initial posture state to the current posture state, the method further includes: Obtaining trigger information, where the trigger information is used to instruct to update a current code disc count value of the incremental encoder; The trigger information includes at least one of the following: A power-on signal of the control system of the gimbal; or, indication information that the code disk index signal cannot be obtained; or, an instruction for indicating an update of the code disk count value of the current posture state is received.

9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: The current code disk count value is adjusted so that the adjusted current code disk count value is within a preset count value range.

10. The method according to claim 9, characterized in that The preset counting value range is a range interval formed by a first counting threshold and a second counting threshold, and the first counting threshold is smaller than the second counting threshold; The adjusting the current code disk count value includes: When the current code disk count value is less than the first count threshold, the current code disk count value is added with the set count adjustment step; When the current code disk count value is greater than or equal to the second count threshold, the current code disk count value is subtracted from the set count adjustment step.

11. A pan / tilt control device, characterized in that: The gimbal is provided with an incremental encoder, and the gimbal also includes an inertial measurement unit IMU; the device includes: An acquisition module is used to acquire a target posture change angle of the gimbal from an initial posture state to a current posture state, wherein the target posture change angle is obtained using parameters measured by the configured IMU; The acquisition module is also used for, when the stored code disk count value of the incremental encoder when the gimbal is in the initial posture state is read locally by the gimbal, using the read code disk count value as the initial code disk count value; wherein the initial code disk count value is the code disk count value of the incremental encoder when the gimbal is in the initial posture state; A processing module is used to calculate the current code disk count value of the gimbal in the current posture state according to the target posture change angle and the initial code disk count value, so as to perform posture control on the gimbal based on the current code disk count value and the initial posture state.

12. The device according to claim 11, characterized in that The acquisition module is also specifically used for: When the stored code disc count value of the incremental encoder in the initial posture state of the gimbal is not read locally, the posture state of the gimbal is adjusted until the code disc count value of the incremental encoder indicates an index signal of the incremental encoder; Adjusting the posture state of the gimbal to the initial posture state, and determining the code disk count value of the incremental encoder when the gimbal is in the initial posture state as the initial code disk count value; The initial code disk count value is stored locally in the pan / tilt platform.

13. The device according to claim 11, characterized in that When the acquisition module acquires the target posture change angle of the gimbal adjusted from the initial posture state to the current posture state, it is specifically used to: Based on the acceleration value of the gimbal in the current posture state measured by the IMU, a target posture change angle corresponding to the adjustment of the gimbal from an initial posture state to the current posture state is calculated.

14. The device according to claim 13, characterized in that Before calculating the target posture change angle of the gimbal adjusted from the initial posture state to the current posture state based on the acceleration value of the gimbal measured by the IMU in the current posture state, the acquisition module is further used to: Obtain zero drift adjustment parameters corresponding to the IMU; The step of calculating a target posture change angle corresponding to adjusting the gimbal from an initial posture state to the current posture state based on the acceleration value of the gimbal in the current posture state measured by the IMU includes: Based on the acceleration value of the gimbal in the current posture state measured by the IMU and the zero drift adjustment parameter, a target posture change angle corresponding to the adjustment of the gimbal from the initial posture state to the current posture state is calculated.

15. The device according to claim 11, characterized in that The gimbal is also provided with a first IMU and a second IMU; When the acquisition module acquires the target posture change angle of the gimbal adjusted from the initial posture state to the current posture state, it is specifically used to: According to the first acceleration value measured by the first IMU and the second acceleration value measured by the second IMU, a first ground angle corresponding to the first IMU and a second ground angle corresponding to the second IMU are calculated respectively; wherein, the first acceleration value is the acceleration value measured by the first IMU in the current posture state during the process of the gimbal adjusting from the initial posture state to the current posture state, and the second acceleration value is the acceleration value measured by the second IMU in the current posture state; A target posture change angle corresponding to the gimbal is calculated according to the first ground angle and the second ground angle.

16. The device according to claim 15, characterized in that The target posture change angle includes the first posture change angle of the gimbal in the pitch direction; the first ground angle includes the first pitch angle in the pitch direction measured by the first IMU, and the second ground angle is the second pitch angle in the pitch direction measured by the second IMU; When the acquisition module calculates the target posture change angle corresponding to the gimbal according to the first ground angle and the second ground angle, it is specifically used to: A first attitude change angle corresponding to the gimbal is generated according to a difference between the first pitch angle and the second pitch angle.

17. The device according to claim 16, characterized in that The target posture change angle also includes a second posture change angle of the gimbal in the roll direction; the first ground angle also includes a first roll angle in the roll direction measured by the first IMU, and the second ground angle also includes a second roll angle in the roll direction measured by the second IMU; When the acquisition module calculates the target posture change angle corresponding to the gimbal according to the first ground angle and the second ground angle, the acquisition module is further used to: The first pitch angle, the second pitch angle, the first roll angle and the second roll angle are processed by using a preset roll angle processing function to generate a second posture change angle corresponding to the gimbal.

18. The device according to claim 11, characterized in that Before acquiring the target posture change angle of the gimbal adjusted from the initial posture state to the current posture state, the acquisition module is further used to: Obtaining trigger information, where the trigger information is used to instruct to update a current code disc count value of the incremental encoder; The trigger information includes at least one of the following: A power-on signal of the control system of the gimbal; or, indication information that the code disk index signal cannot be obtained; or, an instruction for indicating an update of the code disk count value of the current posture state is received.

19. The device according to any one of claims 11 to 18, characterized in that The processing module is also used for: The current code disk count value is adjusted so that the adjusted current code disk count value is within a preset count value range.

20. The device according to claim 19, characterized in that The preset counting value range is a range interval formed by a first counting threshold and a second counting threshold, and the first counting threshold is smaller than the second counting threshold; When the processing module adjusts the current code disk count value, it is specifically used to: When the current code disk count value is less than the first count threshold, the current code disk count value is added with the set count adjustment step; When the current code disk count value is greater than or equal to the second count threshold, the current code disk count value is subtracted from the set count adjustment step.

21. A pan / tilt control device, characterized in that: include: A memory for storing one or more programs; processor; When the one or more programs are executed by the processor, the method according to any one of claims 1 to 10 is implemented.

22. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.