Gimbal heading control method and device, electronic device and storage medium
By acquiring data on the gimbal rotation speed and motor rotation angle of the UAV, and combining this with the Kalman filtering method, the accuracy problem of UAV gimbal yaw angle calibration was solved, the gimbal heading control effect was improved, and the equipment cost and complexity were reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-03-31
AI Technical Summary
Existing methods for calibrating the yaw angle of UAV gimbals require additional hardware, are complex to implement, and are susceptible to environmental interference. Furthermore, consumer-grade gyroscopes have large errors, leading to the accumulation of noise errors and making it difficult to accurately obtain the yaw angle of the UAV.
By acquiring data on the gimbal rotation speed, motor rotation angle, and flight mode commands of the UAV, and combining the gyroscope angular velocity and heading encoder angle, the theoretical yaw angle and observed yaw angle are calculated using the Kalman filter method to determine the target yaw angle and achieve gimbal heading calibration.
It improves the accuracy of the drone's yaw angle, enhances the gimbal's heading control effect, reduces equipment costs and implementation complexity, and does not require additional hardware modules.
Smart Images

Figure CN121254901B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of unmanned aerial vehicle (UAV) control, and in particular to gimbal heading control methods, apparatus, electronic devices, and storage media. Background Technology
[0002] With the advancement of science and technology, the application of drones is becoming increasingly widespread. Drone gimbals are typically equipped with accelerometer-inertial measurement units (CIMUs) to calculate the current angle in real time and control the motors to maintain the lens's target position. However, consumer-grade gyroscopes have significant errors and severe drift, and direct integration of angular velocity can lead to noise error accumulation. Current calibration methods require additional hardware, are complex to implement, and are easily affected by environmental interference. Therefore, a superior gimbal heading calibration and control method is needed.
[0003] Currently, no effective solution has been proposed for the problem of accurately obtaining the yaw angle of a UAV and calibrating the gimbal heading based on the yaw angle. Summary of the Invention
[0004] This application provides a gimbal heading control method, apparatus, electronic device, and storage medium to at least solve the problem in the related art of how to accurately obtain the yaw angle of a UAV and calibrate and control the gimbal heading based on the yaw angle.
[0005] In a first aspect, embodiments of this application provide a gimbal heading control method.
[0006] In some embodiments, the gimbal heading control method includes:
[0007] Acquire data on the drone's gimbal rotation speed, motor rotation angle, and flight mode commands;
[0008] The state variables are determined based on the gimbal rotation speed data and the motor rotation angle data, and the theoretical yaw angle data of the UAV is calculated based on the state variables.
[0009] Based on the flight mode command, determine the observation yaw angle data of the UAV;
[0010] Based on the theoretical yaw angle data and the observed yaw angle data, the target yaw angle data for controlling the gimbal heading of the UAV is determined.
[0011] In some embodiments, determining state variables based on the gimbal rotation speed data and the motor rotation angle data, and calculating the theoretical yaw angle data of the UAV based on the state variables, includes:
[0012] Determine the gyroscope angular velocity deviation variable included in the gimbal rotation speed data, and the gimbal yaw angle variable included in the motor rotation angle data;
[0013] The state variables are determined based on the gyroscope angular velocity deviation variable and the gimbal yaw angle variable, and the theoretical yaw angle data of the UAV is calculated based on the state variables.
[0014] In some embodiments, determining the state variables based on the gyroscope angular velocity deviation variable and the gimbal yaw angle variable, and calculating the theoretical yaw angle data of the UAV based on the state variables, includes:
[0015] The state variables are determined based on the gyroscope angular velocity deviation variable and the gimbal yaw angle variable, and the state update model is determined based on the state transition matrix and the control input matrix.
[0016] The theoretical yaw angle data of the UAV is calculated based on the state variables and the state update model.
[0017] In some embodiments, determining the observed yaw angle data of the UAV according to the flight mode command includes:
[0018] The flight mode of the UAV is determined according to the flight mode command;
[0019] The encoder yaw angle and satellite positioning yaw angle are obtained. When the flight mode is hovering mode, the observation yaw angle data of the UAV is determined based on the encoder yaw angle.
[0020] When the flight mode is heading lock mode or heading follow mode, the observation yaw angle data of the UAV is determined based on the encoder yaw angle and the satellite positioning yaw angle.
[0021] In some embodiments, when the flight mode is a heading lock mode or a heading follow mode, determining the observed yaw angle data of the UAV based on the encoder yaw angle and the satellite positioning yaw angle includes:
[0022] When the flight mode is heading lock mode or heading follow mode, the difference between the satellite positioning yaw angle and the encoder yaw angle is determined as the observation yaw angle data of the UAV.
[0023] In some embodiments, determining the target yaw angle data for controlling the gimbal heading of the UAV based on the theoretical yaw angle data and the observed yaw angle data includes:
[0024] Based on the observation matrix and observation error, determine the observation model used for Kalman filtering;
[0025] Based on the observation model, the theoretical yaw angle data, and the observed yaw angle data, the target yaw angle data for controlling the gimbal heading of the UAV is determined.
[0026] In some embodiments, the process includes, before acquiring the gimbal rotation speed data, motor rotation angle data, and flight mode commands of the UAV:
[0027] Acquire raw gyroscope data and filter the raw gyroscope data to determine the gimbal rotation speed data of the UAV;
[0028] Obtain the raw data from the heading encoder, and determine the motor rotation angle data of the UAV based on the raw data from the heading encoder.
[0029] Secondly, embodiments of this application provide a gimbal heading control device.
[0030] In some embodiments, the gimbal heading control device includes an initial data acquisition module, a theoretical yaw angle determination module, an observed yaw angle determination module, and a target yaw angle determination module:
[0031] The initial data acquisition module is used to acquire the gimbal rotation speed data, motor rotation angle data, and flight mode commands of the UAV.
[0032] The theoretical yaw angle determination module is used to determine state variables based on the gimbal rotation speed data and the motor rotation angle data, and to calculate the theoretical yaw angle data of the UAV based on the state variables.
[0033] The observation yaw angle determination module is used to determine the observation yaw angle data of the UAV according to the flight mode command;
[0034] The target yaw angle determination module is used to determine the target yaw angle data for controlling the gimbal heading of the UAV based on the theoretical yaw angle data and the observed yaw angle data.
[0035] Thirdly, embodiments of this application provide an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the gimbal heading control method as described in the first aspect above.
[0036] Fourthly, embodiments of this application provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the gimbal heading control method as described in the first aspect above.
[0037] Compared to related technologies, the gimbal heading control method, apparatus, electronic device, and storage medium provided in this application acquire the gimbal rotation speed data, motor rotation angle data, and flight mode commands of the UAV. Based on the gimbal rotation speed data and motor rotation angle data, state variables are determined, and the theoretical yaw angle data of the UAV is calculated based on the state variables. Based on the flight mode commands, the observed yaw angle data of the UAV is determined. Based on the theoretical and observed yaw angle data, the target yaw angle data for controlling the gimbal heading of the UAV is determined. This solves the problem in related technologies of how to accurately acquire the UAV yaw angle and calibrate the gimbal heading control based on the yaw angle. It can improve the accuracy of the estimated UAV yaw angle, enhance the gimbal heading control effect, and does not require additional hardware modules, reducing equipment costs and implementation complexity.
[0038] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0039] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0040] Figure 1 This is a hardware structure block diagram of the terminal of the gimbal heading control method according to an embodiment of this application;
[0041] Figure 2 This is a flowchart of a gimbal heading control method according to an embodiment of this application;
[0042] Figure 3 This is a flowchart of a gimbal heading control method according to a preferred embodiment of this application;
[0043] Figure 4 This is a structural block diagram of a gimbal heading control device according to an embodiment of this application. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application. Furthermore, it is understood that although the efforts made in such a development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, modifications to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0045] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0046] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application means two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The terms “first,” “second,” “third,” etc., used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0047] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. Taking running on a terminal as an example, Figure 1 This is a hardware structure block diagram of the terminal of the gimbal heading control method according to an embodiment of the present invention. For example... Figure 1 As shown, a terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0048] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the gimbal heading control method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0049] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0050] This embodiment provides a gimbal heading control method. Figure 2 This is a flowchart of a gimbal heading control method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:
[0051] Step S201: Obtain the gimbal rotation speed data, motor rotation angle data, and flight mode command of the UAV.
[0052] Specifically, data can be obtained by measuring the gyroscope in the UAV's inertial measurement unit, and further acquiring the UAV's gimbal rotation speed data; the data measured by the UAV's encoder is processed to obtain the motor rotation angle data. Flight mode commands are sent to the UAV via the remote controller, and the UAV receives and acquires the flight mode commands, which can include flight mode selection commands such as hovering, heading lock, and heading follow.
[0053] Step S202: Determine the state variables based on the gimbal rotation speed data and motor rotation angle data, and calculate the theoretical yaw angle data of the UAV based on the state variables.
[0054] Based on the gimbal rotation speed data and motor rotation angle data, Kalman filter modeling is performed, and state variables are defined. The theoretical yaw angle data of the UAV is calculated using the state variables.
[0055] Step S203: Determine the observation yaw angle data of the UAV according to the flight mode command.
[0056] After receiving the flight mode command, the flight mode is determined, and the observation yaw angle data of the UAV is further determined based on the flight mode.
[0057] Step S204: Based on the theoretical yaw angle data and the observed yaw angle data, determine the target yaw angle data for controlling the gimbal heading of the UAV.
[0058] In the heading-lock flight mode, the aircraft turns while the gimbal maintains a fixed absolute direction. In the heading-follow flight mode, the aircraft turns while the gimbal rotates with it. Theoretically, in heading-lock mode, the gimbal yaw angle is 0, but in reality, because the aircraft rotates faster than the gimbal, the gimbal yaw angle is not 0. In heading-follow mode, the gimbal rotates with the aircraft, and the gimbal yaw angle equals the aircraft yaw angle. Theoretically, the UAV encoder angle is 0, but in reality, it is not 0 due to interference. Therefore, it is necessary to combine theoretical yaw angle data and observed yaw angle data from both the encoder angle and the aircraft yaw angle to calibrate and obtain the true yaw angle data, i.e., the target yaw angle data used to control the gimbal heading of the UAV.
[0059] Through the above steps, this embodiment of the application obtains the gimbal rotation speed data (gimbal gyroscope angular velocity), motor rotation angle data (heading encoder angle), and flight mode commands of the UAV. Since the heading encoder angle resolution is limited, the integration of the gimbal gyroscope angular velocity will generate accumulated errors, causing errors in the determined yaw angle. Therefore, this embodiment of the application uses the integration of the gimbal gyroscope angular velocity to calculate the ideal angle, and simultaneously uses the heading encoder angle as the observed value. That is, based on the gimbal rotation speed data and motor rotation angle data, the state variables are jointly determined. Furthermore, the theoretical yaw angle data of the UAV is calculated based on the state variables, and then, based on the flight mode commands, aircraft satellite positioning yaw angle data is introduced to jointly determine the observed yaw angle data of the UAV. Finally, based on theoretical yaw angle data (theoretical calculated data) and observed yaw angle data (sensor data), the true yaw angle is estimated by combining theoretical calculated data and sensor data using Kalman filtering. This determines the target yaw angle data used to control the gimbal heading of the UAV. This realizes a gimbal yaw angle estimation method that combines gimbal gyroscope angular velocity, heading encoder angle, and aircraft satellite positioning yaw angle data. It effectively estimates the gimbal yaw angle and solves the problem in related technologies of how to accurately obtain the UAV yaw angle and calibrate the gimbal heading based on the yaw angle. It can improve the accuracy of the estimated UAV yaw angle (target yaw angle data), improve the gimbal heading control effect, and reduce equipment costs and implementation complexity without adding additional hardware modules.
[0060] In some embodiments, step S202 includes:
[0061] Step S2021: Determine the gyroscope angular velocity deviation variable included in the gimbal rotation speed data, and the gimbal yaw angle variable included in the motor rotation angle data.
[0062] In this embodiment, the state variable refers to the amount of change describing the gimbal system. This application selects the gyroscope angular velocity deviation variable included in the gimbal rotation speed data and the gimbal yaw angle variable included in the motor rotation angle data as two elements of the state variable.
[0063] Step S2022: Determine the state variables based on the gyroscope angular velocity deviation variable and the gimbal yaw angle variable, and calculate the theoretical yaw angle data of the UAV based on the state variables.
[0064] Based on the gyroscope angular velocity deviation variable and the gimbal yaw angle variable, Kalman filter modeling is performed, and state variables are defined. .
[0065]
[0066] Where, θ gimbal ω represents the gimbal yaw angle variable.gyro_error This represents the gyroscope angular velocity deviation variable. Further, the theoretical yaw angle data of the UAV is calculated based on the state variables.
[0067] Through the above steps, this embodiment of the application determines the gyroscope angular velocity deviation variable included in the gimbal rotation speed data and the gimbal yaw angle variable included in the motor rotation angle data. Based on the gyroscope angular velocity deviation variable and the gimbal yaw angle variable, the state variable is determined. Based on the state variable, the theoretical yaw angle data of the UAV is calculated, which improves the accuracy of the theoretical yaw angle data and has high feasibility.
[0068] In some embodiments, step S2022 includes:
[0069] Step S2122: Determine the state variables based on the gyroscope angular velocity deviation variable and the gimbal yaw angle variable, and determine the state update model based on the state transition matrix and the control input matrix.
[0070] After determining the state variables based on the gyroscope angular velocity deviation and gimbal yaw angle variables, the state update model is further determined based on the state transition matrix and control input matrix. The state transition matrix is as follows:
[0071]
[0072] The control input matrix is:
[0073]
[0074] Step S2222: Calculate the theoretical yaw angle data of the UAV based on the state variables and the state update model.
[0075] The following state update model is used to describe state changes and control inputs. Measuring angular velocity with a gyroscope w k For noise, Δt is the time interval between time k and time k+1:
[0076]
[0077] Through the above steps, this application provides a specific method for calculating the theoretical yaw angle data of a UAV based on a state update model, which is used to confirm the changes in the system state, thereby obtaining accurate yaw angle data in a timely manner with high real-time performance.
[0078] In some embodiments, step S203 includes:
[0079] Step S2031: Determine the flight mode of the UAV according to the flight mode command.
[0080] The drone receives and acquires flight mode instructions, which may include flight mode selection instructions such as hovering, heading lock, and heading follow. Based on the flight mode instructions, the drone determines its flight mode.
[0081] Step S2032: Obtain the encoder yaw angle and satellite positioning yaw angle. When the flight mode is hovering, determine the observation yaw angle data of the UAV based on the encoder yaw angle.
[0082] In this embodiment of the application, the encoder yaw angle is: The satellite positioning yaw angle is θ GPS When the flight mode is hovering, the observed yaw angle data of the UAV only needs to be determined based on the encoder yaw angle. for .
[0083] Step S2033: When the flight mode is heading lock mode or heading follow mode, determine the observation yaw angle data of the UAV based on the encoder yaw angle and the satellite positioning yaw angle.
[0084] When the flight mode is heading lock mode or heading follow mode, the sensor observation value is different from the theoretical calculation value. It is not possible to calibrate the gyroscope data using only the encoder angle value. Therefore, the observation yaw angle data of the UAV is determined by calibrating together based on the encoder yaw angle and the satellite positioning yaw angle.
[0085] Through the above steps, this embodiment of the application calibrates the gimbal heading error based on the satellite positioning yaw angle and encoder angle of the UAV, so as to obtain accurate observation yaw angle data, overcome the error caused by the difference in turning speed between the UAV and the gimbal, and further improve the accuracy of the final obtained UAV yaw angle.
[0086] In some embodiments, step S2033 includes:
[0087] Step S2133: When the flight mode is heading lock mode or heading follow mode, the difference between the satellite positioning yaw angle and the encoder yaw angle is determined as the observation yaw angle data of the UAV.
[0088] In this embodiment of the application, when the flight mode is heading lock mode or heading follow mode, the observed yaw angle data of the UAV is determined based on the difference between the satellite positioning yaw angle and the encoder yaw angle. for .
[0089] Through the above steps, the embodiment of this application determines the difference between the satellite positioning yaw angle and the encoder yaw angle as the observation yaw angle data of the UAV, reducing the implementation complexity and ensuring accuracy and feasibility.
[0090] In some embodiments, step S204 includes:
[0091] Step S2041: Determine the observation model for Kalman filtering based on the observation matrix and observation error.
[0092] In this embodiment of the application, the observation model is as follows:
[0093]
[0094] Where H is the observation matrix, V k This represents the observation error.
[0095] Step S2042: Based on the observation model, theoretical yaw angle data, and observed yaw angle data, determine the target yaw angle data for controlling the gimbal heading of the UAV.
[0096] This application embodiment is based on an observation model, using observed yaw angle data to correct state variables, thereby determining the target yaw angle data for controlling the gimbal heading of the UAV.
[0097] Through the above steps, this embodiment of the application uses Kalman filtering and observed yaw angle data to correct state variables, thereby improving the accuracy of target yaw angle data for controlling the gimbal heading of the UAV and further enhancing the gimbal heading control effect.
[0098] In some embodiments, the method further includes the following steps prior to step S201:
[0099] Step S2011: Obtain the raw gyroscope data and filter the raw gyroscope data to determine the gimbal rotation speed data of the UAV.
[0100] The raw gyroscope data is obtained and filtered to obtain the data after subtracting the zero bias, which is then determined as the gimbal rotation speed data of the UAV.
[0101] Step S2012: Obtain the original data of the heading encoder and determine the motor rotation angle data of the UAV based on the original data of the heading encoder.
[0102] In this embodiment of the application, after calibrating the UAV gimbal, the original data of the heading encoder is obtained, converted into the yaw angle data of the encoder, and further determined as the motor rotation angle data.
[0103] Through the above steps, the embodiments of this application preprocess the raw data to improve data accuracy, thereby improving the accuracy of subsequent target data results and enhancing the calibration control gimbal heading effect.
[0104] The embodiments of this application will be described and illustrated below through preferred embodiments.
[0105] Figure 3 This is a preferred flowchart of the gimbal heading control method according to an embodiment of this application, such as... Figure 3 As shown, the gimbal heading control method includes the following steps:
[0106] Step S301: Obtain raw gyroscope data and filter the raw gyroscope data to determine the gimbal rotation speed data of the UAV.
[0107] Step S302: Obtain the original data of the heading encoder and determine the motor rotation angle data of the UAV based on the original data of the heading encoder;
[0108] Step S303: Determine the gyroscope angular velocity deviation variable included in the gimbal rotation speed data, and the gimbal yaw angle variable included in the motor rotation angle data;
[0109] Step S304: Determine the state variables based on the gyroscope angular velocity deviation variable and the gimbal yaw angle variable, and calculate the theoretical yaw angle data of the UAV based on the state variables;
[0110] Step S305: Determine the observation yaw angle data of the UAV according to the flight mode command;
[0111] Step S306: Based on the observation matrix and observation error, determine the observation model used for Kalman filtering, and based on the observation model, theoretical yaw angle data, and observed yaw angle data, determine the target yaw angle data used to control the gimbal heading of the UAV.
[0112] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0113] This embodiment also provides a gimbal heading control device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0114] Figure 4 This is a structural block diagram of the gimbal heading control device according to an embodiment of this application, such as... Figure 4 As shown, the device includes an initial data acquisition module 10, a theoretical yaw angle determination module 20, an observed yaw angle determination module 30, and a target yaw angle determination module 40.
[0115] The initial data acquisition module 10 is used to acquire the gimbal rotation speed data, motor rotation angle data and flight mode commands of the UAV;
[0116] The theoretical yaw angle determination module 20 is used to determine the state variables based on the gimbal rotation speed data and the motor rotation angle data, and to calculate the theoretical yaw angle data of the UAV based on the state variables;
[0117] The observation yaw angle determination module 30 is used to determine the observation yaw angle data of the UAV according to the flight mode command;
[0118] The target yaw angle determination module 40 is used to determine the target yaw angle data for controlling the gimbal heading of the UAV based on theoretical yaw angle data and observed yaw angle data.
[0119] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0120] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0121] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0122] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0123] Acquire data on the drone's gimbal rotation speed, motor rotation angle, and flight mode commands;
[0124] The state variables are determined based on the gimbal rotation speed data and motor rotation angle data, and the theoretical yaw angle data of the UAV is calculated based on the state variables.
[0125] Determine the observation yaw angle data of the UAV according to the flight mode instructions;
[0126] Based on theoretical yaw angle data and observed yaw angle data, the target yaw angle data for controlling the gimbal heading of the UAV is determined.
[0127] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.
[0128] Furthermore, in conjunction with the gimbal heading control method in the above embodiments, this application embodiment can provide a storage medium for implementation. This storage medium stores a computer program; when executed by a processor, the computer program implements any of the gimbal heading control methods in the above embodiments.
[0129] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0130] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0131] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A gimbal heading control method, characterized by, The method comprises the following steps: obtaining gimbal rotation speed data, motor rotation angle data and flight mode instruction of a UAV; determining a state variable according to the gimbal rotation speed data and the motor rotation angle data, and calculating theoretical yaw angle data of the UAV according to the state variable; determining a flight mode of the UAV according to the flight mode instruction; obtaining an encoder yaw angle and a satellite positioning yaw angle, and determining observed yaw angle data of the UAV according to the encoder yaw angle when the flight mode is a hovering mode; determining observed yaw angle data of the UAV according to the encoder yaw angle and the satellite positioning yaw angle when the flight mode is a heading lock mode or a heading follow mode; determining target yaw angle data for controlling a gimbal heading of the UAV according to the theoretical yaw angle data and the observed yaw angle data.
2. The gimbal yaw control method of claim 1, wherein, The step of determining a state variable according to the gimbal rotation speed data and the motor rotation angle data, and calculating theoretical yaw angle data of the UAV according to the state variable comprises: determining a gyroscope angular velocity bias variable included in the gimbal rotation speed data and a gimbal yaw angle variable included in the motor rotation angle data; determining a state variable according to the gyroscope angular velocity bias variable and the gimbal yaw angle variable, and calculating theoretical yaw angle data of the UAV according to the state variable.
3. The gimbal yaw control method of claim 2, wherein, The step of determining a state variable according to the gyroscope angular velocity bias variable and the gimbal yaw angle variable, and calculating theoretical yaw angle data of the UAV according to the state variable comprises: determining a state variable according to the gyroscope angular velocity bias variable and the gimbal yaw angle variable, and determining a state update model according to a state transition matrix and a control input matrix; calculating theoretical yaw angle data of the UAV according to the state variable and the state update model.
4. The gimbal yaw control method of claim 3, wherein, The step of determining observed yaw angle data of the UAV according to the encoder yaw angle and the satellite positioning yaw angle when the flight mode is a heading lock mode or a heading follow mode comprises: determining a difference between the satellite positioning yaw angle and the encoder yaw angle as the observed yaw angle data of the UAV when the flight mode is a heading lock mode or a heading follow mode.
5. The gimbal yaw control method of claim 4, wherein, The step of determining target yaw angle data for controlling a gimbal heading of the UAV according to the theoretical yaw angle data and the observed yaw angle data comprises: determining an observation model for Kalman filtering according to an observation matrix and an observation error; determining target yaw angle data for controlling a gimbal heading of the UAV according to the observation model, the theoretical yaw angle data and the observed yaw angle data.
6. The gimbal yaw control method of claim 5, wherein, The method further comprises the following steps before the step of obtaining gimbal rotation speed data, motor rotation angle data and flight mode instruction of a UAV: obtaining gyroscope raw data, and filtering the gyroscope raw data to determine gimbal rotation speed data of the UAV; Raw data of a heading encoder is acquired, and motor rotation angle data of the UAV is determined according to the raw data of the heading encoder.
7. A gimbal heading control device for implementing the gimbal heading control method according to any one of claims 1 to 6, characterized by, The method comprises an initial data acquisition module, a theoretical yaw angle determination module, an observed yaw angle determination module, and a target yaw angle determination module. The initial data acquisition module is configured to acquire gimbal rotation speed data, motor rotation angle data, and flight mode instructions of the UAV. The theoretical yaw angle determination module is configured to determine a state variable according to the gimbal rotation speed data and the motor rotation angle data, and to calculate theoretical yaw angle data of the UAV according to the state variable. The observed yaw angle determination module is configured to determine observed yaw angle data of the UAV according to the flight mode instructions. The target yaw angle determination module is configured to determine target yaw angle data for controlling the gimbal heading of the UAV according to the theoretical yaw angle data and the observed yaw angle data. 8.An electronic device comprising a memory and a processor, the electronic device comprising: The memory stores a computer program, and the processor is configured to run the computer program to execute the gimbal heading control method of any one of claims 1 to 6.
9. A storage medium, characterized by The storage medium stores a computer program, and the computer program is configured to run to execute the gimbal heading control method of any one of claims 1 to 6.
Citation Information
Patent Citations
Method for solving and controlling heading of unmanned aerial vehicle platform
CN109725652A
Course axis drift suppression method and device, holder and medium
CN120869102A